react-native-maplibre-gl-js 1.6.0 → 1.8.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 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/react-native/components/core/MapProvider/MapProvider.hooks.js +5 -5
- package/lib/module/react-native/components/core/MapProvider/MapProvider.hooks.js.map +1 -1
- package/lib/module/react-native/components/core/MapProvider/MapProvider.js +4 -4
- package/lib/module/react-native/components/core/MapProvider/MapProvider.js.map +1 -1
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.js +41 -0
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.js.map +1 -0
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.js +25 -0
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.js.map +1 -0
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.types.js +4 -0
- package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.types.js.map +1 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.js +46 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.js.map +1 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.js +25 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.js.map +1 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.types.js +4 -0
- package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.types.js.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.d.ts +1 -1
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.hooks.d.ts +3 -3
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.hooks.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.types.d.ts +1 -1
- package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.types.d.ts.map +1 -1
- package/lib/typescript/src/react-native/components/map-sources/ImageSource/ImageSource.types.d.ts +1 -1
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.d.ts +39 -0
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.d.ts +2 -0
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.types.d.ts +9 -0
- package/lib/typescript/src/react-native/components/map-sources/RasterTileSource/RasterTileSource.types.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.d.ts +44 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.d.ts +2 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.types.d.ts +9 -0
- package/lib/typescript/src/react-native/components/map-sources/VectorTileSource/VectorTileSource.types.d.ts.map +1 -0
- package/lib/typescript/src/react-native/components/map-sources/VideoSource/VideoSource.types.d.ts +1 -1
- package/lib/typescript/src/react-native/components-factories/map-sources/createMapSourceAsComponent.types.d.ts +2 -2
- package/lib/typescript/src/react-native/components-factories/map-sources/createMapSourceAsComponent.types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
- [3. Popup](#3-popup)
|
|
61
61
|
- [4. GeoJSONSource](#4-geojsonsource)
|
|
62
62
|
- [5. ImageSource](#5-imagesource)
|
|
63
|
+
- [6. VideoSource](#6-videosource)
|
|
63
64
|
- [🏁 Getting started](#-getting-started)
|
|
64
65
|
- [📝 Design rationale](#-design-rationale)
|
|
65
66
|
- [Existing React Native map solutions](#existing-react-native-map-solutions)
|
|
@@ -136,6 +137,14 @@ Several real-world usage scenarios are available, you can explore them in two wa
|
|
|
136
137
|
- [`5.3. Animate a serie of images 1`](./example/src/app/5.-ImageSource/5.3.-Animate-a-serie-of-images-1.tsx)
|
|
137
138
|
- [`5.4. Animate a serie of images 2`](./example/src/app/5.-ImageSource/5.4.-Animate-a-serie-of-images-2.tsx)
|
|
138
139
|
|
|
140
|
+
### 6. VideoSource
|
|
141
|
+
|
|
142
|
+
- [`6.1. Component basis`](./example/src/app/6.-VideoSource/6.1.-Component-basis.tsx)
|
|
143
|
+
|
|
144
|
+
### 7. VectorTileSource
|
|
145
|
+
|
|
146
|
+
- [`7.1. Component basis`](./example/src/app/7.-VectorTileSource/7.1.-Component-basis.tsx)
|
|
147
|
+
|
|
139
148
|
<!-- EXAMPLES-LIST:END -->
|
|
140
149
|
|
|
141
150
|
|
package/lib/module/index.js
CHANGED
|
@@ -23,4 +23,6 @@ export { default as Popup } from "./react-native/components/web-objects/Popup/Po
|
|
|
23
23
|
export { default as GeoJSONSource } from "./react-native/components/map-sources/GeoJSONSource/GeoJSONSource.js";
|
|
24
24
|
export { default as ImageSource } from "./react-native/components/map-sources/ImageSource/ImageSource.js";
|
|
25
25
|
export { default as VideoSource } from "./react-native/components/map-sources/VideoSource/VideoSource.js";
|
|
26
|
+
export { default as VectorTileSource } from "./react-native/components/map-sources/VectorTileSource/VectorTileSource.js";
|
|
27
|
+
export { default as RasterTileSource } from "./react-native/components/map-sources/RasterTileSource/RasterTileSource.js";
|
|
26
28
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","MapProvider","Map","Marker","Popup","GeoJSONSource","ImageSource","VideoSource"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAeA;;
|
|
1
|
+
{"version":3,"names":["default","MapProvider","Map","Marker","Popup","GeoJSONSource","ImageSource","VideoSource","VectorTileSource","RasterTileSource"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAeA;;AAOA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,2DAAwD;;AAE/F;AACA,SAASD,OAAO,IAAIE,GAAG,QAAQ,kDAA+C;AAC9E,SAASF,OAAO,IAAIG,MAAM,QAAQ,wDAAqD;AACvF,SAASH,OAAO,IAAII,KAAK,QAAQ,sDAAmD;;AAEpF;AACA,SAASJ,OAAO,IAAIK,aAAa,QAAQ,sEAAmE;AAC5G,SAASL,OAAO,IAAIM,WAAW,QAAQ,kEAA+D;AACtG,SAASN,OAAO,IAAIO,WAAW,QAAQ,kEAA+D;AACtG,SAASP,OAAO,IAAIQ,gBAAgB,QAAQ,4EAAyE;AACrH,SAASR,OAAO,IAAIS,gBAAgB,QAAQ,4EAAyE","ignoreList":[]}
|
|
@@ -144,14 +144,14 @@ export const useWebMessageHandler = () => {
|
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* @param
|
|
147
|
+
* @param cssStyles - The CSS to be injected.
|
|
148
148
|
* @returns - The given CSS in a format that can be injected into the WebView.
|
|
149
149
|
*/
|
|
150
|
-
export const useCssInjectionScript =
|
|
150
|
+
export const useCssInjectionScript = cssStyles => {
|
|
151
151
|
const cssInjectionScript = useMemo(() => {
|
|
152
|
-
const normalizedCss = normalizeCss(
|
|
152
|
+
const normalizedCss = normalizeCss(cssStyles);
|
|
153
153
|
return normalizedCss ? buildCssInjectionScript(normalizedCss) : undefined;
|
|
154
|
-
}, [
|
|
154
|
+
}, [cssStyles]);
|
|
155
155
|
return {
|
|
156
156
|
cssInjectionScript
|
|
157
157
|
};
|
|
@@ -162,7 +162,7 @@ export const useCssInjectionScript = injectedCss => {
|
|
|
162
162
|
* @param cssInjectionScript - A script that injects CSS once executed within
|
|
163
163
|
* the WebView.
|
|
164
164
|
*/
|
|
165
|
-
export const
|
|
165
|
+
export const useInjectJavaScriptIfCssStylesChanged = cssInjectionScript => {
|
|
166
166
|
// Refs.
|
|
167
167
|
const lastInjectedScriptRef = useRef(null);
|
|
168
168
|
// States.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","useCallback","useEffect","useMemo","useRef","RNLogger","isWebObjectListenerOnHTMLElement","isWebObjectListenerOnMapLayer","isWebObjectListenerOnObject","isWebObjectListenerOnRN","useMapAtoms","buildCssInjectionScript","normalizeCss","useStyles","create","container","width","height","overflow","webView","flex","backgroundColor","useFlushMessagesOnMapMounted","isMapMountMessageReady","flushMessages","useWebMessageHandler","setIsWebWorldReady","getWebObjectListeners","getMapSourceListeners","resolveWebObjectPendingMethodResponse","createWebViewMessageHandler","handlers","handleMessage","event","debug","name","nativeEvent","data","message","JSON","parse","handler","type","error","console","payload","args","level","slice","ready","webObjectListenerEvent","objectId","eventName","listener","rnListener","objectListener","layerListener","elementListener","webObjectMethodResponse","requestId","result","mapSourceListenerEvent","sourceId","layerId","useCssInjectionScript","
|
|
1
|
+
{"version":3,"names":["StyleSheet","useCallback","useEffect","useMemo","useRef","RNLogger","isWebObjectListenerOnHTMLElement","isWebObjectListenerOnMapLayer","isWebObjectListenerOnObject","isWebObjectListenerOnRN","useMapAtoms","buildCssInjectionScript","normalizeCss","useStyles","create","container","width","height","overflow","webView","flex","backgroundColor","useFlushMessagesOnMapMounted","isMapMountMessageReady","flushMessages","useWebMessageHandler","setIsWebWorldReady","getWebObjectListeners","getMapSourceListeners","resolveWebObjectPendingMethodResponse","createWebViewMessageHandler","handlers","handleMessage","event","debug","name","nativeEvent","data","message","JSON","parse","handler","type","error","console","payload","args","level","slice","ready","webObjectListenerEvent","objectId","eventName","listener","rnListener","objectListener","layerListener","elementListener","webObjectMethodResponse","requestId","result","mapSourceListenerEvent","sourceId","layerId","useCssInjectionScript","cssStyles","cssInjectionScript","normalizedCss","undefined","useInjectJavaScriptIfCssStylesChanged","lastInjectedScriptRef","isWebWorldReady","current","injectJavaScript"],"sourceRoot":"../../../../../../src","sources":["react-native/components/core/MapProvider/MapProvider.hooks.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAG/D,OAAOC,QAAQ,MAAM,8BAA2B;AAEhD,SACEC,gCAAgC,EAChCC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,uBAAuB,QAClB,6CAA0C;AACjD,OAAOC,WAAW,MAAM,qCAAkC;AAO1D,SAASC,uBAAuB,EAAEC,YAAY,QAAQ,wBAAqB;AAE3E,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,OAAOV,OAAO,CACZ,MACEH,UAAU,CAACc,MAAM,CAAC;IAChBC,SAAS,EAAE;MAAEC,KAAK,EAAE,MAAM;MAAEC,MAAM,EAAE,MAAM;MAAEC,QAAQ,EAAE;IAAS,CAAC;IAChEC,OAAO,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAE;IAAc;EACrD,CAAC,CAAC,EACJ,EACF,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAGA,CAAA,KAAM;EAChD;EACA;EACA,MAAM;IAAEC,sBAAsB;IAAEC;EAAc,CAAC,GAAGd,WAAW,CAAC,CAAC;EAE/DR,SAAS,CAAC,MAAM;IACd,IAAIqB,sBAAsB,EAAE;MAC1BC,aAAa,CAAC,CAAC;IACjB;EACF,CAAC,EAAE,CAACA,aAAa,EAAED,sBAAsB,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AC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMuB,qBAAqB,GAAIC,SAA6B,IAAK;EACtE,MAAMC,kBAAkB,GAAG/D,OAAO,CAAC,MAAM;IACvC,MAAMgE,aAAa,GAAGvD,YAAY,CAACqD,SAAS,CAAC;IAC7C,OAAOE,aAAa,GAAGxD,uBAAuB,CAACwD,aAAa,CAAC,GAAGC,SAAS;EAC3E,CAAC,EAAE,CAACH,SAAS,CAAC,CAAC;EACf,OAAO;IAAEC;EAAmB,CAAC;AAC/B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,qCAAqC,GAChDH,kBAA2B,IACxB;EACH;EACA,MAAMI,qBAAqB,GAAGlE,MAAM,CAAgB,IAAI,CAAC;EACzD;EACA;EACA,MAAM;IAAEe,OAAO;IAAEoD;EAAgB,CAAC,GAAG7D,WAAW,CAAC,CAAC;EAElDR,SAAS,CAAC,MAAM;IACd,IACE,CAACgE,kBAAkB,IACnB,CAACK,eAAe,IAChB,CAACpD,OAAO,IACRmD,qBAAqB,CAACE,OAAO,KAAKN,kBAAkB,EACpD;MACA;IACF;IACA/C,OAAO,EAAEsD,gBAAgB,CAACP,kBAAkB,CAAC;IAC7CI,qBAAqB,CAACE,OAAO,GAAGN,kBAAkB;EACpD,CAAC,EAAE,CAACA,kBAAkB,EAAEK,eAAe,EAAEpD,OAAO,CAAC,CAAC;AACpD,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { View } from 'react-native';
|
|
|
4
4
|
import { WebView } from 'react-native-webview';
|
|
5
5
|
import { WEBVIEW_STATIC_HTML } from "../../../../web/generated/webview_static_html.js";
|
|
6
6
|
import useMapAtoms from "../../../hooks/atoms/useMapAtoms.js";
|
|
7
|
-
import { useFlushMessagesOnMapMounted, useCssInjectionScript,
|
|
7
|
+
import { useFlushMessagesOnMapMounted, useCssInjectionScript, useInjectJavaScriptIfCssStylesChanged, useStyles, useWebMessageHandler } from "./MapProvider.hooks.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
/**
|
|
10
10
|
* Must be used as a parent component to allow instantiation of map elements.
|
|
@@ -25,7 +25,7 @@ const MapProvider = ({
|
|
|
25
25
|
style,
|
|
26
26
|
webViewStyle,
|
|
27
27
|
children,
|
|
28
|
-
|
|
28
|
+
cssStyles
|
|
29
29
|
}) => {
|
|
30
30
|
// States.
|
|
31
31
|
// - Global.
|
|
@@ -41,8 +41,8 @@ const MapProvider = ({
|
|
|
41
41
|
} = useWebMessageHandler();
|
|
42
42
|
const {
|
|
43
43
|
cssInjectionScript
|
|
44
|
-
} = useCssInjectionScript(
|
|
45
|
-
|
|
44
|
+
} = useCssInjectionScript(cssStyles);
|
|
45
|
+
useInjectJavaScriptIfCssStylesChanged(cssInjectionScript);
|
|
46
46
|
return /*#__PURE__*/_jsxs(View, {
|
|
47
47
|
style: [styles.container, style],
|
|
48
48
|
children: [/*#__PURE__*/_jsx(WebView, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","WebView","WEBVIEW_STATIC_HTML","useMapAtoms","useFlushMessagesOnMapMounted","useCssInjectionScript","
|
|
1
|
+
{"version":3,"names":["View","WebView","WEBVIEW_STATIC_HTML","useMapAtoms","useFlushMessagesOnMapMounted","useCssInjectionScript","useInjectJavaScriptIfCssStylesChanged","useStyles","useWebMessageHandler","jsx","_jsx","jsxs","_jsxs","MapProvider","style","webViewStyle","children","cssStyles","setWebView","styles","handler","cssInjectionScript","container","testID","ref","webView","scrollEnabled","javaScriptEnabled","domStorageEnabled","onMessage","source","html","injectedJavaScriptBeforeContentLoaded"],"sourceRoot":"../../../../../../src","sources":["react-native/components/core/MapProvider/MapProvider.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,OAAO,QAAQ,sBAAsB;AAC9C,SAASC,mBAAmB,QAAQ,kDAA+C;AACnF,OAAOC,WAAW,MAAM,qCAAkC;AAC1D,SACEC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createMapSourceAsComponent from "../../../components-factories/map-sources/createMapSourceAsComponent.js";
|
|
4
|
+
/**
|
|
5
|
+
* MapLibre Raster Tile map source and layers.
|
|
6
|
+
* @props {@link RasterTileSourceProps}
|
|
7
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/RasterTileSource/ `MapLibre GL JS` docs}
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <RasterTileSource
|
|
11
|
+
* id={'raster-source'}
|
|
12
|
+
* // First, the Raster Tile source is declared.
|
|
13
|
+
* source={{
|
|
14
|
+
* type: 'raster',
|
|
15
|
+
* tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],
|
|
16
|
+
* }}
|
|
17
|
+
* // Then, one or multiple layers that use this source are declared.
|
|
18
|
+
* // /!\ it is a list.
|
|
19
|
+
* layers={[
|
|
20
|
+
* // Add a layer that will overlay the map style.
|
|
21
|
+
* {
|
|
22
|
+
* layer: {
|
|
23
|
+
* id: 'raster-layer',
|
|
24
|
+
* type: 'raster',
|
|
25
|
+
* // No need to specify the source here, it will be added
|
|
26
|
+
* // automatically.
|
|
27
|
+
* //> i.e., this is not needed: source: 'raster-source'.
|
|
28
|
+
* },
|
|
29
|
+
* // Define listeners for this layer.
|
|
30
|
+
* listeners: {
|
|
31
|
+
* mount: () => console.log('Raster layer mounted'),
|
|
32
|
+
* },
|
|
33
|
+
* },
|
|
34
|
+
* ]}
|
|
35
|
+
* />
|
|
36
|
+
* ```
|
|
37
|
+
* @group Components – map sources
|
|
38
|
+
*/
|
|
39
|
+
const RasterTileSource = createMapSourceAsComponent();
|
|
40
|
+
export default RasterTileSource;
|
|
41
|
+
//# sourceMappingURL=RasterTileSource.js.map
|
package/lib/module/react-native/components/map-sources/RasterTileSource/RasterTileSource.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createMapSourceAsComponent","RasterTileSource"],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/RasterTileSource/RasterTileSource.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,yEAAsE;AAG7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGD,0BAA0B,CAAwB,CAAC;AAE5E,eAAeC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { render } from '@testing-library/react-native';
|
|
4
|
+
import RasterTileSource from "./RasterTileSource.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
describe('RasterTileSource', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
jest.clearAllMocks();
|
|
9
|
+
});
|
|
10
|
+
describe('Given the component is rendered', () => {
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
render(/*#__PURE__*/_jsx(RasterTileSource, {
|
|
13
|
+
id: 'src-1',
|
|
14
|
+
source: {
|
|
15
|
+
type: 'raster'
|
|
16
|
+
},
|
|
17
|
+
layers: []
|
|
18
|
+
}));
|
|
19
|
+
});
|
|
20
|
+
describe('When nothing', () => {
|
|
21
|
+
test('Then it does not crash', () => {});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=RasterTileSource.test.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["render","RasterTileSource","jsx","_jsx","describe","beforeEach","jest","clearAllMocks","id","source","type","layers","test"],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,gBAAgB,MAAM,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEjDC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCC,UAAU,CAAC,MAAM;IACfC,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFH,QAAQ,CAAC,iCAAiC,EAAE,MAAM;IAChDC,UAAU,CAAC,MAAM;MACfL,MAAM,cACJG,IAAA,CAACF,gBAAgB;QACfO,EAAE,EAAE,OAAQ;QACZC,MAAM,EAAE;UAAEC,IAAI,EAAE;QAAS,CAAE;QAC3BC,MAAM,EAAE;MAAG,CACZ,CACH,CAAC;IACH,CAAC,CAAC;IAEFP,QAAQ,CAAC,cAAc,EAAE,MAAM;MAC7BQ,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/RasterTileSource/RasterTileSource.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import createMapSourceAsComponent from "../../../components-factories/map-sources/createMapSourceAsComponent.js";
|
|
4
|
+
/**
|
|
5
|
+
* MapLibre Vector Tile map source and layers.
|
|
6
|
+
* @props {@link VectorTileSourceProps}
|
|
7
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/VectorTileSource/ `MapLibre GL JS` docs}
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <VectorTileSource
|
|
11
|
+
* id={'vector-source'}
|
|
12
|
+
* // First, the Vector Tile source is declared.
|
|
13
|
+
* source={{
|
|
14
|
+
* type: 'vector',
|
|
15
|
+
* tiles: ['https://tiles.openfreemap.org/planet/v3/{z}/{x}/{y}.pbf'],
|
|
16
|
+
* }}
|
|
17
|
+
* // Then, one or multiple layers that use this source are declared.
|
|
18
|
+
* // /!\ it is a list.
|
|
19
|
+
* layers={[
|
|
20
|
+
* // Add a layer that will highlight the routes.
|
|
21
|
+
* {
|
|
22
|
+
* layer: {
|
|
23
|
+
* id: 'roads',
|
|
24
|
+
* type: 'line',
|
|
25
|
+
* 'source-layer': 'transportation',
|
|
26
|
+
* paint: {
|
|
27
|
+
* 'line-color': 'red',
|
|
28
|
+
* 'line-width': 1,
|
|
29
|
+
* },
|
|
30
|
+
* // No need to specify the source here, it will be added
|
|
31
|
+
* // automatically.
|
|
32
|
+
* //> i.e., this is not needed: source: 'vector-source'.
|
|
33
|
+
* },
|
|
34
|
+
* // Define listeners for this layer.
|
|
35
|
+
* listeners: {
|
|
36
|
+
* mount: () => console.log('Vector layer mounted'),
|
|
37
|
+
* },
|
|
38
|
+
* },
|
|
39
|
+
* ]}
|
|
40
|
+
* />
|
|
41
|
+
* ```
|
|
42
|
+
* @group Components – map sources
|
|
43
|
+
*/
|
|
44
|
+
const VectorTileSource = createMapSourceAsComponent();
|
|
45
|
+
export default VectorTileSource;
|
|
46
|
+
//# sourceMappingURL=VectorTileSource.js.map
|
package/lib/module/react-native/components/map-sources/VectorTileSource/VectorTileSource.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createMapSourceAsComponent","VectorTileSource"],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/VectorTileSource/VectorTileSource.tsx"],"mappings":";;AAAA,OAAOA,0BAA0B,MAAM,yEAAsE;AAG7G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAGD,0BAA0B,CAAwB,CAAC;AAE5E,eAAeC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { render } from '@testing-library/react-native';
|
|
4
|
+
import VectorTileSource from "./VectorTileSource.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
describe('VectorTileSource', () => {
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
jest.clearAllMocks();
|
|
9
|
+
});
|
|
10
|
+
describe('Given the component is rendered', () => {
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
render(/*#__PURE__*/_jsx(VectorTileSource, {
|
|
13
|
+
id: 'src-1',
|
|
14
|
+
source: {
|
|
15
|
+
type: 'vector'
|
|
16
|
+
},
|
|
17
|
+
layers: []
|
|
18
|
+
}));
|
|
19
|
+
});
|
|
20
|
+
describe('When nothing', () => {
|
|
21
|
+
test('Then it does not crash', () => {});
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=VectorTileSource.test.unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["render","VectorTileSource","jsx","_jsx","describe","beforeEach","jest","clearAllMocks","id","source","type","layers","test"],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,+BAA+B;AACtD,OAAOC,gBAAgB,MAAM,uBAAoB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEjDC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCC,UAAU,CAAC,MAAM;IACfC,IAAI,CAACC,aAAa,CAAC,CAAC;EACtB,CAAC,CAAC;EAEFH,QAAQ,CAAC,iCAAiC,EAAE,MAAM;IAChDC,UAAU,CAAC,MAAM;MACfL,MAAM,cACJG,IAAA,CAACF,gBAAgB;QACfO,EAAE,EAAE,OAAQ;QACZC,MAAM,EAAE;UAAEC,IAAI,EAAE;QAAS,CAAE;QAC3BC,MAAM,EAAE;MAAG,CACZ,CACH,CAAC;IACH,CAAC,CAAC;IAEFP,QAAQ,CAAC,cAAc,EAAE,MAAM;MAC7BQ,IAAI,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../src","sources":["react-native/components/map-sources/VectorTileSource/VectorTileSource.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -11,6 +11,8 @@ export type { PopupRef, PopupProps, } from './react-native/components/web-object
|
|
|
11
11
|
export type { GeoJSONSourceProps } from './react-native/components/map-sources/GeoJSONSource/GeoJSONSource.types';
|
|
12
12
|
export type { ImageSourceProps } from './react-native/components/map-sources/ImageSource/ImageSource.types';
|
|
13
13
|
export type { VideoSourceProps } from './react-native/components/map-sources/VideoSource/VideoSource.types';
|
|
14
|
+
export type { VectorTileSourceProps } from './react-native/components/map-sources/VectorTileSource/VectorTileSource.types';
|
|
15
|
+
export type { RasterTileSourceProps } from './react-native/components/map-sources/RasterTileSource/RasterTileSource.types';
|
|
14
16
|
export { default as MapProvider } from './react-native/components/core/MapProvider/MapProvider';
|
|
15
17
|
export { default as Map } from './react-native/components/web-objects/Map/Map';
|
|
16
18
|
export { default as Marker } from './react-native/components/web-objects/Marker/Marker';
|
|
@@ -18,4 +20,6 @@ export { default as Popup } from './react-native/components/web-objects/Popup/Po
|
|
|
18
20
|
export { default as GeoJSONSource } from './react-native/components/map-sources/GeoJSONSource/GeoJSONSource';
|
|
19
21
|
export { default as ImageSource } from './react-native/components/map-sources/ImageSource/ImageSource';
|
|
20
22
|
export { default as VideoSource } from './react-native/components/map-sources/VideoSource/VideoSource';
|
|
23
|
+
export { default as VectorTileSource } from './react-native/components/map-sources/VectorTileSource/VectorTileSource';
|
|
24
|
+
export { default as RasterTileSource } from './react-native/components/map-sources/RasterTileSource/RasterTileSource';
|
|
21
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAA;AACpG,YAAY,EACV,MAAM,EACN,QAAQ,GACT,MAAM,qDAAqD,CAAA;AAC5D,YAAY,EACV,SAAS,EACT,WAAW,GACZ,MAAM,2DAA2D,CAAA;AAClE,YAAY,EACV,QAAQ,EACR,UAAU,GACX,MAAM,yDAAyD,CAAA;AAGhE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAA;AACjH,YAAY,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAA;AAC3G,YAAY,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAA;AACpG,YAAY,EACV,MAAM,EACN,QAAQ,GACT,MAAM,qDAAqD,CAAA;AAC5D,YAAY,EACV,SAAS,EACT,WAAW,GACZ,MAAM,2DAA2D,CAAA;AAClE,YAAY,EACV,QAAQ,EACR,UAAU,GACX,MAAM,yDAAyD,CAAA;AAGhE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yEAAyE,CAAA;AACjH,YAAY,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAA;AAC3G,YAAY,EAAE,gBAAgB,EAAE,MAAM,qEAAqE,CAAA;AAC3G,YAAY,EAAE,qBAAqB,EAAE,MAAM,+EAA+E,CAAA;AAC1H,YAAY,EAAE,qBAAqB,EAAE,MAAM,+EAA+E,CAAA;AAG1H,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wDAAwD,CAAA;AAG/F,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,+CAA+C,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qDAAqD,CAAA;AACvF,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,mDAAmD,CAAA;AAGpF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mEAAmE,CAAA;AAC5G,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+DAA+D,CAAA;AACtG,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,+DAA+D,CAAA;AACtG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yEAAyE,CAAA;AACrH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yEAAyE,CAAA"}
|
|
@@ -14,6 +14,6 @@ import type { MapProviderProps } from './MapProvider.types';
|
|
|
14
14
|
* </MapProvider>
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
declare const MapProvider: ({ style, webViewStyle, children,
|
|
17
|
+
declare const MapProvider: ({ style, webViewStyle, children, cssStyles, }: MapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
18
|
export default MapProvider;
|
|
19
19
|
//# sourceMappingURL=MapProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,WAAW,GAAI,
|
|
1
|
+
{"version":3,"file":"MapProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,WAAW,GAAI,+CAKlB,gBAAgB,4CA4BlB,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -23,10 +23,10 @@ export declare const useWebMessageHandler: () => {
|
|
|
23
23
|
handler: (event: WebViewMessageEvent) => void;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* @param
|
|
26
|
+
* @param cssStyles - The CSS to be injected.
|
|
27
27
|
* @returns - The given CSS in a format that can be injected into the WebView.
|
|
28
28
|
*/
|
|
29
|
-
export declare const useCssInjectionScript: (
|
|
29
|
+
export declare const useCssInjectionScript: (cssStyles?: string | string[]) => {
|
|
30
30
|
cssInjectionScript: string | undefined;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
@@ -34,5 +34,5 @@ export declare const useCssInjectionScript: (injectedCss?: string | string[]) =>
|
|
|
34
34
|
* @param cssInjectionScript - A script that injects CSS once executed within
|
|
35
35
|
* the WebView.
|
|
36
36
|
*/
|
|
37
|
-
export declare const
|
|
37
|
+
export declare const useInjectJavaScriptIfCssStylesChanged: (cssInjectionScript?: string) => void;
|
|
38
38
|
//# sourceMappingURL=MapProvider.hooks.d.ts.map
|
package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapProvider.hooks.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.hooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAkB/D,eAAO,MAAM,SAAS;;;;;;;;;;EASrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,YAUxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;qBAaU,mBAAmB;CAkF7D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,
|
|
1
|
+
{"version":3,"file":"MapProvider.hooks.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.hooks.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAkB/D,eAAO,MAAM,SAAS;;;;;;;;;;EASrB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,YAUxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB;qBAaU,mBAAmB;CAkF7D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,YAAY,MAAM,GAAG,MAAM,EAAE;;CAMlE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qCAAqC,GAChD,qBAAqB,MAAM,SAoB5B,CAAA"}
|
|
@@ -20,7 +20,7 @@ export type MapProviderProps = {
|
|
|
20
20
|
* Useful to share classes/animations across Marker components and/or other
|
|
21
21
|
* elements that use HTMLElement (descriptors).
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
cssStyles?: string | string[];
|
|
24
24
|
/**
|
|
25
25
|
* The map elements (e.g., Map) as direct children.
|
|
26
26
|
*/
|
package/lib/typescript/src/react-native/components/core/MapProvider/MapProvider.types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapProvider.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAA;AAElF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IACnC;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"MapProvider.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/core/MapProvider/MapProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAA;AAElF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;KACtC,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAClC,OAAO,EAAE,OAAO,CAAC,kBAAkB,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,KAC9C,IAAI;CACV,CAAA"}
|
package/lib/typescript/src/react-native/components/map-sources/ImageSource/ImageSource.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MapSourceProps } from '../../../components-factories/map-sources/createMapSourceAsComponent.types';
|
|
2
2
|
import type { ImageSourceSpecification } from 'maplibre-gl';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* ImageSource component props.
|
|
5
5
|
* @interface
|
|
6
6
|
* @group Types (map sources)
|
|
7
7
|
*/
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RasterTileSourceProps } from './RasterTileSource.types';
|
|
2
|
+
/**
|
|
3
|
+
* MapLibre Raster Tile map source and layers.
|
|
4
|
+
* @props {@link RasterTileSourceProps}
|
|
5
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/RasterTileSource/ `MapLibre GL JS` docs}
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <RasterTileSource
|
|
9
|
+
* id={'raster-source'}
|
|
10
|
+
* // First, the Raster Tile source is declared.
|
|
11
|
+
* source={{
|
|
12
|
+
* type: 'raster',
|
|
13
|
+
* tiles: ['https://tile.openstreetmap.org/{z}/{x}/{y}.png'],
|
|
14
|
+
* }}
|
|
15
|
+
* // Then, one or multiple layers that use this source are declared.
|
|
16
|
+
* // /!\ it is a list.
|
|
17
|
+
* layers={[
|
|
18
|
+
* // Add a layer that will overlay the map style.
|
|
19
|
+
* {
|
|
20
|
+
* layer: {
|
|
21
|
+
* id: 'raster-layer',
|
|
22
|
+
* type: 'raster',
|
|
23
|
+
* // No need to specify the source here, it will be added
|
|
24
|
+
* // automatically.
|
|
25
|
+
* //> i.e., this is not needed: source: 'raster-source'.
|
|
26
|
+
* },
|
|
27
|
+
* // Define listeners for this layer.
|
|
28
|
+
* listeners: {
|
|
29
|
+
* mount: () => console.log('Raster layer mounted'),
|
|
30
|
+
* },
|
|
31
|
+
* },
|
|
32
|
+
* ]}
|
|
33
|
+
* />
|
|
34
|
+
* ```
|
|
35
|
+
* @group Components – map sources
|
|
36
|
+
*/
|
|
37
|
+
declare const RasterTileSource: (props: RasterTileSourceProps) => null;
|
|
38
|
+
export default RasterTileSource;
|
|
39
|
+
//# sourceMappingURL=RasterTileSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RasterTileSource.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/RasterTileSource/RasterTileSource.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,gBAAgB,wCAAsD,CAAA;AAE5E,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RasterTileSource.test.unit.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/RasterTileSource/RasterTileSource.test.unit.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MapSourceProps } from '../../../components-factories/map-sources/createMapSourceAsComponent.types';
|
|
2
|
+
import type { RasterSourceSpecification } from 'maplibre-gl';
|
|
3
|
+
/**
|
|
4
|
+
* RasterTileSource component props.
|
|
5
|
+
* @interface
|
|
6
|
+
* @group Types (map sources)
|
|
7
|
+
*/
|
|
8
|
+
export type RasterTileSourceProps = MapSourceProps<RasterSourceSpecification>;
|
|
9
|
+
//# sourceMappingURL=RasterTileSource.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RasterTileSource.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/RasterTileSource/RasterTileSource.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4EAA4E,CAAA;AAChH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { VectorTileSourceProps } from './VectorTileSource.types';
|
|
2
|
+
/**
|
|
3
|
+
* MapLibre Vector Tile map source and layers.
|
|
4
|
+
* @props {@link VectorTileSourceProps}
|
|
5
|
+
* @see {@link https://maplibre.org/maplibre-gl-js/docs/API/classes/VectorTileSource/ `MapLibre GL JS` docs}
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* <VectorTileSource
|
|
9
|
+
* id={'vector-source'}
|
|
10
|
+
* // First, the Vector Tile source is declared.
|
|
11
|
+
* source={{
|
|
12
|
+
* type: 'vector',
|
|
13
|
+
* tiles: ['https://tiles.openfreemap.org/planet/v3/{z}/{x}/{y}.pbf'],
|
|
14
|
+
* }}
|
|
15
|
+
* // Then, one or multiple layers that use this source are declared.
|
|
16
|
+
* // /!\ it is a list.
|
|
17
|
+
* layers={[
|
|
18
|
+
* // Add a layer that will highlight the routes.
|
|
19
|
+
* {
|
|
20
|
+
* layer: {
|
|
21
|
+
* id: 'roads',
|
|
22
|
+
* type: 'line',
|
|
23
|
+
* 'source-layer': 'transportation',
|
|
24
|
+
* paint: {
|
|
25
|
+
* 'line-color': 'red',
|
|
26
|
+
* 'line-width': 1,
|
|
27
|
+
* },
|
|
28
|
+
* // No need to specify the source here, it will be added
|
|
29
|
+
* // automatically.
|
|
30
|
+
* //> i.e., this is not needed: source: 'vector-source'.
|
|
31
|
+
* },
|
|
32
|
+
* // Define listeners for this layer.
|
|
33
|
+
* listeners: {
|
|
34
|
+
* mount: () => console.log('Vector layer mounted'),
|
|
35
|
+
* },
|
|
36
|
+
* },
|
|
37
|
+
* ]}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
* @group Components – map sources
|
|
41
|
+
*/
|
|
42
|
+
declare const VectorTileSource: (props: VectorTileSourceProps) => null;
|
|
43
|
+
export default VectorTileSource;
|
|
44
|
+
//# sourceMappingURL=VectorTileSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorTileSource.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/VectorTileSource/VectorTileSource.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAA,MAAM,gBAAgB,wCAAsD,CAAA;AAE5E,eAAe,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorTileSource.test.unit.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/VectorTileSource/VectorTileSource.test.unit.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MapSourceProps } from '../../../components-factories/map-sources/createMapSourceAsComponent.types';
|
|
2
|
+
import type { VectorSourceSpecification } from 'maplibre-gl';
|
|
3
|
+
/**
|
|
4
|
+
* VectorTileSource component props.
|
|
5
|
+
* @interface
|
|
6
|
+
* @group Types (map sources)
|
|
7
|
+
*/
|
|
8
|
+
export type VectorTileSourceProps = MapSourceProps<VectorSourceSpecification>;
|
|
9
|
+
//# sourceMappingURL=VectorTileSource.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorTileSource.types.d.ts","sourceRoot":"","sources":["../../../../../../../src/react-native/components/map-sources/VectorTileSource/VectorTileSource.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4EAA4E,CAAA;AAChH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAA;AAE5D;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,yBAAyB,CAAC,CAAA"}
|
package/lib/typescript/src/react-native/components/map-sources/VideoSource/VideoSource.types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MapSourceProps } from '../../../components-factories/map-sources/createMapSourceAsComponent.types';
|
|
2
2
|
import type { VideoSourceSpecification } from 'maplibre-gl';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* VideoSource component props.
|
|
5
5
|
* @interface
|
|
6
6
|
* @group Types (map sources)
|
|
7
7
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddLayerObject, ImageSourceSpecification, MapLayerEventType, VideoSourceSpecification } from 'maplibre-gl';
|
|
1
|
+
import type { AddLayerObject, ImageSourceSpecification, MapLayerEventType, RasterSourceSpecification, VectorSourceSpecification, VideoSourceSpecification } from 'maplibre-gl';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
3
|
import type { GeoJSONSourceSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
4
4
|
/**
|
|
@@ -6,7 +6,7 @@ import type { GeoJSONSourceSpecification } from '@maplibre/maplibre-gl-style-spe
|
|
|
6
6
|
* A class version to be used on the web side.
|
|
7
7
|
* @group Map source abstraction types
|
|
8
8
|
*/
|
|
9
|
-
export type MapSourceClass = GeoJSONSourceSpecification | ImageSourceSpecification | VideoSourceSpecification;
|
|
9
|
+
export type MapSourceClass = GeoJSONSourceSpecification | ImageSourceSpecification | VideoSourceSpecification | VectorSourceSpecification | RasterSourceSpecification;
|
|
10
10
|
/**
|
|
11
11
|
* React Native component that corresponds and perform actions with a map source
|
|
12
12
|
* and its layers in the web world.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMapSourceAsComponent.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factories/map-sources/createMapSourceAsComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"createMapSourceAsComponent.types.d.ts","sourceRoot":"","sources":["../../../../../../src/react-native/components-factories/map-sources/createMapSourceAsComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,aAAa,CAAA;AACpB,OAAO,K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