diff --git a/dist/locales/en.json b/dist/locales/en.json index bbb7ffd65..55c13443c 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -715,18 +715,18 @@ "zoom": "Zoom to layer", "browse": "Browse for a file" }, - "streetside": { - "tooltip": "Streetside photos from Microsoft", - "title": "Photo Overlay (Bing Streetside)", - "report": "Report a privacy concern with this image", - "hires": "High resolution" - }, "mvt": { "local_layer": "Add a MVT", "drag_drop": "Drag and drop a .mvt or .pbf file on the page, or click the button to the right to browse", "zoom": "Zoom to layer", "browse": "Browse for a file" }, + "streetside": { + "tooltip": "Streetside photos from Microsoft", + "title": "Photo Overlay (Bing Streetside)", + "report": "Report a privacy concern with this image", + "hires": "High resolution" + }, "mapillary_images": { "tooltip": "Street-level photos from Mapillary", "title": "Photo Overlay (Mapillary)" diff --git a/modules/svg/gpx.js b/modules/svg/gpx.js index 09f136cbb..8d6bda2fd 100644 --- a/modules/svg/gpx.js +++ b/modules/svg/gpx.js @@ -1,6 +1,5 @@ import _flatten from 'lodash-es/flatten'; import _isEmpty from 'lodash-es/isEmpty'; -import _isUndefined from 'lodash-es/isUndefined'; import _reduce from 'lodash-es/reduce'; import _union from 'lodash-es/union'; @@ -133,7 +132,7 @@ export function svgGpx(projection, context, dispatch) { function getExtension(fileName) { - if (_isUndefined(fileName)) { + if (fileName === undefined) { return ''; } diff --git a/modules/svg/mvt.js b/modules/svg/mvt.js index 934927fcf..31cb3b674 100644 --- a/modules/svg/mvt.js +++ b/modules/svg/mvt.js @@ -1,12 +1,10 @@ import _flatten from 'lodash-es/flatten'; import _isEmpty from 'lodash-es/isEmpty'; -import _isUndefined from 'lodash-es/isUndefined'; import _reduce from 'lodash-es/reduce'; import _union from 'lodash-es/union'; import { geoBounds as d3_geoBounds } from 'd3-geo'; -import { text as d3_text } from 'd3-request'; -import { buffer } from 'd3-fetch'; +import { buffer as d3_buffer } from 'd3-fetch'; import { event as d3_event, select as d3_select @@ -152,7 +150,7 @@ export function svgMvt(projection, context, dispatch) { function getExtension(fileName) { - if (_isUndefined(fileName)) { + if (fileName === undefined) { return ''; } @@ -209,7 +207,7 @@ export function svgMvt(projection, context, dispatch) { }; drawMvt.url = function(url) { - buffer(url).then(function(data) { + d3_buffer(url).then(function(data) { _src = url; var match = url.match(/(pbf|mvt|(?:geo)?json)/i); var extension = match ? ('.' + match[0].toLowerCase()) : ''; @@ -230,12 +228,17 @@ export function svgMvt(projection, context, dispatch) { reader = new FileReader(); reader.onload = (function(file) { + +return; // todo find x,y,z +var data = []; +var zxy = [0,0,0]; + _src = file.name; var extension = getExtension(file.name); var bufferdata = { - data, - zxy //to-do find x,y,z - }; + data: data, + zxy: zxy + }; return function (e) { bufferdata.data = e.target.result; parseSaveAndZoom(extension, bufferdata); diff --git a/modules/util/util.js b/modules/util/util.js index e747a7262..cf226f5ee 100644 --- a/modules/util/util.js +++ b/modules/util/util.js @@ -102,7 +102,7 @@ export function utilStringQs(str) { obj[parts[0]] = (null === parts[1]) ? '' : decodeURIComponent(parts[1]); } if (parts[0] === 'mvt') { - obj[parts[0]] = (parts[2] != undefined) ? (decodeURIComponent(parts[1]) + '=' + decodeURIComponent(parts[2])) : (decodeURIComponent(parts[1])); + obj[parts[0]] = (parts[2] !== undefined) ? (decodeURIComponent(parts[1]) + '=' + decodeURIComponent(parts[2])) : (decodeURIComponent(parts[1])); } return obj; }, {});