I was wondering if Polyline can be animated in open street map. I looked but couldn't find anything satisfactory.
I am talking about something like this site http://econym.org.uk/gmap/example_cartrip2.htm
Here the route is drawn between two points. I want animation for a polyline that is just a line between two points.(Not a route)
Can this be done? If so how?
Related
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?
I want to draw an path from source to destination on google map in android. path is nothing but an polyline with forward direction arrows from source to destination. By using compute heading method is it possible to draw...?
This is not standard in the Google Maps API, have a look here to implement it using a bitmap which is displaying an arrow in your direction: How can I use a custom bitmap for the "you are here" point in a MyLocationOverlay?
you have to create the List of LatLng starting from source location to destination. You can customize the polylines flat arrow images.
'com.google.maps.android:android-maps-utils:0.3.4' will help you to compute the heading.
LenovoS90's will help you more in detail.
You have to call add(LatLong) below from startingLatLong till endingLatLong
mMap.addPolyline(new PolylineOptions().geodesic(true).add(startingLatLong ).add(endingLatLong ));
I draw a polygon between two latitude and longitude but polygon line shows far from road.
Like the picture above, blue polygon line shows far from road. Where polygon line is draw there is no road. Anyone can help me to draw right polygon between two latitude and longitude.
Thank you!
If you want draw a route between two address, you should use Directions API.
or relative to this post google-maps-api-v3-how-show-the-direction-from-a-point-a-to-point-b-blue-line
I used Skobbler Android SDK to draw Polygon and Polyline, but this happened on MapBox and iOS as well, so I think it may be a general issue in Open Street Map..
When I add Polygon and Polyline with exactly same Coordinate list, I have different result below.
Polyline draws correctly for coordinates, but Polygon draws strangely. Why does Polygon do this kind of wrong behaviour and how to draw same as Polyline correctly??
Thanks in advance.
I'm developing an application that has the following goal:
Using the google maps android API 2 I get my current position, and as I start walking the application starts drawing the route I take
The twist is that the map is a "blind" map. Meaning the map is hidden, only the Marker of my current position and a dotted line of my route is shown.
Keep in mind I'm a novice developing to Android, so please be specific. (Thank you)
I managed to create the map, get my current position and zoom in to it (Had no sens to see the whole planet while i want only my current position). And it's pretty accurate so far.
The thing is I don't know what should I do from this point on.
Basicly I need a white View between the Marker and the real map. Also as I advance that View should always be on, over the MapFragment/MapView. Also I wish to keep the zoom and drag functionality's of the MapFragment.
How can I achieve this?
At this point I'm opened to any solutions.
(Been browsing for a few days now the developers site, I have seen that with the ViewOverlay class I can put messages over the map, but I'm not sure what would the correct aproach be in my case...)
To hide the whole map behind the white view I would use Polygon class Polygon Even if you specify Polygon to cover the whole map Markers will be still displayed in front of it and as so user's current position marker will be visible. You also will be able to zoom and drag.
To draw line on map use Polyline class Polyline It will draw users path as a polyline. If you want to stick with dotted line you can use Circle objects to create it. Circle