react-native-maps 1.23.12 → 1.24.0
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/AIRMapMarker.m +7 -1
- package/ios/AirMaps/RNMapsMapView.mm +28 -0
- package/ios/AirMaps/RNMapsMarkerView.mm +2 -1
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +2 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +2 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +2 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +14 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +34 -0
- package/ios/generated/RNMapsSpecs/Props.h +107 -11
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +2 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +22 -0
- package/ios/generated/RNMapsSpecs/States.h +24 -0
- package/package.json +1 -1
- package/src/specs/NativeComponentMarker.ts +13 -0
|
@@ -117,6 +117,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
117
117
|
_pinView.layer.zPosition = self.zIndex;
|
|
118
118
|
_pinView.displayPriority = self.displayPriority;
|
|
119
119
|
_pinView.zPriority = self.zIndex;
|
|
120
|
+
_pinView.centerOffset = self.centerOffset;
|
|
120
121
|
return _pinView;
|
|
121
122
|
}
|
|
122
123
|
|
|
@@ -134,7 +135,7 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
134
135
|
_markerView.subtitleVisibility = self.subtitleVisibility ?: MKFeatureVisibilityHidden;
|
|
135
136
|
_markerView.displayPriority = self.displayPriority;
|
|
136
137
|
_markerView.zPriority = self.zIndex;
|
|
137
|
-
|
|
138
|
+
_markerView.centerOffset = self.centerOffset;
|
|
138
139
|
|
|
139
140
|
}
|
|
140
141
|
return _markerView ?: _pinView;
|
|
@@ -337,6 +338,11 @@ NSInteger const AIR_CALLOUT_OPEN_ZINDEX_BASELINE = 999;
|
|
|
337
338
|
[super setCalloutOffset:calloutOffset];
|
|
338
339
|
}
|
|
339
340
|
|
|
341
|
+
- (void) setCenterOffset:(CGPoint)centerOffset
|
|
342
|
+
{
|
|
343
|
+
[super setCenterOffset:centerOffset];
|
|
344
|
+
}
|
|
345
|
+
|
|
340
346
|
- (BOOL)shouldShowCalloutView
|
|
341
347
|
{
|
|
342
348
|
return self.calloutView != nil || self.title != nil || self.subtitle != nil;
|
|
@@ -131,6 +131,34 @@ using namespace facebook::react;
|
|
|
131
131
|
_view = (AIRMap *)[_legacyMapManager view];
|
|
132
132
|
|
|
133
133
|
self.contentView = _view;
|
|
134
|
+
|
|
135
|
+
_view.onLongPress = [self](NSDictionary* dictionary) {
|
|
136
|
+
if (_eventEmitter) {
|
|
137
|
+
// Extract values from the NSDictionary
|
|
138
|
+
NSDictionary* coordinateDict = dictionary[@"coordinate"];
|
|
139
|
+
NSDictionary* positionDict = dictionary[@"position"];
|
|
140
|
+
|
|
141
|
+
// Populate the OnMapPressCoordinate struct
|
|
142
|
+
facebook::react::RNMapsMapViewEventEmitter::OnLongPressCoordinate coordinate = {
|
|
143
|
+
.latitude = [coordinateDict[@"latitude"] doubleValue],
|
|
144
|
+
.longitude = [coordinateDict[@"longitude"] doubleValue],
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// Populate the OnMapPressPosition struct
|
|
148
|
+
facebook::react::RNMapsMapViewEventEmitter::OnLongPressPosition position = {
|
|
149
|
+
.x = [positionDict[@"x"] doubleValue],
|
|
150
|
+
.y = [positionDict[@"y"] doubleValue],
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
auto mapViewEventEmitter = std::static_pointer_cast<RNMapsMapViewEventEmitter const>(_eventEmitter);
|
|
154
|
+
facebook::react::RNMapsMapViewEventEmitter::OnLongPress data = {
|
|
155
|
+
.action = std::string([@"long-press" UTF8String]),
|
|
156
|
+
.position = position,
|
|
157
|
+
.coordinate = coordinate
|
|
158
|
+
};
|
|
159
|
+
mapViewEventEmitter->onLongPress(data);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
134
162
|
|
|
135
163
|
_view.onPress = [self](NSDictionary* dictionary) {
|
|
136
164
|
if (_eventEmitter) {
|
|
@@ -367,8 +367,9 @@ _view.name = CGPointMake(newViewProps.name.x, newViewProps.name.y); \
|
|
|
367
367
|
|
|
368
368
|
REMAP_MAPVIEW_COLOR_PROP(pinColor)
|
|
369
369
|
|
|
370
|
-
|
|
371
370
|
REMAP_MAPVIEW_POINT_PROP(calloutOffset)
|
|
371
|
+
REMAP_MAPVIEW_POINT_PROP(centerOffset)
|
|
372
|
+
|
|
372
373
|
if (newViewProps.coordinate.latitude != oldViewProps.coordinate.latitude ||
|
|
373
374
|
newViewProps.coordinate.longitude != oldViewProps.coordinate.longitude) {
|
|
374
375
|
CLLocationCoordinate2D coordinates = CLLocationCoordinate2DMake(
|
|
@@ -24,6 +24,8 @@ registry->add(concreteComponentDescriptorProvider<RNMapsMapViewComponentDescript
|
|
|
24
24
|
registry->add(concreteComponentDescriptorProvider<RNMapsMarkerComponentDescriptor>());
|
|
25
25
|
registry->add(concreteComponentDescriptorProvider<RNMapsOverlayComponentDescriptor>());
|
|
26
26
|
registry->add(concreteComponentDescriptorProvider<RNMapsPolylineComponentDescriptor>());
|
|
27
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsUrlTileComponentDescriptor>());
|
|
28
|
+
registry->add(concreteComponentDescriptorProvider<RNMapsWMSTileComponentDescriptor>());
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
} // namespace facebook::react
|
|
@@ -24,6 +24,8 @@ using RNMapsMapViewComponentDescriptor = ConcreteComponentDescriptor<RNMapsMapVi
|
|
|
24
24
|
using RNMapsMarkerComponentDescriptor = ConcreteComponentDescriptor<RNMapsMarkerShadowNode>;
|
|
25
25
|
using RNMapsOverlayComponentDescriptor = ConcreteComponentDescriptor<RNMapsOverlayShadowNode>;
|
|
26
26
|
using RNMapsPolylineComponentDescriptor = ConcreteComponentDescriptor<RNMapsPolylineShadowNode>;
|
|
27
|
+
using RNMapsUrlTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsUrlTileShadowNode>;
|
|
28
|
+
using RNMapsWMSTileComponentDescriptor = ConcreteComponentDescriptor<RNMapsWMSTileShadowNode>;
|
|
27
29
|
|
|
28
30
|
void RNMapsSpecs_registerComponentDescriptorsFromCodegen(
|
|
29
31
|
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
@@ -842,5 +842,19 @@ class RNMapsPolylineEventEmitter : public ViewEventEmitter {
|
|
|
842
842
|
OnPressPosition position;
|
|
843
843
|
};
|
|
844
844
|
void onPress(OnPress value) const;
|
|
845
|
+
};
|
|
846
|
+
class RNMapsUrlTileEventEmitter : public ViewEventEmitter {
|
|
847
|
+
public:
|
|
848
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
};
|
|
853
|
+
class RNMapsWMSTileEventEmitter : public ViewEventEmitter {
|
|
854
|
+
public:
|
|
855
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
|
|
845
859
|
};
|
|
846
860
|
} // namespace facebook::react
|
|
@@ -131,6 +131,7 @@ RNMapsMapViewProps::RNMapsMapViewProps(
|
|
|
131
131
|
tintColor(convertRawProp(context, rawProps, "tintColor", sourceProps.tintColor, {})),
|
|
132
132
|
toolbarEnabled(convertRawProp(context, rawProps, "toolbarEnabled", sourceProps.toolbarEnabled, {true})),
|
|
133
133
|
userInterfaceStyle(convertRawProp(context, rawProps, "userInterfaceStyle", sourceProps.userInterfaceStyle, {RNMapsMapViewUserInterfaceStyle::System})),
|
|
134
|
+
customMapStyleString(convertRawProp(context, rawProps, "customMapStyleString", sourceProps.customMapStyleString, {})),
|
|
134
135
|
userLocationAnnotationTitle(convertRawProp(context, rawProps, "userLocationAnnotationTitle", sourceProps.userLocationAnnotationTitle, {})),
|
|
135
136
|
userLocationCalloutEnabled(convertRawProp(context, rawProps, "userLocationCalloutEnabled", sourceProps.userLocationCalloutEnabled, {false})),
|
|
136
137
|
userLocationFastestInterval(convertRawProp(context, rawProps, "userLocationFastestInterval", sourceProps.userLocationFastestInterval, {5000})),
|
|
@@ -152,6 +153,7 @@ RNMapsMarkerProps::RNMapsMarkerProps(
|
|
|
152
153
|
image(convertRawProp(context, rawProps, "image", sourceProps.image, {})),
|
|
153
154
|
calloutOffset(convertRawProp(context, rawProps, "calloutOffset", sourceProps.calloutOffset, {})),
|
|
154
155
|
displayPriority(convertRawProp(context, rawProps, "displayPriority", sourceProps.displayPriority, {RNMapsMarkerDisplayPriority::Required})),
|
|
156
|
+
centerOffset(convertRawProp(context, rawProps, "centerOffset", sourceProps.centerOffset, {})),
|
|
155
157
|
coordinate(convertRawProp(context, rawProps, "coordinate", sourceProps.coordinate, {})),
|
|
156
158
|
description(convertRawProp(context, rawProps, "description", sourceProps.description, {})),
|
|
157
159
|
draggable(convertRawProp(context, rawProps, "draggable", sourceProps.draggable, {false})),
|
|
@@ -190,5 +192,37 @@ RNMapsPolylineProps::RNMapsPolylineProps(
|
|
|
190
192
|
strokeWidth(convertRawProp(context, rawProps, "strokeWidth", sourceProps.strokeWidth, {0.0})),
|
|
191
193
|
tappable(convertRawProp(context, rawProps, "tappable", sourceProps.tappable, {false}))
|
|
192
194
|
{}
|
|
195
|
+
RNMapsUrlTileProps::RNMapsUrlTileProps(
|
|
196
|
+
const PropsParserContext &context,
|
|
197
|
+
const RNMapsUrlTileProps &sourceProps,
|
|
198
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
199
|
+
|
|
200
|
+
doubleTileSize(convertRawProp(context, rawProps, "doubleTileSize", sourceProps.doubleTileSize, {false})),
|
|
201
|
+
flipY(convertRawProp(context, rawProps, "flipY", sourceProps.flipY, {false})),
|
|
202
|
+
maximumNativeZ(convertRawProp(context, rawProps, "maximumNativeZ", sourceProps.maximumNativeZ, {100})),
|
|
203
|
+
maximumZ(convertRawProp(context, rawProps, "maximumZ", sourceProps.maximumZ, {100})),
|
|
204
|
+
minimumZ(convertRawProp(context, rawProps, "minimumZ", sourceProps.minimumZ, {0})),
|
|
205
|
+
offlineMode(convertRawProp(context, rawProps, "offlineMode", sourceProps.offlineMode, {false})),
|
|
206
|
+
shouldReplaceMapContent(convertRawProp(context, rawProps, "shouldReplaceMapContent", sourceProps.shouldReplaceMapContent, {false})),
|
|
207
|
+
tileCacheMaxAge(convertRawProp(context, rawProps, "tileCacheMaxAge", sourceProps.tileCacheMaxAge, {0})),
|
|
208
|
+
tileCachePath(convertRawProp(context, rawProps, "tileCachePath", sourceProps.tileCachePath, {})),
|
|
209
|
+
tileSize(convertRawProp(context, rawProps, "tileSize", sourceProps.tileSize, {256})),
|
|
210
|
+
urlTemplate(convertRawProp(context, rawProps, "urlTemplate", sourceProps.urlTemplate, {}))
|
|
211
|
+
{}
|
|
212
|
+
RNMapsWMSTileProps::RNMapsWMSTileProps(
|
|
213
|
+
const PropsParserContext &context,
|
|
214
|
+
const RNMapsWMSTileProps &sourceProps,
|
|
215
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
216
|
+
|
|
217
|
+
maximumNativeZ(convertRawProp(context, rawProps, "maximumNativeZ", sourceProps.maximumNativeZ, {100})),
|
|
218
|
+
maximumZ(convertRawProp(context, rawProps, "maximumZ", sourceProps.maximumZ, {100})),
|
|
219
|
+
minimumZ(convertRawProp(context, rawProps, "minimumZ", sourceProps.minimumZ, {0})),
|
|
220
|
+
offlineMode(convertRawProp(context, rawProps, "offlineMode", sourceProps.offlineMode, {false})),
|
|
221
|
+
shouldReplaceMapContent(convertRawProp(context, rawProps, "shouldReplaceMapContent", sourceProps.shouldReplaceMapContent, {false})),
|
|
222
|
+
tileCacheMaxAge(convertRawProp(context, rawProps, "tileCacheMaxAge", sourceProps.tileCacheMaxAge, {0})),
|
|
223
|
+
tileCachePath(convertRawProp(context, rawProps, "tileCachePath", sourceProps.tileCachePath, {})),
|
|
224
|
+
tileSize(convertRawProp(context, rawProps, "tileSize", sourceProps.tileSize, {256})),
|
|
225
|
+
urlTemplate(convertRawProp(context, rawProps, "urlTemplate", sourceProps.urlTemplate, {}))
|
|
226
|
+
{}
|
|
193
227
|
|
|
194
228
|
} // namespace facebook::react
|
|
@@ -918,6 +918,7 @@ class RNMapsMapViewProps final : public ViewProps {
|
|
|
918
918
|
SharedColor tintColor{};
|
|
919
919
|
bool toolbarEnabled{true};
|
|
920
920
|
RNMapsMapViewUserInterfaceStyle userInterfaceStyle{RNMapsMapViewUserInterfaceStyle::System};
|
|
921
|
+
std::string customMapStyleString{};
|
|
921
922
|
std::string userLocationAnnotationTitle{};
|
|
922
923
|
bool userLocationCalloutEnabled{false};
|
|
923
924
|
int userLocationFastestInterval{5000};
|
|
@@ -1047,6 +1048,28 @@ static inline std::string toString(const RNMapsMarkerCalloutOffsetStruct &value)
|
|
|
1047
1048
|
return "[Object RNMapsMarkerCalloutOffsetStruct]";
|
|
1048
1049
|
}
|
|
1049
1050
|
|
|
1051
|
+
struct RNMapsMarkerCenterOffsetStruct {
|
|
1052
|
+
double x{0.0};
|
|
1053
|
+
double y{0.0};
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsMarkerCenterOffsetStruct &result) {
|
|
1057
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1058
|
+
|
|
1059
|
+
auto tmp_x = map.find("x");
|
|
1060
|
+
if (tmp_x != map.end()) {
|
|
1061
|
+
fromRawValue(context, tmp_x->second, result.x);
|
|
1062
|
+
}
|
|
1063
|
+
auto tmp_y = map.find("y");
|
|
1064
|
+
if (tmp_y != map.end()) {
|
|
1065
|
+
fromRawValue(context, tmp_y->second, result.y);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
static inline std::string toString(const RNMapsMarkerCenterOffsetStruct &value) {
|
|
1070
|
+
return "[Object RNMapsMarkerCenterOffsetStruct]";
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1050
1073
|
struct RNMapsMarkerCoordinateStruct {
|
|
1051
1074
|
double latitude{0.0};
|
|
1052
1075
|
double longitude{0.0};
|
|
@@ -1080,6 +1103,7 @@ class RNMapsMarkerProps final : public ViewProps {
|
|
|
1080
1103
|
ImageSource image{};
|
|
1081
1104
|
RNMapsMarkerCalloutOffsetStruct calloutOffset{};
|
|
1082
1105
|
RNMapsMarkerDisplayPriority displayPriority{RNMapsMarkerDisplayPriority::Required};
|
|
1106
|
+
RNMapsMarkerCenterOffsetStruct centerOffset{};
|
|
1083
1107
|
RNMapsMarkerCoordinateStruct coordinate{};
|
|
1084
1108
|
std::string description{};
|
|
1085
1109
|
bool draggable{false};
|
|
@@ -1093,12 +1117,12 @@ class RNMapsMarkerProps final : public ViewProps {
|
|
|
1093
1117
|
bool useLegacyPinView{false};
|
|
1094
1118
|
};
|
|
1095
1119
|
|
|
1096
|
-
struct
|
|
1120
|
+
struct RNMapsOverlayBoundsNorthEastStruct {
|
|
1097
1121
|
double latitude{0.0};
|
|
1098
1122
|
double longitude{0.0};
|
|
1099
1123
|
};
|
|
1100
1124
|
|
|
1101
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value,
|
|
1125
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsNorthEastStruct &result) {
|
|
1102
1126
|
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1103
1127
|
|
|
1104
1128
|
auto tmp_latitude = map.find("latitude");
|
|
@@ -1111,19 +1135,53 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
|
|
|
1111
1135
|
}
|
|
1112
1136
|
}
|
|
1113
1137
|
|
|
1114
|
-
static inline std::string toString(const
|
|
1115
|
-
return "[Object
|
|
1138
|
+
static inline std::string toString(const RNMapsOverlayBoundsNorthEastStruct &value) {
|
|
1139
|
+
return "[Object RNMapsOverlayBoundsNorthEastStruct]";
|
|
1116
1140
|
}
|
|
1117
1141
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1142
|
+
struct RNMapsOverlayBoundsSouthWestStruct {
|
|
1143
|
+
double latitude{0.0};
|
|
1144
|
+
double longitude{0.0};
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsSouthWestStruct &result) {
|
|
1148
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1149
|
+
|
|
1150
|
+
auto tmp_latitude = map.find("latitude");
|
|
1151
|
+
if (tmp_latitude != map.end()) {
|
|
1152
|
+
fromRawValue(context, tmp_latitude->second, result.latitude);
|
|
1124
1153
|
}
|
|
1154
|
+
auto tmp_longitude = map.find("longitude");
|
|
1155
|
+
if (tmp_longitude != map.end()) {
|
|
1156
|
+
fromRawValue(context, tmp_longitude->second, result.longitude);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
static inline std::string toString(const RNMapsOverlayBoundsSouthWestStruct &value) {
|
|
1161
|
+
return "[Object RNMapsOverlayBoundsSouthWestStruct]";
|
|
1125
1162
|
}
|
|
1126
1163
|
|
|
1164
|
+
struct RNMapsOverlayBoundsStruct {
|
|
1165
|
+
RNMapsOverlayBoundsNorthEastStruct northEast{};
|
|
1166
|
+
RNMapsOverlayBoundsSouthWestStruct southWest{};
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, RNMapsOverlayBoundsStruct &result) {
|
|
1170
|
+
auto map = (std::unordered_map<std::string, RawValue>)value;
|
|
1171
|
+
|
|
1172
|
+
auto tmp_northEast = map.find("northEast");
|
|
1173
|
+
if (tmp_northEast != map.end()) {
|
|
1174
|
+
fromRawValue(context, tmp_northEast->second, result.northEast);
|
|
1175
|
+
}
|
|
1176
|
+
auto tmp_southWest = map.find("southWest");
|
|
1177
|
+
if (tmp_southWest != map.end()) {
|
|
1178
|
+
fromRawValue(context, tmp_southWest->second, result.southWest);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
static inline std::string toString(const RNMapsOverlayBoundsStruct &value) {
|
|
1183
|
+
return "[Object RNMapsOverlayBoundsStruct]";
|
|
1184
|
+
}
|
|
1127
1185
|
class RNMapsOverlayProps final : public ViewProps {
|
|
1128
1186
|
public:
|
|
1129
1187
|
RNMapsOverlayProps() = default;
|
|
@@ -1132,7 +1190,7 @@ class RNMapsOverlayProps final : public ViewProps {
|
|
|
1132
1190
|
#pragma mark - Props
|
|
1133
1191
|
|
|
1134
1192
|
Float bearing{0.0};
|
|
1135
|
-
|
|
1193
|
+
RNMapsOverlayBoundsStruct bounds{};
|
|
1136
1194
|
ImageSource image{};
|
|
1137
1195
|
Float opacity{1.0};
|
|
1138
1196
|
bool tappable{false};
|
|
@@ -1221,4 +1279,42 @@ class RNMapsPolylineProps final : public ViewProps {
|
|
|
1221
1279
|
bool tappable{false};
|
|
1222
1280
|
};
|
|
1223
1281
|
|
|
1282
|
+
class RNMapsUrlTileProps final : public ViewProps {
|
|
1283
|
+
public:
|
|
1284
|
+
RNMapsUrlTileProps() = default;
|
|
1285
|
+
RNMapsUrlTileProps(const PropsParserContext& context, const RNMapsUrlTileProps &sourceProps, const RawProps &rawProps);
|
|
1286
|
+
|
|
1287
|
+
#pragma mark - Props
|
|
1288
|
+
|
|
1289
|
+
bool doubleTileSize{false};
|
|
1290
|
+
bool flipY{false};
|
|
1291
|
+
int maximumNativeZ{100};
|
|
1292
|
+
int maximumZ{100};
|
|
1293
|
+
int minimumZ{0};
|
|
1294
|
+
bool offlineMode{false};
|
|
1295
|
+
bool shouldReplaceMapContent{false};
|
|
1296
|
+
int tileCacheMaxAge{0};
|
|
1297
|
+
std::string tileCachePath{};
|
|
1298
|
+
int tileSize{256};
|
|
1299
|
+
std::string urlTemplate{};
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
class RNMapsWMSTileProps final : public ViewProps {
|
|
1303
|
+
public:
|
|
1304
|
+
RNMapsWMSTileProps() = default;
|
|
1305
|
+
RNMapsWMSTileProps(const PropsParserContext& context, const RNMapsWMSTileProps &sourceProps, const RawProps &rawProps);
|
|
1306
|
+
|
|
1307
|
+
#pragma mark - Props
|
|
1308
|
+
|
|
1309
|
+
int maximumNativeZ{100};
|
|
1310
|
+
int maximumZ{100};
|
|
1311
|
+
int minimumZ{0};
|
|
1312
|
+
bool offlineMode{false};
|
|
1313
|
+
bool shouldReplaceMapContent{false};
|
|
1314
|
+
int tileCacheMaxAge{0};
|
|
1315
|
+
std::string tileCachePath{};
|
|
1316
|
+
int tileSize{256};
|
|
1317
|
+
std::string urlTemplate{};
|
|
1318
|
+
};
|
|
1319
|
+
|
|
1224
1320
|
} // namespace facebook::react
|
|
@@ -20,5 +20,7 @@ extern const char RNMapsMapViewComponentName[] = "RNMapsMapView";
|
|
|
20
20
|
extern const char RNMapsMarkerComponentName[] = "RNMapsMarker";
|
|
21
21
|
extern const char RNMapsOverlayComponentName[] = "RNMapsOverlay";
|
|
22
22
|
extern const char RNMapsPolylineComponentName[] = "RNMapsPolyline";
|
|
23
|
+
extern const char RNMapsUrlTileComponentName[] = "RNMapsUrlTile";
|
|
24
|
+
extern const char RNMapsWMSTileComponentName[] = "RNMapsWMSTile";
|
|
23
25
|
|
|
24
26
|
} // namespace facebook::react
|
|
@@ -106,4 +106,26 @@ using RNMapsPolylineShadowNode = ConcreteViewShadowNode<
|
|
|
106
106
|
RNMapsPolylineEventEmitter,
|
|
107
107
|
RNMapsPolylineState>;
|
|
108
108
|
|
|
109
|
+
JSI_EXPORT extern const char RNMapsUrlTileComponentName[];
|
|
110
|
+
|
|
111
|
+
/*
|
|
112
|
+
* `ShadowNode` for <RNMapsUrlTile> component.
|
|
113
|
+
*/
|
|
114
|
+
using RNMapsUrlTileShadowNode = ConcreteViewShadowNode<
|
|
115
|
+
RNMapsUrlTileComponentName,
|
|
116
|
+
RNMapsUrlTileProps,
|
|
117
|
+
RNMapsUrlTileEventEmitter,
|
|
118
|
+
RNMapsUrlTileState>;
|
|
119
|
+
|
|
120
|
+
JSI_EXPORT extern const char RNMapsWMSTileComponentName[];
|
|
121
|
+
|
|
122
|
+
/*
|
|
123
|
+
* `ShadowNode` for <RNMapsWMSTile> component.
|
|
124
|
+
*/
|
|
125
|
+
using RNMapsWMSTileShadowNode = ConcreteViewShadowNode<
|
|
126
|
+
RNMapsWMSTileComponentName,
|
|
127
|
+
RNMapsWMSTileProps,
|
|
128
|
+
RNMapsWMSTileEventEmitter,
|
|
129
|
+
RNMapsWMSTileState>;
|
|
130
|
+
|
|
109
131
|
} // namespace facebook::react
|
|
@@ -110,4 +110,28 @@ public:
|
|
|
110
110
|
#endif
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
class RNMapsUrlTileState {
|
|
114
|
+
public:
|
|
115
|
+
RNMapsUrlTileState() = default;
|
|
116
|
+
|
|
117
|
+
#ifdef ANDROID
|
|
118
|
+
RNMapsUrlTileState(RNMapsUrlTileState const &previousState, folly::dynamic data){};
|
|
119
|
+
folly::dynamic getDynamic() const {
|
|
120
|
+
return {};
|
|
121
|
+
};
|
|
122
|
+
#endif
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
class RNMapsWMSTileState {
|
|
126
|
+
public:
|
|
127
|
+
RNMapsWMSTileState() = default;
|
|
128
|
+
|
|
129
|
+
#ifdef ANDROID
|
|
130
|
+
RNMapsWMSTileState(RNMapsWMSTileState const &previousState, folly::dynamic data){};
|
|
131
|
+
folly::dynamic getDynamic() const {
|
|
132
|
+
return {};
|
|
133
|
+
};
|
|
134
|
+
#endif
|
|
135
|
+
};
|
|
136
|
+
|
|
113
137
|
} // namespace facebook::react
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.
|
|
8
|
+
"version": "1.24.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
|
@@ -133,6 +133,19 @@ export interface MarkerFabricNativeProps extends ViewProps {
|
|
|
133
133
|
*/
|
|
134
134
|
displayPriority?: WithDefault<AppleMarkerPriority, 'required'>;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* The offset (in points) at which to display the annotation view.
|
|
138
|
+
*
|
|
139
|
+
* By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
|
|
140
|
+
*
|
|
141
|
+
* Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
|
|
142
|
+
*
|
|
143
|
+
* @default {x: 0.0, y: 0.0}
|
|
144
|
+
* @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
|
|
145
|
+
* @platform Android: Not supported. see the `anchor` prop
|
|
146
|
+
*/
|
|
147
|
+
centerOffset?: Point;
|
|
148
|
+
|
|
136
149
|
/**
|
|
137
150
|
* The coordinate for the marker.
|
|
138
151
|
*
|