[OpenLayers-Users] Problems with kml parser

Vidal, Antoni antoni.vidal at icc.cat
Tue Sep 22 02:58:29 EDT 2009


Hello list,

 

We are developing a new functionality to load kml from client and show it over the maps. Nothing special, but there are some kml that doesn't work properly, but I don't get any error !. An example of this is the following kml code:

 

<?xml version="1.0" encoding="UTF-8"?><kml>

   <Document>

    <name>ICC - Fulls 1:25.000</name>

    <Icon>

       <href>http://www.icc.cat/vissir2/img/filesave25m.png</href>

    </Icon>

                <Schema parent="Placemark" name="full">

                               <SimpleField type="wstring" name="LINK_SID"></SimpleField>

                               <SimpleField type="wstring" name="LINK_DGN"></SimpleField>

                               <SimpleField type="wstring" name="LINK_ORT"></SimpleField>

                </Schema>

      <Style id="TALL25M">

                               <BalloonStyle>

                                               <text><![CDATA[

                                               <strong>Tall Geogràfic de Catalunya<br/>1:25.000</strong><br/>

                                               <br/>

                                               Full: $[name]<br/>

                                               $[description]

                                               ]]></text>

      </BalloonStyle>

         <IconStyle>

            <scale>1</scale>

            <Icon>

               <href>http://www.icc.cat/vissir2/img/filesave25m.png</href>

            </Icon>

         </IconStyle>

         <PolyStyle>

            <color>800000ff</color>

            <outline>1</outline>

         </PolyStyle>

         <LineStyle>

            <color>ff0000ff</color>

            <width>1</width>

         </LineStyle>

         <LabelStyle>

            <color>ff0000ff</color>

         </LabelStyle>

      </Style>

 

                <Folder id="layer 0">

                               <name>Tall Geogràfic de Catalunya 1:25.000</name>

                               <Snippet maxLines="8">

                               Aplicació de descarrega dels fulls del Mapa Topogràfic de Catalunya i de l'Ortofotomapa 1:25.000 de l'ICC. Fer click sobre l'icona del disquet o bé, fer click amb el ratolí i premer la tecla "Control" simultàniament

                               per veure les dades del full i l'enllaç per a la descàrrega en diferents formats.

                               </Snippet>

                               <description>

                               Aplicació de descarrega dels fulls del Mapa Topogràfic de Catalunya i de l'Ortofotomapa 1:25.000 de l'ICC. Fer click sobre l'icona del disquet o bé, fer click amb el ratolí i premer la tecla "Control" simultàniament

                               per veure les dades del full i l'enllaç per a la descàrrega en diferents formats.

                               </description>

      <full>

         <name><![CDATA[67-23]]></name>

         <description><![CDATA[Nom: Gavarra <br/>Descarregar Ortofoto: <a href="$[LINK_ORT]$[name]">SID</a><br />Topogr&agrave;fic: <a href="$[LINK_SID]$[name]">SID</a>&nbsp;<a href="$[LINK_DGN]$[name]">DGN</a>&nbsp;]]></description>

         <styleUrl>#TALL25M</styleUrl>

         <MultiGeometry>

            <Point>

               <coordinates>1.2292789482351385,42.12505809906476</coordinates>

            </Point>

            <Polygon>

               <outerBoundaryIs>

                  <LinearRing>

                     <coordinates decimal="." cs="," ts=" ">1.31261326,42.16672373 1.14594315,42.16672487 1.14594468,42.08339244 1.31261474,42.08339135 1.31261326,42.16672373</coordinates>

                  </LinearRing>

               </outerBoundaryIs>

            </Polygon>

                               </MultiGeometry>

                                <LINK_SID><![CDATA[http://www.icc.cat/vissir2/php/getTallkml.php?t=mtc25msid&fge=]]></LINK_SID>

                                <LINK_DGN><![CDATA[http://www.icc.cat/vissir2/php/getTallkml.php?t=mtc25mdgn&fge=]]></LINK_DGN>

                                <LINK_ORT><![CDATA[http://www.icc.cat/vissir2/php/getTallkml.php?t=orto25m&fge=]]></LINK_ORT>

      </full>

                </Folder>

   </Document>

</kml>

 

Antoni Vidal

Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya <http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392> 
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat <http://www.icc.cat/> 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090922/4ca0bcb1/attachment.html


More information about the Users mailing list