Home
Categories
Dictionnary
Download
Project Details
Changes Log
Who We Are
FAQ
License

Using the MapClient Plugin


    1  Configuration file
    2  Start the Client
    3  Connect the Client
    4  Start the associated Server
    5  Go to the Maps tab in the Client window
    6  Send a MapItems Buffer to the Server
       6.1  Adding the SymbolGeneric MapItem
       6.2  Adding the LineStart and LineSegment MapItems
       6.3  Send a Buffer
    7  Notes

This tutorial explains how to use the MapClient Plugin. As for the Client tutorial, we will use existing files in the "config" and "samples" directories of the J661 project binary release.

Configuration file

We will use the arincWindowJFX.properties properties File which is in the "config" directory:
      graphics=DefGraphics.xml
      ui=LookAndFeel.xml
      pictures=DefPictures.xml
      lf=JavaFX
      supplement=5
      warnForUndefAttrs=false
      serverInputPort=8080
      serverOutputPort=8081
      serverInputSize=50000
      serverOutputSize=200
      server.autoVisible=true
      logServerArea=true
      windowManager=windows
      server.windows=../sampleFiles/simpleWindowMapHorz.xml
      server.computeLayerSize=false
      server.superLayer=true
      server.menus=true
      server.uiCombo=true
      logMaximumLines=10
      maximumQueueSize=50
      extensions=jfxMaps.jar

.
As for the CLient tutorial, the major characteristics of this configuration are explained in the Server tutorial. Note that concerning the communication:

Start the Client

We will use the Client launcher exactly as for the Client tutorial:

      java −jar arincClient.jar

As the configuration file is not defined here, the Client will ask for it. Look for the arincWindowJFX.properties properties File which is in the "config" directory.
After setting the configuration file, the Client will ask for Additional Definition Files (SuperLayer). It is because the cockpit configuration defines a SuperLayer cockpit:

      windowManager=windows
      server.windows=../sampleFiles/simpleWindowMapHorz.xml
      server.superLayer=true

In this case the Client will ask for an additional SuperLayer Definition File to be able to change the cockpit configuration at runtime. As we won't use this capability in this tutorial (and keep a fixed cockpit configuration), we will just type cancel in the dialog box.
One window will appear:

Connect the Client

You can connect the client by clicking on the "Connect" button.

Start the associated Server

We will use the start the Server exactly as for the Client tutorial:

      java −jar jfxServer.jar
As the configuration file is not defined here, the Server will ask for it. Look for the arincWindowMapHorzJFX.properties properties File which is in the "config" directory. Two windows will appear:
The Server Display Window:



The Server console Window:


Note that the Server is automatically connected at start.

Go to the Maps tab in the Client window

Sending MapItems is performed in the Maps tab in the Client Window. We have the following content in this tab:


The tab shows the list of A661_MAPHORZ_ITEMLIST widgets in the display configuration, and for each MapItemList widget the list of the associated MapItems. In this case we have only one MapItemList widget in the configuration, and the list of MapItems is initially empty[1] .

Send a MapItems Buffer to the Server

We will add a SymbolGeneric, and a Line. To to that, we will:

Adding the SymbolGeneric MapItem

Click on the Add Item button, and change the value of the MapItem to A661_SYMBOL_GENERIC. Change the SymbolType from the 0 default value to 1.

Adding the LineStart and LineSegment MapItems

Click on the Add Item button, and change the value of the MapItem to A661_LINE_START. Then click on the Add Item button again, and change the value of the MapItem to A661_LINE_SEGMENT. For the last MapItem, change the following properties:

Send a Buffer

We now have the following Client window:


Click on the Send button, we will see the following result:

Notes

  1. Remember that the list of MapItems is only updated at runtime, so it is normal to have an empty list after the initialisation

See Also


Category: maps Category: tutorials Category: client Category: user

Copyright 2016 Dassault Aviation. All Rights Reserved. Documentation and source under the GPL v2 licence

Project Web Hosted by SourceForge.net Copyright 1999-2010 - Geeknet, Inc., All Rights Reserved About - Legal - Help