Is it possible to write custom text on Google Maps API v3?

前端 未结 6 511
渐次进展
渐次进展 2020-11-30 01:15

Is it possible to write a custom text on Google Maps API v3 next to the marker, or I can use only the info window to do that?

6条回答
  •  悲哀的现实
    2020-11-30 01:30

    It the text is static, you can use a marker and an image :

    var label = new google.maps.Marker({
        position: new google.maps.LatLng(50,50),
        map: map,
        icon: "/images/mytextasanimage.png"
    });
    

提交回复
热议问题