Utiliser OSM avec visual studio et les composants Devexpress

Bonjour,

Suite à l’arrêt de bingmaps je souhaite migrer vers openstreetmap.

J’utilise visual studio avec le composant xtramap de devexpress.

Pour afficher le fond de carte je dois renseigner un champ TileUriTemplate.

Le format de l’url doit être :

// Specify the TileUriTemplate property to connect the Map Control to an OSM server. provider.TileUriTemplate = “http://{0}.tile.MyCustomOSMProvider.org/{1}/{2}/{3}.png”;

Je ne sais pas comment récupérer une url valide.

Pouvez-vous m’indiquer une solution?

Salut and welcome to OSM

This depends on your designated tile-server. The Wiki lists some public instances for tile-servers:
https://wiki.openstreetmap.org/wiki/Raster_tile_providers
https://wiki.openstreetmap.org/wiki/Vector_tiles#Providers

Please check with their usage policies!

1 Like

That template looks very much like a regular raster tile URL. The “standard” tiles that you see at openstreetmap.org are in that format, and the usage policy actually tells you the URL to use and what else you need to do.

Whether OSM’s own tiles will be a good fit for you depends very much on what functionality you need and where you need it (on a website? in an app?), but if you provide a few more details I’m sure that people will be able to help.

As @PHerison has already said, there are many other raster tile providers (and you can also fairly easily host your own) and many other technologies that people use to get maps into websites and apps. Depending on what you want to do, something else might be a better fit.