[mapserver-users] Zoom to Layer C# asp.net
David Lowther
dlowther at coordinatesolutions.com
Wed Mar 26 09:07:49 PDT 2008
Venkat,
The Mapscript API Reference
(http://mapserver.gis.umn.edu/docs/reference/mapscript) is a great resource.
If you jump to the layerObj
(http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#layerobj)
you will see there is an extent property. My suggestion for how to zoom to
the extents of a layer would be to find that layer in the mapObj
(http://mapserver.gis.umn.edu/docs/reference/mapscript/index_html#mapobj)
grab the layerObj.extent and pass it's pieces to the mapObj.setExtent
method.
BTW - that method signature for mapObj.setExtent appears to have a typo. The
second miny should be maxx.
For example:
Dim l as layerObj = youMap.getLayerByName("yourlayername")
yourMap.setExtent(l.extent.minx, l.extent.miny, l.extent.maxx,
l.extent.maxx)
Hope that helps,
David Lowther
_____
From: venkat [mailto:ven.tammineni at gmail.com]
Sent: Wednesday, March 26, 2008 7:29 AM
To: mapserver-dev at lists.osgeo.org
Cc: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Zoom to Layer C# asp.net
Dear All,
I am developing one webapplication using C# asp.net.I want to sample for
zoom to layer.how can i implement.and where can i get the code or any syntax
help.
I am waiting for your great response.
Advanced thanks.
Regards.
Venkat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080326/271c8d97/attachment.htm>
More information about the MapServer-users
mailing list