Skip to content

Scripting Anchor Points

Andreas W. Bartels edited this page Nov 21, 2017 · 3 revisions

Initialization

Configuration

  <initializer>
    <script:language>GROOVY</script:language>
    <script:groovyScript>
        <script:uri>LoadMap.groovy</script:uri>
    </script:groovyScript>
  </initializer>

Groovy Binding

  • facade

Java Injection

  • IFacade

Closing

Configuration

  <closer>
    <script:language>GROOVY</script:language>
    <script:groovyScript>
        <script:uri>WriteMap.groovy</script:uri>
    </script:groovyScript>
  </closer>

Groovy Binding

  • facade

Java Injection

  • IFacade

Mode

Configuration

  <modes>
    <mode>
        <name>FOO</name>
        <description>Foo and so on</description>
        <icon>net/anwiba/script/icons/misc.png</icon>
        <initializer>
          :
        </initializer>
        <script>
          :
        </script>
        <closer>
          :
        </closer>
    </mode>
  </modes>

Groovy Binding

  • coordinate
  • coordinateReferenceSystem
  • buttonNumber
  • clickCount
  • geometryReceiver
  • facade

Java Injection

  • ICoordinate
  • ICoordinateReferenceSystem
  • IGeometryReceiver
  • IFacade

Toolbar

Configuration

  <toolbar>
    <toolbaritem>
        <menu:name>Load Backup</menu:name>
        <menu:icon>net/anwiba/script/icons/misc.png</menu:icon>
        <menu:tooltip>&lt;html&gt;Load Backup&lt;br&gt;(Scripting Example)&lt;/html&gt;</menu:tooltip>
        <script:script>
          :
        </script:script>
    </toolbaritem>
    <toolbaritem>
        :
    </toolbaritem>
  <toolbar>

Groovy Binding

  • monitor
  • canceler
  • facade

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade

Menu

Configuration

  <menu:menus>
    <menu:menu>
        <menu:name>Scripting</menu:name>
        <menu:submenu>
          <menu:name>Deutschland</menu:name>
          <menu:menuitem>
            <menu:name>Deutschland</menu:name>
            <script:script>
                :
            </script:script>
          </menu:menuitem>
            :
        <menu:submenu>
          :
        <menu:menuitem>
          <menu:name>Create Polygons</menu:name>
          <script:script>
            :
          </script:script>
        </menu:menuitem>
        :
    <menu:menu>
        :
  <menu:menus>

Groovy Binding

  • monitor
  • canceler
  • facade

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade

Popup Menus

Configuration

    <popup:popup>
        <popup:type>{Anchor Point}</popup:type>
        <popup:menuitem>
          <popup:name>Map Popup Script (groovy)</popup:name>
          <popup:applicable>
            <popup:script>
                :
            </popup:script>
          </popup:applicable>
          <script:script>
            :
          </script:script>
        </popup:menuitem>
        <popup:menuitem>
          <popup:name>Map Popup Script (java)</popup:name>
          <script:script>
            :
          </script:script>
        </popup:menuitem>
    </popup:popup>
  </popup:popups>

Groovy Binding

  • monitor
  • canceler
  • facade

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade

Map Popup Menu

Configuration

    <popup:popup>
        <popup:type>Map</popup:type>
        <popup:menuitem>
           :
        </popup:menuitem>
         :
    </popup:popup>

Groovy Binding

  • monitor
  • canceler
  • facade

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade

Legend Popup Menu

Configuration

    <popup:popup>
        <popup:type>Layer</popup:type>
        <popup:menuitem>
           :
        </popup:menuitem>
         :
    </popup:popup>

Groovy Binding

  • monitor
  • canceler
  • facade

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade

Layer Manager Popup Menu

Configuration

    <popup:popup>
        <popup:type>LAYER_MANAGER</popup:type>
        <popup:menuitem>
           :
        </popup:menuitem>
         :
    </popup:popup>

Groovy Binding

  • monitor
  • canceler
  • facade
  • path
  • dataStoreReference
  • layerReference

Java Injection

  • IMessageCollector
  • ICanceler
  • IFacade
  • IDataStoreReference
  • ILayerReference