Commit 7ce22d6e authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

1. save kml records based on timestamp rather than unique icon name

parent 583463e8
......@@ -39,6 +39,9 @@ function generateKML(nodes){
' <tilt>'+nodes[i].tilt+'</tilt>',
' <roll>'+nodes[i].roll+'</roll>',
' </Camera>',
' <TimeStamp>',
' <when>'+nodes[i].timestamp+'</when>',
' </TimeStamp>',
' <Icon>',
' <href>'+nodes[i].href+'</href>',
' </Icon>'].join('\n');
......
......@@ -311,7 +311,8 @@ function parse_light_init_response(response,state,mode){
name : $(response).find("name").text(),
description : $(response).find("Camera").find("description").text(),
visibility : $(response).find("visibility").text(),
href : $(response).find("Icon").find("href").text()
href : $(response).find("Icon").find("href").text(),
timestamp : $(response).find("TimeStamp").find("when").text(),
};
if (state=="init"){
......
......@@ -58,9 +58,10 @@ $old_PhotoOverlay = $target_xml->Document->PhotoOverlay;
foreach ($new_PhotoOverlay as $new_node) {
foreach ($old_PhotoOverlay as $old_node) {
$old_str = "{$old_node->Icon->href}";
$new_str = "{$new_node->Icon->href}";
$old_str = "{$old_node->TimeStamp->when}";
$new_str = "{$new_node->TimeStamp->when}";
//if ("{$new_node->Icon->href}"=="{$old_node->Icon->href}") {
//if ($new_str==$old_str) {
if (strstr($new_str,$old_str)!=false) {
$old_node->name = $new_node->name;
$old_node->description = $new_node->description;
......
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