I am having trouble undertsanding exactly what is supported by Cesium Ion. I am loading Geojson files into my assets and adding them to my stories , so I am not able to manipulate them with code. So i need to ensure the Geojson file are properly formatted. I am especially interested in what the defaults are and what tags are not suppported.
Can someone please point me to a document that shows what tags are supported.
Thank you advance.
You can visit our guide to uploading data to Cesium ion here. Please follow up with any additional questions you may have.
Thanks for your response.
I have read the guide and that’s not what I need.
I need to know what Geojson format is supported in Cesium. The actual specification of what is compliant mark up.
For example you have a kml guide that documents what mark up you support for kml files that are uploaded see (https://github.com/CesiumGS/cesium/issues/873).
Can you please provide information or a guide about what Geojson mark up is supported in Cesium.
I need to know this so I can format my Geojson files for loading into Cesium Ion. These files will not be manipulated in code so styling options need to be specified in the file.
To be clear I will give you an example, I am currently loading the file (below) into Cesium Ion as an asset. The screenshot (below) is the result.
I would like to know how I can;
- Clamp the marker to ground ?
- Include a label in the marker ?
- Change the marker to a different icon ?
======Geojson file ==============
“name”: “-add name”,
“description”: “-add description”,
I also have some additional questions regarding kml vs geojson.
I am evaluating whether to use kml or geojson to annotate my 3D models and I am trying to understand which one is best to use.
I have loaded in two files to Cesium ion to place markers on my 3D model and have obtained very different results although the coordinates were exactly the same.
- How do I stop the Geojson marker from partially being obscured when I zoom in ? What mark up do I use in the Geojson file ? Can you point me to geojson examples that are supported, not code example actual file formats please.
- Why is the kml file not working ? It has exactly the same coordinates as the Geojson file but produces incorrect results and changes position when I change the camera angle.
- The kml format supported by Cesium is documented in https://github.com/CesiumGS/cesium/issues/873 but doesn’t seem to work. Is there a different document ?
My objective was to place a marker exactly on the corner of the hatch on the roof of the bus. I used two different file formats, one Geojson and one kml.
( Blue marker) The Geojson file was successful and the marker stays exactly on the desired spot whichever angle I view it from. Except for when I zoom in, it partially disappears when I do this.
(Yellow marker )The kml file was not successful. It was incorrectly positioned and changes position when I view it from different angles.
Geojson file loaded
For the GeoJSON format, you can find the specifications for GeoJSON linked in our
GeoJsonDataSource documentation. Clamp to ground is not a spec feature, but we automatically clamp markers to the ground in Cesium Stories. We also recently added support for simplestyle. You can add a
marker-symbol to the markers. You can also add a
title (which appears when you hover over the marker). I’m less sure about this but you can try setting a
name attribute as suggested here.
For the additional questions on your latest post:
- Unfortunately, without code, you might have to go in and shift the height of the obscured markers.
- This seems like it could be a bug. I will check with our team and get back to you on this.
- This is the most updated kml format document we have. What doesn’t seem to work for you (beside the one mentioned in the previous question)? Did you have problems while uploading it or is there a property listed as supported on the kml format document that you couldn’t get to work?
I wanted to double check, are your rounding for kml and geojson files the same for coordinates?
I doubled checked with our team and the discrepancy between the positions of markers in the kml file and the geojson file might be caused by a height reference in the kml file that prevents the markers to be clamped to the ground (since Cesium Stories automatically clamp markers).
I have just tested the kml file again this time with 0 height and I get the same result.
For both the Geojson file and the kml file (both below) coordinates are identical so they should produce the same result.
I haven’t been able to test many more kml features as the basic coordinates x,yz need to work before I can use the other features. I really would like to use the other features, however I need the basic ones working first.
You can view the story here.
- Can you confirm the kml coordinates x,y,z are working correctly with a kml file ?
- Can you explain exactly what clamp to Ground means ? Because I can specify a height that is hovering above an object (see story above) and the marker is correctly positioned in the air.
I will continue with the Geojson file no doubt with some more questions.
<?xml version="1.0" encoding="UTF-8"?>
This is the description......
“name”: “-add name”,
“description”: “-add description”,
I have just observed some strange behaviour. When you first load the story the kml marker appears in the correct position for about 0.5 seconds then it moves to the ground.
So it seems the coordinates and the height may be working for a brief moment, then a bug kicks in and moves it.
Can you please load the story and observe the behaviour and see how to correct it ?
Thanks and look forward to hearing from you.
It’s been a while and I haven’t had an answer for this one yet.
Can you please come back to me.