Commit 5c6ace0f authored by Eric Duminil's avatar Eric Duminil
Browse files

Check if all same projects.

parent 8625d7f2
...@@ -222,8 +222,18 @@ var regionChooser = (function(){ ...@@ -222,8 +222,18 @@ var regionChooser = (function(){
return kml_source.getFeatureById(i); return kml_source.getFeatureById(i);
}) })
var project = features[0].get("project"); //TODO: Check all the same var project = features[0].get("project");
var srsName = features[0].get("srsName"); //TODO: Check all the same var srsName = features[0].get("srsName");
if (!features.every( f => f.get("project") === project)){
dataPanel.append("<h2 class='error'>Sorry, the CityGML files should all belong to the same project.</h2><br/>\n");
return;
}
if (!features.every( f => f.get("srsName") === srsName)){
dataPanel.append("<h2 class='error'>Sorry, the CityGML files should all be written with the same coordinate system.</h2><br/>\n");
}
var citygmlNames = features.map(f => f.get("name")); var citygmlNames = features.map(f => f.get("name"));
// Waiting 100ms in order to let the cursor change // Waiting 100ms in order to let the cursor change
setTimeout(function() { setTimeout(function() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment