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.
Related
I am looking for an alternative for using Google Maps in my android application. I want my app to guide a person around routes, not roads or paths but following others tracks, and I think this will contradict the Google Maps T&C which states it can't be used for navigation.
Anyway I am mainly using the maps to display lines and shapes, as well as the positions of other users, in fact the maps are merely used as background.
Would anyone know of a good alternative which could be used in a commercial product. A mapping api would be ideal although I have even thought about plotting the lines and shapes on a canvas (I'm converting GPS coords to utm myself so this is not a problem), but I don't know if this would work??
Thanks for the help
Gareth
You can use osmdroid. From the documentation:
osmdroid is a (almost) full/free replacement for Android's MapView (v1 API) class. It also includes a modular tile provider system with support for numerous online and offline tile sources and overlay support with built-in overlays for plotting icons, tracking location, and drawing shapes.
You can use it in your project adding the dependencies:
repositories {
mavenCentral()
}
dependencies {
compile 'org.osmdroid:osmdroid-android:5.5:release#aar'
}
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.
I'm developing an Android application and I would like to display an internal (indoor) map of some buildings, but I don't know where to begin: I want to create a custom kml file (how it's possible to create it? with which tool?) and display it in a fragment.
I already have it working with external maps (simple GoogleMap in MapFragment), so it would be super to have the kml file placed 'over' the GoogleMap, like real indoor maps.
Thanks
My project is also about indoor maps. I want to share my experience:
First, I tried to use google map but google does not support all countries and my country is not supported. Therefore, I was not able to use google maps although it could be an easy way.
Second, I tried to use open street map which does not render indoor elements. It would be crazy because you have to use lost of other gis tools in order to do it.
the last, I thought why do I need geographical data. All of them - google, osm - are geographical maps which has geographical data. So I do not need this. I rendered my map and I used x,y coordinates of my map's jpg file. I added all of important place's x,y coordinate so I can search them. And it is most easy. And you can use tileview library which is so easy.
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.
I need to develop an application for Android that uses the Google Maps API.
I the need to use a marker that show me my position and rotation exactly like the one shown in the figure (Link: http://3.bp.blogspot.com/-Sy61Gjk7aKA/Tw2Lo553AiI/AAAAAAAAAVI/oJ7tiGb-lts/s1600/2.jpg).
Is it possible to realize?
I wrote an answer to a similar question: Google Map Heading Marker or Indicator
I haven't tried it in 3D, but there's no reason why it shouldn't work.