【发布时间】:2013-06-19 13:35:49
【问题描述】:
我正在使用 google maps api 将地图拉入 phonegap 应用程序。该地图运行良好,但我正在尝试设置自定义标记并遵循以下内容:https://developers.google.com/maps/documentation/javascript/overlays#Icons
在您设置图像的地方,代码使用“锚”设置。这是javascript中的保留字,如果留在代码中,javascript会失败。
我该如何解决这个问题?
var image = {
url: 'images/beachflag.png',
// This marker is 20 pixels wide by 32 pixels tall.
size: new google.maps.Size(20, 32),
// The origin for this image is 0,0.
origin: new google.maps.Point(0,0),
// The anchor for this image is the base of the flagpole at 0,32.
anchor: new google.maps.Point(0, 32)
};
【问题讨论】:
标签: google-maps google-maps-api-3