Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
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
Elphel
x3domlet
Commits
84f58cc5
Commit
84f58cc5
authored
Sep 01, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ import location from another model
parent
9bf96d60
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
0 deletions
+70
-0
ui.css
js/ui.css
+15
-0
ui_menu.js
js/ui_menu.js
+47
-0
viewer.html
viewer.html
+8
-0
No files found.
js/ui.css
View file @
84f58cc5
...
...
@@ -390,3 +390,18 @@ html, body, #x3d_wrapper {
/* margin-right:2px; */
}
#model_name
{
width
:
200px
;
padding
:
0px
5px
;
}
#import_coordinates_button
{
height
:
25px
;
}
js/ui_menu.js
View file @
84f58cc5
...
...
@@ -242,6 +242,53 @@ function editmode_init(){
controls_showhide
();
});
$
(
"#import_coordinates_button"
).
on
(
'click'
,
function
(){
if
(
$
(
"#model_name"
).
val
()
==
""
){
$
(
"#imstatus"
).
css
({
color
:
"rgba(200,70,70,1)"
}).
html
(
"empty field"
);
$
(
"#imstatus"
).
show
(
0
).
delay
(
1000
).
fadeOut
(
250
);
}
else
{
var
kmlfile
=
SETTINGS
.
basepath
+
"/"
+
$
(
"#model_name"
).
val
()
+
"/"
+
$
(
"#model_name"
).
val
()
+
".kml"
;
$
.
ajax
({
url
:
kmlfile
+
"?"
+
Date
.
now
(),
success
:
function
(
response
){
$
(
"#imstatus"
).
css
({
color
:
"rgba(70,200,70,1)"
}).
html
(
"ok"
);
$
(
"#imstatus"
).
show
(
0
).
delay
(
1000
).
fadeOut
(
250
);
var
latitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"latitude"
).
text
());
var
longitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"longitude"
).
text
());
var
altitude
=
parseFloat
(
$
(
response
).
find
(
"Camera"
).
find
(
"altitude"
).
text
());
Data
.
camera
.
latitude
=
latitude
;
Data
.
camera
.
longitude
=
longitude
;
Data
.
camera
.
altitude
=
altitude
;
Data
.
camera
.
kml
.
latitude
=
latitude
;
Data
.
camera
.
kml
.
longitude
=
longitude
;
Data
.
camera
.
kml
.
altitude
=
altitude
;
//reset
Map
.
marker
.
setHeading
(
Data
.
camera
.
heading
);
Map
.
marker
.
setBasePoint
(
new
L
.
LatLng
(
latitude
,
longitude
));
Map
.
marker
.
_syncMeasureMarkersToBasePoint
();
Map
.
_map
.
panTo
(
new
L
.
LatLng
(
latitude
,
longitude
));
x3d_initial_camera_placement
(
"t"
);
},
error
:
function
(
response
){
$
(
"#imstatus"
).
css
({
color
:
"rgba(200,70,70,1)"
}).
html
(
"file not found"
);
$
(
"#imstatus"
).
show
(
0
).
delay
(
1000
).
fadeOut
(
250
);
}
});
}
});
}
function
controls_showhide
(){
...
...
viewer.html
View file @
84f58cc5
...
...
@@ -169,6 +169,14 @@ Instructions:
<td
title=
'Adjust initial location and orientation'
>
Edit mode
</td>
<td><input
id=
'edit'
type=
'checkbox'
class=
'my-check-box donothide'
/></td>
</tr>
<tr
class=
'edit'
>
<td
title=
''
>
Import coordinates from another model
</td>
<td><input
id=
'model_name'
type=
'text'
class=
'input donothide'
placeholder=
'model name'
/></td>
<td><button
id=
'import_coordinates_button'
class=
'donothide'
>
Apply
</button></td>
<td
valign=
'middle'
>
<div
id=
'imstatus'
></div>
</td>
</tr>
<tr
class=
'edit'
id=
'kml_tr'
>
<td
title=
'.kml:
* latitude and longitude,
...
...
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