Author Topic: Custom Online map with two url´s  (Read 2201 times)

Online balloni55

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 2469
  • Thanked: 95 times
    • View Profile
  • Device: Motorola G3 MM 6.01
Custom Online map with two url´s
« on: December 03, 2014, 10:30:40 »
Hello menion,
i use a online topomap with  online overlay "hiketrials"

My question, how can i built a custom online map with two url´s inside the same "provider id"
to display both without extra overlay?
Locus PRO 3.38.7
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11304
  • Thanked: 284 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Custom Online map with two url´s
« Reply #1 on: December 03, 2014, 11:20:29 »
Hello balloni,

try to firstly define background map with it's unique ID. Set it also parameter "visible" to "false".

Then create second map provider, overlay. And here set "background" parameter to value of previous map. Set visibility to "true". And that's all. It should be visible on old sample here - http://docs.locusmap.eu/doku.php?id=manual:custom_online_maps
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1896
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Custom Online map with two url´s
« Reply #2 on: December 03, 2014, 12:48:12 »
Hello balloni,

try to firstly define background map with it's unique ID. Set it also parameter "visible" to "false".

Then create second map provider, overlay. And here set "background" parameter to value of previous map. Set visibility to "true". And that's all. It should be visible on old sample here - http://docs.locusmap.eu/doku.php?id=manual:custom_online_maps

You mean set ID to same as ID from background map?
Regards J.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11304
  • Thanked: 284 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Custom Online map with two url´s
« Reply #3 on: December 03, 2014, 14:00:53 »
exactly. With this you say, that this second map (that will be visible in list of maps), will use map with certain ID as it's background map! So Locus will firstly download both maps, then merge both images and finally display
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 653
  • Thanked: 91 times
    • View Profile
  • Device: MotoG
Re: Custom Online map with two url´s
« Reply #4 on: December 03, 2014, 19:33:34 »
I think there is a risk of ambiguity and misunderstanding here. Here is a working snippet by way of example (copyright acknowledged). The two layers have different provider ids but the background id of one is set to the provider id of the other.
Code: [Select]
<providers>
    <provider id="11713" type="0" visible="false" required="false" background="-1">
        <name>Google</name>
        <mode>Satellite and Clouds</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=s,h@1,weather_nolabels,weather_0cloud&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>14</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
    <provider id="11714" type="0" visible="true" background="11713">
        <name>Google</name>
        <mode>Weather Satellite</mode>
        <url><![CDATA[http://mts{s}.google.com/mapslt?src=app&x={x}&y={y}&z={z}&lyrs=weather_c_mph|invert:0&s=Galileo]]></url>
        <serverPart>0;1;2;3</serverPart>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>8</zoomMin>
        <zoomMax>26</zoomMax>
        <tileSize>256</tileSize>
        <attribution><![CDATA[(c)2013 Google - Map data (c)2011 Tele Atlas]]></attribution>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
        <extraHeader><![CDATA[Referer#http://maps.google.com/]]></extraHeader>
    </provider>
</providers>
 

Online balloni55

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 2469
  • Thanked: 95 times
    • View Profile
  • Device: Motorola G3 MM 6.01
Re: Custom Online map with two url´s
« Reply #5 on: December 03, 2014, 19:38:41 »
Thanks menion, now i got it ;D ;D
Locus PRO 3.38.7
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1896
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Custom Online map with two url´s
« Reply #6 on: December 03, 2014, 19:50:59 »
Thank you John for explaining.
@balloni, does it work for you?
Regards J.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11304
  • Thanked: 284 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: Custom Online map with two url´s
« Reply #7 on: December 03, 2014, 20:33:07 »
it have to work, because many maps in Locus works in this way :)
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!