Skip to content

Commit

Permalink
Don't use real filenames in the imagery_used field (for privacy)
Browse files Browse the repository at this point in the history
(closes #4530)
  • Loading branch information
bhousel committed Nov 15, 2017
1 parent af3b0bc commit 6e0a2c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/renderer/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ export function rendererBackground(context) {

var gpx = context.layers().layer('gpx');
if (gpx && gpx.enabled() && gpx.hasGpx()) {
imageryUsed.push(gpx.getSrc());
// Include a string like '.gpx data file' or '.geojson data file'
var match = gpx.getSrc().match(/(kml|gpx|(?:geo)?json)$/i);
var extension = match ? ('.' + match[0].toLowerCase() + ' ') : '';
imageryUsed.push(extension + 'data file');
}

var mapillary_images = context.layers().layer('mapillary-images');
Expand Down

0 comments on commit 6e0a2c1

Please sign in to comment.