Cesium Search Button

Hi,

I have a question about cesium search button. You can see the search result i made before in the picture below. I am only interested in a city (Istanbul) and i just want to show Istanbul data in my website. But results show all results such as “Ankara”. Is it possible to limit the search results?

Thank you,

Tolga Yücel

Hi Tolga,

If you only want to show Istanbul data, you can hide the geocoder and focus the camera on Istanbul to start with:

var viewer = new Cesium.Viewer("cesiumContainer", {
  geocoder: false
});

camera.flyTo(
  // insert coordinates of Instanbul
)

Documentation for viewer and camera:

If you would like, you can also select a different GeocoderService: GeocoderService - Cesium Documentation. The default geocoder finds all possible matches for your search and there is not a way to limit the search result.