[mapserver-users] display only one district

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Fri Mar 20 12:13:20 PDT 2015


In other threads of this list, it was suggested to use a subquery in DATA 
instead of using FILTER, when postgis is used as a datasource.
http://mapserver.org/fr/input/vector/postgis.html#data-access-connection-method

If you want to use only one mapfile than runtime variable substitution can 
be used




Carlos Ruiz <boolean10001 at yahoo.com>@lists.osgeo.org 
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2015-03-20 14:53
Veuillez répondre à
Carlos Ruiz <boolean10001 at yahoo.com>


A
rishi <rishe28 at gmail.com>, "jmckenna at gatewaygeomatics.com" 
<jmckenna at gatewaygeomatics.com>, "mapserver-users at lists.osgeo.org" 
<mapserver-users at lists.osgeo.org>
cc

Objet
Re: [mapserver-users] display only one district








Rishi,

>From a MAP file approach, you can use the FILTER tag inside of the LAYER 
section:

FILTER [string]
This parameter allows for data specific attribute filtering that is done 
at the same time spatial filtering is done, but before any CLASS 
expressions are evaluated. For OGR and shapefiles the string is simply a 
mapserver regular expression. For spatial databases the string is a SQL 
WHERE clause that is valid with respect to the underlying database.

For example: FILTER ([type]=?road? and [size]<2)
In a static way, you will need to have two MAP files (one without FILTER 
and another with FILTER) and you have to configure each project to point 
to the right MAP file.

 
Mtro. Carlos Ruiz

From: rishi <rishe28 at gmail.com>
To: jmckenna at gatewaygeomatics.com; "mapserver-users at lists.osgeo.org" 
<mapserver-users at lists.osgeo.org> 
Sent: Friday, March 20, 2015 6:43 AM
Subject: [mapserver-users] display only one district

Hi all
 
Iam using Postgres database to diasplay districts on the google map

It is working.
But now i want to display only one district instead of 50.
In my database there are 50 districts data, but i want to display only 
one.
And also i have to use the same mapfile in to 3 projects, in one project 
all the districts has to be displayed and in one project only one district 
has to be display.

How to do this
plz send me the code

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150320/7e890fa9/attachment.htm>


More information about the MapServer-users mailing list