Page 1 of 1

KML-It does't recognize the new file with the same name

Posted: 02 Apr 2016, 18:30
by Nodol
Hello, I saw a strange thing.

I use the map by loading KML files.
These files, however, update them often.
If I change the file without changing the name to him the map does not change.
it seems that is held in some old files memory.
For example, if I write "file.kml" I'll call him when I update "file1.kml"
otherwise if the file is physically changed, with different information, the loaded map is that of "file.kml"

Advance that the phoca cache and joomla is disabled.

Is this a bug??

Re: KML-It does't recognize the new file with the same name

Posted: 07 Apr 2016, 18:17
by Jan
Hi, no, it seems like this is some google maps api cache :idea: There is no cache for the map in Phoca Maps or Joomla!

Jan

Re: KML-It does't recognize the new file with the same name

Posted: 12 Apr 2016, 10:41
by Nodol
Hello, I don't think it's the google cache.I changed the KML file
but without changing the name. After several hours the map has not changed.
Can you tell me how to fix it ?

Re: KML-It does't recognize the new file with the same name

Posted: 12 Apr 2016, 12:04
by Jan
Hi, when I tested the KML feature, I got the same problems, I needed to rename the file for each testing. I don't know how long it takes to cache it, but it cannot be influenced by Phoca or Joomla! or your server.

Your site writes some javascript code which loads the map from Google Maps API, the map is not rendered on your server, the map is rendered in visitor's browser, not on your server, so you cannot influence e.g. cache settings, as the map will be never stored on your server.

Your server writes javscirpt code (with help of Phoca Maps or with help of another tool, it does not matter, the javascript for displaying map is always the same regarding Googla Maps API).
This code is read by visitor's browser and browser then displays the map from Google Maps API so you cannot somehow change it on your server as it does not render on your server but in visitor's browser.

When you write your own javascript code and you will not use some prepared javascript like it is in Phoca Maps or in another component, you get the same outcome.

I will do some more researches if Google Maps API has some instruction how to change the cache, etc, but I think, there is no one as this should be some overload protection feature :idea:

Advance that the phoca cache and joomla is disabled.
So as written above, it has nothing to do with cache on the server (in Joomla!) as the map is not rendered on the server, it is rendered by visitor's browser

Your server --> sends instruction to --> Google Maps API ---> sends the map to visitor's browser (not to your server back).

Jan

Re: KML-It does't recognize the new file with the same name

Posted: 13 Apr 2016, 12:48
by Nodol
I understood, thanks for your time.
Have a nice day.

Re: KML-It does't recognize the new file with the same name

Posted: 17 Apr 2016, 01:00
by Jan
Anyway, maybe there exists some solution so if you or anybody will find solution for this problem, will be great, you can inform us in this topic.

Thank you very much, Jan

Re: KML-It does't recognize the new file with the same name

Posted: 11 Jul 2016, 02:16
by Jan
Hi, try to test it with newest version, I have made some changes regarding loading KML
https://www.phoca.cz/news/890-phoca-maps-3-0-4-released
Not sure if this can somehow influence this problem and if it can solve but try to test.

Thank you, Jan