不,如果你不想自定义你的标记,你需要使用GIcon.
您可以在Google地图图标项目中找到大量免费标记.使用自定义标记的代码非常简单:
// Create our "tiny" marker icon
var blueIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/blue/blank.png";
// Set up our GMarkerOptions object
markerOptions = { icon:blueIcon };
// add the markerOptions as the second param to GMarker constructor
map.addOverlay(new GMarker(latlng, markerOptions));
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
20802 次 |
最近记录: |