1

I'm using TGMLib. I need to reload file in TGMGroundOverlay. File on disk has changed but name is the same. TWebBrowser in TGMMap probably keep it on cache and I need to clear cache in TWebBrowser. Is any possibly to do that?

Best Regards! Patryk

HitHeed
  • 21
  • 5
  • Use a slighty modified URL by appending a query parameter such as file://path.to.file?version=2. This is known as [cache-busting](https://stackoverflow.com/questions/9692665/cache-busting-via-params) – mjn42 Mar 12 '19 at 13:45
  • Jup. While developing, you could even consider just adding a timestamp there, so you'll basically load everything every time. – GolezTrol Mar 12 '19 at 13:51
  • That was great idea, but it not works. To make it i will modify GMlib. I will try to do this. Thanks for fast reply. – HitHeed Mar 12 '19 at 14:46
  • I modified source of GMlib but it not works... :( – HitHeed Mar 12 '19 at 15:04
  • Can you see the url is actually changed in the HTML output? – GolezTrol Mar 12 '19 at 22:59
  • Which URL have you been changing? If this was the URL of your map page then it surely didn't work. In order to force reload of Ground Overlay you have to change the URL of ground overlay image which is a part of TGroundOverlay class. – SilverWarior Mar 13 '19 at 03:50
  • I change the URL with do: GMGroundOverlay1.Item[Index].Url and change bbox with do: GMGroundOverlay1.Item[Index].Bounds.NE.Lat etc. And this option not works... When I clear all collection of TGroundOverlay and Add New Item (file) with new Url (name) then it works. Any ideas? – HitHeed Mar 13 '19 at 19:03

1 Answers1

0

I solve the problem. Answer of cache-busting and GolezTrol was helping.

The best solution is change the filename and change it on URL (add something like index/id)

filename_index.png

Thank you! Best regards!

HitHeed
  • 21
  • 5