Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-ausstellung-virtuell.de
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ubezi
web-ausstellung-virtuell.de
Commits
3556298d
Commit
3556298d
authored
Jan 04, 2018
by
Jonas Heinrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setMaxBounds after moveend of flight
parent
da290785
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
25 deletions
+2
-25
js/map.js
js/map.js
+2
-25
No files found.
js/map.js
View file @
3556298d
...
...
@@ -16,45 +16,23 @@ var map = new mapboxgl.Map({
bearing
:
0
});
// maxBounds: bounds,
map
.
addControl
(
new
mapboxgl
.
NavigationControl
());
map
.
on
(
'
load
'
,
function
()
{
map
.
fire
(
'
flystart
'
);
map
.
flyTo
({
// These options control the ending camera position: centered at
// the target, at zoom level 9, and north up.
center
:
[
8.404
,
49.0150
],
zoom
:
17
,
pitch
:
40
,
bearing
:
20
,
// These options control the flight curve, making it move
// slowly and zoom out almost completely before starting
// to pan.
speed
:
0.5
,
// make the flying slow
curve
:
1
,
// change the speed at which it zooms out
// This can be any easing function: it takes a number between
// 0 and 1 and returns another number between 0 and 1.
speed
:
0.5
,
easing
:
function
(
t
)
{
return
t
;
}
});
map
.
on
(
'
moveend
'
,
function
(
e
){
if
(
flying
)
{
map
.
fire
(
'
flyend
'
);
}
});
map
.
on
(
'
flystart
'
,
function
(){
flying
=
true
;
});
map
.
on
(
'
flyend
'
,
function
(){
flying
=
false
;
map
.
setMaxBounds
(
bounds
);
});
// Insert the layer beneath any symbol layer.
...
...
@@ -77,7 +55,6 @@ map.on('load', function() {
'
minzoom
'
:
15
,
'
paint
'
:
{
'
fill-extrusion-color
'
:
'
#aaa
'
,
// use an 'interpolate' expression to add a smooth transition effect to the
// buildings as the user zooms in
'
fill-extrusion-height
'
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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