EOmaps v3.2
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
andm.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=...)
orm.plot_map(layer=...)
)- β The layer-name
"all"
, has a special meaning: all features on this layer will be visible in ALL other layers!
- β The layer-name
β π¦ 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 new
- 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)
- this avoids side-effects from unintentional copying of plot-specs (
- It now supports the additional
Maps.from_file
andMaps.read_file
andm.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()