Using CONNECTION and CONNECTIONTYPE

Pietro Giannini pgiannini at BYTEWISE.IT
Mon Oct 16 00:37:44 PDT 2006


Eric,

you can try two methods if you're using a simple cgi application:
change the mapfile parameters through a URL:
http://mapserver.gis.umn.edu/docs/reference/cgi/controls (look the end of
document)
or use the runtime substitution:
http://mapserver.gis.umn.edu/docs/howto/runsub
but limited to the CONNECTION parameter.

instead, via php and mapscript you can change the connection and
connectiontype properties of the layer object via the method
$layer->set(property_name, new_value).

regards
PG


On Ven, 13 Ottobre 2006 16:56, Eric Archuleta disse:
> Hello,
>
>
>
> I am using a LAYER      CONNECTIONTYPE of OGR and a layer CONNECTION
> pointing to an .ovf file. The .ovf specifies an SQL string that queries my
> MySQL database for the point location coordinates. This works perfectly
> for
> displaying locations defined by a static sql query.
>
>
>
> My question is if it possible to define SQL queries "on the fly" so that
> specific locations can be drawn depending on user interaction? I would
> like
> to present the user with a list of location names and allow the user to
> select one or more and then draw a map based on those selections.
>
>
>
> Is there a way to do this using the CONNECTIONTYPE and CONNECTION layer
> properties? Or is there a better way to do this?
>
>
>
> Any help would be greatly appreciated.
>
>
>
> Thanks
>
> Eric
>
> San Ildefonso Pueblo, NM
>
>


___________________________
      Pietro Giannini
  Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E



More information about the MapServer-users mailing list