Skip to end of metadata
Go to start of metadata

Adding Tools to a Map

  • Currently this is basically the code to a working example with lots of comments. I will try to add more explanation as time allows-Casson*

Tool Types

I do not know how global the distinction is, but in ESRI products (ArcView) they make a clear distinction between buttons and tools.

Buttons can be the equivilant of menu items. More importantly when you click on a button it does its task.

Tools on the other hand simply set up some condition when pressed. The actual work takes place when the user clicks on the map itself. The information from the click is used to carry out the tools function (i.e., zoom in on the clicked point).

This example has both buttons and tools.

  • Button Functions
    • Reset: sets the visible area to the full extent of the layers.
    • Left: moves the view to the left (West).
    • Right: moves the view to the Right (East).
    • Up: moves the view up (North).
    • Down: moves the view down (South).
  • Tool Functions
    • Zoom To Point: zooms the view and centers on clicked point.
    • Zoom Out From Point: zooms out centered on the clicked point.
    • Get Feature: returns a single feature under a user's click or zooms to the area if more than one feature is selected. The selected feature is "highlighted."

Example Code for FrameTools

  • No labels


  1. Anonymous

    where is org/opengis/referencing/Info ?

  2. Anonymous

    Use org/opengis/referencing/IdentifiedObject in place of Info, the developer changed the name of the object

  3. If you are building, and org.opengis.referencing.Info is not found, you are not picking up the opengis-legacy jar file in