X.misc.setgooglemappoint(event.latLng);
//将标记点移动东到点击的地方
marker.setPosition(event.latLng);
});
init(map ,myLatlng );
}
setTimeout(initialize,100);
function init(map,myLatlng ) {
addSite(map,"",myLatlng,"" );
}
function addSite(map, siteDesc, location,address) {
marker = new google.maps.Marker({
position: location,
map: map
});
attachSecretMessage(marker, siteDesc,address);
}
function attachSecretMessage(marker, siteDesc,address) {
infowindow2=infowindow;
infowindow = new google.maps.InfoWindow(
{ //content: '<b>商场名称: </b>' + siteDesc + '</br>'+'<b>商场地址:</b>'+ address +'</br>',
content: '<b>A </b>',
size: new google.maps.Size(50,50)
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.open(map,marker);
});
}
</script>