Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this blog, I have shown you how to add the google map in your application step by step.
Android allows us to integrate google maps in our application to show any shop, routes, restaurants, location etc. on the map.
Google made new Maps V2 API as a part of Google Play Services SDK.
Step 1: Add the play service library into your project build.gradle
compile 'com.google.android.gms:play-services-maps:8.3.0' 1 compile 'com.google.android.gms:play-services-maps:8.3.0'
Step 2: After adding the library you can use Google Map – Layout file where you want to display the map
Step 3: Add some permissions with the Google Map API key in the AndroidManifest.XML file
Step 4: Get the Api key from here.
For generating the API key you have to create a new project or select the existing one
After selecting the project you have to select Android on the add credentials to your project section
After fill the all the requirments you get the API key from google.
You can also you the existing API key.
Step 5: Initilize the Map
Step 6: Adding Markers
You can create markers on the map via the Marker class.
Marker
Step 7: Zoom Camera
This is method newLatLngZoom(LatLng latLng, float zoom). Step 8: If You want then can animate the map
In this example, I have taken three country codes and display it on google map
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.
Stathis Plakidas
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.