*          @SWG\Parameter(name="marginleft", in="query", required=false, type="number", description="left margin in inches"),
*          @SWG\Parameter(name="marginright", in="query", required=false, type="number", description="right margin in inches"),
*          @SWG\Parameter(name="margintop", in="query", required=false, type="number", description="top margin in inches"),
*          @SWG\Parameter(name="marginbottom", in="query", required=false, type="number", description="bottom margin in inches"),
*          @SWG\Parameter(name="printlayout", in="query", required=false, type="string", description="The PrintLayout resource to use for plotting. Only applies if plotting to DWF"),
*          @SWG\Parameter(name="title", in="query", required=false, type="string", description="The title to put in the plot"),
*          @SWG\Parameter(name="layeredpdf", in="query", required=false, type="boolean", description="Indicates whether to produce a layered PDF. Only applies if plotting PDFs. This is slower than regular PDF plot, but produces a PDF with the same layer structure as the map"),
*          @SWG\Parameter(name="type", in="path", required=true, type="string", description="The plot type", enum={"dwf", "pdf"}),
*        @SWG\Response(response=400, description="You supplied a bad request due to one or more missing or invalid parameters"),
*        @SWG\Response(response=401, description="Session ID or MapGuide credentials not specified"),
*        @SWG\Response(response=500, description="An error occurred during the operation")
*     )
*/
$app->get("/session/:sessionId/:mapName.Map/plot.:format", function ($sessionId, $mapName, $format) use($app) {
    $ctrl = new MgMappingServiceController($app);
    $ctrl->GeneratePlot($sessionId, $mapName, $format);
});
/**
 *     @SWG\Get(
 *        path="/session/{session}/{mapName}.Map/description.{type}",
 *        operationId="DescribeRuntimeMap",
 *        summary="Describe an existing MgMap instance from the specified mapname and session id and returns detailed information about its layer/group structure if requested",
 *        tags={"session"},
 *          @SWG\Parameter(name="session", in="path", required=false, type="string", description="Your MapGuide Session ID. If none specified you must pass the basic http authentication challenge"),
 *          @SWG\Parameter(name="mapName", in="path", required=false, type="string", description="The map name used to identify the MgMap instance"),
 *          @SWG\Parameter(name="requestedfeatures", in="query", required=false, type="integer", description="A bitmask of the information about the Runtime Map that you would like returned. 1=Layer/Group structure, 2=icons, 4=Feature Source Information"),
 *          @SWG\Parameter(name="iconformat", in="query", required=false, type="string", description="The desired icon image format if icons are requested", enum={"PNG","JPG","PNG8","GIF"}),
 *          @SWG\Parameter(name="iconwidth", in="query", required=false, type="integer", description="The desired width of generated icons if icons are requested"),
 *          @SWG\Parameter(name="iconheight", in="query", required=false, type="integer", description="The desired height of generated icons if icons are requested"),
 *          @SWG\Parameter(name="iconsperscalerange", in="query", required=false, type="integer", description="The number of icons to generate per scale range if icons are requested"),
 *          @SWG\Parameter(name="type", in="path", required=true, type="string", description="xml or json", enum={"json", "xml"}),