Abstract | Full Paper | PDF | Printer friendly format

Page 3 of 4
| Previous | Next


Design and implementation of a web-based GIS for the Iranian Roads Information


Receiving Client side request
In order to build a custom map server application, it is important to understand the client/server transaction process. The following steps outline what happens when a client on the Internet makes a URL request to a server that hosts Kntudll.dll.

A client sends a URL over the Internet to IMS Web server. The IP (Internet Protocol) address or the domain name is used to locate the server. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng&cmd=Map&left=-180&right=180&top=90&bottom=-90&mahdoodeh=ON&city=OFF

The Web server receives the URL and passes it on to Kntudll.dll. “Scripts” is an alias on the Web server that points to the location of Kntudll.dll.
http://www.iranroads.com/scripts/Kntudll.dll?

Kntudll.dll determines which map service to communicate with to answer the request. Each argument and value pair is referred to as a query parameter. The first query parameter in the URL is used to determine which application the client wants to communicate with. The application name immediately follows the“?”. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng

Kntudll.dll then parses the remainder of the URL and passes the arguments and values to the map server application. The parsing occurs between each “&”. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng&cmd=Map&left=-180&right=180&top=90&bottom=-90&gasstation=ON&city=OFF

In the above example, the client is requesting a map (cmd =Map) with the extent defined by the left, right, top and bottom parameters and also the layers (City, gas station) that prefer to be visible.


Figure 2: Client request for shortest path

Handle Incoming Requests
In this step, a procedure is created to handle incoming requests from Kntudll.dll. Assume, the application is set up to handle URLs for a full extent map such as this one:
http://www.iranroads.com/scripts/kntudll.dll?name=IranEng&cmd=Map

In this step, code added to handle an incoming URL with map extent parameters. Consider the following URL.
http://www.iranroads.com/scripts/kntudll.dll?name=IranEng&cmd=Map&left=-180&right=0&top=90&bottom=0

Once the procedure receives these parameters, two Strings collection objects are created. To retrieve values from the collections, the special function is used. Each value is then used to define the parameter of a rectangle that will be used to set the extent of the map control. Once the extent of the map control has been set, the correct image can be sent back to the client.

Once the parameters are extracted and a rectangle is created, the value of the “cmd” argument needs to be determined. If the value is “Map”, map creator function calls HTML creator to return a new map to the client. If “cmd=Map”, but the extent parameters are not provided, a full extent map is returned. If the Left, Right, Top and Bottom values are provided, a new map at that specified extent is created. If “cmd” equals other value, other procedure is called.


Page 3 of 4
| Previous | Next |