I am adding new entity to the viewer.entities collection, and I am adding icon to the billboard I create.
The icon appears on the map, but when I move the map, the icon duplicate itself to the original one, and to its frame painted in black.
How can I fix it?
gadgallea
Post your code. Follow the 5emplate for posting. I wpuld try to help you, but you didnt post the minimum required info to understand you
Thanks
Lftgly
here is my code:
let viewer = new Cesium.Viewer('container', {
imageryProvider: Cesium.createTileMapServiceImageryProvider({
url: Cesium.buildModuleUrl('assets/Textures/NaturalEarthII')})
})
private createEntity(lon:number, lat:number): any {
return {
id:'entityId',
position: Cesium.Cartesian3.fromDegrees(lon,lat),
billboard: {
image: 'data:image/png;base64...'
}}}
viewer.enteties.add(createEntity(x,y));
I am using cesium in angular 6.
There must be something else going on as this code, modified for Sandcastle, works.
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
imageryProvider: Cesium.createTileMapServiceImageryProvider({
url: Cesium.buildModuleUrl('assets/Textures/NaturalEarthII')
})
});
var createEntity = function(lon, lat) {
return {
id: 'entityId',
position: Cesium.Cartesian3.fromDegrees(lon, lat),
billboard: {
image: '../../SampleData/snowflake_particle.png'
}
};
};
viewer.entities.add(createEntity(-100, 32));
``
Scott
gadgallea, if you could create an example using Sandcastle to duplicate the issue, it would help track down what’s going on.
Thanks!
Gabby
Can it happen becuase of a video card?
Possibly, but without more information, like the Sandcastle example @ggetz and @LeftGully requested, there’s really not much we can do to help as this is not a problem that has happened before. What OS, browser, and video card are you using?