Extracting a graph from a map API in JAVA - android

My goal is to take several locations from the map and make a graph of them according to the paths between the locations. the locations will be the vertices and the paths between two locations will be the edges.
Draft of the idea:
I'm not so familiar with google maps API or another maps API's, but I will be happy if you guys could help me find a way to achieve this goal

You can use e.g. Google's direction API or Graphhopper to get the route, and then render them yourself through Canvas to a Bitmap.

Related

How to identify the roads on the map to route just as Google Maps does?

do you know how can we create our map and show the ways from a certain locations to destinations ? Without using google map , just using a picture of a map , is there any way to draw routes on it?I am not asking projects or codes , just need some suggestions related to drawings and considering the obstacles in the way ?Thank you
You should have your way points in somewhere(maybe in db or in xml file etc) and also for getting map base you should have a map provider like yahoo, bing, google or openstreetmap(which is free to use - no api key needed considering others)
after having these two sources you can use Geoserver(which is opensource map data manipulater and provider) to put these sources together and get them as map base image.
considering your "just using a picture of a map" is an owerwellming issue. Because you will have to do some calculation to find where to put your points programatically. So Geoserver does that automatically.
also I suggest you to hava a look at osmdroid and osmbonuspack they may help.

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.

heatmap using android maps api v2

I am trying to build a heatmap using Google Maps for Android API v2. The intensity is based on the number of markers in the given area.
I have gone though http://code.google.com/p/mapex/ which is for API v1 and uses Overlays for generating the heatmap. I have modified the code partially to work for me via a View(I create my own custom heatmapview which extends view and in the draw(), I create those RadialGradient patterns).
I also found some basic info online that for API V2, we need to use TileOverlay and TileProvider, which I need help with. Seems like all the examples I see are getting the data through UrlTileProvider, which would not be feasible for me. I have a set of LatLng points with me and would like to use it only.
Can anyone give me some hint on how to proceed?
As of a few days ago, you can now use the Google Maps Android Heatmap Utility. From the link:
The Google Maps Android API Utility Library includes a heatmap
utility, which you can use to add one or more heatmaps to a Google map
in your application. Heatmaps make it easy for viewers to understand
the distribution and relative intensity of data points on a map.
Rather than placing a marker at each location, heatmaps use color to
represent the distribution of the data.

Customizing The Google Directions for my Website and or my Android App

I have currently stumbled upon the Google's direction maps where the user inputs a start address and an end address and after which it would generate a route from the start address to the end address. I found out that the generated route isn't efficient and doesn't consider the traffic of a certain street it highlights.
In my application I made a Graph. the graph consists Vertices and Edges
The Vertices are the intersection points and has their own respective Geo-locations.
The Edges are the ways from one vertex to another.
to get the shortest path of my Graph, I used Dijkstra's algorithm. An algorithm that would map out the most efficient route to take.
And so my problem is how could i customize the Highlighting of the Google map?
Use google map android api to add shapes directly? Here is their official guide:
google map android api add shapes

Best way to use a lot of Places of Interest on a Google map

I have a server with a lot of Places of Interest information. (long, lat, picture url, name, etc)
About 100.000 items.
What is the best way to: load/download it into Android, and
what is the best way to show them on a Google Maps?
For such a big amount of Markers I suggest you give KML Layers a shot.
With Google Maps you can either have google render all markers for you, (default: KMLLayers)
or you can rely on GeoXML3 for client side parsing.
The same applies to Android Google Maps. Layers can easily be added using this: How to draw a path on a map using kml file?

Categories

Resources