From 7bc86d070d3607bcb16d593cbc877e53dc069f76 Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 13:08:57 +0530 Subject: [PATCH 1/6] crop fire DPPD trend issue fixed --- .../src/components/MapComponent/Map/Drawer/Drawer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web_portal/src/components/MapComponent/Map/Drawer/Drawer.js b/src/web_portal/src/components/MapComponent/Map/Drawer/Drawer.js index 33703380..8ea9fb67 100644 --- a/src/web_portal/src/components/MapComponent/Map/Drawer/Drawer.js +++ b/src/web_portal/src/components/MapComponent/Map/Drawer/Drawer.js @@ -1077,7 +1077,7 @@ class DrawerComp extends Component { var bodyParams = { geojson: shapeparams, startdate: "2021-01-01", - enddate: "2022-01-20", + enddate: "2021-12-12", }; try { const response = await getcfpoint(bodyParams); @@ -1197,7 +1197,7 @@ class DrawerComp extends Component { var bodyParams = { geojson: shapeparams, startdate: "2021-01-01", - enddate: "2022-01-20", + enddate: "2021-12-12", }; getcftrend(bodyParams) From e1390733a21ed860cd11596d6e413ead84f7a4bf Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 13:15:19 +0530 Subject: [PATCH 2/6] axiosadded component did update in layer details --- .../Common/BottomNav/BottomNav.jsx | 10 +- .../Common/Download/LayerDetails.jsx | 144 ++++++++++-------- 2 files changed, 85 insertions(+), 69 deletions(-) diff --git a/src/web_portal/src/components/MapComponent/Common/BottomNav/BottomNav.jsx b/src/web_portal/src/components/MapComponent/Common/BottomNav/BottomNav.jsx index 44307c5c..3a810876 100644 --- a/src/web_portal/src/components/MapComponent/Common/BottomNav/BottomNav.jsx +++ b/src/web_portal/src/components/MapComponent/Common/BottomNav/BottomNav.jsx @@ -80,8 +80,8 @@ const BottomNav = (props) => { setIsModalDownload(!isModalDownload); setIsModalVisible(false); // setIsModalOther(false); - // setactiveLayer('download'); - // resetStep(); + setactiveLayer('download'); + resetStep(); }, }, @@ -219,11 +219,11 @@ const BottomNav = (props) => { const resetStep = () => { if (activeLayer === 'layer') { - setactiveStep(1); - } else if (activeLayer === 'download') { setactiveStep(0); - } else if (activeLayer === 'other') { + } else if (activeLayer === 'download') { setactiveStep(1); + } else if (activeLayer === 'other') { + setactiveStep(0); } }; diff --git a/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx b/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx index fdfc055c..4efebe66 100644 --- a/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx +++ b/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx @@ -1,10 +1,6 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import axios from 'axios'; -import { - getdownloadfiles, - getlayers -} from "../../../../assets/api/apiService"; +import { getdownloadfiles, getlayers } from '../../../../assets/api/apiService'; const mapStateToProps = (props) => { return { @@ -114,8 +110,7 @@ class LayerDetails extends Component { () => { if (this.state.availableFiles === undefined) { console.log(); - } - else if (this.state.availableFiles[0] === undefined) { + } else if (this.state.availableFiles[0] === undefined) { console.log(); } else { this.props.setdownloadfile( @@ -162,17 +157,39 @@ class LayerDetails extends Component { this.getLayerdetails(); } + + componentDidUpdate(prevProps) { + if ( + prevProps.LayerDescription !== this.props.LayerDescription || + prevProps.DownloadLayer !== this.props.DownloadLayer || + prevProps.SelecterCategory !== this.props.SelecterCategory || + prevProps.SelecterCategoryId !== this.props.SelecterCategoryId + ) { + this.setState({ + layerDesc: this.props.LayerDescription.long_description, + layersource: this.props.LayerDescription.source, + currentselect: this.props.DownloadLayer, + selecterCategory: this.props.SelecterCategory, + DownloadLayer: this.props.DownloadLayer, + selectCategory_id: this.props.SelecterCategoryId || 1, + }); + + this.getavailableFiles(this.props.LayerDescription.id); + this.getLayerdetails(); + } + } + render() { return ( -
+
{ if (this.state.layerdata[1][0].id) { this.setState({ - selecterCategory: "SOCIO-ECONOMIC", + selecterCategory: 'SOCIO-ECONOMIC', selectCategory_id: 1, layerDesc: this.state.layerdata[1][0].long_description, layersource: this.props.LayerDescription.source, @@ -199,7 +216,7 @@ class LayerDetails extends Component { ); } else { this.setState({ - selecterCategory: "SOCIO-ECONOMIC", + selecterCategory: 'SOCIO-ECONOMIC', selectCategory_id: 1, }); } @@ -226,15 +243,15 @@ class LayerDetails extends Component { id="env" name="radiolayer" checked={ - this.state.selecterCategory === "ENVIRONMENTAL" || + this.state.selecterCategory === 'ENVIRONMENTAL' || this.state.selectCategory_id === 2 } onClick={() => { - console.log("clicked"); + console.log('clicked'); if (this.state.layerdata[2][0].id) { this.setState({ - selecterCategory: "ENVIRONMENTAL", + selecterCategory: 'ENVIRONMENTAL', selectCategory_id: 2, layerDesc: this.state.layerdata[2][0].long_description, layersource: this.props.LayerDescription.source, @@ -247,7 +264,7 @@ class LayerDetails extends Component { ); } else { this.setState({ - selecterCategory: "ENVIRONMENTAL", + selecterCategory: 'ENVIRONMENTAL', selectCategory_id: 2, }); } @@ -270,14 +287,14 @@ class LayerDetails extends Component { /> - {" "} + {' '} - {" "} + {' '} - {" "} - {" "} - {" "} - {" "} + {' '} + {' '} + {' '} + {' '}
Environmental
@@ -288,13 +305,13 @@ class LayerDetails extends Component { id="infra" name="radiolayer" checked={ - this.state.selecterCategory === "INFRASTRUCTURE" || + this.state.selecterCategory === 'INFRASTRUCTURE' || this.state.selectCategory_id === 3 } onClick={() => { if (this.state.layerdata[3][0].id) { this.setState({ - selecterCategory: "ENVIRONMENTAL", + selecterCategory: 'ENVIRONMENTAL', selectCategory_id: 3, layerDesc: this.state.layerdata[3][0].long_description, layersource: this.props.LayerDescription.source, @@ -307,7 +324,7 @@ class LayerDetails extends Component { ); } else { this.setState({ - selecterCategory: "INFRASTRUCTURE", + selecterCategory: 'INFRASTRUCTURE', selectCategory_id: 3, }); } @@ -333,13 +350,13 @@ class LayerDetails extends Component { name="radiolayer" checked={ this.state.selecterCategory === - "POSITIVE DEVIANCE & NEGATIVE DEVIANCE" || + 'POSITIVE DEVIANCE & NEGATIVE DEVIANCE' || this.state.selectCategory_id === 4 } onClick={() => { if (this.state.layerdata[4][0].id) { this.setState({ - selecterCategory: "POSITIVE DEVIANCE & NEGATIVE DEVIANCE", + selecterCategory: 'POSITIVE DEVIANCE & NEGATIVE DEVIANCE', selectCategory_id: 4, layerDesc: this.state.layerdata[4][0].long_description, }); @@ -351,7 +368,7 @@ class LayerDetails extends Component { ); } else { this.setState({ - selecterCategory: "POSITIVE DEVIANCE & NEGATIVE DEVIANCE", + selecterCategory: 'POSITIVE DEVIANCE & NEGATIVE DEVIANCE', selectCategory_id: 4, }); } @@ -405,16 +422,16 @@ class LayerDetails extends Component {

-
+
this.changeFile(e)} defaultChecked={this.state.currentselect} > - {this.state.availableFiles === - undefined + {this.state.availableFiles === undefined ? console.log() : this.state.availableFiles.map(function (layer, index) { - return ( - - ); - })} + return ( + + ); + })}

- You can also download the data using our open API{" "} + You can also download the data using our open API{' '} know more From d8e0984a269902ea2ca53d69d15dd5238e7f122f Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 16:28:16 +0530 Subject: [PATCH 3/6] style bug fix --- .../src/components/MapComponent/Map/Map.css | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/web_portal/src/components/MapComponent/Map/Map.css b/src/web_portal/src/components/MapComponent/Map/Map.css index cfb35197..01024aae 100644 --- a/src/web_portal/src/components/MapComponent/Map/Map.css +++ b/src/web_portal/src/components/MapComponent/Map/Map.css @@ -16,24 +16,41 @@ .home-icon { padding: 9px; } + .leaflet-touch .leaflet-bar a { background: rgba(255, 255, 255, 0.4); box-shadow: 0px 2.42857px 6.47619px rgba(0, 0, 0, 0.1); backdrop-filter: blur(45px); color: #ffffff; /* Note: backdrop-filter has minimal browser support */ + + /* border-radius: 12.1429px; */ width: 40px !important; height: 42.5px !important; } + .leaflet-touch .leaflet-bar a { width: 30px; height: 30px; line-height: 40px !important; } + +/* .leaflet-touch .leaflet-bar a:first-child { + margin-bottom: 12px + } */ + .leaflet-bar a, .leaflet-bar a:hover { border-bottom: none; } + +/* .leaflet-touch .leaflet-bar a:last-child { + border-radius: 4px + } + + .leaflet-touch .leaflet-bar a:first-child { + border-radius: 4px + } */ .leaflet-touch .leaflet-bar a:first-child { border-top-left-radius: 5px; border-top-right-radius: 5px; @@ -169,6 +186,15 @@ option:checked { } .state-name { + /* font-style: normal; + font-size: 24px; + line-height: 35px; + display: flex; + align-items: center; + color: #ffffff; + position: relative; + left: 86px; + top: 4px; */ background-color: #40822c; color: #fff; border-radius: 3px; @@ -219,8 +245,11 @@ input[type='search']::placeholder { font-style: normal; font-size: 14px; line-height: 15px; + /* identical to box height, or 94% */ + display: flex; align-items: center; + color: #ffffff; } @@ -523,7 +552,7 @@ input.nosubmit { :where(.css-19gw05y).ant-drawer { position: fixed; inset: 0; - z-index: 997; + z-index: 10000; pointer-events: none; } From 417cb9a15935a3155f308589ff08266c5ab55bac Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 18:35:54 +0530 Subject: [PATCH 4/6] commented componentDidUpdate --- .../Common/Download/LayerDetails.jsx | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx b/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx index 4efebe66..02a5ddf5 100644 --- a/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx +++ b/src/web_portal/src/components/MapComponent/Common/Download/LayerDetails.jsx @@ -158,26 +158,26 @@ class LayerDetails extends Component { this.getLayerdetails(); } - componentDidUpdate(prevProps) { - if ( - prevProps.LayerDescription !== this.props.LayerDescription || - prevProps.DownloadLayer !== this.props.DownloadLayer || - prevProps.SelecterCategory !== this.props.SelecterCategory || - prevProps.SelecterCategoryId !== this.props.SelecterCategoryId - ) { - this.setState({ - layerDesc: this.props.LayerDescription.long_description, - layersource: this.props.LayerDescription.source, - currentselect: this.props.DownloadLayer, - selecterCategory: this.props.SelecterCategory, - DownloadLayer: this.props.DownloadLayer, - selectCategory_id: this.props.SelecterCategoryId || 1, - }); + // componentDidUpdate(prevProps) { + // if ( + // prevProps.LayerDescription !== this.props.LayerDescription || + // prevProps.DownloadLayer !== this.props.DownloadLayer || + // prevProps.SelecterCategory !== this.props.SelecterCategory || + // prevProps.SelecterCategoryId !== this.props.SelecterCategoryId + // ) { + // this.setState({ + // layerDesc: this.props.LayerDescription.long_description, + // layersource: this.props.LayerDescription.source, + // currentselect: this.props.DownloadLayer, + // selecterCategory: this.props.SelecterCategory, + // DownloadLayer: this.props.DownloadLayer, + // selectCategory_id: this.props.SelecterCategoryId || 1, + // }); - this.getavailableFiles(this.props.LayerDescription.id); - this.getLayerdetails(); - } - } + // this.getavailableFiles(this.props.LayerDescription.id); + // this.getLayerdetails(); + // } + // } render() { return ( From e28ab16366b3eb2c7b3f4255c0d68fb0da19b8e6 Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 18:37:53 +0530 Subject: [PATCH 5/6] search position bug fixed --- src/web_portal/src/components/MapComponent/Map/Map.css | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/web_portal/src/components/MapComponent/Map/Map.css b/src/web_portal/src/components/MapComponent/Map/Map.css index 01024aae..96d15c55 100644 --- a/src/web_portal/src/components/MapComponent/Map/Map.css +++ b/src/web_portal/src/components/MapComponent/Map/Map.css @@ -552,7 +552,7 @@ input.nosubmit { :where(.css-19gw05y).ant-drawer { position: fixed; inset: 0; - z-index: 10000; + z-index: 997; pointer-events: none; } @@ -844,7 +844,12 @@ input.nosubmit { :where(.css-dev-only-do-not-override-19gw05y).ant-drawer { z-index: 10000; } - + :where(.css-19gw05y).ant-drawer { + inset: 0; + pointer-events: none; + position: fixed; + z-index: 10000; +} #clear-button-1 { position: absolute; right: 10px; From 86f5a670334e54bab688de8bb11f985167650b16 Mon Sep 17 00:00:00 2001 From: Maneesh7012 Date: Wed, 13 Sep 2023 18:40:41 +0530 Subject: [PATCH 6/6] place name added --- .../MapComponent/Common/Sidebar.jsx | 539 ++++++++++-------- .../MapComponent/Map/Drawer/Drawer.js | 5 +- .../src/components/MapComponent/Map/Map.jsx | 10 +- src/web_portal/src/reducers/setplacename.js | 2 +- 4 files changed, 321 insertions(+), 235 deletions(-) diff --git a/src/web_portal/src/components/MapComponent/Common/Sidebar.jsx b/src/web_portal/src/components/MapComponent/Common/Sidebar.jsx index 413dc40d..dcf96d45 100644 --- a/src/web_portal/src/components/MapComponent/Common/Sidebar.jsx +++ b/src/web_portal/src/components/MapComponent/Common/Sidebar.jsx @@ -1,39 +1,39 @@ -import React, { useState, useEffect } from 'react'; -import './Sidebar.css'; -import Toggle from '../../../assets/images/toggle.png'; -import Close from '../../../assets/images/close.png'; -import Layer from '../../../assets/images/layer.png'; -import Download from '../../../assets/images/download.png'; -import Help from '../../../assets/images/help.png'; -import Analytics from '../../../assets/images/siteanalytics.png'; -import Git from '../../../assets/images/github.png'; -import { NavLink } from 'react-router-dom'; -import Back from '../../../assets/images/back.png'; -import { Form, FormGroup, Label, Input, Button, Row, Col } from 'reactstrap'; -import LayerDetails from './Download/LayerDetails'; -import PersonalDetails from './Download/PersonalDetails.jsx'; -import { Tooltip } from 'react-tooltip'; -import 'react-tooltip/dist/react-tooltip.css'; -import { getlayers } from '../../../assets/api/apiService'; -import Nav from '../../../assets/images/navarrow.png'; -import ColorPicker from './ColorPicker'; -import { useLocation } from 'react-router-dom'; -import { useSelector, useDispatch } from 'react-redux'; -import Config from '../Config/config'; -import { setcurrentlayer } from '../../../actions/index'; -import { getraster } from '../../../assets/api/apiService'; +import React, { useState, useEffect } from "react"; +import "./Sidebar.css"; +import Toggle from "../../../assets/images/toggle.png"; +import Close from "../../../assets/images/close.png"; +import Layer from "../../../assets/images/layer.png"; +import Download from "../../../assets/images/download.png"; +import Help from "../../../assets/images/help.png"; +import Analytics from "../../../assets/images/siteanalytics.png"; +import Git from "../../../assets/images/github.png"; +import { NavLink } from "react-router-dom"; +import Back from "../../../assets/images/back.png"; +import { Form, FormGroup, Label, Input, Button, Row, Col } from "reactstrap"; +import LayerDetails from "./Download/LayerDetails"; +import PersonalDetails from "./Download/PersonalDetails.jsx"; +import { Tooltip } from "react-tooltip"; +import "react-tooltip/dist/react-tooltip.css"; +import { getlayers } from "../../../assets/api/apiService"; +import Nav from "../../../assets/images/navarrow.png"; +import ColorPicker from "./ColorPicker"; +import { useLocation } from "react-router-dom"; +import { useSelector, useDispatch } from "react-redux"; +import Config from "../Config/config"; +import { setcurrentlayer } from "../../../actions/index"; +import { getraster } from "../../../assets/api/apiService"; import { BiDownload, BiInfoSquare, BiHide, BiShow, // BiSquare, -} from 'react-icons/bi'; -import { useTour } from '@reactour/tour'; -import marker from '../../../assets/images/locationMK.png'; +} from "react-icons/bi"; +import { useTour } from "@reactour/tour"; +import marker from "../../../assets/images/locationMK.png"; import LulcLegend from "../Common/Legend/LulcLegend"; import CropLegend from "../Common/Legend/CropLegend"; -import FELegend from './Legend/FELegend'; +import FELegend from "./Legend/FELegend"; const Sidebar = (props) => { const [isOpen, setIsOpen] = useState(false); @@ -44,12 +44,11 @@ const Sidebar = (props) => { const [allLayers, setLayers] = useState([]); const [isCollapse, setIsCollapse] = useState([false]); const [isLegendshow, setIsLegendshow] = useState([false]); - const [selectedCategory, setselectedCategory] = useState('SOCIO-ECONOMIC'); - const [selectedCategory_id, setselectedCategory_id] = useState('1'); - const [rasterurl, setrasterurl] = useState(''); + const [selectedCategory, setselectedCategory] = useState("SOCIO-ECONOMIC"); + const [selectedCategory_id, setselectedCategory_id] = useState("1"); + const [rasterurl, setrasterurl] = useState(""); const LayerToggle = useSelector((state) => state.RasterOpacity); - const { isOpen: isTourOpen, setIsOpen: setTourOpen } = useTour(); let hoverLatLon = useSelector((state) => state.Hoverlatlon); @@ -60,6 +59,8 @@ const Sidebar = (props) => { const currentraster = useSelector((state) => state.RasterLayerUrl); let layertype = useSelector((state) => state.CurrentLayerType); const DownloadDesc = useSelector((state) => state.DownloadLayer); + const setplace = useSelector((state) => state.setplace); + const currentregion = useSelector((state) => state.CurrentRegion); var valueKey = 1; const toggleClass = () => { setIsChangeclass(!isChangeclass); @@ -77,14 +78,14 @@ const Sidebar = (props) => { const toggleshow = () => setIsLegendshow(!isLegendshow); function toggleLayer() { if (LayerToggle === true) { - dispatch({ type: 'HIDERASTER' }); + dispatch({ type: "HIDERASTER" }); setrasterurl(currentraster); // dispatch({ type: 'SETRASTERLAYERURL', payload: rasterurl }); - dispatch({ type: 'CHANGEKEYMAP' }); + dispatch({ type: "CHANGEKEYMAP" }); } else { - dispatch({ type: 'SHOWRASTER' }); + dispatch({ type: "SHOWRASTER" }); // dispatch({ type: 'SETRASTERLAYERURL', payload: rasterurl }); - dispatch({ type: 'CHANGEKEYMAP' }); + dispatch({ type: "CHANGEKEYMAP" }); } } const getLayers = (id) => { @@ -96,11 +97,11 @@ const Sidebar = (props) => { return r; }, Object.create(null)); setLayers(result); - dispatch({ type: 'CHANGELAYERDESC', payload: result[1][0] }); + dispatch({ type: "CHANGELAYERDESC", payload: result[1][0] }); }); }; const handleClick = () => { - window.open('https://github.com/UNDP-India/Data4Policy/'); + window.open("https://github.com/UNDP-India/Data4Policy/"); }; const location = useLocation(); @@ -115,103 +116,103 @@ const Sidebar = (props) => { function changeLayer(layername, layerdetails) { props.onClose(); dispatch({ - type: 'SETSELECTERCATEGORY', + type: "SETSELECTERCATEGORY", payload: selectedCategory, }); dispatch({ - type: 'SETSELECTERCATEGORYID', + type: "SETSELECTERCATEGORYID", payload: selectedCategory_id, }); - dispatch({ type: 'SETDOWNLOADLAYER', payload: layerdetails.display_name }); - dispatch({ type: 'DOWNCHANGELAYERDESC', payload: layerdetails }); - dispatch({ type: 'REMOVE_MARKER', payload: [0,0] }) + dispatch({ type: "SETDOWNLOADLAYER", payload: layerdetails.display_name }); + dispatch({ type: "DOWNCHANGELAYERDESC", payload: layerdetails }); + dispatch({ type: "REMOVE_MARKER", payload: [0, 0] }); dispatch(setcurrentlayer(layername)); - dispatch({ type: 'CHANGELAYERDESC', payload: layerdetails }); - dispatch({ type: "SHOWDRAWER",payload: false }); + dispatch({ type: "CHANGELAYERDESC", payload: layerdetails }); + dispatch({ type: "SHOWDRAWER", payload: false }); var layerID = layerdetails.id; dispatch({ - type: 'SETRASLATLON', + type: "SETRASLATLON", payload: [Config.loaderlatvector, Config.loaderlngvector], }); getraster(layerID).then((json) => { if ( layerdetails.raster_status === false || - layerdetails.layername === 'SOIL_M_DEV' || - layerdetails.layername === 'LAI_DPPD' + layerdetails.layername === "SOIL_M_DEV" || + layerdetails.layername === "LAI_DPPD" ) { - dispatch({ type: 'SETCURRRENTLAYERTYPE', payload: 'Vector' }); + dispatch({ type: "SETCURRRENTLAYERTYPE", payload: "Vector" }); dispatch({ - type: 'SETRASLATLON', + type: "SETRASLATLON", payload: [60.732421875, 80.67555881973475], }); props.changecurrentlayer(layerdetails.id); - dispatch({ type: 'SETCURRENTREGION', payload: 'DISTRICT' }); - dispatch({ type: 'SETCUSTOMSTATUS', payload: false }); + dispatch({ type: "SETCURRENTREGION", payload: "DISTRICT" }); + dispatch({ type: "SETCUSTOMSTATUS", payload: false }); dispatch({ - type: 'SETCURRRENTBASEMAP', + type: "SETCURRRENTBASEMAP", payload: - 'https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + "https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png", }); - dispatch({ type: 'SETCURRRENTBASEMAPTYPE', payload: 'Dark' }); + dispatch({ type: "SETCURRRENTBASEMAPTYPE", payload: "Dark" }); } else if (layerdetails.raster_status === true) { let result = process.env.REACT_APP_APIEND_RASTER.replace( - 'LAYER_DETAILS_ID', + "LAYER_DETAILS_ID", layerdetails.id ); props.changecurrentlayer(layerdetails.id); - dispatch({ type: 'SETRASTERLAYERURL', payload: result }); - dispatch({ type: 'SETCURRENTREGION', payload: 'DISTRICT' }); - dispatch({ type: 'SETCUSTOMSTATUS', payload: false }); + dispatch({ type: "SETRASTERLAYERURL", payload: result }); + dispatch({ type: "SETCURRENTREGION", payload: "DISTRICT" }); + dispatch({ type: "SETCUSTOMSTATUS", payload: false }); dispatch({ - type: 'SETCURRRENTBASEMAP', + type: "SETCURRRENTBASEMAP", payload: - 'https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + "https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png", }); - dispatch({ type: 'SETCURRRENTBASEMAPTYPE', payload: 'Dark' }); - dispatch({ type: 'SHOWRASTER' }); - dispatch({ type: 'SETCURRRENTLAYERTYPE', payload: 'Raster' }); - dispatch({ type: 'SHOWLAYERTYPE', payload: true }); + dispatch({ type: "SETCURRRENTBASEMAPTYPE", payload: "Dark" }); + dispatch({ type: "SHOWRASTER" }); + dispatch({ type: "SETCURRRENTLAYERTYPE", payload: "Raster" }); + dispatch({ type: "SHOWLAYERTYPE", payload: true }); } let result = process.env.REACT_APP_APIEND_RASTER.replace( - 'LAYER_DETAILS_ID', + "LAYER_DETAILS_ID", layerdetails.id ); props.changecurrentlayer(layerdetails.id); - dispatch({ type: 'SETCURRENTREGION', payload: 'DISTRICT' }); - dispatch({ type: 'SETRASTERLAYERURL', payload: result }); - dispatch({ type: 'SETCUSTOMSTATUS', payload: false }); + dispatch({ type: "SETCURRENTREGION", payload: "DISTRICT" }); + dispatch({ type: "SETRASTERLAYERURL", payload: result }); + dispatch({ type: "SETCUSTOMSTATUS", payload: false }); dispatch({ - type: 'SETCURRRENTBASEMAP', + type: "SETCURRRENTBASEMAP", payload: - 'https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png', + "https://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}{r}.png", }); - dispatch({ type: 'SETCURRRENTBASEMAPTYPE', payload: 'Dark' }); - dispatch({ type: 'SHOWRASTER' }); - dispatch({ type: 'SHOWLAYERTYPE', payload: true }); + dispatch({ type: "SETCURRRENTBASEMAPTYPE", payload: "Dark" }); + dispatch({ type: "SHOWRASTER" }); + dispatch({ type: "SHOWLAYERTYPE", payload: true }); }); - localStorage.setItem('id', layerdetails.id); + localStorage.setItem("id", layerdetails.id); } const onOpenDownloads = (layer, desc) => { dispatch({ - type: 'SETSELECTERCATEGORY', + type: "SETSELECTERCATEGORY", payload: selectedCategory, }); dispatch({ - type: 'SETSELECTERCATEGORYID', + type: "SETSELECTERCATEGORYID", payload: selectedCategory_id, }); - dispatch({ type: 'SETDOWNLOADLAYER', payload: layer }); - dispatch({ type: 'DOWNCHANGELAYERDESC', payload: desc }); + dispatch({ type: "SETDOWNLOADLAYER", payload: layer }); + dispatch({ type: "DOWNCHANGELAYERDESC", payload: desc }); }; return (
-
+
{ { }
- {'Layers'} + {"Layers"}
{ }
- {'Download'} + {"Download"}
{ }
- {'Help'} + {"Help"}
{ }
- {'Site Analytics'} + {"Site Analytics"}
{ }
- {'GitHub'} + {"GitHub"}
{Showlayer && (
Layers @@ -423,7 +424,7 @@ const Sidebar = (props) => {
{ id="socio-eco" name="radiolayer" onClick={() => { - setselectedCategory('SOCIO-ECONOMIC'); - setselectedCategory_id('1'); + setselectedCategory("SOCIO-ECONOMIC"); + setselectedCategory_id("1"); }} defaultChecked={ - selectedCategory === 'SOCIO-ECONOMIC' ? true : false + selectedCategory === "SOCIO-ECONOMIC" ? true : false } />