GeoPrisma logo

GeoExtux_ZoomTo

This widget is directly taken from the GeoExt.ux eXtensions. It’s a button added to the toolbar that shows a small form in which to input X and Y coordinates and a projection. On “zoom” button click, the map recenters to the location.

Note

For each ‘projection’ option set, this widget will automatically load the according file of the same name from the proj4js library located in the $GP_ROOT/lib/client/proj4js/lib/defs/ directory.

A projection file must be named as its original name minus the semi-colons, for example : EPSG:32198 must be named EPSG32198.js.

Note

This widget should be included only once.

XML Sample

Sample configuration.

<geoextux_zoomto>
  <name>W_MyZoomTo</name>
  <options>
    <projections>
      <projection>EPSG:42304</projection>
    </projections>
    <defaultZoomLevel>10</defaultZoomLevel>
  </options>
</geoextux_zoomto>

How to ‘draw’ the widget

This widget must be drawn inside a GeoExtToolbar widget :

<geoexttoolbar>
  <name>W_MyGeoExtToolbar</name>
  <options>
    <widgets>
      <widget>W_MyZoomTo</widget>
    </widgets>
  </options>
</geoexttoolbar>

Mandatory Options

There are no mandatory options for this widget.

Note

In order for this widget to work properly, all layer widgets must have a projectionString option set.

Optional Options

projections:

Contains projection nodes.

projections/projection:
 

The projection code to add. Requires proj4js and its unique projection file (see in description above)

Note

If none is set, then EPSG:4326 and EPSG:900913 are used by default. They don’t required proj4js since they are already included in the OpenLayers library.

defaultZoomLevel:
 

(Integer) The level to zoom to when zooming. If not defined, the map gets recentered only (not zoomed).

autoHideWindowOnZoom:
 

(Boolean) Defaults to true. Hides the popup after zooming or not.

showCenter:

(Boolean) Defaults to true. Shows a + marker on center of the map after zooming or not.

useIcons:

(Boolean) Defaults to true. Whether use an icon for the button (true) or text (false).

Service Type

N/A

Widget Action

N/A

Table Of Contents

Previous topic

GeoExtux_LayerTreeBuilder

Next topic

GetMousePosition

This Page