Skip to content

Commit

Permalink
just call accuracy function when setting r attr
Browse files Browse the repository at this point in the history
ref #5587
  • Loading branch information
maxgrossman committed Dec 19, 2018
1 parent b010f42 commit 83c0843
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/svg/geolocate.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ export function svgGeolocate(projection, context, dispatch) {
}

function update() {
var geolocation = { loc: [_position.coords.longitude, _position.coords.latitude] },
pixelAccuracy = accuracy(_position.coords.accuracy, geolocation.loc);

var geolocation = { loc: [_position.coords.longitude, _position.coords.latitude] };

var groups = layer.selectAll('.geolocations').selectAll('.geolocation')
.data([geolocation]);

Expand Down Expand Up @@ -97,7 +96,7 @@ export function svgGeolocate(projection, context, dispatch) {
groups.merge(pointsEnter)
.attr('transform', transform);

d3_select('#geolocate-radius').attr('r', pixelAccuracy)
d3_select('#geolocate-radius').attr('r', accuracy(_position.coords.accuracy, geolocation.loc));
}

function drawLocation(selection) {
Expand Down

0 comments on commit 83c0843

Please sign in to comment.