Skip to content

Commit

Permalink
Merge branch 'master' into core
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs committed Sep 19, 2024
2 parents 7cc148e + 1adb1a5 commit 21167d8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion geemap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Qiusheng Wu"""
__email__ = "giswqs@gmail.com"
__version__ = "0.34.1"
__version__ = "0.34.2"

import os

Expand Down
10 changes: 10 additions & 0 deletions geemap/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@


import os
import re
import shutil
import urllib.request
from collections import deque
Expand Down Expand Up @@ -413,6 +414,11 @@ def js_to_python(
lines = check_map_functions(lines)

for index, line in enumerate(lines):

if "Map.setOptions" in line:
# Regular expression to remove everything after the comma and before ');'
line = re.sub(r",[^)]+(?=\);)", "", line)

if ("/* color" in line) and ("*/" in line):
line = (
line[: line.index("/*")].lstrip()
Expand Down Expand Up @@ -751,6 +757,10 @@ def js_snippet_to_py(
in_js = temp_file_path(".js")
out_py = temp_file_path(".py")

in_js_snippet = re.sub(
r"([a-zA-Z0-9_]+)\s*:", r'"\1":', in_js_snippet
) # Add quotes around keys

try:
with open(in_js, "w") as f:
f.write(in_js_snippet)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "geemap"
version = "0.34.1"
version = "0.34.2"
dynamic = [
"dependencies",
]
Expand Down Expand Up @@ -125,7 +125,7 @@ universal = true


[tool.bumpversion]
current_version = "0.34.1"
current_version = "0.34.2"
commit = true
tag = true

Expand Down

0 comments on commit 21167d8

Please sign in to comment.