Introduction
Do not know when to start, the map application has been so popular, based on the WEB application of a variety of maps. The most famous is Google Map, Yahoo map, Bing map, and so on, with the highest usage of Google Maps, it is easy to use, contains rich content, and has a good user experience. At the same time, map applications are widely used in desktop applications, people are trying to develop new applications based on desktop maps, using a more common GIS (geographic information System), but the GIS compared with Google Map's simple and easy to use, informative, or a certain difference From. As a result, many people want to integrate the Google map into their desktop applications, allowing desktop controls to interact with Google Map for data. This article will be based on SWT (Standard Widget Toolkit) desktop technology, integrated Google Map, the desktop version of the Google Map SWT control.
The article first shows the use of the developed Google Map control to give readers a general impression of the target program, followed by a brief introduction of the important Browser control, and the implementation of the Google Map control based on the Browser control, including the issues to be addressed, The steps of implementing the control, and finally doing a simple summary, tell the reader the advantages of such a design control.
Example Show
To give the reader a better understanding of the purpose of the article, first demonstrate the use of the Google map control that was developed, as shown in Figure 1. Note that the operation of the Google Map control is the Java code, just opened the map is the most original Google map.
Figure 1. Effect Show
In Figure 1, the left half is the Google map control part, any click on the map, you can add tags at the click, the right half of the function button, provides a set center point, add tags, open the prompt window, painting line these functions.
In the example, the data form is delimited by, (comma), the function of each button and data request the following table.
Table 1. Examples use
Function |
Data requirements |
Set Center point |
Longitude, latitude |
Set markup |
Longitude, latitude |
Pop-up information |
Longitude, latitude, pop-up information |
Painting Straight Line |
Starting point longitude, starting point latitude, end longitude, endpoint latitude, color, thickness |