react-native-maps 1.21.0-alpha.99 → 1.22.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/README.md +9 -4
- package/android/build.gradle +65 -72
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/RCTAppDependencyProvider.h +25 -0
- package/android/src/main/RCTAppDependencyProvider.mm +55 -0
- package/android/src/main/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/src/main/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/src/main/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/src/main/RCTThirdPartyComponentsProvider.mm +28 -0
- package/android/src/main/ReactAppDependencyProvider.podspec +34 -0
- package/android/src/main/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +17 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerDelegate.java +49 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsCircleManagerInterface.java +23 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +23 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +209 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +39 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerDelegate.java +45 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsOverlayManagerInterface.java +22 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +26 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerDelegate.java +62 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsUrlTileManagerInterface.java +27 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerDelegate.java +56 -0
- package/android/src/main/java/com/facebook/react/viewmanagers/RNMapsWMSTileManagerInterface.java +25 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +5 -1
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +1 -1
- package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +9 -3
- package/android/src/main/java/com/rnmaps/fabric/UrlTileManager.java +124 -0
- package/android/src/main/java/com/rnmaps/fabric/WMSTileManager.java +114 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +19 -3
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +608 -603
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +2 -22
- package/android/src/main/java/com/rnmaps/maps/MapOverlayManager.java +23 -1
- package/android/src/main/java/com/rnmaps/maps/MapUrlTile.java +18 -18
- package/android/src/main/java/com/rnmaps/maps/MapUrlTileManager.java +10 -14
- package/android/src/main/java/com/rnmaps/maps/MapView.java +58 -49
- package/android/src/main/java/com/rnmaps/maps/MapWMSTile.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapWMSTileManager.java +10 -10
- package/android/src/main/jni/CMakeLists.txt +36 -0
- package/android/src/main/jni/RNMapsSpecs-generated.cpp +68 -0
- package/android/src/main/jni/RNMapsSpecs.h +31 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +31 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +33 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +979 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +860 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.cpp +227 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/Props.h +1297 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +26 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +131 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
- package/android/src/main/jni/react/renderer/components/RNMapsSpecs/States.h +137 -0
- package/app.plugin.js +1 -0
- package/ios/AirGoogleMaps/AIRGoogleMap.h +13 -13
- package/ios/AirGoogleMaps/{AIRGoogleMap.m → AIRGoogleMap.mm} +32 -34
- package/ios/AirGoogleMaps/AIRGoogleMapManager.h +1 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.mm +543 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +3 -3
- package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapUrlTile.m +2 -2
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +5 -2
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +41 -33
- package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +23 -14
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +1 -0
- package/ios/AirMaps/AIRMap.h +8 -9
- package/ios/AirMaps/{AIRMap.m → AIRMap.mm} +18 -14
- package/ios/AirMaps/AIRMapManager.m +8 -19
- package/ios/AirMaps/AIRMapMarker.m +57 -44
- package/ios/AirMaps/AIRMapOverlay.m +2 -2
- package/ios/AirMaps/AIRMapWMSTile.m +8 -8
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.h +25 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderGoogleMapView.mm +77 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.h +25 -0
- package/ios/AirMaps/FabricPlaceholders/PlaceHolderPolygonView.mm +51 -0
- package/ios/AirMaps/RNMapsAirModule.h +2 -3
- package/ios/AirMaps/RNMapsAirModule.mm +14 -0
- package/ios/AirMaps/RNMapsDefines.h +1 -0
- package/ios/AirMaps/RNMapsMapView.h +5 -2
- package/ios/AirMaps/RNMapsMapView.mm +16 -6
- package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
- package/ios/AirMaps/RNMapsMarkerView.mm +12 -4
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +7 -0
- package/ios/AirMaps/module.modulemap +6 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +15 -55
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
- package/ios/{AirMaps → generated}/RNMapsAirModuleDelegate.h +1 -1
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +29 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +31 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +977 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +846 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +194 -0
- package/ios/generated/RNMapsSpecs/Props.h +1224 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +591 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +24 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +109 -0
- package/ios/generated/RNMapsSpecs/States.cpp +16 -0
- package/ios/generated/RNMapsSpecs/States.h +113 -0
- package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
- package/ios/generated/RNMapsSpecsJSI.h +268 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/ios/generated/module.modulemap +15 -0
- package/package.json +34 -27
- package/plugin/build/android.js +58 -0
- package/plugin/build/index.js +10 -0
- package/plugin/build/ios.js +172 -0
- package/react-native-google-maps.podspec +27 -0
- package/react-native-maps-generated.podspec +31 -0
- package/react-native-maps.podspec +52 -46
- package/react-native.config.js +16 -0
- package/src/AnimatedRegion.ts +169 -0
- package/src/Geojson.tsx +541 -0
- package/src/MapCallout.tsx +77 -0
- package/src/MapCalloutSubview.tsx +64 -0
- package/src/MapCircle.tsx +162 -0
- package/src/MapHeatmap.tsx +125 -0
- package/src/MapLocalTile.tsx +60 -0
- package/src/MapMarker.tsx +531 -0
- package/src/MapMarkerNativeComponent.ts +51 -0
- package/src/MapOverlay.tsx +178 -0
- package/src/MapPolygon.tsx +188 -0
- package/src/MapPolygon.types.ts +25 -0
- package/src/MapPolyline.tsx +215 -0
- package/src/MapUrlTile.tsx +169 -0
- package/src/MapView.tsx +1230 -0
- package/src/MapView.types.ts +212 -0
- package/src/MapView.web.ts +2 -0
- package/src/MapViewNativeComponent.ts +86 -0
- package/src/MapWMSTile.tsx +148 -0
- package/src/ProviderConstants.ts +2 -0
- package/src/createFabricMap.tsx +253 -0
- package/src/decorateMapComponent.ts +229 -0
- package/src/fixImageProp.ts +17 -0
- package/src/index.ts +52 -0
- package/src/sharedTypes.ts +101 -0
- package/{specs → src/specs}/NativeComponentCircle.ts +3 -4
- package/{specs → src/specs}/NativeComponentGoogleMapView.ts +15 -9
- package/{specs → src/specs}/NativeComponentMapView.ts +61 -32
- package/{specs → src/specs}/NativeComponentOverlay.ts +11 -2
- package/{specs → src/specs}/NativeComponentPolyline.ts +1 -1
- package/src/specs/NativeComponentUrlTile.ts +128 -0
- package/src/specs/NativeComponentWMSTile.ts +107 -0
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +0 -533
- package/lib/AnimatedRegion.d.ts +0 -19
- package/lib/AnimatedRegion.js +0 -134
- package/lib/Geojson.d.ts +0 -204
- package/lib/Geojson.js +0 -166
- package/lib/MapCallout.d.ts +0 -40
- package/lib/MapCallout.js +0 -51
- package/lib/MapCalloutSubview.d.ts +0 -34
- package/lib/MapCalloutSubview.js +0 -48
- package/lib/MapCircle.d.ts +0 -117
- package/lib/MapCircle.js +0 -53
- package/lib/MapHeatmap.d.ts +0 -78
- package/lib/MapHeatmap.js +0 -59
- package/lib/MapLocalTile.d.ts +0 -35
- package/lib/MapLocalTile.js +0 -44
- package/lib/MapMarker.d.ts +0 -322
- package/lib/MapMarker.js +0 -158
- package/lib/MapMarkerNativeComponent.d.ts +0 -15
- package/lib/MapMarkerNativeComponent.js +0 -15
- package/lib/MapOverlay.d.ts +0 -88
- package/lib/MapOverlay.js +0 -65
- package/lib/MapPolygon.d.ts +0 -140
- package/lib/MapPolygon.js +0 -53
- package/lib/MapPolygon.types.d.ts +0 -18
- package/lib/MapPolyline.d.ts +0 -156
- package/lib/MapPolyline.js +0 -53
- package/lib/MapUrlTile.d.ts +0 -134
- package/lib/MapUrlTile.js +0 -44
- package/lib/MapView.d.ts +0 -703
- package/lib/MapView.js +0 -427
- package/lib/MapView.types.d.ts +0 -161
- package/lib/MapView.types.js +0 -2
- package/lib/MapView.web.d.ts +0 -1
- package/lib/MapView.web.js +0 -9
- package/lib/MapViewNativeComponent.d.ts +0 -18
- package/lib/MapViewNativeComponent.js +0 -19
- package/lib/MapWMSTile.d.ts +0 -116
- package/lib/MapWMSTile.js +0 -44
- package/lib/ProviderConstants.d.ts +0 -2
- package/lib/ProviderConstants.js +0 -5
- package/lib/createFabricMap.d.ts +0 -24
- package/lib/createFabricMap.js +0 -188
- package/lib/decorateMapComponent.d.ts +0 -36
- package/lib/decorateMapComponent.js +0 -120
- package/lib/fixImageProp.d.ts +0 -4
- package/lib/fixImageProp.js +0 -16
- package/lib/index.d.ts +0 -38
- package/lib/index.js +0 -81
- package/lib/sharedTypes.d.ts +0 -81
- package/lib/sharedTypes.js +0 -2
- package/lib/sharedTypesInternal.js +0 -2
- package/lib/specs/NativeAirMapsModule.d.ts +0 -31
- package/lib/specs/NativeAirMapsModule.js +0 -4
- package/lib/specs/NativeComponentCallout.d.ts +0 -46
- package/lib/specs/NativeComponentCallout.js +0 -9
- package/lib/specs/NativeComponentCircle.d.ts +0 -74
- package/lib/specs/NativeComponentCircle.js +0 -7
- package/lib/specs/NativeComponentGoogleMapView.d.ts +0 -713
- package/lib/specs/NativeComponentGoogleMapView.js +0 -22
- package/lib/specs/NativeComponentGooglePolygon.d.ts +0 -75
- package/lib/specs/NativeComponentGooglePolygon.js +0 -7
- package/lib/specs/NativeComponentMapView.d.ts +0 -847
- package/lib/specs/NativeComponentMapView.js +0 -20
- package/lib/specs/NativeComponentMarker.d.ts +0 -258
- package/lib/specs/NativeComponentMarker.js +0 -19
- package/lib/specs/NativeComponentOverlay.d.ts +0 -67
- package/lib/specs/NativeComponentOverlay.js +0 -7
- package/lib/specs/NativeComponentPolyline.d.ts +0 -101
- package/lib/specs/NativeComponentPolyline.js +0 -7
- /package/ios/AirMaps/{UIView +AirMap.m → UIView+AirMap.m} +0 -0
- /package/ios/{AirMaps → generated}/RNMapsHostVewDelegate.h +0 -0
- /package/{lib/MapPolygon.types.js → plugin/build/types.js} +0 -0
- /package/{lib/sharedTypesInternal.d.ts → src/sharedTypesInternal.ts} +0 -0
- /package/{specs → src/specs}/NativeAirMapsModule.ts +0 -0
- /package/{specs → src/specs}/NativeComponentCallout.ts +0 -0
- /package/{specs → src/specs}/NativeComponentGooglePolygon.ts +0 -0
- /package/{specs → src/specs}/NativeComponentMarker.ts +0 -0
|
@@ -46,7 +46,16 @@ export interface OverlayFabricNativeProps extends ViewProps {
|
|
|
46
46
|
* @platform iOS: Supported
|
|
47
47
|
* @platform Android: Supported
|
|
48
48
|
*/
|
|
49
|
-
bounds:
|
|
49
|
+
bounds: Readonly<{
|
|
50
|
+
northEast: {
|
|
51
|
+
latitude: Double; // Non-nullable Double for latitude
|
|
52
|
+
longitude: Double; // Non-nullable Double for longitude
|
|
53
|
+
};
|
|
54
|
+
southWest: {
|
|
55
|
+
latitude: Double; // Non-nullable Double for latitude
|
|
56
|
+
longitude: Double; // Non-nullable Double for longitude
|
|
57
|
+
};
|
|
58
|
+
}>;
|
|
50
59
|
|
|
51
60
|
/**
|
|
52
61
|
* A custom image to be used as the overlay.
|
|
@@ -85,5 +94,5 @@ export interface OverlayFabricNativeProps extends ViewProps {
|
|
|
85
94
|
|
|
86
95
|
export default codegenNativeComponent<OverlayFabricNativeProps>(
|
|
87
96
|
'RNMapsOverlay',
|
|
88
|
-
{},
|
|
97
|
+
{excludedPlatforms: ['iOS']},
|
|
89
98
|
) as HostComponent<OverlayFabricNativeProps>;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type {HostComponent, ViewProps} from 'react-native';
|
|
2
|
+
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import {Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
|
|
5
|
+
|
|
6
|
+
export interface UrlTileFabricNativeProps extends ViewProps {
|
|
7
|
+
/**
|
|
8
|
+
* Doubles tile size from 256 to 512 utilising higher zoom levels
|
|
9
|
+
* i.e loading 4 higher zoom level tiles and combining them for one high-resolution tile.
|
|
10
|
+
* iOS does this automatically, even if it is not desirable always.
|
|
11
|
+
* NB! using this makes text labels smaller than in the original map style.
|
|
12
|
+
*
|
|
13
|
+
* @platform iOS: Not supported
|
|
14
|
+
* @platform Android: Supported
|
|
15
|
+
*/
|
|
16
|
+
doubleTileSize?: boolean;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Allow tiles using the TMS coordinate system (origin bottom left) to be used,
|
|
20
|
+
* and displayed at their correct coordinates.
|
|
21
|
+
*
|
|
22
|
+
* @platform iOS: Supported
|
|
23
|
+
* @platform Android: Supported
|
|
24
|
+
*/
|
|
25
|
+
flipY?: boolean;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
|
|
29
|
+
* Tiles are auto-scaled for higher zoom levels.
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS: Apple Maps only
|
|
32
|
+
* @platform Android: Supported
|
|
33
|
+
*/
|
|
34
|
+
maximumNativeZ?: WithDefault<Int32, 100>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The maximum zoom level for this tile overlay.
|
|
38
|
+
*
|
|
39
|
+
* @platform iOS: Supported
|
|
40
|
+
* @platform Android: Supported
|
|
41
|
+
*/
|
|
42
|
+
maximumZ?: WithDefault<Int32, 100>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The minimum zoom level for this tile overlay.
|
|
46
|
+
*
|
|
47
|
+
* @platform iOS: Supported
|
|
48
|
+
* @platform Android: Supported
|
|
49
|
+
*/
|
|
50
|
+
minimumZ?: Int32;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* In offline-mode tiles are not fetched from the tile servers, rather only tiles stored in the cache directory are used.
|
|
54
|
+
* Furthermore, automated tile scaling is activated: if tile at a desired zoom level is not found from the cache directory,
|
|
55
|
+
* then lower zoom level tile is used (up to 4 levels lower) and scaled.
|
|
56
|
+
*
|
|
57
|
+
* @default false
|
|
58
|
+
* @platform iOS: Apple Maps only
|
|
59
|
+
* @platform Android: Supported
|
|
60
|
+
*/
|
|
61
|
+
offlineMode?: boolean;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Corresponds to MKTileOverlay canReplaceMapContent i.e. if true then underlying iOS basemap is not shown.
|
|
65
|
+
*
|
|
66
|
+
* @default false
|
|
67
|
+
* @platform iOS: Apple Maps only
|
|
68
|
+
* @platform Android: Not supported
|
|
69
|
+
*/
|
|
70
|
+
shouldReplaceMapContent?: boolean;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Defines maximum age in seconds for a cached tile before it's refreshed.
|
|
74
|
+
*
|
|
75
|
+
* NB! Refresh logic is "serve-stale-while-refresh"
|
|
76
|
+
* i.e. to ensure map availability a stale (over max age) tile is served
|
|
77
|
+
* while a tile refresh process is started in the background.
|
|
78
|
+
*
|
|
79
|
+
* @platform iOS: Apple Maps only
|
|
80
|
+
* @platform Android: Supported
|
|
81
|
+
*/
|
|
82
|
+
tileCacheMaxAge?: Int32;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Enable caching of tiles in the specified directory.
|
|
86
|
+
* Directory can be specified either as a normal path or in URL format (`file://`).
|
|
87
|
+
*
|
|
88
|
+
* Tiles are stored in tileCachePath directory as `/{z}/{x}/{y}` i.e. in sub-directories 2-levels deep,
|
|
89
|
+
* filename is tile y-coordinate without any filetype-extension.
|
|
90
|
+
*
|
|
91
|
+
* NB! All cache management needs to be implemented by client e.g. deleting tiles to manage use of storage space etc.
|
|
92
|
+
*
|
|
93
|
+
* @platform iOS: Apple Maps only
|
|
94
|
+
* @platform Android: Supported
|
|
95
|
+
*/
|
|
96
|
+
tileCachePath?: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Tile size, default size is 256 (for tiles of 256 _ 256 pixels).
|
|
100
|
+
* High-res (aka 'retina') tiles are 512 (tiles of 512 _ 512 pixels)
|
|
101
|
+
*
|
|
102
|
+
* @platform iOS: Apple Maps only
|
|
103
|
+
* @platform Android: Supported
|
|
104
|
+
*/
|
|
105
|
+
tileSize?: WithDefault<Int32, 256>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The url template of the map tileserver.
|
|
109
|
+
* (URLTile) The patterns {x} {y} {z} will be replaced at runtime.
|
|
110
|
+
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png.
|
|
111
|
+
*
|
|
112
|
+
* It is also possible to refer to tiles in local filesystem with file:///top-level-directory/sub-directory/{z}/{x}/{y}.png URL-format.
|
|
113
|
+
* (WMSTile) The patterns {minX} {maxX} {minY} {maxY} {width} {height} will be replaced at runtime according to EPSG:900913 specification bounding box.
|
|
114
|
+
* For example, https://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:poi&styles=&bbox={minX},{minY},{maxX},{maxY}&width={width}&height={height}&srs=EPSG:900913&format=image/png&transparent=true&format_options=dpi:213.
|
|
115
|
+
*
|
|
116
|
+
* @platform iOS: Supported
|
|
117
|
+
* @platform Android: Supported
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
urlTemplate: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export default codegenNativeComponent<UrlTileFabricNativeProps>(
|
|
124
|
+
'RNMapsUrlTile',
|
|
125
|
+
{
|
|
126
|
+
excludedPlatforms: ['iOS'],
|
|
127
|
+
},
|
|
128
|
+
) as HostComponent<UrlTileFabricNativeProps>;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type {HostComponent, ViewProps} from 'react-native';
|
|
2
|
+
|
|
3
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
4
|
+
import {Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes';
|
|
5
|
+
|
|
6
|
+
export interface WMSTileFabricNativeProps extends ViewProps {
|
|
7
|
+
/**
|
|
8
|
+
* The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
|
|
9
|
+
* Tiles are auto-scaled for higher zoom levels.
|
|
10
|
+
*
|
|
11
|
+
* @platform iOS: Apple Maps only
|
|
12
|
+
* @platform Android: Supported
|
|
13
|
+
*/
|
|
14
|
+
maximumNativeZ?: WithDefault<Int32, 100>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The maximum zoom level for this tile overlay.
|
|
18
|
+
*
|
|
19
|
+
* @platform iOS: Supported
|
|
20
|
+
* @platform Android: Supported
|
|
21
|
+
*/
|
|
22
|
+
maximumZ?: WithDefault<Int32, 100>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The minimum zoom level for this tile overlay.
|
|
26
|
+
*
|
|
27
|
+
* @platform iOS: Supported
|
|
28
|
+
* @platform Android: Supported
|
|
29
|
+
*/
|
|
30
|
+
minimumZ?: Int32;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* In offline-mode tiles are not fetched from the tile servers, rather only tiles stored in the cache directory are used.
|
|
34
|
+
* Furthermore, automated tile scaling is activated: if tile at a desired zoom level is not found from the cache directory,
|
|
35
|
+
* then lower zoom level tile is used (up to 4 levels lower) and scaled.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
* @platform iOS: Apple Maps only
|
|
39
|
+
* @platform Android: Supported
|
|
40
|
+
*/
|
|
41
|
+
offlineMode?: boolean;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Corresponds to MKTileOverlay canReplaceMapContent i.e. if true then underlying iOS basemap is not shown.
|
|
45
|
+
*
|
|
46
|
+
* @default false
|
|
47
|
+
* @platform iOS: Apple Maps only
|
|
48
|
+
* @platform Android: Not supported
|
|
49
|
+
*/
|
|
50
|
+
shouldReplaceMapContent?: boolean;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Defines maximum age in seconds for a cached tile before it's refreshed.
|
|
54
|
+
*
|
|
55
|
+
* NB! Refresh logic is "serve-stale-while-refresh"
|
|
56
|
+
* i.e. to ensure map availability a stale (over max age) tile is served
|
|
57
|
+
* while a tile refresh process is started in the background.
|
|
58
|
+
*
|
|
59
|
+
* @platform iOS: Apple Maps only
|
|
60
|
+
* @platform Android: Supported
|
|
61
|
+
*/
|
|
62
|
+
tileCacheMaxAge?: Int32;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Enable caching of tiles in the specified directory.
|
|
66
|
+
* Directory can be specified either as a normal path or in URL format (`file://`).
|
|
67
|
+
*
|
|
68
|
+
* Tiles are stored in tileCachePath directory as `/{z}/{x}/{y}` i.e. in sub-directories 2-levels deep,
|
|
69
|
+
* filename is tile y-coordinate without any filetype-extension.
|
|
70
|
+
*
|
|
71
|
+
* NB! All cache management needs to be implemented by client e.g. deleting tiles to manage use of storage space etc.
|
|
72
|
+
*
|
|
73
|
+
* @platform iOS: Apple Maps only
|
|
74
|
+
* @platform Android: Supported
|
|
75
|
+
*/
|
|
76
|
+
tileCachePath?: string;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Tile size, default size is 256 (for tiles of 256 _ 256 pixels).
|
|
80
|
+
* High-res (aka 'retina') tiles are 512 (tiles of 512 _ 512 pixels)
|
|
81
|
+
*
|
|
82
|
+
* @platform iOS: Supported
|
|
83
|
+
* @platform Android: Supported
|
|
84
|
+
*/
|
|
85
|
+
tileSize?: WithDefault<Int32, 256>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The url template of the map tileserver.
|
|
89
|
+
* (URLTile) The patterns {x} {y} {z} will be replaced at runtime.
|
|
90
|
+
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png.
|
|
91
|
+
*
|
|
92
|
+
* It is also possible to refer to tiles in local filesystem with file:///top-level-directory/sub-directory/{z}/{x}/{y}.png URL-format.
|
|
93
|
+
* (WMSTile) The patterns {minX} {maxX} {minY} {maxY} {width} {height} will be replaced at runtime according to EPSG:900913 specification bounding box.
|
|
94
|
+
* For example, https://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:poi&styles=&bbox={minX},{minY},{maxX},{maxY}&width={width}&height={height}&srs=EPSG:900913&format=image/png&transparent=true&format_options=dpi:213.
|
|
95
|
+
*
|
|
96
|
+
* @platform iOS: Supported
|
|
97
|
+
* @platform Android: Supported
|
|
98
|
+
*/
|
|
99
|
+
urlTemplate: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default codegenNativeComponent<WMSTileFabricNativeProps>(
|
|
103
|
+
'RNMapsWMSTile',
|
|
104
|
+
{
|
|
105
|
+
excludedPlatforms: ['iOS'],
|
|
106
|
+
},
|
|
107
|
+
) as HostComponent<WMSTileFabricNativeProps>;
|