package com.shoyoo.react.anavi.navi import com.amap.api.navi.model.NaviLatLng import com.amap.api.navi.model.NaviPoi import com.shoyoo.react.anavi.toTravelStrategy class AWalkNaviViewManager(): ANaviViewManager() { override fun getName(): String { return "AWalkNaviView" } override fun calculateRoute(from: Any?, to: Any, wayPoints: List?, strategy: Int) { when(to) { is NaviLatLng -> { calculateWalkRoute(from as? NaviLatLng, to) } is NaviPoi -> { calculateWalkRoute(from as NaviPoi, to, strategy.toTravelStrategy()) } else -> { throw java.lang.IllegalArgumentException("The type of parameter to must be NaviLatLog or NaviPoi") } } } }