Get Off My Lawn

Adventures of a Curmudgeon

NTS: GeoKit + YM4R-GM

I’ve just started looking into Google Maps integration and I settled on those two plugins. I also noticed you have to set the Geocoders key, based on your environment.

I just knew there had to be a way to get to the keys in gmaps_api_key.yml (this file is used by the YM4R plugin) because I didn’t want to copy/paste the values into environemnt.rb and I didn’t want multiple definitions in each evnrionment’s file, and this is Ruby!

So I’m going to try this method: one line in environment.rbGeoKit::Geocoders::google = Ym4r::GmPlugin::ApiKey.get

Cheers!