ramazanalic / kml-samples

Automatically exported from code.google.com/p/kml-samples
0 stars 0 forks source link

KML Imported to Google Maps loses some Style info #397

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Which products are affected?
Google Maps

What steps will reproduce the problem?
1. Create a KML file
2. Define Style nodes with an IconStyle and a BalloonStyle
3. Define Placemark nodes that reference the Style nodes
4. Import the KML file into a map

What is the expected output or behavior? 
I expect to see the styles that were defined - Red, Numbered Icons and Balloons 
that have formatted text. The file we Import has worked for months, but stopped 
working within the past few days.

What do you see instead?
We see the default icons instead of the Red, Numbered icons.  And the text 
inside the balloon is there, but no longer formatted.

What application versions (if any) are you using?
KML 2.1

Which operating systems (and/or relevant web browsers) are affected?
Tested with Chrome 12 and IE 9 on Windows 7

Please provide any additional information (code snippets/links) below.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
   <name>ECG Superintendent Location Map</name> 
<Style id="a1">
<IconStyle>
  <Icon>
    <href>http://www.embreegroup.com/mapicons/red01.png</href>
  </Icon>
</IconStyle>
    <BalloonStyle>
      <!-- a background color for the balloon -->
      <bgColor>ffdddddd</bgColor>
      <!-- styling of the balloon text -->
      <text><![CDATA[
      <b><font color="#CC0000" size="+2">$[name]</font></b>
      <br/><br/>
      <font size="+1" face="Courier">$[description]</font>
      <br/><br/>
      ]]></text>
    </BalloonStyle>
</Style>
<Placemark>
      <name>Alderton, Mike</name>
      <styleUrl>#a1</styleUrl>
      <Point>
         <coordinates>-119.789227, 39.497545,0</coordinates>
      </Point>
      <gx:balloonVisibility>1</gx:balloonVisibility>
      <description><![CDATA[Safelite<br><br>Reno, NV<br><br>512-635-0914]]>
      </description>
</Placemark>
</Document>
</kml>

Original issue reported on code.google.com by GJamesBa...@gmail.com on 20 Jul 2011 at 7:02

GoogleCodeExporter commented 8 years ago
The same file works in Google Earth 6.0.3.2197.

Original comment by GJamesBa...@gmail.com on 20 Jul 2011 at 7:04

GoogleCodeExporter commented 8 years ago
I have the same issue where the default balloon appears

Original comment by tony.a...@gmail.com on 2 Aug 2011 at 4:14

Attachments:

GoogleCodeExporter commented 8 years ago
I've found that if I ftp the same file to our website, and then import the file 
from there, the style information isn't lost.  It only seems to have a problem 
when we upload using the file browse/upload ability.

We've also duplicated the problem on another computer.

Original comment by GJamesBa...@gmail.com on 2 Aug 2011 at 1:09

GoogleCodeExporter commented 8 years ago
GJJames..

I am new to this process and this forum.  Do you except that someone at google 
will post a solution to this bug?

Is there a way to use Google Earth 6.0.3.2197 in the browser?

Also, if you can, could you explain to where I would FTP the file?  

Original comment by tony.a...@gmail.com on 2 Aug 2011 at 4:27

GoogleCodeExporter commented 8 years ago
I'm not expecting anything, but I AM hoping that someone at Google is 
monitoring these issues and will address them in future releases.

Since Google Earth is a desktop application, I know of no way to use it in a 
web page.  However, I often test my files in Google Earth if I have a problem 
with Google Maps to help narrow down what the issue might be.

If you want to use the same work-around I used, you have to get the file to a 
web url so that you can use the "Or enter the url of map data on the web" 
option instead of the "Browse your computer to select map data to upload".  The 
map I'm updating is for corporate use, so I'm able to FTP the file to our Web 
Server and then just reference the file underneath our web site's URL.  If you 
don't already have access to a web site where you can do this, perhaps look at 
a free hosted site where you can ftp your files.  Another option I haven't 
tried, so I'm not sure will work, would be to upload the file to Google Docs 
and then use the URL for the file in the map import option.

I hope this helps some.

Original comment by GJamesBa...@gmail.com on 2 Aug 2011 at 6:41

GoogleCodeExporter commented 8 years ago
Thank you so much.  I don't have access to an hosted site and used google docs 
upload and made it a public doc and tried and it just hung trying to read the 
file.  I'll wait to see if someone at google can fix this issue.  Thanks again.

Original comment by tony.a...@gmail.com on 2 Aug 2011 at 8:07

GoogleCodeExporter commented 8 years ago
I tried reloading my KML file today and it is working as expected.  I suspect 
the problem was somehow resolved. 

Original comment by tony.a...@gmail.com on 6 Aug 2011 at 11:08

GoogleCodeExporter commented 8 years ago
Tony: I tested mine again today, and it's also working. Thanks for the heads up.

Original comment by GJamesBa...@gmail.com on 8 Aug 2011 at 3:22

GoogleCodeExporter commented 8 years ago
Thank you so much! Importing the kml from a hosted url retained all the styling 
when importing.

Original comment by justlega...@gmail.com on 5 Dec 2013 at 12:13