OpenLayers OpenLayers

Ticket #1349 (closed task: fixed)

Opened 2 years ago

Last modified 2 years ago

initgridedtiles should be easier to override

Reported by: crschmidt Assigned to: euzuro
Priority: minor Milestone: 2.6 Release
Component: Layer.Grid Version: 2.5
Keywords: Cc:
State: Complete

Description

the init grided tiles method is currently very monolithic, and hard for subclasses to override: the kamap class overrides the whole function, with a corresponding maintenance cost.

We now have another origin to consider (for mapguide), which means it is time to refactor.

Instead, we should split the grid init into a seperate function, and use that as the controlling mechanism. This can be done reasonably simply, and i have a patch ready for it, which i'll upload when i'm back to a real computer.

This is a blocker for 995.

Attachments

calculateGridLayout.patch (7.0 kB) - added by crschmidt on 02/09/08 21:26:53.

Change History

02/09/08 21:26:53 changed by crschmidt

  • attachment calculateGridLayout.patch added.

02/09/08 21:28:17 changed by crschmidt

  • state set to Review.

Whee, negative lines of code.

 Grid.js  |   61 ++++++++++++++++++++++++++++++----------
 KaMap.js |   95 ++++++++++++++-------------------------------------------------
 2 files changed, 68 insertions(+), 88 deletions(-)

02/12/08 12:20:32 changed by euzuro

  • state changed from Review to Commit.

tests pass in ff & ie7. erik likes this patch. very much

02/12/08 12:24:16 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [6231]) We split the grid init into a seperate function, and use that as the controlling mechanism, to reduce code duplication between Grid/KaMap/other layers that need a different grid origin. r=euzuro (Closes #1349)