[mapguide-users] Layer Zooming

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue May 5 07:27:31 EDT 2009


You need to get the extent of the layer, and then zoom to it.

There are two extents in FDO, the spatial extents, and the combined 
object extents.
For some providers, this is the same value, for others only one of the 
extents work.
In other words, you have to handle both situations.
Fortunately, there is a PHP implementation that does just that, and you 
can see the code here:
http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Web/src/schemareport/showgeom.php

Look at line 95 to 161 to see how its done.
You have to port this to .Net yourself.

After you get the extent, you can zoom to the extent.
Another solution is to select all the features in the temp layer (if 
they are selectable),
and the execute zoomToSelection.

Regards, Kenneth Skovhede, GEOGRAF A/S



padmini godavarthi skrev:
> Hi Kenneth, 
> Thanks for ur reply 
> i achieved to do shortest path through oracle procedure and added to this
> result as a seperate layer on the map. 
>
> But Now i want the functionality of Zoom to layer (i mean to this shortest
> path layer) 
>
> How is it possible???????????????????????? 
>
> Plz tell me the solution..... 
>
> Regards, 
> Padmini................ 
>
>   


More information about the mapguide-users mailing list