开发者

How to add multiple markers to Google MAP through JS API? v3

I'm using this code:

    <script type='text/javascript'> 

        function initialize() {
            var latlng = new google.maps.LatLng(50.077861,14.456956);
            var myOptions = {
              zoom: 15,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var map = new google.maps.Map(document.getElementById(\"searchMap\"),
                            myOptions);
            var marker = new google.maps.Marker({
              position: latlng, 
              map: map, 
              title: 'Here we are!'
          });           

       }


    </script>

But now I need to show multiple markers on the map, and the 开发者_JAVA百科markers should include links to subpages of the website, any ideas how to menage that width the code I posted?

Thanks, Mike.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜