Native Shopify Mobile App with 20 new features
Kickstart your hyperlocal marketplace in Corona pandemic with a starter guide
Android App Development
iOS 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 184.108.40.206 release ready!
Owner and Founder. Opencart
In the last part of the working with AMaps we learned about how to show a basic map in your activity. In this section we will learn about using different may type (Like NORMAL, SATELLITE, NIGHT etc.) in the app and adding markers.
We will be considering that you have already applied the basic map on the app if not then you can go to this link and learn how to do it.
After this, you have to create some buttons in your layout which will control the map types and on the button click all you need to do is call the setMapType of AMap‘s object.
This will change the map type and your map will work accordingly.
Now let us see how to add the marker on your map. It is quite easy actually, there is a MarkerOptions class which will help you to do that. Try the below code with a Latlng and it will add a marker on your map.
In the above code BitmapDescriptorFactory.HUE_AZURE defines the type of your marker. They have provide inbuilt markers with various color. You can go for HUE_BLUE, HUE_RED etc.
After the MarkerOptions object is initialized you need yo call the addMarker function of your AMap‘s object and it will draw a marker on the map.
Thank you very much, this is Vedesh Kumar signing off.
<—– PART 1
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.
Excellent work, fast, good quality and understood the brief perfectly! Quick responses developing the project and very good cooperation. I suggest to anyone.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.