windrobin / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 1 forks source link

KMLtree networklinks do not get updated when a NetworkLink KML File changes #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a KML file with a placemark in it and some description. Placemark.kml
2. Create a networklink file (PlaceMarkNetworklink.kml) to point to the 
Placemark.kml file.
3. Load the winforms test application.
4. The data will show up in the tree. 
5. If you double click on the Placemark it will take you to the correct 
position and will show the description field.
6. Open Placemark.kml and modify the position and Description.
7. The Placemarker will move to the new location and when u click on the new 
place marker it shows the latest information.
8. The old Placemarker is still there and if you click on the kmltree it will 
take you to the OLD marker and not the new one.

What is the expected output? What do you see instead?
When the kml file got updated the KMLtree should of gotten updated too with the 
latest position and information, so when we double click on the node in the 
kmltree it would fly to the NEW position and not the old one. 
It also needs to remove the old baloon as that stays there.

What version of the product are you using? On what operating system?
Latest rev430, Windows 7 64 bit, visual studio 2010.

Please provide any additional information below.

Original issue reported on code.google.com by ali....@gmail.com on 28 Nov 2011 at 10:59

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

Unfortunately the support for Network Links is not that great in the Api as 
there are no events that signal the data updates.

See this issue in the API: 
http://code.google.com/p/earth-api-samples/issues/detail?id=5

I do plan to update the library if and when support is added.

Thanks

Original comment by fraser.c...@gmail.com on 28 Nov 2011 at 2:35

GoogleCodeExporter commented 9 years ago
Hi I just tried doing the same thing above but with networklinkcontrol and 
modifying the Placemark position with an  an Update. Now the Fly to works when 
I double click on the KML and it shows me a bubble with the latest information 
but the ICON has not moved it stayed in the same place. Below is my update kml 
that has a refresh interval of 5 seconds. 
<NetworkLinkControl>
    <Update>
      <targetHref>http://localhost:8080/data/static/palmerstonnorth/1319.kml</targetHref>
      <Change>
        <Placemark targetId="pm1319">
            <name>1319</name>
            <description></description>
            <Point>
            <coordinates>175.50,-41.00,0</coordinates>
          </Point>
        </Placemark>
      </Change>
    </Update>
</NetworkLinkControl>

Is there a way to force the map to refresh?

Original comment by ali....@gmail.com on 3 Dec 2011 at 8:09

GoogleCodeExporter commented 9 years ago
I have used the following http://code.google.com/p/kmltree as a temporary 
solution for now and disabled the kmltree until the issue is resolved :)

Original comment by ali....@gmail.com on 3 Dec 2011 at 11:08

GoogleCodeExporter commented 9 years ago
Attached is the Test KML file that I used.

Original comment by ali....@gmail.com on 3 Dec 2011 at 11:13

Attachments:

GoogleCodeExporter commented 9 years ago
hmm I am pretty sure the kmltree you linked to has the same issue - in that it 
doesn't update network link content (at least with the tests I have just done) 
- the guys that develop that project are waiting on this feature request too - 
http://code.google.com/p/earth-api-samples/issues/detail?id=37

Original comment by fraser.c...@gmail.com on 5 Dec 2011 at 3:17

GoogleCodeExporter commented 9 years ago
Hi I have included some screenshots to show what I've tested. 
1 and 2 kmltree.jpg shows the Balloon, Icon and FlyTo working using 
NetworkLinkControl with the kmltree library.
On Updating my kml NetworkLinkControl file(edit in notepad and change the 
position), the icons, Balloon and FlyTo get update correctly and everything 
works OK. NOTE: The Node names do not get updated in the left Tree.

1 and 2 treeview.jpg shows the same test but this time with the normal 
kmltreeview that came with informs-geplugin-control-library. The FlyTO and 
Balloon in this case DOES go to the new location on updates. BUT the ICON does 
not move to the new location. 

I have based the NetworkLinkControl "Updates" method on this 
http://code.google.com/apis/kml/documentation/updates.html

I hope this provides some help/clarification and has not made things more 
confusing :)

Original comment by ali....@gmail.com on 5 Dec 2011 at 7:57

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

This is petty odd - I have never used the NetworkLinkControl before but when I 
test this it works as expected. To test I created the four files 
Point-load.kml, Point.kml, Update-load.kml and NetworkLinkControl-Update.kml. 
These are 'as is' - except I altered all the urls to be relative - i.e.

I then loaded the files through the GEServer class, eg:

geWebBrowser1.FetchKml(server.BaseUrl + "Point-load.kml");
geWebBrowser1.FetchKml(server.BaseUrl + "Update-load.kml"); 

The placemark "point123" name changes in both the plugin and kmlTreeView.

I even tested with a new position by altering the file 
NetworkLinkControl-Update.kml to include a new position, i.e.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <NetworkLinkControl>
    <Update>
      <targetHref>Point.kml</targetHref>
      <Change>
        <Placemark targetId="pm123">
          <name>Name changed by Update Change</name>
          <Point>
            <coordinates>-95,40,0</coordinates>
          </Point>
        </Placemark>
      </Change>
    </Update>
  </NetworkLinkControl>
</kml>

Again, this works, the name and position of the placemark are updated in both 
the plugin and kmlTreeView.

However other NetworkLink updates such as ViewBasedRefresh, Intervals, etc 
don't work (again this is as expected)

...

F

Original comment by fraser.c...@gmail.com on 5 Dec 2011 at 3:56

GoogleCodeExporter commented 9 years ago
Hi thank for that, I have set my urls to be relative and that fixed it.

Original comment by ali....@gmail.com on 8 Dec 2011 at 11:11

GoogleCodeExporter commented 9 years ago
Great - glad that is working for you. 

Even so, I will leave this open as a feature request as the network links 
integration does need to be better ... it is just the lack of anything in the 
native api that is holding me back!

Original comment by fraser.c...@gmail.com on 12 Dec 2011 at 8:39

GoogleCodeExporter commented 9 years ago
Hi, I've upgraded the code to the latest revision 431(from 430) and now the 
networkControlLink no longer works. It has loaded everything correctly but when 
I change the content of the NetworkLinkControl-Update.kml it does not change 
like it used to before revision 431
I have also tested against the basic example from 
http://code.google.com/apis/kml/documentation/updates.html and the same issue 
happens.

It works in revision 430 but not in revision 431.

Thanks

Original comment by ali....@gmail.com on 16 Dec 2011 at 3:23

GoogleCodeExporter commented 9 years ago
Yes there was a change in how the treenode was refreshed, I forgot to add the 
new call - it will be fixed in the next commit. Thanks again!

Original comment by fraser.c...@gmail.com on 5 Feb 2012 at 10:48

GoogleCodeExporter commented 9 years ago

Original comment by fraser.c...@gmail.com on 8 Feb 2012 at 6:22

GoogleCodeExporter commented 9 years ago
I appear to be having the same problem where i updated a kml file and it is not 
reflecting on the webpage. I have gone as far as to delete the Folder/Placemark 
section  - then on to deleting the entire kml file-- and as strange as it 
sounds the page still loads with the now deleted kml file... 
I tested this effect with deleted cache on Chrome and I.E. - as well as 
launching firefox and now the iPhone.

What is happening? -- Ja-making me crazy

Original comment by albr...@aljoharagroup.com on 25 Mar 2012 at 6:12