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
fc80b021
Commit
fc80b021
authored
Jun 21, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化继承结构
parent
b18d4565
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
26 additions
and
27 deletions
+26
-27
AMapMarker.h
ios/AMapMarker.h
+0
-2
AMapMarkerManager.m
ios/AMapMarkerManager.m
+0
-1
AMapModel.h
ios/AMapModel.h
+6
-0
AMapModel.m
ios/AMapModel.m
+11
-0
AMapOverlay.h
ios/AMapOverlay.h
+0
-1
AMapOverlayManager.m
ios/AMapOverlayManager.m
+0
-1
AMapPolygon.h
ios/AMapPolygon.h
+2
-5
AMapPolyline.h
ios/AMapPolyline.h
+2
-4
AMapView.h
ios/AMapView.h
+0
-1
AMapView.m
ios/AMapView.m
+2
-3
AMapViewManager.m
ios/AMapViewManager.m
+3
-8
Coordinate.h
ios/Coordinate.h
+0
-1
No files found.
ios/AMapMarker.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import "AMapView.h"
#import "AMapView.h"
#import "AMapOverlay.h"
#import "AMapOverlay.h"
...
...
ios/AMapMarkerManager.m
View file @
fc80b021
#import <MAMapKit/MAMapView.h>
#import <React/RCTViewManager.h>
#import <React/RCTViewManager.h>
#import "AMapMarker.h"
#import "AMapMarker.h"
...
...
ios/AMapModel.h
0 → 100644
View file @
fc80b021
#import <MAMapKit/MAOverlayRenderer.h>
@interface
AMapModel
:
UIView
-
(
MAOverlayRenderer
*
)
renderer
;
@end
\ No newline at end of file
ios/AMapModel.m
0 → 100644
View file @
fc80b021
#import "AMapModel.h"
@implementation
AMapModel
{
}
-
(
MAOverlayRenderer
*
)
renderer
{
return
nil
;
}
@end
\ No newline at end of file
ios/AMapOverlay.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import <React/RCTView.h>
#import <React/RCTView.h>
@protocol
AMapOverlayDelegate
<
NSObject
>
@protocol
AMapOverlayDelegate
<
NSObject
>
...
...
ios/AMapOverlayManager.m
View file @
fc80b021
#import <React/RCTViewManager.h>
#import <React/RCTUIManager.h>
#import <React/RCTUIManager.h>
#import "AMapOverlay.h"
#import "AMapOverlay.h"
...
...
ios/AMapPolygon.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import "AMapModel.h"
#import <MAMapKit/MAMapKit.h>
#pragma ide diagnostic ignored "OCUnusedPropertyInspection"
#pragma ide diagnostic ignored "OCUnusedPropertyInspection"
@interface
AMapPolygon
:
UIView
<
MAOverlay
>
@interface
AMapPolygon
:
AMapModel
@property
(
nonatomic
,
readonly
)
CLLocationCoordinate2D
coordinate
;
@property
(
nonatomic
,
readonly
)
CLLocationCoordinate2D
coordinate
;
@property
(
nonatomic
,
readonly
)
MAMapRect
boundingMapRect
;
@property
(
nonatomic
,
readonly
)
MAMapRect
boundingMapRect
;
-
(
MAOverlayRenderer
*
)
renderer
;
@end
@end
ios/AMapPolyline.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import <MAMapKit/MAMapKit.h>
#import "AMapModel.h"
#pragma ide diagnostic ignored "OCUnusedPropertyInspection"
#pragma ide diagnostic ignored "OCUnusedPropertyInspection"
@interface
AMapPolyline
:
UIView
<
MAOverlay
>
@interface
AMapPolyline
:
AMapModel
@property
(
nonatomic
,
readonly
)
CLLocationCoordinate2D
coordinate
;
@property
(
nonatomic
,
readonly
)
CLLocationCoordinate2D
coordinate
;
@property
(
nonatomic
,
readonly
)
MAMapRect
boundingMapRect
;
@property
(
nonatomic
,
readonly
)
MAMapRect
boundingMapRect
;
-
(
MAOverlayRenderer
*
)
renderer
;
@end
@end
ios/AMapView.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import <MAMapKit/MAMapKit.h>
#import <React/RCTComponent.h>
#import <React/RCTComponent.h>
...
...
ios/AMapView.m
View file @
fc80b021
#import "AMapView.h"
#import "AMapView.h"
#import "AMapMarker.h"
#import "AMapMarker.h"
#import "AMapPolyline.h"
#import "AMapPolyline.h"
#import "AMapPolygon.h"
#pragma ide diagnostic ignored "OCUnusedMethodInspection"
#pragma ide diagnostic ignored "OCUnusedMethodInspection"
...
@@ -33,7 +32,7 @@
...
@@ -33,7 +32,7 @@
((
AMapMarker
*
)
subview
).
mapView
=
self
;
((
AMapMarker
*
)
subview
).
mapView
=
self
;
[
self
addAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
[
self
addAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
}
}
if
([
subview
isKindOfClass
:[
AMap
Polyline
class
]]
||
[
subview
isKindOfClass
:[
AMapPolygon
class
]])
{;
if
([
subview
isKindOfClass
:[
AMap
Model
class
]])
{
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
[
self
addOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
}
}
}
...
@@ -42,7 +41,7 @@
...
@@ -42,7 +41,7 @@
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
if
([
subview
isKindOfClass
:[
AMapMarker
class
]])
{
[
self
removeAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
[
self
removeAnnotation
:(
id
<
MAAnnotation
>
)
subview
];
}
}
if
([
subview
isKindOfClass
:[
AMap
Polyline
class
]]
||
[
subview
isKindOfClass
:[
AMapPolygon
class
]])
{
if
([
subview
isKindOfClass
:[
AMap
Model
class
]])
{
[
self
removeOverlay
:(
id
<
MAOverlay
>
)
subview
];
[
self
removeOverlay
:(
id
<
MAOverlay
>
)
subview
];
}
}
}
}
...
...
ios/AMapViewManager.m
View file @
fc80b021
#import <MAMapKit/MAMapKit.h>
#import <React/RCTViewManager.h>
#import <React/RCTViewManager.h>
#import "AMapView.h"
#import "AMapView.h"
#import "AMapMarker.h"
#import "AMapMarker.h"
#import "AMapPolyline.h"
#import "AMapModel.h"
#import "AMapPolygon.h"
#pragma ide diagnostic ignored "OCUnusedClassInspection"
#pragma ide diagnostic ignored "OCUnusedClassInspection"
#pragma ide diagnostic ignored "-Woverriding-method-mismatch"
#pragma ide diagnostic ignored "-Woverriding-method-mismatch"
...
@@ -86,11 +84,8 @@ RCT_EXPORT_VIEW_PROPERTY(onLocation, RCTBubblingEventBlock)
...
@@ -86,11 +84,8 @@ RCT_EXPORT_VIEW_PROPERTY(onLocation, RCTBubblingEventBlock)
}
}
-
(
MAOverlayRenderer
*
)
mapView
:
(
MAMapView
*
)
mapView
rendererForOverlay
:
(
id
<
MAOverlay
>
)
overlay
{
-
(
MAOverlayRenderer
*
)
mapView
:
(
MAMapView
*
)
mapView
rendererForOverlay
:
(
id
<
MAOverlay
>
)
overlay
{
if
([
overlay
isKindOfClass
:[
AMapPolyline
class
]])
{
if
([
overlay
isKindOfClass
:[
AMapModel
class
]])
{
return
((
AMapPolyline
*
)
overlay
).
renderer
;
return
((
AMapModel
*
)
overlay
).
renderer
;
}
if
([
overlay
isKindOfClass
:[
AMapPolygon
class
]])
{
return
((
AMapPolygon
*
)
overlay
).
renderer
;
}
}
return
nil
;
return
nil
;
}
}
...
...
ios/Coordinate.h
View file @
fc80b021
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import <MAMapKit/MAMapKit.h>
@interface
Coordinate
:
NSObject
@interface
Coordinate
:
NSObject
...
...
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