Closed baldulin closed 2 years ago
1. Can you run `prettier --write` on all the changed files? I suggest you set your IDE to do this automatically as well.
Oh that was a good hint I thought this was done by the git-hooks automatically. Also made me realize that I'm not that used to yarn
to be honest.
I also forgot to run yarn build
this lead to a lot of typescript bugs I had to fix. So there's some changes now.
And I made the GeoJsonFeature
component useful.
- Can you also submit a PR to the pigeon-maps.js.org website repo with the new components?
Yep should be done.
Great work! Thanks for all of this and apologies for the long delay.
Version 0.21.0 released with the changes.
Hey, I warned you I needed more features this is currently a very simple approach to a GeoJson Component. So I would argue that one could easily merge it into the main project without creating its own package for it.
It implements the following geometries (which should be all of them):
The features can be styled using either
svgAttributes
for all features, or a callbackstyleCallback
which will also notify if a feature is hovered.And they support the same events as the marker does, a bit copy&paste there.
I think people might need or require a lot more (popups for instance) but GeoJson is a really easy standard, and at least if someone needs more than the basic features provided here they will be able to look in a simple reference implementation and extend it themselves.
Right now the added components will be:
GeoJson
renders geojson dataGeoJsonLoader
an overly simple component that will load geojson data from an url (this is just intended for a quick & dirty solution)GeoJsonFeature
renders a single geojson featureEdit: Forgot to add this issue