-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why Load geojson with Cesium3DTileset in 2d is not same as GeoJsonDataSource? #10777
Comments
So the root of the difference in curvature is likely due to a difference in the arc type used in either case, which will determine how a 3D line is projected into 2D space. Though its odd that @lilleyse Can you confirm? |
|
@lilleyse I use a tileset for drawing geojson is indeed for good performance,drawing by tileset is much more efficient than GeoJsonDataSource. |
Thanks @lilleyse! @libofei2004 I'm going to close the issue based on that answer. Let us know if there is still an issue. |
@ggetz @lilleyse I want to know how to have a tileset with the MAXAR_content_geojson extension?Does it make the geojson drawing a straight line? |
I load a geojson with dataSources in 2d like this way:

viewer.dataSources.add(
Cesium.GeoJsonDataSource.load(
"../../Cesium-1.97/p1.json",
{
stroke: Cesium.Color.HOTPINK,
fill: Cesium.Color.PINK.withAlpha(0.5),
strokeWidth: 3
}
)
);
It seems like this:
Then I load the same geojson with Cesium3DTileset in 2d like this way:

const tileset = new Cesium.Cesium3DTileset({
url: "../../Cesium-1.97/tileset.json"
});
viewer.scene.primitives.add(tileset);
tileset.style = new Cesium.Cesium3DTileStyle({
color: "rgba(255, 0, 0, 0.8)"
});
the tileset.json content is:
{
"asset":{"version":"0.0","tilesetVersion":"1.0"},
"root":{
"boundingVolume":{
"region": [-3.14159,-1.57,3.14159,1.57,0,10000]
},
"geometricError":100000,
"content":{"uri":"p1.json"}
}
}
The geojson seems like this, it's bend.
In 3d mode, they looks the same,but in 2d mode,they are different, why?
How to make geojson with Cesium3DTileset looks the same as GeoJsonDataSource?
The text was updated successfully, but these errors were encountered: