diff --git a/app/build.gradle b/app/build.gradle index 35686576..cf6297f1 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -81,9 +81,6 @@ dependencies { implementation 'org.apache.poi:poi:5.2.3' implementation 'org.apache.poi:poi-ooxml:5.2.3' - // 读取spatialite文件 - implementation 'com.github.sevar83:android-spatialite:2.0.1' - } //允许引用生成的代码 kapt { diff --git a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/BaseHandler.kt b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/BaseHandler.kt index 2d5bf2e5..0dfa6530 100644 --- a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/BaseHandler.kt +++ b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/BaseHandler.kt @@ -3,7 +3,9 @@ package com.navinfo.collect.library.map.handler import android.content.Context import androidx.appcompat.app.AppCompatActivity import com.navinfo.collect.library.map.NIMapView +import org.oscim.core.GeoPoint import org.oscim.layers.Layer +import org.oscim.layers.marker.MarkerItem abstract class BaseHandler(context: AppCompatActivity, mapView: NIMapView) { protected val mContext: AppCompatActivity = context @@ -27,4 +29,6 @@ abstract class BaseHandler(context: AppCompatActivity, mapView: NIMapView) { fun removeOnMapClickListener() { mMapView.setOnMapClickListener(null) } + + abstract fun mutableListOf(): MutableList } \ No newline at end of file diff --git a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LayerManagerHandler.kt b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LayerManagerHandler.kt index 6e6e65fb..a6b467d2 100644 --- a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LayerManagerHandler.kt +++ b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LayerManagerHandler.kt @@ -196,7 +196,7 @@ open class LayerManagerHandler(context: AppCompatActivity, mapView: NIMapView) : itemizedLayer = MyItemizedLayer( mMapView.vtmMap, - mutableListOf(), + mutableListOf(), markerRendererFactory, object : MyItemizedLayer.OnItemGestureListener { override fun onItemSingleTapUp( diff --git a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LineHandler.kt b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LineHandler.kt index ac0abb70..61c21a9c 100644 --- a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LineHandler.kt +++ b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/LineHandler.kt @@ -1,6 +1,5 @@ package com.navinfo.collect.library.map.handler -import android.content.Context import android.graphics.BitmapFactory import android.widget.Toast import androidx.appcompat.app.AppCompatActivity diff --git a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/PolygonHandler.kt b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/PolygonHandler.kt index a68d1c3b..a49abcd3 100644 --- a/collect-library/src/main/java/com/navinfo/collect/library/map/handler/PolygonHandler.kt +++ b/collect-library/src/main/java/com/navinfo/collect/library/map/handler/PolygonHandler.kt @@ -180,10 +180,10 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : //编辑点 if (editIndex > -1) { if (mPolygonLayer.points.size > 0) { - val list: MutableList = mutableListOf() + val list: MutableList = mutableListOf() list.addAll(mPolygonLayer.points) if (list.size > 3) { - val newList: MutableList = mutableListOf() + val newList: MutableList = mutableListOf() if (editIndex == 0) { newList.add(list[list.size - 1]) newList.add(geoPoint) @@ -197,7 +197,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : newList.add(geoPoint) newList.add(list[editIndex + 1]) } - val newList2: MutableList = mutableListOf() + val newList2: MutableList = mutableListOf() for (i in editIndex + 1 until list.size) { newList2.add(list[i]) } @@ -211,7 +211,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : } if (editIndex < list.size) { list.removeAt(editIndex) - val list2: MutableList = mutableListOf() + val list2: MutableList = mutableListOf() list2.addAll(list) list2.add(editIndex, geoPoint) mPolygonLayer.setPoints(list2) @@ -224,7 +224,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : mEndpointLayer.addItem(markerItem) mPathMakers.add(editIndex, markerItem) mPathLayerTemp.setStyle(newTempStyle) - val list: MutableList = mutableListOf() + val list: MutableList = mutableListOf() if (mPathMakers.size > 1) { list.add(mPathMakers[0].geoPoint) list.add(geoPoint) @@ -237,10 +237,10 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : } editIndex = -1 } else { //新增点 - val points: MutableList = mutableListOf() + val points: MutableList = mutableListOf() points.addAll(mPolygonLayer.points) if (points.size > 2) { - val list: MutableList = mutableListOf() + val list: MutableList = mutableListOf() points.add(points[0]) list.add(points[0]) list.add(geoPoint) @@ -280,7 +280,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : if (mPolygonLayer.points.size > 0) { if (editIndex > -1) { val list: MutableList = - mutableListOf() + mutableListOf() if (editIndex == 0 || editIndex == mPathMakers.size - 1) { list.add(mPathMakers[editIndex].geoPoint) list.add( @@ -303,7 +303,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : // crossText.setText("") } else { val list: MutableList = - mutableListOf() + mutableListOf() if (mPolygonLayer.points.size > 1) { list.add(mPolygonLayer.points[0]) list.add( @@ -329,7 +329,7 @@ open class PolygonHandler(context: AppCompatActivity, mapView: NIMapView) : mPathLayerTemp.setPoints(list) if (mPolygonLayer.points.size > 1) { val list1: MutableList = - mutableListOf() + mutableListOf() list1.addAll(mPolygonLayer.points) list1.add( GeoPoint(