Google Maps pointer?


Is there a way to add a marker point to the attached Google Map like:
GMap.addOverlay(new GMarker(new GLatLng(Lat,Lng)));

I can get the map attached well on right position and zoom but adding an overlay gives me an error: GMap.addOverlay is not a function

My Code:

var opt = geocoder.getLocations(addr, function(locations) { for (var i=0; locations && locations.Placemark && i < locations.Placemark.length; i++) { Lat = locations.Placemark[i].Point.coordinates[1].toString(); Lng = locations.Placemark[i].Point.coordinates[0].toString(); } var opts = { center: new google.maps.LatLng(Lat,Lng), zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP }; GMap = tabbarContact.cells("c5").attachMap(opts); GMap.addOverlay(new GMarker(new GLatLng(Lat,Lng))); });

Thanks for your help,


Method addOverlay is maps’ v.2 functionality.
We’re using v.3 in code, please check google documentation: … ngOverlays


Thanks for your tip, works ‘out of the box’ now…


Hello FranX
can you please tell us the method you are using now?