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:[EMAIL PROTECTED] 
Sent: Wednesday, March 26, 2008 7:29 AM
To: [EMAIL PROTECTED]
Cc: [email protected]
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

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to