diff --git a/controllers/main.php b/controllers/main.php index 3fe1fc8..c1f231a 100644 --- a/controllers/main.php +++ b/controllers/main.php @@ -9,9 +9,9 @@ $app->get('/map', function() use($app) { return Savant\render('map'); }); -$app->get('/map/img', function() use($app) { +$app->map('/map/img', function() use($app) { $params = $app->request()->params(); $app->response['Content-type'] = 'image/png'; $assetPath = dirname(__FILE__) . '/../p3k/map/images'; $map = p3k\geo\StaticMap\generate($params, null, $assetPath); -}); +})->via('GET','POST');