Design and Implementation of WEBGPS System Based on MapXtreme, Wang Zhong, Liu Dan Sichuan University School of Communication Engineering, Chengdu 610065, China
Abstract: WebGPS is a web-based vehicle management system that provides a means of remote access from the web and displays the current driving position of the vehicle in real time. Building a webgps system must have a platform for providing a map application service. The model of the entire system is analyzed, comparing a variety of map service platforms, pointing out the advantages of MapXtreme for Java as the map server, and finally explains the development method and functional implementation of the MapXtreme system. Keywords: mapXtreme; browser / server; client / server map method Category: TP311.13 Document ID: A Article ID: 1001-3695 (2004) 05-0109-02
With the emergence of GPS positioning techniques, and the maturity of GIS and communication technology, transportation high work has entered a new stage of real-time management of computer-aided support. The GIS geographic information system not only manages data, text information, and graphics, but also in space time as research objects, with computer as tools, pay different sources, different types of data and related confession information for organic combination, analyzes inquiry, and implement computer Information processing is an effective technical system for integrated and analyzing spatial data. The Western is mainly based on the design and implementation of the WebGPS system of the MapXtreme For Java Geographical Software Platform [1, 2, 4]. 1. System Model Select Currently, GPS information has two main methods in the online: C / S mode and B / S mode. (1) Compared to the C / S mode, the B / S mode mainly has the following advantages: 1 It simplifies the client and only needs to install the universal browser software. This can save not only the client's hard disk space and memory, but also make the installation process easier. 2b / s is particularly suitable for online information release. B / S software often uses Microsoft's exclusive supported ActiveX technology to solve the interactive difference in browser and HTML pages. 3 Browser / Web Services cross-system, cross-platform capabilities, allowing it to use a variety of different systems, such as PC, MAC, and UNIX workstations in a public mutually mutually mutually mutually mutually mutually mutual mutual mutation such that they can coexist. (2) Compared with the B / S mode, interactive is strong is an advantage inherent in C / S. Although B / S provides a certain interaction capability by JavaScript, VBScript, it is too limited compared to a set of customers of C / S. Second, use C / S mode will reduce network traffic. B / S uses a logical three-layer structure, and C / S has only two layers of structure, and the network traffic only includes traffic between the client and the server, so the ability of the C / S handling a lot of information is B / S incomparable. (3) Comprehensive conclusions: The renovation system uses a mixed architecture that is mainly based on Browser / Server mode, and the client / Server mode is a mixed architecture. Among them, B / S is used to query and browse because the B / S mode has a wide range of information publishing capabilities. It does not limit the number of users at the front end, and the client only needs a normal browser, and there is no need for any other special software; there is no special requirement for the network. The C / S mode is mainly used for data maintenance, and also has the same query function as the B / S mode, as the C / S mode has good interactivity, which is not available in the B / S mode. 2. The choice of the map service platform builds a WebGPS system, there must be a platform that provides a map application service, select MapInfo's MapXtreme for Java as a map server, mainly based on the following reasons: (1) MapXtremeJava is three-layer structure, Includes clients, client / servers, and servers. In MapXtreme's working mode, all map data and applications are placed on the server side, and the client only proposes a request, all responses are completed on the server, just need to maintain system maintenance on the server, the client does not need any Maintenance, greatly reduces the workload of the system. Because of the use of B / S, not only meet the needs of the present points, but the number of users will increase arbitrarily. The modification update to the data can be handled by the server side, and can be reported by the C / S structural transmission after each split modification. (2) MapXtremeJava compared to other geographic service platforms (such as MAPX), it is the least requirement of the client, and only the guests of Java can be browsed and queried by providing Java browsers. MapXtreme can not only compete for the B / S wide area network architecture, but also support C / S architecture, and after comparison, under these two structures, the system's running speed is not as large.
(3) MapXtremeJava is a 100% Java product with a good cross-platform feature that publishes applications and data on different computers in different platforms (such as UNIX, Linux, Windows platforms). In addition, MapXtremeJava is scalable, which provides a guarantee for continuous expansion applications based on components design, reliability, and multi-threading. (4) Using MapXtremejava, developers can centrally control and maintain maps and database data, and focus on implementing application functions, avoiding the maintenance of the previous system, synchronous difficulties, especially suitable for information, and more users. Happening. (5) Use the MapXtremejava platform to issue networks to the database, while using the Web Publishing Server and Database Server. In this way, both network security is also convenient for maintenance of the database. 3. Development method of MapXtremeJava [3] (1) Initialize the map object execution: mymap = new mapj (). (2) Loading the map data MAPXTREME does not have the default map data, so you must manually load the map data, you can open the Geoset (*. GST) or MAPDEFINITION (*. MDF) file to load the map data. 1 Load Geoseet: MyMap.Loadgeoset (GeoseetName, DataDir, servletURL). Among them, geoseetname: GeosetName: Geoset full file name (including path); DataDir: The location of the TAB map file referenced in Geoset; servletURL: MapXtremeServlet path, if Mapj uses LocalDataProviderRef, servletURL can be NULL. 2 Load MAPDefinition first load the map definition record in the database and create MapDefContainer, such as MapDefContainer MDC = New JDBCMAPDefContainer (Driver, URL, User, Password). Among them, Driver, URL, USER, and Password are parameters for database connections. (3) Set the map size before setting the map image, setting the map size, setting method is: mapj.setDeviceBounds (), such as MyMap.SetDeviceBounds (New DoubleRect (0,0,800,600)). ① MapXtremeServlet specified address String mapxtremeServletUrl = http: // localhost: 8080 / mapxtreme40 / servlet / mapxtreme; ② create ImageRequestComposer imageRC = imageRequestComposer.create (myMap, 256, Color.green, "image / gif"); 256 represents a picture Colored gif graph for color background. ③ create ImageRender MapXtremeImageRender renderer = new MapXtremeImageRenderer (mpaxtremeServletURL); ④ generate picture Renderer.render (imageRc); Renderer.toImage ( "comp.gif"); (5) ① map view map display setting (Zoom) Zoom value map Transverse spans, units determined by the map of the map. Set zoom to zoom in, narrow the map. When the map is loaded, the ZOOM value is set.
With MyMap.Setzoom (100), the horizontal span of the map can be set to 100 kilometers (if the current unit is kilometers). 2 Map Center Setting the map center positions on the found target or positions the center to a point on the mouse click. The following procedure implements a point where the map center is positioned in the mouse click: // Create the Point object of the screen coordinates ScreenPoint = new doublepoint (Event.getx (), event.gety ()); // Convert screen coordinates to geographic coordinates Worldpoint = mymap.transformscreenTonumeric (screenpoint); // Sets the map center mymap.setcenter (3 Map Eagle Eagle Eagle window and map main window) use an Applet container to place map object Mapj. Create two MapJ objects, and session.putValue ("mapinfo.mapj", mymap; useful: mapj mymap = ("mapinfo.mapj"). In this way, the two MAPJ can be controlled different zoom and centers. Because the eagle eye and the main map is a connection relationship, and the eagle is not using a fixed field of view, so the eagle eye object background needs to reinitialize a mapj object and use the simple version of the GST or MDF map collection. The functions are as follows: 1Mainapplet on map operation → Mapj Rendering Return New Image Address → Mainapplet Capture New Picture Refresh Command Heavy Picture → OverViewApplet Auto Refresh. Map Operation on 2OverViewApplet → MainApplet Heavy Pictures → Main Mapj Rendering Return New Image Address → MainApplet Capture New Image Refresh Command Heavy Picture → OverViewApplet Auto Refresh. In addition, the map operation on the mainapplet is only enlarged, narrowed, and the translation can cause the eagle eye map to refresh, other maps will not cause the eagle eye map to refresh. 4. MapXtreme Application Implementation WebGPS Vehicle Monitoring Management System, is a networked GPS geographic information system that combines vector maps and attribute relational databases. In MapXtreme's working mode, all map data and applications are placed on the server side, and the client only makes a request, all responses are completed in the server side, just need to maintain system maintenance on the server, the client does not have any Maintenance, greatly reduces the workload of the system. The following features are implemented by running MapXtreme in the background server side, responding to the Internet user's access request for spatial information and attribute information associated with graphics: (1) Use the browser to browse the map picture and can perform various map operations (zoom , Narrow, roaming, layer control, etc.); (2) Geographic information (GIS) query, such as place name, street, enterprises, etc .; (3) online query and tracking monitoring of vehicle positions, users enter the vehicle terminal number, Remove the latest location and time information from the database, display it with the selected icon on the map, and display the file information, time, and the streets of the vehicle in the vehicle information column; (4) Vehicles and owners Information query, trajectory playback; (5) The management and scheduling of the fleet, authorized users can group, naming, naming, separately, and separates, add new vehicles or reduced, delete groups, etc.). Graphical information and related data query results are shown in Figure 1. (图 略) 5. The development and establishment of the WEBGPS vehicle monitoring management system is the trend of urban transportation in the 21st century.
As an important part of implementing WebGPS - the study of map server MapXtreme will be applied in more and more applications. Reference: [1] 邬 邬, Zhang Jing, etc. Research on System Structure Based on WebGIS [J]. Geography and Land Research, 2001,17 (4): 20-24 [2] Yu Shi Xiao, Chen Jun, etc. Research on Vehicle Navigation Monitoring System Based on GPS [J]. Traffic and Computer, 2001, (5) [3] MapInfo MapXtreme For Java Development Guide [EB / OL] .http://www.mapinfo.com [4] Zhang Guangying, Zhang Guangyu, etc. Application of Geographic Information System in Intelligent Transportation [J]. Automation Technology and Applications, 2001, (2): 30-33
About the author: Yuan Tao Ying (1981-), female, master student, main research field is a distributed computer system, GPS technology; Wang Zhong (1964-), male, master tutor, Ph.D., main research field is GPS theory and technology, GIS technology, 4G mobile communication key technology, medical image processing, deepening science, has published more than 50 scientific research papers.