GIS Tech News (#55)

31 Mar, 2008

Interactive Maps: Custom Features

Editing your JavaScript code enables the end user to select a specific location.

By Andrew Roe

Andrew Roe photo

Last month I described how to create an interactive map — one that allows you to zoom and pan in real time. These maps can be embedded in Web pages and other personalized documents. This month I'll discuss how to customize an interactive map and allow the end user to select a specific location to map.

Let's briefly review what I covered last month. Web pages, typically driven by HTML (hypertext markup language) code, can be used to display a variety of elements, including maps from various sources. For example, the Google Maps application programming interface (API) enables you to add a map to a Web page or other document, and then make it interactive by applying some fairly simple JavaScript code. Other sources such as MapQuest also offer programmable APIs.

The example last month included some JavaScript code that could be cut and pasted into an HTML file and used to generate an interactive map. To customize this further, let's dig a bit deeper into the JavaScript language and the Google Maps API.

JavaScript Basics
First of all, a few highlights about JavaScript. The name JavaScript is actually a bit of a misnomer. It is a scripting language bearing little in common with another programming language called Java. JavaScript was originally developed by Netscape for use in Netscape Navigator. Microsoft developed a similar scripting language called JScript for Internet Explorer. The European Computer Manufacturers Association (ECMA) in 1996 released a standard scripting language called ECMAScript that encompasses both JavaScript and JScript, but most users collectively refer to ECMAScript, JavaScript, and JScript code as JavaScript. I'll follow the common lingo here. Both last month's example and this month's example are technically JScript examples intended to run on Internet Explorer, but I'll call them JavaScript examples.

Scripting languages — unlike full programming languages such as Java, Visual Basic, and C++ — require a host environment in which to run. The host environment acts as either a client or a server. The most common arrangement is to run JavaScript code in a Web browser, which acts as a client. JavaScript can also be used with servers such as Internet Information Server to generate an Active Server Page (ASP), but I won't go there now. Read more »

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Cadalyst contributing editor Andrew G. Roe is a licensed civil engineer and president of AGR Associates. He is also the author of Using Visual Basic with AutoCAD, published by Autodesk Press. E-mail him at


Cadalyst Labs Review

Mathematica 6

By Mike Hudspeth, IDSA

How many times have you heard people say, "How hard can it be? It's not rocket science?" They might be correct most of the time, but what if it really is rocket science or some other high-end math problem? What will you do then? If you're like me, you'll stand there a minute with a glazed-over expression on your face, you'll scratch your head, and then you'll figure out a way to either find someone else who knows how to do math of this kind or come up with a more empirical way to figure it all out. Another alternative would be to fire up your copy of Mathematica 6 from Wolfram Research.

Mathematica 6 is a computational engine par excellence. It can handle just about any kind of complex math you can throw at it. It's for the big dogs (mathwise). Colleges and universities use it to further science and mathematics as we know it — and with a pedigree like that, it's got to be good. And it is. Read more »

Mark Your Calendar: GIS Events

Synergis Field to Finish Civil 3D Workshop
April 8, 2008
King of Prussia, Pennsylvania

In this workshop, Synergis and Autodesk technical experts Jerry Bartels and David Blanchette will demonstrate Civil 3D's new survey functionality. Read more »

2008 ESRI Southeast Regional User Group Conference
April 14-16, 2008
Jacksonville, Florida

Join other ESRI GIS users from the southeast region to discuss challenges and discover solutions applicable to your location and organization. Read more »

12th Annual Portland CANstruction Competition
April 22-27, 2008
Portland, Oregon

Competing teams showcase their talents by designing giant sculptures made entirely of canned foods. At the close of the exhibitions, all of the food used in the structures is donated to the Oregon Food Bank. Read more »

CPDA Design/Simulation Workshops
May 13-14, 2008
Atlanta, Georgia

Developing a design/simulation framework (May 13) will look at simulation data management, process support, and integration. Frontiers in Design and Simulation (May 14) will explore how to model and support system-level design decisions in SysML. Read more »

2008 ESRI Education User Conference
August 2-5, 2008
San Diego, California

Meet with members of the worldwide GIS education community and explore how to use GIS software in your field, maximizing teaching, understanding, and managing with innovative applications. Read more »

2008 ESRI International User Conference
August 4-8, 2008
San Diego, California

Users from more than 120 countries come to learn new skills, share information, and discover best practices, tips, and tricks that they can use instantly. Read more »

2008 Society for Conservation GIS Conference
August 12-15, 2008
Monterey, California

This 11th annual conference is sponsored by ESRI and SCGIS, a nonprofit organization that builds community, provides knowledge, and supports individuals using GIS technology and science for the conservation of natural resources and cultural heritage. Read more »

2008 ESRI Health GIS Conference
September 28 - October 1, 2008
Washington, D.C.

Technical presentations will demonstrate the newest geographic information systems (GIS) technology and how health and human services organizations around the world are building GIS solutions that improve human health. Read more »

2008 ESRI Europe, Middle East, & Africa User Conference
October 28-30, 2008
London, England

The EMEA UC 2008 will reflect ESRI and ESRI (UK)'s vision for the future where GIS solutions will play an increasingly vital role on an everyday basis in a myriad of different ways. Read more »

Cadalyst's complete list of upcoming events is always available on our Web site. Cadalyst's sister publication, Geospatial Solutions, also offers a full calendar of GIS-related events.