Hello Everyone,

I am trying to access OpenStreetMaps as my Map Provider through the GMaps interface, however I am getting a "Exception: The remote server returned an error: (403) Forbidden" I believe this is because I do not have the User-Agent or Referrer set.

Can anyone please show me an example of how I would set the User-Agent using the GMap interface.

Using WPF c#

Thank you!

asked 25 Jun, 20:47

cferreira1992's gravatar image

cferreira1992
11223
accept rate: 0%


I'm not familiar with GMap but according to the Internet you can use something like:

GMap.NET.MapProviders.OpenStreetMapProvider.UserAgent = "cferreira GMap tool 1.0";

or

GMap.NET.MapProviders.GMapProvider.UserAgent = "cferreira GMap tool 1.0";

Unsure which one works, please come back and tell us.

permanent link

answered 26 Jun, 08:15

scai's gravatar image

scai ♦
31.2k18281436
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×11
×4
×2

question asked: 25 Jun, 20:47

question was seen: 343 times

last updated: 26 Jun, 08:15

powered by OSQA