Locus Map - forum

Support => Information => Topic started by: menion on November 29, 2010, 14:53:04

Title: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on November 29, 2010, 14:53:04
Current manual for Custom online maps support in Locus is moved on WIKI page

http://docs.locusmap.eu/doku.php/manual ... nline_maps (http://docs.locusmap.eu/doku.php/manual:custom_online_maps)
Title: Re: [MANUAL] - adding online map providers
Post by: miGi on February 23, 2011, 20:17:02
Hi menion! Thanks for this awesome app and keep up the good work.

But I have a problem with the custom maps. I try to get this http://www.retkikartta.fi/retkikartta.php (http://www.retkikartta.fi/retkikartta.php) map to work, but it don’t want to work correctly. It’s map-pieces are in png like this http://ntile1.navici.com/t/retkikartta/ ... x19741.png (http://ntile1.navici.com/t/retkikartta/maps/2393x1.411246x9277x19741.png) where 2393x1.411246x9277x19741 is:

2393 = is some kind of constant
1.411246 = very odd zoom level (min)? next steps are 2.116577,  4.234905 and so on…
9277 = X-coordinate
19741 = Y-coordinate

It seems to be that Locus doesn’t understand the zoom-levels. Is the constant reason for that? Can I get somehow this map work whit the Locus? There is also another server for the same map: http://kansalaisen.karttapaikka.fi/ (http://kansalaisen.karttapaikka.fi/) but I can’t get that one either to work.

Thanks,
miGi
Title: Re: [MANUAL] - adding online map providers
Post by: menion on February 23, 2011, 20:50:17
Hi miGi,
  as I look on your maps, problem is not only decimal number of zoom level. Main problem is this ...

"0 - type of map provider, 0 means classic Mapnik server (OSM, ...). No others currently possible"

  this server have not so much complicated tile system, as you wrote but tile numbers are not numbers defined in same way as in mapnik server that use for example OSM. I'll look later on your map anyway, adding this map is not currently possible as I see...
Title: Re: [MANUAL] - adding online map providers
Post by: miGi on February 23, 2011, 21:25:47
Ok! Thanks for the quick reply. I will then wait for the update.
Title: Re: [MANUAL] - adding online map providers
Post by: userloser on April 15, 2011, 16:30:32
Ok, so can the stupid among us get a little bit more information?

E.g. where do the map provider files go? Locus/mapsOnline/... seems to contain only sqldb files on my phone. Do I dump my map definition xml there as well? What should be the name of the file? Can we see some working examples of other providers, just so we get a hand on how to write those? Maybe a kind soul can extract a config or two from an older distribution than 1.5.1 and dump it on a pastebin somewhere so that we can learn?

What a pity that such a great application has to suffer, and that we - the happy customers - should be left to suffer with junk like the default android map application.  :x
Title: Re: [MANUAL] - adding online map providers
Post by: menion on April 15, 2011, 16:33:15
ah sorry. you're correct. In my description are missing such a main information! I'll fix this ...
Title: Re: [MANUAL] - adding online map providers
Post by: userloser on April 15, 2011, 16:41:43
Please! Thanks.
Title: Re: [MANUAL] - adding online map providers
Post by: femto on April 15, 2011, 17:04:52
Quote from: "menion"
ah sorry. you're correct. In my description are missing such a main information! I'll fix this ...

Sounds good!

And we should spread also the informations we find regarding the map providers!

For GClive, a Geocaching application, there is a wiki page (http://http://gc-livepedia.de/wiki/Map_servers) which lists some of the common URLs used by the map providers.
Title: Re: [MANUAL] - adding online map providers
Post by: femto on April 15, 2011, 17:07:36
Ah, yes, there should be also a GUI for adding a new map server.

Editing a text file is ok, but very userfriendly.
Title: Re: [MANUAL] - adding online map providers
Post by: menion on April 15, 2011, 19:02:45
OK I updated text in first post. Also working example with three layer osm maps is there. About GUI for this. I was thinking about it but result was that this is not necessary. Only at least little bit experienced user can add some new map. And for him, by me, doesn't matter if he edit this in app or in some external file
Title: Re: [MANUAL] - adding online map providers
Post by: userloser on April 15, 2011, 22:00:02
Thanks! I'll dab into it tomorrow. Damned providers. I agree, at the moment a UI isn't a big deal, uploading a file with ADB is a nobrainer. femto, thanks for the map URL tips.
Title: Re: [MANUAL] - adding online map providers
Post by: jusc on April 16, 2011, 16:28:27
I get the message wrong provider id. What is to do? Is there already a list for existing IDs?

J.
Title: Re: [MANUAL] - adding online map providers
Post by: menion on April 16, 2011, 17:05:31
hi, it only notify about some problem in provider definition. If these is something wrong, send me PM and I'll answer you what is wrong. Anyway all is clear enough? If you guys see problems in any step, say me and I'll explain it more carefully in first post ..
Title: Re: [MANUAL] - adding online map providers
Post by: tipichris on April 17, 2011, 22:13:19
So as I understand the placeholders {z}, {x} and {y} are available for constructing the URL in the XML file. But is it possible to construct 'quadkeys' used by Bing and such, as described here: http://msdn.microsoft.com/en-us/library/bb259689.aspx (http://msdn.microsoft.com/en-us/library/bb259689.aspx)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: golgot on April 18, 2011, 16:26:45
Stupid question 1 : does this trick allow to put back maps of version 1.5.1 ?
Stupid question 2 : Do we need to modify the xml file after each new release?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: marlar on April 18, 2011, 20:07:19
1 yes

2 no

See viewtopic.php?f=10&t=496&p=2455#p2451 (http://forum.asamm.cz/viewtopic.php?f=10&t=496&p=2455#p2451)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: Minjin on April 19, 2011, 21:24:19
Hi,

It seems your example works only with zoom 14 to 19 (in locus). Is that correct ?

Do you have more information about custom providers ?

I'm trying to create my own but it's not working yet.  :(

Thanks for the good job.

Locus pro 1.5.1
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: menion on April 19, 2011, 21:45:49
hmm I hope that posted example is fully working :) you should send me PM with your example and I'll look at it ;)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: userloser on April 20, 2011, 11:18:01
And, in other news, someone has posted several working examples of providers on the xda developers forum! Using them you can even run your own map server that work very well with 1.5.2. The examples are a great learning tool indeed ;)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 18.4.2011)
Post by: xxc on April 20, 2011, 16:27:21
Thanks for this great app !
Is it possible to display two layers, one background, the other with a defined opacity (or even better, a slider to change the opacity) ?
Vince
Title: Adding some korea map...
Post by: torayoko on April 21, 2011, 06:50:37
Hi menion. Could you offer some korea maps?
1. DAUM map (http://local.daum.net (http://local.daum.net))
2. NAVER map (http://map.naver.com (http://map.naver.com))

The biggest problem is that, these maps doesn't use wgs84 coordinate. it uses TM, KATEC coordinate.
but it seems like there is a solution.
http://code.google.com/r/swkim01-osmand/source/browse/ (http://code.google.com/r/swkim01-osmand/source/browse/)
This is OsmAnd Korea map sources. so you can consult this one.

Tile url : DataExtractionOSM/src/net/osmand/map/TileSourceManager.java
Coordinate transformation : DataExtactionOSM/src/net/osmand/osm/GeoPoint.java, GeoTrans.java, MapUtils.java(wgs84), DaumMapUtils.java(ㅇDAUM map-TM), NaverMapUtils.java(NAVER map-KATEC)

Of course, I got developer's consent to use this sources to put in LOCUS. I hope you consider this...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on April 21, 2011, 11:56:29
hmm very interesting, so this is the projection I cannot figure out. Thanks :)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: mickey_megabyte on April 22, 2011, 16:57:20
ok, i'm a noob when it comes to online maps, but i'm comfortable mucking around with xml files.

one of the online maps in oruxmaps is "streetview 1:10000 (UK)"

i am interested in adding this map source to my locus pro, but i don't know where to start!

is this possible to add this source to berkley's providers.xml, and please could somebody help me start.

thanks in advance.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: jt12345 on April 25, 2011, 01:42:03
Hi all.

First, thank you for this excellent android app - I think that it's the best mapping software available for my HTC phone.

I am trying to create a provider file for the multimap tile server. I have several example URLs such as:

http://mc2.tiles-cdn.multimap.com/ptile ... 1331/1.png (http://mc2.tiles-cdn.multimap.com/ptiles/map/mi917/14/031313/121331/1.png)
http://mc1.multimap.com/ptiles/map/mi90 ... 31/311.png (http://mc1.multimap.com/ptiles/map/mi902/16/031313/131331/311.png)
http://mc1.tiles-cdn.multimap.com/ptile ... 00/100.png (http://mc1.tiles-cdn.multimap.com/ptiles/map/mi932/16/031313/100100/100.png)

but I'm not yet sure exactly how these URLs are constructed. I do, however, have some example java code which can do the contruction here (it's in the MultimapCom class): http://kenai.com/projects/bgct/lists/co ... message/11 (http://kenai.com/projects/bgct/lists/commits/archive/2010-04/message/11)

Is there anyone who could give me a suggestion as to what I need to add to my providers.xml file to get the tiles appearing in Locus?

Thank you in advance for any help you can offer.

Jaime
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: tipichris on April 25, 2011, 21:54:32
Jaime

The URLs you give look like they contain 'quadkeys', as in Locus type 5, but split up into a directory structure. There may be alternative URLs, eg

http://ecn.t0.tiles.virtualearth.net/ti ... ctSet=mmCB (http://ecn.t0.tiles.virtualearth.net/tiles/r031313131331311.png?g=677&productSet=mmCB)
http://ecn.t0.tiles.virtualearth.net/ti ... ctSet=mmOS (http://ecn.t0.tiles.virtualearth.net/tiles/r031313100100100.png?g=677&productSet=mmOS)

Using type 5 these can be constructed something like
Code: [Select]
http://ecn.t0.tiles.virtualearth.net/tiles/r{c}.png?g=677&productSet=mmOS
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: tipichris on April 25, 2011, 21:56:32
Hi Menion

Is there any way to tell Locus not to cache tiles, or to cache for only a limited period? For example, I would like to try adding some traffic information, but obviously this changes quickly so I would need to disable, or limit, caching.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: tipichris on April 25, 2011, 22:52:02
Quote from: "mickey_megabyte"
one of the online maps in oruxmaps is "streetview 1:10000 (UK)"

That's interesting. These appear to be the Ordnance Survey Street View mapping. This is published under the OS Open Licence, which is aligned with the Creative Commons Attribution licence. So in licencing terms it should be possible for Locus to include this in its distribution, with some attribution. The tiles have been reprojected to suit the Open Street Map system and are available at http://os.openstreetmap.org/ (http://os.openstreetmap.org/). A suitable stanza for providers.xml seems to be

Code: [Select]
<provider id="10200" type="0" visible="true" required="true" background="-1">
<name>OS Street View</name>
<mode>Classic</mode>
<url><![CDATA[http://a.os.openstreetmap.org/sv/{z}/{x}/{y}.png]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>14</zoomMin>
<zoomMax>25</zoomMax>
<tileSize>256</tileSize>
  <extraHeader>Referer#http://os.openstreetmap.org/</extraHeader>
</provider>
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: mickey_megabyte on April 29, 2011, 16:46:35
wow - thanks a lot tipichris - that worked a treat!   :D sorry i've been away for a few days and not had chance to visit here recently.

yes, they are very highly detailed uk maps - they even show a little island in a pond in my garden that is just about big enough for two people to stand on  :)

i happened to be in a fire engine the other day and noticed they were using this map on their fancy gps system (with extra overlays for hydrants and other firey things).

good to know that they are under the OS open licence too!

maybe menion would consider adding this source to locus in the future?

once again, thanks for your help tipichris - much much appreciated.  8-)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: petepewter on May 05, 2011, 02:48:38
Excellent thanks tipichris.
Looking at the OS website, http://http://www.ordnancesurvey.co.uk/oswebsite/products/os-opendata.html , they have also included many other map types, including the 1:50 000 series. Are there variations on the xml above that will give access to the other types? I downloaded an OS map demo someone had made, but it wasn't a patch on Locus, except it has the OS map. But as you zoomed out from the Open Street map, it swaps to the 1:50 000 series. At the same time, my mate downloaded an OS map for the iPad, with offline storage and 3D views. Very nice.

Thanks for a great app as well menion.

I was going to report some large gaps in the locus version of the open street map, but I've just spotted they are present on OS website version as well, so not a problem with the provider file.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: tipichris on May 05, 2011, 09:53:53
The opendata 1:50,000 mapping is not the OS Landranger maps that we all know and love. I'm also not aware of it having been reprojected in a way that is usable by Locus, unlike the Streetview data (but see here (http://http://www.free-map.org.uk/expts/vmdlfp200/) for a demo of using the data).

Locus used to include OS Landranger and Explorer maps but had to withdraw them because of copyright issues. You may find an addon in the market that puts these maps back. Just to look at with your browser, you can find these map series on Bing maps.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 14, 2011, 00:12:43
i set up my own tile server with osm data and file strkture

Code: [Select]
http://xxx.xxx.xxx.xxx/tiles/1/1/0.png
my providers.xml looks like this:
Code: [Select]
   <?xml version="1.0"?>
    <providers>
       <provider id="1500" type="0" visible="false" required="true" background="-1">
          <name>sebbo</name>
          <mode>background</mode>
          <area>World</area>
          <url><![CDATA[http://xxxxxxxxx/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
       <provider id="1501" type="0" visible="false" required="false" background="1000">
          <name>sebbo</name>
          <mode>contours</mode>
          <area>World</area>
          <url><![CDATA[http://xxxxxxxxxx/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
       <provider id="1502" type="0" visible="true" required="false" background="1001">
          <name>sebbo</name>
          <mode>OpenPiste</mode>
          <area>World</area>
          <url><![CDATA[http://xxxxxxxxxxxxxxxx/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
    </providers>


but when opening locus and browsing the online maps, it doesnt appear!?

any ideas
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on May 14, 2011, 07:42:20
I see wrong background Id in your definition. There should be id of layer you want to use, so 1500 and 1501. If you have then still problem, write me PM with specific values...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 14, 2011, 10:03:24
im not allowed to send pm :(

so here the details:
Code: [Select]
http://217.92.52.58/tiles/
providers.xml looks like this now and still not working
Code: [Select]
   <?xml version="1.0"?>
    <providers>
       <provider id="1500" type="0" visible="false" required="true" background="1500">
          <name>sebbo</name>
          <mode>background</mode>
          <area>World</area>
          <url><![CDATA[http://217.92.52.58/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
       <provider id="1501" type="0" visible="false" required="false" background="1501">
          <name>sebbo</name>
          <mode>contours</mode>
          <area>World</area>
          <url><![CDATA[http://217.92.52.58/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
       <provider id="1502" type="0" visible="true" required="false" background="1502">
          <name>sebbo</name>
          <mode>OpenPiste</mode>
          <area>World</area>
          <url><![CDATA[http://217.92.52.58/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>
    </providers>
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on May 14, 2011, 12:52:12
i'm just going out so please try this ...

<provider id="1501" type="0" visible="false" required="false" background="1500">

- use 1500 as background ID if you want to layer with id 1500 be background layer for layer with id 1501. Or I just suggest you to use only one layer without background for testing.

So try for example only this
Code: [Select]
      <provider id="1502" type="0" visible="true">
          <name>sebbo</name>
          <mode>OpenPiste</mode>
          <area>World</area>
          <url><![CDATA[http://217.92.52.58/tiles/{c}.png]]></url>
          <cooPart><![CDATA[{z}/{x}/{y}]]></cooPart>
          <zoomPart>{z}-8</zoomPart>
          <zoomMin>8</zoomMin>
          <zoomMax>24</zoomMax>
          <tileSize>256</tileSize>
          <extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
       </provider>

"required" is deprecated and "background" is not required ... this should be working fine. If not, I'll look at it tomorrow ...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 15, 2011, 14:54:40
looks like working now.
but also looks like is did something wrong on generating my tiles
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 17, 2011, 19:00:07
alright. as my tileserver is working now there is another problem YOU need to fix.

the f*cking  download limit! :D

because its my own server, it doesnt need a limitation.
PLEASE remove the limitation somehow. maybe by adding the ip to a whitelist. or by adding private ip ranges to a whitelist
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on May 18, 2011, 06:57:25
ehh ... you're correct. This is very nice issue indeed ... hell

It's a little problem, how to solve it? hmm ... whitelist is nice but have to be coded into application ... damm
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 18, 2011, 07:59:15
hope you can find a solution somehow.
else you could send me an older version of locus without the limitation.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: Hirves on May 20, 2011, 11:09:27
Hi

First, thanks for this app.

Is it possible to exclude zoom levels in the middle of range? For example, there is no map in zoom level 20, but 19 and 21 appear.

I have topographic map but only in 3 zoom levels(levels 24-22). Is it possible to mix road map to missing zoom levels(21-12)?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 26, 2011, 19:39:36
any news on disabling download limit for private servers?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on May 29, 2011, 10:25:55
seboo, I'm trying to find any simple solution but I have no idea .. what about you?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: InfX on May 29, 2011, 22:50:46
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).

Any hints ?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: marlar on May 29, 2011, 23:00:48
Quote from: "menion"
seboo, I'm trying to find any simple solution but I have no idea .. what about you?

You could disable download limitations based on a server response. If a person hosts his own tile server, he should be able to send a customized http response header. Something like: Disable-Tile-Limitations: True.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on May 31, 2011, 06:55:17
hmm nice idea! seboo is this possible for you?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on May 31, 2011, 12:39:38
should be possible somehow. never changed a header on a apache server before but ill try to find a howto
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: InfX on May 31, 2011, 12:50:07
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 (http://http://httpd.apache.org/docs/2.0/mod/mod_headers.html). Never tested it myself though  ;)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: marlar on May 31, 2011, 12:51:54
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.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: marder on June 01, 2011, 07:35:34
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.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: sebbo on June 01, 2011, 14:20:31
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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on June 01, 2011, 14:24:09
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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: InfX on June 03, 2011, 14:27:03
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:
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on June 03, 2011, 15:10:07
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 :) )
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: Minjin on June 15, 2011, 14:24:42
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 ?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: mague on June 19, 2011, 22:44:48
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

Code: [Select]
         <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.

Code: [Select]
         <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 ?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on June 20, 2011, 06:27:31
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

Code: [Select]
<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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: mague on June 20, 2011, 10:00:26
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

Code: [Select]
<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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: menion on June 20, 2011, 10:16:05
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.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: pez3 on June 25, 2011, 10:52:29
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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: Rob on June 27, 2011, 16:47:26
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
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: pez3 on June 27, 2011, 22:43:08
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:

Code: [Select]
<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>
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: Rob on June 28, 2011, 11:14:59
Hi Peter,
thx much - the xml Code works great !
It´s really a pitty, that higher zooms are "not existing", because my missing tiles of already dowloaded areas are just in these zoom factors.
But - let´s hope for menions ideas.

kind regards
Rob
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: axelpix on July 08, 2011, 09:41:17
Probably a workaround for Bergfex.

The X regions are quite large. So it might be worth the work to make separate maps for the regions. Zoom Level 14 goes from X=86 (Liechtenstein) to X=89 (Bratislava). Zoom 15 from 172 to 179.
Here's an example for one region for each zoom level:
Code: [Select]
<!-- BergFex Austria (id 70) -->
<provider id="10070" type="0" visible="true" background="-1">
<name>Bergfex</name>
<mode>Topo</mode>
<area>Oesterreich</area>
<url><![CDATA[http://static5.bergfex.at/images/amap/{z}/{z}_{x}_{y}.png]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>16</zoomMin>
<zoomMax>21</zoomMax>
<tileSize>256</tileSize>
</provider>
        <!-- for Zoom 14 adjust between 86 and 89-->
<provider id="10071" type="0" visible="true" background="-1">
<name>Bergfex</name>
<mode>Topo 14_1</mode>
<area>Oesterreich</area>
<url><![CDATA[http://static5.bergfex.at/images/amap/{z}/87/{z}_{x}_{y}.png]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>22</zoomMin>
<zoomMax>22</zoomMax>
<tileSize>256</tileSize>
</provider>
        <!-- for Zoom 15 adjust between 172 and 179-->
<provider id="10072" type="0" visible="true" background="-1">
<name>Bergfex</name>
<mode>Topo 15_1</mode>
<area>Oesterreich</area>
<url><![CDATA[http://static5.bergfex.at/images/amap/{z}/174/{z}_{x}_{y}.png]]></url>
<zoomPart>{z}-8</zoomPart>
<zoomMin>23</zoomMin>
<zoomMax>23</zoomMax>
<tileSize>256</tileSize>
</provider>

And once cached, it does no harm to cached tiles when you modify the X folder in providers.xml. This way you can collect combined areas in your tile cache.

Grüße aus Dresden nach Österreich! Ich komme bald mal wieder.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: pez3 on July 08, 2011, 11:13:35
thanks axelpix...
your solution is workin fine... unfortunately a little bit copious... but far better than nothing...
maybe menion is able to provide a better solution sometime.

thank you four your help
regards peter
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: fuhur on August 15, 2011, 20:39:59
Hi,
I have map source which gives .jpg instead .png tiles.
Could I add it, or it is not possible ?
Regards
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: nomo on August 16, 2011, 09:37:46
Hello,

i just searched the forum how to add google as provider in locus, thats how i came to this thread.
Just wondered if someone can share his provider.xml info for adding google terrain maps.
Thx in advance !


EDIT: just fount the map addon which adds all the maps by just one click, thats it !!
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Dominique on September 28, 2011, 13:48:14
Finally i'm the  owner of Locus Pro and  feel really happy!! thanks for the work :D
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: gkovacsp on October 04, 2011, 18:20:50
I am trying to create a provider xml for the following map:

http://turaterkep.hostcity.hu (http://turaterkep.hostcity.hu)

Its png url is: http://turaterkep.hostcity.hu/srtm/9/140/90.png (http://turaterkep.hostcity.hu/srtm/9/140/90.png)


Code: [Select]
<provider id="2222" type="0" visible="true" background="-1">
  <name>Turaterkep</name>
  <mode>Turaterkep</mode>
  <area>Hungary</area>
  <url><![CDATA[http://turaterkep.hostcity.hu/srtm/{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>

The problem is I got an "Unknown error" after "Loading..." in the place of the tiles... Can someone help me what is the problem?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: miro666 on October 05, 2011, 08:42:47
Menion , please, can You prepare this maps site for me (Im buyer Pro version):

http://http://preglednik.arkod.hr/ARKOD-Web/#layers=DOF,ZU,KO,DKP,LPIS_200,LPIS_210,LPIS_310,LPIS_320,LPIS_410,LPIS_421,LPIS_422,LPIS_423,LPIS_424,LPIS_490,LPIS_900&map_x=673220.75&map_y=5049090.75&map_sc=1785

It is importantest maps site for my job, and free time.
I cannt see on browsers no one (only left side where is layers for choose).

Please, i will donate for some beers for that  :)

Thanks

Regards
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 05, 2011, 08:57:24
these maps are in some location map projection (together with specific url to tiles) so this is not possible to simply add to Locus. Question is also terms of use of this map. If they offer WMS server, that's best way how to add special maps
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: gkovacsp on October 06, 2011, 13:48:13
I've contacted the owner of the website (http://turaterkep.hostcity.hu (http://turaterkep.hostcity.hu))   and he sent me the following xml, which should work in Locus with his site:

Code: [Select]
<providers>
   <provider id="1000" type="0" visible="true" required="true" background="-1">
      <name>Turaterkep</name>
      <mode>Turaterkep</mode>
      <area>World</area>
      <url><![CDATA[http://turaterkep.hostcity.hu/tiles/{z}/{x}/{y}.png]]></url>
      <zoomPart>{z}-8</zoomPart>
      <zoomMin>8</zoomMin>
      <zoomMax>16</zoomMax>
      <tileSize>512</tileSize>
      <extraHeader>Referer#http://turaterkep.hostcity.hu/</extraHeader>
   </provider>
</providers>

If I open a tile manually (eg. http://turaterkep.hostcity.hu/tiles/9/140/90.png (http://turaterkep.hostcity.hu/tiles/9/140/90.png)) I actually get the image.
If I add this xml to Locus I'll be able to select the map, but after the "Loading..." phase I get an "Unknown problem".

Can you help me what is the problem with the file?

The website's owner is also willing to help to ease the life of Hungarian Android users so any suggestions would be welcomed.

Thanks for your help.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 06, 2011, 16:58:33
thanks, map is now working (there was one small issue in locus because of atypical size of tiles). May you send me contact to owner? I need some answers from him before I'll add these maps into Locus
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: gkovacsp on October 06, 2011, 20:42:08
His name is Peter Busai and his email address is peter.busai(at)gmail.com.

He speaks english and is looking forward your mail.

Regards,

Gabor
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 07, 2011, 10:41:00
thanks, owner contacted, maps will be added ...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: gkovacsp on October 07, 2011, 11:00:18
Great!

Any timeframe for the program update? A "survival" tour starts in 20 days...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 07, 2011, 11:19:41
two, three days max ;)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: dramroo on October 07, 2011, 13:16:52
thank you for your great app..
But how to add google maps to my online maps ???
thanks
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 07, 2011, 13:22:39
you're welcome

google maps aren't allowed due to their strict terms of use
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: dramroo on October 07, 2011, 14:28:08
thanks for reply,,
but is there any other satellite map other than Google maps gives me high level of zoom??
I tried the one available in locus it has poor resolution and zoom is not enough,,,
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 07, 2011, 14:31:37
there are two satellite maps as I know. ArcGIS (not quite good at least in central Europe) and MapQuest ... and these are at least in Prague, very nice. So check it. Also maybe someone may help you personally with Google maps issue ...
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: dramroo on October 07, 2011, 15:09:22
thanks but I need it for Saudi Arabia :)
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: gkovacsp on October 10, 2011, 13:55:27
Quote from: "menion"
two, three days max ;)

I've just downloaded it and the map is beautiful...

Just for curiosity, can you post me the provider XML file to learn from it?

Thanks a lot,
Gabor
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on October 10, 2011, 14:13:27
fine :) ... I'm using some private server that is not currently on public I think, anyway XML you published here

viewtopic.php?f=21&t=45&start=60#p6832 (http://forum.asamm.cz/viewtopic.php?f=21&t=45&start=60#p6832)

if correct. There was problem with 512x512 tile size. All other maps usually use 256x256 tiles. Anyway this is fixed now and this definition should also work
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: DocSeppi on November 01, 2011, 21:32:03
Quote from: "axelpix"
Probably a workaround for Bergfex.



THANK YOU SO MUCH Axelpix for this great workaround for this wonderful maps!!! I will enjoy a lot hiking around using
it. Thank you!
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 20.4.2011)
Post by: anderegg on November 25, 2011, 14:29:51
Quote from: "sebbo"
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

Hey Sebbo

I would be really interested in to you tutorial to get the maps from geo.admin
Can you send this manual to me?

Cu

Anderegg
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: brotbuexe on May 01, 2012, 12:55:26
would be nice to have a "valid for" attribute for providers to set a default value for the option you can set in the map manager.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: berkley on May 01, 2012, 13:07:58
You mean that there should be a value in there by default?
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: brotbuexe on May 01, 2012, 18:51:52
I think it would be only nice for the weather forecast overlay. For other maps it is no use.
it would be silly to make a attribute for 4-5 maps noone would use...
They can set the valid value in the map manager...
Title: About adding custom online map not using WGS84 Datumn
Post by: beonun on December 22, 2012, 08:01:25
Quote from: "torayoko"
Hi menion. Could you offer some korea maps?
1. DAUM map (http://local.daum.net (http://local.daum.net))
2. NAVER map (http://map.naver.com (http://map.naver.com))

The biggest problem is that, these maps doesn't use wgs84 coordinate. it uses TM, KATEC coordinate.
but it seems like there is a solution.
http://code.google.com/r/swkim01-osmand/source/browse/ (http://code.google.com/r/swkim01-osmand/source/browse/)
This is OsmAnd Korea map sources. so you can consult this one.

Tile url : DataExtractionOSM/src/net/osmand/map/TileSourceManager.java
Coordinate transformation : DataExtactionOSM/src/net/osmand/osm/GeoPoint.java, GeoTrans.java, MapUtils.java(wgs84), DaumMapUtils.java(ㅇDAUM map-TM), NaverMapUtils.java(NAVER map-KATEC)

Of course, I got developer's consent to use this sources to put in LOCUS. I hope you consider this...

menion !
Have u considered about the above ?

I also want to add the above online map(Daum, Naver)
I really want to read your comment about this.

Have a happy X-mas!
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Kay Cichini on April 27, 2014, 12:15:48
I cant get this provider to work. Tiles come from my privat webhoster.

EDIT: I see the map in 'online maps' list properly, but the view tells me 'Kartenbereich nicht verfügbar' (German for 'Maparea not available')..

Anyone who can help out?

Thanks!

<provider id="20000" type="0" visible="true">
     <name>SomeName</name>
     <mode>SomeMode</mode>
     <url><![CDATA[http://gimoya.bplaced.net/TileServer/TestTiles/TEST/{z}/{x}/{y}.png]]></url>
     <zoomPart>{z}-8</zoomPart>
     <zoomMin>8</zoomMin>
     <zoomMax>12</zoomMax>
     <tileSize>256</tileSize>    
<extraHeader>Referer#http://locus.asamm.cz/</extraHeader>
</provider>

Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on April 27, 2014, 12:46:55
Hi Kay,

problem is
- you do not see you map in list of maps?
- you see it and can't select?
- you can select but map is not visible? In this case, what you see on map as an error text?

Anyway I think problem should be with zoom levels. ZoomMin 8 means whole world (it comes from size of map tiles, where  2^8 = 256px)

Your zoom level 8 (directory 8 on server) is computed by "zoomPart, where for zoom 16 (whole map size 2^16) is used (16 - 8 = 8) directory 8. So try to change max zoom level to for example 20 and check if you in level 16 see your map

Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Kay Cichini on April 27, 2014, 16:22:22
Thanks Menion - I edited the original posting.

I see the provider in the list of online maps and it is selectable..
I tried to change zoom level, too - but map still shows error '..not available'
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on April 27, 2014, 17:46:01
I'm testing it and for me it works.  I've rather attached XML file with screenshot.

You may see on screenshot coordinates, that it's somewhere in the north Canada, is it correct?

Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Luis Z on April 27, 2014, 21:02:34
Perfect:-)  got it finally!
Many Thanks for your instant help!
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Arielg on February 01, 2015, 22:33:59
Hi,

I am trying to create a custom map using the following XML:
<?xml version="1.0" encoding="UTF-8"?>
<providers>
<!-- IsraelHikingMap -->
    <provider id=“20000” type="0" visible=“true” background="-1">
        <name>Israel Hiking Map</name>
        <mode>Hiking trails</mode>
        <countries>Israel</countries>
        <url><![CDATA[http://osm.org.il/IsraelHiking/Tiles/{z}/{x}/{y}.png]]></url>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>7</zoomMin>
        <zoomMax>16</zoomMax>
        <tileSize>256</tileSize>
        <attribution></attribution>
        <extraHeader></extraHeader>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
    </provider>
</providers>


For some reason, it's not showing in the maps section..

Any help would be appreciated.

Thanks!
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on February 02, 2015, 01:43:22
Hello Airleg,

isn't there already (maybe in any other XML file you already use for adding online maps) any other map with same ID? Check for already used  id=“20000” value.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: Arielg on February 02, 2015, 16:37:35
Thanks Menion.
I checked again my XML and some of the quotes in the XML were weird, replacing them with standard quotes worked!
this is the XML I am now using:
<?xml version="1.0" encoding="UTF-8"?>
<providers>
<provider id="20000" type="0" visible="true" background="-1">
        <name>Israel Hiking Map</name>
        <mode>Hiking trails</mode>
        <countries>Israel</countries>
        <url><![CDATA[http://osm.org.il/IsraelHiking/Tiles/{z}/{x}/{y}.png]]></url>
        <zoomPart>{z}-8</zoomPart>
        <zoomMin>15</zoomMin>
        <zoomMax>24</zoomMax>
        <tileSize>256</tileSize>
        <attribution></attribution>
        <extraHeader></extraHeader>
        <extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1]]></extraHeader>
    </provider>
</providers>

The only problem now is I can't get my head around the combination of zoomPart, zoomMin and zoomMax.

This is a map based on OpenStreetMap and seems to adhere to the same zoom level.. As this is a regional map, the tiles zoom ranges are 7-16, but when I input these vales into the min/max field it does not work.. when I add +8 (15-24) it does, but the zoom is not restricted to these levels.. you can zoom both further out and further in..

thanks.
Title: Re: [MANUAL] - CUSTOM ONLINE MAPS (updated 25.7.2011)
Post by: menion on February 02, 2015, 20:50:23
zoom values 15-24 should be valid values. may you describe what exactly is a problem? Locus allows you to zoom beyond these limits?