[OpenLayers-Trac] [OpenLayers] #24: Incorporate OpenLayers.Control.ScaleBar
OpenLayers
trac at openlayers.org
Mon Jan 7 16:32:51 EST 2008
#24: Incorporate OpenLayers.Control.ScaleBar
----------------------------+-----------------------------------------------
Reporter: sderle | Owner: tschaub
Type: feature | Status: assigned
Priority: major | Milestone: 2.6 Release
Component: Control.Scale | Version:
Resolution: | Keywords:
State: Review |
----------------------------+-----------------------------------------------
Comment (by tschaub):
Replying to [comment:20 ahocevar]:
> Tim, thanks for refactoring and improving this good all-time favourite
that we also love and use in Mapbuilder. A few remarks:
>
> * The control should have a div property (like e.g.
Control.!ControlPanel) to allow for placing the scalebar in an existing
container (outside the map).
> * tsep and dsep in the formatNumber function should be configurable
like measurementProperties to allow for locale-dependant output.
> * the DOM element title (line 286 in !ScaleBar.js) should not be hard
coded to start with "scale 1:". This should also be made configurable.
Good suggestions. Thanks Andreas. I'd actually like to move formatNumber
entirely out of the control - but I think if it lives there for now,
that's fine. Also, I noticed a bug that had been sitting around in that
styleValue method for years (see the "break rules" statement). Unless I'm
losing my mind, we want to get out of there as soon as we find a rule that
applies. The whole point of going backwards through the stylesheets is to
get to the applied rule first - then return. I'm embarassed how long that
was sitting uncorrected - unless I'm wrong about it now.
--
Ticket URL: <http://trac.openlayers.org/ticket/24#comment:21>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list