Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zoom min seems to be hardcoded #2

Open
submarcos opened this issue Jun 15, 2020 · 3 comments
Open

Zoom min seems to be hardcoded #2

submarcos opened this issue Jun 15, 2020 · 3 comments

Comments

@submarcos
Copy link
Member

submarcos commented Jun 15, 2020

  • I try to change default backend settings to center map to Lat 0 and Lng 0, with zoom level to see a big part of the world

  • I tried to change initial map bounds, center and zoom by default

  • I can't set zoom as I want

Capture d’écran du 2020-06-15 14-05-37

with settings

"map": {
    "accessToken": "token",
    "center": [0, 0],
    "zoom": 4,
    "maxBounds": [[-180, -90], [180, 90]],
    "backgroundStyle": [
        {"label": "Plan", "url": "mapbox://styles/mapbox/streets-v9"},
     ],
}

"-" button is blocked and I can't zoom out

@dtrucs
Copy link
Collaborator

dtrucs commented Jun 16, 2020

If minZoom is not defined in the settings, the default value is 6 (cf https://github.com/Terralego/opp-front/blob/master/src/services/settings.js#L12)

If you put a file settings.json in the root of the app, it would override and/or complete this default settings.
After this merge of settings, the app would override and/or complete these settings with the response of the endpoint api/settings.

@submarcos
Copy link
Member Author

ok, I need to put minZoom: 4 in map backend config ?

@submarcos
Copy link
Member Author

submarcos commented Jun 16, 2020

I will put all overridable settings in default backend api config. But I think default minZoom should be 0 and maxZoom should be 22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants