Thanks. The map now works in v3.3 but not in v3.4. So, as I understand it, I'll be OK in the future. That is, will whatever the problem is be fixed in 3.4 OR, am I using an undocumented feature that will go away sometime in the future?
In answer to your question, "Why would I expect and event.button property...." The answer is that I'm not any kind of guru, just a grunt that muddled around until he found an answer so he could implement a feature that he thought was cool. So, when left clicking on a marker, the infowindow appears; but to get directions, I needed a different event to set the coordinates so I choose a right click and what do you know, it worked! So please don't take that property away, even if it wasn't supposed to be there to begin with. By the way, I love the Google Map API. This old muddler can do some incredibly neat stuff (at least in my mind) without a clue as to how the objects really work. On Mar 7, 6:10 pm, "[email protected]" <[email protected]> wrote: > On Mar 7, 3:03 pm, "[email protected]" <[email protected]> > wrote: > > > On Mar 7, 2:46 pm, John <[email protected]> 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
