Skip to content

EOmaps v4.4

Compare
Choose a tag to compare
@raphaelquast raphaelquast released this 21 Jul 18:11
· 2205 commits to master since this release
0d64306

A release that introduces 2 new functionalities: m.add_line, m.cb.move and the ability to use keypress-modifiers for callbacks!

🌳 New

🚲 A new method to quickly draw paths on a map!

  • ⭐ m.add_line(): connect points via geodesic (or straight) lines!
    • specify number of intermediate points per line-segment

πŸ›Έ New features for callbacks!

πŸ‘Ύ Keypress-modifiers

It is now possible to assign multiple callbacks to the same mouse-button and use keyboard-shortcuts
to switch between the assigned callbacks!
(e.g. the callback will only be executed if the corresponding button is pressed on the keyboard)

  • 🌟 simply provide the modifier of choice with the modifier=... argument!

    • e.g.: m.cb.click.attach.annotate(modifier="a") : this callback will only be executed if the "a" key is pressed
  • 🌟 You can make modifiers "sticky" (e.g. to keep them activated after the button is released) by using:

    • m.cb.click.set_sticky_modifiers("a", "b", "c")
    • "sticky modifiers" are assigned separately for click, pick and move callbacks
    • to release a "sticky modifier" press ctrl + <modifier key> or escape
  • checkout the corresponding section in the πŸ“– documentation!

⭐ move callbacks

There's now an explicit container to attach callbacks that are executed
on mouse movement if NO button is clicked

  • NOTE: use m.cb.click.attach... to execute callbacks on mouse-movement if a button is clicked!
    • and set on_motion=False to avoid executing the click-callback on mouse-movements
m = Maps()
m.add_feature.preset.coastline()
m.cb.move.attach.annotate()
m.cb.move.attach.mark(modifier=1, radius=2, radius_crs=4326, fc="none", ec="r")

🌦️ Changes

  • ❗ m.cb.click.attach.mark() now uses permanent=False by default

  • 🏞️ NaturalEarth features have been updated

    click for a list of new features
    {
    10m_cultural:  {'admin_0_countries_iso', 'parks_and_protected_lands', 'admin_0_countries_tlc'}
    10m_physical:  {'bathymetry_G_4000', 'graticules_20', 'bathymetry_K_200', 'bathymetry_E_6000', 'graticules_1', 'bathymetry_A_10000', 'bathymetry_F_5000', 'bathymetry_C_8000', 'bathymetry_B_9000', 'bathymetry_L_0', 'bathymetry_H_3000', 'bathymetry_I_2000', 'wgs84_bounding_box', 'bathymetry_J_1000', 'graticules_5', 'bathymetry_D_7000', 'graticules_30', 'graticules_10', 'graticules_15'}
    110m_physical:  {'graticules_15', 'graticules_20', 'graticules_1', 'wgs84_bounding_box', 'graticules_5', 'graticules_30', 'graticules_10'}
    50m_physical:  {'graticules_20', 'graticules_1', 'wgs84_bounding_box', 'graticules_5', 'graticules_30', 'graticules_10', 'graticules_15'}
    }

πŸ”¨ Fixes

  • fix sharing boundary and inset-marker properties for inset-maps
  • fix issues with invalid clipping shapes
  • fix issues with geometries that cannot be exploded
  • make sure temporary artists are cleared prior to executing callbacks
  • fix issues with dynamically updated legends and temporary artists
  • fix error when trying to update colorbar-arrows without a colorbar
  • avoid re-fetching WebMap tiles if extent remains the same
  • fix unnecessary re-draws of artists after overlay-actions