React Native for Arcgis 地图开发 MeasureCtrl (十六)
移动端MeasureCtrl 测量工具
import React, {useEffect, useState} from 'react';
import {DeviceEventEmitter, ScrollView, StyleSheet, Text, View, Clipboard} from 'react-native';
import {Button, List} from '@ant-design/react-native';
import {MapManager, MapView, MeasureCtrl} from '@haibalai/react-native-arcgis';
import {connect} from 'react-redux';
import WidthDrawer from '../../../../components/WithDrawer/index';
import {MeasureEventType} from '../../../../../nativeModules/core/MeasureEventType';
const MapId = 'baseMap';
const TextSymbol = {
angle: 0,
backgroundColor: '#ffffff',
borderLineColor: '#ff0000',
borderLineSize: 0,
color: 'green',
font: {decoration: 'none', family: '宋体', size: 9.75, style: 'normal', weight: 'normal'},
// haloColor: '#0000ff',
// haloSize: 0,
horizontalAlignment: 'left',
kerning: false,
type: 'text',
verticalAlignment: 'middle',
xoffset: 6,
yoffset: 12,
};
const PolygonSymbol = {color: [200, 0, 0, 125], style: 'solid', type: 'esriSFS'};
const PolylineSymbol = {color: [14, 200, 230, 255], style: 'solid', type: 'esriSLS', width: 4};
const PointSymbol = {
angle: 0,
color: '#ff00ff',
outline: {color: [14, 98, 230, 255], style: 'solid', type: 'esriSLS', width: 1.5},
size: 9,
style: 'circle',