This guide will help you to add or change map markers (based on the RD Google Map plugin).
In order to add and change map markers, you need to edit the .html file which contains the map.
In order to make the necessary changes, you need to follow these steps:
- Get your needed map markers and location coordinates. You can do that via Google Maps or any other tool that helps to get map coordinates, like Google Maps – GPS coordinates, latitude and longitude.
- Connect to your server via FTP or open the hosting cPanel File Manager and edit the .html file with the map code (the file is located in the site’s root installation folder).
- Locate the map markers list code here.
In case there is no such code in your .html file, you need to look for
<div class"rd-google-map">the code and insert the list with the marker(s) inside of the mentioned container. Your code will look as follows -> look here.
- To change the location existing marker points to, you just need to change the values of 2 data attributes:
data-x(north latitude) and
data-y(west longitude) for the list item (
- To add a new marker you need to insert one more list item using
<li></li>HTML tags and set 2 attributes:
- After that, you should get the following code that should be added to the map code in the .html file -> look here.
The complete map code will look like this surely -> look here.
Where this code sets your new marker on the map. The content inside of the
<li></li>tags will be shown in the marker info window upon clicking on it.
Save changes and upload the edited .html file replacing the existing one. That’s all!
If you have any questions, don’t hesitate to get in touch with us.