Open
Description
I have the following code.
public class MapWidget {
Map itsMap;
public MapWidget(HTMLPanel inHTMLPanel) {
LatLng center = L.latLng(0, 0);
HTMLElement mapElement = new HTMLElement();
mapElement.innerHTML = inHTMLPanel.getElement().getInnerHTML();
itsMap = L.map(mapElement, new MapOptions.Builder(center, 1, 1).build());
}
public HTMLElement getElement(){
return itsMap.getContainer();
}
}
I get the following error in my console.
MapWidget.java:21 Uncaught TypeError: Cannot read property 'gwidgets' of undefined
The line the it complains about is
HTMLElement mapElement = new HTMLElement();
I believe it has to use a builder to create that but looking at what is available from L class there doesn't seem to be one.
I was following what was done in the following issue #2
Any help would be greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels