Commit 39a21b52 authored by Eric Duminil's avatar Eric Duminil
Browse files

RegionChooser: Open closure for debugging.

parent c2f63fe8
...@@ -8,23 +8,26 @@ proj4.defs("EPSG:2263", "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.6666666666 ...@@ -8,23 +8,26 @@ proj4.defs("EPSG:2263", "+proj=lcc +lat_1=41.03333333333333 +lat_2=40.6666666666
//NOTE: Corrected version from https://oegeo.wordpress.com/2008/05/20/note-to-self-the-one-and-only-rd-projection-string/ //NOTE: Corrected version from https://oegeo.wordpress.com/2008/05/20/note-to-self-the-one-and-only-rd-projection-string/
proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs <>"); // proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs <>"); //
var regionChooser = (function(){ //var regionChooser = (function(){
var publicScope = {}; var publicScope = {};
var reset_btn = $('#reset')[0]; var reset_btn = $('#reset')[0];
var dataPanel = $('#dataPanel'); var dataPanel = $('#dataPanel');
var wgs84Sphere = new ol.Sphere(6378137); var wgs84Sphere = new ol.Sphere(6378137);
var osm_layer = new ol.layer.Tile({ var osm_layer = new ol.layer.Tile({
source: new ol.source.OSM() source: new ol.source.OSM()
}); });
var kml_source = new ol.source.KML({ function read_kml(url){
projection : ol.proj.get('EPSG:3857'), return new ol.source.KML({
url : 'data/citygml_hulls.kml', projection : ol.proj.get('EPSG:3857'),
extractAttributes : false, url : url,
extractStyles : false extractAttributes : false,
}); extractStyles : false
});
}
var kml_source = read_kml('data/citygml_hulls.kml');
function polygon_style(color, alpha) { function polygon_style(color, alpha) {
return new ol.style.Style({ return new ol.style.Style({
...@@ -293,7 +296,10 @@ var regionChooser = (function(){ ...@@ -293,7 +296,10 @@ var regionChooser = (function(){
}); });
$('#refresh_hulls').click(function() { $('#refresh_hulls').click(function() {
fxapp.refreshHulls(); url = fxapp.refreshHulls();
console.log('Loading ' + url);
kml_source = read_kml(url);
kml_layer.setSource(kml_source);
}); });
novafactory_layer.downloadFinished = function() { novafactory_layer.downloadFinished = function() {
...@@ -352,5 +358,6 @@ var regionChooser = (function(){ ...@@ -352,5 +358,6 @@ var regionChooser = (function(){
} }
focusOnMap(); focusOnMap();
return publicScope; var regionChooser = publicScope;
})(); // return publicScope;
\ No newline at end of file //})();
\ No newline at end of file
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