Billboard with SVG image keeps the style from HTML

185 views
Skip to first unread message

sh...@gmail.com

unread,
May 27, 2015, 8:17:38 AM5/27/15
to cesiu...@googlegroups.com
Hi,

I've a billboard with a SVG image. Now if I have for example an img tag in my HTML with the same SVG image, and have some CSS style applied to that tag, the same style applies to the billboard's image as well.

I've expected the both to be separated. Is this a known thing?

For example, consider this Sandcastle (notice this is happening only with the SVG and not with the PNG's), the billboard is affected by the CSS style:

// Javascript
var viewer = new Cesium.Viewer('cesiumContainer');

viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
billboard :{
image : '../../../Source/Widgets/Images/NavigationHelp/MouseRight.svg'
}
});
viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-95.59777, 40.03883),
billboard :{
image : '../../../Source/Widgets/Images/Cesium_Logo_overlay.png'
}
});

// HTML + CSS
<style>
@import url(../templates/bucket.css);
img.pic {
height: 15px;
}
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<img class="pic" src="../../../Source/Widgets/Images/NavigationHelp/MouseRight.svg"/>
<img class="pic" src="../../../Source/Widgets/Images/Cesium_logo_overlay.png"/>

Mike LP

unread,
Jun 3, 2015, 4:27:55 PM6/3/15
to cesiu...@googlegroups.com, shoo...@gmail.com, shoo...@gmail.com
I'm going to say that is a bug..  To the best of my knowledge that is not expected behavior.  https://github.com/AnalyticalGraphicsInc/cesium/issues/2785

Matthew Amato

unread,
Jun 3, 2015, 4:44:18 PM6/3/15
to cesiu...@googlegroups.com
I think the bug is in Chrome, not Cesum, I updated the linked issue with my thoughts.

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages