ClickData on Map not working

Hey, so for some reason my clickData on a Map doesnt work anymore, yesterday it did. HoverData and SelectedData works fine, but when i click on the Datapoint on my map nothing happens, only after i use one of the select features of plotly! Whats the reason for this?

#import dash and plotly
import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
from dash.dependencies import Input, Output
import json
import requests

mapbox_access_token = ‘mytoken’

app = dash.Dash( name )

datamap= go.Data([go.Scattermapbox(
lat=[‘50.91427’],
lon=[‘6.92827’],
mode=‘markers’,
marker=go.scattermapbox.Marker(
size=30,
color=’#000000
),
text=[‘Pötzl’]
)])

layoutmap = go.Layout(
height=700,
autosize=True,
showlegend=False,
hovermode=‘closest’,
geo=dict(
projection=dict(type=“equirectangular”),
),
mapbox=dict(
accesstoken=mapbox_access_token,
bearing=1,
center=dict(
lat=50.933,
lon=10.5
),
pitch=0,
zoom=5,
style=‘light’
),
)

fig = dict(data=datamap, layout=layoutmap)

app.layout = html.Div(id=‘lasso2’,children=[
html.Div(id=‘lasso’, children=[
]),
html.Div(id=‘zwei’, children=[
dcc.Graph(id=‘graph’, figure=fig)
])
])

@app.callback(
Output(‘lasso’, ‘children’),
[Input(‘graph’, ‘clickData’)]
)
def display_data(Data):
if Data is None:
return html.H2(‘Found Data:’)
else:
return html.H2(‘Found Data:’ + str(Data))

if name == ‘ main ’:
app.run_server(host=‘127.0.0.1’, port=8053, debug=True)

1 Like

I have the same issue. Did you ever figure this out?

I have figured this out, but so long ago that i unfotunately dont remember what the problem was. Im sorry