mapbox Map Getting Case
<!DOCTYPE html> <html> <head> <meta charset='utf-8' /> <title>Mapbox显示地图案例</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.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; } #map { position: absolute; top: 0; bottom: 0; width: 100%; } </style> </head> <body> <div id='map'></div > < Script > mapboxgl.accessToken = '<your Access token here Wallpaper> ' ; var Map = new new mapboxgl.Map ({ Container: ' Map ' , // Container ID style: ' Mapbox: // Styles / Mapbox / streets- V9 ' , // stylesheet LOCATION Center: [ 116.28 , 39.54 ], // Starting position Beijing latitude and longitude coordinates Zoom: 3 , // starting zoom }); </script> </body> </html>
First there is the case, it goes to the entry mapbox.
From: mapbox Chinese official website