Failed to view the osgb format cache file

classic Classic list List threaded Threaded
1 message Options
JimmyXu JimmyXu
Reply | Threaded
Open this post in threaded view
|

Failed to view the osgb format cache file

This post was updated on .
Hello,

I created a map with filesystem cache using code below.

osgEarth::Drivers::FileSystemCacheOptions cacheOpts;
cacheOpts.rootPath() = g_PathFileFinder.GetCacheDir(true);

And I added an image layer to the map using xml configuration like this.

<image cacheid=\"Tianditu img\" driver=\"xyz\" name=\"Tianditu img\" url=\"http://t[01234567].tianditu.cn/img_c/wmts?SERVICE=WMTS&amp;REQUEST=GetTile&amp;VERSION=1.0.0&amp;LAYER=img&amp;STYLE=default&amp;TILEMATRIXSET=c&amp;FORMAT=tiles&amp;TileMatrix={z+1}&amp;TileRow={y}&amp;TileCol={x}\">
<profile srs=\"global-geodetic\" srs_enum=\"global-geodetic\" />
<cache_policy usage=\"read_write\" />
</image>

The image layer is loaded successfully. And in the folder created by "g_PathFileFinder.GetCacheDir(true)",  I saw that caches are generated.




But When I use osgviewer to viewer the osgb file, error occurs.



Does anyone knows the reason?

Jimmy