Class AWUtils
Object
|
+--AWUtils
- class
AWUtils
Helper class containing static utility functions.
Defined in awxapi-1.0.js.
|
Method Summary |
<static> void
|
addFlashCallbacks( divId )
Static utility function to add Flash callback function when ArcWeb Explorer is defined in a FORM tag in Internet Explorer.
|
<static> String
|
deg2DMS( <Number> dd, <String> l )
Static utility function to create a formatted string of a decimal degree value in DD MM SS.
|
<static> void
|
insertMap( divId, <String> key, <Object> vars )
Static utility function to insert the required Flash object.
|
AWUtils
AWUtils()
addFlashCallbacks
<static> void addFlashCallbacks( divId )
Static utility function to add Flash callback function when ArcWeb Explorer is defined in a FORM tag in Internet Explorer.
deg2DMS
<static> String deg2DMS( <Number> dd, <String> l )
Static utility function to create a formatted string of a decimal degree value in DD MM SS.
Parameters:
dd - The decimal degree number.
l - Use "lat" to suffix the string with N/S, "lon" to suffix the string with W/E.
Returns:
A formatted string in DD MM SS format.
insertMap
<static> void insertMap( divId, <String> key, <Object> vars )
Static utility function to insert the required Flash object.
A Flash object is created with the ID "map" and is inserted
into a div element with ID "explorer". The width and height are of type String, for example, use "100%" for the width and height.
In addition, this calls a JavaScript function named "onCreationComplete" when the Flash movie is loaded.
AWUtils.insertMap("myMapDiv", "<AWX API Key>");
AWUtils.insertMap("myMapDiv", "<AWX API Key>",
{
showMenu:"true", // adds right-click menu
showHeader:"true", // displays the API & Help links
showNavigation:"true", // for easy zoom in&out
showWidgetBar:"true", // list of widgets: Navigation, Find, Directions etc (default:false)
glt:"hybridGroupLayer"
}
);
…
<div id="myMapDiv" style="width:500px; height:400px;">You need at least Adobe Flash 8 Player or higher to view this page.</div>
Parameters:
vars - Object containing key value pairs of Flash parameters (optional). The Flash parameters are detailed on the ArcWeb Explorer JavaScript Flash variables page. The valid keys are:
c: latitude|longitude
jsFaultHandler: <name of function>
jsCreationComplete: <name of function> (default is "onCreationComplete")
showMenu: true|false // the right-click menu (default is false)
showHeader: true|false // the banner with print, share, help, and so on (default is false)
showWidgetBar: true|false // the list of widgets: Navigation, Find, Directions, and so on (default is false)
showNavigation: true|false // allows for easy zoom in and out, and map rotation (default is false)
glt: name of groupLayer(s)
ds: data source(s)
divid - The HTML div identifier in the document where the map is displayed.