mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-21 07:46:58 +02:00
Working fine with a given mvt URL.
This commit is contained in:
@@ -209,7 +209,6 @@ export function svgMvt(projection, context, dispatch) {
|
||||
};
|
||||
|
||||
drawMvt.url = function(url) {
|
||||
url = 'https://api.mapbox.com/v4/mapbox.mapbox-streets-v6/9/150/194.vector.pbf?access_token=pk.eyJ1IjoidmVyc2h3YWwiLCJhIjoiY2pocmk1c2J5M28wbDM1cGU1ZDdpeDB1eSJ9.KN1fjHMCdSUsYcuvwiXWIA';
|
||||
buffer(url).then(function(data) {
|
||||
_src = url;
|
||||
var match = url.match(/(pbf|mvt|(?:geo)?json)/i);
|
||||
|
||||
@@ -101,6 +101,9 @@ export function utilStringQs(str) {
|
||||
if (parts.length === 2) {
|
||||
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]));
|
||||
}
|
||||
return obj;
|
||||
}, {});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user