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 idstring Id of the layer.
symobject Style object.
- Source:
-
clearSelectedFeatures(id)
-
Clear all currently selected features. All features are then displayed with the default rendering style.
Parameters:
Name Type Description idstring Id of the layer.
- Source:
-
createBrandHeatmapLayer(typ, id, brand, visible, colorStops)
-
Create Brand HeatMap Layer
Parameters:
Name Type Description typstring Brand of layer.
idstring Id of the layer.
brandstring See: PoiBrandList.
visibleboolean Visibility of the layer.
colorStopsarray Color stop for heatMap default "#009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000".
-
createBrandLayer(typ, id, sym, visible, mouseClick)
-
Create Brand Layer
Parameters:
Name Type Description typstring Brand of layer. See PoiBrandList for brand list.
idstring Id of the layer.
symobject Style object.
visibleboolean Visibility of the layer.
mouseClickfunction The user defined function that is called when layer is clicked.
-
createCategoryHeatmapLayer(typ, id, category, visible, colorStops)
-
Create Category HeatMap Layer
Parameters:
Name Type Description typstring Category of layer. List of types:
ILayer.HEATMAP_ULKE
ILayer.HEATMAP_IL
ILayer.HEATMAP_ILCE
ILayer.HEATMAP_MAHALLEidstring Id of the layer.
categorystring The type of category that will be visible. Category List: PoiCategoryList.
visibleboolean Visibility of the layer.
colorStopsarray Color stop for heatMap default is "#009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000".
-
createCategoryLayer(typ, id, sym, visible, mouseClick)
-
Create Category Layer
Parameters:
Name Type Description typstring Category of layer. See PoiCategoryList for category list.
idstring Id of the layer.
symobject Style object.
visibleboolean Visibility of the layer.
mouseClickfunction The user defined function that is called when layer is clicked.
-
createClusterBrandLayer(typ, id, sym, visible, variableMarker, minPointCount, maxClusteringLevel, threshold, mouseClick)
-
Create Cluster Brand Layer
Parameters:
Name Type Description typstring Brand of layer. See PoiBrandList for brand list.
idstring Id of the layer.
symobject Style object.
visibleboolean Visibility of the layer.
variableMarkerobject Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height)
minPointCountint Enable clustering if the number of features in cluster is greater than or equal to this value.
maxClusteringLevelint Enable clustering if current zoom level is less than or equal to this value
thresholdint The cluster radius in pixels. Default value is 30 (i.e. points within 30 pixels of each other will be aggregated into a cluster).
mouseClickfunction The user defined function that is called when layer is clicked.
-
createClusterCategoryLayer(typ, id, sym, visible, variableMarker, minPointCount, maxClusteringLevel, threshold, mouseClick)
-
Create Cluster Category Layer
Parameters:
Name Type Description typstring category of layer. See PoiBrandList for brand list.
idstring Id of the layer.
symobject Style object.
visibleboolean Visibility of the layer.
variableMarkerobject Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height)
minPointCountint Enable clustering if the number of features in cluster is greater than or equal to this value.
maxClusteringLevelint Enable clustering if current zoom level is less than or equal to this value.
thresholdint The cluster radius in pixels. Default value is 30 (i.e. points within 30 pixels of each other will be aggregated into a cluster).
mouseClickfunction The user defined function that is called when layer is clicked.
-
createDemographicLayer(typ, id, visible, mouseClick)
-
Create Demographic Layer
Parameters:
Name Type Description typstring List of types:
ILayer.DEMOGRAFIK_YAS_DURUMU
ILayer.DEMOGRAFIK_NUFUS
ILayer.DEMOGRAFIK_EGITIM
ILayer.DEMOGRAFIK_KONUT_SAYISI
ILayer.DEMOGRAFIK_ARAC_SAYISIidstring Id of the layer.
visibleboolean Visibility of the layer.
mouseClickfunction 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 typstring Type of the layer.
ILayer.MAP_BOLGE
ILayer.MAP_IL
ILayer.MAP_ILCE
ILayer.MAP_MAHALLE
ILayer.USER_POINT
ILayer.USER_REGION
ILayer.USER_LINEidstring Id of the layer.
wherestring The where clause for data parameters.
symcobject Column style object.
symobject Style object.
visibleboolean Visibility of the layer.
mouseClickfunction The user defined function that is called when layer is clicked.
lblcobject Label object.
lsymobject Label object.
hcolsarray 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 typstring Type of the layer. Layer types are listed below:
ILayer.HEATMAP_ULKE
ILayer.HEATMAP_IL
ILayer.HEATMAP_ILCE
ILayer.HEATMAP_MAHALLEidstring Id of the layer.
themeTypestring Theme type are listed below:
ILayer.MAP_BOLGE
ILayer.MAP_IL
ILayer.MAP_ILCE
ILayer.MAP_MAHALLE
ILayer.USER_POINTwherestring If ILayer.USER_POINT is selected, the where clause for data parameters.
visibleboolean Visibility of the layer.
colorStopsarray Color stop for heatMap default #009900, #FFFFCC, #FFFF66, #FFFF33, #FF9933, #FF6600, #FF3333, #FF0000.
-
createLayer(typ, id, where, symc, sym, visible, mouseClick, lblc, lsym, hcols, hoverStyle, textStyle, selectStyle, setToolTip)
-
Create a layer
Parameters:
Name Type Description typstring 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_LINEidstring Id of the layer.
wherestring Where clause. (@link http://www.locationbox.com.tr/web/demov2/layercoloring.jsp Layer Coloring)
symcobject Column style object.
symobject Style object.
visibleboolean Visibility of the layer.
mouseClickfunction The user defined function that is called when layer is clicked.
lblcobject Label object.
lsymobject Label object.
hcolsarray User data(line, region or point) supplied from parameter for mouseClick event.
Usage: "var hcols = "STRING_1,STRING_2,NUMBER_1,NUMBER_2".split(",")"hoverStyleobject Style object.
textStyleobject Text style object (Default color: #ff0000, fontSize:50).
selectStyleobject Layer select style object.
setToolTipobject Setting layer tool tip.
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 idstring Id of the layer.
namestring Name of the layer.
visibleboolean Visibility of the layer.
mouseClickfunction 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 typstring Category of layer. See PoiCategoryList for category list.
idstring Id of the layer.
symobject Style object.
visibleboolean Visibility of the layer.
mouseClickfunction The user defined function that is called when layer is clicked.
hoverStyleobject Color object for hover style create with mapper.createColorStyle(name, fillColor, fillOpacity, borderColor, borderOpacity, borderWidth).
setToolTipboolean If "true" tooltip will be activeted.
-
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 idstring Id of the layer.
variableMarkerobject Style object can create from mapper.createVariableMarkerStyle(classification, color, stroke, type, textStyle, startSize, increment, numClasses, cx, cy, width, height).
minPointCountint Enable clustering if the number of features in cluster is greater than or equal to this value.
maxClusteringLevelint Enable clustering if current zoom level is less than or equal to this value.
thresholdint 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 idstring Id of the layer.
filterobject 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 idstring Id of the layer.
spotlightRadiusfloat 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.colorStopsArray An array specifying the color stops. Each array entry is a (color) string specified as "#rrggbb".
opacityint Opacity value of heat map can set between 0-1.
lengthUnitstring The unit of the spotlightRadius, such as "pixel", "meter", "kilometer", "km","feet" or "mile". Default value is "pixel".
sampleFactorfloat 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 idstring Id of the layer.
symobject 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 idstring Id of the layer.
keyColumnstring Required. The column to match non-spatial data with spatial data (e.g. 'id').
xml_datastring The non-spatial data in the nsdp xml format.
- Source:
-
setPreDefRenderingStyle(style, attributes)
-
Set the predefined layer's rendering style.
Parameters:
Name Type Description styleobject The new rendering style.
attributesarray 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 idstring Id of the layer.
styleobject Style object.
- Source:
-
setVisible(visible)
-
Set Layer Visibility
Parameters:
Name Type Description visibleboolean 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 idstring Id of the layer.
symobject Style object.
- Source:
-
zoomToLayer()
-
Zoom to Layer
- Source: