Select to view content in your preferred language

Adding images from file to pop-ups

6770
18
10-31-2011 11:14 AM
GraemeMcKenzie
Emerging Contributor
Hello Everyone,

I am attempting to add images to the Pop-up windows on a home-made map that is stored in My Content. However, I only seem to be able to use images that are already online somewhere.

Am I wrong in assuming that I can use a file stored on my computer? Do I have to upload them to a website before I can attach them to my shapefile?

Also, is there any way to use difference images for different features? So far I've got the same image attached to every features in the shapefile.

Thanks very much,
Graeme
Tags (2)
0 Kudos
18 Replies
MikeMinami
Esri Notable Contributor
Images have to be on the web already. It is possible to generate a link to the image based on attribute field values in your data. For example, you might form an expression that looks like this:

http://some.com/images/{field with image name}

When you add the image to the popup, you'll see a plus sign button that lets you choose from your attribute fields and substitute in an attribute value like the above example.

Thanks,

Mike
0 Kudos
StevanGyetvai
Deactivated User
Hello,
Is it possible to add more than one image to a single popup?  If so, how is this done?
Thanks, Stevan
0 Kudos
MikeMinami
Esri Notable Contributor
Yes, you can add more than one image. Under the Popup Media section, click the Add button for each image you want to add...

Thanks,

Mike
0 Kudos
StevanGyetvai
Deactivated User
Hi Mike,

To be more specific, can I add multiple photos to an individual point and not have them show up in the pop-up for every point in the same layer?  Also, by the "Popup Media section," do you mean the Configure Pop-up option under Details>Contents?

Stevan
0 Kudos
MikeMinami
Esri Notable Contributor
Yes you can show multiple images in your popup. The way you do this is your data needs to contain the image you want to display. Here's an example of a CSV file that can be added to a map. It has two attribute fields, called photo1 and photo2 that contain the URL to images.


Name,Latitude,Longitude,photo1,photo2
Hospital,34.038344,-117.206536,http://www.esri.com/data/graphics/basemaps1.jpg,http://www.esri.com/data/graphics/imagery4.jpg
Supermarket,34.049054,-117.197436,http://www.esri.com/software/arcgis/arcgisonline/graphics/basemaps/world_imagery.png,http://www.esri.com/software/arcgis/arcgisonline/graphics/basemaps/world_street.jpg


In the Configure Popup option accessed from the layer, you can add images at the bottom. You would add two images and use the photo1 and photo2 fields as the URL (Click the + sign next to the type in field).

In this example, the attributes, photo1 and photo2, contain the full URL to the image. Alternatively, if all images were stored at the same location, the field might simply contain the image name, and the rest of the URL could be hard-coded in the URL field when defining the image, like this:

http://www.esri.com/graphics/{photo1}

Where the value of the attribute for the record would be substituted for the field reference, {photo1}

Hope this helps,

Mike
0 Kudos
GraemeMcKenzie
Emerging Contributor
Thanks very much Mike.

I'll have to look at getting these images posted somewhere.

Cheers,
Graeme
0 Kudos
AnnaSan
Deactivated User
Hello,

I would like to add multiple images into a single popup window.

I have followed the instructions above, (adding IMG_Link1, IMGLink2, etc... attribute fields). Then adding multiple images to the layer,and specifying the images to their URL links. However, only one image is showing. There is no capability to scroll to a second image.

I have attached a screen shot of my settings.

Please help.

Thank you,
Anna
0 Kudos
CarolineVallieres
Emerging Contributor
I can't seem to make one image per pop-up. All the images come up. I have the URL and Im trying to concatenate it to the object ID in the URL field but it doesn't work. Any advice?
Thanks!
0 Kudos
MikeMinami
Esri Notable Contributor
Caroline,

Would you be able to write the steps you are doing so that I could try to reproduce the problem?

Thanks,

Mike
0 Kudos