update to new streamlit-version and using st_folium for map-display
This commit is contained in:
@@ -2057,7 +2057,7 @@ def maptiles_kachelkoordinaten(eingabetext):
|
||||
try:
|
||||
la = float(text[0])
|
||||
lo = float(text[1])
|
||||
if not la < -85.05113 and not la > 85.05113 and not lo < -180 and not lo > 180:
|
||||
if not la < -83.0 and not la > 83.0 and not lo < -180 and not lo > 180:
|
||||
x, y = helper.dec_to_maptiles(la, lo, zoom)
|
||||
ausgabetext += f"|{zoom:>2}|{x:<10}|{y}|\n"
|
||||
except ValueError:
|
||||
@@ -2065,17 +2065,18 @@ def maptiles_kachelkoordinaten(eingabetext):
|
||||
return ausgabetext, None
|
||||
elif len(text) == 2:
|
||||
ausgabetext = ":violet[Maptiles->DEG,DEC] \n|:blue[Zoom]|:blue[DEG]|:blue[DEC]|\n|-|-|-|\n"
|
||||
lat_list, lon_list = [], []
|
||||
lat_list, lon_list, label_list = [], [], []
|
||||
for zoom in range(2, 26):
|
||||
try:
|
||||
la, lo = helper.maptiles_to_dec(int(text[0]), int(text[1]), zoom)
|
||||
if not la < -85.05113 and not la > 85.05113 and not lo < -180 and not lo > 180:
|
||||
if not la < -83.0 and not la > 83.0 and not lo < -180 and not lo > 180:
|
||||
ausgabetext += f"|{zoom:>2}|{helper.dec_to_deg(la, lo):<23}|{round(la, 5)} {round(lo, 5)}| \n"
|
||||
lat_list.append(la)
|
||||
lon_list.append(lo)
|
||||
label_list.append(zoom)
|
||||
except OverflowError:
|
||||
pass
|
||||
return ausgabetext, pd.DataFrame({'lat': lat_list, 'lon': lon_list})
|
||||
return ausgabetext, pd.DataFrame({'lat': lat_list, 'lon': lon_list, 'label': label_list})
|
||||
else:
|
||||
return ":red[Zahlen konnten nicht ermittelt werden!]", None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user