MGBroker is used to broker requests to the MapGuide Open Source mapagent interface. It is a very simple class that is configured with a URL and credentials via the Fusion.Lib.MGBroker.setSiteURL method and can send requests to the server via the Fusion.Lib.MGBroker.dispatchRequest method.
Fusion. | MGBroker is used to broker requests to the MapGuide Open Source mapagent interface. |
Functions | |
dispatchRequest | send a request to the MapGuide Open Source server using XMLHttpRequest and return the result to the specified function. |
setSiteURL | set up a connection to a MapGuide Open Source site. |
clearSiteURL | remove all authentication information from the broker |
Fusion. | MGRequest is the base class for all broker-compatible requests. |
Functions | |
setParams | set the parameters associated with this request. |
setOptions | set the options associated with this request |
encode | returns a string containing all the request parameters in URL form suitable for appending to a URL. |
Fusion. | encapsulate a request to the server to enumerate resources in the library. |
Functions | |
Fusion. | initialize a new instance of MGEnumerateResources |
Fusion. | encapsulate a request to the server to get resource contents from the library. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceContent |
Fusion. | encapsulate a request to the server to get resource header from the library. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceHeader |
Fusion. | encapsulate a request to the server to create a new session on the server. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateSession |
Fusion. | encapsulate a request to the server to create a new runtime map (and session if required) on the server |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateRuntimeMap |
Fusion. | encapsulate a request to the server to create a new runtime map (and session if required) on the server |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateRuntimeMap |
Fusion. | encapsulate a request to the server to copy a resource. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCopyResource |
Fusion. | encapsulate a request to the server to delete a resource. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGDeleteResource |
Fusion. | encapsulate a request to the server to move a resource in the repository. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource |
Fusion. | encapsulate a request to the server to set the content XML of a resource. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource |
Fusion. | encapsulate a request to the server to describe the schema of a FeatureSource. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGDescribeSchema |
Fusion. | encapsulate a request to the server to retrieve the spatial context of a resource. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetSpatialContexts |
Fusion. | encapsulate a request to the server to enumerate the references to a resource id. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceReferences |
Fusion. | encapsulate a request to the server to enumerate the data associated with a FeatureSource N.B. |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceData |
Fusion. | Encapsulate a request to the server to get the visible map extent |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetVisibleMapExtent |
Fusion. | encapsulate a request to the server to query map features on selectable layers |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures |
Fusion. | encapsulate a request to the server to query map features on selectable layers |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures2 |
Fusion. | encapsulate a request to the server to query map features on selectable layers |
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope |
dispatchRequest : function( r, f )
send a request to the MapGuide Open Source server using XMLHttpRequest and return the result to the specified function.
r | {Object} an Fusion.Lib.MGRequest-subclass instance that defines the operation to request. |
f | {Function} a function object to invoke when the XMLHttpRequest call completes |
setSiteURL : function( url, user, pass )
set up a connection to a MapGuide Open Source site. This function expects that url is in the form http(s)://<address>/path-to-mapguide. Path-to-mapguide is should be the base URL to a MapGuide Open Source install. It is expected that the mapagent is in the expected place (mapagent/mapagent.fcgi) under that URL. If (for some strange reason) its not, then you can include the full path to mapagent.fcgi in the URL and this function won’t try to guess its location. The user name and password are passed on using basic HTML authentication (http://<user>:<pass>@<server>/path-to-mapguide).
url | {String} a properly formatted universal reverse locator to a MapGuide Open Source installation. |
user | {String} a valid user name |
pass | {String} the password for the given user. |
MGRequest is the base class for all broker-compatible requests. A request is a wrapper around an operation that is supported by the mapagent.
Functions | |
setParams | set the parameters associated with this request. |
setOptions | set the options associated with this request |
encode | returns a string containing all the request parameters in URL form suitable for appending to a URL. |
setParams : function( o )
set the parameters associated with this request. Parameters are dependent on the specific MGRequest subclass except for two mandatory parameters, version and locale, that are provided by this base class.
o | {Object} an object that contains named key : value pairs representing parameters to a request |
encapsulate a request to the server to enumerate resources in the library.
Functions | |
Fusion. | initialize a new instance of MGEnumerateResources |
initialize a new instance of MGEnumerateResources
resourceID | {String} optional parameter indicating the resource to enumerate. If not set or null, it defaults to “Library://” which is the root of the library. |
type | {String} optional parameter indicating the type of resources to enumerate. If not set, it will default to an empty string which indicates all types will be returned. |
depth | {Integer} optional parameter that controls the depth of the resource tree to enumerate. If not set, it will default to -1 which means the tree will be fully enumerated. |
encapsulate a request to the server to get resource contents from the library.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceContent |
encapsulate a request to the server to get resource header from the library.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetResourceHeader |
encapsulate a request to the server to create a new session on the server.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateSession |
encapsulate a request to the server to create a new runtime map (and session if required) on the server
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateRuntimeMap |
encapsulate a request to the server to create a new runtime map (and session if required) on the server
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCreateRuntimeMap |
encapsulate a request to the server to copy a resource.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGCopyResource |
encapsulate a request to the server to delete a resource.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGDeleteResource |
encapsulate a request to the server to move a resource in the repository.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource |
encapsulate a request to the server to set the content XML of a resource.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGMoveResource |
encapsulate a request to the server to describe the schema of a FeatureSource.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGDescribeSchema |
encapsulate a request to the server to retrieve the spatial context of a resource.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetSpatialContexts |
encapsulate a request to the server to enumerate the references to a resource id.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceReferences |
encapsulate a request to the server to enumerate the data associated with a FeatureSource N.B. This does not enumerate resource data for ‘unmanaged’ FeatureSources (those referencing files or directories outside the respository) Fusion.Lib.MGRequest.MGDescribeSchema should be used for those sources.
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGEnumerateResourceData |
Encapsulate a request to the server to get the visible map extent
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetVisibleMapExtent |
initialize a new instance of Fusion.Lib.MGRequest.MGGetVisibleMapExtent
sessionId | {String} the id of the session to restore |
mapName | {String} the name of the map |
viewCenterX | {String} the horizontal center of the view |
viewCenterY | {String} the vertical center of the view |
viewScale | {String} the scale of the map |
dataExtent | {String} the extent of the data |
displayDpi | {String} the DPI of the display |
displayWidth | {String} the width of the map |
displayHeight | {String} the height of the map |
showLayers | {String} a list of layer names to show |
hideLayers | {String} a list of layer names to hide |
showGroups | {String} a list of group names to show |
hideGroups | {String} a list of groupnames to hide |
refreshLayers | {String} a list of layers that need to be refreshed |
encapsulate a request to the server to query map features on selectable layers
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures |
initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures
sessionId | {String} the id of the session to restore |
mapName | {String} the id of the session to restore geometry (sting wkt} gemetry to use for selection. Example : POLYGON(x1 y1, x2,y2) |
maxFeatures | {integer} number of maximum results (-1 to indicate no maximum) |
selectionPersist | {boolean} save the selection (valid values are 0 and 1) |
selectionVariant | {String} indicates the spatial operation. Valid values are ‘INTERSECTS’, ... |
featureFilter | {String} filter crieteria to be applied for selection. |
layerNames | {String} comma separated list of layer names to include in the query |
layerAttributeFilter | {integer} bitmask determining layer selection behaviour (1=visible layers, 2=selectable layers, 4=layers with tooltips) |
encapsulate a request to the server to query map features on selectable layers
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures2 |
initialize a new instance of Fusion.Lib.MGRequest.MGQueryMapFeatures2
sessionId | {String} the id of the session to restore |
mapName | {String} the id of the session to restore geometry (sting wkt} gemetry to use for selection. Example : POLYGON(x1 y1, x2,y2) |
maxFeatures | {integer} number of maximum results (-1 to indicate no maximum) |
selectionPersist | {boolean} save the selection (valid values are 0 and 1) |
selectionVariant | {String} indicates the spatial operation. Valid values are ‘INTERSECTS’, ... |
featureFilter | {String} filter crieteria to be applied for selection. |
layerNames | {String} comma separated list of layer names to include in the query |
layerAttributeFilter | {integer} bitmask determining layer selection behaviour (1=visible layers, 2=selectable layers, 4=layers with tooltips) |
requestData | {integer} a bitmask of the desired information to return (Attributes = 1 InlineSelection? = 2 Tooltip = 4 Hyperlink = 8) |
selectionColor | {String} the html color for the inline selection image (if requested) |
selectionFormat | {String} the format of the inline selection image (if requested) |
encapsulate a request to the server to query map features on selectable layers
Functions | |
Fusion. | initialize a new instance of Fusion.Lib.MGRequest.MGGetFeatureSetEnvelope |
send a request to the MapGuide Open Source server using XMLHttpRequest and return the result to the specified function.
dispatchRequest : function( r, f )
set up a connection to a MapGuide Open Source site.
setSiteURL : function( url, user, pass )
remove all authentication information from the broker
clearSiteURL: function()
set the parameters associated with this request.
setParams : function( o )
set the options associated with this request
setOptions : function( o )
returns a string containing all the request parameters in URL form suitable for appending to a URL.
encode : function()