[8.0.2]优化规划与决策功能
This commit is contained in:
@@ -12,6 +12,7 @@ import com.mogo.map.overlay.wrapper.point.AMapPointWrapper
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController
|
||||
import com.mogo.map.utils.ObjectUtils
|
||||
import com.zhidaoauto.map.data.point.LonLatPoint
|
||||
import com.zhidaoauto.map.sdk.open.common.tools.MapTools
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.BatchMarkerOptions
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.Marker
|
||||
import com.zhidaoauto.map.sdk.open.renders.marker.MarkerOptions
|
||||
@@ -75,7 +76,8 @@ class AMapWrapper(map: MapAutoViewHelper?, mapView: MapAutoView, controller: IMo
|
||||
}
|
||||
val markerOptions = MarkerOptions(options.id, mMapView.getMapController()).setGps(true)
|
||||
.position(LonLatPoint(options.longitude, options.latitude, options.rotate.toDouble()))
|
||||
val marker = Marker(markerOptions,mMapView.getMapController(),
|
||||
val marker = Marker(
|
||||
markerOptions, mMapView.getMapController(),
|
||||
mMapView.getMapController()?.getMarkerCall()
|
||||
)
|
||||
marker.setDisplayAnimEnable(options.displayAnim)
|
||||
@@ -93,8 +95,8 @@ class AMapWrapper(map: MapAutoViewHelper?, mapView: MapAutoView, controller: IMo
|
||||
return null
|
||||
}
|
||||
if (options.isFilledIn) {
|
||||
val delegate = mAMap?.drawPolygon(polylineOptions)
|
||||
return AMapPolylineWrapper(options.id, delegate, mMapView)
|
||||
val delegate = mAMap?.drawPolygon(polylineOptions)
|
||||
return AMapPolylineWrapper(options.id, delegate, mMapView)
|
||||
} else {
|
||||
val delegate =
|
||||
(if (polylineOptions.lineWidth > 0) mAMap?.drawThickLine(polylineOptions) else mAMap?.drawLine(
|
||||
@@ -244,4 +246,22 @@ class AMapWrapper(map: MapAutoViewHelper?, mapView: MapAutoView, controller: IMo
|
||||
override fun switchData(x: Double, y: Double, isWgs84: Boolean): DoubleArray? {
|
||||
return mAMap?.switchData(x, y, isWgs84)
|
||||
}
|
||||
|
||||
override fun toScreenLocations(data: List<LonLatPoint>): List<android.graphics.Point> {
|
||||
return MapTools.toScreenLocations(data, mMapView.getMapController())
|
||||
}
|
||||
|
||||
override fun toScreenLocation(lon: Double, lat: Double): android.graphics.Point? {
|
||||
val controller = mMapView.getMapController()
|
||||
if (controller == null) {
|
||||
return null
|
||||
} else {
|
||||
val pixel = controller.lonlatToPixels(lon, lat)
|
||||
return if (pixel == null) {
|
||||
null
|
||||
} else {
|
||||
android.graphics.Point(pixel.x.toInt(), pixel.y.toInt())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user