Select to view content in your preferred language

Attribute display from shapefile to online

2022
6
Jump to solution
06-20-2012 04:21 PM
ErikFernandez
New Contributor III
Can anyone point me in the right direction to: upload a shapefile to arcgis online (done) and then find a way to have the pop up display with a photo and a descriptive paragraph that is different for each polygon in the shapefile?  Thanks in advance for any suggestions.
Erik
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RupertEssinger
Frequent Contributor II
Here's an example of what you can do:

San Diego Shortlist: http://links.esri.com/san_diego_map

This kind of informal, fun map with a small number of features is really easy to make. It is simply seven shapefiles created in ArcMap and then zipped up and added to an ArcGIS Online web map. So I didn't publish this data as services. There are three point shapefiles for my three main categories: food, design and fun. There are four line shapefiles containing the ferry routes and the outlines of recommended neighborhoods, parks and beaches. I symbolized the shapefiles and configured their popups, and then published the map using the default Legend web mapping template that is built into the Share dialog, so there's no coding involved.


Tips:


1. All the photos are 200 x 150 pixels so they fit nicely into the popup window and are fast to load. You can store them on any public web server you have access to.  I used an Esri web server I have access to, so the pics in my map have this URL format, for example:
http://downloads.esri.com/blogs/places/sandiego/cafe_222.png.
You then put the complete URL for each feature into one of the attributes of the shapefile.


2. My place descriptions are fairly wordy, and when you assemble and edit a shapefile in ArcMap text fields can't be longer than 254 characters. So I created five fields in each shapefile to store my description for each place, and divided the sentences in the description up into those fields. Each field is self-contained so none of these sentences runs over across multiple fields. This is fiddly, but one benefit of this is that when the popups are configured using this data, you can control how much descriptive text the user will see. If you think the descriptions are too long, you can simply omit the latter of the five fields so you just get the first part of the description. This may make it easier to re-use the same data in different maps and apps.


3. I added a Website field that contains the full URL to the website for the place. The websites for some places are liable to change so in quite a few cases I set up a redirectable URL and used that in the attribute instead of the actual URL of the place. In this way, if I find that a website has changed, I can simply edit that redirectable URL instead of having to edit the attributes of the features in the web map (or web maps, if the data has been imported into more than one web map). In the popup for each place, I've got a link called Website that launches the URL in the Website attribute. To configure that part of the popup I opened the web map in ArcGIS Explorer Online, which lets you define a link in a custom attribute display that launches a URL stored in an attribute on a per feature basis.


4. In the web map, I hid the line shapefiles from the legend because I want the user to focus on the point places of interest. This is a new feature that was recently added into ArcGIS Online. Look in the menu for any layer in a web map and you'll see a Hide In Legend command.


If you want to look at the underlying web map used in this app so you can see the schema of the layers and the configuration of the popups I used, here it is:
http://www.arcgis.com/home/webmap/viewer.html?webmap=1966ef409a344d089b001df85332608f.
The map also contains a labels layer created in Explorer Online and also a San Diego trolley network map service published with ArcGIS Server, but these are only used in the presentation that is built into the map, so they are turned off by default. To inspect the attributes for any of the place layers in this map, in the map viewer go to the Contents panel and in the menu next to any of the layers, choose Enable Editing. Then click on any of the places in that layer to open its popup and click Edit at the bottom of the popup. To inspect the attributes in Explorer Online, click any of the places to open its popup and then choose Edit > Edit Popup in the bottom right corner of the popup. If you want to use this shapefile schema as a template for your own data, open the web map in ArcGIS for Desktop 10.1, which will create geodatabase feature class layers for each of the layers in the map. You can use this as a template for editing and then export the layers as shapefiles.

View solution in original post

0 Kudos
6 Replies
by Anonymous User
Not applicable
Can anyone point me in the right direction to: upload a shapefile to arcgis online (done) and then find a way to have the pop up display with a photo and a descriptive paragraph that is different for each polygon in the shapefile?  Thanks in advance for any suggestions.
Erik

search the help...its your friend - http://help.arcgis.com/en/arcgisonline/help/index.html#//010q0000004m000000
0 Kudos
MikeMinami
Esri Notable Contributor
0 Kudos
RupertEssinger
Frequent Contributor II
Here's an example of what you can do:

San Diego Shortlist: http://links.esri.com/san_diego_map

This kind of informal, fun map with a small number of features is really easy to make. It is simply seven shapefiles created in ArcMap and then zipped up and added to an ArcGIS Online web map. So I didn't publish this data as services. There are three point shapefiles for my three main categories: food, design and fun. There are four line shapefiles containing the ferry routes and the outlines of recommended neighborhoods, parks and beaches. I symbolized the shapefiles and configured their popups, and then published the map using the default Legend web mapping template that is built into the Share dialog, so there's no coding involved.


Tips:


1. All the photos are 200 x 150 pixels so they fit nicely into the popup window and are fast to load. You can store them on any public web server you have access to.  I used an Esri web server I have access to, so the pics in my map have this URL format, for example:
http://downloads.esri.com/blogs/places/sandiego/cafe_222.png.
You then put the complete URL for each feature into one of the attributes of the shapefile.


2. My place descriptions are fairly wordy, and when you assemble and edit a shapefile in ArcMap text fields can't be longer than 254 characters. So I created five fields in each shapefile to store my description for each place, and divided the sentences in the description up into those fields. Each field is self-contained so none of these sentences runs over across multiple fields. This is fiddly, but one benefit of this is that when the popups are configured using this data, you can control how much descriptive text the user will see. If you think the descriptions are too long, you can simply omit the latter of the five fields so you just get the first part of the description. This may make it easier to re-use the same data in different maps and apps.


3. I added a Website field that contains the full URL to the website for the place. The websites for some places are liable to change so in quite a few cases I set up a redirectable URL and used that in the attribute instead of the actual URL of the place. In this way, if I find that a website has changed, I can simply edit that redirectable URL instead of having to edit the attributes of the features in the web map (or web maps, if the data has been imported into more than one web map). In the popup for each place, I've got a link called Website that launches the URL in the Website attribute. To configure that part of the popup I opened the web map in ArcGIS Explorer Online, which lets you define a link in a custom attribute display that launches a URL stored in an attribute on a per feature basis.


4. In the web map, I hid the line shapefiles from the legend because I want the user to focus on the point places of interest. This is a new feature that was recently added into ArcGIS Online. Look in the menu for any layer in a web map and you'll see a Hide In Legend command.


If you want to look at the underlying web map used in this app so you can see the schema of the layers and the configuration of the popups I used, here it is:
http://www.arcgis.com/home/webmap/viewer.html?webmap=1966ef409a344d089b001df85332608f.
The map also contains a labels layer created in Explorer Online and also a San Diego trolley network map service published with ArcGIS Server, but these are only used in the presentation that is built into the map, so they are turned off by default. To inspect the attributes for any of the place layers in this map, in the map viewer go to the Contents panel and in the menu next to any of the layers, choose Enable Editing. Then click on any of the places in that layer to open its popup and click Edit at the bottom of the popup. To inspect the attributes in Explorer Online, click any of the places to open its popup and then choose Edit > Edit Popup in the bottom right corner of the popup. If you want to use this shapefile schema as a template for your own data, open the web map in ArcGIS for Desktop 10.1, which will create geodatabase feature class layers for each of the layers in the map. You can use this as a template for editing and then export the layers as shapefiles.
0 Kudos
ErikFernandez
New Contributor III
Thanks for the above responses...those combined with a little help from tech support and I've got it up and running. Here are the cliff notes:
1: In arcmap: add field for the image urls in the layer's attribute table. Make it text and lots of characters. Enter the unique image urls into attribute field as follows:
<img src="http:*******" />
In arcmap, right click on the shapefile, properties, go to html tab, click on "as a formatted page..." and then click to load default template. Upload to arcgis.com.
In acrgis.com go to configure popup and add image, select the attribute field with the url as the display.  Very similar to what Rupert was describing.

2: In arcgis.com to avoid having the pop up list attribute field names which takes up space, go to configure pop up, set display to be custom, then configure. Click on the add field names button on right. Select the field name for the image and for the description.

3: If you don't have a shapefile you're starting with it's a lot easier to setting all this up directly in arcgis instead of arcamp... go to "add", "create editable layer", name it and default template is fine. This brings up editing options to add points etc to the map, and then automatically allows you to add text and images, very straight forward and best if you just need to add a few points, if you've got a lot of polys or points then you'll have to go via the attribute field.

Thanks again for the help.
Erik
0 Kudos
RupertEssinger
Frequent Contributor II

3: If you don't have a shapefile you're starting with it's a lot easier to setting all this up directly in arcgis instead of arcamp... go to "add", "create editable layer", name it and default template is fine. This brings up editing options to add points etc to the map, and then automatically allows you to add text and images, very straight forward and best if you just need to add a few points, if you've got a lot of polys or points then you'll have to go via the attribute field.


I've found that creating an editable layer works well for a few features and informal annotation that you don't want to appear in the legend of your map, and that you won't want to use in more than one map. But if you want the features to appear in the legend, or you have more than a handful of features, or you want to be able to use the features in multiple maps, it is much better to create a shapefile in ArcMap and then zip it up and upload it into the web map. Layers based on shapefiles work better in the legend and give you much more control when you configure the popups because you can choose which attributes from the shapefile are displayed and the order they appear in. You can also easily upload the shapefile into multiple web maps, and if you decide to go to the next step and publish your data as a service, using either ArcGIS Server or via the cloud using an ArcGIS Online subscription, you'll have the features all ready to go. Plus from ArcMap you can also easily share your features with other GIS folks as a layer package which they can load into ArcGIS for Desktop or the free Explorer Desktop client.
0 Kudos
ErikFernandez
New Contributor III
Good points Rupert. Using a shapefile as the source does have significant benefits, particularly sharing with others or if I end up wanting to create a static map in arcmap I can use the layer whereas you couldn't use the arcgisonline editable layer.  Thanks for the follow up points here.
Erik
0 Kudos