fastkml
fastkml copied to clipboard
How to add LookAt
How can I add LookAt I think it should be added to Document d = kml.Document(ns, 'docid', 'doc name', 'doc description')
there should be something like
<LookAt>
<longitude>14.0</longitude>
<latitude>44.0</latitude>
<heading>0</heading>
<tilt>0</tilt>
<range>500</range>
</LookAt>
If there's some replacement for LookAt that provides same functionality, let me know
https://developers.google.com/kml/documentation/kmlreference#lookat
<LookAt>
Syntax
<LookAt id="ID">
<!-- inherited from AbstractView element -->
<TimePrimitive>...</TimePrimitive> <!-- gx:TimeSpan or gx:TimeStamp -->
<gx:ViewerOptions>
<option> name=" " type="boolean"> <!-- name="streetview", "historicalimagery", "sunlight", or "groundnavigation" -->
</option>
</gx:ViewerOptions>
<!-- specific to LookAt -->
<longitude>0</longitude> <!-- kml:angle180 -->
<latitude>0</latitude> <!-- kml:angle90 -->
<altitude>0</altitude> <!-- double -->
<heading>0</heading> <!-- kml:angle360 -->
<tilt>0</tilt> <!-- kml:anglepos90 -->
<range></range> <!-- double -->
<altitudeMode>clampToGround</altitudeMode>
<!--kml:altitudeModeEnum:clampToGround, relativeToGround, absolute -->
<!-- or, gx:altitudeMode can be substituted: clampToSeaFloor, relativeToSeaFloor -->
</LookAt>
Description
Defines a virtual camera that is associated with any element derived from Feature. The LookAt element positions the "camera" in relation to the object that is being viewed. In Google Earth, the view "flies to" this LookAt viewpoint when the user double-clicks an item in the Places panel or double-clicks an icon in the 3D viewer.
I'm implementing AbstractView and Camera so I can add this as well
Great!
In meantime I have patched it hackish by simple search/replace of xml data. Your implementation would provide cleaner solution
On 2/3/22, Martim Passos @.***> wrote:
I'm implementing AbstractView and Camera so I can add this as well
-- Reply to this email directly or view it on GitHub: https://github.com/cleder/fastkml/issues/102#issuecomment-1029289219 You are receiving this because you authored the thread.
Message ID: @.***>