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
25dc5ff9
Commit
25dc5ff9
authored
Jun 15, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
select kml file in master_kml.xml
parent
b5de0689
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
8 deletions
+34
-8
check_master_kml.php
check_master_kml.php
+14
-0
ui_init.js
js/ui_init.js
+20
-8
No files found.
check_master_kml.php
0 → 100644
View file @
25dc5ff9
<?php
$path
=
$_GET
[
'path'
]
.
"/master_kml.xml"
;
if
(
is_file
(
$path
)){
//print("There's master kml");
$xml
=
simplexml_load_file
(
$path
);
print
(
$xml
->
name
);
}
else
{
// return empty, don't update
print
(
-
1
);
}
?>
js/ui_init.js
View file @
25dc5ff9
...
...
@@ -287,18 +287,30 @@ function light_init(){
x3delement
.
append
(
model
);
// get master kml file if possible
$
.
ajax
({
url
:
SETTINGS
.
files
.
kml
+
"?"
+
Date
.
now
(),
success
:
function
(
response
){
parse_light_init_response
(
response
,
"init"
,
mode
);
},
error
:
function
(
response
){
console
.
log
(
"Init: KML not found. Using defaults"
);
parse_light_init_response
(
response
,
"init"
,
mode
);
url
:
"check_master_kml.php?path="
+
SETTINGS
.
basepath
+
"/"
+
SETTINGS
.
path
,
success
:
function
(
response
){
if
(
response
!=
"-1"
){
SETTINGS
.
files
.
kml
=
SETTINGS
.
basepath
+
"/"
+
response
+
"/"
+
response
+
".kml"
;
}
// ready to read kml files
$
.
ajax
({
url
:
SETTINGS
.
files
.
kml
+
"?"
+
Date
.
now
(),
success
:
function
(
response
){
parse_light_init_response
(
response
,
"init"
,
mode
);
},
error
:
function
(
response
){
console
.
log
(
"Init: KML not found. Using defaults"
);
parse_light_init_response
(
response
,
"init"
,
mode
);
}
});
}
});
}
function
parse_light_init_response
(
response
,
state
,
mode
){
...
...
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