Commit 9bd1c7a1 authored by 7c00's avatar 7c00

v0.9.0

parent 4bded8e5
......@@ -32,12 +32,6 @@ class AMapMarker(context: Context) : ReactViewGroup(context), AMapOverlay {
private var anchorV: Float = 1f
var infoWindow: AMapInfoWindow? = null
var infoWindowEnabled: Boolean = true
set(value) {
field = value
marker?.isInfoWindowEnable = value
}
var marker: Marker? = null
private set
......@@ -83,10 +77,10 @@ class AMapMarker(context: Context) : ReactViewGroup(context), AMapOverlay {
marker?.isDraggable = value
}
var clickable_: Boolean = true
var disabled: Boolean = false
set(value) {
field = value
marker?.isClickable = value
marker?.isClickable = !value
}
var active: Boolean = false
......@@ -114,17 +108,12 @@ class AMapMarker(context: Context) : ReactViewGroup(context), AMapOverlay {
.position(position)
.anchor(anchorU, anchorV)
.title(title)
.infoWindowEnable(infoWindowEnabled)
.infoWindowEnable(true)
.snippet(snippet)
.zIndex(zIndex))
if (active) {
marker?.showInfoWindow()
} else {
marker?.hideInfoWindow()
}
marker?.isClickable = this.clickable_
this.active = active
this.disabled = this.disabled
}
override fun remove() {
......
......@@ -90,9 +90,9 @@ internal class AMapMarkerManager : ViewGroupManager<AMapMarker>() {
marker.draggable = draggable
}
@ReactProp(name = "clickable")
fun setClickable(marker: AMapMarker, clickable: Boolean) {
marker.clickable_ = clickable
@ReactProp(name = "disabled")
fun setDisabled(marker: AMapMarker, disabled: Boolean) {
marker.disabled = disabled
}
@ReactProp(name = "active")
......@@ -110,11 +110,6 @@ internal class AMapMarkerManager : ViewGroupManager<AMapMarker>() {
marker.setImage(image)
}
@ReactProp(name = "infoWindowEnabled")
fun setEnabledInfoWindow(marker: AMapMarker, enabled: Boolean) {
marker.infoWindowEnabled = enabled
}
@ReactProp(name = "zIndex")
fun setZInex(marker: AMapMarker, zIndex: Float) {
marker.zIndex = zIndex
......
{
"name": "react-native-amap3d",
"version": "0.8.2",
"version": "0.9.0",
"description": "react-native 高德地图组件",
"author": "Qiu Xiang <i@7c00.cc>",
"license": "MIT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment