@versatiles/svg-renderer 0.7.3 → 1.0.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 CHANGED
@@ -64,13 +64,23 @@ document.body.innerHTML = svg;
64
64
 
65
65
  The package includes an `SVGExportControl` that adds an export button to any MapLibre GL JS map.
66
66
 
67
+ With a bundler, import it from the `/maplibre` subpath:
68
+
69
+ ```typescript
70
+ import { SVGExportControl } from '@versatiles/svg-renderer/maplibre';
71
+
72
+ map.addControl(new SVGExportControl(), 'top-right');
73
+ ```
74
+
75
+ Or load it directly in the browser via the UMD bundle, which exposes a `VersaTilesSVG` global:
76
+
67
77
  ```html
68
78
  <!DOCTYPE html>
69
79
  <html>
70
80
  <head>
71
81
  <link rel="stylesheet" href="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.css" />
72
82
  <script src="https://unpkg.com/maplibre-gl@5/dist/maplibre-gl.js"></script>
73
- <script src="https://unpkg.com/@versatiles/svg-renderer/dist/maplibre.umd.js"></script>
83
+ <script src="https://unpkg.com/@versatiles/svg-renderer/dist/maplibre-svg-export.umd.js"></script>
74
84
  </head>
75
85
  <body>
76
86
  <div id="map"></div>
@@ -87,7 +97,7 @@ The package includes an `SVGExportControl` that adds an export button to any Map
87
97
  </html>
88
98
  ```
89
99
 
90
- The control opens a panel where the user can set width, height, and scale, preview the SVG, download it, or open it in a new tab. Map interactions are disabled while the panel is open.
100
+ The control opens a panel where the user can set width and height, preview the SVG, download it, or open it in a new tab. Map interactions are disabled while the panel is open.
91
101
 
92
102
  Options:
93
103
 
@@ -95,7 +105,6 @@ Options:
95
105
  new SVGExportControl({
96
106
  defaultWidth: 1024, // default: 1024
97
107
  defaultHeight: 1024, // default: 1024
98
- defaultScale: 1, // default: 1
99
108
  });
100
109
  ```
101
110
 
@@ -150,8 +159,8 @@ end
150
159
  subgraph 5["sources"]
151
160
  6["index.ts"]
152
161
  7["geojson.ts"]
153
- 9["merge.ts"]
154
- A["raster.ts"]
162
+ 9["raster.ts"]
163
+ A["base64.ts"]
155
164
  B["tiles.ts"]
156
165
  C["sprite.ts"]
157
166
  D["vector.ts"]
@@ -177,13 +186,13 @@ end
177
186
  4-->E
178
187
  6-->7
179
188
  6-->9
180
- 6-->A
181
189
  6-->C
182
190
  6-->D
183
191
  7-->8
184
- 9-->8
185
- A-->B
192
+ 9-->A
193
+ 9-->B
186
194
  B-->8
195
+ C-->A
187
196
  D-->8
188
197
  D-->B
189
198
  G-->H