sigrennesmetropole / geor_urbanisme_mapstore

GNU General Public License v3.0
2 stars 5 forks source link

Re-register current zoom hook to make extension work correctly with non-standard CRS when it's deployed in production mode #49

Closed alexander-fedorenko closed 2 years ago

alexander-fedorenko commented 2 years ago

Description

Extension had problems when used with custom projections in production mode. This was indirectly caused by recent changes to make it independent from identify plugin. Functionality that build requests and defines logic of how and where from data should be requested was moved to the extension, which made impossible to use hooks defined by the map plugin (they become out of scope, defined in main app bundle). This PR provides a slight change to overcome this limitation. It adds a code that registers hook to get current resolution from the store (where resolutions are always up-to-date).

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

Issue

What is the current behavior?

42

What is the new behavior? As per description

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

Other useful information

New hook instance is being used ONLY by this extension. It is baked into build and used only to get proper resolution when bounding box for request is calculated. Any other plugin from main bundle will use hooks defined in main app.

tdipisa commented 2 years ago

@offtherailz please reveiw this as soon as you can please.