Replace Google Maps with Esri (ArcGIS) basemaps
Swaps the map provider behind the existing provider-neutral JobMapProps interface: EsriJobMap.tsx (ArcGIS Maps SDK) replaces GoogleJobMap.tsx, loaded via esri-loader's CDN script rather than bundled through webpack — next dev's inline source-mapping of a library this size was OOM-killing the whole host on first compile. Also fixes a bug in the fit-bounds camera call: view.goTo() needs real Graphic/Geometry instances, not plain point literals, so the map was never zooming to the plotted points. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import dynamic from 'next/dynamic';
|
||||
import type { JobMapProps } from './types';
|
||||
|
||||
// Provider dispatcher. Google is the only implementation for now; an Esri
|
||||
// implementation would be selected here (e.g. via NEXT_PUBLIC_MAP_PROVIDER).
|
||||
const GoogleJobMap = dynamic(() => import('./google/GoogleJobMap'), { ssr: false });
|
||||
// Provider dispatcher. Esri (ArcGIS) is the only implementation.
|
||||
const EsriJobMap = dynamic(() => import('./esri/EsriJobMap'), { ssr: false });
|
||||
|
||||
export default function JobMap(props: JobMapProps) {
|
||||
return <GoogleJobMap {...props} />;
|
||||
return <EsriJobMap {...props} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user