Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
39a21b52
Commit
39a21b52
authored
Mar 12, 2018
by
Eric Duminil
Browse files
RegionChooser: Open closure for debugging.
parent
c2f63fe8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
39a21b52
...
...
@@ -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/
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
reset_btn
=
$
(
'
#reset
'
)[
0
];
var
dataPanel
=
$
(
'
#dataPanel
'
);
var
wgs84Sphere
=
new
ol
.
Sphere
(
6378137
);
var
osm_layer
=
new
ol
.
layer
.
Tile
({
source
:
new
ol
.
source
.
OSM
()
});
var
kml_source
=
new
ol
.
source
.
KML
({
function
read_kml
(
url
){
return
new
ol
.
source
.
KML
({
projection
:
ol
.
proj
.
get
(
'
EPSG:3857
'
),
url
:
'
data/citygml_hulls.kml
'
,
url
:
url
,
extractAttributes
:
false
,
extractStyles
:
false
});
}
var
kml_source
=
read_kml
(
'
data/citygml_hulls.kml
'
);
function
polygon_style
(
color
,
alpha
)
{
return
new
ol
.
style
.
Style
({
...
...
@@ -293,7 +296,10 @@ var regionChooser = (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
()
{
...
...
@@ -352,5 +358,6 @@ var regionChooser = (function(){
}
focusOnMap
();
return
publicScope
;
})();
\ No newline at end of file
var
regionChooser
=
publicScope
;
// return publicScope;
//})();
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment