@Override
protected MapComponentInfo buildMap() {
MapComponentInfo map = super.buildMap();
map.getLayoutConstraint().setMarginX(marginX);
map.getLayoutConstraint().setMarginY(marginY);
MapView view = mapModel.getMapView();
double mapWidth = getPageWidth() - 2 * marginX;
double mapHeight = getPageHeight() - 2 * marginY;
Coordinate origin = view.getBounds().createFittingBox(mapWidth, mapHeight).getOrigin();
map.setLocation(new org.geomajas.geometry.Coordinate(origin.getX(), origin.getY()));
map.setPpUnit((float) (mapWidth / view.getBounds().createFittingBox(mapWidth, mapHeight).getWidth()));
map.setTag("map");
map.setMapId(mapModel.getMapInfo().getId());
map.setApplicationId(applicationId);
map.setRasterResolution(rasterDpi);
List<PrintComponentInfo> layerChildren = new ArrayList<PrintComponentInfo>();