|
@@ -15,6 +15,8 @@ import com.cr.data.CrUtil
|
|
import com.cr.dialog.DialogInput
|
|
import com.cr.dialog.DialogInput
|
|
import com.cr.dialog.DialogNormal
|
|
import com.cr.dialog.DialogNormal
|
|
import com.cr.map.*
|
|
import com.cr.map.*
|
|
|
|
+import com.cr.models.ResultModel
|
|
|
|
+import com.cr.models.iCompletion
|
|
import com.esri.arcgisruntime.arcgisservices.LabelDefinition
|
|
import com.esri.arcgisruntime.arcgisservices.LabelDefinition
|
|
import com.esri.arcgisruntime.data.Feature
|
|
import com.esri.arcgisruntime.data.Feature
|
|
import com.esri.arcgisruntime.data.FeatureTable
|
|
import com.esri.arcgisruntime.data.FeatureTable
|
|
@@ -87,23 +89,29 @@ class FragmentMap : CrAnimationFragment() {
|
|
val MEDIA_TYPE_REPEAT_YES = "5"; // define: 2023/4/13 已上传的复飞案件
|
|
val MEDIA_TYPE_REPEAT_YES = "5"; // define: 2023/4/13 已上传的复飞案件
|
|
|
|
|
|
// todo: 2023/4/14 字段相关常量
|
|
// todo: 2023/4/14 字段相关常量
|
|
- val FIELD_NET_CASE_POLYGON_AJH = "AJH"; // define: 2023/4/13 网络案件的案件编号
|
|
|
|
- val FIELD_CASE_POLYGON_ANJID = "ANJID"; // define: 2023/4/13 案件ID
|
|
|
|
- val FIELD_CASE_POLYGON_MJ = "MJ"; // define: 2023/4/13 面积
|
|
|
|
- val FIELD_CASE_POLYGON_BZ = "BZ"; // define: 2023/4/13 违建面的类型 0--代表未匹配 1--代表已匹配
|
|
|
|
- val FIELD_CASE_POLYGON_BZ_VALUE_NO = "0"; // define: 2023/4/13 未匹配
|
|
|
|
- val FIELD_CASE_POLYGON_BZ_VALUE_YES = "1"; // define: 2023/4/13 已匹配
|
|
|
|
- val FIELD_CASE_NAME = "NAME"; // define: 2023/4/13 名称字段
|
|
|
|
- val FIELD_CASE_IMAGES = "IMAGES"; // define: 2023/4/13 图片集合字段
|
|
|
|
- val FIELD_CASE_RQ = "RQ"; // define: 2023/4/13 日期字段
|
|
|
|
- val FIELD_CASE_LAT = "LAT"; // define: 2023/4/13 纬度字段
|
|
|
|
- val FIELD_CASE_LNG = "LNG"; // define: 2023/4/13 经度字段
|
|
|
|
- val FIELD_CASE_ISUP = "ISUP"; // define: 2023/4/13 是否上传
|
|
|
|
- val FIELD_CASE_ALT = "ALT"; // define: 2023/4/13 高度字段
|
|
|
|
- val FIELD_CASE_ANG = "ANG"; // define: 2023/4/13 角度字段
|
|
|
|
- val FIELD_CASE_TYPE = "TYPE"; // define: 2023/4/13 类型字段
|
|
|
|
- val FIELD_CASE_ISDOWN = "ISDOWN"; // define: 2023/4/13 是否下载
|
|
|
|
-
|
|
|
|
|
|
+ companion object{
|
|
|
|
+ val FIELD_NET_CASE_POLYGON_AJH = "AJH"; // define: 2023/4/13 网络案件的案件编号
|
|
|
|
+ val FIELD_CASE_POLYGON_ANJID = "ANJID"; // define: 2023/4/13 案件ID
|
|
|
|
+ val FIELD_CASE_POLYGON_MJ = "MJ"; // define: 2023/4/13 面积
|
|
|
|
+ val FIELD_CASE_POLYGON_BZ = "BZ"; // define: 2023/4/13 违建面的类型 0--代表未匹配 1--代表已匹配
|
|
|
|
+ val FIELD_CASE_POLYGON_BZ_VALUE_NO = "0"; // define: 2023/4/13 未匹配
|
|
|
|
+ val FIELD_CASE_POLYGON_BZ_VALUE_YES = "1"; // define: 2023/4/13 已匹配
|
|
|
|
+ val FIELD_CASE_NAME = "NAME"; // define: 2023/4/13 名称字段
|
|
|
|
+ val FIELD_CASE_IMAGES = "IMAGES"; // define: 2023/4/13 图片集合字段
|
|
|
|
+ val FIELD_CASE_RQ = "RQ"; // define: 2023/4/13 日期字段
|
|
|
|
+ val FIELD_CASE_LAT = "LAT"; // define: 2023/4/13 纬度字段
|
|
|
|
+ val FIELD_CASE_LNG = "LNG"; // define: 2023/4/13 经度字段
|
|
|
|
+ val FIELD_CASE_ISUP = "ISUP"; // define: 2023/4/13 是否上传
|
|
|
|
+ val FIELD_CASE_ALT = "ALT"; // define: 2023/4/13 高度字段
|
|
|
|
+ val FIELD_CASE_ANG = "ANG"; // define: 2023/4/13 角度字段
|
|
|
|
+ val FIELD_CASE_TYPE = "TYPE"; // define: 2023/4/13 类型字段
|
|
|
|
+ val FIELD_CASE_ISDOWN = "ISDOWN"; // define: 2023/4/13 是否下载
|
|
|
|
+
|
|
|
|
+ val MEDIA_TYPE_WJ_NO = "0" // define: 2023/6/12 未上传的案件点
|
|
|
|
+ val MEDIA_TYPE_WJ_YES = "1"; // define: 2023/6/12 已上传的案件点
|
|
|
|
+ val MEDIA_TYPE_REPEAT_NO = "4" // define: 2023/6/12 未上传的复飞点
|
|
|
|
+ val MEDIA_TYPE_REPEAT_YES = "5" // define: 2023/6/12 已上传的复飞点
|
|
|
|
+ }
|
|
|
|
|
|
// todo: 2023/4/13 标志相关
|
|
// todo: 2023/4/13 标志相关
|
|
private var markChange: EventMarkChange? = null
|
|
private var markChange: EventMarkChange? = null
|
|
@@ -115,7 +123,7 @@ class FragmentMap : CrAnimationFragment() {
|
|
private var gLayerAirplaneHomeLocation: GraphicsOverlay? = null // define: 2023/4/13 飞行器返航点位置图层
|
|
private var gLayerAirplaneHomeLocation: GraphicsOverlay? = null // define: 2023/4/13 飞行器返航点位置图层
|
|
private var gLayerAirplaneLine: GraphicsOverlay? = null // define: 2023/4/13 飞行航线图层
|
|
private var gLayerAirplaneLine: GraphicsOverlay? = null // define: 2023/4/13 飞行航线图层
|
|
private var gLayerHistoryAirplaneLine: GraphicsOverlay? = null // define: 2023/4/13 历史航线图层
|
|
private var gLayerHistoryAirplaneLine: GraphicsOverlay? = null // define: 2023/4/13 历史航线图层
|
|
- private var gLayerTemp:GraphicsOverlay?=null // define: 2023/6/5 临时展示内容图层
|
|
|
|
|
|
+ private var gLayerTemp: GraphicsOverlay? = null // define: 2023/6/5 临时展示内容图层
|
|
|
|
|
|
// todo: 2023/4/13 样式相关
|
|
// todo: 2023/4/13 样式相关
|
|
private var symbolAirplaneLine: SimpleLineSymbol? = null // define: 2023/4/13 飞行航线样式
|
|
private var symbolAirplaneLine: SimpleLineSymbol? = null // define: 2023/4/13 飞行航线样式
|
|
@@ -213,34 +221,37 @@ class FragmentMap : CrAnimationFragment() {
|
|
*/
|
|
*/
|
|
private var sketchGeometryChangeListener =
|
|
private var sketchGeometryChangeListener =
|
|
SketchGeometryChangedListener { p0 ->
|
|
SketchGeometryChangedListener { p0 ->
|
|
- if(p0!!.geometry.geometryType == GeometryType.POLYLINE){
|
|
|
|
|
|
+ if (p0!!.geometry.geometryType == GeometryType.POLYLINE) {
|
|
// todo: 2023/6/5 清除已展示内容
|
|
// todo: 2023/6/5 清除已展示内容
|
|
gLayerTemp?.graphics?.clear()
|
|
gLayerTemp?.graphics?.clear()
|
|
var polyline = p0.geometry as Polyline
|
|
var polyline = p0.geometry as Polyline
|
|
var pointCollection = PointCollection(SpatialReference.create(3857))
|
|
var pointCollection = PointCollection(SpatialReference.create(3857))
|
|
- if(polyline.parts.size >0) {
|
|
|
|
- for(point in polyline.parts[0].points){
|
|
|
|
|
|
+ if (polyline.parts.size > 0) {
|
|
|
|
+ for (point in polyline.parts[0].points) {
|
|
pointCollection.add(point)
|
|
pointCollection.add(point)
|
|
- if(pointCollection.size >=2){
|
|
|
|
|
|
+ if (pointCollection.size >= 2) {
|
|
var polyline = Polyline(pointCollection)
|
|
var polyline = Polyline(pointCollection)
|
|
// todo: 2023/6/5 计算长度
|
|
// todo: 2023/6/5 计算长度
|
|
var lineLength = GeometryEngine.length(polyline)
|
|
var lineLength = GeometryEngine.length(polyline)
|
|
// todo: 2023/6/5 添加标签
|
|
// todo: 2023/6/5 添加标签
|
|
- appendMeasureLabel(point,CrUnitManager.formatLength(lineLength))
|
|
|
|
|
|
+ appendMeasureLabel(point, CrUnitManager.formatLength(lineLength))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }else if(p0!!.geometry.geometryType == GeometryType.POLYGON){
|
|
|
|
|
|
+ } else if (p0!!.geometry.geometryType == GeometryType.POLYGON) {
|
|
// todo: 2023/6/6 清除临时标签
|
|
// todo: 2023/6/6 清除临时标签
|
|
gLayerTemp?.graphics?.clear()
|
|
gLayerTemp?.graphics?.clear()
|
|
var polygon = p0.geometry as Polygon
|
|
var polygon = p0.geometry as Polygon
|
|
- if(polygon.parts.size > 0){
|
|
|
|
- if(CrUnitManager.querySizeByIterable(polygon.parts[0].points) >=3){
|
|
|
|
|
|
+ if (polygon.parts.size > 0) {
|
|
|
|
+ if (CrUnitManager.querySizeByIterable(polygon.parts[0].points) >= 3) {
|
|
// todo: 2023/6/6 计算面积
|
|
// todo: 2023/6/6 计算面积
|
|
var area = GeometryEngine.area(polygon)
|
|
var area = GeometryEngine.area(polygon)
|
|
area = abs(area)
|
|
area = abs(area)
|
|
// todo: 2023/6/6 添加标签
|
|
// todo: 2023/6/6 添加标签
|
|
- appendMeasureLabel(polygon.parts[0].startPoint,CrUnitManager.formatArea(area))
|
|
|
|
|
|
+ appendMeasureLabel(
|
|
|
|
+ polygon.parts[0].startPoint,
|
|
|
|
+ CrUnitManager.formatArea(area)
|
|
|
|
+ )
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -251,26 +262,26 @@ class FragmentMap : CrAnimationFragment() {
|
|
* @param location Point 位置
|
|
* @param location Point 位置
|
|
* @param label String 标签内容
|
|
* @param label String 标签内容
|
|
*/
|
|
*/
|
|
- private fun appendMeasureLabel(location:Point,label:String){
|
|
|
|
|
|
+ private fun appendMeasureLabel(location: Point, label: String) {
|
|
var tSymbol = TextSymbol();
|
|
var tSymbol = TextSymbol();
|
|
- tSymbol.color = Color.rgb(17,46,114)
|
|
|
|
|
|
+ tSymbol.color = Color.rgb(17, 46, 114)
|
|
tSymbol.text = label
|
|
tSymbol.text = label
|
|
tSymbol.size = 10f
|
|
tSymbol.size = 10f
|
|
tSymbol.haloColor = Color.WHITE
|
|
tSymbol.haloColor = Color.WHITE
|
|
tSymbol.haloWidth = 2f
|
|
tSymbol.haloWidth = 2f
|
|
tSymbol.fontWeight = TextSymbol.FontWeight.BOLD
|
|
tSymbol.fontWeight = TextSymbol.FontWeight.BOLD
|
|
tSymbol.offsetY = 20f
|
|
tSymbol.offsetY = 20f
|
|
- tSymbol.backgroundColor = Color.argb(200,13,49,130)
|
|
|
|
- var graphic = Graphic(location,tSymbol)
|
|
|
|
|
|
+ tSymbol.backgroundColor = Color.argb(200, 13, 49, 130)
|
|
|
|
+ var graphic = Graphic(location, tSymbol)
|
|
gLayerTemp?.graphics?.add(graphic)
|
|
gLayerTemp?.graphics?.add(graphic)
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 设置草图编辑器
|
|
* 设置草图编辑器
|
|
*/
|
|
*/
|
|
- private fun setSketchEditor(){
|
|
|
|
|
|
+ private fun setSketchEditor() {
|
|
// todo: 2023/4/21 获取样式
|
|
// todo: 2023/4/21 获取样式
|
|
- var sketchStyle:SketchStyle = sketchEditor!!.sketchStyle
|
|
|
|
|
|
+ var sketchStyle: SketchStyle = sketchEditor!!.sketchStyle
|
|
// todo: 2023/4/21 设置点符号样式
|
|
// todo: 2023/4/21 设置点符号样式
|
|
var markerSymbol = SimpleMarkerSymbol()
|
|
var markerSymbol = SimpleMarkerSymbol()
|
|
markerSymbol.size = 10f
|
|
markerSymbol.size = 10f
|
|
@@ -306,9 +317,28 @@ class FragmentMap : CrAnimationFragment() {
|
|
}
|
|
}
|
|
|
|
|
|
// todo: 2023/6/7 查询地理位置回调
|
|
// todo: 2023/6/7 查询地理位置回调
|
|
- override fun onQueryLocation(location:Point,longitude: String, latitude: String) {
|
|
|
|
-// showInformation(String.format("经度:%s 纬度:%s",longitude,latitude))
|
|
|
|
- appendLocation(location,longitude,latitude)
|
|
|
|
|
|
+ override fun onQueryLocation(location: Point, longitude: String, latitude: String) {
|
|
|
|
+ appendLocation(location, longitude, latitude)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // todo: 2023/6/12 添加案件点
|
|
|
|
+ override fun onAppendWaypoint(location: Point, longitude: String, latitude: String) {
|
|
|
|
+ caseAppendWaypointToMap(location,longitude,latitude)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // todo: 2023/6/14 删除案件点
|
|
|
|
+ override fun onRemoveWaypoint(location: Point) {
|
|
|
|
+ caseRemoveCaseWaypoing(location)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // todo: 2023/6/14 选择移动的案件点
|
|
|
|
+ override fun onMoveWaypointBySelect(location: Point) {
|
|
|
|
+ caseMoveWaypointBySelect(location)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // todo: 2023/6/14 移动完成
|
|
|
|
+ override fun onMoveWaypointToEnd(location: Point) {
|
|
|
|
+ caseMoveWaypointToEnd(location)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -876,18 +906,19 @@ class FragmentMap : CrAnimationFragment() {
|
|
* @param longitude String 经度
|
|
* @param longitude String 经度
|
|
* @param latitude String 纬度
|
|
* @param latitude String 纬度
|
|
*/
|
|
*/
|
|
- private fun appendLocation(location:Point,longitude:String,latitude:String){
|
|
|
|
|
|
+ private fun appendLocation(location: Point, longitude: String, latitude: String) {
|
|
// todo: 2023/6/7 点符号样式
|
|
// todo: 2023/6/7 点符号样式
|
|
- var markSymbol:SimpleMarkerSymbol = SimpleMarkerSymbol()
|
|
|
|
- markSymbol.color = Color.argb(255,0,0,255)
|
|
|
|
|
|
+ var markSymbol: SimpleMarkerSymbol = SimpleMarkerSymbol()
|
|
|
|
+ markSymbol.color = Color.argb(255, 0, 0, 255)
|
|
markSymbol.size = 14.0f
|
|
markSymbol.size = 14.0f
|
|
markSymbol.style = SimpleMarkerSymbol.Style.CIRCLE
|
|
markSymbol.style = SimpleMarkerSymbol.Style.CIRCLE
|
|
- markSymbol.outline = SimpleLineSymbol(SimpleLineSymbol.Style.SOLID,Color.argb(255,255,255,255),1.0f)
|
|
|
|
|
|
+ markSymbol.outline =
|
|
|
|
+ SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, Color.argb(255, 255, 255, 255), 1.0f)
|
|
// todo: 2023/6/7 创建点符号
|
|
// todo: 2023/6/7 创建点符号
|
|
- var graphic = Graphic(location,markSymbol)
|
|
|
|
|
|
+ var graphic = Graphic(location, markSymbol)
|
|
gLayerTemp?.graphics?.add(graphic)
|
|
gLayerTemp?.graphics?.add(graphic)
|
|
// todo: 2023/6/7 添加标注
|
|
// todo: 2023/6/7 添加标注
|
|
- appendMeasureLabel(location,String.format("经度:%s 纬度:%s",longitude,latitude))
|
|
|
|
|
|
+ appendMeasureLabel(location, String.format("经度:%s 纬度:%s", longitude, latitude))
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -895,20 +926,19 @@ class FragmentMap : CrAnimationFragment() {
|
|
* @param longitude String 经度值
|
|
* @param longitude String 经度值
|
|
* @param latitude String 纬度值
|
|
* @param latitude String 纬度值
|
|
*/
|
|
*/
|
|
- private fun appendWGS84PointToMap(longitude:String,latitude:String){
|
|
|
|
|
|
+ private fun appendWGS84PointToMap(longitude: String, latitude: String) {
|
|
var lng = longitude.toDouble()
|
|
var lng = longitude.toDouble()
|
|
var lat = latitude.toDouble()
|
|
var lat = latitude.toDouble()
|
|
- var wgs84Point = Point(lng,lat, SpatialReference.create(4326))
|
|
|
|
- var location = GeometryEngine.project(wgs84Point,mMap?.spatialReference) as Point
|
|
|
|
- appendLocation(location,longitude,latitude)
|
|
|
|
|
|
+ var wgs84Point = Point(lng, lat, SpatialReference.create(4326))
|
|
|
|
+ var location = GeometryEngine.project(wgs84Point, mMap?.spatialReference) as Point
|
|
|
|
+ appendLocation(location, longitude, latitude)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 测量长度
|
|
* 测量长度
|
|
*/
|
|
*/
|
|
- private fun measureLength(){
|
|
|
|
|
|
+ private fun measureLength() {
|
|
CrUtil.showMessage("地图上点击开始测量!")
|
|
CrUtil.showMessage("地图上点击开始测量!")
|
|
sketchEditor?.let {
|
|
sketchEditor?.let {
|
|
it.stop()
|
|
it.stop()
|
|
@@ -918,7 +948,7 @@ class FragmentMap : CrAnimationFragment() {
|
|
model.isAllowPartSelection = false
|
|
model.isAllowPartSelection = false
|
|
model.isContextMenuEnabled = false
|
|
model.isContextMenuEnabled = false
|
|
model.isRequireSelectionBeforeDrag = true
|
|
model.isRequireSelectionBeforeDrag = true
|
|
- it.start(SketchCreationMode.POLYLINE,model)
|
|
|
|
|
|
+ it.start(SketchCreationMode.POLYLINE, model)
|
|
it.opacity = 1.0f
|
|
it.opacity = 1.0f
|
|
// todo: 2023/4/21 设置监听
|
|
// todo: 2023/4/21 设置监听
|
|
it.addGeometryChangedListener(sketchGeometryChangeListener)
|
|
it.addGeometryChangedListener(sketchGeometryChangeListener)
|
|
@@ -928,7 +958,7 @@ class FragmentMap : CrAnimationFragment() {
|
|
/**
|
|
/**
|
|
* 面积测量
|
|
* 面积测量
|
|
*/
|
|
*/
|
|
- private fun measureArea(){
|
|
|
|
|
|
+ private fun measureArea() {
|
|
CrUtil.showMessage("地图上点击开始测量!")
|
|
CrUtil.showMessage("地图上点击开始测量!")
|
|
sketchEditor?.let {
|
|
sketchEditor?.let {
|
|
it.stop()
|
|
it.stop()
|
|
@@ -938,7 +968,7 @@ class FragmentMap : CrAnimationFragment() {
|
|
model.isAllowPartSelection = false
|
|
model.isAllowPartSelection = false
|
|
model.isContextMenuEnabled = false
|
|
model.isContextMenuEnabled = false
|
|
model.isRequireSelectionBeforeDrag = true
|
|
model.isRequireSelectionBeforeDrag = true
|
|
- it.start(SketchCreationMode.POLYGON,model)
|
|
|
|
|
|
+ it.start(SketchCreationMode.POLYGON, model)
|
|
it.opacity = 1.0f
|
|
it.opacity = 1.0f
|
|
// todo: 2023/6/6 设置监听
|
|
// todo: 2023/6/6 设置监听
|
|
it.addGeometryChangedListener(sketchGeometryChangeListener)
|
|
it.addGeometryChangedListener(sketchGeometryChangeListener)
|
|
@@ -948,29 +978,30 @@ class FragmentMap : CrAnimationFragment() {
|
|
/**
|
|
/**
|
|
* 输入坐标定位监听
|
|
* 输入坐标定位监听
|
|
*/
|
|
*/
|
|
- private var inputLocationToMapListener:DialogInput.DialogInputListener = object:DialogInput.DialogInputListener{
|
|
|
|
- // todo: 2023/6/7 点击完成按钮回调
|
|
|
|
- override fun completion(valueOne: String, valueTwo: String, self: DialogInput) {
|
|
|
|
- if(!CrUnitManager.checkLongitude(valueOne)){
|
|
|
|
- CrUtil.showMessage("输入的经度值不符合要求!")
|
|
|
|
- }else if (!CrUnitManager.checkLatitude(valueTwo)){
|
|
|
|
- CrUtil.showMessage("输入的纬度值不符合要求!")
|
|
|
|
- }else{
|
|
|
|
- self.dismiss()
|
|
|
|
- // todo: 2023/6/8 添加到地图中
|
|
|
|
- appendWGS84PointToMap(valueOne,valueTwo)
|
|
|
|
|
|
+ private var inputLocationToMapListener: DialogInput.DialogInputListener =
|
|
|
|
+ object : DialogInput.DialogInputListener {
|
|
|
|
+ // todo: 2023/6/7 点击完成按钮回调
|
|
|
|
+ override fun completion(valueOne: String, valueTwo: String, self: DialogInput) {
|
|
|
|
+ if (!CrUnitManager.checkLongitude(valueOne)) {
|
|
|
|
+ CrUtil.showMessage("输入的经度值不符合要求!")
|
|
|
|
+ } else if (!CrUnitManager.checkLatitude(valueTwo)) {
|
|
|
|
+ CrUtil.showMessage("输入的纬度值不符合要求!")
|
|
|
|
+ } else {
|
|
|
|
+ self.dismiss()
|
|
|
|
+ // todo: 2023/6/8 添加到地图中
|
|
|
|
+ appendWGS84PointToMap(valueOne, valueTwo)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
- // todo: 2023/6/7 点击取消按钮回调
|
|
|
|
- override fun close() {
|
|
|
|
|
|
+ // todo: 2023/6/7 点击取消按钮回调
|
|
|
|
+ override fun close() {
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* 开始绘制案件图斑
|
|
* 开始绘制案件图斑
|
|
*/
|
|
*/
|
|
- private fun caseStartDraw(){
|
|
|
|
|
|
+ private fun caseStartDraw() {
|
|
CrUtil.showMessage("地图上点击开始绘制!")
|
|
CrUtil.showMessage("地图上点击开始绘制!")
|
|
sketchEditor?.let {
|
|
sketchEditor?.let {
|
|
it.stop()
|
|
it.stop()
|
|
@@ -980,12 +1011,330 @@ class FragmentMap : CrAnimationFragment() {
|
|
model.isAllowPartSelection = true
|
|
model.isAllowPartSelection = true
|
|
model.isContextMenuEnabled = false
|
|
model.isContextMenuEnabled = false
|
|
model.isRequireSelectionBeforeDrag = true
|
|
model.isRequireSelectionBeforeDrag = true
|
|
- it.start(SketchCreationMode.POLYGON,model)
|
|
|
|
|
|
+ it.start(SketchCreationMode.POLYGON, model)
|
|
it.opacity = 1.0f
|
|
it.opacity = 1.0f
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 保存编辑的案件图斑
|
|
|
|
+ */
|
|
|
|
+ private fun caseSave() {
|
|
|
|
+ var geo = sketchEditor?.geometry
|
|
|
|
+ if (geo != null && geo.geometryType == GeometryType.POLYGON) {
|
|
|
|
+ var polygon = geo as Polygon
|
|
|
|
+ if (CrUnitManager.querySizeByIterable(polygon.parts[0].points) < 4) {
|
|
|
|
+ showWarning("提交保存的要素少于4个点,无法提交!")
|
|
|
|
+ } else {
|
|
|
|
+ // todo: 2023/6/12 查询关联的案件点
|
|
|
|
+ var queryParams = QueryParameters()
|
|
|
|
+ queryParams.geometry = polygon
|
|
|
|
+ queryParams.spatialRelationship = QueryParameters.SpatialRelationship.CONTAINS
|
|
|
|
+ queryParams.whereClause = String.format("%s='%s' or %s='%s'",FIELD_CASE_ISUP,MEDIA_TYPE_WJ_NO,FIELD_CASE_ISUP,MEDIA_TYPE_WJ_YES)
|
|
|
|
+ var queryAsync = fTableMedia?.queryFeaturesAsync(queryParams)
|
|
|
|
+ queryAsync?.addDoneListener(Runnable {
|
|
|
|
+ if(queryAsync.isDone){
|
|
|
|
+ // todo: 2023/6/12 获取查询结果
|
|
|
|
+ var featureResult = queryAsync.get().iterator()
|
|
|
|
+ var features = ArrayList<Feature>()
|
|
|
|
+ while (featureResult.hasNext()){
|
|
|
|
+ features.add(featureResult.next())
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/12 如果存在违建点 则赋值 否则为 空
|
|
|
|
+ var caseId = ""
|
|
|
|
+ if(features.size > 0){
|
|
|
|
+ caseId = features[0].attributes[FIELD_CASE_NAME].toString()
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/12 计算面积 并添加要素到图层
|
|
|
|
+ var area = abs(GeometryEngine.area(polygon))*0.0015
|
|
|
|
+ var wjFeature = fTableCasePolygon?.createFeature()
|
|
|
|
+ wjFeature!!.let {
|
|
|
|
+ it.attributes[FIELD_CASE_POLYGON_ANJID] = caseId
|
|
|
|
+ it.attributes[FIELD_CASE_POLYGON_MJ]= area
|
|
|
|
+ if(caseId == ""){
|
|
|
|
+ it.attributes[FIELD_CASE_POLYGON_BZ] = FIELD_CASE_POLYGON_BZ_VALUE_NO
|
|
|
|
+ }else{
|
|
|
|
+ it.attributes[FIELD_CASE_POLYGON_BZ] = FIELD_CASE_POLYGON_BZ_VALUE_YES
|
|
|
|
+ }
|
|
|
|
+ it.geometry = polygon
|
|
|
|
+ var appendAsync = fTableCasePolygon?.addFeatureAsync(it)
|
|
|
|
+ appendAsync?.addDoneListener(Runnable{
|
|
|
|
+ try{
|
|
|
|
+ if(appendAsync.isDone){
|
|
|
|
+ showInformation("案件保存成功!")
|
|
|
|
+ sketchEditor?.stop()
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("案件保存失败!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ showWarning("提交保存的要素不符合要求!")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除保存的案件图斑
|
|
|
|
+ */
|
|
|
|
+ private fun caseDelete(){
|
|
|
|
+ var queryParameters = QueryParameters()
|
|
|
|
+ queryParameters.whereClause = "1=1"
|
|
|
|
+ var queryAsync = fTableCasePolygon?.queryFeaturesAsync(queryParameters)
|
|
|
|
+ queryAsync?.addDoneListener(Runnable {
|
|
|
|
+ try{
|
|
|
|
+ if(queryAsync.isDone){
|
|
|
|
+ var deleteAsync = fTableCasePolygon?.deleteFeaturesAsync(queryAsync.get())
|
|
|
|
+ deleteAsync?.addDoneListener(Runnable{
|
|
|
|
+ try {
|
|
|
|
+ if(deleteAsync.isDone){
|
|
|
|
+ showInformation("删除成功!")
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("删除失败!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("删除失败!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 添加案件点到地图
|
|
|
|
+ * @param location Point 点位置
|
|
|
|
+ * @param longitude String 经度
|
|
|
|
+ * @param latitude String 纬度
|
|
|
|
+ */
|
|
|
|
+ private fun caseAppendWaypointToMap(location: Point,longitude: String,latitude: String){
|
|
|
|
+ // todo: 2023/6/13 创建案件点模型
|
|
|
|
+ var caseModel = CaseModel(longitude.toDouble(),latitude.toDouble(),0.0,0.0,CaseType.MediaTypeWjNo)
|
|
|
|
+ // todo: 2023/6/13 创建案件点图元
|
|
|
|
+ var caseFeature = fTableMedia?.createFeature()
|
|
|
|
+ // todo: 2023/6/13 添加属性
|
|
|
|
+ caseModel.setAttributes(caseFeature!!.attributes)
|
|
|
|
+ // todo: 2023/6/13 设置要素空间图元
|
|
|
|
+ caseFeature.geometry = location
|
|
|
|
+ // todo: 2023/6/13 添加到地图中
|
|
|
|
+ var appendAsync = fTableMedia?.addFeatureAsync(caseFeature)
|
|
|
|
+ appendAsync?.addDoneListener(Runnable {
|
|
|
|
+ try{
|
|
|
|
+ if(appendAsync.isDone){
|
|
|
|
+ fLayerMedia?.clearSelection()
|
|
|
|
+ fLayerMedia?.selectFeature(caseFeature)
|
|
|
|
+ caseUpdatePolygonByFeature(caseFeature,true,object:iCompletion{
|
|
|
|
+ override fun onCompletion(result: ResultModel) {
|
|
|
|
+ if (result.isSuccess == true){
|
|
|
|
+ CrUtil.showMessage(String.format("案件点追加成功 %s",caseFeature.attributes[FIELD_CASE_NAME]))
|
|
|
|
+ }else{
|
|
|
|
+ showError(result.message!!)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("案件点添加错误!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更新案件点对应的案件对象
|
|
|
|
+ * @param geom Feature 案件点
|
|
|
|
+ * @param isAppend Boolean ture表示为追加案件点 false表示删除案件点
|
|
|
|
+ * @param callback iCompletion 回调
|
|
|
|
+ */
|
|
|
|
+ private fun caseUpdatePolygonByFeature(geom:Feature,isAppend:Boolean,callback:iCompletion){
|
|
|
|
+ // todo: 2023/6/13 获取案件ID
|
|
|
|
+ val caseId = geom.attributes[FIELD_CASE_NAME]
|
|
|
|
+ // todo: 2023/6/13 先进行空间查询 查询案件点对应的案件面
|
|
|
|
+ var queryParameters = QueryParameters()
|
|
|
|
+ queryParameters.geometry = geom.geometry
|
|
|
|
+ queryParameters.spatialRelationship = QueryParameters.SpatialRelationship.INTERSECTS
|
|
|
|
+ queryParameters.whereClause = "1=1"
|
|
|
|
+ var queryAsync = fTableCasePolygon!!.queryFeaturesAsync(queryParameters)
|
|
|
|
+ queryAsync?.addDoneListener(Runnable{
|
|
|
|
+ try {
|
|
|
|
+ if(queryAsync.isDone){
|
|
|
|
+ var features = queryAsync.get()
|
|
|
|
+ for(fea in features){
|
|
|
|
+ if(isAppend){
|
|
|
|
+ fea.attributes[FIELD_CASE_POLYGON_ANJID] = caseId
|
|
|
|
+ fea.attributes[FIELD_CASE_POLYGON_BZ] = FIELD_CASE_POLYGON_BZ_VALUE_YES
|
|
|
|
+ }else{
|
|
|
|
+ fea.attributes[FIELD_CASE_POLYGON_ANJID] = ""
|
|
|
|
+ fea.attributes[FIELD_CASE_POLYGON_BZ] = FIELD_CASE_POLYGON_BZ_VALUE_NO
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/13 更新
|
|
|
|
+ var updateAsync = fTableCasePolygon!!.updateFeaturesAsync(features)
|
|
|
|
+ updateAsync?.addDoneListener(Runnable {
|
|
|
|
+ try {
|
|
|
|
+ if(updateAsync.isDone){
|
|
|
|
+ // todo: 2023/6/13 更新完成
|
|
|
|
+ if(callback != null) callback.onCompletion(ResultModel(true,"成功!"))
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ if(callback != null) callback.onCompletion(ResultModel(false,"案件对象更新失败!"))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ if(callback != null) callback.onCompletion(ResultModel(false,"案件对象查询失败!"))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除案件点
|
|
|
|
+ * @param queryPoint Point 查询产靠位置
|
|
|
|
+ */
|
|
|
|
+ private fun caseRemoveCaseWaypoing(queryPoint:Point){
|
|
|
|
+ // todo: 2023/6/14 创建缓冲区
|
|
|
|
+ var queryGeometry = GeometryEngine.buffer(queryPoint,10.0)
|
|
|
|
+ // todo: 2023/6/14 设置查询参数
|
|
|
|
+ var queryParameters = QueryParameters()
|
|
|
|
+ queryParameters.spatialRelationship = QueryParameters.SpatialRelationship.CONTAINS
|
|
|
|
+ queryParameters.geometry = queryGeometry
|
|
|
|
+ queryParameters.whereClause = "1=1"
|
|
|
|
+ // todo: 2023/6/14 开始查询
|
|
|
|
+ var identifyAsync = fTableMedia?.queryFeaturesAsync(queryParameters)
|
|
|
|
+ identifyAsync?.addDoneListener(Runnable{
|
|
|
|
+ try {
|
|
|
|
+ if (identifyAsync.isDone){
|
|
|
|
+ var queryFeatures = identifyAsync.get()
|
|
|
|
+ var features = mutableListOf<Feature>()
|
|
|
|
+ for (fea in queryFeatures){
|
|
|
|
+ features.add(fea)
|
|
|
|
+ }
|
|
|
|
+ if(features.size >0){
|
|
|
|
+ var dig = DialogNormal(context!!)
|
|
|
|
+ dig.setTitle("提示")
|
|
|
|
+ dig.setMessage("删除后将无法恢复,确定删除吗?")
|
|
|
|
+ dig.setButtonsText("删除","取消")
|
|
|
|
+ dig.setListener(object :DialogNormal.DialogNormalListener{
|
|
|
|
+ // todo: 2023/6/14 确认删除
|
|
|
|
+ override fun completion() {
|
|
|
|
+ var deleteAsync = fTableMedia?.deleteFeaturesAsync(features)
|
|
|
|
+ deleteAsync?.addDoneListener(Runnable {
|
|
|
|
+ try {
|
|
|
|
+ if(deleteAsync.isDone){
|
|
|
|
+ showInformation("案件点删除成功!")
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("案件点删除失败!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // todo: 2023/6/14 关闭
|
|
|
|
+ override fun close() {
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ dig.show()
|
|
|
|
+ }else{
|
|
|
|
+ showWarning("未查询到任何案件点!")
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("查询错误,无法删除!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 移动案件点
|
|
|
|
+ */
|
|
|
|
+ private fun caseMoveWaypoint(){
|
|
|
|
+ CrUtil.showMessage("选择需要移动的案件点!")
|
|
|
|
+ mapTouch?.setAction(MapAction.MapTapMoveWaypoing)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 选择移动的案件点
|
|
|
|
+ * @param location Point 点击位置
|
|
|
|
+ */
|
|
|
|
+ private fun caseMoveWaypointBySelect(location: Point){
|
|
|
|
+ // todo: 2023/6/14 设置查询区域
|
|
|
|
+ var queryGeometry = GeometryEngine.buffer(location,10.0)
|
|
|
|
+ // todo: 2023/6/14 设置查询条件
|
|
|
|
+ var queryParameters = QueryParameters()
|
|
|
|
+ queryParameters.geometry = queryGeometry
|
|
|
|
+ queryParameters.spatialRelationship = QueryParameters.SpatialRelationship.CONTAINS
|
|
|
|
+ queryParameters.whereClause = "1=1"
|
|
|
|
+ // todo: 2023/6/14 开始查询
|
|
|
|
+ var queryAsync = fTableMedia?.queryFeaturesAsync(queryParameters)
|
|
|
|
+ queryAsync?.addDoneListener(Runnable{
|
|
|
|
+ try {
|
|
|
|
+ if(queryAsync.isDone){
|
|
|
|
+ var features = mutableListOf<Feature>()
|
|
|
|
+ for(fea in queryAsync.get()){
|
|
|
|
+ features.add(fea)
|
|
|
|
+ }
|
|
|
|
+ if(features.size == 0){
|
|
|
|
+ CrUtil.showMessage("未查询到任何违建点!")
|
|
|
|
+ }else{
|
|
|
|
+ fLayerMedia?.clearSelection()
|
|
|
|
+ fLayerMedia?.selectFeature(features[0])
|
|
|
|
+ CrUtil.showMessage("地图点击确定移动位置!")
|
|
|
|
+ mapTouch?.setAction(MapAction.MapTapMovingWaypoint)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("案件点查询错误!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 案件点移动结束
|
|
|
|
+ * @param location Point 移动后位置
|
|
|
|
+ */
|
|
|
|
+ private fun caseMoveWaypointToEnd(location: Point){
|
|
|
|
+ var asyncSelected = fLayerMedia?.selectedFeaturesAsync
|
|
|
|
+ asyncSelected?.addDoneListener(Runnable {
|
|
|
|
+ try {
|
|
|
|
+ if(asyncSelected.isDone){
|
|
|
|
+ var features = mutableListOf<Feature>()
|
|
|
|
+ for(fea in asyncSelected.get()){
|
|
|
|
+ features.add(fea)
|
|
|
|
+ }
|
|
|
|
+ if(features.size == 0){
|
|
|
|
+ showError("未获取到可移动违建点,无法完成移动操作!")
|
|
|
|
+ }else{
|
|
|
|
+ features[0].geometry = location
|
|
|
|
+ var asyncUpdate = fTableMedia?.updateFeatureAsync(features[0])
|
|
|
|
+ asyncUpdate?.addDoneListener(Runnable{
|
|
|
|
+ try {
|
|
|
|
+ if (asyncUpdate.isDone){
|
|
|
|
+ caseUpdatePolygonByFeature(features[0],true,object:iCompletion{
|
|
|
|
+ override fun onCompletion(result: ResultModel) {
|
|
|
|
+ if(result.isSuccess == true){
|
|
|
|
+ CrUtil.showMessage("移动完成!")
|
|
|
|
+ }else{
|
|
|
|
+ showError(result.message!!)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("移动错误,无法完成移动操作!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }catch (ex:java.lang.IllegalArgumentException){
|
|
|
|
+ showError("获取可移动违建点错误,无法完成移动操作!")
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 显示警告信息
|
|
* 显示警告信息
|
|
* @param warning String 警告消息
|
|
* @param warning String 警告消息
|
|
*/
|
|
*/
|
|
@@ -1080,19 +1429,19 @@ class FragmentMap : CrAnimationFragment() {
|
|
mapTouch?.setQueryLayer(fLayerMark!!, MapAction.MapTapSelectMark)
|
|
mapTouch?.setQueryLayer(fLayerMark!!, MapAction.MapTapSelectMark)
|
|
}
|
|
}
|
|
// todo: 2023/4/21 删除选择的标志
|
|
// todo: 2023/4/21 删除选择的标志
|
|
- MapAction.EventMarkDelete->{
|
|
|
|
|
|
+ MapAction.EventMarkDelete -> {
|
|
doodleSelectFeature(fLayerMark!!)
|
|
doodleSelectFeature(fLayerMark!!)
|
|
}
|
|
}
|
|
// todo: 2023/4/21 长度测量
|
|
// todo: 2023/4/21 长度测量
|
|
- MapAction.EventSurveyLength->{
|
|
|
|
|
|
+ MapAction.EventSurveyLength -> {
|
|
measureLength()
|
|
measureLength()
|
|
}
|
|
}
|
|
// todo: 2023/6/6 面积测量
|
|
// todo: 2023/6/6 面积测量
|
|
- MapAction.EventSurveyArea->{
|
|
|
|
|
|
+ MapAction.EventSurveyArea -> {
|
|
measureArea()
|
|
measureArea()
|
|
}
|
|
}
|
|
// todo: 2023/6/7 初始化测量
|
|
// todo: 2023/6/7 初始化测量
|
|
- MapAction.EventSurveyClear->{
|
|
|
|
|
|
+ MapAction.EventSurveyClear -> {
|
|
// todo: 2023/6/7 清理临时标注
|
|
// todo: 2023/6/7 清理临时标注
|
|
gLayerTemp?.graphics?.clear()
|
|
gLayerTemp?.graphics?.clear()
|
|
// todo: 2023/6/7 结束编辑
|
|
// todo: 2023/6/7 结束编辑
|
|
@@ -1102,31 +1451,56 @@ class FragmentMap : CrAnimationFragment() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// todo: 2023/6/7 获取地图位置
|
|
// todo: 2023/6/7 获取地图位置
|
|
- MapAction.MapTapGetLocation->{
|
|
|
|
|
|
+ MapAction.MapTapGetLocation -> {
|
|
CrUtil.showMessage("地图上点击查询地理位置")
|
|
CrUtil.showMessage("地图上点击查询地理位置")
|
|
mapTouch?.setAction(MapAction.MapTapGetLocation)
|
|
mapTouch?.setAction(MapAction.MapTapGetLocation)
|
|
}
|
|
}
|
|
// todo: 2023/6/7 输入坐标定位
|
|
// todo: 2023/6/7 输入坐标定位
|
|
- MapAction.EventInputLocationToMap->{
|
|
|
|
- var dialogInput:DialogInput = DialogInput(context!!,"输入位置信息")
|
|
|
|
- dialogInput.setButtonsText("确定","关闭")
|
|
|
|
- dialogInput.setHints("输入经度,例118.70687","输入纬度,例35.218991")
|
|
|
|
- dialogInput.setFonts(getString(R.string.ico_location),getString(R.string.ico_location))
|
|
|
|
|
|
+ MapAction.EventInputLocationToMap -> {
|
|
|
|
+ var dialogInput: DialogInput = DialogInput(context!!, "输入位置信息")
|
|
|
|
+ dialogInput.setButtonsText("确定", "关闭")
|
|
|
|
+ dialogInput.setHints("输入经度,例118.70687", "输入纬度,例35.218991")
|
|
|
|
+ dialogInput.setFonts(
|
|
|
|
+ getString(R.string.ico_location),
|
|
|
|
+ getString(R.string.ico_location)
|
|
|
|
+ )
|
|
dialogInput.setListener(inputLocationToMapListener)
|
|
dialogInput.setListener(inputLocationToMapListener)
|
|
dialogInput.show()
|
|
dialogInput.show()
|
|
}
|
|
}
|
|
// todo: 2023/6/9 开始绘制案件图斑
|
|
// todo: 2023/6/9 开始绘制案件图斑
|
|
- MapAction.EventCaseDrawPolygon->{
|
|
|
|
|
|
+ MapAction.EventCaseDrawPolygon -> {
|
|
caseStartDraw()
|
|
caseStartDraw()
|
|
}
|
|
}
|
|
// todo: 2023/6/9 重置绘制
|
|
// todo: 2023/6/9 重置绘制
|
|
- MapAction.EventCaseDrawReset->{
|
|
|
|
|
|
+ MapAction.EventCaseDrawReset -> {
|
|
caseStartDraw()
|
|
caseStartDraw()
|
|
}
|
|
}
|
|
// todo: 2023/6/9 回退
|
|
// todo: 2023/6/9 回退
|
|
- MapAction.EventCaseDrawUndo->{
|
|
|
|
|
|
+ MapAction.EventCaseDrawUndo -> {
|
|
sketchEditor?.undo()
|
|
sketchEditor?.undo()
|
|
}
|
|
}
|
|
|
|
+ // todo: 2023/6/12 保存绘制的图斑
|
|
|
|
+ MapAction.EventCaseSavePolygon -> {
|
|
|
|
+ caseSave()
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/12 删除保存的图斑
|
|
|
|
+ MapAction.EventCaseRemovePolygon->{
|
|
|
|
+ caseDelete()
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/12 地图点击添加违建点
|
|
|
|
+ MapAction.MapTapAddWaypoint->{
|
|
|
|
+ CrUtil.showMessage("地图上点击添加案件点!")
|
|
|
|
+ mapTouch?.setAction(MapAction.MapTapAddWaypoint)
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/13 删除案件点
|
|
|
|
+ MapAction.MapTapDeleteWaypoint->{
|
|
|
|
+ CrUtil.showMessage("地图上选择需要删除的违建点后删除!")
|
|
|
|
+ mapTouch?.setAction(MapAction.MapTapDeleteWaypoint)
|
|
|
|
+ }
|
|
|
|
+ // todo: 2023/6/14 移动案件点
|
|
|
|
+ MapAction.MapTapMoveWaypoing->{
|
|
|
|
+ caseMoveWaypoint()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|