我有以下代码可以构建这样的自定义谷歌地图标记:
mapa.markers[ind] = new google.maps.Marker({
position: mposition,
map:mapa.map,
title:mapa.json.markers[ind].timestamp,
icon: "http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld="+ind+"|000000|FFF",
});
在这里使用这个解决方案,我试图将此代码集成到上面,但出现语法错误?我究竟做错了什么?
null, /* size is determined at runtime */
null, /* origin is 0,0 */
null, /* anchor is bottom center of the scaled image */
new google.maps.Size(42, 68)
这是显示语法错误的更新代码:
mapa.markers[ind] = new google.maps.Marker({
position: mposition,
map:mapa.map,
title:mapa.json.markers[ind].timestamp,
icon: "http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld="+ind+"|000000|FFF",
null, /* size is determined at runtime */
null, /* origin is 0,0 */
null, /* anchor is bottom center of the scaled image */
new google.maps.Size(42, 68)
});