Setting the Google Maps APIKEY for a Domain
You must use the Noosfero Console
to follow this steps.
If you already have a registered domain
, get it and set the APIKEY:
>> d = Domain.find_by_name('localhost.localdomain')
>> d.google_maps_key = "ABQIAAAAIrSU0X9l9fOGg9BoifXIhhTByWbZcAHEOi8Om5ex78pQduqBbBTG2pbYN0OEqx0zvvyp6MHtbXiK5g"
If you are creating setting the domain now:
>> d = Domain.new(
?> :name => "localhost.localdomain",
?> :is_default => true,
?> :google_maps_key => "ABQIAAAAIrSU0X9l9fOGg9BoifXIhhTByWbZcAHEOi8Om5ex78pQduqBbBTG2pbYN0OEqx0zvvyp6MHtbXiK5g"
>> Environment.default.domains << d
You may want to know more about how to set domains in Noosfero
In google maps API
v3 the API
key is no longer necessary. Maybe it would be fine to upgrade to this version, which is much better than v2...
- 13 Dec 2011
Topic revision: r3 - 13 Dec 2011 - 12:02:24 - DanielTygel