Include additional properties in Geocoder

Using Cesiums geocoder to find an address currently isn’t ideal as the only property returned is label:
For example: https://api.cesium.com/v1/geocode/search?text=Sydney

Gives two results which appear identical

        {
            "properties": {
                "label": "Sydney, Australia"
            },
            "bbox": [
                150.5858612060547,
                -34.1965217590332,
                151.35153198242188,
                -33.374847412109375
            ]
        },
        {
            "properties": {
                "label": "Sydney, Australia"
            },
            "bbox": [
                151.19696044921875,
                -33.87979507446289,
                151.2230224609375,
                -33.85604476928711
            ]
        },

Is it possible to include in the results additional information such as country, region, etc. in the response?

I can see how that is confusing with two entries with the same name. I have opened an issue for our team to track this.

Can you provide some more information about your use case? For example:

  • Do you want this information displayed directly to the end user using the default Cesium JS geocoder, or are you using an API to access this information before displaying it in your own user interface.
  • What type of results are you searching for? How would you decided which result is better suited for your use case? In this case the locations are both in a similar geographic area, so even including a country or region may not differentiate the two results.

Thanks for the quick reply!

  • The use case is for terriajs and using an alternative geocoder to Bing maps, in this case I am calling the api directly and would handle displaying extra information to the user myself.
  • The type of results could vary a lot depending on the user, I think a better example would have been multiple locations with the same name in different cities or states, for example https://api.cesium.com/v1/geocode/search?text=west end QLD , having the city and state fields would allow a user to select the right result

Thank you for providing that additional information. I have updated our issue for that. We will provide you with any updates on the progress of the issue.

1 Like