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
6ec2d535
Commit
6ec2d535
authored
Aug 29, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. list only visible-on-map 2. distance_error = - distance_error
parent
a5ae7b05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
4 deletions
+51
-4
index.js
js/index.js
+50
-3
ui_align.js
js/ui_align.js
+1
-1
No files found.
js/index.js
View file @
6ec2d535
...
...
@@ -31,7 +31,10 @@ $(function(){
});
var
SETTINGS
=
{
'showall'
:
false
'showall'
:
false
,
'lat'
:
40.7233861
,
'lng'
:
-
111.9328843
,
'zoom'
:
12
};
var
Dragged
=
false
;
...
...
@@ -43,7 +46,7 @@ function init_dragging(){
bigcounter
++
;
if
(
bigcounter
==
markers
.
length
){
actual_dragging_init
()
$
(
".arow"
)[
0
].
click
();
//
$(".arow")[0].click();
}
});
...
...
@@ -73,6 +76,9 @@ function parseURL(){
for
(
var
i
=
1
;
i
<
parameters
.
length
;
i
++
)
{
switch
(
parameters
[
i
][
0
])
{
case
"showall"
:
SETTINGS
.
showall
=
true
;
break
;
case
"lat"
:
SETTINGS
.
lat
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"lng"
:
SETTINGS
.
lng
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
case
"zoom"
:
SETTINGS
.
zoom
=
parseFloat
(
parameters
[
i
][
1
]);
break
;
}
}
}
...
...
@@ -294,7 +300,7 @@ function init_maps(){
map
=
L
.
map
(
'leaflet_map'
,{
layers
:[
googleSat
],
zoomControl
:
false
,
}).
setView
([
40.7233861
,
-
111.9328843
],
12
);
}).
setView
([
SETTINGS
.
lat
,
SETTINGS
.
lng
],
SETTINGS
.
zoom
);
new
L
.
Control
.
Zoom
({
position
:
'topright'
}).
addTo
(
map
);
...
...
@@ -312,6 +318,47 @@ function init_maps(){
L
.
control
.
layers
(
baseMaps
).
addTo
(
map
);
map
.
on
(
'moveend'
,
function
()
{
var
bounds
=
map
.
getBounds
();
$
(
".arow"
).
each
(
function
(
i
,
c
){
var
index
=
$
(
this
).
attr
(
"index"
);
if
(
(
markers
[
index
][
0
].
lat
>
bounds
.
_northEast
.
lat
)
||
(
markers
[
index
][
0
].
lat
<
bounds
.
_southWest
.
lat
)
||
(
markers
[
index
][
0
].
lng
>
bounds
.
_northEast
.
lng
)
||
(
markers
[
index
][
0
].
lng
<
bounds
.
_southWest
.
lng
)
){
$
(
this
).
hide
();
}
else
{
$
(
this
).
show
();
}
});
var
center
=
map
.
getCenter
();
var
zoom
=
map
.
getZoom
();
window
.
history
.
pushState
(
""
,
"x3d models index"
,
"?lat="
+
center
.
lat
+
"&lng="
+
center
.
lng
+
"&zoom="
+
zoom
);
$
(
"#model_table"
).
css
({
top
:
"0px"
});
});
/*
* moveend is called after zoomend anyways
*/
/*
map.on('zoomend', function() {
console.log("zoomend "+map.getBounds());
});
*/
}
function
wheelEvent_list
(
event
){
...
...
js/ui_align.js
View file @
6ec2d535
...
...
@@ -251,7 +251,7 @@ function distance_error(x,y,h){
var
z_x3d
=
x3dom_2d_distance
(
Data
.
markers
[
i
].
align
.
real
.
x
,
Data
.
markers
[
i
].
align
.
real
.
z
,
false
);
sum
+=
1
/
z_map
-
1
/
z_x3d
;
console
.
log
(
"Marker: "
+
i
+
", Camera heading: "
+
angle0
+
", Point azimuth: "
+
angle1
+
" , z_map: "
+
z_map
+
", z_x3d: "
+
z_x3d
+
", error^-1
: "
+
(
1
/
z_map
-
1
/
z_x3d
));
console
.
log
(
"Marker: "
+
i
+
", Camera heading: "
+
angle0
+
", Point azimuth: "
+
angle1
+
" , z_map: "
+
z_map
+
", z_x3d: "
+
z_x3d
+
", error^-1
(updated): "
+
(
1
/
z_x3d
-
1
/
z_map
));
}
sum
=
sum
/
Data
.
markers
.
length
;
...
...
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