Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-amap3d
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-amap3d
Commits
8b2cb38d
Commit
8b2cb38d
authored
Aug 22, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善 Destroy 处理
parent
399b7035
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
6 deletions
+10
-6
AMapView.kt
...d/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapView.kt
+0
-6
AMapViewManager.kt
...ain/java/cn/qiuxiang/react/amap3d/maps/AMapViewManager.kt
+5
-0
AMapNavigation.kt
...ava/cn/qiuxiang/react/amap3d/navigation/AMapNavigation.kt
+4
-0
AMapNavigationManager.kt
...qiuxiang/react/amap3d/navigation/AMapNavigationManager.kt
+1
-0
No files found.
android/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapView.kt
View file @
8b2cb38d
...
@@ -99,12 +99,6 @@ class AMapView(context: Context) : TextureMapView(context) {
...
@@ -99,12 +99,6 @@ class AMapView(context: Context) : TextureMapView(context) {
map
.
setInfoWindowAdapter
(
AMapInfoWindowAdapter
(
context
,
markers
))
map
.
setInfoWindowAdapter
(
AMapInfoWindowAdapter
(
context
,
markers
))
}
}
@SuppressLint
(
"MissingSuperCall"
)
override
fun
onDetachedFromWindow
()
{
super
.
onDetachedFromWindow
()
map
.
isMyLocationEnabled
=
false
}
fun
emitCameraChangeEvent
(
event
:
String
,
position
:
CameraPosition
?)
{
fun
emitCameraChangeEvent
(
event
:
String
,
position
:
CameraPosition
?)
{
position
?.
let
{
position
?.
let
{
val
data
=
Arguments
.
createMap
()
val
data
=
Arguments
.
createMap
()
...
...
android/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapViewManager.kt
View file @
8b2cb38d
...
@@ -25,6 +25,11 @@ internal class AMapViewManager : ViewGroupManager<AMapView>() {
...
@@ -25,6 +25,11 @@ internal class AMapViewManager : ViewGroupManager<AMapView>() {
return
AMapView
(
reactContext
)
return
AMapView
(
reactContext
)
}
}
override
fun
onDropViewInstance
(
view
:
AMapView
)
{
super
.
onDropViewInstance
(
view
)
view
.
onDestroy
()
}
override
fun
getCommandsMap
():
Map
<
String
,
Int
>
{
override
fun
getCommandsMap
():
Map
<
String
,
Int
>
{
return
mapOf
(
"animateTo"
to
ANIMATE_TO
)
return
mapOf
(
"animateTo"
to
ANIMATE_TO
)
}
}
...
...
android/src/main/java/cn/qiuxiang/react/amap3d/navigation/AMapNavigation.kt
View file @
8b2cb38d
...
@@ -33,6 +33,10 @@ abstract class AMapNavigation(context: ThemedReactContext) :
...
@@ -33,6 +33,10 @@ abstract class AMapNavigation(context: ThemedReactContext) :
navigation
.
startNavi
(
NaviType
.
GPS
)
navigation
.
startNavi
(
NaviType
.
GPS
)
}
}
fun
stop
()
{
navigation
.
stopNavi
()
}
protected
fun
latLngFromReadableMap
(
map
:
ReadableMap
):
NaviLatLng
{
protected
fun
latLngFromReadableMap
(
map
:
ReadableMap
):
NaviLatLng
{
return
NaviLatLng
(
map
.
getDouble
(
"latitude"
),
map
.
getDouble
(
"longitude"
))
return
NaviLatLng
(
map
.
getDouble
(
"latitude"
),
map
.
getDouble
(
"longitude"
))
}
}
...
...
android/src/main/java/cn/qiuxiang/react/amap3d/navigation/AMapNavigationManager.kt
View file @
8b2cb38d
...
@@ -7,6 +7,7 @@ import com.facebook.react.uimanager.ViewGroupManager
...
@@ -7,6 +7,7 @@ import com.facebook.react.uimanager.ViewGroupManager
abstract
class
AMapNavigationManager
<
T
:
AMapNavigation
>
:
ViewGroupManager
<
T
>()
{
abstract
class
AMapNavigationManager
<
T
:
AMapNavigation
>
:
ViewGroupManager
<
T
>()
{
override
fun
onDropViewInstance
(
view
:
T
)
{
override
fun
onDropViewInstance
(
view
:
T
)
{
super
.
onDropViewInstance
(
view
)
super
.
onDropViewInstance
(
view
)
view
.
stop
()
view
.
onDestroy
()
view
.
onDestroy
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment