[fusion-trac] #143: Incorrect scale displayed for maps using
units other than meters
Fusion
trac_fusion at osgeo.org
Fri Nov 7 12:34:33 EST 2008
#143: Incorrect scale displayed for maps using units other than meters
--------------------------------+-------------------------------------------
Reporter: chrisclaydon | Owner: madair
Type: defect | Status: assigned
Priority: P1 | Milestone: 2.0
Component: Widgets | Version: SVN
Severity: Major | Resolution:
Keywords: | External_id: 1085634
State: Analysis Requested | Browser: All
Os: All |
--------------------------------+-------------------------------------------
Comment (by chrisclaydon):
If the data is interpreted as being in millimeters, and the Map coordinate
system uses millimeters, and the initial extents of the map match the full
extent of the data, the entire data set should fill the initial view.
I dug into this a little more, and it seems that there are two separate
issues at hand:
1) Fusion maps the metersPerUnit value from the MG map to the nearest
!OpenLayers unit. So it maps millimeters to inches, which throws
everything off. I tried adding a definition for 'mm' units into
!OpenLayers.js, and that fixed the problem for the millimeter-based map
example.
{{{
OpenLayers.INCHES_PER_UNIT["mm"] = OpenLayers.INCHES_PER_UNIT.m / 1000.0;
}}}
It would be nice to add entries to the !OpenLayers.INCHES_PER_UNIT list on
the fly for units that don't currently have an entry, rather than having
to hard-code every possible supported unit...
2) There seems to be a restriction on the maximum scale of 1:100,000,000.
This is what prevents the kilometer-based map example from displaying the
full data extents. I'm not sure if the restriction is imposed by Fusion or
!OpenLayers...
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/143#comment:5>
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