react-native-maps 1.0.0-beta.1 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ios/AirMaps/AIRMap.h +0 -1
- package/ios/AirMaps/AIRMap.m +0 -5
- package/ios/AirMaps/AIRMapManager.m +2 -27
- package/package.json +5 -5
package/ios/AirMaps/AIRMap.h
CHANGED
|
@@ -40,7 +40,6 @@ extern const NSInteger AIRMapMaxZoomLevel;
|
|
|
40
40
|
@property (nonatomic, assign) CGFloat minDelta;
|
|
41
41
|
@property (nonatomic, assign) CGFloat maxDelta;
|
|
42
42
|
@property (nonatomic, assign) UIEdgeInsets legalLabelInsets;
|
|
43
|
-
@property (nonatomic, strong) NSTimer *regionChangeObserveTimer;
|
|
44
43
|
@property (nonatomic, assign) MKCoordinateRegion initialRegion;
|
|
45
44
|
@property (nonatomic, assign) MKMapCamera *initialCamera;
|
|
46
45
|
@property (nonatomic, assign) CGFloat minZoomLevel;
|
package/ios/AirMaps/AIRMap.m
CHANGED
|
@@ -91,11 +91,6 @@ const NSInteger AIRMapMaxZoomLevel = 20;
|
|
|
91
91
|
return self;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
- (void)dealloc
|
|
95
|
-
{
|
|
96
|
-
[_regionChangeObserveTimer invalidate];
|
|
97
|
-
}
|
|
98
|
-
|
|
99
94
|
-(void)addSubview:(UIView *)view {
|
|
100
95
|
if([view isKindOfClass:[AIRMapMarker class]]) {
|
|
101
96
|
[self addAnnotation:(id <MKAnnotation>)view];
|
|
@@ -28,8 +28,6 @@
|
|
|
28
28
|
#import "AIRMapSnapshot.h"
|
|
29
29
|
#import "RCTConvert+AirMap.h"
|
|
30
30
|
#import "AIRMapOverlay.h"
|
|
31
|
-
#import "AIRWeakTimerReference.h"
|
|
32
|
-
#import "AIRWeakMapReference.h"
|
|
33
31
|
#import <MapKit/MapKit.h>
|
|
34
32
|
|
|
35
33
|
static NSString *const RCTMapViewKey = @"MapView";
|
|
@@ -943,30 +941,14 @@ static int kDragCenterContext;
|
|
|
943
941
|
|
|
944
942
|
}
|
|
945
943
|
|
|
946
|
-
- (void)
|
|
944
|
+
- (void)mapViewDidChangeVisibleRegion:(AIRMap *)mapView
|
|
947
945
|
{
|
|
948
|
-
|
|
949
|
-
// started rendering, as these won't represent the final location
|
|
950
|
-
if(mapView.hasStartedRendering){
|
|
951
|
-
[self _regionChanged:mapView];
|
|
952
|
-
}
|
|
953
|
-
|
|
954
|
-
AIRWeakTimerReference *weakTarget = [[AIRWeakTimerReference alloc] initWithTarget:self andSelector:@selector(_onTick:)];
|
|
955
|
-
|
|
956
|
-
mapView.regionChangeObserveTimer = [NSTimer timerWithTimeInterval:AIRMapRegionChangeObserveInterval
|
|
957
|
-
target:weakTarget
|
|
958
|
-
selector:@selector(timerDidFire:)
|
|
959
|
-
userInfo:@{ RCTMapViewKey: [[AIRWeakMapReference alloc] initWithMapView: mapView] }
|
|
960
|
-
repeats:YES];
|
|
961
|
-
|
|
962
|
-
[[NSRunLoop mainRunLoop] addTimer:mapView.regionChangeObserveTimer forMode:NSRunLoopCommonModes];
|
|
946
|
+
[self _regionChanged:mapView];
|
|
963
947
|
}
|
|
964
948
|
|
|
965
949
|
- (void)mapView:(AIRMap *)mapView regionDidChangeAnimated:(__unused BOOL)animated
|
|
966
950
|
{
|
|
967
951
|
CGFloat zoomLevel = [self zoomLevel:mapView];
|
|
968
|
-
[mapView.regionChangeObserveTimer invalidate];
|
|
969
|
-
mapView.regionChangeObserveTimer = nil;
|
|
970
952
|
|
|
971
953
|
// Don't send region did change events until map has
|
|
972
954
|
// started rendering, as these won't represent the final location
|
|
@@ -998,7 +980,6 @@ static int kDragCenterContext;
|
|
|
998
980
|
mapView.hasStartedRendering = YES;
|
|
999
981
|
}
|
|
1000
982
|
[mapView beginLoading];
|
|
1001
|
-
[self _emitRegionChangeEvent:mapView continuous:NO];
|
|
1002
983
|
}
|
|
1003
984
|
|
|
1004
985
|
- (void)mapViewDidFinishRenderingMap:(AIRMap *)mapView fullyRendered:(BOOL)fullyRendered
|
|
@@ -1008,12 +989,6 @@ static int kDragCenterContext;
|
|
|
1008
989
|
|
|
1009
990
|
#pragma mark Private
|
|
1010
991
|
|
|
1011
|
-
- (void)_onTick:(NSTimer *)timer
|
|
1012
|
-
{
|
|
1013
|
-
AIRWeakMapReference *weakRef = timer.userInfo[RCTMapViewKey];
|
|
1014
|
-
[self _regionChanged:weakRef.mapView];
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
992
|
- (void)_regionChanged:(AIRMap *)mapView
|
|
1018
993
|
{
|
|
1019
994
|
BOOL needZoom = NO;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "React Native Mapview component for iOS + Android",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
6
|
-
"version": "1.0.0-beta.
|
|
6
|
+
"version": "1.0.0-beta.2",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"@commitlint/cli": "17.0.2",
|
|
53
53
|
"@commitlint/config-conventional": "17.0.2",
|
|
54
54
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
55
|
-
"@types/react-native": "0.
|
|
55
|
+
"@types/react-native": "0.68.0",
|
|
56
56
|
"babel-jest": "^27.3.1",
|
|
57
57
|
"eslint": "7.32.0",
|
|
58
58
|
"husky": "8.0.1",
|
|
59
59
|
"jest": "^27.3.1",
|
|
60
|
-
"prettier": "2.
|
|
60
|
+
"prettier": "2.7.1",
|
|
61
61
|
"react": "17.0.2",
|
|
62
62
|
"react-native": "0.68.2",
|
|
63
|
-
"semantic-release": "19.0.
|
|
64
|
-
"typescript": "4.7.
|
|
63
|
+
"semantic-release": "19.0.3",
|
|
64
|
+
"typescript": "4.7.4"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@types/geojson": "^7946.0.8"
|