Browse Source

map api uses get or post

main
Aaron Parecki 9 years ago
parent
commit
428cf9066a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      controllers/main.php

+ 2
- 2
controllers/main.php View File

@ -9,9 +9,9 @@ $app->get('/map', function() use($app) {
return Savant\render('map'); return Savant\render('map');
}); });
$app->get('/map/img', function() use($app) {
$app->map('/map/img', function() use($app) {
$params = $app->request()->params(); $params = $app->request()->params();
$app->response['Content-type'] = 'image/png'; $app->response['Content-type'] = 'image/png';
$assetPath = dirname(__FILE__) . '/../p3k/map/images'; $assetPath = dirname(__FILE__) . '/../p3k/map/images';
$map = p3k\geo\StaticMap\generate($params, null, $assetPath); $map = p3k\geo\StaticMap\generate($params, null, $assetPath);
});
})->via('GET','POST');

Loading…
Cancel
Save