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

map extent #786

Open
robibrazze opened this issue Mar 2, 2018 · 6 comments
Open

map extent #786

robibrazze opened this issue Mar 2, 2018 · 6 comments

Comments

@robibrazze
Copy link

I setting in box initial map extent "set from project properties"
but in the webmap it is possible move the background' map
out of the setting.
I tried setting "set from map canvas" but it is the same.

Tanks

@rldhont
Copy link
Collaborator

rldhont commented Mar 2, 2018

Can you provide some URL and configuration ?
Thanks

@robibrazze
Copy link
Author

@rldhont
Copy link
Collaborator

rldhont commented Mar 2, 2018

I invite you to define a larger max scale. You defined the max scale to 70000, but this scale is to small to covering the extent you defined.

@robibrazze
Copy link
Author

Ok, now the max scale is 100000, but I would like the map to be blocked at the viewing limits
http://94.130.187.94/webgis/index.php/view/map/?repository=repo1&project=fontanili1

@rldhont
Copy link
Collaborator

rldhont commented Mar 3, 2018

We have made the restrictedExtent olarger than the mapExtent to easily explore the limit of the map.
If you want to have that the restrictedExtent is the same as the mapExtent, you can use your one JavaScript file to do it. https://docs.3liz.com/en/publish/advanced_lizmap_config.html#adding-your-own-javascript

lizMap.events.on({
   uicreated: function(e) {
      lizMap.map.restrictedExtent = lizMap.map.maxExtent;
   }
});

@wojtek19022
Copy link

wojtek19022 commented Sep 24, 2024

I've send this piece of script to this repo: https://github.com/3liz/lizmap-javascript-scripts

Waiting for acceptance of PR 3liz/lizmap-javascript-scripts#83

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

No branches or pull requests

3 participants