vegegoku on master
Fix sample code about tree menu… (compare)
@howudodat If you are welling to gve this a test I have fixed the depndencies and added github actions to the repository, a HEAD-SNAPSHOT is in its way ... and if you test this and it works for you we can do a release
ok the app compiles now, so I think we are good there.
I also have the demo running, but I dont get a map in my app. I am probably missing a simple step. One that I can't deduce from the nalu framework
public class PnlHomes extends FlexLayout implements IToolbarListener {
protected FlexLayout content = FlexLayout.create();
protected Map map = null;
protected MapView mapview = null;
public PnlHomes() {
initUI();
}
protected void initUI() {
content.setDirection(FlexDirection.TOP_TO_BOTTOM);
this.appendChild(content);
initHeader();
initContent();
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
initPostVisible();
}
});
}
protected void initHeader() {}
protected void initContent() {
// create all the elements
mapview = new MapView("homesmap");
map = MapPresets.getOsmMap("homesmap");
// set attributes necessary to the elements
// add to the container
content.appendChild(mapview.element());
}
protected void initPostVisible() {}
}
content
btw?
mapcard = new MapCard("homesmap");
mapcard.setHeight("1000px");
map = MapPresets.getOsmMap("homesmap");
content.appendChild(FlexItem.create().appendChild(mapcard));
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
map.updateSize();
}
});
public class PnlHomes extends FlexLayout {
protected Map map = null;
protected MapView mapview = null;
public PnlHomes() {
initUI();
}
protected void initUI() {
mapview = new MapView("homesmap");
mapview.setWidth("100%");
mapview.setHeight("100%");
this.setHeight("900px");
this.appendChild(FlexItem.create().appendChild(mapview).setFlexGrow(1));
// this.appendChild(mapview);
Scheduler.get().scheduleDeferred(new Command() {
@Override
public void execute() {
map = MapPresets.getOsmMap("homesmap");
map.updateSize();
}
});
}
}
@TDesjardins what's the difference between ol.layer.Vector and ol.source.Vector? I'm trying to add some markers to the panel
OpenLayers distinguish between the type of layer and the type of datasources connected to layers (see https://openlayers.org/en/latest/doc/tutorials/concepts.html).
1: whether I wrap the view in flexitem makes no difference
2: nothing is visible unless I call setHeight with PIXELS. Why should I have to dictate pixel height? every screen could be different sizes. I just want the layout to handle this. it should be 100% of the viewport
Actually you don't have to dictate the pixel height but you have to ensure that the map container has a size when the map will be rendered. Especially with responsive layouts the height of containers and or it's parents is initially 0. If the map is drawn at this time the map also have a size of 0.