Commit 6ce3a7a8 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

alignment code clean up, todo: error reporting and mode on/off by checkbox

parent f2be9efd
......@@ -188,7 +188,7 @@ html, body, #x3d_wrapper {
}
#align_button{
background-image:url('images/align.png');
background-image:url('images/ic_explore_black_48dp_1x.png');
background-size: 32px 32px;
background-repeat: no-repeat;
......@@ -307,4 +307,18 @@ html, body, #x3d_wrapper {
user-select:none;
}
#aa1_dialog{
position:absolute;
top:2px;
left:2px;
background: rgba(256,256,256,1);
padding:5px;
}
#aa1_dialog td{
padding: 0px 5px;
}
#aa1_dialog button{
margin: 0px 5px;
}
This diff is collapsed.
......@@ -58,7 +58,7 @@ var SETTINGS = {
'path' : "1487451413_967079",
'version': "v1",
'experimental': false,
'edit': false,
'edit': true,
'files': {
'x3d':"",
'x3d_background':"",
......@@ -722,28 +722,33 @@ function leaf_drag_marker(){
var p1_ll = Camera._latlng;
var p2_ll = Camera.draggedMarker._latlng;
var mark = Data.markers[index];
leaf_update_x3dom_marker(p1_ll,p2_ll,index);
X3DOMObject.displayMarkInfo(index);
mark.latitude = p2_ll.lat;
mark.longitude = p2_ll.lng;
}
mark.align.latitude = mark.latitude;
mark.align.longitude = mark.longitude;
}
var distance = p1_ll.distanceTo(p2_ll);
function leaf_update_x3dom_marker(p1_ll,p2_ll,index){
var dp_w = x3dom_delta_map2scene(p1_ll,p2_ll);
var mark = Data.markers[index];
mark.x = dp_w.x;
mark.z = dp_w.z;
mark.latitude = p2_ll.lat;
mark.longitude = p2_ll.lng;
mark.d_map = distance;
mark.align.latitude = mark.latitude;
mark.align.longitude = mark.longitude;
X3DOMObject.displayMarkInfo(index);
var distance = p1_ll.distanceTo(p2_ll);
X3DOMObject.Marker.place(mark.x,mark.y,mark.z,"my-sph-"+index);
var dp_w = x3dom_delta_map2scene(p1_ll,p2_ll);
}
mark.x = dp_w.x;
mark.z = dp_w.z;
mark.d_map = distance;
X3DOMObject.Marker.place(mark.x,mark.y,mark.z,"my-sph-"+index);
}
......
......@@ -41,7 +41,7 @@ function convert_color_l2x(color){
/*
* azimuth by geo coords
*/
/*
function getAzimuth2(p1,p2){
//p1 - start point
......@@ -58,7 +58,7 @@ function getAzimuth2(p1,p2){
return azimuth;
}
*/
/*
* azimuth by canvas coords
*/
......
......@@ -64,7 +64,13 @@
<div id='help_wrapper'>
<div id='menu_button'></div>
<div id='help_button'>?</div>
<div id='align_button' class='experimental'></div>
<div id='align_button' title='Run alignment algorithm for camera heading and location using markers.
Instructions:
1. Use approximate location control on the map to change initial approximation for the algorithm.
2. Place at least 3 markers on the 3D model (ctrl+click) - drag to position more precisely.
3. Move all markers on the map to update their location - drag to position more precisely.
4. Click this button - the results will appear in a dialog window with "apply"/"cancel"
5. To save the result click upload button (Initial location and heading) in the menu.' class='edit'></div>
</div>
<div id='info-wrapper'>
<div id='window-info'></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment