You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
application/geo+json query responses
Convert GeoJSON query responses to MapML using the built-in
M.geojson2mapml() API. Adds a new content-type branch in
QueryHandler.fetchFeatures() that handles application/json and
application/geo+json responses, with automatic detection of projected
vs geographic coordinates, since services may omit
the "crs" member or return non-standard GeoJSON.
Projected coordinate detection uses two signals:
- Explicit "crs" member in the GeoJSON response (non-null)
- Coordinate magnitude heuristic: values exceeding CRS:84 bounds
(|lon| > 180 or |lat| > 90) indicate projected units
When projected coordinates are detected, the cs meta is set to 'pcrs';
otherwise standard 'gcrs' (CRS:84) is used. Non-GeoJSON JSON responses
fall through gracefully to HTML rendering via try/catch.
Includes e2e tests covering three scenarios: standard CRS:84 GeoJSON,
GeoJSON with explicit crs member, and projected coordinates without
crs member (magnitude heuristic).
0 commit comments