}
createDefaultStyleMap(map);
}
private void createDefaultStyleMap(final MapModel map) {
UrlManager loader = UrlManager.getController();
final File file = loader.defaultTemplateFile();
if (file != null) {
try {
MapModel styleMapContainer = new MapModel();
loader.load(Compat.fileToUrl(file), styleMapContainer);
if (null != MapStyleModel.getExtension(styleMapContainer)){
moveStyle(styleMapContainer, map, false);
return;
}
}
catch (Exception e) {
LogUtils.warn(e);
UITools.errorMessage(TextUtils.format("error_in_template", file));
}
};
MapModel styleMapContainer = new MapModel();
try {
loader.load(ResourceController.getResourceController().getResource("/styles/viewer_standard.mm"), styleMapContainer);
moveStyle(styleMapContainer, map, false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}