|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object | +--AWMap
AWMap is a class that encapsulates the functions to communicate with the ArcWeb Explorer Flash component.
| Field Summary | |
String |
Static constant field representing the version number of this library. |
String |
WIDGET_NAVIGATION Static constant field representing Navigation Widget. |
String |
WIDGET_FIND Static constant field representing Find Widget. |
String |
WIDGET_MAPTYPES Static constant field representing MapTypes Widget. |
String |
WIDGET_IMPORTDATA Static constant field representing Import Data Widget. The recommended maximum number of points is 200. |
String |
WIDGET_DIRECTIONS Static constant field representing Directions Widget. |
String |
WIDGET_WIDGETBAR Static constant field representing WidgetBar Widget. |
String |
WIDGET_BANNER Static constant field representing Banner Widget. |
String |
WIDGET_LEGEND Static constant field representing Legend Widget. This widget Is used only with thematicGroupLayer. |
String |
WIDGET_REPORTS Static constant field representing Reports Widget. |
| Constructor Summary | |
AWMap ( <String> DivID, <Array> colors,
<Array> alphas, <Array> ratios, <Object> matrix,
<String> spreadMethod, <String> interpolationMethod,
<Number> focalPointRatio )
| |
| Method Summary | |
void
|
addFlashObject( <String> source, <Object> properties )
Add a SWF file onto the map at an arbitrary x,y pixel location (not latitude/longitude location). The origin is the top left corner. |
void
|
addGroupLayer( <String> groupLayer, <String> dataSource, <Object> properties, <Number> depth )
Add a groupLayer to the map at run time. |
void
|
addLatLonToPolygon( <String> polygonId, <points|Array> points )
Add points to an existing polygon at run time. |
void
|
addLatLonToPolyline( <String> polylineId, <points|Array> points )
Add points to an existing polyline at run time. |
void
|
addMapChangedListener( <String> funcName )
Register a callback function to be invoked whenever the map center and scale values change. |
void
|
addMarker( <AWMarker|Array> marker )
Add a marker or array of markers to the map. |
void
|
addMarkerFromGeorss( <String> url )
Add a set of markers from a URL. |
void
|
addMarkerStyle( <AWImgMarkerStyle> markerStyle )
Add a marker style to the map. |
void
|
addMouseDownCallBack( callback )
Add a callback function for mouse down events. |
void
|
addMouseUpCallBack( callback )
Add a callback function for mouse up events. |
void
|
addPolygon( <AWPolygon> polygon )
Add a polygon to the map. |
void
|
addPolygonStyle( <AWPolygonStyle> polygonStyle )
Add a polygon style to the map. |
void
|
addPolyline( <AWPolyline> polyline )
Add a polyline to the map. |
void
|
addPolylineStyle( <AWPolylineStyle> polylineStyle )
Add a polyline style to the map. |
void
|
callMethodOnMarker( <String> markerID, <String> functionName, <Object> args )
Call a custom method on a SWF marker. |
void
|
centerAndScale( <AWLatLon> latlon, <Number> scale )
Center the map at a latitude/longitude location, and render it at a specific scale. |
void
|
changePolygonStyle( polygonId, polygonStyleId )
Change polygon style at run time. |
void
|
changePolylineStyle( <String> polylineId, <String> polylineStyleId )
Change polyline style at run time. |
void
|
clickMarker( <String> id )
Call the mouse click handler associated with the marker. |
void
|
findLocation( <AWLocation> location, <String> callback )
Add a location to the map. |
void
|
findRoute( markerIds, <String> callback, polylineStyleId, dataSource, <Object> properties )
Allow routing between markers. |
Object
|
getGroupLayerProperty( <String> groupLayer, propertyName )
Get a named property from a given groupLayer. |
Object
|
getLat( <Number> pixelY )
Get the latitude of a corresponding y value. The origin being the top left corner. |
AWLatLon
|
getLatLonCenter()
Get the current coordinates of the center of the map. |
AWLatLonExtent
|
getLatLonExtent()
Get the min/max latitude/longitude values of the current map view. |
Object
|
getLon( <Number> pixelX )
Get the longitude of a corresponding x value. The origin is the top left corner. |
Object
|
getMarkerProperty( <String> id, <String> property )
Get a marker property. |
Number
|
getScaleForLatLonExtent( <AWLatLonExtent> latlonExtent )
Returns the scale for the specified extent. |
Number
|
getScale()
Get the scale of the current map. |
Object
|
getX( <Number> longitude )
Get the x pixel value of a corresponding longitude. The origin is the top left corner. |
Object
|
getY( <Number> latitude )
Get the y pixel value of a corresponding latitude. The origin is the top left corner. |
void
|
hideAllWidgets()
Hide all map widgets. |
void
|
hideWidget( <String> widget )
Hide a map widget. |
Object
|
intersects( <String> markerId, <String> polygonId )
Test to see if a marker intersects a polygon. |
void
|
printMap()
Open the browser's print dialog. |
void
|
recenterOrPanToLatLon( <AWLatLon> latlon )
Recenter or pan the map to a new latitude/longitude location. |
void
|
removeAllGroupLayers()
Remove all groupLayers. |
void
|
removeAllMarkers()
Remove all markers from the map. |
void
|
removeAllPolygons()
Remove all polygons from the map. |
void
|
removeAllPolylines()
Remove all polylines from the map. |
void
|
removeGroupLayer( groupLayerType )
Remove a single groupLayer. |
void
|
removeMarker( <String|Array> id )
Remove a marker or a set of markers from the map. |
void
|
removePolygon( <String|Array> id )
Remove a polygon from the map. |
void
|
removePolyline( <String|Array> id )
Remove a polyline from the map. |
void
|
setGroupLayerProperties( <String> groupLayer, <Object> properties )
Set groupLayer properties at run time. |
void
|
setLatLonExtent( extent )
Set the map extent. |
void
|
setMarkerLatLon( <String> id, <Number> lat, <Number> lon )
Set the marker location. |
void
|
setMarkerProperties( <String> id, <Object> properties )
Set the marker properties. |
void
|
setMarkerSource( <String> id, <String> out )
Set the marker source (image) as over or out based on a key and value. |
void
|
setMarkerVisibility( <String> id, <Boolean> visible )
Set to true to make the markers visible, or false to make them invisible. |
void
|
setMouseHandler( <String> handler, <Object> properties )
Change the mouse handler. |
void
|
showAllWidgets()
Show all active map Widgets that are hidden. |
void
|
showWidget( <String> widget, <Number> x, <Number> y )
Show a map Widget at a particular x,y pixel location. |
void
|
showWorldExtent()
Zoom to the world extent. |
void
|
toggleMouseClickLayer( <String> level )
Toggle the level of the mouse click layer. |
| Field Detail |
Version
Static constant field representing the version number of this library.
Static constant field representing Navigation Widget.
Static constant field representing Find Widget.
Static constant field representing MapTypes Widget.
Static constant field representing Import Data Widget. The recommended maximum number of points is 200.
Static constant field representing Reports Widget.
Static constant field representing Directions Widget.
Static constant field representing WidgetBar Widget.
Static constant field representing Banner Widget.
Static constant field representing Legend Widget. This widget is used only with thematicGroupLayer.
| Constructor Detail |
AWMap( <String> divId )
divId - The divId of the embedded ArcWeb Explorer Flash object.
| Method Detail |
void addFlashObject( <String> source, <Object> properties )
var myExplorer = new AWMap('map');
myExplorer.addFlashObject("myLogo.swf",{ x = 20; y = 20; alpha = 25;});
source - The source URL of the Flash object to load.
properties - The properties of this Flash object (x, y, alpha).
void addGroupLayer( <String> groupLayer, <String> dataSource, <Object> properties, <Number> depth )
var myExplorer = new AWMap("explorer");
//Note - Group Layer type variable(glt) must be set as "none" in the insertMap method to use this method.
myAWX.addGroupLayer("rasterTileGroupLayer"); // uses default rastertile data source
myAWX.addGroupLayer("rasterTileGroupLayer", "ArcWeb:ESRI.Street_Tiles.World");
myAWX.addGroupLayer("vectorGroupLayer", "ArcWeb:TA.Streets.EU", { style:"gs" } );
myAWX.addGroupLayer("vectorGroupLayer", "ArcWeb:TA.Streets.US", {alpha:50, style:"gs"},1);
myAWX.addGroupLayer("mapImageGroupLayer", null, // will use default mapImageGroupLayer
{ returnLayerVisibilityInfo:"true" } );
myAWX.addGroupLayer("vectorGroupLayer", "ArcWeb:TA.Streets.US",
{
layerVisibility: [
{name:"Oceans and Seas Names", visibility:"off"},
{name:"Airports", visibility:"off"}
]
});
groupLayer - The name of the groupLayer. The Group Layer Properties page lists the valid group layer names.dataSource - The data source for the groupLayer (optional). Default data sources will be used if missing. Valid data sources are listed on the Data sources information page.
properties - The key/value object of the properties to be changed. Valid properties are groupLayer dependent. See the Group Layer Properties page (optional).
depth - Set the depth of the groupLayer added (optional). Default is 0, i.e., the bottom.
void addLatLonToPolygon( <String> polygonId, <points|Array> points )
polygonId - The polygon ID in which to add points.
points - The point or array of points to add to the polygon.
void addLatLonToPolyline( <String> polylineId, <points|Array> points )
polylineId - The polyline ID in which to add points.
points - The point or array of points to add to the polyline.
void addMapChangedListener( <String> funcName )
funcName - The name of the function to call.
void addMarker( <AWMarker|Array> marker )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
var latlon = new AWLatLon(42.36704409, -71.05274248);
myExplorer.centerAndScale(latlon, 10000);
myExplorer.addMarker( new AWMarker( "myId", new AWLatLon(42.367044, -71.052742)));
marker - The marker or array or markers to add to the map.
void addMarkerFromGeorss( <String> url )
var myExplorer = new AWExplorer("map"); // here "map" is the ID of the flash object.
myExplorer.addMarkerFromGeorss( "http://earthquake.usgs.gov/recenteqsww/catalogs/eqs7day-M5.xml");
url - The location of the markers.
void addMarkerStyle( <AWImgMarkerStyle> markerStyle )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
var markerStyle = new AWImgMarkerStyle();
markerStyle.id = "myMarkerStyleId";
markerStyle.source = "http://www.arcwebservices.com/awx/images/id.png";
markerStyle.width = 16;
markerStyle.height = 16;
markerStyle.anchorX = 8;
markerStyle.anchorY = 8;
myExplorer.addMarkerStyle(markerStyle);
markerStyle - The marker style to register with the map.
void addMouseDownCallBack( callback )
var myExplorer = new AWMap("explorer");
var myLatLon = new AWLatLon(42.367044, -71.052742);
myExplorer.centerAndScale(myLatLon, 10000);
myExplorer.addMouseDownCallBack("onMouseUp");
javascript - Callback name.
void addMouseUpCallBack( callback )
var myExplorer = new AWMap("explorer");
var myLatLon = new AWLatLon(42.367044, -71.052742);
myExplorer.centerAndScale(myLatLon, 10000);
myExplorer.addMouseUpCallBack("onMouseUp");
javascript - Callback name.
void addPolygon( <AWPolygon> polygon )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Create a green filled, 50% transparent fill based on 3 points.
var polygon = new AWPolygon(
[ new AWLatLon(37.4419, -122.1419), new AWLatLon(37.4519, -122.1519), new AWLatLon(37.4519, -122.1619) ],
0x00FF00,
50);
myExplorer.addPolygon( polygon);
polygon - The polygon to add to the map.
void addPolygonStyle( <AWPolygonStyle> polygonStyle )
polygonStyle - The polygon style to add to the map.
void addPolyline( <AWPolyline> polyline )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Create a red, 3 pixel wide, 75% transparent polyline based on 2 points.
var polyline = new AWPolyline(
[ new AWLatLon(37.4419, -122.1419), new AWLatLon(37.4519, -122.1519) ],
3,
0xFF0000,
75);
myExplorer.addPolyline(polyline);
polyline - The polyline to add to the map.
void addPolylineStyle( <AWPolylineStyle> polylineStyle )
polylineStyle - The polyline style to add to the map.
void callMethodOnMarker( <String> markerID, <String> functionName, <Object> args )
var myExplorer = new AWMap('explorer');
myExplorer.callMethodOnMarker("myMarkerID", "doEchoObj", { parameter1 = "FooBar";});
markerID - The markerID to call the function on.
functionName - The name of the function to be called.
args - The arguments to be passed into the function.
void centerAndScale( <AWLatLon> latlon, <Number> scale )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
myExplorer.centerAndScale( new AWLatLon(42.367044, -71.052742), 10000);
latlon - The latitude/longitude of the center of the map.
scale - The rendering scale. If you want to render the map at 1 = 10000, the scale value is 10000.
void changePolygonStyle( polygonId, polygonStyleId )
polylineId - The polyline ID in which to add points.
polylineStyleId - The polylineStyle to change the polyline to.
void changePolylineStyle( <String> polylineId, <String> polylineStyleId )
polylineId - The polyline ID in which to add points.
polylineStyleId - The polylineStyle to change the polyline to.
void clickMarker( <String> id )
function onMarkerClick( event )
{
var s = "lat=" + AWUtils.deg2DMS(event.lat) + "\n";
s += "lon=" + AWUtils.deg2DMS(event.lon) + "\n";
s += "pixelX=" + event.pixelX + "\n";
s += "pixelY=" + event.pixelY + "\n";
s += "id=" + event.data.id + "\n";
alert(s);
}
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Create and register a marker style.
var markerStyle = new AWImgMarkerStyle();
markerStyle.id = "myMarkerStyleId";
markerStyle.source = "http://www.arcwebservices.com/awx/images/id.png"; Valid icon details can be found in the Marker information page.
markerStyle.width = 16;
markerStyle.height = 16;
markerStyle.anchorX = 8;
markerStyle.anchorY = 8;
// Set the name of the function to call when the user clicks on the marker.
markerStyle.mouseClick = "onMarkerClick";
myExplorer.addMarkerStyle(markerStyle);
// Add a marker to the map with user defined attribute 'id' set to 'bos'
myExplorer.addMarker( new AWMarker( "myId", new AWLatLon(42.367044, -71.052742), markerStyle.id));
...
myExplorer.clickMarker( "myId"); // call mouse click handler.
id - The marker identifier.
void findLocation( <AWLocation> location, <String> callback )
function startUp()
{
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Define and register a marker style.
var markerStyle = new AWImgMarkerStyle();
markerStyle.id = "myMarkerStyleId";
markerStyle.source = "http://www.arcwebservices.com/awx/images/id.png";
markerStyle.width = 16;
markerStyle.height = 16;
markerStyle.anchorX = 8;
markerStyle.anchorY = 8;
myExplorer.addMarkerStyle(markerStyle);
// Add the location of the city of Boston, MA as a marker on the map.
var location = new AWLocation();
location.location = "Boston, MA";
location.markerStyleId = markerStyle.myMarkerStyleId;
myExplorer.findLocation(location, "onFindLocation");
// Put a marker at a specific lat, long location
myExplorer.findLocation(new AWLocation("locationId", '34.055,-117.188'), "onFindLocation");
}
function onFindLocation(event)
{
var myExplorer = new AWMap("explorer");
myExplorer.recenterOrPanToLatLon(new AWLatLon(event.lat, event.lon));
}
location - The location to add to the map.
callback - The name of the JavaScript function called when the location is added to the map. The function prototype is 'function functionName( event)'.
void findRoute( markerIds, <String> callback, polylineStyleId, dataSource, <Object> properties )
var myExplorer = new AWMap('explorer');
var myLatLon = new AWLatLon(42.375, -71.06);
myExplorer.centerAndScale(myLatLon, 20000);
startMarker = new AWMarker();
startMarker.latlon = new AWLatLon(42.36704409, -71.05274248);
startMarker.id = "m_1";
startMarker.data = { label = "Start";};
myExplorer.addMarker(startMarker);
endMarker = new AWMarker();
endMarker.latlon = new AWLatLon(42.384, -71.071);
endMarker.id = "m_2";
endMarker.data = { label = "End";};
myExplorer.addMarker(endMarker);
var properties = { routeType = "shortest";};
myExplorer.findRoute([startMarker.id,endMarker.id], "onRoute", null, null,properties);
function onRoute(event)
{
alert("Total Time = "+event.totalTime+";\nTotal Distance = "+event.totalDistance);
}
callback - JavaScript function name for callback (optional).
properties - Extra routing properties, listed below, only work in the U.S. (optional).hwyPref - number. Contains the preference for using highways. Valid values are between "1" and "100". The value of "1" means to avoid highways if possible, and the value of "100" means to use highways as much as possible. Default value is "80". If you set the value to "0", hwyPref defaults to "80". hwyPref is not used with routeType "shortest".reorderStops - boolean. Determines if intermediate waypoints are reordered to optimize for distance. Default value is false. Not considered if request contains less than four markers.routeType - string (quickest/shortest).trafficDataSource - string. (Also an indicator whether traffic data is on/off). Valid value is "ArcWeb :TC.Traffic.US". units - string (km/miles).trafficSeverity - number. Contains the traffic incident severity ratings to avoid. Valid values are "1" (severe), "2" (high), "3" (medium), or "4" (low). Traffic incidents at and above the set severity are avoided in a route. For example, "2" avoids high and severe incidents, and "0" avoids all incidents. The default is "3".MarkerIds - Array of marker IDs to route.
PolylineStyleId - Polyline style ID to be used for the route line (optional)..
Route - DataSource (optional). Valid values are "ArcWeb:MDS.Streets.AS", "ArcWeb:NT.Streets.EU","ArcWeb:NT.Streets.NA", "ArcWeb:TA.Streets.EU", "ArcWeb:TA.Streets.NA", auto, and null. null defaults to "ArcWeb:TA.Streets.NA". Multiple data sources as a single comma-separated string, for example, “ArcWeb:NT.Streets.NA;ArcWeb:TA.Streets.NA”.
Object getGroupLayerProperty( <String> groupLayer, propertyName )
var myExplorer = new AWMap("explorer");
var legendUrl = myExplorer.getGroupLayerProperty("thematicGroupLayer", "legendUrl");
groupLayer - The name of the groupLayer.
return - The property if it was defined (object or array). See the Group Layer Properties page for valid group layer names and properties. All properties mentioned in that table can be retrieved using this method. In addition to those properties you can also return layerVisibilityInfo (for thematic and mapImage groupLayers) and legendUrl (for thematic groupLayers).
Object getLat( <Number> pixelY )
alert("getLat(600) = " + myExplorer.getLat(600));
pixelY -
AWLatLon getLatLonCenter()
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
var latlon = myExplorer.getLatLonCenter();
alert( latlon.lat+" "+latlon.lon);
AWLatLonExtent getLatLonExtent()
minLat, minLon, maxLat, maxLon.
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
var extent = myExplorer.getLatLonExtent();
alert( extent.minLat+" "+extent.minLon+" "+extent.maxLat+" "+extent.maxLon);
Object getLon( <Number> pixelX )
alert("getLon(400) = " + myExplorer.getLon(400));
pixelX -
Object getMarkerProperty( <String> id, <String> property )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Place a marker on the map with user defined data containing a property named 'id' and whose value is 'bos'
myExplorer.addMarker( new AWMarker( "myId", new AWLatLon(42.367044, -71.052742), "markerStyleId", { desc = "some desc";}));
...
// set the new lat/lon properties of the marker to move it to a new location.
myExplorer.setMarkerProperties( "myId", {data. desc = "another desc";});
myExplorer.getMarkerProperty("myId", "data");
id - The marker identifier.
property - Property to get.
Number getScaleForLatLonExtent( <AWLatLonExtent> latlonExtent )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
var ext = someFunctionThatReturnsLatLonExtent();
var lat = (ext.minLat + ext.maxLat) / 2;
var lon = (ext.minLon + ext.maxLon) / 2;
var scale = myExplorer.getScaleForLatLonExtent( ext);
myExplorer.centerAndScale( new AWLatLon( lat,lon), scale);
latlonExtent - The extent to evaluate.
Number getScale()
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
alert( "the current map scale is 1:"+myExplorer.getScale());
Object getX( <Number> longitude )
alert("getX(-71.052742) = " + myExplorer.getX(-71.052742));
longitude -
Object getY( <Number> latitude )
alert("getY(42.367044) = " + myExplorer.getY(42.367044));
latitude -
void hideAllWidgets()
void hideWidget( <String> widget )
widget - Widget to hide. Valid values are WIDGET_NAVIGATION, WIDGET_FIND, WIDGET_MAPTYPES, WIDGET_IMPORTDATA, WIDGET_DIRECTIONS, WIDGET_WIDGETBAR, WIDGET_BANNER, WIDGET_LEGEND, WIDGET_REPORTS.
Object intersects( <String> markerId, <String> polygonId )
myExplorer = new AWMap('explorer');
myExplorer.intersects("myMarker", "myPolygon")
markerId - The ID of the marker under consideration.
polygonId - The ID of a polygon. This method checks if the marker specified by markerId lies within this polygon.
void printMap()
var myExplorer = new AWMap("explorer");
myExplorer.printMap();
void recenterOrPanToLatLon( <AWLatLon> latlon )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
myExplorer.centerAndScale( new AWLatLon(42.367044, -71.052742), 10000);
window.setTimeout(function() {
myExplorer.recenterOrPanToLatLon(new AWLatLon(42.368044, -71.053742));
}, 3000);
latlon - The new latitude/longitude of the map center.
void removeAllGroupLayers()
void removeAllMarkers()
void removeAllPolygons()
void removeAllPolylines()
void removeGroupLayer( groupLayerType )
var myExplorer = new AWMap("explorer");
myExplorer.removeGroupLayer("vectorGroupLayer");
groupLayer - The name of the groupLayer. See the Group Layer Properties page for valid group layer name.
void removeMarker( <String|Array> id )
var myExplorer = new AWMap("explorer");
myExplorer.removeMarker( "myMarkerId");
id - The marker identifier or an array of marker identifiers.
void removePolygon( <String|Array> id )
id - The ID of the polygon to remove.
void removePolyline( <String|Array> id )
id - The ID of the polyline to be removed.
void setGroupLayerProperties( <String> groupLayer, <Object> properties )
var myExplorer = new AWMap("explorer");
myExplorer.setGroupLayerProperties("vectorGroupLayer",{ alpha = 50;});
groupLayer - The name of the groupLayer.
properties - The key/value object of the properties to be changed. Valid properties are groupLayer dependent. See the Group Layer Properties page for details.
void setLatLonExtent( extent )
var myExplorer = new AWMap("explorer");
myExplorer.setLatLonExtent(new AWLatLonExtent(-10, -170, 150, 30));
latlonExtent - The extent to be set.
void setMarkerLatLon( <String> id, <Number> lat, <Number> lon )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Place a marker on the map with user defined data containing a property named 'id' and whose value is 'bos'
myExplorer.addMarker( new AWMarker( "myId", new AWLatLon(42.367044, -71.052742)));
...
// set the new lat/lon properties of the marker to move it to a new location.
myExplorer.setMarkerLatLon( "myId", 42.367144, -71.052842);
id - The marker identifier.
lat - The latitude value.
lon - The longitude value.
void setMarkerProperties( <String> id, <Object> properties )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Add a marker (with a label “Zimbabwe”) and user defined data (which shows up when clicking the marker)
myExplorer.addMarker( new AWMarker( "Z", new AWLatLon(-25,33), null, { label: "Zimbabwe", Population: "12 million", 'Median Age': "20.1 years"}));
...
// set the new lat/lon properties of the marker to move it to a new location.
myExplorer.setMarkerProperties( "myId", {data. desc = "another desc";});
id - The marker identifier.
properties - The properties to set.
void setMarkerSource( <String> id, <String> out )
id - The marker identifier.
out - Use "out" to display the out source, or "over" to display the over source.
void setMarkerVisibility( <String> id, <Boolean> visible )
var myExplorer = new AWMap("explorer"); // here "explorer" is the ID of the div explorer is embedded in.
// Place a marker on the map with identifier 'myId'
myExplorer.addMarker( new AWMarker( "myId", new AWLatLon(42.367044, -71.052742)));
...
// Hide the marker with identifier 'myId'
myExplorer.setMarkerVisibility( "myId", false);
id - The marker identifier.
visible - Use "true" to make the marker visible, or "false" to hide them.
void setMouseHandler( <String> handler, <Object> properties )
var myExplorer = new AWMap("explorer");
myExplorer.setMouseHandler("SmoothPanMouseHandler");
handler - The handler to change to.
properties - The properties of the marker for AddMarkerMouseHandler. Sets the marker icon, and label prefix and suffix. The default, an expanding SWF marker, is used if these parameters are not specified.
void showAllWidgets()
void showWidget( <String> widget, <Number> x, <Number> y )
widget - Widget to show. Valid values are WIDGET_NAVIGATION, WIDGET_FIND, WIDGET_MAPTYPES, WIDGET_IMPORTDATA, WIDGET_DIRECTIONS, WIDGET_WIDGETBAR, WIDGET_BANNER, WIDGET_LEGEND, WIDGET_REPORTS.
x - Position in pixels. The origin is the top left corner.
y - Position in pixels. The origin is the top left corner.
void showWorldExtent()
var myExplorer = new AWMap("explorer");
myExplorer.showWorldExtent();
void toggleMouseClickLayer( <String> level )
level - Use either "top" or "bottom".
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||