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

Add some params to hash #32

Open
absemetov opened this issue Oct 30, 2013 · 4 comments
Open

Add some params to hash #32

absemetov opened this issue Oct 30, 2013 · 4 comments

Comments

@absemetov
Copy link

Like this #zoom/lat/lng/param

@tmcw
Copy link
Contributor

tmcw commented Dec 21, 2013

This could use lots more detail to explain what params are, why they should be added to the hash, and so on. Otherwise just looks like a duplicate of #10

@absemetov
Copy link
Author

http://maps.nadabs.org.ua/saky/#1
http://maps.nadabs.org.ua/saky/#filter/2
I change this code:

L.Hash.parseHashPlace = function(hash) {
        if(hash.indexOf('#') === 0) {
            hash = hash.substr(1);
        }
        var args = hash.split("/");

        if (args.length == 1) {
            var id_place = parseInt(args[0], 10);
            if (isNaN(id_place)) {
                return false;
            } else {
                return true;
            }
        } if (args.length == 2) {
          return true;
        } else {
            return false;
        }
    };

@geospatialem
Copy link

geospatialem commented Sep 19, 2016

Hi all, is there any update to this possible enhancement? I'm looking to do the same thing based on a geojson/json loaded within the map.

For example, instead of:
http://a-map-url.com/#2/0.0/0.0

The URL could be configured to another dataset, such as a zip code, like so:
http://a-map-url.com/55111

It could still load the zoom, lat, and long on-load as long as those parameters weren't a requirement to get to the url, like so:
http://a-map-url.com/55111/#14/44.8824/-93.2283

Thank you in advance, and thank you to all the contributors, this is an awesome plug-in!!

@geospatialem
Copy link

P.S. I forgot to mention it in my earlier post, but I'm willing to help tackle this if others agree this is a needed enhancement and can help lead me down the path to make 'er happen. 👍

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

3 participants