Hi and thank you for the effort you put into this library, it is truly great!
I am trying to use the "ol-stac" library, which extends OL (specifically the LayerGroup), to read items directly from STAC catalogs. Here's the example in the official OL docs.
Now I can't really figure out how to do this. My best guess was to use the extend function from the catalogue, and then use an <olStac /> tag. Here's my code:
import { default as STAC } from "ol-stac";
import proj4 from "proj4";
import { register } from "ol/proj/proj4.js";
import { extend } from "@react-ol/fiber";
register(proj4); // required to support source reprojection
extend({ olStac: STAC });
export const StacLayer = ({ url }: { url: string }) => {
return <olStac url={url} displayPreview={true} />;
};
It does not work, and I do not think it should tbh I get the following error:
React-Openlayers-Fiber Error: Couldn't add this child to this container. You can specify how to attach this type of child ("null") to this type of container ("Map") using the "attach" props
Well... Any help would be much appreciated
Hi and thank you for the effort you put into this library, it is truly great!
I am trying to use the "ol-stac" library, which extends OL (specifically the LayerGroup), to read items directly from STAC catalogs. Here's the example in the official OL docs.
Now I can't really figure out how to do this. My best guess was to use the extend function from the catalogue, and then use an
<olStac />tag. Here's my code:It does not work, and I do not think it should tbh I get the following error:
Well... Any help would be much appreciated