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
package/lib/Geojson.d.ts
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { Feature, FeatureCollection, Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon } from 'geojson';
|
|
3
|
-
import { MapMarkerProps as MarkerProps } from './MapMarker';
|
|
4
|
-
import { MapPolygonProps as PolygonProps } from './MapPolygon';
|
|
5
|
-
import { MapPolylineProps as PolylineProps } from './MapPolyline';
|
|
6
|
-
import { LatLng } from './sharedTypes';
|
|
7
|
-
export type GeojsonProps = {
|
|
8
|
-
/**
|
|
9
|
-
* Sets the anchor point for the marker.
|
|
10
|
-
* The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.
|
|
11
|
-
*
|
|
12
|
-
* The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
|
|
13
|
-
* where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
|
|
14
|
-
*
|
|
15
|
-
* The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding.
|
|
16
|
-
* For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).
|
|
17
|
-
*
|
|
18
|
-
* @default {x: 0.5, y: 1.0}
|
|
19
|
-
* @platform iOS: Google Maps only. For Apple Maps, see the `centerOffset` prop
|
|
20
|
-
* @platform Android: Supported
|
|
21
|
-
*/
|
|
22
|
-
anchor?: MarkerProps['anchor'];
|
|
23
|
-
/**
|
|
24
|
-
* The offset (in points) at which to display the annotation view.
|
|
25
|
-
*
|
|
26
|
-
* By default, the center point of an annotation view is placed at the coordinate point of the associated annotation.
|
|
27
|
-
*
|
|
28
|
-
* Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.
|
|
29
|
-
*
|
|
30
|
-
* @default {x: 0.0, y: 0.0}
|
|
31
|
-
* @platform iOS: Apple Maps only. For Google Maps, see the `anchor` prop
|
|
32
|
-
* @platform Android: Not supported. See see the `anchor` prop
|
|
33
|
-
*/
|
|
34
|
-
centerOffset?: MarkerProps['centerOffset'];
|
|
35
|
-
/**
|
|
36
|
-
* The pincolor used on markers
|
|
37
|
-
*
|
|
38
|
-
* @platform iOS: Supported
|
|
39
|
-
* @platform Android: Supported
|
|
40
|
-
*/
|
|
41
|
-
color?: MarkerProps['pinColor'];
|
|
42
|
-
/**
|
|
43
|
-
* The fill color to use for the path.
|
|
44
|
-
*
|
|
45
|
-
* @platform iOS: Supported
|
|
46
|
-
* @platform Android: Supported
|
|
47
|
-
*/
|
|
48
|
-
fillColor?: PolygonProps['fillColor'];
|
|
49
|
-
/**
|
|
50
|
-
* [Geojson](https://geojson.org/) description of object.
|
|
51
|
-
*
|
|
52
|
-
* @platform iOS: Supported
|
|
53
|
-
* @platform Android: Supported
|
|
54
|
-
*/
|
|
55
|
-
geojson: FeatureCollection;
|
|
56
|
-
/**
|
|
57
|
-
* A custom image to be used as the marker's icon. Only local image resources are allowed to be
|
|
58
|
-
* used.
|
|
59
|
-
*
|
|
60
|
-
* @platform iOS: Supported
|
|
61
|
-
* @platform Android: Supported
|
|
62
|
-
*/
|
|
63
|
-
image?: MarkerProps['image'];
|
|
64
|
-
/**
|
|
65
|
-
* The line cap style to apply to the open ends of the path.
|
|
66
|
-
* The default style is `round`.
|
|
67
|
-
*
|
|
68
|
-
* @platform iOS: Apple Maps only
|
|
69
|
-
* @platform Android: Supported
|
|
70
|
-
*/
|
|
71
|
-
lineCap?: PolylineProps['lineCap'];
|
|
72
|
-
/**
|
|
73
|
-
* An array of numbers specifying the dash pattern to use for the path.
|
|
74
|
-
*
|
|
75
|
-
* The array contains one or more numbers that indicate the lengths (measured in points) of the
|
|
76
|
-
* line segments and gaps in the pattern. The values in the array alternate, starting with the
|
|
77
|
-
* first line segment length, followed by the first gap length, followed by the second line
|
|
78
|
-
* segment length, and so on.
|
|
79
|
-
*
|
|
80
|
-
* This property is set to `null` by default, which indicates no line dash pattern.
|
|
81
|
-
*
|
|
82
|
-
* @platform iOS: Supported
|
|
83
|
-
* @platform Android: Supported
|
|
84
|
-
*/
|
|
85
|
-
lineDashPattern?: PolygonProps['lineDashPattern'] | PolylineProps['lineDashPattern'];
|
|
86
|
-
/**
|
|
87
|
-
* The offset (in points) at which to start drawing the dash pattern.
|
|
88
|
-
*
|
|
89
|
-
* Use this property to start drawing a dashed line partway through a segment or gap. For
|
|
90
|
-
* example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the
|
|
91
|
-
* middle of the first gap.
|
|
92
|
-
*
|
|
93
|
-
* The default value of this property is 0.
|
|
94
|
-
*
|
|
95
|
-
* @platform iOS: Apple Maps only
|
|
96
|
-
* @platform Android: Not supported
|
|
97
|
-
*/
|
|
98
|
-
lineDashPhase?: PolylineProps['lineDashPhase'];
|
|
99
|
-
/**
|
|
100
|
-
* The line join style to apply to corners of the path.
|
|
101
|
-
* The default style is `round`.
|
|
102
|
-
*
|
|
103
|
-
* @platform iOS: Apple Maps only
|
|
104
|
-
* @platform Android: Not supported
|
|
105
|
-
*/
|
|
106
|
-
lineJoin?: PolylineProps['lineJoin'];
|
|
107
|
-
/**
|
|
108
|
-
* Component to render in place of the default marker when the overlay type is a `point`
|
|
109
|
-
*
|
|
110
|
-
* @platform iOS: Supported
|
|
111
|
-
* @platform Android: Supported
|
|
112
|
-
*/
|
|
113
|
-
markerComponent?: MarkerProps['children'];
|
|
114
|
-
/**
|
|
115
|
-
* The limiting value that helps avoid spikes at junctions between connected line segments.
|
|
116
|
-
* The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If
|
|
117
|
-
* the ratio of the miter length—that is, the diagonal length of the miter join—to the line
|
|
118
|
-
* thickness exceeds the miter limit, the joint is converted to a bevel join. The default
|
|
119
|
-
* miter limit is 10, which results in the conversion of miters whose angle at the joint
|
|
120
|
-
* is less than 11 degrees.
|
|
121
|
-
*
|
|
122
|
-
* @platform iOS: Apple Maps only
|
|
123
|
-
* @platform Android: Not supported
|
|
124
|
-
*/
|
|
125
|
-
miterLimit?: PolylineProps['miterLimit'];
|
|
126
|
-
/**
|
|
127
|
-
* Callback that is called when the user presses any of the overlays
|
|
128
|
-
*/
|
|
129
|
-
onPress?: (event: OverlayPressEvent) => void;
|
|
130
|
-
/**
|
|
131
|
-
* The stroke color to use for the path.
|
|
132
|
-
*
|
|
133
|
-
* @platform — iOS: Supported
|
|
134
|
-
* @platform — Android: Supported
|
|
135
|
-
*/
|
|
136
|
-
strokeColor?: PolygonProps['strokeColor'] | PolylineProps['strokeColor'];
|
|
137
|
-
/**
|
|
138
|
-
* The stroke width to use for the path.
|
|
139
|
-
*
|
|
140
|
-
* @platform — iOS: Supported
|
|
141
|
-
* @platform — Android: Supported
|
|
142
|
-
*/
|
|
143
|
-
strokeWidth?: PolygonProps['strokeWidth'] | PolylineProps['strokeWidth'];
|
|
144
|
-
/**
|
|
145
|
-
* Make the `Polygon` or `Polyline` tappable
|
|
146
|
-
*
|
|
147
|
-
* @platform — iOS: Google Maps only
|
|
148
|
-
* @platform — Android: Supported
|
|
149
|
-
*/
|
|
150
|
-
tappable?: PolygonProps['tappable'] | PolylineProps['tappable'];
|
|
151
|
-
/**
|
|
152
|
-
* The title of the marker. This is only used if the <Marker /> component has no children that
|
|
153
|
-
* are a `<Callout />`, in which case the default callout behavior will be used, which
|
|
154
|
-
* will show both the `title` and the `description`, if provided.
|
|
155
|
-
*
|
|
156
|
-
* @platform — iOS: Supported
|
|
157
|
-
* @platform — Android: Supported
|
|
158
|
-
*/
|
|
159
|
-
title?: MarkerProps['title'];
|
|
160
|
-
/**
|
|
161
|
-
* Sets whether this marker should track view changes.
|
|
162
|
-
* It's recommended to turn it off whenever it's possible to improve custom marker performance.
|
|
163
|
-
* This is the default value for all point markers in your geojson data. It can be overriden
|
|
164
|
-
* on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point.
|
|
165
|
-
*
|
|
166
|
-
* @default true
|
|
167
|
-
* @platform iOS: Google Maps only
|
|
168
|
-
* @platform Android: Supported
|
|
169
|
-
*/
|
|
170
|
-
tracksViewChanges?: boolean;
|
|
171
|
-
/**
|
|
172
|
-
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
|
|
173
|
-
* with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
|
|
174
|
-
* with the same z-index is arbitrary. The default zIndex is 0.
|
|
175
|
-
*
|
|
176
|
-
* @platform iOS: Apple Maps: [Marker], Google Maps: [Marker, Polygon, Polyline]
|
|
177
|
-
* @platform Android: Supported
|
|
178
|
-
*/
|
|
179
|
-
zIndex?: MarkerProps['zIndex'] | PolygonProps['zIndex'] | PolylineProps['zIndex'];
|
|
180
|
-
};
|
|
181
|
-
declare const Geojson: (props: GeojsonProps) => React.JSX.Element;
|
|
182
|
-
export default Geojson;
|
|
183
|
-
type OverlayPressEvent = {
|
|
184
|
-
type: AnyPointOverlay['type'] | AnyLineStringOverlay['type'] | AnyPolygonOverlay['type'];
|
|
185
|
-
feature: AnyPointOverlay['feature'] | AnyLineStringOverlay['feature'] | AnyPolygonOverlay['feature'];
|
|
186
|
-
coordinates: AnyPointOverlay['coordinates'] | AnyLineStringOverlay['coordinates'] | AnyPolygonOverlay['coordinates'];
|
|
187
|
-
holes?: AnyPolygonOverlay['holes'];
|
|
188
|
-
};
|
|
189
|
-
type AnyPointOverlay = {
|
|
190
|
-
type: 'point';
|
|
191
|
-
feature: Feature<Point | MultiPoint>;
|
|
192
|
-
coordinates: LatLng;
|
|
193
|
-
};
|
|
194
|
-
type AnyLineStringOverlay = {
|
|
195
|
-
type: 'polyline';
|
|
196
|
-
feature: Feature<LineString | MultiLineString>;
|
|
197
|
-
coordinates: LatLng[];
|
|
198
|
-
};
|
|
199
|
-
type AnyPolygonOverlay = {
|
|
200
|
-
type: 'polygon';
|
|
201
|
-
feature: Feature<Polygon | MultiPolygon>;
|
|
202
|
-
coordinates: LatLng[];
|
|
203
|
-
holes?: LatLng[][];
|
|
204
|
-
};
|
package/lib/Geojson.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const React = __importStar(require("react"));
|
|
30
|
-
const MapMarker_1 = __importDefault(require("./MapMarker"));
|
|
31
|
-
const MapPolyline_1 = __importDefault(require("./MapPolyline"));
|
|
32
|
-
const MapPolygon_1 = __importDefault(require("./MapPolygon"));
|
|
33
|
-
const Geojson = (props) => {
|
|
34
|
-
const { anchor, centerOffset, geojson, strokeColor, fillColor, strokeWidth, color, title, image, zIndex, onPress, lineCap, lineJoin, tappable, tracksViewChanges, miterLimit, lineDashPhase, lineDashPattern, markerComponent, } = props;
|
|
35
|
-
const pointOverlays = makePointOverlays(geojson.features);
|
|
36
|
-
const lineOverlays = makeLineOverlays(geojson.features);
|
|
37
|
-
const polygonOverlays = makePolygonOverlays(geojson.features);
|
|
38
|
-
return (<React.Fragment>
|
|
39
|
-
{pointOverlays.map((overlay, index) => {
|
|
40
|
-
const markerColor = getColor(color, overlay, 'marker-color');
|
|
41
|
-
const pointOverlayTracksViewChanges = overlay.feature.properties?.tracksViewChanges || tracksViewChanges;
|
|
42
|
-
return (<MapMarker_1.default key={index} coordinate={overlay.coordinates} tracksViewChanges={pointOverlayTracksViewChanges} image={image} title={title} pinColor={markerColor} zIndex={zIndex} anchor={anchor} centerOffset={centerOffset} onPress={() => onPress && onPress(overlay)}>
|
|
43
|
-
{markerComponent}
|
|
44
|
-
</MapMarker_1.default>);
|
|
45
|
-
})}
|
|
46
|
-
{lineOverlays.map((overlay, index) => {
|
|
47
|
-
const lineStrokeColor = getColor(strokeColor, overlay, 'stroke');
|
|
48
|
-
const lineStrokeWidth = getStrokeWidth(strokeWidth, overlay);
|
|
49
|
-
return (<MapPolyline_1.default key={index} coordinates={overlay.coordinates} strokeColor={lineStrokeColor} strokeWidth={lineStrokeWidth} lineDashPhase={lineDashPhase} lineDashPattern={lineDashPattern} lineCap={lineCap} lineJoin={lineJoin} miterLimit={miterLimit} zIndex={zIndex} tappable={tappable} onPress={() => onPress && onPress(overlay)}/>);
|
|
50
|
-
})}
|
|
51
|
-
{polygonOverlays.map((overlay, index) => {
|
|
52
|
-
const polygonFillColor = getColor(fillColor, overlay, 'fill');
|
|
53
|
-
const lineStrokeColor = getColor(strokeColor, overlay, 'stroke');
|
|
54
|
-
const lineStrokeWidth = getStrokeWidth(strokeWidth, overlay);
|
|
55
|
-
return (<MapPolygon_1.default key={index} coordinates={overlay.coordinates} holes={overlay.holes} strokeColor={lineStrokeColor} fillColor={polygonFillColor} strokeWidth={lineStrokeWidth} lineDashPhase={lineDashPhase} lineDashPattern={lineDashPattern} lineCap={lineCap} lineJoin={lineJoin} miterLimit={miterLimit} tappable={tappable} onPress={() => onPress && onPress(overlay)} zIndex={zIndex}/>);
|
|
56
|
-
})}
|
|
57
|
-
</React.Fragment>);
|
|
58
|
-
};
|
|
59
|
-
exports.default = Geojson;
|
|
60
|
-
const makePointOverlays = (features) => {
|
|
61
|
-
return features
|
|
62
|
-
.filter(isAnyPointFeature)
|
|
63
|
-
.map(feature => makeCoordinatesForAnyPoint(feature.geometry).map(coordinates => makeOverlayForAnyPoint(coordinates, feature)))
|
|
64
|
-
.reduce((prev, curr) => prev.concat(curr), [])
|
|
65
|
-
.map(overlay => ({ ...overlay, type: 'point' }));
|
|
66
|
-
};
|
|
67
|
-
const makeLineOverlays = (features) => {
|
|
68
|
-
return features
|
|
69
|
-
.filter(isAnyLineStringFeature)
|
|
70
|
-
.map(feature => makeCoordinatesForAnyLine(feature.geometry).map(coordinates => makeOverlayForAnyLine(coordinates, feature)))
|
|
71
|
-
.reduce((prev, curr) => prev.concat(curr), [])
|
|
72
|
-
.map(overlay => ({ ...overlay, type: 'polyline' }));
|
|
73
|
-
};
|
|
74
|
-
const makePolygonOverlays = (features) => {
|
|
75
|
-
const multipolygons = features
|
|
76
|
-
.filter(isMultiPolygonFeature)
|
|
77
|
-
.map(feature => makeCoordinatesForMultiPolygon(feature.geometry).map(coordinates => makeOverlayForAnyPolygon(coordinates, feature)))
|
|
78
|
-
.reduce((prev, curr) => prev.concat(curr), [])
|
|
79
|
-
.map(overlay => ({ ...overlay, type: 'polygon' }));
|
|
80
|
-
const polygons = features
|
|
81
|
-
.filter(isPolygonFeature)
|
|
82
|
-
.map(feature => makeOverlayForAnyPolygon(makeCoordinatesForPolygon(feature.geometry), feature))
|
|
83
|
-
.reduce((prev, curr) => prev.concat(curr), [])
|
|
84
|
-
.map(overlay => ({ ...overlay, type: 'polygon' }));
|
|
85
|
-
return polygons.concat(multipolygons);
|
|
86
|
-
};
|
|
87
|
-
const makeOverlayForAnyPoint = (coordinates, feature) => {
|
|
88
|
-
return { feature, coordinates };
|
|
89
|
-
};
|
|
90
|
-
const makeOverlayForAnyLine = (coordinates, feature) => {
|
|
91
|
-
return { feature, coordinates };
|
|
92
|
-
};
|
|
93
|
-
const makeOverlayForAnyPolygon = (coordinates, feature) => {
|
|
94
|
-
return {
|
|
95
|
-
feature,
|
|
96
|
-
coordinates: coordinates[0],
|
|
97
|
-
holes: coordinates.length > 1 ? coordinates.slice(1) : undefined,
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
const makePoint = (c) => ({
|
|
101
|
-
latitude: c[1],
|
|
102
|
-
longitude: c[0],
|
|
103
|
-
});
|
|
104
|
-
const makeLine = (l) => l.map(makePoint);
|
|
105
|
-
const makeCoordinatesForAnyPoint = (geometry) => {
|
|
106
|
-
if (geometry.type === 'Point') {
|
|
107
|
-
return [makePoint(geometry.coordinates)];
|
|
108
|
-
}
|
|
109
|
-
return geometry.coordinates.map(makePoint);
|
|
110
|
-
};
|
|
111
|
-
const makeCoordinatesForAnyLine = (geometry) => {
|
|
112
|
-
if (geometry.type === 'LineString') {
|
|
113
|
-
return [makeLine(geometry.coordinates)];
|
|
114
|
-
}
|
|
115
|
-
return geometry.coordinates.map(makeLine);
|
|
116
|
-
};
|
|
117
|
-
const makeCoordinatesForPolygon = (geometry) => {
|
|
118
|
-
return geometry.coordinates.map(makeLine);
|
|
119
|
-
};
|
|
120
|
-
const makeCoordinatesForMultiPolygon = (geometry) => {
|
|
121
|
-
return geometry.coordinates.map(p => p.map(makeLine));
|
|
122
|
-
};
|
|
123
|
-
const getRgbaFromHex = (hex, alpha = 1) => {
|
|
124
|
-
const matchArray = hex.match(/\w\w/g);
|
|
125
|
-
if (!matchArray || matchArray.length < 3) {
|
|
126
|
-
throw new Error('Invalid hex string');
|
|
127
|
-
}
|
|
128
|
-
const [r, g, b] = matchArray.map(x => {
|
|
129
|
-
const subColor = parseInt(x, 16);
|
|
130
|
-
if (Number.isNaN(subColor)) {
|
|
131
|
-
throw new Error('Invalid hex string');
|
|
132
|
-
}
|
|
133
|
-
return subColor;
|
|
134
|
-
});
|
|
135
|
-
return `rgba(${r},${g},${b},${alpha})`;
|
|
136
|
-
};
|
|
137
|
-
const getColor = (prop, overlay, colorType) => {
|
|
138
|
-
if (prop) {
|
|
139
|
-
return prop;
|
|
140
|
-
}
|
|
141
|
-
let color = overlay.feature.properties?.[colorType];
|
|
142
|
-
if (color) {
|
|
143
|
-
const opacityProperty = colorType + '-opacity';
|
|
144
|
-
const alpha = overlay.feature.properties?.[opacityProperty];
|
|
145
|
-
if (alpha && alpha !== '0' && color[0] === '#') {
|
|
146
|
-
color = getRgbaFromHex(color, alpha);
|
|
147
|
-
}
|
|
148
|
-
return color;
|
|
149
|
-
}
|
|
150
|
-
return undefined;
|
|
151
|
-
};
|
|
152
|
-
const getStrokeWidth = (prop, overlay) => {
|
|
153
|
-
if (prop) {
|
|
154
|
-
return prop;
|
|
155
|
-
}
|
|
156
|
-
return overlay.feature.properties?.['stroke-width'];
|
|
157
|
-
};
|
|
158
|
-
// GeoJSON.Feature type-guards
|
|
159
|
-
const isPointFeature = (feature) => feature.geometry.type === 'Point';
|
|
160
|
-
const isMultiPointFeature = (feature) => feature.geometry.type === 'MultiPoint';
|
|
161
|
-
const isAnyPointFeature = (feature) => isPointFeature(feature) || isMultiPointFeature(feature);
|
|
162
|
-
const isLineStringFeature = (feature) => feature.geometry.type === 'LineString';
|
|
163
|
-
const isMultiLineStringFeature = (feature) => feature.geometry.type === 'MultiLineString';
|
|
164
|
-
const isAnyLineStringFeature = (feature) => isLineStringFeature(feature) || isMultiLineStringFeature(feature);
|
|
165
|
-
const isPolygonFeature = (feature) => feature.geometry.type === 'Polygon';
|
|
166
|
-
const isMultiPolygonFeature = (feature) => feature.geometry.type === 'MultiPolygon';
|
package/lib/MapCallout.d.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ViewProps } from 'react-native';
|
|
3
|
-
import { MapManagerCommand, NativeComponent, ProviderContext, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
import { CalloutPressEvent } from './sharedTypes';
|
|
5
|
-
export type MapCalloutProps = ViewProps & {
|
|
6
|
-
/**
|
|
7
|
-
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
8
|
-
*
|
|
9
|
-
* @default false
|
|
10
|
-
* @platform iOS: Supported
|
|
11
|
-
* @platform Android: Not supported
|
|
12
|
-
*/
|
|
13
|
-
alphaHitTest?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* Callback that is called when the user presses on the callout
|
|
16
|
-
*
|
|
17
|
-
* @platform iOS: Apple Maps only
|
|
18
|
-
* @platform Android: Supported
|
|
19
|
-
*/
|
|
20
|
-
onPress?: (event: CalloutPressEvent) => void;
|
|
21
|
-
/**
|
|
22
|
-
* If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
|
|
23
|
-
* If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
|
|
24
|
-
*
|
|
25
|
-
* @default false
|
|
26
|
-
* @platform iOS: Supported
|
|
27
|
-
* @platform Android: Supported
|
|
28
|
-
*/
|
|
29
|
-
tooltip?: boolean;
|
|
30
|
-
};
|
|
31
|
-
type NativeProps = MapCalloutProps;
|
|
32
|
-
export declare class MapCallout extends React.Component<MapCalloutProps> {
|
|
33
|
-
context: React.ContextType<typeof ProviderContext>;
|
|
34
|
-
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
35
|
-
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
36
|
-
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
37
|
-
render(): React.JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
declare const _default: typeof MapCallout;
|
|
40
|
-
export default _default;
|
package/lib/MapCallout.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MapCallout = void 0;
|
|
27
|
-
const React = __importStar(require("react"));
|
|
28
|
-
const react_native_1 = require("react-native");
|
|
29
|
-
const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
|
|
30
|
-
class MapCallout extends React.Component {
|
|
31
|
-
getNativeComponent;
|
|
32
|
-
getMapManagerCommand;
|
|
33
|
-
getUIManagerCommand;
|
|
34
|
-
render() {
|
|
35
|
-
const { tooltip = false, alphaHitTest = false } = this.props;
|
|
36
|
-
const AIRMapCallout = this.getNativeComponent();
|
|
37
|
-
return (<AIRMapCallout {...this.props} tooltip={tooltip} alphaHitTest={alphaHitTest} style={[styles.callout, this.props.style]}/>);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.MapCallout = MapCallout;
|
|
41
|
-
const styles = react_native_1.StyleSheet.create({
|
|
42
|
-
callout: {
|
|
43
|
-
position: 'absolute',
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
exports.default = (0, decorateMapComponent_1.default)(MapCallout, 'Callout', {
|
|
47
|
-
google: {
|
|
48
|
-
ios: decorateMapComponent_1.SUPPORTED,
|
|
49
|
-
android: decorateMapComponent_1.USES_DEFAULT_IMPLEMENTATION,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
3
|
-
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
import { Frame, Point } from './sharedTypes';
|
|
5
|
-
export type MapCalloutSubviewProps = ViewProps & {
|
|
6
|
-
/**
|
|
7
|
-
* Callback that is called when the user presses on this subview inside callout
|
|
8
|
-
*
|
|
9
|
-
* @platform iOS: Supported
|
|
10
|
-
* @platform Android: Not supported
|
|
11
|
-
*/
|
|
12
|
-
onPress?: (event: CalloutSubviewPressEvent) => void;
|
|
13
|
-
};
|
|
14
|
-
type NativeProps = MapCalloutSubviewProps;
|
|
15
|
-
export declare class MapCalloutSubview extends React.Component<MapCalloutSubviewProps> {
|
|
16
|
-
context: React.ContextType<typeof ProviderContext>;
|
|
17
|
-
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
18
|
-
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
19
|
-
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
20
|
-
render(): React.JSX.Element;
|
|
21
|
-
}
|
|
22
|
-
declare const _default: typeof MapCalloutSubview;
|
|
23
|
-
export default _default;
|
|
24
|
-
type CalloutSubviewPressEvent = NativeSyntheticEvent<{
|
|
25
|
-
/**
|
|
26
|
-
* Apple Maps: `callout-inside-press`
|
|
27
|
-
*
|
|
28
|
-
* Google Maps: `marker-inside-overlay-press`
|
|
29
|
-
*/
|
|
30
|
-
action: 'callout-inside-press' | 'marker-inside-overlay-press';
|
|
31
|
-
frame: Frame;
|
|
32
|
-
id: string;
|
|
33
|
-
point: Point;
|
|
34
|
-
}>;
|
package/lib/MapCalloutSubview.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.MapCalloutSubview = void 0;
|
|
27
|
-
const React = __importStar(require("react"));
|
|
28
|
-
const react_native_1 = require("react-native");
|
|
29
|
-
const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
|
|
30
|
-
class MapCalloutSubview extends React.Component {
|
|
31
|
-
getNativeComponent;
|
|
32
|
-
getMapManagerCommand;
|
|
33
|
-
getUIManagerCommand;
|
|
34
|
-
render() {
|
|
35
|
-
const AIRMapCalloutSubview = this.getNativeComponent();
|
|
36
|
-
return (<AIRMapCalloutSubview {...this.props} style={[styles.calloutSubview, this.props.style]}/>);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.MapCalloutSubview = MapCalloutSubview;
|
|
40
|
-
const styles = react_native_1.StyleSheet.create({
|
|
41
|
-
calloutSubview: {},
|
|
42
|
-
});
|
|
43
|
-
exports.default = (0, decorateMapComponent_1.default)(MapCalloutSubview, 'CalloutSubview', {
|
|
44
|
-
google: {
|
|
45
|
-
ios: decorateMapComponent_1.SUPPORTED,
|
|
46
|
-
android: decorateMapComponent_1.NOT_SUPPORTED,
|
|
47
|
-
},
|
|
48
|
-
});
|
package/lib/MapCircle.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { View, ViewProps } from 'react-native';
|
|
3
|
-
import { ProviderContext, NativeComponent, MapManagerCommand, UIManagerCommand } from './decorateMapComponent';
|
|
4
|
-
import { LatLng, LineCapType, LineJoinType } from './sharedTypes';
|
|
5
|
-
export type MapCircleProps = ViewProps & {
|
|
6
|
-
/**
|
|
7
|
-
* The coordinates of the center of the circle.
|
|
8
|
-
*
|
|
9
|
-
* @platform iOS: Supported
|
|
10
|
-
* @platform Android: Supported
|
|
11
|
-
*/
|
|
12
|
-
center: LatLng;
|
|
13
|
-
/**
|
|
14
|
-
* The fill color to use for the path.
|
|
15
|
-
*
|
|
16
|
-
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
17
|
-
* @platform iOS: Supported
|
|
18
|
-
* @platform Android: Supported
|
|
19
|
-
*/
|
|
20
|
-
fillColor?: string;
|
|
21
|
-
/**
|
|
22
|
-
* The line cap style to apply to the open ends of the path
|
|
23
|
-
*
|
|
24
|
-
* @default `round`
|
|
25
|
-
* @platform iOS: Apple Maps only
|
|
26
|
-
* @platform Android: Not supported
|
|
27
|
-
*/
|
|
28
|
-
lineCap?: LineCapType;
|
|
29
|
-
/**
|
|
30
|
-
* An array of numbers specifying the dash pattern to use for the path.
|
|
31
|
-
* The array contains one or more numbers that indicate the lengths (measured in points)
|
|
32
|
-
* of the line segments and gaps in the pattern.
|
|
33
|
-
* The values in the array alternate, starting with the first line segment length,
|
|
34
|
-
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
35
|
-
*
|
|
36
|
-
* @platform iOS: Apple Maps only
|
|
37
|
-
* @platform Android: Not supported
|
|
38
|
-
*/
|
|
39
|
-
lineDashPattern?: number[];
|
|
40
|
-
/**
|
|
41
|
-
* The offset (in points) at which to start drawing the dash pattern.
|
|
42
|
-
* Use this property to start drawing a dashed line partway through a segment or gap.
|
|
43
|
-
* For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap.
|
|
44
|
-
*
|
|
45
|
-
* @default 0
|
|
46
|
-
* @platform iOS: Apple Maps only
|
|
47
|
-
* @platform Android: Not supported
|
|
48
|
-
*/
|
|
49
|
-
lineDashPhase?: number;
|
|
50
|
-
/**
|
|
51
|
-
* The line join style to apply to corners of the path.
|
|
52
|
-
*
|
|
53
|
-
* @platform iOS: Apple Maps only
|
|
54
|
-
* @platform Android: Not supported
|
|
55
|
-
*/
|
|
56
|
-
lineJoin?: LineJoinType;
|
|
57
|
-
/**
|
|
58
|
-
* The limiting value that helps avoid spikes at junctions between connected line segments.
|
|
59
|
-
* The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style.
|
|
60
|
-
* If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit,
|
|
61
|
-
* the joint is converted to a bevel join.
|
|
62
|
-
* The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees.
|
|
63
|
-
*
|
|
64
|
-
* @default 10
|
|
65
|
-
* @platform iOS: Apple Maps only
|
|
66
|
-
* @platform Android: Not supported
|
|
67
|
-
*/
|
|
68
|
-
miterLimit?: number;
|
|
69
|
-
/**
|
|
70
|
-
* The radius of the circle to be drawn (in meters)
|
|
71
|
-
*
|
|
72
|
-
* @platform iOS: Supported
|
|
73
|
-
* @platform Android: Supported
|
|
74
|
-
*/
|
|
75
|
-
radius: number;
|
|
76
|
-
/**
|
|
77
|
-
* The stroke color to use for the path.
|
|
78
|
-
*
|
|
79
|
-
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
80
|
-
* @platform iOS: Supported
|
|
81
|
-
* @platform Android: Supported
|
|
82
|
-
*/
|
|
83
|
-
strokeColor?: string;
|
|
84
|
-
/**
|
|
85
|
-
* The stroke width to use for the path.
|
|
86
|
-
*
|
|
87
|
-
* @default 1
|
|
88
|
-
* @platform iOS: Supported
|
|
89
|
-
* @platform Android: Supported
|
|
90
|
-
*/
|
|
91
|
-
strokeWidth?: number;
|
|
92
|
-
/**
|
|
93
|
-
* The order in which this tile overlay is drawn with respect to other overlays.
|
|
94
|
-
* An overlay with a larger z-index is drawn over overlays with smaller z-indices.
|
|
95
|
-
* The order of overlays with the same z-index is arbitrary.
|
|
96
|
-
*
|
|
97
|
-
* @default 0
|
|
98
|
-
* @platform iOS: Google Maps only
|
|
99
|
-
* @platform Android: Supported
|
|
100
|
-
*/
|
|
101
|
-
zIndex?: number;
|
|
102
|
-
};
|
|
103
|
-
type NativeProps = MapCircleProps & {
|
|
104
|
-
ref: React.RefObject<View | null>;
|
|
105
|
-
};
|
|
106
|
-
export declare class MapCircle extends React.Component<MapCircleProps> {
|
|
107
|
-
context: React.ContextType<typeof ProviderContext>;
|
|
108
|
-
getNativeComponent: () => NativeComponent<NativeProps>;
|
|
109
|
-
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
110
|
-
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
111
|
-
private circle;
|
|
112
|
-
constructor(props: MapCircleProps);
|
|
113
|
-
setNativeProps(props: Partial<NativeProps>): void;
|
|
114
|
-
render(): React.JSX.Element;
|
|
115
|
-
}
|
|
116
|
-
declare const _default: typeof MapCircle;
|
|
117
|
-
export default _default;
|