Closed rsimon closed 6 months ago
I made a few amendments:
geospatial
.interface
to type
.I made a few tweaks to adapt the code style. I also ran yarn flow
and that didn't report any errors. But not sure if I'm using it wrong...
Regarding the interface
vs. type
issue: that definitely was one of the issues. I'm one step further, but it's still not working. Storybook complains about @peripleo not exporting Feature
and FeatureCollection
for example. Both of which are interfaces
. (In fact the log output lists all of the exports - and none of the interface
s are there.)
Is there anything we can change about the configuration to make Storybook recognize interfaces? Otherwise, I'll change all the interfaces defined in @peripleo to types.
(Partial) success at last! Thanks for the hints - yes, those deps should have been under dependencies
not devDependencies
of course. Sorry for the mishap. (I shouldn't have copy-and-pasted those into the package.json after all...)
After that, the component showed up in storybook. A few things were still missing, which I added:
I also added the // @flow
directive. This did seem to change at least something. (The Flow status indicator in VS code now shows that the file is begin covered.) But otherwise had no effect on syntax highlighting. Still getting errors shown about TS not being allowed in .js
files. I'll enquire with Camden.
Closing in favor of #252.
In this PR
This PR adds a new component to the
geospatial
package:<CoreDataPlace>
. This component retrieves a Place resource from the Core Data API, and renders it's GeoJSON geometry on a mapLibre map.CoreDataPlace takes the following input props:
fillStyle
,strokeStyle
andpointStyle
Note: for now, this component is minimal, and supposed to serve as an example only!