【发布时间】:2011-08-22 07:35:55
【问题描述】:
我尝试为我的地图上的标记使用自定义图标。
它在 FF 和 IE8 上运行良好,但 IE7 只显示默认的 google 标记。
为了创建标记,我使用 Class LabeledMarker,
图片是文件类型image/PNG。
此代码用于创建标记:
var icon = new GIcon();
icon.image = this.options.icon;
icon.iconSize = new GSize(24, 24);
icon.iconAnchor = new GPoint(12, 12);
icon.infoWindowAnchor = new GPoint(12, 0);
point = new GLatLng(this.data['geo_n'], this.data['geo_o']);
var opts = {
icon: icon,
clickable: false,
labelText: 'test'
};
marker = new LabeledMarker(point, opts);
map.addOverlay(marker)
【问题讨论】:
标签: javascript internet-explorer-7 png google-maps-markers google-maps-api-2