tds-map-methods 0.0.0-stage → 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 CHANGED
@@ -1,3 +1,31 @@
1
- # Temporary Holding Version
1
+ # tds-map-methods
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Reusable TDS/OpenLayers rendering methods for browser applications.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install tds-map-methods ol @turf/turf dayjs d3-contour lodash-es
9
+ ```
10
+
11
+ ## Configure and use
12
+
13
+ ```ts
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
+ });
23
+
24
+ const map = await initMap("map", { center: [118.8, 32.1], zoom: 5 });
25
+ loadLayer(map, layerOptions);
26
+ ```
27
+
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.