mapping query results

Richard Greenwood richard.greenwood at GMAIL.COM
Thu Nov 2 08:48:16 EST 2006


On 11/2/06, william paul <williampaul28 at yahoo.com> wrote:
> Hi,
>
> I have a database on MS SQL Server Express and an ASPX application. I
> managed, with help from the list, to install dBox. I want to map the query
> results on the mapserver, but I don't know how to do it with dBox. Example:
> after a query I get point or polygon features that represent elements at
> risk or areas with high risk. Is it possible to see them on the map by
> clicking on one of the query results?
>
> Thank you
>
> William

I do something like that in one of my applications. An ASP page
displays data from a SQL Server db. Each record has a "Map It" link.
There has to be at least one common field in the SQL Server data and
the shape files. When the link gets clicked it calls mapserver with
smoething like:
  mapserv.exe?map=my.map
  &mode=itemnquery
  &qitem=pidn
  &qlayer=join_region_spatial
  &mapext=shapes
  &savequery=true
  &qstring=22-41-16-33-4-11-004

itemnquery tells mapserver to highlight, and zoom to, the objects
qitem is the name of the field that is common
qlayer is the layer that the objects are on
mapext tells it to zoom to that object(s)
savequery is optional
qstring is the value of the object.qitem you want slected

Also you need to setup a querymap in your map file.

My example is at:
   http://www2.tetonwyo.org/mapserver/


More information about the mapserver-users mailing list