Hi,
I have exported a kml layer containing different kind of feature such as audio, 
video, image. 

I've displayed it on Google earth and when I click on a feature I see correctly 
the description and the title, but I don't see the features image preview.

Here is a snippet of my code:

var pointKmlLayer = new OpenLayers.Layer.Vector("kmlFeaturePointExported", 
pointStyle);

var visibleContents[];

var content = {
        id: '<%=g.getId()%>',
        lon: '<%=g.getLon()%>',
        lat: '<%=g.getLat()%>',
        type: '<%=g.getContent_type()%>',
        title: '<%=g.getTitle()%>',
        link: '<%=g.getLink()%>',
        author: '<%=g.getAuthor()%>',
        geometry:'',
        description: '<%=g.getDescription()%>'
};

                
visibleContents.push(content);

if(visibleContents[i].type == "video") {
                        
                                 attributesFeaturePoint = {
                                                                name: 
visibleContents[i].title,
                                                                description: 
visibleContents[i].description, 
                                                                contenttype: 
visibleContents[i].type, 
                                                                link: 
visibleContents[i].link,
                                                                title: 
visibleContents[i].title,
                                                                author: 
visibleContents[i].author,
                                                                id: 
visibleContents[i].id
};
                        
featurePoint =  new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(visibleContents[i].lon, visibleContents[i].lat), 
attributesFeaturePoint, videoGraphic);
                                    
                                featurePoint.geometry.transform(srcProj, 
destProj);
                                pointKmlLayer.addFeatures(featurePoint);

stringkml = escape(kmlout.write(pointKmlLayer.features));



Thank you for your help,

Mario

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to