new pixelmapLayer(argopt)
- Description:
Create a new instance of pixelmapLayer. This is a
geo.tileLayer
with an OSM url and attribution defaults and with the tiles centered on the origin.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.pixelmapLayer.spec |
<optional> |
Specification for the layer. |
Extends
Members
activeTiles
- Description:
Readonly accessor to the active tile mapping. This is an object containing all currently drawn tiles (hash(tile) => tile).
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
activeTiles |
object | The keys are |
Readonly accessor to the active tile mapping. This is an object containing all currently drawn tiles (hash(tile) => tile).
cache
- Description:
Readonly accessor to the tile cache object.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
cache |
geo.tileCache | The tile cache object. |
Readonly accessor to the tile cache object.
idle
- Description:
Getter for the idle state. Read only.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
idle |
boolean |
|
Getter for the idle state. Read only.
(protected) newLayerId
- Description:
Gets a new id number for a layer.
- Source:
- Inherited From:
Gets a new id number for a layer.
options
- Description:
Readonly accessor to the options object.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
options |
object | A copy of the options object. |
Readonly accessor to the options object.
queue
- Description:
Get/set the queue object.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
queue |
geo.fetchQueue | The current queue. |
Get/set the queue object.
queueSize
- Description:
Get/set the queue size.
- Source:
- Overrides:
Properties:
Name | Type | Description |
---|---|---|
size |
number | The queue size. |
Get/set the queue size.
reference
- Description:
Get/set the tile reference value.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
reference |
string | A reference value to distinguish tiles on this layer. |
Get/set the tile reference value.
(static) defaults
- Description:
This object contains the default options used to initialize the pixelmapLayer.
- Source:
This object contains the default options used to initialize the pixelmapLayer.
Methods
active(argopt) → {boolean|this}
- Description:
Get/Set whether or not the layer is active. An active layer will receive native mouse when the layer is on top. Non-active layers will never receive native mouse events.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
boolean |
<optional> |
If specified, the new |
Returns:
- Type
- boolean | this
addChild(child) → {this}
- Description:
Add a child (or an array of children) to the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
addFeature(feature) → {this}
- Description:
Add a feature to the layer if it is not already present.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
feature |
object | the feature to add. |
Returns:
- Type
- this
addPromise(promise) → {this}
- Description:
Add the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
attribution(argnullable) → {string|this}
- Description:
Get or set the attribution html content that will displayed with the layer. By default, nothing will be displayed. Note, this content is not html escaped, so care should be taken when rendering user provided content.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
string |
<nullable> |
An html fragment |
Returns:
Chainable as a setter
- Type
- string | this
autoshareRenderer() → {boolean|string}
- Description:
Get the setting of autoshareRenderer.
- Source:
- Inherited From:
Returns:
- Type
- boolean | string
canvas() → {HTMLCanvasElement}
- Description:
Get canvas of the layer.
- Source:
- Inherited From:
Returns:
The canvas element associated with the layer.
- Type
- HTMLCanvasElement
children() → {Array.<geo.object>}
- Description:
Get an array of the child objects.
- Source:
- Inherited From:
Returns:
A copy of the array of child objects.
- Type
- Array.<geo.object>
clear() → {Array.<geo.tile>}
- Description:
Remove all active tiles from the canvas.
- Source:
- Inherited From:
Returns:
The array of tiles removed.
- Type
- Array.<geo.tile>
createFeature(featureName, arg) → {geo.feature}
- Description:
Create a feature by name.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
featureName |
string | The name of the feature to create. |
arg |
object | Properties for the new feature. |
Returns:
The created feature.
- Type
- geo.feature
dataTime() → {geo.timestamp}
- Description:
Return last time data got changed.
- Source:
- Inherited From:
Returns:
The data time.
- Type
- geo.timestamp
deleteFeature(feature) → {this}
- Description:
Delete feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
feature |
geo.feature | The feature to delete. |
Returns:
- Type
- this
displayToLevel(ptopt, zoomopt) → {object}
- Description:
Convert display pixel coordinates (where (0,0) is the upper left) to layer pixel coordinates (typically (0,0) is the center of the map and the upper-left has the most negative values). By default, this is done at the current base zoom level.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pt |
object |
<optional> |
The point to convert with |
zoom |
number |
<optional> |
If specified, the zoom level to use. |
Returns:
The point in level coordinates with x
and y
.
- Type
- object
draw() → {this}
- Description:
Draw. If the layer is visible, call the parent class's draw function and the renderer's render function.
- Source:
- Inherited From:
Returns:
- Type
- this
drawTile(tile)
- Description:
Draw the given tile on the active canvas .
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
tile |
geo.tile | The tile to draw. |
features(valopt) → {Array.<geo.feature>|this}
- Description:
Get/Set drawables.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
Array.<geo.feature> |
<optional> |
A list of features, or unspecified to return the current feature list. If a list is provided, features are added or removed as needed. |
Returns:
The current features associated with the layer or the current layer.
- Type
- Array.<geo.feature> | this
fromLevel(coord, level) → {object}
- Description:
Convert a coordinate from pixel coordinates at the given zoom level to world coordinates.
- Source:
- Inherited From:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
coord |
object |
Properties
|
|||||||||
level |
number | The zoom level of the source coordinates. |
Returns:
World coordinates with x
and y
.
- Type
- object
fromLocal(pt, zoom) → {object}
- Description:
Compute world coordinates from the given local coordinates. The tile layer uses units of pixels relative to the world space coordinate origin.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
pt |
object | A point in world space coordinates with |
zoom |
number | undefined | If unspecified, use the map zoom. |
Returns:
Local coordinates with x
and y
.
- Type
- object
gcs(argopt) → {string|this}
- Description:
Get or set the layer gcs. This defaults to the map's gcs.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
string |
<optional> |
If |
Returns:
A string used by geo.transform
.
- Type
- string | this
gcsFeatures(valopt, nullable) → {string|this}
- Description:
Get or set the gcs for all features. For features, the default is usually the map's ingcs.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
string |
<optional> <nullable> |
If |
Returns:
A string used by geo.transform
. If the
map interface gcs is in use, that value will be returned. If the gcs
is set, return the current class instance.
- Type
- string | this
gcsTileBounds(indexOrTile, gcsopt) → {object}
- Description:
Returns a tile's bounds in a gcs.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
indexOrTile |
object | geo.tile | Either a tile or an object with {x, y, level}` specifying a tile. |
|
gcs |
string | geo.transform | null |
<optional> |
|
Returns:
The tile bounds in the specified gcs.
- Type
- object
geoIsOn(event, handleropt) → {boolean}
- Description:
Report if an event handler is bound to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> | An event or list of events to check. |
|
handler |
function |
<optional> |
A function that might be bound. If
|
Returns:
true if any of the specified events are bound to the specified handler.
- Type
- boolean
geoOff(eventopt, argopt, nullable) → {this}
- Description:
Remove handlers from one event or an array of events. If no event is provided all handlers will be removed.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> |
<optional> |
An event or a list of events from
|
arg |
function | Array.<function()> |
<optional> <nullable> |
A function or array of functions to remove from the events or a falsy value to remove all handlers from the events. |
Returns:
- Type
- this
geoOn(event, handler) → {this}
- Description:
Bind an event handler to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
- Type
- this
geoOnce(event, handler) → {function}
- Description:
Bind an event handler to this object that will fire once and then deregister itself.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
The actual bound handler. This is a wrapper around the handler that was passed to the function.
- Type
- function
geoTrigger(event, args, childrenOnlyopt) → {this}
- Description:
Trigger an event (or events) on this object and call all handlers.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | The event to trigger. |
|
args |
object | Arbitrary argument to pass to the handler. |
|
childrenOnly |
boolean |
<optional> |
If truthy, only propagate down the tree. |
Returns:
- Type
- this
height() → {number}
- Description:
Return the height of the layer in pixels.
- Source:
- Inherited From:
Returns:
The height of the parent map in pixels.
- Type
- number
id(valopt) → {string|this}
- Description:
Get/Set id of the layer.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
string | null |
<optional> |
If |
Returns:
- Type
- string | this
initialized(valopt) → {boolean|this}
- Description:
Get/Set if the layer has been initialized.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
boolean |
<optional> |
If specified, update the initialized value. Otherwise, return the current instance. |
Returns:
Either the initialized value or this.
- Type
- boolean | this
isValid(index) → {boolean}
- Description:
Returns
true
if the given tile index is valid:- min level <= level <= max level
- 0 <= x <= 2^level - 1
- 0 <= y <= 2^level - 1 If the layer wraps, the x and y values may be allowed to extend beyond these values.
- Source:
- Inherited From:
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
index |
object | The tile index. Properties
|
Returns:
- Type
- boolean
map() → {geo.map}
- Description:
Get the map associated with this layer.
- Source:
- Inherited From:
Returns:
The map associated with the layer.
- Type
- geo.map
modified() → {this}
- Description:
Update the timestamp to the next global timestamp value.
- Source:
- Inherited From:
Returns:
- Type
- this
moveDown(nopt) → {this}
- Description:
Bring the layer below the given number of layers. This will rotate the current z-indices for this and the previous
n
layers.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> |
1
|
The number of positions to move. |
Returns:
- Type
- this
moveToBottom() → {this}
- Description:
Bring the layer to the bottom of the map layers.
- Source:
- Inherited From:
Returns:
- Type
- this
moveToTop() → {this}
- Description:
Bring the layer to the top of the map layers.
- Source:
- Inherited From:
Returns:
- Type
- this
moveUp(nopt) → {this}
- Description:
Bring the layer above the given number of layers. This will rotate the current z-indices for this and the next
n
layers.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> |
1
|
The number of positions to move. |
Returns:
- Type
- this
name(valopt) → {string|this}
- Description:
Get/Set name of the layer.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
string |
<optional> |
If specified, the new name of the layer. |
Returns:
- Type
- string | this
nearestPixel(valopt, skipUpdateopt) → {boolean|number|this}
- Description:
Get/Set nearestPixel value.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
boolean | number |
<optional> |
If not specified, return the current value. If true, image quads are rendered with near-neighbor sampling. If false, with interpolated sampling. If a number, interpolate at that zoom level or below and nearest neighbor at that zoom level or above. |
skipUpdate |
boolean |
<optional> |
If specifying val and this value is truthy, don't update the layer or mark it as modified. |
Returns:
- Type
- boolean | number | this
node() → {HTMLDivElement}
- Description:
Get root node of the layer.
- Source:
- Inherited From:
Returns:
- Type
- HTMLDivElement
onIdle(handler) → {this}
- Description:
Bind a handler that will be called one time when all internal promises are resolved. If there are no outstanding promises, this is invoked synchronously.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | A function taking no arguments. |
Returns:
- Type
- this
opacity(opacityopt) → {number|this}
- Description:
Get or set the current layer opacity. The opacity is in the range [0-1]. An opacity of 0 is not the same as setting
visible(false)
, as interactions can still occur with the layer.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opacity |
number |
<optional> |
If specified, set the opacity. Otherwise, return the opacity. |
Returns:
The current opacity or the current layer.
- Type
- number | this
parent(argopt) → {this|geo.sceneObject}
- Description:
Get/set parent of the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.sceneObject |
<optional> |
The new parent or |
Returns:
- Type
- this | geo.sceneObject
prefetch(level, bounds) → {jQuery.Deferred}
- Description:
Prefetches tiles up to a given zoom level around a given bounding box.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
level |
number | The zoom level. |
bounds |
geo.geoBounds | The map bounds. |
Returns:
resolves when all of the tiles are fetched.
- Type
- jQuery.Deferred
remove(tile) → {geo.tile}
- Description:
Remove the given tile from the canvas and the active cache.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
tile |
geo.tile | string | The tile (or hash) to remove. |
Returns:
The tile removed from the active layer.
- Type
- geo.tile
removeChild(child) → {this}
- Description:
Remove a child (or array of children) from the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
removeFeature(feature) → {this}
- Description:
Remove a feature without destroying it.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
feature |
geo.feature | The feature to remove. |
Returns:
- Type
- this
removePromise(promise) → {this}
- Description:
Remove the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
renderer() → {geo.renderer}
- Description:
Get the renderer for the layer.
- Source:
- Inherited From:
Returns:
The renderer associated with the layer or null
if there is no renderer.
- Type
- geo.renderer
rendererName() → {string}
- Description:
Get the name of the renderer.
- Source:
- Inherited From:
Returns:
- Type
- string
reset() → {this}
- Description:
Reset the layer to the initial state, clearing the canvas and resetting the tile cache.
- Source:
- Inherited From:
Returns:
- Type
- this
selectionAPI(valopt) → {boolean|this}
- Description:
Get/Set selectionAPI of the layer.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
boolean |
<optional> |
If specified change the selectionAPI state of the layer, otherwise return the current state. |
Returns:
The selectionAPI state or the current layer.
- Type
- boolean | this
sticky() → {boolean}
- Description:
Get whether or not the layer is sticky (navigates with the map).
- Source:
- Inherited From:
Returns:
- Type
- boolean
subdomains(subdomainsopt) → {string|Array.<string>|this}
- Description:
Get or set the subdomains used for templating.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
subdomains |
string | Array.<string> |
<optional> |
A comma-separated list, a string of single character subdomains, or a list. |
Returns:
- Type
- string | Array.<string> | this
tileAtPoint(point, level) → {object}
- Description:
Returns the tile indices at the given point.
- Source:
- Inherited From:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
point |
object | The coordinates in pixels relative to the map origin. Properties
|
|||||||||
level |
number | The target zoom level. |
Returns:
The tile indices. This has x
and y
properties.
- Type
- object
tileCropFromBounds(tile) → {object}
- Description:
Get the crop values for a tile based on the tilesMaxBounds function. Returns undefined if the tile should not be cropped.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
tile |
object | The tile to compute crop values for. |
Returns:
Either undefined
or an object with x
and y
values
which is the size in pixels for the tile.
- Type
- object
tilesAtZoom(level) → {object}
- Description:
The number of tiles at the given zoom level. The default implementation just returns
Math.pow(2, z)
.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
level |
number | A zoom level. |
Returns:
The number of tiles in each axis in the form
{x: nx, y: ny}
.
- Type
- object
tilesMaxBounds(level) → {object}
- Description:
The maximum tile bounds at the given zoom level, or null if no special tile bounds.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
level |
number | A zoom level. |
Returns:
The maximum tile bounds in pixels for the specified
level, or null if none specified ({x: width, y: height}
).
- Type
- object
timestamp() → {number}
- Description:
Get time.
- Source:
- Inherited From:
Returns:
The timestamp. This is 0 if the timestamp has never been modified.
- Type
- number
toLevel(coord, level) → {object}
- Description:
Convert a coordinate from layer coordinates to pixel coordinates at the given zoom level.
- Source:
- Inherited From:
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
coord |
object |
Properties
|
|||||||||
level |
number | The zoom level of the new coordinates. |
Returns:
The pixel coordinates with x
and y
.
- Type
- object
toLocal(pt, zoomopt) → {object}
- Description:
Compute local coordinates from the given world coordinates. The tile layer uses units of pixels relative to the world space coordinate origin.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
pt |
object | A point in world space coordinates with |
|
zoom |
number |
<optional> |
If unspecified, use the map zoom. |
Returns:
Local coordinates with x
and y
.
- Type
- object
updateTime() → {geo.timestamp}
- Description:
Return the modified time for the last update that did something.
- Source:
- Inherited From:
Returns:
The update time.
- Type
- geo.timestamp
url(urlopt) → {string|function|this}
- Description:
Get or set the tile url string or function. If changed, load the new tiles.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
url |
string | function |
<optional> |
The new tile url. |
Returns:
- Type
- string | function | this
visible(valopt) → {boolean|this}
- Description:
Get/Set visibility of the layer.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
boolean |
<optional> |
If unspecified, return the visibility, otherwise set it. |
Returns:
Either the visibility (if getting) or the layer (if setting).
- Type
- boolean | this
width() → {number}
- Description:
Return the width of the layer in pixels.
- Source:
- Inherited From:
Returns:
The width of the parent map in pixels.
- Type
- number
zIndex(zIndexopt, allowDuplicateopt) → {number|this}
- Description:
Get or set the z-index of the layer. The z-index controls the display order of the layers in much the same way as the CSS z-index property.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
zIndex |
number |
<optional> |
The new z-index, or undefined to return the current z-index. |
allowDuplicate |
boolean |
<optional> |
When setting the z index, if this is truthy, allow other layers to have the same z-index. Otherwise, ensure that other layers have distinct z-indices from this one. |
Returns:
- Type
- number | this
Type Definitions
spec
- Description:
Object specification for a pixelmap layer.
- Source:
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
color |
geo.geoColor | function |
<optional> |
The color that should be used for each data element. Data elements correspond to the indices in the pixel map. If an index is larger than the number of data elements, it will be transparent. If there is more data than there are indices, it is ignored. |
|||||||||||||
style |
object |
<optional> |
An optional style object that could contain
|
|||||||||||||
data |
array |
<optional> |
A new data array. |
|||||||||||||
crossDomain |
string |
<optional> |
'anonymous'
|
Image CORS attribute. This is
used for the |
||||||||||||
minLevel |
number |
<optional> |
0
|
The minimum zoom level available. |
||||||||||||
maxLevel |
number |
<optional> |
18
|
The maximum zoom level available. |
||||||||||||
tileOverlap |
object |
<optional> |
Pixel overlap between tiles. Properties
|
|||||||||||||
tileWidth |
number |
<optional> |
256
|
The tile width without overlap. |
||||||||||||
tileHeight |
number |
<optional> |
256
|
The tile height without overlap. |
||||||||||||
tilesAtZoom |
function |
<optional> |
null
|
A function that is given a zoom
level and returns |
||||||||||||
cacheSize |
number |
<optional> |
600
|
The maximum number of tiles to cache. The default is 200 if keepLower is false. |
||||||||||||
queue |
geo.fetchQueue |
<optional> |
A fetch queue to use. If unspecified, a new queue is created. |
|||||||||||||
queueSize |
number |
<optional> |
6
|
The queue size. Most browsers make at most 6 requests to any domain, so this should be no more than 6 times the number of subdomains used. |
||||||||||||
initialQueueSize |
number |
<optional> |
0
|
The initial queue size. |
||||||||||||
keepLower |
boolean |
<optional> |
true
|
When truthy, keep lower zoom level tiles when showing high zoom level tiles. This uses more memory but results in smoother transitions. |
||||||||||||
wrapX |
boolean |
<optional> |
true
|
Wrap in the x-direction. |
||||||||||||
wrapY |
boolean |
<optional> |
false
|
Wrap in the y-direction. |
||||||||||||
url |
string | function |
<optional> |
null
|
A function taking the current tile
indices
If this is a string, a template url with {x}, {y}, {z}, and {s} as template variables. {s} picks one of the subdomains parameter and may contain a comma-separated list of subdomains. |
||||||||||||
subdomains |
string | Array.<string> |
<optional> |
"abc"
|
Subdomains to use in template url strings. If a string, this is converted to a list before being passed to a url function. |
||||||||||||
baseUrl |
string |
<optional> |
null
|
If defined, use the old-style base url
instead of the url parameter. This is functionally the same as using a
url of |
||||||||||||
imageFormat |
string |
<optional> |
'png'
|
This is only used if a |
||||||||||||
animationDuration |
number |
<optional> |
0
|
The number of milliseconds for the tile loading animation to occur. Only some renderers support this. |
||||||||||||
attribution |
string |
<optional> |
An attribution to display with the layer (accepts HTML). |
|||||||||||||
tileRounding |
function |
<optional> |
Math.round
|
This function determines
which tiles will be loaded when the map is at a non-integer zoom. For
example, |
||||||||||||
tileOffset |
function |
<optional> |
This function takes a zoom level argument and returns, in units of pixels, the coordinates of the point (0, 0) at the given zoom level relative to the bottom left corner of the domain. |
|||||||||||||
tilesMaxBounds |
function |
<optional> |
null
|
This function takes a zoom level
argument and returns an object with |
||||||||||||
topDown |
boolean |
<optional> |
false
|
True if the gcs is top-down, false if bottom-up (the ingcs does not matter, only the gcs coordinate system). When falsy, this inverts the gcs y-coordinate when calculating local coordinates. |
||||||||||||
idleAfter |
string |
<optional> |
'view'
|
Consider the layer as idle once a specific set of tiles is loaded. 'view' is when all tiles in view are loaded. 'all' is when tiles in view and tiles that were once requested have been loaded (this corresponds to having all network activity finished). |
||||||||||||
baseQuad |
object |
<optional> |
A quad feature element to draw before below
any tile layers. If specified, this uses the quad defaults, so this is a
|
|||||||||||||
nearestPixel |
boolean | number |
<optional> |
If true, image quads are rendered with near-neighbor sampling. If false, with interpolated sampling. If a number, interpolate at that zoom level or below and nearest neighbor at that zoom level or above. |
|||||||||||||
id |
number |
<optional> |
The id of the layer. Defaults to a increasing sequence. |
|||||||||||||
map |
geo.map |
<optional> |
null
|
Parent map of the layer. |
||||||||||||
renderer |
string | geo.renderer |
<optional> |
Renderer to associate with the
layer. If not specified, either |
|||||||||||||
autoshareRenderer |
boolean | string |
<optional> |
true
|
If truthy and the
renderer supports it, auto-share renderers between layers. Currently,
auto-sharing can only occur for webgl renderers and adjacent layers. If
|
||||||||||||
canvas |
HTMLElement |
<optional> |
If specified, use this canvas rather than a canvas associaied with the renderer directly. Renderers may not support sharing a canvas. |
|||||||||||||
annotations |
Array.<string> | object |
<optional> |
A list of annotations that will be
used on this layer, used to select a renderer. Instead of a list, if
this is an object, the keys are the annotation names, and the values are
each a list of modes that will be used with that annotation. See
|
|||||||||||||
features |
Array.<string> |
<optional> |
A list of features that will be used on this
layer, used to select a renderer. Features are the basic feature names
(e.g., |
|||||||||||||
active |
boolean |
<optional> |
true
|
Truthy if the layer has the |
||||||||||||
opacity |
number |
<optional> |
1
|
The layer opacity on a scale of [0-1]. |
||||||||||||
name |
string |
<optional> |
''
|
A name for the layer for user convenience. If
specified, this is also the |
||||||||||||
selectionAPI |
boolean |
<optional> |
true
|
Truthy if the layer can generate selection and other interaction events. |
||||||||||||
sticky |
boolean |
<optional> |
true
|
Truthy if the layer should navigate with the map. |
||||||||||||
visible |
boolean |
<optional> |
true
|
Truthy if the layer is visible. |
||||||||||||
zIndex |
number |
<optional> |
The z-index to assign to the layer (defaults to the index of the layer inside the map). |
Object specification for a pixelmap layer.