OkMap forum
OkMap forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 OkMap Forum - English
 Use of the software
 WTMS map server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

VVouter

Belgium
18 Posts

Posted - 05/01/2015 :  22:25:30  Show Profile  Reply with Quote
Hello,

I am trying to load tiles from a WTMS map server but get a script error in okmap. I am not familiar with OpenLayers so I am searching in the dark. Maybe somebody could help me out?

Details of the map service can be found here:

http://www.ngi.be/cartoweb/1.0.0/WMTSCapabilities.xml

I tried with the following xml code and some variationd without luck:

<mapsServer>
<name>NGI1</name>
<code><![CDATA[new OpenLayers.Layer.WTMS({name: "NGI1", requestEncoding: "REST", url: "http://www.ngi.be/cartoweb/1.0.0/topo/default/3812/${z}/${y}/${x}.png", format: "image/png", layer: "topo", style: "default", matrixSet: "3812" });]]></code>
<baseLayer>true</baseLayer>
<covered>Belgium</covered>
<active>true</active>
<default>false</default>
</mapsServer>

Thanks,

Wouter

okmap

Italy
2566 Posts

Posted - 06/01/2015 :  11:05:40  Show Profile  Visit okmap's Homepage  Reply with Quote
Try this:

<mapsServer>
<name>NGI1</name>
<code><![CDATA[new OpenLayers.Layer.XYZ("NGI1", "http://www.ngi.be/cartoweb/1.0.0/topo/default/3812/${z}/${y}/${x}.png", {format: "image/png", layer: "topo", style: "default", matrixSet: "3812" });]]></code>
<baseLayer>true</baseLayer>
<covered>Belgium</covered>
<active>true</active>
</mapsServer>

Remember max zoom = 7
Go to Top of Page

VVouter

Belgium
18 Posts

Posted - 06/01/2015 :  23:13:56  Show Profile  Reply with Quote
Thanks for helping.

Your proposal gives the tile images but the calibration is lost. I supposed that the calibration would stay intact by using the WTMS service.

Why does your proposal not work for zoom levels > 7?

Wouter
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 07/01/2015 :  09:33:28  Show Profile  Visit okmap's Homepage  Reply with Quote
Try to remove ', matrixSet: "3812"' or change "3812" (Belgian Lambert 2008) with "4326" (Plate Carrée).
Maximum zoom depends on server (number of layers stored).
Go to Top of Page

VVouter

Belgium
18 Posts

Posted - 12/01/2015 :  09:25:36  Show Profile  Reply with Quote
Hello,

I played with the matrixset tag but it does not help. the main problem is that the server does not follow the OSM tiling scheme.

The server does support more than 7 zoomlevels, 11 in fact. With Mobac, I can download tiles for all zoomlevels with a simple OSM scheme if I specify a mapsource xml per zoomlevel. However, I have to use the panning function in Mobac to find my area of interest because also in Mobac calibration is wrong(no WMTS support in Mobac).

Since okmap does not have a panning function, it is nearly impossible to dowload the correct tiles from such a map server. For the larger zoomlevels there are a lot of blank tiles around the country borders so that due to the wrong calibration you often get a fully blank map.

Can you confirm if it is possible or not to use the WTMS service within okmap? If I understand correctly, okmap uses an external library (openlayers) to communicate with the map server. Since openlayers supports WTMS, does this mean that it would also be automatically available in okmap or is this a too simplistic reasoning?

Regards,

Wouter

Go to Top of Page

okmap

Italy
2566 Posts

Posted - 12/01/2015 :  09:45:01  Show Profile  Visit okmap's Homepage  Reply with Quote
OkMap has a panning function. Move the mouse with the left button pressed.
OkMap uses OpenLayers so if OpenLayers supports WTMS, OkMap also.
Try to change .XYZ with .WTMS.
Go to Top of Page

VVouter

Belgium
18 Posts

Posted - 26/01/2015 :  21:52:04  Show Profile  Reply with Quote
I think it could be possible to access a WTMS server but I need to study openlayers more in detail. It seems it needs changes in the TemplateMapsServer.htm file to accomodate the different projection.

Using "new OpenLayers.Layer.XYZ" is also not sufficient since the server provides 4 populated tiles at zoomlevel 0, 16 tiles at zoom level 1, and so on. In Mobac I can circumvent this by hard coding a different zoom level in the url. In OKMap this is not possible.

My current approach is to download the tiles in mobac and perform a calibration in Okmap. I will open a different forum topic for that.

Regards,

Wouter
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 27/01/2015 :  09:45:13  Show Profile  Visit okmap's Homepage  Reply with Quote
Please tell me known the implementations you need in template so I can introduce them in the next release.
Go to Top of Page

ts30

Austria
1 Posts

Posted - 09/04/2015 :  14:17:21  Show Profile  Visit ts30's Homepage  Reply with Quote
quote:
Originally posted by okmap

OkMap has a panning function. Move the mouse with the left button pressed.
OkMap uses OpenLayers so if OpenLayers supports WTMS, OkMap also.
Try to change .XYZ with .WTMS.



OkMap, could you tell us a little bit more about panning function and OpenLayers. Thank you.
Go to Top of Page

okmap

Italy
2566 Posts

Posted - 09/04/2015 :  18:03:48  Show Profile  Visit okmap's Homepage  Reply with Quote
For Openlayers please see http://openlayers.org/en/v3.4.0/apidoc/
Panning is a way to move map with mouse in Map server function.
It's enough to press the left mouse button and move the mouse.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
OkMap forum © 2018 OkMap Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07