wiki:MapGuideRfc96

Version 6 (modified by brucedechant, 14 years ago) ( diff )

--

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.

Status

RFC Template Version(1.0)
Submission Date06/13/2010
Last ModifiedMars Wu 06/13/2010
AuthorMars Wu
RFC Statusfrozen for vote
Implementation Statusunder development
Proposed Milestone2.3
Assigned PSC guide(s)Bruce Dechant
Voting History(vote date)
no vote

Overview

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)

Motivation

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 be implemented as an “Invoke Script” command:

  • A new function startQuickPlot will be implemented in ajaxmappane.templ to start Quick Plot logic by loading the main UI into the Task Pane. The main UI will share the template for Fusion viewer. The template is shared as "copy / paste" so that there is no dependencies between Ajax viewer and Fusion viewer.
  • 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

Implications

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 will be loaded. This way the new function will now impact the map initiation.

Test Plan

N/A

Funding/Resources

Supplied by Autodesk.

Note: See TracWiki for help on using the wiki.