[mapserver-users] Re: How to get full extent of the map?
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Sat Jul 3 00:42:18 PDT 2010
Hi,
Sorry, I do not make code, but you should make your application to send the getCapabilities request like
http://localhost/cgi-bin/mapserv.exe?service=WMS&version=1.1.0&request=getCapabilities&map=c:\ms4w\osm-mapserver.map
and capture the extents from the returned document which will have this kind of sections for each layer
<Layer queryable="0" opaque="0" cascaded="0">
<Name>landuse_layer5</Name>
<!-- WARNING: Mandatory metadata '..._title' was missing in this context. -->
<Title>landuse_layer5</Title>
<SRS>EPSG:3067</SRS>
<LatLonBoundingBox minx="-7.18554e+205" miny="-90" maxx="7.18554e+205" maxy="90" />
<BoundingBox SRS="EPSG:3067"
minx="-3.40282e+038" miny="-3.40282e+038" maxx="3.40282e+038" maxy="3.40282e+038" />
<ScaleHint min="0" max="2494.51923117667" />
</Layer>
Please notice that the both bounding boxes in this example are nonsense and I should obviously check my mapfile for correcting them.
-Jukka Rahkonen-
Kiran Bandal wrote:
> Hi,
> Thanks for the reply.
> Just to let you know, I am reading my vector data from PostgreSQL. So, can I
use WMS GetCapabities request in that case.
> It would be really helpful if you can paste any sample code for that if you
have any.
> Thanks and regards,
> Kiran.
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-get-full-extent-of-the-map-tp5248342p5250366.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list