@mapmap/maps 0.8.0 → 0.10.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 +62 -5
- package/dist/index.d.ts +166 -10
- package/dist/index.js +146 -8
- package/dist/index.js.map +1 -1
- package/llms-sdk.txt +24 -1
- package/package.json +3 -3
package/llms-sdk.txt
CHANGED
|
@@ -145,6 +145,24 @@ below with a white halo. Everything renders in one source + symbol layer,
|
|
|
145
145
|
both id `mm-user-markers`. Survives `setStyle` theme swaps.
|
|
146
146
|
`renderMarkerImage({ icon, colour, size })` is exported for reuse.
|
|
147
147
|
|
|
148
|
+
BAKED INTO THE STYLE. You do not need this SDK to see a published theme's
|
|
149
|
+
glyph markers. The theme compiler translates `extra.markers` into real
|
|
150
|
+
style constructs — an inline `mm-user-markers` GeoJSON source plus the
|
|
151
|
+
`mm-user-markers` and `mm-user-markers-glyph` symbol layers, drawn from
|
|
152
|
+
MapMap's SDF marker sprite and recoloured per marker with `icon-color` —
|
|
153
|
+
so a plain `new maplibregl.Map({ style })`, MapLibre Native on iOS or
|
|
154
|
+
Android, or a static renderer draws them from the style URL alone.
|
|
155
|
+
|
|
156
|
+
The exception: markers with a custom `data:` `image`. A static sprite
|
|
157
|
+
cannot carry per-theme artwork, so the compiler SKIPS those items rather
|
|
158
|
+
than substituting a wrong glyph; they render only through `MarkersLayer`.
|
|
159
|
+
|
|
160
|
+
MarkersLayer against a baked style: it TAKES OVER rather than drawing a
|
|
161
|
+
second copy — given markers, it removes the two baked layers and installs
|
|
162
|
+
its own (a strict superset: runtime updates, custom images, short-text
|
|
163
|
+
pins). Constructed and never given markers, it leaves the baked layers
|
|
164
|
+
alone. `hasBakedMarkers(map)` tells you which style you are on.
|
|
165
|
+
|
|
148
166
|
Short-text pins: `renderMarkerImage({ text: "12", colour, size })` draws
|
|
149
167
|
1–3 white bold characters in the pin head INSTEAD of a glyph, auto-shrunk
|
|
150
168
|
to fit — this is what numbered waypoints and lettered stops use. Its
|
|
@@ -218,4 +236,9 @@ Gateway errors are RFC 9457 problem+json; SDK exceptions surface their
|
|
|
218
236
|
## Attribution
|
|
219
237
|
|
|
220
238
|
"© OpenStreetMap contributors © OpenMapTiles" is legally required, baked
|
|
221
|
-
into every style, and not removable. Do not attempt to hide it.
|
|
239
|
+
into every style, and not removable. Do not attempt to hide it. Default
|
|
240
|
+
corners: attribution bottom-left, MapMap mark bottom-right. To use another
|
|
241
|
+
corner pass `attributionPosition: "bottom-right" | "bottom-left" |
|
|
242
|
+
"top-left" | "top-right"` to `createMap`; never relocate the control by
|
|
243
|
+
reaching into map internals. The mark and the credit never share a corner:
|
|
244
|
+
on a collision the SDK moves the mark to the opposite bottom corner.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapmap/maps",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MapMap Maps SDK
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"description": "MapMap Maps SDK \u2014 a thin, well-typed MapLibre GL JS wrapper that drops a MapMap-branded map with signed territory tiles and OSRM-compatible truck/ADR routing into any web app.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Mapmap AI Ltd",
|
|
7
7
|
"type": "module",
|
|
@@ -67,4 +67,4 @@
|
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": ">=18"
|
|
69
69
|
}
|
|
70
|
-
}
|
|
70
|
+
}
|