Page 1 of 2
Unable to Show KML File in Phocamaps 3.0.0
Posted: 12 Nov 2013, 03:28
by pyrovespin
I've tried everything in the instructions, I have a kml file in the phocamapskml folder, and I have set the options I know of in phocamaps but the kml will not show up on my map.. the website 3riversdistrict.com/district-resources/district-area-map any suggestions would be appreciated.
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 13 Nov 2013, 16:23
by Jan
Hi, I see 403 on your site
Jan
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 13 Nov 2013, 19:28
by pyrovespin
I forget sometimes that I run Geoip filtering for other countries outside of the us.. I have unlocked it.
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 14 Nov 2013, 18:49
by Jan
And did it help?
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 15 Nov 2013, 15:34
by Jan
Anyway, info for all other who have problem with KML - your site needs to be online to display the KML (cannot be test on localhost)
Jan
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 16 Nov 2013, 08:05
by pyrovespin
The Geoip filtering was what gave you the 403 error, I have removed the filtering so you shouldn't get the error, and it is a production site on a live server. that's been running for several years. We had the kml files working in joomla 2.5 but somewhere in the switch between 2.5 and 3.0 something stopped working.. We use the kml map mostly seasonally and I didn't notice it didn't work until last week..
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 17 Nov 2013, 18:49
by pyrovespin
I looked at the source code of the maps page and noticed that phoca was trying to point to the kml file. I'm thinking it is somehow a problem with my iis configuration I tried just opening the kml file with a link
http://www.3riversdistrict.com/phocamap ... strict.kml and i get a 404.3 error from my server.. and I'm curious if that could be the problem.
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 17 Nov 2013, 18:59
by pyrovespin
nevermind, I fixed the 404.3 error by adding a mime type to kml in iis, that is not the problem.
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 17 Nov 2013, 19:13
by pyrovespin
found the problem, in phocamapsmap.php on line 939 I needed to replace:
function setKMLFile($kmlFile) {
$js = ' var kmlLayer'.$this->_id.' = new google.maps.KmlLayer( \''.$kmlFile.'\');'."\n"
.' kmlLayer'.$this->_id.'.setMap('.$this->_map.');'."\n";
return $js;
}
with
function setKMLFile($kmlFile) {
$js = ' var kmlLayer'.$this->_id.' = new google.maps.KmlLayer({ url: \''.$kmlFile.'\'});'."\n"
.' kmlLayer'.$this->_id.'.setMap('.$this->_map.');'."\n";
return $js;
}
Re: Unable to Show KML File in Phocamaps 3.0.0
Posted: 18 Nov 2013, 22:10
by Jan
Hi, thank you for the info, I will take a look at it (for me it works without url item, but maybe there is some problem for different addresses)
Thank you for the info.