Map with points of interest

Artonn

Active member
I'm wondering if there's an addon out there, where you can add a map of for example a country and define points of interest?

Thx.
 
This is possible for anyone on an individual level with standard google maps, which can then be embedded on your site for free.

As an admin you could also embed one as long as you didn't need the functionality for members to drop pins themselves, but they could always submit the information through a thread or other forum tool, then a mod or admin could vet and add the points if they have permission for the map.

If you wanted logged in users to be able to contribute to a single site hosted map live using a custom interface, I'm not aware of anything that exists for xf, but it's certainly doable with the google maps api, and probably with mapbox too if your traffic is too high for the google maps costs.

Custom google map costs using the API can escalate quickly these days on a busy site though, even with the $200 per month free credit. I racked up a £100 bill just doing local dev work with a single API key the last couple of weeks. Granted this included a huge amount of geo encoding and places lookups. But if you do have a high traffic site, you do need to be careful about what Google Maps API features you enable need to make sure everything you can store locally is cached, and any autocomplete lookup requests are optimised returning only the data you need.
 
Last edited:
I'm wondering if there's an addon out there, where you can add a map of for example a country and define points of interest?

 
Unfortunately, there is nothing similar available at the moment.

but it's certainly doable with the google maps api, and probably with mapbox too if your traffic is too high for the google maps costs.
The issue with Google's My Maps or OpenStreetMap is that other users can download the data from your map in their preferred format, allowing third parties to create a new map based on your work. To fully leverage the APIs, it is advisable to rely on an add-on that integrates them seamlessly.


The wonderful component created by @Bob only works if there is a specific physical address. It does not work with coordinates. Bob was extremely helpful, explaining everything to me in detail years ago when I was also interested in purchasing it.

and he literally wrote to me:
..there is no PLOT MARKERS functionality in any of my addons, its all Location based (adding a valid address).

try contacting him first and seeing if he has added that option. she answers you very quickly

He also advised me that the developer should have a deep knowledge and expertise in Google Maps APIs and XenForo to develop a robust solution.

So far, the only add-on that came close to what I wanted was the one from @ThemeHouse, but I haven't found anything truly comparable.
 
Last edited:
Yes, I wouldn't recommend My Maps for a large robust system, but it's a free entry level DIY option with no need for a developer.

A custom system could be built on Google Maps API, Mapbox API or probably even OpenStreetmap with Leaflet JS, but I've not explored OpenStreetmap.

.there is no PLOT MARKERS functionality in any of my addons, its all Location based (adding a valid address).

So the way Google Maps works is that to add a marker to the map, you need the Lat Long of place.

To get the Lat Long you need to GeoEncode the address.

To do this you use the GeoEncoding API to take in an address, and Google Returns a Lat Long, which can then be stored locally in the database.

Then when the map loads it can read all the marker lat longs locally and plot the markers on the map and you're only paying for the map load and not the geocoding.
 
  • Like
Reactions: Bob
To do this you use the GeoEncoding API to take in an address, and Google Returns a Lat Long, which can then be stored locally in the database.

Then when the map loads it can read all the marker lat longs locally and plot the markers on the map and you're only paying for the map load and not the geocoding.
I use the Google Maps Geocoding API for fetching location data. I store not only Lat/Long, but a ton of other useful location data that the API returns. The API only comes into play when creating a piece of content and setting a location OR when editing a piece of content and changing the location (or adding a location when there was no location set).

I use the Google Maps JavaScript API for multi-marker maps (which uses the stored location data for each item being plotted on the map). Like you mentioned, doing it this way saves on API calls (which makes a huge difference now that only the first $200 is free).
 
Yes, I wouldn't recommend My Maps for a large robust system, but it's a free entry level DIY option with no need for a developer.

A custom system could be built on Google Maps API, Mapbox API or probably even OpenStreetmap with Leaflet JS, but I've not explored OpenStreetmap.



So the way Google Maps works is that to add a marker to the map, you need the Lat Long of place.

To get the Lat Long you need to GeoEncode the address.

To do this you use the GeoEncoding API to take in an address, and Google Returns a Lat Long, which can then be stored locally in the database.

Then when the map loads it can read all the marker lat longs locally and plot the markers on the map and you're only paying for the map load and not the geocoding.
Just to clarify and ensure that Bob's words are not misinterpreted, as they have been taken from a much broader discussion: I had a large database of coordinate markers, and most of these markers did not have a physical address because they were located in unnamed areas or streets. Attempting reverse geocoding, at best, would yield the name of the province, while details like street name, city, or municipality were often missing. This explains Bob's response. However, for @Artonn, Bob's add-on could work perfectly, which is why I suggest contacting him.

I hope this makes things a bit clearer.
 
Back
Top Bottom