This object is in archive! 

Custom online map, how to flip y-coordinate?

haibin Song shared this question 3 years ago
Answered

I want to add a custom online map , but the y-coordinate is unusual。

As the attachment shows,the actual location is in China,but the location shown is in Antarctica;

my code is:

<provider id="6016" type="0" visible="true" background="-1">

<name>XXX</name>

<mode>TDT</mode>

<url><![CDATA[http://www.scgis.net.cn/imap/imapserver/defaultrest/services/newtianditudom/wmts?token=1cJkGJ7B56D0wREnC4v3i9fmfhHdRGEQGgtj3RjTC9uqhNP5UAm0sEGZjL7D0XnZ&layer=defaultlLayer&style=default&tilematrixset=GetTileMatrix&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={z}&TileCol={x}&TileRow={y}]]></url>;

<zoomPart>{z}-8</zoomPart>

<zoomMin>9</zoomMin>

<zoomMax>28</zoomMax>

<tileSize>256</tileSize>

<attribution><![CDATA[TDT]]></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://www.scgis.net:8282/map_his/]]></extraHeader>;

</provider>


Is there a way to fix this problem?

Replies (1)

photo
1

Hello,

it looks like you try to add WMTS based map as a common online map.

You do not write what app version are you using, but Locus Map 4 already supports WMTS map servers. Did you tried to use this map directly as a WMTS map in the Locus Map 4?

I've tried to test it if Locus Map 4 feature really works, but the server reports an invalid/outdated token to me, so you will have to try it on your own.

Let me know if there is something more I may help with.

With regards,

Jiří M. aka Menion

photo
1

Thanks for your reply so soon.

My App version is Locus map 4;

Yes, I can use WMTS map directly;

However,in that way, I can not download tile data for offline use。

I guess the reason for the problem is projection mode;Found after testing in other software,If I change the projection mode to Mercator,the map can be displayed correctly。

I read your user manual,It seems that Locus does not provide similar features?

photo
1

Hmm, this system for custom online maps was made mainly for so-called "Slippy map" format, so common Mercator projection used by OpenStreetMap or any other general online maps.

Maybe check our manual for this topic, mainly "type" value. Give a try another option, maybe it will work (and always clear a cache in mapsOnline directory before).

Hope this helps. Otherwise, I'm sorry, but the correct use-case is really the WMTS feature. Thanks for understanding.

Menion

Replies have been locked on this page!