{"version":3,"file":"stylefunction.js","mappings":"yLASMA,EAAQ,IAAI,IAAY,CAC5BC,WAAW,EACXC,OAAQ,IAAI,IAAa,CACvBC,OAAQ,IAAI,IACZC,IAAK,0BAIHC,EAAM,IAAI,IAAI,CAClBC,OAAQ,MACRC,KAAM,IAAI,KAAK,CACbC,OAAQ,EAAE,mBAAoB,gBAC9BC,KAAM,MAIVC,MAAM,oBACHC,MAAK,SAACC,GAAC,OAAKA,EAAEC,MAAI,IAClBF,MAAK,SAACG,IACL,QAAcd,EAAOc,EAAS,WACqB,IAA/CT,EAAIU,YAAYC,WAAWC,QAAQjB,IACrCK,EAAIa,SAASlB,EAEjB,G","sources":["webpack://ol-mapbox-style/./examples/stylefunction.js"],"sourcesContent":["import 'ol/ol.css';\nimport GeoJsonFormat from 'ol/format/GeoJSON.js';\nimport Map from 'ol/Map.js';\nimport VectorLayer from 'ol/layer/Vector.js';\nimport VectorSource from 'ol/source/Vector.js';\nimport View from 'ol/View.js';\n\nimport {stylefunction} from 'ol-mapbox-style';\n\nconst layer = new VectorLayer({\n declutter: true,\n source: new VectorSource({\n format: new GeoJsonFormat(),\n url: 'data/states.geojson',\n }),\n});\n\nconst map = new Map({\n target: 'map',\n view: new View({\n center: [-13603186.115192635, 6785744.563386],\n zoom: 2,\n }),\n});\n\nfetch('data/states.json')\n .then((r) => r.json())\n .then((glStyle) => {\n stylefunction(layer, glStyle, 'states');\n if (map.getLayers().getArray().indexOf(layer) === -1) {\n map.addLayer(layer);\n }\n });\n"],"names":["layer","declutter","source","format","url","map","target","view","center","zoom","fetch","then","r","json","glStyle","getLayers","getArray","indexOf","addLayer"],"sourceRoot":""}