kml

2012-11-16 12 views
5

का उपयोग करके Google धरती में एक रेखा को एनिमेट करना मैं Google धरती के animated update फ़ंक्शन का उपयोग करने में बहुत पूरा हूं और models को स्थानांतरित करने के लिए इसका उपयोग कर रहा हूं। मैं वास्तव में क्या करना चाहता हूं कि Google धरती में line (जैसे ऊपर और नीचे) को एनिमेट करने में सक्षम होना है, लेकिन यह मुश्किल लगता है।kml

मेरे पास शुरुआत में लाइन का रेखांश और अक्षांश है। उदाहरण के लिए लाइन निर्देशांक हैं:

-88,17,100 -88.20270841086835,17.21899813162266,100

मैं तो 5 सेकंड की अवधि में 500 की ऊंचाई पर निर्भर इस लाइन की raise एक छोर करना चाहते हैं ।

मैं का उपयोग कर लाइन LineString तैयार किया है:

<Placemark id="path1"> 
    <name>Untitled Path man</name> 
    <LineString> 
     <tessellate>1</tessellate> 
     <coordinates> 
      -88.,17,100 -88.20270841086835,17.21899813162266,100 
     </coordinates> 
    </LineString> 
</Placemark> 

लेकिन मैं अब कैसे <gx:AnimatedUpdate> उपयोग करने के लिए 500

इम यकीन है कि अपनी आसान करने के लिए 100 से ऊपर एक छोर को स्थानांतरित करने के लिए के रूप में खो - कर सकते हैं कोई मुझे सही दिशा में इंगित करता है ??

उत्तर

5

चाल प्लेसमार्क के बजाय लाइनस्ट्रिंग तत्व (उस पर एक आईडी के साथ) को अद्यतन करना है।

यहां एक काम कर रहे केएमएल उदाहरण टूर है जो 100 से 500 मीटर की सापेक्ष ऊंचाई से बदलती रेखा को एनिमेट करता है।

<?xml version="1.0" encoding="UTF-8"?> 
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> 
    <Document> 
     <name>gx:AnimatedUpdate example</name> 
     <open>1</open> 

     <LookAt> 
      <longitude>-88.1351880996469</longitude> 
      <latitude>17.09943637744042</latitude> 
      <altitude>0</altitude> 
      <heading>49.91874373078863</heading> 
      <tilt>84.43764019949967</tilt> 
      <range>1929.311316966288</range> 
      <gx:altitudeMode>relativeToSeaFloor</gx:altitudeMode> 
     </LookAt> 

     <Placemark> 
      <name>Untitled Path man</name> 
      <LineString id="path1"> 
       <tessellate>1</tessellate> 
       <altitudeMode>relativeToGround</altitudeMode> 
       <coordinates> 
      -88,17,100 -88.20270841086835,17.21899813162266,100 
       </coordinates> 
      </LineString> 
     </Placemark> 

     <gx:Tour> 
      <name>Play me!</name> 
      <gx:Playlist> 
       <gx:AnimatedUpdate> 
        <gx:duration>5</gx:duration> 
        <Update> 
         <targetHref/> <!-- Left empty to refer to the current file --> 
         <Change>       
          <LineString targetId="path1"> 
           <coordinates> 
            -88,17,100 -88.20270841086835,17.21899813162266,500    
           </coordinates>       
          </LineString> 
         </Change> 
        </Update> 
       </gx:AnimatedUpdate> 

       <!-- Wait for the animation to complete (see the touring 
       tutorial for an explanation of how AnimatedUpdate's 
       duration isn't enough to guarantee this). --> 
       <gx:Wait> 
        <gx:duration>5.0</gx:duration> 
       </gx:Wait> 
      </gx:Playlist> 
     </gx:Tour> 
    </Document> 
</kml> 

विवरण https://developers.google.com/kml/documentation/touring#tourtimelines

+0

प्रश्न उत्तर दिया, बहुत धन्यवाद देखें – user1829877

संबंधित मुद्दे