[mapserver-users] Querying a WMS layer with data input from MySQL?

2011-03-18 Thread kngai
Hi,
I'm a new user of MapServer. So far I've mainly used it to display
ShapeFiles via WMS on an OpenLayers application I'm developing.

I now have polygons stored in a MySQL table (stored as a WKT format in a
POLYGON column). I'm able to display it as a layer just fine via a WMS
request, but I want to be able to display a specific polygon from a row.
That is, I want to be able to query the MySQL data input when requesting
this layer. Right now, I have something like this in my Mapfile for the
Layer parameter:

TYPEPOLYGON
CONNECTIONTYPE OGR
CONNECTION "MySQL:customtable,user=user,password="
DATA "SELECT custom_polygon FROM mytable WHERE fid=2"

I want to be able to perform a WMS request with parameters that can allow me
to query the layer (where fid can be changed). For example:
http://www.server.com/cgi-bin/mapserv?REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png&...LAYERS=custompoly&...fid=33&;...

Can this sort of thing be done on MapServer?


--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Querying-a-WMS-layer-with-data-input-from-MySQL-tp6186251p6186251.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Re: Querying a WMS layer with data input from MySQL?

2011-03-18 Thread kngai
I've noticed that something I'm asking can be done with this example from
iNWS, so I thought I'd ask how:

http://inws.wrh.noaa.gov/cgi-bin/wms_iNWS?alert_area_custom_filter=id%3D0+or+id%3D26715&alert_area_county_filter=id%3D0&product_segment_filter=id=399374&HEIGHT=500&WIDTH=500&LAYERS=radar,counties,states,roads,product_segment,alert_area_county,alert_area_custom,cities&radar_time=2011-03-13T18%3A00%3A00Z&SRS=EPSG:900913&STYLES=&FORMAT=image/png&TILED=false&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application/vnd.ogc.se_inimage&BBOX=-13861560.5,5832312,-13408652.5,6285220

--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Querying-a-WMS-layer-with-data-input-from-MySQL-tp6186251p6186263.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MAXLENGTH not working with WRAP

2011-06-01 Thread kngai
Hi Everyone,

I have setup a wms server to display a polygon on OpenLayers. I can show the
labels with WRAP " ". But when I add MAXLENGTH, the map image (tiles) simply
doesn't render anymore. Here is my mapfile LABEL:
LABEL
COLOR   255 0 0
OUTLINECOLOR255 255 255
TYPETRUETYPE
FONTvera-it
SIZE8
ANTIALIAS   TRUE
POSITIONCC
PARTIALSFALSE
BUFFER  3
MAXLENGTH   8
WRAP" "
END

Am I missing something here?

-
Kevin Ngai
--
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/MAXLENGTH-not-working-with-WRAP-tp6429308p6429308.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users