Subscribe to this thread
Home - General / All posts - Is it possible to upload .kml/.kmz with images attached?
Sev
462 post(s)
#12-Jul-08 16:11

Hi everyone, I was wondering if it's possible to export a map as a .kml/.kmz with a layer showing as point data with a photo attached. I have saved them with point data to show text in GE, but not an attached photo....

I'm fairly certain it's not possible as the tables in Manifold only link to a picture, it's not actually saved as part of the table....but if anyone has any other ideas...

lionel_

671 post(s)
#12-Jul-08 19:33

already do that

1 import a drawing with point ( lat/long)

2 create an active column name descritpion to table of drawing

3 add colum for store link to web page or image

4 launch description function that create an html page with tag compatible with google map ( URL colum contain image link)

5 export drawing to kml and choose

name = proprietaire

descritption =descritpion

7 double click to kml to launch google earth

don't know if this could be helpfull , think you expect URL type column contain image is by default attach t opoint when export to kml but not the case !!

Attachments:
kml-link.map

Sev
462 post(s)
#13-Jul-08 00:37

Thanks Lionel, I tested your .map and it works.

I don't get the description though...I'm a complete novice at this. When opened with GE, the properties of the description field is as below.

" <![CDATA[ <TABLE width='400' border='1' cellspacing='0' cellpadding='0' style='font-size:small;'> <TR><TD bgcolor='#FDCB12' height='10'></TD><TD bgcolor='#CC3033'></TD></TR> <TR valign='top'> <TD align='center'><A href="http://www.ulaval.ca"><IMG src= "http://www.geowebservice.org/geowebcampus/logoulaval.gif" ></A><BR> <!-- Photo Pavillon --> <IMG src="http://www.ulaval.ca/Al/interne/plan/Abitibi/pav.jpg"width=150 height=100/> <TD> <TABLE border='0' cellspacing='0' cellpadding='0' style='font-size:small;'><TR><TD> <P><B> <!-- Adresse web Pavillon --> <SPAN style='color:#CC3033;font-size:large;'> <!-- Batiment --> Pavillon Abitibi-Price <!-- </A> --> </SPAN> </B><BR> <!-- Description Pavillon --> Nomm&eacute; en l&#39;honneur de la compagnie Abitibi-Price pour son g&eacute;n&eacute;reux appui aux campagnes de souscription de l&#39;Universit&eacute;. <BR>Inaugur&eacute; en 1950. </P> </TD> </TR> <TR> <TD> <BR><B>D&eacute;partements</B> </TD> </TR> <TR> <TD valign='top'> <!-- Liste Departements --> <UL> <LI><A style='color:#010101;' href="http://www.sbf.ulaval.ca/" target='_top'>D&eacute;partement des sciences du bois et de la for&ecirc;t</A></LI> </UL> <B>Facult&eacute;</B> </TD> </TR> <TR> <TD valign=top> <!-- Liste Services --> <UL> <LI><A style='color:#010101;' href= "http://www.ffg.ulaval.ca/" target='_top'>Facult&eacute; de foresterie et de g&eacute;omatique</A></LI> </UL> </TD> </TR> </TABLE> </TD> </TR> </TABLE>]]>"

That is another language to me.

Is there a simple way to only show the photo, nothing else? Would this make the above easier?

Is the photo a part of the .kmz, or is it looking at a url? I need it to be part of the .kml\.kmz

Thanks for you help with this.

I have another example which only shows the following in the description

<p align="center"><img src='images/opt4_small.jpg'></p>

I guess I just need a reference where I can study this a bit further. Thanks. Andrew.

lionel_

671 post(s)
#13-Jul-08 04:41

this is html code before html browser like ie rendeder it . because this code ll be place inside kml file when output you have to say to kml engine to not anlayze this code so you ll se in the beginning this tag <![CDATA[ and in the end this tag "]]>" that you must remove to paste in a html editor like nvu ( in an source code edit session). so nvu call now kompozer ll let you modify the html code that must be copy inside WIfi2 Table Script . In the script actually you ll see Record.Data("url1") that call url string from table so recor.Data("url1") ll be replace by example http://www.ulaval.ca and so one . So kml is a gis format but also contain embedding html code so it is also a html engine ( or call external html engine ) !!!

1 in the map file of name kml-link.map the photo is store outside the kml format .

2 if C:/directory1/directory2/file.html contain a link images/opt4_small.jpg so the browser expect to find the image locate in C:/directory1/directory2/images/op4_small.jpg . you could upload your image to a ftp server it the directory calla images that could be accessble using http protocol so url to use be http://www.site.xxx/images/op4_small.jpg

3 does kml support raster ? don't think so but to understand what we can do with kml you have to read the kml API web page the other raster that can be use with kml is tiles ( http://www.tiles2kml.com/screenshots.html and http://www.klokan.cz/projects/gdal2tiles/ ) but raster are generate using http server !

kml is like html ( xhtml) an xml file so also use open end tag with attribute/value for define functionnality that an renderer engine ll understand ( google map , virtual earth n nasa worlwind virtual earth ) .

hope it ll help

lionel_

671 post(s)
#13-Jul-08 05:11

for edit the html code , launch Kompozer and then go to menu -view html source , then inside the tag body copy the html code and comment CDATA star and end start as the capture screen . In the tab you ll see Preview that ll show (rendering ) the html tag to htm page . there many mode tab inside kompozer

  • Normal : for write text in what you is what you get way ( ! icon are comment)
  • html tags: for view structure of the page could also be editable

  • source : for sutom the html page when problem occur in wisywyg mode
  • Preview : some rendering engine render the same html page in different maner . so preview let you test many rendering engine ( must be like front page or topstyle)

    topstyle let you use the source code mode with completion like frontpage ( visual web developper expression edition )

    the history of html ->xhtml->xml so the extension file change .htm .html ->.xml and so some file ( .gpx, kml ) could be open using XML editor after change file name extension to .gpx .kml to .xml !!

    the logo of laval is store in the web at http://www.geowebservice.org

    Kompozer don't like to show html tag in one line so ll reformat the html source code in many lines

    hope it ll help

    Attachments:
    kompozer-preview.jpg
    kompozer_htmltags.jpg
    kompozer_source-manylines.jpg
    kompozer_Source.jpg

  • lionel_

    671 post(s)
    #13-Jul-08 06:10

    video

    lionel_

    671 post(s)
    #13-Jul-08 06:34

    here the most important thing to read http://code.google.com/apis/kml/documentation/kmlreference.html#description

    the description name that appear when export drawing to kml ll place the content of the selected column inside description tag in the kml file

    lionel_

    671 post(s)
    #13-Jul-08 08:18

    map file only contain basic thing for manage image . clik on point in the map object ll launch image rendering in the browser . export and open kml viewer is made by script .

    Attachments:
    kml-link.map

    Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.