9
我知道他們是從v2到v3的一些問題,我可以在這裏做些什麼來解決它?
GIcon不支持v3?Google Maps API v3 - 未定義GIcon
// Google-Map icon object
var gMapIcon = new GIcon(G_DEFAULT_ICON); //change to new google.maps.MarkerImage();???
// does icon exist
if (mapElements[lMapElementIndex]['icon'].toString().length > 0) {
gMapIcon.image = html_entity_decode(mapElements[lMapElementIndex]['icon']);
gMapIcon.shadow = "";
iconHeight = mapElements[lMapElementIndex]['iconheight'];
iconWidth = mapElements[lMapElementIndex]['iconwidth'];
gMapIcon.iconSize = new GSize(iconWidth,iconHeight);
gMapIcon.iconAnchor = new GPoint(0,0);
gMapIcon.infoWindowAnchor = new GPoint(15,10);
}
var markerOptions = {
icon: gMapIcon //change to image?
};
var marker = new google.maps.Marker(point,markerOptions);
從這裏https://developers.google.com/maps/documentation/javascript/overlays?hl=de-DE#SimpleIcons
感謝任何幫助或提示找到了!