Maybe you're looking at it in internet explorer (not supported), but I guess not. What you could do is post the kml file, so I can test.
I will test it using version 1.0.5 and the improvement I posted in this topicviewtopic.php?f=38&t=7475.
Trouble getting KML file to load
-
- Phoca Newbie
- Posts: 7
- Joined: 12 Dec 2008, 13:25
- Location: Holland
-
- Phoca Newbie
- Posts: 6
- Joined: 10 Aug 2010, 03:45
- Location: Nashville, TN USA
- Contact:
Re: Trouble getting KML file to load
I have Phocamaps 1.1.0
and i still am not able to get it to load
https://www.nfsda.org/soul-1000-136.html
http://www.nfsda.org/custom/1000.kml
or http://www.nfsda.org/custom/kmloptions.php
Can you look and see what is making this not work.
and i still am not able to get it to load
https://www.nfsda.org/soul-1000-136.html
http://www.nfsda.org/custom/1000.kml
or http://www.nfsda.org/custom/kmloptions.php
Can you look and see what is making this not work.
-
- Phoca Newbie
- Posts: 2
- Joined: 03 May 2011, 20:30
Re: Trouble getting KML file to load
even if this post is one year old, me too wasn't abled to load kml files to my map, but after a little bit of searching i found the solution what could be interesting for other people:
When everything is set correctly (1. KML File load enabled in PhocaMaps configuration, 2. KML File uploaded to phocamapskml, 3. including kmlfile=1 as option in the {phocamap...} - line), in Firebug you can see:
geoXML3 is not defined
var phocaGeoXmlPlgPM1 = new geoXML3.parser({map: mapPhocaMapPlgPM1});
So it seems that there is a .js not loaded.
Indeed, there is a bug in the actual Phocamap version (1.1.1):
In Apache Log you can see, that the file [JOOMLA_ROOT]/components/com_phocamaps/assets/js/geoXML3.js
could not be found.
And yes, the file is named: geoxml3.js
A simple rename from geoxml3.js to geoXML3.js solved this issue.
Could it be, that PhocaMaps is developed in case-insensitive OSes wheras it will run in case-sensitive ones?
Greetings
Snoopy
When everything is set correctly (1. KML File load enabled in PhocaMaps configuration, 2. KML File uploaded to phocamapskml, 3. including kmlfile=1 as option in the {phocamap...} - line), in Firebug you can see:
geoXML3 is not defined
var phocaGeoXmlPlgPM1 = new geoXML3.parser({map: mapPhocaMapPlgPM1});
So it seems that there is a .js not loaded.
Indeed, there is a bug in the actual Phocamap version (1.1.1):
In Apache Log you can see, that the file [JOOMLA_ROOT]/components/com_phocamaps/assets/js/geoXML3.js
could not be found.
And yes, the file is named: geoxml3.js
A simple rename from geoxml3.js to geoXML3.js solved this issue.
Could it be, that PhocaMaps is developed in case-insensitive OSes wheras it will run in case-sensitive ones?
Greetings
Snoopy
-
- Phoca Newbie
- Posts: 2
- Joined: 03 May 2011, 20:30
Re: Trouble getting KML file to load
There is one more thing i figured out:
The hosters webserver may not know / automatically recognize the mime type
application/vnd.google-earth.kml+xml
which is needed by the geoXML parser. If the mime type in the responeses header is another than the mentioned, the parser will not process the kml as it things, it is another format. You then will see:
Unable to retrieve <filename.kml>
as an output of geoxml3.js.
The solution is to put this line in a .htaccess in the root directory of your site, if it's possible:
AddType application/vnd.google-earth.kml+xml .kml
Greetings
Snoopy
The hosters webserver may not know / automatically recognize the mime type
application/vnd.google-earth.kml+xml
which is needed by the geoXML parser. If the mime type in the responeses header is another than the mentioned, the parser will not process the kml as it things, it is another format. You then will see:
Unable to retrieve <filename.kml>
as an output of geoxml3.js.
The solution is to put this line in a .htaccess in the root directory of your site, if it's possible:
AddType application/vnd.google-earth.kml+xml .kml
Greetings
Snoopy
-
- Phoca Newbie
- Posts: 1
- Joined: 12 Apr 2011, 07:10
Re: Trouble getting KML file to load
I have been likewise struggling to get kml file to load onto the map for several days now. This fix worked immediately to display the waypoints/place-holders from my kml file and data pop-ups for clicking those points. But it does not draw the lines between these points.A simple rename from geoxml3.js to geoXML3.js solved this issue.
Found several other kml loading Joomla tools also did not work. But the mod_pro_googlemaps module extension does it perfectly. However I want to load many kml file maps in my site and would much prefer the PhocaMaps component to do it.
Has anyone also found the above fix working but without the lines joining the markers? (I also tried the htaccess fix but no noticeable effect to my specific issue)
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Trouble getting KML file to load
Hi, since 2.0.1 the standard internal function for KML will be used.
Jan
Jan
If you find Phoca extensions useful, please support the project