On Mar 7, 3:03 pm, "geocode...@gmail.com" <geocode...@gmail.com> wrote: > On Mar 7, 2:46 pm, John <d...@horsetraildirectory.com> wrote: > > > This is the relevant URL: > > http://www.horsetraildirectory.com/map/index_test.htm > > > Here's a piece of code that was working in January but isn't working > > now. The event.button is now undefined. > > Don't use the development version in production: > <script type="text/javascript" src="http://maps.google.com/maps/api/js? > sensor=false"></script> > > As suggested in the > documentation:http://code.google.com/apis/maps/documentation/javascript/basics.html... > pick a version that won't change on you without warning. > > See if Release Version (3.3) Reference (Feature-Stable) works for you. > > <script type="text/javascript" src="http://maps.google.com/maps/api/js? > v=3.3&sensor=false"></script> > > That said, you will probably need to fix this for version 3.4 > eventually. > > Why would you expect a event.button property on a marker click event?
A local version of it does work in IE(6), so it may have something to do with the browser you are using to test it (whether it supports CANVAS or not). -- Larry > > > > > > google.maps.event.addListener(marker,'mousedown',function(event){ > > var posn = marker.getPosition(); > > if (event.button==2) > > { > > > if (jel==0) > > { > > mytitle=marker.getTitle(); > > document.getElementById("loc_name").innerHTML=mytitle; > > document.getElementById("start").innerHTML=posn; > > // start=posn; > > jel=1; > > } > > else > > { > > mytitle=marker.getTitle(); > > document.getElementById("loc_end").innerHTML=mytitle; > > document.getElementById("end").innerHTML=posn; > > //end=posn; > > jel=0; > > } > > } > > else > > { > > > var title1=marker.getTitle(); > > myindex=title1.indexOf(" ")+1; > > var ijt= Number(title1.slice(0,myindex))-1; > > var description = content[ijt] ; > > var contentString=description+'<font size= "1">Note if the icon > > points to the center of a town, a road address is probably not in the > > main database.</font>'; > > > infowindow.setContent(contentString); > > infowindow.open(map,marker); > > } > > }); > > return marker > > };- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. To unsubscribe from this group, send email to google-maps-js-api-v3+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.