tds-map-methods 0.1.0 → 0.1.1
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 +16 -6
- package/index.cjs +18 -24
- package/index.js +7605 -25720
- package/package.json +1 -1
- package/types/components/map/methods/arrowLayer.d.ts +2 -2
- package/types/components/map/methods/config.d.ts +32 -0
- package/types/components/map/methods/createIsoline.d.ts +2 -2
- package/types/components/map/methods/createMic.d.ts +3 -3
- package/types/components/map/methods/fcstLayer.d.ts +4 -4
- package/types/components/map/methods/fcstLayer2.d.ts +2 -2
- package/types/components/map/methods/girdLayer.d.ts +2 -2
- package/types/components/map/methods/index.d.ts +6 -1
- package/types/components/map/methods/isolineLayer.d.ts +1 -1
- package/types/components/map/methods/layer.d.ts +3 -1
- package/types/components/map/methods/layerRequest.d.ts +7 -0
- package/types/components/map/methods/request.d.ts +21 -0
- package/types/components/map/methods/tdsRequest.d.ts +49 -0
- package/types/components/map/methods/typhoonLayer.d.ts +7 -4
- package/types/{request/typhoon.d.ts → components/map/methods/typhoonRequest.d.ts} +2 -3
- package/types/components/map/methods/utils.d.ts +4 -2
- package/types/components/map/methods/windShaft.d.ts +1 -1
- package/types/components/map/methods/wmsLayer.d.ts +1 -1
- package/types/typings/layer.d.ts +4 -0
- package/types/serivce/api/tds.d.ts +0 -16
- package/types/serivce/request/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
# tds-map-methods
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Reusable TDS/OpenLayers rendering methods for browser applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
8
|
npm install tds-map-methods ol @turf/turf dayjs d3-contour lodash-es
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Configure and use
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { initMap, loadLayer
|
|
14
|
+
import { configureMapMethods, initMap, loadLayer } from "tds-map-methods";
|
|
15
|
+
|
|
16
|
+
configureMapMethods({
|
|
17
|
+
serviceBaseUrl: "/server",
|
|
18
|
+
serviceAuthorization: "Basic ...",
|
|
19
|
+
ncssBaseUrl: "/ncss/grid",
|
|
20
|
+
imageSize: 2048,
|
|
21
|
+
typhoonServiceBaseUrl: "/typhoon-server",
|
|
22
|
+
});
|
|
15
23
|
|
|
16
24
|
const map = await initMap("map", { center: [118.8, 32.1], zoom: 5 });
|
|
17
25
|
loadLayer(map, layerOptions);
|
|
18
|
-
removeLayerById(layerOptions.id);
|
|
19
26
|
```
|
|
20
27
|
|
|
21
|
-
|
|
28
|
+
The package also exports TDS request helpers, including fetchTdsGet, fetchXMLFromUrl,
|
|
29
|
+
getMenuList, getXmlData, getVariableMinMax, resolveLayerLoadOptions, and typhoon requests.
|
|
30
|
+
|
|
31
|
+
The package does not read host Vite environment variables. Supply service URLs explicitly.
|