-elsif params['mlon'] and params['mlat']
- lon = h(params['mlon'])
- lat = h(params['mlat'])
- zoom = h(params['zoom'] || '12')
- layers = h(params['layers'])
+elsif params[:lon] and params[:lat]
+ lon = params[:lon].to_f
+ lat = params[:lat].to_f
+ zoom = params.fetch(:zoom, 5).to_i
+ layers = params[:layers]
+ object_zoom = false
+elsif params[:mlon] and params[:mlat]
+ lon = params[:mlon].to_f
+ lat = params[:mlat].to_f
+ zoom = params.fetch(:zoom, 12).to_i
+ layers = params[:layers]