| 389 | == !GetVisibleMapExtent ==#GetVisibleMapExtent1.2 |
| 390 | === Overview === |
| 391 | Returns the visible map extent for the map specified by SESSION and MAPNAME. During the call, the map state can be modified by additional parameters such as SETVIEWCENTERX and SETVIEWSCALE. This API is typically called before [##GetDynamicMapOverlayImage1.2 GetDynamicMapOverlay] to set map state. The returned XML document has the following format: |
| 392 | {{{ |
| 393 | <?xml version=\"1.0\" encoding=\"UTF-8\"?> |
| 394 | <Envelope> |
| 395 | <LowerLeftCoordinate> |
| 396 | <X>10</X> |
| 397 | <Y>10</Y> |
| 398 | </LowerLeftCoordinate> |
| 399 | <UpperRightCoordinate> |
| 400 | <X>20</X> |
| 401 | <Y>20</Y> |
| 402 | </UpperRightCoordinate> |
| 403 | </Envelope> |
| 404 | }}} |
| 405 | === Parameters === |
| 406 | || '''Name''' || '''Value''' || '''Required''' || '''Description''' || |
| 407 | || [#Operation1.0 OPERATION] || GETVISIBLEMAPEXTENT || Yes || Operation to execute || |
| 408 | || [#Version1.0 VERSION] || 1.0.0 || Yes || Operation version || |
| 409 | || [#Session1.0 SESSION] || session identifier || Yes || !MapGuide session identifier containing map to display. || |
| 410 | || [#MapName1.0 MAPNAME] || text || Yes || Name of the map to display.[[BR]]This corresponds to the !GetName() value for the resource identifier. || |
| 411 | || [#SetViewCenterX1.0 SETVIEWCENTERX] || double || Optional || Set X coordinate for center of map. || |
| 412 | || [#SetViewCenterY1.0 SETVIEWCENTERY] || double || Optional || Set Y coordinate for center of map. || |
| 413 | || [#SetViewScale1.0 SETVIEWSCALE] || double || Optional || Set scale for map. || |
| 414 | || [#SetDisplayDpi1.0 SETDISPLAYDPI] || integer || Optional || Set DPI for map. || |
| 415 | || [#SetDisplayWidth1.0 SETDISPLAYWIDTH] || integer || Optional || Set width of image in pixels. || |
| 416 | || [#SetDisplayHeight1.0 SETDISPLAYHEIGHT] || integer || Optional || Set height of image in pixels. || |
| 417 | || [#ShowLayers1.0 SHOWLAYERS] || text || Optional || List of layers to display. || |
| 418 | || [#HideLayers1.0 HIDELAYERS] || text || Optional || List of layers to hide. || |
| 419 | || [#ShowGroups1.0 SHOWGROUPS] || text || Optional || List of groups to display. || |
| 420 | || [#HideGroups1.0 HIDEGROUPS] || text || Optional || List of groups to hide. || |
| 421 | === Usage === |
| 422 | {{{ |
| 423 | http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GETVISIBLEMAPEXTENT |
| 424 | &VERSION=1.0.0 |
| 425 | &SESSION=Session:d5d05422-5f75-102c-8000-02004c4f4f50_en_7F0000010AFC0AFB0AFA |
| 426 | &MAPNAME=WorldElevation |
| 427 | &SETVIEWCENTERX=-114.0 |
| 428 | &SETVIEWCENTERY=51.0 |
| 429 | &SETVIEWSCALE=50000 |
| 430 | &SETDISPLAYHEIGHT=500 |
| 431 | &SETDISPLAYWIDTH=500 |
| 432 | }}} |
| 433 | Sets the center point of the !WorldElevation map to (-114,51) and the scale to 1:50000. The display height and width for a subsequent |
| 434 | [##GetDynamicMapOverlayImage1.2 GetDynamicMapOverlay] are set to 500 by 500. |
| 435 | === Technical Notes === |