{"version":3,"sources":["webpack:///./src/projectModules/eeh2023/geojson-options.js"],"names":["infoStack","infoName","infoList","common","windpoles","getTotalInfo","map","key","createInfo","feature","layer","arr","name","info","obj","value","properties","property","postfix","clearInfo","setInfoPanel","on","e","store","commit","includes","unshift","filter","item","geoJsonOptionDefault","onEachFeature","commonEventFunc","pointToLayer","latlng","L","CircleMarker","commonObj","circleStyle","style","commonStyleFunc","interactive","radius","opacity","weight","color","fill","fillColor","geoJsonOptions","Object","assign","geoJsonOptionImport"],"mappings":"oQASIA,EAAY,GACVC,EAAW,GAEXC,EAAW,CACfC,OAAQ,GACRC,UAAW,IAGb,SAASC,IACP,OAAOL,EAAUM,KAAI,SAACC,GAAG,OAAKL,EAASK,MAGzC,SAASC,EAAWC,EAASC,EAAOC,EAAKC,GACvC,IAAMC,EAAOF,EAAIL,KAAI,SAACQ,GACpB,IAAMC,EACgC,KAApCN,EAAQO,WAAWF,EAAIG,WACa,MAApCR,EAAQO,WAAWF,EAAIG,UACnBR,EAAQO,WAAWF,EAAIG,UACvB,IACAC,EAAUJ,EAAII,SAAW,GAC/B,MAAO,CAAEX,IAAKO,EAAIP,IAAKQ,MAAOA,EAAQG,MAGxChB,EAASU,GAAQ,CAAEA,KAAMX,EAASW,GAAOG,MAAOF,GAGlD,SAASM,EAAUP,GACjBV,EAASU,GAAQ,GAGnB,SAASQ,EAAaX,EAASC,EAAOC,EAAKC,GACzCF,EAAMW,GAAG,aAAa,SAAUC,GAC9Bd,EAAWC,EAASC,EAAOC,EAAKC,GAChCW,OAAMC,OAAO,sBAAsB,GAC9BxB,EAAUyB,SAASb,IAAOZ,EAAU0B,QAAQd,GACjD,IAAMC,EAAOR,IACbkB,OAAMC,OAAO,mBAAoB,CAAEX,KAAMA,OAG3CH,EAAMW,GAAG,YAAY,WACnBF,EAAUP,GACVZ,EAAYA,EAAU2B,QAAO,SAACC,GAAI,OAAKA,IAAShB,KAChDW,OAAMC,OAAO,sBAAsB,MAYvC,IAAMK,EAAuB,CAC3B1B,OAAQ,CACN2B,cAAe,SAACrB,EAASC,GACvBqB,6BAAgBtB,EAASC,IAE3BsB,aAAc,SAAUvB,EAASwB,GAE/B,OAAO,IAAIC,IAAEC,aAAaF,EAAQG,eAAUC,cAM9CC,MAAO,SAAU7B,GACf8B,6BAAgB9B,KAIpBL,UAAW,CACToC,aAAa,EACbR,aAAc,SAAUvB,EAASwB,GAC/B,OAAO,IAAIC,IAAEC,aAAaF,EAAQ,CAChCQ,OAAQ,MAGZH,MAAK,SAAC7B,GAEJ,MAAO,CACLiC,QAAS,EACTC,OAAQ,EACRC,MAAO,UACPC,MAAM,EACNC,UAAW,cAGfhB,cAAe,SAACrB,EAASC,GAEvBU,EACEX,EACAC,EACA,CACE,CAAEH,IAAK,KAAMU,SAAU,MACvB,CAAEV,IAAK,aAAcU,SAAU,cAC/B,CAAEV,IAAK,UAAWU,SAAU,WAC5B,CAAEV,IAAK,UAAWU,SAAU,WAC5B,CAAEV,IAAK,OAAQU,SAAU,QACzB,CAAEV,IAAK,MAAOU,SAAU,QAE1B,YAMF8B,EAAiBC,OAAOC,OAC5B,GACApB,EACAqB,cAGa,cAAEH","file":"chunk-2d0b1e14.56704606ec8b39b8a9be.js","sourcesContent":["import store from \"@/store/index.js\";\nimport L from \"leaflet\";\nimport {\n commonObj,\n commonEventFunc,\n commonStyleFunc,\n} from \"@/projectModules/eeh2023/geojson-options-common.js\";\nimport geoJsonOptionImport from \"@/projectModules/eeh2023/geojson-options-import.js\";\n\nlet infoStack = [];\nconst infoName = {};\n\nconst infoList = {\n common: {},\n windpoles: {},\n};\n\nfunction getTotalInfo() {\n return infoStack.map((key) => infoList[key]);\n}\n\nfunction createInfo(feature, layer, arr, name) {\n const info = arr.map((obj) => {\n const value =\n feature.properties[obj.property] != \" \" &&\n feature.properties[obj.property] != null\n ? feature.properties[obj.property]\n : \"-\";\n const postfix = obj.postfix || \"\";\n return { key: obj.key, value: value + postfix };\n });\n\n infoList[name] = { name: infoName[name], value: info };\n}\n\nfunction clearInfo(name) {\n infoList[name] = [];\n}\n\nfunction setInfoPanel(feature, layer, arr, name) {\n layer.on(\"mouseover\", function (e) {\n createInfo(feature, layer, arr, name);\n store.commit(\"setInfoPanelIsShow\", true);\n if (!infoStack.includes(name)) infoStack.unshift(name);\n const info = getTotalInfo();\n store.commit(\"setInfoPanelInfo\", { info: info });\n });\n\n layer.on(\"mouseout\", function () {\n clearInfo(name);\n infoStack = infoStack.filter((item) => item !== name);\n store.commit(\"setInfoPanelIsShow\", false);\n });\n}\n\n/** Clusterにするときは以下を追加(1/2)\nconst markerCluster = L.markerClusterGroup({\n polygonOptions: {\n color: \"#a08b50\",\n },\n});\n*/\n\nconst geoJsonOptionDefault = {\n common: {\n onEachFeature: (feature, layer) => {\n commonEventFunc(feature, layer);\n },\n pointToLayer: function (feature, latlng) {\n // console.log(\"point\", feature);\n return new L.CircleMarker(latlng, commonObj.circleStyle);\n /** Clusterにするときは以下を追加(2/2)\n let marker = new L.CircleMarker(latlng, commonObj.circleStyle);\n return markerCluster.addLayer(marker);\n */\n },\n style: function (feature) {\n commonStyleFunc(feature);\n },\n },\n\n windpoles: {\n interactive: true,\n pointToLayer: function (feature, latlng) {\n return new L.CircleMarker(latlng, {\n radius: 10,\n });\n },\n style(feature) {\n // console.log(feature);\n return {\n opacity: 1.0,\n weight: 3.0,\n color: \"#a08b50\",\n fill: true,\n fillColor: \"#2B9944\" + \"cc\", // --- 塗りの色のみ透明度を追加\n };\n },\n onEachFeature: (feature, layer) => {\n // console.log(feature);\n setInfoPanel(\n feature,\n layer,\n [\n { key: \"id\", property: \"id\" },\n { key: \"wind_speed\", property: \"wind_speed\" },\n { key: \"dist_rd\", property: \"dist_rd\" },\n { key: \"dist_tl\", property: \"dist_tl\" },\n { key: \"rank\", property: \"rank\" },\n { key: \"irr\", property: \"irr\" },\n ],\n \"rank1\",\n );\n },\n },\n};\n\nconst geoJsonOptions = Object.assign(\n {},\n geoJsonOptionDefault,\n geoJsonOptionImport,\n);\n\nexport default { geoJsonOptions };\n"],"sourceRoot":""}