1

I have tiles stored here:

../CO_054/MtViewBaseMap/MtViewBaseTiles

in the order : C:\Program Files (x86)\GeoServer 2.10.3\webapps\CO_054\MtViewBaseMap\MtViewBaseTiles\0\0\0.png

I'm using this to reference the tiles:

 var tiles = new OpenLayers.Layer.XYZ(
           "CO_054",
           [
            "../CO_054/MtViewBaseMap/MtViewBaseTiles/${z}/${x}/${y}.png"
           ],
           {
            attribution: "Data copyright OpenStreetMap contributors",
            sphericalMercator: true,
            wrapDateLine: true,
            numZoomLevels: 18
           }
         );
        map.addLayer(tiles);

However, I only get broken image icons and the following errors:

  HTTP ERROR 404

Problem accessing /CO_054/MtViewBaseMap/MtViewBaseTiles/11/1025/1021.png. Reason:

    Not Found
Powered by Jetty://

I can see that the directory is not being constructed correctly but it seems that my code is set up to match where the .png files live. I mimicked this from another html file with the same file structure and it works fine.

At CO_054/MtViewBaseMap/MtViewBaseTiles/11/ I have a folder named 329 and two .png files (793.png and 794.png). Why is the WMS looking for 1023/1023.png?

This is what it should be reading:

enter image description here

Here's what the directory looks like in z = 11:

enter image description here

1

In order for GeoServer to serve static files you need to place them in the www folder of the data directory. So your path should be:

C:\Program Files (x86)\GeoServer 2.10.3\webapps\geoserver\data\www\CO_054\Mt_ViewBaseLayer\0\0\0.png
  • placed the files in the folder you specified and still got the same error. in the developer console I get this message: Not allowed to load local resource: file:///C:/Program%20Files%20(x86)/GeoServer%202.10.3/webapps/data/www/Mt_ViewBaseLayer/11/1025/1024.png – geoJshaun Jul 10 '17 at 20:23
  • I'm pretty sure you need to be using Jetty or tomcat to make this work – Ian Turton Jul 11 '17 at 7:54
  • I am using jetty – geoJshaun Jul 12 '17 at 1:49
  • then your URL above would be localhost:8080/geoserver/www/Mt_.... not file:///..... – Ian Turton Jul 12 '17 at 7:56
  • changed it to this: "localhost:8080/geoserver/www/CO_054/Mt_View/Mt_ViewBaseLayer/${z}/${x}/${y}.png" Now the message says "GET: then the pathway with the wrong indexed pngs – geoJshaun Jul 12 '17 at 20:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.