I know how to draw a a circle on map v2 using circle options. However I was wondering, is there a way I can segment the circle (sort of like into Arcs)
Found the answer. It can not be done using CircleOptions. I will have to create custom view and add it on the map
Related
How can I draw a complex polygon that is not clockwise order in points without loosing color fill?
Looks like still a missing feature :/
Using Google Map Android API v2, I'm trying to apply an overlay outside of a shape. For example, I would like to draw a shape around a marker an apply a grey overlay all around this shape.
Here the result I would like to have : http://www.hostingpics.net/viewer.php?id=221191googlemap.png
I know how to draw a shape and I know how to apply the grey overlay on all the map using the GroundOverlay class but I don't know how to apply the overlay on all the map except in the shape.
I really hope that somebody will be able to help me :)
Thank you in advance !
You can try polygon overlay with holes in the middle. i.e. your entire map is covered by a polygon with an opacity value less then one. You can specify holes in the middle of the polygon. See the documents of polygon overlay:
http://developer.android.com/reference/com/google/android/gms/maps/model/Polygon.html
It says:
A polygon can be convex or concave, it may span the 180 meridian and it can have holes that are not filled in
I am trying to show the position of a moving bus in google maps api v2 in an android application. I am able to mark the stops and draw routes using the markers and polylines. Now, I am trying to have an image(bus/Marker) that moves along the route that is there in the map. I am using GroundOverlay to achieve this, but I am not able to re draw the moving image/marker using GroundOverlay.
The problem I am facing is that, as I am drawing the map in the OnCreate function, the map, markers, routes and all the positions of the moving marker are displayed only once at the end of the oncreate function. I think I am going in the wrong direction. Is there a way to redraw only the moving marker? Is it possible to have a view on top of a map and draw on the view using projection? (is this possible in V2? If Yes, do we have some demo or sample available online?)
I have developing an Android application, and I have moved from Google Maps for Android API v1 to v2.
With deprecated version 1 I created an Overlay for drawing some colored shapes (delimiting zones) and info text over my map, but now I have been viewing API v2 and cannot do the same.
I have trying to use Polygon property, but it doesn't fill with any colour, maybe because my shapes cannot be drawing in counterclockwise due to the pattern of them, for example a shape with 'U' pattern. Also, I don't know either how to put a text (no marker, just text) over the map.
Thanks in advance.
still don't know how to put a text in the map
Create a Bitmap containing your text, and use a GroundOverlay, or possibly a TileOverlay.
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.