This project has moved and is read-only. For the latest updates, please go here.

Two quastions about WMS and .map file

Apr 17, 2008 at 10:33 AM
I have two questions that i can't find on sharpmaps's homepage and google.
1. what woes sharpmap.layers.wmsLayer() return ? is it an image or is it all layers that the server contains or a XML file or what? (Try to configure my mapserver to work with shrpmap but with no success)
2. if i have a library with *.shp filens and s *.map file to them can i easy import the .map file and get the whole picture or do i have to import all layers, layer by layer ?

Im using sharpmap v0.9
Apr 17, 2008 at 12:30 PM
1) on each GetMap request the sharpmap.layers.wmsLayer will do a request to the WMS and will get an image in return. It will then render this image to the canvas. The sharpmap.layers.wmsLayer request can consist of multiple WMS layers . You have to specify which WMS layers you want to request from the WMS. Note, the concept of layer is confusing here because there are sharpmap layers and wms layers.

In this sample
the WMS layers are added like this:
layWms.AddLayer("Ocean features");

2) No there is no easy way to import it from the .map file. You have to specify it in code.
Apr 17, 2008 at 2:03 PM
Ok thnx now i understand a bit more.
but i sitll have one problem that i cant solve,

When i add this adress:
in my webbrowser it show me a picture without any promlems.
but when i take the same url an put it in wmslayer("test", url); i get an error "could not download capabilities"
I dont understand isn't a diffrent query i need to use or am i misunderstanding wms totaly?
Apr 17, 2008 at 4:29 PM
Edited Apr 17, 2008 at 4:51 PM

You have to provide the base url, not the complete request url:
The capabilities are then returned ok.

But i did some tests and there is another issue. There turns out to be a little flaw in the demis server configuration. In the capabilities there is this line:
<OnlineResource xmlns:xlink="" xlink:type="simple" xlink:href=" Marble&"/>
The OnlineResource in the capabilties is used for any further wms requests (as it should) but as you can see, 'wms=Blue Marble' has a space in it, which seems to be incorrect. If I manually remove the space from the request it works okay.

We have to mail demis to fix it I guess.
Apr 18, 2008 at 1:14 PM
They fixed it: