Skip to content

Instantly share code, notes, and snippets.

@nrenner
nrenner / 62564.json
Last active December 16, 2015 00:48
Inverse fill area
{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[665118.6,6585646.2],[665128.5,6585656.4],[665149.7,6585726.9],[665149.7,6585753.4],[665157.7,6585844.1],[665174.8,6585960.5],[665186.3,6586033.5],[665186.8,6586072.5],[665194.7,6586118.5],[665205.9,6586194.8],[665208.5,6586244.2],[665204.8,6586330.3],[665216.5,6586406.4],[665246.6,6586469.8],[665277.7,6586522.7],[665306.6,6586563.3],[665321.1,6586585.6],[665341.4,6586613.3],[665360.3,6586656.2],[665394.5,6586745.4],[665456.5,6586883.5],[665460.2,6586882.1],[665465,6586878.3],[665506.8,6586845.4],[665545.9,6586814.6],[665581.6,6586863.6],[665584.4,6586866.3],[665605.8,6586886.6],[665623.2,6586903.3],[665625.9,6586906.5],[665672.5,6586963.1],[665706.2,6587001.3],[665712.8,6587012.7],[665710.6,6587049.6],[665708.7,6587081.8],[665708.3,6587088.2],[665707.9,6587115],[665707.3,6587148.6],[665706.8,6587177.5],[665707,6587182.6],[665707.6,6587197.9],[665709.9,6587245.9],[665715,6587261.4],[665719.1,6587273.7],[665733,6587307.8],[665768.4,6587362],[665789
@nrenner
nrenner / aachen.json
Last active December 16, 2015 03:30
Inverse fill area (Nominatim json)
[{"place_id":"97950220","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"62564","boundingbox":["50.6621398925781","50.8572578430176","5.97486209869385","6.21807479858398"],"lat":"50.7762954","lon":"6.0838209","display_name":"Aachen, St\u00e4dteregion Aachen, Regierungsbezirk K\u00f6ln, Nordrhein-Westfalen, Deutschland, Europ\u00e4ischen Union","class":"boundary","type":"administrative","importance":0.74527037258257,"icon":"http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png","geojson":{"type":"Polygon","coordinates":[[[5.9748624,50.7980367],[5.974951,50.7980946],[5.9751418,50.7984947],[5.9751411,50.7986452],[5.9752135,50.7991605],[5.9753669,50.7998211],[5.9754705,50.8002358],[5.9754749,50.8004571],[5.9755453,50.8007185],[5.9756463,50.8011516],[5.9756699,50.8014317],[5.9756368,50.8019206],[5.9757419,50.8023527],[5.9760118,50.802713],[5.9762914,50.8030128],[5.9765505,50.8032436],[5.976
@nrenner
nrenner / 62428.geojson
Last active March 24, 2023 11:40
Inverse fill area (GeoJSON)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nrenner
nrenner / index.html
Last active December 17, 2015 15:59
rivers-leaflet-geojson-nopopup (optimized)
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0"/>
<title>Leaflet vector tile map of rivers</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
@nrenner
nrenner / index.html
Created May 23, 2013 18:55
rivers-leaflet-geojson-nopopup (tilelayer dev)
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0"/>
<title>Leaflet vector tile map of rivers</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
@nrenner
nrenner / index.html
Last active December 28, 2015 17:19
rivers-leaflet-geojson-nopopup (non-optimized)
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0"/>
<title>Leaflet vector tile map of rivers</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" />
@nrenner
nrenner / index.html
Created December 30, 2013 17:15
rivers leaflet-tilelayer-vector v0.7.1
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0"/>
<title>Leaflet vector tile map of rivers - v0.7.1</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js?2"></script>
<script src="http://www.somebits.com/rivers/lib/leaflet-hash.js"></script>
@nrenner
nrenner / index.html
Created December 30, 2013 17:16
rivers leaflet-tilelayer-vector master (v0.8-dev)
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0"/>
<title>Leaflet vector tile map of rivers - master (v0.8-dev)</title>
<link rel="stylesheet" href="http://nrenner.github.io/leaflet-tilelayer-vector/bower_components/leaflet/leaflet.css" />
<script src="http://nrenner.github.io/leaflet-tilelayer-vector/bower_components/leaflet/leaflet.js"></script>
<script src="http://www.somebits.com/rivers/lib/leaflet-hash.js"></script>
@nrenner
nrenner / app.css
Last active April 25, 2021 21:29
leaflet-routing YOURS demo
#map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
div.line-mouse-marker {
background-color: #ffffff;
// Load data tiles from an AJAX data source
L.TileLayer.Ajax = L.TileLayer.extend({
_requests: [],
_addTile: function (tilePoint) {
var tile = { datum: null, processed: false };
this._tiles[tilePoint.x + ':' + tilePoint.y] = tile;
this._loadTile(tile, tilePoint);
},
// XMLHttpRequest handler; closure over the XHR object, the layer, and the tile
_xhrHandler: function (req, layer, tile, tilePoint) {