2015-03-02 89 views
-1

我正在尝试向我的地图添加另一个标记。添加标记

{ 
    //google map functionality 
    if($("#map_canvas").length > 0) { 
     initGmap(52.089115,-7.619437, 15); 
    } 

}); // END jQuery(document).ready 

没有任何人有任何想法,我该怎么办中央社此,我抬头对谷歌,但似乎是做错了。

+0

请参考google maps API页面 - https://developers.google.com/maps/documentation/javascript/examples/marker-simple – Pankucins 2015-03-02 15:13:46

回答

0

要添加你要定义这样创建一个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如果需要多个标记。

+0

感谢您的帮助 – TedSquee 2015-03-03 09:30:34

+0

它的工作?如果是这样,请接受为正确答案;) – 2015-03-03 09:31:38

+1

现在就完成它。 – TedSquee 2015-03-03 09:53:32