Radius in meters to pixels for drawing circle on Map Android - android

I want to draw zones/coverage areas on map in form of circle. Now first I draw circle from this tutorial I implemented all same code from that tutorial. Now I draw a circle of radius 150 meter but I came to know that I have to change that 150m to some other unit may be pixel which gives me actual radius on which circle should be drawn . For this I went through number of sites some advised to use metersToEquatorPixels- which is not in Google map V2 and other methods but they are not giving solution from where I can sure that is the correct radius to draw on Map. More over come says radius will be calculate according to zoomLevel/scale. I tried all methods which was giving on internet but did not get success.
Any will be appreciated.
I need circle under which map can move but not the circle

Related

What's the math to draw a 5dp circle in a Map regardless of zoom level?

Working in Java, for Android.
In a GoogleMap I want to mimic the current location blue circle, which looks always the same , regardless of what zoom level is used to present the map.
If I want a fixed 5dp circle radius, how do I calculate the Circle radius for GoogleMap to draw it right?
The answer was given in the comments, so I post it here as answer.
Should be credited to Tim Biengeleisen
Use a custom marker, with a custom drawable for the circle. The size will remain the same and it will move, zoom, pan with the map automatically

Draw an inverted circle on google map with specific radius android

I want to develop below picture in android, which is already implemented in iOS.
I know how to add circle on google map. but as shown in picture the color should be filled on map not on the circle, circle must be fully transparent.
i have referred many links but all of that put the simple overlay on map, so when user zoom in or zoom out the map; circle remains the same.
i have implemented simple circle around current location.
googleMap.addCircle(new CircleOptions()
.center(new LatLng(MyApplication.latitude, MyApplication.longitude))
.radius(800)
.fillColor(0x70ffffff))
.setStrokeWidth(0);
i want above functionality with inverse color. circle should be only around current location and the size should vary with zoom in and zoom out of map.
Thanks.

Android google maps drawing oval instead of circle issue

I have been working on google maps v2 drawing a circle which can be resized on dragging circumference of the circle.
Cirlce circle = mMap.addCircle(new CircleOptions()
.center(center)
.radius(radius)
.strokeWidth(2)
.strokeColor(Color.BLUE)
.fillColor(Color.parseColor("#500084d3")));
Now problem comes for large value of radius the circle becomes and oval.
I have referred these link and also linkbut didnt find any solution:
These links says that
"
the reason you're getting ellipse it's because the math on the options.add( is very basic and pretends the earth is a flat surface, just like before Copernicus. If you draw it on smaller areas you'll get a rounder circle. If you want a precise circle you'll have extend that math to proper take into account the shape of Earth "
Is there any solution to this problem.
Is use of class extending Overlay recommended in google maps v2 so that I can somehow use its onDraw(..) method.

Generate heat map layer using google map api v2 for android

I want to plot heat map on android phone based on the signal strength in a area. i am able to get google map using android map api v2 . but i am not getting any idea how to plot heatmap on it . I have gone through
using Android Google Maps API to display a Heat Map layer but the link to mapex here didn't help much . Please help
This is just a thought, but have you thought of using Circles built in V2 maps.. This may sound weird but it may suit your needs...
I would assume each point has a specific radius that you could set and then you could use a color with some transparency that when close to other points would overlap each other making the color darker in areas of higher point concentration and lighter in areas of less concentration. Of course this would only work if you were looking to do this with one color and different shades of that color. For example:
// Instantiates a new CircleOptions object and defines the center and radius
CircleOptions circleOptions = new CircleOptions()
.center(new LatLng(37.4, -122.1))
.radius(10)); // In meters
.fillColor(0x1AFF0000)//90% transparent red
.strokeColor(Color.TRANSPARENT)//dont show the border to the circle
// Get back the mutable Circle
Circle circle = myMap.addCircle(circleOptions);
And if you were to do this and then add it again at the same point but with a radius of 20, you would get an output like the attached image which would allow you to fade from a specific point as it gets further away. It would be as simple as throwing all your points in a for loop and adding the circles to the map in the loop. This may not be what your looking for but may help someone!

Draw 15Km radius around point in Android

I want to draw a a circle of 15 KM radius around a point on Google Maps by using Android.
In Android we only have MapView and MapViewController. How can I implement the drawCircle funciton provided in Google Map Circle example in Android.
You must implement Overlay.
And draw circle like in FixedMylocationOverlay in draw method.

Categories

Resources