gcode-mirror / earth-api-samples

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

Repeating (A.K.A Ghosting) placemarks that arn't removed in a refresh #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I load a kml using the following function: 

function kmlLOADPoint() { 

nl = null; 
nl = ge.createNetworkLink(""); 
nl.setFlyToView(false); 
var link = ge.createLink(""); 
link.setHref("http://65.68.82.120/kml/test/buffer.kml?nocacher=" + 
(new 
Date()).getUTCSeconds()); 
link.setRefreshMode(ge.REFRESH_ON_INTERVAL); 
link.setRefreshInterval(20); 
nl.setLink(link); 
ge.getGlobe().getFeatures().appendChild(nl); 

} 

<body onload="init(); setTimeout('kmlLOADPoint()',6000);></body> 

The kml is constantly being rewritten everyone 30 seconds or so, being 
populated through by another automated process using SQL data. The kml 
file being loaded looks something like this: (keep in mind this example 
I'm about to show you only has 1 placemark in it, the true file has almost 
300) 

<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://earth.google.com/kml/2.2"> 
<sessionState cookieless="true"/> 
<Document> 
  <Style id="Arrivals"> 
    <LabelStyle> 
      <color>FFEBCE87</color> 
      <colorMode>normal</colorMode> 
      <scale>1.4</scale> 
    </LabelStyle> 
  </Style> 
  <Style id="Sailings"> 
    <LabelStyle> 
      <color>FF8CE6F0</color> 
      <colorMode>normal</colorMode> 
      <scale>1.4</scale> 
    </LabelStyle> 
  </Style> 
  <Style id="Shifts"> 
    <LabelStyle> 
      <color>FF008800</color> 
      <colorMode>normal</colorMode> 
      <scale>1.4</scale> 
    </LabelStyle> 
  </Style> 
<name>test_placemark.kml</name> 
<open>1</open> 
    <Placemark id = "1193046"> 
      <name></name> 
      <description> 
        <![CDATA[<table width = "200px"><tr><td>MMSI: 1193046</td></ 
tr>]]> 
        <![CDATA[<tr><td>Speed: 0</td></tr>]]> 
        <![CDATA[<tr><td>Heading: °</td></tr>]]> 
        <![CDATA[<tr><td>Type: OTH</td></tr>]]> 
        <![CDATA[<tr><td>Status: Underway with Engine</td></tr>]]> 
        <![CDATA[<tr><td>Heading Status: </td></tr>]]> 
        <![CDATA[</table>]]> 
      </description> 
      <Point> 
        <coordinates>-93.8649966666667,29.7221966666667,0</ 
coordinates> 
      </Point> 
      <Style> 
        <IconStyle> 
          <scale>1.1</scale> 
          <heading></heading> 
          <Icon> 
          <href>http://65.68.82.120/Icons/Moving/OTH_Moving.png</href> 
          </Icon> 
          <hotSpot x="13" y="10" xunits="pixels" yunits="pixels"/> 
        </IconStyle> 
        <BalloonStyle> 
        <text><![CDATA[<table width="120px"><tr><td> $[description] </ 
td></tr></table> ]]></text> 
        </BalloonStyle> 
      </Style> 
    </Placemark> 
</Document> 
</kml> 

The problem is: 

I CONSTANTLY get repeats of the same placemark. These placemarks have 
latitudes and longitudes associated with each of them, all of them 
slowly changing over time. From time to time I will see the same 
placemark being represented twice as if the older one was 'ghosting' 
the newer one. They eventually go away but they are none the less 
unsightly. 

Does anyone have any idea how this may be happening? Keep in mind not 
all of them are doing this, usually only a handful are... a large 
handful though. 

Original issue reported on code.google.com by sabr...@gmail.com on 18 Aug 2008 at 4:53

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by api.roman.public@gmail.com on 19 Aug 2008 at 6:00

GoogleCodeExporter commented 9 years ago
The same problem exists when the network link is refreshed by 
VIEW_REFRESH_ON_STOP
option.

Original comment by dusan.fe...@vsb.cz on 15 Sep 2008 at 9:57

GoogleCodeExporter commented 9 years ago
same problem

Original comment by JSOmi...@gmail.com on 16 Oct 2008 at 11:48

GoogleCodeExporter commented 9 years ago
same problem here. updating 'onChange' creates duplicate placemark.
garahhhhfadfjasdhfklj12213321one234

Original comment by trstnmk...@gmail.com on 15 Nov 2008 at 12:10

GoogleCodeExporter commented 9 years ago
Have you tried adding a randomly generated number to the end of your network 
link 
filename? Like .kmz?1228255529

Original comment by jnicol...@gmail.com on 2 Dec 2008 at 10:16

GoogleCodeExporter commented 9 years ago
Should be fixed in latest plugin.

Original comment by api.roman.public@gmail.com on 3 Dec 2008 at 7:08

GoogleCodeExporter commented 9 years ago
I'm experiencing this issue with the last version of GE Plugin (GE Plugin
5.0.11655.6079 under Firefox 3.0.10 and IE 7.0.5730.11). With a networkLink and
"VIEW_REFRESH_ON_STOP", every time the KML document is reloaded all the 
placemarks
that the user have clicked before are duplicated and remain on the screen with 
no
possibility to be removed. So, this bug don't seem to be fixed yet.

Original comment by apoderos...@gmail.com on 12 May 2009 at 8:21

GoogleCodeExporter commented 9 years ago

Original comment by api.roman.public@gmail.com on 12 May 2009 at 6:07

GoogleCodeExporter commented 9 years ago
Hi,

Can you provide a demo URL? I can't reproduce the problem with 5.0.11655.6079 
and 
VIEW_REFRESH_ON_STOP.

Thanks,
Roman

Original comment by api.roman.public@gmail.com on 14 May 2009 at 6:51

GoogleCodeExporter commented 9 years ago
My application is in a local server so I can't give you access to it, but I've 
found
a way to reproduce it.

1. Go to AJAX APIs Playground / Create a Network Link:
http://code.google.com/apis/ajax/playground/?exp=earth#create_networklink

2. Change the "createNetworkLink" function to this:

function createNetworkLink() {
    var networkLink = ge.createNetworkLink("");
     networkLink.setName("ciutats");
     networkLink.setFlyToView(true);

     // create a Link object
     var link = ge.createLink("");
     link.setHref("http://www.entrevistestv.phpnet.us/borra.kml");
     link.setViewRefreshTime(4);
     link.setViewRefreshMode(ge.VIEW_REFRESH_ON_STOP);
     link.setViewFormat("BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]");

     // attach the Link to the NetworkLink
     networkLink.setLink(link);

     // add the NetworkLink feature to Earth
     ge.getFeatures().appendChild(networkLink)
}

3. Click on the placemarks to open the balloons (you can close them after), 
move the
map just a little and wait 4 seconds for the Network Link to reload.

4. A copy of every clicked placemark is created (at least in my computer).

In my application the BBOX variable is used to select dinamically just some
Placemarks every time, but the KML generated is similar to this simple example:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<Document id="ciutats">
    <Placemark>
        <name>Lleida</name>
        <description>Capital de Lleida</description>
        <Point>
            <coordinates>0.6452847123146057,41.628318786621094,0</coordinates>
        </Point>
    </Placemark>
    <Placemark>
        <name>Barcelona</name>
        <description>Capital de Barcelona</description>
        <Point>
            <coordinates>2.14224000254708,41.360036579191,0</coordinates>
        </Point>
    </Placemark>
    <Placemark>
        <name>Tarragona</name>
        <description>Capital de Tarragona</description>
        <Point>
            <coordinates>1.237298678043188,41.10952788064577,0</coordinates>
        </Point>
    </Placemark>
    <Placemark>
        <name>Girona</name>
        <description>Capital de Girona</description>
        <Point>
            <coordinates>2.817363133455735,41.96935935786346,0</coordinates>
        </Point>
    </Placemark>
</Document>
</kml>

Original comment by apoderos...@gmail.com on 15 May 2009 at 6:29

GoogleCodeExporter commented 9 years ago

Original comment by api.roman.public@gmail.com on 22 May 2009 at 1:39

GoogleCodeExporter commented 9 years ago
Thanks for the report; this should be fixed internally for a future release.

Original comment by api.roman.public@gmail.com on 29 May 2009 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by api.roman.public@gmail.com on 9 Aug 2009 at 12:52

GoogleCodeExporter commented 9 years ago
Bulk edit.

Original comment by api.roman.public@gmail.com on 9 Aug 2009 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by api.roman.public@gmail.com on 9 Aug 2009 at 1:09

GoogleCodeExporter commented 9 years ago
Fixed as of 5.1.3506.3999 (API v1.003); see announcement here:

http://groups.google.com/group/google-earth-api-notify/browse_thread/thread/6a32
fdfcc60236e

If this issue is still not fixed, please let us know.

Original comment by api.roman.public@gmail.com on 9 Sep 2009 at 10:17

GoogleCodeExporter commented 9 years ago
After a lot of testing on my end I can no longer reproduce the defect! Thank 
you Roman!

Original comment by carson.p...@gmail.com on 1 Oct 2009 at 2:37

GoogleCodeExporter commented 9 years ago
I am getting a similar problem still. I am not sure if the two are related. I am
running 5.1.3509.4636.

My placemarks are updated periodically via network link. If I don't hover the 
mouse
over the placemark, it get removed and re-rendered as expected. But if I hover 
over
the placemark when the reload starts, the old placemark does not get removed. I
tested the same file with Google Earth, and it worked as expected.

Original comment by steve7...@gmail.com on 17 Nov 2009 at 11:21

GoogleCodeExporter commented 9 years ago
I had wished I didn't have to get this involved with any program that needs 
more 
work.  I already do all too much for nothing.

Original comment by GrahamPo...@gmail.com on 25 Dec 2009 at 5:03

GoogleCodeExporter commented 9 years ago
We also get a problem similar to this problem.
We have a networklink which serves placemarks. (with refresh)
When we focus on a placemark (select it, or click and hold it)
and the networklink is updated/refreshes, the placemark is duplicated, leaving a
ghost placemark behind.

Earth version: 5.1.7938.4346
Windows7

creating an issue for it.

Original comment by mikewolt...@gmail.com on 17 Mar 2010 at 9:27