Help For WEBGIS Version 4.0

WEBGIS Version 4.0 is an online GIS software developed by NAC Geographic Products Inc. for web publishers to publish interactive maps and GIS projects created with NACMAP Version 4.0. It has a straightforward user-interface and most features of the software can be directly figured out by users. Here is just a reference for all the features and functions of the software.

User Interface Features

There are two modes for displaying WEBGIS Version 4.0: one has frame, and the other has only the map window. The features in the following may not appear on the frameless map window.

The Title Bar

The title bar displays the title of the opened GIS project, the software name and its copyright information. It is also a hyperlink to WEBGIS home page.

The Animation Logo

The animation logo represents NAC Geographic Products Inc. and a click on it will open the home page of the company.

Back and Forward Buttons in the Normal Mode

These two buttons are similar to those of web browsers but they are for the NACMAP projects the software have browsed in the current window. A click on Back button will open the previous project in the history sequence. A click on Forward button will open the next project in the history sequence. If there has been only the current NACMAP project displayed in this window, clicks on these buttons will do nothing.

Back and Forward in the Frameless Mode

When the applet is displayed in the frameless mode, these two buttons are moved and reduced to two small buttons at the bottom left corner of the map window.

Address Box

This box is located just below the title bar and connected to the Animation logo.  It is a read-only edit box which displays the full address (URL) of the current NACMAP project the software is displaying.

List Boxes in the Normal Mode

There are three list boxes on the normal mode interface.  The left top list box (Layers) displays all the layers of the base map in the selected map store and the selected map theme if applicable. You can click an item on the list to select or deselect a layer. The selected layer will immediately appear in another list box (Selected Layers) below the list box. The deselected layer will be automatically removed from the Selected layers list box.

The Selected Layers list box is just below the Layers list box.  It lists all the selected layers from all map stores and themes of the base map. A click on an item of the list will deselect the layer and make the layer disappear on the list immediately. The layers in the Selected Layers list box are ordered so that the base map will place the first on the bottom and the last on the top of the base map. Therefore, you will can arrange the order for the map layers of the base map.

The change of the layer selection for the base map will be shown on the base map only after you click the "Get Basemap" button.

The last list box is the one below the address box.  It shows all user added map layers displayed on top of the base map.  A highlighted item will be displayed, otherwise it will be hidden. You can display as many map layers as the list has. The user layers switching on/off will be done instantly when you click the items.

List Boxes in the Frameless Mode

When the applet is displayed without the frame, the list boxes can be found on the hidden "Extra Parameters" dialog box. You can click the third button at the bottom left corner of the map window to pop up the window that has all the list boxes and other controls for you. The usage of these boxes are similar to those on the applet in the normal mode.

Get Basemap Button

This button is to retrieve the base map with the layers displayed in the Selected Layers box and with the zoom factor shown on the zoom factor edit box if the Zoom radio button is selected. The layers selection for the base map will be shown only after this button is clicked. This button is shown on the applet when the applet is in the normal mode, or on the "Extra Parameters" window when the applet is in the frameless mode.

Print Button

This button is used to print the applet through the printer. It is just beside Get Basemap button.  The whole applet including the Title bar, Logo, map and legend will be printed out if it's in the normal mode, otherwise only the map window will be printed. This button is shown on the applet when the applet is in the normal mode, or on the " Extra Parameters" window when the applet is in the frameless mode.

Choice Boxes

There are two choice boxes on the applet in the normal display mode. The first one is just below the "Get Basemap" button and called Map Store. It shows the current map store of the base map. Usually, the base map is from a map server. A map server may have several map stores. A map store may have several map themes, and a map theme may have many map layers. If there are stores listed, you can choose one from them. Then a list of map themes will be shown in the Map Theme choice box - the second choice box below the Get Basemap button.  You can choose a theme from the choice box  if applicable. When you have done that, the Layers list box will display all the map layers in the selected theme.  You can select map layers for the base map. The first selected will be on the bottom of the base map and the last selected will go to the top of the base map. In the frameless mode, these choice boxes are in the "Extra Parameters" window.

Query  and  Zoom 

There are two radio buttons below the choice boxes. The first one is for Query and the second is for Zoom. The edit box beside the Zoom radio button is for the zoom factor. If the Query button is on and if the base map can be queried, then a click on the map will pop up the web browser to display the feature information at the location. If the Zoom button is on, you can either drag a rectangle on the map to zoom in the map or click a location on the map to zoom the map with the factor in the zoom factor edit box and centered at the clicked location. If the zoom factor larger than 1.0, a click will be a zoom-in. If the zoom factor is smaller than 1.0 and larger than 0.0, a click will be a zoom-out. If the factor is 1.0, a click is a simple relocation of the map centered at the location of the mouse click.

Help Button

The Help button - a button with question mark  is located at the top of the vertical scroll bar of the map window. A click on the Help button will pop up the this Help page. 

Refresh Button

Sometimes, the map may paint incompletely because of other interruptions. You can press the button at the bottom right corner of the map window to refresh the map.

Special Areas

The interface of the software has many special areas for displaying different information. When the cursor is:
on the left edge, it will display the information of the licensee;
on the right edge, it will display the information of the licenser;
on the status bar (the black background area), it will display the hyperlink to the web page of NACMAP. Click on it will open the web page.

The Interactive Map

The scroll window of the software displays the interactive map of the NACMAP project. You can scroll the map to any positions as you want. When you move the cursor on the map, it will display the coordinates of the cursor in the screen pixels, Lon/Lat, UTM and NAC. It also displays the geomagnetic parameters (declination, inclination and intensity) of the location on the bottom left part of the software simultaneously. The software displays the legend for the background map on the bottom right side of the software.

If the location of the cursor is a hyperlink, the hyperlink will be displayed on the status bar. If you click the mouse, the web page or another NACMAP project pointed by the hyperlink will be opened on the web browser or the software itself respectively. If there is no hyperlink pointed by the cursor, the hyperlink to this help file will be shown on the status bar. If you click the mouse, you will open this help file.

Code For Embedding The Applet On Web Pages

If you want to embed the applet in the normal mode, you can use the following code:
< OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="586" height="690"  name="WEBGIS"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
	< PARAM NAME = "CODE" VALUE = "WEBGIS.class">
	< PARAM NAME = "ARCHIVE" VALUE = "WEBGISV4.jar">
	< PARAM NAME = "Filename" VALUE = "Start.nmf">
	< PARAM NAME = "Hasframe" VALUE = "true">
	< PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
	< PARAM NAME="scriptable" VALUE="true">

< COMMENT >
< EMBED type="application/x-java-applet;version=1.3" java_CODE = WEBGIS.class java_ARCHIVE = WEBGISV4.jar NAME = WEBGIS WIDTH = 586 HEIGHT = 690  Filename = "Start.nmf" Hasframe = "true" Width = "586" Height = "690"  pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html" > < NOEMBED > < /COMMENT >

< /NOEMBED > < /EMBED >
< /OBJECT>
If you want to embed the applet in the frameless mode, you should use the following code:
< OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    width="578" height="390"  name="WEBGIS"
    codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
	< PARAM NAME = "CODE" VALUE = "WEBGIS.class">
	< PARAM NAME = "CODEBASE" VALUE = "/test">
	< PARAM NAME = "ARCHIVE" VALUE = "WEBGIS.jar">
	< PARAM NAME = "Filename" VALUE = "Start.nmf">
	< PARAM NAME = "Hasframe" VALUE = "false">
	< PARAM NAME = "Width" VALUE = "578">
	< PARAM NAME = "Height" VALUE = "390">
	< PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
	< PARAM NAME="scriptable" VALUE="true">

< COMMENT >
< EMBED type="application/x-java-applet;version=1.3" java_CODE = WEBGIS.class java_ARCHIVE = WEBGISV4.jar NAME = WEBGIS WIDTH = 578 HEIGHT = 390  Filename = "Start.nmf" Hasframe = "false" Width = "578" Height = "390"  pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html" > < NOEMBED > < /COMMENT >

< /NOEMBED > < /EMBED >
< /OBJECT>
The above width and height make the applet have the same size map window as the one of NACMAP. If you like, you can set any values for the width and height of the applet.

When you embed the applet onto your web pages, you can place WEBGIS.jar, Wmm-2000.cof, WEBGISV4.lic files into one directory (for example, WEBGIS directory) in your web site, save all image files in images subdirectory in WEBGIS directory, and save all the nmf, map and legend files as well as map layer files (*.udf) in the project directory in the same web site.

 

APIs

The Java applet supports the following API functions that Java/VB scripts can call and control the applet:

void openURL(String url)

This API is for Java/VB scripts to open a new NACMAP file (.nmf) in the applet. Parameter url is the URL of the NACMAP file.

 

void Draw(int n, double x, double y, String symbol, boolean refresh)

This API is for tracking a moving object and displaying it on the map. If parameter n = -2, then x and y are screen coordinates. If n = -1, then x and y are decimal longitude and latitude respectively. If n > 0, then n, x and y are the zone number, easting and northing of UTM coordinates in unit of meter. Parameter symbol is the filename of the symbol. If the symbol file (.gif or .jpg) is in the images directory of the applet, then only the filename is required with extension (.gif or .jpg), otherwise the full path is required. Parameter refresh is to decide whether the screen should be repainted or not before the symbol is drawn.

void DrawNAC(String NAC, String symbol)

This API is to draw a symbol with NAC on the map. If you know the NAC of a house for example, you can simply use the NAC as the coordinates to draw a symbol on the map.

Since the function draws a symbol at a time, it can be used to draw as many traces as you want by calling the API multiple times for each time step with appropriate control of repaint of the map. For example, you can draw the locations of two vehicles that the first call of the API repaints the map and the second call does not repaint. The two vehicles can be represented by two different symbols. If you don't repaint for all the calls, then the traces of the moving objects will be shown on the map.

void repaint()

This fuction is to repaint the map and all its map layers. If some map layers are generated by CGI/ASP scripts and the queries include random number or changed automatic ranges, then each repaint will retrieve data from the server again with gurantteed fresh data (not from the cache). The rules for such queries are that the queries have to include: The stars in the queries will be replaced by the corresponding data when the applet sends them out. For dynamic map layers, the CGI/ASP queries must end with ".udf" or ".UDF" and the replies of the queries must strictly follow the format of NACMAP User Data File without any html tags.

These rules for dynamic data can also be used for hyperlinks which will be sent by clicking on the map. For example, if you want the applet to draw a symbol at the location of the cursor after a click on the mouse, you can use a query that includes the dynamic coordinates of the cursor (lon=*&lat=* or zone=*&easting=*&northing=*) and use a CGI/ASP script file to update/create the coordinates for a symbol in the database. Then, to refresh the map, you will see the symbol at the new location on the map.

int getLayerNum()

This function will return the number of the layers of the User Data  in the current GIS project.

String getLayerName(int layerNum)

This function will return the layer name of the User Data at layer number layerNum.

void SwitchLayer(int layerNum, boolean on, boolean refresh)

This function is to switch on/off a specified map layer of the User Data in the current GIS project. If on = true, layer at layerNum will be displayed; if on = false, then layer layerNum will be turned off. If refresh = true, then the map will be repaint; if refresh = false, then there will be no immediate repaint. The refresh flag makes multiple switch on/off calls more efficient because it can refresh only once in the last call in a series of subsequent calls of this function.

void SetRange(double lon, double lat, double width, double height)

This function is to reset the ranges for the map, where lon and lat are the center longitude and latitude of the new map, width and height are the width and height of the new map. All these are in decimal degrees. 

void SetCity(String City, String State)

This function is to reset the ranges for the map to the area of the city, where City and State are the city name and state name of the city. The function actually only for the United States.

void SetNAC(String nac)

This function is to reset the ranges for the map. The function will set the range of the map to the NAC.

void SetZIP(String zip)

The function will set the range of the map to the area of a ZIP code of the United States.

void SetSize(int width, int height)

This function is to reset the scroll window size of the map. Both parameters are in pixels. 

 

Tech Support

If you have any questions about NACMAP or WEBGIS, you can find the answers from this help file and NACMAP web page probably. If they don't solve the problems, you can send email to info@nacgeo.com.


Enjoy Using WEBGIS!

Click Here!