this one is weird: I take a LMap, add 2 Markers, zoom it to its content. The map is zoomed correctly, if attached to any layout (e.g. VerticalLayout), but not, if attached to a VerticalSplitPanel - see screenshot (left is VerticalSplitPanel, right is VerticalLayout).
This is the code:
{
HorizontalLayout hl = new MHorizontalLayout().withFullWidth().withFullHeight();
{
Label label = new MLabel("This one doesn't zoom");
VerticalSplitPanel vsp1 = new VerticalSplitPanel(label, createMap());
vsp1.setHeight("100%");
hl.addComponent(vsp1);
}
{
Label label = new MLabel("This one works fine");
VerticalLayout vsp2 = new MVerticalLayout(label, createMap()).withFullHeight();
hl.addComponent(vsp2);
}
Window w = new Window("Maps", hl);
w.setWidth("1000px");
w.setHeight("800px");
w.center();
UI.getCurrent().addWindow(w);
}
private Component createMap()
{
map = new LMap();
map.addBaseLayer(new LOpenStreetMapLayer(), "OSM");
map.addComponent(new LMarker(50d,10d));
map.addComponent(new LMarker(50.1d,10.1d));
map.setSizeFull();
map.zoomToContent();
return map;
}
this one is weird: I take a LMap, add 2 Markers, zoom it to its content. The map is zoomed correctly, if attached to any layout (e.g. VerticalLayout), but not, if attached to a VerticalSplitPanel - see screenshot (left is VerticalSplitPanel, right is VerticalLayout).
This is the code:
`` I'm using Vaadin 7.7.14 and VLeaflet 1.06.