Commit 25dc5ff9 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev
Browse files

select kml file in master_kml.xml

parent b5de0689
Loading
Loading
Loading
Loading

check_master_kml.php

0 → 100644
+14 −0
Original line number Diff line number Diff line
<?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);
}

?>
+20 −8
Original line number Diff line number Diff line
@@ -287,7 +287,15 @@ function light_init(){

    x3delement.append(model);

    // get master kml file if possible
    $.ajax({
      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){
@@ -300,6 +308,10 @@ function light_init(){
        });

      }
    });


}

function parse_light_init_response(response,state,mode){