Page 1 of 1

Map Does Not Appear When KML is Loaded

Posted: 06 Jun 2012, 11:23
by havoc
Hi Jan!

Thanks for an awesome component & plugin! It's precisely what I needed for a project I'm currently working on. :D

Anyways, here's what I have (localhost only) :
- Joomla 2.5.4 Stable Full Package (fresh install)
- Phoca Maps Component v2.05
- Phoca Maps Plug-in v2.05

Creating my maps using the component went fine, viewing of the maps within an article went fine, direct viewing of the maps via the main menu went fine.

At this point, I tried my hand at adding a KML to Phoca Maps, so I created a KML file of the area in question via an online Google Maps tool. Tested it using Google Earth, KML loaded properly, with just a few areas where the KML area map and the Google Map did not align properly. Also tried it using the website, to display the KML file onto Google Maps directly, and the KML loaded OK, except for a slight misalignment in some areas.

Then I set up Phoca Maps to use/render KML files.
- copied the KML file to the phocamapskml folder
- from the Phoca Maps Control Panel, I clicked on Options and in the Display Tab, changed Enable KML File Loading field to Yes, Display Print Route to No(I don't need it), and Enable Cache to No (also tried it set to Yes, but the problem remained). I did not change any field in the Permissions tab. Saved the changes.
- Went to my map, entered the file name in the KML File field. Saved the changes.
- Modified the reference in the article. Changed it to include the kmlfile=1 option.
- Went to view the map by way of the article plug-in and refreshed the browser. After the refresh, I see a fraction of a second where the original (correct) map displays and then disappears. At a loss as to what happened, I looked at the map more closely and notice the map was zoomed in to the maximum. I zoomed out and found out that my map was suddenly centered in the South Atlantic Ocean.

When I removed the references to the KML file, the map loads fine. Putting the reference back produces the same problem.

I apologize a kilometric post, but I need to have this resolved, my schedule for the project just got bumped up a week earlier.

Thanks in advance!

Re: Map Does Not Appear When KML is Loaded

Posted: 06 Jun 2012, 17:49
by Jan
Hi, is your KML file assigned to work with Google Maps API 3 (the tested site you have mentioned seems to be working with API2 :idea:)

Jan

Re: Map Does Not Appear When KML is Loaded

Posted: 06 Jun 2012, 18:55
by havoc
Jan wrote:Hi, is your KML file assigned to work with Google Maps API 3 (the tested site you have mentioned seems to be working with API2 :idea:)

Jan
Ah... so that's it. I was working with API 2. Back to the drawing board for an API 3 KML.

Thanks a lot!

Re: Map Does Not Appear When KML is Loaded

Posted: 08 Jun 2012, 07:32
by havoc
Hi Jan!

Tried using the polygon-simple.kml file from Google code as mentioned in https://www.phoca.cz/joomlademo/phoca-maps-kml, but nothing changed. Any other ideas?

Thanks!

PS: Disabling the "Enable KML File Loading" option displays the correct map. Enabling it causes the map to zoom in to its maximum zoom, with the map window centered somewhere to the west of the African continent.

Re: Map Does Not Appear When KML is Loaded

Posted: 13 Jun 2012, 22:28
by Jan
Hmm, then seems like something is in conflict in the KML :idea:

Re: Map Does Not Appear When KML is Loaded

Posted: 20 Jun 2012, 03:41
by havoc
Could you please send me the KML file you used in that page (https://www.phoca.cz/joomlademo/phoca-maps-kml)? I'd like to try that with my installation and compare the structure with the KML file I have.

Thanks very much!

Re: Map Does Not Appear When KML is Loaded

Posted: 26 Jun 2012, 23:08
by Jan
Hi, see the source code the the site, you will find there the direct link to this file.

Jan

Re: Map Does Not Appear When KML is Loaded

Posted: 23 Aug 2012, 02:23
by Seroga
posted here a tip about the problem few times but due to security and spam problems it does not appear here :cry: