Dear All, I hope Mike is seeing this. I already posted the same question at his site but I am not sure he is looking at this. While this is going on, I would also want to ask opinion from others
Has anyone implemented "right click" on the labelledmarker using http://www.googlemapsbook.com/2007/03/06/clickable-labeledmarker/ written by Mike? I have already tried with //create marker function createMarker(point, index, imageURL) { var latlng = new GLatLng(point.lat(), point.lng()); var icon = new GIcon(); icon.image = imageURL; icon.iconSize = new GSize(32, 32); icon.iconAnchor = new GPoint(16, 16); icon.infoWindowAnchor = new GPoint(25, 7); icon.imageMap = [0,0 ,0,32, 32,32, 32,0] opts = { \"icon\": icon, \"clickable\": true, \"labelText\": point.abbr, \"labelOffset\": new GSize(-16, -16) }; var marker = new LabeledMarker(latlng, opts); var handler = createMarkerClickHandler(marker, point.name, \"nothing\"); GEvent.addListener(marker, \"RightClick\", handler); return marker; } //create marker handler function createMarkerClickHandler(marker, text, link) { return function() { alert(marker.latlng); // true or false } } GEvent.addListener(map,\"singlerightclick\",function (pixel,tile,ovrlay) { if (ovrlay){ if (ovrlay instanceof LabeledMarker) { GEvent.trigger(ovrlay,\"RightClick\"); } else { } } else { alert(\"nonoverlayrightclick\") } }) But, the div text(label text) is not detected as an Overlay in the API? Any idea from anyone? I have been trying the whole day. My idea is to create a right click context menu where if a marker is selected(via right click), the starting/destination point will be the marker position and not point blank near the marker. As for http://dreamzblogspot.co.cc that I have made, when the right click is activated, it is selected point blank near the marker but not exactly on/from the marker's position. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en -~----------~----~----~----~------~----~------~--~---
