<div dir="ltr"><div>OK, after the help of a much smarter friend, I was able to get this working...<br><br></div>The baselayer that I added to settings.py was:<br><br>{<br> "source": {"ptype": "gxp_olsource"},<br> "type": "OpenLayers.Layer.TMS",<br> "args": ["ms2014_tms", "<a href="http://virt0026.cnptia.embrapa.br:8000/">http://virt0026.cnptia.embrapa.br:8000/</a>",<br> {"layername":"ms2014_tms", "type":"png"}],<br> "visibility": True,<br> "fixed": True,<br> "group": "background"<br>}<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 6, 2017 at 2:37 PM, Daniel Victoria <span dir="ltr"><<a href="mailto:daniel.victoria@gmail.com" target="_blank">daniel.victoria@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hi List,<br><br></div>I'm trying to add a new TMS baselayer to my GeoNode but I'm quite stuck. I generated the TMS file structure using gdal2tiles command. I then placed the files in the geonode apache webserver, using a different port (8000) and added the following to geonode settings.py<br><br>MAP_BASELAYERS = [{<br> "source": {"ptype": "gxp_olsource"},<br> "type": "OpenLayers.Layer",<br> "args": ["No background"],<br> "visibility": False,<br> "fixed": True,<br> "group":"background"<br>}, {<br> "source": {"ptype": "gxp_osmsource"},<br> "type": "OpenLayers.Layer.OSM",<br> "name": "mapnik",<br> "visibility": True,<br> "fixed": True,<br> "group": "background"<br>},{<br> "source": {"ptype": "gxp_tmssource",<br> "name": "ms2014_tms",<br> "url": "<a href="http://virt0026.cnptia.embrapa.br:8000/1.0.0/" target="_blank">http://virt0026.cnptia.<wbr>embrapa.br:8000/1.0.0/</a>"},<br> "visibility": True,<br> "fixed": True,<br> "group": "background"<br>}]<br><br></div>However, when I try yo load the GeoNode map page (geoexplorer), I get an Internal Server Error. I looked at apache error and access logs but I could no find anything.<br><br></div>I know that my TMS is working because I can load the layer using the sample html openlayers page that is created by gdal2tiles.py. There, it's done by the lines:<br><br> var tmsoverlay = new OpenLayers.Layer.TMS("RapidEye 2014", "<a href="http://virt0026.cnptia.embrapa.br:8000/" target="_blank">http://virt0026.cnptia.<wbr>embrapa.br:8000/</a>",<br> {<br> serviceVersion: '1.0.0',<br> layername: 'ms2014_tms',<br> alpha: true,<br> type: 'png',<br> isBaseLayer: false,<br> getURL: getURL<br> });<br><br></div>Any ideas of what could be wrong?<br><br></div>Notice: both geonode and tms server are not accessible outside my local network<br><br></div>Cheers<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Daniel<br></font></span></div>
</blockquote></div><br></div>