Giter Club home page Giter Club logo

Comments (3)

raphaelquast avatar raphaelquast commented on June 14, 2024 1

Hello,
This is indeed a consequence of some more fundamental changes in EOmaps v6.x since now all artists are managed explicitly.
This brings a lot of speed-up and enhancements (for multi-layering etc.) but at the moment requires all artists to be managed by EOmaps.

To re-use your code, you would need to explicitly add artists created with cartopy methods to the "blit-manager", e.g.:

artist = m.ax.add_feature(cf.OCEAN.with_scale("50m")) 
m.BM.add_bg_artist(artist, layer=m.layer)      # for "background artists (only updated on pan/zoom/resize)"
# m.BM.add_artist(artist, layer=m.layer)    # for "dynamically updated artists"

However, looking at your code I'd recommend leveraging some of EOmaps capabilities as it would also greatly simplify your code...

Here's how your code would look using EOmaps only:

from eomaps import Maps

m = Maps(crs=5179, frameon=False)
m.set_extent([124.598822,131.87222222,38.70000000,33.10000000], crs=4326)
m.add_feature.physical.ocean(scale=50, fc="#97b6e1")
m.add_feature.cultural.admin_0_boundary_lines_land(scale=10, fc="none", ec="k", lw=0.7, ls=":", zorder=5)

gdf = m.add_feature.cultural.admin_0_countries.get_gdf(scale=50)  # fetch GeoDataFrame for the feature
m.add_gdf(gdf[gdf.ADM0_A3 == "KOR"], facecolor="#97b6e1", edgecolor="#97b6e1")

from eomaps.

yun881201 avatar yun881201 commented on June 14, 2024

Thank you for your quick and detailed answer. I didn't know that updates. It's good to see the progress. I've been very busy since the end of last year until now, but if thins get better, I'll keep giving feedback for the progress of eomaps!

from eomaps.

raphaelquast avatar raphaelquast commented on June 14, 2024

Your feedback is highly appreciated!

I realize that the current behavior with cartopy and matpltoltlib functions is suboptimal.

There is already a fix implemented in the dev branch which will be merged in the next minor release of EOmaps.
It will cause all "unmanaged" artists to appear on the "base" layer of the map by default .

This way they will work just fine out of the box and the workaround will only be needed in the rare cases where you want to put a cartopy-artist on a different layer than the "base" layer.

from eomaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.