Something wrong while parsing a custom map layer?

Started by InfX, January 31, 2013, 02:24:24

0 Members and 1 Guest are viewing this topic.

InfX

Hi. I am trying to use the following custom online map source in an attempt to use it as an overlay on top of another map, yet trying to view it in a "standalone" mode for the sake of testing:
<provider id="10191" type="0" visible="true" background="-1">
    <name>Amudanan</name>
    <mode>Tracks</mode>
    <area>Israel</area>
    <url><![CDATA[http://amudanan.co.il/services/ajax.php?actions=gettile&z={z}&y={y}&x={x}&type=png&showpublicpoints=false&shvilim=true&copyrighted=true]]></url>
    <zoomPart>{z}-8</zoomPart>
    <zoomMin>16</zoomMin>
    <zoomMax>23</zoomMax>
    <tileSize>256</tileSize>
    <attribution><![CDATA[<a href="http://mapi.gov.il/">Terms of use</a>]]></attribution>
    <extraHeader><![CDATA[Referer#http://amudanan.co.il/]]></extraHeader>
    <extraHeader><![CDATA[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
</provider>

Locus attempts to load the map, yet shows all the tiles as "Not exists". Being 100% sure the params in the xml above are correct (tested using custom mobac map source), i've recorded a pcap of the locus network communication. Seems like Locus is receiving the tiles after all. See https://dl.dropbox.com/u/32489520/amuda ... tered.pcap for an example of one such tile being fetched by Locus. I've copied the data from pcap and un-gz-ed it, this is, indeed, a blank, transparent png file. Obviously, not all of them are blank, but this sample one is.

Any idea what's wrong?
  •  

Menion

#1
Hi,
  as I'm testing it

this url
http://amudanan.co.il/services/ajax.php?actions=gettile&z=14&y=6622&x=9792&type=png&showpublicpoints=false&shvilim=true&copyrighted=truereturn correct image

anyway image right next to it
http://amudanan.co.il/services/ajax.php?actions=gettile&z=14&y=6623&x=9793&type=png&showpublicpoints=false&shvilim=true&copyrighted=truereturn empty (transparent image)

so there is some problem with URL and some server protection maybe, not in Locus
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

#2
Those empty transparent images ARE ok. It is supposed to be a trails overlay, a lot of tiles are empty transparent images. Locus shows ALL the tiles as "Not exists", though.
  •  

InfX

#3
I'll send you the mobac reference i've made for... mmm... let's call it a "personal use", privately, by email. Those are 2 "beanshell" map sources for the base and the tracks and the xml that layers them on top of each other. I see no reason why shouldn't the same layers combination eventually work with locus ;-)

EDIT/PS: email sent (to: locus (@t) asamm.com)
  •  

Menion

Hmm,
  1. I never worked with Mobac (oki some year ago once or twice to check about what all people talk) so I don't know what to do with anyway seems that are similar definitions as you put into providers.xml in Locus
  2. I do not like support for features/maps/activities that do not have access to it - so in this case, these maps aren't in Locus because they should not be by their terms of use. dot.

Anyway generally, here is problem what? Fact that Locus transparent image display as "not exists" right? So if it remain transparent then no problem?
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

The problem is that every png from this server is displayed as "not exists", both fully transparent (as in your second link) and normal ones, with tracks (as in your first link). I don't know what so special about those pngs, but ill likely put a few of those on my own server, feed those into locus, and try finding out. Ill report asĀ  soon as i know anything new.
  •  

Menion

nono there is not anything special with them. They're just fully transparent, that's all. And because in your configuration file, you use this map layer as single layer, you then see "not exists" instead of transparent image. I really suggest put some background layer below this one. Then you'll always see background layer and on top of it, if exists (so image is not completely transparent), you'll see this tracks layer

but, from links above, it looks for me, that locus do not load all images for tracks layer. I just think that server returns transparent images too often even for places where should be any tracks
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

Just did a bit more testing, indeed, this isn't a png. I've loaded providers.xml below, with 2 'maps', one with the original server, but the actual tile hardcoded, so locus should fill the entire screen with just one tile. The other one is the very same png from the very same tile, placed on my own host. Guess what, the real one fills the screen with "not exists" the fake one with the actual tile!!! I took a quick look at the traffic capture on both, both hosts return the file, there are no errors. The only difference i immediately spot is the gzip encoding used by the 'real' server, something i do not know how to enable on my fake one, but i'll probably find out later in order to try & reproduce. I may also try putting a blank "Accept-Encoding" as an extra header on the real thing, too (i wonder if locus will actually accept that).

<?xml version="1.0" encoding="UTF-8"?>
<providers>

<provider id="12345" type="0" visible="true" background="-1">
<name>Test</name>
<mode>real</mode>
<area>Test</area>
<url><![CDATA[http://amudanan.co.il/services/ajax.php?actions=gettile&z=14&y=6622&x=9792&type=png&showpublicpoints=false&shvilim=true&copyrighted=true]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>16</zoomMin>
<zoomMax>23</zoomMax>
<tileSize>256</tileSize>
<extraHeader><![CDATA[Referer#http://amudanan.co.il/]]></extraHeader>
<extraHeader><![CDATA[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
</provider>
<provider id="12346" type="0" visible="true" background="-1">
<name>Test</name>
<mode>fake</mode>
<area>Test</area>
<url><![CDATA[http://inf.homeip.net/tmp/test.png]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>16</zoomMin>
<zoomMax>23</zoomMax>
<tileSize>256</tileSize>
<extraHeader><![CDATA[Referer#http://inf.homeip.net]]></extraHeader>
<extraHeader><![CDATA[Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
</provider>

</providers>
  •  

InfX

Yep. That's it. The gzip encoding. Accept-Encoding:none (yea, i know it is invalid, but locus rejects a blank value, and the server still returns the tiles, but without the gzip encoding) makes it work.

Please fix ;-)
  •  

Menion

very nice deduction, fixed!
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

InfX

#10
Thanks :)
  •