Feb 4, 2009

How to create kmz with picture icon

1. Take pictures and star GPS logger
2. Write geo-information to pictures(To reference posted article:GPS 記錄器、相簿、工具、節點編輯...)
3. Launch Friendly Flicker
4.open a text file and put into below text and save to doc.kml(UTF8 format)
doc.kml

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<name>Recent Uploads with geodata</name>
<open>1</open>

</Document>
</kml>

clip_image002
image
5. click tab “選項”then select all options.
image
6.Select “清單顯示”that faster than icon mode.
image
7. Input search conditions then click “搜尋相片.
image
8.While all of picture information loaded. right click on list and select "選擇全部相片”
image
9.Copy below text then put into firendly flickr.

<style id="normal/photo/{url}"><br />       <labelstyle><br />           <color>00ffffff</color><br />           <scale>1</scale><br />       </labelstyle><br />       <iconstyle><br />           <scale>2</scale><br />           <hotspot x="0.5" y="0.5" xunits="fraction" yunits="fraction"><br />           <icon><br />               <href>{image_st}</href><br />           </icon><br />       </iconstyle><br />   </style>
<style id="highlight/photo/{url}"><br />       <labelstyle><br />           <color>ffffffff</color><br />           <scale>1</scale><br />       </labelstyle><br />       <iconstyle><br />           <scale>2</scale><br />           <hotspot x="0.5" y="0.5" xunits="fraction" yunits="fraction"><br />           <icon><br />               <href>{image_st}</href><br />           </icon><br />       </iconstyle><br />   </style>
<stylemap id="styleMap/photo/{url}">
   <pair>
     <key>normal</key>
     <styleurl>#normal/photo/{url}</styleurl>
   </pair>
   <pair>
     <key>highlight</key>
     <styleurl>#highlight/photo/{url}</styleurl>
   </pair>
 </stylemap>
<placemark>
   <styleurl>#styleMap/photo/{url}</styleurl>
   <name>{title}</name>
   <snippet maxlines="4">
  
   </snippet>
       <description>
       <!--[CDATA[                <a href="{url}"><img src="{image_s}" /></a><br /><br />               <b>Title:</b>{title}<br /><br />               <b>Descript:</b><br />{descript}<br /><br />               <b>Date time:</b>{date_time}<br /><br />               <b>Model:</b>{model}<br /><br />               <b>Tags:</b>{tag1},{tag2},{tag3} ...<br /><br />               <a href="{url}">Open photo page</a><br />               <br /><br />               ]]-->
       </description>
   <point>
       <coordinates>{longitude},{latitude}</coordinates>
   </point>
</placemark>

10.Click tab 進階模版 and 啟動
clip_image006
11.Click “複製到剪貼簿”(the friendly fickr will get picture information form web site and apply the template before put inside.)
※Because the FF do not supprt photo id parameter , so that use url to generate id. after step replace surplus urls.
clip_image008
image
clip_image010
12.Replace the picture id. copy below option to replace dialog. and select Regular Expressions and select option Perl
photo/http://www.flickr.com/photos/(.*?)/(.*?)/
photo/\2

clip_image012
clip_image014
14.compress to zip file and rename the extension to *.kmz
clip_image016
15.After that you can place in internet such as google page to share anyone.
16.This site can validator your kmz.
clip_image018
Demo … Google Map
clip_image020
Save the kmz link to My Map that will show pictures by postition when you move .
image
Double click *.kmz … Google Earth
image

No comments: