Scriptable labels (like Google Maps) - is it possible?

Hello,

is it possible to retrieve from some provider (for example Mapbox) the labels for places (cities, countries, etc)?

Many thanks

You can choose a provider that has labels in the imagery, like “Bing Maps Aerial with Labels”. You can see this with the base layer picker in the top right:

Or do you mean you want your application to retrieve the labels as text that you’re not necessarily displaying? (But for example searching through to see which cities are currently in view)? If so, you may need to combine your view with a different datasource or API. You could potentially use ion to reverse geocode where your camera is to figure that out.

Let me know if that helps!

Yes I mean the 2nd one.
I gave a look to https://www.geodatasource.com

but it seem they don’t support js …

It looks like their data can be used in any standard database, so you could easily put it in a database and query it from your JS application (if you’re familiar with database setup and server hosting).

But this is a common enough thing that you should be able to find other services that will take a longitude/latitude and give you some metadata about that location. Look up “reverse geocoding”. You should be able to do it inside of Cesium ion, but I think this functionality just may not be exposed right now. I opened a feature request here:

https://github.com/AnalyticalGraphicsInc/cesium/issues/8152

this is one solution

https://rapidapi.com/wirefreethought/api/geodb-cities