You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
457 B

  1. <?php
  2. use \Slim\Savant;
  3. $app->get('/', function() use($app) {
  4. return Savant\render('index');
  5. });
  6. $app->get('/map', function() use($app) {
  7. return Savant\render('map');
  8. });
  9. $app->map('/map/img', function() use($app) {
  10. $params = $app->request()->params();
  11. $app->response['Content-type'] = 'image/png';
  12. $assetPath = dirname(__FILE__) . '/../public/map-images';
  13. $map = p3k\geo\StaticMap\generate($params, null, $assetPath);
  14. })->via('GET','POST');