我正在尝试向我的地图添加另一个标记。添加标记
{
//google map functionality
if($("#map_canvas").length > 0) {
initGmap(52.089115,-7.619437, 15);
}
}); // END jQuery(document).ready
没有任何人有任何想法,我该怎么办中央社此,我抬头对谷歌,但似乎是做错了。
我正在尝试向我的地图添加另一个标记。添加标记
{
//google map functionality
if($("#map_canvas").length > 0) {
initGmap(52.089115,-7.619437, 15);
}
}); // END jQuery(document).ready
没有任何人有任何想法,我该怎么办中央社此,我抬头对谷歌,但似乎是做错了。
要添加你要定义这样创建一个new marker:
// Barcelona coordinates
var myLatlng = new google.maps.LatLng(2.19, 40.4);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
title:"Hello World!"
});
检查here如果需要多个标记。
请参考google maps API页面 - https://developers.google.com/maps/documentation/javascript/examples/marker-simple – Pankucins 2015-03-02 15:13:46