Google maps 谷歌地图api设置标记保留字

Google maps 谷歌地图api设置标记保留字,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我正在使用谷歌地图api将地图拉入phonegap应用程序。地图运行良好,但我正在尝试设置自定义标记,如下所示: 在设置图像的位置,代码使用“锚定”设置。这是javascript中的保留字,如果保留在代码中,javascript将失败 我该怎么解决这个问题 var image = { url: 'images/beachflag.png', // This marker is 20 pixels wide by 32 pixels tall. size: new google.maps.Size

我正在使用谷歌地图api将地图拉入phonegap应用程序。地图运行良好,但我正在尝试设置自定义标记,如下所示:

在设置图像的位置,代码使用“锚定”设置。这是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)

})

什么时候起锚定是保留字?其次,如果您使用保留字作为对象中的键,只需将它们放在引号中,如

{
'anchor': new google.maps.Point(0,32)
}

谢谢你的回答,但我认为你不必贬低我的回答。在我的ide中,放置锚显示为保留字。我试图弄清楚它是jquery还是jquery mobile。将其留在代码中会阻止其运行,不需要IDE-