Closed rakesh-roshan closed 8 years ago
If you take a look at the com.gwidgets.api.leaflet.elemental package, there in an HTMLElement class. You can do something like
HTMLPanel panel = new HTMLPanel("your html");
//...
RootPanel.get().add(panel);
HTMLElement mapElement = new HTMLElement();
mapElement .setInnerHTML(panel.getElement().getInnerHTML());
final Map map = L.map(mapElement , new MapOptions());
Thanks a lot. I will try this.
Can I close this issue?
Yeah sure, I have not tried it, but I think it can be closed.
Allright. Just a small correction with today's release:
mapElement.innerHTML = panel.getElement().getInnerHTML();
instead of:
mapElement .setInnerHTML(panel.getElement().getInnerHTML());
Thanks a lot for the update
There are two APIs L.map to initialize map. One takes String id and other takes HTMLElement. How can I use HTMLPanel widget here. I think if you can provide HTMLElement class extending JavaScriptObject then HTMLPanel::getElement can be used here.