Replace goog.getUid with ol.getUid

This commit is contained in:
Peter Robins
2016-07-20 10:50:16 +00:00
parent 29230d48b3
commit f8f2cd11d5
40 changed files with 104 additions and 82 deletions

View File

@@ -175,7 +175,7 @@ ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate = function(c
*/
function(feature) {
goog.asserts.assert(feature !== undefined, 'received a feature');
var key = goog.getUid(feature).toString();
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
return callback.call(thisArg, feature, layer);

View File

@@ -315,7 +315,7 @@ ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = functi
*/
function(feature) {
goog.asserts.assert(feature, 'received a feature');
var key = goog.getUid(feature).toString();
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
return callback.call(thisArg, feature, layer);

View File

@@ -194,7 +194,7 @@ ol.renderer.dom.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coor
*/
function(feature) {
goog.asserts.assert(feature !== undefined, 'received a feature');
var key = goog.getUid(feature).toString();
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
return callback.call(thisArg, feature, layer);

View File

@@ -185,7 +185,7 @@ ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSourc
* @param {olx.FrameState} frameState Frame state.
*/
var postRenderFunction = function(tileSource, map, frameState) {
var tileSourceKey = goog.getUid(tileSource).toString();
var tileSourceKey = ol.getUid(tileSource).toString();
tileSource.expireCache(frameState.viewState.projection,
frameState.usedTiles[tileSourceKey]);
}.bind(null, tileSource);
@@ -208,7 +208,7 @@ ol.renderer.Layer.prototype.updateAttributions = function(attributionsSet, attri
var attribution, i, ii;
for (i = 0, ii = attributions.length; i < ii; ++i) {
attribution = attributions[i];
attributionsSet[goog.getUid(attribution).toString()] = attribution;
attributionsSet[ol.getUid(attribution).toString()] = attribution;
}
}
};
@@ -242,7 +242,7 @@ ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
*/
ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
// FIXME should we use tilesToDrawByZ instead?
var tileSourceKey = goog.getUid(tileSource).toString();
var tileSourceKey = ol.getUid(tileSource).toString();
var zKey = z.toString();
if (tileSourceKey in usedTiles) {
if (zKey in usedTiles[tileSourceKey]) {
@@ -295,7 +295,7 @@ ol.renderer.Layer.prototype.snapCenterToPixel = function(center, resolution, siz
ol.renderer.Layer.prototype.manageTilePyramid = function(
frameState, tileSource, tileGrid, pixelRatio, projection, extent,
currentZ, preload, opt_tileCallback, opt_this) {
var tileSourceKey = goog.getUid(tileSource).toString();
var tileSourceKey = ol.getUid(tileSource).toString();
if (!(tileSourceKey in frameState.wantedTiles)) {
frameState.wantedTiles[tileSourceKey] = {};
}

View File

@@ -137,8 +137,8 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, fram
*/
function forEachFeatureAtCoordinate(feature, layer) {
goog.asserts.assert(feature !== undefined, 'received a feature');
var key = goog.getUid(feature).toString();
var managed = frameState.layerStates[goog.getUid(layer)].managed;
var key = ol.getUid(feature).toString();
var managed = frameState.layerStates[ol.getUid(layer)].managed;
if (!(key in frameState.skippedFeatureUids && !managed)) {
return callback.call(thisArg, feature, managed ? layer : null);
}
@@ -245,7 +245,7 @@ ol.renderer.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameSta
* @return {ol.renderer.Layer} Layer renderer.
*/
ol.renderer.Map.prototype.getLayerRenderer = function(layer) {
var layerKey = goog.getUid(layer).toString();
var layerKey = ol.getUid(layer).toString();
if (layerKey in this.layerRenderers_) {
return this.layerRenderers_[layerKey];
} else {

View File

@@ -122,7 +122,7 @@ ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(co
*/
function(feature) {
goog.asserts.assert(feature !== undefined, 'received a feature');
var key = goog.getUid(feature).toString();
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;
return callback.call(thisArg, feature, layer);