Skip to main content
Best Answer

KMLViewSetter trouble getting it work, see workbench:

  • March 22, 2018
  • 5 replies
  • 32 views

jhawks
Contributor
Forum|alt.badge.img+7

https://www.safe.com/transformers/kml-view-setter/

I've been looking at the KMLViewSetter transformer, but when I set lat/long values in there it continues to open to the default location in Google Earth. I've tried using the values in the doc example, but it still opens to the default location.

 

 

I might be missing something - but has anyone got this to work and could help me out?

FME(R) 2018.1.0.0 (20180321 - Build 18442 - WIN32

Best answer by markatsafe

I think the <LookAt> tags in KML can be applied to almost any object. In you're example, you've applied the <LookAt> tag to every feature in your dataset (rnc_catalog_lines_densified). If you click on a feature then that view point will be applied. My guess is that if you applied the <LookAt> to a higher level object such as Document or Folder, then you'd get the <LookAt> as your default view. I've tried this for a Document feature type and it seems to work. I've attached the revised workspace:

 noaa-rncs-shape-kml-2017.fmwt

<Document><LookAt><longitude>-90</longitude><latitude>35</latitude><altitude>0</altitude><range>800000</range><tilt>30</tilt><heading>0</heading>...
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

stalknecht
Contributor
Forum|alt.badge.img+22
  • Contributor
  • March 23, 2018

Please share more information about your problem? Your workspace doesn't contain any data. Can you share a template? (File / Save as Template)


jhawks
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 26, 2018

Specifically I've set Lat / Long etc in the kmlViewSettings trasnformer and it continues to open to the default location. I tried using the values in this example and no good.

https://www.safe.com/transformers/kml-view-setter/


jhawks
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 26, 2018

Forum|alt.badge.img+2
  • Best Answer
  • March 26, 2018

I think the <LookAt> tags in KML can be applied to almost any object. In you're example, you've applied the <LookAt> tag to every feature in your dataset (rnc_catalog_lines_densified). If you click on a feature then that view point will be applied. My guess is that if you applied the <LookAt> to a higher level object such as Document or Folder, then you'd get the <LookAt> as your default view. I've tried this for a Document feature type and it seems to work. I've attached the revised workspace:

 noaa-rncs-shape-kml-2017.fmwt

<Document><LookAt><longitude>-90</longitude><latitude>35</latitude><altitude>0</altitude><range>800000</range><tilt>30</tilt><heading>0</heading>...

jhawks
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • March 27, 2018

That did it! Thanks!