Skip to content

Commit

Permalink
Update lonboard view_state and pre-commit (#712)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)

* Update lonboard view_state

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Qiusheng Wu <giswqs@gmail.com>
  • Loading branch information
pre-commit-ci[bot] and giswqs committed Apr 9, 2024
1 parent 5b6e33d commit 01d3fff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
Expand Down
6 changes: 3 additions & 3 deletions leafmap/deckgl.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(
_height=height,
show_tooltip=show_tooltip,
layers=layers,
_initial_view_state=kwargs,
view_state=kwargs,
)

def add_gdf(
Expand Down Expand Up @@ -169,7 +169,7 @@ def add_gdf(

lon, lat = convert_coordinates(x, y, src_crs, "EPSG:4326")

self._initial_view_state = {
self.view_state = {
"latitude": lat,
"longitude": lon,
"zoom": zoom,
Expand Down Expand Up @@ -260,7 +260,7 @@ def add_layer(
from lonboard._viewport import compute_view

try:
self._initial_view_state = compute_view([self.layers[-1].table])
self.view_state = compute_view([self.layers[-1].table])
except Exception as e:
print(e)
else:
Expand Down

0 comments on commit 01d3fff

Please sign in to comment.