-1

I'm using Google Maps version 3 and would like to add two markers for a single location on the map.

One would be the default marker which appears with Google Maps, but second would show the name of the brand associated with that location.

My code is

    function initialize() {
            var filterLatlng = new google.maps.LatLng(18.928184,72.832601);
            var mapOptions = {
                center: filterLatlng,
                zoom: 19,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var marker = new google.maps.Marker({
                position: filterLatlng,
                title:"Filter Shop"
            });
            var map = new google.maps.Map(document.getElementById("map"), mapOptions);
            marker.setMap(map);
        }
4

1 回答 1

0

你可能想要这个库: http ://code.google.com/p/google-maps-utility-library-v3/source/browse/trunk/maplabel/src/maplabel.js?r=303

它将允许您在地图上添加标签。该标签将附加到您描述的隐藏标记上。使用非常简单,您应该能够很容易地弄清楚它。

于 2012-08-30T20:41:43.190 回答