Giter Site home page Giter Site logo

missinglink / leaflet-spatial-prefix-tree Goto Github PK

View Code? Open in Web Editor NEW
53.0 8.0 18.0 586 KB

Leaflet plugin for visualizing spatial prefix trees, quadtree and geohash

Home Page: http://missinglink.github.io/leaflet-spatial-prefix-tree/

JavaScript 86.92% CSS 5.21% HTML 7.87%

leaflet-spatial-prefix-tree's Introduction

leaflet-spatial-prefix-tree's People

Contributors

missinglink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet-spatial-prefix-tree's Issues

upgrade bootstrap and jquery

Tested and was fine, with:

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script>

The leafletJs need some study, not so easy to upgrade.

Actually make it a plugin

It's not actually a 'plugin', more of a demo.. if someone wants to pluginify it, I'd be happy to merge the PR.

Openning the map with a Geohash defining the location

I included the javascript below in the index.html and is working fine (!). Try to navigate with index.html#6gycfqf0 or index.html#geohash:6gycfqf0 with this javascript:

<script>
var hash = window.location.hash
hash = hash.replace('#','');
if (hash) {
	// check prefixes "geohash:" (default) or "quadtree:" or "slippy:"
	var prefix = ['geohash','quadtree','slippy'];
	var selected = 'geohash';
	var pos = hash.indexOf(':');
	if (pos != -1) {
		selected = hash.substr(0, pos)
		if (prefix.indexOf(selected) == -1) 
                     alert("HASH ERROR: no known "+selected);
 		hash = hash.substr(pos+1)
        }
	alert("OK, we can see the map at \n"+hash);	
}
</script>

To continue: how to change by javascript the map location?

PS: if we can translate a Geohash code and the position of the map by Javascript, we can display map by the URL-supplied Geohash.


See also #4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.