Sunday, October 11, 2009 9:10 PM -
ArcGIS-Explorer-Team
How to add locations from text files - and more
Recently we had a question from an educator preparing a geography lesson for his students. He had collected the names and birthplaces of his students and wanted show them on a map and share them with his class using Explorer. "Was that possible?" he asked. "Sure, easy" we answered. So we thought we'd share how.
First, the name of each student with their birthplace was added to a text file, like what you see below. Note that the first line of the file contains the field names, and the information is separated by commas.

Next we clicked add content, and chose text files from the list.

After browsing for the file, Add Text File guided us through the process of adding the locations to our map. On the first page we didn't have to change anything, since we already had a comma delimited text file with the first line containing the field names - the defaults. At the bottom we could see a preview of the file, so we could ensure we had made the right choices.
On the next page we chose the option to specify that the file contained address. Though we didn't have a complete street address in this case, we did have the city and state. We chose the Name field from the file as the title, and the City field as the description. The title is both the hover text and the title of the popup, the description is what appears in the popup window.

Next we chose the addres fields. Because we had named them city and state Explorer automatically them.
When finished we could see the locations of all the students on our map with each name as the hover text and popup title, and the city displayed in the popup window itself.

But here's a cool thing we can do with the description. Since the description is displayed in the popup window, if we change the text description to a URL, then rather than display text we'll display a Web page in the popup. So we edited our original file, adding a new field we named Web Site and added the URL to the home page for each student's home city.

We saved the text file, then added it again. Because we had already added the file, Explorer asked if we wanted to use the same choices as before. Because we added some new information and wanted to change things, we chose No.

Now in the Add Text File preview, we could see the new Web Site field and the URLs we'd just added.

This time through we chose the Web Site field as our description.

And when finished, we could click on any student's location to view the Web site of their home city.

For more information about working with text files, see the add text files Help topic.