Instances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance.
OpenLayers. Layer. MapGuide | Instances of OpenLayers.Layer.MapGuide are used to display data from a MapGuide OS instance. |
Properties | |
isBaseLayer | {Boolean} Treat this layer as a base layer. |
singleTile | {Boolean} use tile server or request single tile image. |
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 |
Properties | |
defaultSize | {OpenLayers.Size} Tile size as produced by MapGuide server |
Constructor | |
OpenLayers. Layer. MapGuide | Create a new Mapguide layer, either tiled or untiled. |
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. |
Functions | |
clone | Create a clone of this layer |
addTile | Creates a tile, initializes it, and adds it to the layer div. |
getURL | Return a query string for this layer |
getFullRequestString | getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’. |
calculateGridLayout | Generate parameters for the grid layout. |
{OpenLayers.Size} Tile size as produced by MapGuide server
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 untiled overlay layers (singleTile=true and isBaseLayer=false), mapName and session are required parameters for the Layer constructor. Also NOTE: untiled overlay layers issues 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.
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.
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: |
options | {Ojbect} Hashtable of extra options to tag onto the layer; will vary depending if tiled or untiled maps are being requested |
clone: function ( obj )
Create a clone of this layer
{OpenLayers.Layer.MapGuide} An exact clone of this layer
addTile:function( bounds, position )
Creates a tile, initializes it, and adds it to the layer div.
bounds | {OpenLayers.Bounds} |
position | {OpenLayers.Pixel} |
{OpenLayers.Tile.Image} The added OpenLayers.Tile.Image
getURL: function ( bounds )
Return a query string for this layer
bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request |
{String} A string with the layer’s url and parameters and also the passed-in bounds and appropriate tile size specified as parameters.
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.
altUrl | {String} Alternative base URL to use. |
{String} A string with the layer’s url appropriately encoded for MapGuide
calculateGridLayout: function( bounds, extent, resolution )
Generate parameters for the grid layout. This
bounds | {<OpenLayers.Bound>} |
extent | {OpenLayers.Bounds} |
resolution | {Number} |
Object containing properties tilelon, tilelat, tileoffsetlat, tileoffsetlat, tileoffsetx, tileoffsety
Create a clone of this layer
clone: function ( obj )
Creates a tile, initializes it, and adds it to the layer div.
addTile:function( bounds, position )
Return a query string for this layer
getURL: function ( bounds )
getFullRequestString on MapGuide layers is special, because we do a regular expression replace on ‘,’ in parameters to ‘+’.
getFullRequestString:function( newParams, altUrl )
Generate parameters for the grid layout.
calculateGridLayout: function( bounds, extent, resolution )