OpenLayers OpenLayers

Ticket #1591 (closed feature: fixed)

Opened 6 months ago

Last modified 6 months ago

we should have a map getUnits method

Reported by: pgiraud Assigned to:
Priority: minor Milestone: 2.7 Release
Component: Map Version: 2.6
Keywords: Cc:
State: Commit

Description

We currently have getResolution, getScale etc... We should have the same for units. There's currenlty a bug in the scaleline control if units are set only on the baselayer and not on the map.

Thanks to tbonfort for reporting this.

Attachments

patch-1591-r7373-A0.diff (3.9 kB) - added by pgiraud on 06/18/08 04:09:21.

Change History

06/18/08 04:09:21 changed by pgiraud

  • attachment patch-1591-r7373-A0.diff added.

06/18/08 04:09:48 changed by pgiraud

  • state set to Review.

06/18/08 04:45:51 changed by ahocevar

  • state changed from Review to Commit.

I can confirm that this works for now, but in general I would prefer if all those things (resolution, scale, units) would be updated on the map object in the map.setBaseLayer method instead of using an expensive getter method to fetch this from the base layer every time it is needed. Especially for getResolution, which is called for every single feature during vector rendering, this would really increase performance.

Please commit, but I'll create a new ticket so we don't forget my concerns.

06/18/08 04:59:14 changed by pgiraud

  • status changed from new to closed.
  • resolution set to fixed.

closed with r7374