Hi,
From https://toolset.com/related-lesson/maps/, it's clear to me how to show one or more locations on maps. But what about the scenario of a cruise company wanting to show a cruise route across sea? Or what if I needed to show the border of a part of a town? I need to show lines and shapes on a map similar to the map here: enlace oculto (here it's done by a KML file with coordinates which is related to the content).
How can I do this?
You need to use custom code to update the map with lines and shapes, as described in the Google Maps API: enlace oculto
As to how you adapt that to work with Toolset Maps, you can see a sample of code to draw a circle on a Toolset Map here: enlace oculto
There isn't a facility to use a KML file in the way you describe.
Thank you Nigel. Would it make sense to submit a feature request? Only placing markers is too limited, and custom coding is a no-go in this project. Nevertheless I'd like to take a look at your link but it does not open for me.
As an alternative, should I be able to use a plugin like https://wordpress.org/plugins/ultimate-maps-by-supsystic/ in a template for a custom post type, and use values from custom fields to make it show the desired map? Would this concept work, even apart from this specific plugin?
Sorry that you couldn't see that link, I've fixed that now.
I don't think it is worth submitting a feature request, to be honest, as such a feature would not be trivial, and I think there are many other features that would be prioritised ahead of this.
As for using another map plugin, it may work, I don't know. I'm not familiar with how that plugin gets the values to power markers.
If it can accept shortcodes, then great, it may well work.
You can output an address field like so:
[types field='my-address' format='FIELD_LATITUDE, FIELD_LONGITUDE'][/types]
See https://toolset.com/documentation/customizing-sites-using-php/functions/#address for more details about the options.
I'd be curious to know how you get on.
Thanks again. I will check the various maps plugins. I'm in the preparation and design stage so it may take some time before I'll actually try this.
OK, let me just mark this as awaiting your feedback so that it is not sitting in my queue.
A quick update: I consider to use Toolset maps for the simple maps with markers only, and something like outdooractive.com for more complex maps with routes. I could load those through a HTML snippet. It's not ideal but for now the best option I guess. I'd use both tools for what they're designed for, rather than trying the impossible 🙂
Seems like a sensible compromise. Good luck with the project.