Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
<!DOCTYPE html>
<meta charset=utf-8 />
<script src='//'></script>
<link href='//' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='//' rel='stylesheet'>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker {}
<div id='map'></div>
<script type='text/javascript'>
var map ='map', 'grafa.h0599p73')
.setView([45.68882429809956, -121.84547066688538], 16);
var featureLayer = L.mapbox.featureLayer()
// function to run once marker has loaded
featureLayer.on('ready', function(){
// navigate the GeoJSON to get to the coordinates
var geojson = featureLayer.getGeoJSON();
var myIcon = L.icon({
iconUrl: '',
iconSize: [75,75]
for (i = geojson.features.length - 1; i >= 0; i--) {
// add the coords in the correct order
var coords = geojson["features"][i]["geometry"]["coordinates"],
lat = coords[1],
lng = coords[0];
L.marker([lat,lng], {icon: myIcon})
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment