GraphicLayer 的封装调用
import React, {useEffect, useState} from 'react';
import {ScrollView, StyleSheet, Text, View} from 'react-native';
import {Button, List, Switch} from '@ant-design/react-native';
import {
FeatureLayerCtrl,
Graphic,
GraphicLayerCtrl,
LayerManager,
MapManager,
MapView,
RenderingMode,
} from '@haibalai/react-native-arcgis';
import {connect} from 'react-redux';
import WidthDrawer from '../../../../components/WithDrawer/index';
const MapId = 'baseMap';
const EditFeatureLayerId3857 = '水闸-featurelayer';
const EditFeatureLayerId4490 = '水闸-featurelayer';
const FeatureLayerIds3857 = [
'水闸-featurelayer',
'原水管线-featurelayer',
'原水管线-featurelayer',
'海洋环境区划-featurelayer',
];
const FeatureLayerIds4490 = [
'水闸-featurelayer',
'原水管线-featurelayer',
'原水管线-featurelayer',
'海洋环境区划-featurelayer',
];
const layerName = 'test';
let graphicId = '';
let graphicIds = [''];
const graphicStr = {geometry: {type: 'point', x: 113.868676, y: 22.587838, z: 0, spatialReference: {wkid: 4326}}};
const graphicStrs = [
{
geometry: {type: 'point', x: 113.868676, y: 22.487838, z: 0, spatialReference: {wkid: 4326}},
symbol: {
type: 'picture-marker',
url: 'https://static.arcgis.com/images/Symbols/Shapes/BlackStarLargeB.png',
width: 20,
height: 20,
opacity: 1,
xOffset: 20,
yOffset: 20,
angle: 45,
},
},
{
geometry: {type: 'point', x: 113.768676, y: 22.587838, z: 0