< Layers

Image Format Options  >

7. Navigation

The plugin location is the core plugin that deals with geographic navigation on the map. It handles bboxes (visible areas) and scales; it drives the tools zoom-in, zoom-out and panning, the directional arrows around the main map and the overview map.

The corresponding configuration files are location.ini (client-side) and location.ini (server-side).

7.1. Client-side Configuration

Here are the options that can be set:

  • scalesActive: boolean, if true, the scales dropdown list is displayed (default: false). If no visible scales are defined on the server, a simple input text will be displayed.
  • freeScaleActive: boolean, if true, the free scales input is displayed (default: false). This allow the user to freely set a scale value that is different from the predefined scales. There are a few conditions for this to work:
    • scalesActive must be activated (see above).
    • scaleModeDiscrete must be deactivated (false) (see Server-side Configuration).
    • location.js must be loaded.
    • prototype.js must be loaded (by default if ajax is on).
  • recenterActive: boolean, if true, the coords recentering form is displayed (default: false)
  • idRecenterActive: boolean, if true, the id recentering fields will be displayed (default: false)
  • idRecenterLayers the comma separated list of layers which will appear in the id recentering selection form. If this list is absent, all msLayers appear in the form.
  • shortcutsActive: boolean, if true, the shortcuts (direct access dropdown list) are displayed (default: false)
  • scaleUnitLimit: scale above which DHTML measures use km ; below, they use m.
  • panRatio: ratio for panning by clicking directional arrows. Default is 1 (no overlap, no gap). Values below 1 result in an overlap of the old and the new maps; values above 1 in a gap between these two maps.
  • weightZoomin: integer defining display order of the zoomin tool icon in toolbar (if not specified, default to 10). A negative weight disables the tool.

    Note

    Zoomin is the default tool and it will be activated automaticaly. If you want to deactivate it, you need to set another default tool. See initialTool in Section 4.2, “ client.ini.

  • weightZoomout: see weightZoomin (default to 11)
  • weightPan: see weightZoomin (default to 12)
  • weightFullextent: see weightZoomin (default to 14)
  • crosshairSymbol: (integer) numerical id of symbol to use to materialize recentering point (see your symbolset file)
  • crosshairSymbolSize: integer defining the size used to display the recentering crosshair symbol.
  • crosshairSymbolColor: RGB code (comma-separated list of integers) of the crosshair color.
  • showRefMarks: if true, will add reference marks to the main map. Reference marks configuration is set on server.

7.2. Server-side Configuration

Here are the options that can be set:

  • minScale: if set, minimal scale allowed.
  • maxScale: if set, maximal scale allowed
  • scaleModeDiscrete: boolean, if true, only specified scales (see below) can be set.
  • zoomFactor: the zoom factor to use whan scaleModeDiscrete is set to false.
  • noBboxAdjusting: If set to true, all data contained in the initial extent (mapfile) is visible on the full extent (first) map. This case is the default mapserver behavior. If set to false (default), the user won't be able to see anything outside the initial extent, even on full extent map.
  • scales.#.value (# = 0, 1, 2, ...): available value of the scale in discrete mode.
  • scales.#.label (# = 0, 1, 2, ...): label of the scale, to be displayed in the dropdown list on the client.
  • scales.#.visible (# = 0, 1, 2, ...): boolean, if true, the scale is displayed in the dropdown list. If false, this scale can only be selected by zoom-in/zoom-out. Default is true.
  • shortcuts.#.label (# = 0, 1, 2, ...): label of the shortcut; appears in the direct access dropdown list on the client.
  • shortcuts.#.bbox (# = 0, 1, 2, ...): geographic bbox of the shortcut.
  • recenterMargin: margin to add around the centered-on object (valid for lines and polygons). Expressed in percent of the width/height of the object. If not set, recenterDefaultScale is used.
  • recenterDefaultScale: fixed scale to use when recentering. Mandatory when centered-on object is a point.
  • refMarksSymbol: symbol used to draw lines for reference marks (typically an ellipse).
  • refMarksSymbolSize: size in pixel of symbol used to draw lines for reference marks (typically 1 or 2).
  • refMarksSize: size of reference marks. Size is fixed and won't change with scale.
  • refMarksColor: color of reference marks (comma-separated R, G and B values).
  • refMarksTransparency: transparency of reference marks.
  • refMarksOrigin: origin for reference marks (comma-separated X and Y values, typically "0, 0").
  • refMarksInterval.#.maxScale: maximum scale for corresponding interval.
  • refMarksInterval.#.interval: real interval between two reference marks (comma-separated X and Y values).
  • refLinesActive: if true, will display reference marks on page borders.
  • refLinesSize: size in pixel of reference marks on page borders.
  • refLinesFontSize: size of font for reference marks on page borders.
  • scaleUnitLimit: scale above which the scalebar use km ; below, m is used.

7.3. Related Elements Elsewhere

The maximal extent of the geographical zone is set by the EXTENT command in the mapfile.

The initial bbox is set by the active initialMapState. It is to be configured in the myMap.ini file, using the following syntax:

mapInfo.initialMapStates.initialMapStateId.location.bbox = "xmin,ymin,xmax,ymax"

valid xhtml 1.0 valid css