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.
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]
Properties
defaultSize{OpenLayers.Size} Tile size as produced by MapGuide server
tileOriginCorner{String} MapGuide tile server uses top-left as tile origin
Functions
OpenLayers.Layer.MapGuideCreate a new Mapguide layer, either tiled or untiled.
cloneCreate a clone of this layer
getURLReturn a query string for this layer
getFullRequestStringgetFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.
getImageFilePathspecial handler to request mapguide tiles from an http exposed tilecache
calculateGridLayoutGenerate parameters for the grid layout.

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]

Properties

defaultSize

{OpenLayers.Size} Tile size as produced by MapGuide server

tileOriginCorner

{String} MapGuide tile server uses top-left as tile origin

Functions

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.

NOTE: 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{Object} Hashtable of extra options to tag onto the layer; will vary depending if tiled or untiled maps are being requested

clone

clone: function (obj)

Create a clone of this layer

Returns

{OpenLayers.Layer.MapGuide} An exact clone of this layer

getURL

getURL: function (bounds)

Return a query string for this layer

Parameters

bounds{OpenLayers.Bounds} A bounds representing the bbox for the request

Returns

{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.

getFullRequestString

getFullRequestString:function(newParams,
altUrl)

getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.  This is why it is subclassed here.

Parameters

altUrl{String} Alternative base URL to use.

Returns

{String} A string with the layer’s url appropriately encoded for MapGuide

getImageFilePath

getImageFilePath:function(newParams,
altUrl)

special handler to request mapguide tiles from an http exposed tilecache

Parameters

altUrl{String} Alternative base URL to use.

Returns

{String} A string with the url for the tile image

calculateGridLayout

calculateGridLayout: function(bounds,
origin,
resolution)

Generate parameters for the grid layout.  This

Parameters

bounds{<OpenLayers.Bound>}
origin{OpenLayers.LonLat}
resolution{Number}

Returns

{Object} Object containing properties tilelon, tilelat, tileoffsetlat, tileoffsetlat, tileoffsetx, tileoffsety

Instances of this class represent a width/height pair
clone: function (obj)
Create a clone of this layer
getURL: function (bounds)
Return a query string for this layer
getFullRequestString:function(newParams,
altUrl)
getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.
getImageFilePath:function(newParams,
altUrl)
special handler to request mapguide tiles from an http exposed tilecache
calculateGridLayout: function(bounds,
origin,
resolution)
Generate parameters for the grid layout.
Base class for layers that use a lattice of tiles.
Create a new Mapguide layer, either tiled or untiled.
Instances of this class represent bounding boxes.
This class represents a longitude and latitude pair
Close