[GeoNode-devel] bing api request denied

Matteo Nastasi nastasi at openquake.org
Wed Oct 14 06:53:52 PDT 2015


On 10/14/2015 03:51 PM, Matteo Nastasi wrote:
> On 10/07/2015 03:41 PM, Simone Dalmasso wrote:
>> Dears,
>>
>> from yesterday the bing maps api that are used by default in every 
>> GeoNode map are not working anymore due to a request denied. The 
>> effect is that every map in GeoNode cannot be zoomed properly anymore.
>>
>> While we try to figure out what is the cause of this we suggest a 
>> quick fix,
>> open your GeoNode settings  (/etc/geonode/local_settings.py for a 
>> standard apt-get installation) and comment the following lines like 
>> we already did on master
>> https://github.com/GeoNode/geonode/commit/f2707e64e78931b31a06016a3e04f1ba76021b66 then 
>> restart the web server.
>>
>> We appreciate any comment and feedback.
>>
> Hi all,
>
> IF you are running geonode 2.0.1 AND you have a bing-key AND your 
> database is PostgreSQL THEN
>   you can fix your geonode installation AND your old maps modifying
>   your local_settings.py file accordingly with:
>
> vvvv
>      [...]
> BING_KEY = {
>      'bing_key': (
>          '<your_bing_key>'
>      ),
> }
>
>      [...]
>
> MAP_BASELAYERS = [{
>
>      [...]
>
>   }, {
>      "source": {"ptype": "gxp_bingsource",
>                 "apiKey": "<your_bing_key>"},
or, better:

     "source": {"ptype": "gxp_bingsource",
                "apiKey": BING_KEY['bing_key']},

>      "name": "AerialWithLabels",
>      "fixed": True,
>      "visibility": False,
>      "group":"background"
>    },{
>      [...]
> ^^^^
> And running this SQL command:
> vvvv
> UPDATE maps_maplayer SET source_params = regexp_replace(source_params, '"ptype": "gxp_bingsource"',
>      '"apiKey": "<your_bing_key>", "ptype": "gxp_bingsource"')
>      WHERE  name = 'AerialWithLabels' AND source_params NOT LIKE '%"apiKey":%';
> ^^^^
> Substituting each occurrence of <your_bing_key> with your own bing-key.
>
> Regards, Daniele and Matteo.
>> -- 
>> Simone
>>
>>
>> _______________________________________________
>> geonode-devel mailing list
>> geonode-devel at lists.osgeo.org
>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-devel
>
>
> -- 
> Matteo Nastasi
> Senior Software Engineer
> GEM Foundation
> Via Ferrata 1, 27100 Pavia, Italy
> Phone: +39-0382-5169865
>
> Web:www.globalquakemodel.org  |www.nexus.globalquakemodel.org


-- 
Matteo Nastasi
Senior Software Engineer
GEM Foundation
Via Ferrata 1, 27100 Pavia, Italy
Phone: +39-0382-5169865

Web: www.globalquakemodel.org | www.nexus.globalquakemodel.org



More information about the geonode-devel mailing list