cannot add WMS map
Brought to you by:
r_x
Hello,
I tried to add a custom WMS map,
URL: "http://opengis.unibuc.ro:8080/geoserver/ows?service=wms&version=1.1.1&request=GetCapabilities"
When starting MOBAC there is an error when parsing the xml file "The reference to entity version must end with the ';' delimiter"
Probably this is related to <version> section and word "version" in URL.
If I remove everything in URL after the ? mark then there is no error but map is not loading.</version>
Can we do something about this?
This map is the most detailed topo map for Romania and many would use it.
Thank you very much for the wonderful app MOBAC!
Catalin, Romania
The ampersand '&' is a special character in XML files. You can not directly use it. Encode it as & or wrap it inside a <![CDATA[ ]]> element:
<url><![CDATA[http://opengis.unibuc.ro:8080/geoserver/ows?service=wms&version=1.1.1&request=GetCapabilities]]></url>
But even by doing so your WMS map source will not work because you are using the wrong URL. MOBAC is not a WMS browser - it can not handle the GetCapabilities response. You have to capture the real tile urls and set the MOBAC url accordingly.
I found the real URL:
http://opengis.unibuc.ro:8080/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&SERVICE=OpenGis&version=1.1.1&REQUEST=GetMap&LAYERS=topo25k:topo25k&FORMAT=image/png&STYLES=&SRS=EPSG:31700&BBOX=677486.981,679763.617,689099.512,691376.148&WIDTH=512&HEIGHT=512&TRANSPARENT=TRUE
Unfortunately coordinates system is EPSG:31700 and MOBAC help says only EPSG:4326 is supported.
Do you plan to add support for more EPSG? Can I help?
Thank you
Well, EPSG:31700 is used by default but the GetCapabilities list uncovers that EPSG:4326 is also supported.
The wms map source xml is not working.
Please take a look at it.
For pan&zoom, this is a Romania map.
Thank you
working url:
http://opengis.unibuc.ro/geoserver/wms?SERVICE=WMS&VERSION=1.1.1
&REQUEST=GetMap&LAYERS=topo25k&SRS=EPSG:31700&FORMAT=image/png
&BBOX=677486.981,679763.617,689099.512,691376.148&WIDTH=512&HEIGHT=512
xml file:
<customwmsmapsource>
<name>RO25K WMS</name>
<minzoom>0</minzoom>
<maxzoom>16</maxzoom>
<tiletype>PNG</tiletype>
<version>1.1.1</version>
<layers>topo25k</layers>
<url>http://opengis.unibuc.ro/geoserver/wms?</url>
<coordinatesystem>EPSG:31700</coordinatesystem>
<aditionalparameters></aditionalparameters>
<backgroundcolor>#000000</backgroundcolor>
</customwmsmapsource>
MOBAc requires tiles of size 256x256. 512x512 tiles are not supported.
256x256 tile url is also working
http://opengis.unibuc.ro/geoserver/wms?SERVICE=WMS&VERSION=1.1.1
&REQUEST=GetMap&LAYERS=topo25k&SRS=EPSG:31700&FORMAT=image/png
&BBOX=677486.981,679763.617,689099.512,691376.148&WIDTH=256&HEIGHT=256
thanks