From this tutorial, you will learn how to change the initial zoom level on your Google map.
We bet that everyone faced that inconvenience on the website when the zoom level moved too far from the desired destination while changing Google map location. We are going to learn how to change the following feature and set the needed zoom level for Google map.
- First of all, connect to your FTP by using any FTP client or open the File manager at hosting cPanel.
- Then, open the file with the Google map, it depends on a template. For example, if you’d like to modify Google map on the homepage, you need to open the index.html file. In case you are going to change Google map on the ‘Contact us’ page, edit the contact-us.html one, etc.
- Search for the
<!-- RD Google Map -->
code inside of the file chosen and adjust zoom level to your needs in the section as in the following example:data-zoom="18"
.All you need to do is to change 18 to any number in range 0-21. Feel free to play with the numbers until you get what you want.
- Save the changes and go back to your website. Refresh the page, the zoom level is changed!
The job has been successfully completed!