options to configure the TileLayer
The identifier of the Layer.
default tile margin in pixel
maximum zoom level at which data from the Layer will be displayed.
minimum zoom level at which data from the Layer is displayed.
The name of the Layer
Add an EventListener to the layer. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear", "styleGroupChange", "styleChange", and "viewportReady"
The detail property of the Event gives additional information about the event. detail.layer is a reference to the layer onto which the event was dispatched and is set for all events.
A string representing the event type to listen for
the listener function that will be called when an event of the specific type occurs
Add a feature to the layer.
the feature to be added to the layer
optional style the feature should be displayed with.
Add features to the layer.
the features to be added to the layer
optional style the features should be displayed with.
Get a locally cached tile by quadkey.
the quadkey of the tile
Get provider(s) of this layer.
Get the current layerStyle.
Get styleGroup for the feature.
This method retrieves a StyleGroup for a given feature, optionally based on the specified zoom level and whether to use the layer default styles.
The feature for which to get the styles.
The zoom level to use for determining the styles. This parameter should be set as it determines how styles are applied based on zoom. It is only optional if the style definition supports being applied without a specific zoom level.
(Optional) A boolean indicating whether to use the layer's default styles. If true, any custom styles set via TileLayer.setStyleGroup are ignored and the default layer styles are returned. If false, the method will return the custom styles set for the feature if available; otherwise, it returns the default layer styles. Default is false.
A readonly StyleGroup representing the styles for the given feature at the specified zoom level. If no styles are found, a falsy value is returned, indicating that the feature is not displayed/visible.
Checks whether the xyz-maps tile layer is currently visible.
true
if the layer is visible, otherwise false
.Enable or disable pointer-event triggering for all features of the layer.
boolean to enable or disable posinter-events.
boolean indicating if pointer-event triggering is active or disabled.
Remove an EventListener from the layer. Valid events: "featureAdd", "featureRemove", "featureCoordinatesChange", "clear", "styleGroupChange", "styleChange", and "viewportReady"
A string which specifies the type of event for which to remove an event listener.
The listener function of the event handler to remove from the TileLayer.
Remove feature(s) from the layer.
features that should be removed from the layer
Search for feature(s) in the layer.
configure the search
search a feature by id.
Function to be called when a request of a "remote search" fails.
The error message of the failing request.
The name property represents a name for the type of error. The value is "NetworkError".
The responseText which contains the textual data received of the failing request.
The numerical HTTP status code of the failing request.
Callback function for "remote" search.
Force the data provider(s) to do remote search if no result is found in local cache.
array of features
Search for feature(s) in the layer.
configure the search
Array of feature ids to search.
Function to be called when a request of a "remote search" fails.
The error message of the failing request.
The name property represents a name for the type of error. The value is "NetworkError".
The responseText which contains the textual data received of the failing request.
The numerical HTTP status code of the failing request.
Callback function for "remote" search.
Geographical center point of the circle to search in. options.radius must be defined.
Radius of the circle in meters, it is used in "point" search.
Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.
Force the data provider(s) to do remote search if no result is found in local cache.
array of features
Rectangle Search for feature(s) in the layer.
Geographical Rectangle to search in. [minLon, minLat, maxLon, maxLat] | GeoRect.
configure the search
Function to be called when a request of a "remote search" fails.
The error message of the failing request.
The name property represents a name for the type of error. The value is "NetworkError".
The responseText which contains the textual data received of the failing request.
The numerical HTTP status code of the failing request.
Callback function for "remote" search.
Force the data provider(s) to do remote search if no result is found in local cache.
Circle Search for feature(s) in the layer.
Geographical center point of the circle to search in. options.radius must be defined.
configure the search
Function to be called when a request of a "remote search" fails.
The error message of the failing request.
The name property represents a name for the type of error. The value is "NetworkError".
The responseText which contains the textual data received of the failing request.
The numerical HTTP status code of the failing request.
Callback function for "remote" search.
the radius is mandatory for circle search.
Force the data provider(s) to do remote search if no result is found in local cache.
Search for feature by id in the layer.
id of the feature to search for
configure the search
Modify coordinates of a feature in the layer.
the Feature whose coordinates should be modified
the modified coordinates to set. The coordinates must match features geometry type.
Set the tile margin in pixel.
the tileMargin
Set layer with given style.
the layerStyle
keep and reuse custom set feature styles that have been set via TileLayer.setStyleGroup
Set StyleGroup the feature should be rendered with. Pass styleGroup = false|null to hide the feature. If no styleGroup is passed, custom feature style will be cleared and layer default style will be set.
the feature that's styleGroup should be set
the styleGroup that feature should be displayed with
Sets the visibility of the Layer.
This function controls whether the tile layer is currently displayed or hidden.
Generated using TypeDoc
The MVTLayer is a TileLayer designed to work with remote datasources that are delivering MVT encoded vector tiles.
const myLayer = new MVTLayer({ remote: { url: 'https://xyz.api.here.com/tiles/osmbase/512/all/{z}/{x}/{y}.mvt?access_token=' + YOUR_ACCESS_TOKEN tileSize : 512 }, min: 1, max: 20 })