[mapserver-users] using Mapscript to pan around a querymap

Steve Lime steve.lime at dnr.state.mn.us
Mon Apr 22 13:12:16 EDT 2002


It is possible with the main CGI mapserver assuming you can to the address lookup. That tends to be a rather sophiticated query (or series of queries) and that's why you would need MapScript. Actually you wouldn't even need MapScript. You could just use a helper program to do the address lookup and then intialize a CGI MapServer session from that output. Attribute queries that start a pan/zoom interface can be done without MapScript, you just need to have a normal pan/zoom interface as a part of your query template. You also might use saved queries to keep a particular feature hi-lighted as you pan/zoom but there are ways around that as well using a dynamic expression.

Steve

Stephen Lime
Data & Applications Manager

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> Stephen Woodbridge <woodbri at swoodbridge.com> 04/21/02 10:32AM >>>
Lawrence,

> Yes, I want to enter an address, have the map zoom to the address
> point, then to pan around this location, using the same template (map).
> I understand that this is not possible using regular MapServer > features.
> How can I do this using MapScript ?

This feature is not implemented in directly in Mapserver. MapScript has
a queryByAttributes() function that might work, but I am not sure how it
works.

Can someone from DM Solutions comment on this?

I wrote my own GeoCoder in C that works off the shape files but it is
somewhat targeted at US Census data. You can see it at
http://swoodbridge.com/cgi-bin/geo enter and address east of the
Mississippi in the US.

Some other people were working on an OpenSource version - you might want
to check the list archives for more information.

You could build something to do this with shapefiles in Perl or
PHP/Mapscript because both of these can open *.dbf files where all the
attributes are stored and scan the records.

I hope this helps,
  -Steve




More information about the mapserver-users mailing list