Unable to Show KML File in Phocamaps 3.0.0
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Unable to Show KML File in Phocamaps 3.0.0
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.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Unable to Show KML File in Phocamaps 3.0.0
Hi, I see 403 on your site
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Re: Unable to Show KML File in Phocamaps 3.0.0
I forget sometimes that I run Geoip filtering for other countries outside of the us.. I have unlocked it.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Unable to Show KML File in Phocamaps 3.0.0
And did it help?
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Unable to Show KML File in Phocamaps 3.0.0
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Re: Unable to Show KML File in Phocamaps 3.0.0
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..
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Re: Unable to Show KML File in Phocamaps 3.0.0
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.
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Re: Unable to Show KML File in Phocamaps 3.0.0
nevermind, I fixed the 404.3 error by adding a mime type to kml in iis, that is not the problem.
-
- Phoca Member
- Posts: 20
- Joined: 24 Oct 2011, 05:17
Re: Unable to Show KML File in Phocamaps 3.0.0
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;
}
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;
}
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Unable to Show KML File in Phocamaps 3.0.0
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.
Thank you for the info.
If you find Phoca extensions useful, please support the project