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
121f508a
Commit
121f508a
authored
Aug 20, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决 #25
parent
98874aeb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
marker.js
example/src/examples/marker.js
+0
-3
AMapView.m
ios/AMapView.m
+6
-2
No files found.
example/src/examples/marker.js
View file @
121f508a
...
@@ -117,7 +117,4 @@ const styles = StyleSheet.create({
...
@@ -117,7 +117,4 @@ const styles = StyleSheet.create({
markerText
:
{
markerText
:
{
color
:
'#fff'
,
color
:
'#fff'
,
},
},
coloredImage
:
{
tintColor
:
'#e91e63'
,
},
})
})
ios/AMapView.m
View file @
121f508a
...
@@ -33,7 +33,8 @@
...
@@ -33,7 +33,8 @@
}
}
-
(
void
)
insertReactSubview
:
(
id
<
RCTComponent
>
)
subview
atIndex
:
(
NSInteger
)
atIndex
{
-
(
void
)
insertReactSubview
:
(
id
<
RCTComponent
>
)
subview
atIndex
:
(
NSInteger
)
atIndex
{
[
super
insertReactSubview
:(
UIView
*
)
subview
atIndex
:
atIndex
];
[
super
insertReactSubview
:
subview
atIndex
:
atIndex
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
((
AMapMarker
*
)
subview
).
mapView
=
self
;
((
AMapMarker
*
)
subview
).
mapView
=
self
;
[
self
addAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
[
self
addAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
...
@@ -41,16 +42,19 @@
...
@@ -41,16 +42,19 @@
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
}
});
}
}
-
(
void
)
removeReactSubview
:
(
id
<
RCTComponent
>
)
subview
{
-
(
void
)
removeReactSubview
:
(
id
<
RCTComponent
>
)
subview
{
[
super
removeReactSubview
:(
UIView
*
)
subview
];
[
super
removeReactSubview
:
subview
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
[
self
removeAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
[
self
removeAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
}
}
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
if
([
subview
isKindOfClass
:[
AMapModel
class
]])
{
[
self
removeOverlay
:(
id
<
MAOverlay
>
)
subview
];
[
self
removeOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
}
});
}
}
@end
@end
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