I have this code for a pin in a map:
How can I do for be able to take the pin with the mouse from the map a
move it to a different location?
Thanks
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(39,-100),4);
//map.addControl(new GMapTypeControl());
//map.addControl(new GOverviewMapControl()); ;
map.setMapType(G_NORMAL_MAP);
//map.setMapType(G_SATELLITE_MAP);
//DEFINO EL ICONO ALASKA
var IAlaska = new GIcon(G_DEFAULT_ICON);
IAlaska.image = "http://gmaps-samples.googlecode.com/svn/trunk/
markers/green/blank.png";
IAlaska.shadow = ""
IAlaska.shadowSize = new GSize(0,0);
var tamanoIcono = new GSize(13,18);
IAlaska.iconSize = tamanoIcono;
function createIAlaska(point,nombre,continente,pais) {
//CREO LA MARCA EN EL PUNTO Y CON EL ICONO DESEADO
var marker2 = new GMarker(point, IAlaska);
return marker2;
}
var point = new GPoint (-151.787109375,62);
var nombre = "Alaska";
var continente = "North America";
var pais = "Alaska";
var marker2 = createIAlaska (point,nombre,continente,pais);
map.addOverlay(marker2);
}
}
--
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.