simplestyle
simplestyle-spec
A simple specification for styling GeoJSON data.
Versions
1.1.0
Adds properties to permit styling of Polygon and LineString types.
1.0.0
Initial release: this defines only three keys and an example encoding.
Implementations
Authors
- Tom MacWright
- Will White
- Dave Cole
- Young Hahn
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
simplestyle-spec
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
1. Purpose
This specification attempts to create a standard for styling geospatial data that can be shared across clients.
2. File format
simplestyle is a set of agreed-upon 'special values' in the pre-existing GeoJSON data standard that define styles. As such, files implementing simplestyle are by definition valid GeoJSON files and valid JSON files.
3. Client Behavior
The entirety of the simplestyle spec is optional, so any combination of specified properties are valid. When properties are not given, the defaults below are assumed by implementations.
Multi features are assumed to have the same styling rules as single features--- MultiPoints are styled as Points, MultiPolygons as Polygons, and MultiLineStrings as LineStrings. marker styles do not affect stroke and fill rules and vice versa. The behavior of fill rules on LineStrings is undefined, but implementations are encouraged to set fill to 0 by default in that case.
// COLOR RULES
// Colors can be in short form:
// "#ace"
// or long form
// "#aaccee"
// with or without the # prefix.
// Colors are interpreted the same as in CSS,
// in #RRGGBB and #RGB order.
// But other color formats or named colors
// are not supported
{
"type": "FeatureCollection",
"features": [{ "type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
// OPTIONAL: default ""
// A title to show when this item is clicked or
// hovered over
"title": "A title", // OPTIONAL: default ""
// A description to show when this item is clicked or
// hovered over
"description": "A description", // OPTIONAL: default "medium"
// specify the size of the marker. sizes
// can be different pixel sizes in different
// implementations
// Value must be one of
// "small"
// "medium"
// "large"
"marker-size": "medium", // OPTIONAL: default ""
// a symbol to position in the center of this icon
// if not provided or "", no symbol is overlaid
// and only the marker is shown
// Allowed values include
// - Icon ID from the Maki project at http://mapbox.com/maki/
// - An integer 0 through 9
// - A lowercase character "a" through "z"
"marker-symbol": "bus", // OPTIONAL: default "7e7e7e"
// the marker's color
//
// value must follow COLOR RULES
"marker-color": "#fff", // OPTIONAL: default "555555"
// the color of a line as part of a polygon, polyline, or
// multigeometry
//
// value must follow COLOR RULES
"stroke": "#555555", // OPTIONAL: default 1.0
// the opacity of the line component of a polygon, polyline, or
// multigeometry
//
// value must be a floating point number greater than or equal to
// zero and less or equal to than one
"stroke-opacity": 1.0, // OPTIONAL: default 2
// the width of the line component of a polygon, polyline, or
// multigeometry
//
// value must be a floating point number greater than or equal to 0
"stroke-width": 2, // OPTIONAL: default "555555"
// the color of the interior of a polygon
//
// value must follow COLOR RULES
"fill": "#555555", // OPTIONAL: default 0.6
// the opacity of the interior of a polygon. Implementations
// may choose to set this to 0 for line features.
//
// value must be a floating point number greater than or equal to
// zero and less or equal to than one
"fill-opacity": 0.5
}
}]
}
simplestyle的更多相关文章
- ASP.NET在主题中添加CSS文件
ASP.NET在主题中添加CSS文件 在ASP.NET中,可以使用CSS来控制页面上HTML元素和ASP.NET控件的皮肤.如果在主题文件夹中添加了CSS文件,则在页面应用主题时也会自动应用CSS. ...
- 【转】WPF的知识
[-] 闲话WPF之二XAML概述 闲话WPF之五XAML中的类型转换 闲话WPF之十六WPF中的资源 2 闲话WPF之十九WPF中的传递事件 1 闲话WPF之二十WPF中的传递事件 2 闲话WPF之 ...
- 使用GeoServer+OpenLayers发布和调用WMTS、Vector Tile矢量切片服务 | Publishing and Calling WMTS, Vector Tile Service Using GeoServer + OpenLayers
Web GIS系列: 1.搭建简易Web GIS网站:使用GeoServer+PostgreSQL+PostGIS+OpenLayers3 2.使用GeoServer+QGIS发布WMTS服务 3.使 ...
- 高仿Android网易云音乐OkHttp+Retrofit+RxJava+Glide+MVC+MVVM
简介 这是一个使用Java(以后还会推出Kotlin版本)语言,从0开发一个Android平台,接近企业级的项目(我的云音乐),包含了基础内容,高级内容,项目封装,项目重构等知识:主要是使用系统功能, ...
随机推荐
- 如何在Open Live Writer(OLW)中使用precode代码高亮Syntax Highlighter
早先Microsotf的Windows Live Writer(WLW)现在已经开源了,并且更名为Open Live Writer,但是现在Windows Live Writer还是可以现在,Open ...
- ubuntu+mono+jexus 搭建.net的web平台 实现.net跨平台
准备工作: vmware 用来安装 ubuntu 下载地址:VMware-workstation-9.0.1-894247.exe.tar 注册码: 1A4P8-DMK0N-FZ431-7K8NH-2 ...
- 【初码干货】在Window Server 2016中使用Web Deploy方式发布.NET Web应用的重新梳理
在学习和工作的过程中,发现很多同事.朋友,在做.NET Web应用发布的时候,依然在走 生成-复制到服务器 这样的方式,稍微高级一点的,就是先发布到本地,再上传到服务器 这种方式不仅效率低下,而且不易 ...
- ASP.NET MVC Model验证(三)
ASP.NET MVC Model验证(三) 前言 上篇中说到在MVC框架中默认的Model验证是在哪里验证的,还讲到DefaultModelBinder类型的内部执行的示意图,让大家可以看到默认的M ...
- ABP框架 - 动态Web Api层
文档目录 本节内容: 创建动态Web Api控制器 ForAll 方法 重写 ForAll ForMethods Http 动词 WithVerb 方法 HTTP 特性 命名约定 Api 浏览器 Re ...
- 创建Github远程仓库
如何创建github远程仓库 首先, 你有先到github网站注册账号https://github.com 然后创建一个项目, Create a new repository 之后在在Reposito ...
- try...catch..finally
try..catch..finally try{ 代码块1 }catch(Exception e){ 代码块2 }finally{ 代码块3 } catch是抓取代码块1中的异常 代码块2是出异常后的 ...
- Android之自定义View的实现
对于学习Android开发的小童鞋对于自定义View一定不会陌生,相信大家对它是又爱又恨,爱它可以跟随我们的心意设计出漂亮的效果:恨它想要完全流畅掌握,需要一定的功夫.对于初学者来说确实很不容易,网上 ...
- git revert和reset区别
1.在github上建立测试项目并克隆到本地 2.本地中新建两个文本文件 3.将a.txt commit并push到远程仓库 执行 git add a.txt, git commit -m " ...
- 从零开始编写自己的C#框架(14)——T4模板在逻辑层中的应用(三)
原本关于T4模板原想分5个章节详细解说的,不过因为最近比较忙,也不想将整个系列时间拉得太长,所以就将它们整合在一块了,可能会有很多细节没有讲到,希望大家自己对着代码与模板去研究. 本章代码量会比较大, ...