I was trying your sample: DesktopEditionSample_MiniMapWithGoogleMap_CS_100604 and am getting : System.Net.WebException: The remote server returned an error: (403) Forbidden.
Any advice?
Google maps layer gives: (403) Forbidden
Hi Mark,
The GoogleMapsLayer is directly access Google web service. It might cause this problem by the following cases:
• Sending too many requests per day.
• Sending requests too fast, i.e. too many requests per second.
• Sending requests too fast for too long or otherwise abusing the web service.
• Exceeding other usage limits, e.g. points per request in the Elevation API.
Please refer this official article for detail:
Usage Limits for Google Maps API Web Services
With those limits, there are some thing we can try to reduce the request count and frequency on the web service.
- Make the map smaller.
- Use SingleThread as priority. ( map.ThreadingMode = MapThreadingMode.SingleThread; )
- Use SingleTile as priority on GoogleMapsLayer. (googleLayer.TileMode = GoogleMapsTileMode.SingleTile; )
- Try this sample another time. For the accumulation of accessing Google web service might cause this problem as well.
If those options doesn’t work all the time, please provides us some code or video, so that we can track this problem deeper.
Thanks,
Howard
I see ApiKey Property in GoogleMapsLayer class. Can that help? I am reading developers.google.com/console/help/?csw=1 but not sure if that is the same key?
Mark,
Google has updated their authentication strategy as ClientID and PrivateKey. With our latest product version, we have updated to their strateg; removed the ApplicationId; added ClientID and PrivateKey instead. Please refer to Google official article about Authentication and Authorization for detail.
Thanks and feel free to let us know if you have more queries.
Howard