Skip to main content
Question

How do you specify the the kml_open attribute to force folders to be expanded in a KML?

  • November 30, 2017
  • 5 replies
  • 34 views

I tried creating a kml_open attribute and set it to 1 but it doesn't expand the folders. Examining the markup, it doesn't appear that the <open>1</open> tag is applied to the root document. However if you set the kml_visibility attribute it will apply that tag to the root document.

I am using FME 2017.1.1.1

5 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • November 30, 2017

Hi @tbuckler,

Did you expose the attribute kml_open in Writer?

Thanks,

Danilo


  • Author
  • November 30, 2017
danilo_fme wrote:

Hi @tbuckler,

Did you expose the attribute kml_open in Writer?

Thanks,

Danilo

Yes, it doesn't appear to apply the open tag to the root document.

 

 


redgeographics
Celebrity
Forum|alt.badge.img+50

I had a closer look and it appears FME is writing the <open> tag on the placemarks rather than the folder. I suspect it's a bug so I'll pass this on to support.


fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • December 4, 2017
redgeographics wrote:

I had a closer look and it appears FME is writing the <open> tag on the placemarks rather than the folder. I suspect it's a bug so I'll pass this on to support.

Hi @tbuckler and @redgeographics,

 

I am investigating this and will let you know what I discover. Thank you for pointing this out.

 

 


Forum|alt.badge.img+6

Hi @tbuckler after chatting with development, I have this response :

 

 

In KML, each feature can have its own `<open>`, which is what we get from the `kml_open` attribute. So in that sense the behaviour is correct. However, it doesn't really help in this scenario, because you would want the folder which contains the features to be open, not the features themselves. In a typical workspace, FME will create a new folder for each feature type, and we don't have a way for the workspace to control the "open-ness" of that folder. A potential enhancement would be to add a feature type parameter which would allow users to control the open/closed behaviour of the auto-generated folder. We already have a number of other styling parameters which are set per feature type, so there is precedent for this type of thing.There is a workaround, which is somewhat complicated. You could write a new feature to a `Folder` feature type, and set the `kml_id` and `kml_open` values on this feature. Then, each "real" feature would have to have a `kml_parent` attribute set to the id of the folder. Basically this is manually creating a folder, rather than relying on the auto-generated folder.

 

 

If you would be interested in added a feature type parameter to add support the open/closed behaviour, please consider posting this idea at https://knowledge.safe.com/content/idea/post.html Kind Regards, Annabelle

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings