WMS maps and wms_services.xml

Started by Aldo, December 02, 2019, 11:45:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aldo

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.

Aldo


orux

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

Aldo

Thanks Orux for solving the problem,
but how do I know that the styles attribute should be added?

orux

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

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


orux

Aldo

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&;

orux

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&
I don't know, but if I test it in another wms viewer I only see white tiles.


orux

Aldo

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?