Skip to content

EOmaps v3.2

Compare
Choose a tag to compare
@raphaelquast raphaelquast released this 07 Mar 18:21
· 2737 commits to master since this release
3486d98

A release with some nice new features and a lot of fixes & improvements.
... Note: many parts of the πŸ“š documentation have been updated with small code-examples and images!

🌳 New

  • ⭐ m.add_annotation and m.add_marker now support adding multiple objects in one go!
  • ⭐ raster-shading with datashader now supports 2D arrays for values and coordinates (e.g. curvilinear QuadMeshes)
  • ⭐ there's a new function m.show_layer(name) that provides a shortcut for switching the currently displayed layer
  • ⭐ layer-names can now be arbitrary strings! (e.g. Maps(layer=...) or m.plot_map(layer=...))
    • ❗ The layer-name "all", has a special meaning: all features on this layer will be visible in ALL other layers!

⭐ 🦜 Utility widgets !

EOmaps now has a slot for utility widgets that provides some nice tools to simplify common tasks.

  • Utilities are accessible via m.util.<...>

At the moment, there are 2 utilities that simplify switching between layers:

  • ⭐ m.util.layer_selector() : get a "legend-like" object with buttons that can be used to switch between layers
  • ⭐ m.util.layer_slider() : get a slider that can be used to switch between layers

Checkout the 🦜 Utility widgets section in the docs and the updated example: πŸ›° WebMap services and layer-switching


⭐🌈 Updates for the scalebar

The scalebar has been re-worked for a much improved "out-of-the-box" usability.

  • By default, the scalebar is now automatically re-scaled on pan/zoom events based on the current extent of the map.
    • the new autoscale_fraction argument can be used to set the relative size of the (autoscaled) scalebar
    • the new auto_position argument can be used to set the position targeted for automatic re-positioning on pan/zoom events.
  • The background patch is now automatically scaled to enclose the labels.
  • When dragging the scalebar with the mouse, it is now immediately released if you release the mouse-button.
m.add_scalebar()               # get a scalebar that autoscales itself on pan/zoom events
m.add_scaleblar(scale=10000)   # get a scalebar with a fixed segment-separation of 10km

🌦️ changes

  • some changes to m.new_layer :
    • It now supports the additional layer kwarg
    • ❗ By default ONLY the "plot-shape" is now copied to the new layer.
      • this avoids side-effects from unintentional copying of plot-specs (vmin vmax etc.)
      • you can still copy plot-specs by using m.new_layer(copy_plot_specs=True)
  • Maps.from_file and Maps.read_file and m.new_layer_from_file now support using already opened NetCDF and GeoTIFF files

βš™οΈ fixes

  • fix treatment of colorbar orientation in m.figure.set_colorbar_position
  • fix reprojection of wms-layers with a native crs specified as "EPSG:3857"
  • fix sorting of layer-names
  • avoid identification of pixel-ID if no pick-callback is attached
  • fix label-axis should not respond to navigation events
  • fix adding multiple markers in one go
  • fallback to WSG84 boundary in wms_layer.set_bbox_to_extent()