How to filter layers in a WMS service?

2846
3
Jump to solution
02-05-2016 02:05 AM
Sebastian_MariendalKristensen
New Contributor

I Try to use a layer from a WMS service in my app.

But I can't figure out how to filter the layers in the WMS service.

Even if I use the LAYER=<layername> parameter in the url, then will all layers still be showed.

here is my code <-

Map {

        id: map

        anchors {

            left: parent.left

            right: parent.right

            top: titleRect.bottom

            bottom: parent.bottom

        }

        wrapAroundEnabled: true

        rotationByPinchingEnabled: true

        magnifierOnPressAndHoldEnabled: true

        mapPanningByMagnifierEnabled: true

        zoomByPinchingEnabled: true

        positionDisplay {

            positionSource: PositionSource {

            }

        }

        ArcGISTiledMapServiceLayer {

            url: app.info.propertyValue("basemapServiceUrl", "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer")

        }

        WmsDynamicMapServiceLayer{

            id:matrikel

            url:"http://kortforsyningen.kms.dk/service?servicename=mat&client=arcGIS&service=WMS&version=1.1.1&login=..."

            visible: true

        }

       

        NorthArrow {

            anchors {

                right: parent.right

                top: parent.top

                margins: 10

            }

            visible: map.mapRotation != 0

        }

       

       

        onStatusChanged: {

            if(status == Enums.MapStatusReady) {

                console.log("Map Ready!!");

                map.addLayer(matrikel)

            }

        }

        ZoomButtons {

            anchors {

                right: parent.right

                verticalCenter: parent.verticalCenter

                margins: 10

            }

        }

    }

-->

Request in fiddler

http://kortforsyningen.kms.dk/service?servicename=mat&client=arcGIS&service=WMS&version=1.1.1&login=...

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

The Runtime's support for WMS layers at this release is very limited, and was initially included so that web maps that contained WMS layers could at least display them. Unfortunately, the class is not fully functional yet, but we do plan on having much better WMS support in Quartz.

-Luke

View solution in original post

3 Replies
LucasDanzinger
Esri Frequent Contributor

The Runtime's support for WMS layers at this release is very limited, and was initially included so that web maps that contained WMS layers could at least display them. Unfortunately, the class is not fully functional yet, but we do plan on having much better WMS support in Quartz.

-Luke

Sebastian_MariendalKristensen
New Contributor

Will Quartz be a part of App Studio?

0 Kudos
MarikaVertzonis
Esri Regular Contributor

It will be a part of AppStudio. After the Quartz release of the ArcGIS Runtime SDK for Qt.

0 Kudos