Open mcnesium opened 2 years ago
The way it is intended is that the routing form is not shown. The purpose of this parameter is to embed a map into a website without showing the interactive elements of the search form, route form and POI form.
You are right, it would be better if the route was shown anyways if there is one defined in the URL hash. Right now the route is drawn by the form, which is why it is not shown.
How exactly would you want the route to behave? Would you want the start/end/via points to be draggable, and the route form still to be visible? Or should the route be immutable?
If the route should be immutable, I think the better way to do it would be to create a collaborative map, save the route as a line and then embed the read-only link of that map.
Both options are reasonable. What if the route is editable, whenever the form is visible? Maybe the search=
flag should be changed to something like editable=
then.
Side note: I just discovered facilmap when I searched for OSM-backed alternatives to the embeddable openrouteservice.org maps for a quick "this is where we are gonna go" visual inside a travel-plan notepad. Not sure if I am using this tool the intended way at all but it sure looks pretty neat. Thanks for sharing it :+1:
I think it's a good idea to only have the route editable when the form is shown. In that case your embedded links should show the route, but it shouldn't show the route form.
Your use case sounds very much like what FacilMap is made for. I would recommend you to use a collaborative map for it, since then the route doesn't have to be recalculated each time, and also the route will still be shown if the routing service has a temporary outage.
When disabling the search box in the embed code by adding
search=false
to the URL, the resulting embedded page also misses the actual route. Is this intended?Example in Hedgedoc demo
Example code: