tryad1tk

Friday, 12 February 2016

Working With Google Maps For Android App

Get marker to current location and also get the latitude and longitude values

location.getLatitude() and location.getLongitude() are the methods that return the double values of longitude and latitude addmarker() is a method that marks the point at a given latitude and longitude value
Before you run your application, you need a Google Maps API key.

To get one, follow this link, follow the directions and press "Create" at the end:
https://console.developers.google.com/flows/enableapi?apiid=maps_android_backend&keyType=CLIENT_SIDE_ANDROID&r=AB:E1:EF:45:3A:73:CD:37:F7:A5:67:6E:C3:F3:0F:D6:9B:07:AE:DE%3Bpbstudies.com.map
You can also add your credentials to an existing key, using this line:AB:E1:EF:45:3A:73:CD:37:F7:A5:67:6E:C3:F3:0F:D6:9B:07:AE:DE;yourpackagename

Alternatively, follow the directions here:https://developers.google.com/maps/documentation/android/start#get-key
Once you have your key (it starts with "AIza"), replace the "google_maps_key"string in this file.

in the values folder under resource create a xml file google_maps_api.xml



Follow ,Share and comment for more codes 

Check these apps-
App1

App2

App3


1 comment: