@nika-js/onlymap 0.11.11 → 0.12.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/CHANGELOG.md +20 -0
- package/README.md +9 -3
- package/dist/attribute-resolution.d.ts +2 -0
- package/dist/{basemap-QT4ua-dL.js → basemap-BK25o5OE.js} +1514 -1462
- package/dist/basemap.d.ts +41 -1
- package/dist/cartograph.js +362 -321
- package/dist/cartograph.standalone.js +1995 -1914
- package/dist/{cityjson-k-z1r6c0.js → cityjson-DMc_dwu1.js} +1 -1
- package/dist/{crs-BzE_KP4M.js → crs-D5FyQfEu.js} +74 -7
- package/dist/{crs-ChglCB3O.js → crs-ZdDBJ2EY.js} +39 -36
- package/dist/data-layer.d.ts +36 -3
- package/dist/elements/om-map.d.ts +2 -1
- package/dist/geoparquet-CLydPm2f.js +30 -0
- package/dist/geoparquet.d.ts +6 -7
- package/dist/{globe-view-BSGTUqWc.js → globe-view-ChuX60M5.js} +11 -11
- package/dist/hillshade-DD8WFrvf.js +209 -0
- package/dist/html-data.d.ts +1 -1
- package/dist/{ifc-DXwePQRv.js → ifc-sisRo7I7.js} +1 -1
- package/dist/{index-DudIuhJa.js → index-BHRpKnGi.js} +1 -1
- package/dist/{index-CevWTqBO.js → index-Bs69fn8a.js} +14362 -13782
- package/dist/{index-DBt_2x-w.js → index-C2CKUsom.js} +106 -106
- package/dist/{index-DjYxw-8H.js → index-CMKrghNb.js} +18 -18
- package/dist/{index-Dwc4s3mc.js → index-CdAf0bLj.js} +20 -20
- package/dist/{index-BO7MtTkn.js → index-CgVFHEdM.js} +3 -3
- package/dist/{index-Bxue4Psc.js → index-CvrH6mbS.js} +9 -9
- package/dist/{index-Bzypgr1v.js → index-DIzzRLKr.js} +1 -1
- package/dist/{index-D1ZjhP2H.js → index-Dvwr1Y3o.js} +11 -11
- package/dist/index.d.ts +3 -2
- package/dist/ir.d.ts +6 -0
- package/dist/layer-registry.d.ts +21 -0
- package/dist/layers/warped-bitmap-layer.d.ts +27 -0
- package/dist/{lerc-DQuf93SN.js → lerc-mAijS40k.js} +1 -1
- package/dist/onlymap.standalone.js +53019 -52455
- package/dist/onlymapjs.js +86 -84
- package/dist/parse-manifest.d.ts +12 -9
- package/dist/{post-process-effect-B3j_nBzy.js → post-process-effect-rwFDi8di.js} +5 -5
- package/dist/programmatic.d.ts +12 -0
- package/dist/projection.d.ts +44 -1
- package/dist/{raster-CvAJ-h_g.js → raster-CXIqf83L.js} +3 -3
- package/dist/{raster-pipeline-CusoihQ3.js → raster-pipeline-CfSg2Re7.js} +1 -1
- package/dist/react/om-layer.d.ts +4 -0
- package/dist/react/om-map.d.ts +2 -0
- package/dist/react.js +225 -218
- package/dist/runtime-core.d.ts +24 -0
- package/dist/source-crs.d.ts +99 -0
- package/dist/{text-on-path-D9u5SYCo.js → text-on-path-B08PekFz.js} +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/{zarr-DWb_nikR.js → zarr-CUn2udOc.js} +2 -2
- package/docs/cartograph.md +2 -2
- package/docs/cartography.md +106 -1
- package/llms.txt +2 -1
- package/onlymapjs.attributes.json +2 -0
- package/onlymapjs.html-data.json +26 -4
- package/package.json +1 -1
- package/skills/onlymapjs/SKILL.md +5 -3
- package/skills/onlymapjs/references/syntax.md +18 -3
- package/dist/geoparquet-hOsdfZJa.js +0 -35
- package/dist/hillshade-D2Ps3Nim.js +0 -298
package/dist/basemap.d.ts
CHANGED
|
@@ -45,13 +45,23 @@ export declare class MapLibreBasemapAdapter {
|
|
|
45
45
|
*/
|
|
46
46
|
private initialized;
|
|
47
47
|
private loadCallbacks;
|
|
48
|
+
/**
|
|
49
|
+
* Globe view (docs/design/globe.md). MapLibre draws the sphere and the
|
|
50
|
+
* overlay follows: @deck.gl/mapbox reads MapLibre's projection and switches
|
|
51
|
+
* deck to its GlobeView. The projection lives in MapLibre's STYLE, so every
|
|
52
|
+
* `setStyle` (a basemap switch) resets it to Mercator; `style.load`
|
|
53
|
+
* re-applies it.
|
|
54
|
+
*/
|
|
55
|
+
private globe;
|
|
56
|
+
/** The tilt ceiling the flat map had before the globe flattened it — restored when the globe turns off. */
|
|
57
|
+
private flatMaxPitch?;
|
|
48
58
|
constructor(container: HTMLElement, resolved: ResolvedBasemap, initialView: {
|
|
49
59
|
longitude: number;
|
|
50
60
|
latitude: number;
|
|
51
61
|
zoom: number;
|
|
52
62
|
pitch?: number;
|
|
53
63
|
bearing?: number;
|
|
54
|
-
}, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement, deterministic?: boolean);
|
|
64
|
+
}, deckProps: DeckProps, showAttribution?: boolean, attributionHost?: HTMLElement, deterministic?: boolean, globe?: boolean);
|
|
55
65
|
/**
|
|
56
66
|
* whenSettled's basemap gate (issue #37 follow-up), as an EVENT LATCH
|
|
57
67
|
* rather than a polling predicate: MapLibre's `idle` event is its own
|
|
@@ -182,9 +192,39 @@ export declare class MapLibreBasemapAdapter {
|
|
|
182
192
|
* back, while a controller maximum simply refuses to go further.
|
|
183
193
|
*/
|
|
184
194
|
setMaxPitch(maxPitch: number | null): void;
|
|
195
|
+
/**
|
|
196
|
+
* A globe is flat-on and north-up (docs/design/globe.md). MapLibre's globe
|
|
197
|
+
* tilts and rotates, but deck's GlobeView has neither pitch nor bearing: a
|
|
198
|
+
* tilted globe drew deck's layers up to 13 px off the basemap at zoom 4 and
|
|
199
|
+
* dropped some entirely (e2e/globe.spec.ts). So while the globe is on, the
|
|
200
|
+
* controller refuses tilt and rotation and the camera levels out.
|
|
201
|
+
*/
|
|
202
|
+
private applyCameraLimits;
|
|
185
203
|
/** Floor how far the user can zoom out. Null restores MapLibre's own minimum. */
|
|
186
204
|
setMinZoom(minZoom: number | null): void;
|
|
187
205
|
isLoaded(): boolean;
|
|
206
|
+
/** Live globe switch — MapLibre changes projection in place; camera and deck layers survive. */
|
|
207
|
+
setGlobe(globe: boolean): void;
|
|
208
|
+
isGlobe(): boolean;
|
|
209
|
+
private applyProjection;
|
|
210
|
+
/**
|
|
211
|
+
* Is a ground point hidden on the far side of the globe? Always false on a
|
|
212
|
+
* flat map. MapLibre answers this itself (`transform.isLocationOccluded`),
|
|
213
|
+
* but on its internal transform — and maplibre-gl is a caret range, not an
|
|
214
|
+
* exact pin — so a geometric fallback stands behind it: a visible point
|
|
215
|
+
* survives a project → unproject round trip, a far-side one comes back as
|
|
216
|
+
* the near-side point under the same pixel.
|
|
217
|
+
*/
|
|
218
|
+
private isOccluded;
|
|
219
|
+
/**
|
|
220
|
+
* Is this screen pixel on the planet? Always true on a flat map. A globe
|
|
221
|
+
* zoomed out has SPACE around it, and MapLibre's unproject still answers a
|
|
222
|
+
* pixel there — with a point on the limb — so a click in space would report
|
|
223
|
+
* a coordinate it never touched. Same internal-with-fallback shape as
|
|
224
|
+
* isOccluded: the fallback re-projects the answer and checks it lands back
|
|
225
|
+
* on the pixel.
|
|
226
|
+
*/
|
|
227
|
+
private isOnSurface;
|
|
188
228
|
getViewport(): ViewportLike;
|
|
189
229
|
getViewState(): BasemapViewState;
|
|
190
230
|
/** Instant recenter/rezoom — the basemap's own camera jump, no deck viewState involved. */
|