[MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)

Started by Menion, November 29, 2010, 14:53:04

0 Members and 1 Guest are viewing this topic.

InfX

#45
Quote from: "sebbo"should be possible somehow. never changed a header on a apache server before but ill try to find a howto
It shouldn't be a problem on Apache. Take a look here. Never tested it myself though  ;)
  •  

marlar

#46
In PHP you simply put this statement in the beginning of the main file:

header("Disable-Tile-Limitations: True");

It must come before any output (echo, print etc) is sent to the server or it will fail.

The syntax is similar in other languages.

Or, as Menion says, you can do it directly in Apache.
  •  

marder

#47
Quote from: "InfX"I would like to add an "map.geo.admin.ch" as a custom online map...

It seems to have 256x256 tiles, fetched from "http://tile{n}.geo.admin.ch/geoadmin/ch.swisstopo.pixelkarte-farbe/{z}/000/000/{x}/000/000/{y}.jpeg", referrer is "http://map.geo.admin.ch/ ", zoom range is from 14 to 22 (well, to 26, but those are simply a resize of level 22), n seems to be randomized (i've seen 5,6,7,8 and 9), coordinates - hell knows, i don't know much about how those are usually represented, but it seems like a simple x & y for the tile (NOT a geographic coordinate).

I think this will not work because the tiles use the CH1903 projection instead of WGS84 and the zoom levels are not a fixed multiple of each other. Here are the resolution in m/pixel for levels 0 to 26 : 4000,3750,3500,3250,3000,2750,2500,2250,2000,1750,1500,1250,1000,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,0.5.
  •  

sebbo

#48
just found another solution for downloading unlimited from own server via mobac. thats even better to let the computer do the work then the phone.

i might write a little howto here on the forum
  •  

Menion

#49
it's also possible, but I already implemented support for previous method, so you can try this as well ...

locus_disable_download_limit:true ... which, placed in response header, should remove downloading limits
- 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

#50
Quote from: "marder"I think this will not work because the tiles use the CH1903 projection instead of WGS84 and the zoom levels are not a fixed multiple of each other. Here are the resolution in m/pixel for levels 0 to 26 : 4000,3750,3500,3250,3000,2750,2500,2250,2000,1750,1500,1250,1000,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,0.5.

Menion has added the CH1903 projection now (any info how to actually use it in custom online maps ?). Do zoom level really have to be a fixed multiple of each other ? If so, one may define multiple maps with single zoom level on the same id, naming them something like 1:100000, 1:50000, 1:25000 etc as a workaround.

Any new hints ?  :twisted:
  •  

Menion

#51
looks you really want to add this maps to locus :)

I was a long time ago (last year I think) working on some solution for really custom maps. But I don't know why, but this system remain near ice :). Anyway here is part of it. Custom Hungary maps. Maps aren't well calibrated, it was only an example. You may look on it. This probably solve your problems. I'm also not sure if this system still works but probably yes (when you add this map into maps directory, this should work). I can do some improvements (like adding support for CH1903 projection) to let your maps work. Anyway count that these maps will work in same system like "custom" maps, only they will take data from internet and cache them as single file to storage card into cache/maps directory. They also will not be downloadable ...

so what you think? Anyone skilled enough to help me with this? (slowly anyway, I have many other works to do :) )
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Minjin

#52
Yes Menion, looks like we really want to add this map on LOCUS, the best !  :mrgreen:

So I would like to help but I don't know how!?

In an old free version, hum  :oops: , it's still working... So it should be possible to get the solution to make customs xml files isn't ?
  •  

mague

#53
Hello,

i have set up a server with tiles from 9 to 17. It works nice with MOBAC.

But not with Locus. The following works, but shows only 9 to 16. No 17

         <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>

The following doesnt work at all. According to my webservers log its requesting absolutely wrong tiles.

         <zoomPart>{z}-9</zoomPart>
          <zoomMin>9</zoomMin>
          <zoomMax>17</zoomMax>

I dont understand whatfor zoomPart is good for to be honest. I have to ask the stupid question.. what am i doing wrong ?
  •  

Menion

#54
zoom part is used on some servers where you do not use zoom values from 0 to x (17 on OSM for example). Try to use you first example but only with

<zoomPart>{z}-8</zoomPart>
<zoomMin>17</zoomMin>
<zoomMax>25</zoomMax>

it's simply math. Instead of z in zoomPart, put your numbers.
  So for min zoom you get
  {17} - 8 = 9
  for maxZoom you get
  {25} - 8 = 17

that's what you want right? Zooms from 9 to 17
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

mague

#55
Hi,

Quote from: "menion"zoom part is used on some servers where you do not use zoom values from 0 to x (17 on OSM for example). Try to use you first example but only with

<zoomPart>{z}-8</zoomPart>
<zoomMin>17</zoomMin>
<zoomMax>25</zoomMax>

it's simply math. Instead of z in zoomPart, put your numbers.
  So for min zoom you get
  {17} - 8 = 9
  for maxZoom you get
  {25} - 8 = 17

that's what you want right? Zooms from 9 to 17

Ok, this is working. Thanks a lot.

Although this is probably the wrong thread, i have two more questions.

1) Would it work with JPG tiles too ? I am allready down to 256 bit PNG, but i think JPG filesize would be even smaller then 8 bit PNG. I am asking, because my tile server is just for my family and me. My upstream bandwidth isnt that great ;)

2) In the preferences there is an option to double the size of the tiles. This is very nice. But would it be possible to add a 1.5 magnifier too ? Or even better, add magnifiers per zoom level like:

1@default
2@16
1.5@17
  •  

Menion

#56
fine, so first part is done.

1) JPG ... I'm sure this will work also because satellite maps use also JPEG images which are smaller for these kind of images
2) hmm ... actual double size is set to 2.5 but psst ... secret :). Anyway, you want really very specific settings. Did you use lock button on map bottom panel? Try it. This is what you're searching. Problem is that you have to press it for every zoom but it at least partially solve your wish.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

pez3

#57
Hello...

first of all i've got to say, that this is a really awesome app you created! thank you!!

i'm trying to add maps from bergfex.at to my online map resources. it turns out, that for zoomlevels 14 and 15 the folder structure on the server changes.

so my first question is... is there a possibility to deal with the fact that for different zoomlevels another folder structure exists?

the next thing i noticed is, that the folder name consists of part of the x coordinate...  i.e. for x=17503 the file on the server is /images/amap/15/175/15_17503_1152.png.

is there the possibility to manipulate coordinate strings?

thank you for your help and for this awsome app

greets peter
  •  

Rob

#58
Hi Peter, quess, you are from Austria too :-) ?
I also love Locus with Bergfex. Did some mapdownloads from MOBAC, but there are always some blank tiles in different zoomsteps.
How did you manage to add bergfex.at for online download within locus?
Would appreciate if you can give me a hint.
Thx in advance.
Regards
Rob
  •  

pez3

#59
hi rob...

my approach only works for zoom 13 and lower (zoomlevel on bergfex). for 14 and 15 (the zoom levels where it becomes interesting) there changes the folder structure on the server.

 if its possible to manipulate strings in the xml (i.e. get the first numbers of the x-coordinate) then it would be possible to get (at least) the higher zoomlevels...

maybe menion can help us...

regards
peter

my entry in providers.xml is:

<provider id="10193" type="0" visible="true" background="-1">
  <name>Bergfex</name>
  <mode>Topo</mode>
  <area>Österreich</area>
  <url><![CDATA[http://static5.bergfex.at/images/amap/{z}/{z}_{x}_{y}.png]]></url>
  <zoomPart>{z}-8</zoomPart>
  <zoomMin>8</zoomMin>
  <zoomMax>30</zoomMax>
  <tileSize>256</tileSize>
  <extraHeader>Referer#http://test.at/</extraHeader>
</provider>
  •