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]
–
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.