*/
public void initialize(final ClientMapInfo mapInfo) {
if (!initialized) {
this.mapInfo = mapInfo;
srid = Integer.parseInt(mapInfo.getCrs().substring(mapInfo.getCrs().indexOf(":") + 1));
ScaleConfigurationInfo scaleConfigurationInfo = mapInfo.getScaleConfiguration();
List<Double> realResolutions = new ArrayList<Double>();
for (ScaleInfo scale : scaleConfigurationInfo.getZoomLevels()) {
realResolutions.add(1. / scale.getPixelPerUnit());
}
mapView.setResolutions(realResolutions);
mapView.setMaximumScale(scaleConfigurationInfo.getMaximumScale().getPixelPerUnit());
// replace layers by new layers
removeAllLayers();
for (ClientLayerInfo layerInfo : mapInfo.getLayers()) {
addLayer(layerInfo);
}