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
1ddf4f50
Commit
1ddf4f50
authored
Apr 06, 2018
by
Jonas Heinrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move camera to selected object
parent
1833fd6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
0 deletions
+87
-0
geojson/camera.json
geojson/camera.json
+62
-0
js/main.js
js/main.js
+22
-0
js/map.js
js/map.js
+3
-0
No files found.
geojson/camera.json
0 → 100644
View file @
1ddf4f50
{
"1"
:
{
"zoom"
:
20
,
"bearing"
:
154.4000000000001
,
"pitch"
:
55.00000000000002
,
"center"
:
[
8.404678887363389
,
49.01435934766977
]
},
"2"
:
{
"zoom"
:
20
,
"bearing"
:
154.4000000000001
,
"pitch"
:
55.00000000000002
,
"center"
:
[
8.404678887363389
,
49.01435934766977
]
},
"3"
:
{
"zoom"
:
20
,
"bearing"
:
154.4000000000001
,
"pitch"
:
55.00000000000002
,
"center"
:
[
8.404678887363389
,
49.01435934766977
]
}
,
"4"
:
{
"zoom"
:
20
,
"bearing"
:
74.40000000000009
,
"pitch"
:
60
,
"center"
:
[
8.404729073054227
,
49.014491095417355
]
},
"5"
:
{
"zoom"
:
20
,
"bearing"
:
-127.98206220157772
,
"pitch"
:
60
,
"center"
:
[
8.404418756656014
,
49.014506477220095
]
},
"6"
:
{
"zoom"
:
20
,
"bearing"
:
-55.26063029283325
,
"pitch"
:
60
,
"center"
:
[
8.40433289817338
,
49.01465436188076
]
},
"7"
:
{
"zoom"
:
20
,
"bearing"
:
-76.1883075247909
,
"pitch"
:
60
,
"center"
:
[
8.404506029513186
,
49.01481263113985
]
},
"8"
:
{
"zoom"
:
20
,
"bearing"
:
40.79999999999973
,
"pitch"
:
60
,
"center"
:
[
8.404631171335609
,
49.014822001971964
]
},
"9"
:
{
"zoom"
:
20
,
"bearing"
:
92.79999999999984
,
"pitch"
:
60
,
"center"
:
[
8.404815732034535
,
49.014794195995705
]
},
"10"
:
{
"zoom"
:
20
,
"bearing"
:
53.600000000000364
,
"pitch"
:
60
,
"center"
:
[
8.404626431723386
,
49.014913919188274
]
}
}
js/main.js
View file @
1ddf4f50
...
@@ -28,12 +28,34 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
...
@@ -28,12 +28,34 @@ $('body').on('click','.btn, .nav-item, logo, .video-item', function(e) {
});
});
function
camera_fly_to_object
(
url
)
{
var
episode_nr
=
url
.
match
(
/
\/
video
\/
video
(\d
+
)
.html/
);
if
(
episode_nr
.
length
==
2
)
{
episode_nr
=
episode_nr
[
1
];
$
.
getJSON
(
"
/geojson/camera.json
"
,
function
(
data
)
{
var
camera_data
=
data
[
episode_nr
];
console
.
log
(
camera_data
[
"
center
"
]);
map
.
flyTo
({
center
:
camera_data
[
"
center
"
],
//[8.404, 49.0150]
zoom
:
camera_data
[
"
zoom
"
],
pitch
:
camera_data
[
"
pitch
"
],
bearing
:
camera_data
[
"
bearing
"
],
speed
:
0.5
,
easing
:
function
(
t
)
{
return
t
;
}
});
});
}
}
function
load_page
(
url
,
title
,
slug
)
{
function
load_page
(
url
,
title
,
slug
)
{
$
(
"
content
"
).
empty
();
$
(
"
content
"
).
empty
();
$
(
"
content
"
).
hide
().
load
(
url
).
fadeIn
(
'
fast
'
);
$
(
"
content
"
).
hide
().
load
(
url
).
fadeIn
(
'
fast
'
);
$
(
"
content
"
).
scrollTop
(
0
);
$
(
"
content
"
).
scrollTop
(
0
);
document
.
title
=
title
;
document
.
title
=
title
;
window
.
history
.
pushState
({
url
:
""
+
url
+
""
,
title
:
""
+
title
+
""
,
slug
:
""
+
slug
+
""
},
title
,
slug
);
window
.
history
.
pushState
({
url
:
""
+
url
+
""
,
title
:
""
+
title
+
""
,
slug
:
""
+
slug
+
""
},
title
,
slug
);
camera_fly_to_object
(
url
);
}
}
...
...
js/map.js
View file @
1ddf4f50
...
@@ -112,6 +112,9 @@ map.on('load', function() {
...
@@ -112,6 +112,9 @@ map.on('load', function() {
popup
.
remove
();
popup
.
remove
();
});
});
map
.
on
(
'
moveend
'
,
function
(
e
){
console
.
log
(
'
zoom:
'
+
map
.
getZoom
()
+
'
, bearing:
'
+
map
.
getBearing
()
+
'
, pitch:
'
+
map
.
getPitch
()
+
'
, center:
'
+
map
.
getCenter
());
})
map
.
on
(
'
click
'
,
'
exhibits
'
,
function
(
e
)
{
map
.
on
(
'
click
'
,
'
exhibits
'
,
function
(
e
)
{
var
url
=
e
.
features
[
0
].
properties
.
url
;
var
url
=
e
.
features
[
0
].
properties
.
url
;
var
title
=
e
.
features
[
0
].
properties
.
title
;
var
title
=
e
.
features
[
0
].
properties
.
title
;
...
...
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