【发布时间】:2013-01-14 10:28:58
【问题描述】:
我有以下代码可以构建这样的自定义谷歌地图标记:
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",
});
使用此解决方案here,我正在尝试将此代码集成到上述代码中,但出现语法错误?我做错了什么?
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)
});
【问题讨论】:
标签: php google-maps