BrainDump
  Home arrow BrainDump arrow Page 2 - Parsing Addresses and More with the MapPoi...
Iron Speed
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Parsing Addresses and More with the MapPoint Web Service Find APIs
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-03-06

    Table of Contents:
  • Parsing Addresses and More with the MapPoint Web Service Find APIs
  • AJAX-Enabling Your Web Applications
  • Implementing MapPoint Lookup AJAX Application
  • Optimizing Find Call Performance
  • Applying Proper Metadata for Faster Searches

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Parsing Addresses and More with the MapPoint Web Service Find APIs - AJAX-Enabling Your Web Applications
    (Page 2 of 5 )

    In theory, AJAX is no different from any other web application that uses HTTP request and response—however, adding asynchronous calls from your web page to the web server that uses JavaScript dramatically improves the user’s experience.

    To understand how to leverage AJAX in your MapPoint Web Service web applications, you need to understand how AJAX works, which is explained in the following section.

    For AJAX to work, you need three core components:

    • A web page (htm, aspx, etc.) that hosts JavaScript containing asynchronous calls to the web server
    • XMLHTTP ActiveX control enabled from the client web browser
    • A server-side component that can process HTTP GET requests using the query string parameters

    All three of these components together make an AJAX implementation. Usually, the server-side component is an HTTP Handler, since it renders only the script instead of conventional HTML. An HTTP Handler is similar to an ISAPI extension, and you need to implement the IHTTPHandler interface to develop an ASP.NET HTTP Handler. These concepts are shown pictorially in Figure 6-3.

    Since designing a web page and writing JavaScript are straightforward tasks, let me delve into the server-side components that are required for AJAX.

    For example, you want to develop a web application that implements “Find a place” functionality; in this application, when users search for a place, generally MapPoint Web Service comes back with a list of possible matches to be displayed for disambiguation. Conventionally, you would implement this process using the following series of actions:


    Figure 6-3.  AJAX architecture for MapPoint Web Service applications

    1. Have the user type in a place and click a button to find it.
    2. Post the request to the server page that invokes the MapPoint Find Service calls to find the place.
    3. If there is more than one match to the input string, display them in a list box where the user can select the place that he is looking for.
    4. Post that selection back to the server page that invokes MapPoint Render Service to get a map.

    The same application can be implemented with AJAX to improve the overall user experience:

    1. As the user types each character into the input place textbox, make an asynchronous call to the server to fetch matching places and display them in a dynamic drop-down list.
    2. Have the user select the place she is looking for.
    3. Post that selection back to the server page to display a map.

    An implementation of this application results in the user interface shown in Figure 6-4.

    The experience of using the application is far richer with AJAX when compared to a traditional MapPoint find web application. Next, let’s see how to implement this application.


    Figure 6-4.  Place lookup using MapPoint Web Service and AJAX

    More BrainDump Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Programming MapPoint in .NET," published...
     

    Buy this book now. This article is excerpted from chapter six of the book Programming MapPoint in .NET, written by Chandu Thota (O'Reilly; ISBN: 0596009062). Check it out today at your favorite bookstore. Buy this book now.

    BRAINDUMP ARTICLES

    - Handling Multiple Contracts with Indigo
    - Cleaning Out Your Data in XP
    - Multiple Service Contracts and Indigo
    - Cleaning Out Your Programs in XP
    - Handling Metadata with Indigo
    - Building Blocks for a WCF Service Web Site
    - Help! I Need Some Remote Assistance
    - Using Service Templates with Indigo
    - Windows XP Tips for Task Manager
    - Generating Clients and Services with Indigo
    - Vista SP1, A Review
    - Services and the WCF
    - VBScript: Final Date Functions
    - Creating Services with the WCF
    - The Resource View of the MFC




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway