use of org.activityinfo.ui.client.component.report.editor.map.LeafletMap in project activityinfo by bedatadriven.
the class MapReportView method addContent.
private void addContent() {
if (map == null) {
MapOptions options = new MapOptions();
options.setZoom(element.getContent().getZoomLevel());
options.setCenter(LeafletUtil.to(element.getContent().getCenter()));
options.setProperty("zoomControl", false);
options.setProperty("attributionControl", false);
map = new LeafletMap(options);
add(map);
layout();
}
if (map.isRendered()) {
syncContent();
} else {
map.addListener(Events.Render, new Listener<BaseEvent>() {
@Override
public void handleEvent(BaseEvent be) {
syncContent();
}
});
}
}
Aggregations