ol-mapbox-style
Advanced tools
Comparing version 2.5.1 to 2.6.0
@@ -1,1 +0,1 @@ | ||
{"zoom": 6, "center": [5, 5], "layers": [{"source": "points", "type": "symbol", "id": "points", "paint": {"icon-image": {"property": "cat", "type": "categorical", "stops": [["1", "accommodation_camping"], ["2", "amenity_firestation"]]}}}], "name": "QGIS project", "sources": {"points": {"data": {"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"n":2,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,0.5]}},{"type":"Feature","properties":{"n":3,"cat":2},"geometry":{"type":"Point","coordinates":[0.5,1.5]}},{"type":"Feature","properties":{"n":4,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,2.5]}},{"type":"Feature","properties":{"n":5,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,3.5]}},{"type":"Feature","properties":{"n":6,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,4.5]}},{"type":"Feature","properties":{"n":7,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,5.5]}},{"type":"Feature","properties":{"n":8,"cat":2},"geometry":{"type":"Point","coordinates":[0.5,6.5]}},{"type":"Feature","properties":{"n":9,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,7.5]}},{"type":"Feature","properties":{"n":10,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,8.5]}},{"type":"Feature","properties":{"n":11,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,9.5]}},{"type":"Feature","properties":{"n":12,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,0.5]}},{"type":"Feature","properties":{"n":13,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,1.5]}},{"type":"Feature","properties":{"n":14,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,2.5]}},{"type":"Feature","properties":{"n":15,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,3.5]}},{"type":"Feature","properties":{"n":16,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,4.5]}},{"type":"Feature","properties":{"n":17,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,5.5]}},{"type":"Feature","properties":{"n":18,"cat":2},"geometry":{"type":"Point","coordinates":[1.5,6.5]}},{"type":"Feature","properties":{"n":19,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,7.5]}},{"type":"Feature","properties":{"n":20,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,8.5]}},{"type":"Feature","properties":{"n":21,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,9.5]}},{"type":"Feature","properties":{"n":22,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,0.5]}},{"type":"Feature","properties":{"n":23,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,1.5]}},{"type":"Feature","properties":{"n":24,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,2.5]}},{"type":"Feature","properties":{"n":25,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,3.5]}},{"type":"Feature","properties":{"n":26,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,4.5]}},{"type":"Feature","properties":{"n":27,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,5.5]}},{"type":"Feature","properties":{"n":28,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,6.5]}},{"type":"Feature","properties":{"n":29,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,7.5]}},{"type":"Feature","properties":{"n":30,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,8.5]}},{"type":"Feature","properties":{"n":31,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,9.5]}},{"type":"Feature","properties":{"n":32,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,0.5]}},{"type":"Feature","properties":{"n":33,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,1.5]}},{"type":"Feature","properties":{"n":34,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,2.5]}},{"type":"Feature","properties":{"n":35,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,3.5]}},{"type":"Feature","properties":{"n":36,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,4.5]}},{"type":"Feature","properties":{"n":37,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,5.5]}},{"type":"Feature","properties":{"n":38,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,6.5]}},{"type":"Feature","properties":{"n":39,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,7.5]}},{"type":"Feature","properties":{"n":40,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,8.5]}},{"type":"Feature","properties":{"n":41,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,9.5]}},{"type":"Feature","properties":{"n":42,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,0.5]}},{"type":"Feature","properties":{"n":43,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,1.5]}},{"type":"Feature","properties":{"n":44,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,2.5]}},{"type":"Feature","properties":{"n":45,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,3.5]}},{"type":"Feature","properties":{"n":46,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,4.5]}},{"type":"Feature","properties":{"n":47,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,5.5]}},{"type":"Feature","properties":{"n":48,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,6.5]}},{"type":"Feature","properties":{"n":49,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,7.5]}},{"type":"Feature","properties":{"n":50,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,8.5]}},{"type":"Feature","properties":{"n":51,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,9.5]}},{"type":"Feature","properties":{"n":52,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,0.5]}},{"type":"Feature","properties":{"n":53,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,1.5]}},{"type":"Feature","properties":{"n":54,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,2.5]}},{"type":"Feature","properties":{"n":55,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,3.5]}},{"type":"Feature","properties":{"n":56,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,4.5]}},{"type":"Feature","properties":{"n":57,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,5.5]}},{"type":"Feature","properties":{"n":58,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,6.5]}},{"type":"Feature","properties":{"n":59,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,7.5]}},{"type":"Feature","properties":{"n":60,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,8.5]}},{"type":"Feature","properties":{"n":61,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,9.5]}},{"type":"Feature","properties":{"n":62,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,0.5]}},{"type":"Feature","properties":{"n":63,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,1.5]}},{"type":"Feature","properties":{"n":64,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,2.5]}},{"type":"Feature","properties":{"n":65,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,3.5]}},{"type":"Feature","properties":{"n":66,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,4.5]}},{"type":"Feature","properties":{"n":67,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,5.5]}},{"type":"Feature","properties":{"n":68,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,6.5]}},{"type":"Feature","properties":{"n":69,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,7.5]}},{"type":"Feature","properties":{"n":70,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,8.5]}},{"type":"Feature","properties":{"n":71,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,9.5]}},{"type":"Feature","properties":{"n":72,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,0.5]}},{"type":"Feature","properties":{"n":73,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,1.5]}},{"type":"Feature","properties":{"n":74,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,2.5]}},{"type":"Feature","properties":{"n":75,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,3.5]}},{"type":"Feature","properties":{"n":76,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,4.5]}},{"type":"Feature","properties":{"n":77,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,5.5]}},{"type":"Feature","properties":{"n":78,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,6.5]}},{"type":"Feature","properties":{"n":79,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,7.5]}},{"type":"Feature","properties":{"n":80,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,8.5]}},{"type":"Feature","properties":{"n":81,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,9.5]}},{"type":"Feature","properties":{"n":82,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,0.5]}},{"type":"Feature","properties":{"n":83,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,1.5]}},{"type":"Feature","properties":{"n":84,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,2.5]}},{"type":"Feature","properties":{"n":85,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,3.5]}},{"type":"Feature","properties":{"n":86,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,4.5]}},{"type":"Feature","properties":{"n":87,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,5.5]}},{"type":"Feature","properties":{"n":88,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,6.5]}},{"type":"Feature","properties":{"n":89,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,7.5]}},{"type":"Feature","properties":{"n":90,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,8.5]}},{"type":"Feature","properties":{"n":91,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,9.5]}},{"type":"Feature","properties":{"n":92,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,0.5]}},{"type":"Feature","properties":{"n":93,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,1.5]}},{"type":"Feature","properties":{"n":94,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,2.5]}},{"type":"Feature","properties":{"n":95,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,3.5]}},{"type":"Feature","properties":{"n":96,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,4.5]}},{"type":"Feature","properties":{"n":97,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,5.5]}},{"type":"Feature","properties":{"n":98,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,6.5]}},{"type":"Feature","properties":{"n":99,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,7.5]}},{"type":"Feature","properties":{"n":100,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,8.5]}},{"type":"Feature","properties":{"n":101,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,9.5]}}]}, "type": "geojson"}}, "version": 8, "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "sprite": "./sprites"} | ||
{"zoom": 6, "center": [5, 5], "layers": [{"source": "points", "type": "symbol", "id": "points", "paint": {"icon-image": {"property": "cat", "type": "categorical", "stops": [[1, "accommodation_camping"], [2, "amenity_firestation"]]}}}], "name": "QGIS project", "sources": {"points": {"data": {"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:OGC:1.3:CRS84"}},"features":[{"type":"Feature","properties":{"n":2,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,0.5]}},{"type":"Feature","properties":{"n":3,"cat":2},"geometry":{"type":"Point","coordinates":[0.5,1.5]}},{"type":"Feature","properties":{"n":4,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,2.5]}},{"type":"Feature","properties":{"n":5,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,3.5]}},{"type":"Feature","properties":{"n":6,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,4.5]}},{"type":"Feature","properties":{"n":7,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,5.5]}},{"type":"Feature","properties":{"n":8,"cat":2},"geometry":{"type":"Point","coordinates":[0.5,6.5]}},{"type":"Feature","properties":{"n":9,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,7.5]}},{"type":"Feature","properties":{"n":10,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,8.5]}},{"type":"Feature","properties":{"n":11,"cat":1},"geometry":{"type":"Point","coordinates":[0.5,9.5]}},{"type":"Feature","properties":{"n":12,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,0.5]}},{"type":"Feature","properties":{"n":13,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,1.5]}},{"type":"Feature","properties":{"n":14,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,2.5]}},{"type":"Feature","properties":{"n":15,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,3.5]}},{"type":"Feature","properties":{"n":16,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,4.5]}},{"type":"Feature","properties":{"n":17,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,5.5]}},{"type":"Feature","properties":{"n":18,"cat":2},"geometry":{"type":"Point","coordinates":[1.5,6.5]}},{"type":"Feature","properties":{"n":19,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,7.5]}},{"type":"Feature","properties":{"n":20,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,8.5]}},{"type":"Feature","properties":{"n":21,"cat":1},"geometry":{"type":"Point","coordinates":[1.5,9.5]}},{"type":"Feature","properties":{"n":22,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,0.5]}},{"type":"Feature","properties":{"n":23,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,1.5]}},{"type":"Feature","properties":{"n":24,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,2.5]}},{"type":"Feature","properties":{"n":25,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,3.5]}},{"type":"Feature","properties":{"n":26,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,4.5]}},{"type":"Feature","properties":{"n":27,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,5.5]}},{"type":"Feature","properties":{"n":28,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,6.5]}},{"type":"Feature","properties":{"n":29,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,7.5]}},{"type":"Feature","properties":{"n":30,"cat":1},"geometry":{"type":"Point","coordinates":[2.5,8.5]}},{"type":"Feature","properties":{"n":31,"cat":2},"geometry":{"type":"Point","coordinates":[2.5,9.5]}},{"type":"Feature","properties":{"n":32,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,0.5]}},{"type":"Feature","properties":{"n":33,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,1.5]}},{"type":"Feature","properties":{"n":34,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,2.5]}},{"type":"Feature","properties":{"n":35,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,3.5]}},{"type":"Feature","properties":{"n":36,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,4.5]}},{"type":"Feature","properties":{"n":37,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,5.5]}},{"type":"Feature","properties":{"n":38,"cat":2},"geometry":{"type":"Point","coordinates":[3.5,6.5]}},{"type":"Feature","properties":{"n":39,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,7.5]}},{"type":"Feature","properties":{"n":40,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,8.5]}},{"type":"Feature","properties":{"n":41,"cat":1},"geometry":{"type":"Point","coordinates":[3.5,9.5]}},{"type":"Feature","properties":{"n":42,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,0.5]}},{"type":"Feature","properties":{"n":43,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,1.5]}},{"type":"Feature","properties":{"n":44,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,2.5]}},{"type":"Feature","properties":{"n":45,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,3.5]}},{"type":"Feature","properties":{"n":46,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,4.5]}},{"type":"Feature","properties":{"n":47,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,5.5]}},{"type":"Feature","properties":{"n":48,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,6.5]}},{"type":"Feature","properties":{"n":49,"cat":1},"geometry":{"type":"Point","coordinates":[4.5,7.5]}},{"type":"Feature","properties":{"n":50,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,8.5]}},{"type":"Feature","properties":{"n":51,"cat":2},"geometry":{"type":"Point","coordinates":[4.5,9.5]}},{"type":"Feature","properties":{"n":52,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,0.5]}},{"type":"Feature","properties":{"n":53,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,1.5]}},{"type":"Feature","properties":{"n":54,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,2.5]}},{"type":"Feature","properties":{"n":55,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,3.5]}},{"type":"Feature","properties":{"n":56,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,4.5]}},{"type":"Feature","properties":{"n":57,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,5.5]}},{"type":"Feature","properties":{"n":58,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,6.5]}},{"type":"Feature","properties":{"n":59,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,7.5]}},{"type":"Feature","properties":{"n":60,"cat":2},"geometry":{"type":"Point","coordinates":[5.5,8.5]}},{"type":"Feature","properties":{"n":61,"cat":1},"geometry":{"type":"Point","coordinates":[5.5,9.5]}},{"type":"Feature","properties":{"n":62,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,0.5]}},{"type":"Feature","properties":{"n":63,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,1.5]}},{"type":"Feature","properties":{"n":64,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,2.5]}},{"type":"Feature","properties":{"n":65,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,3.5]}},{"type":"Feature","properties":{"n":66,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,4.5]}},{"type":"Feature","properties":{"n":67,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,5.5]}},{"type":"Feature","properties":{"n":68,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,6.5]}},{"type":"Feature","properties":{"n":69,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,7.5]}},{"type":"Feature","properties":{"n":70,"cat":1},"geometry":{"type":"Point","coordinates":[6.5,8.5]}},{"type":"Feature","properties":{"n":71,"cat":2},"geometry":{"type":"Point","coordinates":[6.5,9.5]}},{"type":"Feature","properties":{"n":72,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,0.5]}},{"type":"Feature","properties":{"n":73,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,1.5]}},{"type":"Feature","properties":{"n":74,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,2.5]}},{"type":"Feature","properties":{"n":75,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,3.5]}},{"type":"Feature","properties":{"n":76,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,4.5]}},{"type":"Feature","properties":{"n":77,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,5.5]}},{"type":"Feature","properties":{"n":78,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,6.5]}},{"type":"Feature","properties":{"n":79,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,7.5]}},{"type":"Feature","properties":{"n":80,"cat":1},"geometry":{"type":"Point","coordinates":[7.5,8.5]}},{"type":"Feature","properties":{"n":81,"cat":2},"geometry":{"type":"Point","coordinates":[7.5,9.5]}},{"type":"Feature","properties":{"n":82,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,0.5]}},{"type":"Feature","properties":{"n":83,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,1.5]}},{"type":"Feature","properties":{"n":84,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,2.5]}},{"type":"Feature","properties":{"n":85,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,3.5]}},{"type":"Feature","properties":{"n":86,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,4.5]}},{"type":"Feature","properties":{"n":87,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,5.5]}},{"type":"Feature","properties":{"n":88,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,6.5]}},{"type":"Feature","properties":{"n":89,"cat":1},"geometry":{"type":"Point","coordinates":[8.5,7.5]}},{"type":"Feature","properties":{"n":90,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,8.5]}},{"type":"Feature","properties":{"n":91,"cat":2},"geometry":{"type":"Point","coordinates":[8.5,9.5]}},{"type":"Feature","properties":{"n":92,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,0.5]}},{"type":"Feature","properties":{"n":93,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,1.5]}},{"type":"Feature","properties":{"n":94,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,2.5]}},{"type":"Feature","properties":{"n":95,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,3.5]}},{"type":"Feature","properties":{"n":96,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,4.5]}},{"type":"Feature","properties":{"n":97,"cat":1},"geometry":{"type":"Point","coordinates":[9.5,5.5]}},{"type":"Feature","properties":{"n":98,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,6.5]}},{"type":"Feature","properties":{"n":99,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,7.5]}},{"type":"Feature","properties":{"n":100,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,8.5]}},{"type":"Feature","properties":{"n":101,"cat":2},"geometry":{"type":"Point","coordinates":[9.5,9.5]}}]}, "type": "geojson"}}, "version": 8, "glyphs": "mapbox://fonts/mapbox/{fontstack}/{range}.pbf", "sprite": "./sprites"} |
57
index.js
@@ -9,3 +9,3 @@ /* | ||
import mb2css from 'mapbox-to-css-font'; | ||
import getStyleFunction from 'mapbox-to-ol-style'; | ||
import applyStyleFunction from 'mapbox-to-ol-style'; | ||
import WebFont from 'webfontloader'; | ||
@@ -142,11 +142,6 @@ import proj from 'ol/proj'; | ||
var resolutions; | ||
if (layer instanceof VectorTileLayer) { | ||
resolutions = layer.getSource().getTileGrid().getResolutions(); | ||
} | ||
var style; | ||
function onChange() { | ||
if (!style && (!glStyle.sprite || spriteData) && (!availableFonts || availableFonts.length > 0)) { | ||
style = getStyleFunction(glStyle, source, resolutions, spriteData, spriteImageUrl, availableFonts); | ||
layer.setStyle(style); | ||
style = applyStyleFunction(layer, glStyle, source, undefined, spriteData, spriteImageUrl, availableFonts); | ||
resolve(); | ||
@@ -356,3 +351,4 @@ } else if (style) { | ||
layer = new TileLayer({ | ||
source: source | ||
source: source, | ||
visible: glLayer.layout ? glLayer.layout.visibility !== 'none' : true | ||
}); | ||
@@ -388,7 +384,7 @@ } else if (glSource.type == 'geojson') { | ||
* Loads and applies a Mapbox Style object to an OpenLayers Map. | ||
* @param {ol.Map|HTMLElement|stribng} map Either an existing OpenLayers Map | ||
* @param {ol.Map|HTMLElement|string} map Either an existing OpenLayers Map | ||
* instance, or a HTML element, or the id of a HTML element that will be the | ||
* target of a new OpenLayers Map. | ||
* @param {string} style Url pointing to a Mapbox Style object. When using | ||
* Mapbox APIs, the url must contain an access token and look like | ||
* @param {string|Object} JSON style object or style url pointing to a Mapbox Style object. | ||
* When using Mapbox APIs, the url must contain an access token and look like | ||
* `https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`. | ||
@@ -408,22 +404,25 @@ * @return {ol.Map} The OpenLayers Map instance that will be populated with the | ||
var parts = style.match(spriteRegEx); | ||
if (parts) { | ||
baseUrl = parts[1]; | ||
accessToken = parts.length > 2 ? parts[2] : ''; | ||
if (typeof style === 'string') { | ||
var parts = style.match(spriteRegEx); | ||
if (parts) { | ||
baseUrl = parts[1]; | ||
accessToken = parts.length > 2 ? parts[2] : ''; | ||
} | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', style); | ||
var a = document.createElement('A'); | ||
a.href = style; | ||
path = a.pathname.split('/').slice(0, -1).join('/') + '/'; | ||
xhr.addEventListener('load', function() { | ||
var glStyle = JSON.parse(xhr.responseText); | ||
processStyle(glStyle, map, baseUrl, path, accessToken); | ||
}); | ||
xhr.addEventListener('error', function() { | ||
throw new Error('Could not load ' + style); | ||
}); | ||
xhr.send(); | ||
} else { | ||
processStyle(style, map); | ||
} | ||
var xhr = new XMLHttpRequest(); | ||
xhr.open('GET', style); | ||
var a = document.createElement('A'); | ||
a.href = style; | ||
path = a.pathname.split('/').slice(0, -1).join('/') + '/'; | ||
xhr.addEventListener('load', function() { | ||
var glStyle = JSON.parse(xhr.responseText); | ||
processStyle(glStyle, map, baseUrl, path, accessToken); | ||
}); | ||
xhr.addEventListener('error', function() { | ||
throw new Error('Could not load ' + style); | ||
}); | ||
xhr.send(); | ||
return map; | ||
} |
{ | ||
"name": "ol-mapbox-style", | ||
"version": "2.5.1", | ||
"version": "2.6.0", | ||
"description": "Create OpenLayers maps from Mapbox Style objects", | ||
@@ -39,3 +39,4 @@ "main": "index.js", | ||
"scripts": { | ||
"prepublish": "npm run doc && mkdirp dist && browserify -g [ babelify ] -p [ standalonify --name olms --deps [ null --ol/observable ol.Observable --ol/proj ol.proj --ol/tilegrid ol.tilegrid --ol/map ol.Map --ol/format/geojson ol.format.GeoJSON --ol/format/mvt ol.format.MVT --ol/layer/tile ol.layer.Tile --ol/layer/vector ol.layer.Vector --ol/layer/vectortile ol.layer.VectorTile --ol/source/tilejson ol.source.TileJSON --ol/source/vector ol.source.Vector --ol/source/xyz ol.source.XYZ --ol/source/vectortile ol.source.VectorTile --ol/style/style ol.style.Style --ol/style/fill ol.style.Fill --ol/style/stroke ol.style.Stroke --ol/style/circle ol.style.Circle --ol/style/icon ol.style.Icon --ol/style/text ol.style.Text ] ] index.js > dist/olms.js", | ||
"prepublish": "npm run doc && npm run build", | ||
"build": "mkdirp dist && browserify -g [ babelify ] -p [ standalonify --name olms --deps [ null --ol/observable ol.Observable --ol/proj ol.proj --ol/tilegrid ol.tilegrid --ol/map ol.Map --ol/format/geojson ol.format.GeoJSON --ol/format/mvt ol.format.MVT --ol/layer/tile ol.layer.Tile --ol/layer/vector ol.layer.Vector --ol/layer/vectortile ol.layer.VectorTile --ol/source/tilejson ol.source.TileJSON --ol/source/vector ol.source.Vector --ol/source/xyz ol.source.XYZ --ol/source/vectortile ol.source.VectorTile --ol/style/style ol.style.Style --ol/style/fill ol.style.Fill --ol/style/stroke ol.style.Stroke --ol/style/circle ol.style.Circle ] ] index.js > dist/olms.js", | ||
"doc": "documentation readme -s API index.js", | ||
@@ -48,11 +49,15 @@ "pretest": "eslint src & npm run test-bundle", | ||
"@mapbox/mapbox-gl-style-spec": "^9.0.0", | ||
"labelgun": "^0.1.1", | ||
"mapbox-to-css-font": "^2.0.3", | ||
"mapbox-to-ol-style": "^2.5.2", | ||
"ol": "^4.2.0", | ||
"mapbox-to-ol-style": "^3.1.2", | ||
"ol": "^4.3.0-beta.3", | ||
"webfontloader": "^1.6.28" | ||
}, | ||
"devDependencies": { | ||
"babel-generator": "^6.25.0", | ||
"babel-helpers": "^6.24.1", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", | ||
"babel-polyfill": "^6.23.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"babelify": "^7.3.0", | ||
"browserify": "^14.4.0", | ||
@@ -62,2 +67,3 @@ "documentation": "^4.0.0-rc.1", | ||
"eslint-config-openlayers": "^7.0.0", | ||
"json5": "^0.5.1", | ||
"mapbox-gl-styles": "^2.0.2", | ||
@@ -64,0 +70,0 @@ "mkdirp": "^0.5.1", |
@@ -65,7 +65,8 @@ # ol-mapbox-style | ||
- `map` **(ol.Map | [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) | stribng)** Either an existing OpenLayers Map | ||
- `map` **(ol.Map | [HTMLElement](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) \| [string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String))** Either an existing OpenLayers Map | ||
instance, or a HTML element, or the id of a HTML element that will be the | ||
target of a new OpenLayers Map. | ||
- `style` **[string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Url pointing to a Mapbox Style object. When using | ||
Mapbox APIs, the url must contain an access token and look like | ||
- `style` | ||
- `JSON` **([string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** style object or style url pointing to a Mapbox Style object. | ||
When using Mapbox APIs, the url must contain an access token and look like | ||
`https://api.mapbox.com/styles/v1/mapbox/bright-v9?access_token=[your_access_token_here]`. | ||
@@ -72,0 +73,0 @@ |
@@ -135,3 +135,29 @@ import 'babel-polyfill'; | ||
it('handles visibility for raster layers', function() { | ||
var context = { | ||
"version": 8, | ||
"name": "states-wms", | ||
"sources": { | ||
"states": { | ||
"type": "raster", | ||
"maxzoom": 12, | ||
"tileSize": 256, | ||
"tiles": ["https://ahocevar.com/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&SRS=EPSG:900913&LAYERS=topp:states&STYLES=&WIDTH=256&HEIGHT=256&BBOX={bbox-epsg-3857}"] | ||
} | ||
}, | ||
"layers": [ | ||
{ | ||
"id": "states-wms", | ||
"source": "states", | ||
"layout": { | ||
"visibility": "none" | ||
} | ||
} | ||
] | ||
}; | ||
var map = apply(target, context); | ||
should(map.getLayers().item(0).get('visible')).be.false(); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2965472
65414
81
6
19
4
+ Addedlabelgun@^0.1.1
+ Addedlabelgun@0.1.1(transitive)
+ Addedmapbox-to-ol-style@3.4.3(transitive)
+ Addedrbush@2.0.2(transitive)
- Removedmapbox-to-ol-style@2.5.2(transitive)
Updatedmapbox-to-ol-style@^3.1.2
Updatedol@^4.3.0-beta.3