geosolutions-it/MapStore2

New configuration property for Locate tool

Closed this issue · 0 comments

Description

Implement support for configuration of max zoom level in localConfig.json (Locate plugin). No UI needed for this.
The possibility to configure the zoom level is not available and it needs to be implemented.

  • This improvement needs to be implemented for openlayers and leaflet

  • The new configuration option must be properly documented in the plugin config documentation here

Proposal:

We could pass the custom options via localConfig to the Locate Support component and add an implementation to override the default options.

Expected configuration of plugin in localConfig.json:

// localConfig.json
[
    {
        "name": "Map",
        "cfg": {
            "tools": ["locate"],
            "toolsOptions": {
                "locate": {
                    "maxZoom": 5
                }
            }
        }
    },
    { "name": "Locate" }
]

What kind of improvement you want to add? (check one with "x", remove the others)

  • Minor changes to existing features
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Other useful information

This could be an occasion to refactor this plugin based on the the new implementation of item Tool in the Map plugin (cc @offtherailz)