OpenLayers. Layer. MapGuide

Instances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance.

Inherits from

Summary
OpenLayers. Layer. MapGuideInstances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance.
Properties
isBaseLayer{Boolean} Treat this layer as a base layer.
useHttpTile{Boolean} use a tile cache exposed directly via a webserver rather than the via mapguide server.
singleTile{Boolean} use tile server or request single tile image.
useOverlay{Boolean} flag to indicate if the layer should be retrieved using GETMAPIMAGE (default) or using GETDYNAMICOVERLAY requests.
useAsyncOverlay{Boolean} indicates if the MapGuide site supports the asynchronous GETDYNAMICOVERLAY requests which is available in MapGuide Enterprise 2010 and MapGuide Open Source v2.0.3 or higher.
Constants
TILE_PARAMS{Object} Hashtable of default parameter key/value pairs for tiled layer
SINGLE_TILE_PARAMS{Object} Hashtable of default parameter key/value pairs for untiled layer
OVERLAY_PARAMS{Object} Hashtable of default parameter key/value pairs for untiled layer
FOLDER_PARAMS{Object} Hashtable of parameter key/value pairs which describe the folder structure for tiles as configured in the mapguide serverconfig.ini section [TileServiceProperties]
Constructor
OpenLayers. Layer. MapGuideCreate a new Mapguide layer, either tiled or untiled.
MapGuide OS uses a DPI value and degrees to meters conversionfactor that are different than the defaults used in OpenLayers, so these must be adjusted accordingly in your application.

Properties

isBaseLayer

{Boolean} Treat this layer as a base layer.  Default is true.

useHttpTile

{Boolean} use a tile cache exposed directly via a webserver rather than the via mapguide server.  This does require extra configuration on the Mapguide Server, and will only work when singleTile is false.  The url for the layer must be set to the webserver path rather than the Mapguide mapagent.  See http://trac.osgeo.org- /mapguide- /wiki- /CodeSamples- /Tiles- /ServingTilesViaHttp

singleTile

{Boolean} use tile server or request single tile image.

useOverlay

{Boolean} flag to indicate if the layer should be retrieved using GETMAPIMAGE (default) or using GETDYNAMICOVERLAY requests.

useAsyncOverlay

{Boolean} indicates if the MapGuide site supports the asynchronous GETDYNAMICOVERLAY requests which is available in MapGuide Enterprise 2010 and MapGuide Open Source v2.0.3 or higher.  The newer versions of MG is called asynchronously, allows selections to be drawn separately from the map and offers styling options.

With older versions of MapGuide, set useAsyncOverlay=false.  Note that in this case a synchronous AJAX call is issued and the mapname and session parameters must be used to initialize the layer, not the mapdefinition parameter.  Also note that this will issue a synchronous AJAX request before the image request can be issued so the users browser may lock up if the MG Web tier does not respond in a timely fashion.

Constants

TILE_PARAMS

{Object} Hashtable of default parameter key/value pairs for tiled layer

SINGLE_TILE_PARAMS

{Object} Hashtable of default parameter key/value pairs for untiled layer

OVERLAY_PARAMS

{Object} Hashtable of default parameter key/value pairs for untiled layer

FOLDER_PARAMS

{Object} Hashtable of parameter key/value pairs which describe the folder structure for tiles as configured in the mapguide serverconfig.ini section [TileServiceProperties]

Constructor

OpenLayers. Layer. MapGuide

Create a new Mapguide layer, either tiled or untiled.

For tiled layers, the ‘groupName’ and ‘mapDefinition’ values must be specified as parameters in the constructor.

For untiled base layers, specify either combination of ‘mapName’ and ‘session’, or ‘mapDefinition’ and ‘locale’.

For older versions of MapGuide and overlay layers, set useAsyncOverlay to false and in this case mapName and session are required parameters for the constructor.

MapGuide OS uses a DPI value and degrees to meters conversion

factor that are different than the defaults used in OpenLayers, so these must be adjusted accordingly in your application.  See the MapGuide example for how to set these values for MGOS.

Parameters

name{String} Name of the layer displayed in the interface
url{String} Location of the MapGuide mapagent executable (e.g.  http://localhost:8008- /mapguide- /mapagent- /mapagent.fcgi)
params{Object} hashtable of additional parameters to use.  Some parameters may require additional code on the server.  The ones that you may want to use are:
  • mapDefinition - {String} The MapGuide resource definition (e.g.  Library://Samples/Gmap/Maps/gmapTiled.MapDefinition)
  • locale - Locale setting (for untiled overlays layers only)
  • mapName - {String} Name of the map as stored in the MapGuide session.  (for untiled layers with a session parameter only)
  • session - { String} MapGuide session ID (for untiled overlays layers only)
  • basemaplayergroupname - {String} GroupName for tiled MapGuide layers only
  • format - Image format to be returned (for untiled overlay layers only)
  • showLayers - {String} A comma separated list of GUID’s for the layers to display eg: ‘cvc-xcv34,453-345-345sdf’.
  • hideLayers - {String} A comma separated list of GUID’s for the layers to hide eg: ‘cvc-xcv34,453-345-345sdf’.
  • showGroups - {String} A comma separated list of GUID’s for the groups to display eg: ‘cvc-xcv34,453-345-345sdf’.
  • hideGroups - {String} A comma separated list of GUID’s for the groups to hide eg: ‘cvc-xcv34,453-345-345sdf’
  • selectionXml - {String} A selection xml string Some server plumbing is required to read such a value.
options{Ojbect} Hashtable of extra options to tag onto the layer; will vary depending if tiled or untiled maps are being requested
Base class for layers that use a lattice of tiles.
Close