{"version":3,"sources":["webpack:///./src/projectModules/water-leakage-demo/geojson-options.js"],"names":["getColor","riskIndex","turbo","colorScale","chroma","scale","domain","geoJsonOptions","common","style","feature","color","fillColor","opacity","weight","fill","properties","onEachFeature","layer"],"mappings":"gHAAA,gCAGA,SAASA,EAASC,GAEhB,IAAMC,EAAQ,CACZ,UACA,UACA,UACA,UACA,UACA,UACA,WAIIC,EAAaC,IAAOC,MAAMH,GAAOI,OAAO,CAAC,EAAG,IAElD,OAAOH,EAAWF,GAGpB,IAAMM,EAAiB,CAErBC,OAAQ,CACNC,MAAK,SAACC,GACJ,IAAIC,EACFC,EAAY,YACVC,EAAU,EACVC,EAAS,EACTC,GAAO,EAYX,OAVEL,GACAA,EAAQM,WAAW,QACnBN,EAAQM,WAAW,OAAS,IAE5BL,EAAQX,EAASU,EAAQM,WAAW,QACpCJ,EAAYD,EAAQ,KACpBE,EAAU,EACVC,EAAS,EACTC,GAAO,GAEF,CACLF,UACAC,SACAH,QACAI,OACAH,cAIJK,cAAa,SAACP,EAASQ,MAGzB,WAAY,CACVT,MAAK,SAACC,GACJ,IAAIC,EACFC,EAAY,YACVC,EAAU,EACVC,EAAS,EACTC,GAAO,EAQX,OAPIL,GAAWA,EAAQM,WAAW,SAChCL,EAAQX,EAASU,EAAQM,WAAW,QACpCJ,EAAYD,EAAQ,KACpBE,EAAU,GACVC,EAAS,EACTC,GAAO,GAEF,CACLF,UACAC,SACAH,QACAI,OACAH,cAIJK,cAAa,SAACP,EAASQ,OAIZ,cAAEX","file":"chunk-2d0c7a97.56704606ec8b39b8a9be.js","sourcesContent":["import chroma from \"chroma-js\";\n\n/** 色を返す関数 */\nfunction getColor(riskIndex) {\n /** turboというカラーパレットの色の配列*/\n const turbo = [\n \"#4558CB\",\n \"#31B0F5\",\n \"#2AEFA0\",\n \"#A1FE3C\",\n \"#EFCD3A\",\n \"#FA751D\",\n \"#C52602\",\n ];\n\n /** 読み込むGeoJSONのリスクスコアが1-5なので、合わせて分割 */\n const colorScale = chroma.scale(turbo).domain([1, 5]);\n\n return colorScale(riskIndex);\n}\n\nconst geoJsonOptions = {\n /** 調査提案箇所レイヤーの設定 */\n common: {\n style(feature) {\n let color,\n fillColor = \"#00000000\";\n let opacity = 0.0;\n let weight = 0.0;\n let fill = false;\n if (\n feature &&\n feature.properties[\"リスク\"] &&\n feature.properties[\"リスク\"] > 2\n ) {\n color = getColor(feature.properties[\"リスク\"]);\n fillColor = color + \"88\";\n opacity = 1.0;\n weight = 3.0;\n fill = true;\n }\n return {\n opacity,\n weight,\n color,\n fill,\n fillColor,\n };\n },\n\n onEachFeature(feature, layer) {},\n },\n\n \"all-data\": {\n style(feature) {\n let color,\n fillColor = \"#00000000\";\n let opacity = 0.0;\n let weight = 0.0;\n let fill = false;\n if (feature && feature.properties[\"リスク\"]) {\n color = getColor(feature.properties[\"リスク\"]);\n fillColor = color + \"88\";\n opacity = 0.8;\n weight = 3.0;\n fill = true;\n }\n return {\n opacity,\n weight,\n color,\n fill,\n fillColor,\n };\n },\n\n onEachFeature(feature, layer) {},\n },\n};\n\nexport default { geoJsonOptions };\n"],"sourceRoot":""}