Animate dotted polyline between two points on map - android

I am trying to create a dynamic number of points between two points on map. While this is quite easy and can be done by using the dotted lines from PolylineOptions, i also want to animate these points. I don't think there is any way provided by PolylineOptions to animate the dots of that polyline (like in Uber app).
Is there a way to put animated vector drawables on the map? Or do i need to use an MapOverlayLayout on the map surface and draw on it? Or any other way to achieve this effect?

Related

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.

Highlight all the worlds in Android Google Maps

I'm developing an app in which the user can select points on a Google Maps and create areas based on point-radius and display them on the map with a semi-transparent circle of a specific color. The user is also able to insert "all world" areas. I need to display this "all-world" area on the map, is it possible to add a semi-transparent polygon that cover all the map? Or, is there a better solution to highlight all the map?
Check the documentation of Polygons under the Shapes in Google Maps Android API to cover the map.
Polygon objects are similar to Polyline objects in that they consist of a series of coordinates in an ordered sequence. However, instead of being open-ended, polygons are designed to define regions within a closed loop with the interior filled in.
To create Polygon, first create a PolygonOptions object and add some points to it. These points will form the outline of the polygon. You then add the polygon to the map by calling GoogleMap.addPolygon(PolygonOptions) which will return a Polygon object.
To alter the shape of this polygon, just call the Polygon.setPoints() and provide a new list of points for the outline of the polygon.
Now, for customizing the appearance of the polygon, just check this link. And for the semi-transparent polygon that you want, you can check these tutorial and SO question on how to achieve that.

SkMaps Android - How to get lat/lng used to draw roads

I would like to use the lat/lng data used to draw roads to make my own custom routes and draw lines beside the streets (like to indicate sidewalks). Is there any functionality like getPolyline("SanFran Road") that will give me data points that I can use to draw my custom routes/lines?
You have the pointToCoordinate that returns the long/lat position relative to the screen position.
See more in the SKMapSurfaceView class.

Optimal way to draw lines and polygons dynamically on Nutiteq map?

I have been working on nutiteq maps, and I need to draw a trace over map, as my location changes, but it should be with different width(5m, 10m) and need to calculate where its overlapping itself. I draw lines dinamicly with line.setVertexList(arr_lat_long), but I think that this isn't an good approach to do this job. Think to draw them like a polygons, because then will calculate overlapping with JTS. But it will be very slow operation :/. Is there an another way to draw over the map, some other paint tool or lib to help me. The purpose is to fill some area with these traces..
Thanks

Android Overlays for drawing shapes in Google Maps

I want to draw several shapes (over 40) for separated zones in a city and I am not sure what is the best way to do this. I am considering drawing the shapes using:
ItemizedOverlay.
Overlay: One overlay for all shapes.
Overlays: One overlay for each shape.
What do you think?
I haven't been using ItemizedOverlay so can't say anything about it but if you are to choose between Overlay and Overlays - take one Overlay for all items.
One overlay is one canvas and one draw method. One overlay for each object are multiple canvases and drawing methods. This is pointless.
You should use different overlays only when you create "layers" which can be visible or not (as a whole layer) like Google Satelite or Google Street View.

Categories

Resources