Work towards https://github.com/ConservationMetrics/map-packer/issues/10. mapgl-tile-renderer can now distinguish between type: new_request and type: delete_request, and delete an offline map package from the db and file storage in the latter case.
What I'm doing here
Added a function handleDeleteRequest to delete the database row associated with a requestId, and delete the file as defined by outputFilename and outputPath.
The existing logic to trigger the rendering of a new offline map has been moved into its own function, handleNewMaprequest.
Depending on the message type, one or the other is called.
Goal
Work towards https://github.com/ConservationMetrics/map-packer/issues/10. mapgl-tile-renderer can now distinguish between
type: new_request
andtype: delete_request
, and delete an offline map package from the db and file storage in the latter case.What I'm doing here
handleDeleteRequest
to delete the database row associated with arequestId
, and delete the file as defined byoutputFilename
andoutputPath
.handleNewMaprequest
.type
, one or the other is called.