[GeoNode-users] Adding a XYZ basemap to GeoExplorer

Paolo Pasquali paolo.pasquali at gmail.com
Mon Feb 18 08:27:51 PST 2019


Dear all,

I understand this is more a GeoExplorer matter but maybe you can help...

I would like to add a XYZ layer as a basemap so I've changed my settings
accordingly.
The problem is that I cannot solve the z/x/y url pattern, in particular I
should have (my guess, since the tiles goes on the other side of the
equator) a negative y. Here is my settings:

{
    "source": {"ptype": "gxp_olsource"},
    "type": "OpenLayers.Layer.XYZ",
    "title": "CD:NGI Topo",
    "args": ["CD:NGI Topo", "
https://htonl.dev.openstreetmap.org/ngi-tiles/tiles/50k/${z}/${x}/${-y}.png
"],
    "name": "background",
    "attribution": "State Copyright © 1996–2013 <a href=\"
http://www.ngi.gov.za\">Chief Directorate: National Geo-spatial
Information</a>",
    "visibility": False,
    "wrapDateLine": True,
    "fixed": True,
    "group":"background"
},

Unfortunately, OpenLayers (or GeoExplorer) cannot solve the -y because I
get this for a tile:
https://htonl.dev.openstreetmap.org/ngi-tiles/tiles/50k/5/17/$%7B-y%7D.png

Is there a way to handle this? I've also tried with OpenLayers.Layer.OSM but
had the same result.

Thanks in advance for your help.

Best,


Paolo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20190218/48955111/attachment.html>


More information about the geonode-users mailing list