相关文章推荐
一身肌肉的拖把  ·  printPreviewControl1 ...·  4 月前    · 
健壮的芹菜  ·  matlab ...·  4 月前    · 
阳刚的雪糕  ·  Auto gpt尝鲜体验 - 知乎·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

The 404 still propagates to the console. Here is the console output plus the response from Geoserver that produces the 404. I tried to fix Geoserver layer with no luck either.

Failed to load resource: the server responded with a status of 404 (Not Found) Coverage [minx,miny,maxx,maxy] is [71508, 85624, 71511, 85627, 17], index [x,y,z] is [71512, 85626, 17]

Thanks for the tip I did not think of that. I will give it a go and if it works I will post my code :) mdiener Jul 2, 2018 at 7:14

By manually adding the extent property to your ol.layer.tile layer upon creation in openlayers 3.x 4.x The extent property will NOT try to load tiles outside of this extent and therefor suppress a 400 or 404 repsonse from Geoserver. My data is in this case in EPSG:3857 and therefor so is my extent. Extent is defined as [minx, miny, maxx, maxy]

var tmp_lyr = new ol.layer.Tile({
        source: source_xyz,
        extent: [1826159,6142088, 1826967, 6142874],
        visible: is_visible,
        name: name,
        floor_num: floor,
        type: 'floor',
        zIndex: zIndex,
        crossOrigin: "anonymous"
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.