我知道它们是从 v2 到 v3 的一些问题,我可以在这里做些什么来解决它?
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
感谢您的帮助或提示!