wiki:HttpApi/RenderingService

Version 17 (modified by trevorwekel, 15 years ago) ( diff )

--

Rendering Service HTTP APIs


Revision History

RevisionDateAuthorComment
0.1April 16, 2010Trevor WekelInitial documentation pass

Table of Contents

  1. Overview
  2. MapGuide 2.1 APIs
    1. GetDynamicMapOverlayImage
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
    2. GetMapImage
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
    3. GetMapLegendImage
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
    4. GetVisibleMapExtent
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
    5. QueryMapFeatures
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
  3. MapGuide 2.0 APIs
    1. GetDynamicMapOverlayImage
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes
  4. MapGuide 1.2 APIs
    1. GetDynamicMapOverlayImage
      1. Overview
      2. Parameters
      3. Usage
      4. Technical Notes

Overview

This document describes the Rendering Service HTTP APIs supported by the MapGuide mapagent. The Rendering Service APIs are used to render a map into a bitmapped image. In addition to bitmap rendering, the APIs support basic updates to the underlying MgMap object state including changes to center, scale, and layer visibility.

MapGuide 2.1 APIs

GetDynamicMapOverlayImage

Overview

GetDynamicMapOverlayImage returns a rendered raster image containing all visbile layers at the current center and scale for the map. This API is used in conjuction with the GetVisibleMapExtent HTTP API to provide dynamic map updates for end user interactions.

Parameters

Name Value Required Description
OPERATION GETDYNAMICMAPOVERLAYIMAGE Yes Operation to execute
VERSION 2.1.0 Yes Operation version
CLIENTAGENT text Optional Descriptive text for client
SESSION session identifier Yes MapGuide session identifier containing map to display
MAPNAME text Yes Name of the map to display.
This corresponds to the GetName() value for the resource identifier.
FORMAT JPG/PNG/PNG8 Yes Image format for rendered image
SELECTION XML selection text Optional XML representing selected features generated from MgSelection.ToXml()
SELECTIONCOLOR RGBA hex color Yes Selection color encoded in hexadecimal RGBA format 0xRRGGBBAA.
BEHAVIOR bitmask Yes Bitmask representing rendering behavior. See below for more details.
SETVIEWCENTERX double Optional Set X coordinate for center of map.
SETVIEWCENTERY double Optional Set Y coordinate for center of map.
SETVIEWSCALE double Optional Set scale for map.
SETDISPLAYDPI integer Optional Set DPI for map.
SETDISPLAYWIDTH integer Optional Set width of image in pixels.
SETDISPLAYHEIGHT integer Optional Set height of image in pixels.
SHOWLAYERS text Optional List of layers to display.
HIDELAYERS text Optional List of layers to hide.
SHOWGROUPS text Optional List of groups to display.
HIDEGROUPS text Optional List of groups to hide.

CLIENTAGENT Parameter

Descriptive text describing the client of the HTTP operation. Currently used values include "Ajax Viewer", "Fusion Viewer" "MapGuide Developer" and "MapGuide Maestro".

SETVIEWCENTERX Parameter

SETVIEWCENTERY Parameter

SETVIEWSCALE Parameter

SETDISPLAYDPI Parameter

SETDISPLAYWIDTH Parameter

SETDISPLAYHEIGHT Parameter

SHOWLAYERS Parameter

HIDELAYERS Parameter

SHOWGROUPS Parameter

HIDEGROUPS Parameter

Usage

Technical Notes

GetMapImage

Overview

Parameters

Usage

Technical Notes

GetMapLegendImage

Overview

Parameters

Usage

Technical Notes

GetVisibleMapExtent

Overview

Parameters

Usage

Technical Notes

QueryMapFeatures

Overview

Parameters

Usage

Technical Notes

MapGuide 2.0 APIs

GetDynamicMapOverlayImage

Overview

GetDynamicMapOverlayImage returns a rendered raster image containing all visbile layers at the current center and scale for the map. This API is used in conjuction with the GetVisibleMapExtent HTTP API to provide dynamic map updates for end user interactions.

Parameters

Name Value Required Description
OPERATION GETDYNAMICMAPOVERLAYIMAGE Yes Operation to execute
VERSION 2.0.0 Yes Operation version
SESSION session identifier Yes MapGuide session identifier containing map to display
MAPNAME text Yes Name of the map to display.
This corresponds to the GetName() value for the resource identifier.
FORMAT JPG/PNG/PNG8 Yes Image format for rendered image
BEHAVIOR bitmask Yes Bitmask representing rendering behavior. See below for more details.
SELECTION XML selection text Optional XML representing selected features generated from MgSelection.ToXml()
SELECTIONCOLOR RGBA hex color Yes Selection color encoded in hexadecimal RGBA format 0xRRGGBBAA.

BEHAVIOR Parameter

The behavior parameter specifies how the rendering is performed. The value is encoded as a bitmask to facilitate future enhancements to the API. One or more bits may be combined to determine overall rendering behavior.

Value Description
1 (RenderSelection) Renders the selected feature(s)
2 (RenderLayers) Renders the features on the map
4 (KeepSelection) Renders the selected feature(s) even if they are outside the current scale

Examples:

  • BEHAVIOR=3 (RenderSelection|RenderLayers) will render selection and layers within the current scale
  • BEHAVIOR=5 (RenderSelection|KeepSelection) will render only the selection regardless of scale

SELECTIONCOLOR Parameter

Color for selected objects expressed in hexadecimal RGBA format 0xRRGGBBAA.

Usage

Technical Notes

MapGuide 1.2 APIs

GetDynamicMapOverlayImage

Overview

GetDynamicMapOverlayImage returns a rendered raster image containing all visbile layers at the current center and scale for the map. This API is used in conjuction with the GetVisibleMapExtent HTTP API to provide dynamic map updates for end user interactions.

Parameters

Name Value Required Description
OPERATION GETDYNAMICMAPOVERLAYIMAGE Yes Operation to execute
VERSION 1.0.0 Yes Operation version
SESSION session identifier Yes MapGuide session identifier containing map to display
MAPNAME text Yes Name of the map to display.
This corresponds to the GetName() value for the resource identifier.
FORMAT JPG/PNG Yes Image format for rendered image
SELECTION XML selection text Optional XML representing selected features generated from MgSelection.ToXml()
KEEPSELECTION 0/1 Optional If true, render selected feature(s) even if they are outside the current scale.

OPERATION Parameter

VERSION Parameter

SESSION Parameter

MAPNAME Parameter

FORMAT Parameter

Image format for the rendered image. PNG8 support was added in MapGuide 2.0.

SELECTION Parameter

KEEPSELECTION Parameter

Usage

Technical Notes

Note: See TracWiki for help on using the wiki.