[mapserver-users] Use featureid WMS Property in MapServer

bartvde at osgis.nl bartvde at osgis.nl
Wed Aug 27 07:11:17 PDT 2008


This is probably a vendor-specific extension that Geoserver did, since
this is not part of the WMS standard AFAIK.

With Mapserver you have to create an SLD (Styled Layer Descriptor)
document to achieve the same thing. In an SLD you can use a Filter.

Best regards,
Bart

> Hi the list,
>
> I work in fedora 8, and my MapServer version is : 4.10.3. I use MapServer
> as
> a WMS/WFS Server.
> For a project, i need to be able to ask some custom WMS request to
> MapServer. The aim it's that a user can draw a polygon on a map and all
> the
> feature includ in this polygon will be color in an other style (like
> yellow
> for example).
> So  can I use the WMS property featureid (or FILTER) ? My example works
> with
> GéoServer but not with mapServer. Could someone tell me what is wrong ?
>
> Here it's my OpenLayers code :
>
> // setup tiled layer
>             tiled = new OpenLayers.Layer.WMS(
>                 "topp:rts_nv_6_7_8 - Tiled", "
> http://localhost:8080/geoserver/wms",
>                 {
>                     width: '800',
>                     srs: 'EPSG:4326',
>                     styles: '',
>                     height: '629',
>                     layers: 'topp:rts_nv_6_7_8',
>                     format: 'image/png',
>                     tiled: 'true',
>                     tilesOrigin : "55.186482,-21.41333445",
>                    featureid:'rts_nv_6_7_8.1'
>                 },
>                 {buffer: 0}
>             );
>
>                     // Layer Route Niveau1
>                       rprincipal_z500KWMS = new OpenLayers.Layer.WMS(
>                       "rprincipal_z500KWMS", "
> http://localhost/cgi-bin/mapserv?map=/var/www/html/mapserver/rdt_map.map",
>                       {
>                           layers: 'rprincipal_z500K',
>                           srs: 'EPSG:4326',
>                           width: '800',
>                           styles: '',
>                           height: '626',
>                           format: 'image/png',
>                           tiled: 'true',
>                           tilesOrigin :
> "55.185611724,-21.415085482499997",
>                           transparent:true,
>                           featureid:'rprincipal_z500KWMS.1'
>                       },
>                         {buffer: 0}
>                      );
>
> And my map configuration :
>
> #######################################
>         LAYER
>             NAME "rprincipal_z500K"
>             MINSCALE 250000
>             MAXSCALE 500000
>             METADATA
>                   "wms_title" "rprincipal_z500K"
>                 "wfs_title" "rprincipal_z500K"
>                 "gml_featureid" "id_voie"
>             END
>             DUMP TRUE
>             PROJECTION
>                   "init=epsg:4326"
>             END
>             TEMPLATE " "
>             TOLERANCE 5
>             GROUP map_ligne
>             TYPE LINE
>             STATUS ON
>             CONNECTIONTYPE OGR
>             CONNECTION
> "/home/projets/v3/projets/reunion/routes/route_frca_3_4.tab"
>             CLASS
>            STYLE
>                 COLOR 255 0 0
>                 SYMBOL "line"
>                 SIZE 4
>                 MINSIZE  4
>                 MAXSIZE 36
>             END
>             STYLE
>                 COLOR 250 250 200
>                 SYMBOL "line"
>                 SIZE 2
>                 MINSIZE  2
>                 MAXSIZE 22
>             END
>         END # END OF CLASS
>     END
> #######################################
>
> --
> --------------------------------------------------------------------
> Van De Casteele Arnaud
> 72 Rue de la colline des camélias 97400 Saint-Denis
> 0262 30 67 79 - 0692 23 73 17
> SIG - WebMapping - GPS embarqué
> Site internet : http://cataloguesig.c-webhosting.org/
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>





More information about the MapServer-users mailing list