AJAX in the use of Web-GIS

sponsored links
Abstract: With the Web platform matures, we can see that more and more exciting technologies emerge, these technologies make geographic information system (GIS) display applications to a powerful and widely used new heights through the latest technology into a powerful GIS system to go, we get the results of the implementation of high efficiency, followed by given more. In the current browser-based application development technologies, AJAX (Asynchronous JavaScript and XML) is undoubtedly the latest technology. In this paper, we introduce a generic and efficient architecture that the AJAX model is integrated into the GIS Web Services display system.

"Integrating AJAX Approach into GIS Visualization Web Services"

Ahmet Sayar1, 2, *, Marlon Pierce1 and Geoffrey Fox 1, 2, 3, 4

1 Community Grids Lab, Indiana University, Bloomington, Indiana, 47404, USA

2Department of Computer Science, Indiana University

3Department of Physics, Indiana University

4School of Informatics, Indiana University

{Asayar, mpierce, gcf} @ cs.indiana.edu

Zheng Xiang Chinese translation

zhengsean916@yahoo.com.cn

Original article from the Internet

2006-8-29

Abstract: With the Web platform matures, we can see that more and more exciting technologies emerge, these technologies make geographic information system (GIS) display applications to a powerful and widely used new heights through the latest technology into a powerful GIS system to go, we get the results of the implementation of high efficiency, followed by given more. In the current browser-based application development technologies, AJAX (Asynchronous JavaScript and XML) is undoubtedly the latest technology. In this paper, we introduce a generic and efficient architecture that the AJAX model is integrated into the GIS Web Services display system.

1. Seeker


AJAX is a browser-based Web Applications is an important development model. It uses several techniques, these techniques work together and contract with each other, thus to create powerful new applications. AJAX model components are XML, JavaScript, HTTP and XHTML, these technologies are widely used and known by everyone. Google Mapping is the efficient use of this new and powerful model.

Web Services are self-contained, self-describing, and is a standard component, and not the same as earlier, and now more closely associated with distributed object methods (such as CORBA, in addition to system support for XML Web Services news center method), which makes allows you to create loosely coupled, highly distributed systems across the organization, while also promoting the GIS Web Services worth of promised features, such as the establishment of some standards, these standards provide a common distribution, targeting and call the Web services specification, Web Services using both widely used and well-known technologies such as AJAX and the like XML, HTTP, since the AJAX and Web Services are based on the XML structure, then they can play each other leverage The.

In this paper, we first give some of our target architecture used in Web technology, background information, these techniques are based on AJAX, Web Services, and GIS Web Services for. In the third part we will mention something about AJAX and Web Services related work; in the fourth section, we first give a generic for integrating Web Services and AJAX framework, and then we will give examples to verify these on the integration of concept, one of which is based on Google and GIS Data Server (WFS) integration, and the other is based on Google and GIS Mapping Server (WMS) integration; in the fifth part is the future work, Part VI is the conclusion.

2 Background


Integration framework mentioned here is AJAX and GIS in the field of Web Services composition, here we will first explain the technology and theory, and their advantages.

Asynchronous JavaScript and XML 2.1


AJAX is a Web application development style, which mixed with the current Web technology to provide a more interactive experience for Web applications. AJAX is not a technology, it just includes the development of a set of Web application technology only, these technologies are JavaScript, HTML, Cascading Style Sheets (CSS), Document Object Model (DOM), XML and XSLT, as well as through XMLHttpRequest to the communication protocol of the message.

These constitute the core of AJAX technology is very mature and widely used in the field of Web application development; AJAX becoming more and more popular because of its Web-based browser that application developers have a lot of advantages, it eliminates the interaction the process of "stop - start" the weakness of the user interaction with the server process is asynchronous, so that the data on the page without refreshing the whole time and time again, and these "request - response" process is through structured XML documents - XMLHttpRequest protocol completed. These features allow developers to easily integrate the AJAX Web Services to go.

Google started using AJAX for the development of new applications after, AJAX attention began to be public, Google has developed in the last year many of the important products are based AJAX model, such as Google Groups, Google Suggests, and Google Maps. In addition to the product outside of Google, Amazon's search engine in their applications the same method used AJAX.

Web client applications can use AJAX, a client need only wait for the user's own API to directly call the JavaScript XMLHttpRequest protocol code execution time, so clients only need to focus on writing code and deal with different Web browsers. Client can use some of the latest library developed to provide more advanced AJAX services, and hide the different browsers handle, this method is used to replace the use of pure AJAX development while also dealing with different browsers are developed, so The library has DWR, Prototype, Sajax, AJAX.NET.

2.2 OGC GIS Web Services


OGC defines a set including data models, online services, including GIS standards, which have been widely used in the field of GIS, OGC is an international non-profit standards development organization, and its leaders were on the geographic data related operations and service standards. OGC in different ways have made a great contribution to the field, whether in industry or in academia, these contributions are intended to create an open, extensible interface for GIS software development.

GIS has a series of methods and environment for the display of geographic data, operations and analysis, geographic features of the application is the need to integrate and share from different providers of spatial data to solve the problem of data integration, OGC proposes GIS service standard definition release.

The emergence of Web Services technology to overcome the shortcomings of traditional distributed object technology, and provides a distributed network environment, cross-language cross-platform capability, GIS services, the method will be more Web Services implementation of spatial data GIS underlying architecture allows storage vendors to share data, but also allows the application to run in a distributed environment. GIS Basically, mainly related to the different vendors from different data sources to integrate data and services. Established a set of Web Services architecture and the client in the service connection between the standards mentioned here can be a good client support dynamic data integration, which is the underlying structure of the data to create an empty key. Through Web Services, distributed GIS services from different vendors can be interoperable through the use of standard communication protocols to dynamic GIS service applications integrated into GIS.

The OGC Web Services in the services will be added to the following benefits, including:

l distributed: the distribution of geographic data more easily, so that applications can be cross-platform, cross-operating systems, computer languages, and a platform and language neutral characteristics.

l integration: application developers, easier integration of geospatial features, easier integration of data to the user program, and very easy to call through the WSDL file and service functions to create a client program.

l infrastructure: we can create out of a lot of Web Services architecture many benefits, these architectures including development tools, server-side applications, messaging protocols, security infrastructure, workflow definitions and more.

The most common and widely known and OGC GIS services related to the display mechanism: GIS Mapping Services and GIS Data Services, OGC is called the Mapping Services Web Map Services (WMS), the Data Services called the Web Feature Services (WFS) and Web Coverage Services (WCS), WFS provides elements of the model data, which is a vector format, GML (Geographic Markup Language) encoding, WCS field model to provide the data, the data is raster format.

3 Related work mode


There are some well-known Web-based project dedicated to integration or results have emerged, such as Web Services, AJAX. OGC and ESRI in the GIS using Web Services, OGC is actually a standard definition of the entity, GIS services, the organization of the interface standard definition release, but Cubewerx, Demis, and Intergraph is a commercial GIS developers, they put Web Services to their system in. Ka-Map Google Maps and AJAX model of the display system integrated into the GIS, Ka-Map is a map-based AJAX for Web sites, they use the open source development tools, Web map, Ka-Map using MapServer map server provided as AJAX and PHP map content. All these results mentioned above, were all used in the Web Services and AJAX technologies.

XML, E4X ECMAScript scripting language is the only AJAX and Web Services to work with each other scripting language, E4X is a simple extension of JavaScript language, and JavaScript is very easy to make the XML description, E4X is the official name of the JavaScript language, ECMA (European Computer Manufacturers Association) is the development of the standard-setting body, has been standardized in ECMA JavaScript defined as E4X, E4X integrated use of all the other AJAX technologies, without the need for expansion.

By E4X, XML API will no longer be necessary (for example: DOM or SAX); XML document as JavaScript can understand one of the local data types, you can easily update the XML documents from JavaScript, the nature of these can be used E4X calls from the browser to create Web Services, but the only browser to support E4X Mozilla1.8.

E4X is used to interact with Web Services, but it also is an extended version of JavaScript; how to send the request SOAP message, and how to return back to the SOAP message on the operation are also difficult to solve, if you model is based on AJAX The Web application uses the E4X, you can hardly be applied to each of this browser. This is another flaw.

In our method, you do not extend to any AJAX related technologies, we use several AJAX all the basic technology, our approach allows developers and users to easily integrate or customize their applications.

4 architecture: the AJAX model, called Web Services


In this section, we describe the integration of the AJAX common Web Services-based browser application architecture. In this architecture has two main roles: the client's display and GIS Web Services. SOAP protocol is called Web Services, XML is carried out through the SOAP message exchange.

Common Integration Framework 4.1


How to call in the AJAX model, Web Services do?

Figure one application from the AJAX call Web Services

Client browser to the server agent (ie JSP page) to send the request, the server agent in turn sends a request to the Web Services, before the process is prepared by using the Web Services Client Stubs implementation, Web Services returned to the server agent, and present to the client browser. In the following we will explain these steps in detail:

First, create a XMLHttpRequest object is used to describe the nature of a remote call;

- Var http = new XMLHttpRequest ();

Then, define a target point for calling URL, the URL address should be local, the intermediate proxy service used to GIS Web Services to send a proper request;

- Var url = "proxy.jsp";

In the second, call the local agency services, URL is given in the above parameters have been defined;

- Http.open ("GET", rul + "? Bbox =" + bbox + ... [other parameter-value pairs] ... ...)

proxy.jsp is an intermediate agency services page, which is used to capture the request (HttpServletRequest) and capture response (HttpServletResponse) objects, agents JSP includes only one line of code to track the HttpServletRequest and HttpServletResponse parameters that a page from the past, these parameters are passed through the XMLHttpRequest protocol.

- Jb.doTask (request, response)

"Request" and "response" parameter from the user interaction page, the page includes JavaScript, XHTML, CSS and JSP to grab the parameters given by the user, it is used to return a result on the screen.

"Jb" is a java class of the object that the request to use it - response to handle and Web Service client stubs to create the appropriate request, the request - response to the handle is also used to receive and analyze GIS Web Services to return back from the response object.

Received from the GIS Web Service to return the object after, "jb" object to send back the results to the home page of the XMLHttpRequest object;

- PrintWriter pw = reponse.getWriter ();

- Pw.write (response);

Page in the user interface XMLHttpRequest object through the following code to receive this value;

- Http.onreadstatechange = handleHttpResponse

This common integration framework can be applied in a variety of Web Services; the return of each type of different Web Services, and their Service API does not provide the same, so you should have their applications and measures defined the client's needs.

In 4.2, we will in the GIS field of important applications of this integrated framework to verify the availability and efficiency.

4.2 Application - Google Maps integration with GIS display system


This integrated system is actually a set of AJAX and Web Services calls between the activities, these activities are asynchronous, and the object returned from the client is carried out asynchronously. In 4.2.1 and 4.2.2 of the application using the figure depicts a common integration framework; the applications where the composition will be extended a little different, these different from those who are under the service provider API create differences between the requests for services, as well as on the screen to return different data, but these are the differences in the implementation process.

4.2.1 Google AJAX integration with WMS


Create a user client activity parameters in parallel processing in two different working path, where the activities of the browser through Google Mapping tool integration. JavaScript event listener through the (ActionLintensers), Goolge Binding APIs access to these activities, and sent to the second layer of the object, shown in Fig.

Browser's user interface is a JSP page that includes two JavaScript reference class, one of which is used by the Google Map object, and the other is used by the WMS map image, it is bound to the Google Map object.

According to Figure II-defined architecture, Layer-2 connected to each other to create has been completed for the Layer-1, Google Mapping application is for XMLHttpRequest AJAX Web application model, and protocol implementations, Google through the use of remote XMLHttpRequest and JavaScript in your browser file to control the creation of the map.

When we applied this kind of interaction in the WMS interface type, we can use all the OGC compatible WMS functions, such as "getMap", "getCapabilities", "getFeatureInfo", will be a thin client; only received map and the map placed in the Google Map. Placement process is advanced JavaScript techniques through a number of implementation. Client does not need to render the map, do not need to create a map image. Map has been returned by WMS, and has become a JPEG or PNG format, or TIFF, the return type sent to the WMS in the "getMap" request type definition is given as a parameter, these pictures have been put in place prior to written in a different format converted into a JavaScript object.

Figure II Google Maps with OGC WMS accordance with the plans to integrate the framework of a defined

4.2.2 Google AJAX integration with WFS


WFS provides the elements of the model data, the model data elements encoded by GML data in vector format, GML is defined under the OGC WFS, it adopted "getFeature" parameters are. GML is the XML encoding of geographic information data exchange and storage, which includes the geometry and attribute characteristics.

Figure III Google Maps with OGC WFS accordance with the plans to integrate the framework of a defined

In the "getFeature" in response to the request, GML file to XML encoding and encapsulation through the SOAP response to the request. After the response received, the client access to the geometric element data, the most important element is the most common geometric point, line string, wire rings and polygons. OGC GML is a description of the elements of a standard model data.

Although the Google Mapping API to support two of them: point and line strings, but other geometric elements of the same through a small update into two types. After these geometric elements are in the Google Map through the "GPoints" and "GPolylines" objects and "mapOverlay" Google Map API functions to draw and combinations.

GML returned by setting a non-geometric elements, and through the Google API's "GMaker" object can be achieved in the framework of OGC WMS Services "getFeatureInfo" function support. All of these tasks through the use of JavaScript function XMLHttpRequest API and implementation.

XMLHttpRequest using DOM to parse the returned XML structure, if the returned data too large for the server, DOM parser will throw "Out of Memory" exception. To overcome these DOM and Goolge Map of feedback information, we use the Pull Parsing manner, and in the resolution and get back in the WFS GML document, the result is written to the Web browser; JavaScript, XMLHttpRequest by calling the response XML, browser get the results and modify the data after appropriate for display on the screen.

5 Future work


In the future, we will continue to handle some of the problems of the structure. Google Map provides a map to high-speed data, WMS and WFS Web Services return data than slower, some of which is due to the size and characteristics of geographic data created, and the other reason is that consumption of CPU time to render images in the generated map algorithm on the. Since we do not have high-performance servers and proprietary networks, we must be other ways to improve performance. To achieve this goal, we will use the WMS and WFS flow (Streaming) version of geographic data comprising the image, and accordingly, GML processed through the messaging middleware, for example, Indiana University CGL (Community Grids Lab.)'s NaradaBrokering, NaradaBrokering GIS provides some important characteristics of the area, these properties have QOS (Quality of Service) and messaging security mechanisms, continuous and reliable message storage interface, through the WS-Reliable messaging can be a reliable message distribution, fault-tolerant data processing, support different communication methods (TCP, UDP, Multicast, SSL, RTP, HTTP, Discovery service to find nearest brokers / resources (and efficient way to travel)). You can through our official website (GIS Research at Community Grids Lab, Project Web Site: http://www.crisisgrid.org/ ) to get our latest research information.

6 Conclusion


If the GIS show the client browser application from the desktop using Web Services, if the Web Services can respond quickly enough, then the call through the AJAX model to the efficiency of Web Services will be improved. As AJAX and Web Services use XML as the basis for the request - response communication between them can leverage, which makes application developers can easily turn browser-based AJAX applications into Web Services.

In the removal and display those on the map by clicking on the selected specific elements of the information, Google Maps will use only some deficiencies; some applications through the use of GIS Web Services, and allocated to this part of the WMS, the Google Map out to eliminate some of the shortcomings, and can run faster. Google Map API uses the DOM parser, if the data is too large for the server, DOM parsing will be impossible, from the XML (such as GML) description of the geographic data will also be possible to obtain characteristic information; through the GIS Web Services integrated into the display application, through the use of Pull Parsing technology can remove these defects.

In our target architecture design approach, we do not have to change or extend any AJAX model or Web Services technologies, standards through the use of these theories, you can put into any GIS Web Services applications to display, and only need to to do some expansion on the application specifications, for example, according to Web Service API to create the request, and then return control over the object.

7 thanks


The project was NASA's Earth-Sun System Technology Office's Advanced Information Systems Technology Program supported this project by the National Science Foundation's National Middleware initiated.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of AJAX in the use of Web-GIS

  • Javascript in the browser environment (seven) XMLHttpRequest

    XMLHttpRequest XMLHttpRequest is a function used to create a http request. XHR initial IE through ActiveX objects are realized. After the beginning of the various browsers support. Now AJAX is the popular XMLHttpRequest object to the adoption of the imple

  • Ajax Portal

    The first test procedure: <html> <title>Full use XMLHttpRequest to load the document example </title> <head> <script type='text/javascript'> var req=null; var console=null; var READY_STATE_UNINITIALIZED=0; var READY_STATE_LOA

  • I heard good Ruby and Rails site

    1. Ruby Inside is said to be the best news station, the subscriber number 16xxx [img] http://www.rubyinside.com/simg/logo.gif "alt =" [/ img] http://www.rubyinside.com/ 2. Rails Inside is also a news station, the subscriber number of 3xxx [ ...

  • extjs development environment set up and practice

    1, download and extract the extjs 2, download eclipse and Eclipse AJAX Toolkit Framework (ATF) I have been accustomed to using eclipse as a development environment, a variety of open-source plugin so that eclipse has all-around performance, operating effi

  • ajax overtime

    ajax overtime

  • Msxml2.XMLHTTP version problem

    Projects with an import feature prototype.js of Ajax functionality to update the prompt, the code is very simple, do not have the framework of the background on a jsp to output Text, future use of timers and to update the page Ajax.request encountere ...

  • Depth understanding of the eval function in javascript

    http://wanyij.blog.51cto.com/46570/43794 In this paper, the discovery of an appropriate title is not so easy, huh, huh, so in this note under the first two purposes of this article: (1) introduction of the eval function in javascript usage (2) how to func

  • JS after ajax request return of the problem can not be implemented

    1: Send ajax request, in the onComplete, if back when the html contains a javascript, then these javascrip and will not be realized, it does not mean not to implement. This problem has troubled me for a long time, behind the hair and then put this kn ...

  • JS charts extjs implementation tools can be combined

    OpenFlashChart brief introduction by valensoft 2009-1-10 8:29:00 OpenFlashChart is an open source Flash and Javascript to the technical foundation for the free chart, using it to create some very useful analysis of the effect of the statements of the char

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries