UNPKG

react-mapfilter

Version:

A React Component for viewing and filtering GeoJSON

1,807 lines (1,806 loc) 351 kB
{ "version": 8, "name": "MapFilter Default", "metadata": { "mapbox:autocomposite": true, "mapbox:type": "default", "mapbox:groups": { "1444934828655.3389": { "name": "Aeroways", "collapsed": true }, "1444933322393.2852": { "name": "POI labels (scalerank 1)", "collapsed": true }, "1444855898284.2651": { "name": "Aeroways", "collapsed": true }, "1444862578782.6787": { "name": "Road labels", "collapsed": true }, "1444934749452.0452": { "name": "Wetlands", "collapsed": true }, "1444862074717.8372": { "name": "Waterways", "collapsed": true }, "1444855786460.0557": { "name": "Roads", "collapsed": true }, "1444856968392.4368": { "name": "Contour lines", "collapsed": true }, "1444856071629.7817": { "name": "Place labels", "collapsed": true }, "1444933575858.6992": { "name": "Highway shields", "collapsed": false }, "1444934295202.7542": { "name": "Admin boundaries", "collapsed": true }, "1444856904773.373": { "name": "Land barriers", "collapsed": true }, "1444856931506.5164": { "name": "Barriers", "collapsed": true }, "1444856151690.9143": { "name": "State labels", "collapsed": true }, "1444933721429.3076": { "name": "Road labels", "collapsed": true }, "1444933358918.2366": { "name": "POI labels (scalerank 2)", "collapsed": true }, "1444933808272.805": { "name": "Water labels", "collapsed": true }, "1444855815295.714": { "name": "Hillshading", "collapsed": true }, "1444855831248.8289": { "name": "Landcover", "collapsed": true }, "1444933372896.5967": { "name": "POI labels (scalerank 3)", "collapsed": true }, "1444855799204.86": { "name": "Bridges", "collapsed": true }, "1444856087950.3635": { "name": "Marine labels", "collapsed": true }, "1444856869758.2375": { "name": "Wetlands", "collapsed": true }, "1444862510685.128": { "name": "City labels", "collapsed": true }, "1444856954425.4016": { "name": "Buildings", "collapsed": true }, "1444855769305.6016": { "name": "Tunnels", "collapsed": true }, "1456970288113.8113": { "name": "Streets landcover", "collapsed": true }, "1444856144497.7825": { "name": "Country labels", "collapsed": true }, "1444856712129.5933": { "name": "Waterways", "collapsed": true }, "1444933456003.5437": { "name": "POI labels (scalerank 4)", "collapsed": true }, "1444933837268.9458": { "name": "Contour lines", "collapsed": true } }, "mapbox:trackposition": true }, "center": [ -69.39131568437908, 12.490918318266992 ], "zoom": 3.6585937829626753, "bearing": 0, "pitch": 0, "sources": { "composite": { "url": "mapbox://mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7", "type": "vector" } }, "sprite": "mapfilter://sprites/sprite", "glyphs": "mapfilter://fonts/{range}.pbf?stack={fontstack}", "layers": [ { "id": "background", "type": "background", "layout": {}, "paint": { "background-color": { "base": 1, "stops": [ [ 11, "hsl(35, 32%, 91%)" ], [ 13, "hsl(35, 12%, 89%)" ] ] } } }, { "layout": {}, "metadata": { "mapbox:group": "1444855831248.8289" }, "maxzoom": 12, "filter": [ "==", "class", "crop" ], "type": "fill", "source": "composite", "id": "landcover_crop", "paint": { "fill-color": "hsl(75, 62%, 81%)", "fill-opacity": { "base": 1.5, "stops": [ [ 2, 0.3 ], [ 12, 0 ] ] }, "fill-antialias": false }, "source-layer": "landcover" }, { "layout": {}, "metadata": { "mapbox:group": "1444855831248.8289" }, "maxzoom": 12, "filter": [ "==", "class", "grass" ], "type": "fill", "source": "composite", "id": "landcover_grass", "paint": { "fill-color": "hsl(75, 62%, 81%)", "fill-opacity": { "base": 1.5, "stops": [ [ 2, 0.3 ], [ 12, 0 ] ] }, "fill-antialias": false }, "source-layer": "landcover" }, { "layout": {}, "metadata": { "mapbox:group": "1444855831248.8289" }, "maxzoom": 12, "filter": [ "==", "class", "scrub" ], "type": "fill", "source": "composite", "id": "landcover_scrub", "paint": { "fill-color": "hsl(75, 62%, 81%)", "fill-opacity": { "base": 1.5, "stops": [ [ 2, 0.3 ], [ 12, 0 ] ] }, "fill-antialias": false }, "source-layer": "landcover" }, { "layout": {}, "metadata": { "mapbox:group": "1444855831248.8289" }, "maxzoom": 12, "filter": [ "==", "class", "wood" ], "type": "fill", "source": "composite", "id": "landcover_wood", "paint": { "fill-color": "hsl(75, 62%, 81%)", "fill-opacity": { "base": 1.5, "stops": [ [ 2, 0.3 ], [ 12, 0 ] ] }, "fill-antialias": false }, "source-layer": "landcover" }, { "layout": {}, "metadata": { "mapbox:group": "1444855831248.8289" }, "filter": [ "==", "class", "snow" ], "type": "fill", "source": "composite", "id": "landcover_snow", "paint": { "fill-color": "hsl(0, 0%, 100%)", "fill-opacity": 0.2, "fill-antialias": false }, "source-layer": "landcover" }, { "layout": {}, "filter": [ "==", "class", "national_park" ], "type": "fill", "source": "composite", "id": "national_park", "paint": { "fill-color": "hsl(100, 59%, 76%)", "fill-opacity": { "base": 1, "stops": [ [ 5, 0 ], [ 5.5, 0.75 ], [ 9, 0.75 ], [ 10, 0.35 ] ] } }, "source-layer": "landuse_overlay" }, { "minzoom": 9, "layout": {}, "filter": [ "==", "class", "scrub" ], "type": "fill", "source": "composite", "id": "scrub", "paint": { "fill-color": "hsl(75, 41%, 74%)", "fill-opacity": { "base": 1, "stops": [ [ 9, 0 ], [ 15, 0.2 ] ] } }, "source-layer": "landuse" }, { "minzoom": 9, "layout": {}, "filter": [ "==", "class", "grass" ], "type": "fill", "source": "composite", "id": "grass", "paint": { "fill-color": "hsl(75, 41%, 74%)", "fill-opacity": { "base": 1, "stops": [ [ 9, 0 ], [ 15, 0.4 ] ] } }, "source-layer": "landuse" }, { "minzoom": 6, "layout": {}, "filter": [ "==", "class", "wood" ], "type": "fill", "source": "composite", "id": "wood", "paint": { "fill-color": "hsl(75, 41%, 74%)", "fill-opacity": { "base": 1, "stops": [ [ 7, 0 ], [ 15, 0.5 ] ] } }, "source-layer": "landuse" }, { "minzoom": 11, "layout": {}, "filter": [ "==", "class", "agriculture" ], "type": "fill", "source": "composite", "id": "agriculture", "paint": { "fill-opacity": { "base": 1, "stops": [ [ 11, 0 ], [ 14, 0.75 ] ] }, "fill-color": "hsl(75, 37%, 81%)", "fill-outline-color": "hsl(75, 32%, 68%)" }, "source-layer": "landuse" }, { "minzoom": 9, "layout": { "line-cap": "round" }, "filter": [ "==", "class", "national_park" ], "type": "line", "source": "composite", "id": "national_park-tint-band", "paint": { "line-color": "hsl(100, 62%, 74%)", "line-width": { "base": 1.4, "stops": [ [ 9, 1 ], [ 14, 8 ] ] }, "line-offset": { "base": 1.4, "stops": [ [ 9, 0 ], [ 14, -2.5 ] ] }, "line-opacity": { "base": 1, "stops": [ [ 9, 0 ], [ 10, 0.75 ] ] }, "line-blur": 3 }, "source-layer": "landuse_overlay" }, { "minzoom": 9, "layout": {}, "filter": [ "==", "class", "national_park" ], "type": "line", "source": "composite", "id": "national_park-outline", "paint": { "line-color": { "base": 1, "stops": [ [ 12, "hsl(100, 49%, 71%)" ], [ 14, "hsl(100, 40%, 67%)" ] ] }, "line-width": { "base": 1, "stops": [ [ 9, 0.75 ], [ 12, 1 ] ] }, "line-offset": 0, "line-opacity": { "base": 1, "stops": [ [ 9, 0 ], [ 10, 1 ] ] } }, "source-layer": "landuse_overlay" }, { "layout": {}, "filter": [ "==", "class", "hospital" ], "type": "fill", "source": "composite", "id": "hospital", "paint": { "fill-color": { "base": 1, "stops": [ [ 15.5, "hsl(340, 37%, 87%)" ], [ 16, "hsl(340, 63%, 89%)" ] ] } }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "==", "class", "school" ], "type": "fill", "source": "composite", "id": "school", "paint": { "fill-color": { "base": 1, "stops": [ [ 15.5, "hsl(50, 47%, 81%)" ], [ 16, "hsl(50, 63%, 84%)" ] ] } }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "all", [ "!in", "type", "garden", "golf_course", "playground", "zoo" ], [ "==", "class", "park" ] ], "type": "fill", "source": "composite", "id": "park", "paint": { "fill-color": "hsl(100, 59%, 76%)", "fill-opacity": { "base": 1, "stops": [ [ 5, 0 ], [ 6, 1 ] ] } }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "all", [ "==", "class", "park" ], [ "in", "type", "garden", "golf_course", "playground", "zoo" ] ], "type": "fill", "source": "composite", "id": "other-green-areas", "paint": { "fill-color": "hsl(100, 59%, 81%)", "fill-opacity": { "base": 1, "stops": [ [ 5, 0 ], [ 6, 1 ] ] } }, "source-layer": "landuse" }, { "minzoom": 9, "layout": {}, "filter": [ "==", "class", "glacier" ], "type": "fill", "source": "composite", "id": "glacier", "paint": { "fill-color": "hsl(196, 71%, 93%)", "fill-opacity": { "base": 1, "stops": [ [ 9, 0 ], [ 10, 0.5 ] ] } }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "==", "class", "pitch" ], "type": "fill", "source": "composite", "id": "pitch", "paint": { "fill-color": "hsl(100, 57%, 72%)" }, "source-layer": "landuse" }, { "minzoom": 15, "layout": { "line-join": "miter" }, "filter": [ "==", "class", "pitch" ], "type": "line", "source": "composite", "id": "pitch-line", "paint": { "line-color": "hsl(75, 57%, 84%)" }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "==", "class", "cemetery" ], "type": "fill", "source": "composite", "id": "cemetery", "paint": { "fill-color": "hsl(75, 37%, 81%)" }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "==", "class", "industrial" ], "type": "fill", "source": "composite", "id": "industrial", "paint": { "fill-color": { "base": 1, "stops": [ [ 15.5, "hsl(230, 15%, 86%)" ], [ 16, "hsl(230, 29%, 89%)" ] ] } }, "source-layer": "landuse" }, { "layout": {}, "filter": [ "==", "class", "sand" ], "type": "fill", "source": "composite", "id": "sand", "paint": { "fill-color": "hsl(60, 46%, 87%)" }, "source-layer": "landuse" }, { "minzoom": 11, "layout": {}, "metadata": { "mapbox:group": "1444933837268.9458" }, "filter": [ "!in", "index", 10, 5 ], "type": "line", "source": "composite", "id": "contour-line", "paint": { "line-opacity": { "base": 1, "stops": [ [ 11, 0.15 ], [ 12, 0.3 ] ] }, "line-color": "hsl(100, 100%, 20%)", "line-width": { "base": 1, "stops": [ [ 13, 0.5 ], [ 16, 0.8 ] ] }, "line-offset": { "base": 1, "stops": [ [ 13, 1 ], [ 16, 1.6 ] ] } }, "source-layer": "contour" }, { "minzoom": 11, "layout": {}, "metadata": { "mapbox:group": "1444933837268.9458" }, "filter": [ "in", "index", 10, 5 ], "type": "line", "source": "composite", "id": "contour-line-index", "paint": { "line-opacity": { "base": 1, "stops": [ [ 11, 0.25 ], [ 12, 0.5 ] ] }, "line-color": "hsl(100, 100%, 20%)", "line-width": { "base": 1, "stops": [ [ 13, 0.6 ], [ 16, 1.2 ] ] }, "line-offset": { "base": 1, "stops": [ [ 13, 0.6 ], [ 16, 1.2 ] ] } }, "source-layer": "contour" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "maxzoom": 18, "filter": [ "==", "level", 94 ], "type": "fill", "source": "composite", "id": "hillshade_highlight_bright", "paint": { "fill-color": "hsl(0, 0%, 100%)", "fill-opacity": { "stops": [ [ 15, 0.15 ], [ 18, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "filter": [ "==", "level", 90 ], "type": "fill", "source": "composite", "id": "hillshade_highlight_med", "paint": { "fill-color": "hsl(0, 0%, 100%)", "fill-opacity": { "stops": [ [ 15, 0.15 ], [ 18, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "maxzoom": 17, "filter": [ "==", "level", 89 ], "type": "fill", "source": "composite", "id": "hillshade_shadow_faint", "paint": { "fill-color": "hsl(56, 59%, 22%)", "fill-opacity": { "stops": [ [ 15, 0.07 ], [ 17, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "filter": [ "==", "level", 78 ], "type": "fill", "source": "composite", "id": "hillshade_shadow_med", "paint": { "fill-color": "hsl(56, 59%, 22%)", "fill-opacity": { "stops": [ [ 15, 0.07 ], [ 17, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "filter": [ "==", "level", 67 ], "type": "fill", "source": "composite", "id": "hillshade_shadow_dark", "paint": { "fill-color": "hsl(56, 59%, 22%)", "fill-opacity": { "stops": [ [ 15, 0.08 ], [ 17, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "layout": {}, "metadata": { "mapbox:group": "1444855815295.714" }, "maxzoom": 17, "filter": [ "==", "level", 56 ], "type": "fill", "source": "composite", "id": "hillshade_shadow_extreme", "paint": { "fill-color": "hsl(56, 59%, 22%)", "fill-opacity": { "stops": [ [ 15, 0.08 ], [ 17, 0 ] ] }, "fill-antialias": false }, "source-layer": "hillshade" }, { "minzoom": 8, "layout": { "line-cap": { "base": 1, "stops": [ [ 0, "butt" ], [ 11, "round" ] ] }, "line-join": "round" }, "filter": [ "in", "class", "canal", "river" ], "type": "line", "source": "composite", "id": "waterway-river-canal-shadow", "paint": { "line-color": "hsl(215, 84%, 69%)", "line-width": { "base": 1.3, "stops": [ [ 8.5, 0.4 ], [ 20, 8 ] ] }, "line-opacity": { "base": 1, "stops": [ [ 8, 0 ], [ 8.5, 1 ] ] }, "line-translate": { "base": 1.2, "stops": [ [ 7, [ 0, 0 ] ], [ 16, [ -1, -1 ] ] ] }, "line-translate-anchor": "viewport" }, "source-layer": "waterway" }, { "id": "waterway-river-canal", "paint": { "line-color": "hsl(205, 87%, 76%)", "line-width": { "base": 1.3, "stops": [ [ 8.5, 0.4 ], [ 20, 8 ] ] }, "line-opacity": { "base": 1, "stops": [ [ 8, 0 ], [ 8.5, 1 ] ] } }, "ref": "waterway-river-canal-shadow" }, { "minzoom": 13, "layout": { "line-join": "round", "line-cap": "round" }, "filter": [ "!in", "class", "canal", "river" ], "type": "line", "source": "composite", "id": "waterway-small", "paint": { "line-color": "hsl(205, 87%, 76%)", "line-width": { "base": 1.35, "stops": [ [ 13.5, 0.4 ], [ 20, 3 ] ] }, "line-opacity": { "base": 1, "stops": [ [ 13, 0 ], [ 13.5, 1 ] ] } }, "source-layer": "waterway" }, { "id": "water-shadow", "type": "fill", "source": "composite", "source-layer": "water", "layout": {}, "paint": { "fill-color": "hsl(215, 84%, 69%)", "fill-translate": { "base": 1.2, "stops": [ [ 7, [ 0, 0 ] ], [ 16, [ -1, -1 ] ] ] }, "fill-translate-anchor": "viewport", "fill-opacity": 1 } }, { "id": "water", "paint": { "fill-color": "hsl(196, 80%, 70%)" }, "ref": "water-shadow" }, { "layout": {}, "metadata": { "mapbox:group": "1444934749452.0452" }, "filter": [ "in", "class", "wetland", "wetland_noveg" ], "type": "fill", "source": "composite", "id": "wetlands", "paint": { "fill-color": "hsl(185, 43%, 74%)", "fill-opacity": { "base": 1, "stops": [ [ 10, 0.25 ], [ 10.5, 0.15 ] ] } }, "source-layer": "landuse_overlay" }, { "metadata": { "mapbox:group": "1444934749452.0452" }, "id": "wetlands-pattern", "paint": { "fill-color": "hsl(185, 43%, 74%)", "fill-opacity": { "base": 1, "stops": [ [ 10, 0 ], [ 10.5, 1 ] ] }, "fill-pattern": "wetland", "fill-translate-anchor": "viewport" }, "ref": "wetlands" }, { "layout": {}, "filter": [ "all", [ "==", "$type", "Polygon" ], [ "==", "class", "land" ] ], "type": "fill", "source": "composite", "id": "barrier_line-land-polygon", "paint": { "fill-color": "hsl(35, 12%, 89%)" }, "source-layer": "barrier_line" }, { "layout": { "line-cap": "round" }, "filter": [ "all", [ "==", "$type", "LineString" ], [ "==", "class", "land" ] ], "type": "line", "source": "composite", "id": "barrier_line-land-line", "paint": { "line-width": { "base": 1.99, "stops": [ [ 14, 0.75 ], [ 20, 40 ] ] }, "line-color": "hsl(35, 12%, 89%)" }, "source-layer": "barrier_line" }, { "minzoom": 11, "layout": {}, "metadata": { "mapbox:group": "1444934828655.3389" }, "filter": [ "all", [ "!=", "type", "apron" ], [ "==", "$type", "Polygon" ] ], "type": "fill", "source": "composite", "id": "aeroway-polygon", "paint": { "fill-color": { "base": 1, "stops": [ [ 15, "hsl(230, 23%, 82%)" ], [ 16, "hsl(230, 37%, 84%)" ] ] }, "fill-opacity": { "base": 1, "stops": [ [ 11, 0 ], [ 11.5, 1 ] ] } }, "source-layer": "aeroway" }, { "minzoom": 9, "layout": {}, "metadata": { "mapbox:group": "1444934828655.3389" }, "filter": [ "all", [ "==", "$type", "LineString" ], [ "==", "type", "runway" ] ], "type": "line", "source": "composite", "id": "aeroway-runway", "paint": { "line-color": { "base": 1, "stops": [ [ 15, "hsl(230, 23%, 82%)" ], [ 16, "hsl(230, 37%, 84%)" ] ] }, "line-width": { "base": 1.5, "stops": [ [ 9, 1 ], [ 18, 80 ] ] } }, "source-layer": "aeroway" }, { "minzoom": 9, "layout": {}, "metadata": { "mapbox:group": "1444934828655.3389" }, "filter": [ "all", [ "==", "$type", "LineString" ], [ "==", "type", "taxiway" ] ], "type": "line", "source": "composite", "id": "aeroway-taxiway", "paint": { "line-color": { "base": 1, "stops": [ [ 15, "hsl(230, 23%, 82%)" ], [ 16, "hsl(230, 37%, 84%)" ] ] }, "line-width": { "base": 1.5, "stops": [ [ 10, 0.5 ], [ 18, 20 ] ] } }, "source-layer": "aeroway" }, { "minzoom": 15, "layout": {}, "filter": [ "==", "underground", "false" ], "type": "line", "source": "composite", "id": "building-line", "paint": { "line-color": "hsl(230, 24%, 87%)", "line-width": { "base": 1.5, "stops": [ [ 15, 0.75 ], [ 20, 3 ] ] }, "line-opacity": { "base": 1, "stops": [ [ 15.5, 0 ], [ 16, 1 ] ] } }, "source-layer": "building" }, { "minzoom": 15, "layout": {}, "filter": [ "==", "underground", "false" ], "type": "fill", "source": "composite", "id": "building", "paint": { "fill-color": { "base": 1, "stops": [ [ 15, "hsl(35, 11%, 88%)" ], [ 16, "hsl(35, 8%, 85%)" ] ] }, "fill-opacity": { "base": 1, "stops": [ [ 15.5, 0 ], [ 16, 1 ] ] }, "fill-outline-color": "hsl(35, 6%, 79%)" }, "source-layer": "building" }, { "minzoom": 11, "layout": { "line-cap": "round", "line-join": "round" }, "metadata": { "mapbox:group": "1444855769305.6016" }, "filter": [ "all", [ "==", "class", "street" ], [ "==", "structure", "tunnel" ] ], "type": "line", "source": "composite", "id": "tunnel-street-low", "paint": { "line-width": { "base": 1.5, "stops": [ [ 12.5, 0.5 ], [ 14, 2 ], [ 18, 18 ] ] }, "line-color": "hsl(0, 0%, 100%)", "line-opacity": { "stops": [ [ 11.5, 0 ], [ 12, 1 ], [ 14, 1 ], [ 14.01, 0 ] ] } }, "source-layer": "road" }, { "minzoom": 11, "layout": { "line-cap": "round", "line-join": "round" }, "metadata": { "mapbox:group": "1444855769305.6016" }, "filter": [ "all", [ "==", "class", "street_limited" ], [ "==", "structure", "tunnel" ] ], "type": "line", "source": "composite", "id": "tunnel-street_limited-low", "paint": { "line-width": { "base": 1.5, "stops": [ [ 12.5, 0.5 ], [ 14, 2 ], [ 18, 18