New feature suggestion: Use URL parameters to specify on/off groups in embedded maps

I want to embed different versions of the same map on different web pages. The excellent Group facilities almost makes this easy, but I can’t see a way to specify which groups will be visible in the embed code. Have I missed something? If not, I’d like to suggest that you add a feature to process URL parameters something like:
&hidegroups=SecondaryRoads,TertiaryRoads
and generate a parameter like that in the Embed code listing the groups that are hidden ehen the Embed code is produced.

1 Like

Hi Georgio,

The group visibility state is saved with the map. If you save the map with some groups hidden, they’ll also be hidden in the embed code. So just make sure you save the map in the state you’d like it to be visible and then it’ll look the way you want.

Hi Zsolt,

Thanks for that suggestion. But as I understand it that involves making a copy of the map (via a GeoJSON down/upload) for each of the views I want to embed. That’s not exactly what I’m asking for because after making such a copy two separate maps will have to be edited each time an update is required. With more than two views that would soon become unworkable.
So I think my feature request is still a valid one.
George

Hi George,

So do I understand correctly that you’d like to have a single map, but make different embeds based on the same data? What kind of differences would you like to make between the maps? Different group visibilities, and I guess different starting regions as well?

Zsolt

Hi Zsolt,
Yes, for my use case control of the group visibilities is what I need. E.g. my site will have two maps, one showing all existing and planned cycle tracks and another showing only the existing ones. With my suggested changes to the embed code, this would be implemented with a single map and edits to it would be shown in both as the situation changes.
For now I have made two copies of the same map and I will have to carefully edit both as the situation changes.
Your suggestion to have a parameter in the embed code to select a different (lat, lng) center point is a good one too. That way a city-wide map could for example be re-purposed for people interested in different districts. Finally, what about a facility to choose the zoom level too?
I have previously done some stuff like this in this more specialised map system that I built.

Cheers,
George

Hi George,

I understand your point now very clearly, thanks for sharing your map. Both the new and the old looks really nice!

I’ll add it to the list of feature requests. By changing map centre, I meant specifying a bounding box.

Yes, it would be nice to specify these on a per-embed level.

Zsolt

Hi Zsolt,

Great, that sounds good. Bounding box is a better parameter to because it enable changes to zoom level and location.

Many thanks,

George

Sorry to bump this old topic. A feature like the one we discussed here would still be really useful to me and to some other people I think.

George

Hi George,

No problem, I did not forget about this feature request, it’s on my list!

Zsolt

Hi there, thanks for an excellent site! I just want to add my vote to this suggestion :slight_smile:

1 Like

Me too!