hello all,
I want to use a component in dash like this
app.layout = html.Div(id=“container”,className = “amap-container”, style ={“width”:“1600px”,“height”:“800px”})
And the component is a container defined in local javascript.
I use something like this
var map = new AMap.Map('container', { zoom:11, center: [116.397428, 39.90923], viewMode:'3D' });
The container is not be loaded.
But when I customerize the web with app.index_string like this
app.index_string = ''' <!DOCTYPE html> <html> <head> {%metas%} <title>{%title%}</title> {%favicon%} {%css%} <style> html, body, #container { width: 100%; height: 100%; } </style> </head> <body> <div>My Custom header</div> {%app_entry%} <div id="container"> </div> <footer> {%config%} {%scripts%} {%renderer%} </footer> <div>My Custom footer</div> </body> </html> '''
then the container can be loaded.
So how can I use html.Div(id=“container”) and load the container?