GraphicCtrl 的使用
import React, {useState, useEffect} from 'react';
import {View, Text, ScrollView, StyleSheet} from 'react-native';
import {Button, List, Switch} from '@ant-design/react-native';
import {GraphicCtrl, GraphicLayerCtrl, LayerManager, MapManager, MapView} from '@haibalai/react-native-arcgis';
import {connect} from 'react-redux';
import WidthDrawer from '../../../../components/WithDrawer/index';
import {Colors} from 'react-native/Libraries/NewAppScreen';
const MapId = 'baseMap';
const GraphicLayerId = 'graphic点';
const MapImageLayerId = '水闸-MapImageLayer';
const FeatureLayerId = '水闸-featurelayer';
const MapImageLayerIds = [
'水闸-MapImageLayer',
'原水管线-MapImageLayer',
'海堤-MapImageLayer',
'海洋环境区划-MapImageLayer',
];
const FeatureLayerIds = [
'水闸-featurelayer',
'原水管线-featurelayer',
'原水管线-featurelayer',
'海洋环境区划-featurelayer',
];
const GraphicLayerIds = ['graphic点', 'graphic线', 'graphic面'];
const GeoX = 1.2664272368526626e7;
const GeoY = 2595847.2157473154;
const Geo4490X = 113.78868474700005;
const Geo4490Y = 22.693641836999973;
const layerName = 'test';
const graphicStrs = [
{geometry: {type: 'point', x: 113.868676, y: 22.487838, z: 0, spatialReference: {wkid: 4326}}},
{geometry: {type: 'point', x: 113.768676, y: 22.587838, z: 0, spatialReference: {wkid: 4326}}},
{geometry: {type: 'point', x: 113.868676, y: 22.587838, z: 0, spatialReference: {wkid: 4326}}},
];
let graphicId = '';