0
내가 내 구글 API에 사용자 정의 마커를 추가하려고 클릭 : 그 마커를 클릭 할 때를 제외하고 잘 작동, 내가 어떤 이벤트를이 없다 더 이상 :구글 API를 마커 +
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(0, 0), 5);
map.addControl(new GLargeMapControl3D());
map.addControl(new GMenuMapTypeControl());
var myIcon = new GIcon(G_DEFAULT_ICON);
myIcon.image = "http://farm3.staticflickr.com/2140/1911601567_49d97f3318.jpg";
myIcon.iconSize = new GSize(80, 60);
markerOptions={};
//markerOptions = { icon:myIcon }; // if I uncomment this : no click anymore
var bounds = map.getBounds();
var southWest = bounds.getSouthWest();
var northEast = bounds.getNorthEast();
var lngSpan = northEast.lng() - southWest.lng();
var latSpan = northEast.lat() - southWest.lat();
var point = new GLatLng(southWest.lat() + latSpan * Math.random(), southWest.lng() + lngSpan * Math.random());
var marker = new GMarker(point, markerOptions);
marker.html = 'hello world';
map.addOverlay(marker);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(marker.html);
})
내가 //markerOptions = { icon:myIcon };
내 사진이 표시되었지만 더 이상 마커를 클릭 할 수 없습니다.
누군가 나를 도울 수 있습니까? http://www.roulette-chat.fr/google.php에서 작동하는 것을 볼 수 있습니다.
감사합니다.
당신이 사용되지 않는 API v2를 사용하는 이유. 당신은 v3를 사용할 수 있습니다. – defau1t