Opened 17 years ago
Closed 17 years ago
#8 closed enhancement (fixed)
Scale returned could be rounded
Reported by: | jfournier | Owned by: | madair |
---|---|---|---|
Priority: | P2 | Milestone: | 1.0.5 |
Component: | Widgets | Version: | 1.0.2 |
Severity: | Minor | Keywords: | |
Cc: | Browser: | All | |
External ID: | Operating System: | All | |
state: | New |
Description
In Map.js getScale function :
value returned was 400000.000002. Application was expecting 4000000 (in the legend) I think rounding the scale returned should be done in that function.
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Milestone: | 1.0.3 → 1.0.4 |
---|
comment:3 by , 17 years ago
Milestone: | 1.0.4 → 1.0.5 |
---|
comment:4 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [1389]) closes #8: move scale rounding to the Legend ScaleRange object
Note:
See TracTickets
for help on using tickets.
The previously applied patch was r1205. This patch is incorrect because it is valid for scales to have fractional values, so just rounding the scale is not a good idea.
The legend requests legend icon urls by scale range and the fractional value is causing the request to lie just outside of the valid range in this specific case. The code that determines if a scale value is in a scale range should be modified to relax the test by either converting the scale to a specific precision based on the size of the number or to compare numbers within a certain tolerance. OpenLayers has a function for comparing within a tolerance I believe.