Metadata-Version: 2.4
Name: dash-openlayers
Version: 0.0.1
Summary: A Dash wrapper around OpenLayers - GIS rendering engine
Author-email: Ravi Sharma <ravikr731@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Ravi Sharma
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/rakrsh/dash-openlayers
Project-URL: Issues, https://github.com/rakrsh/dash-openlayers/issues
Classifier: Framework :: Dash
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: dash>=2.18.2
Dynamic: license-file

# dash-openlayers

OpenLayers mapping components for Plotly Dash. Build maps declaratively in
Python, use OpenLayers for rendering and editing, and receive map events and
feature data in Dash callbacks.

## Install

```bash
pip install dash-openlayers
```

Requires Python 3.10 or newer. Dash is installed as a package dependency.

## Quick Example

```python
import dash
from dash import Input, Output, html
import dash_openlayers as dol

app = dash.Dash(__name__)
app.layout = html.Div(
    [
        dol.Map(
            id="map",
            center=[10, 45],
            zoom=5,
            children=[
                dol.TileLayer(id="osm", source="OSM"),
                dol.VectorLayer(
                    id="places",
                    geojson={
                        "type": "FeatureCollection",
                        "features": [
                            {
                                "type": "Feature",
                                "geometry": {"type": "Point", "coordinates": [10, 45]},
                                "properties": {"name": "Sample place"},
                            }
                        ],
                    },
                ),
                dol.SelectInteraction(id="selection", layerId="places"),
                dol.LayerControl(id="layers"),
            ],
            style={"height": "600px"},
        ),
        html.Pre(id="selection-output"),
    ]
)


@app.callback(Output("selection-output", "children"), Input("selection", "selectedGeoJSON"))
def show_selection(selection):
    return str(selection or "Select a feature")


if __name__ == "__main__":
    app.run(debug=True)
```

## Components

- Maps, synchronized view state, custom Proj4 projections, and click events.
- OSM/XYZ, GeoJSON vector, WMS, WMTS, MVT vector-tile, and WFS GeoJSON layers.
- Draw, select, modify, snapping, per-feature topology validation, and undo/redo.
- GeoJSON/WKT input and GeoJSON/WKT/TopoJSON edit output.
- Point clustering, decluttering, and layer visibility/opacity/order controls.

WFS-T writes are not performed by `WFSLayer`; see the guarded example in
[`tests/demos/wfs_demo.py`](tests/demos/wfs_demo.py) for an application-owned
transaction callback.

## Documentation

- [Quickstart](docs/quickstart.md)
- [Usage guide](docs/usage.md)
- [API reference](docs/api.md)
- [Architecture](docs/architecture.md)
- [Testing](docs/testing.md)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and workflow.
