Hi everyone,
I am excited to share a new open-source component I published to PyPI today: dash-openlayers!
. This package bridges that gap, allowing you to build and control interactive OpenLayers maps natively in Python using Plotly dash.
• PyPI: dash-openlayers · PyPI
• GitHub: GitHub - rakrsh/dash-openlayers: A dash wrapper around OpenLayers - GIS rendering engine · GitHub
## Quick Start Example
Here is a quick snippet to show you how easy it is to get a map up and running:
import dashfrom dash import htmlimport dash_openlayers as dol
app = dash.Dash(_name_)
app.layout = html.Div([
html.H1("Hello OpenLayers in Dash!"), dol.Map( id='map', center=\[-96, 37.8\], # Center coordinates zoom=4, children=\[ dol.TileLayer(), # Standard OSM or custom tiles \], style={'width': '100%', 'height': '500px'} )])
if _name_ == ‘_main_’:
app.run_server(debug=True)
##
Current Features & What’s Next
This is the initial release, and I am planning to actively expand its capabilities. Right now, it supports core map rendering and base tiles, but I plan to add:
* Comprehensive GeoJSON / Vector Layer support
* Built-in drawing and measurement tools
* Dash callbacks linked to map clicks, zooms, and bounding box changes
##
Feedback & Contributions Welcome!
Since this was just published today, I would love to get the community’s thoughts.
* What features from OpenLayers do you need most in your Dash apps?
* If you run into any bugs or have feature requests, please drop a comment here or open an issue on the GitHub Repository.