/** * @SWG\Delete( * path="/session/{session}/{resName}", * operationId="DeleteResource", * summary="Deletes the given resource", * tags={"session"}, * @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"), * @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The resource name (including extension)"), * @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->delete("/session/:sessionId/:resName", function ($sessionId, $resName) use($app) { $resId = new MgResourceIdentifier("Session:{$sessionId}//{$resName}"); $ctrl = new MgResourceServiceController($app); $ctrl->DeleteResource($resId); }); //================================== Tile Service APIs ======================================= /** * @SWG\Get( * path="/session/{session}/{resName}/tile.{type}/{groupName}/{scaleIndex}/{col}/{row}", * operationId="GetTile", * summary="Gets the specified tile for the given map definition", * tags={"session"}, * @SWG\Parameter(name="session", in="path", required=true, type="string", description="Your MapGuide Session ID"), * @SWG\Parameter(name="resName", in="path", required=true, type="string", description="The name of the Map Definition"), * @SWG\Parameter(name="groupName", in="path", required=true, type="string", description="The tiled group of the Map Definition"), * @SWG\Parameter(name="scaleIndex", in="path", required=true, type="integer", description="The finite scale index"), * @SWG\Parameter(name="col", in="path", required=true, type="integer", description="The column of the tile to fetch"), * @SWG\Parameter(name="row", in="path", required=true, type="integer", description="The row of the tile to fetch"),
* @SWG\Post( * path="/services/moveresource", * operationId="MoveResource", * summary="Moves a resource from one resource ID to another", * tags={"services"}, * @SWG\Parameter(name="source", in="formData", required=true, type="string", description="The Source Resource ID"), * @SWG\Parameter(name="destination", in="formData", required=true, type="string", description="The Target Resource ID"), * @SWG\Parameter(name="overwrite", in="formData", required=false, type="boolean", description="Indicates whether to overwrite the target resource if it exists"), * @SWG\Parameter(name="cascade", in="formData", required=false, type="boolean", description="Indicates whether to cascade any reference changes in related documents as a result of this change"), * @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->post("/services/moveresource", function () use($app) { $ctrl = new MgResourceServiceController($app); $ctrl->MoveResource(); }); /** * @SWG\Post( * path="/services/transformcoords", * operationId="TransformCoordinates", * summary="Transforms the given coordinates from the specified source coordinate system to the target coordinate system", * tags={"services"}, * @SWG\Parameter(name="from", in="formData", required=true, type="string", description="The Source Coordinate System Code"), * @SWG\Parameter(name="to", in="formData", required=true, type="string", description="The Target Coordinate System Code"), * @SWG\Parameter(name="coords", in="formData", required=true, type="string", description="A comma-delimited list of space-delimited coordinate pairs"), * @SWG\Parameter(name="format", in="formData", required=true, type="string", description="xml or json", enum={"json", "xml"}), * @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")