Built with blockbuilder.org
Last active
June 22, 2017 21:41
-
-
Save FabioZabala/e5dc6dbc13118219df14ff0245ef5565 to your computer and use it in GitHub Desktop.
COPAIBA
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
license: mit |
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.38.0/mapbox-gl.js'></script> | |
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.38.0/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.eyJ1IjoiZmFiaW9mejE5OTAiLCJhIjoiY2o0NmY0cmU2MjJhaTM5b2I4Nmgybm1nbCJ9.Y66nlqj71gB-hi-TVR0I2A' | |
var map = new mapboxgl.Map({ | |
container: 'map', // container id | |
style: 'mapbox://styles/fabiofz1990/cj46fjy4k02ri2rp86i11y064' | |
}); | |
map.on('load', function () { | |
map.addLayer({ | |
'id': 'Mineria', | |
'type': 'fill', | |
'source': { | |
'type': 'geojson', | |
'data': 'fabiofz1990.9s5pman2' | |
}, | |
'layout': {}, | |
'paint': { | |
'fill-color': '#f08', | |
'fill-opacity': 0.4 | |
} | |
// This is the important part of this example: the addLayer | |
// method takes 2 arguments: the layer as an object, and a string | |
// representing another layer's name. if the other layer | |
// exists in the stylesheet already, the new layer will be positioned | |
// right before that layer in the stack, making it possible to put | |
// 'overlays' anywhere in the layer stack. | |
},); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment