}}}
----
'''Revision History'''
||'''Revision'''||'''Date'''||'''Author'''||'''Comment'''||
||0.1||April 16, 2010||Trevor Wekel||Initial documentation pass||
[[PageOutline(1-3,Table of Contents,inline)]]
= 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''' ||
|| [#Operation1.0 OPERATION] || GETDYNAMICMAPOVERLAYIMAGE || Yes || Operation to execute ||
|| [#Version1.0 VERSION] || 2.0.0/2.1.0 || Yes || Operation version ||
|| [#ClientAgent1.0 CLIENTAGENT] || text || Optional || Descriptive text for client ||
|| [#Session1.0 SESSION] || session identifier || Yes || !MapGuide session identifier containing map to display ||
|| [#MapName1.0 MAPNAME] || text || Yes || Name of the map to display.[[BR]]This corresponds to the !GetName() value for the resource identifier. ||
|| [#Format1.0 FORMAT] || JPG/PNG/PNG8 || Yes || Image format for rendered image ||
|| [#Selection1.0 SELECTION] || XML selection text || Optional || XML representing selected features generated from !MgSelection.!ToXml() ||
|| [#SelectionColor1.0 SELECTIONCOLOR] || RGBA hex color || Yes || Selection color encoded in hexadecimal RGBA format 0xRRGGBBAA. ||
|| [#Behavior2.0 BEHAVIOR] || bitmask || Yes || Bitmask representing rendering behavior. See below for more details.||
|| [#SetViewCenterX1.0 SETVIEWCENTERX] || double || No || Set X coordinate for center of map. ||
|| [#SetViewCenterY1.0 SETVIEWCENTERY] || double || No || Set Y coordinate for center of map. ||
|| [#SetViewScale1.0 SETVIEWSCALE] || double || No || Set scale for map. ||
|| [#SetDisplayDpi1.0 SETDISPLAYDPI] || integer || No || Set DPI for map. ||
|| [#SetDisplayWidth1.0 SETDISPLAYWIDTH] || integer || No || Set width of image in pixels. ||
|| [#SetDisplayHeight1.0 SETDISPLAYHEIGHT] || integer || No || Set height of image in pixels. ||
|| [#ShowLayers1.0 SHOWLAYERS] || text || No || List of layers to display. ||
|| [#HideLayers1.0 HIDELAYERS] || text || No || List of layers to hide. ||
|| [#ShowGroups1.0 SHOWGROUPS] || text || No || List of groups to display. ||
|| [#HideGroups1.0 HIDEGROUPS] || text || No || List of groups to hide. ||
==== BEHAVIOR Parameter ==== #Behavior2.0
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
=== 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 1.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''' ||
|| [#Operation1.0 OPERATION] || GETDYNAMICMAPOVERLAYIMAGE || Yes || Operation to execute ||
|| [#Version1.0 VERSION] || 1.0.0 || Yes || Operation version ||
|| [#ClientAgent1.0 CLIENTAGENT] || text || Optional || Descriptive text for client ||
|| [#Session1.0 SESSION] || session identifier || Yes || !MapGuide session identifier containing map to display ||
|| [#MapName1.0 MAPNAME] || text || Yes || Name of the map to display.[[BR]]This corresponds to the !GetName() value for the resource identifier. ||
|| [#Format1.0 FORMAT] || JPG/PNG/PNG8 || Yes || Image format for rendered image ||
|| [#Selection1.0 SELECTION] || XML selection text || Optional || XML representing selected features generated from !MgSelection.!ToXml() ||
|| [#SelectionColor1.0 SELECTIONCOLOR] || RGBA hex color || Yes || Selection color encoded in hexadecimal RGBA format 0xRRGGBBAA. ||
|| [#KeepSelection1.0 KEEPSELECTION] || 0/1 || Optional || If true, render selected feature(s) even if they are outside the current scale. ||
|| [#SetViewCenterX1.0 SETVIEWCENTERX] || double || No || Set X coordinate for center of map. ||
|| [#SetViewCenterY1.0 SETVIEWCENTERY] || double || No || Set Y coordinate for center of map. ||
|| [#SetViewScale1.0 SETVIEWSCALE] || double || No || Set scale for map. ||
|| [#SetDisplayDpi1.0 SETDISPLAYDPI] || integer || No || Set DPI for map. ||
|| [#SetDisplayWidth1.0 SETDISPLAYWIDTH] || integer || No || Set width of image in pixels. ||
|| [#SetDisplayHeight1.0 SETDISPLAYHEIGHT] || integer || No || Set height of image in pixels. ||
|| [#ShowLayers1.0 SHOWLAYERS] || text || No || List of layers to display. ||
|| [#HideLayers1.0 HIDELAYERS] || text || No || List of layers to hide. ||
|| [#ShowGroups1.0 SHOWGROUPS] || text || No || List of groups to display. ||
|| [#HideGroups1.0 HIDEGROUPS] || text || No || List of groups to hide. ||
==== OPERATION Parameter ==== #Operation1.0
==== VERSION Parameter ==== #Version1.0
==== CLIENTAGENT Parameter ==== #ClientAgent1.0
==== SESSION Parameter ==== #Session1.0
==== MAPNAME Parameter ==== #MapName1.0
==== FORMAT Parameter ==== #Format1.0
==== SELECTION Parameter ==== #Selection1.0
==== KEEPSELECTION Parameter ====
==== SELECTIONCOLOR Parameter ==== #SelectionColor1.0
==== SETVIEWCENTERX Parameter ==== #SetViewCenterX1.0
==== SETVIEWCENTERY Parameter ==== #SetViewCenterY1.0
==== SETVIEWSCALE Parameter ==== #SetViewScale1.0
==== SETDISPLAYDPI Parameter ==== #SetDisplayDpi1.0
==== SETDISPLAYWIDTH Parameter ==== #SetDisplayWidth1.0
==== SETDISPLAYHEIGHT Parameter ==== #SetDisplayHeight1.0
==== SHOWLAYERS Parameter ==== #ShowLayers1.0
==== HIDELAYERS Parameter ==== #HideLayers1.0
==== SHOWGROUPS Parameter ==== #ShowGroups1.0
==== HIDEGROUPS Parameter ==== #HideGroups1.0
=== Usage ===
=== Technical Notes ===