Crashes in Chrome Version 38.0.2125.104
Last active
August 29, 2015 14:08
-
-
Save tmcw/e256d5b639d3b4705cdc to your computer and use it in GitHub Desktop.
Crashing test case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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.3.1/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.3.1/mapbox-gl.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> | |
mapboxgl.accessToken = 'pk.eyJ1IjoidG1jdyIsImEiOiJwRTNGUVBnIn0.I5Miy6PRRoBIqjxA1JfcyQ'; | |
var map = new mapboxgl.Map({ | |
container: 'map', | |
style: 'style.json', | |
center: [0, 0], | |
zoom: 1 | |
}); | |
mapboxgl.util.getJSON('./tiles.geojson', function(err, data) { | |
var sourceObj = new mapboxgl.GeoJSONSource({ data: data }); | |
map.addSource('tiles', sourceObj); | |
}); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 5, | |
"sprite": "https://www.mapbox.com/mapbox-gl-styles/sprites/outdoors", | |
"glyphs": "mapbox://fontstack/{fontstack}/{range}.pbf", | |
"constants": { | |
"@land": "rgb(244,239,225)", | |
"@water": "#cdd" | |
}, | |
"sources": { | |
"mapbox": { | |
"type": "vector", | |
"url": "mapbox://mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v6-dev", | |
"maxzoom": 15 | |
} | |
}, | |
"layers": [{ | |
"id": "background", | |
"style": { | |
"background-color": "@land" | |
}, | |
"style.night": { | |
"background-color": "@land_night" | |
}, | |
"type": "background" | |
}, { | |
"id": "water", | |
"source": "mapbox", | |
"source-layer": "water", | |
"style": { | |
"fill-color": "@water", | |
"fill-outline-color": "#a2bdc0" | |
}, | |
"style.night": { | |
"fill-color": "@water_night", | |
"fill-outline-color": "@water_dark_night" | |
}, | |
"type": "fill" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment