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

Init Origo with a mapState #1716

Closed
jokd opened this issue Mar 20, 2023 · 0 comments · Fixed by #1717
Closed

Init Origo with a mapState #1716

jokd opened this issue Mar 20, 2023 · 0 comments · Fixed by #1717

Comments

@jokd
Copy link
Contributor

jokd commented Mar 20, 2023

Is your feature request related to a problem? Please describe.
It is useful to be able to add a mapState-parameter in the init params instead of adding a hash to the URL.

Describe the solution you'd like

Configured like this:
  var origo = Origo('index.json', {
    mapState: {
    "layers": [
        "osm/v/1/s/0/o/100",
        "origo-mask/v/1/s/0/o/25",
        "origo-cities/v/1/s/0/o/100"
    ],
    "center": "1810000,8390000",
    "zoom": "8.7",
    "legend": "expanded",
    "map": "index"
    }
  });

Describe alternatives you've considered
Use the available functionlaity with hash or mapState but they both have their drawbacks for this application

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

Successfully merging a pull request may close this issue.

1 participant