[GeoNode-users] google api policy

Paolo Corti pcorti at gmail.com
Fri Aug 5 14:12:33 PDT 2016


Thanks Giovani
could you send a PR, including some documentation (must be added here:
https://github.com/GeoNode/geonode/blob/master/docs/reference/developers/settings.txt)?
thanks a lot
p

On Fri, Aug 5, 2016 at 9:41 PM, Giovani Fronza <giovanifronza at gmail.com> wrote:
> I did it today, motivated by these toppics in the list.
> I've put these code on my settings.py:
>
> # A Google Maps API key is needed for the 3D Google Earth view of maps
> # See http://code.google.com/apis/maps/signup.html
> GOOGLE_API_KEY = '<your key rehe>'
>
> try:
>     GOOGLE_LAYER_SAT = {
>         "source": {
>             "ptype": "gxp_googlesource",
>             "apiKey": GOOGLE_API_KEY
>         },
>         "name": "SATELLITE",
>         "fixed": True,
>         "visibility": False,
>         "group": "background"
>     }
>     MAP_BASELAYERS.append(GOOGLE_LAYER_SAT)
> except GoogleAPIError:
>     print "Not enabling Google  Maps base layer as a GOOGLE_API_KEY is not
> defined in settings.py file."
>
>
>
> You could even change name "SATELLITE" by ROADMAP, HYBRID, or TERRAIN.
> After changes, restart your apache to make efect.
>
>
>
>
> 2016-08-05 15:14 GMT-03:00 Charles Cossé <ccosse at gmail.com>:
>>
>> Shouldn't it go in site_base.html?  as a Javascript include?
>> -Charles
>>
>>
>> On Aug 5, 2016 5:47 AM, "István Szőcs" <borohoro at gmail.com> wrote:
>>>
>>> Hello !
>>>
>>> Thank you for clearing that out. I have put the key in the file.
>>> Do you know if there's a time frame until a new key becomes active ?
>>> Because it's still not loading the google layers.
>>> And I know that this is a geonode forum, please forgive me, but perhaps
>>> somebody knows the same thing for an Opengeo Suite install (on Windows) ?
>>> I couldn't find the file where to insert the key, of course
>>> local_settings.py is not present over there.
>>> So what would be the equivalent file in which to insert the key on an
>>> Opengeo Suite installation ?
>>>
>>>
>>> kind regards,
>>>           István
>>>
>>>
>>> On Thu, Aug 4, 2016 at 12:48 PM, Amedeo Fadini <amefad at gmail.com> wrote:
>>>>
>>>> Hello,
>>>>
>>>> Il 04/ago/2016 10:08 AM, "István Szőcs" <borohoro at gmail.com> ha scritto:
>>>> >
>>>> > Hello !
>>>> >
>>>> >  Can somebody please tell me where to insert this key, in which file
>>>> > on the server ?
>>>>
>>>> Quite simple: in /etc/geonode/local_settings.py
>>>>
>>>> see also
>>>>
>>>>
>>>> http://docs.geonode.org/en/master/tutorials/advanced/geonode_production/production.html
>>>>
>>>> amedeo
>>>
>>>
>>>
>>> _______________________________________________
>>> geonode-users mailing list
>>> geonode-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>>
>>
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>>
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>



-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the geonode-users mailing list