ALKMaps.Renderer.NG

Inherits from

Summary
ALKMaps.Renderer.NG
Constants
labelNodeType{String} The node type for text label containers.
Constructor
ALKMaps.Renderer.NG
Functions
updateDimensions
resize
drawFeatureDraw the feature.
drawTextFunction for drawing text labels.

Constants

labelNodeType

{String} The node type for text label containers.  To be defined by subclasses.

Constructor

ALKMaps.Renderer.NG

Parameters

containerID{String}
options{Object} options for this renderer.  Supported options are:
  • yOrdering - {Boolean} Whether to use y-ordering
  • zIndexing - {Boolean} Whether to use z-indexing.  Will be ignored if yOrdering is set to true.

Functions

updateDimensions

updateDimensions: function(zoomChanged)
To be extended by subclasseshere we set positioning related styles on HTML elements, subclasses have to do the same for renderer specific elements (e.g. viewBox, width and height of the rendererRoot)

Parameters

zoomChanged{Boolean} Has the zoom changed?  If so, subclasses may have to update feature styles/dimensions.

resize

drawFeature

drawFeature: function(feature,
style)

Draw the feature.  The optional style argument can be used to override the feature’s own style.  This method should only be called from layer.drawFeature().

Parameters

feature{ALKMaps.Feature.Vector}
style{<Object>}

Returns

{Boolean} true if the feature has been drawn completely, false if not, undefined if the feature had no geometry

drawText

drawText: function(featureId,
style,
location)

Function for drawing text labels.  This method is only called by the renderer itself.

Parameters

featureId{String|DOMElement}
style{Object}
location{ALKMaps.Geometry.Point}, will be modified inline

Returns

{DOMElement} container holding the text label (to be populated by subclasses)

updateDimensions: function(zoomChanged)
drawFeature: function(feature,
style)
Draw the feature.
drawText: function(featureId,
style,
location)
Function for drawing text labels.
This is another virtual class in that it should never be instantiated by itself as a Renderer.
Vector features use the ALKMaps.Geometry classes as geometry description.
Point geometry class.
Close