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
4bded8e5
Commit
4bded8e5
authored
Dec 23, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 Marker#disabled 接口
parent
2253a7e7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
17 deletions
+8
-17
AMapMarker.m
ios/maps/AMapMarker.m
+4
-7
AMapMarkerManager.m
ios/maps/AMapMarkerManager.m
+2
-3
Marker.js
src/maps/Marker.js
+2
-7
No files found.
ios/maps/AMapMarker.m
View file @
4bded8e5
...
...
@@ -20,6 +20,7 @@
-
(
instancetype
)
init
{
_annotation
=
[
MAPointAnnotation
new
];
_canShowCallout
=
YES
;
self
=
[
super
init
];
return
self
;
}
...
...
@@ -79,13 +80,9 @@
}
}
-
(
void
)
setClickable
:
(
BOOL
)
enabled
{
_annotationView
.
enabled
=
enabled
;
}
-
(
void
)
setInfoWindowEnabled
:
(
BOOL
)
enabled
{
_canShowCallout
=
enabled
;
_annotationView
.
canShowCallout
=
enabled
;
-
(
void
)
setDisabled
:
(
BOOL
)
disabled
{
_canShowCallout
=
!
disabled
;
_annotationView
.
canShowCallout
=
_canShowCallout
;
}
-
(
MAPointAnnotation
*
)
annotation
{
...
...
ios/maps/AMapMarkerManager.m
View file @
4bded8e5
...
...
@@ -21,8 +21,7 @@ RCT_EXPORT_VIEW_PROPERTY(title, NSString)
RCT_EXPORT_VIEW_PROPERTY
(
description
,
NSString
)
RCT_EXPORT_VIEW_PROPERTY
(
active
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
draggable
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
clickable
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
infoWindowEnabled
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
disabled
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
zIndex
,
NSInteger
)
RCT_EXPORT_VIEW_PROPERTY
(
color
,
MAPinAnnotationColor
)
RCT_EXPORT_VIEW_PROPERTY
(
image
,
NSString
)
...
...
@@ -43,7 +42,7 @@ RCT_EXPORT_METHOD(lockToScreen:(nonnull NSNumber *)reactTag x:(int)x y:(int)y) {
RCT_EXPORT_METHOD
(
active
:
(
nonnull
NSNumber
*
)
reactTag
)
{
[
self
.
bridge
.
uiManager
addUIBlock
:
^
(
__unused
RCTUIManager
*
uiManager
,
NSDictionary
<
NSNumber
*
,
UIView
*>
*
viewRegistry
)
{
AMapMarker
*
marker
=
(
AMapMarker
*
)
viewRegistry
[
reactTag
];
[
marker
setActive
:
true
]
;
marker
.
active
=
YES
;
}];
}
...
...
src/maps/Marker.js
View file @
4bded8e5
...
...
@@ -66,11 +66,6 @@ export default class Marker extends BaseComponent {
*/
draggable
:
PropTypes
.
bool
,
/**
* 是否可点击
*/
clickable
:
PropTypes
.
bool
,
/**
* 是否平贴地图
*/
...
...
@@ -103,9 +98,9 @@ export default class Marker extends BaseComponent {
active
:
PropTypes
.
bool
,
/**
* 是否
启用信息窗体
* 是否
禁用,禁用后不可点击
*/
infoWindowEn
abled
:
PropTypes
.
bool
,
dis
abled
:
PropTypes
.
bool
,
/**
* 点击事件
...
...
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