Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Can't seem to get the default site to display images.

I've added hrefs to a image column. example; I've dragged the image column to the top of the infowindow sidebar app and it still just displays "Non-valid picture URL". I also cant seem to figure out the last sentence of the explanation. Thanks for replying.

The explanation is;

Adding images to your infowindows This template allows you to add an image to your infowindow. The image URLs will need to be stored as a column in your table. Next, you will need to drag the URL field to the top of your infowindow and then select 'Header with image'.

share|improve this question
add comment

1 Answer

You can see an example of how to add images to the info windows on The Hobbit Locations map. And you have the source code to check how to do it on GitHub.

The template definition (plain HTML or Mustache) is on the index.html page:

<!--Custom html for the infowindow customization-->
<!--You can write simple html or use Mustache templates http://mustache.github.com/-->
<!--Content.data contains the field info-->
<script type="infowindow/html" id="infowindow_template">
  <div class="cartodb-popup">
    <a href="#close" class="cartodb-popup-close-button close">x</a>
     <div class="cartodb-popup-content-wrapper">
       <div class="cartodb-popup-cont">
        <img src="{{content.data.pic}}" />
        <h4>{{content.data.name_to_display}}</h4>
        {{#content.data.video_url}}
          <a class="videoButton" href="{{content.data.video_url}}" target="_blank"> </a>
        {{/content.data.video_url}}
        <p>{{content.data.description}}</p>
       </div>
     </div>
     <div class="cartodb-popup-tip-container"></div>
  </div>
</script>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.