Import mass photos into your points with these 6 stepsTutorials - January 5, 2017
Thanks to the Click2Map editor, we built the following map, of the 100 best National Geographic photos of 2016 (we advise you to take a look, it will worth it).
This map was created thanks to a simple import of a CSV file (Microsoft Excel file) and the creation of a marker template in the Click2Map editor.
No need to add individually each image or to create your points manually. Indeed, an efficient solution exists in the editor: the ‘Code’ tab.
This extra tab can contain any HTML code. This term will afraid some of you, you’ll give up this tutorial because you think you need web development or computing skills. Not at all! Follow these 6 steps to import mass photos on your map.
1- Get the URL links of your photos
Before using directly the Click2Map editor, a few steps are required, particularly with your photos.
Regroup and organize in your computer all your images you’ll need to import. The point is to host them in your website server (or in your blog server).
How to do that? If the FTP term speaks to you, import directly your photos on the server of your website.
If it is not, go to the media library of your website. In WordPress for instance, click on Medias > Library > Add. In Drupal, click on Content > Medias > Add a file. Etc.
Add all your photos then get their URL links with a right click on a photo > Copy the web link.
Report each link in your CSV file.
2- Create or complete your CSV file
Let’s build your CSV file together (get help to convert your Excel file into a CSV file here).
For the current map, the following columns were created in our CSV file: Title, Address, City, Country, URL, Group, Template
The Title correspond with the title of your point displayed on the map and in the right caption.
The Address, the City and the Country allow the editor to locate your point on the map.
The URL column contains the web links reported in the first step.
Here, the Group column contains different categories listed in the map caption: Photo of the Day, Travel Photos, Adventure Photos,... Match the right categories to the right photos.
Finally, the Template column is linked to the template we are going to create in the step 4. Put the name of your choice. Here, we called it: ’NationalGeographic’. Then, we copied it in each cell of each row in the Template column. Be careful, the Template name don’t have to contain special characters or spaces.
Now go to the Click2Map editor and prepare your import.
3- Create a personalized data field
In your Click2Map database, a personalized data field has to be added to contain the URL links of your photos. Indeed, this field is not an existing field in Click2Map.
Please go to the Database menu > Properties, create a data category, called here ‘Photos’, then a data field named here ‘url’ with a Text format.
This field will be used in your marker Template.
4- Create a marker template
Then, create your marker template to show to the Click2Map editor where you need to display your photos, in this particular case in the Code tab.
Tools menu > Template set, create a New one. Name it as the label you put in your CSV file, here: NationalGeographic.
If you need to associate a personalized icon to your points, click on the blue icon at the left bottom of your edition window.
Then, please go to the Extra tab to define the parameter of your Code tab.
Click on the ‘Code’ button. Add the following HTML code in the white box.
<img src="#Photos.url" width="250px"><br><br>
<p><strong>Source</strong>: National Geographic</p>
The #Photos.url field is the previous created personalized data field.
The Width field matches to the image size. We resize them to 250 pixels in order to optimise them in the infowindow of our markers.
It’s ready. It’s time to import your CSV file.
Click on the New menu > Import. Choose the CSV, semi-column format. Then import.
A window is displayed to associate the columns of your file to the right Click2Map elements. Associate Title with the Title element, City with Address (City), Template with Template, etc.
6- Display the Code tab in your marker
It’s almost done! Your points are imported and located on the map.
It suffices to display the Code tab and hide the rest (Description, Address...)
In the Tools menu, click on the Bulk operations.
Select all your markers, then choose in the drop-down menu, ‘Modify the displayed items’.
Hide all the fields. Confirm.
Verify a point to make sure your photo is displayed properly.