NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 '19, 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 '19, 08:15

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

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:

×15
×6
×3

question asked: 25 Jun '19, 20:47

question was seen: 3,829 times

last updated: 26 Jun '19, 08:15

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum