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"
>> d.save

If you are creating setting the domain now:

>> d = Domain.new(
?>      :name => "localhost.localdomain",
?>      :is_default => true,
?>      :google_maps_key => "ABQIAAAAIrSU0X9l9fOGg9BoifXIhhTByWbZcAHEOi8Om5ex78pQduqBbBTG2pbYN0OEqx0zvvyp6MHtbXiK5g"
?>    )
>> d.valid?
=> true
>> Environment.default.domains << d
>> Environment.default.save
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...

-- DanielTygel - 13 Dec 2011


Add comment
You need to login to be able to comment.
 
Topic revision: r3 - 13 Dec 2011 - 12:02:24 - DanielTygel

irc Talk with Devs Now!

 
Translations: English
Search on Docs:
   
ActionItem Search:

Copyright © 2007-2014 by the Noosfero contributors
Colivre - Cooperativa de Tecnologias Livres