[mapguide-users] Zoom to Extents

Kori Maleski kmale at telus.net
Thu May 31 23:48:56 EDT 2007


I read the Geometry with the Feature reader as it is parsing to calculate
the selection mbrs and use the Coordinate Factory to convert the units if
need be, with a scale calculation to follow.  This allows for the scale of
each feature to be calculated as well as the selection result as a whole.

This way I don't have to pre-calculate.  Would be a nice to have a built in
server-side property or function of the MgGeometry to do this.  Feed it the
WKT projection, screen DPI, etc with scale of the object as an output.

Kori Maleski

 

 

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Zac Spitzer
Sent: May 31, 2007 8:21 AM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] Zoom to Extents

In a similar vane whats the analogy with 'scale' in zoomToView with
the old mapguide's 'screenwidth' based navigate to map methods?

I have done all my pre cooking in oracle from polygons to mbrs to
points and getting height width and the centre points, so i can
calculate my aspect ratio for the extents and the viewport and
manipulate them to to correctly?

z



On 6/1/07, Walt Welton-Lair <walt.welton-lair at autodesk.com> wrote:
> There's a lot of useful DWF Viewer API that is (unfortunately) not
> exposed in the shared API for DWF / AJAX.  To zoom to an extent with DWF
> Viewer you could add the following method to dwfmappane.templ:
>
> function ZoomToExtent(x0,y0,x1,y1,refresh)
> {
>     var extent = emapViewer.CreateExtent();
>     extent.Set(x0, y0, x1, y1);
>     emapViewer.ZoomToExtent(extent);
>     if(refresh == 1)
>         emapViewer.Refresh();
> }
>
>
> Walt
>
> -----Original Message-----
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of David
> Hequet
> Sent: Thursday, May 31, 2007 12:18 PM
> To: mapguide-users at lists.osgeo.org
> Subject: Re: [mapguide-users] Zoom to Extents
>
>
> I'm trying do the same thing with the DWF viewer.
>
> If you are using the ajax viewer, look at the "ZoomSelection()" in
> "ajaxmappane.templ" file. This method ask the mapagent for the selecion
> extents, calculate the scale, then use ZoomToView().
> But with the DWF viewer, i found no tricks to reproduce the
> calculteScale()
> method.
>
>
>
> Nichols, Mark A. wrote:
> >
> > I see documentation on zooming to an x,y point at a particular scale.
> > What I have is the extents already calculated and I'd like to zoom to
> > that particular extent.  I use postgis to get the extents of an
> object.
> > Results look like
> >
> county_geometry_extents=631637.01873067,287635.157843,687024.28129651,33
> > 7031.91208509.
> >
> > Can I zoom not to a point, but instead to a set of points that make up
> > the extents.
> >
> >
> > Mark Nichols
> > _______________________________________________
> > mapguide-users mailing list
> > mapguide-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapguide-users
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Zoom-to-Extents-tf3447457s16610.html#a10891104
> Sent from the MapGuide Users mailing list archive at Nabble.com.
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>


-- 
Zac Spitzer
http://zacster.blogspot.com/
+61 405 847 168
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list