preemptive is now true by default + improved documentation
This commit is contained in:
@@ -12,8 +12,7 @@ var mapLayer = new ol.layer.Tile({
|
||||
});
|
||||
|
||||
var gridSource = new ol.source.TileUTFGrid({
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
|
||||
preemptive: true
|
||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
|
||||
});
|
||||
|
||||
var gridLayer = new ol.layer.Tile({source: gridSource});
|
||||
|
||||
@@ -3550,9 +3550,12 @@ olx.source.TileUTFGridOptions;
|
||||
|
||||
|
||||
/**
|
||||
* If true, the TileUTFGrid source loads the tiles based on their "visibility".
|
||||
* This can be used to improve the speed of response, but increases traffic.
|
||||
* Default is `false`.
|
||||
* If `true` the TileUTFGrid source loads the tiles based on their "visibility".
|
||||
* This improves the speed of response, but increases traffic.
|
||||
* Note that if set to `false`, you need to pass `true` as `opt_request`
|
||||
* to the `forDataAtCoordinateAndResolution` method otherwise no data
|
||||
* will ever be loaded.
|
||||
* Default is `true`.
|
||||
* @type {boolean|undefined}
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -38,7 +38,7 @@ ol.source.TileUTFGrid = function(options) {
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.preemptive_ = goog.isDef(options.preemptive) ?
|
||||
options.preemptive : false;
|
||||
options.preemptive : true;
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user