[GeoNode-users] Adding Google Maps as default background in Mapstore - Geonode 2.10 (docker version)

Chiara Sammarco chiara.sammarco at geodatalab.it
Wed Jul 8 03:51:20 PDT 2020


Hi all,

I'm trying to add google maps to the default background. I'm currently 
using Geonode 2.10 (dockerized version).

By adding at the end of DEFAULT_MS2_BACKGROUNDS in settings.py the 
following lines

{
"source": "google",
"group": "background",
"title": "Google HYBRID",
"name": "HYBRID",
"thumbURL": "%sstatic/mapstorestyle/img/google-icon-preview.png" % SITEURL,
"visibility": False
}

I can see the icon for the google background in Mapstore, but it's not 
clickable, and still, I cannot see the preview thumbnail.

I've also added GOOGLE_API_KEY in my env file and then fixed the BASEMAP 
ptype with "gxp_googlesource" in this way:

if GOOGLE_API_KEY:
    BASEMAP = {
             'source': {
                  'ptype': 'gxp_googlesource',
                  'apiKey': GOOGLE_API_KEY
             },
             'name': 'SATELLITE',
             'fixed': True,
             'visibility': False,
             'group': 'background'
         }
    MAP_BASELAYERS.append(BASEMAP)

Am I on the right way? What can be missing? Should I have to be in 
production for testing this?
Why is the "Google HYBRID" square not clickable?


Thanks in advance for your help,

Chiara Sammarco



-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20200708/e893cb88/attachment.html>


More information about the geonode-users mailing list