Map¶
- class geodesic.mapping.base.Map(**kwargs)[source]¶
Bases:
ipyleaflet.leaflet.Map
Light wrapper on top of an ipyleaflet.Map
A basic map with some basic initialization.
- add_feature_collection(layer_name, feature_collection, on_click=None, style_callback=None, **kwargs)[source]¶
add a feature colleciton to the map.
Adds a geodesic.FeatureCollection to the map as a GeoJSON layer.
- Parameters
layer_name (str) – display name of the layer
feature_collection (geodesic.stac.FeatureCollection) – the geodesic.FeatureCollection to add to the map
on_click (Optional[callable]) – a callback function that will be called when a feature is selected.
style_callback (Optional[callable]) – a function that will be called on each feature to return the style. Can be used to style each feature based on its properties.
**kwargs – additional kwargs passed to the layer constructor.