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({
|
var gridSource = new ol.source.TileUTFGrid({
|
||||||
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json',
|
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.json'
|
||||||
preemptive: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var gridLayer = new ol.layer.Tile({source: gridSource});
|
var gridLayer = new ol.layer.Tile({source: gridSource});
|
||||||
|
|||||||
+6
-3
@@ -3550,9 +3550,12 @@ olx.source.TileUTFGridOptions;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If true, the TileUTFGrid source loads the tiles based on their "visibility".
|
* 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.
|
* This improves the speed of response, but increases traffic.
|
||||||
* Default is `false`.
|
* 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}
|
* @type {boolean|undefined}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ ol.source.TileUTFGrid = function(options) {
|
|||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
this.preemptive_ = goog.isDef(options.preemptive) ?
|
this.preemptive_ = goog.isDef(options.preemptive) ?
|
||||||
options.preemptive : false;
|
options.preemptive : true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
Reference in New Issue
Block a user