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
cccda702
Commit
cccda702
authored
Mar 12, 2018
by
Eric Duminil
Browse files
RegionChooser: Style working now.
parent
a7ad93c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
cccda702
...
@@ -47,7 +47,7 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
...
@@ -47,7 +47,7 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
var
kml_layer
=
new
ol
.
layer
.
Vector
({
var
kml_layer
=
new
ol
.
layer
.
Vector
({
source
:
kml_source
,
source
:
kml_source
,
style
:
polygon_style
(
'
#
777777
'
,
0.2
)
style
:
polygon_style
(
'
#
007700
'
,
0.2
)
//TODO: Change me back to 777
});
});
var
intersections
=
new
ol
.
source
.
Vector
();
var
intersections
=
new
ol
.
source
.
Vector
();
...
@@ -71,7 +71,6 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
...
@@ -71,7 +71,6 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
featureProjection
:
ol
.
proj
.
get
(
'
EPSG:3857
'
)
featureProjection
:
ol
.
proj
.
get
(
'
EPSG:3857
'
)
}
}
));
));
updateGMLPolygons
();
};
};
publicScope
.
addNovaFactoryProduct
=
function
(
xmin
,
ymin
,
xmax
,
ymax
,
name
,
epsgId
)
{
publicScope
.
addNovaFactoryProduct
=
function
(
xmin
,
ymin
,
xmax
,
ymax
,
name
,
epsgId
)
{
...
@@ -98,14 +97,15 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
...
@@ -98,14 +97,15 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
var
map
=
new
ol
.
Map
({
var
map
=
new
ol
.
Map
({
target
:
'
map
'
,
target
:
'
map
'
,
layers
:
[
osm_layer
,
kml_layer
,
novafactory_layer
,
intersections_layer
],
//layers : [ osm_layer, kml_layer, novafactory_layer, intersections_layer ],
layers
:
[
kml_layer
,
novafactory_layer
,
intersections_layer
],
//TODO: Put OSM back. Was too slow for testing
interactions
:
ol
.
interaction
.
defaults
({
interactions
:
ol
.
interaction
.
defaults
({
keyboard
:
true
keyboard
:
true
})
})
});
});
var
geoJsonFormat
=
new
ol
.
format
.
GeoJSON
();
var
geoJsonFormat
=
new
ol
.
format
.
GeoJSON
();
var
kmlFormat
=
new
ol
.
format
.
KML
();
var
kmlFormat
=
new
ol
.
format
.
KML
(
{
extractStyles
:
false
}
);
kml_layer
.
addEventListener
(
"
change
"
,
function
()
{
kml_layer
.
addEventListener
(
"
change
"
,
function
()
{
map
.
getView
().
fitExtent
(
kml_source
.
getExtent
(),
(
map
.
getSize
()));
map
.
getView
().
fitExtent
(
kml_source
.
getExtent
(),
(
map
.
getSize
()));
...
@@ -369,7 +369,6 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
...
@@ -369,7 +369,6 @@ proj4.defs("EPSG:28992", "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.3876388
}
}
refresh_btn
.
disabled
=
false
;
refresh_btn
.
disabled
=
false
;
console
.
log
(
kml_source
.
getFeatures
());
console
.
log
(
kml_source
.
getFeatures
());
kml_source
.
clear
();
fxapp
.
refreshHulls
();
fxapp
.
refreshHulls
();
updateGMLPolygons
();
updateGMLPolygons
();
console
.
log
(
"
READY!
"
);
console
.
log
(
"
READY!
"
);
...
...
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