Appearance
v3 Changelog
Archived. v3 is no longer the current release. See the current changelog for
4.0.1release notes.
v3.0.0
Ground-up TypeScript rewrite of the v2 UMD bundle.
New in v3
Distribution
- Published to npm as
mapsted.maps(v2 was CDN-only via<script src>). - Build pipeline switched from tsdx to tsup, producing four formats in
dist/:index.js— ESM (modern bundlers: Vite, Webpack 5, Rollup)index.cjs— CJS (require())index.min.js— IIFE (CDN<script>tag)index.d.ts— TypeScript declarations (IntelliSense)
Types
- Full TypeScript types with
.d.tsdeclarations for every public method and interface. - 14 public interfaces:
CalculationRequest,CalculationResult,CoordinateData,DefaultCustomRoutingConfig,EntityData,FeatureFlagSet,FloorBoost,HighlightStyle,initializeOptions(note the lowercasei— preserved from the v2 type name; renamed toInitOptionsin4.0.1),Location,MapOverlayData,RoutingBoost,SelectEntityBoost,SetOptions. - 3 enums:
ActionTypes,Loader,RouteOptions. - 1 constant:
PRIVATE_CHILD_ACTION(removed in4.0.1per CHL-27 security review).
Public API
21 functions preserved from v2 under unchanged names: initialize, set, setEntityData, setEntityDataById, setEntityDefaults, selectEntity, setFeatureFlags, changeFloorById, changeFloorByName, getFloors, createBoostSelect, createBoostRouting, setCoordsData, applyBoost, setIdleTime, setMapOverlayMarkers, centerOnMapoverlay (lowercase o), changeLanguage, setDefaultCustomRoutingConfig, setMapView, calculateDistance. Plus status singleton, addEventListener/removeEventListener from the emitter module, and PARENT_ACTION/CHILD_ACTION/PRIVATE_CHILD_ACTION/FEATURE_FLAG_SETS constants.
Known issues in v3 (addressed in 4.0.1)
postMessageuses wildcard'*'target origin — any parent/child frame can read map postMessage traffic.4.0.1introduces origin-validated postMessage via thesecurity/subsystem.highlightStyle()is dead code — the feature was never implemented. v3 keeps it as a no-op stub;4.0.1makes it throwMAPSTED-1093loudly. Note: theHighlightStyleTypeScript interface (type-only, used inentityDefaults.highlightandMapEntity.highlightfields) is still exported and remains valid — only the functionhighlightStyle()is permanently removed. See the v3 TypeDoc reference for full type details.- No structured error codes — errors are untyped strings.
4.0.1introducesMapstedError+ 34MAPSTED-1xxxcodes. centerOnMapoverlayhas inconsistent casing (oshould beO).4.0.1renames tocenterOnMapOverlay.PRIVATE_CHILD_ACTIONis exposed in the public API by accident.4.0.1removes it (CHL-27).
Upgrading
To upgrade from v3 to 4.0.1, follow the migration guide. Every v3 method name still works in 4.0.1 via the runtime shim; opt into strict mode during the migration audit (setStrictMode(true)) to catch every remaining call site.
See also: v3 legacy API reference | v3 TypeDoc | Current changelog (4.0.1)