Skip to content

Instantly share code, notes, and snippets.

@angelaperrone
Created February 26, 2016 20:32
Show Gist options
  • Save angelaperrone/ef70ba34855694b0725f to your computer and use it in GitHub Desktop.
Save angelaperrone/ef70ba34855694b0725f to your computer and use it in GitHub Desktop.
<!--REFERENCES:
http://leafletjs.com/examples/choropleth.html
Mimi Onuoha https://github.com/MimiOnuoha/art-of-digital-mapping-ITP2016/tree/master/week3
Data from: http://www.infoplease.com/ipa/A0762137.html
Coordinate/Json Data: https://github.com/johan/world.geo.json
https://jsonformatter.curiousconcept.com/
Conversion from Json to CRV:
-->
<!DOCTYPE html>
<head>
<style>
body {
padding: 0;
margin: 0;
height: 100%;
}
html, #map{
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
</style>
<title> Disney Parks Around the World with GeoJson and GeoSearch </title>
<script src='https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.css' rel='stylesheet' />
<!-- Add code for geo search-->
<script src="../src/js/l.control.geosearch.js"></script>
<script src="../src/js/l.geosearch.provider.google.js"></script>
<link rel="stylesheet" href="../src/css/l.geosearch.css" />
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v0.4.0/MarkerCluster.css' rel='stylesheet' />
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-markercluster/v0.4.0/MarkerCluster.Default.css' rel='stylesheet' />
<script src='//api.tiles.mapbox.com/mapbox.js/plugins/leaflet-omnivore/v0.2.0/leaflet-omnivore.min.js'></script>
</head>
<body>
<div id = "map"></div>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoiYW5nZWxhaXRwIiwiYSI6ImNpa2l3NXhwazA1MnJ2a2ttcjVvd2RiajUifQ.ynbAJt9SR6tJraofwJNTng';
var map = L.mapbox.map('map', 'mapbox.wheatpaste').setView([33.835152,-117.9865287], 3);
// new L.Control.GeoSearch({
// provider: new L.GeoSearch.Provider.Google()
// }).addTo(map);
omnivore.csv("disneyParks.csv").addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment