Hello,

You can create your query through the commandline tool 'psql', and once you have that working you can test through the 'ogrinfo' commandline tool, using its '-sql' switch. Then you can test through MapServer with the 'shp2img' commandline tool, by setting that query within the DATA statement of your mapfile layer. See examples at http://www.mapserver.org/input/vector/postgis.html

-jeff

--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/



On 2016-08-09 8:56 AM, drobins wrote:
I have a PostGIS database and I have a column "startdate" and "enddate" in my
database (YYYY-MM-DD format).
What I want to do is make a filter/expression that checks if a certain
selected date falls between those 2 dates.

Example:
I have a checkbox for enable/disable the following layers:
2016
2017
2018
2019
2020

I have an entry in my database with:
startdate: 2016-01-01
enddate: 2019-01-01

If I check the layer 2017, I would like it to check if its between the
start/enddate and if yes, display it.
Is this possible with Mapserver/Openlayers?




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

Reply via email to