TileHost - LeafletJS web demo clears exception errors on loading map tiles

Topics: Help, Windows Forms
Aug 1, 2013 at 4:58 AM
Hi,

I like Gmap.net and added it to my vb.net windows form application working with chemical analytical data to plot locations of sampling points on a map. I came to vb.net from vb6 and not familiar with inner working of Memory, cache or system elements.

Sometimes, when I run program, instead of map tiles, blue tiles with exception error returned by remote server would appear for any map provider I added to select map list. And when this happens, nothing I do will allow to connect to actual map tiles. Though I don't know why this happens, it is possible that our company web proxy creates a bottle neck and Gmap timeouts loading tiles.

Today, when this happened (running my app, Gmap showing blue error tiles for any map, zoom), I decided to run Demo.WindowsForms.exe (I am using last hot build), and the same blue error tiles appeared. Then, I clicked "TileHost - LeafletJS web demo" checkbox and after web browser opened with OpenStrteetMap, everything started working: I closed web browser, Demo.WindowsForm started loading all maps with any zoom, then I tried my app and it worked seamlessly any way I tried after that, not giving any errors until end of the day.

I have looked at the source code, trying to understand why this happened, and how to make my program less dependent on proxy traffic if that is the problem. And I cannot find how it works and what made everything fix itself after clicking the "TileHost - LeafletJS web demo" checkbox.

I would appreciate any help pointing me in a direction to solve this problem.

Thank you
Aug 1, 2013 at 7:29 AM
you can try:

GMapProvider.WebProxy = WebRequest.DefaultWebProxy // or your custom proxy
Aug 2, 2013 at 1:58 AM
Edited Aug 2, 2013 at 1:59 AM
Thanks radioman! I tried DefaultWebProxy and also tried custom proxy. It still goes on and off at work network. I probably need to develop some caching/prefetching strategy. Maybe zooming setup can also affect it.