package expo.modules.gaodemap.map.overlays import expo.modules.kotlin.modules.Module import expo.modules.kotlin.modules.ModuleDefinition /** * Polyline 视图 Module */ class PolylineViewModule : Module() { override fun definition() = ModuleDefinition { Name("PolylineView") View(PolylineView::class) { Events("onPolylinePress") Prop?>("points") { view: PolylineView, points -> view.setPoints(points) } Prop("strokeWidth") { view: PolylineView, width -> view.setStrokeWidth(width) } Prop("strokeColor") { view: PolylineView, color -> view.setStrokeColor(color) } Prop("texture") { view: PolylineView, texture -> view.setTexture(texture) } Prop("dotted") { view: PolylineView, dotted -> view.setDotted(dotted) } Prop("geodesic") { view: PolylineView, geodesic -> view.setGeodesic(geodesic) } Prop("zIndex") { view: PolylineView, zIndex -> view.setZIndex(zIndex) } Prop("gradient") { view: PolylineView, gradient -> view.setGradient(gradient) } Prop("simplificationTolerance") { view: PolylineView, tolerance -> view.setSimplificationTolerance(tolerance) } } } }