Commit 8625d7f2 authored by Eric Duminil's avatar Eric Duminil
Browse files

srsName should always be defined.

parent c356313c
Showing with 4 additions and 10 deletions
+4 -10
......@@ -67,7 +67,7 @@ var regionChooser = (function(){
feature.setId(gmlId++);
kml_source.addFeature(feature);
dataPanel.append('.');
srsName = feature.get("srsName") || "EPSG:31467";
srsName = feature.get("srsName");
if (proj4.defs(srsName) === undefined){
console.warning(srsName + " isn't defined by Proj4js!")
}
......@@ -173,13 +173,8 @@ var regionChooser = (function(){
}
publicScope.isDownloadPossible = function(){
var count = 0;
document.querySelectorAll("input.select_citygml").forEach(c => {
if (c.checked){
count += 1;
}
});
document.getElementById("download_region_button").disabled = (count == 0);
var checkedBoxes = Array.from(document.querySelectorAll("input.select_citygml")).filter(c => c.checked);
document.getElementById("download_region_button").disabled = (checkedBoxes.length == 0);
}
function findIntersection(feature, polygon) {
......@@ -228,7 +223,7 @@ var regionChooser = (function(){
})
var project = features[0].get("project"); //TODO: Check all the same
var srsName = features[0].get("srsName") || "EPSG:31467"; //TODO: Check all the same
var srsName = features[0].get("srsName"); //TODO: Check all the same
var citygmlNames = features.map(f => f.get("name"));
// Waiting 100ms in order to let the cursor change
setTimeout(function() {
......@@ -315,7 +310,6 @@ var regionChooser = (function(){
}
function sketchAsWKT(srsName) {
srsName = (typeof srsName === 'undefined') ? 'EPSG:4326' : srsName;
var wktFormat = new ol.format.WKT();
return wktFormat.writeFeature(sketch, {
dataProjection : ol.proj.get(srsName),
......
Supports Markdown
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