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
9df8543d
Commit
9df8543d
authored
Oct 14, 2022
by
Eric Duminil
Browse files
Only zoom extent when a feature is added.
parent
d818e19f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/eu/simstadt/regionchooser/website/script/simstadt_openlayers.js
View file @
9df8543d
...
...
@@ -85,7 +85,7 @@ var regionChooser = (function(){
var
geoJsonFormat
=
new
ol
.
format
.
GeoJSON
();
var
kmlFormat
=
new
ol
.
format
.
KML
({
extractStyles
:
false
});
kml_
layer
.
addEventListener
(
"
chang
e
"
,
function
()
{
kml_
source
.
addEventListener
(
"
addfeatur
e
"
,
function
()
{
map
.
getView
().
fitExtent
(
kml_source
.
getExtent
(),
(
map
.
getSize
()));
});
...
...
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