(protected) new renderer.TileLayerCanvasRenderer(layer) [source]
Parameter | Type | Description |
---|---|---|
layer
|
TileLayer | TileLayer to render |
Extends:
Methods
(inherited) render() [source]
Render the layer.
Call checkResources
Inherited From:
(abstract) (inherited) checkResources() [source]
Check if has any external resources to load
If yes, load the resources before calling draw method
Inherited From:
Returns:
Array.<Array>: an array of resource arrays [ [url1, width, height], [url2, width, height], [url3, width, height] .. ](abstract) (inherited) draw() [source]
a required abstract method to implement
draw the layer when map is not interacting
(abstract) (inherited) drawOnInteracting(eventParam) [source]
an optional abstract method to implement
draw the layer when map is interacting (moving/zooming/dragrotating)
Parameter | Type | Description |
---|---|---|
eventParam
|
Object | event parameters |
(inherited) needToRedraw() [source]
Ask whether the layer renderer needs to redraw
Returns:
Boolean:(inherited) onSkipDrawOnInteracting() [source]
A callback for overriding when drawOnInteracting is skipped due to low fps
Inherited From:
(inherited) mustRenderOnInteracting() [source]
Whether must call render instead of drawOnInteracting when map is interacting
Inherited From:
(inherited) setToRedraw() [source]
Set to redraw, ask map to call draw/drawOnInteracting to redraw the layer
Inherited From:
(inherited) setCanvasUpdated() [source]
Mark layer's canvas updated
Inherited From:
(inherited) remove() [source]
Remove the renderer, will be called when layer is removed
Inherited From:
(inherited) getMap() [source]
Get map
Inherited From:
Returns:
Map:(inherited) getCanvasImage() [source]
Get renderer's Canvas image object
Inherited From:
Returns:
HTMLCanvasElement:(inherited) clear() [source]
Clear canvas
Inherited From:
(inherited) isBlank() [source]
A method to help improve performance.
If you are sure that layer's canvas is blank, returns true to save unnecessary layer works of maps.
Inherited From:
Returns:
Boolean:(inherited) show() [source]
Show the layer
Inherited From:
(inherited) hide() [source]
Hide the layer
Inherited From:
(inherited) setZIndex() [source]
Set z-index of layer
Inherited From:
(inherited) hitDetect(point) [source]
Detect if there is anything painted on the given point
Parameter | Type | Description |
---|---|---|
point
|
Point | containerPoint |
Returns:
Boolean:(inherited) loadResources(resourceUrls, onComplete, context) [source]
loadResource from resourceUrls
Parameter | Type | Description |
---|---|---|
resourceUrls
|
Array.<String> | Array of urls to load |
onComplete
|
function | callback after loading complete |
context
|
Object | callback's context |
Inherited From:
Returns:
Array.<Promise>:(inherited) createCanvas() [source]
Create renderer's Canvas
Inherited From:
(inherited) resizeCanvas(canvasSize) [source]
Resize the canvas
Parameter | Type | Description |
---|---|---|
canvasSize
|
Size | the size resizing to |
Inherited From:
(inherited) clearCanvas() [source]
Clear the canvas to blank
Inherited From:
(inherited) prepareCanvas() [source]
Prepare the canvas for rendering.
1. Clear the canvas to blank.
2. Clip the canvas by mask if there is any and return the mask's extent
1. Clear the canvas to blank.
2. Clip the canvas by mask if there is any and return the mask's extent
Inherited From:
Returns:
PointExtent: mask's extent of current zoom's 2d point.(inherited) getViewExtent() [source]
Get renderer's current view extent in 2d point
Inherited From:
Returns:
Object: view.extent, view.maskExtent, view.zoom, view.northWest(inherited) completeRender() [source]
call when rendering completes, this will fire necessary events and call setCanvasUpdated
Inherited From:
(inherited) getEvents() [source]
Get renderer's event map registered on the map
Inherited From:
Returns:
Object: events(inherited) onZoomStart(param) [source]
/**
onZoomStart
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
(inherited) onZoomEnd(param) [source]
onZoomEnd
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
(inherited) onZooming(param) [source]
onZooming
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onMoveStart(param) [source]
onMoveStart
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onMoving(param) [source]
onMoving
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onMoveEnd(param) [source]
onMoveEnd
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onResize(param) [source]
onResize
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onDragRotateStart(param) [source]
onDragRotateStart
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onDragRotating(param) [source]
onDragRotating
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onDragRotateEnd(param) [source]
onDragRotateEnd
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) onSpatialReferenceChange(param) [source]
onSpatialReferenceChange
Parameter | Type | Description |
---|---|---|
param
|
Object | event parameters |
Inherited From:
(inherited) getDrawTime() [source]
Get ellapsed time of previous drawing
Inherited From:
Returns:
Number:(inherited) callInitHooks() [source]
Visit and call all the init hooks defined on Class and its parents.
Inherited From:
Returns:
Class: this(inherited) setOptions(options) [source]
Merges options with the default options of the object.
Parameter | Type | Description |
---|---|---|
options
|
Object | options to set |
Inherited From:
Returns:
Class: this(inherited) config(conf) [source]
1. Return object's options if no parameter is provided.
2. update an option and enable/disable the handler if a handler with the same name existed.
2. update an option and enable/disable the handler if a handler with the same name existed.
// Get marker's options;
var options = marker.config();
// Set map's option "draggable" to false and disable map's draggable handler.
map.config('draggable', false);
// You can update more than one options like this:
map.config({
'scrollWheelZoom' : false,
'doubleClickZoom' : false
});
Parameter | Type | Description |
---|---|---|
conf
|
Object | config to update |
Inherited From:
Returns:
Class: this(inherited) onConfig() [source]
Default callback when config is called