//针对arcgis的featurelayer 封装FeatureLayerCtrl和案例
import React, {useEffect, useState} from 'react';
import {Clipboard, ScrollView, StyleSheet, Text, View} from 'react-native';
import {Button, List, Switch} from '@ant-design/react-native';
import {
FeatureLayerCtrl,
Graphic,
LayerManager,
MapManager,
MapView,
QueryParameters,
RenderingMode,
} from '@haibalai/react-native-arcgis';
import {connect} from 'react-redux';
import WidthDrawer from '../../../../components/WithDrawer/index';
const MapId = 'baseMap';
// const EditFeatureLayerId3857 = '排水渠道-FeatureServer';
// const EditFeatureLayerId3857 = '海洋环境区划-FeatureServer';
const EditFeatureLayerId3857 = '水闸-featurelayer';
const EditFeatureLayerId4490 = '水闸-featurelayer';
const EditFeatureLayerUrl3857 =
'https://xxxx/FeatureServer/4';
const EditFeatureLayerUrl4490 =
'https://xxxxx/FeatureServer/4';
const FeatureLayerIds3857 = [
'水闸-featurelayer',
'原水管线-featurelayer',
'原水管线-featurelayer',
'海洋环境区划-featurelayer',
];
const FeatureLayerIds4490 = [
'水闸-featurelayer',
'原水管线-featurelayer',
'原水管线-featurelayer',
'海洋环境区划-featurelayer',
];
let FeatureIds: string[] = [];
/** sideBar组件
*
@param {*} renderCb renderCb是一个函数, 每次触发并且向里面传值(对象),content组件就以sideBarData的属性去接受
*/
const SideBar = ({renderCb, Home}: any) => {
const [content, changeContent] = useState('');
const [errorContent, changeErrorContent] = useState('');
const [singleFeatureLayerStatus, setSingleFeatureStatus] = useState(false);
const [multiFeatureLayerStatus, setMultiFeatureLayerStatus] = useState(false);
const [PopupEnabled, setPopupEnabled] = useState(false);
const [LabelsEnabled, setLabelsEnabled] = useState(false);
const [ScaleSymbols, setScaleSymbols] = useState(false);
useEffect(() => {
renderCb({content, errorContent});
}, [content, errorContent,