Skip to content

Commit

Permalink
Tidy Up Radius Check
Browse files Browse the repository at this point in the history
  • Loading branch information
danbatsb committed Sep 3, 2015
1 parent 3815cb6 commit b8e84d7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/tasks/LayerInfoTask.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ define(["dojo/Deferred", "esri/layers/FeatureLayer", "esri/renderers/jsonUtils",
};

this.queryLayer = function (maxRecords) {
var _this = this, result = new Deferred(), query, queryTask, geom;
var _this = this, result = new Deferred(), query, queryTask, geom, searchradius;

if (parseFloat(_this.properties.searchRadius) > 0) {
searchradius = parseFloat(_this.properties.searchRadius);

if (searchradius > 0) {
geom = new Circle({
center: [_this.properties.currentPoint.x, _this.properties.currentPoint.y],
geodesic: true,
radius: _this.properties.searchRadius,
radius: searchradius,
radiusUnit: _this.getUnits(_this.properties.distanceUnits)
});
}
Expand Down

0 comments on commit b8e84d7

Please sign in to comment.