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
974bcf93
Commit
974bcf93
authored
Nov 28, 2018
by
李元辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态刷新图片功能
parent
a96def48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
AMapSmoothMoveMarker.kt
...ava/cn/qiuxiang/react/amap3d/maps/AMapSmoothMoveMarker.kt
+8
-2
No files found.
lib/android/src/main/java/cn/qiuxiang/react/amap3d/maps/AMapSmoothMoveMarker.kt
View file @
974bcf93
...
@@ -19,6 +19,7 @@ import com.facebook.react.views.view.ReactViewGroup
...
@@ -19,6 +19,7 @@ import com.facebook.react.views.view.ReactViewGroup
class
AMapSmoothMoveMarker
(
context
:
Context
)
:
ReactViewGroup
(
context
),
AMapOverlay
{
class
AMapSmoothMoveMarker
(
context
:
Context
)
:
ReactViewGroup
(
context
),
AMapOverlay
{
private
var
bitmapDescriptor
:
BitmapDescriptor
?
=
null
private
var
bitmapDescriptor
:
BitmapDescriptor
?
=
null
private
var
coordinates
:
ArrayList
<
LatLng
>
=
ArrayList
()
private
var
coordinates
:
ArrayList
<
LatLng
>
=
ArrayList
()
private
var
lastImage
:
String
?
=
null
var
marker
:
SmoothMoveMarker
?
=
null
var
marker
:
SmoothMoveMarker
?
=
null
private
set
private
set
...
@@ -29,8 +30,13 @@ class AMapSmoothMoveMarker(context: Context) : ReactViewGroup(context), AMapOver
...
@@ -29,8 +30,13 @@ class AMapSmoothMoveMarker(context: Context) : ReactViewGroup(context), AMapOver
}
}
fun
setImage
(
name
:
String
)
{
fun
setImage
(
name
:
String
)
{
val
drawable
=
context
.
resources
.
getIdentifier
(
name
,
"drawable"
,
context
.
packageName
)
//重置图片
bitmapDescriptor
=
BitmapDescriptorFactory
.
fromResource
(
drawable
)
if
(
lastImage
!=
name
)
{
val
drawable
=
context
.
resources
.
getIdentifier
(
name
,
"drawable"
,
context
.
packageName
)
bitmapDescriptor
=
BitmapDescriptorFactory
.
fromResource
(
drawable
)
lastImage
=
name
marker
?.
setDescriptor
(
bitmapDescriptor
)
}
}
}
fun
setCoordinates
(
coordinates
:
ReadableArray
)
{
fun
setCoordinates
(
coordinates
:
ReadableArray
)
{
...
...
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