Integrate google map android - android

I'm developing an app and I'm trying to integrate to my app a google map. I'm reading that I need to create a special app at the beggining. I tried to ignore it and tried to integrate it anyway. But when I try to extend my class with MapActivity, it doesn't find it. I generated the Key, Google Play Service is up to date. I probably miss something.
Thanks for the help.

MapActivity was part of the Google Maps Android v1 API which is now deprecated.
Use MapFragment if possible
https://developers.google.com/maps/documentation/android-api/

You need the new integration in Google map you want to use the new Google map api in android.
So follow below link for integration google map with "MapFragment".
http://www.tutorialspoint.com/android/android_google_maps.htm

Related

Android Heat Map

I am trying to create a heat map for android app like this:
I found a example on Google Maps API here, but i am not sure with it is the best way, can you give me a light?
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.

Google map api shows grid

I tried to integrate Google map API with android native application. But I got only grid only, I can't get the map. Please help me to solve this problem.
Grids are shown because your key is not correct.Use the true key for your project which is registered in Google Project Console.
If you are getting only grid instead of the map, usually it's Google Maps Authentication problem. To solve it I would suggest you to go over the following guide:
Google Maps API V2 key
Follow all the steps of the guide and reproduce the key.
Next, follow this guide as well:
Google Maps API V2
to create application that integrates Google Maps API V2. Don't forget to remove the current installed application completely because Google Maps V2 caches the key you used before.

Google maps- Android extending options

Im trying to create a very simple application that I will use to present a product that my team and I are creating. In my app, I would like to allow an option where if a specific textview is clicked, it will open up a map to that specific location. Of all the tutorials of the google maps that I have seen, it seems that the only way to use the maps is to have your class extend the mapactivity class. Is there any way to use this simple app other than to make my app a map based app? Also which version of the google maps would be the best to use in my situation. Thanks for everyone's help.
What do you mean by a "map based app"? if you want to embed Google Maps in your application, today you would use Google Map API V2 as V1 is deprecated. in that case you don't have to extend your Activity from MapActivity and you can use a simple Activity if you targeting API > V11. if you target lower API's you would extend you Activity from FragmentActivity to allow backward compatibility for Fragments.
Here is a blog post I wrote with all the details on how to embed Map capabilities in your application:
Google Maps API V2
If on the other hand you would like to avoid embedding Google Maps in your application, you could just fire an intent to turn on the native Google Maps application.
UPDATE:
Take a look at this page for intents you can fire for native Google applications (including Maps):
http://developer.android.com/guide/appendix/g-app-intents.html
and look at this questions:
Launching Google Maps Directions via an intent on Android
Using the pre-installed Google Maps instead of an own activity by using Intents?

Map Problems in Android

I am new in android programming, I had problem in showing Map with getting the location that is touched, could any one help. Here please me code bellow. Thank you in advance.
Note: I took the code from this site, I used displaying the Map and it was working but when I am trying to use the last code in the site for display the touch location, does not work.
After seeing the link you have given for code reference .i have seen that you are developing with the old outdated API V1 for android which will not work now because the new Maps API V2 for android is now applicable.
Find more about the new API HERE on Android Developer Site.
The API is now distributed as part of the Google Play services SDK,
which you can download with the Android SDK Manager.
Maps are now encapsulated in the MapFragment class, an extension of Android's Fragment class.
Now you can add a map as a piece of a larger Activity. With a
MapFragment object, you can show a map by itself on smaller screens,
such as mobile phones, or as a part of a more complex UI on
larger-screen devices, such as tablets.
Because maps are encapsulated in the MapFragment class, you can
implement them by extending the Android standard Activity class,
rather than extending the MapActivity used in version 1.
The Maps API now uses vector tiles. Their data representation is
smaller, so maps appear in your apps faster, and use less bandwidth.
Caching is improved, so users will typically see a map without empty areas.
Maps are now 3D. By moving the user's viewpoint, you can show the map with perspective.
See my blog posts i have tried to summarize all there is needed to build an App with Google Maps API V2 for Android.
Solution to Problems with Maps API V2(using google_play_services_lib).
Creating an Android App with Maps API V2 for minSDK=8 (Android 2.2 Froyo).
Creating an Android App with Maps API V2 for minSDK=11 (Android 3.0 HoneyComb).
I've played with the Google Maps Android Library V2 a bit.
Here is an example I did that works, see if it can help you.
I stripped out my own API key, but i've included many different parts including the need to setup:
http://www.digitalopium.com/android-google-maps-api-tutorial/
-Debug/Retail Certificates and the SHA-1 key
-Google Project and the Android Map API key
-Google Play services via the Android SDK
-Project setup including the manifest file and code snippets.
Google has changed the method of obtainig map keys, previously it was using MD5 fingerprint
Now you can follow the link to integrate the map
Integrating google maps in android applicaiton
This tutorial has a section about getting location from touched position. Hope it will help you. Google Maps Android v2 Tutorial

Can I use Android Google Map API without Useing Maps from Google

I would like to use own WMS/WFS Services, like Orthophotos. Is it possible to use the Google Android Map API to load this Maps ?
Because when using the Google Maps comercial, I have to buy a Google Premier licence right ?
Is it possible to use the Google Android Map API to load this Maps ?
No, you can't pass your own maps to Google Maps framework on Android.
You can use special tools for such purposes. Read this answer.
Because when using the Google Maps comercial, I have to buy a Google Premier licence right ?
No. For Android you can use Google Maps API even if your app is payed. Read more here
I think it's not possible to; I think Google API's can only be used for Google services. Why you have to look for an another service when Google provides the easiest map services and Google API's are free and no need to pay for it.
I think you can't. If you want to avoid google, try this:
OSMdroid
Mapsforge
MapQuest
It's free

Categories

Resources