mapViz is an IDL object so it must be started with the obj_new() command.
mapObj = obj_new('mapviz')
There are three positional parameters and some kewords that can also be specified, but this is enough to get the map going. To see the other inputs go to object creation. Entering the above line at the IDL command line will bring up the following GUI after the splash panel appears and disappears.
As you can see, nothing is displayed on the map but the cylindrical projection is set by default. Now go to the pull down
Detail Control -> Coasts (OFF)
and press it. The coastlines will immediately appear. This is one way of adding in and removing coastlines, rivers etc. from the pull down menu. Now go back to the Detail Control pull down and notice that it now says Coasts (ON). To turn it off you would just press it again and the coastlines would go away. Experiment with adding in rivers, horizons and whatever else to get comfortable with this section. NOTE: If you choose the Layer Manager do not do anything with it! We will get to it shortly.
Now turn off all the Detail Controls so that we are back to a black screen. At the command line type
mapObj->coasts ,color=1,mlinestyle=0,mlinethick=1
You will now see white coastlines (color=1) come up as solid lines (mlinestyle=0) and normal thickness (mlinethick=1 ). If you are familiar with IDL mapping you will notice that the keywords used to add coastlines are identical with the map_continents procedure. A similiar method is used to add in rivers, grids, etc. go to the methods section to see the exact syntax. Go to the Detail Control pulldown and you will notice that it will again say Coasts (ON). Whether you add in the details from the command line or the pulldown, the current status will always be shown in the pull down.
Now Go back to the pull down and add in filled continents,grid, and river IN THIS ORDER. You should have a map that looks this.
Now bring up the layer manager and you should see this.
The layer manager is used to change the attributes of the individual layers and to control the drawing order. By changing the drawing order you can make layers appear in front of or behind other layers. At this point this is not obvious at all so lets change that. Double click on the filled continents icon and this panel will appear.
Select the Solid Fill radio button and the Fill Color field will become sensitive. Click in the white color well and the color patch below will appear.
Choose the dark blue color in the lower right corner by clicking with the left mouse, hold, and drag to the color well and release. The color well will change to light blue. Now press the accept button and the map will change to this.
Now double click on the grid icon and the grid panel will appear. Change the line style to solid, the thickness to 2 and the color to green to match the picture below.
Press accept and the map will now appear as follows.
Notice that the grid lines appear above the rivers and the filled continents. What we want to do is move the grid
lines behind both of these. Go to the layer manager and click on the grid lines icon with the left mouse and drag
it to the bottom of the list and release. The order in the layer manager, from top to bottom, will now be rivers,
filled continents, and grid. The map will look like this:
As a last step we will create some data on the command line and send it to mapViz for display.
At the command line type:
lon = findgen(360)
lat = sin(findgen(360) *!DTOR) * 45.
This is will look like a sine wave over the map.
Now type this:
mapObj -> add, lat,lon,displayType='line'
The map and layer inspector will now appear as:
We could have specified linestyle, thickness, color, symbol type etc when we added this layer. Since we did not, mapViz is just going to use its default values. We could also have specified a name for this layer and that would have appeared in the Layer Inspector. As it is now, mapViz just named the first layer Layer1. When data is added to mapViz the user must tell it if the data is to be displayed as a line, trajectory, point(s), contour, or image. For more details see the methods section. Double click on the Layer1 icon and this panel will appear, change the values to match what we have below.
Press accept and drag Layer1 in the layer inspector to the bottom of the list. Now the map will look like this:
Congratulations! You have succesfully finished your introduction to mapViz.