How To Change The Radius Of The Circle Of Geolocationmarker
I'm trying to change the radius of the circle of the GeolocationMarker library to 3 km; here is my attempt: var geoMarker = new GeolocationMarker(); geoMarker.setCircleOptions({ra
Solution 1:
It can't be done like this, the documentation you link to states:
setCircleOptions(options:google.maps.CircleOptions) This method will ignore certain properties of the google.maps.CircleOptions object. It will ignore position, radius and map properties as these are set by the library.
The radius of the circle is the accuracy of the geolocation data. If you want a constant radius circle, create a Circle object and bind the center property to the Geolocation Marker.
var circle = new google.maps.Circle({map: yourMap, radius: 3000});
circle.bindTo("center", geoMarker, "position");
Post a Comment for "How To Change The Radius Of The Circle Of Geolocationmarker"