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 220.127.116.11 release ready!
While working on a Chinese project. We faced a problem which is in China the Google services are blocked. Yes, you will not have any of the important Google services like Firebase, maps etc.
We found an alternative for the maps which is AMaps. AMaps actually works just like google maps but it’s actually a Chinese product. So to get the locations, maps, and routes in China you can use AMaps as an alternative.
Let’s get started with showing a basic map on your in your activity.
First, you need to setup your AMaps and for that, you need to register yourself here and get a Key to use it’s all functionality in the application. Key is not required to show the maps, locations, and markers but it is essential for showing routes and other functionalities similar to it.
After getting the Key from the site. You need to download SDKs from here. You can also download the sample code from here which is very helpful to understand and use in your application.
Install the libraries in your project and add the key (if you have) in your AndroidManifest.xml file in meta-data tag.
And also the required permission to access internet and location and if you want to work with offline maps you can also add read-write store permission.
Now when you are all set to work with AMaps. Let’s begin with creating a layout for maps.
To get the maps you need to add the maps tag in your XML layout file like the below code.
You can always change the width and height attributes to change map view this will represent the area in which the map will be displayed.
After adding the maps in your layout you can instantiate it in onCreate method of your Activity like the below code.
That’s all !!! Connect your device and start working with AMaps. We will discuss some other features of AMaps in the next blog.
Thank you very much, this is Vedesh Kumar signing off.
PART 2 —–>
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
All communication is done through a ticket system. I appreciate the regular almost daily updates of what is being worked on, and communicating changes or updates is easy through this system. Mobikul's response timeframe is quick.
Owner, Shop ATV Escape
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.