1. Image Layer:
<HTML>
<Head>
<Title> layers 1 </title>
<Object ID = "sgworld" classid = "CLSID: 3a4f91b1-65a8-11d5-85c1-0001023952c1" style = "visibility: hidden; Height: 0"> </Object>
<SCRIPT type = "text/JavaScript" src = "abspath. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
Function Init ()
{
VaR imagerylayer = sgworld. creator. createimagerylayer (toabspath ("Data/goldengate.gif"),-122.47656, 37.82298,-122.46310, 37.81359 );
Sgworld. Navigate. flyto (imagerylayer );
}
</SCRIPT>
</Head>
<Body onload = "Init ();">
</Body>
</Html>
2. Fly layer:
<HTML>
<Head>
<Title> layers 2 </title>
<Object ID = "sgworld" classid = "CLSID: 3a4f91b1-65a8-11d5-85c1-0001023952c1" style = "visibility: hidden; Height: 0"> </Object>
<SCRIPT type = "text/JavaScript" src = "abspath. js"> </SCRIPT>
<SCRIPT type = "text/JavaScript">
VaR popup = NULL;
Function Init ()
{
Sgworld. Navigate. setposition (sgworld. creator. createposition (-111.96805, 24.39885, 1500000,-48 ));
Popup = sgworld. creator. createpopupmessage ("layers sample ");
Popup. innertext = "this sample shows how to create a layer from a fly file .";
Popup. align = "topleft ";
Sgworld. Window. showpopup (popup );
VaR id = sgworld. projecttree. loadflylayer (toabspath ("Data/park. Fly "));
Sgworld. projecttree. renamegroup (ID, "Parks ");
}
Function uninit ()
{
If (sgworld. Project. Name = "")
Return;
If (popup)
Sgworld. Window. removepopup (popup );
}
</SCRIPT>
</Head>
<Body onload = "Init ();" onUnload = "uninit ()">
</Body>
</Html>