@lugg/maps 1.1.2 → 1.1.3
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/LuggMarkerView.mm
CHANGED
|
@@ -103,6 +103,7 @@ using namespace luggmaps::events;
|
|
|
103
103
|
[_iconView insertSubview:childComponentView atIndex:index];
|
|
104
104
|
}
|
|
105
105
|
_didLayout = NO;
|
|
106
|
+
[self setNeedsLayout];
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
- (void)unmountChildComponentView:
|
|
@@ -114,6 +115,7 @@ using namespace luggmaps::events;
|
|
|
114
115
|
[childComponentView removeFromSuperview];
|
|
115
116
|
}
|
|
116
117
|
_didLayout = NO;
|
|
118
|
+
[self setNeedsLayout];
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
- (void)layoutSubviews {
|
|
@@ -185,7 +185,19 @@ static MKMapRect LuggStaticFittedMapRect(CLLocationCoordinate2D center,
|
|
|
185
185
|
_poiEnabled, _poiFilterMode, _poiFilterCategories);
|
|
186
186
|
mapView.overrideUserInterfaceStyle =
|
|
187
187
|
[self snapshotTraitCollection].userInterfaceStyle;
|
|
188
|
-
|
|
188
|
+
// MKMapView fits the rect into the layout-margin viewport, and mapRect
|
|
189
|
+
// is already inset-shifted for the whole view: pass its viewport slice so
|
|
190
|
+
// the fit puts mapRect over the full view, matching the overlay projection
|
|
191
|
+
MKMapRect mapRect = self.mapRect;
|
|
192
|
+
CGSize size = self.projectedSize;
|
|
193
|
+
UIEdgeInsets insets = self.edgeInsets;
|
|
194
|
+
double scale = mapRect.size.width / size.width;
|
|
195
|
+
MKMapRect viewportRect =
|
|
196
|
+
MKMapRectMake(mapRect.origin.x + insets.left * scale,
|
|
197
|
+
mapRect.origin.y + insets.top * scale,
|
|
198
|
+
(size.width - insets.left - insets.right) * scale,
|
|
199
|
+
(size.height - insets.top - insets.bottom) * scale);
|
|
200
|
+
[mapView setVisibleMapRect:viewportRect
|
|
189
201
|
edgePadding:UIEdgeInsetsZero
|
|
190
202
|
animated:NO];
|
|
191
203
|
_warmupMapView = mapView;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lugg/maps",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Universal maps for React Native.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"typescript": "^5.9.2"
|
|
102
102
|
},
|
|
103
103
|
"resolutions": {
|
|
104
|
-
"@lodev09/react-native-true-sheet": "
|
|
104
|
+
"@lodev09/react-native-true-sheet": "4.0.0-beta.20"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@vis.gl/react-google-maps": ">=1.0.0",
|