ThinkGeo.com    |     Blog    |     Wiki    |     Support

Problem with OSM Layer

Hi,

We are having the same problem as some others with the OpenStreetMaps layer. We are getting error 429 - Too Many Requests. I have read the other forum posts about this issue (OSM maps not displaying) but it is not clear to me how to fix it.

Can you give me a code example?

Thanks!

Steve

1 Like

Hi Steve,

The code should looks like:

OpenStreetMapLayer osm = new OpenStreetMapLayer();
osm.SendingWebRequest += Osm_SendingWebRequest;

private void Osm_SendingWebRequest(object sender, SendingWebRequestEventArgs e)
{
   (e.WebRequest as HttpWebRequest).UserAgent = "yourAppName";                        
}

If you want to use the OpenStreetMapOverlay it also can be used follow the same way.

I hope that’s able to help you.

Regards,

Ethan

1 Like