onlinemapsource.xml : Is it possible to share some common data between sources

Started by LaurentG, May 03, 2021, 05:22:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LaurentG

We may have in onlinemapsource.xml file several source definition sharing some elements.

I'm thinking here in particular to various maps of a same server, that require a kind of "key" in the URL. Each time this "key" changes, it would be great to have to change it only once, rather than several times, in every mapsource definitions using it.

I'm also thinking here in particular to all Strava maps sharing a same (complex...) Cookie to post, thanks to syntax
<httpparam name="Cookie"><![CDATA[...]]></httpparam>

My Question : Is there a way to define somewhere in the onlinemapsource.xml only once the common "key", or the common cookie to set, and to re-use it's value in all the mapsources that have to use it ? This would be very useful in case the value of key or cookie (or any other common element) has to be updated quite frequently.

Among solutions I could imagine (without any idea about their feasibility), be able to define, in the top of xml file, a kind of "variable" containing this common value and reuse this variable in different mapsources definitions ?

Or, other solution, be able to put this common value in a file, and to "read" this file from the onlinemapsource.xml ?

I agree that for Strava maps, the need disappeared thanks to @afgb1977 who recently proposed an alternative solution avoiding use of cookies for Strava heatmaps. But we may have the same need in the future with other mapsources.

Many thanks in advance for any valuable answer !