Binding Google Map API key to the application

Is there is a way to bind the Google Maps API to the application
instead of a controller / view? http://abc/controller/action/parameter
doesn’t work as I am forced to use the key only for the action. If I
can bind it to http://abc/controller instead it will be nice. Is
there anyway to use routes to change the URL creation formation from
action/id to action?id or something?

I came up with this as a solution and it seems to work.

In routes.rb

map.connect ‘map/:action.:id’, :controller=>“map”

So I can generate http://abc/controller/action.parameter instead of

Any better suggestions?