Fix failing tests, lint errors, merge conflicts

This commit is contained in:
Bryan Housel
2018-07-09 11:17:57 -04:00
parent 4fda478f57
commit a52eeb9733
4 changed files with 19 additions and 17 deletions

12
dist/locales/en.json vendored
View File

@@ -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)"

View File

@@ -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 '';
}

View File

@@ -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);

View File

@@ -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;
}, {});