react-native-maps 1.26.11 → 1.26.13

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.
Files changed (45) hide show
  1. package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +1 -1
  2. package/android/src/main/java/com/rnmaps/maps/MapView.java +2 -4
  3. package/dist/plugin/src/android.d.ts +4 -0
  4. package/dist/plugin/src/index.d.ts +4 -0
  5. package/dist/plugin/src/ios.d.ts +15 -0
  6. package/dist/plugin/src/types.d.ts +4 -0
  7. package/dist/src/AnimatedRegion.d.ts +19 -0
  8. package/dist/src/Geojson.d.ts +204 -0
  9. package/dist/src/MapCallout.d.ts +40 -0
  10. package/dist/src/MapCalloutSubview.d.ts +34 -0
  11. package/dist/src/MapCircle.d.ts +117 -0
  12. package/dist/src/MapHeatmap.d.ts +78 -0
  13. package/dist/src/MapLocalTile.d.ts +35 -0
  14. package/dist/src/MapMarker.d.ts +322 -0
  15. package/dist/src/MapMarkerNativeComponent.d.ts +14 -0
  16. package/dist/src/MapOverlay.d.ts +88 -0
  17. package/dist/src/MapPolygon.d.ts +140 -0
  18. package/dist/src/MapPolygon.types.d.ts +18 -0
  19. package/dist/src/MapPolyline.d.ts +156 -0
  20. package/dist/src/MapUrlTile.d.ts +134 -0
  21. package/dist/src/MapView.d.ts +723 -0
  22. package/dist/src/MapView.types.d.ts +160 -0
  23. package/dist/src/MapView.web.d.ts +1 -0
  24. package/dist/src/MapViewNativeComponent.d.ts +17 -0
  25. package/dist/src/MapWMSTile.d.ts +116 -0
  26. package/dist/src/ProviderConstants.d.ts +2 -0
  27. package/dist/src/createFabricMap.d.ts +25 -0
  28. package/dist/src/decorateMapComponent.d.ts +35 -0
  29. package/dist/src/fixImageProp.d.ts +4 -0
  30. package/dist/src/index.d.ts +38 -0
  31. package/dist/src/sharedTypes.d.ts +87 -0
  32. package/dist/src/sharedTypesInternal.d.ts +1 -0
  33. package/dist/src/specs/NativeAirMapsModule.d.ts +31 -0
  34. package/dist/src/specs/NativeComponentCallout.d.ts +46 -0
  35. package/dist/src/specs/NativeComponentCircle.d.ts +74 -0
  36. package/dist/src/specs/NativeComponentGoogleMapView.d.ts +709 -0
  37. package/dist/src/specs/NativeComponentGooglePolygon.d.ts +83 -0
  38. package/dist/src/specs/NativeComponentMapView.d.ts +897 -0
  39. package/dist/src/specs/NativeComponentMarker.d.ts +278 -0
  40. package/dist/src/specs/NativeComponentOverlay.d.ts +76 -0
  41. package/dist/src/specs/NativeComponentPolyline.d.ts +101 -0
  42. package/dist/src/specs/NativeComponentUrlTile.d.ts +109 -0
  43. package/dist/src/specs/NativeComponentWMSTile.d.ts +91 -0
  44. package/dist/tsconfig.build.tsbuildinfo +1 -0
  45. package/package.json +4 -1
@@ -0,0 +1,156 @@
1
+ import * as React from 'react';
2
+ import { View, type NativeSyntheticEvent, type ViewProps } from 'react-native';
3
+ import { ProviderContext, type NativeComponent, type MapManagerCommand, type UIManagerCommand } from './decorateMapComponent';
4
+ import type { LatLng, LineCapType, LineJoinType, Point } from './sharedTypes';
5
+ export type MapPolylineProps = ViewProps & {
6
+ /**
7
+ * An array of coordinates to describe the polyline
8
+ *
9
+ * @platform iOS: Supported
10
+ * @platform Android: Supported
11
+ */
12
+ coordinates: LatLng[];
13
+ /**
14
+ * The fill color to use for the path.
15
+ *
16
+ * @default `#000`, `rgba(r,g,b,0.5)`
17
+ * @platform iOS: Apple Maps only
18
+ * @platform Android: Not supported
19
+ */
20
+ fillColor?: string;
21
+ /**
22
+ * Boolean to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection.
23
+ * A geodesic is the shortest path between two points on the Earth's surface.
24
+ * The geodesic curve is constructed assuming the Earth is a sphere.
25
+ *
26
+ * @platform iOS: Google Maps only
27
+ * @platform Android: Supported
28
+ */
29
+ geodesic?: boolean;
30
+ /**
31
+ * The line cap style to apply to the open ends of the path
32
+ *
33
+ * @default `round`
34
+ * @platform iOS: Apple Maps only
35
+ * @platform Android: supported
36
+ * */
37
+ lineCap?: LineCapType;
38
+ /**
39
+ * An array of numbers specifying the dash pattern to use for the path.
40
+ * The array contains one or more numbers that indicate the lengths (measured in points)
41
+ * of the line segments and gaps in the pattern.
42
+ * The values in the array alternate, starting with the first line segment length,
43
+ * followed by the first gap length, followed by the second line segment length, and so on.
44
+ *
45
+ * @platform iOS: Apple Maps only
46
+ * @platform Android: supported
47
+ */
48
+ lineDashPattern?: number[];
49
+ /**
50
+ * The offset (in points) at which to start drawing the dash pattern.
51
+ * Use this property to start drawing a dashed line partway through a segment or gap.
52
+ * 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.
53
+ *
54
+ * @default 0
55
+ * @platform iOS: Apple Maps only
56
+ * @platform Android: Not supported
57
+ */
58
+ lineDashPhase?: number;
59
+ /**
60
+ * The line join style to apply to corners of the path.
61
+ *
62
+ * @platform iOS: Apple Maps only
63
+ * @platform Android: supported
64
+ */
65
+ lineJoin?: LineJoinType;
66
+ /**
67
+ * The limiting value that helps avoid spikes at junctions between connected line segments.
68
+ * The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style.
69
+ * If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit,
70
+ * the joint is converted to a bevel join.
71
+ * The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees.
72
+ *
73
+ * @default 10
74
+ * @platform iOS: Apple Maps only
75
+ * @platform Android: Not supported
76
+ */
77
+ miterLimit?: number;
78
+ /**
79
+ * Callback that is called when the user presses on the polyline
80
+ *
81
+ * @platform iOS: Supported
82
+ * @platform Android: Supported
83
+ */
84
+ onPress?: (event: PolylinePressEvent) => void;
85
+ /**
86
+ * The stroke color to use for the path.
87
+ *
88
+ * @default `#000`, `rgba(r,g,b,0.5)`
89
+ * @platform iOS: Supported
90
+ * @platform Android: Supported
91
+ */
92
+ strokeColor?: string;
93
+ /**
94
+ * The stroke colors to use for the path.
95
+ *
96
+ * Must be the same length as `coordinates`
97
+ *
98
+ * @platform iOS: Supported
99
+ * @platform Android: Supported
100
+ */
101
+ strokeColors?: string[];
102
+ /**
103
+ * The stroke width to use for the path.
104
+ *
105
+ * @default 1
106
+ * @platform iOS: Supported
107
+ * @platform Android: Supported
108
+ */
109
+ strokeWidth?: number;
110
+ /**
111
+ * Boolean to allow the polyline to be tappable and use the onPress function.
112
+ *
113
+ * @platform iOS: Google Maps only
114
+ * @platform Android: Supported
115
+ */
116
+ tappable?: boolean;
117
+ /**
118
+ * The order in which this tile overlay is drawn with respect to other overlays.
119
+ * An overlay with a larger z-index is drawn over overlays with smaller z-indices.
120
+ * The order of overlays with the same z-index is arbitrary.
121
+ *
122
+ * @platform iOS: Google Maps only
123
+ * @platform Android: Supported
124
+ */
125
+ zIndex?: number;
126
+ };
127
+ type NativeProps = MapPolylineProps & {
128
+ ref: React.RefObject<View | null>;
129
+ };
130
+ export declare class MapPolyline extends React.Component<MapPolylineProps> {
131
+ context: React.ContextType<typeof ProviderContext>;
132
+ getNativeComponent: () => NativeComponent<NativeProps>;
133
+ getMapManagerCommand: (name: string) => MapManagerCommand;
134
+ getUIManagerCommand: (name: string) => UIManagerCommand;
135
+ private polyline;
136
+ constructor(props: MapPolylineProps);
137
+ setNativeProps(props: Partial<NativeProps>): void;
138
+ render(): React.JSX.Element;
139
+ }
140
+ declare const _default: typeof MapPolyline;
141
+ export default _default;
142
+ export type PolylinePressEvent = NativeSyntheticEvent<{
143
+ action: 'polyline-press';
144
+ /**
145
+ * @platform iOS: Google Maps
146
+ */
147
+ id?: string;
148
+ /**
149
+ * @platform Android
150
+ */
151
+ coordinate?: LatLng;
152
+ /**
153
+ * @platform Android
154
+ */
155
+ position?: Point;
156
+ }>;
@@ -0,0 +1,134 @@
1
+ import * as React from 'react';
2
+ import { ProviderContext, type NativeComponent, type MapManagerCommand, type UIManagerCommand } from './decorateMapComponent';
3
+ import type { ViewProps } from 'react-native';
4
+ export type MapUrlTileProps = ViewProps & {
5
+ /**
6
+ * Doubles tile size from 256 to 512 utilising higher zoom levels
7
+ * i.e loading 4 higher zoom level tiles and combining them for one high-resolution tile.
8
+ * iOS does this automatically, even if it is not desirable always.
9
+ * NB! using this makes text labels smaller than in the original map style.
10
+ *
11
+ * @platform iOS: Not supported
12
+ * @platform Android: Supported
13
+ */
14
+ doubleTileSize?: boolean;
15
+ /**
16
+ * Allow tiles using the TMS coordinate system (origin bottom left) to be used,
17
+ * and displayed at their correct coordinates.
18
+ *
19
+ * @platform iOS: Supported
20
+ * @platform Android: Supported
21
+ */
22
+ flipY?: boolean;
23
+ /**
24
+ * The maximum native zoom level for this tile overlay i.e. the highest zoom level that the tile server provides.
25
+ * Tiles are auto-scaled for higher zoom levels.
26
+ *
27
+ * @platform iOS: Apple Maps only
28
+ * @platform Android: Supported
29
+ */
30
+ maximumNativeZ?: number;
31
+ /**
32
+ * The maximum zoom level for this tile overlay.
33
+ *
34
+ * @platform iOS: Supported
35
+ * @platform Android: Supported
36
+ */
37
+ maximumZ?: number;
38
+ /**
39
+ * The minimum zoom level for this tile overlay.
40
+ *
41
+ * @platform iOS: Supported
42
+ * @platform Android: Supported
43
+ */
44
+ minimumZ?: number;
45
+ /**
46
+ * In offline-mode tiles are not fetched from the tile servers, rather only tiles stored in the cache directory are used.
47
+ * Furthermore automated tile scaling is activated: if tile at a desired zoom level is not found from the cache directory,
48
+ * then lower zoom level tile is used (up to 4 levels lower) and scaled.
49
+ *
50
+ * @default false
51
+ * @platform iOS: Apple Maps only
52
+ * @platform Android: Supported
53
+ */
54
+ offlineMode?: boolean;
55
+ /**
56
+ * Map layer opacity. Value between 0 - 1, with 0 meaning fully transparent.
57
+ *
58
+ * @platform iOS: Apple Maps only
59
+ * @platform Android: Supported
60
+ */
61
+ opacity?: number;
62
+ /**
63
+ * Corresponds to MKTileOverlay canReplaceMapContent i.e. if true then underlying iOS basemap is not shown.
64
+ *
65
+ * @default false
66
+ * @platform iOS: Apple Maps only
67
+ * @platform Android: Not supported
68
+ */
69
+ shouldReplaceMapContent?: boolean;
70
+ /**
71
+ * Defines maximum age in seconds for a cached tile before it's refreshed.
72
+ *
73
+ * NB! Refresh logic is "serve-stale-while-refresh"
74
+ * i.e. to ensure map availability a stale (over max age) tile is served
75
+ * while a tile refresh process is started in the background.
76
+ *
77
+ * @platform iOS: Apple Maps only
78
+ * @platform Android: Supported
79
+ */
80
+ tileCacheMaxAge?: number;
81
+ /**
82
+ * Enable caching of tiles in the specified directory.
83
+ * Directory can be specified either as a normal path or in URL format (`file://`).
84
+ *
85
+ * Tiles are stored in tileCachePath directory as `/{z}/{x}/{y}` i.e. in sub-directories 2-levels deep,
86
+ * filename is tile y-coordinate without any filetype-extension.
87
+ *
88
+ * NB! All cache management needs to be implemented by client e.g. deleting tiles to manage use of storage space etc.
89
+ *
90
+ * @platform iOS: Apple Maps only
91
+ * @platform Android: Supported
92
+ */
93
+ tileCachePath?: string;
94
+ /**
95
+ * Tile size, default size is 256 (for tiles of 256 _ 256 pixels).
96
+ * High-res (aka 'retina') tiles are 512 (tiles of 512 _ 512 pixels)
97
+ *
98
+ * @platform iOS: Apple Maps only
99
+ * @platform Android: Supported
100
+ */
101
+ tileSize?: number;
102
+ /**
103
+ * The url template of the map tileserver.
104
+ * (URLTile) The patterns {x} {y} {z} will be replaced at runtime.
105
+ * For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png.
106
+ *
107
+ * It is also possible to refer to tiles in local filesystem with file:///top-level-directory/sub-directory/{z}/{x}/{y}.png URL-format.
108
+ * (WMSTile) The patterns {minX} {maxX} {minY} {maxY} {width} {height} will be replaced at runtime according to EPSG:900913 specification bounding box.
109
+ * 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.
110
+ *
111
+ * @platform iOS: Supported
112
+ * @platform Android: Supported
113
+ */
114
+ urlTemplate: string;
115
+ /**
116
+ * The order in which this tile overlay is drawn with respect to other overlays.
117
+ * An overlay with a larger z-index is drawn over overlays with smaller z-indices.
118
+ * The order of overlays with the same z-index is arbitrary.
119
+ *
120
+ * @platform iOS: Google Maps only
121
+ * @platform Android: Supported
122
+ */
123
+ zIndex?: number;
124
+ };
125
+ type NativeProps = MapUrlTileProps;
126
+ export declare class MapUrlTile extends React.Component<MapUrlTileProps> {
127
+ context: React.ContextType<typeof ProviderContext>;
128
+ getNativeComponent: () => NativeComponent<NativeProps>;
129
+ getMapManagerCommand: (name: string) => MapManagerCommand;
130
+ getUIManagerCommand: (name: string) => UIManagerCommand;
131
+ render(): React.JSX.Element;
132
+ }
133
+ declare const _default: typeof MapUrlTile;
134
+ export default _default;