MCPcopy Create free account
hub / github.com/developmentseed/stac-react / onLoad

Function onLoad

example/src/pages/Main/Map.jsx:54–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 });
53
54 const onLoad = () => {
55 setMap(m);
56 m.addSource('items', {
57 type: 'geojson',
58 data: { type: 'FeatureCollection', features: [] },
59 });
60
61 m.addLayer({
62 id: 'items',
63 type: 'line',
64 source: 'items',
65 layout: {},
66 paint: {
67 'line-color': '#0080ff',
68 'line-width': 1,
69 },
70 });
71 };
72 m.on('load', onLoad);
73 drawControleRef.current = addDrawControl(m, handleDrawComplete);
74

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected