----/////Here it's the simple way of get latitude and longitude by
Drag Marker\\\\-----
var map = null;
function InitializeMap()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("map_canvas"));
map.addControl(new GSmallMapControl()); //show minimum
tools
map.enableScrollWheelZoom(); // enable scroll Zoom
map.setCenter(new GLatLng(26.9242,75.8167), 15);
var marker = new GMarker(new GLatLng(26.9242,75.8167),
{draggable:true});
GEvent.addListener(marker, "dragend", function(){
var points;
points= marker.getLatLng();
//alert(points);
});
map.addOverlay(marker);
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" 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.