Hafez Rouzati
Hafez Rouzati
Hafez Rouzati
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
KHARMA JSON<br />
// 1. JSON representation of a placemark with a balloon<br />
var myFeatureJSON =!<br />
{<br />
balloonVisibility : "1",<br />
description : "function balloon_relative_init(){console.debug('balloon<br />
relative init'); folder_test()}; Example balloon relative to device",<br />
iconVisibility : "1",<br />
id : "balloon_relative",<br />
labelVisibility : "0",<br />
name : "Balloon Relative",<br />
};<br />
type : "placemark",<br />
visibility : "1",<br />
parent : "folder",<br />
extendedData : {<br />
id : "asfasfasdf",<br />
type : "extendeddata",<br />
data : [{ type : "data",<br />
Data_name : "tag",<br />
DisplayName : "the hash",<br />
value : "aelatgt"},<br />
{ type : "data",<br />
Data_name : "value",<br />
value : "2"<br />
}]<br />
},<br />
geometry : [{<br />
altitudeMode : "clampToGround",<br />
id : "balloon3”,<br />
location : {<br />
altitude : "0",<br />
id : "location_relative",<br />
latitude : "6",<br />
latitude_units : "meters",<br />
longitude : "0",<br />
type : "location",<br />
parent : "balloon3”<br />
},<br />
locationMode : "relative",<br />
locationMode_targetId : "clampToGround",<br />
orientationMode : "clampToGround",<br />
orientationMode_targetId : "clampToGround",<br />
scaleMode : "clampToGround",<br />
type : "balloon",<br />
parent : "balloon_relative"<br />
}]<br />
// 2. use JSON to create dynamically create placemark<br />
var myFeature = new KMLPlacemark(myFeatureJSON);<br />
// 3. getting a handle to the object later<br />
var myReference = KHARMA.getKMLElementByID("balloon_relative");