-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Deprecate/Remove Style
component and unify MapView
s prop styleURL
and styleJSON
#512
Comments
Style
componentStyle
component, unify MapView
s prop styleURL
and styleJSON
Style
component, unify MapView
s prop styleURL
and styleJSON
Style
component and unify MapView
s prop styleURL
and styleJSON
I'd vote for removing it now. Seems to me like a straightforward change that is a cleaner approach and breaking changes like these can be expected with a major version release. Just my two cents (: Thank you for your work! |
@cashc thanks for your comment! I'm with you on immediate removal of the The migration towards A migration doc should be a must, you are right! |
@tyrauber would love your feedback on this one 🙏. |
I agree with htis. |
Are you also fine with removing the |
If it is not needed. Reviewing the style component it looks like it is responsible for parsing the JSON and adding it to the map based on the style spec. Does |
Yeah it's not needed, see my initial comment:
Right now a use case could only be to render layers separate from the map style injected from a style json – but that should be the users concern and not be covered by this library. |
🎉 This issue has been resolved in version 10.0.0-beta.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Working through the examples, I noticed for the first time the
Style
component. The component basically allows to read astyle.json
and it will createSource
andLayer
components, to render the style partially.This is confusing, because it's also possible to pass a JSON style via
styleJSON
onMapView
, so this functionality is duplicated. It turns out, initially there was no support for local JSON styles at all. Then theStyle
component was introduced, before finallyMapView
got support for alsostyleJSON
. The author of both did also recommend to keep only the functionality onMapView
throughstyleJSON
, but that component seemed to got forgotten.I would like to do the following:
Style
componentMapView
styleJSON
, this is a user space concern, nothing this library has to solvestyleURL
andstyleJSON
to a new propmapStyle
, just likereact-map-gl
uses,mapStyle
should then accept either a URL or a Style objectSmoothest migration would be first to deprecate
Style
andMapView
sstyleURL
andstyleJSON
for one major version and then drop on the next major version. Immediate removal would be less work.The text was updated successfully, but these errors were encountered: