Class: ILayer

ILayer

ILayer class
This class could be considered a concrete implementation class


new ILayer(mapper)

Create a new ILayer instance.

Parameters:
Name Type Description
mapper object

IMapper object to use of multiple maps (optional).

Source:

Methods


addSecondaryStyle(id, sym)

After create a Vector Layer can set secondary style(sym) spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

sym object

Style object.

Source:

clearSelectedFeatures(id)

Clear all currently selected features. All features are then displayed with the default rendering style.

Parameters:
Name Type Description
id string

Id of the layer.

Source:

createBrandHeatmapLayer(typ, id, brand, visible, colorStops)

Create Brand HeatMap Layer

Parameters:
Name Type Description
typ string

Brand of layer.

id string

Id of the layer.

brand string

See: PoiBrandList.

visible boolean

Visibility of the layer.

colorStops array

Color stop for heatMap default "#009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000".

Source:
See:

createBrandLayer(typ, id, sym, visible, mouseClick)

Create Brand Layer

Parameters:
Name Type Description
typ string

Brand of layer. See PoiBrandList for brand list.

id string

Id of the layer.

sym object

Style object.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

Source:
See:

createCategoryHeatmapLayer(typ, id, category, visible, colorStops)

Create Category HeatMap Layer

Parameters:
Name Type Description
typ string

Category of layer. List of types:

ILayer.HEATMAP_ULKE

ILayer.HEATMAP_IL

ILayer.HEATMAP_ILCE

ILayer.HEATMAP_MAHALLE

id string

Id of the layer.

category string

The type of category that will be visible. Category List: PoiCategoryList.

visible boolean

Visibility of the layer.

colorStops array

Color stop for heatMap default is "#009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000".

Source:
See:

createCategoryLayer(typ, id, sym, visible, mouseClick)

Create Category Layer

Parameters:
Name Type Description
typ string

Category of layer. See PoiCategoryList for category list.

id string

Id of the layer.

sym object

Style object.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

Source:
See:

createClusterBrandLayer(typ, id, sym, visible, variableMarker, minPointCount, maxClusteringLevel, threshold, mouseClick)

Create Cluster Brand Layer

Parameters:
Name Type Description
typ string

Brand of layer. See PoiBrandList for brand list.

id string

Id of the layer.

sym object

Style object.

visible boolean

Visibility of the layer.

variableMarker object

Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height)

minPointCount int

Enable clustering if the number of features in cluster is greater than or equal to this value.

maxClusteringLevel int

Enable clustering if current zoom level is less than or equal to this value

threshold int

The cluster radius in pixels. Default value is 30 (i.e. points within 30 pixels of each other will be aggregated into a cluster).

mouseClick function

The user defined function that is called when layer is clicked.

Source:
See:

createClusterCategoryLayer(typ, id, sym, visible, variableMarker, minPointCount, maxClusteringLevel, threshold, mouseClick)

Create Cluster Category Layer

Parameters:
Name Type Description
typ string

category of layer. See PoiBrandList for brand list.

id string

Id of the layer.

sym object

Style object.

visible boolean

Visibility of the layer.

variableMarker object

Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height)

minPointCount int

Enable clustering if the number of features in cluster is greater than or equal to this value.

maxClusteringLevel int

Enable clustering if current zoom level is less than or equal to this value.

threshold int

The cluster radius in pixels. Default value is 30 (i.e. points within 30 pixels of each other will be aggregated into a cluster).

mouseClick function

The user defined function that is called when layer is clicked.

Source:
See:

createDemographicLayer(typ, id, visible, mouseClick)

Create Demographic Layer

Parameters:
Name Type Description
typ string

List of types:

ILayer.DEMOGRAFIK_YAS_DURUMU

ILayer.DEMOGRAFIK_NUFUS

ILayer.DEMOGRAFIK_EGITIM

ILayer.DEMOGRAFIK_KONUT_SAYISI

ILayer.DEMOGRAFIK_ARAC_SAYISI

id string

Id of the layer.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

Source:

createDynamicLayer(typ, id, where, symc, sym, visible, mouseClick, lblc, lsym, hcols)

Create a Dynamic Layer.

Parameters:
Name Type Description
typ string

Type of the layer.
ILayer.MAP_BOLGE

ILayer.MAP_IL

ILayer.MAP_ILCE

ILayer.MAP_MAHALLE

ILayer.USER_POINT

ILayer.USER_REGION

ILayer.USER_LINE

id string

Id of the layer.

where string

The where clause for data parameters.

symc object

Column style object.

sym object

Style object.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

lblc object

Label object.

lsym object

Label object.

hcols array

User data(line., region or point) supplied from parameter for mouseClick event. (Usage: var hcols = "STRING_1,STRING_2,NUMBER_1,NUMBER_2".split(",");)

Source:

createHeatmapLayer(typ, id, themeType, where, visible, colorStops)

Create HeatMap Layer

Parameters:
Name Type Description
typ string

Type of the layer. Layer types are listed below:

ILayer.HEATMAP_ULKE

ILayer.HEATMAP_IL

ILayer.HEATMAP_ILCE

ILayer.HEATMAP_MAHALLE

id string

Id of the layer.

themeType string

Theme type are listed below:

ILayer.MAP_BOLGE

ILayer.MAP_IL

ILayer.MAP_ILCE

ILayer.MAP_MAHALLE

ILayer.USER_POINT

where string

If ILayer.USER_POINT is selected, the where clause for data parameters.

visible boolean

Visibility of the layer.

colorStops array

Color stop for heatMap default #009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000.

Source:
See:

createLayer(typ, id, where, symc, sym, visible, mouseClick, lblc, lsym, hcols, hoverStyle, textStyle, selectStyle, setToolTip)

Create a layer

Parameters:
Name Type Description
typ string

Type of the layer. Layer types are listed below:

ILayer.MAP_BOLGE

ILayer.MAP_IL

ILayer.MAP_ILCE

ILayer.MAP_MAHALLE

ILayer.USER_POINT

ILayer.USER_REGION

ILayer.USER_LINE

id string

Id of the layer.

where string

Where clause. (@link http://www.locationbox.com.tr/web/demov2/layercoloring.jsp Layer Coloring)

symc object

Column style object.

sym object

Style object.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

lblc object

Label object.

lsym object

Label object.

hcols array

User data(line, region or point) supplied from parameter for mouseClick event.
Usage: "var hcols = "STRING_1,STRING_2,NUMBER_1,NUMBER_2".split(",")"

hoverStyle object

Style object.

textStyle object

Text style object (Default color: #ff0000, fontSize:50).

selectStyle object

Layer select style object.

setToolTip object

Setting layer tool tip.

Source:
See:
Example
http://locationbox.blogspot.com.tr/2014/04/how-to-use-createlayer-method-using.html  

createThemeLayer(id, name, visible, mouseClick)

Create Theme Layer

Parameters:
Name Type Description
id string

Id of the layer.

name string

Name of the layer.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

Source:

createVectorCategoryLayer(typ, id, sym, visible, mouseClick, hoverStyle, setToolTip)

Create Category Vector Layer

Parameters:
Name Type Description
typ string

Category of layer. See PoiCategoryList for category list.

id string

Id of the layer.

sym object

Style object.

visible boolean

Visibility of the layer.

mouseClick function

The user defined function that is called when layer is clicked.

hoverStyle object

Color object for hover style create with mapper.createColorStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth).

setToolTip boolean

If "true" tooltip will be activeted.

Source:
See:

enableClusterVectorLayer(id, variableMarker, minPointCount, maxClusteringLevel, threshold)

After create a Vector Layer can set cluster using variableMarker spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

variableMarker object

Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height).

minPointCount int

Enable clustering if the number of features in cluster is greater than or equal to this value.

maxClusteringLevel int

Enable clustering if current zoom level is less than or equal to this value.

threshold int

The cluster radius in pixels. Default value is 30 (i.e. points within 30 pixels of each other will be aggregated into a cluster).

Source:

refresh()

Refresh Theme

Source:

removeLayer()

Remove layer

Source:

removeUserPointHeatMap()

Removes Defined User Point HeatMap Layer

Source:

selectFeatureByFilter(id, filter)

After create a Vector Layer can highlight features that pass the specified filter, spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

filter object

Filter object can create with mapper.createInsidePolygonFilter()

Source:

setHeatMapStyle(id, spotlightRadius, colorStops, opacity, lengthUnit, sampleFactor)

After create a Vector Layer can set heatMap spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

spotlightRadius float

The spotlight radius. This specifies how far an event or record will cast its 'influence' or contribute to the heat of its nearby area.
The influence of any given event is at maximum at where it is located,and decreases as you move away from the event location. It will have no influence beyond the spotlight radius.

colorStops Array

An array specifying the color stops. Each array entry is a (color) string specified as "#rrggbb".

opacity int

Opacity value of heat map can set between 0-1.

lengthUnit string

The unit of the spotlightRadius, such as "pixel", "meter", "kilometer", "km","feet" or "mile". Default value is "pixel".

sampleFactor float

The factor by which the internal computation grid will be scaled down from the actual map window size. Default is 2.
Setting to 1 will cause no scaling, but will require the most browser memory and most CPU time; setting to a larger number will result in less memory usage but a less smooth-looking heat map.

Source:

setJDBCRenderingStyle(id, sym)

After create a Vector Layer can set rendering style(sym) spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

sym object

Style object.

Source:

setNSDP(id, keyColumn, xml_data)

After create a Vector Layer can set nsdp spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

keyColumn string

Required. The column to match non-spatial data with spatial data (e.g. 'id').

xml_data string

The non-spatial data in the nsdp xml format.

Source:

setPreDefRenderingStyle(style, attributes)

Set the predefined layer's rendering style.

Parameters:
Name Type Description
style object

The new rendering style.

attributes array

The list of attribute names used to determine the actual rendering style.
It is effective only when renderingStyle is an advanced style.

Source:

setSelectStyle(id, style)

After create a Vector Layer can set select style spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

style object

Style object.

Source:

setVisible(visible)

Set Layer Visibility

Parameters:
Name Type Description
visible boolean

Layer visibility.

Source:

setVisualFilter(id, sym)

After create a Vector Layer can set visual filter style(sym) spesific layer with given id dynamically.

Parameters:
Name Type Description
id string

Id of the layer.

sym object

Style object.

Source:

zoomToLayer()

Zoom to Layer

Source: