OpenSpace.Layer.Boundary

Instances of OpenSpace.Layer.Boundary are used to display boundary data that scrolls and zooms with the map.  The boundaries can be styled.

Inherits

  • <OpenLayers.Layer.Vector>

Example

The following example shows how to generate a boundary layer with some options:

// Build the options for this layer. Also see examples
var options = {
  strategies: [new OpenSpace.Strategy.BBOX()],
  area_code: area_codes,
  census_code: census_codes,
  name: name,
  geometry: geometryRequired,
  max_features: maxFeatures,
  area_code: area_codes,
  styleMap: styleMap
};

boundaryLayer = new OpenSpace.Layer.Boundary("Boundaries", options);
Summary
OpenSpace.Layer.BoundaryInstances of OpenSpace.Layer.Boundary are used to display boundary data that scrolls and zooms with the map.
Constants
areaCodeLookup{Object} A lookup table from a given map resolution (in metres per pixel) to the corresponding boundary area codes that are permissable for that map zoom level
resolutionLookup{Object} A lookup table from a given map resolution (in metres per pixel) to the corresponding boundary generalisation resolution (in metres)
Properties
area_code{Array(String)} List of area code types required for this layer
census_code{Array(String)} List of census code types required for this layer
Constructor
OpenSpace.Layer.BoundaryConstructor for a new OpenSpace.Layer.Boundary instance.
Functions
destroyDestroy this overlay layer.
getAreaCodeListDetermine the appropriate list of area codes to send to the server.
getCensusCodeListDetermine the appropriate list of census codes to send to the server.
getAdminUnitIdListDetermine the appropriate list of admin unit ids to send to the server.
getNameReturn the boundary name search parameter.
getGeometryRequiredReturn if geometry is required.
addToListAdd strings to a comma separated list.
getResolutionDetermine the appropriate boundary resolution from the map’s zoom level.

Constants

areaCodeLookup

{Object} A lookup table from a given map resolution (in metres per pixel) to the corresponding boundary area codes that are permissable for that map zoom level

resolutionLookup

{Object} A lookup table from a given map resolution (in metres per pixel) to the corresponding boundary generalisation resolution (in metres)

Properties

area_code

{Array(String)} List of area code types required for this layer

census_code

{Array(String)} List of census code types required for this layer

Constructor

OpenSpace.Layer.Boundary

Constructor for a new OpenSpace.Layer.Boundary instance.

Parameters

name{String}
options{Object} Optional object with properties to set for the type of boundaries required.

Functions

destroy

destroy: function()

Destroy this overlay layer.

getAreaCodeList

getAreaCodeList: function()

Determine the appropriate list of area codes to send to the server.  Array of area codes

getCensusCodeList

getCensusCodeList: function()

Determine the appropriate list of census codes to send to the server.

getAdminUnitIdList

getAdminUnitIdList: function(new_admin_unit_ids)

Determine the appropriate list of admin unit ids to send to the server.

getName

getName: function()

Return the boundary name search parameter.

getGeometryRequired

getGeometryRequired: function()

Return if geometry is required.

addToList

addToList: function(list,
s)

Add strings to a comma separated list.

getResolution

getResolution: function()

Determine the appropriate boundary resolution from the map’s zoom level.

destroy: function()
Destroy this overlay layer.
getAreaCodeList: function()
Determine the appropriate list of area codes to send to the server.
getCensusCodeList: function()
Determine the appropriate list of census codes to send to the server.
getAdminUnitIdList: function(new_admin_unit_ids)
Determine the appropriate list of admin unit ids to send to the server.
getName: function()
Return the boundary name search parameter.
getGeometryRequired: function()
Return if geometry is required.
addToList: function(list,
s)
Add strings to a comma separated list.
getResolution: function()
Determine the appropriate boundary resolution from the map’s zoom level.
Close