Skip to content

Instantly share code, notes, and snippets.

// ==ClosureCompiler==
// @compilation_level ADVANCED_OPTIMIZATIONS
// @use_closure_library true
// ==/ClosureCompiler==
/**
* @define {boolean}
*/
ol.API = true;
@klokan
klokan / nature-list.txt
Last active December 16, 2015 15:39
The list of renamed Nature's self printing files.
C.325.I.001
C.325.I.002
C.325.I.003
C.325.I.004
C.325.I.005
C.325.I.006
C.325.I.007
C.325.I.008
C.325.I.009
C.325.I.010
@klokan
klokan / index.html
Created August 8, 2013 01:11
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@klokan
klokan / index.html
Created August 9, 2013 01:08
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@klokan
klokan / index.html
Created August 9, 2013 01:08
via:geojson.io
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
@klokan
klokan / google-maps-places-api-v3-autocomplete-select-first-option-on-enter.js
Created January 13, 2014 21:20
Google Maps Places API V3 autocomplete select first option on Enter
var searchBox = new google.maps.places.SearchBox(document.getElementById('searchinput'));
google.maps.event.addListener(searchBox, 'places_changed', function() {
var place = searchBox.getPlaces()[0];
if (!place.geometry) return;
if (place.geometry.viewport) {
map.fitBounds(place.geometry.viewport);
} else {
#! /bin/bash
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
#
# Requirements:
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/
# * convert (image-magick)
#
# Reference info:
# http://www.mapbox.com/blog/putting-landsat-8-bands-to-work/
@klokan
klokan / arcgis.html
Last active September 3, 2016 06:58
ArcGIS MapTiler
<!DOCTYPE html>
<html>
<head>
<title>ArcGIS JavaScript API viewer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #map {width:100%; height:100%; margin:0; padding:0; }
</style>
<script src="http://js.arcgis.com/3.8/"></script>
@klokan
klokan / ol3cesium_camera.svg
Created August 8, 2014 09:05
OLCesium Camera
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@klokan
klokan / svgpoly2imagemap.py
Created November 10, 2014 10:41
svg polygon to html image map
import sys
print """<map id ="map" name="map">"""
for s in sys.stdin:
x, y = 0, 0
out = ""
for i,j in [ map(float, r.split(',')) for r in s.split() ]:
x += i
y += j