[GeoNode-users] google api policy

István Szőcs borohoro at gmail.com
Tue Aug 9 03:04:29 PDT 2016


Hello !

Thank you for the links. I believe I've done everything that says in the
documentation, also as Giovani pointed out but I still can't get it
working.
I've tried with more API keys too.
Please have a look at my settings.py and local_settings.py over here:

https://drive.google.com/folderview?id=0B6xaw_lJzhEATXFyZkFVeUdSeTQ&usp=sharing

With the Firefox web-console I get the following warnings:

Use of getPreventDefault() is deprecated.  Use defaultPrevented
instead.
assets.min.js:3:7935
GET XHR
http://192.168.1.130/layers/geonode:zone_afectate_de_constructii/permissions
                                        [HTTP/1.1 401 UNAUTHORIZED 42ms]
"Google Maps API warning: NoApiKeys
https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys"
util.js:220:12
Empty string passed to getElementById().

                                                 assets.min.js:2:10403
Prefixed Fullscreen API is deprecated. Please use unprefixed API for
fullscreen. For more help
https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
controls.js:32:55


I really don't know what am I doing wrong.

regards,
         István



On Sat, Aug 6, 2016 at 12:15 AM, Paolo Corti <pcorti at gmail.com> wrote:

> Wait, it is already there:
> http://docs.geonode.org/en/master/tutorials/advanced/
> geonode_production/production.html#google
>
> sorry for the noise
> p
>
> On Fri, Aug 5, 2016 at 11:12 PM, Paolo Corti <pcorti at gmail.com> wrote:
> > 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
>
>
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20160809/f955c485/attachment.html>


More information about the geonode-users mailing list