Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -160,7 +160,7 @@ def map_js():
|
|
160 |
(a, textBox) => {
|
161 |
const iframeMap = document.getElementById('map-fol').getElementsByTagName('iframe')[0];
|
162 |
const latlng = iframeMap.contentWindow.state_data;
|
163 |
-
if (!latlng) { return; }
|
164 |
textBox = `${latlng.lat},${latlng.lng}`;
|
165 |
document.getElementById('coords-tbox').getElementsByTagName('textarea')[0].value = textBox;
|
166 |
var a = countryCoder.iso1A2Code([latlng.lng, latlng.lat]);
|
@@ -485,7 +485,6 @@ if __name__ == "__main__":
|
|
485 |
kargs = {'value': empty_map()}
|
486 |
return gr.update(visible=False, **kargs), gr.update(value=image, visible=True), gr.update(value=text, visible=True), gr.update(value=df, visible=True), gr.update(visible=False), gr.update(visible=True),
|
487 |
|
488 |
-
|
489 |
def exit_(state):
|
490 |
if state['engine'].index > 0:
|
491 |
df = state['engine'].finish()
|
|
|
160 |
(a, textBox) => {
|
161 |
const iframeMap = document.getElementById('map-fol').getElementsByTagName('iframe')[0];
|
162 |
const latlng = iframeMap.contentWindow.state_data;
|
163 |
+
if (!latlng) { return [-1, -1]; }
|
164 |
textBox = `${latlng.lat},${latlng.lng}`;
|
165 |
document.getElementById('coords-tbox').getElementsByTagName('textarea')[0].value = textBox;
|
166 |
var a = countryCoder.iso1A2Code([latlng.lng, latlng.lat]);
|
|
|
485 |
kargs = {'value': empty_map()}
|
486 |
return gr.update(visible=False, **kargs), gr.update(value=image, visible=True), gr.update(value=text, visible=True), gr.update(value=df, visible=True), gr.update(visible=False), gr.update(visible=True),
|
487 |
|
|
|
488 |
def exit_(state):
|
489 |
if state['engine'].index > 0:
|
490 |
df = state['engine'].finish()
|