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
7590b122
Commit
7590b122
authored
Dec 23, 2017
by
7c00
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #138
parent
675efab5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
15 deletions
+21
-15
AMapCallout.h
ios/maps/AMapCallout.h
+1
-1
AMapCallout.m
ios/maps/AMapCallout.m
+4
-0
AMapCalloutManager.m
ios/maps/AMapCalloutManager.m
+5
-5
AMapInfoWindow.m
ios/maps/AMapInfoWindow.m
+0
-4
AMapMarker.h
ios/maps/AMapMarker.h
+1
-1
AMapMarker.m
ios/maps/AMapMarker.m
+8
-4
AMapView.m
ios/maps/AMapView.m
+2
-0
No files found.
ios/maps/AMap
InfoWindow
.h
→
ios/maps/AMap
Callout
.h
View file @
7590b122
#import <React/RCTView.h>
@interface
AMap
InfoWindow
:
RCTView
@interface
AMap
Callout
:
RCTView
@end
ios/maps/AMapCallout.m
0 → 100644
View file @
7590b122
#import "AMapCallout.h"
@implementation
AMapCallout
@end
ios/maps/AMap
InfoWindow
Manager.m
→
ios/maps/AMap
Callout
Manager.m
View file @
7590b122
#import <React/RCTUIManager.h>
#import "AMap
InfoWindow
.h"
#import "AMap
Callout
.h"
#pragma ide diagnostic ignored "OCUnusedClassInspection"
@interface
AMap
InfoWindow
Manager
:
RCTViewManager
@interface
AMap
Callout
Manager
:
RCTViewManager
@end
@implementation
AMap
InfoWindow
Manager
{
@implementation
AMap
Callout
Manager
{
}
RCT_EXPORT_MODULE
()
RCT_EXPORT_MODULE
(
AMapInfoWindow
)
-
(
UIView
*
)
view
{
return
[
AMap
InfoWindow
new
];
return
[
AMap
Callout
new
];
}
@end
ios/maps/AMapInfoWindow.m
deleted
100644 → 0
View file @
675efab5
#import "AMapInfoWindow.h"
@implementation
AMapInfoWindow
@end
ios/maps/AMapMarker.h
View file @
7590b122
#import "AMapView.h"
#import "AMap
InfoWindow
.h"
#import "AMap
Callout
.h"
@interface
AMapMarker
:
UIView
...
...
ios/maps/AMapMarker.m
View file @
7590b122
...
...
@@ -2,6 +2,7 @@
#import "AMapMarker.h"
#pragma ide diagnostic ignored "OCUnusedMethodInspection"
#pragma clang diagnostic ignored "-Woverriding-method-mismatch"
@implementation
AMapMarker
{
MAPointAnnotation
*
_annotation
;
...
...
@@ -11,9 +12,10 @@
AMapView
*
_mapView
;
MAPinAnnotationColor
_pinColor
;
UIImage
*
_image
;
BOOL
_draggable
;
CGPoint
_centerOffset
;
BOOL
_draggable
;
BOOL
_active
;
BOOL
_canShowCallout
;
}
-
(
instancetype
)
init
{
...
...
@@ -53,7 +55,6 @@
_annotationView
.
centerOffset
=
centerOffset
;
}
#pragma clang diagnostic ignored "-Woverriding-method-mismatch"
-
(
void
)
setImage
:
(
NSString
*
)
name
{
_image
=
[
UIImage
imageNamed
:
name
];
if
(
_image
!=
nil
)
{
...
...
@@ -83,6 +84,7 @@
}
-
(
void
)
setInfoWindowEnabled
:
(
BOOL
)
enabled
{
_canShowCallout
=
enabled
;
_annotationView
.
canShowCallout
=
enabled
;
}
...
...
@@ -101,6 +103,7 @@
-
(
MAAnnotationView
*
)
annotationView
{
if
(
_annotationView
==
nil
)
{
if
(
_customView
)
{
_customView
.
hidden
=
NO
;
_annotationView
=
[[
MAAnnotationView
alloc
]
initWithAnnotation
:
_annotation
reuseIdentifier
:
nil
];
_annotationView
.
bounds
=
_customView
.
bounds
;
[
_annotationView
addSubview
:
_customView
];
...
...
@@ -110,7 +113,7 @@
_annotationView
=
[[
MAPinAnnotationView
alloc
]
initWithAnnotation
:
_annotation
reuseIdentifier
:
nil
];
((
MAPinAnnotationView
*
)
_annotationView
).
pinColor
=
_pinColor
;
}
_annotationView
.
canShowCallout
=
YES
;
_annotationView
.
canShowCallout
=
_canShowCallout
;
_annotationView
.
draggable
=
_draggable
;
_annotationView
.
customCalloutView
=
_calloutView
;
_annotationView
.
centerOffset
=
_centerOffset
;
...
...
@@ -123,11 +126,12 @@
}
-
(
void
)
didAddSubview
:
(
UIView
*
)
subview
{
if
([
subview
isKindOfClass
:[
AMap
InfoWindow
class
]])
{
if
([
subview
isKindOfClass
:[
AMap
Callout
class
]])
{
_calloutView
=
[[
MACustomCalloutView
alloc
]
initWithCustomView
:
subview
];
_annotationView
.
customCalloutView
=
_calloutView
;
}
else
{
_customView
=
subview
;
_customView
.
hidden
=
YES
;
}
}
...
...
ios/maps/AMapView.m
View file @
7590b122
...
...
@@ -53,7 +53,9 @@
AMapMarker
*
marker
=
(
AMapMarker
*
)
subview
;
marker
.
mapView
=
self
;
_markers
[[
@
(
marker
.
annotation
.
hash
)
stringValue
]]
=
marker
;
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
self
addAnnotation
:
marker
.
annotation
];
});
}
if
([
subview
isKindOfClass
:[
AMapOverlay
class
]])
{
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
...
...
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