Honua honua-migrate codemod — before / after · Migrate web map code ← samples starting…

Existing ArcGIS Maps SDK for JavaScript code runs against Honua Server with minimal or zero changes. The client-compat shims accept the same FeatureLayer, Search, and map.add() calls; the honua-migrate codemod optionally rewrites them to the native @honua/sdk-js equivalent. Same app, same Maui zoning layer — the live map on the right is the migrated code running.

Before

Before: the original web map code

@arcgis/core
// widgets pointed at a GeoServices REST FeatureServer
import FeatureLayer from "@arcgis/core/layers/FeatureLayer";
import MapView from "@arcgis/core/views/MapView";
import Search from "@arcgis/core/widgets/Search";

const zoning = new FeatureLayer({
  url: "https://demo.honua.io/rest/services/" +
       "maui-zoning/FeatureServer/0",
  outFields: ["*"],
});

map.add(zoning);
const view = new MapView({ container: "map", map });
view.ui.add(new Search({ view }), "top-right");
runnpx honua-migrate ./src↓
After

client-compat shim · @honua/sdk-js

zero-to-minimal diff
// same widget names, resolved by the client-compat shim —
// or the codemod rewrites to native @honua/sdk-js:
import { FeatureLayer, MapView, Search }
  from "@honua/sdk-js/client-compat";

const zoning = new FeatureLayer({
  // OGC API Features items — native GeoJSON
  url: "https://demo.honua.io/ogc/features/" +
       "collections/maui-zoning",
  outFields: ["*"],
});

map.add(zoning);           // unchanged
const view = new MapView({ container: "map", map });
view.ui.add(new Search({ view }), "top-right");

The shim maps the original widget idioms onto Honua's protocol surfaces — FeatureLayer.url resolves to GeoServices REST or /ogc/features/collections/…/items (GeoJSON), and map.add() / Search behave as before. The map on the right renders maui-zoning loaded from that OGC items endpoint — the migrated code, live.

Esri, ArcGIS, and the Esri product names used here are trademarks, registered trademarks, or service marks of Esri in the United States and other countries. They identify the products Honua is compatible with; Honua is not affiliated with, sponsored by, or endorsed by Esri.