靜態unSets the tile grid to use when reprojecting the tiles to the given projection instead of the default tile grid for the projection.
This can be useful when the default tile grid cannot be created (e.g. projection has no extent defined) or for optimization reasons (custom tile size, resolutions, ...).
Projection.
Tile grid to use for the projection.
Set the tile load function of the source.
Tile load function.
Set the tile URL function of the source.
Tile URL function.
可選opt_key: stringOptional new tile key for the source.
Set the attributions of the source.
Attributions.
Can be passed as string, Array<string>, {@link ol.Attribution},
Array<{@link ol.Attribution}> or undefined.
Listen for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
函數Removes an event listener using the key returned by on() or once().
Note that using the ol.Observable.unByKey static function is to
be preferred.
可選opt_options: olx.source.XYZOptionsXYZ options.
Layer source for tile data with URLs in a set XYZ format that are
defined in a URL template. By default, this follows the widely-used
Google grid where x 0 and y 0 are in the top left. Grids like
TMS where x 0 and y 0 are in the bottom left can be used by
using the {-y} placeholder in the URL template, so long as the
source does not have a custom tile grid. In this case,
ol.source.TileImage can be used with a tileUrlFunction
such as:
tileUrlFunction: function(coordinate) { return 'http://mapserver.com/' + coordinate[0] + '/' + coordinate[1] + '/' + coordinate[2] + '.png'; }
Classdesc
Layer source for tile data with URLs in a set XYZ format that are defined in a URL template. By default, this follows the widely-used Google grid where
x0 andy0 are in the top left. Grids like TMS wherex0 andy0 are in the bottom left can be used by using the{-y}placeholder in the URL template, so long as the source does not have a custom tile grid. In this case, ol.source.TileImage can be used with atileUrlFunctionsuch as:tileUrlFunction: function(coordinate) { return 'http://mapserver.com/' + coordinate[0] + '/' + coordinate[1] + '/' + coordinate[2] + '.png'; }
參數: opt_options
XYZ options.
Api
stable