Cesium Search not working accurately

54 views
Skip to first unread message

sheffykal...@gmail.com

unread,
May 21, 2019, 2:53:36 AM5/21/19
to cesium-dev
Hi,
I am having a issue regarding Cesium Search.
For some locations, when I will search on cesium it's not going to the right location.
For example, if we search "Kandahar, Afghanistan" in Cesium Search bar, it goes to a point south of Kandahar.
If we search the same on Bing Map or Google Map, it is taking me to the right location.
Anybody have solution for this issue? Please suggest.

You can try it on the Cesium Sandcastle and also on Bing Map/Google earth.

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/

Thank you.

Omar Shehata

unread,
May 21, 2019, 12:19:17 PM5/21/19
to cesium-dev
Thanks for reporting this. Cesium uses the Pelias geocoder, which you can read more about here: https://cesium.com/blog/2018/08/14/geocoding-with-pelias/

If you're finding some inaccuracies, I think the Pelias team would be interested in knowing. You should open an issue in their repository here: https://github.com/pelias/pelias/issues

You can actually hook into the Bing geocoding API from your CesiumJS app. You just need to get a Bing key from here: https://www.bingmapsportal.com

Then you can pass it in the viewer constructor to use it:

var viewer = new Cesium.Viewer('cesiumContainer', {
    geocoder: [ new Cesium.BingMapsGeocoderService({
        key: 'Your Bing Key'
    }) ]
});

sheffykal...@gmail.com

unread,
May 24, 2019, 9:07:53 AM5/24/19
to cesium-dev
Thanks Omar,
It worked, First the cesium search result were showing 5-6 suggestions of the searched location.
But after I used your code, it filtered the search result to 1-2.
Now it is showing accurate location.
Thanks for your help.
Reply all
Reply to author
Forward
0 new messages