This example demonstrates how to create an HTML tool to show and hide Favorites. It uses the hide and show methods of the Favorites class and the TerrainMode property of the SGFramework class.
<html>
<head>
<title>SG WP 6.5 - Template tool</title>
</head>
<body onload="Init();">
terrain mode is: <span id="terrrainModeType"></span><br /><br />
<input type="button" value="Show favorites" name="ShowFavorites" onclick="ShowFavorites(true);"/><br /><br />
<input type="button" value="Hide favorites" name="HideFavorites" onclick="ShowFavorites(false);"/>
<script src="../../SGAPI/v6.0/sgapi6.js" type="text/javascript"></script>
<script type="text/javascript">
function Init() {
document.getElementById("terrrainModeType").innerHTML = SGFramework.TerrainMode;
}
function ShowFavorites(bshow) {
if (bshow)
SGFramework.Favorites.show();
else {
SGFramework.Favorites.hide();
}
}
</script>
</body>
</html>