Hi there,
I am quite new to wix and would like to know how to approach this if it is possible.
I am creating a dynamic page which will include a map. The map should show 2 points with the route between them marked with a line (as in google map directions).
To add to this, I would like the route to be dynamic, so for each dynamic page there would be a route for that specific page with the route for the 2 locations. I have a collection with the locations (a and b) to use for each page.
So the idea is that each one will have 2 specific locations on the map with a route line between them that will change depending on what page is loaded. Is this possible?
EG: like this would show on a google map:
Here’s an example on using Google Maps in an HtmlComponent:
Multiple Markers in Google Maps
Embed Google Map on your site with multiple location markers , marker clustering, and custom controls using the HTML component.
You can send coordinates for your two locations. You’ll need to set up the HTML code to display the route. You can get that information from the Google Maps documentation.
Hey, thanks for the pointer. I will try it out over the next couple of days and will let you know if it works out for me. Thank you very much
Hi again. Does it cost to use this service?
@michaelphilip66 The Leaflet Map example offers another option. Leaflet Map is free to use, but you’ll have to see if it offers route marking.
I decided to just use single markers that update according to coordinates in the database. This works good enough for now.
Thank you all for your suggestions