using Android Google Maps API to display a Heat Map layer - android

I am doing a project in Android, where I have given a list of Geography Points (lat, lng) and each point has an associated Altitude(height) value with it.
My task is to create a Heat Map of the given map with varying colors depending on the points altitude value.
Does someone know of any existing library for doing the same. Or, it would also be very helpful to me if anyone can give pointers on how it cam be implemented. My only constraint is that it should work in Android.
Thanks in advance.

mapex, for example. Or this post.

The question is old but Google launched recently the new Google Maps Android API Utility Library allowing to create easily heatmaps. Take a look the BlogPost and the Google Maps V2 documentation.
Also, the source code can be found on GitHub with some sample code available.

Related

Google Maps Drawing Tools for 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

Google Map v2 Get Direction Android

Can i get direction between 2 points with using Google Maps v2 in my Android application ?
I found Polyline but i don't want to draw a line between 2 points.
I found a solution which is using Intent. It can solve this problem but it is not useful because this solution is starting another map application and I want to show direction in my application. Can i do this ?
You cannot get directions using just the Google Maps V2 api. You should use the Google Directions API direction request call. This will return the raw direction data in json which would allow you to draw a Polyline for the directions on the map or show the data in any format you would like.
There isn't any method to do it because it envolves several computing that must be done in Google Maps servers (and they don't allow you to do so many without paying if you hold a business).
So, the only way is making a petition to google maps servers as they describe in the Google Maps Api documentation that #Bobbake4 linked. Then, you'll receive several coordinates that you'll use to draw a polyline which represents your route.
Hopefully, someone has already coded everything and shared gently with us here https://stackoverflow.com/a/15643705/1516973
That's absolutely the best answer covering Android Google Maps routing that I've found in Stack Overflow, so thanks to #Akexorcist and #emil-adz for it.

How do you put pins on Google maps?

Is there a way to mark certain location on android google map like how you can put pins on iPhone apple maps and if so, can you show me or tell me how. I am new to android development and would really appreciate it.
Yes, you use a GeoPoint. Have a look at this tutorial for help on making a mapping app. TUTORIAL
Thankfully, putting a pointer on a map is fairly easy. Basically, you start with a very basic app. Instead of extending Activity, you extend MapActivity. You can then start the tutorial here to create a basic GUI.
Unfortunately, getting a map up and running takes a bit of work. Before you can even see a map, you need a Google Maps API key. It's explained in the documentation, but it can be a bit confusing. Here is a great tutorial explaining how to get an API key.
Once you have a key, you can fire up the example code from the tutorial. Make sure you have a data connection or else you won't see the map tiles. In addition, make sure you have internet permissions in your AndroidManifest.xml file. You also need to paste your new API key into your MapView XML code. The tutorial explains all of this quite nicely.
Once you have all that set up, it's easy enough to add a geographic coordinate to the map. I could explain it here, but Google does a good enough job on the subject. Follow their directions on how to create an ItemizedOverlay class. Then find the coordinates of your house or something and see it on the map.
Good luck!

Converting from google maps to open street maps (osmdroid)

I built my application using Google Maps and it is using:
-BalloonItemizedOverlay
-BalloonOverlayView
-ItemizedOverlay
and what it does:
-Displays multiple points on map, each one clickable and balloon appears with relative text + description.
-Displays and updates the marker/point of user's position.
The only reason I want to switch to Open Street Map is because I would like to use the feature "caching map tiles" (presaving maps) which as far as I have looked it up is not allowed with Google Maps.
Can someone help me convert my application thoroughly to use OSMdroid instead of GoogleMaps? Providing me with some guides (very few support for OSMdroid at the moment...)
I have already looked up a lot of codes but they mostly differ in comparison with Google Maps and I can't seem to get it all right. I have managed to display user's location on the map but adding BalloonItemizedOverlays and so on is a hassle.
Anyway just help me out in any way you can - proposals on how to do it, sites with guides, anything :)
Thanks
http://code.google.com/p/osmbonuspack/wiki/Tutorial_1
http://code.google.com/p/osmbonuspack/wiki/Tutorial_2
I think these two tutorials should get you started with Balloons and Customized Balloons
Itemized overlay with osmdroid is quite easy to use, you should give it a try and you will get the feel of it once you try it our.

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