Skip to content

Commit

Permalink
Merge pull request mapbox#554 from mapbox/fix-map-featuresAt
Browse files Browse the repository at this point in the history
Fixes for map.featuresAt
  • Loading branch information
yhahn committed Jul 19, 2014
2 parents c0a924b + ba2771e commit 82bfb8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js/geometry/featuretree.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,11 @@ FeatureTree.prototype.queryBuckets = function(matching, x, y, radius, params, ca


function geometryContainsPoint(rings, type, p, radius) {
if (type === 'point') {
if (type === 'Point') {
return pointContainsPoint(rings, p, radius);
} else if (type === 'line') {
} else if (type === 'LineString') {
return lineContainsPoint(rings, p, radius);
} else if (type === 'fill') {
} else if (type === 'Polygon') {
return polyContainsPoint(rings, p) ? true : lineContainsPoint(rings, p, radius);
} else {
return false;
Expand Down
2 changes: 1 addition & 1 deletion js/ui/vectortile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ VectorTile.prototype.featuresAt = function(pos, params, callback) {
x: pos.x,
y: pos.y,
scale: pos.scale,
source: this.source.id,
params: params
}, callback, this.workerID);

};

VectorTile.prototype.onTileLoad = function(data) {
Expand Down

0 comments on commit 82bfb8b

Please sign in to comment.