Tour API Demos Download Tests
Aperture version 1.0
Generated by: JsDoc Toolkit 2.4.0

Class aperture.geo.Map

A map vizlet is capable of showing geographic and geographically located data. It contains a base map and additional child geo layers can be added. The base map is typically configured as a system-wide default, although can be overridden via the spec object passed into this constructor. This layer does not require or support any mapped properties.

Class Summary
Constructor Attributes Constructor Name and Description
 
aperture.geo.Map(spec, mappings)

Method Summary

Class Detail

aperture.geo.Map(spec, mappings)
Parameters:
{Object|String|Element} spec
A specification object detailing options for the map construction, or a string specifying the id of the DOM element container for the vizlet, or a DOM element itself. A specification object, if provided, includes optional creation options for the map layer. These options can include base map configuration, map projection settings, zoom level and visible area restrictions, and initial visible bounds. Other than an id, the following options do not need to be included if they are already configured via the aperture.config system.
{String|Element} spec.id
If the spec parameter is an object, a string specifying the id of the DOM element container for the vizlet or a DOM element itself.
{Object} spec.options Optional
Object containing options to pass directly to the Openlayers map.
{String} spec.options.projection Optional
A string containing the EPSG projection code for the projection that should be used for the map.
{String} spec.options.displayProjection Optional
A string containing the EPSG projection code for the projection that should be used for displaying map data to the user, for example mouse hover coordinate overlays.
{String} spec.options.units Optional
The units used by the projection set above
{Array} spec.options.maxExtent Optional
A four-element array containing the maximum allowed extent (expressed in units of projection specified above) of the map given the limits of the projection.
{Object} spec.baseLayer Optional
Object containing information about the base map layer that should be created.
{Object} spec.baseLayer.{TYPE}
The base layer specification where {TYPE} is the class of MapTileLayer (e.g. TMS) and its value is the specification for it.
{Object} mappings Optional
An optional initial set of property mappings.

Method Detail

  • getZoom()
    Returns the zoom level as an integer.
  • setExtents(left, top, right, bottom)
    Sets visible extents of the map in lat/lon (regardless of current coordinate system)
    Parameters:
    left
    left longitude of extent
    top
    top latitude of extent
    right
    right longitude of extent
    bottom
    bottom latitude of extent
  • zoomIn()
    Zooms in one zoom level, keeps center the same.
  • zoomOut()
    Zooms out one zoom level, keeps center the same (if possible).
  • zoomTo(lat, lon, zoom)
    Sets the map extents give a center point in lon/lat and a zoom level Always accepts center as lon/lat, regardless of map's projection
    Parameters:
    lat
    latitude to zoom to
    lon
    longitude to zoom to
    zoom
    zoom level (map setup dependent)
  • zoomToMaxExtent()
    Zooms to the max extent of the map.