URL mvt drawing

This commit is contained in:
vershwal
2018-06-09 03:28:42 +05:30
parent 6587bd6bc2
commit 570bb62197
3 changed files with 16 additions and 0 deletions
+14
View File
@@ -169,6 +169,13 @@ export function rendererBackground(context) {
var streetside = context.layers().layer('streetside');
if (streetside && streetside.enabled()) {
imageryUsed.push('Bing Streetside');
var mvt = context.layers().layer('mvt');
if (mvt && mvt.enabled() && mvt.hasMvt()) {
// Include a string like '.mvt data file' or '.geojson data file'
var match = mvt.getSrc().match(/(pbf|mvt|(?:geo)?json)$/i);
var extension = match ? ('.' + match[0].toLowerCase() + ' ') : '';
imageryUsed.push(extension + 'data file');
}
var mapillary_images = context.layers().layer('mapillary-images');
@@ -421,6 +428,13 @@ export function rendererBackground(context) {
}
}
if (q.mvt) {
var mvt = context.layers().layer('mvt');
if (mvt) {
mvt.url(q.mvt);
}
}
if (q.offset) {
var offset = q.offset.replace(/;/g, ',').split(',').map(function(n) {
return !isNaN(n) && n;
+1
View File
@@ -2,6 +2,7 @@ export { svgAreas } from './areas.js';
export { svgDebug } from './debug.js';
export { svgDefs } from './defs.js';
export { svgGpx } from './gpx.js';
export { svgMvt } from './mvt.js';
export { svgIcon } from './icon.js';
export { svgLabels } from './labels.js';
export { svgLayers } from './layers.js';
+1
View File
@@ -1,3 +1,4 @@
import _difference from 'lodash-es/difference';
import _find from 'lodash-es/find';
import _map from 'lodash-es/map';