OruxMaps

Uncategorized Boards => MAPAS/MAPS => Topic started by: Aldo on December 02, 2019, 11:45:57 AM

Title: WMS maps and wms_services.xml
Post by: Aldo on December 02, 2019, 11:45:57 AM
Good morning,
I have a problem creating maps with the xml_services.xml file

I inserted this map in the xml_services.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<wms_services>
<wms>
   <name>CTR Lombardia (IT)</name>
   <uid>1129</uid><!--unique identifier in your database cache; >1000 -->
   <desc>Lombardia Carta Tecnica Regionale 1:10.000</desc>
   <url><![CDATA[http://www.cartografia.servizirl.it/arcgis2/services/BaseMap/CTR_DBT/MapServer/WMSServer?]]></url>
   <minzoomlevel>6</minzoomlevel><!-- 0 to 20 -->
   <maxzoomlevel>20</maxzoomlevel><!-- 0 to 20 -->
   <version>1.1.1</version><!-- do not change -->
   <layers>0</layers>
   <coordinatesystem>EPSG:4326</coordinatesystem><!-- do not change -->
   <format>image/png</format>
   <cache>1</cache><!-- not in use -->
</wms>
</wms_services>

I copied the xml_services.xml file into the mapfile directory of oruxmaps,
I updated the maps,
I see the new map file in the list, but it is not displayed.

If instead I insert the data manually in OruxMaps I visualize the map correctly.
Title: Re: WMS maps and wms_services.xml
Post by: Aldo on December 11, 2019, 04:24:08 PM
Can someone help me?
Thanks!
Title: Re: WMS maps and wms_services.xml
Post by: orux on December 13, 2019, 09:53:18 AM
Quote from: Aldo on December 11, 2019, 04:24:08 PM
Can someone help me?
Thanks!
Hello!
That WMS does not work without the styles attribute; if you add it to the url it will work:

Quote<wms>
   <name>CTR Lombardia (IT)</name>
   <uid>1129</uid><!--unique identifier in your database cache; >1000 -->
   <desc>Lombardia Carta Tecnica Regionale 1:10.000</desc>
   <url><![CDATA[http://www.cartografia.servizirl.it/arcgis2/services/BaseMap/CTR_DBT/MapServer/WMSServer?styles=&]]></url>
   <minzoomlevel>6</minzoomlevel><!-- 0 to 20 -->
   <maxzoomlevel>20</maxzoomlevel><!-- 0 to 20 -->
   <version>1.1.1</version><!-- do not change -->
   <layers>0</layers>
   <coordinatesystem>EPSG:4326</coordinatesystem><!-- do not change -->
   <format>image/png</format>
   <cache>1</cache><!-- not in use -->
</wms>

orux
Title: Re: WMS maps and wms_services.xml
Post by: Aldo on December 13, 2019, 10:27:22 AM
Thanks Orux for solving the problem,
but how do I know that the styles attribute should be added?
Title: Re: WMS maps and wms_services.xml
Post by: orux on December 14, 2019, 04:10:40 PM
Quote from: Aldo on December 13, 2019, 10:27:22 AM
Thanks Orux for solving the problem,
but how do I know that the styles attribute should be added?
You can see the capabilities:

http://www.cartografia.servizirl.it/arcgis2/services/BaseMap/CTR_DBT/MapServer/WMSServer?service=wms&request=getcapabilities (http://www.cartografia.servizirl.it/arcgis2/services/BaseMap/CTR_DBT/MapServer/WMSServer?service=wms&request=getcapabilities)

I have rarely seen maps that accept styles; The usual is a single default style, like this.


orux
Title: Re: WMS maps and wms_services.xml
Post by: Aldo on December 18, 2019, 05:54:15 PM
Thanks again Orux!
Can I ask you another favor?
You can check why if I create a WMS map from the link below, the map is loaded but not visible?

http://geoservizi.regione.liguria.it/geoserver/M1407/ows?service=WMS&
Title: Re: WMS maps and wms_services.xml
Post by: orux on December 19, 2019, 10:05:17 AM
Quote from: Aldo on December 18, 2019, 05:54:15 PM
Thanks again Orux!
Can I ask you another favor?
You can check why if I create a WMS map from the link below, the map is loaded but not visible?

http://geoservizi.regione.liguria.it/geoserver/M1407/ows?service=WMS& (http://geoservizi.regione.liguria.it/geoserver/M1407/ows?service=WMS&)
I don't know, but if I test it in another wms viewer I only see white tiles.


orux
Title: Re: WMS maps and wms_services.xml
Post by: Aldo on December 19, 2019, 10:19:03 PM
I did some tests and discovered that the map is only displayed with zoom levels 16 and 17.
Can you explain the reason to me?