Select to view content in your preferred language

OpenStreetMap as Basemap in WPF with ArcGis

1463
4
Jump to solution
01-15-2020 12:27 AM
OleJuul1
Occasional Contributor

I use OpenStreetMap as Basemap in my desktop program, but after New Year this map is only shown as a gray screen (no errors or exceptions reported). I'm using Visual Studio 2019 and ArcGIS 10.2.7 running on Win10 (1909)

My WPF code:
<esri: Map x: Name = "Map">
   <esri: OpenStreetMapLayer ID = "TopoMap" /> <- Now just shows a gray screen (OK in 2019)
   <esri: ArcGISTiledMapServiceLayer ID = "SatMap" ServiceUri =      "https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" /> <- Still works

</esri: Map>

1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

When I look at the requests using fiddler, it appears there's a server issue, as I'm getting "429 Too Many Requests". Are you seeing this too?

This doesn't happen with the supported 100.x versions though, despite using the same URL. The difference appears to be that 10.2.x doesn't send a user-agent string, and OSM appears to be blocking this. I can't really see any workaround to this in 10.2.x, except building your own TiledLayer subclass, and overriding GetTileDataAsync.

I would recommend looking into upgrading to 100.x, as the 10.x versions are no longer supported.

View solution in original post

4 Replies
dotMorten_esri
Esri Notable Contributor

When I look at the requests using fiddler, it appears there's a server issue, as I'm getting "429 Too Many Requests". Are you seeing this too?

This doesn't happen with the supported 100.x versions though, despite using the same URL. The difference appears to be that 10.2.x doesn't send a user-agent string, and OSM appears to be blocking this. I can't really see any workaround to this in 10.2.x, except building your own TiledLayer subclass, and overriding GetTileDataAsync.

I would recommend looking into upgrading to 100.x, as the 10.x versions are no longer supported.

OleJuul1
Occasional Contributor

Thanks for your reply - upgrading to Version 100.3 solved my problem 🙂

dotMorten_esri
Esri Notable Contributor

If I can ask a silly question: If you're going to do the work to upgrade from 10.2.x to 100.x, why go with the older 100.3 and not the recent 100.7 ? While it might have more features than you need, it also has a lot of bug fixes and performance improvements.

0 Kudos
OleJuul
New Contributor

I ment: Upgrading to Version 100.7 solved my problem 🙂