-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Feature request: add a generic function that mimics mapview::mapview()
#57
Comments
I was thinking the same in the past few weeks. It's a bit annoying having to type out so much code to have a quick preview of the dataset with popups of all variables upon clicking a feature. For full customization I would of course go for the full syntax of |
FWIW, I am just starting to look into
I am just starting to get an idea of the API of |
Excellent @tim-salabim! A couple things: -- Globe view is supported in mapgl / MapLibre with -- Others have brought up the idea of supporting deck.gl layers in mapgl (e.g. #37) but I don't know how much development time that would take. -- There are a couple limitations of mapgl worth considering that I may end up resolving. As opposed to other R mapping packages, mapgl doesn't include color palette functions, and relies on users setting up colors similar to how they'd do it in Mapbox / MapLibre themselves. It also doesn't include automated legend support (which I suppose Leaflet doesn't really do either). |
@walkerke here's a first impression of what There's quite a lot left to implement, but this does look promising IMHO :-) Note, the standard geojson layer takes about 30 secs to load! somehow the gif won't render properly, so you'd have to take my word for it |
Hm, i was thinking of adding a PR either here or in mapview to support something like this because I've also been craving a quick-map function for maplibre/mapgl. But the adding to mapview felt less approachable -- just learning the existing code and structure of the package enough to add to it -- felt like a bigger lift than writing a quick function similar to what @atsyplenkov already has above (but with more flexibility to support something like the |
Hi @kmcd39 My current plan is to finish https://github.com/tim-salabim/geoarrowDeckgl before moving on to implementing anything in mapview (see also the discussion in #71). In any case, let me know if you would like to contribute a maplibre/mapbox based mapview method while I still finish up geoarrowDeckgl. |
Okay! @tim-salabim I have a generic function in my own repo for now -- mapglview I used code from @atsyplenkov above to make the tooltips and existing code i had to allow a several options for color interpolation. I think it's pretty smooth and flexible as a starting place! I implemented the "start a new map or add a layer" very differently from what is currently done in mapview. Instead of adding the + sign as a method to add layers, the function adapts based on the class of the first argument. Some examples: |
@tim-salabim @kmcd39 I can help you with that too. If you can create a special branch for it — would be terrific. |
@kmcd39 @atsyplenkov I've created an issue and a corresponding branch in the mapview repo for development of Feel free to fork and start hacking away :-) And thanks for your support on this!! |
@kmcd39 just FYI, mapview generally uses the |
Hi Kyle 👋
Could you please consider adding a function similar to what
mapview::mapview()
does? I.e., a generic one that takes ansf
/sfc
object and plots it depending on the geometry. For example, I foresee it to be something like the following.I am interested because sometimes I just want to visually inspect the geometry, but I found mapview a bit slow. And mapgl is so responsive!
If you like the approach, I am more than happy to create a PR. It can be scaled for
terra
support.Created on 2024-11-13 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: