marker wont appear in google maps api v3
google.maps.event.addListener(marker, 'click', function() {
lati=51;
longi=9;
var latiLongi = new google.maps.LatLng(lati,longi);
var marker1 = new google.maps.Marker({position: latiLongi,icon: imon,title:"51,9"});
});
I have a marker on the map already. On clicking开发者_高级运维 it this marker should display at 51,9. But it doesnt. I am using markerclusterer also in my code, but not with this 51,9 position new marker.
You need to associate the map with your marker1. Something like:
var marker1 = new google.maps.Marker({
position: latiLongi,
icon: imon,
title:"51,9",
map:yourmap
});
精彩评论