Custom icon in kml file

Phoca Maps - displaying maps in Joomla! CMS
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Custom icon in kml file

Post by Kordian »

Hello everybody,
I am using joomla 1.5 and PM 1.1.1
The problem:
I have a kml file with multiple placemarks. Everything works fine.
I wanted to change the icon image of the placemarks. Created an image, uploaded to a server. Inserted the code. After that only the first placemark is being displayed (with the new icon). The rest disappeared. Moreover when zooming the map the first one disappears as well and the map stops.
Am I doing something wrong, or is it a bug?
Here's the code:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
	<name>test.kml</name>
	<Style id="randomColorIcon">
		<IconStyle>
		<Icon>
		<href>http://life.aquila-it.pl/phocamapskml/image5h.png</href>
		</Icon>
			<color>ff00ff00</color>
			<scale>0.6</scale>
		</IconStyle>
	</Style>
	<Placemark>
Thanks in advance for any help.
Regards
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom icon in kml file

Post by Jan »

Hmm, not sure what can be wrong there, try to test if there is no javascript error on your site :idea:

Jan
If you find Phoca extensions useful, please support the project
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Re: Custom icon in kml file

Post by Kordian »

You mean you tested it and on your environment it works without problems?
Regards
Kordian
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom icon in kml file

Post by Jan »

No, I mean, you should test your site, if some javascript problems do not limit the rendering the rest of your code.

Jan
If you find Phoca extensions useful, please support the project
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Re: Custom icon in kml file

Post by Kordian »

Well, I checked and no problems recorded...
Regards
Kordian
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Re: Custom icon in kml file

Post by Kordian »

I just checked with joomla 1.7 and 2.0.2 version of Phoca Maps, everything is fine here, even the polyline is present.
I would appreciate any help.
Regards
Kordian
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom icon in kml file

Post by Jan »

So really no idea what can be wrong there, is teh kml file written for Google Maps API 3?
If you find Phoca extensions useful, please support the project
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Re: Custom icon in kml file

Post by Kordian »

Actually I have no idea and to be honest I would expect you to tell that, you are the expert here.
I tried 2 different kml files, one generated by an application (do not know which one, is provided by a third party company) and one generated by Google Earth.
The result is always the same.
Regards
Kordian
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Custom icon in kml file

Post by Jan »

Hi, Phoca Maps is running on Google Maps API 3, it is possible that the version of your KML is working e.g. in API 2 only. If you are using KML file, it needs to fit the API parameters.

Jan
If you find Phoca extensions useful, please support the project
Kordian
Phoca Enthusiast
Phoca Enthusiast
Posts: 72
Joined: 20 Oct 2011, 16:37

Re: Custom icon in kml file

Post by Kordian »

Hi,
Which of the above mentioned versions of Phoca Maps uses API3?
Regards
Kordian
Post Reply