AbstractTile
Summary
Representation of image tile layer. Tile layers are expected to pull in tile images from an API.
Constructor
aeris.maps.layers.AbstractTile
Syntax
aeris.maps.layers.AbstractTile
()
Summary
Item Index
Methods
Properties
Attributes
Events
Methods
createStrategy_
Syntax
Summary
Create a {aeris.maps.AbstractStrategy} instance.
Override to adjust how strategy objects are instantiated.
Parameters:
-
Strategy
FunctionAbstractStrategy object ctor.
Returns:
destroy
Syntax
destroy
()
Summary
fadeTo
Syntax
fadeTo
-
targetOpacity
-
duration
Summary
Experimental layer fade animation.
getMap
Syntax
getMap
()
Summary
getUrl
Syntax
Summary
Returns the url for requesting tiles. The url will be interpolated by replacing special variables with calculated values. Special variables should be wrapped in brackets.
- d - a randomly selected subdomain
- z - the calculated zoom factor
- x - the tile's starting x coordinate
- y - the tile's starting y coordinate
Returns:
default url for tile image.
hide
Syntax
hide
()
Summary
Hide the layer.
preload
Syntax
preload
-
map
Summary
Preloads the tile layer images.
Parameters:
-
map
MapThe layer will be temporarily set to this map, in order to trigger it's tile images to start loading.
removeStrategy
Syntax
removeStrategy
()
Summary
Remove and clean up the StrategyObject's strategy.
resetStrategy
Syntax
resetStrategy
()
Summary
Reset the rendering strategy used by the object. Useful for re-enabled a strategy which has previously been removed with StrategyObject#removeStrategy
setMap
Syntax
setMap
()
Summary
setOpacity
Syntax
setOpacity
-
opacity
Summary
Sets the opacity of the tile layer.
Parameters:
-
opacity
NumberBetween 0 and 1.
setStrategy
Syntax
setStrategy
-
Strategy
Summary
Set the strategy to use for rendering the StrategyObject.
Parameters:
-
Strategy
FunctionConstructor for an {aeris.maps.AbstractStrategy} object.
setZIndex
Syntax
setZIndex
()
Summary
Sets the zIndex of a tile layer.
show
Syntax
show
()
Summary
Show the layer.
validate
Syntax
validate
()
Summary
Properties
strategy_
Syntax
strategy_
aeris.maps.Strategy Strategy constructor.
Summary
Default {aeris.Strategy} implementation
StrategyType_
Syntax
StrategyType_
function():aeris.maps.AbstractStrategy
private
Summary
Attributes
name
string
The name of the tile layer.
The value of the name can be anything, though some map views will display this name in layer-select controls.
server
string
The server used for requesting tiles. The server will be interpolated by replacing special variables with calculated values. Special variables should be wrapped with '{' and '}'
- {d} - a randomly selected subdomain
Events
load
Syntax
load
Summary
Fires when tile images are loaded.
load:reset
Syntax
load:reset
Summary
Firest when tile images must be re-loaded (eg. if the map bounds change)
strategy:set
Syntax
strategy:set
Summary
When a strategy is set on the object.
Event Payload:
-
strategy
aeris.maps.AbstractStrategy