Skip to content

Instantly share code, notes, and snippets.

View zross's full-sized avatar

Zev Ross zross

View GitHub Profile
@zross
zross / businesses.json
Last active April 4, 2024 23:29
Leaflet.js Tips, Step 6 (add hovers)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / businesses.json
Last active June 27, 2023 13:36
Leaflet.js Tips, Step 7 (filter buttons)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / businesses.json
Last active August 29, 2015 14:07
Leaflet.js Tips, Step 5 (specialized icons)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / businesses.json
Last active January 4, 2018 08:11
Leaflet.js Tips, Step 4 (filter geojson markers)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / businesses.json
Last active March 25, 2024 14:08
Leaflet.js Tips, Step 3 (markers and fitBounds)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / businesses.json
Last active April 29, 2022 02:42
Leaflet.js Tips, Step 2 (getJSON)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zross
zross / index.html
Created October 21, 2014 16:18
Example of Google Places Library (get place details if you have place ID)
<!DOCTYPE html>
<html>
<head>
<title>Place details</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@zross
zross / index.html
Created October 21, 2014 16:13
Example of Google Places Library (grab cafes within 500m)
<!DOCTYPE html>
<html>
<head>
<title>Place searches</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@zross
zross / index.html
Last active July 13, 2017 04:45
Leaflet.js Tips, Step 1 (boilerplate)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.js'></script>
<style type="text/css">
#map {
width: 600px;
@zross
zross / knitr_hook.R
Last active May 4, 2016 16:20
Not completely finished hook to add fragment tags to RMarkdown code chunks (slidify, revealjs, R)
s0 <- knitr::knit_hooks$get('source')
o0 <- knitr::knit_hooks$get('output')
p0 <- knitr::knit_hooks$get('plot')
knitr::knit_hooks$set(
list(
source=function(x,options){
if (is.null(options$class)) s0(x, options)