[postgis-users] displaying a specific extent of the map
simflex
simflex at millenniumhealthproducts.com
Thu May 25 06:16:01 PDT 2006
Greetings all,
First time user of this forum.
We use a sql server db to store data including x, y values. and using ASP on the front end to retrieve data
Currently, we are do have a summary report laid out thus:
incident id first name last name incident type, incident location
1 John Doe vehicular amber street
...
...
Our issue arises because we want to be able to click on incident id to zoom directly to the extent of the map where the incident occurred.
so far, we are struggling with this. any ideas would greatly appreciated.
Here is what we have got so far:
function zoomToExtent(box) {
box_array = box.split(" ");
minx = box_array[0]*1;
miny = box_array[1]*1;
maxx = box_array[2]*1;
maxy = box_array[3]*1;
width = (maxx - minx) + 200;
height = maxy - miny;
centerx = minx + (width / 2.0);
centery = miny + (height / 2.0);
lonlatPt = map.mcsToLonLat(centerx, centery);
lon = lonlatPt.getX();
lat = lonlatPt.getY();
map.zoomWidth(lat, lon, width, 'FT');
}
No results
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20060525/6d9356bf/attachment.html>
More information about the postgis-users
mailing list