Skip to content

Instantly share code, notes, and snippets.

View ryanbaumann's full-sized avatar
🤙
Innovative location experiences

Ryan Baumann ryanbaumann

🤙
Innovative location experiences
View GitHub Profile
@ryanbaumann
ryanbaumann / index.html
Last active February 3, 2023 08:05
Example of loading large geojson into Mapbox GL JS
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v2.6.0/mapbox-gl.css' rel='stylesheet' />
<link href='https://www.mapbox.com/base/latest/base.css' rel='stylesheet' />
@ryanbaumann
ryanbaumann / .DS_Store
Last active September 1, 2016 01:23
geocoder api - null results s air worldwide
@ryanbaumann
ryanbaumann / index.html
Last active August 25, 2016 16:52 — forked from andrewharvey/index.html
Mapbox GL JS Marker Offset Example
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.22.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.22.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query