In continuation to my previous post – INTEGRATE MAPBOX WITH VISUALFORCE TO CREATE BEAUTIFUL MAP – Part I, today, I will play with few attributes from Mapbox to make the map more interactive.
Below are the things I will do –
- I will add different layers and explain how to toggle between layers.
- I will add scale control
- I will add attribution control
- I will set the location in the map
To understand what is layer and how Mapbox works, I would request you to go through the official Mapbox tutorial @ https://www.mapbox.com/guides/how-mapbox-works/. Since from this post, we will go into deep with Mapbox, so it is better to have your basic clear in terms of how Mapbox works and what are the terminologies they use. Let’s go directly to the Visualforce Page Mapbox_2 click here
Now if you open the Visualforce page, you will see –
Clicking on Layer icon, you will see –
Choosing Sudipta First Map, you will see different map like –
In my next post, I will explain how you can retrieve geographical data from Salesforce object and show them in map with Mapbox API. Sounds interesting, right!! I am working on this now, very soon I will share the information with you all.
Till then, if you have any feedback, please share with me. Thanks.