-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
example/ios/RNAMap3D/Images.xcassets/point.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "point.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#import <MAMapKit/MAMapKit.h> | ||
#import "AMapModel.h" | ||
|
||
#pragma ide diagnostic ignored "OCUnusedPropertyInspection" | ||
|
||
@interface AMapHeatMap : AMapModel | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#import "AMapHeatMap.h" | ||
#import "Coordinate.h" | ||
|
||
#pragma ide diagnostic ignored "OCUnusedMethodInspection" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#import <React/RCTComponent.h> | ||
#import <MAMapKit/MAMapKit.h> | ||
#import "AMapModel.h" | ||
|
||
@interface AMapMultiPoint : AMapModel <MAMultiPointOverlayRendererDelegate> | ||
@property(nonatomic, copy) RCTBubblingEventBlock onItemPress; | ||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#import "AMapMultiPoint.h" | ||
|
||
#pragma ide diagnostic ignored "OCUnusedMethodInspection" | ||
|
||
@implementation AMapMultiPoint { | ||
NSArray<MAMultiPointItem *> *_items; | ||
MAMultiPointOverlayRenderer *_renderer; | ||
MAMultiPointOverlay *_overlay; | ||
UIImage *_image; | ||
} | ||
|
||
- (void)setPoints:(NSArray<MAMultiPointItem *> *)points { | ||
_items = points; | ||
} | ||
|
||
- (void)setImage:(NSString *)name { | ||
_image = [UIImage imageNamed:name]; | ||
} | ||
|
||
- (MAOverlayRenderer *)renderer { | ||
if (_renderer == nil) { | ||
_overlay = [[MAMultiPointOverlay alloc] initWithMultiPointItems:_items]; | ||
_renderer = [[MAMultiPointOverlayRenderer alloc] initWithMultiPointOverlay:_overlay]; | ||
_renderer.delegate = self; | ||
if (_image != nil) { | ||
_renderer.icon = _image; | ||
} | ||
} | ||
return _renderer; | ||
} | ||
|
||
- (void)multiPointOverlayRenderer:(MAMultiPointOverlayRenderer *)renderer didItemTapped:(MAMultiPointItem *)item { | ||
self.onItemPress(@{ | ||
@"index": @([_items indexOfObject:item]), | ||
}); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#import <MAMapKit/MAMapView.h> | ||
#import <React/RCTViewManager.h> | ||
#import "AMapMultiPoint.h" | ||
|
||
#pragma ide diagnostic ignored "OCUnusedClassInspection" | ||
|
||
@interface AMapMultiPointManager : RCTViewManager | ||
@end | ||
|
||
@implementation AMapMultiPointManager { | ||
} | ||
|
||
RCT_EXPORT_MODULE() | ||
|
||
- (UIView *)view { | ||
return [AMapMultiPoint new]; | ||
} | ||
|
||
RCT_EXPORT_VIEW_PROPERTY(points, MAMultiPointItemArray) | ||
RCT_EXPORT_VIEW_PROPERTY(image, NSString) | ||
RCT_EXPORT_VIEW_PROPERTY(onItemPress, RCTBubblingEventBlock) | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters