Map Does Not Appear When KML is Loaded

Phoca Maps - displaying maps in Joomla! CMS
havoc
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Jun 2012, 10:07

Map Does Not Appear When KML is Loaded

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map Does Not Appear When KML is Loaded

Post 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
If you find Phoca extensions useful, please support the project
havoc
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Jun 2012, 10:07

Re: Map Does Not Appear When KML is Loaded

Post 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!
havoc
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Jun 2012, 10:07

Re: Map Does Not Appear When KML is Loaded

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map Does Not Appear When KML is Loaded

Post by Jan »

Hmm, then seems like something is in conflict in the KML :idea:
If you find Phoca extensions useful, please support the project
havoc
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 06 Jun 2012, 10:07

Re: Map Does Not Appear When KML is Loaded

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map Does Not Appear When KML is Loaded

Post by Jan »

Hi, see the source code the the site, you will find there the direct link to this file.

Jan
If you find Phoca extensions useful, please support the project
Seroga
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 21 Aug 2012, 05:03

Re: Map Does Not Appear When KML is Loaded

Post by Seroga »

posted here a tip about the problem few times but due to security and spam problems it does not appear here :cry:
Post Reply