[fusion-trac] #113: Can't zoom out beyond initial map view
Fusion
trac_fusion at osgeo.org
Fri Sep 26 16:08:25 EDT 2008
#113: Can't zoom out beyond initial map view
-----------------------+----------------------------------------------------
Reporter: andrewd | Owner: madair
Type: defect | Status: assigned
Priority: P2 | Milestone: 1.1
Component: Core | Version: SVN
Severity: Critical | Resolution:
Keywords: | External_id:
State: Analysing | Browser: All
Os: All |
-----------------------+----------------------------------------------------
Changes (by madair):
* status: new => assigned
* owner: pagameba => madair
* milestone: 2.0 => 1.1
Comment:
looking into this further, I've found that:
- in OL, layers (or the baseLayer in particular) MUST have a maxExtent
property set, otherwise the geography calculations are messed up for any
projection other than lon/lat; setting projection and units on the map
object doesn't change this (but these should be set on the map anyway).
The effect of this is that you can't pan the center of the viewport
outside of the maxExtent.
- in Fusion, we set the maxExtent to the bounds returned by LoadMap (which
is the Studio 'initial view' setting with MapGuide, and the mapfile
'extent' value with mapserver). We can set an optional override of this
value in the MapWidget extension if that is desired to allow panning
outside the maxExtent
- the issue of not zooming out beyond the initial view, was actually due
to the maxScale value of 'Infinity'. (displayOutsideMaxExtent and
alwaysInRange settings don't affect this). In this case, the maxScale
parameter is not supplied to the OL Layer constructor, and the maxScale
gets calculated internally in OL based on the maxExtent and viewport size.
This can be fixed by substituting a large maxScale value e.g. 1:billion
and then the user can zoom out to that scale value, and/or optionally set
a maxScale value in the MapWidget extension.
If that analysis makes I'll go ahead and implement the changes. Since it
doesn't depend on alwaysInRange, this can be implemented in Fusion 1.1
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/113#comment:17>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list