Introduce ol.render.Feature

This commit is contained in:
Andreas Hocevar
2015-09-13 22:14:46 +09:00
parent 63629e1ee2
commit 6e2f82c397
27 changed files with 380 additions and 108 deletions
+1 -1
View File
@@ -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) {
+2 -1
View File
@@ -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
*/
+2 -1
View File
@@ -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
+2 -1
View File
@@ -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);
}
}
+1 -1
View File
@@ -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,
+1 -12
View File
@@ -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
*/