[Mapserver-users] Locating and centering on a point

Steve Lime steve.lime at dnr.state.mn.us
Mon Dec 22 14:02:09 EST 2003


I would do it using an ITEMQUERY. The logic would go like this:

1) user selects the feature from a pulldown list 
2) this triggers an ITEMQUERY, the pulldown is setting the qstring
(this list probably exists as a second form on the page or invokes a
javascript function to do the query)
3) assuming the selection is successful a URL query template is used to
redirect the user back to the main interface at a specific place and
scale. You'd use the [shpmid] replacement string.

You'd have to preload the list of clickable features (using straight
CGI) but wouldn't have to load the coordinates.

Steve


>>> l.dardini at mct.it 12/22/2003 4:05:55 AM >>>
Hi,
I'd like to center my map on a precise point object. The user choose
from a
list of objects (dropdown list box), like restaurants, and the map is
centered on the restaurant
choosen.

What is the best way to do this?

I look at the "province selection" in gmap example, but I don't want
to
preload all the coordinates in the html. I prefer a solution where
coordinates are read from
the shape file or using a postgis database.

Leandro


_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list