Point Data, ArcGIS Server Base Maps and KISS

One of the most common requests for a web mapping application is to simply display points on a map. I won’t go on and on about the general concept as we’ve all probably seen countless examples of these maps. The basic idea is point data are represented by icons that are clickable. When you click a point, you get info about what’s happening there. It’s just simple points on a map.

A few months back, a couple of us in the lab were tasked with developing a simple workflow that we could publish as a quick and easy way for non-developers to display some of their data on ArcGIS Online (or any other ArcGIS Server) base maps. KISS was definitely the theme of this mini-project. We quickly came up with a solution, and eventually uploaded it to the ArcGIS API for JavaScript code gallery under the title “Mapping Point Data.” See the default, dead simple, points on a map app here.

There are two applications bundled in that sample but both serve the same purpose. For this post, I’ll only go into detail for the app that deals with data that already have x and y coordinates. The apps come with detailed “How To” documents that serve as a step-by-step walkthrough to get the app running with your data.

When working with data that already have associated x and y coordinates, the basic workflow is:

  • download and unzip the file from the code gallery page for this app
  • edit the app’s configuration file, appConfig.js, to reference your data and the necessary fields
  • copy the edited configuration file, your data file and the html file from the original .zip file to your web server

That’s it! Navigate to the html file on your server and you should see your data displayed on a base map. The default configuration will display your data on top of the ArcGIS Online (AGOL) street map but you can easily change this by editing the configuration file to point to a different AGOL map service or a map service of your own. Below is a screen shot displaying some of the sample data included with the code.

Of course, you can get into more complex scenarios. One that’s covered in the “How To” doc is using/displaying data from multiple files. And there might be some pre-processing required to make sure your data uses the correct coordinates. If you just need to do a simple conversion from WGS84 to Web Mercator (or vice versa), check out geographicToWebMercator() or webMercatorToGeographic().

If you run into any issues using these apps and/or have questions, please let us know in the comments.

Contributed by Derek Swingley.

Published Monday, August 24, 2009 4:15 PM by apl2009

Comments

No Comments
Anonymous comments are disabled