Constructor
new MapDesign()
A class to mediate between the different patterns and handle their objects.
- Source:
Methods
classify(source, propertyKeyName, method, numberOfClasses, mapType)
Classifies numerical data
Parameters:
Name | Type | Description |
---|---|---|
source |
ol.source | Specifies the source |
propertyKeyName |
string | Specifies the name of the property key name |
method |
string | Specifies the method to be used |
numberOfClasses |
number | Specifies the number of classes |
mapType |
number | Specifies the type of map |
- Source:
createFeatureLayer()
Creates a point feature layer and adds it to the page 2 maps
- Source:
createMapElements()
Creates map elements by utilising the builder pattern. Elements created include map heading, map legend, and meta data.
- Source:
createSymbolLayer()
Creates a symbol layer.
- Source:
createVectorSource(typeName)
Requests a geojson feature object from geoserver and creates a point vector source.
Parameters:
Name | Type | Description |
---|---|---|
typeName |
string | The type name |
- Source:
createWardLayer()
Creates a boundaries layer.
- Source:
generateColorSchemes(classCount, schemeToGenerate)
Generates different color schemes based on the paramaters
Parameters:
Name | Type | Description |
---|---|---|
classCount |
number | The number of classes to seperate the selected spectrum |
schemeToGenerate |
number | The color scheme to generate |
- Source:
getMap()
Gets the map.
- Source:
Returns:
getVectorClasses()
Gets the vector classes.
- Source:
Returns:
getVectorSource() → {ol.source}
Gets the vector source.
- Source:
Returns:
The vector source.
- Type
- ol.source
getWardsSource() → {ol.source}
Gets the wards source.
- Source:
Returns:
The wards source.
- Type
- ol.source
initializeMap()
Creates map with default interaction properties
- Source:
isSourceReady(mapType, pageToLoad, callback) → {boolean}
Determines if source's are ready, and has been fully loaded on the user side.
Parameters:
Name | Type | Description |
---|---|---|
mapType |
number | The map type |
pageToLoad |
number | The page to load |
callback |
function | The callback |
- Source:
Returns:
True if source ready, False otherwise.
- Type
- boolean
listUniqueAttributeValues()
Adds sources to be able to list unique attribute values and calls the list function
- Source:
loadMapLegend()
Loads a map legend.
- Source:
loadSources()
Loads the sources from the dataset linked to GeoServer.
- Source:
loadWards()
Loads boundaries with styles
- Source:
logMapLayers()
Logs map layers.
- Source:
recursiveCreate(mapType, pageToLoad, callback)
Waits till features ready before creating the map. It uses the factory design patterns as well as stratergy patterns to classify the map
Parameters:
Name | Type | Description |
---|---|---|
mapType |
number | The map type |
pageToLoad |
number | The page to load |
callback |
function | The callback |
- Source:
recursiveWaitAndList()
Waits till point source is ready and adds a list of unique values to the html dropdown element
- Source:
removeLayers()
Removes the layers of a map.
- Source:
resetMapCounter()
resets the map counter
- Source:
setAttribute()
Sets the attribute.
- Source:
setAttrValue()
Sets the attribute value.
- Source:
setBoundaries()
Sets the boundaries.
- Source:
setDataset()
Sets the dataset.
- Source:
setMapDisplayType(mapType)
Sets the map display type.
Parameters:
Name | Type | Description |
---|---|---|
mapType |
- Source:
setVectorSource(source)
Sets the vector source.
Parameters:
Name | Type | Description |
---|---|---|
source |
ol.source | The source |
- Source:
setWardsSource(source)
Sets the ward source.
Parameters:
Name | Type | Description |
---|---|---|
source |
ol.source | The source |
- Source:
standardise(method)
Standardises numerical data
Parameters:
Name | Type | Description |
---|---|---|
method |
string | The standardisation method to be used |
- Source: