- Compatible XF Versions
- 2.0, 2.1, 2.2, 2.3
Creates a button called View map for use in messages.
Clicking the View map button will show a Google map with a marker to a specific location.
(Example of View map button)
(Example of View map page)
(Example of View map link in visitors tab)
(Example of Options page)
Features:
Copy the following two files from the add-on directory to a web viewable directory of your choice, for example a /misc/ folder:
viewmap.php
viewmap_crosshair.gif
Setup step 2:
Edit the viewmap.php file and change the first few variables to reflect your forum information.
Setup step 3:
Get your Google API key using this link:
https://developers.google.com/maps/documentation/javascript/get-api-key
Update the viewmap.php file variable called $key located on the top of the file.
Setup step 4:
In the Options page, add the URL and Default coordinates.
Setup step 5:
Navigate to the following:
Admin control panel -> Content -> Custom BB codes -> map
Edit the HTML replacement so that it's pointing to the viewmap.php file located in your /misc/ folder.
How to create a View map button in a message:
Clicking the View map button will show a Google map with a marker to a specific location.
(Example of View map button)
(Example of View map page)
(Example of View map link in visitors tab)
(Example of Options page)
Features:
- Large easy to use Google map displayed full screen.
- Responsive code supports all devices.
- Visitors tab has a link called View map, this allows viewing the Google map.
- View map button when clicked shows exact location in Google map.
- All phrases start with viewmap_ for your convenience.
- Download Andy-ViewMap-1.3.zip and unzip it.
- Copy the src/addons/Andy/ViewMap directory to your server.
- From the Admin Control Panel Install the add-on.
Copy the following two files from the add-on directory to a web viewable directory of your choice, for example a /misc/ folder:
viewmap.php
viewmap_crosshair.gif
Setup step 2:
Edit the viewmap.php file and change the first few variables to reflect your forum information.
Setup step 3:
Get your Google API key using this link:
https://developers.google.com/maps/documentation/javascript/get-api-key
Update the viewmap.php file variable called $key located on the top of the file.
Setup step 4:
In the Options page, add the URL and Default coordinates.
Setup step 5:
Navigate to the following:
Admin control panel -> Content -> Custom BB codes -> map
Edit the HTML replacement so that it's pointing to the viewmap.php file located in your /misc/ folder.
How to create a View map button in a message:
- Under the Visitors tab, click the View map link.
- Move map to desired location.
- Copy the Map code at the bottom and paste it into a message.
Example of map code:
- Member clicks View map button.
- The View map button is a Custom BB Code.
- the Custom BB code calls a link which is defined as a Route.
- The Route calls the Viewmap.php file located in the add-on directory.
- The Viewmap.php redirects to viewmap.php in the /misc/ directory.
- The viewmap.php file calls the Google API to display a map.