Skip to content

Instantly share code, notes, and snippets.

@joshuahouston
Last active August 29, 2015 14:21
Show Gist options
  • Save joshuahouston/fb918a049143cdfcd784 to your computer and use it in GitHub Desktop.
Save joshuahouston/fb918a049143cdfcd784 to your computer and use it in GitHub Desktop.
GeoJson Linestring
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[
-135.172945,
57.037946
],
[
-135.173001,
57.037967
],
[
-135.172998,
57.037983
],
[
-135.17269,
57.037947
],
[
-135.172437,
57.037746
],
[
-135.172655,
57.037426
],
[
-135.17234,
57.037139
],
[
-135.172061,
57.037042
],
[
-135.171362,
57.036464
],
[
-135.171012,
57.036429
],
[
-135.17066,
57.036191
],
[
-135.170002,
57.036088
],
[
-135.169686,
57.036037
],
[
-135.169236,
57.035741
],
[
-135.169223,
57.03537
],
[
-135.168933,
57.035432
],
[
-135.168544,
57.035343
],
[
-135.168545,
57.035342
],
[
-135.168544,
57.035343
],
[
-135.168545,
57.035342
],
[
-135.168536,
57.035332
],
[
-135.168535,
57.035332
],
[
-135.168536,
57.035332
],
[
-135.168535,
57.035332
],
[
-135.168366,
57.035064
],
[
-135.168584,
57.034694
],
[
-135.168545,
57.034204
],
[
-135.168411,
57.033998
],
[
-135.168653,
57.033832
],
[
-135.170092,
57.033297
],
[
-135.170561,
57.033238
],
[
-135.170731,
57.032999
],
[
-135.171065,
57.032963
],
[
-135.171068,
57.032962
],
[
-135.171065,
57.032963
],
[
-135.171068,
57.032962
],
[
-135.17103,
57.03299
],
[
-135.170996,
57.033006
],
[
-135.170899,
57.032973
],
[
-135.17103,
57.03299
],
[
-135.170913,
57.032784
],
[
-135.17154,
57.032649
],
[
-135.171425,
57.032161
],
[
-135.171754,
57.031927
],
[
-135.171734,
57.031555
],
[
-135.171983,
57.031353
],
[
-135.172378,
57.031322
],
[
-135.172344,
57.030967
],
[
-135.172345,
57.030967
],
[
-135.172344,
57.030967
],
[
-135.172345,
57.030968
],
[
-135.172345,
57.030967
],
[
-135.172345,
57.030968
],
[
-135.172151,
57.030818
],
[
-135.171697,
57.030716
],
[
-135.171436,
57.030341
],
[
-135.171687,
57.030163
],
[
-135.171466,
57.029854
],
[
-135.17241,
57.029874
],
[
-135.172819,
57.029728
],
[
-135.173224,
57.029804
],
[
-135.173225,
57.029804
],
[
-135.173224,
57.029803
],
[
-135.173225,
57.029804
],
[
-135.173226,
57.029805
],
[
-135.173224,
57.029804
],
[
-135.173224,
57.029803
],
[
-135.173082,
57.029473
],
[
-135.173082,
57.029472
],
[
-135.173082,
57.029473
],
[
-135.173082,
57.029472
],
[
-135.172993,
57.029347
],
[
-135.172993,
57.029348
],
[
-135.172994,
57.029348
],
[
-135.172993,
57.029348
],
[
-135.172994,
57.029348
],
[
-135.172993,
57.029347
],
[
-135.172893,
57.029151
],
[
-135.172893,
57.02915
],
[
-135.172893,
57.029151
],
[
-135.172893,
57.02915
],
[
-135.172866,
57.028777
],
[
-135.172872,
57.028778
],
[
-135.172873,
57.028778
],
[
-135.172872,
57.028778
],
[
-135.172873,
57.028778
],
[
-135.172866,
57.028777
],
[
-135.172459,
57.028725
],
[
-135.17258,
57.028483
],
[
-135.172578,
57.028483
],
[
-135.17258,
57.028483
],
[
-135.172578,
57.028483
],
[
-135.172836,
57.028225
],
[
-135.172752,
57.027971
],
[
-135.172904,
57.027554
],
[
-135.173306,
57.027529
],
[
-135.173814,
57.027263
],
[
-135.173951,
57.026883
],
[
-135.174503,
57.02682
],
[
-135.175008,
57.026859
],
[
-135.175173,
57.026832
],
[
-135.175405,
57.026791
],
[
-135.175404,
57.026791
],
[
-135.175405,
57.026791
],
[
-135.175404,
57.026791
],
[
-135.175402,
57.026783
],
[
-135.175403,
57.026783
],
[
-135.175401,
57.026783
],
[
-135.175402,
57.026783
],
[
-135.175403,
57.026783
],
[
-135.175402,
57.026783
],
[
-135.175401,
57.026783
],
[
-135.175008,
57.026859
],
[
-135.174948,
57.02625
],
[
-135.174672,
57.026146
],
[
-135.174581,
57.025823
],
[
-135.174581,
57.025821
],
[
-135.174581,
57.025823
],
[
-135.174581,
57.025821
],
[
-135.174864,
57.025355
],
[
-135.175462,
57.025239
],
[
-135.176217,
57.025229
],
[
-135.17647,
57.025373
],
[
-135.176774,
57.025992
],
[
-135.177524,
57.026204
],
[
-135.177813,
57.026211
],
[
-135.178621,
57.026608
]
]
}
}
]
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Bear Mountain</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
}
</style>
</head>
<body>
<div id='map'></div>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoiamZhY3RvcnkiLCJhIjoiZXdJam1yZyJ9.-AOTWD0gk1_3wuciI3DbsQ';
var map = L.mapbox.map('map', 'jfactory.l0diaa22').setView([57.037, -135.178], 15);
$.getJSON('gps.json', function(data) {
var geojson = L.geoJson(data);
geojson.addTo(map);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment