Created
May 11, 2017 12:01
-
-
Save syousif94/8753c6f4525674d1548a14c048ebe149 to your computer and use it in GitHub Desktop.
map box gl performance
This file contains hidden or 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"/> | |
| <script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.js"></script> | |
| <link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.css" rel="stylesheet" /> | |
| <style> | |
| body { margin:0; padding:0; display: flex; justify-content: center; align-items: center; } | |
| #map { height: 768px; width: 1024px; } | |
| </style> | |
| </head> | |
| <body> | |
| <div id="map"></div> | |
| <script> | |
| mapboxgl.accessToken = 'pk.eyJ1IjoiaGFtZWVkbyIsImEiOiJHMnhTMDFvIn0.tFZs7sYMghY-xovxRPNNnw'; | |
| if (!mapboxgl.supported()) { | |
| alert('Your browser does not support Mapbox GL'); | |
| } else { | |
| var map = new mapboxgl.Map({ | |
| container: 'map', | |
| style: 'mapbox://styles/mapbox/streets-v9', | |
| center: [-74.50, 40], | |
| zoom: 9 | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment