All Projects → consbio → Leaflet.UTFGrid

consbio / Leaflet.UTFGrid

Licence: ISC license
UTFGrids for Leaflet 1.0

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Leaflet.UTFGrid

leaflet-layer-tree-plugin
No description or website provided.
Stars: ✭ 31 (+93.75%)
Mutual labels:  leaflet
gpxstudio.github.io
The online GPX file editor
Stars: ✭ 233 (+1356.25%)
Mutual labels:  leaflet
MinedMap
Minecraft map renderer and viewer
Stars: ✭ 35 (+118.75%)
Mutual labels:  leaflet
protomaps.js
Lightweight vector map rendering, labeling and symbology for the web
Stars: ✭ 359 (+2143.75%)
Mutual labels:  leaflet
leaflet-draw-toolbar
Leaflet.toolbar for Leaflet.draw. Example: https://justinmanley.github.io/leaflet-draw-toolbar/examples/popup.html.
Stars: ✭ 55 (+243.75%)
Mutual labels:  leaflet
leaflet-react-track-player
This is plugin for react-leaflet. It create player for control of track. 🍃🌎⚔
Stars: ✭ 21 (+31.25%)
Mutual labels:  leaflet
Leaflet.MarkerCluster.LayerSupport
Sub-plugin for Leaflet.markercluster plugin; brings compatibility with Layers Control and other plugins
Stars: ✭ 53 (+231.25%)
Mutual labels:  leaflet
leaflet.esri
ESRI Plugin for Leaflet R Package
Stars: ✭ 31 (+93.75%)
Mutual labels:  leaflet
vaguely-rude-places
The map of Vaguely Rude Place Names
Stars: ✭ 19 (+18.75%)
Mutual labels:  leaflet
leaflet-kmz
A KMZ file loader for Leaflet Maps
Stars: ✭ 33 (+106.25%)
Mutual labels:  leaflet
Path.Drag.js
Add dragging capability to Leaflet paths.
Stars: ✭ 21 (+31.25%)
Mutual labels:  leaflet
georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: ✭ 168 (+950%)
Mutual labels:  leaflet
papyruscs
PapyrusCS renders maps of Minecraft: Bedrock Edition worlds using C#, LevelDB and leaflet.
Stars: ✭ 221 (+1281.25%)
Mutual labels:  leaflet
go-go-map
百度地图瓦片下载工具 离线地图生成
Stars: ✭ 27 (+68.75%)
Mutual labels:  leaflet
ng-leaflet
Angular 2 component for Leaflet 1.x (WIP - Help Wanted)
Stars: ✭ 16 (+0%)
Mutual labels:  leaflet
geoportal-extensions
French Geoportal Extensions for well-known javascript mapping libraries (Leaflet and OpenLayers)
Stars: ✭ 49 (+206.25%)
Mutual labels:  leaflet
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: ✭ 27 (+68.75%)
Mutual labels:  leaflet
web-maps-wcag-evaluation
Manual accessibility evaluation of popular web map tools.
Stars: ✭ 28 (+75%)
Mutual labels:  leaflet
mapr
Map species occurrence data
Stars: ✭ 34 (+112.5%)
Mutual labels:  leaflet
shuttletracker
🚐 Shuttle tracking for RPI.
Stars: ✭ 44 (+175%)
Mutual labels:  leaflet

Leaflet.UTFGrid

Provides a UTFGrid implementation for Leaflet 1.0 - 1.1.0.

L.UTFGrid provides basic UTFGrid functionality including hover and click events.

L.UTFGridCanvas provides highlighting of areas using <canvas> tiles. Optionally can highlight entire feature, not just the portion of it within a single tile.

Only supports Leaflet >= 1.0

Note: only supports browsers that provide canvas.

Install

npm install leaflet-utfgrid

Usage

Requires corslite. This is included in L.UTFGrid-min.js

Include the JavaScript:

<script src="L.UTFGrid-min.js"></script>

Example usage:

var utfgrid = L.utfGrid(url, {
    resolution: 4,
    pointerCursor: true,
    mouseInterval: 66  // Delay for mousemove events
});
utfgrid.addTo(map);

utfgrid.on("mouseover", function(e){
    // DO SOMETHING
});

utfgrid.on("mouseout", function(e){
    // DO SOMETHING
});

utfgrid.on("click", function(e){
    // DO SOMETHING
});

Using <canvas> tiles:

var utfgrid = L.utfGridCanvas(url, {
    idField: 'ID',  // Expects UTFgrid to have a property 'ID' that indicates the feature ID
    buildIndex: true,  // requires above field to be set properly
    fillColor: 'black',
    shadowBlur: 0,  // Number of pixels for blur effect
    shadowColor: null,  // Color for shadow, if present.  Defaults to fillColor.
    debug: false  // if true, show tile borders and tile keys
});

Credits:

Developed with support from the South Atlantic Landscape Conservation Cooperative

Core implementation of UTFGrid based on ideas from Leaflet.utfgrid and heavily modified to extend Leaflet's builtin L.TileLayer.

Canvas implementation inspired by Mapbox Glower.

Contributors:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].