This object is in archive! 

javascript in providers.xml

Vincent Hentsch shared this question 7 years ago
Answered

Hello,

is it possible to add some javascript calculus in providers.xml, something like this :


  1. <![CDATA[
  2. http://(({x}+{y})%4).domain.com/maps/{z}/{x}/{y}.png
  3. ]]>

I think the serverPart of the domain is computed from {x} and {y}

Thanks

Vince

Replies (1)

photo
1

Good day Vincent,


unfortunately such feature is not possible. XML files with map configurations only handle plain text values, no scripts etc.

Thanks for understanding.

photo
1

Hi Menion,

Thanks for your answer ! That's tToo bad :(

Wouldn't it possible to do like with <zoomPart>, put the calcul in <serverPart> ?

  1. <serverPart>({x}+{y})%4</serverPart>
  2. <zoomPart>{z}-8</zoomPart>

Regards

Vince

photo
1

Good day Vincent,

I agree this may be useful and I remember someone already wanted this from me some time ago ...


Feature will be added in next Locus Map version (or in next Beta version). My first tests shows it works fine, but you will see during testing. Let me know ...

photo
1

Hello !


What a good news :)

I'm looking foreward to test that !

Regards

photo
1

Hello,


Do you have an example or documentation ?

Thanks in advance

Regards

photo
1

Hello Vincent,

tested and not working? No documentation exists for this feature yet. Sample you wrote few posts before should work. Currently supported parameters are {x}, {y} and {z}.

Anyway feel free to write me some sample for testing so I may try it on my own, if not working as expected.

photo
1

Ok, yes just tested and working perfectly ! Thanks a lot :)


Well done !

Kind regards

Replies have been locked on this page!