Skip to content

Major refactor for EOmaps v9.0#270

Open
raphaelquast wants to merge 94 commits intodevfrom
refactor
Open

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

Conversation

@raphaelquast
Copy link
Owner

@raphaelquast raphaelquast commented Feb 5, 2026

EOmaps v9.0

EOmaps v9.0 brings several major updates:

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

⚠️ 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: LayerNamespace Maps.l and LazyLayerNamespace Maps.ll

  • 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.l.land.add_feature.preset.land()     # populate the "land" layer with a feature
m.ll.ocean.add_feature.preset.land()   # populate the "ocean" layer with a feature when it becomes visible

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")

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

raphaelquast and others added 30 commits February 5, 2026 20:31
remove obsolete on_activation method (equal to m.ll.my_layer(...) )
(check is faulty in case dataset has 0 as first value
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