[GeoNode-users] Adding a XYZ basemap to GeoExplorer

Alessio Fabiani alessio.fabiani at gmail.com
Mon Feb 18 08:49:39 PST 2019


Hi Paolo,
I'm afraid you will need to create a custom ptype, similar to OSM as an
instance, which is able to correctly parse and create urls for this
particular use case.

Il giorno lun 18 feb 2019 alle ore 17:28 Paolo Pasquali <
paolo.pasquali at gmail.com> ha scritto:

> 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
>
>
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20190218/c67b45c4/attachment-0001.html>


More information about the geonode-users mailing list