Replace goog.getUid with ol.getUid
This commit is contained in:
@@ -129,7 +129,7 @@ ol.source.Cluster.prototype.cluster_ = function() {
|
||||
|
||||
for (var i = 0, ii = features.length; i < ii; i++) {
|
||||
var feature = features[i];
|
||||
if (!(goog.getUid(feature).toString() in clustered)) {
|
||||
if (!(ol.getUid(feature).toString() in clustered)) {
|
||||
var geometry = this.geometryFunction_(feature);
|
||||
if (geometry) {
|
||||
var coordinates = geometry.getCoordinates();
|
||||
@@ -139,7 +139,7 @@ ol.source.Cluster.prototype.cluster_ = function() {
|
||||
var neighbors = this.source_.getFeaturesInExtent(extent);
|
||||
goog.asserts.assert(neighbors.length >= 1, 'at least one neighbor found');
|
||||
neighbors = neighbors.filter(function(neighbor) {
|
||||
var uid = goog.getUid(neighbor).toString();
|
||||
var uid = ol.getUid(neighbor).toString();
|
||||
if (!(uid in clustered)) {
|
||||
clustered[uid] = true;
|
||||
return true;
|
||||
|
||||
@@ -170,7 +170,7 @@ ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
|
||||
*/
|
||||
function(feature) {
|
||||
goog.asserts.assert(feature !== undefined, 'passed a feature');
|
||||
var key = goog.getUid(feature).toString();
|
||||
var key = ol.getUid(feature).toString();
|
||||
if (!(key in features)) {
|
||||
features[key] = true;
|
||||
return callback(feature);
|
||||
|
||||
@@ -96,7 +96,7 @@ ol.source.Raster = function(options) {
|
||||
var layerStatesArray = ol.source.Raster.getLayerStatesArray_(this.renderers_);
|
||||
var layerStates = {};
|
||||
for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
|
||||
layerStates[goog.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
|
||||
layerStates[ol.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,7 +48,7 @@ ol.inherits(ol.DebugTile_, ol.Tile);
|
||||
* @return {HTMLCanvasElement} Image.
|
||||
*/
|
||||
ol.DebugTile_.prototype.getImage = function(opt_context) {
|
||||
var key = opt_context !== undefined ? goog.getUid(opt_context) : -1;
|
||||
var key = opt_context !== undefined ? ol.getUid(opt_context) : -1;
|
||||
if (key in this.canvasByContext_) {
|
||||
return this.canvasByContext_[key];
|
||||
} else {
|
||||
|
||||
@@ -170,7 +170,7 @@ ol.source.TileImage.prototype.getTileGridForProjection = function(projection) {
|
||||
(!thisProj || ol.proj.equivalent(thisProj, projection))) {
|
||||
return this.tileGrid;
|
||||
} else {
|
||||
var projKey = goog.getUid(projection).toString();
|
||||
var projKey = ol.getUid(projection).toString();
|
||||
if (!(projKey in this.tileGridForProjection)) {
|
||||
this.tileGridForProjection[projKey] =
|
||||
ol.tilegrid.getForProjection(projection);
|
||||
@@ -191,7 +191,7 @@ ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
|
||||
if (!thisProj || ol.proj.equivalent(thisProj, projection)) {
|
||||
return this.tileCache;
|
||||
} else {
|
||||
var projKey = goog.getUid(projection).toString();
|
||||
var projKey = ol.getUid(projection).toString();
|
||||
if (!(projKey in this.tileCacheForProjection)) {
|
||||
this.tileCacheForProjection[projKey] = new ol.TileCache();
|
||||
}
|
||||
@@ -364,7 +364,7 @@ ol.source.TileImage.prototype.setTileGridForProjection = function(projection, ti
|
||||
if (ol.ENABLE_RASTER_REPROJECTION) {
|
||||
var proj = ol.proj.get(projection);
|
||||
if (proj) {
|
||||
var projKey = goog.getUid(proj).toString();
|
||||
var projKey = ol.getUid(proj).toString();
|
||||
if (!(projKey in this.tileGridForProjection)) {
|
||||
this.tileGridForProjection[projKey] = tilegrid;
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ ol.source.Vector = function(opt_options) {
|
||||
this.idIndex_ = {};
|
||||
|
||||
/**
|
||||
* A lookup of features without id (keyed by goog.getUid(feature)).
|
||||
* A lookup of features without id (keyed by ol.getUid(feature)).
|
||||
* @private
|
||||
* @type {Object.<string, ol.Feature>}
|
||||
*/
|
||||
@@ -205,7 +205,7 @@ ol.source.Vector.prototype.addFeature = function(feature) {
|
||||
* @protected
|
||||
*/
|
||||
ol.source.Vector.prototype.addFeatureInternal = function(feature) {
|
||||
var featureKey = goog.getUid(feature).toString();
|
||||
var featureKey = ol.getUid(feature).toString();
|
||||
|
||||
if (!this.addToIndex_(featureKey, feature)) {
|
||||
return;
|
||||
@@ -295,7 +295,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
|
||||
|
||||
for (i = 0, length = features.length; i < length; i++) {
|
||||
feature = features[i];
|
||||
featureKey = goog.getUid(feature).toString();
|
||||
featureKey = ol.getUid(feature).toString();
|
||||
if (this.addToIndex_(featureKey, feature)) {
|
||||
newFeatures.push(feature);
|
||||
}
|
||||
@@ -303,7 +303,7 @@ ol.source.Vector.prototype.addFeaturesInternal = function(features) {
|
||||
|
||||
for (i = 0, length = newFeatures.length; i < length; i++) {
|
||||
feature = newFeatures[i];
|
||||
featureKey = goog.getUid(feature).toString();
|
||||
featureKey = ol.getUid(feature).toString();
|
||||
this.setupChangeEvents_(featureKey, feature);
|
||||
|
||||
var geometry = feature.getGeometry();
|
||||
@@ -721,7 +721,7 @@ ol.source.Vector.prototype.getUrl = function() {
|
||||
*/
|
||||
ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
|
||||
var feature = /** @type {ol.Feature} */ (event.target);
|
||||
var featureKey = goog.getUid(feature).toString();
|
||||
var featureKey = ol.getUid(feature).toString();
|
||||
var geometry = feature.getGeometry();
|
||||
if (!geometry) {
|
||||
if (!(featureKey in this.nullGeometryFeatures_)) {
|
||||
@@ -820,7 +820,7 @@ ol.source.Vector.prototype.loadFeatures = function(
|
||||
* @api stable
|
||||
*/
|
||||
ol.source.Vector.prototype.removeFeature = function(feature) {
|
||||
var featureKey = goog.getUid(feature).toString();
|
||||
var featureKey = ol.getUid(feature).toString();
|
||||
if (featureKey in this.nullGeometryFeatures_) {
|
||||
delete this.nullGeometryFeatures_[featureKey];
|
||||
} else {
|
||||
@@ -839,7 +839,7 @@ ol.source.Vector.prototype.removeFeature = function(feature) {
|
||||
* @protected
|
||||
*/
|
||||
ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
|
||||
var featureKey = goog.getUid(feature).toString();
|
||||
var featureKey = ol.getUid(feature).toString();
|
||||
goog.asserts.assert(featureKey in this.featureChangeKeys_,
|
||||
'featureKey exists in featureChangeKeys');
|
||||
this.featureChangeKeys_[featureKey].forEach(ol.events.unlistenByKey);
|
||||
|
||||
@@ -165,7 +165,7 @@ ol.inherits(ol.source.ZoomifyTile_, ol.ImageTile);
|
||||
ol.source.ZoomifyTile_.prototype.getImage = function(opt_context) {
|
||||
var tileSize = ol.DEFAULT_TILE_SIZE;
|
||||
var key = opt_context !== undefined ?
|
||||
goog.getUid(opt_context).toString() : '';
|
||||
ol.getUid(opt_context).toString() : '';
|
||||
if (key in this.zoomifyImageByContext_) {
|
||||
return this.zoomifyImageByContext_[key];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user