设置倾斜和旋转
source
open
edit
copy

Readme

A Mapbox style is a document that defines the visual appearance of a map: what data to draw, the order to draw it in, and how to style the data when drawing it. A style document is a JSON object with specific root level and nested properties. This specification defines and describes these properties.

The intended audience of this specification includes:

  • Advanced designers and cartographers who want to write styles by hand rather than use Mapbox Studio
  • Developers using style-related features of Mapbox GL JS or the Mapbox Android SDK
  • Authors of software that generates or processes Mapbox styles.

Developers using the Mapbox iOS SDK or Mapbox macOS SDKshould consult the iOS SDK API reference for platform-appropriate documentation of style-related features.

index.html
<div id="map"></div>
index.css
html,
body {
    margin: 0px;
    height: 100%;
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
}
index.js
var map = new maptalks.Map('map', {
  center: [-0.113049,51.498568],
  zoom: 14,
  baseLayer: new maptalks.TileLayer('base', {
    urlTemplate: '$(urlTemplate)',
    subdomains: $(subdomains)
  })
});