POST
request to a server.
Parameters:
url
- the URL of the server to send the request to. url can be the name of the script, a relative URL, or an absolute URL, depending on where the invoked script is located.
params
- an array containing the request's parameters. Specify each parameter as a name-value pair of strings, where each pair occupies two consecutive array elements. If a request has two parameters, for example, params must have four elements: The first element contains the name of the first parameter; the second element contains the value of the first parameter; the third element contains the name of the second parameter; and the fourth element contains the value of the second parameter. If the request has no parameters, use an empty array or null.
target
- the case-sensitive name of the request's target frame: "tbFrame"
(toolbar), "mapFrame"
(map area, including the legend and property palettes), "formFrame"
(this form), "scriptFrame"
(script frame), "taskBar"
(toolbar above the task frame), "taskPaneFrame"
(frame containing the task pane), or "sbFrame"
(status bar). target also can be the window name of an existing pop-up frame. The usual targets of a form submit are "scriptFrame"
and "taskPaneFrame"
.
Examples:
The following example calls the script BuildReport.php
on the server, without parameters, and directs the script's result to the script frame.
formFrame.Submit("BuildReport.php", null, "scriptFrame");
The following example calls the script Surface.php
with two arguments and displays the script's result in the task frame.
xmlSel = mapFrame.GetSelectionXML();
params = new Array("UNITS", "SquareFeet", "SEL", xmlSel);
formFrame.Submit("../MiscScripts/Surface.php", params, "taskPaneFrame");
Parameters:
onlyVisible
- set to true
to return only visible base groups; set to false
to ignore base-group visibility.
Layer
object:
Layer { legend; /* Legend text displayed for this layer */ name; /* Layer name */ objectid; /* Unique layer identifier */ }
Parameters:
layerId
- the layer's unique object ID.
Layer
objects:
Layer { legend; /* Legend text displayed for this layer */ name; /* Layer name */ objectid; /* Unique layer identifier */ }
Parameters:
onlyVisible
- set to true
to return only the layers visible at the current scale; set to false
to ignore layer visibility.
onlySelectable
- set to true
to return only layers that can be selected; set to false
to ignore layer selectability.
true
if the legend palette is initialized; false
otherwise. Scripts running in other frames must make sure that this method returns true
before calling other methods of the legend palette; otherwise the result will be unpredictable. If this method returns false
, wait until the viewer can build all the layers before calling it again.
Parameters:
scale
- the new scale, as a floating-point number greater than or equal to one.
Parameters:
index
- a zero-based index that specifies which command in the list to execute. A floating-point number is truncated to an integer. If index is out of bounds then the call is ignored and no command is executed.
Parameters:
code
- the code associated with the command to execute. The following table shows the valid codes.
Code | Action |
---|---|
1 | Enter Pan mode |
2 | Pan up |
3 | Pan down |
4 | Pan right |
5 | Pan left |
6 | Enter Zoom mode |
7 | Zoom in |
8 | Zoom out |
9 | Zoom to rectangle |
10 | Zoom to selection |
11 | Zoom to map extents |
12 | Go to previous view |
13 | Go to next view |
14 | Zoom to initial view |
15 | Enter selection mode |
16 | Select radius |
17 | Select polygon |
18 | -- |
19 | Clear selection |
20 | Refresh map |
21 | Copy map to clipboard |
22 | About |
See Also: OnCommandExecuted
Parameters:
fmt
- a format string, containing substitution tags of the form {0}, {1}, {2}, etc.
params
- an array of values to be substituted into the format.
Example:
FormatMessage("This is the format string, with values {0} and {1}.", new Array("first", "second"));
returns
"This is the format string, with values first and second."
Parameters:
doc
- a reference to the document where the click occurred.
evt
- the event.
Example:
In the following example, the script attached to the document receiving the mouse-down event calls ForwardMouseDown() before processing the event, causing the main frame to call OnForwardMouseDown() in every frame where this method is present, giving each frame the opportunity to close an open context menu.
function OnMouseDown(evt) { parent.ForwardMouseDown(this.document, evt); //further processing of the event here... }
BasicCommand
-derived objects (a search command is a SearchCommand
object, for example). Don't modify the list items. Use ExecuteCommand() to execute a command in the list.
CommandItem
or FlyoutItem
objects. Don't modify the list items.
POST
requests to a server-side script. Use the returned reference with Submit().
Example:
GetScriptFrame().location.href = "MyScript.php"
Example:
GetTaskFrame().location.href = "MyScript.php"
CommandItem
objects. Don't modify the list items.
CommandItem
or FlyoutItem
objects. Don't modify the list items.
Parameters:
xmlSet
- a well-formed XML description of the features to select. This XML text must validate against the feature-set schema FeatureSet-1.0.0.xsd
, which comes with the MapGuide distribution.
See Also: GetSelectionXML() SetSelectionXML()
Parameters:
msg
- the string to display. Use an empty string or null to clear the status bar.
Parameters:
x
- the x coordinate of the new center point, expressed in map units.
y
- the y coordinate of the new center point, expressed in map units.
scale
- the new scale of the map, as a floating-point number greater than or equal to one.
refresh
- Determines whether the entire map is refreshed when it is recentered or zoomed. Set refresh to true
to refresh; false
otherwise. This setting applies only to DWF images; HTML images always refresh automatically.
See Also: GetCenter(), GetMapUnitsType(), GetScale() ZoomToView()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a Circle
object.
Circle { Center { X; Y; } Radius; }
See Also: DigitizeLine(), DigitizePoint(), DigitizePolygon(), DigitizeLineString(), DigitizeRectangle()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a LineString
object. DigitizeLine() passes two points, start and end.
LineString { Count; // The number of points in the line Point(); // Point(i) returns a Point object for point i. }
See Also: DigitizeCircle(), DigitizePoint(), DigitizePolygon(), DigitizeLineString(), DigitizeRectangle()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a Point
object.
Point { X; Y; }
See Also: DigitizeCircle(), DigitizeLine(), DigitizePolygon(), DigitizeLineString(), DigitizeRectangle()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a Polygon
object representing the polygon. The polygon is closed, so the first and last points are the same.
Polygon { Count; // The number of points in the polygon Point(); // Point(i) returns a Point object for point i. }
See Also: DigitizeCircle(), DigitizeLine(), DigitizePoint(), DigitizeLineString(), DigitizeRectangle()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a LineString
object representing the line string.
LineString { Count; // The number of points in the line Point(); // Point(i) returns a Point object for point i. }
See Also: DigitizeCircle(), DigitizeLine(), DigitizePoint(), DigitizePolygon(), DigitizeRectangle()
Parameters:
handler
- function to process the digitized object.
The handler function is passed one parameter, a Rectangle
object. Point1
is the upper left corner. Point2
is the lower right corner.
Rectangle { Point1 { X; Y; } Point2 { X; Y; } }
See Also: DigitizeCircle(), DigitizeLine(), DigitizePoint(), DigitizePolygon(), DigitizeLineString()
Point
object:
Point { X; Y; }
See Also: GetScale(), ZoomToView()
Layer
objects:
Layer { legend; /* Legend text displayed for this layer */ name; /* Layer name */ objectid; /* Unique layer identifier */ }
Parameters:
onlyVisible
- set to true
to return only the layers visible at the current scale; set to false
to ignore layer visibility.
onlySelectable
- set to true
to return only layers that can be selected; set to false
to ignore layer selectability.
See Also: GetSelectedLayers()
See Also: GetMapUnitsType(), GetMapWidth()
"Miles"
, "Kilometers"
, "meters"
, "feet"
, "inches"
, "centimeters"
, and "millimeters"
.
See Also: GetMapHeight(), GetMapUnitsType()
See Also: GetMapUnitsType()
See Also: GetCenter(), ZoomToView()
Layer
objects:
Layer { legend; /* Legend text displayed for this layer */ name; /* Layer name */ objectid; /* Unique layer identifier */ }
See Also: GetLayers()
FeatureSet-1.0.0.xsd
, which comes with the MapGuide distribution. Typically you will send this XML text to a server-side script for processing.
See Also: SetSelectionXML()
true
or false
.
true
for U.S./English; false
for metric.
See Also: SetEnglishUnits()
true
for latitude/longitude; false
for map units. This method always returns false
for the AJAX viewer, which doesn't support latitude/longitude display.
See Also: GetMapUnitsType(), MapUnitsToLatLon(), SetLatLonDisplayUnits()
Point
object:
Point { X; Y; }This method is available for only the DWF viewer; the AJAX viewer doesn't support latitude/longitude coordinates.
Parameters:
x
- the x coordinate, expressed in map units.
y
- the y coordinate, expressed in map units.
See Also: GetMapUnitsType(), IsLatLonDisplayUnits(), SetLatLonDisplayUnits()
Point
object:
Point { X; Y; }
Parameters:
x
- the x coordinate, expressed in pixels.
y
- the y coordinate, expressed in pixels.
See Also: GetMapUnitsType()
Parameters:
usEnglish
- set to true
for U.S./English units, or false
for metric units.
See Also: IsEnglishUnits()
Parameters:
latLon
- set to true
for latitude/longitude, or false
for map units.
See Also: GetMapUnitsType(), IsLatLonDisplayUnits(), MapUnitsToLatLon()
Parameters:
xmlSet
- a well-formed XML description of the features to select. This XML text must validate against the feature-set schema FeatureSet-1.0.0.xsd
, which comes with the MapGuide distribution.
See Also: GetSelectionXML()
Parameters:
x
- the x coordinate of the new center point, expressed in map units.
y
- the y coordinate of the new center point, expressed in map units.
scale
- the new scale of the map, as a floating-point number greater than or equal to one.
refresh
- Determines whether the entire map is refreshed when it is recentered or zoomed. Set refresh to true
to refresh; false
otherwise. This setting applies only to DWF images; HTML images always refresh automatically.
See Also: GetCenter(), GetMapUnitsType(), GetScale()
Parameters:
count
- the number of attributes to display. The properties palette displays a grid of count attributes only if exactly one feature is selected; otherwise it displays the message "n features selected" and ignores properties.
properties
- a 1-by-count array containing the names and corresponding values of the attributes to display in the properties grid, as Property
objects:
Property { name; value; }
Parameters:
msg
- the text to display. Use an empty string or null to clear the field.
Parameters:
msg
- the text to display. Use an empty string or null to clear the field.
Parameters:
msg
- the text to display. Use an empty string or null to clear the field.
Parameters:
msg
- the text to display. Use an empty string or null to clear the field.
Parameters:
action
- the code associated with the executed command. See ExecuteMapAction for a list of valid codes.