MapGuide RFC 96 - QuickPlot solution for both Ajax and Fusion viewers

This page contains an change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.


RFC Template Version(1.0)
Submission Date06/13/2010
Last ModifiedMars Wu 06/13/2010
AuthorMars Wu
RFC Statusimplemented
Implementation Statusimplemented
Proposed Milestone2.3
Assigned PSC guide(s)Bruce Dechant
Voting HistoryJune 21, 2010
+1Bruce, Trevor, Tom, Paul, Robert, Haris, Jason, Zac, Jackie
no vote


This RFC is to add a new print function for both Ajax Viewer and Fusion Viewer. The new print function (let’s call it Quick Plot for now) will have following functions:

  • Can define the print area by put a capturing box in map.
  • Can choose different DPI for the generated printable picture
  • Can choose paper size from a pre-defined list
  • Can rotate the capture box to get Landscape or Portrait print orientation
  • Offer a preview dialog to let user see what the print will look like.

The output of the print will still be HTML + PNG, but the PNG picture will have higher DPI (depends on what the dpi the user chooses to do the print)


The current available print solution in both Ajax viewer and Fusion is limited because:

  • Can only print the visible region within current viewport, and cannot define in more detail about the print area
  • Cannot control the print resolution. The result of the existing print functions are just small pictures in 96 dpi which may lead to bade print quality

The new print solution will solve these problems.

Proposed Solution

This function needs to work in both Ajax Viewer and Fusion Viewer. In Fusion viewer, Quick Plot will be implemented as a new widget (or enhance / replace the existing Print widget):

  • Uses Jx.Button as the uiClass:
    Fusion.Widget.QuickPlot = OpenLayers.Class(Fusion.Widget, 
        uiClass: Jx.Button,
  • Has a main UI in TaskPane for configuring the print Title, Subtile, Print DPI etc.
  • Uses Jx.Dialog as the preview dialog.
  • The capture box, by moving / rotating which the user could define the print area will be implemented as Vector features.
  • Dragging / Dropping / Rotating the capture box will be implemented by OpenLayers.Handler.Drag and OpenLayers.Handler.Drag.Feature

In Aajx viewer, Quick Plot will replace the existing "Get Printable Page" command.

  • The preview dialog will also be implemented through Jx.Dialog. That means we need includes JxLib.js in Ajax viewer.
  • The capture box will be drawn in the map through the built-in jsGraphic API.
  • New event handlers will be attached to the map window to handle the capture box’s drag / drop / rotate


Quick Plot for Ajax Viewer will need JxLib.js and JxTheme.css. Lazy load will be used so that only when Quick Plot is invoked, will the JxLib.js and JxTheme.css be loaded. This way the new function will now impact the map initiation.

Test Plan



Supplied by Autodesk.

Last modified 5 years ago Last modified on Jul 5, 2011 2:21:58 AM