Skip to content

Major refactor for EOmaps v9.0#270

Open
raphaelquast wants to merge 180 commits intodevfrom
refactor
Open

Major refactor for EOmaps v9.0#270
raphaelquast wants to merge 180 commits intodevfrom
refactor

Conversation

@raphaelquast
Copy link
Copy Markdown
Owner

@raphaelquast raphaelquast commented Feb 5, 2026

EOmaps v9.0

EOmaps v9.0 brings several major updates:

  • The codebase has been extensively refactored with the aim to make it more accessible
  • Several new features have been added to make EOmaps code shorter and cleaner

⚠️ Deprecations and breaking changes

  • MapsGrid objects no longer allow the kwargs m_inits and ax_inits
  • Maps.set_classify_specs is now deprecated in favor of Maps.set_classify
  • Maps.classify_specs is now a private-property ( Maps._classify_specs )
  • The obsolete Maps.CLASSIFIERS property has been removed
  • Maps.text() has been removed in favor of Maps.add_text()
  • Maps.indicate_extent() has been removed in favor of Maps.add_extent_indicator()
  • Maps.data property is removed. You can access the underlying dataset via Maps.data_specs.data

🌦️ Changes

  • Major internal code re-structuring

🌳 New

A new way to create/access layers!

Simply index Maps-objects (m["my_layer"] or use dot-access via the LayerAccessor m.l.my_layer!

  • create / access layers on a map with ease
  • make syntax more clear
    • "<layer_name>__<sublayer>" (e.g. m.l.my_layer, and m.l.my_layer__1 are both on the "my_layer" layer)
from eomaps import Maps
m = Maps()
m.add_feature.preset.coastline()
m["land"].add_feature.preset.land()     # populate the "land" layer with a feature

Maps now support the + operator (and sum) to distribute actions across multiple maps

from eomaps import Maps
m = Maps(ax=211)
m2 = m.new_map(ax=212)
# add a feature to both maps
(m+m2).add_feature.preset.coastline()

# create a new "ocean" layer on both Maps-objects and add the ocean preset-feature
(m+m2).l.ocean.add_feature.preset.ocean()
# add a peak-layer callback to both maps
sum(m, m2).cb.click.attach.peek_layer("ocean")

Better control of method execution

The Maps.lazy property provides control for the lazy-execution of Maps-object methods.

from eomaps import Maps
Maps.lazy = False  # always execute all methods immediately

with Maps.lazy:
    # temporarily activate lazyness

with Maps.lazy(False):
    # temporarily disable laziness

MapsGrids

MapsGrid objects now support the full range of functionalities offered by Maps objects.

🔨 Fixes

  • ensure shared callback events are executed only once per map
  • avoid recursions in Maps.join_limits
  • remove duplicated point in geod-circle vertices
  • fix resampling artefacts for logos with transparent areas
  • fix issues with scalebar performance during pan/zoom
  • update readthedocs to use latest OS version

raphaelquast and others added 30 commits February 5, 2026 20:31
remove obsolete on_activation method (equal to m.ll.my_layer(...) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant