Using geocoding on AS/400 to enhance your Web presence

Using geocoding on AS/400 to enhance your Web presence

Online applications for AS/400 can help expand your knowledge and make your job easier. Consider the ability to incorporate maps into your Web applications. How many times have you thought about using an onsite map to drive traffic to your company's location(s)? What if you could personalize the experience to indicate users' locations and show them how to navigate to you? That way you could increase your presence with geocoding and mapping tools and offer personalization to your customers.

Geocoding tools are not language-specific, but knowledge of JavaScript and XML are important to the layout of the mapping application. Your Common Gateway Interface (CGI) applications -- written in Java, JSP, PHP or any i5 CGI software development tools -- can use these external application programming interfaces (APIs) to make your company look good.

Mapping services, such as MapQuest and Google Maps, provide APIs or programming tools to integrate your websites with theirs, often using Web techniques such as Asynchronous JavaScript and XML (Ajax) to create the link. These tools can give interactive capabilities to your Web application -- it's like using a software program installed directly on your local computer. Because the Web browser is adept at showing formatted output using Cascading Style Sheets and HTML to give you the results, Ajax can greatly simplify your Web software packages.

MapQuest, Google and

    Requires Free Membership to View

    Register today to access targeted resources from our editorial writers and independent industry experts including news, tips, and advice to help you do your job more efficiently and effectively. Stay informed on the hottest topics and biggest challenges faced by IT professionals working with iSeries products and services.

    By submitting your registration information to Search400.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of Search400.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Yahoo's APIs offer services that can bring out your lazy programming skills. They have features like the one that puts pins in your map to highlight specific locations and uses a different colored pin to represent your company and the customer's current location – adding a "you are here" component, so to speak.

Example: Google pins

Click to enlarge.

Example: MapQuest

Click to enlarge.

Both online API choices offer geocoding, which is the ability to turn an address into a specific map location. This is very important, since asking your customers for their latitude and longitude could prove difficult.

Let's outline this application so you can get a better idea of what it has to offer. For example, you have a customer who's looking for your closest location to him. First, you have to geocode all addresses that are going to be displayed on the map (as described earlier). Second, you need to calculate the distance between your address and the customer's address, either by writing your own routine or using the built-in tools.

Note that this form of calculation uses a straight line between the two points. If you need additional instruction, the formulas and tools are very well documented on the Web. Remember, this isn't the exact mileage. In areas with many one-way roads, customers could be located within a few hundred yards but may still need to travel farther than that to get to you. Use "about" when describing distance to customers -- as in, "The store is about five miles from your location."

Once this is laid out (and your customer service personnel have been prepped), you can also sort the output for the customer by those calculated miles. Once that's complete, as a finale, you can have your representative or customers (over the Web!) click the location (the pin on the map) and see directions appear in the same window or in a new one.

Online geocoding applications contain a wealth of other features, such as the ability to show satellite imagery, which can give customers a different view of the area they are trying to navigate. In my company's case, our central call center is using geocoding to accurately describe areas that the representatives may not be familiar with. You can limit the satellite display within your application using the setup tools.

ABOUT THE AUTHOR: Andrew Borts is webmaster at United Auto Insurance Group in North Miami, Fla. He is a frequent speaker at Common and is past president of The Southern National Users Group, an iSeries-AS/400 user group based in Deerfield Beach, Fla.

Did you find this helpful? Write to the editor about your IBM i concerns at Editor@Search400.com.

This was first published in February 2009

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.