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
bc6ff3b7
Commit
bc6ff3b7
authored
Dec 26, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add iOS Marker clickEnabled and infoWindowDisabled props
ref #143
parent
a4812c17
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
5 deletions
+19
-5
AMapMarker.m
ios/maps/AMapMarker.m
+10
-2
AMapMarkerManager.m
ios/maps/AMapMarkerManager.m
+2
-1
Marker.js
src/maps/Marker.js
+7
-2
No files found.
ios/maps/AMapMarker.m
View file @
bc6ff3b7
...
...
@@ -16,10 +16,12 @@
BOOL
_draggable
;
BOOL
_active
;
BOOL
_canShowCallout
;
BOOL
_enabled
;
}
-
(
instancetype
)
init
{
_annotation
=
[
MAPointAnnotation
new
];
_enabled
=
YES
;
_canShowCallout
=
YES
;
self
=
[
super
init
];
return
self
;
...
...
@@ -80,9 +82,14 @@
}
}
-
(
void
)
setDisabled
:
(
BOOL
)
disabled
{
-
(
void
)
set
InfoWindow
Disabled
:
(
BOOL
)
disabled
{
_canShowCallout
=
!
disabled
;
_annotationView
.
canShowCallout
=
_canShowCallout
;
_annotationView
.
canShowCallout
=
!
disabled
;
}
-
(
void
)
setClickDisabled
:
(
BOOL
)
disabled
{
_enabled
=
!
disabled
;
_annotationView
.
enabled
=
!
disabled
;
}
-
(
MAPointAnnotation
*
)
annotation
{
...
...
@@ -110,6 +117,7 @@
_annotationView
=
[[
MAPinAnnotationView
alloc
]
initWithAnnotation
:
_annotation
reuseIdentifier
:
nil
];
((
MAPinAnnotationView
*
)
_annotationView
).
pinColor
=
_pinColor
;
}
_annotationView
.
enabled
=
_enabled
;
_annotationView
.
canShowCallout
=
_canShowCallout
;
_annotationView
.
draggable
=
_draggable
;
_annotationView
.
customCalloutView
=
_calloutView
;
...
...
ios/maps/AMapMarkerManager.m
View file @
bc6ff3b7
...
...
@@ -21,7 +21,8 @@ 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
(
disabled
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
clickDisabled
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
infoWindowDisabled
,
BOOL
)
RCT_EXPORT_VIEW_PROPERTY
(
zIndex
,
NSInteger
)
RCT_EXPORT_VIEW_PROPERTY
(
color
,
MAPinAnnotationColor
)
RCT_EXPORT_VIEW_PROPERTY
(
image
,
NSString
)
...
...
src/maps/Marker.js
View file @
bc6ff3b7
...
...
@@ -98,9 +98,14 @@ export default class Marker extends BaseComponent {
active
:
PropTypes
.
bool
,
/**
* 是否禁用
,禁用后不可点击
* 是否禁用
点击,默认不禁用
*/
disabled
:
PropTypes
.
bool
,
clickDisabled
:
PropTypes
.
bool
,
/**
* 是否禁用弹出窗口,默认不禁用
*/
infoWindowDisabled
:
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