Skip to content

Instantly share code, notes, and snippets.

View danwild's full-sized avatar

Dan Wild danwild

View GitHub Profile
@danwild
danwild / leaflet-glify-layer.html
Last active April 8, 2021 04:15
Leaflet.glify.layer example
<!doctype html>
<html>
<head>
<title>Leaflet.glify.layer</title>
<meta charset="utf-8">
<style>
html, body {
height: 100%;
padding: 0;
margin: 0;
@danwild
danwild / gliffy-demo-fix.html
Last active March 29, 2021 06:48
Leaflet.glify conflict example - fixed using peer/external leaflet definition (https://github.com/danwild/Leaflet.glify/commit/a2a6acd2392e1619e1bbc2bd7aa95deb69954db6)
<!DOCTYPE html>
<!-- saved from url=(0062)https://leaflet.github.io/Leaflet.draw/docs/examples/full.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Leaflet.glify conflict example</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.draw.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.draw.css" />
@danwild
danwild / glify-demo.html
Last active March 29, 2021 06:17
Leaflet.glify conflict example
<!DOCTYPE html>
<!-- saved from url=(0062)https://leaflet.github.io/Leaflet.draw/docs/examples/full.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Leaflet.glify conflict example</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.draw.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.draw.css" />
@danwild
danwild / deck.gl.html
Last active March 18, 2021 04:31
Demo of deck.gl rendering
<!DOCTYPE html>
<head>
<title>DeckGL GeoJSON</title>
<script src="https://unpkg.com/deck.gl@latest/dist.min.js"></script>
<!-- optional if mapbox base map is needed -->
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css' rel='stylesheet' />
<!-- optional for color scale -->
<script src="https://unpkg.com/[email protected]/chroma.js"></script>
@danwild
danwild / index.html
Created October 2, 2020 00:26
Testing plotty domain scaling
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Plotty test</title>
<script src="https://unpkg.com/[email protected]/dist/plotty.js"></script>
</head>
<body>
<h1>Plotty domain</h1>
<p>Testing if plotty correctly scales color domain across a clipped range?</p>
@danwild
danwild / L.CanvasLayer.js
Created October 1, 2020 23:54
Repro for plotty color scale domain issue (eliminating leaflet-geotiff-2 as the culprit)
/*
Generic Canvas Layer for leaflet 0.7 and 1.0-rc,
copyright Stanislav Sumbera, 2016 , sumbera.com , license MIT
originally created and motivated by L.CanvasOverlay available here: https://gist.github.com/Sumbera/11114288
*/
// -- L.DomUtil.setTransform from leaflet 1.0.0 to work on 0.0.7
//------------------------------------------------------------------------------
if (!L.DomUtil.setTransform) {
@danwild
danwild / plotty-test.html
Created October 1, 2020 04:05
Testing plotty color domain
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<script src="https://unpkg.com/[email protected]/dist/plotty.js"></script>
</head>
<body>
<h1>Plotty domain vs display ranges</h1>
<p>Testing if plotty correctly scales color domain across a clipped display range?</p>
We couldn’t find that file to show.
This file has been truncated, but you can view the full file.
var keyframes = {"2015-12-20T00:00:00.000Z":[{"type":"Feature","geometry":{"type":"Point","coordinates":[227.539003,-38.071779,0.25]},"properties":{"id":227,"decay_value":1,"time":"2015-12-20T00:00:00.000Z","age":0}},{"type":"Feature","geometry":{"type":"Point","coordinates":[227.539393,-38.07169,0.25]},"properties":{"id":227,"decay_value":1,"time":"2015-12-20T00:00:00.000Z","age":1}},{"type":"Feature","geometry":{"type":"Point","coordinates":[227.539784,-38.071602,0.25]},"properties":{"id":227,"decay_value":1,"time":"2015-12-20T00:00:00.000Z","age":2}},{"type":"Feature","geometry":{"type":"Point","coordinates":[227.540175,-38.071512,0.25]},"properties":{"id":227,"decay_value":1,"time":"2015-12-20T00:00:00.000Z","age":3}},{"type":"Feature","geometry":{"type":"Point","coordinates":[227.540566,-38.071422,0.25]},"properties":{"id":227,"decay_value":1,"time":"2015-12-20T00:00:00.000Z","age":4}},{"type":"Feature","geometry":{"type":"Point","coordinates":[227.540957,-38.071332,0.25]},"properties":{"id":227,"decay_v
@danwild
danwild / BIG_GISTS.md
Created September 11, 2020 03:12
Gist about making gists (large files from bash)