Introduce ol.render.Feature
This commit is contained in:
@@ -162,7 +162,7 @@ ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
|
||||
return this.replayGroup_.forEachFeatureAtCoordinate(
|
||||
coordinate, resolution, 0, skippedFeatureUids,
|
||||
/**
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {ol.Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -89,7 +89,8 @@ goog.inherits(ol.source.Source, ol.Object);
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
|
||||
* @param {function(ol.Feature): T} callback Feature callback.
|
||||
* @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
|
||||
@@ -19,6 +19,7 @@ goog.require('ol.tilegrid.TileGrid');
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* cacheSize: (number|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* logo: (string|olx.LogoOptions|undefined),
|
||||
* opaque: (boolean|undefined),
|
||||
@@ -77,7 +78,7 @@ ol.source.Tile = function(options) {
|
||||
* @protected
|
||||
* @type {ol.TileCache}
|
||||
*/
|
||||
this.tileCache = new ol.TileCache();
|
||||
this.tileCache = new ol.TileCache(options.cacheSize);
|
||||
|
||||
/**
|
||||
* @protected
|
||||
|
||||
@@ -310,7 +310,8 @@ ol.source.TileVector.prototype.loadFeatures =
|
||||
this.tileLoadFunction_(url, goog.bind(tileSuccess, this));
|
||||
} else {
|
||||
var loader = ol.featureloader.loadFeaturesXhr(url,
|
||||
/** @type {ol.format.Feature} */ (this.format_), tileSuccess);
|
||||
/** @type {ol.format.Feature} */ (this.format_), tileSuccess,
|
||||
goog.nullFunction);
|
||||
loader.call(this, extent, resolution, projection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ goog.require('ol.source.TileEvent');
|
||||
|
||||
/**
|
||||
* @typedef {{attributions: (Array.<ol.Attribution>|undefined),
|
||||
* cacheSize: (number|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* logo: (string|olx.LogoOptions|undefined),
|
||||
* opaque: (boolean|undefined),
|
||||
@@ -40,6 +39,7 @@ ol.source.UrlTile = function(options) {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
cacheSize: options.cacheSize,
|
||||
extent: options.extent,
|
||||
logo: options.logo,
|
||||
opaque: options.opaque,
|
||||
|
||||
@@ -24,6 +24,7 @@ ol.source.VectorTile = function(options) {
|
||||
|
||||
goog.base(this, {
|
||||
attributions: options.attributions,
|
||||
cacheSize: ol.DEFAULT_TILE_CACHE_HIGH_WATER_MARK / 16,
|
||||
extent: options.extent,
|
||||
logo: options.logo,
|
||||
opaque: options.opaque,
|
||||
@@ -38,10 +39,6 @@ ol.source.VectorTile = function(options) {
|
||||
wrapX: options.wrapX
|
||||
});
|
||||
|
||||
this.assumeRightHandedPolygons_ =
|
||||
goog.isDef(options.assumeRightHandedPolygons) ?
|
||||
options.assumeRightHandedPolygons : false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.format.Feature}
|
||||
@@ -60,14 +57,6 @@ ol.source.VectorTile = function(options) {
|
||||
goog.inherits(ol.source.VectorTile, ol.source.UrlTile);
|
||||
|
||||
|
||||
/**
|
||||
* @return {boolean} Assume right handed polygons.
|
||||
*/
|
||||
ol.source.VectorTile.prototype.getRightHandedPolygons = function() {
|
||||
return this.assumeRightHandedPolygons_;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user