|
|
@@ -50,7 +50,7 @@ class CustomMarkLayer @JvmOverloads constructor(
|
|
|
}
|
|
|
|
|
|
override fun onTouch(event: MotionEvent) {
|
|
|
- if (pointList.isNotEmpty()) {
|
|
|
+ if (pointList.isNotEmpty() && event.action == MotionEvent.ACTION_UP) {
|
|
|
val goal = mapView.convertMapXYToScreenXY(event.x, event.y)
|
|
|
|
|
|
for (i in pointList.indices) {
|
|
|
@@ -133,6 +133,7 @@ class CustomMarkLayer @JvmOverloads constructor(
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (listener != null && isClickMark) {
|
|
|
listener!!.markIsClick(num, btnIndex, isClickIcon)
|
|
|
mapView.refresh()
|
|
|
@@ -154,7 +155,8 @@ class CustomMarkLayer @JvmOverloads constructor(
|
|
|
val viewW = canvas.width.toFloat()
|
|
|
val viewH = canvas.height.toFloat()
|
|
|
val margin = mBitmapSize * 3f
|
|
|
- val viewport = android.graphics.RectF(-margin, -margin, viewW + margin, viewH + margin)
|
|
|
+ val viewport =
|
|
|
+ android.graphics.RectF(-margin, -margin, viewW + margin, viewH + margin)
|
|
|
|
|
|
pointList.forEach { point ->
|
|
|
val mark = point.pos
|