Class: TileLayerStyle

.xyz.maps.layers.TileLayer. TileLayerStyle

This is an interface to represent Style for rendering features in this layer.
Example:
{
styleGroups: {
  lineStyle: [
    {zIndex: 0, type: "Line", opacity:1, stroke: "#BE6B65", "strokeLinecap": "round", "strokeLinejoin": "round", "strokeWidth":16},
    {zIndex: 1, type: "Line", opacity:1, stroke: "#E6A08C", "strokeLinecap": "round", "strokeLinejoin": "round", "strokeWidth":12},
    {zIndex: 2, type: "Text", fill: "#000000", "textRef": "properties.name"}
  ]
},
assign: function(feature, zoomlevel){
  return "lineStyle";
}
}

 

Members Summary

styleGroups :Object

This object contains key/style group pairs. A style group is an array of here.xyz.maps.layers.TileLayer.Style, it defines how a feature should be rendered.

Methods Summary

assign(feature, zoomlevel) → {String}

The function returns a key that is defined in styleGroups. This function will be called for each feature being rendered by the display.
The display expects this method to return the key of how the feature should be rendered for the respective zoomlevel.

Members Details

styleGroups :Object

This object contains key/style group pairs. A style group is an array of here.xyz.maps.layers.TileLayer.Style, it defines how a feature should be rendered.
Type:
Object

Methods Details

assign(feature, zoomlevel) → {String}

The function returns a key that is defined in styleGroups. This function will be called for each feature being rendered by the display.
The display expects this method to return the key of how the feature should be rendered for the respective zoomlevel.
Parameters:
Name Type Description
feature here.xyz.maps.providers.FeatureProvider.Feature the feature to which style is applied
zoomlevel number current zoomlevel of map display
Returns:
a key which is defined in styleGroups
Type:
String