1 class ExportController < ApplicationController
3 before_filter :authorize_web
4 before_filter :set_locale
11 #When the user clicks 'Export' we redirect to a URL which generates the export download
13 bbox = BoundingBox.from_lon_lat_params(params)
14 format = params[:format]
17 #redirect to API map get
18 redirect_to "http://api.openstreetmap.org/api/#{API_VERSION}/map?bbox=#{bbox}"
20 elsif format == "mapnik"
21 #redirect to a special 'export' cgi script
22 format = params[:mapnik_format]
23 scale = params[:mapnik_scale]
25 redirect_to "http://render.openstreetmap.org/cgi-bin/export?bbox=#{bbox}&scale=#{scale}&format=#{format}"