Mapbox Style Specification
==========================
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 <http://www.json.org/>`__ object with specific root level and nested properties. This specification defines and describes these properties.
The intended audience of this quick reference includes:
- Advanced designers and cartographers who want to write styles by hand
- GeoTools developers using the mbstyle module
- Authors of software that generates or processes Mapbox styles.
- Feature support is provided for the `Mapbox GL JS <https://www.mapbox.com/mapbox-gl-js/api/>`__, `Open Layers <https://npmjs.com/package/ol-mapbox-style>`__ and the GeoTools mbstyle module.
- Where appropriate examples have been changed to reference `GeoWebCache <http://geowebcache.org/>`__.
.. note::
The `Mapbox Style Specification <https://www.mapbox.com/mapbox-gl-style-spec>`__ is generated from the BSD `Mapbox GL JS <https://github.com/mapbox/mapbox-gl-js>`__ github repository, reproduced here with details on this GeoTools implementation.
Root Properties
---------------
Root level properties of a Mapbox style specify the map's layers, tile sources and other resources, and default values for the initial camera position when not specified elsewhere.
::
{
"version": 8,
"name": "Mapbox Streets",
"sprite": "sprites/streets-v8",
"glyphs": "{fontstack}/{range}.pbf",
"sources": {...},
"layers": [...]
}
version
~~~~~~~
*Required* :ref:`types-enum`.
Style specification version number. Must be 8.
::
"version": 8
name
~~~~
*Optional* :ref:`types-string`.
A human-readable name for the style.
::
"name": "Bright"
metadata
~~~~~~~~
*Optional*
Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions.
.. note:: *unsupported.*
center
~~~~~~
*Optional* :ref:`types-array`.
Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).
::
"center": [
-73.9749, 40.7736
]
.. note:: *unsupported*
zoom
~~~~
*Optional* :ref:`types-number`.
Default zoom level. The style zoom will be used only if the map has not
been positioned by other means (e.g. map options or user interaction).
::
"zoom": 12.5
bearing
~~~~~~~
*Optional* :ref:`types-number`. *Units in degrees. Defaults to* 0.
Default bearing, in degrees clockwise from true north. The style bearing
will be used only if the map has not been positioned by other means
(e.g. map options or user interaction).
::
"bearing": 29
.. note:: *unsupported*
pitch
~~~~~
*Optional* :ref:`types-number`. *Units in degrees. Defaults to* 0.
Default pitch, in degrees. Zero is perpendicular to the surface, for a
look straight down at the map, while a greater value like 60 looks ahead
towards the horizon. The style pitch will be used only if the map has
not been positioned by other means (e.g. map options or user
interaction).
::
"pitch": 50
light
~~~~~
The global light source.
::
"light": {
"anchor": "viewport",
"color": "white",
"intensity": 0.4
}
sources
~~~~~~~
*Required* :ref:`sources`.
Data source specifications.
::
"sources": {
"mapbox-streets": {
"type": "vector",
"url": "mapbox://mapbox.mapbox-streets-v6"
}
}
sprite
~~~~~~
*Optional* :ref:`types-string`.
A base URL for retrieving the sprite image and metadata. The extensions
``.png``, ``.json`` and scale factor ``@2x.png`` will be automatically
appended. This property is required if any layer uses the
``background-pattern``, ``fill-pattern``, ``line-pattern``,
``fill-extrusion-pattern``, or ``icon-image`` properties.
::
"sprite" : "/geoserver/styles/mark"
glyphs
~~~~~~
*Optional* :ref:`types-string`.
A URL template for loading signed-distance-field glyph sets in PBF
format. The URL must include ``{fontstack}`` and ``{range}`` tokens.
This property is required if any layer uses the ``text-field`` layout
property.
::
"glyphs": "{fontstack}/{range}.pbf"
transition
~~~~~~~~~~
*Required* :ref:`transition`.
A global transition definition to use as a default across properties.
::
"transition": {
"duration": 300,
"delay": 0
}
layers
~~~~~~
*Required* :ref:`types-array`.
Layers will be drawn in the order of this array.
::
"layers": [
{
"id": "water",
"source": "sf:roads",
"source-layer": "water",
"type": "fill",
"paint": {
"fill-color": "#00ffff"
}
}
]
Light
-----
A style's ``light`` property provides global light source for that
style.
::
"light": {
"anchor": "viewport",
"color": "white",
"intensity": 0.4
}
anchor
~~~~~~
*Optional* :ref:`types-enum`. *One of* map, viewport. *Defaults to* viewport.
Whether extruded geometries are lit relative to the map or viewport.
map
The position of the light source is aligned to the rotation of the
map.
viewport
The position of the light source is aligned to the rotation of the
viewport.
::
"anchor": "map"
.. list-table::
:widths: 19, 27, 27, 27
:header-rows: 1
* - Support
- Mapbox
- GeoTools
- OpenLayers
* - basic functionality
- >= 0.27.0
- Not yet supported
- Not yet supported
position
~~~~~~~~
*Optional* :ref:`types-array`. *Defaults to* 1.15,210,30.
Position of the light source relative to lit (extruded) geometries, in
[r radial coordinate, a azimuthal angle, p polar angle] where r
indicates the distance from the center of the base of an object to its
light, a indicates the position of the light relative to 0° (0° when
``light.anchor`` is set to ``viewport`` corresponds to the top of the
viewport, or 0° when ``light.anchor`` is set to ``map`` corresponds to
due north, and degrees proceed clockwise), and p indicates the height of
the light (from 0°, directly above, to 180°, directly below).
::
"position": [
1.5,
90,
80
]
.. list-table::
:widths: 19, 27, 27, 27
:header-rows: 1
* - Support
- Mapbox
- GeoTools
- OpenLayers
* - basic functionality
- >= 0.27.0
- Not yet supported
- Not yet supported
color
~~~~~
*Optional* :ref:`types-color`. *Defaults to* #ffffff.
Color tint for lighting extruded geometries.
.. list-table::
:widths: 19, 27, 27, 27
:header-rows: 1
* - Support
- Mapbox
- GeoTools
- OpenLayers
* - basic functionality
- >= 0.27.0
- Not yet supported
- Not yet supported
intensity
~~~~~~~~~
*Optional* :ref:`types-number`. *Defaults to* 0.5.
Intensity of lighting (on a scale from 0 to 1). Higher numbers will
present as more extreme contrast.
.. list-table::
:widths: 19, 27, 27, 27
:header-rows: 1
* - Support
- Mapbox
- GeoTools
- OpenLayers
* - basic functionality
- >= 0.27.0
- Not yet supported
- Not yet supported
.. _sources:
Sources
-------
Sources supply data to be shown on the map. The type of source is
specified by the ``"type"`` property, and must be one of vector, raster,
geojson, image, video, canvas. Adding a source won't immediately make
data appear on the map because sources don't contain styling details
like color or width. Layers refer to a source and give it a visual
representation. This makes it possible to style the same source in
different ways, like differentiating between types of roads in a
highways layer.
Tiled sources (vector and raster) must specify their details in terms of
the `TileJSON
specification <https://github.com/mapbox/tilejson-spec>`__. This can be
done in several ways:
- By supply
没有合适的资源?快使用搜索试试~ 我知道了~
geotools-18.4-userguide.zip_Geotools_mile8ai
共982个文件
html:320个
txt:319个
png:263个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 96 浏览量
2022-09-19
11:11:24
上传
评论
收藏 12.63MB ZIP 举报
温馨提示
geotools的用户指南,18.4版本的,用于Java Geotools进行可视化开发时候的指导
资源推荐
资源详情
资源评论
收起资源包目录
geotools-18.4-userguide.zip_Geotools_mile8ai (982个子文件)
.buildinfo 230B
basic.css 10KB
sphinxdoc.css 6KB
geotools.css 5KB
pygments.css 4KB
locations.csv 630B
locations1.csv 541B
streams.dbf 4KB
open_dialog.gif 33KB
font_dialog.gif 26KB
style_dialog.gif 18KB
geometry_curve.gif 17KB
geodesy.gif 14KB
geomajas_logo.gif 5KB
udig_64.gif 2KB
ajax-loader.gif 673B
spec.html 230KB
faq.html 208KB
strategy.html 189KB
upgrade.html 183KB
function_list.html 138KB
geometry.html 123KB
faq.html 120KB
style.html 117KB
tutorial.html 102KB
filter.html 99KB
filter.html 87KB
style.html 84KB
collection.html 83KB
index.html 77KB
geometrycrs.html 77KB
internal.html 70KB
image.html 70KB
store.html 70KB
eclipse.html 67KB
source.html 66KB
query.html 65KB
ysld.html 64KB
csv2shp.html 61KB
build.html 60KB
affinetransform.html 60KB
bindings.html 57KB
factory.html 56KB
crs.html 56KB
internal.html 55KB
featuresource.html 53KB
write.html 53KB
feature.html 52KB
netbeans.html 52KB
coverage.html 47KB
read.html 46KB
maven.html 44KB
geometry.html 43KB
envelope.html 43KB
cs.html 43KB
pregeneralized.html 43KB
intellij.html 40KB
optimisation.html 39KB
grid.html 39KB
data.html 37KB
datastore.html 36KB
use.html 36KB
index.html 36KB
filter.html 36KB
code.html 36KB
wizard.html 35KB
intro.html 35KB
arcsde.html 33KB
shape.html 32KB
wps.html 31KB
index.html 31KB
application.html 30KB
wms.html 30KB
jmappane.html 29KB
style.html 29KB
rcp.html 29KB
axis.html 29KB
app-schema.html 28KB
grid.html 28KB
dim9.html 28KB
function.html 27KB
snap.html 27KB
oracle.html 27KB
gtrenderer.html 26KB
index.html 26KB
faq.html 25KB
jaiext.html 25KB
internal.html 25KB
customized.html 25KB
tips.html 24KB
datastore.html 24KB
wmts.html 24KB
csv.html 23KB
cql.html 23KB
implement.html 23KB
format.html 23KB
jts.html 22KB
faq.html 22KB
export.html 22KB
geopackage.html 22KB
共 982 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
邓凌佳
- 粉丝: 63
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功