Android - Google Maps v2 - Gradient Circle - android

Heatmap - Generating Simple 'HeatPoint' Google Maps Android
SO the above seems to suggest i can do this, however I am not convinced.
Here is what I am doing
CircleOptions circleOptions = new CircleOptions()
.center(center)
.radius(distance.distanceInMeters)
.strokeColor(getResources().getColor(R.color.brand_color_very_faded))
.strokeWidth(8F)
.fillColor(getResources().getColor(R.color.brand_color_faded)); // In meters
// Get back the mutable Circle
Circle circle = mMap.addCircle(circleOptions);
Which works fine, however I would really like to use a smooth gradient color, is this possible?
Or am i going to have to add a marker at each point, with a bitmap gradient (not what I want to do)?
Any help would be appreciated thanks!

The question you are referring to talks about drawing on Bitmap using Canvas, not about using CircleOptions. I suggest following it and also using TileOverlay or GroundOverlay depending on how many of these circles you may have.

Related

can't fill background color of this polygon on Android Google map

Polygon is showing well on google map.
But when I try to paint the background using fillColor property, it doesn't work.
Other polygons have no problem at all, so it is judged that there is a problem with these coordinates, but I am not sure what the problem is.
It even works well on iOS and doesn't work well on Android.
The coordinate array of polygon that I'm trying to draw is as below.
How can i solve this problem?
[[139.6961904465721,35.67366716851985],[139.69825038309554,35.67066895010819],[139.69267138834456,35.66923952726723],[139.69262847300033,35.6729873497998],[139.6961904465721,35.67366716851985]]

How do I change polygons form without lag?

I have a Google map were I draw rectangles.
I have a draggable marker that makes the rectangle change is size as you move your finger.
I do polygon.remove and then create a new polygon with new points (one of the corners is the marker position and I calculate the others)
The resize is working, but the problem is that graphics are slow, you can see the polygon dissapear and reappear.
Is it because of a hardware limitation or there's another better approach?
From the documentation of Google Maps Android API, it is stated in the Polygon part here that to alter the shape of the polygon after it has been added, you can call Polygon.setPoints() and provide a new list of points for the outline of the polygon.
So you must update the shape by calling Polygon.setPoints() rather than adding/removing it.
For more information, just check the link above.

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