imagelayer can't show

classic Classic list List threaded Threaded
5 messages Options
ytyisme ytyisme
Reply | Threaded
Open this post in threaded view
|

imagelayer can't show

This post was updated on .
I build osgearth master and osg master with vs2017 on Jun 30, 2020
GL3: Non-GL3 version number: 1.0
[osgEarth]  [Capabilities] Capabilities: 
[osgEarth]  [Capabilities]   osgEarth Version:  3.0.0 
[osgEarth]  [Capabilities]   OSG Version:       3.7.0
[osgEarth]  [Capabilities]   GDAL Version:      2.4.4
[osgEarth]  [Capabilities]   GPU Vendor:        NVIDIA Corporation
[osgEarth]  [Capabilities]   GPU Renderer:      GeForce RTX 2060/PCIe/SSE2
[osgEarth]  [Capabilities]   GL/Driver Version: 4.6.0 NVIDIA 442.53
[osgEarth]  [Capabilities]   GL Core Profile:   no
when load tms or xyzimage and window scal small
when window is small
the other one
My earth file like fllow

or
<!--
osgEarth Sample

Basic example of how to read feature data from a shapefile and build
OSG geometry out of it.
-->

<map name="Geocentric" type="geocentric">
	<!-- XyzImage name="gaode_road" info="高德道路">
        <url>http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&amp;size=1&amp;scale=1&amp;style=8&amp;x={x}&amp;y={y}&amp;z={z}</url>
        <profile>spherical-mercator</profile>
	</XyzImage -->
	<!--XyzImage name="gaode_satellite"info="高德卫星">
        <url>http://webst04.is.autonavi.com/appmaptile?style=6&amp;x={x}&amp;y={y}&amp;z={z}</url>
        <profile>spherical-mercator</profile>
	</XyzImage -->
	<XyzImage name="mapbox_satellite" cache_enabled="true" info="google">
        <url>http://mt2.google.cn/vt/lyrs=y&amp;hl=zh-CN&amp;gl=cn&amp;x={x}&amp;y={y}&amp;z={z}</url>
        <profile>spherical-mercator</profile>
	</XyzImage>
	<!-- xyzelevation name="googleterrain" info="谷歌高程">
        <url>http://mt2.google.cn/vt/lyrs=t&amp;scale=0.1&amp;hl=zh-CN&amp;gl=cn&amp;x={x}&amp;y={y}&amp;z={z}</url>
        <profile>spherical-mercator</profile>
	</xyzelevation -->
	
	
	<OGRFeatures name="world-data">
        <url>./features/ch_boundary.shp</url>
    </OGRFeatures>
    
    <FeatureModel name="Country boundaries" features="world-data">     
        <styles>
            <style type="text/css">
                world {
                   stroke:                   #ffff00;
                   stroke-width:             3px;
                   render-lighting:          false;
                   altitude-offset:          20000;        
                }            
            </style>
        </styles>
    </FeatureModel>
	
	<options>
		<cache type="filesystem">
			<path>./MapCache</path>
		</cache>
	</options>
</map>

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: imagelayer can't show

How many windows are you viewing at the same time?
If more than one, you may need to call
osgEarth::Registry::instance()->unRefImageDataAfterApply() = false;
Glenn Waldron / Pelican Mapping
ytyisme ytyisme
Reply | Threaded
Open this post in threaded view
|

Re: imagelayer can't show

only one window
ytyisme ytyisme
Reply | Threaded
Open this post in threaded view
|

Re: imagelayer can't show

In reply to this post by gwaldron
When the window becomes larger, the imagelayer becomes clearer
ytyisme ytyisme
Reply | Threaded
Open this post in threaded view
|

Re: imagelayer can't show

This post was updated on .
In reply to this post by ytyisme
Found the problem.
The earth file is missing one Item
<interpolation>nearest</interpolation>
  Insert one item into GDALImage will be OK.

Or remove options also can be ok
      <options>
		<cache type="filesystem">
			<path>./MapCache</path>
		</cache>
	</options>
I don't know why