Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-ausstellung-virtuell.de
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ubezi
web-ausstellung-virtuell.de
Commits
99fc22a9
Commit
99fc22a9
authored
Apr 06, 2018
by
Jonas Heinrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix default flyto on 3dmap
parent
024071cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
20 deletions
+37
-20
js/main.js
js/main.js
+23
-10
js/map.js
js/map.js
+14
-10
No files found.
js/main.js
View file @
99fc22a9
...
@@ -30,22 +30,35 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
...
@@ -30,22 +30,35 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
function
camera_fly_to_object
(
url
)
{
function
camera_fly_to_object
(
url
)
{
var
episode_nr
=
url
.
match
(
/
\/
video
\/
video
(\d
+
)
.html/
);
var
episode_nr
=
url
.
match
(
/
\/
video
\/
video
(\d
+
)
.html/
);
if
(
episode_nr
.
length
==
2
)
{
if
(
episode_nr
!==
null
)
{
episode_nr
=
episode_nr
[
1
];
if
(
episode_nr
.
length
==
2
)
{
$
.
getJSON
(
"
/geojson/camera.json
"
,
function
(
data
)
{
episode_nr
=
episode_nr
[
1
];
var
camera_data
=
data
[
episode_nr
];
$
.
getJSON
(
"
/geojson/camera.json
"
,
function
(
data
)
{
console
.
log
(
camera_data
[
"
center
"
]);
var
camera_data
=
data
[
episode_nr
];
console
.
log
(
camera_data
[
"
center
"
]);
map
.
flyTo
({
center
:
camera_data
[
"
center
"
],
zoom
:
camera_data
[
"
zoom
"
],
pitch
:
camera_data
[
"
pitch
"
],
bearing
:
camera_data
[
"
bearing
"
],
speed
:
0.5
,
easing
:
function
(
t
)
{
return
t
;
}
});
});
}
}
else
{
map
.
flyTo
({
map
.
flyTo
({
center
:
camera_data
[
"
center
"
],
//[8.404, 49.0150]
center
:
[
8.4045457
,
49.014564
],
zoom
:
camera_data
[
"
zoom
"
]
,
zoom
:
19.13
,
pitch
:
camera_data
[
"
pitch
"
]
,
pitch
:
60
,
bearing
:
camera_data
[
"
bearing
"
]
,
bearing
:
64.01
,
speed
:
0.5
,
speed
:
0.5
,
easing
:
function
(
t
)
{
easing
:
function
(
t
)
{
return
t
;
return
t
;
}
}
});
});
});
}
}
}
}
...
...
js/map.js
View file @
99fc22a9
...
@@ -19,16 +19,20 @@ map.addControl(new mapboxgl.NavigationControl());
...
@@ -19,16 +19,20 @@ map.addControl(new mapboxgl.NavigationControl());
map
.
on
(
'
load
'
,
function
()
{
map
.
on
(
'
load
'
,
function
()
{
map
.
flyTo
({
if
(
window
.
location
.
pathname
===
"
/
"
||
center
:
[
8.404
,
49.0150
],
window
.
location
.
pathname
===
"
/about
"
||
zoom
:
17
,
window
.
location
.
pathname
===
"
/overview
"
)
{
pitch
:
40
,
map
.
flyTo
({
bearing
:
20
,
center
:
[
8.4045457
,
49.014564
],
speed
:
0.5
,
zoom
:
19.13
,
easing
:
function
(
t
)
{
pitch
:
60
,
return
t
;
bearing
:
64.01
,
}
speed
:
0.5
,
});
easing
:
function
(
t
)
{
return
t
;
}
});
}
map
.
on
(
'
moveend
'
,
function
(
e
){
map
.
on
(
'
moveend
'
,
function
(
e
){
map
.
setMaxBounds
(
bounds
);
map
.
setMaxBounds
(
bounds
);
...
...
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