Reputation: 1937
In Google Maps, the blue dot shows you where you are on the map. When Google Maps isn’t sure about your location, you’ll see a semi-transparent blue circle around the blue dot. You might be anywhere within the light blue circle. The smaller the circle, the more certain the app is about your location.
Now, my question is how to achieve the same behavior in another app. Does Google Maps use a feature of the location-determining hardware or it is only software? How would one achieve something similar?
Upvotes: 0
Views: 184
Reputation:
Depends on which API - but for example the Location
class provides a getAccuracy units in meters.
Conveys accuracy as 1 stddev of error.
So the simplest approach is to draw a circle with that location and radius - and use a gradient fill. Here's an example of an animated (pulsing) circle: https://stackoverflow.com/a/52323267/2711811
Upvotes: 1