How to highlight a user's current location in google maps?

你说的曾经没有我的故事 提交于 2019-11-28 08:39:38

You can use the newly released GeolocationMarker which is part of the Google Maps API Utility Library.

It will add a marker and accuracy circle at the user's current location. It also allows a developer to customize the marker using the setMarkerOptions method and specifying an icon property.

Use icon inside marker like

    var Marker = new google.maps.Marker({
        map: map,
        animation: google.maps.Animation.DROP,
        position: "",
        icon: /bluedot.png
});

you can use this google map location indication circular blue dot icon similar to the google map

You can use MarkerOptions to set a custom image. Check the Google Maps Javascript API V3 Reference to more details about Google Maps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!