several styles with different icons KML icons not showing up

29 views
Skip to first unread message

ad...@corkenglishmarket.com

unread,
Jan 5, 2010, 11:24:55 PM1/5/10
to KML Developer Support - Getting Started with KML
Hi all,

I do hope that one of you experts can help me.........

I am new to KML and have been using the following site to try and
create a Kml via php...

The source seems to be ok, but the icons do not load for me....

Here is link for the php scripting...
http://code.google.com/intl/nl/apis/kml/articles/phpmysqlkml.html

I generated the code and then placed onto my site at the following
address

http://www.corkenglishmarket.ie/jaq/test-map then turn the
map to the North of America...as you see the icons are yellow pin
markers and not the icons as given.


Any help would be appriciated.

Here is the code for the kml i have removed alot of the middle part


<?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">
<Document>
<Style id="Jaqstyle">
<IconStyle id="JaqIcon">
<Icon>
<href>http://www.corkenglishmarket.ie/jaq/images/fortress.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="barStyle">
<IconStyle id="barIcon">
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal2/icon27.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark id="placemark1">
<name>krystal love 43,496 </name>
<description>lesbians 0 1,774,106 UPPER LORRAINEJaq 9 </description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.085823,37.386337</coordinates>
</Point>
</Placemark>
<Placemark id="placemark2">
<name>krystal love 160,498 </name>
<description>Lesbians 0 1,774,106 UPPER LORRAINEJaq 9 </description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.083237,37.387138</coordinates>
</Point>
</Placemark>
<Placemark id="placemark3">
<name>Brokedahymen 150,501 </name>
<description>Cervixia 1,407,237 1,586,875 UPPER LORRAINEJaq 9 </
description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.078918,37.393887</coordinates>
</Point>
</Placemark>
<Placemark id="placemark4">
<name>Brokedahymen 155,499 </name>
<description>Fallopia 1,407,237 1,586,875 UPPER LORRAINEJaq 9 </
description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.079353,37.402653</coordinates>
</Point>
</Placemark>
<Placemark id="placemark5">
<name>Juice404 137,547 </name>
<description>FunkyTown 190,687 1,579,546 UPPER LORRAINESanc 10 </
description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.095528,37.394012</coordinates>
</Point>
</Placemark>
<Placemark id="placemark6">
<name>Juice404 138,547 </name>
<description>Funkytown2 190,687 1,579,546 UPPER LORRAINESanc 9 </
description>
<styleUrl>#JaqStyle</styleUrl>
<Point>
<coordinates>-122.114647,37.401726</coordinates>
</Point>
</Placemark>
</Document>
</kml>

Could someone please help me by telling if the script is incorrect...

Thanks in advance

Cemmac

Grok Lobster

unread,
Jan 6, 2010, 12:18:37 AM1/6/10
to KML Developer Support - Getting Started with KML
In your styleUrl tags, use the Style id reference - not the IconStyle
id

On Jan 5, 8:24 pm, "[email address]" wrote:
> Hi all,
>
> I do hope that one of you experts can help me.........
>
> I am new to KML and have been using the following site to try and
> create a Kml via php...
>
> The source seems to be ok, but the icons do not load for me....
>
> Here is link for the php scripting...http://code.google.com/intl/nl/apis/kml/articles/phpmysqlkml.html

ad...@corkenglishmarket.com

unread,
Jan 6, 2010, 7:49:27 AM1/6/10
to KML Developer Support - Getting Started with KML

Hi Grok Lobster,

Thanks for the reply but which part of the code do you mean ?

I am using the style id (I think ?) the icon is just the icon to be
used...

Can you show me a snippet of the above changed around so I can better
understand what you mean.

Thanks again

cemmac

Grok Lobster

unread,
Jan 6, 2010, 12:16:18 PM1/6/10
to KML Developer Support - Getting Started with KML
Each of your placemarks has a styleUrl tag. The styleUrl tag refers to
a style that you defined earlier in the file such as

<Style id="Jaqstyle">
<IconStyle id="JaqIcon">
<Icon>
<href>http://www.corkenglishmarket.ie/jaq/images/fortress.png</href>
</Icon>
</IconStyle>
</Style>

Your syleUrl should refer to #Jaqstyle, not #Jaqicon

ad...@corkenglishmarket.com

unread,
Jan 7, 2010, 5:01:41 AM1/7/10
to KML Developer Support - Getting Started with KML
Hi again,

I figured out that the style name could not have an upper case letter
at the start.

The images and styles are getting loaded correctly now and i will be
looking at the topics for more info on creating coloured sections.

Thanks for all your help.

cemmac
Reply all
Reply to author
Forward
0 new messages