Skip to content

Commit

Permalink
remove interactive property and make all layers interactive
Browse files Browse the repository at this point in the history
fix #1479
  • Loading branch information
ansis committed Mar 9, 2016
1 parent 61fe35a commit 1166dfc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion js/data/bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function Bucket(options) {
this.features = [];
this.id = this.layer.id;
this['source-layer'] = this.layer['source-layer'];
this.interactive = this.layer.interactive;
this.minZoom = this.layer.minzoom;
this.maxZoom = this.layer.maxzoom;

Expand Down
2 changes: 1 addition & 1 deletion js/source/worker_tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ WorkerTile.prototype.parse = function(data, layers, actor, callback) {
bucket.populateBuffers(collisionTile, stacks, icons);
var time = Date.now() - now;

if (bucket.interactive && bucket.type !== 'symbol') {
if (bucket.type !== 'symbol') {
for (var i = 0; i < bucket.features.length; i++) {
var feature = bucket.features[i];
tile.featureTree.insert(feature.bbox(), bucket.layerIDs, feature);
Expand Down
4 changes: 1 addition & 3 deletions js/style/style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function StyleLayer(layer, refLayer) {
this.minzoom = (refLayer || layer).minzoom;
this.maxzoom = (refLayer || layer).maxzoom;
this.filter = (refLayer || layer).filter;
this.interactive = (refLayer || layer).interactive;

this.paint = {};
this.layout = {};
Expand Down Expand Up @@ -262,8 +261,7 @@ StyleLayer.prototype = util.inherit(Evented, {
'ref': this.ref,
'metadata': this.metadata,
'minzoom': this.minzoom,
'maxzoom': this.maxzoom,
'interactive': this.interactive
'maxzoom': this.maxzoom
};

for (var klass in this._paintDeclarations) {
Expand Down
4 changes: 0 additions & 4 deletions js/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,6 @@ util.extend(Map.prototype, /** @lends Map.prototype */{
/**
* Query features at a point, or within a certain radius thereof.
*
* To use this method, you must set the style property `"interactive": true` on layers you wish to query.
*
* @param {Array<number>} point [x, y] pixel coordinates
* @param {Object} params
* @param {number} [params.radius=0] Radius in pixels to search in
Expand All @@ -336,8 +334,6 @@ util.extend(Map.prototype, /** @lends Map.prototype */{
/**
* Query features within a rectangle.
*
* To use this method, you must set the style property `"interactive": true` on layers you wish to query.
*
* @param {Array<Point>|Array<Array<number>>} [bounds] Coordinates of opposite corners of bounding rectangle, in pixel coordinates. Optional: use entire viewport if omitted.
* @param {Object} params
* @param {string|Array<string>} [params.layer] Only return features from a given layer or layers
Expand Down

0 comments on commit 1166dfc

Please sign in to comment.