Google Maps Drawing Tools for Android - android

I need to make an Android app where the users have an option to draw a polyline on Google Maps and when the touch is removed, then do some action with the plotted polyline. Drawing and performing action is secondary. But the question is how could I achieve this?
Is there any predefined drawing tool (something like http://googlegeodevelopers.blogspot.in/2011/11/make-your-map-interactive-with-shape.html for JavaScript) to be used in google maps, or do I need to go with customization? Please suggest, or provide any links.
And can we extract the points to compare them with the ideal answer which was to be traced?

But the question is how could I achieve this?
With code. ;)
do I need to go with customization?
Yes. You would have to code all the functionality yourself. AFAIK there is no library that does that and of course Google Maps Android API v2 doesn't (and most probably won't) provide such functionality because it is too specific. I still think this would make a pretty useful library.
And can we extract the points to compare them with the ideal answer which was to be traced?
Yes. That would be simple after you are done with everything else.
Polyline polyline = ...
List<LatLng> extractedPoints = polyline.getPoints();

Simply use google maps api Google map API v2 following link might help you with the code.
code reference

Related

Android Custom Dijkstra Map

I need to implement a map for a shopping mall in my app. This map needs to have a way to visually mark the fastest path to go from one place to another.
I currently have two options in mind. I could use the Google Maps API, overlay the shopping mall's picture and try to use some algorithm to mark the best route. Or, I could just place the picture and manually make an algorithm to mark the path (probably Dijkstra).
Yet, it's my first time working with Android, and I don't really know which one could work the best, and which libraries I could use.
I'd appreciate any tip or suggestion.
Google map has an android api that you can directly embed google maps into your application. You can also draw overlays using its api. Take a look at
google map android api

Custom Google Map Types

I'm looking for a way to use custom map tiles with the Google Map API V2 for Android.
I'm writing an application that will create it's own maps in real time with data that are comming from a robot.
The application need to show to the operator this map. The operator need to interact with this map, letting way points, etc.
I want to use the GoogleMap engine in order to do the same that in this page :
http://cdn.mikecouturier.com/blog.mikecouturier.com/tilesgenerator/index.html
The problem is, this guy use the [javascrip API]
But me, I want to use the [Android API]
Are there any way to use Custom tiles map on android with the GoogleMap Engine ?
Thank's a lot
PS : I'm already looking how to use ArcGIS. But, i prefer using API without paying license, thanks
By using GoogleMap.setMapType(MAP_TYPE_NONE) you will get an empty map.
Using e.g. the CanvasTileProvider I have described in the answer to this SO question you may then draw anything into the tiles.

Google Maps Android API v2 - DirectionsRenderer

I already searched on StackOverflow and Google. But i didn't find a real answer. I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
If there is not DirectionsRenderer, how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
I think there is just no DirectionsRenderer in the Android API. But can you acknowledge this?
There is no DirectionsRenderer in Maps V2. You can tell this by reading the documentation.
how could i use the Android API to show a GoogleMaps and draw a Route on the Map?
There is nothing in Maps V2 to support this.
I want to draw a nice route. Not just lines between the coordinates of each route-section which are also delivered from the Directions-Request.
You will need to find some Web service that will serve up coordinate information for the route with sufficient granularity (e.g., every 10m) to give you your "nice route", then use a Polyline or something like that for actually rendering the route.
SO i found out that it is possible to just take the legs, then the steps and within the steps you will find the "points".. when you decode the points string its a very detailed list of all coordinates.
with this coordinates, you can easily draw a nice route on the map.
so it's possible without the need of a additional Web-API.

Too many markers Google Maps

We added about 200 new markers in the MapView.
Now the app stucks and you cant use the MapView.
I heared about MarkerClusterer but did not found any more inforamation how to use MarkerClusterer with Android...or are there better solutions?
Can anyone give me a link or write a little turorial?
Thanks :)
You can have a look at this example Android project https://github.com/igorab/ManyPinsProject
It shows limited amount of markers depending on MapView zoom level.
Here is tutorial from Google https://developers.google.com/maps/articles/toomanymarkers
As #CommonsWare said it is only for JavaScript version or GoogleMaps, but may be you can find something useful there. For example, they have a link to MarkerClusterer js source code. Maybe you can find a way to adopt it to Android.
You can use this library – Android MapView Balloons. This project provides an easy way to annotate map overlay items with a simple information balloon when using the Android Maps.

Using Navteq maps in Android

1.Is it possible to NOT use Google Maps in Android?
2. Can we use Navteq maps?
3. What will it take to write such an application?
4. Do we have to come up with our own version of MapView?
Pointers and links that can answer these questions and help me get started on 4. are welcome.
Thanks.
Most likely NDrive use NAVTEQ's map, at least in some areas
OSMDroid provides an opensource alternative to Google Maps. They have their own implementation of MapView (similar to Google's implementation).
http://code.google.com/p/osmdroid/
there are some applications on the market that are custom maps, i.e. YandexMaps, OpenStreetMap & others
I believe they had written their own map class implementation, not a MapView one.

Categories

Resources