Announcement

Collapse
No announcement yet.

When my KML file is reloaded all layers insided the file are selected/displayed again

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • When my KML file is reloaded all layers insided the file are selected/displayed again

    Every time my KML file gets reloaded all the folders/Placemarks are displayed again.
    Even the ones that I have unchecked in the Layer Tree.

    I am using a NetworkLink to upload the file every 5 seconds.

    What code do I change to loop through the old kmlRoot and update the new kmlRoot with the user preferences of being displayed or not?

    Hope that makes sense Thanks.

    I am using the KMLViewer example

  • #2
    Found it.

    KMLLayerTreeNode.java

    refresh()

    I added code to remember the child isSelected state
    Then in the call to addChildFeatures called setVisibility with the previous state.

    Comment

    Working...
    X