X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ae0177fbe61d7d02e3c6b441bd395fff6fd96a18..3e405040eaa0f0e086ea22ff3934a2adfcb851b6:/vendor/assets/iD/iD.js diff --git a/vendor/assets/iD/iD.js b/vendor/assets/iD/iD.js index aeb16e7a4..a19dc713e 100644 --- a/vendor/assets/iD/iD.js +++ b/vendor/assets/iD/iD.js @@ -175,7 +175,7 @@ })(this); d3 = (function(){ - var d3 = {version: "3.2.7"}; // semver + var d3 = {version: "3.3.8"}; // semver d3.ascending = function(a, b) { return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; }; @@ -313,12 +313,15 @@ d3.shuffle = function(array) { return array; }; d3.permute = function(array, indexes) { - var permutes = [], - i = -1, - n = indexes.length; - while (++i < n) permutes[i] = array[indexes[i]]; + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; return permutes; }; +d3.pairs = function(array) { + var i = 0, n = array.length - 1, p0, p1 = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = [p0 = p1, p1 = array[++i]]; + return pairs; +}; d3.zip = function() { if (!(n = arguments.length)) return []; @@ -353,8 +356,28 @@ d3.entries = function(map) { return entries; }; d3.merge = function(arrays) { - return Array.prototype.concat.apply([], arrays); + var n = arrays.length, + m, + i = -1, + j = 0, + merged, + array; + + while (++i < n) j += arrays[i].length; + merged = new Array(j); + + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + + return merged; }; +var abs = Math.abs; + d3.range = function(start, stop, step) { if (arguments.length < 3) { step = 1; @@ -365,7 +388,7 @@ d3.range = function(start, stop, step) { } if ((stop - start) / step === Infinity) throw new Error("infinite range"); var range = [], - k = d3_range_integerScale(Math.abs(step)), + k = d3_range_integerScale(abs(step)), i = -1, j; start *= k, stop *= k, step *= k; @@ -394,7 +417,8 @@ function d3_class(ctor, properties) { d3.map = function(object) { var map = new d3_Map; - for (var key in object) map.set(key, object[key]); + if (object instanceof d3_Map) object.forEach(function(key, value) { map.set(key, value); }); + else for (var key in object) map.set(key, object[key]); return map; }; @@ -538,8 +562,8 @@ d3.nest = function() { }; d3.set = function(array) { - var set = new d3_Set(); - if (array) for (var i = 0; i < array.length; i++) set.add(array[i]); + var set = new d3_Set; + if (array) for (var i = 0, n = array.length; i < n; ++i) set.add(array[i]); return set; }; @@ -573,9 +597,23 @@ d3_class(d3_Set, { } }); d3.behavior = {}; +var d3_arraySlice = [].slice, + d3_array = function(list) { return d3_arraySlice.call(list); }; // conversion for NodeLists + var d3_document = document, d3_documentElement = d3_document.documentElement, d3_window = window; + +// Redefine d3_array if the browser doesnât support slice-based conversion. +try { + d3_array(d3_documentElement.childNodes)[0].nodeType; +} catch(e) { + d3_array = function(list) { + var i = list.length, array = new Array(i); + while (i--) array[i] = list[i]; + return array; + }; +} // Copies a variable number of methods from source to target. d3.rebind = function(target, source) { var i = 1, n = arguments.length, method; @@ -603,24 +641,6 @@ function d3_vendorSymbol(object, name) { } var d3_vendorPrefixes = ["webkit", "ms", "moz", "Moz", "o", "O"]; - -var d3_array = d3_arraySlice; // conversion for NodeLists - -function d3_arrayCopy(pseudoarray) { - var i = -1, n = pseudoarray.length, array = []; - while (++i < n) array.push(pseudoarray[i]); - return array; -} - -function d3_arraySlice(pseudoarray) { - return Array.prototype.slice.call(pseudoarray); -} - -try { - d3_array(d3_documentElement.childNodes)[0].nodeType; -} catch(e) { - d3_array = d3_arrayCopy; -} function d3_noop() {} d3.dispatch = function() { @@ -1118,15 +1138,15 @@ d3_selectionPrototype.append = function(name) { function d3_selection_creator(name) { return typeof name === "function" ? name - : (name = d3.ns.qualify(name)).local ? function() { return d3_document.createElementNS(name.space, name.local); } - : function() { return d3_document.createElementNS(this.namespaceURI, name); }; + : (name = d3.ns.qualify(name)).local ? function() { return this.ownerDocument.createElementNS(name.space, name.local); } + : function() { return this.ownerDocument.createElementNS(this.namespaceURI, name); }; } d3_selectionPrototype.insert = function(name, before) { name = d3_selection_creator(name); before = d3_selection_selector(before); return this.select(function() { - return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments)); + return this.insertBefore(name.apply(this, arguments), before.apply(this, arguments) || null); }); }; @@ -1310,7 +1330,7 @@ d3_selectionPrototype.sort = function(comparator) { function d3_selection_sortComparator(comparator) { if (!arguments.length) comparator = d3.ascending; return function(a, b) { - return (!a - !b) || comparator(a.__data__, b.__data__); + return a && b ? comparator(a.__data__, b.__data__) : !a - !b; }; } @@ -1415,6 +1435,8 @@ function d3_selection_enterInsertBefore(enter) { }; } +// import "../transition/transition"; + d3_selectionPrototype.transition = function() { var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], @@ -1432,6 +1454,16 @@ d3_selectionPrototype.transition = function() { return d3_transition(subgroups, id); }; +// import "../transition/transition"; + +d3_selectionPrototype.interrupt = function() { + return this.each(d3_selection_interrupt); +}; + +function d3_selection_interrupt() { + var lock = this.__transition__; + if (lock) ++lock.active; +} // TODO fast singleton implementation? d3.select = function(node) { @@ -1578,6 +1610,7 @@ d3.mouse = function(container) { var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0; function d3_mousePoint(container, e) { + if (e.changedTouches) e = e.changedTouches[0]; var svg = container.ownerSVGElement || container; if (svg.createSVGPoint) { var point = svg.createSVGPoint(); @@ -1594,13 +1627,8 @@ function d3_mousePoint(container, e) { d3_mouse_bug44083 = !(ctm.f || ctm.e); svg.remove(); } - if (d3_mouse_bug44083) { - point.x = e.pageX; - point.y = e.pageY; - } else { - point.x = e.clientX; - point.y = e.clientY; - } + if (d3_mouse_bug44083) point.x = e.pageX, point.y = e.pageY; + else point.x = e.clientX, point.y = e.clientY; point = point.matrixTransform(container.getScreenCTM().inverse()); return [point.x, point.y]; } @@ -1616,47 +1644,180 @@ d3.touches = function(container, touches) { return point; }) : []; }; +var Ï = Math.PI, + Ï = 2 * Ï, + halfÏ = Ï / 2, + ε = 1e-6, + ε2 = ε * ε, + d3_radians = Ï / 180, + d3_degrees = 180 / Ï; + +function d3_sgn(x) { + return x > 0 ? 1 : x < 0 ? -1 : 0; +} + +function d3_acos(x) { + return x > 1 ? 0 : x < -1 ? Ï : Math.acos(x); +} + +function d3_asin(x) { + return x > 1 ? halfÏ : x < -1 ? -halfÏ : Math.asin(x); +} + +function d3_sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} + +function d3_cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} + +function d3_tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} + +function d3_haversin(x) { + return (x = Math.sin(x / 2)) * x; +} + +var Ï = Math.SQRT2, + Ï2 = 2, + Ï4 = 4; + +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +d3.interpolateZoom = function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2]; + + var dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + Ï4 * d2) / (2 * w0 * Ï2 * d1), + b1 = (w1 * w1 - w0 * w0 - Ï4 * d2) / (2 * w1 * Ï2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1), + dr = r1 - r0, + S = (dr || Math.log(w1 / w0)) / Ï; + + function interpolate(t) { + var s = t * S; + if (dr) { + // General case. + var coshr0 = d3_cosh(r0), + u = w0 / (Ï2 * d1) * (coshr0 * d3_tanh(Ï * s + r0) - d3_sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / d3_cosh(Ï * s + r0) + ]; + } + // Special case for u0 ~= u1. + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(Ï * s) + ]; + } + + interpolate.duration = S * 1000; + + return interpolate; +}; d3.behavior.zoom = function() { - var translate = [0, 0], + var view = {x: 0, y: 0, k: 1}, translate0, // translate when we started zooming (to avoid drift) - scale = 1, + center, // desired position of translate0 after zooming + size = [960, 500], // viewport size; required for zoom interpolation scaleExtent = d3_behavior_zoomInfinity, mousedown = "mousedown.zoom", mousemove = "mousemove.zoom", mouseup = "mouseup.zoom", - event = d3_eventDispatch(zoom, "zoom"), + mousewheelTimer, + touchstart = "touchstart.zoom", + touchtime, // time of last touchstart (to detect double-tap) + event = d3_eventDispatch(zoom, "zoomstart", "zoom", "zoomend"), x0, x1, y0, - y1, - touchtime; // time of last touchstart (to detect double-tap) + y1; - function zoom() { - this.on(mousedown, mousedowned) + function zoom(g) { + g .on(mousedown, mousedowned) .on(d3_behavior_zoomWheel + ".zoom", mousewheeled) .on(mousemove, mousewheelreset) .on("dblclick.zoom", dblclicked) - .on("touchstart.zoom", touchstarted); + .on(touchstart, touchstarted); } - zoom.translate = function(x) { - if (!arguments.length) return translate; - translate = x.map(Number); + zoom.event = function(g) { + g.each(function() { + var event_ = event.of(this, arguments), + view1 = view; + if (d3_transitionInheritId) { + d3.select(this).transition() + .each("start.zoom", function() { + view = this.__chart__ || {x: 0, y: 0, k: 1}; // pre-transition state + zoomstarted(event_); + }) + .tween("zoom:zoom", function() { + var dx = size[0], + dy = size[1], + cx = dx / 2, + cy = dy / 2, + i = d3.interpolateZoom( + [(cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k], + [(cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k] + ); + return function(t) { + var l = i(t), k = dx / l[2]; + this.__chart__ = view = {x: cx - l[0] * k, y: cy - l[1] * k, k: k}; + zoomed(event_); + }; + }) + .each("end.zoom", function() { + zoomended(event_); + }); + } else { + this.__chart__ = view; + zoomstarted(event_); + zoomed(event_); + zoomended(event_); + } + }); + } + + zoom.translate = function(_) { + if (!arguments.length) return [view.x, view.y]; + view = {x: +_[0], y: +_[1], k: view.k}; // copy-on-write rescale(); return zoom; }; - zoom.scale = function(x) { - if (!arguments.length) return scale; - scale = +x; + zoom.scale = function(_) { + if (!arguments.length) return view.k; + view = {x: view.x, y: view.y, k: +_}; // copy-on-write rescale(); return zoom; }; - zoom.scaleExtent = function(x) { + zoom.scaleExtent = function(_) { if (!arguments.length) return scaleExtent; - scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number); + scaleExtent = _ == null ? d3_behavior_zoomInfinity : [+_[0], +_[1]]; + return zoom; + }; + + zoom.center = function(_) { + if (!arguments.length) return center; + center = _ && [+_[0], +_[1]]; + return zoom; + }; + + zoom.size = function(_) { + if (!arguments.length) return size; + size = _ && [+_[0], +_[1]]; return zoom; }; @@ -1664,8 +1825,7 @@ d3.behavior.zoom = function() { if (!arguments.length) return x1; x1 = z; x0 = z.copy(); - translate = [0, 0]; - scale = 1; + view = {x: 0, y: 0, k: 1}; // copy-on-write return zoom; }; @@ -1673,37 +1833,44 @@ d3.behavior.zoom = function() { if (!arguments.length) return y1; y1 = z; y0 = z.copy(); - translate = [0, 0]; - scale = 1; + view = {x: 0, y: 0, k: 1}; // copy-on-write return zoom; }; function location(p) { - return [(p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale]; + return [(p[0] - view.x) / view.k, (p[1] - view.y) / view.k]; } function point(l) { - return [l[0] * scale + translate[0], l[1] * scale + translate[1]]; + return [l[0] * view.k + view.x, l[1] * view.k + view.y]; } function scaleTo(s) { - scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s)); + view.k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s)); } function translateTo(p, l) { l = point(l); - translate[0] += p[0] - l[0]; - translate[1] += p[1] - l[1]; + view.x += p[0] - l[0]; + view.y += p[1] - l[1]; } function rescale() { - if (x1) x1.domain(x0.range().map(function(x) { return (x - translate[0]) / scale; }).map(x0.invert)); - if (y1) y1.domain(y0.range().map(function(y) { return (y - translate[1]) / scale; }).map(y0.invert)); + if (x1) x1.domain(x0.range().map(function(x) { return (x - view.x) / view.k; }).map(x0.invert)); + if (y1) y1.domain(y0.range().map(function(y) { return (y - view.y) / view.k; }).map(y0.invert)); } - function dispatch(event) { + function zoomstarted(event) { + event({type: "zoomstart"}); + } + + function zoomed(event) { rescale(); - event({type: "zoom", scale: scale, translate: translate}); + event({type: "zoom", scale: view.k, translate: [view.x, view.y]}); + } + + function zoomended(event) { + event({type: "zoomend"}); } function mousedowned() { @@ -1715,62 +1882,92 @@ d3.behavior.zoom = function() { l = location(d3.mouse(target)), dragRestore = d3_event_dragSuppress(); + d3_selection_interrupt.call(target); + zoomstarted(event_); + function moved() { dragged = 1; translateTo(d3.mouse(target), l); - dispatch(event_); + zoomed(event_); } function ended() { w.on(mousemove, d3_window === target ? mousewheelreset : null).on(mouseup, null); dragRestore(dragged && d3.event.target === eventTarget); + zoomended(event_); } } + // These closures persist for as long as at least one touch is active. function touchstarted() { var target = this, event_ = event.of(target, arguments), - touches = d3.touches(target), - locations = {}, + locations0 = {}, // touchstart locations distance0 = 0, // distance² between initial touches - scale0 = scale, // scale when we started touching - now = Date.now(), - name = "zoom-" + d3.event.changedTouches[0].identifier, - touchmove = "touchmove." + name, - touchend = "touchend." + name, + scale0, // scale when we started touching + eventId = d3.event.changedTouches[0].identifier, + touchmove = "touchmove.zoom-" + eventId, + touchend = "touchend.zoom-" + eventId, w = d3.select(d3_window).on(touchmove, moved).on(touchend, ended), - t = d3.select(target).on(mousedown, null), // prevent duplicate events + t = d3.select(target).on(mousedown, null).on(touchstart, started), // prevent duplicate events dragRestore = d3_event_dragSuppress(); - touches.forEach(function(t) { locations[t.identifier] = location(t); }); + d3_selection_interrupt.call(target); + started(); + zoomstarted(event_); + + // Updates locations of any touches in locations0. + function relocate() { + var touches = d3.touches(target); + scale0 = view.k; + touches.forEach(function(t) { + if (t.identifier in locations0) locations0[t.identifier] = location(t); + }); + return touches; + } + + // Temporarily override touchstart while gesture is active. + function started() { + // Only track touches started on the target element. + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + locations0[changed[i].identifier] = null; + } + + var touches = relocate(), + now = Date.now(); - if (touches.length === 1) { - if (now - touchtime < 500) { // dbltap - var p = touches[0], l = location(touches[0]); - scaleTo(scale * 2); - translateTo(p, l); - d3_eventPreventDefault(); - dispatch(event_); + if (touches.length === 1) { + if (now - touchtime < 500) { // dbltap + var p = touches[0], l = locations0[p.identifier]; + scaleTo(view.k * 2); + translateTo(p, l); + d3_eventPreventDefault(); + zoomed(event_); + } + touchtime = now; + } else if (touches.length > 1) { + var p = touches[0], q = touches[1], + dx = p[0] - q[0], dy = p[1] - q[1]; + distance0 = dx * dx + dy * dy; } - touchtime = now; - } else if (touches.length > 1) { - var p = touches[0], q = touches[1], - dx = p[0] - q[0], dy = p[1] - q[1]; - distance0 = dx * dx + dy * dy; } function moved() { var touches = d3.touches(target), - p0 = touches[0], - l0 = locations[p0.identifier]; - - if (p1 = touches[1]) { - var p1, l1 = locations[p1.identifier], - scale1 = d3.event.scale; - if (scale1 == null) { - var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1; - scale1 = distance0 && Math.sqrt(distance1 / distance0); + p0, l0, + p1, l1; + for (var i = 0, n = touches.length; i < n; ++i, l1 = null) { + p1 = touches[i]; + if (l1 = locations0[p1.identifier]) { + if (l0) break; + p0 = p1, l0 = l1; } + } + + if (l1) { + var distance1 = (distance1 = p1[0] - p0[0]) * distance1 + (distance1 = p1[1] - p0[1]) * distance1, + scale1 = distance0 && Math.sqrt(distance1 / distance0); p0 = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; l0 = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; scaleTo(scale1 * scale0); @@ -1778,22 +1975,42 @@ d3.behavior.zoom = function() { touchtime = null; translateTo(p0, l0); - dispatch(event_); + zoomed(event_); } function ended() { + // If there are any globally-active touches remaining, remove the ended + // touches from locations0. + if (d3.event.touches.length) { + var changed = d3.event.changedTouches; + for (var i = 0, n = changed.length; i < n; ++i) { + delete locations0[changed[i].identifier]; + } + // If locations0 is not empty, then relocate and continue listening for + // touchmove and touchend. + for (var identifier in locations0) { + return void relocate(); // locations may have detached due to rotation + } + } + // Otherwise, remove touchmove and touchend listeners. w.on(touchmove, null).on(touchend, null); - t.on(mousedown, mousedowned); + t.on(mousedown, mousedowned).on(touchstart, touchstarted); dragRestore(); + zoomended(event_); } } function mousewheeled() { + var event_ = event.of(this, arguments); + if (mousewheelTimer) clearTimeout(mousewheelTimer); + else d3_selection_interrupt.call(this), zoomstarted(event_); + mousewheelTimer = setTimeout(function() { mousewheelTimer = null; zoomended(event_); }, 50); d3_eventPreventDefault(); - if (!translate0) translate0 = location(d3.mouse(this)); - scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale); - translateTo(d3.mouse(this), translate0); - dispatch(event.of(this, arguments)); + var point = center || d3.mouse(this); + if (!translate0) translate0 = location(point); + scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k); + translateTo(point, translate0); + zoomed(event_); } function mousewheelreset() { @@ -1801,10 +2018,15 @@ d3.behavior.zoom = function() { } function dblclicked() { - var p = d3.mouse(this), l = location(p), k = Math.log(scale) / Math.LN2; + var event_ = event.of(this, arguments), + p = d3.mouse(this), + l = location(p), + k = Math.log(view.k) / Math.LN2; + zoomstarted(event_); scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1)); translateTo(p, l); - dispatch(event.of(this, arguments)); + zoomed(event_); + zoomended(event_); } return d3.rebind(zoom, event, "on"); @@ -1837,8 +2059,8 @@ d3.timer = function(callback, delay, then) { if (n < 3) then = Date.now(); // Add the callback to the tail of the queue. - var time = then + delay, timer = {callback: callback, time: time, next: null}; - if (d3_timer_queueTail) d3_timer_queueTail.next = timer; + var time = then + delay, timer = {c: callback, t: time, f: false, n: null}; + if (d3_timer_queueTail) d3_timer_queueTail.n = timer; else d3_timer_queueHead = timer; d3_timer_queueTail = timer; @@ -1870,20 +2092,12 @@ d3.timer.flush = function() { d3_timer_sweep(); }; -function d3_timer_replace(callback, delay, then) { - var n = arguments.length; - if (n < 2) delay = 0; - if (n < 3) then = Date.now(); - d3_timer_active.callback = callback; - d3_timer_active.time = then + delay; -} - function d3_timer_mark() { var now = Date.now(); d3_timer_active = d3_timer_queueHead; while (d3_timer_active) { - if (now >= d3_timer_active.time) d3_timer_active.flush = d3_timer_active.callback(now - d3_timer_active.time); - d3_timer_active = d3_timer_active.next; + if (now >= d3_timer_active.t) d3_timer_active.f = d3_timer_active.c(now - d3_timer_active.t); + d3_timer_active = d3_timer_active.n; } return now; } @@ -1895,45 +2109,16 @@ function d3_timer_sweep() { t1 = d3_timer_queueHead, time = Infinity; while (t1) { - if (t1.flush) { - t1 = t0 ? t0.next = t1.next : d3_timer_queueHead = t1.next; + if (t1.f) { + t1 = t0 ? t0.n = t1.n : d3_timer_queueHead = t1.n; } else { - if (t1.time < time) time = t1.time; - t1 = (t0 = t1).next; + if (t1.t < time) time = t1.t; + t1 = (t0 = t1).n; } } d3_timer_queueTail = t0; return time; } -var Ï = Math.PI, - ε = 1e-6, - ε2 = ε * ε, - d3_radians = Ï / 180, - d3_degrees = 180 / Ï; - -function d3_sgn(x) { - return x > 0 ? 1 : x < 0 ? -1 : 0; -} - -function d3_acos(x) { - return x > 1 ? 0 : x < -1 ? Ï : Math.acos(x); -} - -function d3_asin(x) { - return x > 1 ? Ï / 2 : x < -1 ? -Ï / 2 : Math.asin(x); -} - -function d3_sinh(x) { - return (Math.exp(x) - Math.exp(-x)) / 2; -} - -function d3_cosh(x) { - return (Math.exp(x) + Math.exp(-x)) / 2; -} - -function d3_haversin(x) { - return (x = Math.sin(x / 2)) * x; -} d3.geo = {}; function d3_identity(d) { return d; @@ -1950,13 +2135,13 @@ function d3_geo_spherical(cartesian) { } function d3_geo_sphericalEqual(a, b) { - return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε; + return abs(a[0] - b[0]) < ε && abs(a[1] - b[1]) < ε; } // General spherical polygon clipping algorithm: takes a polygon, cuts it into // visible line segments and rejoins the segments by interpolating along the // clip edge. -function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) { +function d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener) { var subject = [], clip = []; @@ -1975,14 +2160,14 @@ function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) { return; } - var a = {point: p0, points: segment, other: null, visited: false, entry: true, subject: true}, - b = {point: p0, points: [p0], other: a, visited: false, entry: false, subject: false}; - a.other = b; + var a = new d3_geo_clipPolygonIntersection(p0, segment, null, true), + b = new d3_geo_clipPolygonIntersection(p0, null, a, false); + a.o = b; subject.push(a); clip.push(b); - a = {point: p1, points: [p1], other: null, visited: false, entry: false, subject: true}; - b = {point: p1, points: [p1], other: a, visited: false, entry: true, subject: false}; - a.other = b; + a = new d3_geo_clipPolygonIntersection(p1, segment, null, false); + b = new d3_geo_clipPolygonIntersection(p1, null, a, true); + a.o = b; subject.push(a); clip.push(b); }); @@ -1991,41 +2176,42 @@ function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) { d3_geo_clipPolygonLinkCircular(clip); if (!subject.length) return; - if (inside) for (var i = 1, e = !inside(clip[0].point), n = clip.length; i < n; ++i) { - clip[i].entry = (e = !e); + for (var i = 0, entry = clipStartInside, n = clip.length; i < n; ++i) { + clip[i].e = entry = !entry; } var start = subject[0], - current, points, point; while (1) { // Find first unvisited intersection. - current = start; - while (current.visited) if ((current = current.next) === start) return; - points = current.points; + var current = start, + isSubject = true; + while (current.v) if ((current = current.n) === start) return; + points = current.z; listener.lineStart(); do { - current.visited = current.other.visited = true; - if (current.entry) { - if (current.subject) { - for (var i = 0; i < points.length; i++) listener.point((point = points[i])[0], point[1]); + current.v = current.o.v = true; + if (current.e) { + if (isSubject) { + for (var i = 0, n = points.length; i < n; ++i) listener.point((point = points[i])[0], point[1]); } else { - interpolate(current.point, current.next.point, 1, listener); + interpolate(current.x, current.n.x, 1, listener); } - current = current.next; + current = current.n; } else { - if (current.subject) { - points = current.prev.points; - for (var i = points.length; --i >= 0;) listener.point((point = points[i])[0], point[1]); + if (isSubject) { + points = current.p.z; + for (var i = points.length - 1; i >= 0; --i) listener.point((point = points[i])[0], point[1]); } else { - interpolate(current.point, current.prev.point, -1, listener); + interpolate(current.x, current.p.x, -1, listener); } - current = current.prev; + current = current.p; } - current = current.other; - points = current.points; - } while (!current.visited); + current = current.o; + points = current.z; + isSubject = !isSubject; + } while (!current.v); listener.lineEnd(); } } @@ -2037,17 +2223,27 @@ function d3_geo_clipPolygonLinkCircular(array) { a = array[0], b; while (++i < n) { - a.next = b = array[i]; - b.prev = a; + a.n = b = array[i]; + b.p = a; a = b; } - a.next = b = array[0]; - b.prev = a; + a.n = b = array[0]; + b.p = a; } -function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) { - return function(listener) { - var line = clipLine(listener); +function d3_geo_clipPolygonIntersection(point, points, other, entry) { + this.x = point; + this.z = points; + this.o = other; // another intersection + this.e = entry; // is an entry? + this.v = false; // visited + this.n = this.p = null; // next & previous +} + +function d3_geo_clip(pointVisible, clipLine, interpolate, clipStart) { + return function(rotate, listener) { + var line = clipLine(listener), + rotatedClipStart = rotate.invert(clipStart[0], clipStart[1]); var clip = { point: point, @@ -2067,9 +2263,10 @@ function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) { clip.lineEnd = lineEnd; segments = d3.merge(segments); + var clipStartInside = d3_geo_pointInPolygon(rotatedClipStart, polygon); if (segments.length) { - d3_geo_clipPolygon(segments, d3_geo_clipSort, null, interpolate, listener); - } else if (polygonContains(polygon)) { + d3_geo_clipPolygon(segments, d3_geo_clipSort, clipStartInside, interpolate, listener); + } else if (clipStartInside) { listener.lineStart(); interpolate(null, null, 1, listener); listener.lineEnd(); @@ -2086,8 +2283,14 @@ function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) { } }; - function point(λ, Ï) { if (pointVisible(λ, Ï)) listener.point(λ, Ï); } - function pointLine(λ, Ï) { line.point(λ, Ï); } + function point(λ, Ï) { + var point = rotate(λ, Ï); + if (pointVisible(λ = point[0], Ï = point[1])) listener.point(λ, Ï); + } + function pointLine(λ, Ï) { + var point = rotate(λ, Ï); + line.point(point[0], point[1]); + } function lineStart() { clip.point = pointLine; line.lineStart(); } function lineEnd() { clip.point = point; line.lineEnd(); } @@ -2099,8 +2302,9 @@ function d3_geo_clip(pointVisible, clipLine, interpolate, polygonContains) { ring; function pointRing(λ, Ï) { - ringListener.point(λ, Ï); ring.push([λ, Ï]); + var point = rotate(λ, Ï); + ringListener.point(point[0], point[1]); } function ringStart() { @@ -2172,8 +2376,8 @@ function d3_geo_clipBufferListener() { // Intersection points are sorted along the clip edge. For both antimeridian // cutting and circle clipping, the same comparison is used. function d3_geo_clipSort(a, b) { - return ((a = a.point)[0] < 0 ? a[1] - Ï / 2 - ε : Ï / 2 - a[1]) - - ((b = b.point)[0] < 0 ? b[1] - Ï / 2 - ε : Ï / 2 - b[1]); + return ((a = a.x)[0] < 0 ? a[1] - halfÏ - ε : halfÏ - a[1]) + - ((b = b.x)[0] < 0 ? b[1] - halfÏ - ε : halfÏ - b[1]); } // Adds floating point numbers with twice the normal precision. // Reference: J. R. Shewchuk, Adaptive Precision Floating-Point Arithmetic and @@ -2239,12 +2443,12 @@ var d3_geo_streamGeometryType = { listener.sphere(); }, Point: function(object, listener) { - var coordinate = object.coordinates; - listener.point(coordinate[0], coordinate[1]); + object = object.coordinates; + listener.point(object[0], object[1], object[2]); }, MultiPoint: function(object, listener) { - var coordinates = object.coordinates, i = -1, n = coordinates.length, coordinate; - while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]); + var coordinates = object.coordinates, i = -1, n = coordinates.length; + while (++i < n) object = coordinates[i], listener.point(object[0], object[1], object[2]); }, LineString: function(object, listener) { d3_geo_streamLine(object.coordinates, listener, 0); @@ -2269,7 +2473,7 @@ var d3_geo_streamGeometryType = { function d3_geo_streamLine(coordinates, listener, closed) { var i = -1, n = coordinates.length - closed, coordinate; listener.lineStart(); - while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]); + while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1], coordinate[2]); listener.lineEnd(); } @@ -2394,8 +2598,6 @@ function d3_geo_pointInPolygon(point, polygon) { parallel = point[1], meridianNormal = [Math.sin(meridian), -Math.cos(meridian), 0], polarAngle = 0, - polar = false, - southPole = false, winding = 0; d3_geo_areaRingSum.reset(); @@ -2418,12 +2620,11 @@ function d3_geo_pointInPolygon(point, polygon) { sinÏ = Math.sin(Ï), cosÏ = Math.cos(Ï), dλ = λ - λ0, - antimeridian = Math.abs(dλ) > Ï, + antimeridian = abs(dλ) > Ï, k = sinÏ0 * sinÏ; d3_geo_areaRingSum.add(Math.atan2(k * Math.sin(dλ), cosÏ0 * cosÏ + k * Math.cos(dλ))); - if (Math.abs(Ï) < ε) southPole = true; - polarAngle += antimeridian ? dλ + (dλ >= 0 ? 2 : -2) * Ï : dλ; + polarAngle += antimeridian ? dλ + (dλ >= 0 ? Ï : -Ï): dλ; // Are the longitudes either side of the point's meridian, and are the // latitudes smaller than the parallel? @@ -2433,34 +2634,34 @@ function d3_geo_pointInPolygon(point, polygon) { var intersection = d3_geo_cartesianCross(meridianNormal, arc); d3_geo_cartesianNormalize(intersection); var Ïarc = (antimeridian ^ dλ >= 0 ? -1 : 1) * d3_asin(intersection[2]); - if (parallel > Ïarc) { + if (parallel > Ïarc || parallel === Ïarc && (arc[0] || arc[1])) { winding += antimeridian ^ dλ >= 0 ? 1 : -1; } } if (!j++) break; λ0 = λ, sinÏ0 = sinÏ, cosÏ0 = cosÏ, point0 = point; } - if (Math.abs(polarAngle) > ε) polar = true; } // First, determine whether the South pole is inside or outside: // // It is inside if: - // * the polygon doesn't wind around it, and its area is negative (counter-clockwise). - // * otherwise, if the polygon winds around it in a clockwise direction. + // * the polygon winds around it in a clockwise direction. + // * the polygon does not (cumulatively) wind around it, but has a negative + // (counter-clockwise) area. // // Second, count the (signed) number of times a segment crosses a meridian // from the point to the South pole. If it is zero, then the point is the // same side as the South pole. - return (!southPole && !polar && d3_geo_areaRingSum < 0 || polarAngle < -ε) ^ (winding & 1); + return (polarAngle < -ε || polarAngle < ε && d3_geo_areaRingSum < 0) ^ (winding & 1); } var d3_geo_clipAntimeridian = d3_geo_clip( d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate, - d3_geo_clipAntimeridianPolygonContains); + [-Ï, -Ï / 2]); // Takes a line and cuts into visible segments. Return values: // 0: there were intersections or the line was empty. @@ -2480,9 +2681,9 @@ function d3_geo_clipAntimeridianLine(listener) { }, point: function(λ1, Ï1) { var sλ1 = λ1 > 0 ? Ï : -Ï, - dλ = Math.abs(λ1 - λ0); - if (Math.abs(dλ - Ï) < ε) { // line crosses a pole - listener.point(λ0, Ï0 = (Ï0 + Ï1) / 2 > 0 ? Ï / 2 : -Ï / 2); + dλ = abs(λ1 - λ0); + if (abs(dλ - Ï) < ε) { // line crosses a pole + listener.point(λ0, Ï0 = (Ï0 + Ï1) / 2 > 0 ? halfÏ : -halfÏ); listener.point(sλ0, Ï0); listener.lineEnd(); listener.lineStart(); @@ -2491,8 +2692,8 @@ function d3_geo_clipAntimeridianLine(listener) { clean = 0; } else if (sλ0 !== sλ1 && dλ >= Ï) { // line crosses antimeridian // handle degeneracies - if (Math.abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε; - if (Math.abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε; + if (abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε; + if (abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε; Ï0 = d3_geo_clipAntimeridianIntersect(λ0, Ï0, λ1, Ï1); listener.point(sλ0, Ï0); listener.lineEnd(); @@ -2516,7 +2717,7 @@ function d3_geo_clipAntimeridianIntersect(λ0, Ï0, λ1, Ï1) { var cosÏ0, cosÏ1, sinλ0_λ1 = Math.sin(λ0 - λ1); - return Math.abs(sinλ0_λ1) > ε + return abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(Ï0) * (cosÏ1 = Math.cos(Ï1)) * Math.sin(λ1) - Math.sin(Ï1) * (cosÏ0 = Math.cos(Ï0)) * Math.sin(λ0)) / (cosÏ0 * cosÏ1 * sinλ0_λ1)) @@ -2526,7 +2727,7 @@ function d3_geo_clipAntimeridianIntersect(λ0, Ï0, λ1, Ï1) { function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { var Ï; if (from == null) { - Ï = direction * Ï / 2; + Ï = direction * halfÏ; listener.point(-Ï, Ï); listener.point( 0, Ï); listener.point( Ï, Ï); @@ -2536,8 +2737,8 @@ function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { listener.point(-Ï, -Ï); listener.point(-Ï, 0); listener.point(-Ï, Ï); - } else if (Math.abs(from[0] - to[0]) > ε) { - var s = (from[0] < to[0] ? 1 : -1) * Ï; + } else if (abs(from[0] - to[0]) > ε) { + var s = from[0] < to[0] ? Ï : -Ï; Ï = direction * s / 2; listener.point(-s, Ï); listener.point( 0, Ï); @@ -2547,12 +2748,6 @@ function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) { } } -var d3_geo_clipAntimeridianPoint = [-Ï, 0]; - -function d3_geo_clipAntimeridianPolygonContains(polygon) { - return d3_geo_pointInPolygon(d3_geo_clipAntimeridianPoint, polygon); -} - function d3_geo_equirectangular(λ, Ï) { return [λ, Ï]; } @@ -2577,17 +2772,23 @@ d3.geo.rotation = function(rotate) { return forward; }; +function d3_geo_identityRotation(λ, Ï) { + return [λ > Ï ? λ - Ï : λ < -Ï ? λ + Ï : λ, Ï]; +} + +d3_geo_identityRotation.invert = d3_geo_equirectangular; + // Note: |δλ| must be < 2Ï function d3_geo_rotation(δλ, δÏ, δγ) { return δλ ? (Î´Ï || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationÏγ(δÏ, δγ)) : d3_geo_rotationλ(δλ)) : (Î´Ï || δγ ? d3_geo_rotationÏγ(δÏ, δγ) - : d3_geo_equirectangular); + : d3_geo_identityRotation); } function d3_geo_forwardRotationλ(δλ) { return function(λ, Ï) { - return λ += δλ, [λ > Ï ? λ - 2 * Ï : λ < -Ï ? λ + 2 * Ï : λ, Ï]; + return λ += δλ, [λ > Ï ? λ - Ï : λ < -Ï ? λ + Ï : λ, Ï]; }; } @@ -2678,16 +2879,16 @@ function d3_geo_circleInterpolate(radius, precision) { var cr = Math.cos(radius), sr = Math.sin(radius); return function(from, to, direction, listener) { + var step = direction * precision; if (from != null) { from = d3_geo_circleAngle(cr, from); to = d3_geo_circleAngle(cr, to); - if (direction > 0 ? from < to: from > to) from += direction * 2 * Ï; + if (direction > 0 ? from < to: from > to) from += direction * Ï; } else { - from = radius + direction * 2 * Ï; - to = radius; + from = radius + direction * Ï; + to = radius - .5 * step; } - var point; - for (var step = direction * precision, t = from; direction > 0 ? t > to : t < to; t -= step) { + for (var point, t = from; direction > 0 ? t > to : t < to; t -= step) { listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), @@ -2710,11 +2911,10 @@ function d3_geo_circleAngle(cr, point) { function d3_geo_clipCircle(radius) { var cr = Math.cos(radius), smallRadius = cr > 0, - point = [radius, 0], - notHemisphere = Math.abs(cr) > ε, // TODO optimise for this common case + notHemisphere = abs(cr) > ε, // TODO optimise for this common case interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians); - return d3_geo_clip(visible, clipLine, interpolate, polygonContains); + return d3_geo_clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-Ï, radius - Ï]); function visible(λ, Ï) { return Math.cos(λ) * Math.cos(Ï) > cr; @@ -2848,7 +3048,7 @@ function d3_geo_clipCircle(radius) { z; if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z; var δλ = λ1 - λ0, - polar = Math.abs(δλ - Ï) < ε, + polar = abs(δλ - Ï) < ε, meridian = polar || δλ < ε; if (!polar && Ï1 < Ï0) z = Ï0, Ï0 = Ï1, Ï1 = z; @@ -2856,7 +3056,7 @@ function d3_geo_clipCircle(radius) { // Check that the first point is between a and b. if (meridian ? polar - ? Ï0 + Ï1 > 0 ^ q[1] < (Math.abs(q[0] - λ0) < ε ? Ï0 : Ï1) + ? Ï0 + Ï1 > 0 ^ q[1] < (abs(q[0] - λ0) < ε ? Ï0 : Ï1) : Ï0 <= q[1] && q[1] <= Ï1 : δλ > Ï ^ (λ0 <= q[0] && q[0] <= λ1)) { var q1 = d3_geo_cartesianScale(u, (-w + t) / uu); @@ -2876,18 +3076,101 @@ function d3_geo_clipCircle(radius) { else if (Ï > r) code |= 8; // above return code; } +} - function polygonContains(polygon) { - return d3_geo_pointInPolygon(point, polygon); - } +// LiangâBarsky line clipping. +function d3_geom_clipLine(x0, y0, x1, y1) { + return function(line) { + var a = line.a, + b = line.b, + ax = a.x, + ay = a.y, + bx = b.x, + by = b.y, + t0 = 0, + t1 = 1, + dx = bx - ax, + dy = by - ay, + r; + + r = x0 - ax; + if (!dx && r > 0) return; + r /= dx; + if (dx < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dx > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + + r = x1 - ax; + if (!dx && r < 0) return; + r /= dx; + if (dx < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dx > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + + r = y0 - ay; + if (!dy && r > 0) return; + r /= dy; + if (dy < 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } else if (dy > 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } + + r = y1 - ay; + if (!dy && r < 0) return; + r /= dy; + if (dy < 0) { + if (r > t1) return; + if (r > t0) t0 = r; + } else if (dy > 0) { + if (r < t0) return; + if (r < t1) t1 = r; + } + + if (t0 > 0) line.a = {x: ax + t0 * dx, y: ay + t0 * dy}; + if (t1 < 1) line.b = {x: ax + t1 * dx, y: ay + t1 * dy}; + return line; + }; } -var d3_geo_clipViewMAX = 1e9; +var d3_geo_clipExtentMAX = 1e9; + +d3.geo.clipExtent = function() { + var x0, y0, x1, y1, + stream, + clip, + clipExtent = { + stream: function(output) { + if (stream) stream.valid = false; + stream = clip(output); + stream.valid = true; // allow caching by d3.geo.path + return stream; + }, + extent: function(_) { + if (!arguments.length) return [[x0, y0], [x1, y1]]; + clip = d3_geo_clipExtent(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]); + if (stream) stream.valid = false, stream = null; + return clipExtent; + } + }; + return clipExtent.extent([[0, 0], [960, 500]]); +}; -function d3_geo_clipView(x0, y0, x1, y1) { +function d3_geo_clipExtent(x0, y0, x1, y1) { return function(listener) { var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), + clipLine = d3_geom_clipLine(x0, y0, x1, y1), segments, polygon, ring; @@ -2900,28 +3183,30 @@ function d3_geo_clipView(x0, y0, x1, y1) { listener = bufferListener; segments = []; polygon = []; + clean = true; }, polygonEnd: function() { listener = listener_; - if ((segments = d3.merge(segments)).length) { + segments = d3.merge(segments); + var clipStartInside = insidePolygon([x0, y1]), + inside = clean && clipStartInside, + visible = segments.length; + if (inside || visible) { listener.polygonStart(); - d3_geo_clipPolygon(segments, compare, inside, interpolate, listener); + if (inside) { + listener.lineStart(); + interpolate(null, null, 1, listener); + listener.lineEnd(); + } + if (visible) { + d3_geo_clipPolygon(segments, compare, clipStartInside, interpolate, listener); + } listener.polygonEnd(); - } else if (insidePolygon([x0, y0])) { - listener.polygonStart(), listener.lineStart(); - interpolate(null, null, 1, listener); - listener.lineEnd(), listener.polygonEnd(); } segments = polygon = ring = null; } }; - function inside(point) { - var a = corner(point, -1), - i = insidePolygon([a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0]); - return i; - } - function insidePolygon(p) { var wn = 0, // the winding number counter n = polygon.length, @@ -2958,17 +3243,18 @@ function d3_geo_clipView(x0, y0, x1, y1) { } } - function visible(x, y) { + function pointVisible(x, y) { return x0 <= x && x <= x1 && y0 <= y && y <= y1; } function point(x, y) { - if (visible(x, y)) listener.point(x, y); + if (pointVisible(x, y)) listener.point(x, y); } var x__, y__, v__, // first point x_, y_, v_, // previous point - first; + first, + clean; function lineStart() { clip.point = linePoint; @@ -2992,9 +3278,9 @@ function d3_geo_clipView(x0, y0, x1, y1) { } function linePoint(x, y) { - x = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, x)); - y = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, y)); - var v = visible(x, y); + x = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, x)); + y = Math.max(-d3_geo_clipExtentMAX, Math.min(d3_geo_clipExtentMAX, y)); + var v = pointVisible(x, y); if (polygon) ring.push([x, y]); if (first) { x__ = x, y__ = y, v__ = v; @@ -3006,18 +3292,19 @@ function d3_geo_clipView(x0, y0, x1, y1) { } else { if (v && v_) listener.point(x, y); else { - var a = [x_, y_], - b = [x, y]; - if (clipLine(a, b)) { + var l = {a: {x: x_, y: y_}, b: {x: x, y: y}}; + if (clipLine(l)) { if (!v_) { listener.lineStart(); - listener.point(a[0], a[1]); + listener.point(l.a.x, l.a.y); } - listener.point(b[0], b[1]); + listener.point(l.b.x, l.b.y); if (!v) listener.lineEnd(); + clean = false; } else if (v) { listener.lineStart(); listener.point(x, y); + clean = false; } } } @@ -3028,14 +3315,14 @@ function d3_geo_clipView(x0, y0, x1, y1) { }; function corner(p, direction) { - return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 - : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 - : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 - : direction > 0 ? 3 : 2; // Math.abs(p[1] - y1) < ε + return abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 + : abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 + : abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 + : direction > 0 ? 3 : 2; // abs(p[1] - y1) < ε } function compare(a, b) { - return comparePoints(a.point, b.point); + return comparePoints(a.x, b.x); } function comparePoints(a, b) { @@ -3047,47 +3334,6 @@ function d3_geo_clipView(x0, y0, x1, y1) { : ca === 2 ? a[1] - b[1] : b[0] - a[0]; } - - // LiangâBarsky line clipping. - function clipLine(a, b) { - var dx = b[0] - a[0], - dy = b[1] - a[1], - t = [0, 1]; - - if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1; - - if (d3_geo_clipViewT(x0 - a[0], dx, t) && - d3_geo_clipViewT(a[0] - x1, -dx, t) && - d3_geo_clipViewT(y0 - a[1], dy, t) && - d3_geo_clipViewT(a[1] - y1, -dy, t)) { - if (t[1] < 1) { - b[0] = a[0] + t[1] * dx; - b[1] = a[1] + t[1] * dy; - } - if (t[0] > 0) { - a[0] += t[0] * dx; - a[1] += t[0] * dy; - } - return true; - } - - return false; - } -} - -function d3_geo_clipViewT(num, denominator, t) { - if (Math.abs(denominator) < ε) return num <= 0; - - var u = num / denominator; - - if (denominator > 0) { - if (u > t[1]) return false; - if (u > t[0]) t[0] = u; - } else { - if (u < t[0]) return false; - if (u < t[1]) t[1] = u; - } - return true; } function d3_geo_compose(a, b) { @@ -3330,7 +3576,7 @@ d3.geo.bounds = (function() { var dλ = λ - λ_, s = dλ > 0 ? 1 : -1, λi = inflection[0] * d3_degrees * s, - antimeridian = Math.abs(dλ) > 180; + antimeridian = abs(dλ) > 180; if (antimeridian ^ (s * λ_ < λi && λi < s * λ)) { var Ïi = inflection[1] * d3_degrees; if (Ïi > Ï1) Ï1 = Ïi; @@ -3375,7 +3621,7 @@ d3.geo.bounds = (function() { function ringPoint(λ, Ï) { if (p0) { var dλ = λ - λ_; - dλSum += Math.abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ; + dλSum += abs(dλ) > 180 ? dλ + (dλ > 0 ? 360 : -360) : dλ; } else λ__ = λ, Ï__ = Ï; d3_geo_area.point(λ, Ï); linePoint(λ, Ï); @@ -3388,7 +3634,7 @@ d3.geo.bounds = (function() { function ringEnd() { ringPoint(λ__, Ï__); d3_geo_area.lineEnd(); - if (Math.abs(dλSum) > ε) λ0 = -(λ1 = 180); + if (abs(dλSum) > ε) λ0 = -(λ1 = 180); range[0] = λ0, range[1] = λ1; p0 = null; } @@ -3601,7 +3847,7 @@ var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = { }, polygonEnd: function() { d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop; - d3_geo_pathAreaSum += Math.abs(d3_geo_pathAreaPolygon / 2); + d3_geo_pathAreaSum += abs(d3_geo_pathAreaPolygon / 2); } }; @@ -3806,7 +4052,7 @@ function d3_geo_pathContext(context) { function point(x, y) { context.moveTo(x, y); - context.arc(x, y, pointRadius, 0, 2 * Ï); + context.arc(x, y, pointRadius, 0, Ï); } function pointLineStart(x, y) { @@ -3898,7 +4144,7 @@ function d3_geo_resample(project) { c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), Ï2 = Math.asin(c /= m), - λ2 = Math.abs(Math.abs(c) - 1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), + λ2 = abs(abs(c) - 1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, Ï2), x2 = p[0], y2 = p[1], @@ -3906,7 +4152,7 @@ function d3_geo_resample(project) { dy2 = y2 - y0, dz = dy * dx2 - dx * dy2; if (dz * dz / d2 > δ2 // perpendicular projected distance - || Math.abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 // midpoint close to an end + || abs((dx * dx2 + dy * dy2) / d2 - .5) > .3 // midpoint close to an end || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream); stream.point(x2, y2); @@ -3924,6 +4170,29 @@ function d3_geo_resample(project) { return resample; } +d3.geo.transform = function(methods) { + return { + stream: function(stream) { + var transform = new d3_geo_transform(stream); + for (var k in methods) transform[k] = methods[k]; + return transform; + } + }; +}; + +function d3_geo_transform(stream) { + this.stream = stream; +} + +d3_geo_transform.prototype = { + point: function(x, y) { this.stream.point(x, y); }, + sphere: function() { this.stream.sphere(); }, + lineStart: function() { this.stream.lineStart(); }, + lineEnd: function() { this.stream.lineEnd(); }, + polygonStart: function() { this.stream.polygonStart(); }, + polygonEnd: function() { this.stream.polygonEnd(); } +}; + d3.geo.path = function() { var pointRadius = 4.5, projection, @@ -3992,17 +4261,11 @@ d3.geo.path = function() { }; function d3_geo_pathProjectStream(project) { - var resample = d3_geo_resample(function(λ, Ï) { return project([λ * d3_degrees, Ï * d3_degrees]); }); + var resample = d3_geo_resample(function(x, y) { return project([x * d3_degrees, y * d3_degrees]); }); return function(stream) { - stream = resample(stream); - return { - point: function(λ, Ï) { stream.point(λ * d3_radians, Ï * d3_radians); }, - sphere: function() { stream.sphere(); }, - lineStart: function() { stream.lineStart(); }, - lineEnd: function() { stream.lineEnd(); }, - polygonStart: function() { stream.polygonStart(); }, - polygonEnd: function() { stream.polygonEnd(); } - }; + var transform = new d3_geo_transform(stream = resample(stream)); + transform.point = function(x, y) { stream.point(x * d3_radians, y * d3_radians); }; + return transform; }; } @@ -4041,7 +4304,7 @@ function d3_geo_projectionMutator(projectAt) { projection.stream = function(output) { if (stream) stream.valid = false; - stream = d3_geo_projectionRadiansRotate(rotate, preclip(projectResample(postclip(output)))); + stream = d3_geo_projectionRadians(preclip(rotate, projectResample(postclip(output)))); stream.valid = true; // allow caching by d3.geo.path return stream; }; @@ -4055,7 +4318,7 @@ function d3_geo_projectionMutator(projectAt) { projection.clipExtent = function(_) { if (!arguments.length) return clipExtent; clipExtent = _; - postclip = _ == null ? d3_identity : d3_geo_clipView(_[0][0], _[0][1], _[1][0], _[1][1]); + postclip = _ ? d3_geo_clipExtent(_[0][0], _[0][1], _[1][0], _[1][1]) : d3_identity; return invalidate(); }; @@ -4098,10 +4361,7 @@ function d3_geo_projectionMutator(projectAt) { } function invalidate() { - if (stream) { - stream.valid = false; - stream = null; - } + if (stream) stream.valid = false, stream = null; return projection; } @@ -4112,18 +4372,12 @@ function d3_geo_projectionMutator(projectAt) { }; } -function d3_geo_projectionRadiansRotate(rotate, stream) { - return { - point: function(x, y) { - y = rotate(x * d3_radians, y * d3_radians), x = y[0]; - stream.point(x > Ï ? x - 2 * Ï : x < -Ï ? x + 2 * Ï : x, y[1]); - }, - sphere: function() { stream.sphere(); }, - lineStart: function() { stream.lineStart(); }, - lineEnd: function() { stream.lineEnd(); }, - polygonStart: function() { stream.polygonStart(); }, - polygonEnd: function() { stream.polygonEnd(); } +function d3_geo_projectionRadians(stream) { + var transform = new d3_geo_transform(stream); + transform.point = function(λ, Ï) { + stream.point(λ * d3_radians, Ï * d3_radians); }; + return transform; } function d3_geo_mercator(λ, Ï) { @@ -4131,7 +4385,7 @@ function d3_geo_mercator(λ, Ï) { } d3_geo_mercator.invert = function(x, y) { - return [x, 2 * Math.atan(Math.exp(y)) - Ï / 2]; + return [x, 2 * Math.atan(Math.exp(y)) - halfÏ]; }; function d3_geo_mercatorProjection(project) { @@ -4303,7 +4557,7 @@ d3.ease = function(name) { m = i >= 0 ? name.substring(i + 1) : "in"; t = d3_ease.get(t) || d3_ease_default; m = d3_ease_mode.get(m) || d3_identity; - return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1)))); + return d3_ease_clamp(m(t.apply(null, d3_arraySlice.call(arguments, 1)))); }; function d3_ease_clamp(f) { @@ -4347,7 +4601,7 @@ function d3_ease_poly(e) { } function d3_ease_sin(t) { - return 1 - Math.cos(t * Ï / 2); + return 1 - Math.cos(t * halfÏ); } function d3_ease_exp(t) { @@ -4361,10 +4615,10 @@ function d3_ease_circle(t) { function d3_ease_elastic(a, p) { var s; if (arguments.length < 2) p = 0.45; - if (arguments.length) s = p / (2 * Ï) * Math.asin(1 / a); + if (arguments.length) s = p / Ï * Math.asin(1 / a); else a = 1, s = p / 4; return function(t) { - return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Ï / p); + return 1 + a * Math.pow(2, -10 * t) * Math.sin((t - s) * Ï / p); }; } @@ -5379,7 +5633,7 @@ function d3_transition_text(b) { d3_transitionPrototype.remove = function() { return this.each("end.transition", function() { var p; - if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this); + if (this.__transition__.count < 2 && (p = this.parentNode)) p.removeChild(this); }); }; @@ -5393,15 +5647,15 @@ d3_transitionPrototype.ease = function(value) { d3_transitionPrototype.delay = function(value) { var id = this.id; return d3_selection_each(this, typeof value === "function" - ? function(node, i, j) { node.__transition__[id].delay = value.call(node, node.__data__, i, j) | 0; } - : (value |= 0, function(node) { node.__transition__[id].delay = value; })); + ? function(node, i, j) { node.__transition__[id].delay = +value.call(node, node.__data__, i, j); } + : (value = +value, function(node) { node.__transition__[id].delay = value; })); }; d3_transitionPrototype.duration = function(value) { var id = this.id; return d3_selection_each(this, typeof value === "function" - ? function(node, i, j) { node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j) | 0); } - : (value = Math.max(1, value | 0), function(node) { node.__transition__[id].duration = value; })); + ? function(node, i, j) { node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j)); } + : (value = Math.max(1, value), function(node) { node.__transition__[id].duration = value; })); }; d3_transitionPrototype.each = function(type, listener) { @@ -5471,10 +5725,12 @@ function d3_transitionNode(node, i, id, inherit) { ease = transition.ease, delay = transition.delay, duration = transition.duration, + timer = d3_timer_active, tweened = []; - if (delay <= elapsed) return start(elapsed); - d3_timer_replace(start, delay, time); + timer.t = delay + time; + if (delay <= elapsed) return start(elapsed - delay); + timer.c = start; function start(elapsed) { if (lock.active > id) return stop(); @@ -5487,14 +5743,16 @@ function d3_transitionNode(node, i, id, inherit) { } }); - if (tick(elapsed)) return 1; - d3_timer_replace(tick, 0, time); + d3.timer(function() { // defer to end of current frame + timer.c = tick(elapsed || 1) ? d3_true : tick; + return 1; + }, 0, time); } function tick(elapsed) { if (lock.active !== id) return stop(); - var t = (elapsed - delay) / duration, + var t = elapsed / duration, e = ease(t), n = tweened.length; @@ -5503,9 +5761,8 @@ function d3_transitionNode(node, i, id, inherit) { } if (t >= 1) { - stop(); transition.event && transition.event.end.call(node, d, i); - return 1; + return stop(); } } @@ -5529,7 +5786,7 @@ function d3_xhrType(response) { function d3_xhr(url, mimeType, response, callback) { var xhr = {}, - dispatch = d3.dispatch("progress", "load", "error"), + dispatch = d3.dispatch("beforesend", "progress", "load", "error"), headers = {}, request = new XMLHttpRequest, responseType = null; @@ -5611,6 +5868,7 @@ function d3_xhr(url, mimeType, response, callback) { if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType); if (responseType != null) request.responseType = responseType; if (callback != null) xhr.on("error", callback).on("load", function(request) { callback(null, request); }); + dispatch.beforesend.call(xhr, request); request.send(data == null ? null : data); return xhr; }; @@ -5665,7 +5923,7 @@ d3.combobox = function() { var fetcher = function(val, cb) { cb(data.filter(function(d) { - return d.title + return d.value .toString() .toLowerCase() .indexOf(val.toLowerCase()) !== -1; @@ -5690,25 +5948,26 @@ d3.combobox = function() { var parent = this.parentNode, sibling = this.nextSibling; - var carat = d3.select(parent).selectAll('.combobox-carat') + var caret = d3.select(parent).selectAll('.combobox-caret') .filter(function(d) { return d === input.node(); }) .data([input.node()]); - carat.enter().insert('div', function() { return sibling; }) - .attr('class', 'combobox-carat'); + caret.enter().insert('div', function() { return sibling; }) + .attr('class', 'combobox-caret'); - carat + caret .on('mousedown', function () { // prevent the form element from blurring. it blurs // on mousedown d3.event.stopPropagation(); d3.event.preventDefault(); input.node().focus(); + fetch('', render); }); }); function focus() { - fetch(render); + fetch(value(), render); } function blur() { @@ -5798,7 +6057,7 @@ d3.combobox = function() { } function change() { - fetch(function() { + fetch(value(), function() { autocomplete(); render(); }); @@ -5823,8 +6082,8 @@ d3.combobox = function() { return value; } - function fetch(cb) { - fetcher.call(input, value(), function(_) { + function fetch(v, cb) { + fetcher.call(input, v, function(_) { suggestions = _; cb(); }); @@ -5849,7 +6108,7 @@ d3.combobox = function() { } function render() { - if (suggestions.length && document.activeElement === input.node()) { + if (suggestions.length > 1 && document.activeElement === input.node()) { show(); } else { hide(); @@ -13770,64 +14029,126 @@ if (typeof module !== 'undefined') { })(); toGeoJSON = (function() { - var removeSpace = (/\s*/g), trimSpace = (/^\s*|\s*$/g), splitSpace = (/\s+/); + 'use strict'; + + var removeSpace = (/\s*/g), + trimSpace = (/^\s*|\s*$/g), + splitSpace = (/\s+/); + // generate a short, numeric hash of a string function okhash(x) { if (!x || !x.length) return 0; for (var i = 0, h = 0; i < x.length; i++) { h = ((h << 5) - h) + x.charCodeAt(i) | 0; } return h; } + // all Y children of X function get(x, y) { return x.getElementsByTagName(y); } function attr(x, y) { return x.getAttribute(y); } function attrf(x, y) { return parseFloat(attr(x, y)); } + // one Y child of X, if any, otherwise null function get1(x, y) { var n = get(x, y); return n.length ? n[0] : null; } + // https://developer.mozilla.org/en-US/docs/Web/API/Node.normalize + function norm(el) { if (el.normalize) { el.normalize(); } return el; } + // cast array x into numbers function numarray(x) { for (var j = 0, o = []; j < x.length; j++) o[j] = parseFloat(x[j]); return o; } - function nodeVal(x) { return x && x.firstChild && x.firstChild.nodeValue; } + function clean(x) { + var o = {}; + for (var i in x) if (x[i]) o[i] = x[i]; + return o; + } + // get the content of a text node, if any + function nodeVal(x) { if (x) {norm(x);} return x && x.firstChild && x.firstChild.nodeValue; } + // get one coordinate from a coordinate array, if any function coord1(v) { return numarray(v.replace(removeSpace, '').split(',')); } + // get all coordinates from a coordinate array as [[],[]] function coord(v) { - var coords = v.replace(trimSpace, '').split(splitSpace), o = []; - for (var i = 0; i < coords.length; i++) o.push(coord1(coords[i])); + var coords = v.replace(trimSpace, '').split(splitSpace), + o = []; + for (var i = 0; i < coords.length; i++) { + o.push(coord1(coords[i])); + } return o; } - function fc() { return { type: 'FeatureCollection', features: [] }; } + function coordPair(x) { return [attrf(x, 'lon'), attrf(x, 'lat')]; } + + // create a new feature collection parent object + function fc() { + return { + type: 'FeatureCollection', + features: [] + }; + } + + var styleSupport = false; + if (typeof XMLSerializer !== 'undefined') { + var serializer = new XMLSerializer(); + styleSupport = true; + } + function xml2str(str) { return serializer.serializeToString(str); } + var t = { kml: function(doc, o) { o = o || {}; - var gj = fc(), styleIndex = {}, - geotypes = ['Polygon', 'LineString', 'Point'], - placemarks = get(doc, 'Placemark'), styles = get(doc, 'Style'); - if (o.styles) for (var k = 0; k < styles.length; k++) { - styleIndex['#' + styles[k].id] = okhash(styles[k].innerHTML).toString(16); + var gj = fc(), + // styleindex keeps track of hashed styles in order to match features + styleIndex = {}, + // atomic geospatial types supported by KML - MultiGeometry is + // handled separately + geotypes = ['Polygon', 'LineString', 'Point', 'Track'], + // all root placemarks in the file + placemarks = get(doc, 'Placemark'), + styles = get(doc, 'Style'); + + if (styleSupport) for (var k = 0; k < styles.length; k++) { + styleIndex['#' + attr(styles[k], 'id')] = okhash(xml2str(styles[k])).toString(16); } for (var j = 0; j < placemarks.length; j++) { gj.features = gj.features.concat(getPlacemark(placemarks[j])); } + function gxCoord(v) { return numarray(v.split(' ')); } + function gxCoords(root) { + var elems = get(root, 'coord', 'gx'), coords = []; + for (var i = 0; i < elems.length; i++) coords.push(gxCoord(nodeVal(elems[i]))); + return coords; + } function getGeometry(root) { var geomNode, geomNodes, i, j, k, geoms = []; if (get1(root, 'MultiGeometry')) return getGeometry(get1(root, 'MultiGeometry')); + if (get1(root, 'MultiTrack')) return getGeometry(get1(root, 'MultiTrack')); for (i = 0; i < geotypes.length; i++) { geomNodes = get(root, geotypes[i]); if (geomNodes) { for (j = 0; j < geomNodes.length; j++) { geomNode = geomNodes[j]; if (geotypes[i] == 'Point') { - geoms.push({ type: 'Point', + geoms.push({ + type: 'Point', coordinates: coord1(nodeVal(get1(geomNode, 'coordinates'))) }); } else if (geotypes[i] == 'LineString') { - geoms.push({ type: 'LineString', + geoms.push({ + type: 'LineString', coordinates: coord(nodeVal(get1(geomNode, 'coordinates'))) }); } else if (geotypes[i] == 'Polygon') { - var rings = get(geomNode, 'LinearRing'), coords = []; + var rings = get(geomNode, 'LinearRing'), + coords = []; for (k = 0; k < rings.length; k++) { coords.push(coord(nodeVal(get1(rings[k], 'coordinates')))); } - geoms.push({ type: 'Polygon', coordinates: coords }); + geoms.push({ + type: 'Polygon', + coordinates: coords + }); + } else if (geotypes[i] == 'Track') { + geoms.push({ + type: 'LineString', + coordinates: gxCoords(geomNode) + }); } } } @@ -13841,7 +14162,7 @@ toGeoJSON = (function() { description = nodeVal(get1(root, 'description')), extendedData = get1(root, 'ExtendedData'); - if (!geoms.length) return false; + if (!geoms.length) return []; if (name) properties.name = name; if (styleUrl && styleIndex[styleUrl]) { properties.styleUrl = styleUrl; @@ -13859,28 +14180,69 @@ toGeoJSON = (function() { properties[simpleDatas[i].getAttribute('name')] = nodeVal(simpleDatas[i]); } } - return [{ type: 'Feature', geometry: (geoms.length === 1) ? geoms[0] : { - type: 'GeometryCollection', - geometries: geoms }, properties: properties }]; + return [{ + type: 'Feature', + geometry: (geoms.length === 1) ? geoms[0] : { + type: 'GeometryCollection', + geometries: geoms + }, + properties: properties + }]; } return gj; }, gpx: function(doc, o) { - var i, j, tracks = get(doc, 'trk'), track, pt, gj = fc(); + var i, + tracks = get(doc, 'trk'), + routes = get(doc, 'rte'), + waypoints = get(doc, 'wpt'), + // a feature collection + gj = fc(); for (i = 0; i < tracks.length; i++) { - track = tracks[i]; - var name = nodeVal(get1(track, 'name')); - var pts = get(track, 'trkpt'), line = []; + gj.features.push(getLinestring(tracks[i], 'trkpt')); + } + for (i = 0; i < routes.length; i++) { + gj.features.push(getLinestring(routes[i], 'rtept')); + } + for (i = 0; i < waypoints.length; i++) { + gj.features.push(getPoint(waypoints[i])); + } + function getLinestring(node, pointname) { + var j, pts = get(node, pointname), line = []; for (j = 0; j < pts.length; j++) { - line.push([attrf(pts[j], 'lon'), attrf(pts[j], 'lat')]); + line.push(coordPair(pts[j])); } - gj.features.push({ + return { type: 'Feature', - properties: { - name: name || '' - }, - geometry: { type: 'LineString', coordinates: line } - }); + properties: getProperties(node), + geometry: { + type: 'LineString', + coordinates: line + } + }; + } + function getPoint(node) { + var prop = getProperties(node); + prop.ele = nodeVal(get1(node, 'ele')); + prop.sym = nodeVal(get1(node, 'sym')); + return { + type: 'Feature', + properties: prop, + geometry: { + type: 'Point', + coordinates: coordPair(node) + } + }; + } + function getProperties(node) { + var meta = ['name', 'desc', 'author', 'copyright', 'link', + 'time', 'keywords'], + prop = {}, + k; + for (k = 0; k < meta.length; k++) { + prop[meta[k]] = nodeVal(get1(node, meta[k])); + } + return clean(prop); } return gj; } @@ -15016,6 +15378,7 @@ if (typeof exports === 'object') { }).call(function() { return this || (typeof window !== 'undefined' ? window : global); }()); +/* jshint ignore:start */ (function () { 'use strict'; window.iD = function () { @@ -15033,18 +15396,25 @@ window.iD = function () { return { getItem: function(k) { return s[k]; }, setItem: function(k, v) { s[k] = v; }, - removeItem: function(k) { delete s[k] } + removeItem: function(k) { delete s[k]; } }; })(); context.storage = function(k, v) { - if (arguments.length === 1) return storage.getItem(k); - else if (v === null) storage.removeItem(k); - else storage.setItem(k, v); + try { + if (arguments.length === 1) return storage.getItem(k); + else if (v === null) storage.removeItem(k); + else storage.setItem(k, v); + } catch(e) { + // localstorage quota exceeded + /* jshint devel:true */ + if (typeof console !== 'undefined') console.error('localStorage quota exceeded'); + /* jshint devel:false */ + } }; var history = iD.History(context), - dispatch = d3.dispatch('enter', 'exit', 'toggleFullscreen'), + dispatch = d3.dispatch('enter', 'exit'), mode, container, ui = iD.ui(context), @@ -15091,20 +15461,46 @@ window.iD = function () { /* History */ context.graph = history.graph; - context.perform = history.perform; - context.replace = history.replace; - context.pop = history.pop; - context.undo = history.undo; - context.redo = history.redo; context.changes = history.changes; context.intersects = history.intersects; + var inIntro = false; + + context.inIntro = function(_) { + if (!arguments.length) return inIntro; + inIntro = _; + return context; + }; + + context.save = function() { + if (inIntro) return; + history.save(); + if (history.hasChanges()) return t('save.unsaved_changes'); + }; + context.flush = function() { connection.flush(); history.reset(); return context; }; + // Debounce save, since it's a synchronous localStorage write, + // and history changes can happen frequently (e.g. when dragging). + var debouncedSave = _.debounce(context.save, 350); + function withDebouncedSave(fn) { + return function() { + var result = fn.apply(history, arguments); + debouncedSave(); + return result; + }; + } + + context.perform = withDebouncedSave(history.perform); + context.replace = withDebouncedSave(history.replace); + context.pop = withDebouncedSave(history.pop); + context.undo = withDebouncedSave(history.undo); + context.redo = withDebouncedSave(history.redo); + /* Graph */ context.hasEntity = function(id) { return history.graph().hasEntity(id); @@ -15184,9 +15580,52 @@ window.iD = function () { }; /* Projection */ - context.projection = d3.geo.mercator() - .scale(512 / Math.PI) - .precision(0); + function rawMercator() { + var project = d3.geo.mercator.raw, + k = 512 / Math.PI, // scale + x = 0, y = 0, // translate + clipExtent = [[0, 0], [0, 0]]; + + function projection(point) { + point = project(point[0] * Math.PI / 180, point[1] * Math.PI / 180); + return [point[0] * k + x, y - point[1] * k]; + } + + projection.invert = function(point) { + point = project.invert((point[0] - x) / k, (y - point[1]) / k); + return point && [point[0] * 180 / Math.PI, point[1] * 180 / Math.PI]; + }; + + projection.scale = function(_) { + if (!arguments.length) return k; + k = +_; + return projection; + }; + + projection.translate = function(_) { + if (!arguments.length) return [x, y]; + x = +_[0]; + y = +_[1]; + return projection; + }; + + projection.clipExtent = function(_) { + if (!arguments.length) return clipExtent; + clipExtent = _; + return projection; + }; + + projection.stream = d3.geo.transform({ + point: function(x, y) { + x = projection([x, y]); + this.stream.point(x[0], x[1]); + } + }).stream; + + return projection; + } + + context.projection = rawMercator(); /* Background */ var background = iD.Background(context); @@ -15203,6 +15642,13 @@ window.iD = function () { context.zoomIn = map.zoomIn; context.zoomOut = map.zoomOut; + context.surfaceRect = function() { + // Work around a bug in Firefox. + // http://stackoverflow.com/questions/18153989/ + // https://bugzilla.mozilla.org/show_bug.cgi?id=530985 + return context.surface().node().parentNode.getBoundingClientRect(); + }; + /* Presets */ var presets = iD.presets() .load(iD.data.presets); @@ -15232,24 +15678,28 @@ window.iD = function () { return context; }; - context.imagePath = function(_) { - return assetPath + 'img/' + _; + var assetMap = {}; + context.assetMap = function(_) { + if (!arguments.length) return assetMap; + assetMap = _; + return context; }; - context.toggleFullscreen = function() { - dispatch.toggleFullscreen(); + context.imagePath = function(_) { + var asset = 'img/' + _; + return assetMap[asset] || assetPath + asset; }; return d3.rebind(context, dispatch, 'on'); }; -iD.version = '1.1.4'; +iD.version = '1.3.2'; (function() { var detected = {}; var ua = navigator.userAgent, - msie = new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"); + msie = new RegExp('MSIE ([0-9]{1,}[\\.0-9]{0,})'); if (msie.exec(ua) !== null) { var rv = parseFloat(RegExp.$1); @@ -15396,7 +15846,12 @@ iD.taginfo = function() { taginfo.docs = function(parameters, callback) { var debounce = parameters.debounce; parameters = clean(setSort(parameters)); - request(endpoint + (parameters.value ? 'tag/wiki_pages?' : 'key/wiki_pages?') + + + var path = 'key/wiki_pages?'; + if (parameters.value) path = 'tag/wiki_pages?'; + else if (parameters.rtype) path = 'relation/wiki_pages?'; + + request(endpoint + path + iD.util.qsString(parameters), debounce, callback); }; @@ -15488,7 +15943,7 @@ iD.util.entityOrMemberSelector = function(ids, graph) { var entity = graph.hasEntity(id); if (entity && entity.type === 'relation') { entity.members.forEach(function(member) { - s += ',.' + member.id + s += ',.' + member.id; }); } }); @@ -15573,7 +16028,7 @@ iD.util.editDistance = function(a, b) { for (var j = 0; j <= a.length; j++) { matrix[0][j] = j; } for (i = 1; i <= b.length; i++) { for (j = 1; j <= a.length; j++) { - if (b.charAt(i-1) == a.charAt(j-1)) { + if (b.charAt(i-1) === a.charAt(j-1)) { matrix[i][j] = matrix[i-1][j-1]; } else { matrix[i][j] = Math.min(matrix[i-1][j-1] + 1, // substitution @@ -15601,6 +16056,7 @@ iD.util.fastMouse = function(container) { }; }; +/* jshint -W103 */ iD.util.getPrototypeOf = Object.getPrototypeOf || function(obj) { return obj.__proto__; }; iD.util.asyncMap = function(inputs, func, callback) { @@ -15617,6 +16073,77 @@ iD.util.asyncMap = function(inputs, func, callback) { }); }); }; + +// wraps an index to an interval [0..length-1] +iD.util.wrap = function(index, length) { + if (index < 0) + index += Math.ceil(-index/length)*length; + return index % length; +}; +// A per-domain session mutex backed by a cookie and dead man's +// switch. If the session crashes, the mutex will auto-release +// after 5 seconds. + +iD.util.SessionMutex = function(name) { + var mutex = {}, + intervalID; + + function renew() { + var expires = new Date(); + expires.setSeconds(expires.getSeconds() + 5); + document.cookie = name + '=1; expires=' + expires.toUTCString(); + } + + mutex.lock = function() { + if (intervalID) return true; + var cookie = document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + name + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1'); + if (cookie) return false; + renew(); + intervalID = window.setInterval(renew, 4000); + return true; + }; + + mutex.unlock = function() { + if (!intervalID) return; + document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:00 GMT'; + clearInterval(intervalID); + intervalID = null; + }; + + mutex.locked = function() { + return !!intervalID; + }; + + return mutex; +}; +iD.util.SuggestNames = function(preset, suggestions) { + preset = preset.id.split('/', 2); + var k = preset[0], + v = preset[1]; + + return function(value, callback) { + var result = []; + if (value && value.length > 2) { + if (suggestions[k] && suggestions[k][v]) { + for (var sugg in suggestions[k][v]) { + var dist = iD.util.editDistance(value, sugg.substring(0, value.length)); + if (dist < 3) { + result.push({ + title: sugg, + value: sugg, + dist: dist + }); + } + } + } + result.sort(function(a, b) { + return a.dist - b.dist; + }); + } + result = result.slice(0,3); + callback(result); + }; +}; iD.geo = {}; iD.geo.roundCoords = function(c) { @@ -15629,17 +16156,28 @@ iD.geo.interp = function(p1, p2, t) { }; // http://jsperf.com/id-dist-optimization -iD.geo.dist = function(a, b) { +iD.geo.euclideanDistance = function(a, b) { var x = a[0] - b[0], y = a[1] - b[1]; return Math.sqrt((x * x) + (y * y)); }; +// Equirectangular approximation of spherical distances on Earth +iD.geo.sphericalDistance = function(a, b) { + var x = Math.cos(a[1]*Math.PI/180) * (a[0] - b[0]), + y = a[1] - b[1]; + return 6.3710E6 * Math.sqrt((x * x) + (y * y)) * Math.PI/180; +}; + +iD.geo.edgeEqual = function(a, b) { + return (a[0] === b[0] && a[1] === b[1]) || + (a[0] === b[1] && a[1] === b[0]); +}; // Choose the edge with the minimal distance from `point` to its orthogonal // projection onto that edge, if such a projection exists, or the distance to // the closest vertex on that edge. Returns an object with the `index` of the // chosen edge, the chosen `loc` on that edge, and the `distance` to to it. iD.geo.chooseEdge = function(nodes, point, projection) { - var dist = iD.geo.dist, + var dist = iD.geo.euclideanDistance, points = nodes.map(function(n) { return projection(n.loc); }), min = Infinity, idx, loc; @@ -15698,7 +16236,7 @@ iD.geo.pointInPolygon = function(point, polygon) { var xi = polygon[i][0], yi = polygon[i][1]; var xj = polygon[j][0], yj = polygon[j][1]; - var intersect = ((yi > y) != (yj > y)) && + var intersect = ((yi > y) !== (yj > y)) && (x < (xj - xi) * (y - yi) / (yj - yi) + xi); if (intersect) inside = !inside; } @@ -15757,6 +16295,16 @@ _.extend(iD.geo.Extent.prototype, { (this[0][1] + this[1][1]) / 2]; }, + polygon: function() { + return [ + [this[0][0], this[0][1]], + [this[0][0], this[1][1]], + [this[1][0], this[1][1]], + [this[1][0], this[0][1]], + [this[0][0], this[0][1]] + ]; + }, + intersects: function(obj) { if (!(obj instanceof iD.geo.Extent)) obj = new iD.geo.Extent(obj); return obj[0][0] <= this[1][0] && @@ -15920,6 +16468,68 @@ iD.geo.joinWays = function(array, graph) { return joined; }; +iD.geo.turns = function(graph, entityID) { + var way = graph.entity(entityID); + if (way.type !== 'way' || !way.tags.highway || way.isArea()) + return []; + + function withRestriction(turn) { + graph.parentRelations(turn.from).forEach(function(relation) { + if (relation.tags.type !== 'restriction') + return; + + var f = relation.memberByRole('from'), + t = relation.memberByRole('to'), + v = relation.memberByRole('via'); + + if (f && f.id === turn.from.id && + t && t.id === turn.to.id && + v && v.id === turn.via.id) { + turn.restriction = relation; + } + }); + + return turn; + } + + var turns = []; + + [way.first(), way.last()].forEach(function(nodeID) { + var node = graph.entity(nodeID); + graph.parentWays(node).forEach(function(parent) { + if (parent === way || parent.isDegenerate() || !parent.tags.highway) + return; + if (way.first() === node.id && way.tags.oneway === 'yes') + return; + if (way.last() === node.id && way.tags.oneway === '-1') + return; + + var index = parent.nodes.indexOf(node.id); + + // backward + if (parent.first() !== node.id && parent.tags.oneway !== 'yes') { + turns.push(withRestriction({ + from: way, + to: parent, + via: node, + toward: graph.entity(parent.nodes[index - 1]) + })); + } + + // forward + if (parent.last() !== node.id && parent.tags.oneway !== '-1') { + turns.push(withRestriction({ + from: way, + to: parent, + via: node, + toward: graph.entity(parent.nodes[index + 1]) + })); + } + }); + }); + + return turns; +}; iD.actions = {}; iD.actions.AddEntity = function(way) { return function(graph) { @@ -15953,7 +16563,7 @@ iD.actions.AddMember = function(relationId, member, memberIndex) { } return graph.replace(relation.addMember(member, memberIndex)); - } + }; }; iD.actions.AddMidpoint = function(midpoint, node) { return function(graph) { @@ -15965,11 +16575,12 @@ iD.actions.AddMidpoint = function(midpoint, node) { parents.forEach(function(way) { for (var i = 0; i < way.nodes.length - 1; i++) { - if ((way.nodes[i] === midpoint.edge[0] && - way.nodes[i + 1] === midpoint.edge[1]) || - (way.nodes[i] === midpoint.edge[1] && - way.nodes[i + 1] === midpoint.edge[0])) { + if (iD.geo.edgeEqual([way.nodes[i], way.nodes[i + 1]], midpoint.edge)) { graph = graph.replace(graph.entity(way.id).addNode(node.id, i + 1)); + + // Add only one midpoint on doubled-back segments, + // turning them into self-intersections. + return; } } }); @@ -15986,7 +16597,7 @@ iD.actions.AddVertex = function(wayId, nodeId, index) { iD.actions.ChangeMember = function(relationId, member, memberIndex) { return function(graph) { return graph.replace(graph.entity(relationId).updateMember(member, memberIndex)); - } + }; }; iD.actions.ChangePreset = function(entityId, oldPreset, newPreset) { return function(graph) { @@ -16006,63 +16617,105 @@ iD.actions.ChangeTags = function(entityId, tags) { return graph.replace(entity.update({tags: tags})); }; }; -iD.actions.Circularize = function(wayId, projection, count) { - count = count || 12; - - function closestIndex(nodes, loc) { - var idx, min = Infinity, dist; - for (var i = 0; i < nodes.length; i++) { - dist = iD.geo.dist(nodes[i].loc, loc); - if (dist < min) { - min = dist; - idx = i; - } - } - return idx; - } +iD.actions.Circularize = function(wayId, projection, maxAngle) { + maxAngle = (maxAngle || 20) * Math.PI / 180; var action = function(graph) { var way = graph.entity(wayId), nodes = _.uniq(graph.childNodes(way)), + keyNodes = nodes.filter(function(n) { return graph.parentWays(n).length !== 1; }), points = nodes.map(function(n) { return projection(n.loc); }), + keyPoints = keyNodes.map(function(n) { return projection(n.loc); }), centroid = d3.geom.polygon(points).centroid(), - radius = d3.median(points, function(p) { - return iD.geo.dist(centroid, p); - }), - ids = [], - sign = d3.geom.polygon(points).area() > 0 ? -1 : 1; - - for (var i = 0; i < count; i++) { - var node, + radius = d3.median(points, function(p) { return iD.geo.euclideanDistance(centroid, p); }), + sign = d3.geom.polygon(points).area() > 0 ? 1 : -1, + ids; + + // we need atleast two key nodes for the algorithm to work + if (!keyNodes.length) { + keyNodes = [nodes[0]]; + keyPoints = [points[0]]; + } + + if (keyNodes.length === 1) { + var index = nodes.indexOf(keyNodes[0]), + oppositeIndex = Math.floor((index + nodes.length / 2) % nodes.length); + + keyNodes.push(nodes[oppositeIndex]); + keyPoints.push(points[oppositeIndex]); + } + + // key points and nodes are those connected to the ways, + // they are projected onto the circle, inbetween nodes are moved + // to constant internals between key nodes, extra inbetween nodes are + // added if necessary. + for (var i = 0; i < keyPoints.length; i++) { + var nextKeyNodeIndex = (i + 1) % keyNodes.length, + startNodeIndex = nodes.indexOf(keyNodes[i]), + endNodeIndex = nodes.indexOf(keyNodes[nextKeyNodeIndex]), + numberNewPoints = -1, + indexRange = endNodeIndex - startNodeIndex, + distance, totalAngle, eachAngle, startAngle, endAngle, + angle, loc, node, j; + + if (indexRange < 0) { + indexRange += nodes.length; + } + + // position this key node + distance = iD.geo.euclideanDistance(centroid, keyPoints[i]); + keyPoints[i] = [ + centroid[0] + (keyPoints[i][0] - centroid[0]) / distance * radius, + centroid[1] + (keyPoints[i][1] - centroid[1]) / distance * radius]; + graph = graph.replace(keyNodes[i].move(projection.invert(keyPoints[i]))); + + // figure out the between delta angle we want to match to + startAngle = Math.atan2(keyPoints[i][1] - centroid[1], keyPoints[i][0] - centroid[0]); + endAngle = Math.atan2(keyPoints[nextKeyNodeIndex][1] - centroid[1], keyPoints[nextKeyNodeIndex][0] - centroid[0]); + totalAngle = endAngle - startAngle; + + // detects looping around -pi/pi + if (totalAngle*sign > 0) { + totalAngle = -sign * (2 * Math.PI - Math.abs(totalAngle)); + } + + do { + numberNewPoints++; + eachAngle = totalAngle / (indexRange + numberNewPoints); + } while (Math.abs(eachAngle) > maxAngle); + + // move existing points + for (j = 1; j < indexRange; j++) { + angle = startAngle + j * eachAngle; loc = projection.invert([ - centroid[0] + Math.cos(sign * (i / 12) * Math.PI * 2) * radius, - centroid[1] + Math.sin(sign * (i / 12) * Math.PI * 2) * radius]); + centroid[0] + Math.cos(angle)*radius, + centroid[1] + Math.sin(angle)*radius]); - if (nodes.length) { - var idx = closestIndex(nodes, loc); - node = nodes[idx]; - nodes.splice(idx, 1); - } else { - node = iD.Node(); + node = nodes[(j + startNodeIndex) % nodes.length].move(loc); + graph = graph.replace(node); } - ids.push(node.id); - graph = graph.replace(node.move(loc)); + // add new inbetween nodes if necessary + for (j = 0; j < numberNewPoints; j++) { + angle = startAngle + (indexRange + j) * eachAngle; + loc = projection.invert([ + centroid[0] + Math.cos(angle) * radius, + centroid[1] + Math.sin(angle) * radius]); + + node = iD.Node({loc: loc}); + graph = graph.replace(node); + + nodes.splice(endNodeIndex + j, 0, node); + } } + // update the way to have all the new nodes + ids = nodes.map(function(n) { return n.id; }); ids.push(ids[0]); + way = way.update({nodes: ids}); graph = graph.replace(way); - for (i = 0; i < nodes.length; i++) { - graph.parentWays(nodes[i]).forEach(function(parent) { - graph = graph.replace(parent.replaceNode(nodes[i].id, - ids[closestIndex(graph.childNodes(way), nodes[i].loc)])); - }); - - graph = iD.actions.DeleteNode(nodes[i].id)(graph); - } - return graph; }; @@ -16094,6 +16747,7 @@ iD.actions.Connect = function(nodeIds) { for (var i = 0; i < nodeIds.length - 1; i++) { var node = graph.entity(nodeIds[i]); + /*jshint -W083 */ graph.parentWays(node).forEach(function(parent) { if (!parent.areAdjacent(node.id, survivor.id)) { graph = graph.replace(parent.replaceNode(node.id, survivor.id)); @@ -16103,6 +16757,7 @@ iD.actions.Connect = function(nodeIds) { graph.parentRelations(node).forEach(function(parent) { graph = graph.replace(parent.replaceMember(node, survivor)); }); + /*jshint +W083 */ survivor = survivor.mergeTags(node.tags); graph = iD.actions.DeleteNode(node.id)(graph); @@ -16162,7 +16817,12 @@ iD.actions.DeleteNode = function(nodeId) { graph.parentRelations(node) .forEach(function(parent) { - graph = graph.replace(parent.removeMembersWithID(nodeId)); + parent = parent.removeMembersWithID(nodeId); + graph = graph.replace(parent); + + if (parent.isDegenerate()) { + graph = iD.actions.DeleteRelation(parent.id)(graph); + } }); return graph.remove(node); @@ -16187,7 +16847,12 @@ iD.actions.DeleteRelation = function(relationId) { graph.parentRelations(relation) .forEach(function(parent) { - graph = graph.replace(parent.removeMembersWithID(relationId)); + parent = parent.removeMembersWithID(relationId); + graph = graph.replace(parent); + + if (parent.isDegenerate()) { + graph = iD.actions.DeleteRelation(parent.id)(graph); + } }); _.uniq(_.pluck(relation.members, 'id')).forEach(function(memberId) { @@ -16222,7 +16887,12 @@ iD.actions.DeleteWay = function(wayId) { graph.parentRelations(way) .forEach(function(parent) { - graph = graph.replace(parent.removeMembersWithID(wayId)); + parent = parent.removeMembersWithID(wayId); + graph = graph.replace(parent); + + if (parent.isDegenerate()) { + graph = iD.actions.DeleteRelation(parent.id)(graph); + } }); _.uniq(way.nodes).forEach(function(nodeId) { @@ -16293,7 +16963,7 @@ iD.actions.DiscardTags = function(difference) { difference.created().forEach(discardTags); return graph; - } + }; }; // Disconect the ways at the given node. // @@ -16319,7 +16989,7 @@ iD.actions.Disconnect = function(nodeId, newNodeId) { replacements.forEach(function(replacement) { var newNode = iD.Node({id: newNodeId, loc: node.loc, tags: node.tags}); graph = graph.replace(newNode); - graph = graph.replace(replacement.way.updateNode(newNode.id, replacement.index)); + graph = graph.replace(graph.entity(replacement.wayID).updateNode(newNode.id, replacement.index)); }); return graph; @@ -16338,7 +17008,7 @@ iD.actions.Disconnect = function(nodeId, newNodeId) { parent.nodes.forEach(function(waynode, index) { if (waynode === nodeId) { - candidates.push({way: parent, index: index}); + candidates.push({wayID: parent.id, index: index}); } }); }); @@ -16532,7 +17202,7 @@ iD.actions.MergePolygon = function(ids, newRelationId) { return _.any(contained[i]); } - function filterContained(d, i) { + function filterContained(d) { return d.filter(isContained); } @@ -16641,20 +17311,24 @@ iD.actions.Noop = function() { */ iD.actions.Orthogonalize = function(wayId, projection) { + var threshold = 7, // degrees within right or straight to alter + lowerThreshold = Math.cos((90 - threshold) * Math.PI / 180), + upperThreshold = Math.cos(threshold * Math.PI / 180); + var action = function(graph) { var way = graph.entity(wayId), nodes = graph.childNodes(way), + points = _.uniq(nodes).map(function(n) { return projection(n.loc); }), corner = {i: 0, dotp: 1}, - points, i, j, score, motions; + epsilon = 1e-4, + i, j, score, motions; if (nodes.length === 4) { - points = _.uniq(nodes).map(function(n) { return projection(n.loc); }); - for (i = 0; i < 1000; i++) { motions = points.map(calcMotion); points[corner.i] = addPoints(points[corner.i],motions[corner.i]); score = corner.dotp; - if (score < 1.0e-8) { + if (score < epsilon) { break; } } @@ -16662,30 +17336,50 @@ iD.actions.Orthogonalize = function(wayId, projection) { graph = graph.replace(graph.entity(nodes[corner.i].id) .move(projection.invert(points[corner.i]))); } else { - var best; - points = nodes.map(function(n) { return projection(n.loc); }); - score = squareness(); + var best, + originalPoints = _.clone(points); + score = Infinity; for (i = 0; i < 1000; i++) { motions = points.map(calcMotion); for (j = 0; j < motions.length; j++) { points[j] = addPoints(points[j],motions[j]); } - var newScore = squareness(); + var newScore = squareness(points); if (newScore < score) { best = _.clone(points); score = newScore; } - if (score < 1.0e-8) { + if (score < epsilon) { break; } } points = best; - for (i = 0; i < points.length - 1; i++) { - graph = graph.replace(graph.entity(nodes[i].id) - .move(projection.invert(points[i]))); + for (i = 0; i < points.length; i++) { + // only move the points that actually moved + if (originalPoints[i][0] !== points[i][0] || originalPoints[i][1] !== points[i][1]) { + graph = graph.replace(graph.entity(nodes[i].id) + .move(projection.invert(points[i]))); + } + } + + // remove empty nodes on straight sections + for (i = 0; i < points.length; i++) { + var node = nodes[i]; + + if (graph.parentWays(node).length > 1 || + graph.parentRelations(node).length || + node.hasInterestingTags()) { + + continue; + } + + var dotp = normalizedDotProduct(i, points); + if (dotp < -1 + epsilon) { + graph = iD.actions.DeleteNode(nodes[i].id)(graph); + } } } @@ -16695,79 +17389,91 @@ iD.actions.Orthogonalize = function(wayId, projection) { var a = array[(i - 1 + array.length) % array.length], c = array[(i + 1) % array.length], p = subtractPoints(a, b), - q = subtractPoints(c, b); + q = subtractPoints(c, b), + scale, dotp; - var scale = iD.geo.dist(p, [0, 0]) + iD.geo.dist(q, [0, 0]); + scale = 2 * Math.min(iD.geo.euclideanDistance(p, [0, 0]), iD.geo.euclideanDistance(q, [0, 0])); p = normalizePoint(p, 1.0); q = normalizePoint(q, 1.0); - var dotp = p[0] * q[0] + p[1] * q[1]; + dotp = filterDotProduct(p[0] * q[0] + p[1] * q[1]); // nasty hack to deal with almost-straight segments (angle is closer to 180 than to 90/270). if (array.length > 3) { if (dotp < -0.707106781186547) { dotp += 1.0; } - } else if (Math.abs(dotp) < corner.dotp) { + } else if (dotp && Math.abs(dotp) < corner.dotp) { corner.i = i; corner.dotp = Math.abs(dotp); } return normalizePoint(addPoints(p, q), 0.1 * dotp * scale); } + }; - function squareness() { - var g = 0.0; - for (var i = 1; i < points.length - 1; i++) { - var score = scoreOfPoints(points[i - 1], points[i], points[i + 1]); - g += score; - } - var startScore = scoreOfPoints(points[points.length - 1], points[0], points[1]); - var endScore = scoreOfPoints(points[points.length - 2], points[points.length - 1], points[0]); - g += startScore; - g += endScore; - return g; - } + function squareness(points) { + return points.reduce(function(sum, val, i, array) { + var dotp = normalizedDotProduct(i, array); - function scoreOfPoints(a, b, c) { - var p = subtractPoints(a, b), - q = subtractPoints(c, b); + dotp = filterDotProduct(dotp); + return sum + 2.0 * Math.min(Math.abs(dotp - 1.0), Math.min(Math.abs(dotp), Math.abs(dotp + 1))); + }, 0); + } - p = normalizePoint(p, 1.0); - q = normalizePoint(q, 1.0); + function normalizedDotProduct(i, points) { + var a = points[(i - 1 + points.length) % points.length], + b = points[i], + c = points[(i + 1) % points.length], + p = subtractPoints(a, b), + q = subtractPoints(c, b); - var dotp = p[0] * q[0] + p[1] * q[1]; - // score is constructed so that +1, -1 and 0 are all scored 0, any other angle - // is scored higher. - return 2.0 * Math.min(Math.abs(dotp - 1.0), Math.min(Math.abs(dotp), Math.abs(dotp + 1))); - } + p = normalizePoint(p, 1.0); + q = normalizePoint(q, 1.0); - function subtractPoints(a, b) { - return [a[0] - b[0], a[1] - b[1]]; - } + return p[0] * q[0] + p[1] * q[1]; + } - function addPoints(a, b) { - return [a[0] + b[0], a[1] + b[1]]; + function subtractPoints(a, b) { + return [a[0] - b[0], a[1] - b[1]]; + } + + function addPoints(a, b) { + return [a[0] + b[0], a[1] + b[1]]; + } + + function normalizePoint(point, scale) { + var vector = [0, 0]; + var length = Math.sqrt(point[0] * point[0] + point[1] * point[1]); + if (length !== 0) { + vector[0] = point[0] / length; + vector[1] = point[1] / length; } - function normalizePoint(point, scale) { - var vector = [0, 0]; - var length = Math.sqrt(point[0] * point[0] + point[1] * point[1]); - if (length !== 0) { - vector[0] = point[0] / length; - vector[1] = point[1] / length; - } + vector[0] *= scale; + vector[1] *= scale; - vector[0] *= scale; - vector[1] *= scale; + return vector; + } - return vector; + function filterDotProduct(dotp) { + if (lowerThreshold > Math.abs(dotp) || Math.abs(dotp) > upperThreshold) { + return dotp; } - }; + + return 0; + } action.disabled = function(graph) { - if (!graph.entity(wayId).isClosed()) - return 'not_closed'; + var way = graph.entity(wayId), + nodes = graph.childNodes(way), + points = _.uniq(nodes).map(function(n) { return projection(n.loc); }); + + if (squareness(points)) { + return false; + } + + return 'not_squarish'; }; return action; @@ -16818,9 +17524,9 @@ iD.actions.Reverse = function(wayId) { } function reverseValue(key, value) { - if (key === "incline" && numeric.test(value)) { + if (key === 'incline' && numeric.test(value)) { return value.replace(numeric, function(_, sign) { return sign === '-' ? '' : '-'; }); - } else if (key === "incline" || key === "direction") { + } else if (key === 'incline' || key === 'direction') { return {up: 'down', down: 'up'}[value] || value; } else { return {left: 'right', right: 'left'}[value] || value; @@ -16891,19 +17597,70 @@ iD.actions.RotateWay = function(wayId, pivot, angle, projection) { iD.actions.Split = function(nodeId, newWayIds) { var wayIds; + // if the way is closed, we need to search for a partner node + // to split the way at. + // + // The following looks for a node that is both far away from + // the initial node in terms of way segment length and nearby + // in terms of beeline-distance. This assures that areas get + // split on the most "natural" points (independent of the number + // of nodes). + // For example: bone-shaped areas get split across their waist + // line, circles across the diameter. + function splitArea(nodes, idxA, graph) { + var lengths = new Array(nodes.length), + length, + i, + best = 0, + idxB; + + function wrap(index) { + return iD.util.wrap(index, nodes.length); + } + + function dist(nA, nB) { + return iD.geo.sphericalDistance(graph.entity(nA).loc, graph.entity(nB).loc); + } + + // calculate lengths + length = 0; + for (i = wrap(idxA+1); i !== idxA; i = wrap(i+1)) { + length += dist(nodes[i], nodes[wrap(i-1)]); + lengths[i] = length; + } + + length = 0; + for (i = wrap(idxA-1); i !== idxA; i = wrap(i-1)) { + length += dist(nodes[i], nodes[wrap(i+1)]); + if (length < lengths[i]) + lengths[i] = length; + } + + // determine best opposite node to split + for (i = 0; i < nodes.length; i++) { + var cost = lengths[i] / dist(nodes[idxA], nodes[i]); + if (cost > best) { + idxB = i; + best = cost; + } + } + + return idxB; + } + function split(graph, wayA, newWayId) { var wayB = iD.Way({id: newWayId, tags: wayA.tags}), nodesA, nodesB, - isArea = wayA.isArea(); + isArea = wayA.isArea(), + isOuter = iD.geo.isSimpleMultipolygonOuterMember(wayA, graph); if (wayA.isClosed()) { var nodes = wayA.nodes.slice(0, -1), idxA = _.indexOf(nodes, nodeId), - idxB = idxA + Math.floor(nodes.length / 2); + idxB = splitArea(nodes, idxA, graph); - if (idxB >= nodes.length) { - idxB %= nodes.length; + if (idxB < idxA) { nodesA = nodes.slice(idxA).concat(nodes.slice(0, idxB + 1)); nodesB = nodes.slice(idxB, idxA + 1); } else { @@ -16930,24 +17687,23 @@ iD.actions.Split = function(nodeId, newWayIds) { graph = graph.replace(relation); } } else { - var role = relation.memberById(wayA.id).role, - last = wayB.last(), - i = relation.memberById(wayA.id).index, - j; - - for (j = 0; j < relation.members.length; j++) { - var entity = graph.hasEntity(relation.members[j].id); - if (entity && entity.type === 'way' && entity.contains(last)) { - break; - } + if (relation === isOuter) { + graph = graph.replace(relation.mergeTags(wayA.tags)); + graph = graph.replace(wayA.update({tags: {}})); + graph = graph.replace(wayB.update({tags: {}})); } - relation = relation.addMember({id: wayB.id, type: 'way', role: role}, i <= j ? i + 1 : i); - graph = graph.replace(relation); + var member = { + id: wayB.id, + type: 'way', + role: relation.memberById(wayA.id).role + }; + + graph = iD.actions.AddMember(relation.id, member)(graph); } }); - if (isArea) { + if (!isOuter && isArea) { var multipolygon = iD.Relation({ tags: _.extend({}, wayA.tags, {type: 'multipolygon'}), members: [ @@ -16973,12 +17729,16 @@ iD.actions.Split = function(nodeId, newWayIds) { action.ways = function(graph) { var node = graph.entity(nodeId), - parents = graph.parentWays(node); + parents = graph.parentWays(node), + hasLines = _.any(parents, function(parent) { return parent.geometry(graph) === 'line'; }); return parents.filter(function(parent) { if (wayIds && wayIds.indexOf(parent.id) === -1) return false; + if (!wayIds && hasLines && parent.geometry(graph) !== 'line') + return false; + if (parent.isClosed()) { return true; } @@ -17007,6 +17767,80 @@ iD.actions.Split = function(nodeId, newWayIds) { return action; }; +/* + * Based on https://github.com/openstreetmap/potlatch2/net/systemeD/potlatch2/tools/Straighten.as + */ + +iD.actions.Straighten = function(wayId, projection) { + function positionAlongWay(n, s, e) { + return ((n[0] - s[0]) * (e[0] - s[0]) + (n[1] - s[1]) * (e[1] - s[1]))/ + (Math.pow(e[0] - s[0], 2) + Math.pow(e[1] - s[1], 2)); + } + + var action = function(graph) { + var way = graph.entity(wayId), + nodes = graph.childNodes(way), + points = nodes.map(function(n) { return projection(n.loc); }), + startPoint = points[0], + endPoint = points[points.length-1], + toDelete = [], + i; + + for (i = 1; i < points.length-1; i++) { + var node = nodes[i], + point = points[i]; + + if (graph.parentWays(node).length > 1 || + graph.parentRelations(node).length || + node.hasInterestingTags()) { + + var u = positionAlongWay(point, startPoint, endPoint), + p0 = startPoint[0] + u * (endPoint[0] - startPoint[0]), + p1 = startPoint[1] + u * (endPoint[1] - startPoint[1]); + + graph = graph.replace(graph.entity(node.id) + .move(projection.invert([p0, p1]))); + } else { + // safe to delete + if (toDelete.indexOf(node) === -1) { + toDelete.push(node); + } + } + } + + for (i = 0; i < toDelete.length; i++) { + graph = iD.actions.DeleteNode(toDelete[i].id)(graph); + } + + return graph; + }; + + action.disabled = function(graph) { + // check way isn't too bendy + var way = graph.entity(wayId), + nodes = graph.childNodes(way), + points = nodes.map(function(n) { return projection(n.loc); }), + startPoint = points[0], + endPoint = points[points.length-1], + threshold = 0.2 * Math.sqrt(Math.pow(startPoint[0] - endPoint[0], 2) + Math.pow(startPoint[1] - endPoint[1], 2)), + i; + + for (i = 1; i < points.length-1; i++) { + var point = points[i], + u = positionAlongWay(point, startPoint, endPoint), + p0 = startPoint[0] + u * (endPoint[0] - startPoint[0]), + p1 = startPoint[1] + u * (endPoint[1] - startPoint[1]), + dist = Math.sqrt(Math.pow(p0 - point[0], 2) + Math.pow(p1 - point[1], 2)); + + // to bendy if point is off by 20% of total start/end distance in projected space + if (dist > threshold) { + return 'too_bendy'; + } + } + }; + + return action; +}; iD.behavior = {}; iD.behavior.AddWay = function(context) { var event = d3.dispatch('start', 'startFromWay', 'startFromNode'), @@ -17066,7 +17900,7 @@ iD.behavior.drag = function() { d3.event.preventDefault(); } - var event = d3.dispatch("start", "move", "end"), + var event = d3.dispatch('start', 'move', 'end'), origin = null, selector = '', filter = null, @@ -17074,10 +17908,10 @@ iD.behavior.drag = function() { event.of = function(thiz, argumentz) { return function(e1) { + var e0 = e1.sourceEvent = d3.event; + e1.target = drag; + d3.event = e1; try { - var e0 = e1.sourceEvent = d3.event; - e1.target = drag; - d3.event = e1; event[e1.type].apply(thiz, argumentz); } finally { d3.event = e0; @@ -17085,7 +17919,7 @@ iD.behavior.drag = function() { }; }; - var d3_event_userSelectProperty = iD.util.prefixCSSProperty("UserSelect"), + var d3_event_userSelectProperty = iD.util.prefixCSSProperty('UserSelect'), d3_event_userSelectSuppress = d3_event_userSelectProperty ? function () { var selection = d3.selection(), @@ -17096,9 +17930,9 @@ iD.behavior.drag = function() { }; } : function (type) { - var w = d3.select(window).on("selectstart." + type, d3_eventCancel); + var w = d3.select(window).on('selectstart.' + type, d3_eventCancel); return function () { - w.on("selectstart." + type, null); + w.on('selectstart.' + type, null); }; }; @@ -17109,12 +17943,12 @@ iD.behavior.drag = function() { touchId = d3.event.touches ? d3.event.changedTouches[0].identifier : null, offset, origin_ = point(), - moved = 0, - selectEnable = d3_event_userSelectSuppress(touchId != null ? "drag-" + touchId : "drag"); + started = false, + selectEnable = d3_event_userSelectSuppress(touchId !== null ? 'drag-' + touchId : 'drag'); var w = d3.select(window) - .on(touchId !== null ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove) - .on(touchId !== null ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true); + .on(touchId !== null ? 'touchmove.drag-' + touchId : 'mousemove.drag', dragmove) + .on(touchId !== null ? 'touchend.drag-' + touchId : 'mouseup.drag', dragend, true); if (origin) { offset = origin.apply(target, arguments); @@ -17138,41 +17972,41 @@ iD.behavior.drag = function() { dx = p[0] - origin_[0], dy = p[1] - origin_[1]; - if (!moved) { + if (!started) { + started = true; event_({ - type: "start" + type: 'start' }); } - moved |= dx | dy; origin_ = p; d3_eventCancel(); event_({ - type: "move", + type: 'move', point: [p[0] + offset[0], p[1] + offset[1]], delta: [dx, dy] }); } function dragend() { - if (moved) { + if (started) { event_({ - type: "end" + type: 'end' }); d3_eventCancel(); - if (d3.event.target === eventTarget) w.on("click.drag", click, true); + if (d3.event.target === eventTarget) w.on('click.drag', click, true); } - w.on(touchId !== null ? "touchmove.drag-" + touchId : "mousemove.drag", null) - .on(touchId !== null ? "touchend.drag-" + touchId : "mouseup.drag", null); + w.on(touchId !== null ? 'touchmove.drag-' + touchId : 'mousemove.drag', null) + .on(touchId !== null ? 'touchend.drag-' + touchId : 'mouseup.drag', null); selectEnable(); } function click() { d3_eventCancel(); - w.on("click.drag", null); + w.on('click.drag', null); } } @@ -17193,13 +18027,13 @@ iD.behavior.drag = function() { }; } - selection.on("mousedown.drag" + selector, delegate) - .on("touchstart.drag" + selector, delegate); + selection.on('mousedown.drag' + selector, delegate) + .on('touchstart.drag' + selector, delegate); } drag.off = function(selection) { - selection.on("mousedown.drag" + selector, null) - .on("touchstart.drag" + selector, null); + selection.on('mousedown.drag' + selector, null) + .on('touchstart.drag' + selector, null); }; drag.delegate = function(_) { @@ -17222,8 +18056,8 @@ iD.behavior.drag = function() { drag.cancel = function() { d3.select(window) - .on("mousemove.drag", null) - .on("mouseup.drag", null); + .on('mousemove.drag', null) + .on('mouseup.drag', null); return drag; }; @@ -17240,7 +18074,7 @@ iD.behavior.drag = function() { return drag; }; - return d3.rebind(drag, event, "on"); + return d3.rebind(drag, event, 'on'); }; iD.behavior.Draw = function(context) { var event = d3.dispatch('move', 'click', 'clickWay', @@ -17268,8 +18102,7 @@ iD.behavior.Draw = function(context) { })[0] : d3.mouse(p); } - var eventTarget = d3.event.target, - element = d3.select(this), + var element = d3.select(this), touchId = d3.event.touches ? d3.event.changedTouches[0].identifier : null, time = +new Date(), pos = point(); @@ -17278,8 +18111,8 @@ iD.behavior.Draw = function(context) { d3.select(window).on('mouseup.draw', function() { element.on('mousemove.draw', mousemove); - if (iD.geo.dist(pos, point()) < closeTolerance || - (iD.geo.dist(pos, point()) < tolerance && + if (iD.geo.euclideanDistance(pos, point()) < closeTolerance || + (iD.geo.euclideanDistance(pos, point()) < tolerance && (+new Date() - time) < 500)) { // Prevent a quick second click @@ -17511,12 +18344,13 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) { // Connect the way to an existing way. drawWay.addWay = function(loc, edge) { + var previousEdge = startIndex ? + [way.nodes[startIndex], way.nodes[startIndex - 1]] : + [way.nodes[0], way.nodes[1]]; // Avoid creating duplicate segments - if (!isArea) { - if (edge[0] === way.nodes[way.nodes.length - 1] || - edge[1] === way.nodes[way.nodes.length - 1]) return; - } + if (!isArea && iD.geo.edgeEqual(edge, previousEdge)) + return; var newNode = iD.Node({ loc: loc }); @@ -17603,7 +18437,7 @@ iD.behavior.Hash = function(context) { var parser = function(map, s) { var q = iD.util.stringQs(s); - var args = (q.map || '').split("/").map(Number); + var args = (q.map || '').split('/').map(Number); if (args.length < 3 || args.some(isNaN)) { return true; // replace bogus hash } else if (s !== formatter(map).slice(1)) { @@ -17658,7 +18492,7 @@ iD.behavior.Hash = function(context) { d3.select(window) .on('hashchange.hash', null); - location.hash = ""; + location.hash = ''; }; return hash; @@ -17672,7 +18506,7 @@ iD.behavior.Hash = function(context) { Only one of these elements can have the :hover pseudo-class, but all of them will have the .hover class. */ -iD.behavior.Hover = function(context) { +iD.behavior.Hover = function() { var dispatch = d3.dispatch('hover'), selection, altDisables, @@ -17746,7 +18580,7 @@ iD.behavior.Hover = function(context) { function mousedown() { down = true; d3.select(window) - .on('mouseup.hover', mouseup) + .on('mouseup.hover', mouseup); } function mouseup() { @@ -17779,7 +18613,7 @@ iD.behavior.Hover = function(context) { d3.select(window) .on('keydown.hover', null) .on('keyup.hover', null) - .on('mouseup.hover', null) + .on('mouseup.hover', null); }; hover.altDisables = function(_) { @@ -17927,25 +18761,25 @@ iD.behavior.Tail = function() { var text, container, xmargin = 25, - tooltip_size = [0, 0], - selection_size = [0, 0], + tooltipSize = [0, 0], + selectionSize = [0, 0], transformProp = iD.util.prefixCSSProperty('Transform'); function tail(selection) { if (!text) return; d3.select(window) - .on('resize.tail', function() { selection_size = selection.dimensions(); }); + .on('resize.tail', function() { selectionSize = selection.dimensions(); }); function show() { container.style('display', 'block'); - tooltip_size = container.dimensions(); + tooltipSize = container.dimensions(); } function mousemove() { if (container.style('display') === 'none') show(); - var xoffset = ((d3.event.clientX + tooltip_size[0] + xmargin) > selection_size[0]) ? - -tooltip_size[0] - xmargin : xmargin; + var xoffset = ((d3.event.clientX + tooltipSize[0] + xmargin) > selectionSize[0]) ? + -tooltipSize[0] - xmargin : xmargin; container.classed('left', xoffset > 0); container.style(transformProp, 'translate(' + (~~d3.event.clientX + xoffset) + 'px,' + @@ -17980,8 +18814,8 @@ iD.behavior.Tail = function() { container .on('mousemove.tail', mousemove); - tooltip_size = container.dimensions(); - selection_size = selection.dimensions(); + tooltipSize = container.dimensions(); + selectionSize = selection.dimensions(); } tail.off = function(selection) { @@ -18101,7 +18935,7 @@ iD.modes.AddLine = function(context) { iD.actions.AddEntity(way), iD.actions.AddVertex(way.id, node.id)); - context.enter(iD.modes.DrawLine(context, way.id, 'forward', graph)); + context.enter(iD.modes.DrawLine(context, way.id, graph)); } function startFromWay(loc, edge) { @@ -18115,29 +18949,17 @@ iD.modes.AddLine = function(context) { iD.actions.AddVertex(way.id, node.id), iD.actions.AddMidpoint({ loc: loc, edge: edge }, node)); - context.enter(iD.modes.DrawLine(context, way.id, 'forward', graph)); + context.enter(iD.modes.DrawLine(context, way.id, graph)); } function startFromNode(node) { - var graph = context.graph(), - parent = graph.parentWays(node)[0], - isLine = parent && parent.geometry(graph) === 'line'; - - if (isLine && parent.first() === node.id) { - context.enter(iD.modes.DrawLine(context, parent.id, 'backward', graph)); - - } else if (isLine && parent.last() === node.id) { - context.enter(iD.modes.DrawLine(context, parent.id, 'forward', graph)); + var way = iD.Way(); - } else { - var way = iD.Way(); - - context.perform( - iD.actions.AddEntity(way), - iD.actions.AddVertex(way.id, node.id)); + context.perform( + iD.actions.AddEntity(way), + iD.actions.AddVertex(way.id, node.id)); - context.enter(iD.modes.DrawLine(context, way.id, 'forward', graph)); - } + context.enter(iD.modes.DrawLine(context, way.id, context.graph())); } mode.enter = function() { @@ -18180,7 +19002,7 @@ iD.modes.AddPoint = function(context) { .newFeature(true)); } - function addWay(loc, edge) { + function addWay(loc) { add(loc); } @@ -18219,14 +19041,12 @@ iD.modes.Browse = function(context) { iD.modes.DragNode(context).behavior]; mode.enter = function() { - context.history().save(); - behaviors.forEach(function(behavior) { context.install(behavior); }); // Get focus on the body. - if (document.activeElement) { + if (document.activeElement && document.activeElement.blur) { document.activeElement.blur(); } @@ -18296,8 +19116,8 @@ iD.modes.DragNode = function(context) { return t('operations.move.annotation.' + entity.geometry(context.graph())); } - function connectAnnotation(datum) { - return t('operations.connect.annotation.' + datum.geometry(context.graph())); + function connectAnnotation(entity) { + return t('operations.connect.annotation.' + entity.geometry(context.graph())); } function origin(entity) { @@ -18360,13 +19180,13 @@ iD.modes.DragNode = function(context) { var d = datum(); if (d.type === 'node' && d.id !== entity.id) { loc = d.loc; - } else if (d.type === 'way') { + } else if (d.type === 'way' && !d3.select(d3.event.sourceEvent.target).classed('fill')) { loc = iD.geo.chooseEdge(context.childNodes(d), context.mouse(), context.projection).loc; } context.replace( iD.actions.MoveNode(entity.id, loc), - t('operations.move.annotation.' + entity.geometry(context.graph()))); + moveAnnotation(entity)); } function end(entity) { @@ -18420,7 +19240,7 @@ iD.modes.DragNode = function(context) { } var behavior = iD.behavior.drag() - .delegate("g.node, g.point, g.midpoint") + .delegate('g.node, g.point, g.midpoint') .surface(context.surface().node()) .origin(origin) .on('start', start) @@ -18506,7 +19326,7 @@ iD.modes.DrawArea = function(context, wayId, baseGraph) { return mode; }; -iD.modes.DrawLine = function(context, wayId, direction, baseGraph) { +iD.modes.DrawLine = function(context, wayId, baseGraph, affix) { var mode = { button: 'line', id: 'draw-line' @@ -18516,8 +19336,8 @@ iD.modes.DrawLine = function(context, wayId, direction, baseGraph) { mode.enter = function() { var way = context.entity(wayId), - index = (direction === 'forward') ? undefined : 0, - headId = (direction === 'forward') ? way.last() : way.first(); + index = (affix === 'prefix') ? 0 : undefined, + headId = (affix === 'prefix') ? way.first() : way.last(); behavior = iD.behavior.DrawWay(context, wayId, index, mode, baseGraph) .tail(t('modes.draw_line.tail')); @@ -18552,81 +19372,82 @@ iD.modes.Move = function(context, entityIDs) { }; var keybinding = d3.keybinding('move'), - edit = iD.behavior.Edit(context); - - mode.enter = function() { - context.install(edit); + edit = iD.behavior.Edit(context), + annotation = entityIDs.length === 1 ? + t('operations.move.annotation.' + context.geometry(entityIDs[0])) : + t('operations.move.annotation.multiple'), + origin, + nudgeInterval; - var origin, - nudgeInterval, - annotation = entityIDs.length === 1 ? - t('operations.move.annotation.' + context.geometry(entityIDs[0])) : - t('operations.move.annotation.multiple'); + function edge(point, size) { + var pad = [30, 100, 30, 100]; + if (point[0] > size[0] - pad[0]) return [-10, 0]; + else if (point[0] < pad[2]) return [10, 0]; + else if (point[1] > size[1] - pad[1]) return [0, -10]; + else if (point[1] < pad[3]) return [0, 10]; + return null; + } - context.perform( - iD.actions.Noop(), - annotation); + function startNudge(nudge) { + if (nudgeInterval) window.clearInterval(nudgeInterval); + nudgeInterval = window.setInterval(function() { + context.pan(nudge); + context.replace( + iD.actions.Move(entityIDs, [-nudge[0], -nudge[1]], context.projection), + annotation); + var c = context.projection(origin); + origin = context.projection.invert([c[0] - nudge[0], c[1] - nudge[1]]); + }, 50); + } - function edge(point, size) { - var pad = [30, 100, 30, 100]; - if (point[0] > size[0] - pad[0]) return [-10, 0]; - else if (point[0] < pad[2]) return [10, 0]; - else if (point[1] > size[1] - pad[1]) return [0, -10]; - else if (point[1] < pad[3]) return [0, 10]; - return null; - } + function stopNudge() { + if (nudgeInterval) window.clearInterval(nudgeInterval); + nudgeInterval = null; + } - function startNudge(nudge) { - if (nudgeInterval) window.clearInterval(nudgeInterval); - nudgeInterval = window.setInterval(function() { - context.pan(nudge); - context.replace( - iD.actions.Move(entityIDs, [-nudge[0], -nudge[1]], context.projection), - annotation); - var c = context.projection(origin); - origin = context.projection.invert([c[0] - nudge[0], c[1] - nudge[1]]); - }, 50); - } + function move() { + var p = context.mouse(); - function stopNudge() { - if (nudgeInterval) window.clearInterval(nudgeInterval); - nudgeInterval = null; - } + var delta = origin ? + [p[0] - context.projection(origin)[0], + p[1] - context.projection(origin)[1]] : + [0, 0]; - function move() { - var p = context.mouse(); + var nudge = edge(p, context.map().dimensions()); + if (nudge) startNudge(nudge); + else stopNudge(); - var delta = origin ? - [p[0] - context.projection(origin)[0], - p[1] - context.projection(origin)[1]] : - [0, 0]; + origin = context.map().mouseCoordinates(); - var nudge = edge(p, context.map().dimensions()); - if (nudge) startNudge(nudge); - else stopNudge(); + context.replace( + iD.actions.Move(entityIDs, delta, context.projection), + annotation); + } - origin = context.map().mouseCoordinates(); + function finish() { + d3.event.stopPropagation(); + context.enter(iD.modes.Select(context, entityIDs) + .suppressMenu(true)); + stopNudge(); + } - context.replace( - iD.actions.Move(entityIDs, delta, context.projection), - annotation); - } + function cancel() { + context.pop(); + context.enter(iD.modes.Select(context, entityIDs) + .suppressMenu(true)); + stopNudge(); + } - function finish() { - d3.event.stopPropagation(); - context.enter(iD.modes.Select(context, entityIDs)); - stopNudge(); - } + function undone() { + context.enter(iD.modes.Browse(context)); + } - function cancel() { - context.pop(); - context.enter(iD.modes.Select(context, entityIDs)); - stopNudge(); - } + mode.enter = function() { + context.install(edit); - function undone() { - context.enter(iD.modes.Browse(context)); - } + context.perform( + iD.actions.Noop(), + annotation); context.surface() .on('mousemove.move', move) @@ -18644,6 +19465,8 @@ iD.modes.Move = function(context, entityIDs) { }; mode.exit = function() { + stopNudge(); + context.uninstall(edit); context.surface() @@ -18697,12 +19520,14 @@ iD.modes.RotateWay = function(context, wayId) { function finish() { d3.event.stopPropagation(); - context.enter(iD.modes.Select(context, [wayId])); + context.enter(iD.modes.Select(context, [wayId]) + .suppressMenu(true)); } function cancel() { context.pop(); - context.enter(iD.modes.Select(context, [wayId])); + context.enter(iD.modes.Select(context, [wayId]) + .suppressMenu(true)); } function undone() { @@ -18742,18 +19567,12 @@ iD.modes.RotateWay = function(context, wayId) { iD.modes.Save = function(context) { var ui = iD.ui.Commit(context) .on('cancel', cancel) - .on('fix', fix) .on('save', save); function cancel() { context.enter(iD.modes.Browse(context)); } - function fix(d) { - context.map().zoomTo(d.entity); - context.enter(iD.modes.Select(context, [d.entity.id])); - } - function save(e) { var loading = iD.ui.Loading(context) .message(t('save.uploading')) @@ -18812,7 +19631,7 @@ iD.modes.Save = function(context) { context.install(behavior); }); - context.connection().authenticate(function(err) { + context.connection().authenticate(function() { context.ui().sidebar.show(ui); }); }; @@ -18899,8 +19718,6 @@ iD.modes.Select = function(context, selectedIDs) { }; mode.enter = function() { - context.history().save(); - behaviors.forEach(function(behavior) { context.install(behavior); }); @@ -19002,6 +19819,11 @@ iD.modes.Select = function(context, selectedIDs) { context.surface() .on('dblclick.select', dblclick); }, 200); + + if (selectedIDs.length > 1) { + var entities = iD.ui.SelectionList(context, selectedIDs); + context.ui().sidebar.show(entities); + } }; mode.exit = function() { @@ -19025,10 +19847,11 @@ iD.modes.Select = function(context, selectedIDs) { context.surface() .call(radialMenu.close) .on('dblclick.select', null) - .selectAll(".selected") + .selectAll('.selected') .classed('selected', false); context.map().on('drawn.select', null); + context.ui().sidebar.hide(); }; return mode; @@ -19060,22 +19883,71 @@ iD.operations.Circularize = function(selectedIDs, context) { t('operations.circularize.description.' + geometry); }; - operation.id = "circularize"; + operation.id = 'circularize'; operation.keys = [t('operations.circularize.key')]; operation.title = t('operations.circularize.title'); return operation; }; +iD.operations.Continue = function(selectedIDs, context) { + var graph = context.graph(), + entities = selectedIDs.map(function(id) { return graph.entity(id); }), + geometries = _.extend({line: [], vertex: []}, + _.groupBy(entities, function(entity) { return entity.geometry(graph); })), + vertex = geometries.vertex[0]; + + function candidateWays() { + return graph.parentWays(vertex).filter(function(parent) { + return parent.geometry(graph) === 'line' && + parent.affix(vertex.id) && + (geometries.line.length === 0 || geometries.line[0] === parent); + }); + } + + var operation = function() { + var candidate = candidateWays()[0]; + context.enter(iD.modes.DrawLine( + context, + candidate.id, + context.graph(), + candidate.affix(vertex.id))); + }; + + operation.available = function() { + return geometries.vertex.length === 1 && geometries.line.length <= 1; + }; + + operation.disabled = function() { + var candidates = candidateWays(); + if (candidates.length === 0) + return 'not_eligible'; + if (candidates.length > 1) + return 'multiple'; + }; + + operation.tooltip = function() { + var disable = operation.disabled(); + return disable ? + t('operations.continue.' + disable) : + t('operations.continue.description'); + }; + + operation.id = 'continue'; + operation.keys = [t('operations.continue.key')]; + operation.title = t('operations.continue.title'); + + return operation; +}; iD.operations.Delete = function(selectedIDs, context) { var action = iD.actions.DeleteMultiple(selectedIDs); var operation = function() { var annotation, - mode; + nextSelectedID; if (selectedIDs.length > 1) { annotation = t('operations.delete.annotation.multiple', {n: selectedIDs.length}); - mode = iD.modes.Browse(context); + } else { var id = selectedIDs[0], entity = context.entity(id), @@ -19084,7 +19956,6 @@ iD.operations.Delete = function(selectedIDs, context) { parent = parents[0]; annotation = t('operations.delete.annotation.' + geometry); - mode = iD.modes.Browse(context); // Select the next closest node in the way. if (geometry === 'vertex' && parents.length === 1 && parent.nodes.length > 2) { @@ -19096,12 +19967,12 @@ iD.operations.Delete = function(selectedIDs, context) { } else if (i === nodes.length - 1) { i--; } else { - var a = iD.geo.dist(entity.loc, context.entity(nodes[i - 1]).loc), - b = iD.geo.dist(entity.loc, context.entity(nodes[i + 1]).loc); + var a = iD.geo.sphericalDistance(entity.loc, context.entity(nodes[i - 1]).loc), + b = iD.geo.sphericalDistance(entity.loc, context.entity(nodes[i + 1]).loc); i = a < b ? i - 1 : i + 1; } - mode = iD.modes.Select(context, [nodes[i]]); + nextSelectedID = nodes[i]; } } @@ -19109,8 +19980,11 @@ iD.operations.Delete = function(selectedIDs, context) { action, annotation); - context.enter(mode); - + if (nextSelectedID && context.hasEntity(nextSelectedID)) { + context.enter(iD.modes.Select(context, [nextSelectedID])); + } else { + context.enter(iD.modes.Browse(context)); + } }; operation.available = function() { @@ -19128,8 +20002,8 @@ iD.operations.Delete = function(selectedIDs, context) { t('operations.delete.description'); }; - operation.id = "delete"; - operation.keys = [iD.ui.cmd('â«'), iD.ui.cmd('â¦')]; + operation.id = 'delete'; + operation.keys = [iD.ui.cmd('ââ«'), iD.ui.cmd('ââ¦')]; operation.title = t('operations.delete.title'); return operation; @@ -19165,7 +20039,7 @@ iD.operations.Disconnect = function(selectedIDs, context) { t('operations.disconnect.description'); }; - operation.id = "disconnect"; + operation.id = 'disconnect'; operation.keys = [t('operations.disconnect.key')]; operation.title = t('operations.disconnect.title'); @@ -19217,7 +20091,7 @@ iD.operations.Merge = function(selectedIDs, context) { return t('operations.merge.description'); }; - operation.id = "merge"; + operation.id = 'merge'; operation.keys = [t('operations.merge.key')]; operation.title = t('operations.merge.title'); @@ -19245,7 +20119,7 @@ iD.operations.Move = function(selectedIDs, context) { t('operations.move.description'); }; - operation.id = "move"; + operation.id = 'move'; operation.keys = [t('operations.move.key')]; operation.title = t('operations.move.title'); @@ -19253,17 +20127,20 @@ iD.operations.Move = function(selectedIDs, context) { }; iD.operations.Orthogonalize = function(selectedIDs, context) { var entityId = selectedIDs[0], + geometry = context.geometry(entityId), action = iD.actions.Orthogonalize(entityId, context.projection); - var operation = function() { - var annotation = t('operations.orthogonalize.annotation.' + context.geometry(entityId)); + function operation() { + var annotation = t('operations.orthogonalize.annotation.' + geometry); context.perform(action, annotation); - }; + } operation.available = function() { + var entity = context.entity(entityId); return selectedIDs.length === 1 && - context.entity(entityId).type === 'way' && - _.uniq(context.entity(entityId).nodes).length > 2; + entity.type === 'way' && + entity.isClosed() && + _.uniq(entity.nodes).length > 2; }; operation.disabled = function() { @@ -19274,13 +20151,12 @@ iD.operations.Orthogonalize = function(selectedIDs, context) { var disable = operation.disabled(); return disable ? t('operations.orthogonalize.' + disable) : - t('operations.orthogonalize.description'); + t('operations.orthogonalize.description.' + geometry); }; - operation.id = "orthogonalize"; + operation.id = 'orthogonalize'; operation.keys = [t('operations.orthogonalize.key')]; operation.title = t('operations.orthogonalize.title'); - operation.description = t('operations.orthogonalize.description'); return operation; }; @@ -19306,7 +20182,7 @@ iD.operations.Reverse = function(selectedIDs, context) { return t('operations.reverse.description'); }; - operation.id = "reverse"; + operation.id = 'reverse'; operation.keys = [t('operations.reverse.key')]; operation.title = t('operations.reverse.title'); @@ -19333,7 +20209,7 @@ iD.operations.Rotate = function(selectedIDs, context) { return t('operations.rotate.description'); }; - operation.id = "rotate"; + operation.id = 'rotate'; operation.keys = [t('operations.rotate.key')]; operation.title = t('operations.rotate.title'); @@ -19387,12 +20263,46 @@ iD.operations.Split = function(selectedIDs, context) { } }; - operation.id = "split"; + operation.id = 'split'; operation.keys = [t('operations.split.key')]; operation.title = t('operations.split.title'); return operation; }; +iD.operations.Straighten = function(selectedIDs, context) { + var entityId = selectedIDs[0], + action = iD.actions.Straighten(entityId, context.projection); + + function operation() { + var annotation = t('operations.straighten.annotation'); + context.perform(action, annotation); + } + + operation.available = function() { + var entity = context.entity(entityId); + return selectedIDs.length === 1 && + entity.type === 'way' && + !entity.isClosed() && + _.uniq(entity.nodes).length > 2; + }; + + operation.disabled = function() { + return action.disabled(context.graph()); + }; + + operation.tooltip = function() { + var disable = operation.disabled(); + return disable ? + t('operations.straighten.' + disable) : + t('operations.straighten.description'); + }; + + operation.id = 'straighten'; + operation.keys = [t('operations.straighten.key')]; + operation.title = t('operations.straighten.title'); + + return operation; +}; iD.Connection = function() { var event = d3.dispatch('authenticating', 'authenticated', 'auth', 'loading', 'load', 'loaded'), @@ -19429,7 +20339,7 @@ iD.Connection = function() { }; connection.userURL = function(username) { - return url + "/user/" + username; + return url + '/user/' + username; }; connection.loadFromURL = function(url, callback) { @@ -19447,7 +20357,7 @@ iD.Connection = function() { url + '/api/0.6/' + type + '/' + osmID + (type !== 'node' ? '/full' : ''), function(err, entities) { event.load(err, {data: entities}); - if (callback) callback(err, entities && entities[id]); + if (callback) callback(err, entities && _.find(entities, function(e) { return e.id === id; })); }); }; @@ -19532,15 +20442,13 @@ iD.Connection = function() { var root = dom.childNodes[0], children = root.childNodes, - entities = {}; + entities = []; - var i, o, l; - for (i = 0, l = children.length; i < l; i++) { + for (var i = 0, l = children.length; i < l; i++) { var child = children[i], parser = parsers[child.nodeName]; if (parser) { - o = parser(child); - entities[o.id] = o; + entities.push(parser(child)); } } @@ -19710,7 +20618,7 @@ iD.Connection = function() { extent: iD.geo.Extent( projection.invert([x, y + ts]), projection.invert([x + ts, y])) - } + }; }); function bboxUrl(tile) { @@ -19877,13 +20785,53 @@ iD.Difference = function(base, head) { return result; }; - difference.addParents = function(entities) { + difference.summary = function() { + var relevant = {}; - for (var i in entities) { - addParents(head.parentWays(entities[i]), entities); - addParents(head.parentRelations(entities[i]), entities); + function addEntity(entity, graph, changeType) { + relevant[entity.id] = { + entity: entity, + graph: graph, + changeType: changeType + }; } - return entities; + + function addParents(entity) { + var parents = head.parentWays(entity); + for (var j = parents.length - 1; j >= 0; j--) { + var parent = parents[j]; + if (!(parent.id in relevant)) addEntity(parent, head, 'modified'); + } + } + + _.each(changes, function(change) { + if (change.head && change.head.geometry(head) !== 'vertex') { + addEntity(change.head, head, change.base ? 'modified' : 'created'); + + } else if (change.base && change.base.geometry(base) !== 'vertex') { + addEntity(change.base, base, 'deleted'); + + } else if (change.base && change.head) { // modified vertex + var moved = !_.isEqual(change.base.loc, change.head.loc), + retagged = !_.isEqual(change.base.tags, change.head.tags); + + if (moved) { + addParents(change.head); + } + + if (retagged || (moved && change.head.hasInterestingTags())) { + addEntity(change.head, head, 'modified'); + } + + } else if (change.head && change.head.hasInterestingTags()) { // created vertex + addEntity(change.head, head, 'created'); + + } else if (change.base && change.base.hasInterestingTags()) { // deleted vertex + addEntity(change.base, base, 'deleted'); + } + }); + + return d3.values(relevant); }; difference.complete = function(extent) { @@ -19966,11 +20914,6 @@ iD.Entity.key = function(entity) { return entity.id + 'v' + (entity.v || 0); }; -iD.Entity.areaPath = d3.geo.path() - .projection(d3.geo.mercator() - .scale(12016420.517592335) - .precision(0)); - iD.Entity.prototype = { tags: {}, @@ -20037,21 +20980,12 @@ iD.Entity.prototype = { resolver.parentRelations(this).length > 0; }, - // Returns the (possibly negative) area of the entity in square pixels at an - // arbitrary unspecified zoom level -- so basically, only useful for relative - // comparisons. - area: function(resolver) { - return resolver.transient(this, 'area', function() { - return iD.Entity.areaPath.area(this.asGeoJSON(resolver, true)); - }); - }, - hasInterestingTags: function() { return _.keys(this.tags).some(function(key) { - return key != 'attribution' && - key != 'created_by' && - key != 'source' && - key != 'odbl' && + return key !== 'attribution' && + key !== 'created_by' && + key !== 'source' && + key !== 'odbl' && key.indexOf('tiger:') !== 0; }); }, @@ -20063,8 +20997,8 @@ iD.Entity.prototype = { iD.data.deprecated.forEach(function(d) { var match = _.pairs(d.old)[0]; tags.forEach(function(t) { - if (t[0] == match[0] && - (t[1] == match[1] || match[1] == '*')) { + if (t[0] === match[0] && + (t[1] === match[1] || match[1] === '*')) { deprecated[t[0]] = t[1]; } }); @@ -20084,17 +21018,10 @@ iD.Graph = function(other, mutable) { this.inherited = true; } else { - if (Array.isArray(other)) { - var entities = {}; - for (var i = 0; i < other.length; i++) { - entities[other[i].id] = other[i]; - } - other = entities; - } this.entities = Object.create({}); this._parentWays = Object.create({}); this._parentRels = Object.create({}); - this.rebase(other || {}); + this.rebase(other || []); } this.transients = {}; @@ -20183,11 +21110,12 @@ iD.Graph.prototype = { // Merging of data only needed if graph is the base graph if (!this.inherited) { - for (i in entities) { - if (!base.entities[i]) { - base.entities[i] = entities[i]; - this._updateCalculated(undefined, entities[i], - base.parentWays, base.parentRels); + for (i = 0; i < entities.length; i++) { + var entity = entities[i]; + if (!base.entities[entity.id]) { + base.entities[entity.id] = entity; + this._updateCalculated(undefined, entity, + base.parentWays, base.parentRels); } } } @@ -20255,7 +21183,6 @@ iD.Graph.prototype = { ways.push(entity.id); parentWays[added[i]] = ways; } - } else if (type === 'node') { } else if (type === 'relation') { @@ -20318,24 +21245,6 @@ iD.Graph.prototype = { return this; }, - hasAllChildren: function(entity) { - // we're only checking changed entities, since we assume fetched data - // must have all children present - var i; - if (this.entities.hasOwnProperty(entity.id)) { - if (entity.type === 'way') { - for (i = 0; i < entity.nodes.length; i++) { - if (!this.entities[entity.nodes[i]]) return false; - } - } else if (entity.type === 'relation') { - for (i = 0; i < entity.members.length; i++) { - if (!this.entities[entity.members[i].id]) return false; - } - } - } - return true; - }, - // Obliterates any existing entities load: function(entities) { var base = this.base(); @@ -20353,7 +21262,7 @@ iD.History = function(context) { var stack, index, tree, imageryUsed = ['Bing'], dispatch = d3.dispatch('change', 'undone', 'redone'), - lock = false; + lock = iD.util.SessionMutex('lock'); function perform(actions) { actions = Array.prototype.slice.call(actions); @@ -20393,17 +21302,11 @@ iD.History = function(context) { }, merge: function(entities, extent) { - - var base = stack[0].graph.base(), - newentities = Object.keys(entities).filter(function(i) { - return !base.entities[i]; - }); - for (var i = 0; i < stack.length; i++) { stack[i].graph.rebase(entities); } - tree.rebase(newentities); + tree.rebase(entities); dispatch.change(undefined, extent); }, @@ -20509,10 +21412,6 @@ iD.History = function(context) { return this.difference().length() > 0; }, - numChanges: function() { - return this.difference().length(); - }, - imageryUsed: function(sources) { if (sources) { imageryUsed = sources; @@ -20588,14 +21487,18 @@ iD.History = function(context) { stack = h.stack.map(function(d) { var entities = {}, entity; - d.modified && d.modified.forEach(function(key) { - entity = allEntities[key]; - entities[entity.id] = entity; - }); + if (d.modified) { + d.modified.forEach(function(key) { + entity = allEntities[key]; + entities[entity.id] = entity; + }); + } - d.deleted && d.deleted.forEach(function(id) { - entities[id] = undefined; - }); + if (d.deleted) { + d.deleted.forEach(function(id) { + entities[id] = undefined; + }); + } return { graph: iD.Graph(stack[0].graph).load(entities), @@ -20624,39 +21527,37 @@ iD.History = function(context) { }, save: function() { - if (!lock) return history; - context.storage(getKey('lock'), null); - context.storage(getKey('saved_history'), this.toJSON() || null); + if (lock.locked()) context.storage(getKey('saved_history'), history.toJSON() || null); return history; }, clearSaved: function() { - if (!lock) return; - context.storage(getKey('saved_history'), null); + if (lock.locked()) context.storage(getKey('saved_history'), null); + return history; }, lock: function() { - if (context.storage(getKey('lock'))) return false; - context.storage(getKey('lock'), true); - lock = true; - return lock; + return lock.lock(); + }, + + unlock: function() { + lock.unlock(); }, // is iD not open in another window and it detects that // there's a history stored in localStorage that's recoverable? restorableChanges: function() { - return lock && !!context.storage(getKey('saved_history')); + return lock.locked() && !!context.storage(getKey('saved_history')); }, // load history from a version stored in localStorage restore: function() { - if (!lock) return; + if (!lock.locked()) return; var json = context.storage(getKey('saved_history')); - if (json) this.fromJSON(json); + if (json) history.fromJSON(json); context.storage(getKey('saved_history', null)); - }, _getKey: getKey @@ -20678,7 +21579,7 @@ iD.Node = iD.Entity.node = function iD_Node() { iD.Node.prototype = Object.create(iD.Entity.prototype); _.extend(iD.Node.prototype, { - type: "node", + type: 'node', extent: function() { return new iD.geo.Extent(this.loc); @@ -20724,12 +21625,8 @@ _.extend(iD.Node.prototype, { asGeoJSON: function() { return { - type: 'Feature', - properties: this.tags, - geometry: { - type: 'Point', - coordinates: this.loc - } + type: 'Point', + coordinates: this.loc }; } }); @@ -20744,7 +21641,7 @@ iD.Relation = iD.Entity.relation = function iD_Relation() { iD.Relation.prototype = Object.create(iD.Entity.prototype); _.extend(iD.Relation.prototype, { - type: "relation", + type: 'relation', members: [], extent: function(resolver) { @@ -20766,12 +21663,16 @@ _.extend(iD.Relation.prototype, { }); }, + isDegenerate: function() { + return this.members.length === 0; + }, + // Return an array of members, each extended with an 'index' property whose value // is the member index. indexedMembers: function() { var result = new Array(this.members.length); for (var i = 0; i < this.members.length; i++) { - result[i] = _.extend({}, this.members[i], {index: i}) + result[i] = _.extend({}, this.members[i], {index: i}); } return result; }, @@ -20869,24 +21770,28 @@ _.extend(iD.Relation.prototype, { }, asGeoJSON: function(resolver) { - if (this.isMultipolygon()) { - return { - type: 'Feature', - properties: this.tags, - geometry: { + return resolver.transient(this, 'GeoJSON', function () { + if (this.isMultipolygon()) { + return { type: 'MultiPolygon', coordinates: this.multipolygon(resolver) - } - }; - } else { - return { - type: 'FeatureCollection', - properties: this.tags, - features: this.members.map(function(member) { - return _.extend({role: member.role}, resolver.entity(member.id).asGeoJSON(resolver)); - }) - }; - } + }; + } else { + return { + type: 'FeatureCollection', + properties: this.tags, + features: this.members.map(function (member) { + return _.extend({role: member.role}, resolver.entity(member.id).asGeoJSON(resolver)); + }) + }; + } + }); + }, + + area: function(resolver) { + return resolver.transient(this, 'area', function() { + return d3.geo.area(this.asGeoJSON(resolver)); + }); }, isMultipolygon: function() { @@ -20926,7 +21831,11 @@ _.extend(iD.Relation.prototype, { outers = outers.map(function(outer) { return _.pluck(outer.nodes, 'loc'); }); inners = inners.map(function(inner) { return _.pluck(inner.nodes, 'loc'); }); - var result = outers.map(function(o) { return [o]; }); + var result = outers.map(function(o) { + // Heuristic for detecting counterclockwise winding order. Assumes + // that OpenStreetMap polygons are not hemisphere-spanning. + return [d3.geo.area({type: 'Polygon', coordinates: [o]}) > 2 * Math.PI ? o.reverse() : o]; + }); function findOuter(inner) { var o, outer; @@ -20945,6 +21854,12 @@ _.extend(iD.Relation.prototype, { } for (var i = 0; i < inners.length; i++) { + var inner = inners[i]; + + if (d3.geo.area({type: 'Polygon', coordinates: [inner]}) < 2 * Math.PI) { + inner = inner.reverse(); + } + var o = findOuter(inners[i]); if (o !== undefined) result[o].push(inners[i]); @@ -20955,14 +21870,9 @@ _.extend(iD.Relation.prototype, { return result; } }); -iD.Tree = function(graph) { - +iD.Tree = function(head) { var rtree = rbush(), - head = graph, - queuedCreated = [], - queuedModified = [], - rectangles = {}, - rebased; + rectangles = {}; function extentRectangle(extent) { return [ @@ -20980,90 +21890,69 @@ iD.Tree = function(graph) { return rect; } - function remove(entity) { - rtree.remove(rectangles[entity.id]); - delete rectangles[entity.id]; - } - - function bulkInsert(entities) { - for (var i = 0, rects = []; i < entities.length; i++) { - rects.push(entityRectangle(entities[i])); - } - rtree.load(rects); - } - - function bulkReinsert(entities) { - entities.forEach(remove); - bulkInsert(entities); - } - - var tree = { - - rebase: function(entities) { - for (var i = 0, inserted = []; i < entities.length; i++) { - if (!graph.entities.hasOwnProperty(entities[i])) { - inserted.push(graph.entity(entities[i])); - } + function updateParents(entity, insertions) { + head.parentWays(entity).forEach(function(parent) { + if (rectangles[parent.id]) { + rtree.remove(rectangles[parent.id]); + insertions.push(entityRectangle(parent)); } - bulkInsert(inserted); - rebased = true; - return tree; - }, + }); - intersects: function(extent, g) { + head.parentRelations(entity).forEach(function(parent) { + if (rectangles[parent.id]) { + rtree.remove(rectangles[parent.id]); + insertions.push(entityRectangle(parent)); + } + updateParents(parent, insertions); + }); + } - head = g; + var tree = {}; - if (graph !== head || rebased) { - var diff = iD.Difference(graph, head), - modified = {}; + tree.rebase = function(entities) { + var insertions = []; - diff.modified().forEach(function(d) { - var loc = graph.entities[d.id].loc; - if (!loc || loc[0] !== d.loc[0] || loc[1] !== d.loc[1]) { - modified[d.id] = d; - } - }); + entities.forEach(function(entity) { + if (head.entities.hasOwnProperty(entity.id) || rectangles[entity.id]) + return; - var created = diff.created().concat(queuedCreated); - modified = d3.values(diff.addParents(modified)) - // some parents might be created, not modified - .filter(function(d) { return !!graph.hasEntity(d.id); }) - .concat(queuedModified); - queuedCreated = []; - queuedModified = []; + insertions.push(entityRectangle(entity)); + updateParents(entity, insertions); + }); - var reinserted = [], - inserted = []; + rtree.load(insertions); - modified.forEach(function(d) { - if (head.hasAllChildren(d)) reinserted.push(d); - else queuedModified.push(d); - }); + return tree; + }; - created.forEach(function(d) { - if (head.hasAllChildren(d)) inserted.push(d); - else queuedCreated.push(d); - }); + tree.intersects = function(extent, graph) { + if (graph !== head) { + var diff = iD.Difference(head, graph), + insertions = []; - bulkReinsert(reinserted); - bulkInsert(inserted); + head = graph; - diff.deleted().forEach(remove); + diff.deleted().forEach(function(entity) { + rtree.remove(rectangles[entity.id]); + delete rectangles[entity.id]; + }); - graph = head; - rebased = false; - } + diff.modified().forEach(function(entity) { + rtree.remove(rectangles[entity.id]); + insertions.push(entityRectangle(entity)); + updateParents(entity, insertions); + }); - return rtree.search(extentRectangle(extent)).map(function (rect) { - return graph.entities[rect.id]; + diff.created().forEach(function(entity) { + insertions.push(entityRectangle(entity)); }); - }, - graph: function() { - return graph; + rtree.load(insertions); } + return rtree.search(extentRectangle(extent)).map(function(rect) { + return head.entity(rect.id); + }); }; return tree; @@ -21079,13 +21968,18 @@ iD.Way = iD.Entity.way = function iD_Way() { iD.Way.prototype = Object.create(iD.Entity.prototype); _.extend(iD.Way.prototype, { - type: "way", + type: 'way', nodes: [], extent: function(resolver) { return resolver.transient(this, 'extent', function() { return this.nodes.reduce(function(extent, id) { - return extent.extend(resolver.entity(id).extent(resolver)); + var node = resolver.hasEntity(id); + if (node) { + return extent.extend(node.extent()); + } else { + return extent; + } }, iD.geo.Extent()); }); }, @@ -21102,6 +21996,11 @@ _.extend(iD.Way.prototype, { return this.nodes.indexOf(node) >= 0; }, + affix: function(node) { + if (this.nodes[0] === node) return 'prefix'; + if (this.nodes[this.nodes.length - 1] === node) return 'suffix'; + }, + isOneWay: function() { return this.tags.oneway === 'yes' || this.tags.oneway === '1' || @@ -21176,13 +22075,13 @@ _.extend(iD.Way.prototype, { for (var i = 0; i < this.nodes.length; i++) { var node = this.nodes[i]; - if (node != id && nodes[nodes.length - 1] != node) { + if (node !== id && nodes[nodes.length - 1] !== node) { nodes.push(node); } } // Preserve circularity - if (this.nodes.length > 1 && this.first() === id && this.last() === id && nodes[nodes.length - 1] != nodes[0]) { + if (this.nodes.length > 1 && this.first() === id && this.last() === id && nodes[nodes.length - 1] !== nodes[0]) { nodes.push(nodes[0]); } @@ -21206,32 +22105,47 @@ _.extend(iD.Way.prototype, { return r; }, - asGeoJSON: function(resolver, polygon) { - var nodes = resolver.childNodes(this); + asGeoJSON: function(resolver) { + return resolver.transient(this, 'GeoJSON', function() { + var coordinates = _.pluck(resolver.childNodes(this), 'loc'); + if (this.isArea() && this.isClosed()) { + return { + type: 'Polygon', + coordinates: [coordinates] + }; + } else { + return { + type: 'LineString', + coordinates: coordinates + }; + } + }); + }, + + area: function(resolver) { + return resolver.transient(this, 'area', function() { + var nodes = resolver.childNodes(this); - if (this.isArea() && polygon && nodes.length >= 4) { - if (!this.isClosed()) { + if (!this.isClosed() && nodes.length) { nodes = nodes.concat([nodes[0]]); } - return { - type: 'Feature', - properties: this.tags, - geometry: { - type: 'Polygon', - coordinates: [_.pluck(nodes, 'loc')] - } - }; - } else { - return { - type: 'Feature', - properties: this.tags, - geometry: { - type: 'LineString', - coordinates: _.pluck(nodes, 'loc') - } + var json = { + type: 'Polygon', + coordinates: [_.pluck(nodes, 'loc')] }; - } + + var area = d3.geo.area(json); + + // Heuristic for detecting counterclockwise winding order. Assumes + // that OpenStreetMap polygons are not hemisphere-spanning. + if (d3.geo.area(json) > 2 * Math.PI) { + json.coordinates[0] = json.coordinates[0].reverse(); + area = d3.geo.area(json); + } + + return isNaN(area) ? 0 : area; + }); } }); @@ -21239,23 +22153,26 @@ _.extend(iD.Way.prototype, { // of the following keys, and the value is _not_ one of the associated // values for the respective key. iD.Way.areaKeys = { + aeroway: { taxiway: true}, + amenity: {}, area: {}, + 'area:highway': {}, building: {}, - leisure: {}, - tourism: {}, - ruins: {}, + 'building:part': {}, historic: {}, landuse: {}, + leisure: {}, + man_made: { cutline: true, embankment: true, pipeline: true}, military: {}, natural: { coastline: true }, - amenity: {}, - shop: {}, - man_made: {}, - public_transport: {}, + office: {}, place: {}, - aeroway: {}, - waterway: {}, - power: {} + power: {}, + public_transport: {}, + ruins: {}, + shop: {}, + tourism: {}, + waterway: {} }; iD.Background = function(context) { var dispatch = d3.dispatch('change'), @@ -21266,33 +22183,33 @@ iD.Background = function(context) { overlayLayers = []; var backgroundSources = iD.data.imagery.map(function(source) { - if (source.sourcetag === 'Bing') { + if (source.type === 'bing') { return iD.BackgroundSource.Bing(source, dispatch); } else { - return iD.BackgroundSource.template(source); + return iD.BackgroundSource(source); } }); - backgroundSources.push(iD.BackgroundSource.Custom); + backgroundSources.unshift(iD.BackgroundSource.None()); - function findSource(sourcetag) { + function findSource(id) { return _.find(backgroundSources, function(d) { - return d.data.sourcetag && d.data.sourcetag === sourcetag; + return d.id && d.id === id; }); } function updateImagery() { - var b = background.baseLayerSource().data, - o = overlayLayers.map(function (d) { return d.source().data.sourcetag; }).join(','), + var b = background.baseLayerSource(), + o = overlayLayers.map(function (d) { return d.source().id; }).join(','), q = iD.util.stringQs(location.hash.substring(1)); - var tag = b.sourcetag; - if (!tag && b.name === 'Custom') { - tag = 'custom:' + b.template; + var id = b.id; + if (id === 'custom') { + id = 'custom:' + b.template; } - if (tag) { - q.background = tag; + if (id) { + q.background = id; } else { delete q.background; } @@ -21305,15 +22222,13 @@ iD.Background = function(context) { location.replace('#' + iD.util.qsString(q, true)); - var imageryUsed = []; - if (b.name === 'Custom') { - imageryUsed.push('Custom (' + b.template + ')'); - } else { - imageryUsed.push(b.sourcetag || b.name); - } + var imageryUsed = [b.imageryUsed()]; overlayLayers.forEach(function (d) { - imageryUsed.push(d.source().data.sourcetag || d.source().data.name); + var source = d.source(); + if (!source.isLocatorOverlay()) { + imageryUsed.push(source.imageryUsed()); + } }); if (background.showsGpxLayer()) { @@ -21341,7 +22256,7 @@ iD.Background = function(context) { gpx.call(gpxLayer); var overlays = selection.selectAll('.overlay-layer') - .data(overlayLayers, function(d) { return d.source().data.name }); + .data(overlayLayers, function(d) { return d.source().name(); }); overlays.enter().insert('div', '.layer-data') .attr('class', 'layer-layer overlay-layer'); @@ -21355,11 +22270,8 @@ iD.Background = function(context) { } background.sources = function(extent) { - return backgroundSources.filter(function(layer) { - return !layer.data.extents || - layer.data.extents.some(function(layerExtent) { - return iD.geo.Extent(layerExtent).intersects(extent); - }); + return backgroundSources.filter(function(source) { + return source.intersects(extent); }); }; @@ -21383,7 +22295,7 @@ iD.Background = function(context) { }; background.bing = function() { - background.baseLayerSource(findSource("Bing")); + background.baseLayerSource(findSource('Bing')); }; background.hasGpxLayer = function() { @@ -21394,6 +22306,23 @@ iD.Background = function(context) { return background.hasGpxLayer() && gpxLayer.enable(); }; + function toDom(x) { + return (new DOMParser()).parseFromString(x, 'text/xml'); + } + + background.gpxLayerFiles = function(fileList) { + var f = fileList[0], + reader = new FileReader(); + + reader.onload = function(e) { + gpxLayer.geojson(toGeoJSON.gpx(toDom(e.target.result))); + dispatch.change(); + context.map().pan([0, 0]); + }; + + reader.readAsText(f); + }; + background.zoomToGpxLayer = function() { if (background.hasGpxLayer()) { context.map() @@ -21408,10 +22337,14 @@ iD.Background = function(context) { background.showsLayer = function(d) { return d === baseLayer.source() || - (d.data.name === 'Custom' && baseLayer.source().data.name === 'Custom') || + (d.id === 'custom' && baseLayer.source().id === 'custom') || overlayLayers.some(function(l) { return l.source() === d; }); }; + background.overlayLayerSources = function() { + return overlayLayers.map(function (l) { return l.source(); }); + }; + background.toggleOverlayLayer = function(d) { var layer; @@ -21425,7 +22358,7 @@ iD.Background = function(context) { } } - layer = iD.TileLayer('overlay') + layer = iD.TileLayer() .source(d) .projection(context.projection) .dimensions(baseLayer.dimensions()); @@ -21436,14 +22369,14 @@ iD.Background = function(context) { }; background.nudge = function(d, zoom) { - baseLayer.nudge(d, zoom); + baseLayer.source().nudge(d, zoom); dispatch.change(); return background; }; background.offset = function(d) { - if (!arguments.length) return baseLayer.offset(); - baseLayer.offset(d); + if (!arguments.length) return baseLayer.source().offset(); + baseLayer.source().offset(d); dispatch.change(); return background; }; @@ -21452,12 +22385,17 @@ iD.Background = function(context) { chosen = q.background || q.layer; if (chosen && chosen.indexOf('custom:') === 0) { - background.baseLayerSource(iD.BackgroundSource.template({ - template: chosen.replace(/^custom:/, ''), - name: 'Custom' - })); + background.baseLayerSource(iD.BackgroundSource.Custom(chosen.replace(/^custom:/, ''))); } else { - background.baseLayerSource(findSource(chosen) || findSource("Bing")); + background.baseLayerSource(findSource(chosen) || findSource('Bing')); + } + + var locator = _.find(backgroundSources, function(d) { + return d.overlay && d.default; + }); + + if (locator) { + background.toggleOverlayLayer(locator); } var overlays = (q.overlays || '').split(','); @@ -21468,49 +22406,72 @@ iD.Background = function(context) { return d3.rebind(background, dispatch, 'on'); }; -iD.BackgroundSource = {}; +iD.BackgroundSource = function(data) { + var source = _.clone(data), + offset = [0, 0], + name = source.name; -// derive the url of a 'quadkey' style tile from a coordinate object -iD.BackgroundSource.template = function(data) { + source.scaleExtent = data.scaleExtent || [0, 20]; - function generator(coord) { - var u = ''; - for (var zoom = coord[2]; zoom > 0; zoom--) { - var b = 0; - var mask = 1 << (zoom - 1); - if ((coord[0] & mask) !== 0) b++; - if ((coord[1] & mask) !== 0) b += 2; - u += b.toString(); - } + source.offset = function(_) { + if (!arguments.length) return offset; + offset = _; + return source; + }; + source.nudge = function(_, zoomlevel) { + offset[0] += _[0] / Math.pow(2, zoomlevel); + offset[1] += _[1] / Math.pow(2, zoomlevel); + return source; + }; + + source.name = function() { + return name; + }; + + source.imageryUsed = function() { + return source.id || name; + }; + + source.url = function(coord) { return data.template - .replace('{t}', data.subdomains ? - data.subdomains[(coord[0] + coord[1]) % data.subdomains.length] : '') - .replace('{u}', u) .replace('{x}', coord[0]) .replace('{y}', coord[1]) // TMS-flipped y coordinate - .replace('{ty}', Math.pow(2, coord[2]) - coord[1] - 1) - .replace('{z}', coord[2]) - // JOSM style - .replace('{zoom}', coord[2]) - .replace(/\{(switch\:[^\}]*)\}/, function(s, r) { - var subdomains = r.split(':')[1].split(','); - return subdomains[coord[2] % subdomains.length]; + .replace(/\{[t-]y\}/, Math.pow(2, coord[2]) - coord[1] - 1) + .replace(/\{z(oom)?\}/, coord[2]) + .replace(/\{switch:([^}]+)\}/, function(s, r) { + var subdomains = r.split(','); + return subdomains[(coord[0] + coord[1]) % subdomains.length]; }); - } + }; + + source.intersects = function(extent) { + extent = extent.polygon(); + return !data.polygon || data.polygon.some(function(polygon) { + return iD.geo.polygonIntersectsPolygon(polygon, extent); + }); + }; + + source.validZoom = function(z) { + return source.scaleExtent[0] <= z && + (!source.isLocatorOverlay() || source.scaleExtent[1] > z); + }; + + source.isLocatorOverlay = function() { + return name === 'Locator Overlay'; + }; - generator.data = data; - generator.copyrightNotices = function() {}; + source.copyrightNotices = function() {}; - return generator; + return source; }; iD.BackgroundSource.Bing = function(data, dispatch) { // http://msdn.microsoft.com/en-us/library/ff701716.aspx // http://msdn.microsoft.com/en-us/library/ff701701.aspx - var bing = iD.BackgroundSource.template(data), + var bing = iD.BackgroundSource(data), key = 'Arzdiw4nlOJzRwOz__qailc8NiR31Tt51dN2D7cm57NrnceZnCpgOkmJhNpGoppU', // Same as P2 and JOSM url = 'http://dev.virtualearth.net/REST/v1/Imagery/Metadata/Aerial?include=ImageryProviders&key=' + key + '&jsonp={callback}', @@ -21531,6 +22492,25 @@ iD.BackgroundSource.Bing = function(data, dispatch) { dispatch.change(); }); + var template = 'http://ecn.t{t}.tiles.virtualearth.net/tiles/a{u}.jpeg?g=587&mkt=en-gb&n=z', + subdomains = [0, 1, 2, 3]; + + bing.url = function(coord) { + var u = ''; + + for (var zoom = coord[2]; zoom > 0; zoom--) { + var b = 0; + var mask = 1 << (zoom - 1); + if ((coord[0] & mask) !== 0) b++; + if ((coord[1] & mask) !== 0) b += 2; + u += b.toString(); + } + + return template + .replace('{t}', subdomains[(coord[0] + coord[1]) % 4]) + .replace('{u}', u); + }; + bing.copyrightNotices = function(zoom, extent) { zoom = Math.min(zoom, 21); return providers.filter(function(provider) { @@ -21544,21 +22524,40 @@ iD.BackgroundSource.Bing = function(data, dispatch) { }).join(', '); }; + bing.logo = 'bing_maps.png'; + bing.terms_url = 'http://opengeodata.org/microsoft-imagery-details'; + return bing; }; -iD.BackgroundSource.Custom = function() { - var template = window.prompt('Enter a tile template. ' + - 'Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.'); - if (!template) return null; - return iD.BackgroundSource.template({ - template: template, - name: 'Custom' - }); +iD.BackgroundSource.None = function() { + var source = iD.BackgroundSource({id: 'none', template: ''}); + + source.name = function() { + return t('background.none'); + }; + + source.imageryUsed = function() { + return 'None'; + }; + + return source; }; -iD.BackgroundSource.Custom.data = { 'name': 'Custom' }; -iD.GpxLayer = function(context, dispatch) { +iD.BackgroundSource.Custom = function(template) { + var source = iD.BackgroundSource({id: 'custom', template: template}); + + source.name = function() { + return t('background.custom'); + }; + + source.imageryUsed = function() { + return 'Custom (' + template + ')'; + }; + + return source; +}; +iD.GpxLayer = function(context) { var projection, gj = {}, enable = true, @@ -21582,12 +22581,35 @@ iD.GpxLayer = function(context, dispatch) { .append('path') .attr('class', 'gpx'); + var path = d3.geo.path() + .projection(projection); + paths - .attr('d', d3.geo.path().projection(projection)); - } + .attr('d', path); - function toDom(x) { - return (new DOMParser()).parseFromString(x, 'text/xml'); + if (typeof gj.features !== 'undefined') { + svg + .selectAll('text') + .remove(); + + svg + .selectAll('path') + .data(gj.features) + .enter() + .append('text') + .attr('class', 'gpx') + .text(function(d) { + return d.properties.name; + }) + .attr('x', function(d) { + var centroid = path.centroid(d); + return centroid[0] + 5; + }) + .attr('y', function(d) { + var centroid = path.centroid(d); + return centroid[1]; + }); + } } render.projection = function(_) { @@ -21628,16 +22650,7 @@ iD.GpxLayer = function(context, dispatch) { d3.event.stopPropagation(); d3.event.preventDefault(); if (!iD.detect().filedrop) return; - var f = d3.event.dataTransfer.files[0], - reader = new FileReader(); - - reader.onload = function(e) { - render.geojson(toGeoJSON.gpx(toDom(e.target.result))); - dispatch.change(); - context.map().pan([0, 0]); - }; - - reader.readAsText(f); + context.background().gpxLayerFiles(d3.event.dataTransfer.files); }) .on('dragenter.localgpx', over) .on('dragexit.localgpx', over) @@ -21663,11 +22676,12 @@ iD.Map = function(context) { points = iD.svg.Points(roundedProjection, context), vertices = iD.svg.Vertices(roundedProjection, context), lines = iD.svg.Lines(projection), - areas = iD.svg.Areas(roundedProjection), + areas = iD.svg.Areas(projection), midpoints = iD.svg.Midpoints(roundedProjection, context), - labels = iD.svg.Labels(roundedProjection, context), + labels = iD.svg.Labels(projection, context), supersurface, surface, - mouse; + mouse, + mousemove; function map(selection) { context.history() @@ -21689,7 +22703,7 @@ iD.Map = function(context) { map.surface = surface = dataLayer.append('svg') .on('mousedown.zoom', function() { - if (d3.event.button == 2) { + if (d3.event.button === 2) { d3.event.stopPropagation(); } }, true) @@ -21699,6 +22713,10 @@ iD.Map = function(context) { .attr('id', 'surface') .call(iD.svg.Surface(context)); + surface.on('mousemove.map', function() { + mousemove = d3.event; + }); + surface.on('mouseover.vertices', function() { if (map.editable() && !transformed) { var hover = d3.event.target.__data__; @@ -21783,7 +22801,7 @@ iD.Map = function(context) { .call(midpoints, graph, all, filter, map.extent()) .call(labels, graph, all, filter, dimensions, !difference && !extent); - if (points.points(context.intersects(map.extent())).length > 100) { + if (points.points(context.intersects(map.extent()), 100).length >= 100) { surface.select('.layer-hit').selectAll('g.point').remove(); } else { surface.call(points, points.points(all), filter); @@ -21856,7 +22874,8 @@ iD.Map = function(context) { var zoom = String(~~map.zoom()); if (surface.attr('data-zoom') !== zoom) { - surface.attr('data-zoom', zoom); + surface.attr('data-zoom', zoom) + .classed('low-zoom', zoom <= 16); } if (!difference) { @@ -21896,8 +22915,8 @@ iD.Map = function(context) { } map.mouse = function() { - var e = d3.event, s; - while (s = e.sourceEvent) e = s; + var e = mousemove || d3.event, s; + while ((s = e.sourceEvent)) e = s; return mouse(e); }; @@ -21911,10 +22930,10 @@ iD.Map = function(context) { return map; }; - function setZoom(z, force) { - if (z === map.zoom() && !force) + function setZoom(_, force) { + if (_ === map.zoom() && !force) return false; - var scale = 256 * Math.pow(2, z), + var scale = 256 * Math.pow(2, _), center = pxCenter(), l = pointLocation(center); scale = Math.max(1024, Math.min(256 * Math.pow(2, 24), scale)); @@ -21929,15 +22948,16 @@ iD.Map = function(context) { return true; } - function setCenter(loc) { - var t = projection.translate(), - c = pxCenter(), - ll = projection(loc); - if (ll[0] === c[0] && ll[1] === c[1]) + function setCenter(_) { + var c = map.center(); + if (_[0] === c[0] && _[1] === c[1]) return false; + var t = projection.translate(), + pxC = pxCenter(), + ll = projection(_); projection.translate([ - t[0] - ll[0] + c[0], - t[1] - ll[1] + c[1]]); + t[0] - ll[0] + pxC[0], + t[1] - ll[1] + pxC[1]]); zoom.translate(projection.translate()); return true; } @@ -22021,7 +23041,7 @@ iD.Map = function(context) { d3.timer(function() { if (stop) return true; map.center(iD.geo.interp(from, loc, (t += 1) / 10)); - return t == 10; + return t === 10; }, 20); return map; }; @@ -22063,16 +23083,11 @@ iD.Map = function(context) { return d3.rebind(map, dispatch, 'on'); }; -iD.TileLayer = function(backgroundType) { - - backgroundType = backgroundType || 'background'; - +iD.TileLayer = function() { var tileSize = 256, tile = d3.geo.tile(), projection, cache = {}, - offset = [0, 0], - offsets = {}, tileOrigin, z, transformProp = iD.util.prefixCSSProperty('Transform'), @@ -22093,7 +23108,7 @@ iD.TileLayer = function(backgroundType) { function lookUp(d) { for (var up = -1; up > -d[2]; up--) { var tile = atZoom(d, up); - if (cache[source(tile)] !== false) { + if (cache[source.url(tile)] !== false) { return tile; } } @@ -22111,7 +23126,7 @@ iD.TileLayer = function(backgroundType) { } function addSource(d) { - d.push(source(d)); + d.push(source.url(d)); return d; } @@ -22135,9 +23150,10 @@ iD.TileLayer = function(backgroundType) { function render(selection) { var requests = []; - if (tile.scaleExtent()[0] <= z) { + if (source.validZoom(z)) { tile().forEach(function(d) { addSource(d); + if (d[3] === '') return; requests.push(d); if (cache[d[3]] === false && lookUp(d)) { requests.push(addSource(lookUp(d))); @@ -22151,8 +23167,8 @@ iD.TileLayer = function(backgroundType) { } var pixelOffset = [ - Math.round(offset[0] * Math.pow(2, z)), - Math.round(offset[1] * Math.pow(2, z)) + Math.round(source.offset()[0] * Math.pow(2, z)), + Math.round(source.offset()[1] * Math.pow(2, z)) ]; function load(d) { @@ -22209,19 +23225,6 @@ iD.TileLayer = function(backgroundType) { .classed('tile-removing', false); } - background.offset = function(_) { - if (!arguments.length) return offset; - offset = _; - if (source.data) offsets[source.data.name] = offset; - return background; - }; - - background.nudge = function(_, zoomlevel) { - offset[0] += _[0] / Math.pow(2, zoomlevel); - offset[1] += _[1] / Math.pow(2, zoomlevel); - return background; - }; - background.projection = function(_) { if (!arguments.length) return projection; projection = _; @@ -22237,13 +23240,8 @@ iD.TileLayer = function(backgroundType) { background.source = function(_) { if (!arguments.length) return source; source = _; - if (source.data) { - offset = offsets[source.data.name] = offsets[source.data.name] || [0, 0]; - } else { - offset = [0, 0]; - } cache = {}; - tile.scaleExtent((source.data && source.data.scaleExtent) || [1, 20]); + tile.scaleExtent(source.scaleExtent); return background; }; @@ -22264,29 +23262,27 @@ iD.svg = { }; }, + Round: function () { + return d3.geo.transform({ + point: function(x, y) { return this.stream.point(Math.floor(x), Math.floor(y)); } + }); + }, + Path: function(projection, graph, polygon) { var cache = {}, - path = d3.geo.path().projection(projection); - - function result(entity) { - if (entity.id in cache) return cache[entity.id]; - - var buffer = ''; + round = iD.svg.Round().stream, + clip = d3.geo.clipExtent().extent(projection.clipExtent()).stream, + project = projection.stream, + path = d3.geo.path() + .projection({stream: function(output) { return polygon ? project(round(output)) : project(clip(round(output))); }}); - path.context({ - beginPath: function() {}, - moveTo: function(x, y) { buffer += 'M' + Math.floor(x) + ',' + Math.floor(y); }, - lineTo: function(x, y) { buffer += 'L' + Math.floor(x) + ',' + Math.floor(y); }, - arc: function() {}, - closePath: function() { buffer += 'Z'; } - }); - - path(entity.asGeoJSON(graph, polygon)); - - return cache[entity.id] = buffer; - } - - return result; + return function(entity) { + if (entity.id in cache) { + return cache[entity.id]; + } else { + return cache[entity.id] = path(entity.asGeoJSON(graph)); // jshint ignore:line + } + }; }, OneWaySegments: function(projection, graph, dt) { @@ -22314,7 +23310,7 @@ iD.svg = { b = [x, y]; if (a) { - var span = iD.geo.dist(a, b) - offset; + var span = iD.geo.euclideanDistance(a, b) - offset; if (span >= 0) { var angle = Math.atan2(b[1] - a[1], b[0] - a[0]), @@ -22361,7 +23357,8 @@ iD.svg = { } }; iD.svg.Areas = function(projection) { - // Patterns only work in Firefox when set directly on element + // Patterns only work in Firefox when set directly on element. + // (This is not a bug: https://bugzilla.mozilla.org/show_bug.cgi?id=750632) var patterns = { wetland: 'wetland', beach: 'beach', @@ -22396,7 +23393,8 @@ iD.svg.Areas = function(projection) { var entity = entities[i]; if (entity.geometry(graph) !== 'area') continue; - if (multipolygon = iD.geo.isSimpleMultipolygonOuterMember(entity, graph)) { + multipolygon = iD.geo.isSimpleMultipolygonOuterMember(entity, graph); + if (multipolygon) { areas[multipolygon.id] = { entity: multipolygon.mergeTags(entity.tags), area: Math.abs(entity.area(graph)) @@ -22428,8 +23426,25 @@ iD.svg.Areas = function(projection) { .filter(filter) .data(function(layer) { return data[layer]; }, iD.Entity.key); + // Remove exiting areas first, so they aren't included in the `fills` + // array used for sorting below (https://github.com/systemed/iD/issues/1903). + paths.exit() + .remove(); + + var fills = surface.selectAll('.layer-fill path.area')[0]; + + var bisect = d3.bisector(function(node) { + return -node.__data__.area(graph); + }).left; + + function sortedByArea(entity) { + if (this.__data__ === 'fill') { + return fills[bisect(fills, -entity.area(graph))]; + } + } + paths.enter() - .append('path') + .insert('path', sortedByArea) .each(function(entity) { var layer = this.parentNode.__data__; @@ -22442,14 +23457,11 @@ iD.svg.Areas = function(projection) { .call(iD.svg.TagClasses()); paths - .order() .attr('d', path); - - paths.exit() - .remove(); }; }; iD.svg.Labels = function(projection, context) { + var path = d3.geo.path().projection(projection); // Replace with dict and iterate over entities tags instead? var label_stack = [ @@ -22484,11 +23496,11 @@ iD.svg.Labels = function(projection, context) { var font_sizes = label_stack.map(function(d) { var style = iD.util.getStyle('text.' + d[0] + '.tag-' + d[1]), - m = style && style.cssText.match("font-size: ([0-9]{1,2})px;"); + m = style && style.cssText.match('font-size: ([0-9]{1,2})px;'); if (m) return parseInt(m[1], 10); style = iD.util.getStyle('text.' + d[0]); - m = style && style.cssText.match("font-size: ([0-9]{1,2})px;"); + m = style && style.cssText.match('font-size: ([0-9]{1,2})px;'); if (m) return parseInt(m[1], 10); return default_size; @@ -22531,24 +23543,28 @@ iD.svg.Labels = function(projection, context) { return c[text]; } else { - return size / 3 * 2 * text.length; + var str = encodeURIComponent(text).match(/%[CDEFcdef]/g); + if (str === null) { + return size / 3 * 2 * text.length; + } else { + return size / 3 * (2 * text.length + str.length); + } } } function drawLineLabels(group, entities, filter, classes, labels) { - var texts = group.selectAll('text.' + classes) .filter(filter) .data(entities, iD.Entity.key); - var tp = texts.enter() + texts.enter() .append('text') .attr('class', function(d, i) { return classes + ' ' + labels[i].classes + ' ' + d.id; }) .append('textPath') .attr('class', 'textpath'); - var tps = texts.selectAll('.textpath') + texts.selectAll('.textpath') .filter(filter) .data(entities, iD.Entity.key) .attr({ @@ -22558,11 +23574,9 @@ iD.svg.Labels = function(projection, context) { .text(iD.util.displayName); texts.exit().remove(); - } function drawLinePaths(group, entities, filter, classes, labels) { - var halos = group.selectAll('path') .filter(filter) .data(entities, iD.Entity.key); @@ -22714,18 +23728,23 @@ iD.svg.Labels = function(projection, context) { // Split entities into groups specified by label_stack for (i = 0; i < entities.length; i++) { entity = entities[i]; - var geometry = entity.geometry(graph), - preset = geometry === 'area' && context.presets().match(entity, graph), + var geometry = entity.geometry(graph); + + if (geometry === 'vertex') + continue; + if (hidePoints && geometry === 'point') + continue; + + var preset = geometry === 'area' && context.presets().match(entity, graph), icon = preset && !blacklisted(preset) && preset.icon; - if ((iD.util.displayName(entity) || icon) && !(hidePoints && geometry === 'point')) { + if (!icon && !iD.util.displayName(entity)) + continue; - for (k = 0; k < label_stack.length; k ++) { - if (entity.geometry(graph) === label_stack[k][0] && - entity.tags[label_stack[k][1]]) { - labelable[k].push(entity); - break; - } + for (k = 0; k < label_stack.length; k ++) { + if (geometry === label_stack[k][0] && entity.tags[label_stack[k][1]]) { + labelable[k].push(entity); + break; } } } @@ -22809,8 +23828,7 @@ iD.svg.Labels = function(projection, context) { } function getAreaLabel(entity, width, height) { - var path = d3.geo.path().projection(projection), - centroid = path.centroid(entity.asGeoJSON(graph, true)), + var centroid = path.centroid(entity.asGeoJSON(graph, true)), extent = entity.extent(graph), entitywidth = projection(extent[1])[0] - projection(extent[0])[0], rect; @@ -23011,7 +24029,7 @@ iD.svg.Midpoints = function(projection, context) { // If neither of the nodes changed, no need to redraw midpoint if (!midpoints[id] && (filter(a) || filter(b))) { var loc = iD.geo.interp(a.loc, b.loc, 0.5); - if (extent.intersects(loc) && iD.geo.dist(projection(a.loc), projection(b.loc)) > 40) { + if (extent.intersects(loc) && iD.geo.euclideanDistance(projection(a.loc), projection(b.loc)) > 40) { midpoints[id] = { type: 'midpoint', id: id, @@ -23101,7 +24119,7 @@ iD.svg.Points = function(projection, context) { .remove(); } - drawPoints.points = function(entities) { + drawPoints.points = function(entities, limit) { var graph = context.graph(), points = []; @@ -23109,6 +24127,7 @@ iD.svg.Points = function(projection, context) { var entity = entities[i]; if (entity.geometry(graph) === 'point') { points.push(entity); + if (limit && points.length >= limit) break; } } @@ -23117,6 +24136,81 @@ iD.svg.Points = function(projection, context) { return drawPoints; }; +iD.svg.Restrictions = function(context) { + var projection = context.projection; + + function drawRestrictions(surface) { + var turns = drawRestrictions.turns(context.graph(), context.selectedIDs()); + + var groups = surface.select('.layer-hit').selectAll('g.restriction') + .data(turns, iD.Entity.key); + + var enter = groups.enter().append('g') + .attr('class', 'restriction'); + + enter.append('circle') + .attr('class', 'restriction') + .attr('r', 4); + + groups + .attr('transform', function(restriction) { + var via = context.entity(restriction.memberByRole('via').id); + return iD.svg.PointTransform(projection)(via); + }); + + groups.exit() + .remove(); + + return this; + } + + drawRestrictions.turns = function (graph, selectedIDs) { + if (selectedIDs.length !== 1) + return []; + + var from = graph.entity(selectedIDs[0]); + if (from.type !== 'way') + return []; + + return graph.parentRelations(from).filter(function(relation) { + var f = relation.memberById(from.id), + t = relation.memberByRole('to'), + v = relation.memberByRole('via'); + + return relation.tags.type === 'restriction' && f.role === 'from' && + t && t.type === 'way' && graph.hasEntity(t.id) && + v && v.type === 'node' && graph.hasEntity(v.id) && + !graph.entity(t.id).isDegenerate() && + !graph.entity(f.id).isDegenerate() && + graph.entity(t.id).affix(v.id) && + graph.entity(f.id).affix(v.id); + }); + }; + + drawRestrictions.datum = function(graph, from, restriction, projection) { + var to = graph.entity(restriction.memberByRole('to').id), + a = graph.entity(restriction.memberByRole('via').id), + b; + + if (to.first() === a.id) { + b = graph.entity(to.nodes[1]); + } else { + b = graph.entity(to.nodes[to.nodes.length - 2]); + } + + a = projection(a.loc); + b = projection(b.loc); + + return { + from: from, + to: to, + restriction: restriction, + angle: Math.atan2(b[1] - a[1], b[0] - a[0]) + }; + }; + + return drawRestrictions; +}; iD.svg.Surface = function(context) { function autosize(image) { var img = document.createElement('img'); @@ -23140,7 +24234,7 @@ iD.svg.Surface = function(context) { .data(data) .enter().append('use') .attr('id', function(d) { return d.key; }) - .attr('transform', function(d) { return "translate(-" + d.value[0] + ",-" + d.value[1] + ")"; }) + .attr('transform', function(d) { return 'translate(-' + d.value[0] + ',-' + d.value[1] + ')'; }) .attr('xlink:href', '#' + id); }; } @@ -23236,11 +24330,15 @@ iD.svg.Surface = function(context) { }; }; iD.svg.TagClasses = function() { - var keys = d3.set([ - 'highway', 'railway', 'waterway', 'power', 'motorway', 'amenity', - 'natural', 'landuse', 'building', 'oneway', 'bridge', 'boundary', - 'tunnel', 'leisure', 'construction', 'place', 'aeroway' - ]), tagClassRe = /^tag-/, + var primary = [ + 'highway', 'railway', 'waterway', 'aeroway', 'motorway', + 'boundary', 'power', 'amenity', 'natural', 'landuse', + 'building', 'leisure', 'place' + ], + secondary = [ + 'oneway', 'bridge', 'tunnel', 'construction' + ], + tagClassRe = /^tag-/, tags = function(entity) { return entity.tags; }; var tagClasses = function(selection) { @@ -23253,10 +24351,21 @@ iD.svg.TagClasses = function() { return name.length && !tagClassRe.test(name); }).join(' '); - var t = tags(entity); - for (var k in t) { - if (!keys.has(k) || t[k] === 'no') continue; - classes += ' tag-' + k + ' tag-' + k + '-' + t[k]; + var t = tags(entity), i, k, v; + + for (i = 0; i < primary.length; i++) { + k = primary[i]; + v = t[k]; + if (!v || v === 'no') continue; + classes += ' tag-' + k + ' tag-' + k + '-' + v; + break; + } + + for (i = 0; i < secondary.length; i++) { + k = secondary[i]; + v = t[k]; + if (!v || v === 'no') continue; + classes += ' tag-' + k + ' tag-' + k + '-' + v; } classes = classes.trim(); @@ -23337,9 +24446,10 @@ iD.svg.Vertices = function(projection, context) { var icons = {}; function icon(entity) { if (entity.id in icons) return icons[entity.id]; - return icons[entity.id] = (zoom !== 0 && + icons[entity.id] = zoom !== 0 && entity.hasInterestingTags() && - context.presets().match(entity, graph).icon); + context.presets().match(entity, graph).icon; + return icons[entity.id]; } function circle(klass) { @@ -23352,7 +24462,7 @@ iD.svg.Vertices = function(projection, context) { this.setAttribute('cx', c); this.setAttribute('cy', -c); this.setAttribute('r', r); - } + }; } var enter = groups.enter().append('g') @@ -23397,7 +24507,7 @@ iD.svg.Vertices = function(projection, context) { if (entity.id in selected || entity.hasInterestingTags() || entity.isIntersection(graph)) { - vertices.push(entity) + vertices.push(entity); } } @@ -23426,8 +24536,7 @@ iD.svg.Vertices = function(projection, context) { }; iD.ui = function(context) { function render(container) { - var history = context.history(), - map = context.map(); + var map = context.map(); if (iD.detect().opera) container.classed('opera', true); @@ -23455,7 +24564,7 @@ iD.ui = function(context) { .attr('id', 'map') .call(map); - var spacer = bar.append('div') + bar.append('div') .attr('class', 'spacer col4'); var limiter = bar.append('div') @@ -23477,14 +24586,12 @@ iD.ui = function(context) { .attr('class', 'spinner') .call(iD.ui.Spinner(context)); - content.append('div') - .attr('class', 'attribution') - .attr('tabindex', -1) + content .call(iD.ui.Attribution(context)); content.append('div') .style('display', 'none') - .attr('class', 'help-wrap fillL col5 content'); + .attr('class', 'help-wrap map-overlay fillL col5 content'); var controls = bar.append('div') .attr('class', 'map-controls'); @@ -23549,8 +24656,11 @@ iD.ui = function(context) { .call(iD.ui.Contributors(context)); window.onbeforeunload = function() { - history.save(); - if (history.hasChanges()) return t('save.unsaved_changes'); + return context.save(); + }; + + window.onunload = function() { + context.history().unlock(); }; d3.select(window).on('resize.editor', function() { @@ -23571,8 +24681,7 @@ iD.ui = function(context) { .on('â', pan([pa, 0])) .on('â', pan([0, pa])) .on('â', pan([-pa, 0])) - .on('â', pan([0, -pa])) - .on('M', function() { context.toggleFullscreen(); }); + .on('â', pan([0, -pa])); d3.select(document) .call(keybinding); @@ -23667,29 +24776,37 @@ iD.ui.Account = function(context) { iD.ui.Attribution = function(context) { var selection; - function update() { - if (!context.background().baseLayerSource()) { - selection.html(''); - return; - } + function attribution(data, klass) { + var div = selection.selectAll('.' + klass) + .data([0]); - var attribution = selection.selectAll('.provided-by') - .data([context.background().baseLayerSource()], function(d) { return d.data.name; }); + div.enter() + .append('div') + .attr('class', klass); - attribution.enter() + var background = div.selectAll('.attribution') + .data(data, function(d) { return d.name(); }); + + background.enter() .append('span') - .attr('class', 'provided-by') + .attr('class', 'attribution') .each(function(d) { - var source = d.data.sourcetag || d.data.name; + if (d.terms_html) { + d3.select(this) + .html(d.terms_html); + return; + } + + var source = d.terms_text || d.id || d.name(); - if (d.data.logo) { - source = ''; + if (d.logo) { + source = ''; } - if (d.data.terms_url) { + if (d.terms_url) { d3.select(this) .append('a') - .attr('href', d.data.terms_url) + .attr('href', d.terms_url) .attr('target', '_blank') .html(source); } else { @@ -23698,10 +24815,10 @@ iD.ui.Attribution = function(context) { } }); - attribution.exit() + background.exit() .remove(); - var copyright = attribution.selectAll('.copyright-notice') + var copyright = background.selectAll('.copyright-notice') .data(function(d) { var notice = d.copyrightNotices(context.map().zoom(), context.map().extent()); return notice ? [notice] : []; @@ -23717,6 +24834,13 @@ iD.ui.Attribution = function(context) { .remove(); } + function update() { + attribution([context.background().baseLayerSource()], 'base-layer-attribution'); + attribution(context.background().overlayLayerSources().filter(function (s) { + return s.validZoom(context.map().zoom()); + }), 'overlay-layer-attribution'); + } + return function(select) { selection = select; @@ -23731,15 +24855,18 @@ iD.ui.Attribution = function(context) { }; iD.ui.Background = function(context) { var key = 'b', - opacities = [1, 0.5, 0], + opacities = [1, 0.75, 0.5, 0.25], directions = [ ['left', [1, 0]], ['top', [0, -1]], ['right', [-1, 0]], ['bottom', [0, 1]]], - opacityDefault = (context.storage('background-opacity') != undefined) ? + opacityDefault = (context.storage('background-opacity') !== null) ? (+context.storage('background-opacity')) : 0.5; + // Can be 0 from <1.3.0 use or due to issue #1923. + if (opacityDefault === 0) opacityDefault = 0.5; + function background(selection) { function setOpacity(d) { @@ -23759,7 +24886,7 @@ iD.ui.Background = function(context) { return context.background().showsLayer(d); } - content.selectAll('label.layer') + content.selectAll('.layer, .custom_layer') .classed('active', active) .selectAll('input') .property('checked', active); @@ -23767,18 +24894,23 @@ iD.ui.Background = function(context) { function clickSetSource(d) { d3.event.preventDefault(); - if (d.data.name === 'Custom') { - var configured = d(); - if (!configured) { - selectLayer(); - return; - } - d = configured; - } context.background().baseLayerSource(d); selectLayer(); } + function clickCustom() { + d3.event.preventDefault(); + var template = window.prompt(t('background.custom_prompt')); + if (!template || template.indexOf('google.com') !== -1 || + template.indexOf('googleapis.com') !== -1 || + template.indexOf('google.ru') !== -1) { + selectLayer(); + return; + } + context.background().baseLayerSource(iD.BackgroundSource.Custom(template)); + selectLayer(); + } + function clickSetOverlay(d) { d3.event.preventDefault(); context.background().toggleOverlayLayer(d); @@ -23795,45 +24927,38 @@ iD.ui.Background = function(context) { .sources(context.map().extent()) .filter(filter); - var layerLinks = layerList.selectAll('label.layer') - .data(sources, function(d) { return d.data.name; }); + var layerLinks = layerList.selectAll('li.layer') + .data(sources, function(d) { return d.name(); }); - var layerInner = layerLinks.enter() - .append('label') + var enter = layerLinks.enter() + .insert('li', '.custom_layer') .attr('class', 'layer'); // only set tooltips for layers with tooltips - layerInner - .filter(function(d) { return d.data.description; }) + enter.filter(function(d) { return d.description; }) .call(bootstrap.tooltip() - .title(function(d) { return d.data.description; }) - .placement('left') - ); + .title(function(d) { return d.description; }) + .placement('top')); - layerInner.append('input') + var label = enter.append('label'); + + label.append('input') .attr('type', type) .attr('name', 'layers') - .attr('value', function(d) { return d.data.name; }) .on('change', change); - layerInner.insert('span').text(function(d) { - return d.data.name; - }); + label.append('span') + .text(function(d) { return d.name(); }); layerLinks.exit() .remove(); - layerList.style('display', layerList.selectAll('label.layer').data().length > 0 ? 'block' : 'none'); + layerList.style('display', layerList.selectAll('li.layer').data().length > 0 ? 'block' : 'none'); } function update() { - backgroundList.call(drawList, 'radio', clickSetSource, function(d) { - return !d.data.overlay; - }); - - overlayList.call(drawList, 'checkbox', clickSetOverlay, function(d) { - return d.data.overlay; - }); + backgroundList.call(drawList, 'radio', clickSetSource, function(d) { return !d.overlay; }); + overlayList.call(drawList, 'checkbox', clickSetOverlay, function(d) { return d.overlay; }); var hasGpx = context.background().hasGpxLayer(), showsGpx = context.background().showsGpxLayer(); @@ -23869,7 +24994,7 @@ iD.ui.Background = function(context) { } var content = selection.append('div') - .attr('class', 'fillL map-overlay content hide'), + .attr('class', 'fillL map-overlay col3 content hide'), tooltip = bootstrap.tooltip() .placement('left') .html(true) @@ -23880,9 +25005,7 @@ iD.ui.Background = function(context) { function toggle() { if (d3.event) d3.event.preventDefault(); tooltip.hide(button); - var visible = !button.classed('active'); - setVisible(visible); - if (visible) content.selectAll('.toggle-list label:first-child').node().focus(); + setVisible(!button.classed('active')); } function setVisible(show) { @@ -23895,16 +25018,16 @@ iD.ui.Background = function(context) { return d3.event.stopPropagation(); }); content.style('display', 'block') - .style('left', '0px') + .style('right', '-300px') .transition() .duration(200) - .style('left', '-260px'); + .style('right', '0px'); } else { content.style('display', 'block') - .style('left', '-260px') + .style('right', '0px') .transition() .duration(200) - .style('left', '0px') + .style('right', '-300px') .each('end', function() { d3.select(this).style('display', 'none'); }); @@ -23939,53 +25062,82 @@ iD.ui.Background = function(context) { return t('background.percent_brightness', { opacity: (d * 100) }); }) .on('click.set-opacity', setOpacity) - .html("
") + .html('') .call(bootstrap.tooltip() - .placement('top')) + .placement('left')) .append('div') .attr('class', 'opacity') .style('opacity', String); - var backgroundList = content - .append('div') - .attr('class', 'toggle-list layer-list'); + var backgroundList = content.append('ul') + .attr('class', 'layer-list'); - var overlayList = content - .append('div') - .attr('class', 'toggle-list layer-list'); + var custom = backgroundList.append('li') + .attr('class', 'custom_layer') + .datum(iD.BackgroundSource.Custom()); - var gpxLayerItem = content - .append('div') - .style('display', iD.detect().filedrop ? 'block' : 'none') - .attr('class', 'toggle-list layer-list') - .append('label') - .classed('layer-toggle-gpx', true); + var label = custom.append('label'); - gpxLayerItem.call(bootstrap.tooltip() - .title(t('gpx.drag_drop')) - .placement('left')); + label.append('input') + .attr('type', 'radio') + .attr('name', 'layers') + .on('change', clickCustom); - gpxLayerItem.append('input') - .attr('type', 'checkbox') - .property('disabled', true) - .on('change', clickGpx); + label.append('span') + .text(t('background.custom')); - gpxLayerItem.append('span') - .text(t('gpx.local_layer')); + var overlayList = content.append('ul') + .attr('class', 'layer-list'); - gpxLayerItem - .append('button') - .attr('class', 'minor layer-extent') + var gpxLayerItem = content.append('ul') + .style('display', iD.detect().filedrop ? 'block' : 'none') + .attr('class', 'layer-list') + .append('li') + .classed('layer-toggle-gpx', true); + + gpxLayerItem.append('button') + .attr('class', 'layer-extent') + .call(bootstrap.tooltip() + .title(t('gpx.zoom')) + .placement('left')) .on('click', function() { d3.event.preventDefault(); d3.event.stopPropagation(); context.background().zoomToGpxLayer(); }) .append('span') - .attr('class', 'icon geocode' ); + .attr('class', 'icon geolocate'); - var adjustments = content - .append('div') + gpxLayerItem.append('button') + .attr('class', 'layer-browse') + .call(bootstrap.tooltip() + .title(t('gpx.browse')) + .placement('left')) + .on('click', function() { + d3.select(document.createElement('input')) + .attr('type', 'file') + .on('change', function() { + context.background().gpxLayerFiles(d3.event.target.files); + }) + .node().click(); + }) + .append('span') + .attr('class', 'icon geocode'); + + label = gpxLayerItem.append('label') + .call(bootstrap.tooltip() + .title(t('gpx.drag_drop')) + .placement('top')); + + label.append('input') + .attr('type', 'checkbox') + .property('disabled', true) + .on('change', clickGpx); + + label.append('span') + .text(t('gpx.local_layer')); + + var adjustments = content.append('div') .attr('class', 'adjustments'); adjustments.append('a') @@ -24000,8 +25152,7 @@ iD.ui.Background = function(context) { d3.event.preventDefault(); }); - var nudgeContainer = adjustments - .append('div') + var nudgeContainer = adjustments.append('div') .attr('class', 'nudge-container cf') .style('display', 'none'); @@ -24021,10 +25172,6 @@ iD.ui.Background = function(context) { resetButton.append('div') .attr('class', 'icon undo'); - resetButton.call(bootstrap.tooltip() - .title(t('background.reset')) - .placement('bottom')); - context.map() .on('move.background-update', _.debounce(update, 1000)); update(); @@ -24071,42 +25218,31 @@ iD.ui.cmd = function(code) { return keys.join('+'); }; iD.ui.Commit = function(context) { - var event = d3.dispatch('cancel', 'save', 'fix'), - presets = context.presets(); - - function zipSame(d) { - var c = [], n = -1; - for (var i = 0; i < d.length; i++) { - var desc = { - name: d[i].tags.name || presets.match(d[i], context.graph()).name(), - geometry: d[i].geometry(context.graph()), - count: 1, - tagText: iD.util.tagText(d[i]) - }; - if (c[n] && - c[n].name == desc.name && - c[n].tagText == desc.tagText) { - c[n].count++; - } else { - c[++n] = desc; - } - } - return c; - } + var event = d3.dispatch('cancel', 'save'); function commit(selection) { - var changes = context.history().changes(); - - function changesLength(d) { return changes[d].length; } + var changes = context.history().changes(), + summary = context.history().difference().summary(); + + function zoomToEntity(change) { + var entity = change.entity; + if (change.changeType !== 'deleted' && + context.graph().entity(entity.id).geometry(context.graph()) !== 'vertex') { + context.map().zoomTo(entity); + context.surface().selectAll( + iD.util.entityOrMemberSelector([entity.id], context.graph())) + .classed('hover', true); + } + } var header = selection.append('div') .attr('class', 'header fillL'); header.append('button') .attr('class', 'fr') + .on('click', event.cancel) .append('span') - .attr('class', 'icon close') - .on('click', event.cancel); + .attr('class', 'icon close'); header.append('h3') .text(t('commit.title')); @@ -24124,7 +25260,10 @@ iD.ui.Commit = function(context) { var commentField = commentSection.append('textarea') .attr('placeholder', t('commit.description_placeholder')) - .property('value', context.storage('comment') || ''); + .property('value', context.storage('comment') || '') + .on('blur.save', function () { + context.storage('comment', this.value); + }); commentField.node().select(); @@ -24159,12 +25298,10 @@ iD.ui.Commit = function(context) { // Confirm Button var saveButton = saveSection.append('button') - .attr('class', 'action col3 button') + .attr('class', 'action col4 button') .on('click.save', function() { - var comment = commentField.node().value; - localStorage.comment = comment; event.save({ - comment: comment + comment: commentField.node().value }); }); @@ -24172,11 +25309,13 @@ iD.ui.Commit = function(context) { .attr('class', 'label') .text(t('commit.save')); + // Warnings var warnings = body.selectAll('div.warning-section') - .data(iD.validate(changes, context.graph())) + .data([iD.validate(changes, context.graph())]) .enter() .append('div') - .attr('class', 'modal-section warning-section fillL2'); + .attr('class', 'modal-section warning-section fillL2') + .style('display', function(d) { return _.isEmpty(d) ? 'none' : null; }); warnings.append('h3') .text(t('commit.warnings')); @@ -24186,52 +25325,90 @@ iD.ui.Commit = function(context) { .selectAll('li') .data(function(d) { return d; }) .enter() - .append('li'); + .append('li') + .on('mouseover', mouseover) + .on('mouseout', mouseout) + .on('click', warningClick); - // only show the fix icon when an entity is given - warningLi.filter(function(d) { return d.entity; }) - .append('button') - .attr('class', 'minor') - .on('click', event.fix) - .append('span') - .attr('class', 'icon warning'); + warningLi.append('span') + .attr('class', 'alert icon icon-pre-text'); warningLi.append('strong').text(function(d) { return d.message; }); - var section = body.selectAll('div.commit-section') - .data(['modified', 'deleted', 'created'].filter(changesLength)) + var changeSection = body.selectAll('div.commit-section') + .data([0]) .enter() .append('div') .attr('class', 'commit-section modal-section fillL2'); - section.append('h3') - .text(function(d) { return t('commit.' + d); }) - .append('small') - .attr('class', 'count') - .text(changesLength); + changeSection.append('h3') + .text(summary.length + ' Changes'); - var li = section.append('ul') + var li = changeSection.append('ul') .attr('class', 'changeset-list') .selectAll('li') - .data(function(d) { return zipSame(changes[d]); }) + .data(summary) .enter() - .append('li'); + .append('li') + .on('mouseover', mouseover) + .on('mouseout', mouseout) + .on('click', zoomToEntity); + + li.append('span') + .attr('class', function(d) { + return d.entity.geometry(d.graph) + ' ' + d.changeType + ' icon icon-pre-text'; + }); + + li.append('span') + .attr('class', 'change-type') + .text(function(d) { + return d.changeType + ' '; + }); li.append('strong') + .attr('class', 'entity-type') .text(function(d) { - return d.geometry + ' '; + return context.presets().match(d.entity, d.graph).name(); }); li.append('span') - .text(function(d) { return d.name; }) - .attr('title', function(d) { return d.tagText; }); + .attr('class', 'entity-name') + .text(function(d) { + var name = iD.util.displayName(d.entity) || '', + string = ''; + if (name !== '') string += ':'; + return string += ' ' + name; + }); - li.filter(function(d) { return d.count > 1; }) - .append('span') - .attr('class', 'count') - .text(function(d) { return d.count; }); + li.style('opacity', 0) + .transition() + .style('opacity', 1); + + li.style('opacity', 0) + .transition() + .style('opacity', 1); + + function mouseover(d) { + if (d.entity) { + context.surface().selectAll( + iD.util.entityOrMemberSelector([d.entity.id], context.graph()) + ).classed('hover', true); + } + } + + function mouseout() { + context.surface().selectAll('.hover') + .classed('hover', false); + } + + function warningClick(d) { + if (d.entity) { + context.map().zoomTo(d.entity); + context.enter(iD.modes.Select(context, [d.entity.id])); + } + } } return d3.rebind(commit, event, 'on'); @@ -24244,16 +25421,16 @@ iD.ui.confirm = function(selection) { var section = modal.select('.content'); - var modalHeader = section.append('div') + section.append('div') .attr('class', 'modal-section header'); - var description = section.append('div') + section.append('div') .attr('class', 'modal-section message-text'); var buttonwrap = section.append('div') .attr('class', 'modal-section buttons cf'); - var okbutton = buttonwrap.append('button') + buttonwrap.append('button') .attr('class', 'col2 action') .on('click.confirm', function() { modal.remove(); @@ -24553,7 +25730,7 @@ iD.ui.EntityEditor = function(context) { if (!arguments.length) return preset; if (_ !== preset) { preset = _; - reference = iD.ui.TagReference(preset.reference()) + reference = iD.ui.TagReference(preset.reference(context.geometry(id))) .showing(false); } return entityEditor; @@ -24647,15 +25824,18 @@ iD.ui.FeatureList = function(context) { } (geocodeResults || []).forEach(function(d) { - result.push({ - id: iD.Entity.id.fromOSM(d.osm_type, d.osm_id), - geometry: d.osm_type === 'relation' ? 'relation' : d.osm_type === 'way' ? 'line' : 'point', - type: (d.type.charAt(0).toUpperCase() + d.type.slice(1)).replace('_', ' '), - name: d.display_name, - extent: new iD.geo.Extent( - [parseFloat(d.boundingbox[3]), parseFloat(d.boundingbox[0])], - [parseFloat(d.boundingbox[2]), parseFloat(d.boundingbox[1])]) - }) + // https://github.com/systemed/iD/issues/1890 + if (d.osm_type && d.osm_id) { + result.push({ + id: iD.Entity.id.fromOSM(d.osm_type, d.osm_id), + geometry: d.osm_type === 'relation' ? 'relation' : d.osm_type === 'way' ? 'line' : 'point', + type: (d.type.charAt(0).toUpperCase() + d.type.slice(1)).replace('_', ' '), + name: d.display_name, + extent: new iD.geo.Extent( + [parseFloat(d.boundingbox[3]), parseFloat(d.boundingbox[0])], + [parseFloat(d.boundingbox[2]), parseFloat(d.boundingbox[1])]) + }); + } }); return result; @@ -24812,116 +25992,40 @@ iD.ui.Geolocate = function(map) { }; }; iD.ui.Help = function(context) { - var key = 'h'; - function help(selection) { - - var shown = false, pane; - - function setup() { - pane = context.container() - .select('.help-wrap') - .html(''); - - var toc = pane.append('ul') - .attr('class', 'toc'); - - function clickHelp(d, i) { - pane.property('scrollTop', 0); - doctitle.text(d.title); - body.html(d.html); - body.selectAll('a') - .attr('target', '_blank'); - menuItems.classed('selected', function(m) { - return m.title === d.title; - }); - - nav.html(''); - - if (i > 0) { - var prevLink = nav.append('a') - .attr('class', 'previous') - .on('click', function() { - clickHelp(docs[i - 1], i - 1); - }); - prevLink.append('span').attr('class', 'icon back blue'); - prevLink.append('span').text(docs[i - 1].title); - } - if (i < docs.length - 1) { - var nextLink = nav.append('a') - .attr('class', 'next') - .on('click', function() { - clickHelp(docs[i + 1], i + 1); - }); - nextLink.append('span').text(docs[i + 1].title); - nextLink.append('span').attr('class', 'icon forward blue'); - } - } - - var docKeys = [ - 'help.help', - 'help.editing_saving', - 'help.roads', - 'help.gps', - 'help.imagery', - 'help.addresses', - 'help.inspector', - 'help.buildings']; - - function one(f) { return function(x) { return f(x); }; } - var docs = docKeys.map(one(t)).map(function(text) { - return { - title: text.split('\n')[0].replace('#', '').trim(), - html: marked(text.split('\n').slice(1).join('\n')) - }; - }); - - var menuItems = toc.selectAll('li') - .data(docs) - .enter() - .append('li') - .append('a') - .text(function(d) { return d.title; }) - .on('click', clickHelp); - - toc.append('li') - .attr('class','walkthrough') - .append('a') - .text(t('splash.walkthrough')) - .on('click', function() { - d3.select(document.body).call(iD.ui.intro(context)); - setVisible(false); - }); + var docKeys = [ + 'help.help', + 'help.editing_saving', + 'help.roads', + 'help.gps', + 'help.imagery', + 'help.addresses', + 'help.inspector', + 'help.buildings', + 'help.relations']; + + var docs = docKeys.map(function(key) { + var text = t(key); + return { + title: text.split('\n')[0].replace('#', '').trim(), + html: marked(text.split('\n').slice(1).join('\n')) + }; + }); - var content = pane.append('div') - .attr('class', 'left-content'), - doctitle = content.append('h2') - .text(t('help.title')), - body = content.append('div') - .attr('class', 'body'), - nav = content.append('div') - .attr('class', 'nav'); + function help(selection) { + var shown = false; - clickHelp(docs[0], 0); + function hide() { + setVisible(false); } - function hide() { setVisible(false); } function toggle() { if (d3.event) d3.event.preventDefault(); tooltip.hide(button); setVisible(!button.classed('active')); } - function blockClick() { - pane.on('mousedown.help-inside', function() { - return d3.event.stopPropagation(); - }); - selection.on('mousedown.help-inside', function() { - return d3.event.stopPropagation(); - }); - } - function setVisible(show) { if (show !== shown) { button.classed('active', show); @@ -24931,8 +26035,7 @@ iD.ui.Help = function(context) { .style('right', '-500px') .transition() .duration(200) - .style('right', '0px') - .each('end', blockClick); + .style('right', '0px'); } else { pane.style('right', '0px') .transition() @@ -24941,11 +26044,47 @@ iD.ui.Help = function(context) { .each('end', function() { d3.select(this).style('display', 'none'); }); - pane.on('mousedown.help-inside', null); } } } + function clickHelp(d, i) { + pane.property('scrollTop', 0); + doctitle.text(d.title); + body.html(d.html); + body.selectAll('a') + .attr('target', '_blank'); + menuItems.classed('selected', function(m) { + return m.title === d.title; + }); + + nav.html(''); + + if (i > 0) { + var prevLink = nav.append('a') + .attr('class', 'previous') + .on('click', function() { + clickHelp(docs[i - 1], i - 1); + }); + prevLink.append('span').attr('class', 'icon back blue'); + prevLink.append('span').text(docs[i - 1].title); + } + if (i < docs.length - 1) { + var nextLink = nav.append('a') + .attr('class', 'next') + .on('click', function() { + clickHelp(docs[i + 1], i + 1); + }); + nextLink.append('span').text(docs[i + 1].title); + nextLink.append('span').attr('class', 'icon forward blue'); + } + } + + function clickWalkthrough() { + d3.select(document.body).call(iD.ui.intro(context)); + setVisible(false); + } + var tooltip = bootstrap.tooltip() .placement('left') .html(true) @@ -24959,14 +26098,53 @@ iD.ui.Help = function(context) { button.append('span') .attr('class', 'icon help light'); + var pane = context.container() + .select('.help-wrap'); + + var toc = pane.append('ul') + .attr('class', 'toc'); + + var menuItems = toc.selectAll('li') + .data(docs) + .enter() + .append('li') + .append('a') + .text(function(d) { return d.title; }) + .on('click', clickHelp); + + toc.append('li') + .attr('class','walkthrough') + .append('a') + .text(t('splash.walkthrough')) + .on('click', clickWalkthrough); + + var content = pane.append('div') + .attr('class', 'left-content'); + + var doctitle = content.append('h2') + .text(t('help.title')); + + var body = content.append('div') + .attr('class', 'body'); + + var nav = content.append('div') + .attr('class', 'nav'); + + clickHelp(docs[0], 0); + + var keybinding = d3.keybinding('help') + .on(key, toggle); + + d3.select(document) + .call(keybinding); + context.surface().on('mousedown.help-outside', hide); context.container().on('mousedown.b.help-outside', hide); - setup(); + pane.on('mousedown.help-inside', function() { + return d3.event.stopPropagation(); + }); - var keybinding = d3.keybinding('help'); - keybinding.on(key, toggle); - d3.select(document).call(keybinding); } return help; @@ -25080,21 +26258,25 @@ iD.ui.intro = function(context) { background = context.background().baseLayerSource(), opacity = d3.select('.background-layer').style('opacity'), loadedTiles = context.connection().loadedTiles(), - baseEntities = context.history().graph().base().entities; + baseEntities = context.history().graph().base().entities, + introGraph; // Load semi-real data used in intro context.connection().toggle(false).flush(); - context.history().save().reset(); - context.history().merge(iD.Graph().load(JSON.parse(iD.introGraph)).entities); + context.history().reset(); + + introGraph = JSON.parse(iD.introGraph); + for (var key in introGraph) { + introGraph[key] = iD.Entity(introGraph[key]); + } + context.history().merge(d3.values(iD.Graph().load(introGraph).entities)); context.background().bing(); // Block saving var savebutton = d3.select('#bar button.save'), save = savebutton.on('click'); savebutton.on('click', null); - - var beforeunload = window.onbeforeunload; - window.onbeforeunload = null; + context.inIntro(true); d3.select('.background-layer').style('opacity', 1); @@ -25123,11 +26305,11 @@ iD.ui.intro = function(context) { navwrap.remove(); d3.select('.background-layer').style('opacity', opacity); context.connection().toggle(true).flush().loadedTiles(loadedTiles); - context.history().reset().merge(baseEntities); + context.history().reset().merge(d3.values(baseEntities)); context.background().baseLayerSource(background); if (history) context.history().fromJSON(history); window.location.replace(hash); - window.onbeforeunload = beforeunload; + context.inIntro(false); d3.select('#bar button.save').on('click', save); }); @@ -25167,7 +26349,7 @@ iD.ui.intro = function(context) { }; iD.ui.intro.pointBox = function(point, context) { - var rect = context.surface().node().getBoundingClientRect(); + var rect = context.surfaceRect(); point = context.projection(point); return { left: point[0] + rect.left - 30, @@ -25179,7 +26361,7 @@ iD.ui.intro.pointBox = function(point, context) { iD.ui.intro.pad = function(box, padding, context) { if (box instanceof Array) { - var rect = context.surface().node().getBoundingClientRect(); + var rect = context.surfaceRect(); box = context.projection(box); box = { left: box[0] + rect.left, @@ -25337,7 +26519,7 @@ iD.ui.modal = function(selection, blocking) { .attr('class', 'modal fillL col6'); shaded.on('click.remove-modal', function() { - if (d3.event.target == this && !blocking) shaded.close(); + if (d3.event.target === this && !blocking) shaded.close(); }); modal.append('button') @@ -25410,12 +26592,12 @@ iD.ui.Modes = function(context) { context.on('enter.editor', function(entered) { buttons.classed('active', function(mode) { return entered.button === mode.button; }); context.container() - .classed("mode-" + entered.id, true); + .classed('mode-' + entered.id, true); }); context.on('exit.editor', function(exited) { context.container() - .classed("mode-" + exited.id, false); + .classed('mode-' + exited.id, false); }); var keybinding = d3.keybinding('mode-buttons'); @@ -25472,11 +26654,7 @@ iD.ui.preset = function(context) { field.input = iD.ui.preset[field.type](field, context) .on('change', event.change); - if (field.type === 'address' || - field.type === 'wikipedia' || - field.type === 'maxspeed') { - field.input.entity(entity); - } + if (field.input.entity) field.input.entity(entity); field.keys = field.keys || [field.key]; @@ -25502,6 +26680,20 @@ iD.ui.preset = function(context) { return t; }; + field.present = function() { + return _.any(field.keys, function(key) { + return tags[key]; + }); + }; + + field.remove = function() { + var t = {}; + field.keys.forEach(function(key) { + t[key] = undefined; + }); + return t; + }; + return field; } @@ -25554,21 +26746,35 @@ iD.ui.preset = function(context) { .attr('for', function(field) { return 'preset-input-' + field.id; }) .text(function(field) { return field.label(); }); - $label.append('button') - .attr('class', 'modified-icon minor') + var wrap = $label.append('div') + .attr('class', 'form-label-button-wrap'); + + wrap.append('button') + .attr('class', 'remove-icon') + .append('span').attr('class', 'icon delete'); + + wrap.append('button') + .attr('class', 'modified-icon') .attr('tabindex', -1) .append('div') .attr('class', 'icon undo'); // Update + $fields.select('.form-label-button-wrap .remove-icon') + .on('click', remove); + $fields.select('.modified-icon') .on('click', revert); $fields + .order() .classed('modified', function(field) { return field.modified(); }) + .classed('present', function(field) { + return field.present(); + }) .each(function(field) { var reference = iD.ui.TagReference({key: field.key}); @@ -25579,7 +26785,7 @@ iD.ui.preset = function(context) { d3.select(this) .call(field.input) .call(reference.body) - .select('.form-label') + .select('.form-label-button-wrap') .call(reference.button); field.input.tags(tags); @@ -25622,6 +26828,12 @@ iD.ui.preset = function(context) { d3.event.preventDefault(); event.change(field.revert()); } + + function remove(field) { + d3.event.stopPropagation(); + d3.event.preventDefault(); + event.change(field.remove()); + } } presets.preset = function(_) { @@ -25786,6 +26998,7 @@ iD.ui.PresetList = function(context) { list.call(drawList, results); } else { list.call(drawList, context.presets().defaults(geometry, 36)); + message.text(t('inspector.choose')); } } @@ -25817,7 +27030,7 @@ iD.ui.PresetList = function(context) { function drawList(list, presets) { var collection = presets.collection.map(function(preset) { - return preset.members ? CategoryItem(preset) : PresetItem(preset) + return preset.members ? CategoryItem(preset) : PresetItem(preset); }); var items = list.selectAll('.preset-list-item') @@ -25927,7 +27140,7 @@ iD.ui.PresetList = function(context) { }; item.preset = preset; - item.reference = iD.ui.TagReference(preset.reference()); + item.reference = iD.ui.TagReference(preset.reference(context.geometry(id))); return item; } @@ -25974,7 +27187,7 @@ iD.ui.RadialMenu = function(context, operations) { menu = selection.append('g') .attr('class', 'radial-menu') - .attr('transform', "translate(" + center + ")") + .attr('transform', 'translate(' + center + ')') .attr('opacity', 0); menu.transition() @@ -25989,7 +27202,7 @@ iD.ui.RadialMenu = function(context, operations) { .attr('class', 'radial-menu-background') .attr('d', 'M' + r * Math.sin(a0) + ',' + r * Math.cos(a0) + - ' A' + r + ',' + r + ' 0 0,0 ' + + ' A' + r + ',' + r + ' 0 ' + (operations.length > 5 ? '1' : '0') + ',0 ' + (r * Math.sin(a1) + 1e-3) + ',' + (r * Math.cos(a1) + 1e-3)) // Force positive-length path (#1305) .attr('stroke-width', 50) @@ -26008,6 +27221,7 @@ iD.ui.RadialMenu = function(context, operations) { .attr('r', 15) .classed('disabled', function(d) { return d.disabled(); }) .on('click', click) + .on('mousedown', mousedown) .on('mouseover', mouseover) .on('mouseout', mouseout); @@ -26020,19 +27234,39 @@ iD.ui.RadialMenu = function(context, operations) { .append('div') .attr('class', 'tooltip-inner radial-menu-tooltip'); + function mousedown() { + d3.event.stopPropagation(); // https://github.com/systemed/iD/issues/1869 + } + function mouseover(d, i) { - // Avoid getBoundingClientRect on SVG element; browser implementations - // differ: http://stackoverflow.com/questions/18153989/ - var rect = context.surface().node().parentNode.getBoundingClientRect(), + var rect = context.surfaceRect(), angle = a0 + i * a, - dx = rect.left - (angle < 0 ? 200 : 0), - dy = rect.top; + top = rect.top + (r + 25) * Math.cos(angle) + center[1] + 'px', + left = rect.left + (r + 25) * Math.sin(angle) + center[0] + 'px', + bottom = rect.height - (r + 25) * Math.cos(angle) - center[1] + 'px', + right = rect.width - (r + 25) * Math.sin(angle) - center[0] + 'px'; tooltip - .style('left', (r + 25) * Math.sin(angle) + dx + center[0] + 'px') - .style('top', (r + 25) * Math.cos(angle) + dy + center[1]+ 'px') + .style('top', null) + .style('left', null) + .style('bottom', null) + .style('right', null) .style('display', 'block') .html(iD.ui.tooltipHtml(d.tooltip(), d.keys[0])); + + if (i === 0) { + tooltip + .style('right', right) + .style('top', top); + } else if (i >= 4) { + tooltip + .style('left', left) + .style('bottom', bottom); + } else { + tooltip + .style('left', left) + .style('top', top); + } } function mouseout() { @@ -26064,6 +27298,7 @@ iD.ui.RawMemberEditor = function(context) { var id; function selectMember(d) { + d3.event.preventDefault(); context.enter(iD.modes.Select(context, [d.id])); } @@ -26120,7 +27355,8 @@ iD.ui.RawMemberEditor = function(context) { }); var $enter = $items.enter().append('li') - .attr('class', 'member-row form-field'); + .attr('class', 'member-row form-field') + .classed('member-incomplete', function(d) { return !d.member; }); $enter.each(function(d) { if (d.member) { @@ -26140,7 +27376,7 @@ iD.ui.RawMemberEditor = function(context) { } else { d3.select(this).append('label') - .attr('class', 'form-label member-incomplete') + .attr('class', 'form-label') .text(t('inspector.incomplete')); } }); @@ -26177,6 +27413,7 @@ iD.ui.RawMembershipEditor = function(context) { var id, showBlank; function selectRelation(d) { + d3.event.preventDefault(); context.enter(iD.modes.Select(context, [d.relation.id])); } @@ -26221,7 +27458,7 @@ iD.ui.RawMembershipEditor = function(context) { graph = context.graph(); context.intersects(context.extent()).forEach(function(entity) { - if (entity.type !== 'relation') + if (entity.type !== 'relation' || entity.id === id) return; var presetName = context.presets().match(entity, graph).name(), @@ -26249,7 +27486,7 @@ iD.ui.RawMembershipEditor = function(context) { if (member.id === entity.id) { memberships.push({relation: relation, member: member, index: index}); } - }) + }); }); selection.call(iD.ui.Disclosure() @@ -26609,12 +27846,12 @@ iD.ui.Restore = function(context) { introModal.append('div') .attr('class', 'modal-section') .append('h3') - .text(t('restore.heading')); + .text(t('restore.heading')); introModal.append('div') .attr('class','modal-section') .append('p') - .text(t('restore.description')); + .text(t('restore.description')); var buttonWrap = introModal.append('div') .attr('class', 'modal-actions cf'); @@ -26637,8 +27874,6 @@ iD.ui.Restore = function(context) { restore.node().focus(); }; - modal.select('button.close').attr('class','hide'); - }; iD.ui.Save = function(context) { var history = context.history(), @@ -26684,13 +27919,13 @@ iD.ui.Save = function(context) { var numChanges = 0; context.history().on('change.save', function() { - var _ = history.numChanges(); + var _ = history.difference().summary().length; if (_ === numChanges) return; numChanges = _; tooltip.title(iD.ui.tooltipHtml(t(numChanges > 0 ? - 'save.help' : 'save.no_changes'), key)) + 'save.help' : 'save.no_changes'), key)); button .classed('disabled', numChanges === 0) @@ -26706,6 +27941,75 @@ iD.ui.Save = function(context) { }); }; }; +iD.ui.SelectionList = function(context, selectedIDs) { + + function selectionList(selection) { + selection.classed('selection-list-pane', true); + + var header = selection.append('div') + .attr('class', 'header fillL cf'); + + header.append('h3') + .text(t('inspector.multiselect')); + + var listWrap = selection.append('div') + .attr('class', 'inspector-body'); + + var list = listWrap.append('div') + .attr('class', 'feature-list cf'); + + context.history().on('change.selection-list', drawList); + drawList(); + + function drawList() { + var entities = selectedIDs + .map(function(id) { return context.hasEntity(id); }) + .filter(function(entity) { return entity; }); + + var items = list.selectAll('.feature-list-item') + .data(entities, iD.Entity.key); + + var enter = items.enter().append('button') + .attr('class', 'feature-list-item') + .on('click', function(entity) { + context.enter(iD.modes.Select(context, [entity.id])); + }); + + // Enter + + var label = enter.append('div') + .attr('class', 'label'); + + label.append('span') + .attr('class', 'icon icon-pre-text'); + + label.append('span') + .attr('class', 'entity-type'); + + label.append('span') + .attr('class', 'entity-name'); + + // Update + + items.selectAll('.icon') + .attr('class', function(entity) { return context.geometry(entity.id) + ' icon icon-pre-text'; }); + + items.selectAll('.entity-type') + .text(function(entity) { return context.presets().match(entity, context.graph()).name(); }); + + items.selectAll('.entity-name') + .text(function(entity) { return iD.util.displayName(entity); }); + + // Exit + + items.exit() + .remove(); + } + } + + return selectionList; + +}; iD.ui.Sidebar = function(context) { var inspector = iD.ui.Inspector(context), current; @@ -26940,42 +28244,40 @@ iD.ui.Success = function(context) { .attr('class', 'fr') .append('span') .attr('class', 'icon close') - .on('click', function() { event.cancel(success) }); + .on('click', function() { event.cancel(success); }); header.append('h3') .text(t('success.just_edited')); var body = selection.append('div') - .attr('class', 'body save-success'); + .attr('class', 'body save-success fillL'); body.append('p') .html(t('success.help_html')); + var changesetURL = context.connection().changesetURL(changeset.id); + body.append('a') .attr('class', 'button col12 osm') .attr('target', '_blank') - .attr('href', function() { - return context.connection().changesetURL(changeset.id); - }) + .attr('href', changesetURL) .text(t('success.view_on_osm')); - body.append('a') - .attr('class', 'button col12 twitter') - .attr('target', '_blank') - .attr('href', function() { - return 'https://twitter.com/intent/tweet?source=webclient&text=' + - encodeURIComponent(message); - }) - .text(t('success.tweet')); + var sharing = { + facebook: 'https://facebook.com/sharer/sharer.php?u=' + encodeURIComponent(changesetURL), + twitter: 'https://twitter.com/intent/tweet?source=webclient&text=' + encodeURIComponent(message), + google: 'https://plus.google.com/share?url=' + encodeURIComponent(changesetURL) + }; - body.append('a') - .attr('class', 'button col12 facebook') + body.selectAll('.button.social') + .data(d3.entries(sharing)) + .enter().append('a') + .attr('class', function(d) { return 'button social col4 ' + d.key; }) .attr('target', '_blank') - .attr('href', function() { - return 'https://facebook.com/sharer/sharer.php?u=' + - encodeURIComponent(context.connection().changesetURL(changeset.id)); - }) - .text(t('success.facebook')); + .attr('href', function(d) { return d.value; }) + .call(bootstrap.tooltip() + .title(function(d) { return t('success.' + d.key); }) + .placement('bottom')); } success.changeset = function(_) { @@ -27039,7 +28341,7 @@ iD.ui.TagReference = function(tag) { body .append('img') .attr('class', 'wiki-image') - .attr('src', docs.image.thumb_url_prefix + "100" + docs.image.thumb_url_suffix) + .attr('src', docs.image.thumb_url_prefix + '100' + docs.image.thumb_url_suffix) .on('load', function() { show(); }) .on('error', function() { d3.select(this).remove(); show(); }); } else { @@ -27092,7 +28394,7 @@ iD.ui.TagReference = function(tag) { var enter = button.enter().append('button') .attr('tabindex', -1) - .attr('class', 'tag-reference-button minor'); + .attr('class', 'tag-reference-button'); enter.append('span') .attr('class', 'icon inspect'); @@ -27283,9 +28585,8 @@ iD.ui.Zoom = function(context) { .call(keybinding); }; }; -iD.ui.preset.access = function(field, context) { +iD.ui.preset.access = function(field) { var event = d3.dispatch('change'), - entity, items; function access(selection) { @@ -27313,7 +28614,6 @@ iD.ui.preset.access = function(field, context) { .attr('class', 'col6 preset-input-access-wrap') .append('input') .attr('type', 'text') - .attr('placeholder', field.placeholder()) .attr('class', 'preset-input-access') .attr('id', function(d) { return 'preset-input-access-' + d; }) .each(function(d) { @@ -27338,7 +28638,7 @@ iD.ui.preset.access = function(field, context) { access.options = function(type) { var options = ['no', 'permissive', 'private', 'designated', 'destination']; - if (type != 'access') { + if (type !== 'access') { options.unshift('yes'); } @@ -27350,15 +28650,84 @@ iD.ui.preset.access = function(field, context) { }); }; - access.entity = function(_) { - if (!arguments.length) return entity; - entity = _; - return access; + var placeholders = { + footway: { + foot: 'yes', + motor_vehicle: 'no' + }, + steps: { + foot: 'yes', + motor_vehicle: 'no' + }, + pedestrian: { + foot: 'yes', + motor_vehicle: 'no' + }, + cycleway: { + bicycle: 'yes', + motor_vehicle: 'no' + }, + bridleway: { + horse: 'yes' + }, + path: { + motor_vehicle: 'no' + }, + motorway: { + motor_vehicle: 'yes' + }, + trunk: { + motor_vehicle: 'yes' + }, + primary: { + motor_vehicle: 'yes' + }, + secondary: { + motor_vehicle: 'yes' + }, + tertiary: { + motor_vehicle: 'yes' + }, + residential: { + motor_vehicle: 'yes' + }, + unclassified: { + motor_vehicle: 'yes' + }, + service: { + motor_vehicle: 'yes' + }, + motorway_link: { + motor_vehicle: 'yes' + }, + trunk_link: { + motor_vehicle: 'yes' + }, + primary_link: { + motor_vehicle: 'yes' + }, + secondary_link: { + motor_vehicle: 'yes' + }, + tertiary_link: { + motor_vehicle: 'yes' + } }; access.tags = function(tags) { items.selectAll('.preset-input-access') - .value(function(d) { return tags[d] || ''; }); + .value(function(d) { return tags[d] || ''; }) + .attr('placeholder', function() { + return tags.access ? tags.access : field.placeholder(); + }); + + items.selectAll('#preset-input-access-access') + .attr('placeholder', 'yes'); + + _.forEach(placeholders[tags.highway], function(value, key) { + items.selectAll('#preset-input-access-' + key) + .attr('placeholder', value); + }); }; access.focus = function() { @@ -27378,7 +28747,6 @@ iD.ui.preset.address = function(field, context) { entity; function getStreets() { - var extent = entity.extent(context.graph()), l = extent.center(), box = iD.geo.Extent(l).padByMeters(200); @@ -27404,6 +28772,62 @@ iD.ui.preset.address = function(field, context) { } } + function getCities() { + var extent = entity.extent(context.graph()), + l = extent.center(), + box = iD.geo.Extent(l).padByMeters(200); + + return context.intersects(box) + .filter(isAddressable) + .map(function(d) { + return { + title: d.tags['addr:city'] || d.tags.name, + value: d.tags['addr:city'] || d.tags.name, + dist: iD.geo.sphericalDistance(d.extent(context.graph()).center(), l) + }; + }).sort(function(a, b) { + return a.dist - b.dist; + }); + + function isAddressable(d) { + if (d.tags.name && + (d.tags.admin_level === '8' || d.tags.border_type === 'city')) + return true; + + if (d.tags.place && d.tags.name && ( + d.tags.place === 'city' || + d.tags.place === 'town' || + d.tags.place === 'village')) + return true; + + if (d.tags['addr:city']) return true; + + return false; + } + } + + function getPostCodes() { + var extent = entity.extent(context.graph()), + l = extent.center(), + box = iD.geo.Extent(l).padByMeters(200); + + return context.intersects(box) + .filter(isAddressable) + .map(function(d) { + return { + title: d.tags['addr:postcode'], + value: d.tags['addr:postcode'], + dist: iD.geo.sphericalDistance(d.extent(context.graph()).center(), l) + }; + }).sort(function(a, b) { + return a.dist - b.dist; + }); + + function isAddressable(d) { + return d.tags['addr:postcode']; + } + } + function address(selection) { var wrap = selection.selectAll('.preset-input-wrap') .data([0]); @@ -27456,6 +28880,18 @@ iD.ui.preset.address = function(field, context) { .fetcher(function(value, callback) { callback(getStreets()); })); + + city + .call(d3.combobox() + .fetcher(function(value, callback) { + callback(getCities()); + })); + + postcode + .call(d3.combobox() + .fetcher(function(value, callback) { + callback(getPostCodes()); + })); } function change() { @@ -27529,7 +28965,7 @@ iD.ui.preset.check = function(field) { value = tags[field.key]; box.property('indeterminate', !value); box.property('checked', value === 'yes'); - text.text(value || t('inspector.unknown')); + text.text(value ? t('inspector.check.' + value, {default: value}) : t('inspector.unknown')); label.classed('set', !!value); }; @@ -27539,7 +28975,8 @@ iD.ui.preset.check = function(field) { return d3.rebind(check, event, 'on'); }; -iD.ui.preset.combo = function(field) { +iD.ui.preset.combo = +iD.ui.preset.typeCombo = function(field) { var event = d3.dispatch('change'), input; @@ -27584,13 +29021,18 @@ iD.ui.preset.combo = function(field) { } function change() { + var value = input.value().replace(' ', '_'); + if (field.type === 'typeCombo' && !value) value = 'yes'; + var t = {}; - t[field.key] = input.value().replace(' ', '_') || undefined; + t[field.key] = value || undefined; event.change(t); } combo.tags = function(tags) { - input.value(tags[field.key] || ''); + var value = tags[field.key] || ''; + if (field.type === 'typeCombo' && value === 'yes') value = ''; + input.value(value); }; combo.focus = function() { @@ -27651,7 +29093,7 @@ iD.ui.preset.url = function(field) { .on('blur', change) .on('change', change); - if (field.type == 'number') { + if (field.type === 'number') { input.attr('type', 'text'); var spinControl = selection.selectAll('.spin-control') @@ -27698,7 +29140,8 @@ iD.ui.preset.localized = function(field, context) { var event = d3.dispatch('change'), wikipedia = iD.wikipedia(), - input, localizedInputs, wikiTitles; + input, localizedInputs, wikiTitles, + entity; function i(selection) { input = selection.selectAll('.localized-main') @@ -27714,6 +29157,13 @@ iD.ui.preset.localized = function(field, context) { .on('blur', change) .on('change', change); + if (field.id === 'name') { + var preset = context.presets().match(entity, context.graph()); + input.call(d3.combobox().fetcher( + iD.util.SuggestNames(preset, iD.data.suggestions) + )); + } + var translateButton = selection.selectAll('.localized-add') .data([0]); @@ -27751,35 +29201,38 @@ iD.ui.preset.localized = function(field, context) { function key(lang) { return field.key + ':' + lang; } function changeLang(d) { - var value = d3.select(this).value(), + var lang = d3.select(this).value(), t = {}, language = _.find(iD.data.wikipedia, function(d) { - return d[0].toLowerCase() === value.toLowerCase() || - d[1].toLowerCase() === value.toLowerCase(); + return d[0].toLowerCase() === lang.toLowerCase() || + d[1].toLowerCase() === lang.toLowerCase(); }); - if (language) value = language[2]; + if (language) lang = language[2]; - if (d.lang) { - t[key(d.lang)] = ''; + if (d.lang && d.lang !== lang) { + t[key(d.lang)] = undefined; } - if (d.value) { - t[key(value)] = d.value; - } else if (wikiTitles && wikiTitles[d.lang]) { - t[key(value)] = wikiTitles[d.lang]; + var value = d3.select(this.parentNode) + .selectAll('.localized-value') + .value(); + + if (lang && value) { + t[key(lang)] = value; + } else if (lang && wikiTitles && wikiTitles[d.lang]) { + t[key(lang)] = wikiTitles[d.lang]; } + d.lang = lang; event.change(t); - - d.lang = value; } function changeValue(d) { + if (!d.lang) return; var t = {}; - t[key(d.lang)] = d3.select(this).value() || ''; + t[key(d.lang)] = d3.select(this).value() || undefined; event.change(t); - } function fetcher(value, cb) { @@ -27801,16 +29254,33 @@ iD.ui.preset.localized = function(field, context) { var innerWrap = wraps.enter() .insert('div', ':first-child'); - innerWrap.attr('class', 'entry') - .each(function(d) { + innerWrap.attr('class', 'entry') + .each(function() { var wrap = d3.select(this); var langcombo = d3.combobox().fetcher(fetcher); - wrap.append('label') + var label = wrap.append('label') .attr('class','form-label') .text(t('translate.localized_translation_label')) .attr('for','localized-lang'); + label.append('button') + .attr('class', 'minor remove') + .on('click', function(d){ + d3.event.preventDefault(); + var t = {}; + t[key(d.lang)] = undefined; + event.change(t); + d3.select(this.parentNode.parentNode) + .style('top','0') + .style('max-height','240px') + .transition() + .style('opacity', '0') + .style('max-height','0px') + .remove(); + }) + .append('span').attr('class', 'icon delete'); + wrap.append('input') .attr('class', 'localized-lang') .attr('type', 'text') @@ -27825,43 +29295,22 @@ iD.ui.preset.localized = function(field, context) { .attr('type', 'text') .attr('placeholder', t('translate.localized_translation_name')) .attr('class', 'localized-value'); - - wrap.append('button') - .attr('class', 'minor button-input-action remove') - .on('click', function(d) { - d3.event.preventDefault(); - var t = {}; - t[key(d.lang)] = undefined; - event.change(t); - d3.select(this.parentNode) - .style('top','0') - .style('max-height','240px') - .transition() - .style('opacity', '0') - .style('max-height','0px') - .remove(); - }) - .append('span').attr('class', 'icon delete'); - }); - innerWrap.transition() - .style('margin-top','0px') + innerWrap + .style('margin-top', '0px') .style('max-height', '0px') - .style('padding', '0px') .style('opacity', '0') - .style('border-width', '0px') .transition() .duration(200) - .style('margin-top','10px') - .style('border-width', '1px') - .style('padding', '10px') + .style('margin-top', '10px') .style('max-height', '240px') .style('opacity', '1') - .each('end', function(d) { - d3.select(this).style('max-height', ''); - d3.select(this).style('overflow', 'visible'); - });; + .each('end', function() { + d3.select(this) + .style('max-height', '') + .style('overflow', 'visible'); + }); wraps.exit() .transition() @@ -27871,16 +29320,16 @@ iD.ui.preset.localized = function(field, context) { .style('top','-10px') .remove(); - selection.selectAll('.entry').select('.localized-lang').value(function(d) { - var lang = _.find(iD.data.wikipedia, function(lang) { - return lang[2] === d.lang; + var entry = selection.selectAll('.entry'); + + entry.select('.localized-lang') + .value(function(d) { + var lang = _.find(iD.data.wikipedia, function(lang) { return lang[2] === d.lang; }); + return lang ? lang[1] : d.lang; }); - return lang ? lang[1] : d.lang; - }); - selection.selectAll('.entry').select('.localized-value').value(function(d) { - return d.value; - }); + entry.select('.localized-value') + .value(function(d) { return d.value; }); } i.tags = function(tags) { @@ -27910,7 +29359,11 @@ iD.ui.preset.localized = function(field, context) { }; i.focus = function() { - title.node().focus(); + input.node().focus(); + }; + + i.entity = function(_) { + entity = _; }; return d3.rebind(i, event, 'on'); @@ -28029,7 +29482,7 @@ iD.ui.preset.maxspeed = function(field, context) { iD.ui.preset.radio = function(field) { var event = d3.dispatch('change'), - labels, radios; + labels, radios, placeholder; function radio(selection) { selection.classed('preset-radio', true); @@ -28040,6 +29493,11 @@ iD.ui.preset.radio = function(field) { var buttonWrap = wrap.enter().append('div') .attr('class', 'preset-input-wrap toggle-list'); + buttonWrap.append('span') + .attr('class', 'placeholder'); + + placeholder = selection.selectAll('.placeholder'); + labels = wrap.selectAll('label') .data(field.options || field.keys); @@ -28056,29 +29514,6 @@ iD.ui.preset.radio = function(field) { radios = labels.selectAll('input') .on('change', change); - - buttonWrap.append('span') - .attr('class', 'placeholder') - .text(field.placeholder()); - - var remove = wrap.selectAll('label.remove') - .data([0]); - - var removeButton = remove.enter().append('label') - .attr('class', 'remove'); - - removeButton.append('span') - .attr('class', 'icon remove'); - - removeButton.append('span') - .text(t('inspector.remove')); - - remove - .on('click', function() { - d3.event.preventDefault(); - radios.property('checked', false); - change(); - }); } function change() { @@ -28106,6 +29541,12 @@ iD.ui.preset.radio = function(field) { labels.classed('active', checked); radios.property('checked', checked); + var selection = radios.filter(function() { return this.checked; }); + if (selection.empty()) { + placeholder.text(t('inspector.none')); + } else { + placeholder.text(selection.attr('value')); + } }; radio.focus = function() { @@ -28153,7 +29594,6 @@ iD.ui.preset.wikipedia = function(field, context) { var event = d3.dispatch('change'), wikipedia = iD.wikipedia(), - language = iD.data.wikipedia[0], link, entity, lang, title; function i(selection) { @@ -28177,7 +29617,7 @@ iD.ui.preset.wikipedia = function(field, context) { if (!value) value = context.entity(entity.id).tags.name || ''; var searchfn = value.length > 7 ? wikipedia.search : wikipedia.suggestions; - searchfn(language && language[2], value, function(query, data) { + searchfn(language()[2], value, function(query, data) { cb(data.map(function(d) { return { value: d }; })); @@ -28189,7 +29629,8 @@ iD.ui.preset.wikipedia = function(field, context) { lang.enter().append('input') .attr('type', 'text') - .attr('class', 'wiki-lang'); + .attr('class', 'wiki-lang') + .value('English'); lang .on('blur', changeLang) @@ -28219,63 +29660,53 @@ iD.ui.preset.wikipedia = function(field, context) { .attr('class', 'icon out-link'); } - function changeLang() { + function language() { var value = lang.value().toLowerCase(); - language = _.find(iD.data.wikipedia, function(d) { + return _.find(iD.data.wikipedia, function(d) { return d[0].toLowerCase() === value || d[1].toLowerCase() === value || d[2].toLowerCase() === value; }) || iD.data.wikipedia[0]; + } - if (value !== language[0]) { - lang.value(language[1]); - } - + function changeLang() { + lang.value(language()[1]); change(); } function change() { - var t = {}; + var value = title.value(), + m = value.match(/https?:\/\/([a-z]+)\.wikipedia\.org\/wiki\/(.+)/), + l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; }); - var value = title.value(); - - var m = value.match('http://([a-z]+)\\.wikipedia.org/wiki/(.*)'), - newlanguage = m && m[1] && m[2] && _.find(iD.data.wikipedia, function(d) { - return m[1] === d[2]; - }); - - if (newlanguage) { + if (l) { // Normalize title http://www.mediawiki.org/wiki/API:Query#Title_normalization value = m[2].replace(/_/g, ' '); value = value.slice(0, 1).toUpperCase() + value.slice(1); - language = newlanguage; - lang.value(language[0]); + lang.value(l[1]); + title.value(value); } - t[field.key] = value ? language[2] + ':' + value : undefined; + var t = {}; + t[field.key] = value ? language()[2] + ':' + value : undefined; event.change(t); - link.attr('href', 'http://' + language[2] + '.wikipedia.org/wiki/' + (value || '')); } i.tags = function(tags) { - var m = tags[field.key] ? tags[field.key].match(/([^:]+):(.+)/) : null; - - var language = m && m[1] && m[2] && _.find(iD.data.wikipedia, function(d) { - return m[1] === d[2]; - }); + var value = tags[field.key] || '', + m = value.match(/([^:]+):(.+)/), + l = m && _.find(iD.data.wikipedia, function(d) { return m[1] === d[2]; }); // value in correct format - if (language) { - lang.value(language[1]); + if (l) { + lang.value(l[1]); title.value(m[2]); link.attr('href', 'http://' + m[1] + '.wikipedia.org/wiki/' + m[2]); // unrecognized value format } else { - lang.value('English'); - title.value(tags[field.key] || ''); - language = iD.data.wikipedia[0]; - link.attr('href', 'http://en.wikipedia.org/wiki/Special:Search?search=' + tags[field.key]); + title.value(value); + link.attr('href', 'http://en.wikipedia.org/wiki/Special:Search?search=' + value); } }; @@ -28383,10 +29814,6 @@ iD.ui.intro.line = function(context, reveal) { title: 'intro.lines.title' }; - function one(target, e, f) { - d3.selection.prototype.one.call(target, e, f); - } - function timeout(f, t) { timeouts.push(window.setTimeout(f, t)); } @@ -28395,11 +29822,11 @@ iD.ui.intro.line = function(context, reveal) { var centroid = [-85.62830, 41.95699]; var midpoint = [-85.62975395449628, 41.95787501510204]; - var start = [-85.6297754121684, 41.9583158176903]; + var start = [-85.6297754121684, 41.95805253325314]; var intersection = [-85.62974496187628, 41.95742515554585]; context.map().centerZoom(start, 18); - reveal('button.add-line', t('intro.lines.add'), {tooltipClass: 'intro-areas-add'}); + reveal('button.add-line', t('intro.lines.add'), {tooltipClass: 'intro-lines-add'}); context.on('enter.intro', addLine); @@ -28437,7 +29864,7 @@ iD.ui.intro.line = function(context, reveal) { // ended line before creating intersection function retry(mode) { if (mode.id !== 'select') return; - var pointBox = iD.ui.intro.pad(intersection, 30); + var pointBox = iD.ui.intro.pad(intersection, 30, context); reveal(pointBox, t('intro.lines.restart')); timeout(function() { context.replace(iD.actions.DeleteMultiple(mode.selectedIDs())); @@ -28471,6 +29898,10 @@ iD.ui.intro.line = function(context, reveal) { context.on('enter.intro', null); d3.select('#curtain').style('pointer-events', 'all'); + presetCategory(); + } + + function presetCategory() { timeout(function() { d3.select('#curtain').style('pointer-events', 'none'); var road = d3.select('.preset-category-road .preset-list-button'); @@ -28483,9 +29914,20 @@ iD.ui.intro.line = function(context, reveal) { timeout(function() { var grid = d3.select('.subgrid'); reveal(grid.node(), t('intro.lines.residential')); + grid.selectAll(':not(.preset-highway-residential) .preset-list-button') + .one('click.intro', retryPreset); grid.selectAll('.preset-highway-residential .preset-list-button') .one('click.intro', roadDetails); - }, 200); + }, 500); + } + + // selected wrong road type + function retryPreset() { + timeout(function() { + var preset = d3.select('.entity-editor-pane .preset-list-button'); + reveal(preset.node(), t('intro.lines.wrong_preset')); + preset.one('click.intro', presetCategory); + }, 500); } function roadDetails() { @@ -28531,7 +29973,7 @@ iD.ui.intro.navigation = function(context, reveal) { step.enter = function() { - var rect = context.surface().node().getBoundingClientRect(), + var rect = context.surfaceRect(), map = { left: rect.left + 10, top: rect.top + 70, @@ -29076,14 +30518,17 @@ iD.presets.Preset = function(id, preset, fields) { return Object.keys(preset.tags).length === 0; }; - preset.reference = function() { - var reference = {key: Object.keys(preset.tags)[0]}; + preset.reference = function(geometry) { + var key = Object.keys(preset.tags)[0], + value = preset.tags[key]; - if (preset.tags[reference.key] !== '*') { - reference.value = preset.tags[reference.key]; + if (geometry === 'relation' && key === 'type') { + return { rtype: value }; + } else if (value === '*') { + return { key: key }; + } else { + return { key: key, value: value }; } - - return reference; }; var removeTags = preset.removeTags || preset.tags; @@ -29100,12 +30545,16 @@ iD.presets.Preset = function(id, preset, fields) { return tags; }; - var applyTags = preset.applyTags || preset.tags; + var applyTags = preset.addTags || preset.tags; preset.applyTags = function(tags, geometry) { tags = _.clone(tags); for (var k in applyTags) { - if (applyTags[k] !== '*') tags[k] = applyTags[k]; + if (applyTags[k] === '*') { + tags[k] = 'yes'; + } else { + tags[k] = applyTags[k]; + } } for (var f in preset.fields) { @@ -29121,7 +30570,7 @@ iD.presets.Preset = function(id, preset, fields) { return preset; }; iD.validate = function(changes, graph) { - var warnings = [], change; + var warnings = []; // https://github.com/openstreetmap/josm/blob/mirror/src/org/ // openstreetmap/josm/data/validation/tests/UnclosedWays.java#L80 @@ -29144,20 +30593,16 @@ iD.validate = function(changes, graph) { } for (var i = 0; i < changes.created.length; i++) { - change = changes.created[i]; + var change = changes.created[i], + geometry = change.geometry(graph); - if (change.geometry(graph) === 'point' && _.isEmpty(change.tags)) { + if ((geometry === 'point' || geometry === 'line' || geometry === 'area') && !change.isUsed(graph)) { warnings.push({ - message: t('validations.untagged_point'), + message: t('validations.untagged_' + geometry), entity: change }); } - if (change.geometry(graph) === 'line' && _.isEmpty(change.tags) && - graph.parentRelations(change).length === 0) { - warnings.push({ message: t('validations.untagged_line'), entity: change }); - } - var deprecatedTags = change.deprecatedTags(); if (!_.isEmpty(deprecatedTags)) { warnings.push({ @@ -29166,11 +30611,7 @@ iD.validate = function(changes, graph) { }), entity: change }); } - if (change.geometry(graph) === 'area' && _.isEmpty(change.tags)) { - warnings.push({ message: t('validations.untagged_area'), entity: change }); - } - - if (change.geometry(graph) === 'line' && tagSuggestsArea(change)) { + if (geometry === 'line' && tagSuggestsArea(change)) { warnings.push({ message: t('validations.tag_suggests_area', {tag: tagSuggestsArea(change)}), entity: change @@ -29178,8 +30619,9 @@ iD.validate = function(changes, graph) { } } - return warnings.length ? [warnings] : []; + return warnings; }; +/* jshint ignore:start */ })(); window.locale = { _current: 'en' }; @@ -29329,6 +30771,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "discarded": [ "created_by", + "odbl", + "odbl:note", "tiger:upload_uuid", "tiger:tlid", "tiger:source", @@ -29336,8 +30780,30 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "geobase:datasetName", "geobase:uuid", "sub_sea:type", - "odbl", - "odbl:note", + "KSJ2:ADS", + "KSJ2:ARE", + "KSJ2:AdminArea", + "KSJ2:COP_label", + "KSJ2:DFD", + "KSJ2:INT", + "KSJ2:INT_label", + "KSJ2:LOC", + "KSJ2:LPN", + "KSJ2:OPC", + "KSJ2:PubFacAdmin", + "KSJ2:RAC", + "KSJ2:RAC_label", + "KSJ2:RIC", + "KSJ2:RIN", + "KSJ2:WSC", + "KSJ2:coordinate", + "KSJ2:curve_id", + "KSJ2:curve_type", + "KSJ2:filename", + "KSJ2:lake_id", + "KSJ2:lat", + "KSJ2:long", + "KSJ2:river_id", "yh:LINE_NAME", "yh:LINE_NUM", "yh:STRUCTURE", @@ -29348,660 +30814,24341 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "imagery": [ { - "name": "Bing aerial imagery", - "template": "http://ecn.t{t}.tiles.virtualearth.net/tiles/a{u}.jpeg?g=587&mkt=en-gb&n=z", - "description": "Satellite imagery.", - "scaleExtent": [ - 0, - 20 - ], - "subdomains": [ - "0", - "1", - "2", - "3" - ], - "default": "yes", - "sourcetag": "Bing", - "logo": "bing_maps.png", - "logo_url": "http://www.bing.com/maps", - "terms_url": "http://opengeodata.org/microsoft-imagery-details" + "name": "7th Series (OS7)", + "type": "tms", + "template": "http://ooc.openstreetmap.org/os7/{zoom}/{x}/{y}.jpg", + "polygon": [ + [ + [ + -9, + 49.8 + ], + [ + -9, + 61.1 + ], + [ + 1.9, + 61.1 + ], + [ + 1.9, + 49.8 + ], + [ + -9, + 49.8 + ] + ] + ] }, { - "name": "MapBox Satellite", - "template": "http://{t}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/{z}/{x}/{y}.png", - "description": "Satellite and aerial imagery.", - "scaleExtent": [ - 0, - 16 - ], - "subdomains": [ - "a", - "b", - "c" + "name": "AGRI black-and-white 2.5m", + "type": "tms", + "template": "http://agri.openstreetmap.org/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + 112.28778, + -28.784589 + ], + [ + 112.71488, + -31.13894 + ], + [ + 114.11263, + -34.178287 + ], + [ + 113.60788, + -37.39012 + ], + [ + 117.17992, + -37.451794 + ], + [ + 119.31538, + -37.42096 + ], + [ + 121.72262, + -36.708394 + ], + [ + 123.81925, + -35.76893 + ], + [ + 125.9547, + -34.3066 + ], + [ + 127.97368, + -33.727398 + ], + [ + 130.07031, + -33.24166 + ], + [ + 130.10913, + -33.888704 + ], + [ + 131.00214, + -34.049705 + ], + [ + 131.0798, + -34.72257 + ], + [ + 132.28342, + -35.39 + ], + [ + 134.18591, + -35.61126 + ], + [ + 133.8753, + -37.1119 + ], + [ + 134.8459, + -37.6365 + ], + [ + 139.7769, + -37.82075 + ], + [ + 139.93223, + -39.4283 + ], + [ + 141.6017, + -39.8767 + ], + [ + 142.3783, + -39.368294 + ], + [ + 142.3783, + -40.64702 + ], + [ + 142.49478, + -42.074874 + ], + [ + 144.009, + -44.060127 + ], + [ + 147.23161, + -44.03222 + ], + [ + 149.05645, + -42.534313 + ], + [ + 149.52237, + -40.99959 + ], + [ + 149.9494, + -40.852921 + ], + [ + 150.8036, + -38.09627 + ], + [ + 151.81313, + -38.12682 + ], + [ + 156.20052, + -22.667706 + ], + [ + 156.20052, + -20.10109 + ], + [ + 156.62761, + -17.417627 + ], + [ + 155.26869, + -17.19521 + ], + [ + 154.14272, + -19.51662 + ], + [ + 153.5215, + -18.34139 + ], + [ + 153.05558, + -16.5636 + ], + [ + 152.78379, + -15.256768 + ], + [ + 152.27905, + -13.4135 + ], + [ + 151.3472, + -12.391767 + ], + [ + 149.48354, + -12.05024 + ], + [ + 146.9598, + -9.992408 + ], + [ + 135.9719, + -9.992408 + ], + [ + 130.3032, + -10.33636 + ], + [ + 128.09016, + -12.164136 + ], + [ + 125.91588, + -12.315912 + ], + [ + 124.3239, + -11.860326 + ], + [ + 122.03323, + -11.974295 + ], + [ + 118.26706, + -16.9353 + ], + [ + 115.93747, + -19.11357 + ], + [ + 114.0738, + -21.11863 + ], + [ + 113.49141, + -22.596033 + ], + [ + 112.28778, + -28.784589 + ] + ] ], - "terms_url": "http://mapbox.com/tos/" + "terms_text": "AGRI" }, { - "name": "OpenStreetMap", - "template": "http://{t}.tile.openstreetmap.org/{z}/{x}/{y}.png", - "description": "The default OpenStreetMap layer.", + "name": "Bing aerial imagery", + "type": "bing", + "description": "Satellite and aerial imagery.", + "template": "http://www.bing.com/maps/", "scaleExtent": [ 0, - 18 + 22 ], - "subdomains": [ - "a", - "b", - "c" - ] + "id": "Bing", + "default": true }, { - "name": "TIGER 2012 Roads Overlay", - "template": "http://{t}.tile.openstreetmap.us/tiger2012_roads_expanded/{z}/{x}/{y}.png", - "sourcetag": "TIGER 2012", - "overlay": true, + "name": "British Columbia Mosaic", + "type": "tms", + "template": "http://{switch:a,b,c,d}.imagery.paulnorman.ca/tiles/bc_mosaic/{zoom}/{x}/{y}.png", "scaleExtent": [ - 16, - 19 - ], - "subdomains": [ - "a", - "b", - "c" + 9, + 20 ], - "extents": [ + "polygon": [ [ [ - -124.81, - 24.055 + -123.3176032, + 49.3272567 ], [ - -66.865, - 49.386 - ] - ], - [ + -123.4405258, + 49.3268222 + ], [ - -179.754, - 50.858 + -123.440717, + 49.3384429 ], [ - -129.899, - 71.463 - ] - ], - [ + -123.4398375, + 49.3430357 + ], [ - -174.46, - 18.702 + -123.4401258, + 49.3435398 ], [ - -154.516, - 26.501 - ] - ] - ] - }, - { - "name": "USGS Topographic Maps", - "template": "http://{t}.tile.openstreetmap.us/usgs_scanned_topos/{z}/{x}/{y}.png", - "subdomains": [ - "a", - "b", - "c" - ], - "extents": [ - [ + -123.4401106, + 49.3439946 + ], [ - -125.991, - 24.005 + -123.4406265, + 49.3444493 ], [ - -65.988, - 50.009 - ] - ], - [ + -123.4404747, + 49.3455762 + ], [ - -160.579, - 18.902 + -123.4397768, + 49.3460606 ], [ - -154.793, - 22.508 - ] - ], - [ + -123.4389726, + 49.3461298 + ], [ - -178.001, - 51.255 + -123.4372904, + 49.3567236 ], [ - -130.004, - 71.999 - ] - ] - ] - }, - { - "name": "USGS Large Scale Aerial Imagery", - "template": "http://{t}.tile.openstreetmap.us/usgs_large_scale/{z}/{x}/{y}.jpg", - "subdomains": [ - "a", - "b", - "c" - ], - "extents": [ - [ + -123.4374774, + 49.3710843 + ], [ - -124.819, - 24.496 + -123.4335292, + 49.3709446 ], [ - -66.931, - 49.443 - ] - ] - ] - }, - { - "name": "British Columbia bc_mosaic", - "template": "http://{t}.imagery.paulnorman.ca/tiles/bc_mosaic/{z}/{x}/{y}.png", - "subdomains": [ - "a", - "b", - "c", - "d" - ], - "extents": [ - [ + -123.4330357, + 49.373725 + ], [ - -123.441, - 48.995 + -123.4332717, + 49.3751221 ], [ - -121.346, - 50.426 - ] - ] - ], - "sourcetag": "bc_mosaic", - "terms_url": "http://imagery.paulnorman.ca/tiles/about.html" - }, - { - "name": "OS OpenData Streetview", - "template": "http://os.openstreetmap.org/sv/{z}/{x}/{y}.png", - "extents": [ - [ + -123.4322847, + 49.3761001 + ], [ - -8.72, - 49.86 + -123.4317482, + 49.3791736 ], [ - 1.84, - 60.92 - ] - ] - ], - "sourcetag": "OS_OpenData_StreetView" - }, - { - "name": "OS OpenData Locator", - "template": "http://tiles.itoworld.com/os_locator/{z}/{x}/{y}.png", - "extents": [ - [ + -123.4314264, + 49.3795927 + ], [ - -9, - 49.8 + -123.4307826, + 49.3823866 ], [ - 1.9, - 61.1 - ] - ] - ], - "sourcetag": "OS_OpenData_Locator" - }, - { - "name": "OS 1:25k historic (OSM)", - "template": "http://ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.4313405, + 49.3827358 + ], [ - -9, - 49.8 + -123.4312118, + 49.3838533 ], [ - 1.9, - 61.1 - ] - ] - ], - "sourcetag": "OS 1:25k" - }, - { - "name": "OS 1:25k historic (NLS)", - "template": "http://geo.nls.uk/mapdata2/os/25000/{z}/{x}/{y}.png", - "extents": [ - [ + -123.4300415, + 49.3845883 + ], [ - -9, - 49.8 + -123.4189858, + 49.3847087 ], [ - 1.9, - 61.1 - ] - ] - ], - "sourcetag": "OS 1:25k", - "logo": "icons/logo_nls70-nq8.png", - "logo_url": "http://geo.nls.uk/maps/" - }, - { - "name": "OS 7th Series historic (OSM)", - "template": "http://ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.4192235, + 49.4135198 + ], [ - -9, - 49.8 + -123.3972532, + 49.4135691 ], [ - 1.9, - 61.1 - ] - ] - ], - "sourcetag": "OS7" - }, - { - "name": "OS 7th Series historic (NLS)", - "template": "http://geo.nls.uk/mapdata2/os/seventh/{z}/{x}/{y}.png", - "extents": [ - [ + -123.3972758, + 49.4243473 + ], [ - -9, - 49.8 + -123.4006929, + 49.4243314 ], [ - 1.9, - 61.1 - ] - ] - ], - "sourcetag": "OS7", - "logo": "icons/logo_nls70-nq8.png", - "logo_url": "http://geo.nls.uk/maps/" - }, - { - "name": "OS New Popular Edition historic", - "template": "http://ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", - "extents": [ - [ + -123.4007741, + 49.5703491 + ], [ - -5.8, - 49.8 + -123.4000812, + 49.570345 ], [ - 1.9, - 55.8 - ] - ] - ], - "sourcetag": "NPE" - }, - { - "name": "OS Scottish Popular historic", - "template": "http://ooc.openstreetmap.org/npescotland/tiles/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.4010761, + 49.5933838 + ], [ - -7.8, - 54.5 + -123.3760399, + 49.5932848 ], [ - -1.1, - 61.1 - ] - ] - ], - "sourcetag": "NPE" - }, - { - "name": "Surrey aerial", - "template": "http://gravitystorm.dev.openstreetmap.org/surrey/{z}/{x}/{y}.png", - "extents": [ - [ + -123.3769811, + 49.6756063 + ], [ - -0.856, - 51.071 + -123.3507288, + 49.6756396 ], [ - 0.062, - 51.473 - ] - ] - ], - "sourcetag": "Surrey aerial" - }, - { - "name": "Port au Prince - GeoEye Jan 2010", - "template": "http://gravitystorm.dev.openstreetmap.org/imagery/haiti/{z}/{x}/{y}.png", - "extents": [ - [ + -123.3507969, + 49.7086751 + ], [ - -72.43, - 18.5 + -123.332887, + 49.708722 ], [ - -72.31, - 18.58 - ] - ] - ], - "sourcetag": "GeoEye, 2010-01" - }, - { - "name": "Haiti - IOM Drone Imagery, 2012-13", - "template": "http://wms.openstreetmap.fr/tms/1.0.0/iomhaiti/{zoom}/{x}/{y}", - "extents": [ - [ + -123.3327888, + 49.7256288 + ], [ - -74.5, - 17.95 + -123.3007111, + 49.7255625 ], [ - -71.58, - 20.12 - ] - ] - ], - "sourcetag": "iom_image2013" - }, - { - "name": "NAIP", - "template": "http://cube.telascience.org/tilecache/tilecache.py/NAIP_ALL/{z}/{x}/{y}.png", - "description": "National Agriculture Imagery Program", - "extents": [ - [ + -123.3009164, + 49.7375384 + ], [ - -125.8, - 24.2 + -123.2885986, + 49.737638 ], [ - -62.3, - 49.5 - ] - ], - [ + -123.2887823, + 49.8249207 + ], [ - -168.5, - 55.3 + -123.2997955, + 49.8249207 ], [ - -140, - 71.5 - ] - ] - ], - "sourcetag": "NAIP" - }, - { - "name": "Ireland - NLS Historic Maps", - "template": "http://geo.nls.uk/maps/ireland/gsgs4136/{z}/{x}/{y}.png", - "extents": [ - [ + -123.3011721, + 49.8497814 + ], [ - -10.71, - 51.32 + -123.3218218, + 49.850669 ], [ - -5.37, - 55.46 - ] - ] - ], - "sourcetag": "NLS Historic Maps", - "logo": "icons/logo_nls70-nq8.png", - "logo_url": "http://geo.nls.uk/maps/" - }, - { - "name": "Denmark - Fugro Aerial Imagery", - "template": "http://tile.openstreetmap.dk/fugro2005/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.3273284, + 49.8577696 + ], [ - 7.81, - 54.44 + -123.3276726, + 49.9758852 ], [ - 15.49, - 57.86 - ] - ] - ], - "sourcetag": "Fugro (2005)" - }, - { - "name": "Denmark - Stevns Kommune", - "template": "http://tile.openstreetmap.dk/stevns/2009/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.3008279, + 49.9752212 + ], [ - 12.09144, - 55.23403 + -123.3007204, + 50.0997002 ], [ - 12.47712, - 55.43647 - ] - ] - ], - "sourcetag": "Stevns Kommune (2009)" - }, - { - "name": "Austria - geoimage.at", - "template": "http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/{z}/{x}/{y}.jpg", - "extents": [ - [ + -123.2501716, + 50.100735 + ], [ - 9.36, - 46.33 + -123.25091, + 50.2754901 ], [ - 17.28, - 49.09 - ] - ] - ], - "sourcetag": "geoimage.at" - }, - { - "name": "Russia - Kosmosnimki.ru IRS Satellite", - "template": "http://irs.gis-lab.info/?layers=irs&request=GetTile&z={z}&x={x}&y={y}", - "extents": [ - [ + -123.0224338, + 50.2755598 + ], [ - 19.02, - 40.96 + -123.0224879, + 50.3254853 ], [ - 77.34, - 70.48 - ] - ] - ], - "sourcetag": "Kosmosnimki.ru IRS" - }, - { - "name": "Belarus - Kosmosnimki.ru SPOT4 Satellite", - "template": "http://irs.gis-lab.info/?layers=spot&request=GetTile&z={z}&x={x}&y={y}", - "extents": [ - [ + -123.0009318, + 50.3254689 + ], [ - 23.16, - 51.25 + -123.0007778, + 50.3423899 ], [ - 32.83, - 56.19 - ] - ] - ], - "sourcetag": "Kosmosnimki.ru SPOT4" - }, - { - "name": "Australia - Geographic Reference Image", - "template": "http://agri.openstreetmap.org/{z}/{x}/{y}.png", - "extents": [ - [ + -122.9775023, + 50.3423408 + ], [ - 96, - -44 + -122.9774766, + 50.3504306 ], [ - 168, - -9 - ] - ] - ], - "sourcetag": "AGRI" - }, - { - "name": "Switzerland - Canton Aargau - AGIS 25cm 2011", - "template": "http://tiles.poole.ch/AGIS/OF2011/{z}/{x}/{y}.png", - "extents": [ - [ + -122.9508137, + 50.3504961 + ], [ - 7.69, - 47.13 + -122.950795, + 50.3711984 ], [ - 8.48, - 47.63 - ] - ] - ], - "sourcetag": "AGIS OF2011" - }, - { - "name": "Switzerland - Canton Solothurn - SOGIS 2007", - "template": "http://mapproxy.sosm.ch:8080/tiles/sogis2007/EPSG900913/{z}/{x}/{y}.png?origin=nw", - "extents": [ - [ + -122.9325221, + 50.3711521 + ], [ - 7.33, - 47.06 + -122.9321048, + 50.399793 ], [ - 8.04, - 47.5 - ] - ] - ], - "sourcetag": "Orthofoto 2007 WMS Solothurn" - }, - { - "name": "Poland - Media-Lab fleet GPS masstracks", - "template": "http://masstracks.media-lab.com.pl/{z}/{x}/{y}.png", - "extents": [ - [ + -122.8874234, + 50.3999748 + ], [ - 14, - 48.9 + -122.8873385, + 50.4256108 ], [ - 24.2, - 55 - ] - ] - ], - "sourcetag": "masstracks" - }, - { - "name": "South Africa - CD:NGI Aerial", - "template": "http://{t}.aerial.openstreetmap.org.za/ngi-aerial/{z}/{x}/{y}.jpg", - "subdomains": [ - "a", - "b", - "c" - ], - "extents": [ - [ + -122.6620152, + 50.4256959 + ], [ - 17.64, - -34.95 + -122.6623083, + 50.3994506 ], [ - 32.87, - -22.05 - ] - ] - ], - "sourcetag": "ngi-aerial" - }, - { - "name": "Lithuania - ORT10LT", - "template": "http://mapproxy.openmap.lt/ort10lt/g/{z}/{x}/{y}.jpeg", - "extents": [ - [ + -122.5990316, + 50.3992413 + ], [ - 21, - 53.88 + -122.5988274, + 50.3755206 ], [ - 26.85, - 56.45 - ] - ] - ], - "scaleExtent": [ - 4, - 18 - ], - "sourcetag": "NŽT ORT10LT" - } - ], - "wikipedia": [ - [ - "English", - "English", - "en" - ], - [ - "German", - "Deutsch", - "de" - ], - [ - "Dutch", - "Nederlands", - "nl" - ], - [ - "French", - "Français", - "fr" - ], - [ - "Italian", - "Italiano", - "it" - ], - [ - "Russian", - "Ð ÑÑÑкий", - "ru" - ], - [ - "Spanish", - "Español", - "es" - ], - [ - "Polish", + -122.5724832, + 50.3753706 + ], + [ + -122.5735621, + 50.2493891 + ], + [ + -122.5990415, + 50.2494643 + ], + [ + -122.5991504, + 50.2265663 + ], + [ + -122.6185016, + 50.2266359 + ], + [ + -122.6185741, + 50.2244081 + ], + [ + -122.6490609, + 50.2245126 + ], + [ + -122.6492181, + 50.1993528 + ], + [ + -122.7308575, + 50.1993758 + ], + [ + -122.7311583, + 50.1244287 + ], + [ + -122.7490352, + 50.1245109 + ], + [ + -122.7490541, + 50.0903032 + ], + [ + -122.7687806, + 50.0903435 + ], + [ + -122.7689801, + 49.9494546 + ], + [ + -122.999047, + 49.9494706 + ], + [ + -122.9991199, + 49.8754553 + ], + [ + -122.9775894, + 49.8754553 + ], + [ + -122.9778145, + 49.6995098 + ], + [ + -122.9992362, + 49.6994781 + ], + [ + -122.9992524, + 49.6516526 + ], + [ + -123.0221525, + 49.6516526 + ], + [ + -123.0221162, + 49.5995096 + ], + [ + -123.0491898, + 49.5994625 + ], + [ + -123.0491898, + 49.5940523 + ], + [ + -123.0664647, + 49.5940405 + ], + [ + -123.0663594, + 49.5451868 + ], + [ + -123.0699906, + 49.5451202 + ], + [ + -123.0699008, + 49.5413153 + ], + [ + -123.0706835, + 49.5392837 + ], + [ + -123.0708888, + 49.5379931 + ], + [ + -123.0711454, + 49.5368773 + ], + [ + -123.0711069, + 49.5358115 + ], + [ + -123.0713764, + 49.532822 + ], + [ + -123.0716458, + 49.5321141 + ], + [ + -123.07171, + 49.5313896 + ], + [ + -123.0720308, + 49.5304153 + ], + [ + -123.0739554, + 49.5303486 + ], + [ + -123.0748023, + 49.5294992 + ], + [ + -123.0748151, + 49.5288079 + ], + [ + -123.0743403, + 49.5280584 + ], + [ + -123.073532, + 49.5274588 + ], + [ + -123.0733652, + 49.5270423 + ], + [ + -123.0732882, + 49.5255932 + ], + [ + -123.0737116, + 49.5249602 + ], + [ + -123.0736218, + 49.5244938 + ], + [ + -123.0992583, + 49.5244854 + ], + [ + -123.0991649, + 49.4754502 + ], + [ + -123.071052, + 49.4755252 + ], + [ + -123.071088, + 49.4663034 + ], + [ + -123.0739204, + 49.4663054 + ], + [ + -123.07422, + 49.4505028 + ], + [ + -123.0746319, + 49.4500858 + ], + [ + -123.074651, + 49.449329 + ], + [ + -123.0745999, + 49.449018 + ], + [ + -123.0744619, + 49.4486927 + ], + [ + -123.0743336, + 49.4479899 + ], + [ + -123.0742427, + 49.4477688 + ], + [ + -123.0743061, + 49.4447473 + ], + [ + -123.0747103, + 49.4447556 + ], + [ + -123.0746384, + 49.4377306 + ], + [ + -122.9996506, + 49.4377363 + ], + [ + -122.9996506, + 49.4369214 + ], + [ + -122.8606163, + 49.4415314 + ], + [ + -122.8102616, + 49.4423972 + ], + [ + -122.8098984, + 49.3766739 + ], + [ + -122.4036093, + 49.3766617 + ], + [ + -122.4036341, + 49.3771944 + ], + [ + -122.264739, + 49.3773028 + ], + [ + -122.263542, + 49.2360088 + ], + [ + -122.2155742, + 49.236139 + ], + [ + -122.0580956, + 49.235878 + ], + [ + -121.9538274, + 49.2966525 + ], + [ + -121.9400911, + 49.3045389 + ], + [ + -121.9235761, + 49.3142257 + ], + [ + -121.8990871, + 49.3225436 + ], + [ + -121.8883447, + 49.3259752 + ], + [ + -121.8552982, + 49.3363575 + ], + [ + -121.832697, + 49.3441519 + ], + [ + -121.7671336, + 49.3654361 + ], + [ + -121.6736683, + 49.3654589 + ], + [ + -121.6404153, + 49.3743775 + ], + [ + -121.5961976, + 49.3860493 + ], + [ + -121.5861178, + 49.3879193 + ], + [ + -121.5213684, + 49.3994649 + ], + [ + -121.5117375, + 49.4038378 + ], + [ + -121.4679302, + 49.4229024 + ], + [ + -121.4416803, + 49.4345607 + ], + [ + -121.422429, + 49.4345788 + ], + [ + -121.3462885, + 49.3932312 + ], + [ + -121.3480144, + 49.3412388 + ], + [ + -121.5135035, + 49.320577 + ], + [ + -121.6031683, + 49.2771727 + ], + [ + -121.6584065, + 49.1856125 + ], + [ + -121.679953, + 49.1654109 + ], + [ + -121.7815793, + 49.0702559 + ], + [ + -121.8076228, + 49.0622471 + ], + [ + -121.9393997, + 49.0636219 + ], + [ + -121.9725524, + 49.0424179 + ], + [ + -121.9921394, + 49.0332869 + ], + [ + -122.0035289, + 49.0273413 + ], + [ + -122.0178564, + 49.0241067 + ], + [ + -122.1108634, + 48.9992786 + ], + [ + -122.1493067, + 48.9995305 + ], + [ + -122.1492705, + 48.9991498 + ], + [ + -122.1991447, + 48.9996019 + ], + [ + -122.199181, + 48.9991974 + ], + [ + -122.234365, + 48.9994829 + ], + [ + -122.234365, + 49.000173 + ], + [ + -122.3994722, + 49.0012385 + ], + [ + -122.4521338, + 49.0016326 + ], + [ + -122.4521338, + 49.000883 + ], + [ + -122.4584089, + 49.0009306 + ], + [ + -122.4584814, + 48.9993124 + ], + [ + -122.4992458, + 48.9995022 + ], + [ + -122.4992458, + 48.9992906 + ], + [ + -122.5492618, + 48.9995107 + ], + [ + -122.5492564, + 48.9993206 + ], + [ + -122.6580785, + 48.9994212 + ], + [ + -122.6581061, + 48.9954007 + ], + [ + -122.7067604, + 48.9955344 + ], + [ + -122.7519761, + 48.9956392 + ], + [ + -122.7922063, + 48.9957204 + ], + [ + -122.7921907, + 48.9994331 + ], + [ + -123.0350417, + 48.9995724 + ], + [ + -123.0350437, + 49.0000958 + ], + [ + -123.0397091, + 49.0000536 + ], + [ + -123.0397444, + 49.0001812 + ], + [ + -123.0485506, + 49.0001348 + ], + [ + -123.0485329, + 49.0004712 + ], + [ + -123.0557122, + 49.000448 + ], + [ + -123.0556324, + 49.0002284 + ], + [ + -123.0641365, + 49.0001293 + ], + [ + -123.064158, + 48.9999421 + ], + [ + -123.074899, + 48.9996928 + ], + [ + -123.0750717, + 49.0006218 + ], + [ + -123.0899573, + 49.0003726 + ], + [ + -123.109229, + 48.9999421 + ], + [ + -123.1271193, + 49.0003046 + ], + [ + -123.1359953, + 48.9998741 + ], + [ + -123.1362716, + 49.0005765 + ], + [ + -123.153851, + 48.9998061 + ], + [ + -123.1540533, + 49.0006806 + ], + [ + -123.1710015, + 49.0001274 + ], + [ + -123.2000916, + 48.9996849 + ], + [ + -123.2003446, + 49.0497785 + ], + [ + -123.2108845, + 49.0497232 + ], + [ + -123.2112218, + 49.051989 + ], + [ + -123.2070479, + 49.0520857 + ], + [ + -123.2078911, + 49.0607884 + ], + [ + -123.2191688, + 49.0600978 + ], + [ + -123.218958, + 49.0612719 + ], + [ + -123.2251766, + 49.0612719 + ], + [ + -123.2253874, + 49.0622388 + ], + [ + -123.2297088, + 49.0620316 + ], + [ + -123.2298142, + 49.068592 + ], + [ + -123.2331869, + 49.0687301 + ], + [ + -123.2335031, + 49.0705945 + ], + [ + -123.249313, + 49.0702493 + ], + [ + -123.2497346, + 49.0802606 + ], + [ + -123.2751358, + 49.0803986 + ], + [ + -123.2751358, + 49.0870947 + ], + [ + -123.299483, + 49.0873018 + ], + [ + -123.29944, + 49.080253 + ], + [ + -123.3254508, + 49.0803944 + ], + [ + -123.3254353, + 49.1154662 + ], + [ + -123.2750966, + 49.1503341 + ], + [ + -123.275181, + 49.1873267 + ], + [ + -123.2788067, + 49.1871063 + ], + [ + -123.278891, + 49.1910741 + ], + [ + -123.3004767, + 49.1910741 + ], + [ + -123.3004186, + 49.2622933 + ], + [ + -123.3126185, + 49.2622416 + ], + [ + -123.3125958, + 49.2714948 + ], + [ + -123.3154251, + 49.2714727 + ], + [ + -123.3156628, + 49.2818906 + ], + [ + -123.3174735, + 49.2818832 + ], + [ + -123.3174961, + 49.2918488 + ], + [ + -123.3190353, + 49.2918488 + ], + [ + -123.3190692, + 49.298602 + ], + [ + -123.3202349, + 49.2985651 + ], + [ + -123.3202786, + 49.3019749 + ], + [ + -123.3222679, + 49.3019605 + ], + [ + -123.3223943, + 49.3118263 + ], + [ + -123.3254002, + 49.3118086 + ], + [ + -123.3253898, + 49.3201721 + ], + [ + -123.3192695, + 49.3201957 + ], + [ + -123.3192242, + 49.3246748 + ], + [ + -123.3179437, + 49.3246596 + ], + [ + -123.3179861, + 49.3254065 + ] + ] + ], + "terms_url": "http://imagery.paulnorman.ca/tiles/about.html", + "terms_text": "Copyright Province of British Columbia, City of Surrey" + }, + { + "name": "Cambodia, Laos, Thailand, Vietnam bilingual", + "type": "tms", + "template": "http://{switch:a,b,c,d}.tile.osm-tools.org/osm_then/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 19 + ], + "polygon": [ + [ + [ + 97.3, + 5.6 + ], + [ + 97.3, + 23.4 + ], + [ + 109.6, + 23.4 + ], + [ + 109.6, + 5.6 + ], + [ + 97.3, + 5.6 + ] + ] + ], + "terms_url": "http://www.osm-tools.org/", + "terms_text": "© osm-tools.org & OpenStreetMap contributors, CC-BY-SA" + }, + { + "name": "Freemap.sk Car", + "type": "tms", + "template": "http://t{switch:1,2,3,4}.freemap.sk/A/{zoom}/{x}/{y}.jpeg", + "scaleExtent": [ + 8, + 16 + ], + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved." + }, + { + "name": "Freemap.sk Cyclo", + "type": "tms", + "template": "http://t{switch:1,2,3,4}.freemap.sk/C/{zoom}/{x}/{y}.jpeg", + "scaleExtent": [ + 8, + 16 + ], + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved." + }, + { + "name": "Freemap.sk Hiking", + "type": "tms", + "template": "http://t{switch:1,2,3,4}.freemap.sk/T/{zoom}/{x}/{y}.jpeg", + "scaleExtent": [ + 8, + 16 + ], + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved." + }, + { + "name": "Freemap.sk Ski", + "type": "tms", + "template": "http://t{switch:1,2,3,4}.freemap.sk/K/{zoom}/{x}/{y}.jpeg", + "scaleExtent": [ + 8, + 16 + ], + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_text": "Copyright ©2007-2012 Freemap Slovakia (www.freemap.sk). Some rights reserved." + }, + { + "name": "Fugro (Denmark)", + "type": "tms", + "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/fugro2005/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 19 + ], + "polygon": [ + [ + [ + 8.3743941, + 54.9551655 + ], + [ + 8.3683809, + 55.4042149 + ], + [ + 8.2103997, + 55.4039795 + ], + [ + 8.2087314, + 55.4937345 + ], + [ + 8.0502655, + 55.4924731 + ], + [ + 8.0185123, + 56.7501399 + ], + [ + 8.1819161, + 56.7509948 + ], + [ + 8.1763274, + 57.0208898 + ], + [ + 8.3413329, + 57.0219872 + ], + [ + 8.3392467, + 57.1119574 + ], + [ + 8.5054433, + 57.1123212 + ], + [ + 8.5033923, + 57.2020499 + ], + [ + 9.3316304, + 57.2027636 + ], + [ + 9.3319079, + 57.2924835 + ], + [ + 9.4978864, + 57.2919578 + ], + [ + 9.4988593, + 57.3820608 + ], + [ + 9.6649749, + 57.3811615 + ], + [ + 9.6687295, + 57.5605591 + ], + [ + 9.8351961, + 57.5596265 + ], + [ + 9.8374896, + 57.6493322 + ], + [ + 10.1725726, + 57.6462818 + ], + [ + 10.1754245, + 57.7367768 + ], + [ + 10.5118282, + 57.7330269 + ], + [ + 10.5152095, + 57.8228945 + ], + [ + 10.6834853, + 57.8207722 + ], + [ + 10.6751613, + 57.6412021 + ], + [ + 10.5077045, + 57.6433097 + ], + [ + 10.5039992, + 57.5535088 + ], + [ + 10.671038, + 57.5514113 + ], + [ + 10.6507805, + 57.1024538 + ], + [ + 10.4857673, + 57.1045138 + ], + [ + 10.4786236, + 56.9249051 + ], + [ + 10.3143981, + 56.9267573 + ], + [ + 10.3112341, + 56.8369269 + ], + [ + 10.4750295, + 56.83509 + ], + [ + 10.4649016, + 56.5656681 + ], + [ + 10.9524239, + 56.5589761 + ], + [ + 10.9479249, + 56.4692243 + ], + [ + 11.1099335, + 56.4664675 + ], + [ + 11.1052639, + 56.376833 + ], + [ + 10.9429901, + 56.3795284 + ], + [ + 10.9341235, + 56.1994768 + ], + [ + 10.7719685, + 56.2020244 + ], + [ + 10.7694751, + 56.1120103 + ], + [ + 10.6079695, + 56.1150259 + ], + [ + 10.4466742, + 56.116717 + ], + [ + 10.2865948, + 56.118675 + ], + [ + 10.2831527, + 56.0281851 + ], + [ + 10.4439274, + 56.0270388 + ], + [ + 10.4417713, + 55.7579243 + ], + [ + 10.4334961, + 55.6693533 + ], + [ + 10.743814, + 55.6646861 + ], + [ + 10.743814, + 55.5712253 + ], + [ + 10.8969041, + 55.5712253 + ], + [ + 10.9051793, + 55.3953852 + ], + [ + 11.0613726, + 55.3812841 + ], + [ + 11.0593038, + 55.1124061 + ], + [ + 11.0458567, + 55.0318621 + ], + [ + 11.2030844, + 55.0247474 + ], + [ + 11.2030844, + 55.117139 + ], + [ + 11.0593038, + 55.1124061 + ], + [ + 11.0613726, + 55.3812841 + ], + [ + 11.0789572, + 55.5712253 + ], + [ + 10.8969041, + 55.5712253 + ], + [ + 10.9258671, + 55.6670198 + ], + [ + 10.743814, + 55.6646861 + ], + [ + 10.7562267, + 55.7579243 + ], + [ + 10.4417713, + 55.7579243 + ], + [ + 10.4439274, + 56.0270388 + ], + [ + 10.4466742, + 56.116717 + ], + [ + 10.6079695, + 56.1150259 + ], + [ + 10.6052053, + 56.0247462 + ], + [ + 10.9258671, + 56.0201215 + ], + [ + 10.9197132, + 55.9309388 + ], + [ + 11.0802782, + 55.92792 + ], + [ + 11.0858066, + 56.0178284 + ], + [ + 11.7265047, + 56.005058 + ], + [ + 11.7319981, + 56.0952142 + ], + [ + 12.0540333, + 56.0871256 + ], + [ + 12.0608477, + 56.1762576 + ], + [ + 12.7023469, + 56.1594405 + ], + [ + 12.6611131, + 55.7114318 + ], + [ + 12.9792318, + 55.7014026 + ], + [ + 12.9612912, + 55.5217294 + ], + [ + 12.3268659, + 55.5412096 + ], + [ + 12.3206071, + 55.4513655 + ], + [ + 12.4778226, + 55.447067 + ], + [ + 12.4702432, + 55.3570479 + ], + [ + 12.6269738, + 55.3523837 + ], + [ + 12.6200898, + 55.2632576 + ], + [ + 12.4627339, + 55.26722 + ], + [ + 12.4552949, + 55.1778223 + ], + [ + 12.2987046, + 55.1822303 + ], + [ + 12.2897344, + 55.0923641 + ], + [ + 12.6048608, + 55.0832904 + ], + [ + 12.5872011, + 54.9036285 + ], + [ + 12.2766618, + 54.9119031 + ], + [ + 12.2610181, + 54.7331602 + ], + [ + 12.1070691, + 54.7378161 + ], + [ + 12.0858621, + 54.4681655 + ], + [ + 11.7794953, + 54.4753579 + ], + [ + 11.7837381, + 54.5654783 + ], + [ + 11.1658525, + 54.5782155 + ], + [ + 11.1706443, + 54.6686508 + ], + [ + 10.8617173, + 54.6733956 + ], + [ + 10.8651245, + 54.7634667 + ], + [ + 10.7713646, + 54.7643888 + ], + [ + 10.7707276, + 54.7372807 + ], + [ + 10.7551428, + 54.7375776 + ], + [ + 10.7544039, + 54.7195666 + ], + [ + 10.7389074, + 54.7197588 + ], + [ + 10.7384368, + 54.7108482 + ], + [ + 10.7074486, + 54.7113045 + ], + [ + 10.7041094, + 54.6756741 + ], + [ + 10.5510973, + 54.6781698 + ], + [ + 10.5547184, + 54.7670245 + ], + [ + 10.2423994, + 54.7705935 + ], + [ + 10.2459845, + 54.8604673 + ], + [ + 10.0902268, + 54.8622134 + ], + [ + 10.0873731, + 54.7723851 + ], + [ + 9.1555798, + 54.7769557 + ], + [ + 9.1562752, + 54.8675369 + ], + [ + 8.5321973, + 54.8663765 + ], + [ + 8.531432, + 54.95516 + ] + ], + [ + [ + 11.4577738, + 56.819554 + ], + [ + 11.7849181, + 56.8127385 + ], + [ + 11.7716715, + 56.6332796 + ], + [ + 11.4459621, + 56.6401087 + ] + ], + [ + [ + 11.3274736, + 57.3612962 + ], + [ + 11.3161808, + 57.1818004 + ], + [ + 11.1508692, + 57.1847276 + ], + [ + 11.1456628, + 57.094962 + ], + [ + 10.8157703, + 57.1001693 + ], + [ + 10.8290599, + 57.3695272 + ] + ], + [ + [ + 11.5843266, + 56.2777928 + ], + [ + 11.5782882, + 56.1880397 + ], + [ + 11.7392309, + 56.1845765 + ], + [ + 11.7456428, + 56.2743186 + ] + ], + [ + [ + 14.6825922, + 55.3639405 + ], + [ + 14.8395247, + 55.3565231 + ], + [ + 14.8263755, + 55.2671261 + ], + [ + 15.1393406, + 55.2517359 + ], + [ + 15.1532015, + 55.3410836 + ], + [ + 15.309925, + 55.3330556 + ], + [ + 15.295719, + 55.2437356 + ], + [ + 15.1393406, + 55.2517359 + ], + [ + 15.1255631, + 55.1623802 + ], + [ + 15.2815819, + 55.1544167 + ], + [ + 15.2535578, + 54.9757646 + ], + [ + 14.6317464, + 55.0062496 + ] + ] + ], + "terms_url": "http://wiki.openstreetmap.org/wiki/Fugro", + "terms_text": "Fugro Aerial Mapping" + }, + { + "name": "Geoimage.at MaxRes", + "type": "tms", + "template": "http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/{zoom}/{x}/{y}.jpg", + "polygon": [ + [ + [ + 16.5073284, + 46.9929304 + ], + [ + 16.283417, + 46.9929304 + ], + [ + 16.135839, + 46.8713046 + ], + [ + 15.9831722, + 46.8190947 + ], + [ + 16.0493278, + 46.655175 + ], + [ + 15.8610387, + 46.7180116 + ], + [ + 15.7592608, + 46.6900933 + ], + [ + 15.5607938, + 46.6796202 + ], + [ + 15.5760605, + 46.6342132 + ], + [ + 15.4793715, + 46.6027553 + ], + [ + 15.4335715, + 46.6516819 + ], + [ + 15.2249267, + 46.6342132 + ], + [ + 15.0468154, + 46.6481886 + ], + [ + 14.9908376, + 46.5887681 + ], + [ + 14.9603042, + 46.6237293 + ], + [ + 14.8534374, + 46.6027553 + ], + [ + 14.8330818, + 46.5012666 + ], + [ + 14.7516595, + 46.4977636 + ], + [ + 14.6804149, + 46.4381781 + ], + [ + 14.6142593, + 46.4381781 + ], + [ + 14.578637, + 46.3785275 + ], + [ + 14.4412369, + 46.4311638 + ], + [ + 14.1613476, + 46.4276563 + ], + [ + 14.1257253, + 46.4767409 + ], + [ + 14.0188585, + 46.4767409 + ], + [ + 13.9119917, + 46.5257813 + ], + [ + 13.8254805, + 46.5047694 + ], + [ + 13.4438134, + 46.560783 + ], + [ + 13.3064132, + 46.5502848 + ], + [ + 13.1283019, + 46.5887681 + ], + [ + 12.8433237, + 46.6132433 + ], + [ + 12.7262791, + 46.6412014 + ], + [ + 12.5125455, + 46.6656529 + ], + [ + 12.3598787, + 46.7040543 + ], + [ + 12.3649676, + 46.7703197 + ], + [ + 12.2886341, + 46.7772902 + ], + [ + 12.2733674, + 46.8852187 + ], + [ + 12.2072118, + 46.8747835 + ], + [ + 12.1308784, + 46.9026062 + ], + [ + 12.1156117, + 46.9998721 + ], + [ + 12.2530119, + 47.0657733 + ], + [ + 12.2123007, + 47.0934969 + ], + [ + 11.9833004, + 47.0449712 + ], + [ + 11.7339445, + 46.9616816 + ], + [ + 11.6321666, + 47.010283 + ], + [ + 11.5405665, + 46.9755722 + ], + [ + 11.4998553, + 47.0068129 + ], + [ + 11.418433, + 46.9651546 + ], + [ + 11.2555884, + 46.9755722 + ], + [ + 11.1130993, + 46.913036 + ], + [ + 11.0418548, + 46.7633482 + ], + [ + 10.8891879, + 46.7598621 + ], + [ + 10.7416099, + 46.7842599 + ], + [ + 10.7059877, + 46.8643462 + ], + [ + 10.5787653, + 46.8399847 + ], + [ + 10.4566318, + 46.8504267 + ], + [ + 10.4769874, + 46.9269392 + ], + [ + 10.3853873, + 46.9894592 + ], + [ + 10.2327204, + 46.8643462 + ], + [ + 10.1207647, + 46.8330223 + ], + [ + 9.8663199, + 46.9408389 + ], + [ + 9.9019422, + 47.0033426 + ], + [ + 9.6831197, + 47.0588402 + ], + [ + 9.6118752, + 47.0380354 + ], + [ + 9.6322307, + 47.128131 + ], + [ + 9.5813418, + 47.1662025 + ], + [ + 9.5406306, + 47.2664422 + ], + [ + 9.6067863, + 47.3492559 + ], + [ + 9.6729419, + 47.369939 + ], + [ + 9.6424085, + 47.4457079 + ], + [ + 9.5660751, + 47.4801122 + ], + [ + 9.7136531, + 47.5282405 + ], + [ + 9.7848976, + 47.5969187 + ], + [ + 9.8357866, + 47.5454185 + ], + [ + 9.9477423, + 47.538548 + ], + [ + 10.0902313, + 47.4491493 + ], + [ + 10.1105869, + 47.3664924 + ], + [ + 10.2428982, + 47.3871688 + ], + [ + 10.1869203, + 47.2698953 + ], + [ + 10.3243205, + 47.2975125 + ], + [ + 10.4820763, + 47.4491493 + ], + [ + 10.4311873, + 47.4869904 + ], + [ + 10.4413651, + 47.5900549 + ], + [ + 10.4871652, + 47.5522881 + ], + [ + 10.5482319, + 47.5351124 + ], + [ + 10.5991209, + 47.5660246 + ], + [ + 10.7568766, + 47.5316766 + ], + [ + 10.8891879, + 47.5454185 + ], + [ + 10.9400769, + 47.4869904 + ], + [ + 10.9960547, + 47.3906141 + ], + [ + 11.2352328, + 47.4422662 + ], + [ + 11.2810328, + 47.3975039 + ], + [ + 11.4235219, + 47.5144941 + ], + [ + 11.5761888, + 47.5076195 + ], + [ + 11.6067221, + 47.5900549 + ], + [ + 11.8357224, + 47.5866227 + ], + [ + 12.003656, + 47.6243647 + ], + [ + 12.2072118, + 47.6037815 + ], + [ + 12.1614117, + 47.6963421 + ], + [ + 12.2581008, + 47.7442718 + ], + [ + 12.2530119, + 47.6792136 + ], + [ + 12.4311232, + 47.7100408 + ], + [ + 12.4921899, + 47.631224 + ], + [ + 12.5685234, + 47.6277944 + ], + [ + 12.6295901, + 47.6894913 + ], + [ + 12.7720792, + 47.6689338 + ], + [ + 12.8331459, + 47.5419833 + ], + [ + 12.975635, + 47.4732332 + ], + [ + 13.0417906, + 47.4938677 + ], + [ + 13.0367017, + 47.5557226 + ], + [ + 13.0977685, + 47.6415112 + ], + [ + 13.0316128, + 47.7100408 + ], + [ + 12.9043905, + 47.7203125 + ], + [ + 13.0061684, + 47.84683 + ], + [ + 12.9451016, + 47.9355501 + ], + [ + 12.8636793, + 47.9594103 + ], + [ + 12.8636793, + 48.0036929 + ], + [ + 12.7517236, + 48.0989418 + ], + [ + 12.8738571, + 48.2109733 + ], + [ + 12.9603683, + 48.2109733 + ], + [ + 13.0417906, + 48.2652035 + ], + [ + 13.1842797, + 48.2990682 + ], + [ + 13.2606131, + 48.2922971 + ], + [ + 13.3980133, + 48.3565867 + ], + [ + 13.4438134, + 48.417418 + ], + [ + 13.4387245, + 48.5523383 + ], + [ + 13.509969, + 48.5860123 + ], + [ + 13.6117469, + 48.5725454 + ], + [ + 13.7287915, + 48.5118999 + ], + [ + 13.7847694, + 48.5725454 + ], + [ + 13.8203916, + 48.6263915 + ], + [ + 13.7949471, + 48.7171267 + ], + [ + 13.850925, + 48.7741724 + ], + [ + 14.0595697, + 48.6633774 + ], + [ + 14.0137696, + 48.6331182 + ], + [ + 14.0748364, + 48.5927444 + ], + [ + 14.2173255, + 48.5961101 + ], + [ + 14.3649034, + 48.5489696 + ], + [ + 14.4666813, + 48.6499311 + ], + [ + 14.5582815, + 48.5961101 + ], + [ + 14.5989926, + 48.6263915 + ], + [ + 14.7211261, + 48.5759124 + ], + [ + 14.7211261, + 48.6868997 + ], + [ + 14.822904, + 48.7271983 + ], + [ + 14.8178151, + 48.777526 + ], + [ + 14.9647227, + 48.7851754 + ], + [ + 14.9893637, + 49.0126611 + ], + [ + 15.1485933, + 48.9950306 + ], + [ + 15.1943934, + 48.9315502 + ], + [ + 15.3063491, + 48.9850128 + ], + [ + 15.3928603, + 48.9850128 + ], + [ + 15.4844604, + 48.9282069 + ], + [ + 15.749083, + 48.8545973 + ], + [ + 15.8406831, + 48.8880697 + ], + [ + 16.0086166, + 48.7808794 + ], + [ + 16.2070835, + 48.7339115 + ], + [ + 16.3953727, + 48.7372678 + ], + [ + 16.4920617, + 48.8110498 + ], + [ + 16.6905286, + 48.7741724 + ], + [ + 16.7057953, + 48.7339115 + ], + [ + 16.8991733, + 48.713769 + ], + [ + 16.9755067, + 48.515271 + ], + [ + 16.8482844, + 48.4511817 + ], + [ + 16.8533733, + 48.3464411 + ], + [ + 16.9551512, + 48.2516513 + ], + [ + 16.9907734, + 48.1498955 + ], + [ + 17.0925513, + 48.1397088 + ], + [ + 17.0823736, + 48.0241182 + ], + [ + 17.1739737, + 48.0207146 + ], + [ + 17.0823736, + 47.8741447 + ], + [ + 16.9856845, + 47.8673174 + ], + [ + 17.0823736, + 47.8092489 + ], + [ + 17.0925513, + 47.7031919 + ], + [ + 16.7414176, + 47.6792136 + ], + [ + 16.7057953, + 47.7511153 + ], + [ + 16.5378617, + 47.7545368 + ], + [ + 16.5480395, + 47.7066164 + ], + [ + 16.4208172, + 47.6689338 + ], + [ + 16.573484, + 47.6175045 + ], + [ + 16.670173, + 47.631224 + ], + [ + 16.7108842, + 47.538548 + ], + [ + 16.6599952, + 47.4491493 + ], + [ + 16.5429506, + 47.3940591 + ], + [ + 16.4615283, + 47.3940591 + ], + [ + 16.4920617, + 47.276801 + ], + [ + 16.425906, + 47.1973317 + ], + [ + 16.4717061, + 47.1489007 + ], + [ + 16.5480395, + 47.1489007 + ], + [ + 16.476795, + 47.0796369 + ], + [ + 16.527684, + 47.0588402 + ] + ] + ], + "terms_text": "geoimage.at", + "id": "geoimage.at" + }, + { + "name": "Imagerie Drone (Haiti)", + "type": "tms", + "template": "http://wms.openstreetmap.fr/tms/1.0.0/iomhaiti/{zoom}/{x}/{y}", + "polygon": [ + [ + [ + -72.1547401, + 19.6878969 + ], + [ + -72.162234, + 19.689011 + ], + [ + -72.164995, + 19.6932445 + ], + [ + -72.1657838, + 19.6979977 + ], + [ + -72.161603, + 19.7035677 + ], + [ + -72.1487449, + 19.7028993 + ], + [ + -72.1477194, + 19.7026765 + ], + [ + -72.1485082, + 19.7001514 + ], + [ + -72.1436963, + 19.7011169 + ], + [ + -72.1410143, + 19.7000029 + ], + [ + -72.139476, + 19.6973664 + ], + [ + -72.1382533, + 19.6927617 + ], + [ + -72.1386872, + 19.6923161 + ], + [ + -72.1380561, + 19.6896423 + ], + [ + -72.1385294, + 19.6894938 + ], + [ + -72.1388055, + 19.6901251 + ], + [ + -72.1388844, + 19.6876741 + ], + [ + -72.1378195, + 19.6872656 + ], + [ + -72.13778, + 19.6850003 + ], + [ + -72.1369517, + 19.6855945 + ], + [ + -72.136794, + 19.6840719 + ], + [ + -72.135729, + 19.6835148 + ], + [ + -72.1355713, + 19.6740817 + ], + [ + -72.1366362, + 19.6708133 + ], + [ + -72.1487843, + 19.6710733 + ], + [ + -72.1534779, + 19.6763843 + ], + [ + -72.1530835, + 19.6769414 + ], + [ + -72.1533251, + 19.6769768 + ], + [ + -72.1532807, + 19.6796525 + ], + [ + -72.1523834, + 19.6797175 + ], + [ + -72.1522749, + 19.6803488 + ], + [ + -72.1519101, + 19.6803395 + ], + [ + -72.1518608, + 19.6805067 + ], + [ + -72.1528173, + 19.6806552 + ], + [ + -72.1522299, + 19.6833011 + ], + [ + -72.1507801, + 19.6831499 + ], + [ + -72.1504457, + 19.6847862 + ], + [ + -72.1508591, + 19.6843492 + ], + [ + -72.1530087, + 19.6849898 + ], + [ + -72.1546258, + 19.6854354 + ], + [ + -72.1543103, + 19.6870694 + ], + [ + -72.1547244, + 19.6868466 + ], + [ + -72.1548501, + 19.6877564 + ], + [ + -72.1545814, + 19.6877982 + ] + ], + [ + [ + -72.1310601, + 19.6718929 + ], + [ + -72.1259842, + 19.6772765 + ], + [ + -72.1255379, + 19.6776179 + ], + [ + -72.1216891, + 19.6776442 + ], + [ + -72.1149677, + 19.672602 + ], + [ + -72.1152745, + 19.6687152 + ], + [ + -72.1198205, + 19.6627535 + ], + [ + -72.1227768, + 19.6625696 + ], + [ + -72.1248965, + 19.662701 + ], + [ + -72.1285779, + 19.6645394 + ], + [ + -72.1308091, + 19.6661677 + ], + [ + -72.1316737, + 19.668794 + ], + [ + -72.1315621, + 19.671 + ] + ], + [ + [ + -71.845795, + 19.6709758 + ], + [ + -71.8429354, + 19.6759525 + ], + [ + -71.8410027, + 19.6759525 + ], + [ + -71.8380249, + 19.6755254 + ], + [ + -71.8378671, + 19.6745041 + ], + [ + -71.8390504, + 19.6743927 + ], + [ + -71.8390109, + 19.6741141 + ], + [ + -71.8398392, + 19.673947 + ], + [ + -71.8389123, + 19.6736127 + ], + [ + -71.8380249, + 19.67209 + ], + [ + -71.8380052, + 19.6726285 + ], + [ + -71.8376699, + 19.6727214 + ], + [ + -71.8376305, + 19.672545 + ], + [ + -71.8354414, + 19.6732135 + ], + [ + -71.835333, + 19.6729999 + ], + [ + -71.8331242, + 19.6734642 + ], + [ + -71.8326706, + 19.6716815 + ], + [ + -71.8321579, + 19.67209 + ], + [ + -71.8307183, + 19.6694902 + ], + [ + -71.8306009, + 19.6697594 + ], + [ + -71.8302174, + 19.6698907 + ], + [ + -71.8291833, + 19.6672095 + ], + [ + -71.8290749, + 19.6672095 + ], + [ + -71.8289122, + 19.6667916 + ], + [ + -71.8289516, + 19.6666199 + ], + [ + -71.8288333, + 19.6663506 + ], + [ + -71.8285572, + 19.6664759 + ], + [ + -71.8288678, + 19.6672466 + ], + [ + -71.8287593, + 19.6674138 + ], + [ + -71.8277979, + 19.6678177 + ], + [ + -71.8277112, + 19.6678586 + ], + [ + -71.8278263, + 19.6679637 + ], + [ + -71.8271831, + 19.6681212 + ], + [ + -71.8271761, + 19.6680917 + ], + [ + -71.8264405, + 19.6683921 + ], + [ + -71.8264074, + 19.6683231 + ], + [ + -71.8261954, + 19.6684253 + ], + [ + -71.8261806, + 19.6683556 + ], + [ + -71.8258946, + 19.6684206 + ], + [ + -71.8258897, + 19.6686574 + ], + [ + -71.8251551, + 19.6687549 + ], + [ + -71.8254509, + 19.6691588 + ], + [ + -71.8229332, + 19.6695739 + ], + [ + -71.822713, + 19.6696658 + ], + [ + -71.8227688, + 19.6697577 + ], + [ + -71.8201751, + 19.6709855 + ], + [ + -71.8198474, + 19.6704537 + ], + [ + -71.8197985, + 19.6706014 + ], + [ + -71.8194674, + 19.6707557 + ], + [ + -71.8182472, + 19.6713433 + ], + [ + -71.8181426, + 19.6711431 + ], + [ + -71.8175813, + 19.6714254 + ], + [ + -71.816959, + 19.6707672 + ], + [ + -71.8176388, + 19.6718965 + ], + [ + -71.8171403, + 19.6720376 + ], + [ + -71.8158225, + 19.6718045 + ], + [ + -71.8138354, + 19.6711874 + ], + [ + -71.8123259, + 19.6706982 + ], + [ + -71.8121759, + 19.6704258 + ], + [ + -71.8124304, + 19.6701467 + ], + [ + -71.8119184, + 19.6700141 + ], + [ + -71.8118765, + 19.6705828 + ], + [ + -71.811169, + 19.6703483 + ], + [ + -71.8095938, + 19.6698516 + ], + [ + -71.8077992, + 19.6692829 + ], + [ + -71.8056028, + 19.668612 + ], + [ + -71.8051443, + 19.6668942 + ], + [ + -71.8051196, + 19.6652322 + ], + [ + -71.8052315, + 19.661979 + ], + [ + -71.8065603, + 19.6523921 + ], + [ + -71.8073412, + 19.6482946 + ], + [ + -71.8099686, + 19.6468292 + ], + [ + -71.8147517, + 19.6454502 + ], + [ + -71.8147726, + 19.6455619 + ], + [ + -71.8150027, + 19.6455093 + ], + [ + -71.8149469, + 19.6453846 + ], + [ + -71.8159928, + 19.6450234 + ], + [ + -71.8158882, + 19.6448855 + ], + [ + -71.8165854, + 19.6446097 + ], + [ + -71.8190119, + 19.643802 + ], + [ + -71.8211524, + 19.643454 + ], + [ + -71.8221564, + 19.6433292 + ], + [ + -71.8269046, + 19.643211 + ], + [ + -71.8280481, + 19.6432241 + ], + [ + -71.8304466, + 19.6440778 + ], + [ + -71.8306419, + 19.6448592 + ], + [ + -71.8295263, + 19.6450365 + ], + [ + -71.8296064, + 19.6456111 + ], + [ + -71.8299411, + 19.6455651 + ], + [ + -71.8303699, + 19.6451744 + ], + [ + -71.830471, + 19.6453452 + ], + [ + -71.8308092, + 19.6451974 + ], + [ + -71.8310184, + 19.6451088 + ], + [ + -71.8312519, + 19.6458541 + ], + [ + -71.8311125, + 19.6458245 + ], + [ + -71.831367, + 19.6465862 + ], + [ + -71.8328939, + 19.646189 + ], + [ + -71.8344566, + 19.6457062 + ], + [ + -71.8344664, + 19.6463052 + ], + [ + -71.834215, + 19.6461938 + ], + [ + -71.8342002, + 19.6465513 + ], + [ + -71.8346702, + 19.6463 + ], + [ + -71.8349118, + 19.6463905 + ], + [ + -71.8347984, + 19.6462187 + ], + [ + -71.8354393, + 19.6458496 + ], + [ + -71.8355034, + 19.6458032 + ], + [ + -71.8364747, + 19.6461328 + ], + [ + -71.8376382, + 19.6472658 + ], + [ + -71.8379143, + 19.647888 + ], + [ + -71.8390483, + 19.6508039 + ], + [ + -71.8456942, + 19.6696203 + ] + ], + [ + [ + -72.098878, + 18.54843 + ], + [ + -72.096993, + 18.5501994 + ], + [ + -72.0972888, + 18.5503209 + ], + [ + -72.0968451, + 18.5503489 + ], + [ + -72.0955632, + 18.551854 + ], + [ + -72.0956428, + 18.5526742 + ], + [ + -72.0959914, + 18.5533748 + ], + [ + -72.0962145, + 18.553203 + ], + [ + -72.0962842, + 18.5535665 + ], + [ + -72.0964446, + 18.5535533 + ], + [ + -72.0965352, + 18.5539764 + ], + [ + -72.0965056, + 18.554173 + ], + [ + -72.0966085, + 18.5541747 + ], + [ + -72.0965178, + 18.5542127 + ], + [ + -72.0968769, + 18.5546588 + ], + [ + -72.0979018, + 18.5552141 + ], + [ + -72.1006211, + 18.5555875 + ], + [ + -72.1014926, + 18.5556206 + ], + [ + -72.1024339, + 18.5555016 + ], + [ + -72.103417, + 18.5543515 + ], + [ + -72.1034798, + 18.5516215 + ], + [ + -72.1030789, + 18.5516149 + ], + [ + -72.1033752, + 18.5515224 + ], + [ + -72.1035042, + 18.5515224 + ], + [ + -72.1035239, + 18.5502417 + ], + [ + -72.1028701, + 18.5503062 + ], + [ + -72.1029015, + 18.55025 + ], + [ + -72.1028457, + 18.5501773 + ], + [ + -72.1035081, + 18.5500252 + ], + [ + -72.103491, + 18.5497396 + ], + [ + -72.1035181, + 18.5497361 + ], + [ + -72.1035398, + 18.5489039 + ], + [ + -72.1034317, + 18.5487056 + ], + [ + -72.102717, + 18.5481437 + ], + [ + -72.1025601, + 18.5481536 + ], + [ + -72.10229, + 18.5482751 + ], + [ + -72.1022891, + 18.5482569 + ], + [ + -72.1025201, + 18.5481396 + ], + [ + -72.1023388, + 18.5481321 + ], + [ + -72.0999082, + 18.5480901 + ], + [ + -72.09907, + 18.5483799 + ] + ], + [ + [ + -72.2542503, + 18.568262 + ], + [ + -72.2560252, + 18.5717765 + ], + [ + -72.2557886, + 18.5748049 + ], + [ + -72.2535009, + 18.5755526 + ], + [ + -72.2522782, + 18.5755526 + ], + [ + -72.2499906, + 18.5740945 + ], + [ + -72.2473874, + 18.5698323 + ], + [ + -72.2460069, + 18.566729 + ], + [ + -72.2458492, + 18.5629527 + ], + [ + -72.2479396, + 18.5625414 + ], + [ + -72.2501483, + 18.5628031 + ], + [ + -72.2519232, + 18.5650839 + ] + ], + [ + [ + -72.303145, + 18.5332749 + ], + [ + -72.3031275, + 18.5331799 + ], + [ + -72.3048311, + 18.5311081 + ], + [ + -72.3097397, + 18.5311081 + ], + [ + -72.3164332, + 18.5324302 + ], + [ + -72.3234056, + 18.5366083 + ], + [ + -72.3261388, + 18.5387765 + ], + [ + -72.3261946, + 18.5426371 + ], + [ + -72.3170468, + 18.5540596 + ], + [ + -72.3130864, + 18.5540596 + ], + [ + -72.2987511, + 18.5453342 + ], + [ + -72.2988627, + 18.5407333 + ], + [ + -72.2962969, + 18.5404689 + ], + [ + -72.2954602, + 18.5395169 + ], + [ + -72.2961853, + 18.5338582 + ], + [ + -72.2971893, + 18.5332235 + ], + [ + -72.3007034, + 18.5332764 + ], + [ + -72.3022652, + 18.5342284 + ], + [ + -72.3028486, + 18.5335189 + ], + [ + -72.303104, + 18.5333361 + ], + [ + -72.303181, + 18.5334007 + ], + [ + -72.3035793, + 18.5335614 + ], + [ + -72.3030793, + 18.5346463 + ], + [ + -72.303715, + 18.5339873 + ], + [ + -72.3045286, + 18.5344052 + ], + [ + -72.3044015, + 18.5345097 + ], + [ + -72.3062747, + 18.5352571 + ], + [ + -72.3063107, + 18.5352741 + ], + [ + -72.3061219, + 18.5357628 + ], + [ + -72.3061219, + 18.5358196 + ], + [ + -72.30637, + 18.5358928 + ], + [ + -72.3062726, + 18.5354869 + ], + [ + -72.3066688, + 18.5350891 + ], + [ + -72.3061963, + 18.5349706 + ], + [ + -72.3058869, + 18.5349385 + ], + [ + -72.3055373, + 18.5346833 + ], + [ + -72.3054864, + 18.534613 + ], + [ + -72.3055585, + 18.5345065 + ], + [ + -72.3046749, + 18.5342293 + ], + [ + -72.3047617, + 18.5338817 + ], + [ + -72.3043252, + 18.5337511 + ], + [ + -72.3042595, + 18.5336346 + ] + ], + [ + [ + -72.2981405, + 18.477502 + ], + [ + -72.2935652, + 18.4948587 + ], + [ + -72.2922242, + 18.4964297 + ], + [ + -72.2931708, + 18.4972526 + ], + [ + -72.2892266, + 18.5057058 + ], + [ + -72.2878067, + 18.5080996 + ], + [ + -72.2850458, + 18.5119893 + ], + [ + -72.2840203, + 18.5113161 + ], + [ + -72.2808649, + 18.515879 + ], + [ + -72.2773151, + 18.5175994 + ], + [ + -72.2723454, + 18.5175246 + ], + [ + -72.2662714, + 18.5144578 + ], + [ + -72.2665869, + 18.5066783 + ], + [ + -72.2692643, + 18.5046154 + ], + [ + -72.2661965, + 18.5029756 + ], + [ + -72.2688181, + 18.4965222 + ], + [ + -72.2691528, + 18.4959403 + ], + [ + -72.2702684, + 18.4961519 + ], + [ + -72.2702684, + 18.4955964 + ], + [ + -72.2690691, + 18.49557 + ], + [ + -72.2692922, + 18.4937714 + ], + [ + -72.2736988, + 18.4859951 + ], + [ + -72.2746749, + 18.4850429 + ], + [ + -72.2751769, + 18.483403 + ], + [ + -72.2765435, + 18.4813398 + ], + [ + -72.2773523, + 18.4814985 + ], + [ + -72.2783006, + 18.4809694 + ], + [ + -72.2778544, + 18.4807049 + ], + [ + -72.2771013, + 18.480123 + ], + [ + -72.2789978, + 18.4775836 + ], + [ + -72.279723, + 18.4772927 + ], + [ + -72.2806433, + 18.4776365 + ], + [ + -72.2813685, + 18.4771604 + ], + [ + -72.2808386, + 18.4769752 + ], + [ + -72.2812848, + 18.4758378 + ], + [ + -72.2823167, + 18.4751765 + ], + [ + -72.2851615, + 18.4750971 + ], + [ + -72.2849941, + 18.4763668 + ], + [ + -72.2854404, + 18.4769752 + ], + [ + -72.286277, + 18.4756262 + ], + [ + -72.2869325, + 18.4754675 + ], + [ + -72.2865978, + 18.4751897 + ], + [ + -72.2865978, + 18.4750046 + ], + [ + -72.2909765, + 18.4747268 + ], + [ + -72.2946579, + 18.4749384 + ], + [ + -72.2973911, + 18.476843 + ] + ], + [ + [ + -72.3466657, + 18.5222375 + ], + [ + -72.346833, + 18.5244325 + ], + [ + -72.3475303, + 18.5277645 + ], + [ + -72.3455501, + 18.5291131 + ], + [ + -72.3403069, + 18.5292189 + ], + [ + -72.3383267, + 18.5280289 + ], + [ + -72.3369043, + 18.530118 + ], + [ + -72.3338086, + 18.5296684 + ], + [ + -72.3289279, + 18.5270769 + ], + [ + -72.328649, + 18.5253316 + ], + [ + -72.3292068, + 18.5232689 + ], + [ + -72.330406, + 18.5220524 + ], + [ + -72.3321631, + 18.5221847 + ], + [ + -72.3322467, + 18.5191963 + ], + [ + -72.3369183, + 18.5183633 + ], + [ + -72.3382012, + 18.5184691 + ], + [ + -72.3381454, + 18.5181782 + ], + [ + -72.3411993, + 18.5177947 + ], + [ + -72.3454943, + 18.5171997 + ], + [ + -72.3492595, + 18.517279 + ], + [ + -72.3504308, + 18.5188922 + ], + [ + -72.3503472, + 18.5206112 + ], + [ + -72.3496778, + 18.5220392 + ] + ], + [ + [ + -72.3303078, + 18.5486462 + ], + [ + -72.3429687, + 18.5508149 + ], + [ + -72.3433236, + 18.5530585 + ], + [ + -72.3413121, + 18.5614341 + ], + [ + -72.3390639, + 18.5613593 + ], + [ + -72.3384723, + 18.5638271 + ], + [ + -72.3375257, + 18.5654348 + ], + [ + -72.3348436, + 18.5650609 + ], + [ + -72.3311755, + 18.5638271 + ], + [ + -72.3312149, + 18.5616211 + ], + [ + -72.3232082, + 18.5606863 + ], + [ + -72.3212361, + 18.559602 + ], + [ + -72.3208023, + 18.5587046 + ], + [ + -72.3208811, + 18.557882 + ], + [ + -72.3259493, + 18.5580274 + ], + [ + -72.3266186, + 18.5581993 + ], + [ + -72.3259214, + 18.5577498 + ], + [ + -72.3250986, + 18.5573797 + ], + [ + -72.3233767, + 18.552263 + ], + [ + -72.3245994, + 18.5478507 + ], + [ + -72.3288986, + 18.5483742 + ], + [ + -72.329979, + 18.5489548 + ] + ], + [ + [ + -72.3231383, + 18.5269828 + ], + [ + -72.3223434, + 18.528067 + ], + [ + -72.3209629, + 18.5279745 + ], + [ + -72.3207816, + 18.5271282 + ], + [ + -72.3208513, + 18.5253697 + ], + [ + -72.3214649, + 18.5249598 + ], + [ + -72.3225666, + 18.5248937 + ], + [ + -72.3228454, + 18.52533 + ], + [ + -72.3232359, + 18.5264804 + ] + ], + [ + [ + -72.2160832, + 18.6457752 + ], + [ + -72.2159649, + 18.6553795 + ], + [ + -72.2030279, + 18.6558279 + ], + [ + -72.1947057, + 18.6553421 + ], + [ + -72.1922208, + 18.6545573 + ], + [ + -72.1920631, + 18.6521283 + ], + [ + -72.193483, + 18.6477559 + ], + [ + -72.201253, + 18.6385249 + ], + [ + -72.2069327, + 18.6388239 + ], + [ + -72.2120996, + 18.6424117 + ], + [ + -72.2118068, + 18.6430591 + ], + [ + -72.2121693, + 18.6426892 + ], + [ + -72.2127968, + 18.6427552 + ], + [ + -72.2134662, + 18.6431252 + ], + [ + -72.2135638, + 18.6437462 + ], + [ + -72.2154176, + 18.6443947 + ], + [ + -72.2158909, + 18.6450301 + ] + ], + [ + [ + -72.2867654, + 18.6482017 + ], + [ + -72.2900977, + 18.6527446 + ], + [ + -72.28981, + 18.6536532 + ], + [ + -72.2900738, + 18.6542664 + ], + [ + -72.290721, + 18.6537667 + ], + [ + -72.2910327, + 18.6544709 + ], + [ + -72.2912485, + 18.654221 + ], + [ + -72.29168, + 18.6558905 + ], + [ + -72.2912245, + 18.656606 + ], + [ + -72.2922673, + 18.65597 + ], + [ + -72.2926869, + 18.6567536 + ], + [ + -72.2930705, + 18.6567309 + ], + [ + -72.2941253, + 18.6581846 + ], + [ + -72.2960192, + 18.6608421 + ], + [ + -72.2959713, + 18.6619096 + ], + [ + -72.2932862, + 18.664567 + ], + [ + -72.2906731, + 18.6659979 + ], + [ + -72.2895943, + 18.6661342 + ], + [ + -72.2895943, + 18.6665657 + ], + [ + -72.2877004, + 18.6664749 + ], + [ + -72.2875805, + 18.6676559 + ], + [ + -72.2831214, + 18.6697227 + ], + [ + -72.2796453, + 18.6696546 + ], + [ + -72.2784311, + 18.6690787 + ], + [ + -72.2783972, + 18.6687736 + ], + [ + -72.277736, + 18.6691671 + ], + [ + -72.2774394, + 18.669143 + ], + [ + -72.2770071, + 18.6683159 + ], + [ + -72.2765575, + 18.6681125 + ], + [ + -72.2765385, + 18.6680583 + ], + [ + -72.2752319, + 18.6685239 + ], + [ + -72.2749292, + 18.6674649 + ], + [ + -72.2746416, + 18.6674309 + ], + [ + -72.2734668, + 18.6682145 + ], + [ + -72.2732271, + 18.6682712 + ], + [ + -72.2726757, + 18.6671583 + ], + [ + -72.2719147, + 18.6674288 + ], + [ + -72.2718808, + 18.6673405 + ], + [ + -72.2688149, + 18.6681868 + ], + [ + -72.2688269, + 18.6671761 + ], + [ + -72.2690786, + 18.6668241 + ], + [ + -72.2688149, + 18.66679 + ], + [ + -72.2681077, + 18.6670739 + ], + [ + -72.2676282, + 18.6673805 + ], + [ + -72.2675563, + 18.6666878 + ], + [ + -72.266861, + 18.666949 + ], + [ + -72.2655904, + 18.6673578 + ], + [ + -72.2654466, + 18.6670058 + ], + [ + -72.2647514, + 18.6674146 + ], + [ + -72.2629893, + 18.6681868 + ], + [ + -72.2628455, + 18.6681754 + ], + [ + -72.2626537, + 18.6676076 + ], + [ + -72.2623001, + 18.6677098 + ], + [ + -72.2624799, + 18.6679199 + ], + [ + -72.2624799, + 18.6682322 + ], + [ + -72.262306, + 18.6682606 + ], + [ + -72.2620963, + 18.6679654 + ], + [ + -72.2622761, + 18.6689193 + ], + [ + -72.2601484, + 18.6688966 + ], + [ + -72.2542749, + 18.6687944 + ], + [ + -72.2505388, + 18.6683476 + ], + [ + -72.2504371, + 18.669536 + ], + [ + -72.2477926, + 18.6698893 + ], + [ + -72.2415204, + 18.669793 + ], + [ + -72.2414187, + 18.6741933 + ], + [ + -72.2389167, + 18.6739759 + ], + [ + -72.2387249, + 18.6734649 + ], + [ + -72.2383653, + 18.6733059 + ], + [ + -72.2387009, + 18.6739532 + ], + [ + -72.2375502, + 18.6738964 + ], + [ + -72.2374183, + 18.6735103 + ], + [ + -72.237742, + 18.67334 + ], + [ + -72.2375142, + 18.6732605 + ], + [ + -72.236843, + 18.6734876 + ], + [ + -72.2364354, + 18.6724088 + ], + [ + -72.2355124, + 18.6726019 + ], + [ + -72.2354045, + 18.6724202 + ], + [ + -72.2353027, + 18.6729028 + ], + [ + -72.2345475, + 18.6726871 + ], + [ + -72.2343077, + 18.6724599 + ], + [ + -72.2342358, + 18.6734706 + ], + [ + -72.2334087, + 18.6734592 + ], + [ + -72.2332889, + 18.6733003 + ], + [ + -72.2327375, + 18.6732889 + ], + [ + -72.2327135, + 18.6735047 + ], + [ + -72.227703, + 18.6725281 + ], + [ + -72.2265283, + 18.6716537 + ], + [ + -72.226804, + 18.6715742 + ], + [ + -72.2274993, + 18.6715855 + ], + [ + -72.2274873, + 18.6714493 + ], + [ + -72.2272899, + 18.6714623 + ], + [ + -72.2272814, + 18.6712977 + ], + [ + -72.2272094, + 18.671358 + ], + [ + -72.2261785, + 18.6713693 + ], + [ + -72.2256032, + 18.670881 + ], + [ + -72.2255073, + 18.6694502 + ], + [ + -72.2261066, + 18.6696886 + ], + [ + -72.2261785, + 18.6695949 + ], + [ + -72.2259837, + 18.6695495 + ], + [ + -72.225777, + 18.6691379 + ], + [ + -72.2253335, + 18.6694643 + ], + [ + -72.2249739, + 18.66947 + ], + [ + -72.2245783, + 18.6678802 + ], + [ + -72.2235525, + 18.6677046 + ], + [ + -72.2235907, + 18.6675921 + ], + [ + -72.2224634, + 18.6676283 + ], + [ + -72.2223659, + 18.667022 + ], + [ + -72.2223277, + 18.6670943 + ], + [ + -72.2219209, + 18.667026 + ], + [ + -72.2208105, + 18.6669015 + ], + [ + -72.220809, + 18.6665325 + ], + [ + -72.2208705, + 18.6663593 + ], + [ + -72.2206023, + 18.6668107 + ], + [ + -72.2203895, + 18.6666361 + ], + [ + -72.2184341, + 18.6650535 + ], + [ + -72.21829, + 18.6640979 + ], + [ + -72.2183493, + 18.6608376 + ], + [ + -72.2187223, + 18.6606541 + ], + [ + -72.2186894, + 18.660603 + ], + [ + -72.2187253, + 18.6604525 + ], + [ + -72.2189771, + 18.6603247 + ], + [ + -72.2187823, + 18.6601998 + ], + [ + -72.2186984, + 18.6602367 + ], + [ + -72.2185815, + 18.6600352 + ], + [ + -72.2186085, + 18.6600039 + ], + [ + -72.2187823, + 18.6601345 + ], + [ + -72.218995, + 18.6600181 + ], + [ + -72.2189111, + 18.6599131 + ], + [ + -72.2189681, + 18.6597938 + ], + [ + -72.2183807, + 18.6595837 + ], + [ + -72.2184728, + 18.6539662 + ], + [ + -72.2201001, + 18.6511554 + ], + [ + -72.225796, + 18.6469472 + ], + [ + -72.2283048, + 18.6457265 + ], + [ + -72.2379335, + 18.645855 + ], + [ + -72.237764, + 18.6446985 + ], + [ + -72.2400355, + 18.6432529 + ], + [ + -72.2455958, + 18.6433493 + ], + [ + -72.2482742, + 18.6450358 + ], + [ + -72.2487488, + 18.6436705 + ], + [ + -72.2511067, + 18.6429775 + ], + [ + -72.2512385, + 18.6433409 + ], + [ + -72.2512625, + 18.6431592 + ], + [ + -72.2514843, + 18.6431365 + ], + [ + -72.2513284, + 18.6429718 + ], + [ + -72.2533602, + 18.6423471 + ], + [ + -72.253516, + 18.6426765 + ], + [ + -72.2539535, + 18.6425402 + ], + [ + -72.2541453, + 18.642932 + ], + [ + -72.2543851, + 18.6428696 + ], + [ + -72.2543791, + 18.6427503 + ], + [ + -72.2564168, + 18.6423244 + ], + [ + -72.2566925, + 18.6431365 + ], + [ + -72.2568783, + 18.6428582 + ], + [ + -72.2568184, + 18.6425288 + ], + [ + -72.258843, + 18.6420991 + ], + [ + -72.258885, + 18.6422467 + ], + [ + -72.2592626, + 18.6422297 + ], + [ + -72.2596461, + 18.6424057 + ], + [ + -72.2592206, + 18.6406907 + ], + [ + -72.2599545, + 18.6404815 + ], + [ + -72.2601156, + 18.6406341 + ], + [ + -72.2601156, + 18.6399393 + ], + [ + -72.2615268, + 18.6394669 + ], + [ + -72.2626056, + 18.6391034 + ], + [ + -72.2654465, + 18.6387286 + ], + [ + -72.2719433, + 18.6386832 + ], + [ + -72.272201, + 18.6388649 + ], + [ + -72.2730341, + 18.6394158 + ], + [ + -72.273166, + 18.6412558 + ], + [ + -72.2738732, + 18.6410286 + ], + [ + -72.2742208, + 18.6416079 + ], + [ + -72.2752187, + 18.6416987 + ], + [ + -72.2754524, + 18.6415738 + ], + [ + -72.2755513, + 18.6416874 + ], + [ + -72.2755394, + 18.6417527 + ], + [ + -72.2764713, + 18.6418634 + ], + [ + -72.276753, + 18.6418975 + ], + [ + -72.2762953, + 18.6426002 + ], + [ + -72.2774226, + 18.6429978 + ], + [ + -72.277982, + 18.6427247 + ], + [ + -72.2785796, + 18.6431303 + ], + [ + -72.2785669, + 18.6432307 + ], + [ + -72.2789017, + 18.6433471 + ], + [ + -72.279851, + 18.6439655 + ], + [ + -72.2858703, + 18.6469651 + ] + ], + [ + [ + -72.5557247, + 18.5305893 + ], + [ + -72.5555866, + 18.5367036 + ], + [ + -72.554995, + 18.537975 + ], + [ + -72.5488026, + 18.537919 + ], + [ + -72.5486646, + 18.5372832 + ], + [ + -72.548842, + 18.5306267 + ], + [ + -72.5493745, + 18.5301031 + ], + [ + -72.555133, + 18.5301218 + ] + ], + [ + [ + -72.6235278, + 18.5079877 + ], + [ + -72.6234441, + 18.5095217 + ], + [ + -72.6226074, + 18.5104341 + ], + [ + -72.6204878, + 18.511849 + ], + [ + -72.6183403, + 18.5107514 + ], + [ + -72.6162207, + 18.5083183 + ], + [ + -72.6162625, + 18.506467 + ], + [ + -72.618661, + 18.5044438 + ], + [ + -72.6204041, + 18.5044967 + ], + [ + -72.6228305, + 18.506996 + ] + ] + ] + }, + { + "name": "Ireland Bartholomew Quarter-Inch 1940", + "type": "tms", + "template": "http://geo.nls.uk/maps/ireland/bartholomew/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 5, + 13 + ], + "polygon": [ + [ + [ + -8.8312773, + 55.3963337 + ], + [ + -7.3221271, + 55.398605 + ], + [ + -7.2891331, + 55.4333162 + ], + [ + -7.2368042, + 55.4530757 + ], + [ + -7.18881, + 55.4497995 + ], + [ + -7.1528144, + 55.3968384 + ], + [ + -6.90561, + 55.394903 + ], + [ + -6.9047153, + 55.3842114 + ], + [ + -5.8485282, + 55.3922956 + ], + [ + -5.8378629, + 55.248676 + ], + [ + -5.3614762, + 55.2507024 + ], + [ + -5.3899172, + 53.8466464 + ], + [ + -5.8734141, + 53.8487436 + ], + [ + -5.8983, + 52.8256258 + ], + [ + -6.0191742, + 52.8256258 + ], + [ + -6.0262844, + 51.7712367 + ], + [ + -8.1131422, + 51.7712367 + ], + [ + -8.1273627, + 51.3268839 + ], + [ + -10.6052842, + 51.3091083 + ], + [ + -10.6271879, + 52.0328254 + ], + [ + -10.6469845, + 52.0322454 + ], + [ + -10.6469845, + 52.0440365 + ], + [ + -10.6271879, + 52.0448095 + ], + [ + -10.6290733, + 52.0745627 + ], + [ + -10.6699234, + 52.0743695 + ], + [ + -10.6702376, + 52.0876941 + ], + [ + -10.6312729, + 52.0898179 + ], + [ + -10.6393128, + 52.4147202 + ], + [ + -10.3137689, + 52.4185533 + ], + [ + -10.3166401, + 53.3341342 + ], + [ + -10.3699669, + 53.3330727 + ], + [ + -10.385965, + 54.3534472 + ], + [ + -8.8163777, + 54.3586265 + ], + [ + -8.8173427, + 54.6595721 + ], + [ + -8.8413398, + 54.6616284 + ], + [ + -8.8422286, + 54.6929749 + ], + [ + -8.8315632, + 54.7145436 + ], + [ + -8.8151208, + 54.7145436 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "Ireland British War Office One-Inch 1941-43 GSGS 4136", + "type": "tms", + "template": "http://geo.nls.uk/maps/ireland/gsgs4136/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 5, + 15 + ], + "polygon": [ + [ + [ + -10.0847426, + 51.4147902 + ], + [ + -10.0906535, + 51.5064103 + ], + [ + -10.4564222, + 51.5003961 + ], + [ + -10.5005905, + 52.3043019 + ], + [ + -10.0837522, + 52.312741 + ], + [ + -10.0840973, + 52.3404698 + ], + [ + -10.055802, + 52.3408915 + ], + [ + -10.0768509, + 52.7628238 + ], + [ + -9.7780248, + 52.7684611 + ], + [ + -9.7818205, + 52.8577261 + ], + [ + -9.6337877, + 52.8596012 + ], + [ + -9.6449626, + 53.1294502 + ], + [ + -10.0919663, + 53.1227152 + ], + [ + -10.1051422, + 53.3912913 + ], + [ + -10.4052593, + 53.3866349 + ], + [ + -10.4530828, + 54.193502 + ], + [ + -10.2998523, + 54.1974988 + ], + [ + -10.3149801, + 54.4669592 + ], + [ + -8.9276095, + 54.4853897 + ], + [ + -8.9339534, + 54.7546562 + ], + [ + -8.7773069, + 54.755501 + ], + [ + -8.7826749, + 55.0252208 + ], + [ + -8.9402974, + 55.0238221 + ], + [ + -8.9451773, + 55.2934155 + ], + [ + -7.528039, + 55.2970274 + ], + [ + -7.525599, + 55.3874955 + ], + [ + -7.0541955, + 55.3841691 + ], + [ + -7.0556595, + 55.2939712 + ], + [ + -6.3241545, + 55.2859128 + ], + [ + -6.3217146, + 55.3253556 + ], + [ + -6.1035807, + 55.3223016 + ], + [ + -6.1045566, + 55.2828557 + ], + [ + -5.7985836, + 55.2772968 + ], + [ + -5.8117595, + 55.0087135 + ], + [ + -5.656577, + 55.0056351 + ], + [ + -5.6721928, + 54.7355021 + ], + [ + -5.3618278, + 54.729585 + ], + [ + -5.3964755, + 54.1917889 + ], + [ + -5.855679, + 54.2017807 + ], + [ + -5.9220464, + 52.8524504 + ], + [ + -6.070885, + 52.8551025 + ], + [ + -6.1030927, + 52.1373337 + ], + [ + -6.8331336, + 52.1463183 + ], + [ + -6.8355736, + 52.0578908 + ], + [ + -7.5641506, + 52.0617913 + ], + [ + -7.5661026, + 51.7921593 + ], + [ + -8.147305, + 51.792763 + ], + [ + -8.146329, + 51.7033331 + ], + [ + -8.2912636, + 51.7027283 + ], + [ + -8.2897996, + 51.5227274 + ], + [ + -9.1174397, + 51.516958 + ], + [ + -9.1179277, + 51.4625685 + ], + [ + -9.3692452, + 51.4616564 + ], + [ + -9.3672933, + 51.4254613 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "Ireland EEA CORINE 2006", + "type": "tms", + "template": "http://a.tile.openstreetmap.ie/tiles/corine/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 5, + 16 + ], + "polygon": [ + [ + [ + -5.842956, + 53.8627976 + ], + [ + -5.8341575, + 53.7633541 + ], + [ + -5.6267647, + 53.5383692 + ], + [ + -5.9648778, + 52.1631197 + ], + [ + -6.0453211, + 52.0527275 + ], + [ + -6.1823261, + 51.9699475 + ], + [ + -6.3960035, + 51.9234618 + ], + [ + -6.5945978, + 51.883911 + ], + [ + -7.2481994, + 51.9056295 + ], + [ + -7.341212, + 51.8148076 + ], + [ + -8.1971787, + 51.5037019 + ], + [ + -8.3191005, + 51.4167737 + ], + [ + -9.4478202, + 51.1991221 + ], + [ + -9.9015706, + 51.2266802 + ], + [ + -10.472215, + 51.4050139 + ], + [ + -10.8857437, + 51.6770619 + ], + [ + -11.035318, + 52.0620016 + ], + [ + -10.9950963, + 52.1831616 + ], + [ + -10.8178697, + 52.3139827 + ], + [ + -9.8839736, + 52.9032208 + ], + [ + -10.1165049, + 52.9676141 + ], + [ + -10.5514014, + 53.3317027 + ], + [ + -10.6896633, + 53.5854022 + ], + [ + -10.6444139, + 54.0100436 + ], + [ + -10.5501445, + 54.257482 + ], + [ + -10.2824192, + 54.4742405 + ], + [ + -9.8073011, + 54.5705346 + ], + [ + -9.196435, + 54.5486695 + ], + [ + -9.2253443, + 54.7000264 + ], + [ + -8.8985435, + 55.1363582 + ], + [ + -8.0476045, + 55.4711977 + ], + [ + -7.4367384, + 55.6191092 + ], + [ + -7.2205471, + 55.6205288 + ], + [ + -6.8258723, + 55.5608644 + ], + [ + -6.0679458, + 55.3727567 + ], + [ + -5.5639184, + 55.0759594 + ], + [ + -5.0649187, + 54.4640142 + ], + [ + -5.2572284, + 54.1582424 + ] + ] + ], + "terms_url": "http://www.eea.europa.eu/data-and-maps/data/clc-2006-vector-data-version-1", + "terms_text": "EEA Corine 2006" + }, + { + "name": "Ireland EEA GMES Urban Atlas", + "type": "tms", + "template": "http://a.tile.openstreetmap.ie/tiles/urbanatlas/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 5, + 17 + ], + "polygon": [ + [ + [ + -9.2759602, + 52.7993666 + ], + [ + -9.215509, + 52.8276933 + ], + [ + -9.1086618, + 52.9128016 + ], + [ + -9.0196831, + 52.8837107 + ], + [ + -8.8760649, + 52.8978445 + ], + [ + -8.8001797, + 52.8833558 + ], + [ + -8.7665597, + 52.9065354 + ], + [ + -8.5938079, + 52.9238592 + ], + [ + -8.5241972, + 52.8869724 + ], + [ + -8.4956786, + 52.9105906 + ], + [ + -8.3506448, + 52.9238592 + ], + [ + -8.2718204, + 52.9492401 + ], + [ + -8.2249679, + 52.8991338 + ], + [ + -8.1564001, + 52.9149986 + ], + [ + -8.0881237, + 52.7630417 + ], + [ + -8.1360092, + 52.7239783 + ], + [ + -8.1570652, + 52.6766443 + ], + [ + -8.2059695, + 52.6185385 + ], + [ + -8.2025734, + 52.5954396 + ], + [ + -8.2231242, + 52.5599691 + ], + [ + -8.2236294, + 52.5095371 + ], + [ + -8.2976651, + 52.5025088 + ], + [ + -8.3295888, + 52.4721087 + ], + [ + -8.3589695, + 52.4986072 + ], + [ + -8.3737385, + 52.4764529 + ], + [ + -8.432326, + 52.4342609 + ], + [ + -8.4754569, + 52.4216289 + ], + [ + -8.5017727, + 52.3870011 + ], + [ + -8.5476205, + 52.3681351 + ], + [ + -8.6444103, + 52.3376422 + ], + [ + -8.6841451, + 52.3660614 + ], + [ + -8.8154099, + 52.3721014 + ], + [ + -8.8614233, + 52.3521652 + ], + [ + -8.9074451, + 52.3824674 + ], + [ + -8.9388551, + 52.3789166 + ], + [ + -8.9782502, + 52.4093811 + ], + [ + -9.0298715, + 52.4104169 + ], + [ + -9.1059449, + 52.420981 + ], + [ + -9.1084962, + 52.4415071 + ], + [ + -9.140702, + 52.4650891 + ], + [ + -9.1315765, + 52.5136207 + ], + [ + -9.1739699, + 52.5620573 + ], + [ + -9.1426235, + 52.589645 + ], + [ + -9.1542382, + 52.610216 + ], + [ + -9.1426231, + 52.6387401 + ], + [ + -9.1776844, + 52.6447573 + ], + [ + -9.2012184, + 52.6526248 + ], + [ + -9.2036198, + 52.6686468 + ], + [ + -9.2238348, + 52.6706578 + ], + [ + -9.2161072, + 52.6919412 + ], + [ + -9.1882395, + 52.7057242 + ], + [ + -9.2750099, + 52.7350292 + ], + [ + -9.2601152, + 52.7616711 + ] + ], + [ + [ + -7.307313219981238, + 53.81625879275365 + ], + [ + -7.245858447032101, + 53.78300449111207 + ], + [ + -7.15144468970801, + 53.81179938127503 + ], + [ + -7.086900011973722, + 53.784424420834 + ], + [ + -7.0347149533800435, + 53.77996162275688 + ], + [ + -6.975320116954343, + 53.788481098127924 + ], + [ + -6.928628222423156, + 53.81443454540607 + ], + [ + -6.992829577403537, + 53.86609081229548 + ], + [ + -6.975320116954343, + 53.87945028968944 + ], + [ + -6.949914233165313, + 53.87094929783329 + ], + [ + -6.9375546140247035, + 53.87540241385127 + ], + [ + -6.936867968516893, + 53.896649390754646 + ], + [ + -6.897042529063821, + 53.889770599553906 + ], + [ + -6.867516772227924, + 53.880259817835736 + ], + [ + -6.851037280040446, + 53.88450958346468 + ], + [ + -6.842454211192801, + 53.89786317755242 + ], + [ + -6.812928454356904, + 53.90069520963246 + ], + [ + -6.79850889869286, + 53.89280549994937 + ], + [ + -6.789925829845217, + 53.89462633440526 + ], + [ + -6.791985766368652, + 53.904538374710896 + ], + [ + -6.778939501720231, + 53.918087767078354 + ], + [ + -6.77001311011868, + 53.91505470292794 + ], + [ + -6.75868345923979, + 53.921727153244476 + ], + [ + -6.744263903575747, + 53.916065748791254 + ], + [ + -6.727441088634364, + 53.92334455637637 + ], + [ + -6.713021532970319, + 53.90777445003927 + ], + [ + -6.684182421642232, + 53.90292024303218 + ], + [ + -6.623757616954815, + 53.88187882710815 + ], + [ + -6.590455309825955, + 53.857789593974296 + ], + [ + -6.591141955333765, + 53.835509894663346 + ], + [ + -6.574319140392382, + 53.82254170362619 + ], + [ + -6.571572558361136, + 53.804703885117576 + ], + [ + -6.5533764524041285, + 53.79983770791046 + ], + [ + -6.541360156017425, + 53.78300449111207 + ], + [ + -6.511491076427622, + 53.76900546961285 + ], + [ + -6.472695605236269, + 53.77326653566421 + ], + [ + -6.443513171154276, + 53.76393220797015 + ], + [ + -6.44728972144724, + 53.75114486961979 + ], + [ + -6.4775021237909485, + 53.728199094666586 + ], + [ + -6.459649340587848, + 53.71682309412751 + ], + [ + -6.435616747814443, + 53.72230833571077 + ], + [ + -6.4198239011347775, + 53.72921465935537 + ], + [ + -6.4009411496699595, + 53.72169889975152 + ], + [ + -6.375878588634836, + 53.718042098526006 + ], + [ + -6.359055773693453, + 53.708695495259434 + ], + [ + -6.340173022228636, + 53.708085862042424 + ], + [ + -6.329873339611461, + 53.71296268045594 + ], + [ + -6.325753466564592, + 53.72210519137233 + ], + [ + -6.2938244504513525, + 53.72576163932632 + ], + [ + -6.265328661877173, + 53.7363229253304 + ], + [ + -6.240952746349864, + 53.734292114843086 + ], + [ + -6.180871264416349, + 53.632015710147016 + ], + [ + -6.092793818322125, + 53.588038288422446 + ], + [ + -5.985734079608837, + 53.49383447350347 + ], + [ + -6.0887447432153685, + 53.27174268379562 + ], + [ + -6.033272979232964, + 53.1191110041494 + ], + [ + -5.984663357119282, + 52.9651254915577 + ], + [ + -6.122679104189409, + 52.73207538466633 + ], + [ + -6.185163845400262, + 52.73706461957944 + ], + [ + -6.1899703639549415, + 52.76075568810044 + ], + [ + -6.319059719423517, + 52.782357357522855 + ], + [ + -6.393904079774976, + 52.7790347214105 + ], + [ + -6.465315212587381, + 52.6946379192593 + ], + [ + -6.534666408876349, + 52.673409093161446 + ], + [ + -6.612257351259057, + 52.69255711803012 + ], + [ + -6.6692489284074155, + 52.74745702505679 + ], + [ + -6.671308864930852, + 52.76948072949997 + ], + [ + -6.720747341493285, + 52.7748810695361 + ], + [ + -6.71456753192298, + 52.80311808637125 + ], + [ + -6.658949245790243, + 52.84709806982182 + ], + [ + -6.582044948915348, + 52.81349473557279 + ], + [ + -6.547712673524768, + 52.83133677935633 + ], + [ + -6.531233181337292, + 52.87404491274922 + ], + [ + -6.617750515321548, + 52.87528820923615 + ], + [ + -6.728987087587023, + 52.90635903963372 + ], + [ + -6.780485500672891, + 52.859122574848655 + ], + [ + -6.870436062196207, + 52.85165948109425 + ], + [ + -6.938413967469552, + 52.86658438536895 + ], + [ + -6.965879787782016, + 52.89766145203082 + ], + [ + -6.987852444031986, + 52.969260966642985 + ], + [ + -7.039350857117853, + 52.9560260536776 + ], + [ + -7.109388698914634, + 53.007288776633686 + ], + [ + -7.068876613953752, + 53.058078015357786 + ], + [ + -7.088789333680287, + 53.11869890949892 + ], + [ + -7.119688381531809, + 53.15000684568904 + ], + [ + -7.105955471375577, + 53.16112391039828 + ], + [ + -7.127928127625547, + 53.17223809655703 + ], + [ + -7.180113186219227, + 53.182526443342745 + ], + [ + -7.160887112000503, + 53.19898266621498 + ], + [ + -7.057890285828767, + 53.19898266621498 + ], + [ + -7.048963894227218, + 53.217077217179636 + ], + [ + -7.0915359157115345, + 53.235575105358386 + ], + [ + -7.0434707301647235, + 53.25735126035676 + ], + [ + -7.05102383075065, + 53.29717703664696 + ], + [ + -6.996778835633536, + 53.31112780504489 + ], + [ + -7.044157375672535, + 53.33368557548294 + ], + [ + -7.105955471375576, + 53.371801590024276 + ], + [ + -7.22050647653913, + 53.432465115081854 + ], + [ + -7.149441429887032, + 53.45731709817442 + ], + [ + -7.099891489102085, + 53.463915962572514 + ], + [ + -7.0744645458045445, + 53.48370640260363 + ], + [ + -7.079028356140001, + 53.504650927752664 + ], + [ + -7.047733656696876, + 53.515119311359335 + ], + [ + -7.029478415355053, + 53.54147267392419 + ], + [ + -7.054253385747527, + 53.56471202500164 + ], + [ + -7.009267255298033, + 53.58561652973758 + ], + [ + -6.992641946218873, + 53.602642188744426 + ], + [ + -6.989056095241016, + 53.62739453790707 + ], + [ + -6.9717788132567895, + 53.63686620586593 + ], + [ + -6.9633031654909425, + 53.650973114934644 + ], + [ + -6.9871001765258205, + 53.66623418009986 + ], + [ + -6.999813648174589, + 53.67086935885432 + ], + [ + -7.008289295940436, + 53.65908728051006 + ], + [ + -7.044473792171549, + 53.65367801032349 + ], + [ + -7.066640870943764, + 53.63918547390694 + ], + [ + -7.101847407817279, + 53.65870092708686 + ], + [ + -7.120754622064167, + 53.672993645380515 + ], + [ + -7.137379931143327, + 53.66893809633893 + ], + [ + -7.160850955725672, + 53.683034277255075 + ], + [ + -7.174216400279507, + 53.686316272406906 + ], + [ + -7.196057492599188, + 53.69017711570491 + ], + [ + -7.210726882963154, + 53.69480966037566 + ], + [ + -7.247237365646801, + 53.71661437518035 + ], + [ + -7.239413690786019, + 53.73223735177976 + ], + [ + -7.260276823748104, + 53.74361339729716 + ], + [ + -7.2814659431627184, + 53.75922634307083 + ], + [ + -7.289615604476034, + 53.77271433845693 + ], + [ + -7.3238441819919515, + 53.78465723043301 + ], + [ + -7.337209626545788, + 53.78658318504567 + ], + [ + -7.351227044004687, + 53.80141007448381 + ], + [ + -7.307313219981238, + 53.81625879275365 + ] + ], + [ + [ + -5.685433013282673, + 54.77854496390836 + ], + [ + -5.696867084279401, + 54.73050346921268 + ], + [ + -5.8223689524230124, + 54.70033215177621 + ], + [ + -5.878760568989772, + 54.649492182564074 + ], + [ + -5.743404719024681, + 54.68128223623249 + ], + [ + -5.581196917402638, + 54.68781619319656 + ], + [ + -5.571488953592992, + 54.67074450064368 + ], + [ + -5.582915011231644, + 54.66440901595977 + ], + [ + -5.58291501123164, + 54.65085746679818 + ], + [ + -5.6086481910584185, + 54.63997082553691 + ], + [ + -5.6354970593650116, + 54.61551371292451 + ], + [ + -5.728732824433139, + 54.6184944610979 + ], + [ + -5.822612969913913, + 54.49193018941315 + ], + [ + -5.896754545381575, + 54.44975600798866 + ], + [ + -5.936834914186871, + 54.38213187386197 + ], + [ + -6.0187561190025445, + 54.36974944197913 + ], + [ + -6.059257912638059, + 54.38280030737259 + ], + [ + -6.101784280694663, + 54.41510088826871 + ], + [ + -6.1740201072375225, + 54.43476829635816 + ], + [ + -6.216261364689026, + 54.42827259213158 + ], + [ + -6.264329002478664, + 54.487825014814625 + ], + [ + -6.249277519938476, + 54.49741303545491 + ], + [ + -6.288340515296785, + 54.53143435197413 + ], + [ + -6.283750270272458, + 54.54447449434036 + ], + [ + -6.321445027854273, + 54.58928767713928 + ], + [ + -6.264329002478664, + 54.604982769755765 + ], + [ + -6.240052417736423, + 54.59541999854735 + ], + [ + -6.098762694536575, + 54.631690374598676 + ], + [ + -6.051950538018501, + 54.61314575326238 + ], + [ + -6.031509408441251, + 54.620921248201434 + ], + [ + -6.002995140908084, + 54.65571636730639 + ], + [ + -6.0647754758974335, + 54.6634355452454 + ], + [ + -6.059920158948984, + 54.704134188139534 + ], + [ + -6.047781866577864, + 54.71395188569398 + ], + [ + -6.120611620804591, + 54.801644524994515 + ], + [ + -6.002141887262449, + 54.80836072138932 + ], + [ + -5.984662746248036, + 54.78652900156178 + ], + [ + -5.685433013282673, + 54.77854496390836 + ] + ], + [ + [ + -9.128658300749114, + 53.24759266864586 + ], + [ + -9.024510568479629, + 53.26744820137083 + ], + [ + -9.016360907166316, + 53.26364619217274 + ], + [ + -9.001854510028616, + 53.26588844362053 + ], + [ + -8.9951717877517, + 53.259258838409615 + ], + [ + -8.973493688658284, + 53.262378780650025 + ], + [ + -8.95230456924367, + 53.271444820907114 + ], + [ + -8.956705386352859, + 53.281580911863244 + ], + [ + -8.961106203462048, + 53.28119110665652 + ], + [ + -8.960780217009516, + 53.28908396911955 + ], + [ + -8.954260487958864, + 53.28927883616923 + ], + [ + -8.95230456924367, + 53.30155366854246 + ], + [ + -8.963714095082308, + 53.303793931840495 + ], + [ + -8.9811543702928, + 53.294734752711804 + ], + [ + -8.985718180628256, + 53.30174847871221 + ], + [ + -9.019946758144176, + 53.30768976199425 + ], + [ + -9.00837423907927, + 53.31596722087059 + ], + [ + -9.01880580556031, + 53.31625933715475 + ], + [ + -9.045862681120513, + 53.31275380979257 + ], + [ + -9.06444390891487, + 53.32122500810515 + ], + [ + -9.080906224767762, + 53.307397587062724 + ], + [ + -9.08106921799403, + 53.303404329274585 + ], + [ + -9.09019683866494, + 53.30574189135002 + ], + [ + -9.095901601584261, + 53.298826232852214 + ], + [ + -9.10128037805105, + 53.3008718259498 + ], + [ + -9.115623781962478, + 53.28450433758295 + ], + [ + -9.121491538108067, + 53.2832375443259 + ], + [ + -9.13273807072044, + 53.28557621023763 + ], + [ + -9.144636576237877, + 53.27865728614638 + ], + [ + -9.13876882009229, + 53.26345120822951 + ], + [ + -9.128658300749114, + 53.24759266864586 + ] + ], + [ + [ + -8.595266214281438, + 51.69264788483154 + ], + [ + -8.55819409885298, + 51.69306638852667 + ], + [ + -8.566697711835303, + 51.682644706464686 + ], + [ + -8.579130708100188, + 51.67349700898941 + ], + [ + -8.544554623426079, + 51.66520531197343 + ], + [ + -8.494765061495364, + 51.667778759675976 + ], + [ + -8.30113898732036, + 51.7235009029955 + ], + [ + -8.268406960495541, + 51.784858633837544 + ], + [ + -8.154536388302146, + 51.7814362126791 + ], + [ + -8.115350159004825, + 51.809093351533164 + ], + [ + -8.068326683848039, + 51.870050153657075 + ], + [ + -8.10059769621054, + 51.89964422561186 + ], + [ + -8.08123508879304, + 51.918414974037226 + ], + [ + -8.09183842142643, + 51.95337589170907 + ], + [ + -8.124570448251253, + 51.95479649105758 + ], + [ + -8.132407694110718, + 51.970988142592034 + ], + [ + -8.099675667285895, + 51.978371865876596 + ], + [ + -8.144394070131078, + 52.02151390085561 + ], + [ + -8.159607547387685, + 52.064330945363764 + ], + [ + -8.140705954432507, + 52.07254939152303 + ], + [ + -8.165600735397863, + 52.09294727054506 + ], + [ + -8.18726841512697, + 52.0835993998731 + ], + [ + -8.2093971093184, + 52.10512489114057 + ], + [ + -8.207092037006792, + 52.12494181389489 + ], + [ + -8.227837687811258, + 52.143052434929714 + ], + [ + -8.222766528725723, + 52.16454923557058 + ], + [ + -8.30298304516965, + 52.1829264222872 + ], + [ + -8.427456949996438, + 52.17783811526099 + ], + [ + -8.46710419375608, + 52.169921813849676 + ], + [ + -8.509978538751975, + 52.18405707812542 + ], + [ + -8.530263175094117, + 52.16511480067495 + ], + [ + -8.574981577939297, + 52.18066502436804 + ], + [ + -8.587889982884295, + 52.16963906274442 + ], + [ + -8.642289689438227, + 52.18829678149147 + ], + [ + -8.719279104645906, + 52.15804472022032 + ], + [ + -8.698533453841442, + 52.13541291452849 + ], + [ + -8.740946784375014, + 52.10823956240069 + ], + [ + -8.77460084012448, + 52.05951253229793 + ], + [ + -8.803183736788409, + 52.03768144571248 + ], + [ + -8.86818677597573, + 52.03286015807593 + ], + [ + -8.870491848287335, + 52.01839317543363 + ], + [ + -8.844214023935015, + 51.991148511559096 + ], + [ + -8.79811257770287, + 51.964455373040394 + ], + [ + -8.782899100446263, + 51.931777239822054 + ], + [ + -8.835915763613228, + 51.9292188160068 + ], + [ + -8.838681850387156, + 51.90277322850554 + ], + [ + -8.802261707863764, + 51.89367006943167 + ], + [ + -8.792580404155013, + 51.85695425263326 + ], + [ + -8.765841565340368, + 51.82476769939557 + ], + [ + -8.758926348405547, + 51.80054140901511 + ], + [ + -8.79811257770287, + 51.78628456602828 + ], + [ + -8.832227647914657, + 51.79626482935233 + ], + [ + -8.836837792537873, + 51.77687258059678 + ], + [ + -8.885705325543944, + 51.746055989869106 + ], + [ + -8.859888515653944, + 51.72435763090916 + ], + [ + -8.807332866949299, + 51.71093369500414 + ], + [ + -8.678248817499297, + 51.693505197270746 + ], + [ + -8.60540853245251, + 51.67835695335278 + ], + [ + -8.595266214281438, + 51.69264788483154 + ] + ], + [ + [ + -7.138279151048154, + 55.06131559970097 + ], + [ + -7.117994514706011, + 54.99631329558348 + ], + [ + -7.070049010624583, + 54.98784996056705 + ], + [ + -7.076503213097081, + 54.93332450204895 + ], + [ + -7.025791622241725, + 54.91159959910791 + ], + [ + -7.007351043748867, + 54.87872502112528 + ], + [ + -7.024869593317081, + 54.8511320998998 + ], + [ + -6.990754523105296, + 54.81661438893913 + ], + [ + -7.051608432131725, + 54.80598761598125 + ], + [ + -7.115228427932084, + 54.80651902101645 + ], + [ + -7.170550163410654, + 54.84847793920564 + ], + [ + -7.199133060074584, + 54.84316909395457 + ], + [ + -7.222183783190655, + 54.85803210052931 + ], + [ + -7.2111194360949415, + 54.862808332627324 + ], + [ + -7.212041465019584, + 54.882438010878076 + ], + [ + -7.279349576518514, + 54.880846771447125 + ], + [ + -7.273817402970655, + 54.91530955931841 + ], + [ + -7.3033223285592275, + 54.915839525718205 + ], + [ + -7.363254208661015, + 54.90894941815292 + ], + [ + -7.385382902852443, + 54.91636948513913 + ], + [ + -7.391837105324943, + 54.93438395336098 + ], + [ + -7.429640291235302, + 54.95291983389722 + ], + [ + -7.420420001988872, + 54.99208185118366 + ], + [ + -7.410277683817801, + 55.03437621938347 + ], + [ + -7.3577220351131585, + 55.057619110599035 + ], + [ + -7.265519142648871, + 55.07557028899173 + ], + [ + -7.138279151048154, + 55.06131559970097 + ] + ], + [ + [ + -7.190498776293322, + 52.26144368927652 + ], + [ + -7.156844720543858, + 52.28443443581867 + ], + [ + -7.132871968503143, + 52.27343421670601 + ], + [ + -7.113278853854483, + 52.26779201951648 + ], + [ + -7.098295883829036, + 52.27230583471742 + ], + [ + -7.089767116276089, + 52.25509445009032 + ], + [ + -7.07109603055207, + 52.259186286149074 + ], + [ + -7.033984366335195, + 52.257352061495865 + ], + [ + -7.027530163862696, + 52.250720000975015 + ], + [ + -7.034675888028678, + 52.247756419376 + ], + [ + -7.031218279561267, + 52.24013487190721 + ], + [ + -7.034214873566356, + 52.23222966213934 + ], + [ + -7.050580886978767, + 52.2296884028405 + ], + [ + -7.062567262999124, + 52.21980434486687 + ], + [ + -7.076858711331088, + 52.216132562953725 + ], + [ + -7.084926464421715, + 52.22065163604718 + ], + [ + -7.084465449959392, + 52.22785295843095 + ], + [ + -7.101292477834124, + 52.221498911062525 + ], + [ + -7.105211100763858, + 52.21726237433474 + ], + [ + -7.111665303236357, + 52.21796849185403 + ], + [ + -7.107977187537785, + 52.21104805609072 + ], + [ + -7.117773744862115, + 52.20928246619701 + ], + [ + -7.129760120882472, + 52.21690931136535 + ], + [ + -7.14497359813908, + 52.21782726924826 + ], + [ + -7.150505771686938, + 52.22375823207553 + ], + [ + -7.158112510315241, + 52.22262858593765 + ], + [ + -7.158804032008724, + 52.22700580464912 + ], + [ + -7.158573524777563, + 52.23180612902503 + ], + [ + -7.167563306792832, + 52.23985256723076 + ], + [ + -7.16733279956167, + 52.244580933687786 + ], + [ + -7.172519212262786, + 52.24676851484933 + ], + [ + -7.177590371348324, + 52.25114335361416 + ], + [ + -7.190498776293322, + 52.26144368927652 + ] + ] + ], + "terms_url": "http://www.eea.europa.eu/data-and-maps/data/urban-atlas", + "terms_text": "EEA GMES Urban Atlas" + }, + { + "name": "Kanton Aargau 25cm (AGIS 2011)", + "type": "tms", + "template": "http://tiles.poole.ch/AGIS/OF2011/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 14, + 19 + ], + "polygon": [ + [ + [ + 7.7, + 47.12 + ], + [ + 7.7, + 47.63 + ], + [ + 8.5, + 47.63 + ], + [ + 8.5, + 47.12 + ], + [ + 7.7, + 47.12 + ] + ] + ], + "terms_text": "AGIS OF2011" + }, + { + "name": "Katastrálna mapa Slovenska (KaPor, 2010-04)", + "type": "tms", + "template": "http://www.freemap.sk/tms/kapor2/{zoom}/{x}/{y}.jpg", + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_url": "http://wiki.freemap.sk/KatasterPortal", + "terms_text": "Permisssion by UGKK" + }, + { + "name": "Katastrálna mapa Slovenska (KaPor, 2011-05)", + "type": "tms", + "template": "http://www.freemap.sk/tms/kapor2_201105/{zoom}/{x}/{y}.jpg", + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_url": "http://wiki.freemap.sk/KatasterPortal", + "terms_text": "Permisssion by UGKK" + }, + { + "name": "Lithuania - ORT10LT", + "type": "tms", + "template": "http://mapproxy.openmap.lt/ort10lt/g/{z}/{x}/{y}.jpeg", + "scaleExtent": [ + 4, + 18 + ], + "polygon": [ + [ + [ + 21, + 53.88 + ], + [ + 21, + 56.45 + ], + [ + 26.85, + 56.45 + ], + [ + 26.85, + 53.88 + ], + [ + 21, + 53.88 + ] + ] + ] + }, + { + "name": "Locator Overlay", + "type": "tms", + "description": "Shows major features to help orient you.", + "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/openstreetmap.map-btyhiati/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 16 + ], + "terms_url": "http://www.mapbox.com/about/maps/", + "terms_text": "Terms & Feedback", + "default": true, + "overlay": true + }, + { + "name": "MapBox Satellite", + "type": "tms", + "description": "Satellite and aerial imagery.", + "template": "http://{switch:a,b,c}.tiles.mapbox.com/v3/openstreetmap.map-4wvf9l0l/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 16 + ], + "terms_url": "http://www.mapbox.com/about/maps/", + "terms_text": "Terms & Feedback", + "default": true + }, + { + "name": "MapQuest Open Aerial", + "type": "tms", + "template": "http://oatile{switch:1,2,3,4}.mqcdn.com/tiles/1.0.0/sat/{zoom}/{x}/{y}.png", + "default": true + }, + { + "name": "NLS - Bartholomew Half Inch, 1897-1907", + "type": "tms", + "template": "http://geo.nls.uk/mapdata2/bartholomew/great_britain/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 0, + 15 + ], + "polygon": [ + [ + [ + -9, + 49.8 + ], + [ + -9, + 61.1 + ], + [ + 1.9, + 61.1 + ], + [ + 1.9, + 49.8 + ], + [ + -9, + 49.8 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "NLS - OS 1-inch 7th Series 1955-61", + "type": "tms", + "template": "http://geo.nls.uk/mapdata2/os/seventh/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 5, + 16 + ], + "polygon": [ + [ + [ + -6.4585407, + 49.9044128 + ], + [ + -6.3872009, + 49.9841116 + ], + [ + -6.2296827, + 49.9896159 + ], + [ + -6.2171269, + 49.8680087 + ], + [ + -6.4551164, + 49.8591793 + ] + ], + [ + [ + -1.4495137, + 60.8634056 + ], + [ + -0.7167114, + 60.8545122 + ], + [ + -0.7349744, + 60.4359756 + ], + [ + -0.6938826, + 60.4168218 + ], + [ + -0.7258429, + 60.3942735 + ], + [ + -0.7395401, + 60.0484714 + ], + [ + -0.9267357, + 60.0461918 + ], + [ + -0.9381501, + 59.8266157 + ], + [ + -1.4586452, + 59.831205 + ], + [ + -1.4455187, + 60.0535999 + ], + [ + -1.463211, + 60.0535999 + ], + [ + -1.4643524, + 60.0630002 + ], + [ + -1.5716475, + 60.0638546 + ], + [ + -1.5693646, + 60.1790005 + ], + [ + -1.643558, + 60.1807033 + ], + [ + -1.643558, + 60.1892162 + ], + [ + -1.8216221, + 60.1894999 + ], + [ + -1.8204807, + 60.3615507 + ], + [ + -1.8415973, + 60.3697345 + ], + [ + -1.8216221, + 60.3832755 + ], + [ + -1.8179852, + 60.5934321 + ], + [ + -1.453168, + 60.5934321 + ] + ], + [ + [ + -4.9089213, + 54.4242078 + ], + [ + -4.282598, + 54.4429861 + ], + [ + -4.2535417, + 54.029769 + ], + [ + -4.8766366, + 54.0221831 + ] + ], + [ + [ + -5.8667408, + 59.1444603 + ], + [ + -5.7759966, + 59.1470945 + ], + [ + -5.7720016, + 59.1014052 + ], + [ + -5.8621751, + 59.0990605 + ] + ], + [ + [ + -1.7065887, + 59.5703599 + ], + [ + -1.5579165, + 59.5693481 + ], + [ + -1.5564897, + 59.4965695 + ], + [ + -1.7054472, + 59.4975834 + ] + ], + [ + [ + -7.6865827, + 58.2940975 + ], + [ + -7.5330594, + 58.3006957 + ], + [ + -7.5256401, + 58.2646905 + ], + [ + -7.6797341, + 58.2577853 + ] + ], + [ + [ + -4.5338281, + 59.0359871 + ], + [ + -4.481322, + 59.0371616 + ], + [ + -4.4796099, + 59.0186583 + ], + [ + -4.5332574, + 59.0180707 + ] + ], + [ + [ + -8.6710698, + 57.8769896 + ], + [ + -8.4673234, + 57.8897332 + ], + [ + -8.4467775, + 57.7907 + ], + [ + -8.6510947, + 57.7779213 + ] + ], + [ + [ + -5.2395519, + 50.3530581 + ], + [ + -5.7920073, + 50.3384899 + ], + [ + -5.760047, + 49.9317027 + ], + [ + -4.6551363, + 49.9581461 + ], + [ + -4.677965, + 50.2860073 + ], + [ + -4.244219, + 50.2801723 + ], + [ + -4.2487848, + 50.2042525 + ], + [ + -3.3812929, + 50.2042525 + ], + [ + -3.4223846, + 50.5188201 + ], + [ + -3.1164796, + 50.5246258 + ], + [ + -3.1210453, + 50.6579592 + ], + [ + -2.6736357, + 50.6619495 + ], + [ + -2.5953453, + 50.6394325 + ], + [ + -2.5905026, + 50.5728419 + ], + [ + -2.4791203, + 50.5733545 + ], + [ + -2.4758919, + 50.5066704 + ], + [ + -2.3967943, + 50.5056438 + ], + [ + -2.401637, + 50.5723293 + ], + [ + -1.0400296, + 50.5718167 + ], + [ + -1.0335726, + 50.7059289 + ], + [ + -0.549302, + 50.7038843 + ], + [ + -0.5460736, + 50.7886618 + ], + [ + -0.0924734, + 50.7856002 + ], + [ + -0.0876307, + 50.7181949 + ], + [ + 0.4789659, + 50.7120623 + ], + [ + 0.487037, + 50.8182467 + ], + [ + 0.9761503, + 50.8049868 + ], + [ + 0.9922927, + 51.0126311 + ], + [ + 1.4491213, + 51.0004424 + ], + [ + 1.4781775, + 51.4090372 + ], + [ + 1.0229632, + 51.4271576 + ], + [ + 1.035877, + 51.7640881 + ], + [ + 1.6105448, + 51.7500992 + ], + [ + 1.646058, + 52.1560003 + ], + [ + 1.7267698, + 52.1540195 + ], + [ + 1.749369, + 52.4481811 + ], + [ + 1.7870672, + 52.4811624 + ], + [ + 1.759102, + 52.522505 + ], + [ + 1.7933451, + 52.9602749 + ], + [ + 0.3798147, + 52.9958468 + ], + [ + 0.3895238, + 53.2511239 + ], + [ + 0.3478614, + 53.2511239 + ], + [ + 0.3238912, + 53.282186 + ], + [ + 0.3461492, + 53.6538501 + ], + [ + 0.128487, + 53.6575466 + ], + [ + 0.116582, + 53.6674703 + ], + [ + 0.1350586, + 54.0655731 + ], + [ + -0.0609831, + 54.065908 + ], + [ + -0.0414249, + 54.4709448 + ], + [ + -0.5662701, + 54.4771794 + ], + [ + -0.5592078, + 54.6565127 + ], + [ + -1.1665638, + 54.6623485 + ], + [ + -1.1637389, + 54.842611 + ], + [ + -1.3316194, + 54.843909 + ], + [ + -1.3257065, + 55.2470842 + ], + [ + -1.529453, + 55.2487108 + ], + [ + -1.524178, + 55.6540122 + ], + [ + -1.7638798, + 55.6540122 + ], + [ + -1.7733693, + 55.9719116 + ], + [ + -2.1607858, + 55.9682981 + ], + [ + -2.1543289, + 56.0621387 + ], + [ + -2.4578051, + 56.0585337 + ], + [ + -2.4190635, + 56.641717 + ], + [ + -2.0962164, + 56.641717 + ], + [ + -2.0833025, + 57.0021322 + ], + [ + -1.9283359, + 57.0126802 + ], + [ + -1.9180966, + 57.3590895 + ], + [ + -1.7502161, + 57.3625721 + ], + [ + -1.7695869, + 57.7608634 + ], + [ + -3.6937554, + 57.7574187 + ], + [ + -3.7066693, + 57.9806386 + ], + [ + -3.5969013, + 57.9772149 + ], + [ + -3.6033582, + 58.1207277 + ], + [ + -3.0222335, + 58.1309566 + ], + [ + -3.0286905, + 58.5410788 + ], + [ + -2.8478961, + 58.530968 + ], + [ + -2.86081, + 58.8430508 + ], + [ + -2.679624, + 58.8414991 + ], + [ + -2.6841897, + 58.885175 + ], + [ + -2.6339665, + 58.9052239 + ], + [ + -2.679624, + 58.9335083 + ], + [ + -2.6887555, + 59.0229231 + ], + [ + -2.3668703, + 59.0229231 + ], + [ + -2.3702946, + 59.2652861 + ], + [ + -2.3429001, + 59.2821989 + ], + [ + -2.3714361, + 59.2996861 + ], + [ + -2.3737189, + 59.3707083 + ], + [ + -2.3429001, + 59.385825 + ], + [ + -2.3725775, + 59.400354 + ], + [ + -2.3714361, + 59.4259098 + ], + [ + -3.0734196, + 59.4230067 + ], + [ + -3.0711368, + 59.3433649 + ], + [ + -3.103097, + 59.3311405 + ], + [ + -3.0745611, + 59.3136695 + ], + [ + -3.0722782, + 59.232603 + ], + [ + -3.3850319, + 59.1484167 + ], + [ + -3.3747589, + 58.9352753 + ], + [ + -3.5653789, + 58.9323303 + ], + [ + -3.554829, + 58.69759 + ], + [ + -5.2808579, + 58.6667732 + ], + [ + -5.2534159, + 58.3514125 + ], + [ + -5.5068508, + 58.3437887 + ], + [ + -5.4761804, + 58.0323557 + ], + [ + -5.8974958, + 58.0212436 + ], + [ + -5.8522972, + 57.6171758 + ], + [ + -6.1396311, + 57.6137174 + ], + [ + -6.1541592, + 57.7423183 + ], + [ + -6.2913692, + 57.7380102 + ], + [ + -6.3365678, + 58.1398784 + ], + [ + -6.1121891, + 58.1466944 + ], + [ + -6.1473778, + 58.5106285 + ], + [ + -6.2934817, + 58.5416182 + ], + [ + -6.8413713, + 58.2977321 + ], + [ + -7.0057382, + 58.2929331 + ], + [ + -7.1016189, + 58.2064403 + ], + [ + -7.2573132, + 58.1793148 + ], + [ + -7.2531092, + 58.1004928 + ], + [ + -7.4070698, + 58.0905566 + ], + [ + -7.391347, + 57.7911354 + ], + [ + -7.790991, + 57.7733151 + ], + [ + -7.7624215, + 57.5444165 + ], + [ + -7.698501, + 57.1453194 + ], + [ + -7.7943817, + 57.1304547 + ], + [ + -7.716764, + 56.7368628 + ], + [ + -7.0122067, + 56.7654359 + ], + [ + -6.979922, + 56.5453858 + ], + [ + -7.0638622, + 56.5453858 + ], + [ + -7.0444914, + 56.3562587 + ], + [ + -6.500676, + 56.3812917 + ], + [ + -6.4491433, + 55.9793649 + ], + [ + -6.563287, + 55.9691456 + ], + [ + -6.5393742, + 55.7030135 + ], + [ + -6.5595521, + 55.6907321 + ], + [ + -6.5345315, + 55.6761713 + ], + [ + -6.5216176, + 55.5704434 + ], + [ + -5.8912587, + 55.5923416 + ], + [ + -5.8560127, + 55.2320733 + ], + [ + -5.2293639, + 55.2515958 + ], + [ + -5.1837064, + 54.6254139 + ], + [ + -3.6655956, + 54.6518373 + ], + [ + -3.6496155, + 54.4320023 + ], + [ + -3.5400375, + 54.4306744 + ], + [ + -3.530906, + 54.0290181 + ], + [ + -3.0697656, + 54.030359 + ], + [ + -3.0675737, + 53.8221388 + ], + [ + -3.0804876, + 53.7739911 + ], + [ + -3.0619239, + 53.7477488 + ], + [ + -3.0611168, + 53.6737049 + ], + [ + -3.2144691, + 53.6708361 + ], + [ + -3.2057699, + 53.4226163 + ], + [ + -3.2799632, + 53.355224 + ], + [ + -3.2896655, + 53.3608441 + ], + [ + -3.3327547, + 53.364931 + ], + [ + -3.3761293, + 53.3540318 + ], + [ + -4.0888976, + 53.3433102 + ], + [ + -4.0945474, + 53.4612036 + ], + [ + -4.697412, + 53.4448624 + ], + [ + -4.6882805, + 53.3318598 + ], + [ + -4.7202407, + 53.2895771 + ], + [ + -4.6837148, + 53.2486184 + ], + [ + -4.6768661, + 53.1542644 + ], + [ + -4.8480816, + 53.1446807 + ], + [ + -4.8178336, + 52.7440299 + ], + [ + -4.2545751, + 52.7558939 + ], + [ + -4.228876, + 52.254876 + ], + [ + -4.2607571, + 52.2536408 + ], + [ + -4.2724603, + 52.2432637 + ], + [ + -4.8136263, + 52.230095 + ], + [ + -4.8079191, + 52.1138892 + ], + [ + -5.3889104, + 52.0991668 + ], + [ + -5.3717888, + 51.9129667 + ], + [ + -5.4208706, + 51.9101502 + ], + [ + -5.414022, + 51.8453218 + ], + [ + -5.3683645, + 51.8474373 + ], + [ + -5.3466772, + 51.5595332 + ], + [ + -4.773676, + 51.5758518 + ], + [ + -4.7656859, + 51.4885146 + ], + [ + -4.1915432, + 51.4970427 + ], + [ + -4.1869775, + 51.4344663 + ], + [ + -3.6151177, + 51.4444274 + ], + [ + -3.6105519, + 51.3746543 + ], + [ + -3.1494115, + 51.3789292 + ], + [ + -3.1494115, + 51.2919281 + ], + [ + -4.3038735, + 51.2745907 + ], + [ + -4.2861169, + 51.0508721 + ], + [ + -4.8543277, + 51.0366633 + ], + [ + -4.8372201, + 50.7212787 + ], + [ + -5.2618345, + 50.7082694 + ] + ], + [ + [ + -2.1502671, + 60.171318 + ], + [ + -2.0030218, + 60.1696146 + ], + [ + -2.0013096, + 60.0997023 + ], + [ + -2.148555, + 60.1011247 + ] + ], + [ + [ + -6.2086011, + 59.1163488 + ], + [ + -6.1229934, + 59.1166418 + ], + [ + -6.121852, + 59.0714985 + ], + [ + -6.2097426, + 59.0714985 + ] + ], + [ + [ + -4.4159559, + 59.0889036 + ], + [ + -4.4212022, + 59.0770848 + ], + [ + -4.3971904, + 59.0779143 + ], + [ + -4.3913388, + 59.0897328 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "NLS - OS 1:25k 1st Series 1937-61", + "type": "tms", + "template": "http://geo.nls.uk/mapdata2/os/25000/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 5, + 16 + ], + "polygon": [ + [ + [ + -4.7157244, + 54.6796556 + ], + [ + -4.6850662, + 54.6800268 + ], + [ + -4.6835779, + 54.6623245 + ], + [ + -4.7148782, + 54.6615818 + ] + ], + [ + [ + -3.7085748, + 58.3371151 + ], + [ + -3.5405937, + 58.3380684 + ], + [ + -3.5315137, + 58.1608002 + ], + [ + -3.3608086, + 58.1622372 + ], + [ + -3.3653486, + 58.252173 + ], + [ + -3.1610473, + 58.2536063 + ], + [ + -3.1610473, + 58.3261509 + ], + [ + -3.0275704, + 58.3271045 + ], + [ + -3.0366505, + 58.6139001 + ], + [ + -3.0021463, + 58.614373 + ], + [ + -3.0030543, + 58.7036341 + ], + [ + -3.4180129, + 58.7003322 + ], + [ + -3.4171049, + 58.6290293 + ], + [ + -3.7240109, + 58.6266658 + ], + [ + -3.7231029, + 58.606806 + ], + [ + -4.2361262, + 58.5992374 + ], + [ + -4.2334022, + 58.5092347 + ], + [ + -3.88836, + 58.5144516 + ], + [ + -3.8829119, + 58.4261327 + ], + [ + -3.7158389, + 58.4270836 + ] + ], + [ + [ + -6.46676, + 49.9943621 + ], + [ + -6.1889102, + 50.004868 + ], + [ + -6.1789222, + 49.8967815 + ], + [ + -6.3169391, + 49.8915171 + ], + [ + -6.312399, + 49.8200979 + ], + [ + -6.4504159, + 49.8159968 + ] + ], + [ + [ + -5.6453263, + 50.2029809 + ], + [ + -5.7801329, + 50.2014076 + ], + [ + -5.7637888, + 50.0197267 + ], + [ + -5.3479221, + 50.0290604 + ], + [ + -5.3388421, + 49.9414854 + ], + [ + -5.024672, + 49.9473287 + ], + [ + -5.0355681, + 50.0383923 + ], + [ + -5.0010639, + 50.0453901 + ], + [ + -4.9974319, + 50.1304478 + ], + [ + -4.855783, + 50.13394 + ], + [ + -4.861231, + 50.206057 + ], + [ + -4.6546085, + 50.2140172 + ], + [ + -4.6558926, + 50.3018616 + ], + [ + -4.5184924, + 50.3026818 + ], + [ + -4.51464, + 50.325642 + ], + [ + -4.2488284, + 50.3264618 + ], + [ + -4.2488284, + 50.3100631 + ], + [ + -4.10886, + 50.3141633 + ], + [ + -4.1062917, + 50.2411267 + ], + [ + -3.9648088, + 50.2432047 + ], + [ + -3.9640778, + 50.2254158 + ], + [ + -3.8522287, + 50.2273626 + ], + [ + -3.8503757, + 50.1552563 + ], + [ + -3.6921809, + 50.1572487 + ], + [ + -3.5414602, + 50.1602198 + ], + [ + -3.5465781, + 50.3226814 + ], + [ + -3.4068012, + 50.3241013 + ], + [ + -3.4165761, + 50.5892711 + ], + [ + -3.2746691, + 50.5962721 + ], + [ + -3.2749172, + 50.6106323 + ], + [ + -2.9971742, + 50.613972 + ], + [ + -2.9896008, + 50.688537 + ], + [ + -2.7120266, + 50.690565 + ], + [ + -2.710908, + 50.6195964 + ], + [ + -2.5695473, + 50.6157538 + ], + [ + -2.5651019, + 50.5134083 + ], + [ + -2.4014463, + 50.513379 + ], + [ + -2.3940583, + 50.6160348 + ], + [ + -2.2894123, + 50.6147436 + ], + [ + -2.2876184, + 50.6008549 + ], + [ + -2.1477855, + 50.6048506 + ], + [ + -2.1451013, + 50.5325437 + ], + [ + -1.9335117, + 50.5347477 + ], + [ + -1.9362139, + 50.6170445 + ], + [ + -1.8573025, + 50.6228094 + ], + [ + -1.8554865, + 50.709139 + ], + [ + -1.6066929, + 50.709139 + ], + [ + -1.6085089, + 50.6239615 + ], + [ + -1.4450678, + 50.6228094 + ], + [ + -1.4432518, + 50.5317039 + ], + [ + -1.1545059, + 50.5293951 + ], + [ + -1.1472419, + 50.6170485 + ], + [ + -1.011041, + 50.6205051 + ], + [ + -1.011041, + 50.7056889 + ], + [ + -0.704135, + 50.7045388 + ], + [ + -0.700503, + 50.7769401 + ], + [ + -0.5860943, + 50.7723465 + ], + [ + -0.5879103, + 50.7907181 + ], + [ + -0.0149586, + 50.7798108 + ], + [ + -0.0185906, + 50.7625836 + ], + [ + 0.0967261, + 50.7620093 + ], + [ + 0.0921861, + 50.6913106 + ], + [ + 0.3046595, + 50.6890096 + ], + [ + 0.3101075, + 50.7757917 + ], + [ + 0.5511831, + 50.7726336 + ], + [ + 0.5529991, + 50.8432096 + ], + [ + 0.695556, + 50.8403428 + ], + [ + 0.696464, + 50.8592608 + ], + [ + 0.9852099, + 50.8523824 + ], + [ + 0.9906579, + 50.9417226 + ], + [ + 1.0160821, + 50.9411504 + ], + [ + 1.0215301, + 51.0303204 + ], + [ + 1.2812198, + 51.0240383 + ], + [ + 1.2848518, + 51.0948044 + ], + [ + 1.4277848, + 51.0948044 + ], + [ + 1.4386809, + 51.2882859 + ], + [ + 1.4713691, + 51.2871502 + ], + [ + 1.4804492, + 51.3994534 + ], + [ + 1.1590151, + 51.4073836 + ], + [ + 1.1590151, + 51.3869889 + ], + [ + 1.0191822, + 51.3903886 + ], + [ + 1.0228142, + 51.4798247 + ], + [ + 0.8793493, + 51.4843484 + ], + [ + 0.8829813, + 51.5566675 + ], + [ + 1.0264462, + 51.5544092 + ], + [ + 1.0373423, + 51.7493319 + ], + [ + 1.2607117, + 51.7482076 + ], + [ + 1.2661598, + 51.8279642 + ], + [ + 1.3351682, + 51.8335756 + ], + [ + 1.3478803, + 51.9199021 + ], + [ + 1.4840812, + 51.9199021 + ], + [ + 1.4986093, + 52.0038271 + ], + [ + 1.6438902, + 52.0027092 + ], + [ + 1.6656823, + 52.270221 + ], + [ + 1.7310588, + 52.270221 + ], + [ + 1.7528509, + 52.4465637 + ], + [ + 1.8254914, + 52.4476705 + ], + [ + 1.8345714, + 52.624408 + ], + [ + 1.7690346, + 52.6291402 + ], + [ + 1.7741711, + 52.717904 + ], + [ + 1.6996925, + 52.721793 + ], + [ + 1.706113, + 52.8103687 + ], + [ + 1.559724, + 52.8165777 + ], + [ + 1.5648605, + 52.9034116 + ], + [ + 1.4184715, + 52.9103818 + ], + [ + 1.4223238, + 52.9281894 + ], + [ + 1.3439928, + 52.9289635 + ], + [ + 1.3491293, + 53.0001194 + ], + [ + 0.4515789, + 53.022589 + ], + [ + 0.4497629, + 52.9351139 + ], + [ + 0.3789384, + 52.9351139 + ], + [ + 0.3716744, + 52.846365 + ], + [ + 0.2227614, + 52.8496552 + ], + [ + 0.2336575, + 52.9329248 + ], + [ + 0.3062979, + 52.9351139 + ], + [ + 0.308114, + 53.022589 + ], + [ + 0.3807544, + 53.0236813 + ], + [ + 0.3993708, + 53.2933729 + ], + [ + 0.3248922, + 53.2987454 + ], + [ + 0.3274604, + 53.3853782 + ], + [ + 0.2504136, + 53.38691 + ], + [ + 0.2581183, + 53.4748924 + ], + [ + 0.1862079, + 53.4779494 + ], + [ + 0.1913443, + 53.6548777 + ], + [ + 0.1502527, + 53.6594436 + ], + [ + 0.1528209, + 53.7666003 + ], + [ + 0.0012954, + 53.7734308 + ], + [ + 0.0025796, + 53.8424326 + ], + [ + -0.0282392, + 53.841675 + ], + [ + -0.0226575, + 53.9311501 + ], + [ + -0.1406983, + 53.9322193 + ], + [ + -0.1416063, + 54.0219323 + ], + [ + -0.1706625, + 54.0235326 + ], + [ + -0.1679384, + 54.0949482 + ], + [ + -0.0126694, + 54.0912206 + ], + [ + -0.0099454, + 54.1811226 + ], + [ + -0.1615824, + 54.1837795 + ], + [ + -0.1606744, + 54.2029038 + ], + [ + -0.2405789, + 54.2034349 + ], + [ + -0.2378549, + 54.2936234 + ], + [ + -0.3894919, + 54.2941533 + ], + [ + -0.3857497, + 54.3837321 + ], + [ + -0.461638, + 54.3856364 + ], + [ + -0.4571122, + 54.4939066 + ], + [ + -0.6105651, + 54.4965434 + ], + [ + -0.6096571, + 54.5676704 + ], + [ + -0.7667421, + 54.569776 + ], + [ + -0.7640181, + 54.5887213 + ], + [ + -0.9192871, + 54.5908258 + ], + [ + -0.9148116, + 54.6608348 + ], + [ + -1.1485204, + 54.6634343 + ], + [ + -1.1472363, + 54.7528316 + ], + [ + -1.2268514, + 54.7532021 + ], + [ + -1.2265398, + 54.8429879 + ], + [ + -1.2991803, + 54.8435107 + ], + [ + -1.2991803, + 54.9333391 + ], + [ + -1.3454886, + 54.9354258 + ], + [ + -1.3436726, + 55.0234878 + ], + [ + -1.3772688, + 55.0255698 + ], + [ + -1.3754528, + 55.1310877 + ], + [ + -1.4997441, + 55.1315727 + ], + [ + -1.4969272, + 55.2928323 + ], + [ + -1.5296721, + 55.2942946 + ], + [ + -1.5258198, + 55.6523803 + ], + [ + -1.7659492, + 55.6545537 + ], + [ + -1.7620968, + 55.7435626 + ], + [ + -1.9688392, + 55.7435626 + ], + [ + -1.9698023, + 55.8334505 + ], + [ + -2.0019051, + 55.8336308 + ], + [ + -2.0015841, + 55.9235526 + ], + [ + -2.1604851, + 55.9240613 + ], + [ + -2.1613931, + 55.9413549 + ], + [ + -2.3202942, + 55.9408463 + ], + [ + -2.3212022, + 56.0145126 + ], + [ + -2.5627317, + 56.0124824 + ], + [ + -2.5645477, + 56.1022207 + ], + [ + -2.9658863, + 56.0991822 + ], + [ + -2.9667943, + 56.1710304 + ], + [ + -2.4828272, + 56.1755797 + ], + [ + -2.4882752, + 56.2856078 + ], + [ + -2.5645477, + 56.2835918 + ], + [ + -2.5681798, + 56.3742075 + ], + [ + -2.7261728, + 56.3732019 + ], + [ + -2.7316208, + 56.4425301 + ], + [ + -2.6190281, + 56.4425301 + ], + [ + -2.6153961, + 56.5317671 + ], + [ + -2.453771, + 56.5347715 + ], + [ + -2.4534686, + 56.6420248 + ], + [ + -2.4062523, + 56.6440218 + ], + [ + -2.3953562, + 56.7297964 + ], + [ + -2.2936596, + 56.7337811 + ], + [ + -2.2972916, + 56.807423 + ], + [ + -2.1629067, + 56.8113995 + ], + [ + -2.1592747, + 56.9958425 + ], + [ + -1.9922016, + 57.0017771 + ], + [ + -2.0067297, + 57.2737477 + ], + [ + -1.9195612, + 57.2757112 + ], + [ + -1.9304572, + 57.3482876 + ], + [ + -1.8106005, + 57.3443682 + ], + [ + -1.7997044, + 57.4402728 + ], + [ + -1.6616875, + 57.4285429 + ], + [ + -1.6689516, + 57.5398256 + ], + [ + -1.7452241, + 57.5398256 + ], + [ + -1.7524881, + 57.6313302 + ], + [ + -1.8287606, + 57.6332746 + ], + [ + -1.8287606, + 57.7187255 + ], + [ + -3.1768526, + 57.7171219 + ], + [ + -3.1794208, + 57.734264 + ], + [ + -3.5134082, + 57.7292105 + ], + [ + -3.5129542, + 57.7112683 + ], + [ + -3.7635638, + 57.7076303 + ], + [ + -3.7598539, + 57.635713 + ], + [ + -3.8420372, + 57.6343382 + ], + [ + -3.8458895, + 57.6178365 + ], + [ + -3.9794374, + 57.6157733 + ], + [ + -3.9794374, + 57.686544 + ], + [ + -3.8150708, + 57.689976 + ], + [ + -3.817639, + 57.7968899 + ], + [ + -3.6853753, + 57.7989429 + ], + [ + -3.6892276, + 57.8891567 + ], + [ + -3.9383458, + 57.8877915 + ], + [ + -3.9421981, + 57.9750592 + ], + [ + -3.6943641, + 57.9784638 + ], + [ + -3.6969323, + 58.0695865 + ], + [ + -4.0372226, + 58.0641528 + ], + [ + -4.0346543, + 57.9730163 + ], + [ + -4.2003051, + 57.9702923 + ], + [ + -4.1832772, + 57.7012869 + ], + [ + -4.518752, + 57.6951111 + ], + [ + -4.5122925, + 57.6050682 + ], + [ + -4.6789116, + 57.6016628 + ], + [ + -4.666022, + 57.4218334 + ], + [ + -3.6677696, + 57.4394729 + ], + [ + -3.671282, + 57.5295384 + ], + [ + -3.3384979, + 57.5331943 + ], + [ + -3.3330498, + 57.4438859 + ], + [ + -2.8336466, + 57.4485275 + ], + [ + -2.8236396, + 56.9992706 + ], + [ + -2.3305398, + 57.0006693 + ], + [ + -2.3298977, + 56.9113932 + ], + [ + -2.6579889, + 56.9092901 + ], + [ + -2.6559637, + 56.8198406 + ], + [ + -2.8216747, + 56.8188467 + ], + [ + -2.8184967, + 56.7295397 + ], + [ + -3.1449248, + 56.7265508 + ], + [ + -3.1435628, + 56.6362749 + ], + [ + -3.4679089, + 56.6350265 + ], + [ + -3.474265, + 56.7238108 + ], + [ + -3.8011471, + 56.7188284 + ], + [ + -3.785711, + 56.4493026 + ], + [ + -3.946428, + 56.4457896 + ], + [ + -3.9428873, + 56.2659777 + ], + [ + -4.423146, + 56.2588459 + ], + [ + -4.4141572, + 56.0815506 + ], + [ + -4.8944159, + 56.0708008 + ], + [ + -4.8791072, + 55.8896994 + ], + [ + -5.1994158, + 55.8821374 + ], + [ + -5.1852906, + 55.7023791 + ], + [ + -5.0273445, + 55.7067203 + ], + [ + -5.0222081, + 55.6879046 + ], + [ + -4.897649, + 55.6907999 + ], + [ + -4.8880181, + 55.6002822 + ], + [ + -4.7339244, + 55.6046348 + ], + [ + -4.7275038, + 55.5342082 + ], + [ + -4.773732, + 55.5334815 + ], + [ + -4.7685955, + 55.4447227 + ], + [ + -4.8494947, + 55.4418092 + ], + [ + -4.8405059, + 55.3506535 + ], + [ + -4.8700405, + 55.3513836 + ], + [ + -4.8649041, + 55.2629462 + ], + [ + -4.9920314, + 55.2592875 + ], + [ + -4.9907473, + 55.1691779 + ], + [ + -5.0600894, + 55.1655105 + ], + [ + -5.0575212, + 55.0751884 + ], + [ + -5.2141831, + 55.0722477 + ], + [ + -5.1991766, + 54.8020337 + ], + [ + -5.0466316, + 54.8062205 + ], + [ + -5.0502636, + 54.7244996 + ], + [ + -4.9703591, + 54.7203043 + ], + [ + -4.9776232, + 54.6215905 + ], + [ + -4.796022, + 54.6342056 + ], + [ + -4.796022, + 54.7307917 + ], + [ + -4.8977186, + 54.7265971 + ], + [ + -4.9086147, + 54.8145928 + ], + [ + -4.8069181, + 54.8166856 + ], + [ + -4.8105501, + 54.7915648 + ], + [ + -4.6943253, + 54.7978465 + ], + [ + -4.6761652, + 54.7244996 + ], + [ + -4.5744686, + 54.7244996 + ], + [ + -4.5599405, + 54.6426135 + ], + [ + -4.3093309, + 54.6384098 + ], + [ + -4.3333262, + 54.8229889 + ], + [ + -4.2626999, + 54.8274274 + ], + [ + -4.2549952, + 54.7348587 + ], + [ + -3.8338058, + 54.7400481 + ], + [ + -3.836374, + 54.8141105 + ], + [ + -3.7118149, + 54.8133706 + ], + [ + -3.7143831, + 54.8318654 + ], + [ + -3.5346072, + 54.8355633 + ], + [ + -3.5271039, + 54.9066228 + ], + [ + -3.4808758, + 54.9084684 + ], + [ + -3.4776655, + 54.7457328 + ], + [ + -3.5874573, + 54.744621 + ], + [ + -3.5836049, + 54.6546166 + ], + [ + -3.7107322, + 54.6531308 + ], + [ + -3.6991752, + 54.4550407 + ], + [ + -3.5746161, + 54.4572801 + ], + [ + -3.5759002, + 54.3863042 + ], + [ + -3.539945, + 54.3855564 + ], + [ + -3.5386609, + 54.297224 + ], + [ + -3.46033, + 54.2957252 + ], + [ + -3.4590458, + 54.2079507 + ], + [ + -3.3807149, + 54.2102037 + ], + [ + -3.381999, + 54.1169788 + ], + [ + -3.302878, + 54.1160656 + ], + [ + -3.300154, + 54.0276224 + ], + [ + -3.1013007, + 54.0292224 + ], + [ + -3.093596, + 53.6062158 + ], + [ + -3.2065981, + 53.6016441 + ], + [ + -3.2091663, + 53.4917753 + ], + [ + -3.2451215, + 53.4887193 + ], + [ + -3.2348486, + 53.4045934 + ], + [ + -3.5276266, + 53.3999999 + ], + [ + -3.5343966, + 53.328481 + ], + [ + -3.6488053, + 53.3252272 + ], + [ + -3.6527308, + 53.3057716 + ], + [ + -3.7271873, + 53.3046865 + ], + [ + -3.7315003, + 53.3945257 + ], + [ + -3.9108315, + 53.3912769 + ], + [ + -3.9071995, + 53.3023804 + ], + [ + -3.9521457, + 53.3015665 + ], + [ + -3.9566724, + 53.3912183 + ], + [ + -4.1081979, + 53.3889209 + ], + [ + -4.1081979, + 53.4072967 + ], + [ + -4.2622916, + 53.4065312 + ], + [ + -4.2635757, + 53.4753707 + ], + [ + -4.638537, + 53.4677274 + ], + [ + -4.6346847, + 53.3812621 + ], + [ + -4.7091633, + 53.3774321 + ], + [ + -4.7001745, + 53.1954965 + ], + [ + -4.5499332, + 53.1962658 + ], + [ + -4.5435126, + 53.1092488 + ], + [ + -4.3919871, + 53.1100196 + ], + [ + -4.3855666, + 53.0236002 + ], + [ + -4.6115707, + 53.0205105 + ], + [ + -4.603866, + 52.9284932 + ], + [ + -4.7566756, + 52.9261709 + ], + [ + -4.7476868, + 52.8370555 + ], + [ + -4.8208813, + 52.8331768 + ], + [ + -4.8208813, + 52.7446476 + ], + [ + -4.3701572, + 52.7539749 + ], + [ + -4.3765778, + 52.8401583 + ], + [ + -4.2314728, + 52.8455875 + ], + [ + -4.2237682, + 52.7586379 + ], + [ + -4.1056297, + 52.7570836 + ], + [ + -4.1015192, + 52.6714874 + ], + [ + -4.1487355, + 52.6703862 + ], + [ + -4.1305754, + 52.4008596 + ], + [ + -4.1995838, + 52.3986435 + ], + [ + -4.2050319, + 52.3110195 + ], + [ + -4.3466808, + 52.303247 + ], + [ + -4.3484968, + 52.2365693 + ], + [ + -4.4901457, + 52.2332328 + ], + [ + -4.4883297, + 52.2098702 + ], + [ + -4.6572188, + 52.2098702 + ], + [ + -4.6590348, + 52.1385939 + ], + [ + -4.7788916, + 52.13525 + ], + [ + -4.7807076, + 52.1162967 + ], + [ + -4.9259885, + 52.1140663 + ], + [ + -4.9187245, + 52.0392855 + ], + [ + -5.2365265, + 52.0314653 + ], + [ + -5.2347105, + 51.9442339 + ], + [ + -5.3473032, + 51.9408755 + ], + [ + -5.3473032, + 51.9195995 + ], + [ + -5.4925842, + 51.9162392 + ], + [ + -5.4853201, + 51.8265386 + ], + [ + -5.1983903, + 51.8321501 + ], + [ + -5.1893102, + 51.7625177 + ], + [ + -5.335825, + 51.7589528 + ], + [ + -5.3281204, + 51.6686495 + ], + [ + -5.1836575, + 51.6730296 + ], + [ + -5.1836575, + 51.6539134 + ], + [ + -5.0674452, + 51.6578966 + ], + [ + -5.0603825, + 51.5677905 + ], + [ + -4.5974594, + 51.5809588 + ], + [ + -4.60388, + 51.6726314 + ], + [ + -4.345773, + 51.6726314 + ], + [ + -4.3355001, + 51.4962964 + ], + [ + -3.9528341, + 51.5106841 + ], + [ + -3.9425611, + 51.5905333 + ], + [ + -3.8809237, + 51.5953198 + ], + [ + -3.8706508, + 51.5074872 + ], + [ + -3.7679216, + 51.4978952 + ], + [ + -3.7550805, + 51.4242895 + ], + [ + -3.5855774, + 51.41468 + ], + [ + -3.5778727, + 51.3329177 + ], + [ + -3.0796364, + 51.3329177 + ], + [ + -3.0770682, + 51.2494018 + ], + [ + -3.7216935, + 51.2381477 + ], + [ + -3.7216935, + 51.2558315 + ], + [ + -3.8706508, + 51.2558315 + ], + [ + -3.8680825, + 51.2365398 + ], + [ + -4.2944084, + 51.2252825 + ], + [ + -4.289272, + 51.0496352 + ], + [ + -4.5692089, + 51.0431767 + ], + [ + -4.5624122, + 50.9497388 + ], + [ + -4.5905604, + 50.9520269 + ], + [ + -4.5896524, + 50.8627065 + ], + [ + -4.6296046, + 50.8592677 + ], + [ + -4.6226411, + 50.7691513 + ], + [ + -4.6952816, + 50.7680028 + ], + [ + -4.6934655, + 50.6967379 + ], + [ + -4.8342064, + 50.6938621 + ], + [ + -4.8296664, + 50.6046231 + ], + [ + -4.9676833, + 50.6000126 + ], + [ + -4.9685913, + 50.5821427 + ], + [ + -5.1084242, + 50.5786832 + ], + [ + -5.1029762, + 50.4892254 + ], + [ + -5.1311244, + 50.48807 + ], + [ + -5.1274923, + 50.4163798 + ], + [ + -5.2664172, + 50.4117509 + ], + [ + -5.2609692, + 50.3034214 + ], + [ + -5.5124868, + 50.2976214 + ], + [ + -5.5061308, + 50.2256428 + ], + [ + -5.6468717, + 50.2209953 + ] + ], + [ + [ + -5.1336607, + 55.2630226 + ], + [ + -5.1021999, + 55.2639372 + ], + [ + -5.0999527, + 55.2458239 + ], + [ + -5.1322161, + 55.2446343 + ] + ], + [ + [ + -5.6431878, + 55.5095745 + ], + [ + -5.4861028, + 55.5126594 + ], + [ + -5.4715747, + 55.3348829 + ], + [ + -5.6277517, + 55.3302345 + ] + ], + [ + [ + -4.7213517, + 51.2180246 + ], + [ + -4.5804201, + 51.2212417 + ], + [ + -4.5746416, + 51.1306736 + ], + [ + -4.7174993, + 51.1280545 + ] + ], + [ + [ + -5.1608796, + 55.4153626 + ], + [ + -5.0045387, + 55.4190069 + ], + [ + -5.0184798, + 55.6153521 + ], + [ + -5.1755648, + 55.6138137 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "NLS - OS 6-inch Scotland 1842-82", + "type": "tms", + "template": "http://geo.nls.uk/maps/os/six_inch/{zoom}/{x}/{-y}.png", + "scaleExtent": [ + 5, + 16 + ], + "polygon": [ + [ + [ + -5.2112173, + 54.8018593 + ], + [ + -5.0642752, + 54.8026508 + ], + [ + -5.0560354, + 54.6305176 + ], + [ + -4.3158316, + 54.6297227 + ], + [ + -4.3117117, + 54.7448258 + ], + [ + -3.8530325, + 54.7464112 + ], + [ + -3.8530325, + 54.8034424 + ], + [ + -3.5522818, + 54.8034424 + ], + [ + -3.5522818, + 54.8374644 + ], + [ + -3.468511, + 54.8406277 + ], + [ + -3.4657644, + 54.8983158 + ], + [ + -3.3847403, + 54.8991055 + ], + [ + -3.3888601, + 54.9559214 + ], + [ + -3.0920786, + 54.9539468 + ], + [ + -3.0392359, + 54.9923274 + ], + [ + -3.0212713, + 55.0493881 + ], + [ + -2.9591232, + 55.0463283 + ], + [ + -2.9202807, + 55.0666294 + ], + [ + -2.7857081, + 55.068652 + ], + [ + -2.7852225, + 55.0914426 + ], + [ + -2.7337562, + 55.0922761 + ], + [ + -2.737616, + 55.151204 + ], + [ + -2.7648395, + 55.1510672 + ], + [ + -2.7013114, + 55.1722505 + ], + [ + -2.6635459, + 55.2192808 + ], + [ + -2.6460364, + 55.2188891 + ], + [ + -2.629042, + 55.2233933 + ], + [ + -2.6317886, + 55.2287781 + ], + [ + -2.6235488, + 55.2446345 + ], + [ + -2.6197723, + 55.2454663 + ], + [ + -2.6099017, + 55.2454174 + ], + [ + -2.6099876, + 55.2486466 + ], + [ + -2.6408121, + 55.2590039 + ], + [ + -2.6247896, + 55.2615631 + ], + [ + -2.6045186, + 55.2823081 + ], + [ + -2.5693176, + 55.296132 + ], + [ + -2.5479542, + 55.3121617 + ], + [ + -2.5091116, + 55.3234891 + ], + [ + -2.4780376, + 55.3494471 + ], + [ + -2.4421083, + 55.3533118 + ], + [ + -2.4052079, + 55.3439256 + ], + [ + -2.3726772, + 55.3447539 + ], + [ + -2.3221819, + 55.3687665 + ], + [ + -2.3241241, + 55.3999337 + ], + [ + -2.2576062, + 55.425015 + ], + [ + -2.1985547, + 55.4273529 + ], + [ + -2.1484296, + 55.4717466 + ], + [ + -2.1944348, + 55.484199 + ], + [ + -2.2040479, + 55.529306 + ], + [ + -2.2960584, + 55.6379722 + ], + [ + -2.2177808, + 55.6379722 + ], + [ + -2.1059266, + 55.7452498 + ], + [ + -1.9716874, + 55.7462161 + ], + [ + -1.9697453, + 55.9190951 + ], + [ + -2.1201694, + 55.9207115 + ], + [ + -2.1242893, + 55.9776133 + ], + [ + -2.3440159, + 55.9783817 + ], + [ + -2.3440159, + 56.0390349 + ], + [ + -2.5046909, + 56.0413363 + ], + [ + -2.500571, + 56.1003588 + ], + [ + -2.8823459, + 56.0957629 + ], + [ + -2.8823459, + 56.1722898 + ], + [ + -2.4126804, + 56.1692316 + ], + [ + -2.4181736, + 56.2334017 + ], + [ + -2.5857151, + 56.2303484 + ], + [ + -2.5719822, + 56.3416356 + ], + [ + -2.7257908, + 56.3462022 + ], + [ + -2.7312839, + 56.4343808 + ], + [ + -2.6928318, + 56.4343808 + ], + [ + -2.6928318, + 56.4859769 + ], + [ + -2.5307834, + 56.4935587 + ], + [ + -2.5307834, + 56.570806 + ], + [ + -2.5302878, + 56.6047947 + ], + [ + -2.3732428, + 56.6044452 + ], + [ + -2.3684363, + 56.7398824 + ], + [ + -2.3292975, + 56.7398824 + ], + [ + -2.3292975, + 56.7888065 + ], + [ + -2.3145346, + 56.7891826 + ], + [ + -2.3148779, + 56.7967036 + ], + [ + -2.171369, + 56.7967036 + ], + [ + -2.1703979, + 56.9710595 + ], + [ + -2.0101725, + 56.9694716 + ], + [ + -2.0101725, + 57.0846832 + ], + [ + -2.0817687, + 57.085349 + ], + [ + -2.0488097, + 57.1259963 + ], + [ + -2.0409133, + 57.126369 + ], + [ + -2.0383434, + 57.2411129 + ], + [ + -1.878118, + 57.2421638 + ], + [ + -1.8771469, + 57.2978175 + ], + [ + -1.9868771, + 57.2983422 + ], + [ + -1.9082209, + 57.3560063 + ], + [ + -1.8752048, + 57.3560063 + ], + [ + -1.8761758, + 57.3769527 + ], + [ + -1.8120857, + 57.4120111 + ], + [ + -1.7120661, + 57.4120111 + ], + [ + -1.7034646, + 57.6441388 + ], + [ + -1.8666032, + 57.6451781 + ], + [ + -1.8646611, + 57.7033351 + ], + [ + -3.1204292, + 57.7064705 + ], + [ + -3.1218025, + 57.7504652 + ], + [ + -3.4445259, + 57.7526635 + ], + [ + -3.4472724, + 57.7138067 + ], + [ + -3.5145637, + 57.7094052 + ], + [ + -3.5118171, + 57.6939956 + ], + [ + -3.7645027, + 57.6917938 + ], + [ + -3.7672492, + 57.6344975 + ], + [ + -3.842378, + 57.6288312 + ], + [ + -3.8438346, + 57.5965825 + ], + [ + -3.9414265, + 57.5916386 + ], + [ + -3.9404554, + 57.6537782 + ], + [ + -3.8894746, + 57.6529989 + ], + [ + -3.8826772, + 57.7676408 + ], + [ + -3.7224517, + 57.766087 + ], + [ + -3.7195385, + 57.8819201 + ], + [ + -3.9146888, + 57.8853352 + ], + [ + -3.916062, + 57.9546243 + ], + [ + -3.745774, + 57.9538956 + ], + [ + -3.7471473, + 58.0688409 + ], + [ + -3.5837256, + 58.0695672 + ], + [ + -3.5837256, + 58.1116689 + ], + [ + -3.4560096, + 58.1138452 + ], + [ + -3.4544646, + 58.228503 + ], + [ + -3.4379851, + 58.2283222 + ], + [ + -3.4243233, + 58.2427725 + ], + [ + -3.412307, + 58.2438567 + ], + [ + -3.3735115, + 58.2695057 + ], + [ + -3.3063919, + 58.2862038 + ], + [ + -3.1229154, + 58.2859395 + ], + [ + -3.123602, + 58.3443661 + ], + [ + -2.9574338, + 58.3447264 + ], + [ + -2.951254, + 58.6422011 + ], + [ + -2.8812162, + 58.6429157 + ], + [ + -2.8851004, + 58.8112825 + ], + [ + -2.7180775, + 58.8142997 + ], + [ + -2.7161354, + 58.8715749 + ], + [ + -2.556881, + 58.8775984 + ], + [ + -2.5544533, + 58.9923453 + ], + [ + -2.5567617, + 59.0483775 + ], + [ + -2.391893, + 59.0485996 + ], + [ + -2.3918002, + 59.1106996 + ], + [ + -2.4733695, + 59.1106996 + ], + [ + -2.5591563, + 59.1783028 + ], + [ + -2.5630406, + 59.2210646 + ], + [ + -2.3921334, + 59.224046 + ], + [ + -2.3911409, + 59.2740075 + ], + [ + -2.3639512, + 59.2745036 + ], + [ + -2.3658933, + 59.285417 + ], + [ + -2.3911409, + 59.284921 + ], + [ + -2.3911409, + 59.3379505 + ], + [ + -2.2221759, + 59.3381981 + ], + [ + -2.2233897, + 59.395965 + ], + [ + -2.3758467, + 59.396583 + ], + [ + -2.3899271, + 59.4026383 + ], + [ + -2.4008516, + 59.3962122 + ], + [ + -2.5637882, + 59.3952604 + ], + [ + -2.5637882, + 59.3385811 + ], + [ + -2.7320164, + 59.3375306 + ], + [ + -2.7333896, + 59.3952604 + ], + [ + -3.0726511, + 59.3931174 + ], + [ + -3.0703404, + 59.3354759 + ], + [ + -3.0753186, + 59.3355634 + ], + [ + -3.0749753, + 59.3292593 + ], + [ + -3.0698254, + 59.3289091 + ], + [ + -3.069801, + 59.2196159 + ], + [ + -3.2363384, + 59.2166341 + ], + [ + -3.2336751, + 59.1606496 + ], + [ + -3.4032766, + 59.1588895 + ], + [ + -3.394086, + 58.9279316 + ], + [ + -3.5664497, + 58.9259268 + ], + [ + -3.5611089, + 58.8679885 + ], + [ + -3.392508, + 58.8699339 + ], + [ + -3.3894734, + 58.8698711 + ], + [ + -3.3891093, + 58.8684905 + ], + [ + -3.3912942, + 58.868616 + ], + [ + -3.3884161, + 58.7543084 + ], + [ + -3.2238208, + 58.7555677 + ], + [ + -3.2189655, + 58.691289 + ], + [ + -3.4634113, + 58.6905753 + ], + [ + -3.4551716, + 58.6341518 + ], + [ + -3.787508, + 58.6341518 + ], + [ + -3.7861347, + 58.5769211 + ], + [ + -3.9028645, + 58.5733411 + ], + [ + -3.9028645, + 58.6477304 + ], + [ + -4.0690327, + 58.6491594 + ], + [ + -4.0690327, + 58.5912376 + ], + [ + -4.7364521, + 58.5933845 + ], + [ + -4.7364521, + 58.6505884 + ], + [ + -5.0715351, + 58.6520173 + ], + [ + -5.0654779, + 58.5325854 + ], + [ + -5.2332047, + 58.5316087 + ], + [ + -5.2283494, + 58.4719947 + ], + [ + -5.2424298, + 58.4719947 + ], + [ + -5.2366034, + 58.4089731 + ], + [ + -5.2283494, + 58.4094818 + ], + [ + -5.2210664, + 58.3005859 + ], + [ + -5.5657939, + 58.2959933 + ], + [ + -5.5580254, + 58.2372573 + ], + [ + -5.4146722, + 58.2401326 + ], + [ + -5.4141866, + 58.2267768 + ], + [ + -5.3885749, + 58.2272242 + ], + [ + -5.382714, + 58.1198615 + ], + [ + -5.51043, + 58.1191362 + ], + [ + -5.5114011, + 58.006214 + ], + [ + -5.6745397, + 58.0041559 + ], + [ + -5.6716266, + 57.9449366 + ], + [ + -5.6716266, + 57.8887166 + ], + [ + -5.8347652, + 57.8856193 + ], + [ + -5.8277052, + 57.5988958 + ], + [ + -6.0384259, + 57.5986357 + ], + [ + -6.0389115, + 57.6459559 + ], + [ + -6.1981658, + 57.6456961 + ], + [ + -6.2076123, + 57.7600132 + ], + [ + -6.537067, + 57.7544033 + ], + [ + -6.5312406, + 57.6402392 + ], + [ + -6.7002056, + 57.6360809 + ], + [ + -6.6807844, + 57.5236293 + ], + [ + -6.8516915, + 57.5152857 + ], + [ + -6.8361545, + 57.3385811 + ], + [ + -6.6730158, + 57.3438213 + ], + [ + -6.674958, + 57.2850883 + ], + [ + -6.5098772, + 57.2850883 + ], + [ + -6.4982244, + 57.1757637 + ], + [ + -6.3506228, + 57.1820797 + ], + [ + -6.3312015, + 57.1251969 + ], + [ + -6.1797156, + 57.1230884 + ], + [ + -6.1719471, + 57.0682265 + ], + [ + -6.4593819, + 57.059779 + ], + [ + -6.4564687, + 57.1093806 + ], + [ + -6.6671895, + 57.1062165 + ], + [ + -6.6730158, + 57.002708 + ], + [ + -6.5021087, + 57.0048233 + ], + [ + -6.4836097, + 56.8917522 + ], + [ + -6.3266104, + 56.8894062 + ], + [ + -6.3156645, + 56.7799312 + ], + [ + -6.2146739, + 56.775675 + ], + [ + -6.2146739, + 56.7234965 + ], + [ + -6.6866107, + 56.7224309 + ], + [ + -6.6769001, + 56.6114413 + ], + [ + -6.8419809, + 56.607166 + ], + [ + -6.8400387, + 56.5483307 + ], + [ + -7.1546633, + 56.5461895 + ], + [ + -7.1488369, + 56.4872592 + ], + [ + -6.9915246, + 56.490476 + ], + [ + -6.9876404, + 56.4325329 + ], + [ + -6.6827265, + 56.4314591 + ], + [ + -6.6769001, + 56.5472601 + ], + [ + -6.5292985, + 56.5504717 + ], + [ + -6.5234721, + 56.4379018 + ], + [ + -6.3661598, + 56.4368281 + ], + [ + -6.3642177, + 56.3766524 + ], + [ + -6.5273563, + 56.3712749 + ], + [ + -6.5171745, + 56.2428427 + ], + [ + -6.4869621, + 56.247421 + ], + [ + -6.4869621, + 56.1893882 + ], + [ + -6.3001945, + 56.1985572 + ], + [ + -6.3029411, + 56.2581017 + ], + [ + -5.9019401, + 56.256576 + ], + [ + -5.8964469, + 56.0960466 + ], + [ + -6.0282829, + 56.0883855 + ], + [ + -6.0392692, + 56.1557502 + ], + [ + -6.3853385, + 56.1542205 + ], + [ + -6.3606193, + 55.96099 + ], + [ + -6.2123039, + 55.9640647 + ], + [ + -6.2047508, + 55.9202269 + ], + [ + -6.5185478, + 55.9129158 + ], + [ + -6.5061881, + 55.7501763 + ], + [ + -6.6764762, + 55.7409005 + ], + [ + -6.6599967, + 55.6263176 + ], + [ + -6.3551261, + 55.6232161 + ], + [ + -6.3578727, + 55.5689002 + ], + [ + -6.0392692, + 55.5720059 + ], + [ + -6.0310294, + 55.6247669 + ], + [ + -5.7398917, + 55.6309694 + ], + [ + -5.7371452, + 55.4569279 + ], + [ + -5.8964469, + 55.4600426 + ], + [ + -5.8964469, + 55.2789864 + ], + [ + -5.4350211, + 55.2821151 + ], + [ + -5.4405143, + 55.4506979 + ], + [ + -5.2867057, + 55.4569279 + ], + [ + -5.3086784, + 55.4070602 + ], + [ + -4.9735954, + 55.4008223 + ], + [ + -4.9845817, + 55.2038242 + ], + [ + -5.1493766, + 55.2038242 + ], + [ + -5.1411369, + 55.037337 + ], + [ + -5.2152946, + 55.0341891 + ] + ], + [ + [ + -2.1646559, + 60.1622059 + ], + [ + -1.9930299, + 60.1609801 + ], + [ + -1.9946862, + 60.1035151 + ], + [ + -2.1663122, + 60.104743 + ] + ], + [ + [ + -1.5360658, + 59.8570831 + ], + [ + -1.3653566, + 59.8559841 + ], + [ + -1.366847, + 59.7975565 + ], + [ + -1.190628, + 59.7964199 + ], + [ + -1.1862046, + 59.9695391 + ], + [ + -1.0078652, + 59.9683948 + ], + [ + -1.0041233, + 60.114145 + ], + [ + -0.8360832, + 60.1130715 + ], + [ + -0.834574, + 60.1716772 + ], + [ + -1.0074262, + 60.1727795 + ], + [ + -1.0052165, + 60.2583924 + ], + [ + -0.8299659, + 60.2572778 + ], + [ + -0.826979, + 60.3726551 + ], + [ + -0.6507514, + 60.3715381 + ], + [ + -0.6477198, + 60.4882292 + ], + [ + -0.9984896, + 60.4904445 + ], + [ + -0.9970279, + 60.546555 + ], + [ + -0.6425288, + 60.5443201 + ], + [ + -0.6394896, + 60.6606792 + ], + [ + -0.8148133, + 60.6617806 + ], + [ + -0.8132987, + 60.7196112 + ], + [ + -0.6383298, + 60.7185141 + ], + [ + -0.635467, + 60.8275393 + ], + [ + -0.797568, + 60.8285523 + ], + [ + -0.9941426, + 60.8297807 + ], + [ + -0.9954966, + 60.7782667 + ], + [ + -1.1670282, + 60.7793403 + ], + [ + -1.1700357, + 60.6646181 + ], + [ + -1.5222599, + 60.6668304 + ], + [ + -1.5237866, + 60.6084426 + ], + [ + -1.6975673, + 60.609536 + ], + [ + -1.7021271, + 60.4345249 + ], + [ + -1.5260578, + 60.4334111 + ], + [ + -1.5275203, + 60.3770719 + ], + [ + -1.8751127, + 60.3792746 + ], + [ + -1.8781372, + 60.2624647 + ], + [ + -1.7019645, + 60.2613443 + ], + [ + -1.7049134, + 60.1470532 + ], + [ + -1.528659, + 60.1459283 + ] + ], + [ + [ + -0.9847667, + 60.8943762 + ], + [ + -0.9860347, + 60.8361105 + ], + [ + -0.8078362, + 60.8351904 + ], + [ + -0.8065683, + 60.8934578 + ] + ], + [ + [ + -7.7696901, + 56.8788231 + ], + [ + -7.7614504, + 56.7608274 + ], + [ + -7.6009049, + 56.7641903 + ], + [ + -7.5972473, + 56.819332 + ], + [ + -7.4479894, + 56.8203948 + ], + [ + -7.4489319, + 56.8794098 + ], + [ + -7.2841369, + 56.8794098 + ], + [ + -7.2813904, + 57.0471152 + ], + [ + -7.1303283, + 57.0515969 + ], + [ + -7.1330749, + 57.511801 + ], + [ + -6.96828, + 57.5147514 + ], + [ + -6.9765198, + 57.6854668 + ], + [ + -6.8062317, + 57.6913392 + ], + [ + -6.8089782, + 57.8041985 + ], + [ + -6.6496765, + 57.8071252 + ], + [ + -6.6441833, + 57.8612267 + ], + [ + -6.3200866, + 57.8626878 + ], + [ + -6.3200866, + 58.1551617 + ], + [ + -6.1607849, + 58.1522633 + ], + [ + -6.1552917, + 58.20874 + ], + [ + -5.9850036, + 58.2101869 + ], + [ + -5.9904968, + 58.2680163 + ], + [ + -6.1497986, + 58.2665717 + ], + [ + -6.1415588, + 58.5557514 + ], + [ + -6.3173401, + 58.5557514 + ], + [ + -6.3091003, + 58.4983923 + ], + [ + -6.4876282, + 58.4955218 + ], + [ + -6.4876282, + 58.4423768 + ], + [ + -6.6606628, + 58.4395018 + ], + [ + -6.6469299, + 58.3819525 + ], + [ + -6.8117248, + 58.3805125 + ], + [ + -6.8117248, + 58.3286357 + ], + [ + -6.9792663, + 58.3286357 + ], + [ + -6.9710266, + 58.2694608 + ], + [ + -7.1413147, + 58.2680163 + ], + [ + -7.1403816, + 58.0358742 + ], + [ + -7.3020636, + 58.0351031 + ], + [ + -7.3030347, + 57.9774797 + ], + [ + -7.1379539, + 57.9777372 + ], + [ + -7.1413526, + 57.9202792 + ], + [ + -7.1398961, + 57.8640206 + ], + [ + -7.3020636, + 57.862471 + ], + [ + -7.298484, + 57.7442293 + ], + [ + -7.4509193, + 57.7456951 + ], + [ + -7.4550392, + 57.6899522 + ], + [ + -7.6186131, + 57.6906048 + ], + [ + -7.6198341, + 57.7456951 + ], + [ + -7.7901222, + 57.7442293 + ], + [ + -7.7873756, + 57.6855477 + ], + [ + -7.6222332, + 57.6853817 + ], + [ + -7.6173779, + 57.5712602 + ], + [ + -7.788285, + 57.5709998 + ], + [ + -7.7892561, + 57.512109 + ], + [ + -7.7038025, + 57.5115874 + ], + [ + -7.6999183, + 57.4546902 + ], + [ + -7.5367796, + 57.4552126 + ], + [ + -7.5348375, + 57.5126306 + ], + [ + -7.4581235, + 57.5131521 + ], + [ + -7.4552103, + 57.2824165 + ], + [ + -7.6115515, + 57.2845158 + ], + [ + -7.6144647, + 57.2272651 + ], + [ + -7.451326, + 57.2256881 + ], + [ + -7.451326, + 57.1103873 + ], + [ + -7.6164068, + 57.1088053 + ], + [ + -7.603783, + 56.8792358 + ] + ], + [ + [ + -1.7106618, + 59.5626284 + ], + [ + -1.5417509, + 59.562215 + ], + [ + -1.5423082, + 59.5037224 + ], + [ + -1.7112191, + 59.5041365 + ] + ] + ], + "terms_url": "http://geo.nls.uk/maps/", + "terms_text": "National Library of Scotland Historic Maps" + }, + { + "name": "OS 1:25k historic (OSM)", + "type": "tms", + "template": "http://ooc.openstreetmap.org/os1/{zoom}/{x}/{y}.jpg", + "scaleExtent": [ + 6, + 17 + ], + "polygon": [ + [ + [ + -9, + 49.8 + ], + [ + -9, + 61.1 + ], + [ + 1.9, + 61.1 + ], + [ + 1.9, + 49.8 + ], + [ + -9, + 49.8 + ] + ] + ] + }, + { + "name": "OS New Popular Edition historic", + "type": "tms", + "template": "http://ooc.openstreetmap.org/npe/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + -5.8, + 49.8 + ], + [ + -5.8, + 55.8 + ], + [ + 1.9, + 55.8 + ], + [ + 1.9, + 49.8 + ], + [ + -5.8, + 49.8 + ] + ] + ] + }, + { + "name": "OS OpenData Locator", + "type": "tms", + "template": "http://tiles.itoworld.com/os_locator/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + -9, + 49.8 + ], + [ + -9, + 61.1 + ], + [ + 1.9, + 61.1 + ], + [ + 1.9, + 49.8 + ], + [ + -9, + 49.8 + ] + ] + ], + "overlay": true + }, + { + "name": "OS OpenData StreetView", + "type": "tms", + "template": "http://os.openstreetmap.org/sv/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 1, + 18 + ], + "polygon": [ + [ + [ + -5.8292886, + 50.0229734 + ], + [ + -5.8292886, + 50.254819 + ], + [ + -5.373356, + 50.254819 + ], + [ + -5.373356, + 50.3530588 + ], + [ + -5.1756021, + 50.3530588 + ], + [ + -5.1756021, + 50.5925406 + ], + [ + -4.9970743, + 50.5925406 + ], + [ + -4.9970743, + 50.6935617 + ], + [ + -4.7965738, + 50.6935617 + ], + [ + -4.7965738, + 50.7822112 + ], + [ + -4.6949503, + 50.7822112 + ], + [ + -4.6949503, + 50.9607371 + ], + [ + -4.6043131, + 50.9607371 + ], + [ + -4.6043131, + 51.0692066 + ], + [ + -4.3792215, + 51.0692066 + ], + [ + -4.3792215, + 51.2521782 + ], + [ + -3.9039346, + 51.2521782 + ], + [ + -3.9039346, + 51.2916998 + ], + [ + -3.7171671, + 51.2916998 + ], + [ + -3.7171671, + 51.2453014 + ], + [ + -3.1486246, + 51.2453014 + ], + [ + -3.1486246, + 51.362067 + ], + [ + -3.7446329, + 51.362067 + ], + [ + -3.7446329, + 51.4340386 + ], + [ + -3.8297769, + 51.4340386 + ], + [ + -3.8297769, + 51.5298246 + ], + [ + -4.0852091, + 51.5298246 + ], + [ + -4.0852091, + 51.4939284 + ], + [ + -4.3792215, + 51.4939284 + ], + [ + -4.3792215, + 51.5427168 + ], + [ + -5.1444195, + 51.5427168 + ], + [ + -5.1444195, + 51.6296003 + ], + [ + -5.7387103, + 51.6296003 + ], + [ + -5.7387103, + 51.774037 + ], + [ + -5.5095393, + 51.774037 + ], + [ + -5.5095393, + 51.9802596 + ], + [ + -5.198799, + 51.9802596 + ], + [ + -5.198799, + 52.0973358 + ], + [ + -4.8880588, + 52.0973358 + ], + [ + -4.8880588, + 52.1831557 + ], + [ + -4.4957492, + 52.1831557 + ], + [ + -4.4957492, + 52.2925739 + ], + [ + -4.3015365, + 52.2925739 + ], + [ + -4.3015365, + 52.3685318 + ], + [ + -4.1811246, + 52.3685318 + ], + [ + -4.1811246, + 52.7933685 + ], + [ + -4.4413696, + 52.7933685 + ], + [ + -4.4413696, + 52.7369614 + ], + [ + -4.8569847, + 52.7369614 + ], + [ + -4.8569847, + 52.9317255 + ], + [ + -4.7288044, + 52.9317255 + ], + [ + -4.7288044, + 53.5038599 + ], + [ + -4.1578191, + 53.5038599 + ], + [ + -4.1578191, + 53.4113498 + ], + [ + -3.3110518, + 53.4113498 + ], + [ + -3.3110518, + 53.5038599 + ], + [ + -3.2333667, + 53.5038599 + ], + [ + -3.2333667, + 54.0159169 + ], + [ + -3.3926211, + 54.0159169 + ], + [ + -3.3926211, + 54.1980953 + ], + [ + -3.559644, + 54.1980953 + ], + [ + -3.559644, + 54.433732 + ], + [ + -3.7188984, + 54.433732 + ], + [ + -3.7188984, + 54.721897 + ], + [ + -4.3015365, + 54.721897 + ], + [ + -4.3015365, + 54.6140739 + ], + [ + -5.0473132, + 54.6140739 + ], + [ + -5.0473132, + 54.7532915 + ], + [ + -5.2298731, + 54.7532915 + ], + [ + -5.2298731, + 55.2190799 + ], + [ + -5.6532567, + 55.2190799 + ], + [ + -5.6532567, + 55.250088 + ], + [ + -5.8979647, + 55.250088 + ], + [ + -5.8979647, + 55.4822462 + ], + [ + -6.5933212, + 55.4822462 + ], + [ + -6.5933212, + 56.3013441 + ], + [ + -7.1727691, + 56.3013441 + ], + [ + -7.1727691, + 56.5601822 + ], + [ + -6.8171722, + 56.5601822 + ], + [ + -6.8171722, + 56.6991713 + ], + [ + -6.5315276, + 56.6991713 + ], + [ + -6.5315276, + 56.9066964 + ], + [ + -6.811679, + 56.9066964 + ], + [ + -6.811679, + 57.3716613 + ], + [ + -6.8721038, + 57.3716613 + ], + [ + -6.8721038, + 57.5518893 + ], + [ + -7.0973235, + 57.5518893 + ], + [ + -7.0973235, + 57.2411085 + ], + [ + -7.1742278, + 57.2411085 + ], + [ + -7.1742278, + 56.9066964 + ], + [ + -7.3719817, + 56.9066964 + ], + [ + -7.3719817, + 56.8075885 + ], + [ + -7.5202972, + 56.8075885 + ], + [ + -7.5202972, + 56.7142479 + ], + [ + -7.8306806, + 56.7142479 + ], + [ + -7.8306806, + 56.8994605 + ], + [ + -7.6494061, + 56.8994605 + ], + [ + -7.6494061, + 57.4739617 + ], + [ + -7.8306806, + 57.4739617 + ], + [ + -7.8306806, + 57.7915584 + ], + [ + -7.4736249, + 57.7915584 + ], + [ + -7.4736249, + 58.086063 + ], + [ + -7.1879804, + 58.086063 + ], + [ + -7.1879804, + 58.367197 + ], + [ + -6.8034589, + 58.367197 + ], + [ + -6.8034589, + 58.4155786 + ], + [ + -6.638664, + 58.4155786 + ], + [ + -6.638664, + 58.4673277 + ], + [ + -6.5178143, + 58.4673277 + ], + [ + -6.5178143, + 58.5625632 + ], + [ + -6.0536224, + 58.5625632 + ], + [ + -6.0536224, + 58.1568843 + ], + [ + -6.1470062, + 58.1568843 + ], + [ + -6.1470062, + 58.1105865 + ], + [ + -6.2799798, + 58.1105865 + ], + [ + -6.2799798, + 57.7122664 + ], + [ + -6.1591302, + 57.7122664 + ], + [ + -6.1591302, + 57.6667563 + ], + [ + -5.9339104, + 57.6667563 + ], + [ + -5.9339104, + 57.8892524 + ], + [ + -5.80643, + 57.8892524 + ], + [ + -5.80643, + 57.9621767 + ], + [ + -5.6141692, + 57.9621767 + ], + [ + -5.6141692, + 58.0911236 + ], + [ + -5.490819, + 58.0911236 + ], + [ + -5.490819, + 58.3733281 + ], + [ + -5.3199118, + 58.3733281 + ], + [ + -5.3199118, + 58.75015 + ], + [ + -3.5719977, + 58.75015 + ], + [ + -3.5719977, + 59.2091788 + ], + [ + -3.1944501, + 59.2091788 + ], + [ + -3.1944501, + 59.4759216 + ], + [ + -2.243583, + 59.4759216 + ], + [ + -2.243583, + 59.1388749 + ], + [ + -2.4611012, + 59.1388749 + ], + [ + -2.4611012, + 58.8185938 + ], + [ + -2.7407675, + 58.8185938 + ], + [ + -2.7407675, + 58.5804743 + ], + [ + -2.9116746, + 58.5804743 + ], + [ + -2.9116746, + 58.1157523 + ], + [ + -3.4865441, + 58.1157523 + ], + [ + -3.4865441, + 57.740386 + ], + [ + -1.7153245, + 57.740386 + ], + [ + -1.7153245, + 57.2225558 + ], + [ + -1.9794538, + 57.2225558 + ], + [ + -1.9794538, + 56.8760742 + ], + [ + -2.1658979, + 56.8760742 + ], + [ + -2.1658979, + 56.6333186 + ], + [ + -2.3601106, + 56.6333186 + ], + [ + -2.3601106, + 56.0477521 + ], + [ + -1.9794538, + 56.0477521 + ], + [ + -1.9794538, + 55.8650949 + ], + [ + -1.4745008, + 55.8650949 + ], + [ + -1.4745008, + 55.2499926 + ], + [ + -1.3221997, + 55.2499926 + ], + [ + -1.3221997, + 54.8221737 + ], + [ + -1.0550014, + 54.8221737 + ], + [ + -1.0550014, + 54.6746628 + ], + [ + -0.6618765, + 54.6746628 + ], + [ + -0.6618765, + 54.5527463 + ], + [ + -0.3247617, + 54.5527463 + ], + [ + -0.3247617, + 54.2865195 + ], + [ + 0.0092841, + 54.2865195 + ], + [ + 0.0092841, + 53.7938518 + ], + [ + 0.2081962, + 53.7938518 + ], + [ + 0.2081962, + 53.5217726 + ], + [ + 0.4163548, + 53.5217726 + ], + [ + 0.4163548, + 53.0298851 + ], + [ + 1.4273388, + 53.0298851 + ], + [ + 1.4273388, + 52.92021 + ], + [ + 1.8333912, + 52.92021 + ], + [ + 1.8333912, + 52.042488 + ], + [ + 1.5235504, + 52.042488 + ], + [ + 1.5235504, + 51.8261335 + ], + [ + 1.2697049, + 51.8261335 + ], + [ + 1.2697049, + 51.6967453 + ], + [ + 1.116651, + 51.6967453 + ], + [ + 1.116651, + 51.440346 + ], + [ + 1.5235504, + 51.440346 + ], + [ + 1.5235504, + 51.3331831 + ], + [ + 1.4507565, + 51.3331831 + ], + [ + 1.4507565, + 51.0207553 + ], + [ + 1.0699883, + 51.0207553 + ], + [ + 1.0699883, + 50.9008416 + ], + [ + 0.7788126, + 50.9008416 + ], + [ + 0.7788126, + 50.729843 + ], + [ + -0.7255952, + 50.729843 + ], + [ + -0.7255952, + 50.7038437 + ], + [ + -1.0074383, + 50.7038437 + ], + [ + -1.0074383, + 50.5736307 + ], + [ + -2.3625252, + 50.5736307 + ], + [ + -2.3625252, + 50.4846421 + ], + [ + -2.4987805, + 50.4846421 + ], + [ + -2.4987805, + 50.5736307 + ], + [ + -3.4096378, + 50.5736307 + ], + [ + -3.4096378, + 50.2057837 + ], + [ + -3.6922446, + 50.2057837 + ], + [ + -3.6922446, + 50.1347737 + ], + [ + -5.005468, + 50.1347737 + ], + [ + -5.005468, + 49.9474456 + ], + [ + -5.2839506, + 49.9474456 + ], + [ + -5.2839506, + 50.0229734 + ] + ], + [ + [ + -6.4580707, + 49.8673563 + ], + [ + -6.4580707, + 49.9499935 + ], + [ + -6.3978807, + 49.9499935 + ], + [ + -6.3978807, + 50.0053797 + ], + [ + -6.1799606, + 50.0053797 + ], + [ + -6.1799606, + 49.9168614 + ], + [ + -6.2540201, + 49.9168614 + ], + [ + -6.2540201, + 49.8673563 + ] + ], + [ + [ + -5.8343165, + 49.932156 + ], + [ + -5.8343165, + 49.9754641 + ], + [ + -5.7683254, + 49.9754641 + ], + [ + -5.7683254, + 49.932156 + ] + ], + [ + [ + -1.9483797, + 60.6885737 + ], + [ + -1.9483797, + 60.3058841 + ], + [ + -1.7543149, + 60.3058841 + ], + [ + -1.7543149, + 60.1284428 + ], + [ + -1.5754914, + 60.1284428 + ], + [ + -1.5754914, + 59.797917 + ], + [ + -1.0316959, + 59.797917 + ], + [ + -1.0316959, + 60.0354518 + ], + [ + -0.6626918, + 60.0354518 + ], + [ + -0.6626918, + 60.9103862 + ], + [ + -1.1034395, + 60.9103862 + ], + [ + -1.1034395, + 60.8040022 + ], + [ + -1.3506319, + 60.8040022 + ], + [ + -1.3506319, + 60.6885737 + ] + ], + [ + [ + -2.203381, + 60.1968568 + ], + [ + -2.203381, + 60.0929443 + ], + [ + -1.9864011, + 60.0929443 + ], + [ + -1.9864011, + 60.1968568 + ] + ], + [ + [ + -1.7543149, + 59.5698289 + ], + [ + -1.7543149, + 59.4639383 + ], + [ + -1.5373349, + 59.4639383 + ], + [ + -1.5373349, + 59.5698289 + ] + ], + [ + [ + -4.5585981, + 59.1370518 + ], + [ + -4.5585981, + 58.9569099 + ], + [ + -4.2867004, + 58.9569099 + ], + [ + -4.2867004, + 59.1370518 + ] + ], + [ + [ + -6.2787732, + 59.2025744 + ], + [ + -6.2787732, + 59.0227769 + ], + [ + -5.6650612, + 59.0227769 + ], + [ + -5.6650612, + 59.2025744 + ] + ], + [ + [ + -8.7163482, + 57.9440556 + ], + [ + -8.7163482, + 57.7305936 + ], + [ + -8.3592926, + 57.7305936 + ], + [ + -8.3592926, + 57.9440556 + ] + ], + [ + [ + -7.6077005, + 50.4021026 + ], + [ + -7.6077005, + 50.2688657 + ], + [ + -7.3907205, + 50.2688657 + ], + [ + -7.3907205, + 50.4021026 + ] + ], + [ + [ + -7.7304303, + 58.3579902 + ], + [ + -7.7304303, + 58.248313 + ], + [ + -7.5134503, + 58.248313 + ], + [ + -7.5134503, + 58.3579902 + ] + ] + ] + }, + { + "name": "OS Scottish Popular historic", + "type": "tms", + "template": "http://ooc.openstreetmap.org/npescotland/tiles/{zoom}/{x}/{y}.jpg", + "scaleExtent": [ + 6, + 15 + ], + "polygon": [ + [ + [ + -7.8, + 54.5 + ], + [ + -7.8, + 61.1 + ], + [ + -1.1, + 61.1 + ], + [ + -1.1, + 54.5 + ], + [ + -7.8, + 54.5 + ] + ] + ] + }, + { + "name": "OpenPT Map (overlay)", + "type": "tms", + "template": "http://openptmap.de/tiles/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 5, + 16 + ], + "polygon": [ + [ + [ + 6.4901072, + 53.665658 + ], + [ + 8.5665347, + 53.9848257 + ], + [ + 8.1339457, + 54.709715 + ], + [ + 8.317796, + 55.0952362 + ], + [ + 10.1887438, + 54.7783834 + ], + [ + 10.6321475, + 54.4778841 + ], + [ + 11.2702164, + 54.6221504 + ], + [ + 11.681176, + 54.3709243 + ], + [ + 12.0272473, + 54.3898199 + ], + [ + 13.3250145, + 54.8531617 + ], + [ + 13.9198245, + 54.6972173 + ], + [ + 14.2118221, + 54.1308273 + ], + [ + 14.493005, + 53.2665063 + ], + [ + 14.1577485, + 52.8766495 + ], + [ + 14.7525584, + 52.5819369 + ], + [ + 15.0986297, + 51.0171541 + ], + [ + 14.9364088, + 50.8399279 + ], + [ + 14.730929, + 50.7920977 + ], + [ + 14.4389313, + 50.8808862 + ], + [ + 12.9573138, + 50.3939044 + ], + [ + 12.51391, + 50.3939044 + ], + [ + 12.3084302, + 50.1173237 + ], + [ + 12.6112425, + 49.9088337 + ], + [ + 12.394948, + 49.7344006 + ], + [ + 12.7734634, + 49.4047626 + ], + [ + 14.1469337, + 48.6031036 + ], + [ + 14.6768553, + 48.6531391 + ], + [ + 15.0661855, + 49.0445497 + ], + [ + 16.2666202, + 48.7459305 + ], + [ + 16.4937294, + 48.8741286 + ], + [ + 16.904689, + 48.7173975 + ], + [ + 16.9371332, + 48.5315383 + ], + [ + 16.8384693, + 48.3823161 + ], + [ + 17.2017097, + 48.010204 + ], + [ + 17.1214145, + 47.6997605 + ], + [ + 16.777292, + 47.6585709 + ], + [ + 16.6090543, + 47.7460598 + ], + [ + 16.410228, + 47.6637214 + ], + [ + 16.7352326, + 47.6147714 + ], + [ + 16.5555242, + 47.3589738 + ], + [ + 16.4790525, + 46.9768539 + ], + [ + 16.0355168, + 46.8096295 + ], + [ + 16.0508112, + 46.6366332 + ], + [ + 14.9572663, + 46.6313822 + ], + [ + 14.574908, + 46.3892866 + ], + [ + 12.3954655, + 46.6891149 + ], + [ + 12.1507562, + 47.0550608 + ], + [ + 11.1183887, + 46.9142058 + ], + [ + 11.0342699, + 46.7729797 + ], + [ + 10.4836739, + 46.8462544 + ], + [ + 10.4607324, + 46.5472973 + ], + [ + 10.1013156, + 46.5735879 + ], + [ + 10.2007287, + 46.1831867 + ], + [ + 9.8948421, + 46.3629068 + ], + [ + 9.5966026, + 46.2889758 + ], + [ + 9.2983631, + 46.505206 + ], + [ + 9.2830687, + 46.2572605 + ], + [ + 9.0536537, + 45.7953255 + ], + [ + 8.4265861, + 46.2466846 + ], + [ + 8.4418804, + 46.4736161 + ], + [ + 7.8759901, + 45.9284607 + ], + [ + 7.0959791, + 45.8645956 + ], + [ + 6.7747981, + 46.1620044 + ], + [ + 6.8206811, + 46.4051083 + ], + [ + 6.5453831, + 46.4578142 + ], + [ + 6.3312624, + 46.3840116 + ], + [ + 6.3847926, + 46.2466846 + ], + [ + 5.8953739, + 46.0878021 + ], + [ + 6.1171418, + 46.3681838 + ], + [ + 6.0942003, + 46.5998657 + ], + [ + 6.4383228, + 46.7782169 + ], + [ + 6.4306756, + 46.9298747 + ], + [ + 7.0806847, + 47.3460216 + ], + [ + 6.8436226, + 47.3719227 + ], + [ + 6.9965659, + 47.5012373 + ], + [ + 7.1800979, + 47.5064033 + ], + [ + 7.2336281, + 47.439206 + ], + [ + 7.4553959, + 47.4805683 + ], + [ + 7.7842241, + 48.645735 + ], + [ + 8.1971711, + 49.0282701 + ], + [ + 7.6006921, + 49.0382974 + ], + [ + 7.4477487, + 49.1634679 + ], + [ + 7.2030394, + 49.1034255 + ], + [ + 6.6677378, + 49.1634679 + ], + [ + 6.6371491, + 49.3331933 + ], + [ + 6.3542039, + 49.4576194 + ], + [ + 6.5453831, + 49.8043366 + ], + [ + 6.2471436, + 49.873384 + ], + [ + 6.0789059, + 50.1534883 + ], + [ + 6.3618511, + 50.3685934 + ], + [ + 6.0865531, + 50.7039632 + ], + [ + 5.8800796, + 51.0513752 + ], + [ + 6.1247889, + 51.1618085 + ], + [ + 6.1936134, + 51.491527 + ], + [ + 5.9641984, + 51.7526501 + ], + [ + 6.0253758, + 51.8897286 + ], + [ + 6.4536171, + 51.8661241 + ], + [ + 6.8436226, + 51.9557552 + ], + [ + 6.6906793, + 52.0499105 + ], + [ + 7.0042131, + 52.2282603 + ], + [ + 7.0195074, + 52.4525245 + ], + [ + 6.6983264, + 52.4665032 + ], + [ + 6.6906793, + 52.6524628 + ], + [ + 7.0348017, + 52.6385432 + ], + [ + 7.0730376, + 52.8330151 + ], + [ + 7.2183337, + 52.9852064 + ], + [ + 7.1953922, + 53.3428087 + ], + [ + 7.0042131, + 53.3291098 + ] + ] + ], + "terms_url": "http://openstreetmap.org/", + "terms_text": "© OpenStreetMap contributors, CC-BY-SA" + }, + { + "name": "OpenStreetMap (Mapnik)", + "type": "tms", + "description": "The default OpenStreetMap layer.", + "template": "http://tile.openstreetmap.org/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 18 + ], + "terms_url": "http://openstreetmap.org/", + "terms_text": "© OpenStreetMap contributors, CC-BY-SA", + "default": true + }, + { + "name": "OpenStreetMap GPS traces", + "type": "tms", + "description": "Public GPS traces uploaded to OpenStreetMap.", + "template": "http://{switch:a,b,c}.gps-tile.openstreetmap.org/lines/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 20 + ], + "terms_url": "http://www.openstreetmap.org/copyright", + "terms_text": "© OpenStreetMap contributors", + "terms_html": "© OpenStreetMap contributors. North: South: East: West: ", + "overlay": true + }, + { + "name": "Pangasinán/Bulacan (Phillipines HiRes)", + "type": "tms", + "template": "http://gravitystorm.dev.openstreetmap.org/imagery/philippines/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 12, + 19 + ], + "polygon": [ + [ + [ + 120.336593, + 15.985768 + ], + [ + 120.445995, + 15.984 + ], + [ + 120.446134, + 15.974459 + ], + [ + 120.476464, + 15.974592 + ], + [ + 120.594247, + 15.946832 + ], + [ + 120.598064, + 16.090795 + ], + [ + 120.596537, + 16.197999 + ], + [ + 120.368537, + 16.218527 + ], + [ + 120.347576, + 16.042308 + ], + [ + 120.336593, + 15.985768 + ] + ], + [ + [ + 120.8268, + 15.3658 + ], + [ + 121.2684, + 15.2602 + ], + [ + 121.2699, + 14.7025 + ], + [ + 120.695, + 14.8423 + ] + ] + ] + }, + { + "name": "Slovakia EEA CORINE 2006", + "type": "tms", + "template": "http://www.freemap.sk/tms/clc/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_url": "http://www.eea.europa.eu/data-and-maps/data/clc-2006-vector-data-version-1", + "terms_text": "EEA Corine 2006" + }, + { + "name": "Slovakia EEA GMES Urban Atlas", + "type": "tms", + "template": "http://www.freemap.sk/tms/urbanatlas/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + 19.83682, + 49.25529 + ], + [ + 19.80075, + 49.42385 + ], + [ + 19.60437, + 49.48058 + ], + [ + 19.49179, + 49.63961 + ], + [ + 19.21831, + 49.52604 + ], + [ + 19.16778, + 49.42521 + ], + [ + 19.00308, + 49.42236 + ], + [ + 18.97611, + 49.5308 + ], + [ + 18.54685, + 49.51425 + ], + [ + 18.31432, + 49.33818 + ], + [ + 18.15913, + 49.2961 + ], + [ + 18.05564, + 49.11134 + ], + [ + 17.56396, + 48.84938 + ], + [ + 17.17929, + 48.88816 + ], + [ + 17.058, + 48.81105 + ], + [ + 16.90426, + 48.61947 + ], + [ + 16.79685, + 48.38561 + ], + [ + 17.06762, + 48.01116 + ], + [ + 17.32787, + 47.97749 + ], + [ + 17.51699, + 47.82535 + ], + [ + 17.74776, + 47.73093 + ], + [ + 18.29515, + 47.72075 + ], + [ + 18.67959, + 47.75541 + ], + [ + 18.89755, + 47.81203 + ], + [ + 18.79463, + 47.88245 + ], + [ + 18.84318, + 48.04046 + ], + [ + 19.46212, + 48.05333 + ], + [ + 19.62064, + 48.22938 + ], + [ + 19.89585, + 48.09387 + ], + [ + 20.33766, + 48.2643 + ], + [ + 20.55395, + 48.52358 + ], + [ + 20.82335, + 48.55714 + ], + [ + 21.10271, + 48.47096 + ], + [ + 21.45863, + 48.55513 + ], + [ + 21.74536, + 48.31435 + ], + [ + 22.15293, + 48.37179 + ], + [ + 22.61255, + 49.08914 + ], + [ + 22.09997, + 49.23814 + ], + [ + 21.9686, + 49.36363 + ], + [ + 21.6244, + 49.46989 + ], + [ + 21.06873, + 49.46402 + ], + [ + 20.94336, + 49.31088 + ], + [ + 20.73052, + 49.44006 + ], + [ + 20.22804, + 49.41714 + ], + [ + 20.05234, + 49.23052 + ], + [ + 19.83682, + 49.25529 + ] + ] + ], + "terms_url": "http://www.eea.europa.eu/data-and-maps/data/urban-atlas", + "terms_text": "EEA GMES Urban Atlas" + }, + { + "name": "Slovakia Historic Maps", + "type": "tms", + "template": "http://tms.freemap.sk/historicke/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 12 + ], + "polygon": [ + [ + [ + 16.8196949, + 47.4927236 + ], + [ + 16.8196949, + 49.5030322 + ], + [ + 22.8388318, + 49.5030322 + ], + [ + 22.8388318, + 47.4927236 + ], + [ + 16.8196949, + 47.4927236 + ] + ] + ] + }, + { + "name": "South Africa CD:NGI Aerial", + "type": "tms", + "template": "http://{switch:a,b,c}.aerial.openstreetmap.org.za/ngi-aerial/{zoom}/{x}/{y}.jpg", + "scaleExtent": [ + 1, + 22 + ], + "polygon": [ + [ + [ + 17.8396817, + -32.7983384 + ], + [ + 17.8893509, + -32.6972835 + ], + [ + 18.00364, + -32.6982187 + ], + [ + 18.0991679, + -32.7485251 + ], + [ + 18.2898747, + -32.5526645 + ], + [ + 18.2930182, + -32.0487089 + ], + [ + 18.105455, + -31.6454966 + ], + [ + 17.8529257, + -31.3443951 + ], + [ + 17.5480046, + -30.902171 + ], + [ + 17.4044506, + -30.6374731 + ], + [ + 17.2493704, + -30.3991663 + ], + [ + 16.9936977, + -29.6543552 + ], + [ + 16.7987996, + -29.19437 + ], + [ + 16.5494139, + -28.8415949 + ], + [ + 16.4498691, + -28.691876 + ], + [ + 16.4491046, + -28.5515766 + ], + [ + 16.6002551, + -28.4825663 + ], + [ + 16.7514057, + -28.4486958 + ], + [ + 16.7462192, + -28.2458973 + ], + [ + 16.8855148, + -28.04729 + ], + [ + 16.9929502, + -28.0244005 + ], + [ + 17.0529659, + -28.0257086 + ], + [ + 17.1007562, + -28.0338839 + ], + [ + 17.2011527, + -28.0930546 + ], + [ + 17.2026346, + -28.2328424 + ], + [ + 17.2474611, + -28.2338215 + ], + [ + 17.2507953, + -28.198892 + ], + [ + 17.3511919, + -28.1975861 + ], + [ + 17.3515624, + -28.2442655 + ], + [ + 17.4015754, + -28.2452446 + ], + [ + 17.4149122, + -28.3489751 + ], + [ + 17.4008345, + -28.547997 + ], + [ + 17.4526999, + -28.5489733 + ], + [ + 17.4512071, + -28.6495106 + ], + [ + 17.4983599, + -28.6872054 + ], + [ + 17.6028204, + -28.6830048 + ], + [ + 17.6499732, + -28.6967928 + ], + [ + 17.6525928, + -28.7381457 + ], + [ + 17.801386, + -28.7381457 + ], + [ + 17.9994276, + -28.7560602 + ], + [ + 18.0002748, + -28.7956172 + ], + [ + 18.1574507, + -28.8718055 + ], + [ + 18.5063811, + -28.8718055 + ], + [ + 18.6153564, + -28.8295875 + ], + [ + 18.9087513, + -28.8277516 + ], + [ + 19.1046973, + -28.9488548 + ], + [ + 19.1969071, + -28.9378513 + ], + [ + 19.243012, + -28.8516164 + ], + [ + 19.2314858, + -28.802963 + ], + [ + 19.2587296, + -28.7009928 + ], + [ + 19.4431493, + -28.6973163 + ], + [ + 19.5500289, + -28.4958332 + ], + [ + 19.6967264, + -28.4939914 + ], + [ + 19.698822, + -28.4479358 + ], + [ + 19.8507587, + -28.4433291 + ], + [ + 19.8497109, + -28.4027818 + ], + [ + 19.9953605, + -28.399095 + ], + [ + 19.9893671, + -24.7497859 + ], + [ + 20.2916682, + -24.9192346 + ], + [ + 20.4724562, + -25.1501701 + ], + [ + 20.6532441, + -25.4529449 + ], + [ + 20.733265, + -25.6801957 + ], + [ + 20.8281046, + -25.8963498 + ], + [ + 20.8429232, + -26.215851 + ], + [ + 20.6502804, + -26.4840868 + ], + [ + 20.6532441, + -26.8204869 + ], + [ + 21.0889134, + -26.846933 + ], + [ + 21.6727695, + -26.8389998 + ], + [ + 21.7765003, + -26.6696268 + ], + [ + 21.9721069, + -26.6431395 + ], + [ + 22.2803355, + -26.3274702 + ], + [ + 22.5707817, + -26.1333967 + ], + [ + 22.7752795, + -25.6775246 + ], + [ + 23.0005235, + -25.2761948 + ], + [ + 23.4658301, + -25.2735148 + ], + [ + 23.883717, + -25.597366 + ], + [ + 24.2364017, + -25.613402 + ], + [ + 24.603905, + -25.7896563 + ], + [ + 25.110704, + -25.7389432 + ], + [ + 25.5078447, + -25.6855376 + ], + [ + 25.6441766, + -25.4823781 + ], + [ + 25.8419267, + -24.7805437 + ], + [ + 25.846641, + -24.7538456 + ], + [ + 26.3928487, + -24.6332894 + ], + [ + 26.4739066, + -24.5653312 + ], + [ + 26.5089966, + -24.4842437 + ], + [ + 26.5861946, + -24.4075775 + ], + [ + 26.7300635, + -24.3014458 + ], + [ + 26.8567384, + -24.2499463 + ], + [ + 26.8574402, + -24.1026901 + ], + [ + 26.9215471, + -23.8990957 + ], + [ + 26.931831, + -23.8461891 + ], + [ + 26.9714827, + -23.6994344 + ], + [ + 27.0006074, + -23.6367644 + ], + [ + 27.0578041, + -23.6052574 + ], + [ + 27.1360547, + -23.5203437 + ], + [ + 27.3339623, + -23.3973792 + ], + [ + 27.5144057, + -23.3593929 + ], + [ + 27.5958145, + -23.2085465 + ], + [ + 27.8098634, + -23.0994957 + ], + [ + 27.8828506, + -23.0620496 + ], + [ + 27.9382928, + -22.9496487 + ], + [ + 28.0407556, + -22.8255118 + ], + [ + 28.2056786, + -22.6552861 + ], + [ + 28.3397223, + -22.5639374 + ], + [ + 28.4906093, + -22.560697 + ], + [ + 28.6108769, + -22.5400248 + ], + [ + 28.828175, + -22.4550173 + ], + [ + 28.9285324, + -22.4232328 + ], + [ + 28.9594116, + -22.3090081 + ], + [ + 29.0162574, + -22.208335 + ], + [ + 29.2324117, + -22.1693453 + ], + [ + 29.3531213, + -22.1842926 + ], + [ + 29.6548952, + -22.1186426 + ], + [ + 29.7777102, + -22.1361956 + ], + [ + 29.9292989, + -22.1849425 + ], + [ + 30.1166795, + -22.2830348 + ], + [ + 30.2563377, + -22.2914767 + ], + [ + 30.3033582, + -22.3395204 + ], + [ + 30.5061784, + -22.3057617 + ], + [ + 30.8374279, + -22.284983 + ], + [ + 31.0058599, + -22.3077095 + ], + [ + 31.1834152, + -22.3232913 + ], + [ + 31.2930586, + -22.3674647 + ], + [ + 31.5680579, + -23.1903385 + ], + [ + 31.5568311, + -23.4430809 + ], + [ + 31.6931122, + -23.6175209 + ], + [ + 31.7119696, + -23.741136 + ], + [ + 31.7774743, + -23.8800628 + ], + [ + 31.8886337, + -23.9481098 + ], + [ + 31.9144386, + -24.1746736 + ], + [ + 31.9948307, + -24.3040878 + ], + [ + 32.0166656, + -24.4405988 + ], + [ + 32.0077331, + -24.6536578 + ], + [ + 32.019643, + -24.9140701 + ], + [ + 32.035523, + -25.0849767 + ], + [ + 32.019643, + -25.3821442 + ], + [ + 31.9928457, + -25.4493771 + ], + [ + 31.9997931, + -25.5165725 + ], + [ + 32.0057481, + -25.6078978 + ], + [ + 32.0057481, + -25.6624806 + ], + [ + 31.9362735, + -25.8403721 + ], + [ + 31.9809357, + -25.9546537 + ], + [ + 31.8687838, + -26.0037251 + ], + [ + 31.4162062, + -25.7277683 + ], + [ + 31.3229117, + -25.7438611 + ], + [ + 31.2504595, + -25.8296526 + ], + [ + 31.1393001, + -25.9162746 + ], + [ + 31.1164727, + -25.9912361 + ], + [ + 30.9656135, + -26.2665756 + ], + [ + 30.8921689, + -26.3279703 + ], + [ + 30.8534616, + -26.4035568 + ], + [ + 30.8226943, + -26.4488849 + ], + [ + 30.8022583, + -26.5240694 + ], + [ + 30.8038369, + -26.8082089 + ], + [ + 30.9020939, + -26.7807451 + ], + [ + 30.9100338, + -26.8489495 + ], + [ + 30.9824859, + -26.9082627 + ], + [ + 30.976531, + -27.0029222 + ], + [ + 31.0034434, + -27.0441587 + ], + [ + 31.1543322, + -27.1980416 + ], + [ + 31.5015607, + -27.311117 + ], + [ + 31.9700183, + -27.311117 + ], + [ + 31.9700183, + -27.120472 + ], + [ + 31.9769658, + -27.050664 + ], + [ + 32.0002464, + -26.7983892 + ], + [ + 32.1069826, + -26.7984645 + ], + [ + 32.3114546, + -26.8479493 + ], + [ + 32.899986, + -26.8516059 + ], + [ + 32.886091, + -26.9816971 + ], + [ + 32.709427, + -27.4785436 + ], + [ + 32.6240724, + -27.7775144 + ], + [ + 32.5813951, + -28.07479 + ], + [ + 32.5387178, + -28.2288046 + ], + [ + 32.4275584, + -28.5021568 + ], + [ + 32.3640388, + -28.5945699 + ], + [ + 32.0702603, + -28.8469827 + ], + [ + 31.9878832, + -28.9069497 + ], + [ + 31.7764818, + -28.969487 + ], + [ + 31.4638459, + -29.2859343 + ], + [ + 31.359634, + -29.3854348 + ], + [ + 31.1680825, + -29.6307408 + ], + [ + 31.064863, + -29.7893535 + ], + [ + 31.0534493, + -29.8470469 + ], + [ + 31.0669933, + -29.8640319 + ], + [ + 31.0455459, + -29.9502017 + ], + [ + 30.9518556, + -30.0033946 + ], + [ + 30.8651833, + -30.1024093 + ], + [ + 30.7244725, + -30.392502 + ], + [ + 30.3556256, + -30.9308873 + ], + [ + 30.0972364, + -31.2458274 + ], + [ + 29.8673136, + -31.4304296 + ], + [ + 29.7409393, + -31.5014699 + ], + [ + 29.481312, + -31.6978686 + ], + [ + 28.8943171, + -32.2898903 + ], + [ + 28.5497137, + -32.5894641 + ], + [ + 28.1436499, + -32.8320732 + ], + [ + 28.0748735, + -32.941689 + ], + [ + 27.8450942, + -33.082869 + ], + [ + 27.3757956, + -33.3860685 + ], + [ + 26.8805407, + -33.6458951 + ], + [ + 26.5916871, + -33.7480756 + ], + [ + 26.4527308, + -33.7935795 + ], + [ + 26.206754, + -33.7548943 + ], + [ + 26.0077897, + -33.7223961 + ], + [ + 25.8055494, + -33.7524272 + ], + [ + 25.7511073, + -33.8006512 + ], + [ + 25.6529079, + -33.8543597 + ], + [ + 25.6529079, + -33.9469768 + ], + [ + 25.7195789, + -34.0040115 + ], + [ + 25.7202807, + -34.0511235 + ], + [ + 25.5508915, + -34.063151 + ], + [ + 25.3504571, + -34.0502627 + ], + [ + 25.2810609, + -34.0020322 + ], + [ + 25.0476316, + -33.9994588 + ], + [ + 24.954724, + -34.0043594 + ], + [ + 24.9496586, + -34.1010363 + ], + [ + 24.8770358, + -34.1506456 + ], + [ + 24.8762914, + -34.2005281 + ], + [ + 24.8532574, + -34.2189562 + ], + [ + 24.7645287, + -34.2017946 + ], + [ + 24.5001356, + -34.2003254 + ], + [ + 24.3486733, + -34.1163824 + ], + [ + 24.1988819, + -34.1019039 + ], + [ + 23.9963377, + -34.0514443 + ], + [ + 23.8017509, + -34.0524332 + ], + [ + 23.7493589, + -34.0111855 + ], + [ + 23.4973536, + -34.009014 + ], + [ + 23.4155191, + -34.0434586 + ], + [ + 23.4154284, + -34.1140433 + ], + [ + 22.9000853, + -34.0993009 + ], + [ + 22.8412418, + -34.0547911 + ], + [ + 22.6470321, + -34.0502627 + ], + [ + 22.6459843, + -34.0072768 + ], + [ + 22.570016, + -34.0064081 + ], + [ + 22.5050499, + -34.0645866 + ], + [ + 22.2519968, + -34.0645866 + ], + [ + 22.2221334, + -34.1014701 + ], + [ + 22.1621197, + -34.1057019 + ], + [ + 22.1712431, + -34.1521766 + ], + [ + 22.1576913, + -34.2180897 + ], + [ + 22.0015632, + -34.2172232 + ], + [ + 21.9496952, + -34.3220009 + ], + [ + 21.8611528, + -34.4007145 + ], + [ + 21.5614708, + -34.4020114 + ], + [ + 21.5468011, + -34.3661242 + ], + [ + 21.501744, + -34.3669892 + ], + [ + 21.5006961, + -34.4020114 + ], + [ + 21.4194886, + -34.4465247 + ], + [ + 21.1978706, + -34.4478208 + ], + [ + 21.0988193, + -34.3991325 + ], + [ + 21.0033746, + -34.3753872 + ], + [ + 20.893192, + -34.3997115 + ], + [ + 20.8976647, + -34.4854003 + ], + [ + 20.7446802, + -34.4828092 + ], + [ + 20.5042011, + -34.486264 + ], + [ + 20.2527197, + -34.701477 + ], + [ + 20.0803502, + -34.8361855 + ], + [ + 19.9923317, + -34.8379056 + ], + [ + 19.899074, + -34.8275845 + ], + [ + 19.8938348, + -34.7936018 + ], + [ + 19.5972963, + -34.7961833 + ], + [ + 19.3929677, + -34.642015 + ], + [ + 19.2877095, + -34.6404784 + ], + [ + 19.2861377, + -34.5986563 + ], + [ + 19.3474363, + -34.5244458 + ], + [ + 19.3285256, + -34.4534372 + ], + [ + 19.098001, + -34.449981 + ], + [ + 19.0725583, + -34.3802371 + ], + [ + 19.0023531, + -34.3525593 + ], + [ + 18.9520568, + -34.3949373 + ], + [ + 18.7975006, + -34.3936403 + ], + [ + 18.7984174, + -34.1016376 + ], + [ + 18.501748, + -34.1015292 + ], + [ + 18.4999545, + -34.3616945 + ], + [ + 18.4477325, + -34.3620007 + ], + [ + 18.4479944, + -34.3522691 + ], + [ + 18.3974362, + -34.3514041 + ], + [ + 18.3971742, + -34.3022959 + ], + [ + 18.3565705, + -34.3005647 + ], + [ + 18.3479258, + -34.2020436 + ], + [ + 18.2972095, + -34.1950274 + ], + [ + 18.2951139, + -33.9937138 + ], + [ + 18.3374474, + -33.9914079 + ], + [ + 18.3476638, + -33.8492427 + ], + [ + 18.3479258, + -33.781555 + ], + [ + 18.4124718, + -33.7448849 + ], + [ + 18.3615477, + -33.6501624 + ], + [ + 18.2992013, + -33.585591 + ], + [ + 18.2166839, + -33.448872 + ], + [ + 18.1389858, + -33.3974083 + ], + [ + 17.9473472, + -33.1602647 + ], + [ + 17.8855247, + -33.0575732 + ], + [ + 17.8485884, + -32.9668505 + ], + [ + 17.8396817, + -32.8507302 + ] + ] + ] + }, + { + "name": "Stadt Uster Orthophoto 2008 10cm", + "type": "tms", + "template": "http://mapproxy.sosm.ch:8080/tiles/uster/EPSG900913/{zoom}/{x}/{y}.png?origin=nw", + "polygon": [ + [ + [ + 8.6, + 47.31 + ], + [ + 8.6, + 47.39 + ], + [ + 8.77, + 47.39 + ], + [ + 8.77, + 47.31 + ], + [ + 8.6, + 47.31 + ] + ] + ], + "terms_text": "Stadt Uster Vermessung Orthophoto 2008" + }, + { + "name": "Stevns (Denmark)", + "type": "tms", + "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/stevns/2009/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 20 + ], + "polygon": [ + [ + [ + 12.0913942, + 55.3491574 + ], + [ + 12.0943104, + 55.3842256 + ], + [ + 12.1573875, + 55.3833103 + ], + [ + 12.1587287, + 55.4013326 + ], + [ + 12.1903468, + 55.400558 + ], + [ + 12.1931411, + 55.4364665 + ], + [ + 12.2564251, + 55.4347995 + ], + [ + 12.2547073, + 55.4168882 + ], + [ + 12.3822489, + 55.4134349 + ], + [ + 12.3795942, + 55.3954143 + ], + [ + 12.4109213, + 55.3946958 + ], + [ + 12.409403, + 55.3766417 + ], + [ + 12.4407807, + 55.375779 + ], + [ + 12.4394142, + 55.3578314 + ], + [ + 12.4707413, + 55.3569971 + ], + [ + 12.4629475, + 55.2672214 + ], + [ + 12.4315633, + 55.2681491 + ], + [ + 12.430045, + 55.2502103 + ], + [ + 12.3672011, + 55.2519673 + ], + [ + 12.3656858, + 55.2340267 + ], + [ + 12.2714604, + 55.2366031 + ], + [ + 12.2744467, + 55.272476 + ], + [ + 12.2115654, + 55.2741475 + ], + [ + 12.2130078, + 55.2920322 + ], + [ + 12.1815665, + 55.2928638 + ], + [ + 12.183141, + 55.3107091 + ], + [ + 12.2144897, + 55.3100981 + ], + [ + 12.2159927, + 55.3279764 + ], + [ + 12.1214458, + 55.3303379 + ], + [ + 12.1229489, + 55.3483291 + ] + ] + ], + "terms_text": "Stevns Kommune" + }, + { + "name": "Surrey Air Survey", + "type": "tms", + "template": "http://gravitystorm.dev.openstreetmap.org/surrey/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + -0.856, + 51.071 + ], + [ + -0.856, + 51.473 + ], + [ + 0.062, + 51.473 + ], + [ + 0.062, + 51.071 + ], + [ + -0.856, + 51.071 + ] + ] + ] + }, + { + "name": "TIGER 2012 Roads Overlay", + "type": "tms", + "description": "Public domain road data from the US Government.", + "template": "http://{switch:a,b,c}.tile.openstreetmap.us/tiger2012_roads_expanded/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 16, + 19 + ], + "polygon": [ + [ + [ + -124.7617886, + 48.4130148 + ], + [ + -124.6059492, + 45.90245 + ], + [ + -124.9934269, + 40.0557614 + ], + [ + -122.5369737, + 36.8566086 + ], + [ + -119.9775867, + 33.0064099 + ], + [ + -117.675935, + 32.4630223 + ], + [ + -114.8612307, + 32.4799891 + ], + [ + -111.0089311, + 31.336015 + ], + [ + -108.1992687, + 31.3260016 + ], + [ + -108.1871123, + 31.7755116 + ], + [ + -106.5307225, + 31.7820947 + ], + [ + -106.4842052, + 31.7464455 + ], + [ + -106.429317, + 31.7520583 + ], + [ + -106.2868855, + 31.5613291 + ], + [ + -106.205248, + 31.446704 + ], + [ + -105.0205259, + 30.5360988 + ], + [ + -104.5881916, + 29.6997856 + ], + [ + -103.2518856, + 28.8908685 + ], + [ + -102.7173632, + 29.3920567 + ], + [ + -102.1513983, + 29.7475702 + ], + [ + -101.2552871, + 29.4810523 + ], + [ + -100.0062436, + 28.0082173 + ], + [ + -99.2351068, + 26.4475962 + ], + [ + -98.0109067, + 25.9928035 + ], + [ + -97.435024, + 25.8266009 + ], + [ + -96.9555259, + 25.9821589 + ], + [ + -96.8061741, + 27.7978168 + ], + [ + -95.5563349, + 28.5876066 + ], + [ + -93.7405308, + 29.4742093 + ], + [ + -90.9028456, + 28.8564513 + ], + [ + -88.0156706, + 28.9944338 + ], + [ + -88.0162494, + 30.0038862 + ], + [ + -86.0277506, + 30.0047454 + ], + [ + -84.0187909, + 28.9961781 + ], + [ + -81.9971976, + 25.9826768 + ], + [ + -81.9966618, + 25.0134917 + ], + [ + -84.0165592, + 25.0125783 + ], + [ + -84.0160068, + 24.0052745 + ], + [ + -80.0199985, + 24.007096 + ], + [ + -79.8901116, + 26.8550713 + ], + [ + -80.0245309, + 32.0161282 + ], + [ + -75.4147385, + 35.0531894 + ], + [ + -74.0211163, + 39.5727927 + ], + [ + -72.002019, + 40.9912464 + ], + [ + -69.8797398, + 40.9920457 + ], + [ + -69.8489304, + 43.2619916 + ], + [ + -66.9452845, + 44.7104937 + ], + [ + -67.7596632, + 47.0990024 + ], + [ + -69.2505131, + 47.5122328 + ], + [ + -70.4614886, + 46.2176574 + ], + [ + -71.412273, + 45.254878 + ], + [ + -72.0222508, + 45.0059846 + ], + [ + -75.0798841, + 44.9802854 + ], + [ + -76.9023061, + 43.8024568 + ], + [ + -78.7623935, + 43.6249578 + ], + [ + -79.15798, + 43.4462589 + ], + [ + -79.0060087, + 42.8005317 + ], + [ + -82.662475, + 41.6889458 + ], + [ + -82.1761642, + 43.588535 + ], + [ + -83.2813977, + 46.138853 + ], + [ + -87.5064535, + 48.0142702 + ], + [ + -88.3492194, + 48.2963271 + ], + [ + -89.4353148, + 47.9837822 + ], + [ + -93.9981078, + 49.0067142 + ], + [ + -95.1105379, + 49.412004 + ], + [ + -96.0131199, + 49.0060547 + ], + [ + -123.3228926, + 49.0042878 + ], + [ + -123.2275233, + 48.1849927 + ] + ], + [ + [ + -160.5787616, + 22.5062947 + ], + [ + -160.5782192, + 21.4984647 + ], + [ + -158.7470604, + 21.2439843 + ], + [ + -157.5083185, + 20.995803 + ], + [ + -155.9961942, + 18.7790194 + ], + [ + -154.6217803, + 18.7586966 + ], + [ + -154.6890176, + 19.8805722 + ], + [ + -156.2927622, + 21.2225888 + ], + [ + -157.5047384, + 21.9984962 + ], + [ + -159.0093692, + 22.5070181 + ] + ], + [ + [ + -167.1571546, + 68.721974 + ], + [ + -164.8553982, + 67.0255078 + ], + [ + -168.002195, + 66.0017503 + ], + [ + -169.0087448, + 66.001546 + ], + [ + -169.0075381, + 64.9987675 + ], + [ + -172.5143281, + 63.8767267 + ], + [ + -173.8197023, + 59.74014 + ], + [ + -162.5018149, + 58.0005815 + ], + [ + -160.0159024, + 58.0012389 + ], + [ + -160.0149725, + 57.000035 + ], + [ + -160.5054788, + 56.9999017 + ], + [ + -165.8092575, + 54.824847 + ], + [ + -178.000097, + 52.2446469 + ], + [ + -177.9992996, + 51.2554252 + ], + [ + -171.4689067, + 51.8215329 + ], + [ + -162.40251, + 53.956664 + ], + [ + -159.0075717, + 55.002502 + ], + [ + -158.0190709, + 55.0027849 + ], + [ + -151.9963213, + 55.9991902 + ], + [ + -151.500341, + 57.9987853 + ], + [ + -151.5012894, + 58.9919816 + ], + [ + -138.5159989, + 58.9953194 + ], + [ + -138.5150471, + 57.9986434 + ], + [ + -133.9948193, + 54.0031685 + ], + [ + -130.0044418, + 54.0043387 + ], + [ + -130.0070826, + 57.0000507 + ], + [ + -131.975877, + 56.9995156 + ], + [ + -135.1229873, + 59.756601 + ], + [ + -138.0071813, + 59.991805 + ], + [ + -139.1715881, + 60.4127229 + ], + [ + -140.9874011, + 61.0118551 + ], + [ + -140.9683975, + 69.9535069 + ], + [ + -156.176891, + 71.5633329 + ], + [ + -160.413634, + 70.7397728 + ], + [ + -163.0218273, + 69.9707435 + ], + [ + -164.9717003, + 68.994689 + ] + ] + ], + "overlay": true + }, + { + "name": "Toulouse - Orthophotoplan 2007", + "type": "tms", + "template": "http://wms.openstreetmap.fr/tms/1.0.0/toulouse_ortho2007/{zoom}/{x}/{y}", + "scaleExtent": [ + 0, + 22 + ], + "polygon": [ + [ + [ + 1.1919978, + 43.6328791 + ], + [ + 1.2015377, + 43.6329729 + ], + [ + 1.2011107, + 43.6554932 + ], + [ + 1.2227985, + 43.6557029 + ], + [ + 1.2226231, + 43.6653353 + ], + [ + 1.2275341, + 43.6653849 + ], + [ + 1.2275417, + 43.6656387 + ], + [ + 1.2337568, + 43.6656883 + ], + [ + 1.2337644, + 43.6650153 + ], + [ + 1.2351218, + 43.6650319 + ], + [ + 1.2350913, + 43.6670729 + ], + [ + 1.2443566, + 43.6671556 + ], + [ + 1.2441584, + 43.6743925 + ], + [ + 1.2493973, + 43.6744256 + ], + [ + 1.2493973, + 43.6746628 + ], + [ + 1.2555666, + 43.6747234 + ], + [ + 1.2555742, + 43.6744532 + ], + [ + 1.2569545, + 43.6744697 + ], + [ + 1.2568782, + 43.678529 + ], + [ + 1.2874873, + 43.6788257 + ], + [ + 1.2870803, + 43.7013229 + ], + [ + 1.3088219, + 43.7014632 + ], + [ + 1.3086493, + 43.7127673 + ], + [ + 1.3303262, + 43.7129544 + ], + [ + 1.3300242, + 43.7305221 + ], + [ + 1.3367106, + 43.7305845 + ], + [ + 1.3367322, + 43.7312235 + ], + [ + 1.3734338, + 43.7310456 + ], + [ + 1.3735848, + 43.7245772 + ], + [ + 1.4604504, + 43.7252947 + ], + [ + 1.4607783, + 43.7028034 + ], + [ + 1.4824875, + 43.7029516 + ], + [ + 1.4829828, + 43.6692071 + ], + [ + 1.5046832, + 43.6693616 + ], + [ + 1.5048383, + 43.6581174 + ], + [ + 1.5265475, + 43.6582656 + ], + [ + 1.5266945, + 43.6470298 + ], + [ + 1.548368, + 43.6471633 + ], + [ + 1.5485357, + 43.6359385 + ], + [ + 1.5702172, + 43.636082 + ], + [ + 1.5705123, + 43.6135777 + ], + [ + 1.5488166, + 43.6134276 + ], + [ + 1.549097, + 43.5909479 + ], + [ + 1.5707695, + 43.5910694 + ], + [ + 1.5709373, + 43.5798341 + ], + [ + 1.5793714, + 43.5798894 + ], + [ + 1.5794782, + 43.5737682 + ], + [ + 1.5809119, + 43.5737792 + ], + [ + 1.5810859, + 43.5573794 + ], + [ + 1.5712334, + 43.5573131 + ], + [ + 1.5716504, + 43.5235497 + ], + [ + 1.3984804, + 43.5222618 + ], + [ + 1.3986509, + 43.5110113 + ], + [ + 1.3120959, + 43.5102543 + ], + [ + 1.3118968, + 43.5215192 + ], + [ + 1.2902569, + 43.5213126 + ], + [ + 1.2898637, + 43.5438168 + ], + [ + 1.311517, + 43.5440133 + ], + [ + 1.3113271, + 43.5552596 + ], + [ + 1.3036924, + 43.5551924 + ], + [ + 1.3036117, + 43.5595099 + ], + [ + 1.2955449, + 43.5594317 + ], + [ + 1.2955449, + 43.5595489 + ], + [ + 1.2895595, + 43.5594473 + ], + [ + 1.2892899, + 43.5775366 + ], + [ + 1.2675698, + 43.5773647 + ], + [ + 1.2673973, + 43.5886141 + ], + [ + 1.25355, + 43.5885047 + ], + [ + 1.2533774, + 43.5956282 + ], + [ + 1.2518029, + 43.5956282 + ], + [ + 1.2518029, + 43.5949409 + ], + [ + 1.2350437, + 43.5947847 + ], + [ + 1.2350437, + 43.5945972 + ], + [ + 1.2239572, + 43.5945972 + ], + [ + 1.2239357, + 43.5994708 + ], + [ + 1.2139708, + 43.599299 + ], + [ + 1.2138845, + 43.6046408 + ], + [ + 1.2020647, + 43.6044846 + ], + [ + 1.2019464, + 43.61048 + ], + [ + 1.1924294, + 43.6103695 + ] + ] + ], + "terms_url": "https://wiki.openstreetmap.org/wiki/Toulouse/ToulouseMetropoleData", + "terms_text": "ToulouseMetropole" + }, + { + "name": "Toulouse - Orthophotoplan 2011", + "type": "tms", + "template": "http://wms.openstreetmap.fr/tms/1.0.0/toulouse_ortho2011/{zoom}/{x}/{y}", + "scaleExtent": [ + 0, + 22 + ], + "polygon": [ + [ + [ + 1.1135067, + 43.6867566 + ], + [ + 1.1351836, + 43.6870842 + ], + [ + 1.1348907, + 43.6983471 + ], + [ + 1.1782867, + 43.6990338 + ], + [ + 1.1779903, + 43.7102786 + ], + [ + 1.1996591, + 43.7106144 + ], + [ + 1.1993387, + 43.7218722 + ], + [ + 1.2427356, + 43.7225269 + ], + [ + 1.2424336, + 43.7337491 + ], + [ + 1.2641536, + 43.734092 + ], + [ + 1.2638301, + 43.7453588 + ], + [ + 1.2855285, + 43.7456548 + ], + [ + 1.2852481, + 43.756935 + ], + [ + 1.306925, + 43.757231 + ], + [ + 1.3066446, + 43.7684779 + ], + [ + 1.3283431, + 43.7687894 + ], + [ + 1.3280842, + 43.780034 + ], + [ + 1.4367275, + 43.7815757 + ], + [ + 1.4373098, + 43.7591004 + ], + [ + 1.4590083, + 43.7593653 + ], + [ + 1.4593318, + 43.7481479 + ], + [ + 1.4810303, + 43.7483972 + ], + [ + 1.4813322, + 43.7371777 + ], + [ + 1.5030307, + 43.7374115 + ], + [ + 1.5035915, + 43.7149664 + ], + [ + 1.5253115, + 43.7151846 + ], + [ + 1.5256135, + 43.7040057 + ], + [ + 1.5472688, + 43.7042552 + ], + [ + 1.5475708, + 43.6930431 + ], + [ + 1.5692045, + 43.6932926 + ], + [ + 1.5695712, + 43.6820316 + ], + [ + 1.5912049, + 43.6822656 + ], + [ + 1.5917441, + 43.6597998 + ], + [ + 1.613421, + 43.6600339 + ], + [ + 1.613723, + 43.6488291 + ], + [ + 1.6353783, + 43.6490788 + ], + [ + 1.6384146, + 43.5140731 + ], + [ + 1.2921649, + 43.5094658 + ], + [ + 1.2918629, + 43.5206966 + ], + [ + 1.2702076, + 43.5203994 + ], + [ + 1.2698841, + 43.5316437 + ], + [ + 1.2482288, + 43.531331 + ], + [ + 1.2476048, + 43.5537788 + ], + [ + 1.2259628, + 43.5534914 + ], + [ + 1.2256819, + 43.564716 + ], + [ + 1.2039835, + 43.564419 + ], + [ + 1.2033148, + 43.5869049 + ], + [ + 1.1816164, + 43.5865611 + ], + [ + 1.1810237, + 43.6090368 + ], + [ + 1.1592821, + 43.6086932 + ], + [ + 1.1589585, + 43.6199523 + ], + [ + 1.1372601, + 43.6196244 + ], + [ + 1.1365933, + 43.642094 + ], + [ + 1.1149055, + 43.6417629 + ] + ] + ], + "terms_url": "https://wiki.openstreetmap.org/wiki/Toulouse/ToulouseMetropoleData", + "terms_text": "ToulouseMetropole" + }, + { + "name": "Tours - Orthophotos 2008", + "type": "tms", + "template": "http://tms.mapspot.ge/tms/2/nonstandard/{zoom}/{x}/{y}.jpeg", + "polygon": [ + [ + [ + 0.5457462, + 47.465264 + ], + [ + 0.54585, + 47.4608163 + ], + [ + 0.5392188, + 47.4606983 + ], + [ + 0.5393484, + 47.456243 + ], + [ + 0.5327959, + 47.4561003 + ], + [ + 0.5329011, + 47.451565 + ], + [ + 0.52619, + 47.4514013 + ], + [ + 0.5265854, + 47.4424884 + ], + [ + 0.5000941, + 47.4420739 + ], + [ + 0.5002357, + 47.4375835 + ], + [ + 0.4936014, + 47.4374324 + ], + [ + 0.4937, + 47.4329285 + ], + [ + 0.4606141, + 47.4324593 + ], + [ + 0.4607248, + 47.4279827 + ], + [ + 0.4541016, + 47.4278125 + ], + [ + 0.454932, + 47.4053921 + ], + [ + 0.4615431, + 47.4054476 + ], + [ + 0.4619097, + 47.3964924 + ], + [ + 0.4684346, + 47.3966005 + ], + [ + 0.4691319, + 47.3786415 + ], + [ + 0.4757125, + 47.3787609 + ], + [ + 0.4762116, + 47.3652018 + ], + [ + 0.4828297, + 47.3653499 + ], + [ + 0.4832223, + 47.3518574 + ], + [ + 0.5097927, + 47.3522592 + ], + [ + 0.5095688, + 47.3567713 + ], + [ + 0.5227698, + 47.3569785 + ], + [ + 0.5226429, + 47.3614867 + ], + [ + 0.5490721, + 47.3618878 + ], + [ + 0.5489087, + 47.3663307 + ], + [ + 0.5555159, + 47.3664985 + ], + [ + 0.5559105, + 47.3575522 + ], + [ + 0.6152789, + 47.358407 + ], + [ + 0.6152963, + 47.362893 + ], + [ + 0.6285093, + 47.3630936 + ], + [ + 0.6288256, + 47.353987 + ], + [ + 0.6155012, + 47.3538823 + ], + [ + 0.6157682, + 47.3493424 + ], + [ + 0.6090956, + 47.3492991 + ], + [ + 0.6094735, + 47.3402962 + ], + [ + 0.6160477, + 47.3404448 + ], + [ + 0.616083, + 47.3369074 + ], + [ + 0.77497, + 47.3388218 + ], + [ + 0.7745786, + 47.351628 + ], + [ + 0.7680363, + 47.3515901 + ], + [ + 0.767589, + 47.3605298 + ], + [ + 0.7742443, + 47.3606238 + ], + [ + 0.7733465, + 47.3921266 + ], + [ + 0.7667434, + 47.3920195 + ], + [ + 0.7664411, + 47.4010837 + ], + [ + 0.7730647, + 47.4011115 + ], + [ + 0.7728868, + 47.4101297 + ], + [ + 0.7661849, + 47.4100226 + ], + [ + 0.7660267, + 47.4145044 + ], + [ + 0.7527613, + 47.4143038 + ], + [ + 0.7529788, + 47.4098086 + ], + [ + 0.7462373, + 47.4097016 + ], + [ + 0.7459424, + 47.4232208 + ], + [ + 0.7392324, + 47.4231451 + ], + [ + 0.738869, + 47.4366116 + ], + [ + 0.7323267, + 47.4365171 + ], + [ + 0.7321869, + 47.4410556 + ], + [ + 0.7255048, + 47.44098 + ], + [ + 0.7254209, + 47.4453479 + ], + [ + 0.7318793, + 47.4454803 + ], + [ + 0.7318514, + 47.4501126 + ], + [ + 0.7384496, + 47.450226 + ], + [ + 0.7383098, + 47.454631 + ], + [ + 0.7449359, + 47.4547444 + ], + [ + 0.7443209, + 47.4771985 + ], + [ + 0.7310685, + 47.4769717 + ], + [ + 0.7309008, + 47.4815445 + ], + [ + 0.7176205, + 47.4812611 + ], + [ + 0.7177883, + 47.4768394 + ], + [ + 0.69777, + 47.4764993 + ], + [ + 0.6980496, + 47.4719827 + ], + [ + 0.6914514, + 47.4718882 + ], + [ + 0.6917309, + 47.4630241 + ], + [ + 0.6851048, + 47.4629295 + ], + [ + 0.684937, + 47.4673524 + ], + [ + 0.678255, + 47.4673335 + ], + [ + 0.6779754, + 47.4762158 + ], + [ + 0.6714051, + 47.4761592 + ], + [ + 0.6710417, + 47.4881952 + ], + [ + 0.6577334, + 47.4879685 + ], + [ + 0.6578173, + 47.48504 + ], + [ + 0.6511911, + 47.4848322 + ], + [ + 0.6514707, + 47.4758568 + ], + [ + 0.6448166, + 47.4757245 + ], + [ + 0.6449284, + 47.4712646 + ], + [ + 0.6117976, + 47.4707543 + ], + [ + 0.6118815, + 47.4663129 + ], + [ + 0.6052833, + 47.4661239 + ], + [ + 0.6054231, + 47.4616631 + ], + [ + 0.5988808, + 47.4615497 + ], + [ + 0.5990206, + 47.4570886 + ], + [ + 0.572488, + 47.4566916 + ], + [ + 0.5721805, + 47.4656513 + ] + ] + ], + "terms_url": "http://wiki.openstreetmap.org/wiki/Tours/Orthophoto", + "terms_text": "Orthophoto Tour(s) Plus 2008" + }, + { + "name": "Tours - Orthophotos 2008-2010", + "type": "tms", + "template": "http://wms.openstreetmap.fr/tms/1.0.0/tours/{zoom}/{x}/{y}", + "scaleExtent": [ + 0, + 20 + ], + "polygon": [ + [ + [ + 0.5457462, + 47.465264 + ], + [ + 0.54585, + 47.4608163 + ], + [ + 0.5392188, + 47.4606983 + ], + [ + 0.5393484, + 47.456243 + ], + [ + 0.5327959, + 47.4561003 + ], + [ + 0.5329011, + 47.451565 + ], + [ + 0.52619, + 47.4514013 + ], + [ + 0.5265854, + 47.4424884 + ], + [ + 0.5000941, + 47.4420739 + ], + [ + 0.5002357, + 47.4375835 + ], + [ + 0.4936014, + 47.4374324 + ], + [ + 0.4937, + 47.4329285 + ], + [ + 0.4606141, + 47.4324593 + ], + [ + 0.4607248, + 47.4279827 + ], + [ + 0.4541016, + 47.4278125 + ], + [ + 0.454932, + 47.4053921 + ], + [ + 0.4615431, + 47.4054476 + ], + [ + 0.4619097, + 47.3964924 + ], + [ + 0.4684346, + 47.3966005 + ], + [ + 0.4691319, + 47.3786415 + ], + [ + 0.4757125, + 47.3787609 + ], + [ + 0.4762116, + 47.3652018 + ], + [ + 0.4828297, + 47.3653499 + ], + [ + 0.4829611, + 47.3608321 + ], + [ + 0.4763543, + 47.360743 + ], + [ + 0.476654, + 47.3517263 + ], + [ + 0.4700497, + 47.3516186 + ], + [ + 0.4701971, + 47.3471313 + ], + [ + 0.4637503, + 47.3470104 + ], + [ + 0.4571425, + 47.3424146 + ], + [ + 0.4572922, + 47.3379061 + ], + [ + 0.4506741, + 47.3378081 + ], + [ + 0.4508379, + 47.3333051 + ], + [ + 0.4442212, + 47.3332032 + ], + [ + 0.4443809, + 47.328711 + ], + [ + 0.4311392, + 47.3284977 + ], + [ + 0.4316262, + 47.3150004 + ], + [ + 0.4382432, + 47.3151136 + ], + [ + 0.4383815, + 47.3106174 + ], + [ + 0.4714487, + 47.3111374 + ], + [ + 0.4713096, + 47.3156565 + ], + [ + 0.477888, + 47.3157542 + ], + [ + 0.4780733, + 47.3112802 + ], + [ + 0.4846826, + 47.3113639 + ], + [ + 0.4848576, + 47.3068686 + ], + [ + 0.4914359, + 47.3069803 + ], + [ + 0.491745, + 47.2979733 + ], + [ + 0.4851578, + 47.2978722 + ], + [ + 0.4854269, + 47.2888744 + ], + [ + 0.4788485, + 47.2887697 + ], + [ + 0.4791574, + 47.2797818 + ], + [ + 0.4857769, + 47.2799005 + ], + [ + 0.4859107, + 47.2753885 + ], + [ + 0.492539, + 47.2755029 + ], + [ + 0.4926669, + 47.2710127 + ], + [ + 0.4992986, + 47.2711066 + ], + [ + 0.4994296, + 47.2666116 + ], + [ + 0.5192658, + 47.2669245 + ], + [ + 0.5194225, + 47.2624231 + ], + [ + 0.5260186, + 47.2625205 + ], + [ + 0.5258735, + 47.2670183 + ], + [ + 0.5456972, + 47.2673383 + ], + [ + 0.5455537, + 47.2718283 + ], + [ + 0.5587737, + 47.2720366 + ], + [ + 0.5586259, + 47.2765185 + ], + [ + 0.5652252, + 47.2766278 + ], + [ + 0.5650848, + 47.2811206 + ], + [ + 0.5716753, + 47.2812285 + ], + [ + 0.5715223, + 47.2857217 + ], + [ + 0.5781436, + 47.2858299 + ], + [ + 0.5779914, + 47.2903294 + ], + [ + 0.5846023, + 47.2904263 + ], + [ + 0.5843076, + 47.2994231 + ], + [ + 0.597499, + 47.2996094 + ], + [ + 0.5976637, + 47.2951375 + ], + [ + 0.6571596, + 47.2960036 + ], + [ + 0.6572988, + 47.2915091 + ], + [ + 0.6705019, + 47.2917186 + ], + [ + 0.6703475, + 47.2962082 + ], + [ + 0.6836175, + 47.2963688 + ], + [ + 0.6834322, + 47.3008929 + ], + [ + 0.690062, + 47.3009558 + ], + [ + 0.6899241, + 47.3054703 + ], + [ + 0.7362019, + 47.3061157 + ], + [ + 0.7360848, + 47.3106063 + ], + [ + 0.7559022, + 47.3108935 + ], + [ + 0.7557718, + 47.315392 + ], + [ + 0.7623755, + 47.3154716 + ], + [ + 0.7622314, + 47.3199941 + ], + [ + 0.7754911, + 47.3201546 + ], + [ + 0.77497, + 47.3388218 + ], + [ + 0.7745786, + 47.351628 + ], + [ + 0.7680363, + 47.3515901 + ], + [ + 0.767589, + 47.3605298 + ], + [ + 0.7742443, + 47.3606238 + ], + [ + 0.7733465, + 47.3921266 + ], + [ + 0.7667434, + 47.3920195 + ], + [ + 0.7664411, + 47.4010837 + ], + [ + 0.7730647, + 47.4011115 + ], + [ + 0.7728868, + 47.4101297 + ], + [ + 0.7661849, + 47.4100226 + ], + [ + 0.7660267, + 47.4145044 + ], + [ + 0.7527613, + 47.4143038 + ], + [ + 0.7529788, + 47.4098086 + ], + [ + 0.7462373, + 47.4097016 + ], + [ + 0.7459424, + 47.4232208 + ], + [ + 0.7392324, + 47.4231451 + ], + [ + 0.738869, + 47.4366116 + ], + [ + 0.7323267, + 47.4365171 + ], + [ + 0.7321869, + 47.4410556 + ], + [ + 0.7255048, + 47.44098 + ], + [ + 0.7254209, + 47.4453479 + ], + [ + 0.7318793, + 47.4454803 + ], + [ + 0.7318514, + 47.4501126 + ], + [ + 0.7384496, + 47.450226 + ], + [ + 0.7383098, + 47.454631 + ], + [ + 0.7449359, + 47.4547444 + ], + [ + 0.7443209, + 47.4771985 + ], + [ + 0.7310685, + 47.4769717 + ], + [ + 0.7309008, + 47.4815445 + ], + [ + 0.7176205, + 47.4812611 + ], + [ + 0.7177883, + 47.4768394 + ], + [ + 0.69777, + 47.4764993 + ], + [ + 0.6980496, + 47.4719827 + ], + [ + 0.6914514, + 47.4718882 + ], + [ + 0.6917309, + 47.4630241 + ], + [ + 0.6851048, + 47.4629295 + ], + [ + 0.684937, + 47.4673524 + ], + [ + 0.678255, + 47.4673335 + ], + [ + 0.6779754, + 47.4762158 + ], + [ + 0.6714051, + 47.4761592 + ], + [ + 0.6710417, + 47.4881952 + ], + [ + 0.6577334, + 47.4879685 + ], + [ + 0.6578173, + 47.48504 + ], + [ + 0.6511911, + 47.4848322 + ], + [ + 0.6514707, + 47.4758568 + ], + [ + 0.6448166, + 47.4757245 + ], + [ + 0.6449284, + 47.4712646 + ], + [ + 0.6117976, + 47.4707543 + ], + [ + 0.6118815, + 47.4663129 + ], + [ + 0.6052833, + 47.4661239 + ], + [ + 0.6054231, + 47.4616631 + ], + [ + 0.5988808, + 47.4615497 + ], + [ + 0.5990206, + 47.4570886 + ], + [ + 0.572488, + 47.4566916 + ], + [ + 0.5721805, + 47.4656513 + ] + ] + ], + "terms_url": "http://wiki.openstreetmap.org/wiki/Tours/Orthophoto", + "terms_text": "Orthophoto Tour(s) Plus 2008" + }, + { + "name": "USGS Large Scale Imagery", + "type": "tms", + "template": "http://{switch:a,b,c}.tile.openstreetmap.us/usgs_large_scale/{zoom}/{x}/{y}.jpg", + "scaleExtent": [ + 12, + 20 + ], + "polygon": [ + [ + [ + -123.2549305, + 48.7529029 + ], + [ + -123.2549305, + 48.5592263 + ], + [ + -123.192224, + 48.5592263 + ], + [ + -123.192224, + 48.4348366 + ], + [ + -122.9419646, + 48.4348366 + ], + [ + -122.9419646, + 48.3720812 + ], + [ + -122.8806229, + 48.3720812 + ], + [ + -122.8806229, + 48.3094763 + ], + [ + -122.8167566, + 48.3094763 + ], + [ + -122.8167566, + 48.1904587 + ], + [ + -123.0041133, + 48.1904587 + ], + [ + -123.0041133, + 48.1275918 + ], + [ + -123.058416, + 48.1275918 + ], + [ + -123.058416, + 48.190514 + ], + [ + -123.254113, + 48.190514 + ], + [ + -123.254113, + 48.1274982 + ], + [ + -123.3706593, + 48.1274982 + ], + [ + -123.3706593, + 48.1908403 + ], + [ + -124.0582632, + 48.1908403 + ], + [ + -124.0582632, + 48.253442 + ], + [ + -124.1815163, + 48.253442 + ], + [ + -124.1815163, + 48.3164666 + ], + [ + -124.4319117, + 48.3164666 + ], + [ + -124.4319117, + 48.3782613 + ], + [ + -124.5564618, + 48.3782613 + ], + [ + -124.5564618, + 48.4408305 + ], + [ + -124.7555107, + 48.4408305 + ], + [ + -124.7555107, + 48.1914986 + ], + [ + -124.8185282, + 48.1914986 + ], + [ + -124.8185282, + 48.1228381 + ], + [ + -124.7552951, + 48.1228381 + ], + [ + -124.7552951, + 47.5535253 + ], + [ + -124.3812108, + 47.5535253 + ], + [ + -124.3812108, + 47.1218696 + ], + [ + -124.1928897, + 47.1218696 + ], + [ + -124.1928897, + 43.7569431 + ], + [ + -124.4443382, + 43.7569431 + ], + [ + -124.4443382, + 43.1425556 + ], + [ + -124.6398855, + 43.1425556 + ], + [ + -124.6398855, + 42.6194503 + ], + [ + -124.4438525, + 42.6194503 + ], + [ + -124.4438525, + 39.8080662 + ], + [ + -123.8815685, + 39.8080662 + ], + [ + -123.8815685, + 39.1102825 + ], + [ + -123.75805, + 39.1102825 + ], + [ + -123.75805, + 38.4968799 + ], + [ + -123.2702803, + 38.4968799 + ], + [ + -123.2702803, + 37.9331905 + ], + [ + -122.8148084, + 37.9331905 + ], + [ + -122.8148084, + 37.8019606 + ], + [ + -122.5664316, + 37.8019606 + ], + [ + -122.5664316, + 36.9319611 + ], + [ + -121.8784026, + 36.9319611 + ], + [ + -121.8784026, + 36.6897596 + ], + [ + -122.0034748, + 36.6897596 + ], + [ + -122.0034748, + 36.4341056 + ], + [ + -121.9414159, + 36.4341056 + ], + [ + -121.9414159, + 35.9297636 + ], + [ + -121.5040977, + 35.9297636 + ], + [ + -121.5040977, + 35.8100273 + ], + [ + -121.3790276, + 35.8100273 + ], + [ + -121.3790276, + 35.4239164 + ], + [ + -120.9426515, + 35.4239164 + ], + [ + -120.9426515, + 35.1849683 + ], + [ + -120.8171978, + 35.1849683 + ], + [ + -120.8171978, + 35.1219894 + ], + [ + -120.6918447, + 35.1219894 + ], + [ + -120.6918447, + 34.4966794 + ], + [ + -120.5045898, + 34.4966794 + ], + [ + -120.5045898, + 34.4339651 + ], + [ + -120.0078775, + 34.4339651 + ], + [ + -120.0078775, + 34.3682626 + ], + [ + -119.5283517, + 34.3682626 + ], + [ + -119.5283517, + 34.0576434 + ], + [ + -119.0060985, + 34.0576434 + ], + [ + -119.0060985, + 33.9975267 + ], + [ + -118.5046259, + 33.9975267 + ], + [ + -118.5046259, + 33.8694631 + ], + [ + -118.4413209, + 33.8694631 + ], + [ + -118.4413209, + 33.6865253 + ], + [ + -118.066912, + 33.6865253 + ], + [ + -118.066912, + 33.3063832 + ], + [ + -117.5030045, + 33.3063832 + ], + [ + -117.5030045, + 33.0500337 + ], + [ + -117.3188195, + 33.0500337 + ], + [ + -117.3188195, + 32.6205888 + ], + [ + -117.1917023, + 32.6205888 + ], + [ + -117.1917023, + 32.4974566 + ], + [ + -116.746496, + 32.4974566 + ], + [ + -116.746496, + 32.5609161 + ], + [ + -115.9970138, + 32.5609161 + ], + [ + -115.9970138, + 32.6264942 + ], + [ + -114.8808125, + 32.6264942 + ], + [ + -114.8808125, + 32.4340796 + ], + [ + -114.6294474, + 32.4340796 + ], + [ + -114.6294474, + 32.3731636 + ], + [ + -114.4447437, + 32.3731636 + ], + [ + -114.4447437, + 32.3075418 + ], + [ + -114.2557628, + 32.3075418 + ], + [ + -114.2557628, + 32.2444561 + ], + [ + -114.0680274, + 32.2444561 + ], + [ + -114.0680274, + 32.1829113 + ], + [ + -113.8166499, + 32.1829113 + ], + [ + -113.8166499, + 32.1207622 + ], + [ + -113.6307421, + 32.1207622 + ], + [ + -113.6307421, + 32.0565099 + ], + [ + -113.4417495, + 32.0565099 + ], + [ + -113.4417495, + 31.9984372 + ], + [ + -113.2546027, + 31.9984372 + ], + [ + -113.2546027, + 31.9325434 + ], + [ + -113.068072, + 31.9325434 + ], + [ + -113.068072, + 31.8718062 + ], + [ + -112.8161105, + 31.8718062 + ], + [ + -112.8161105, + 31.8104171 + ], + [ + -112.6308756, + 31.8104171 + ], + [ + -112.6308756, + 31.7464723 + ], + [ + -112.4418918, + 31.7464723 + ], + [ + -112.4418918, + 31.6856001 + ], + [ + -112.257192, + 31.6856001 + ], + [ + -112.257192, + 31.6210352 + ], + [ + -112.0033787, + 31.6210352 + ], + [ + -112.0033787, + 31.559584 + ], + [ + -111.815619, + 31.559584 + ], + [ + -111.815619, + 31.4970238 + ], + [ + -111.6278586, + 31.4970238 + ], + [ + -111.6278586, + 31.4339867 + ], + [ + -111.4418978, + 31.4339867 + ], + [ + -111.4418978, + 31.3733859 + ], + [ + -111.2559708, + 31.3733859 + ], + [ + -111.2559708, + 31.3113225 + ], + [ + -108.1845822, + 31.3113225 + ], + [ + -108.1845822, + 31.7459502 + ], + [ + -106.5065055, + 31.7459502 + ], + [ + -106.5065055, + 31.6842308 + ], + [ + -106.3797265, + 31.6842308 + ], + [ + -106.3797265, + 31.621752 + ], + [ + -106.317434, + 31.621752 + ], + [ + -106.317434, + 31.4968167 + ], + [ + -106.2551769, + 31.4968167 + ], + [ + -106.2551769, + 31.4344889 + ], + [ + -106.1924698, + 31.4344889 + ], + [ + -106.1924698, + 31.3721296 + ], + [ + -106.0039212, + 31.3721296 + ], + [ + -106.0039212, + 31.309328 + ], + [ + -105.9416582, + 31.309328 + ], + [ + -105.9416582, + 31.2457547 + ], + [ + -105.8798174, + 31.2457547 + ], + [ + -105.8798174, + 31.1836194 + ], + [ + -105.8162349, + 31.1836194 + ], + [ + -105.8162349, + 31.1207155 + ], + [ + -105.6921198, + 31.1207155 + ], + [ + -105.6921198, + 31.0584835 + ], + [ + -105.6302881, + 31.0584835 + ], + [ + -105.6302881, + 30.9328271 + ], + [ + -105.5044418, + 30.9328271 + ], + [ + -105.5044418, + 30.8715864 + ], + [ + -105.4412973, + 30.8715864 + ], + [ + -105.4412973, + 30.808463 + ], + [ + -105.3781497, + 30.808463 + ], + [ + -105.3781497, + 30.7471828 + ], + [ + -105.1904658, + 30.7471828 + ], + [ + -105.1904658, + 30.6843231 + ], + [ + -105.1286244, + 30.6843231 + ], + [ + -105.1286244, + 30.6199737 + ], + [ + -105.0036504, + 30.6199737 + ], + [ + -105.0036504, + 30.5589058 + ], + [ + -104.9417962, + 30.5589058 + ], + [ + -104.9417962, + 30.4963236 + ], + [ + -104.8782018, + 30.4963236 + ], + [ + -104.8782018, + 30.3098261 + ], + [ + -104.8155257, + 30.3098261 + ], + [ + -104.8155257, + 30.2478305 + ], + [ + -104.7536079, + 30.2478305 + ], + [ + -104.7536079, + 29.9353916 + ], + [ + -104.690949, + 29.9353916 + ], + [ + -104.690949, + 29.8090156 + ], + [ + -104.6291301, + 29.8090156 + ], + [ + -104.6291301, + 29.6843577 + ], + [ + -104.5659869, + 29.6843577 + ], + [ + -104.5659869, + 29.6223459 + ], + [ + -104.5037188, + 29.6223459 + ], + [ + -104.5037188, + 29.5595436 + ], + [ + -104.4410072, + 29.5595436 + ], + [ + -104.4410072, + 29.4974832 + ], + [ + -104.2537551, + 29.4974832 + ], + [ + -104.2537551, + 29.3716718 + ], + [ + -104.1291984, + 29.3716718 + ], + [ + -104.1291984, + 29.3091621 + ], + [ + -104.0688737, + 29.3091621 + ], + [ + -104.0688737, + 29.2467276 + ], + [ + -103.8187309, + 29.2467276 + ], + [ + -103.8187309, + 29.1843076 + ], + [ + -103.755736, + 29.1843076 + ], + [ + -103.755736, + 29.1223174 + ], + [ + -103.5667542, + 29.1223174 + ], + [ + -103.5667542, + 29.0598119 + ], + [ + -103.5049819, + 29.0598119 + ], + [ + -103.5049819, + 28.9967506 + ], + [ + -103.3165753, + 28.9967506 + ], + [ + -103.3165753, + 28.9346923 + ], + [ + -103.0597572, + 28.9346923 + ], + [ + -103.0597572, + 29.0592965 + ], + [ + -102.9979694, + 29.0592965 + ], + [ + -102.9979694, + 29.1212855 + ], + [ + -102.9331397, + 29.1212855 + ], + [ + -102.9331397, + 29.1848575 + ], + [ + -102.8095989, + 29.1848575 + ], + [ + -102.8095989, + 29.2526154 + ], + [ + -102.8701345, + 29.2526154 + ], + [ + -102.8701345, + 29.308096 + ], + [ + -102.8096681, + 29.308096 + ], + [ + -102.8096681, + 29.3715484 + ], + [ + -102.7475655, + 29.3715484 + ], + [ + -102.7475655, + 29.5581899 + ], + [ + -102.684554, + 29.5581899 + ], + [ + -102.684554, + 29.6847655 + ], + [ + -102.4967764, + 29.6847655 + ], + [ + -102.4967764, + 29.7457694 + ], + [ + -102.3086647, + 29.7457694 + ], + [ + -102.3086647, + 29.8086627 + ], + [ + -102.1909323, + 29.8086627 + ], + [ + -102.1909323, + 29.7460097 + ], + [ + -101.5049914, + 29.7460097 + ], + [ + -101.5049914, + 29.6846777 + ], + [ + -101.3805796, + 29.6846777 + ], + [ + -101.3805796, + 29.5594459 + ], + [ + -101.3175057, + 29.5594459 + ], + [ + -101.3175057, + 29.4958934 + ], + [ + -101.1910075, + 29.4958934 + ], + [ + -101.1910075, + 29.4326115 + ], + [ + -101.067501, + 29.4326115 + ], + [ + -101.067501, + 29.308808 + ], + [ + -100.9418897, + 29.308808 + ], + [ + -100.9418897, + 29.2456231 + ], + [ + -100.8167271, + 29.2456231 + ], + [ + -100.8167271, + 29.1190449 + ], + [ + -100.7522672, + 29.1190449 + ], + [ + -100.7522672, + 29.0578214 + ], + [ + -100.6925358, + 29.0578214 + ], + [ + -100.6925358, + 28.8720431 + ], + [ + -100.6290158, + 28.8720431 + ], + [ + -100.6290158, + 28.8095363 + ], + [ + -100.5679901, + 28.8095363 + ], + [ + -100.5679901, + 28.622554 + ], + [ + -100.5040411, + 28.622554 + ], + [ + -100.5040411, + 28.5583804 + ], + [ + -100.4421832, + 28.5583804 + ], + [ + -100.4421832, + 28.4968266 + ], + [ + -100.379434, + 28.4968266 + ], + [ + -100.379434, + 28.3092865 + ], + [ + -100.3171942, + 28.3092865 + ], + [ + -100.3171942, + 28.1835681 + ], + [ + -100.254483, + 28.1835681 + ], + [ + -100.254483, + 28.1213885 + ], + [ + -100.1282282, + 28.1213885 + ], + [ + -100.1282282, + 28.059215 + ], + [ + -100.0659537, + 28.059215 + ], + [ + -100.0659537, + 27.9966087 + ], + [ + -100.0023855, + 27.9966087 + ], + [ + -100.0023855, + 27.9332152 + ], + [ + -99.9426497, + 27.9332152 + ], + [ + -99.9426497, + 27.7454658 + ], + [ + -99.816851, + 27.7454658 + ], + [ + -99.816851, + 27.6834301 + ], + [ + -99.7541346, + 27.6834301 + ], + [ + -99.7541346, + 27.6221543 + ], + [ + -99.6291629, + 27.6221543 + ], + [ + -99.6291629, + 27.5588977 + ], + [ + -99.5672838, + 27.5588977 + ], + [ + -99.5672838, + 27.4353752 + ], + [ + -99.5041798, + 27.4353752 + ], + [ + -99.5041798, + 27.3774021 + ], + [ + -99.5671796, + 27.3774021 + ], + [ + -99.5671796, + 27.2463726 + ], + [ + -99.504975, + 27.2463726 + ], + [ + -99.504975, + 26.9965649 + ], + [ + -99.4427427, + 26.9965649 + ], + [ + -99.4427427, + 26.872803 + ], + [ + -99.3800633, + 26.872803 + ], + [ + -99.3800633, + 26.8068179 + ], + [ + -99.3190684, + 26.8068179 + ], + [ + -99.3190684, + 26.7473614 + ], + [ + -99.2537541, + 26.7473614 + ], + [ + -99.2537541, + 26.6210068 + ], + [ + -99.1910617, + 26.6210068 + ], + [ + -99.1910617, + 26.4956737 + ], + [ + -99.1300639, + 26.4956737 + ], + [ + -99.1300639, + 26.3713808 + ], + [ + -99.0029473, + 26.3713808 + ], + [ + -99.0029473, + 26.3093836 + ], + [ + -98.816572, + 26.3093836 + ], + [ + -98.816572, + 26.2457762 + ], + [ + -98.6920082, + 26.2457762 + ], + [ + -98.6920082, + 26.1837096 + ], + [ + -98.4440896, + 26.1837096 + ], + [ + -98.4440896, + 26.1217217 + ], + [ + -98.3823181, + 26.1217217 + ], + [ + -98.3823181, + 26.0596488 + ], + [ + -98.2532707, + 26.0596488 + ], + [ + -98.2532707, + 25.9986871 + ], + [ + -98.0109084, + 25.9986871 + ], + [ + -98.0109084, + 25.9932255 + ], + [ + -97.6932319, + 25.9932255 + ], + [ + -97.6932319, + 25.9334103 + ], + [ + -97.6313904, + 25.9334103 + ], + [ + -97.6313904, + 25.8695893 + ], + [ + -97.5046779, + 25.8695893 + ], + [ + -97.5046779, + 25.8073488 + ], + [ + -97.3083401, + 25.8073488 + ], + [ + -97.3083401, + 25.8731159 + ], + [ + -97.2456326, + 25.8731159 + ], + [ + -97.2456326, + 25.9353731 + ], + [ + -97.1138939, + 25.9353731 + ], + [ + -97.1138939, + 27.6809179 + ], + [ + -97.0571035, + 27.6809179 + ], + [ + -97.0571035, + 27.8108242 + ], + [ + -95.5810766, + 27.8108242 + ], + [ + -95.5810766, + 28.7468827 + ], + [ + -94.271041, + 28.7468827 + ], + [ + -94.271041, + 29.5594076 + ], + [ + -92.5029947, + 29.5594076 + ], + [ + -92.5029947, + 29.4974754 + ], + [ + -91.8776216, + 29.4974754 + ], + [ + -91.8776216, + 29.3727013 + ], + [ + -91.378418, + 29.3727013 + ], + [ + -91.378418, + 29.2468326 + ], + [ + -91.3153953, + 29.2468326 + ], + [ + -91.3153953, + 29.1844301 + ], + [ + -91.1294702, + 29.1844301 + ], + [ + -91.1294702, + 29.1232559 + ], + [ + -91.0052632, + 29.1232559 + ], + [ + -91.0052632, + 28.9968437 + ], + [ + -89.4500159, + 28.9968437 + ], + [ + -89.4500159, + 28.8677422 + ], + [ + -88.8104309, + 28.8677422 + ], + [ + -88.8104309, + 30.1841864 + ], + [ + -85.8791527, + 30.1841864 + ], + [ + -85.8791527, + 29.5455038 + ], + [ + -84.8368083, + 29.5455038 + ], + [ + -84.8368083, + 29.6225158 + ], + [ + -84.7482786, + 29.6225158 + ], + [ + -84.7482786, + 29.683624 + ], + [ + -84.685894, + 29.683624 + ], + [ + -84.685894, + 29.7468386 + ], + [ + -83.6296975, + 29.7468386 + ], + [ + -83.6296975, + 29.4324361 + ], + [ + -83.3174937, + 29.4324361 + ], + [ + -83.3174937, + 29.0579442 + ], + [ + -82.879659, + 29.0579442 + ], + [ + -82.879659, + 27.7453529 + ], + [ + -82.8182822, + 27.7453529 + ], + [ + -82.8182822, + 26.9290868 + ], + [ + -82.3796782, + 26.9290868 + ], + [ + -82.3796782, + 26.3694183 + ], + [ + -81.8777106, + 26.3694183 + ], + [ + -81.8777106, + 25.805971 + ], + [ + -81.5036862, + 25.805971 + ], + [ + -81.5036862, + 25.7474753 + ], + [ + -81.4405462, + 25.7474753 + ], + [ + -81.4405462, + 25.6851489 + ], + [ + -81.3155883, + 25.6851489 + ], + [ + -81.3155883, + 25.5600985 + ], + [ + -81.2538534, + 25.5600985 + ], + [ + -81.2538534, + 25.4342361 + ], + [ + -81.1902012, + 25.4342361 + ], + [ + -81.1902012, + 25.1234341 + ], + [ + -81.1288133, + 25.1234341 + ], + [ + -81.1288133, + 25.0619389 + ], + [ + -81.0649231, + 25.0619389 + ], + [ + -81.0649231, + 24.8157807 + ], + [ + -81.6289469, + 24.8157807 + ], + [ + -81.6289469, + 24.7538367 + ], + [ + -81.6907173, + 24.7538367 + ], + [ + -81.6907173, + 24.6899374 + ], + [ + -81.8173189, + 24.6899374 + ], + [ + -81.8173189, + 24.6279161 + ], + [ + -82.1910041, + 24.6279161 + ], + [ + -82.1910041, + 24.496294 + ], + [ + -81.6216596, + 24.496294 + ], + [ + -81.6216596, + 24.559484 + ], + [ + -81.372006, + 24.559484 + ], + [ + -81.372006, + 24.6220687 + ], + [ + -81.0593278, + 24.6220687 + ], + [ + -81.0593278, + 24.684826 + ], + [ + -80.9347147, + 24.684826 + ], + [ + -80.9347147, + 24.7474828 + ], + [ + -80.7471081, + 24.7474828 + ], + [ + -80.7471081, + 24.8100618 + ], + [ + -80.3629898, + 24.8100618 + ], + [ + -80.3629898, + 25.1175858 + ], + [ + -80.122344, + 25.1175858 + ], + [ + -80.122344, + 25.7472357 + ], + [ + -80.0588458, + 25.7472357 + ], + [ + -80.0588458, + 26.3708251 + ], + [ + -79.995837, + 26.3708251 + ], + [ + -79.995837, + 26.9398003 + ], + [ + -80.0587265, + 26.9398003 + ], + [ + -80.0587265, + 27.1277466 + ], + [ + -80.1226251, + 27.1277466 + ], + [ + -80.1226251, + 27.2534279 + ], + [ + -80.1846956, + 27.2534279 + ], + [ + -80.1846956, + 27.3781229 + ], + [ + -80.246175, + 27.3781229 + ], + [ + -80.246175, + 27.5658729 + ], + [ + -80.3094768, + 27.5658729 + ], + [ + -80.3094768, + 27.7530311 + ], + [ + -80.3721485, + 27.7530311 + ], + [ + -80.3721485, + 27.8774451 + ], + [ + -80.4351457, + 27.8774451 + ], + [ + -80.4351457, + 28.0033366 + ], + [ + -80.4966078, + 28.0033366 + ], + [ + -80.4966078, + 28.1277326 + ], + [ + -80.5587159, + 28.1277326 + ], + [ + -80.5587159, + 28.3723509 + ], + [ + -80.4966335, + 28.3723509 + ], + [ + -80.4966335, + 29.5160326 + ], + [ + -81.1213644, + 29.5160326 + ], + [ + -81.1213644, + 31.6846966 + ], + [ + -80.6018723, + 31.6846966 + ], + [ + -80.6018723, + 32.2475309 + ], + [ + -79.4921024, + 32.2475309 + ], + [ + -79.4921024, + 32.9970261 + ], + [ + -79.1116488, + 32.9970261 + ], + [ + -79.1116488, + 33.3729457 + ], + [ + -78.6153621, + 33.3729457 + ], + [ + -78.6153621, + 33.8097638 + ], + [ + -77.9316963, + 33.8097638 + ], + [ + -77.9316963, + 33.8718243 + ], + [ + -77.8692252, + 33.8718243 + ], + [ + -77.8692252, + 34.0552454 + ], + [ + -77.6826392, + 34.0552454 + ], + [ + -77.6826392, + 34.2974598 + ], + [ + -77.2453509, + 34.2974598 + ], + [ + -77.2453509, + 34.5598585 + ], + [ + -76.4973277, + 34.5598585 + ], + [ + -76.4973277, + 34.622796 + ], + [ + -76.4337602, + 34.622796 + ], + [ + -76.4337602, + 34.6849285 + ], + [ + -76.373212, + 34.6849285 + ], + [ + -76.373212, + 34.7467674 + ], + [ + -76.3059364, + 34.7467674 + ], + [ + -76.3059364, + 34.808551 + ], + [ + -76.2468017, + 34.808551 + ], + [ + -76.2468017, + 34.8728418 + ], + [ + -76.1825922, + 34.8728418 + ], + [ + -76.1825922, + 34.9335332 + ], + [ + -76.120814, + 34.9335332 + ], + [ + -76.120814, + 34.9952359 + ], + [ + -75.9979015, + 34.9952359 + ], + [ + -75.9979015, + 35.0578182 + ], + [ + -75.870338, + 35.0578182 + ], + [ + -75.870338, + 35.1219097 + ], + [ + -75.7462194, + 35.1219097 + ], + [ + -75.7462194, + 35.1818911 + ], + [ + -75.4929694, + 35.1818911 + ], + [ + -75.4929694, + 35.3082988 + ], + [ + -75.4325662, + 35.3082988 + ], + [ + -75.4325662, + 35.7542495 + ], + [ + -75.4969907, + 35.7542495 + ], + [ + -75.4969907, + 37.8105602 + ], + [ + -75.3082972, + 37.8105602 + ], + [ + -75.3082972, + 37.8720088 + ], + [ + -75.245601, + 37.8720088 + ], + [ + -75.245601, + 37.9954849 + ], + [ + -75.1828751, + 37.9954849 + ], + [ + -75.1828751, + 38.0585079 + ], + [ + -75.1184793, + 38.0585079 + ], + [ + -75.1184793, + 38.2469091 + ], + [ + -75.0592098, + 38.2469091 + ], + [ + -75.0592098, + 38.3704316 + ], + [ + -74.9948111, + 38.3704316 + ], + [ + -74.9948111, + 38.8718417 + ], + [ + -74.4878252, + 38.8718417 + ], + [ + -74.4878252, + 39.3089428 + ], + [ + -74.1766317, + 39.3089428 + ], + [ + -74.1766317, + 39.6224653 + ], + [ + -74.0567045, + 39.6224653 + ], + [ + -74.0567045, + 39.933178 + ], + [ + -73.9959035, + 39.933178 + ], + [ + -73.9959035, + 40.1854852 + ], + [ + -73.9341593, + 40.1854852 + ], + [ + -73.9341593, + 40.4959486 + ], + [ + -73.8723024, + 40.4959486 + ], + [ + -73.8723024, + 40.5527135 + ], + [ + -71.8074506, + 40.5527135 + ], + [ + -71.8074506, + 41.3088005 + ], + [ + -70.882512, + 41.3088005 + ], + [ + -70.882512, + 41.184978 + ], + [ + -70.7461947, + 41.184978 + ], + [ + -70.7461947, + 41.3091865 + ], + [ + -70.4337553, + 41.3091865 + ], + [ + -70.4337553, + 41.4963885 + ], + [ + -69.9334281, + 41.4963885 + ], + [ + -69.9334281, + 41.6230802 + ], + [ + -69.869857, + 41.6230802 + ], + [ + -69.869857, + 41.8776895 + ], + [ + -69.935791, + 41.8776895 + ], + [ + -69.935791, + 42.0032342 + ], + [ + -69.9975823, + 42.0032342 + ], + [ + -69.9975823, + 42.0650191 + ], + [ + -70.0606103, + 42.0650191 + ], + [ + -70.0606103, + 42.1294348 + ], + [ + -70.5572884, + 42.1294348 + ], + [ + -70.5572884, + 43.2487079 + ], + [ + -70.4974097, + 43.2487079 + ], + [ + -70.4974097, + 43.3092194 + ], + [ + -70.3704249, + 43.3092194 + ], + [ + -70.3704249, + 43.371963 + ], + [ + -70.3085701, + 43.371963 + ], + [ + -70.3085701, + 43.4969879 + ], + [ + -70.183921, + 43.4969879 + ], + [ + -70.183921, + 43.6223531 + ], + [ + -70.057583, + 43.6223531 + ], + [ + -70.057583, + 43.6850173 + ], + [ + -69.7455247, + 43.6850173 + ], + [ + -69.7455247, + 43.7476571 + ], + [ + -69.2472845, + 43.7476571 + ], + [ + -69.2472845, + 43.8107035 + ], + [ + -69.0560701, + 43.8107035 + ], + [ + -69.0560701, + 43.8717247 + ], + [ + -68.9950522, + 43.8717247 + ], + [ + -68.9950522, + 43.9982022 + ], + [ + -68.4963672, + 43.9982022 + ], + [ + -68.4963672, + 44.0597368 + ], + [ + -68.3081038, + 44.0597368 + ], + [ + -68.3081038, + 44.122137 + ], + [ + -68.1851802, + 44.122137 + ], + [ + -68.1851802, + 44.3081382 + ], + [ + -67.9956019, + 44.3081382 + ], + [ + -67.9956019, + 44.3727489 + ], + [ + -67.8103041, + 44.3727489 + ], + [ + -67.8103041, + 44.435178 + ], + [ + -67.4965289, + 44.435178 + ], + [ + -67.4965289, + 44.4968776 + ], + [ + -67.37102, + 44.4968776 + ], + [ + -67.37102, + 44.5600642 + ], + [ + -67.1848753, + 44.5600642 + ], + [ + -67.1848753, + 44.6213345 + ], + [ + -67.1221208, + 44.6213345 + ], + [ + -67.1221208, + 44.6867918 + ], + [ + -67.059365, + 44.6867918 + ], + [ + -67.059365, + 44.7473657 + ], + [ + -66.9311098, + 44.7473657 + ], + [ + -66.9311098, + 44.9406566 + ], + [ + -66.994683, + 44.9406566 + ], + [ + -66.994683, + 45.0024514 + ], + [ + -67.0595847, + 45.0024514 + ], + [ + -67.0595847, + 45.1273377 + ], + [ + -67.1201974, + 45.1273377 + ], + [ + -67.1201974, + 45.1910115 + ], + [ + -67.2469811, + 45.1910115 + ], + [ + -67.2469811, + 45.253442 + ], + [ + -67.3177546, + 45.253442 + ], + [ + -67.3177546, + 45.1898369 + ], + [ + -67.370749, + 45.1898369 + ], + [ + -67.370749, + 45.2534001 + ], + [ + -67.4326888, + 45.2534001 + ], + [ + -67.4326888, + 45.3083409 + ], + [ + -67.3708571, + 45.3083409 + ], + [ + -67.3708571, + 45.4396986 + ], + [ + -67.4305573, + 45.4396986 + ], + [ + -67.4305573, + 45.4950095 + ], + [ + -67.37099, + 45.4950095 + ], + [ + -67.37099, + 45.6264543 + ], + [ + -67.6214982, + 45.6264543 + ], + [ + -67.6214982, + 45.6896133 + ], + [ + -67.683828, + 45.6896133 + ], + [ + -67.683828, + 45.753259 + ], + [ + -67.7462097, + 45.753259 + ], + [ + -67.7462097, + 47.1268165 + ], + [ + -67.8700141, + 47.1268165 + ], + [ + -67.8700141, + 47.1900278 + ], + [ + -67.9323803, + 47.1900278 + ], + [ + -67.9323803, + 47.2539678 + ], + [ + -67.9959387, + 47.2539678 + ], + [ + -67.9959387, + 47.3149737 + ], + [ + -68.1206676, + 47.3149737 + ], + [ + -68.1206676, + 47.3780823 + ], + [ + -68.4423175, + 47.3780823 + ], + [ + -68.4423175, + 47.3166082 + ], + [ + -68.6314305, + 47.3166082 + ], + [ + -68.6314305, + 47.2544676 + ], + [ + -68.9978037, + 47.2544676 + ], + [ + -68.9978037, + 47.439895 + ], + [ + -69.0607223, + 47.439895 + ], + [ + -69.0607223, + 47.5047558 + ], + [ + -69.2538122, + 47.5047558 + ], + [ + -69.2538122, + 47.4398084 + ], + [ + -69.3179284, + 47.4398084 + ], + [ + -69.3179284, + 47.378601 + ], + [ + -69.4438546, + 47.378601 + ], + [ + -69.4438546, + 47.3156274 + ], + [ + -69.5038204, + 47.3156274 + ], + [ + -69.5038204, + 47.2525839 + ], + [ + -69.5667838, + 47.2525839 + ], + [ + -69.5667838, + 47.1910884 + ], + [ + -69.6303478, + 47.1910884 + ], + [ + -69.6303478, + 47.128701 + ], + [ + -69.6933103, + 47.128701 + ], + [ + -69.6933103, + 47.0654307 + ], + [ + -69.7557063, + 47.0654307 + ], + [ + -69.7557063, + 47.0042751 + ], + [ + -69.8180391, + 47.0042751 + ], + [ + -69.8180391, + 46.9415344 + ], + [ + -69.8804023, + 46.9415344 + ], + [ + -69.8804023, + 46.8792519 + ], + [ + -69.9421674, + 46.8792519 + ], + [ + -69.9421674, + 46.8177399 + ], + [ + -70.0063088, + 46.8177399 + ], + [ + -70.0063088, + 46.6920295 + ], + [ + -70.0704265, + 46.6920295 + ], + [ + -70.0704265, + 46.4425926 + ], + [ + -70.1945902, + 46.4425926 + ], + [ + -70.1945902, + 46.3785887 + ], + [ + -70.2562047, + 46.3785887 + ], + [ + -70.2562047, + 46.3152628 + ], + [ + -70.3203651, + 46.3152628 + ], + [ + -70.3203651, + 46.0651209 + ], + [ + -70.3814988, + 46.0651209 + ], + [ + -70.3814988, + 45.93552 + ], + [ + -70.3201618, + 45.93552 + ], + [ + -70.3201618, + 45.879479 + ], + [ + -70.4493131, + 45.879479 + ], + [ + -70.4493131, + 45.7538713 + ], + [ + -70.5070021, + 45.7538713 + ], + [ + -70.5070021, + 45.6916912 + ], + [ + -70.6316642, + 45.6916912 + ], + [ + -70.6316642, + 45.6291619 + ], + [ + -70.7575538, + 45.6291619 + ], + [ + -70.7575538, + 45.4414685 + ], + [ + -70.8809878, + 45.4414685 + ], + [ + -70.8809878, + 45.3780612 + ], + [ + -71.13328, + 45.3780612 + ], + [ + -71.13328, + 45.3151452 + ], + [ + -71.3830282, + 45.3151452 + ], + [ + -71.3830282, + 45.253416 + ], + [ + -71.5076448, + 45.253416 + ], + [ + -71.5076448, + 45.0655726 + ], + [ + -73.9418929, + 45.0655726 + ], + [ + -73.9418929, + 45.0031242 + ], + [ + -74.7469725, + 45.0031242 + ], + [ + -74.7469725, + 45.0649003 + ], + [ + -74.8800964, + 45.0649003 + ], + [ + -74.8800964, + 45.0029023 + ], + [ + -75.0662455, + 45.0029023 + ], + [ + -75.0662455, + 44.9415167 + ], + [ + -75.2539363, + 44.9415167 + ], + [ + -75.2539363, + 44.8776043 + ], + [ + -75.3789648, + 44.8776043 + ], + [ + -75.3789648, + 44.8153462 + ], + [ + -75.4431283, + 44.8153462 + ], + [ + -75.4431283, + 44.7536053 + ], + [ + -75.5666566, + 44.7536053 + ], + [ + -75.5666566, + 44.6909879 + ], + [ + -75.6290205, + 44.6909879 + ], + [ + -75.6290205, + 44.6284958 + ], + [ + -75.7540484, + 44.6284958 + ], + [ + -75.7540484, + 44.566385 + ], + [ + -75.817312, + 44.566385 + ], + [ + -75.817312, + 44.5028932 + ], + [ + -75.8799549, + 44.5028932 + ], + [ + -75.8799549, + 44.3784946 + ], + [ + -76.1300319, + 44.3784946 + ], + [ + -76.1300319, + 44.3159227 + ], + [ + -76.1926961, + 44.3159227 + ], + [ + -76.1926961, + 44.2534378 + ], + [ + -76.3182619, + 44.2534378 + ], + [ + -76.3182619, + 44.1916726 + ], + [ + -76.3792975, + 44.1916726 + ], + [ + -76.3792975, + 44.0653733 + ], + [ + -76.4427584, + 44.0653733 + ], + [ + -76.4427584, + 43.9963825 + ], + [ + -76.317027, + 43.9963825 + ], + [ + -76.317027, + 43.9414581 + ], + [ + -76.5076611, + 43.9414581 + ], + [ + -76.5076611, + 43.8723335 + ], + [ + -76.3829974, + 43.8723335 + ], + [ + -76.3829974, + 43.8091872 + ], + [ + -76.2534102, + 43.8091872 + ], + [ + -76.2534102, + 43.5665222 + ], + [ + -76.5064833, + 43.5665222 + ], + [ + -76.5064833, + 43.5033881 + ], + [ + -76.6331208, + 43.5033881 + ], + [ + -76.6331208, + 43.4432252 + ], + [ + -76.6951085, + 43.4432252 + ], + [ + -76.6951085, + 43.3786858 + ], + [ + -76.8177798, + 43.3786858 + ], + [ + -76.8177798, + 43.318066 + ], + [ + -77.682, + 43.318066 + ], + [ + -77.682, + 43.3789376 + ], + [ + -78.0565883, + 43.3789376 + ], + [ + -78.0565883, + 43.4396918 + ], + [ + -78.4389748, + 43.4396918 + ], + [ + -78.4389748, + 43.3794382 + ], + [ + -78.8803396, + 43.3794382 + ], + [ + -78.8803396, + 43.3149724 + ], + [ + -79.1298858, + 43.3149724 + ], + [ + -79.1298858, + 43.2429286 + ], + [ + -79.0669615, + 43.2429286 + ], + [ + -79.0669615, + 43.1299931 + ], + [ + -79.1298858, + 43.1299931 + ], + [ + -79.1298858, + 43.0577305 + ], + [ + -79.071264, + 43.0577305 + ], + [ + -79.071264, + 42.9294906 + ], + [ + -78.943264, + 42.9294906 + ], + [ + -78.943264, + 42.7542165 + ], + [ + -79.069439, + 42.7542165 + ], + [ + -79.069439, + 42.6941622 + ], + [ + -79.133439, + 42.6941622 + ], + [ + -79.133439, + 42.6296973 + ], + [ + -79.1947499, + 42.6296973 + ], + [ + -79.1947499, + 42.5663538 + ], + [ + -79.3786827, + 42.5663538 + ], + [ + -79.3786827, + 42.5033425 + ], + [ + -79.4442961, + 42.5033425 + ], + [ + -79.4442961, + 42.4410614 + ], + [ + -79.5679936, + 42.4410614 + ], + [ + -79.5679936, + 42.3775264 + ], + [ + -79.6906154, + 42.3775264 + ], + [ + -79.6906154, + 42.3171086 + ], + [ + -79.8164642, + 42.3171086 + ], + [ + -79.8164642, + 42.2534481 + ], + [ + -80.0052373, + 42.2534481 + ], + [ + -80.0052373, + 42.1909188 + ], + [ + -80.1916829, + 42.1909188 + ], + [ + -80.1916829, + 42.1272555 + ], + [ + -80.3167992, + 42.1272555 + ], + [ + -80.3167992, + 42.0669857 + ], + [ + -80.5063234, + 42.0669857 + ], + [ + -80.5063234, + 42.0034331 + ], + [ + -80.6930471, + 42.0034331 + ], + [ + -80.6930471, + 41.9415141 + ], + [ + -80.9440403, + 41.9415141 + ], + [ + -80.9440403, + 41.8781193 + ], + [ + -81.1942729, + 41.8781193 + ], + [ + -81.1942729, + 41.8166455 + ], + [ + -81.3190089, + 41.8166455 + ], + [ + -81.3190089, + 41.7545453 + ], + [ + -81.4418435, + 41.7545453 + ], + [ + -81.4418435, + 41.690965 + ], + [ + -81.5053523, + 41.690965 + ], + [ + -81.5053523, + 41.6301643 + ], + [ + -82.7470081, + 41.6301643 + ], + [ + -82.7470081, + 41.7536942 + ], + [ + -82.8839135, + 41.7536942 + ], + [ + -82.8839135, + 41.5656075 + ], + [ + -82.9957195, + 41.5656075 + ], + [ + -82.9957195, + 41.6270375 + ], + [ + -83.1257796, + 41.6270375 + ], + [ + -83.1257796, + 41.6878411 + ], + [ + -83.2474733, + 41.6878411 + ], + [ + -83.2474733, + 41.7536942 + ], + [ + -83.3737305, + 41.7536942 + ], + [ + -83.3737305, + 41.809276 + ], + [ + -83.3106019, + 41.809276 + ], + [ + -83.3106019, + 41.8716064 + ], + [ + -83.2474733, + 41.8716064 + ], + [ + -83.2474733, + 41.9361393 + ], + [ + -83.1843447, + 41.9361393 + ], + [ + -83.1843447, + 41.9960851 + ], + [ + -83.1207681, + 41.9960851 + ], + [ + -83.1207681, + 42.2464812 + ], + [ + -83.0589194, + 42.2464812 + ], + [ + -83.0589194, + 42.3089555 + ], + [ + -82.8685328, + 42.3089555 + ], + [ + -82.8685328, + 42.3717652 + ], + [ + -82.8072219, + 42.3717652 + ], + [ + -82.8072219, + 42.558553 + ], + [ + -82.7553745, + 42.558553 + ], + [ + -82.7553745, + 42.4954945 + ], + [ + -82.5599041, + 42.4954945 + ], + [ + -82.5599041, + 42.558553 + ], + [ + -82.4967755, + 42.558553 + ], + [ + -82.4967755, + 42.6833607 + ], + [ + -82.4328863, + 42.6833607 + ], + [ + -82.4328863, + 42.9342196 + ], + [ + -82.3700552, + 42.9342196 + ], + [ + -82.3700552, + 43.0648071 + ], + [ + -82.4328863, + 43.0648071 + ], + [ + -82.4328863, + 43.1917566 + ], + [ + -82.4947464, + 43.1917566 + ], + [ + -82.4947464, + 43.5034627 + ], + [ + -82.557133, + 43.5034627 + ], + [ + -82.557133, + 43.8160901 + ], + [ + -82.6197884, + 43.8160901 + ], + [ + -82.6197884, + 43.9422098 + ], + [ + -82.6839499, + 43.9422098 + ], + [ + -82.6839499, + 44.0022641 + ], + [ + -82.7465346, + 44.0022641 + ], + [ + -82.7465346, + 44.0670545 + ], + [ + -82.8708696, + 44.0670545 + ], + [ + -82.8708696, + 44.1291935 + ], + [ + -83.008517, + 44.1291935 + ], + [ + -83.008517, + 44.0664786 + ], + [ + -83.1336086, + 44.0664786 + ], + [ + -83.1336086, + 44.0053949 + ], + [ + -83.2414522, + 44.0053949 + ], + [ + -83.2414522, + 44.9962034 + ], + [ + -83.1806112, + 44.9962034 + ], + [ + -83.1806112, + 45.067302 + ], + [ + -83.2455172, + 45.067302 + ], + [ + -83.2455172, + 45.1287382 + ], + [ + -83.3065878, + 45.1287382 + ], + [ + -83.3065878, + 45.2551509 + ], + [ + -83.3706087, + 45.2551509 + ], + [ + -83.3706087, + 45.3165923 + ], + [ + -83.4325644, + 45.3165923 + ], + [ + -83.4325644, + 45.3792105 + ], + [ + -83.6178415, + 45.3792105 + ], + [ + -83.6178415, + 45.4419665 + ], + [ + -83.8084291, + 45.4419665 + ], + [ + -83.8084291, + 45.5036189 + ], + [ + -84.0550718, + 45.5036189 + ], + [ + -84.0550718, + 45.5647907 + ], + [ + -84.1235181, + 45.5647907 + ], + [ + -84.1235181, + 45.6287845 + ], + [ + -84.1807534, + 45.6287845 + ], + [ + -84.1807534, + 45.6914688 + ], + [ + -84.3111554, + 45.6914688 + ], + [ + -84.3111554, + 45.9337076 + ], + [ + -83.8209974, + 45.9337076 + ], + [ + -83.8209974, + 45.8725113 + ], + [ + -83.4968086, + 45.8725113 + ], + [ + -83.4968086, + 45.9337076 + ], + [ + -83.4338066, + 45.9337076 + ], + [ + -83.4338066, + 46.0016863 + ], + [ + -83.4962697, + 46.0016863 + ], + [ + -83.4962697, + 46.0668178 + ], + [ + -83.5599956, + 46.0668178 + ], + [ + -83.5599956, + 46.1261576 + ], + [ + -83.9954558, + 46.1261576 + ], + [ + -83.9954558, + 46.1931747 + ], + [ + -84.0591816, + 46.1931747 + ], + [ + -84.0591816, + 46.3814972 + ], + [ + -84.1152614, + 46.3814972 + ], + [ + -84.1152614, + 46.4953584 + ], + [ + -84.0591816, + 46.4953584 + ], + [ + -84.0591816, + 46.5682653 + ], + [ + -84.2579545, + 46.5682653 + ], + [ + -84.2579545, + 46.5051232 + ], + [ + -84.3071879, + 46.5051232 + ], + [ + -84.3071879, + 46.5682653 + ], + [ + -84.4415364, + 46.5682653 + ], + [ + -84.4415364, + 46.504525 + ], + [ + -84.9965729, + 46.504525 + ], + [ + -84.9965729, + 46.6842882 + ], + [ + -84.9298158, + 46.6842882 + ], + [ + -84.9298158, + 46.818077 + ], + [ + -85.3165894, + 46.818077 + ], + [ + -85.3165894, + 46.7535825 + ], + [ + -87.5562645, + 46.7535825 + ], + [ + -87.5562645, + 47.4407371 + ], + [ + -87.6825361, + 47.4407371 + ], + [ + -87.6825361, + 47.5035554 + ], + [ + -88.2560738, + 47.5035554 + ], + [ + -88.2560738, + 47.4433716 + ], + [ + -88.4417419, + 47.4433716 + ], + [ + -88.4417419, + 47.3789949 + ], + [ + -88.50683, + 47.3789949 + ], + [ + -88.50683, + 47.3153881 + ], + [ + -88.6312821, + 47.3153881 + ], + [ + -88.6312821, + 47.2539782 + ], + [ + -88.7569636, + 47.2539782 + ], + [ + -88.7569636, + 47.1934682 + ], + [ + -88.8838253, + 47.1934682 + ], + [ + -88.8838253, + 47.1284735 + ], + [ + -88.9434208, + 47.1284735 + ], + [ + -88.9434208, + 47.0662127 + ], + [ + -89.0708726, + 47.0662127 + ], + [ + -89.0708726, + 47.0026826 + ], + [ + -89.2565553, + 47.0026826 + ], + [ + -89.2565553, + 46.9410806 + ], + [ + -90.3677669, + 46.9410806 + ], + [ + -90.3677669, + 47.6844827 + ], + [ + -90.3069978, + 47.6844827 + ], + [ + -90.3069978, + 47.7460174 + ], + [ + -89.994859, + 47.7460174 + ], + [ + -89.994859, + 47.8082719 + ], + [ + -89.8048615, + 47.8082719 + ], + [ + -89.8048615, + 47.8700562 + ], + [ + -89.6797699, + 47.8700562 + ], + [ + -89.6797699, + 47.9339637 + ], + [ + -89.4933757, + 47.9339637 + ], + [ + -89.4933757, + 47.9957956 + ], + [ + -89.4284697, + 47.9957956 + ], + [ + -89.4284697, + 48.0656377 + ], + [ + -89.9932739, + 48.0656377 + ], + [ + -89.9932739, + 48.1282966 + ], + [ + -90.7455933, + 48.1282966 + ], + [ + -90.7455933, + 48.1893056 + ], + [ + -90.8087291, + 48.1893056 + ], + [ + -90.8087291, + 48.2522065 + ], + [ + -91.067763, + 48.2522065 + ], + [ + -91.067763, + 48.1916658 + ], + [ + -91.1946247, + 48.1916658 + ], + [ + -91.1946247, + 48.1279027 + ], + [ + -91.6814196, + 48.1279027 + ], + [ + -91.6814196, + 48.2525994 + ], + [ + -91.9321927, + 48.2525994 + ], + [ + -91.9321927, + 48.3142454 + ], + [ + -91.9929683, + 48.3142454 + ], + [ + -91.9929683, + 48.3780845 + ], + [ + -92.3189383, + 48.3780845 + ], + [ + -92.3189383, + 48.2529081 + ], + [ + -92.3732233, + 48.2529081 + ], + [ + -92.3732233, + 48.3153385 + ], + [ + -92.4322288, + 48.3153385 + ], + [ + -92.4322288, + 48.4411448 + ], + [ + -92.4977248, + 48.4411448 + ], + [ + -92.4977248, + 48.501781 + ], + [ + -92.5679413, + 48.501781 + ], + [ + -92.5679413, + 48.439579 + ], + [ + -92.6210462, + 48.439579 + ], + [ + -92.6210462, + 48.5650783 + ], + [ + -92.8086835, + 48.5650783 + ], + [ + -92.8086835, + 48.6286865 + ], + [ + -92.8086835, + 48.6267365 + ], + [ + -92.933185, + 48.6267365 + ], + [ + -92.933185, + 48.6922145 + ], + [ + -93.0051716, + 48.6922145 + ], + [ + -93.0051716, + 48.6282965 + ], + [ + -93.1225924, + 48.6282965 + ], + [ + -93.1225924, + 48.6922145 + ], + [ + -93.3190806, + 48.6922145 + ], + [ + -93.3190806, + 48.6267365 + ], + [ + -93.5049477, + 48.6267365 + ], + [ + -93.5049477, + 48.5635164 + ], + [ + -93.7474601, + 48.5635164 + ], + [ + -93.7474601, + 48.6267365 + ], + [ + -93.8135461, + 48.6267365 + ], + [ + -93.8135461, + 48.6898775 + ], + [ + -94.2453121, + 48.6898775 + ], + [ + -94.2453121, + 48.7554327 + ], + [ + -94.6183171, + 48.7554327 + ], + [ + -94.6183171, + 48.941036 + ], + [ + -94.6809018, + 48.941036 + ], + [ + -94.6809018, + 49.0029737 + ], + [ + -94.7441532, + 49.0029737 + ], + [ + -94.7441532, + 49.2536079 + ], + [ + -94.8084069, + 49.2536079 + ], + [ + -94.8084069, + 49.3784134 + ], + [ + -95.1192391, + 49.3784134 + ], + [ + -95.1192391, + 49.4425264 + ], + [ + -95.1934341, + 49.4425264 + ], + [ + -95.1934341, + 49.0035292 + ], + [ + -96.87069, + 49.0035292 + ], + [ + -96.87069, + 49.0656063 + ], + [ + -99.0049312, + 49.0656063 + ], + [ + -99.0049312, + 49.0050714 + ], + [ + -109.3699257, + 49.0050714 + ], + [ + -109.3699257, + 49.0668231 + ], + [ + -109.5058746, + 49.0668231 + ], + [ + -109.5058746, + 49.0050714 + ], + [ + -114.1830014, + 49.0050714 + ], + [ + -114.1830014, + 49.0687317 + ], + [ + -114.7578709, + 49.0687317 + ], + [ + -114.7578709, + 49.0050714 + ], + [ + -115.433731, + 49.0050714 + ], + [ + -115.433731, + 49.0671412 + ], + [ + -116.5062706, + 49.0671412 + ], + [ + -116.5062706, + 49.0050714 + ], + [ + -117.3089504, + 49.0050714 + ], + [ + -117.3089504, + 49.0659803 + ], + [ + -119.882945, + 49.0659803 + ], + [ + -119.882945, + 49.0050714 + ], + [ + -120.1208555, + 49.0050714 + ], + [ + -120.1208555, + 49.0678367 + ], + [ + -121.4451636, + 49.0678367 + ], + [ + -121.4451636, + 49.0050714 + ], + [ + -121.9311808, + 49.0050714 + ], + [ + -121.9311808, + 49.0656099 + ], + [ + -122.817484, + 49.0656099 + ], + [ + -122.817484, + 49.0029143 + ], + [ + -122.8795155, + 49.0029143 + ], + [ + -122.8795155, + 48.9347018 + ], + [ + -122.8174629, + 48.9347018 + ], + [ + -122.8174629, + 48.8101998 + ], + [ + -122.7538859, + 48.8101998 + ], + [ + -122.7538859, + 48.7533758 + ], + [ + -122.8712937, + 48.7533758 + ], + [ + -122.8712937, + 48.8153948 + ], + [ + -123.0055391, + 48.8153948 + ], + [ + -123.0055391, + 48.7529529 + ], + [ + -123.1296926, + 48.7529529 + ], + [ + -123.1296926, + 48.6902201 + ], + [ + -123.1838197, + 48.6902201 + ], + [ + -123.1838197, + 48.7529029 + ] + ], + [ + [ + -122.9341743, + 37.7521547 + ], + [ + -122.9347457, + 37.6842013 + ], + [ + -123.0679013, + 37.6849023 + ], + [ + -123.0673747, + 37.7475251 + ], + [ + -123.1292603, + 37.7478506 + ], + [ + -123.1286894, + 37.815685 + ], + [ + -123.0590687, + 37.8153192 + ], + [ + -123.0595947, + 37.7528143 + ] + ], + [ + [ + -71.6299464, + 41.2540893 + ], + [ + -71.4966465, + 41.2541393 + ], + [ + -71.4965596, + 41.122965 + ], + [ + -71.6298594, + 41.1229149 + ] + ], + [ + [ + -70.3184265, + 41.3775196 + ], + [ + -70.3183384, + 41.2448243 + ], + [ + -70.1906612, + 41.2448722 + ], + [ + -70.1906239, + 41.1886019 + ], + [ + -69.9336025, + 41.1886984 + ], + [ + -69.933729, + 41.3791941 + ], + [ + -69.9950664, + 41.3791712 + ], + [ + -69.995109, + 41.443159 + ], + [ + -70.0707828, + 41.4431307 + ], + [ + -70.0706972, + 41.3144915 + ], + [ + -70.2461667, + 41.3144258 + ], + [ + -70.2462087, + 41.3775467 + ] + ], + [ + [ + -68.9403374, + 43.9404062 + ], + [ + -68.6856948, + 43.9404977 + ], + [ + -68.6856475, + 43.8721797 + ], + [ + -68.7465405, + 43.8721577 + ], + [ + -68.7464976, + 43.8102529 + ], + [ + -68.8090782, + 43.8102304 + ], + [ + -68.8090343, + 43.746728 + ], + [ + -68.8773094, + 43.7467034 + ], + [ + -68.8773544, + 43.8117826 + ], + [ + -68.9402483, + 43.8117599 + ] + ], + [ + [ + -123.1291466, + 49.0645144 + ], + [ + -122.9954224, + 49.0645144 + ], + [ + -122.9954224, + 48.9343243 + ], + [ + -123.1291466, + 48.9343243 + ] + ], + [ + [ + -82.9407144, + 24.7535913 + ], + [ + -82.8719398, + 24.7535913 + ], + [ + -82.8719398, + 24.6905653 + ], + [ + -82.7446233, + 24.6905653 + ], + [ + -82.7446233, + 24.6214593 + ], + [ + -82.8088038, + 24.6214593 + ], + [ + -82.8088038, + 24.5594908 + ], + [ + -82.9407144, + 24.5594908 + ] + ] + ] + }, + { + "name": "USGS Topographic Maps", + "type": "tms", + "template": "http://{switch:a,b,c}.tile.openstreetmap.us/usgs_scanned_topos/{zoom}/{x}/{y}.png", + "polygon": [ + [ + [ + -125.990173, + 48.9962416 + ], + [ + -125.989419, + 47.9948396 + ], + [ + -123.9929739, + 47.9955062 + ], + [ + -123.9922429, + 47.0059202 + ], + [ + -125.988688, + 47.0052409 + ], + [ + -125.9879604, + 46.0015618 + ], + [ + -123.9939396, + 46.0022529 + ], + [ + -123.9925238, + 43.9961708 + ], + [ + -124.9931832, + 43.9958116 + ], + [ + -124.9918175, + 41.9942149 + ], + [ + -125.9851789, + 41.9938465 + ], + [ + -125.9838655, + 40.0076111 + ], + [ + -123.9833285, + 40.0083757 + ], + [ + -123.9814115, + 37.002615 + ], + [ + -122.21903, + 37.0033173 + ], + [ + -122.2184144, + 36.011671 + ], + [ + -122.020087, + 36.011751 + ], + [ + -122.0188591, + 33.9961766 + ], + [ + -119.9787757, + 33.9970206 + ], + [ + -119.9775867, + 31.9987658 + ], + [ + -114.0122833, + 32.00129 + ], + [ + -114.0116894, + 30.9862401 + ], + [ + -105.998294, + 30.9896679 + ], + [ + -105.9971419, + 28.9901065 + ], + [ + -102.0210506, + 28.9918418 + ], + [ + -102.0204916, + 28.00733 + ], + [ + -100.0062436, + 28.0082173 + ], + [ + -100.0051143, + 25.991909 + ], + [ + -98.0109067, + 25.9928035 + ], + [ + -98.0103613, + 25.0063461 + ], + [ + -97.0161086, + 25.0067957 + ], + [ + -97.016654, + 25.9932494 + ], + [ + -95.9824825, + 25.9937132 + ], + [ + -95.9835999, + 27.9891175 + ], + [ + -94.0200898, + 27.9899826 + ], + [ + -94.0206586, + 28.9918129 + ], + [ + -88.0156706, + 28.9944338 + ], + [ + -88.0162494, + 30.0038862 + ], + [ + -86.0277506, + 30.0047454 + ], + [ + -86.0271719, + 28.9953016 + ], + [ + -84.0187909, + 28.9961781 + ], + [ + -84.017095, + 25.9817708 + ], + [ + -81.9971976, + 25.9826768 + ], + [ + -81.9966618, + 25.0134917 + ], + [ + -84.0165592, + 25.0125783 + ], + [ + -84.0160068, + 24.0052745 + ], + [ + -80.0199985, + 24.007096 + ], + [ + -80.0245309, + 32.0161282 + ], + [ + -78.0066484, + 32.0169819 + ], + [ + -78.0072238, + 32.9894278 + ], + [ + -77.8807233, + 32.9894807 + ], + [ + -77.8813253, + 33.9955918 + ], + [ + -76.0115411, + 33.9963653 + ], + [ + -76.0121459, + 34.9952552 + ], + [ + -74.0068449, + 34.9960749 + ], + [ + -74.0099997, + 40.0084254 + ], + [ + -72.0013745, + 40.0091931 + ], + [ + -72.002019, + 40.9912464 + ], + [ + -69.8797398, + 40.9920457 + ], + [ + -69.8804173, + 42.00893 + ], + [ + -69.9927682, + 42.0088883 + ], + [ + -69.9934462, + 43.0105166 + ], + [ + -67.9845366, + 43.0112496 + ], + [ + -67.985224, + 44.0103812 + ], + [ + -65.9892568, + 44.0110975 + ], + [ + -65.9921237, + 47.9993584 + ], + [ + -70.006442, + 47.9980181 + ], + [ + -70.005708, + 47.0042007 + ], + [ + -72.023686, + 47.003514 + ], + [ + -72.0222508, + 45.0059846 + ], + [ + -78.0146667, + 45.0038705 + ], + [ + -78.0139662, + 44.0026998 + ], + [ + -80.029686, + 44.0019763 + ], + [ + -80.0290052, + 43.0122994 + ], + [ + -81.995479, + 43.011582 + ], + [ + -81.9982986, + 47.0042713 + ], + [ + -87.505706, + 47.0023972 + ], + [ + -87.5064535, + 48.0142702 + ], + [ + -88.0260889, + 48.0140968 + ], + [ + -88.026838, + 49.0086686 + ], + [ + -93.9981078, + 49.0067142 + ], + [ + -93.9988778, + 50.0086456 + ], + [ + -96.0138899, + 50.0079995 + ], + [ + -96.0131199, + 49.0060547 + ] + ], + [ + [ + -160.5787616, + 22.5062947 + ], + [ + -160.5782192, + 21.4984647 + ], + [ + -159.0030121, + 21.499196 + ], + [ + -159.0027422, + 20.9951068 + ], + [ + -157.5083185, + 20.995803 + ], + [ + -157.5080519, + 20.4960241 + ], + [ + -155.966889, + 20.4967444 + ], + [ + -155.9674267, + 21.5028287 + ], + [ + -157.5044717, + 21.5021151 + ], + [ + -157.5047384, + 21.9984962 + ], + [ + -159.0090946, + 21.9978002 + ], + [ + -159.0093692, + 22.5070181 + ] + ], + [ + [ + -168.006102, + 68.9941463 + ], + [ + -168.0047628, + 68.0107853 + ], + [ + -165.4842481, + 68.0112562 + ], + [ + -165.4829337, + 67.0037303 + ], + [ + -168.0034485, + 67.0032389 + ], + [ + -168.002195, + 66.0017503 + ], + [ + -169.0087448, + 66.001546 + ], + [ + -169.0075381, + 64.9987675 + ], + [ + -168.0009882, + 64.9989798 + ], + [ + -167.9998282, + 63.9982374 + ], + [ + -164.9871288, + 63.9988964 + ], + [ + -164.9860062, + 62.9950845 + ], + [ + -167.9987057, + 62.9944019 + ], + [ + -167.9946035, + 59.0153692 + ], + [ + -162.5027857, + 59.0167799 + ], + [ + -162.5018149, + 58.0005815 + ], + [ + -160.0159024, + 58.0012389 + ], + [ + -160.0149725, + 57.000035 + ], + [ + -160.5054788, + 56.9999017 + ], + [ + -160.5045719, + 55.9968161 + ], + [ + -164.012195, + 55.9958373 + ], + [ + -164.0113186, + 55.00107 + ], + [ + -165.994782, + 55.0005023 + ], + [ + -165.9941266, + 54.2400584 + ], + [ + -168.0002944, + 54.2394734 + ], + [ + -168.0000986, + 54.0094921 + ], + [ + -170.0156134, + 54.0089011 + ], + [ + -170.0147683, + 53.0016446 + ], + [ + -171.9993636, + 53.0010487 + ], + [ + -171.9989488, + 52.4977745 + ], + [ + -176.0083239, + 52.4965566 + ], + [ + -176.0081186, + 52.2452555 + ], + [ + -178.000097, + 52.2446469 + ], + [ + -177.9992996, + 51.2554252 + ], + [ + -176.0073212, + 51.2560472 + ], + [ + -176.0075146, + 51.4980163 + ], + [ + -171.9981395, + 51.4992617 + ], + [ + -171.9985419, + 51.9985373 + ], + [ + -167.9984317, + 51.9997661 + ], + [ + -167.9994645, + 53.2560877 + ], + [ + -165.9932968, + 53.2566866 + ], + [ + -165.9939308, + 54.0100804 + ], + [ + -159.0067205, + 54.0121291 + ], + [ + -159.0075717, + 55.002502 + ], + [ + -158.0190709, + 55.0027849 + ], + [ + -158.0199473, + 55.9975094 + ], + [ + -151.9963213, + 55.9991902 + ], + [ + -151.9981536, + 57.9986536 + ], + [ + -151.500341, + 57.9987853 + ], + [ + -151.5012894, + 58.9919816 + ], + [ + -138.5159989, + 58.9953194 + ], + [ + -138.5150471, + 57.9986434 + ], + [ + -136.6872422, + 57.9991267 + ], + [ + -136.6863158, + 57.0016688 + ], + [ + -135.9973698, + 57.001856 + ], + [ + -135.9964667, + 56.0030544 + ], + [ + -134.6717732, + 56.003424 + ], + [ + -134.6708865, + 54.9969623 + ], + [ + -133.9956734, + 54.9971556 + ], + [ + -133.9948193, + 54.0031685 + ], + [ + -130.0044418, + 54.0043387 + ], + [ + -130.0070826, + 57.0000507 + ], + [ + -131.975877, + 56.9995156 + ], + [ + -131.9787378, + 59.9933094 + ], + [ + -138.0071813, + 59.991805 + ], + [ + -138.0082158, + 61.0125755 + ], + [ + -140.9874011, + 61.0118551 + ], + [ + -140.99984, + 71.0039309 + ], + [ + -154.5023956, + 71.0017377 + ], + [ + -154.5039632, + 71.9983391 + ], + [ + -157.499048, + 71.9978773 + ], + [ + -157.4974758, + 70.9982877 + ], + [ + -163.0233611, + 70.9973899 + ], + [ + -163.0218273, + 69.9707435 + ], + [ + -164.9730896, + 69.97041 + ], + [ + -164.9717003, + 68.994689 + ] + ], + [ + [ + -168.5133204, + 62.8689586 + ], + [ + -168.5144423, + 63.8765677 + ], + [ + -172.0202755, + 63.8757975 + ], + [ + -172.0191536, + 62.8681608 + ] + ], + [ + [ + -170.9947111, + 59.9954089 + ], + [ + -170.995726, + 60.9969787 + ], + [ + -174.0045311, + 60.9962508 + ], + [ + -174.0035162, + 59.9946581 + ] + ], + [ + [ + -156.0717261, + 20.2854602 + ], + [ + -154.7940471, + 20.2860582 + ], + [ + -154.7933145, + 18.9029464 + ], + [ + -156.0709936, + 18.9023432 + ] + ] + ] + }, + { + "name": "Vejmidte (Denmark)", + "type": "tms", + "template": "http://{switch:a,b,c}.tile.openstreetmap.dk/danmark/vejmidte/{zoom}/{x}/{y}.png", + "scaleExtent": [ + 0, + 20 + ], + "polygon": [ + [ + [ + 8.3743941, + 54.9551655 + ], + [ + 8.3683809, + 55.4042149 + ], + [ + 8.2103997, + 55.4039795 + ], + [ + 8.2087314, + 55.4937345 + ], + [ + 8.0502655, + 55.4924731 + ], + [ + 8.0185123, + 56.7501399 + ], + [ + 8.1819161, + 56.7509948 + ], + [ + 8.1763274, + 57.0208898 + ], + [ + 8.3413329, + 57.0219872 + ], + [ + 8.3392467, + 57.1119574 + ], + [ + 8.5054433, + 57.1123212 + ], + [ + 8.5033923, + 57.2020499 + ], + [ + 9.3316304, + 57.2027636 + ], + [ + 9.3319079, + 57.2924835 + ], + [ + 9.4978864, + 57.2919578 + ], + [ + 9.4988593, + 57.3820608 + ], + [ + 9.6649749, + 57.3811615 + ], + [ + 9.6687295, + 57.5605591 + ], + [ + 9.8351961, + 57.5596265 + ], + [ + 9.8374896, + 57.6493322 + ], + [ + 10.1725726, + 57.6462818 + ], + [ + 10.1754245, + 57.7367768 + ], + [ + 10.5118282, + 57.7330269 + ], + [ + 10.5152095, + 57.8228945 + ], + [ + 10.6834853, + 57.8207722 + ], + [ + 10.6751613, + 57.6412021 + ], + [ + 10.5077045, + 57.6433097 + ], + [ + 10.5039992, + 57.5535088 + ], + [ + 10.671038, + 57.5514113 + ], + [ + 10.6507805, + 57.1024538 + ], + [ + 10.4857673, + 57.1045138 + ], + [ + 10.4786236, + 56.9249051 + ], + [ + 10.3143981, + 56.9267573 + ], + [ + 10.3112341, + 56.8369269 + ], + [ + 10.4750295, + 56.83509 + ], + [ + 10.4649016, + 56.5656681 + ], + [ + 10.9524239, + 56.5589761 + ], + [ + 10.9479249, + 56.4692243 + ], + [ + 11.1099335, + 56.4664675 + ], + [ + 11.1052639, + 56.376833 + ], + [ + 10.9429901, + 56.3795284 + ], + [ + 10.9341235, + 56.1994768 + ], + [ + 10.7719685, + 56.2020244 + ], + [ + 10.7694751, + 56.1120103 + ], + [ + 10.6079695, + 56.1150259 + ], + [ + 10.4466742, + 56.116717 + ], + [ + 10.2865948, + 56.118675 + ], + [ + 10.2831527, + 56.0281851 + ], + [ + 10.4439274, + 56.0270388 + ], + [ + 10.4417713, + 55.7579243 + ], + [ + 10.4334961, + 55.6693533 + ], + [ + 10.743814, + 55.6646861 + ], + [ + 10.743814, + 55.5712253 + ], + [ + 10.8969041, + 55.5712253 + ], + [ + 10.9051793, + 55.3953852 + ], + [ + 11.0613726, + 55.3812841 + ], + [ + 11.0593038, + 55.1124061 + ], + [ + 11.0458567, + 55.0318621 + ], + [ + 11.2030844, + 55.0247474 + ], + [ + 11.2030844, + 55.117139 + ], + [ + 11.0593038, + 55.1124061 + ], + [ + 11.0613726, + 55.3812841 + ], + [ + 11.0789572, + 55.5712253 + ], + [ + 10.8969041, + 55.5712253 + ], + [ + 10.9258671, + 55.6670198 + ], + [ + 10.743814, + 55.6646861 + ], + [ + 10.7562267, + 55.7579243 + ], + [ + 10.4417713, + 55.7579243 + ], + [ + 10.4439274, + 56.0270388 + ], + [ + 10.4466742, + 56.116717 + ], + [ + 10.6079695, + 56.1150259 + ], + [ + 10.6052053, + 56.0247462 + ], + [ + 10.9258671, + 56.0201215 + ], + [ + 10.9197132, + 55.9309388 + ], + [ + 11.0802782, + 55.92792 + ], + [ + 11.0858066, + 56.0178284 + ], + [ + 11.7265047, + 56.005058 + ], + [ + 11.7319981, + 56.0952142 + ], + [ + 12.0540333, + 56.0871256 + ], + [ + 12.0608477, + 56.1762576 + ], + [ + 12.7023469, + 56.1594405 + ], + [ + 12.6611131, + 55.7114318 + ], + [ + 12.9792318, + 55.7014026 + ], + [ + 12.9612912, + 55.5217294 + ], + [ + 12.3268659, + 55.5412096 + ], + [ + 12.3206071, + 55.4513655 + ], + [ + 12.4778226, + 55.447067 + ], + [ + 12.4702432, + 55.3570479 + ], + [ + 12.6269738, + 55.3523837 + ], + [ + 12.6200898, + 55.2632576 + ], + [ + 12.4627339, + 55.26722 + ], + [ + 12.4552949, + 55.1778223 + ], + [ + 12.2987046, + 55.1822303 + ], + [ + 12.2897344, + 55.0923641 + ], + [ + 12.6048608, + 55.0832904 + ], + [ + 12.5872011, + 54.9036285 + ], + [ + 12.2766618, + 54.9119031 + ], + [ + 12.2610181, + 54.7331602 + ], + [ + 12.1070691, + 54.7378161 + ], + [ + 12.0858621, + 54.4681655 + ], + [ + 11.7794953, + 54.4753579 + ], + [ + 11.7837381, + 54.5654783 + ], + [ + 11.1658525, + 54.5782155 + ], + [ + 11.1706443, + 54.6686508 + ], + [ + 10.8617173, + 54.6733956 + ], + [ + 10.8651245, + 54.7634667 + ], + [ + 10.7713646, + 54.7643888 + ], + [ + 10.7707276, + 54.7372807 + ], + [ + 10.7551428, + 54.7375776 + ], + [ + 10.7544039, + 54.7195666 + ], + [ + 10.7389074, + 54.7197588 + ], + [ + 10.7384368, + 54.7108482 + ], + [ + 10.7074486, + 54.7113045 + ], + [ + 10.7041094, + 54.6756741 + ], + [ + 10.5510973, + 54.6781698 + ], + [ + 10.5547184, + 54.7670245 + ], + [ + 10.2423994, + 54.7705935 + ], + [ + 10.2459845, + 54.8604673 + ], + [ + 10.0902268, + 54.8622134 + ], + [ + 10.0873731, + 54.7723851 + ], + [ + 9.1555798, + 54.7769557 + ], + [ + 9.1562752, + 54.8675369 + ], + [ + 8.5321973, + 54.8663765 + ], + [ + 8.531432, + 54.95516 + ] + ], + [ + [ + 11.4577738, + 56.819554 + ], + [ + 11.7849181, + 56.8127385 + ], + [ + 11.7716715, + 56.6332796 + ], + [ + 11.4459621, + 56.6401087 + ] + ], + [ + [ + 11.3274736, + 57.3612962 + ], + [ + 11.3161808, + 57.1818004 + ], + [ + 11.1508692, + 57.1847276 + ], + [ + 11.1456628, + 57.094962 + ], + [ + 10.8157703, + 57.1001693 + ], + [ + 10.8290599, + 57.3695272 + ] + ], + [ + [ + 11.5843266, + 56.2777928 + ], + [ + 11.5782882, + 56.1880397 + ], + [ + 11.7392309, + 56.1845765 + ], + [ + 11.7456428, + 56.2743186 + ] + ], + [ + [ + 14.6825922, + 55.3639405 + ], + [ + 14.8395247, + 55.3565231 + ], + [ + 14.8263755, + 55.2671261 + ], + [ + 15.1393406, + 55.2517359 + ], + [ + 15.1532015, + 55.3410836 + ], + [ + 15.309925, + 55.3330556 + ], + [ + 15.295719, + 55.2437356 + ], + [ + 15.1393406, + 55.2517359 + ], + [ + 15.1255631, + 55.1623802 + ], + [ + 15.2815819, + 55.1544167 + ], + [ + 15.2535578, + 54.9757646 + ], + [ + 14.6317464, + 55.0062496 + ] + ] + ], + "terms_url": "http://wiki.openstreetmap.org/wiki/Vejmidte", + "terms_text": "Danish municipalities" + }, + { + "name": "Vienna: Beschriftungen (annotations)", + "type": "tms", + "template": "http://www.wien.gv.at/wmts/beschriftung/normal/google3857/{zoom}/{y}/{x}.png", + "scaleExtent": [ + 0, + 19 + ], + "polygon": [ + [ + [ + 16.17, + 48.1 + ], + [ + 16.17, + 48.33 + ], + [ + 16.58, + 48.33 + ], + [ + 16.58, + 48.1 + ], + [ + 16.17, + 48.1 + ] + ] + ], + "terms_url": "http://data.wien.gv.at/", + "terms_text": "Stadt Wien" + }, + { + "name": "Vienna: Mehrzweckkarte (general purpose)", + "type": "tms", + "template": "http://www.wien.gv.at/wmts/fmzk/pastell/google3857/{zoom}/{y}/{x}.jpeg", + "scaleExtent": [ + 0, + 19 + ], + "polygon": [ + [ + [ + 16.17, + 48.1 + ], + [ + 16.17, + 48.33 + ], + [ + 16.58, + 48.33 + ], + [ + 16.58, + 48.1 + ], + [ + 16.17, + 48.1 + ] + ] + ], + "terms_url": "http://data.wien.gv.at/", + "terms_text": "Stadt Wien" + }, + { + "name": "Vienna: Orthofoto (aerial image)", + "type": "tms", + "template": "http://www.wien.gv.at/wmts/lb/farbe/google3857/{zoom}/{y}/{x}.jpeg", + "scaleExtent": [ + 0, + 19 + ], + "polygon": [ + [ + [ + 16.17, + 48.1 + ], + [ + 16.17, + 48.33 + ], + [ + 16.58, + 48.33 + ], + [ + 16.58, + 48.1 + ], + [ + 16.17, + 48.1 + ] + ] + ], + "terms_url": "http://data.wien.gv.at/", + "terms_text": "Stadt Wien" + } + ], + "wikipedia": [ + [ + "English", + "English", + "en" + ], + [ + "German", + "Deutsch", + "de" + ], + [ + "Dutch", + "Nederlands", + "nl" + ], + [ + "French", + "Français", + "fr" + ], + [ + "Italian", + "Italiano", + "it" + ], + [ + "Russian", + "Ð ÑÑÑкий", + "ru" + ], + [ + "Spanish", + "Español", + "es" + ], + [ + "Polish", "Polski", "pl" ], @@ -31403,6 +56550,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "addr:housenumber": "*" }, + "addTags": {}, "matchScore": 0.2, "name": "Address" }, @@ -31564,6 +56712,25 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Amenity" }, + "amenity/arts_centre": { + "name": "Arts Center", + "geometry": [ + "point", + "area" + ], + "terms": [ + "arts", + "arts centre" + ], + "tags": { + "amenity": "arts_centre" + }, + "icon": "theatre", + "fields": [ + "building_area", + "address" + ] + }, "amenity/atm": { "icon": "bank", "fields": [ @@ -31644,6 +56811,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "amenity": "bench" }, + "fields": [ + "backrest" + ], "name": "Bench" }, "amenity/bicycle_parking": { @@ -31680,6 +56850,19 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Bicycle Rental" }, + "amenity/boat_rental": { + "geometry": [ + "point", + "area" + ], + "tags": { + "amenity": "boat_rental" + }, + "fields": [ + "operator" + ], + "name": "Boat Rental" + }, "amenity/cafe": { "icon": "cafe", "fields": [ @@ -31704,6 +56887,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Cafe" }, "amenity/car_rental": { + "icon": "car", "geometry": [ "point", "area" @@ -31717,6 +56901,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Car Rental" }, "amenity/car_sharing": { + "icon": "car", "geometry": [ "point", "area" @@ -31918,6 +57103,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "vertex", "area" ], + "terms": [ + "petrol", + "fuel", + "propane", + "diesel", + "lng", + "cng", + "biodiesel" + ], "tags": { "amenity": "fuel" }, @@ -32041,7 +57235,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "amenity": "parking" }, "terms": [], - "name": "Parking" + "name": "Car Parking" }, "amenity/pharmacy": { "icon": "pharmacy", @@ -32321,6 +57515,31 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "terms": [], "name": "Pub" }, + "amenity/ranger_station": { + "fields": [ + "building_area", + "opening_hours", + "operator", + "phone" + ], + "geometry": [ + "point", + "area" + ], + "terms": [ + "visitor center", + "visitor centre", + "permit center", + "permit centre", + "backcountry office", + "warden office", + "warden center" + ], + "tags": { + "amenity": "ranger_station" + }, + "name": "Ranger Station" + }, "amenity/restaurant": { "icon": "restaurant", "fields": [ @@ -32349,6 +57568,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "eating house", "eating place", "fast-food place", + "fish and chips", "greasy spoon", "grill", "hamburger stand", @@ -32406,6 +57626,23 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "School" }, + "amenity/shelter": { + "fields": [ + "shelter_type" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "amenity": "shelter" + }, + "terms": [ + "lean-to" + ], + "name": "Shelter" + }, "amenity/swimming_pool": { "geometry": [ "point", @@ -32472,8 +57709,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "amenity/toilets": { "fields": [ + "toilets/disposal", "operator", - "building_area" + "building_area", + "access_toilets" ], "geometry": [ "point", @@ -32482,7 +57721,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "terms": [ "bathroom", - "restroom" + "restroom", + "outhouse", + "privy", + "head", + "lavatory", + "latrine", + "water closet", + "WC", + "W.C." ], "tags": { "amenity": "toilets" @@ -32506,7 +57753,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "city government", "courthouse", "municipal building", - "municipal center" + "municipal center", + "municipal centre" ], "tags": { "amenity": "townhall" @@ -32532,6 +57780,19 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "name": "University" }, + "amenity/vending_machine": { + "fields": [ + "vending", + "operator" + ], + "geometry": [ + "point" + ], + "tags": { + "amenity": "vending_machine" + }, + "name": "Vending Machine" + }, "amenity/waste_basket": { "icon": "waste-basket", "geometry": [ @@ -32556,7 +57817,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "geometry": [ "area" - ] + ], + "matchScore": 0.1 }, "barrier": { "geometry": [ @@ -32642,13 +57904,15 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Ditch" }, "barrier/entrance": { + "icon": "entrance", "geometry": [ "vertex" ], "tags": { "barrier": "entrance" }, - "name": "Entrance" + "name": "Entrance", + "searchable": false }, "barrier/fence": { "geometry": [ @@ -32812,6 +58076,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Commercial Building" }, "building/entrance": { + "icon": "entrance", "geometry": [ "vertex" ], @@ -32830,7 +58095,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "building": "garage" }, - "name": "Garage" + "name": "Garage", + "icon": "warehouse" }, "building/house": { "icon": "building", @@ -32932,6 +58198,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Emergency Phone" }, "entrance": { + "icon": "entrance", "geometry": [ "vertex" ], @@ -32939,10 +58206,44 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "entrance": "*" }, "fields": [ - "entrance" + "entrance", + "address" ], "name": "Entrance" }, + "footway/crossing": { + "fields": [ + "crossing" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "footway", + "footway": "crossing" + }, + "terms": [ + "crosswalk", + "zebra crossing" + ], + "name": "Crossing" + }, + "footway/sidewalk": { + "fields": [ + "surface", + "lit", + "access" + ], + "geometry": [ + "line" + ], + "tags": { + "highway": "footway", + "footway": "sidewalk" + }, + "terms": [], + "name": "Sidewalk" + }, "highway": { "fields": [ "highway" @@ -33015,10 +58316,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "highway/cycleway": { "icon": "highway-cycleway", "fields": [ - "oneway", + "surface", + "lit", "structure", "access", - "surface" + "oneway" ], "geometry": [ "line" @@ -33075,9 +58377,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-living-street", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33104,10 +58406,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-motorway", "fields": [ "oneway", + "maxspeed", "structure", "access", "lanes", - "maxspeed", "surface", "ref" ], @@ -33136,9 +58438,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-motorway-link", "fields": [ "oneway_yes", + "maxspeed", "structure", "access", - "maxspeed", "surface", "ref" ], @@ -33195,10 +58497,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-primary", "fields": [ "oneway", + "maxspeed", "structure", "access", "lanes", - "maxspeed", "surface", "ref" ], @@ -33215,9 +58517,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-primary-link", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface", "ref" ], @@ -33238,9 +58540,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-residential", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33256,9 +58558,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-road", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33274,10 +58576,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-secondary", "fields": [ "oneway", + "maxspeed", "structure", "access", "lanes", - "maxspeed", "surface", "ref" ], @@ -33294,9 +58596,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-secondary-link", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface", "ref" ], @@ -33318,9 +58620,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "fields": [ "service", "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33430,14 +58732,26 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "name": "Steps" }, + "highway/stop": { + "geometry": [ + "vertex" + ], + "tags": { + "highway": "stop" + }, + "terms": [ + "stop sign" + ], + "name": "Stop Sign" + }, "highway/tertiary": { "icon": "highway-tertiary", "fields": [ "oneway", + "maxspeed", "structure", "access", "lanes", - "maxspeed", "surface", "ref" ], @@ -33454,9 +58768,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-tertiary-link", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface", "ref" ], @@ -33478,9 +58792,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "fields": [ "tracktype", "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33510,10 +58824,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-trunk", "fields": [ "oneway", + "maxspeed", "structure", "access", "lanes", - "maxspeed", "surface", "ref" ], @@ -33530,9 +58844,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-trunk-link", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface", "ref" ], @@ -33564,9 +58878,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "highway-unclassified", "fields": [ "oneway", + "maxspeed", "structure", "access", - "maxspeed", "surface" ], "geometry": [ @@ -33776,7 +59090,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "landuse": "farmyard" }, "terms": [], - "name": "Farmyard" + "name": "Farmyard", + "icon": "farm" }, "landuse/forest": { "fields": [ @@ -33897,6 +59212,19 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Leisure" }, + "leisure/common": { + "geometry": [ + "point", + "area" + ], + "terms": [ + "open space" + ], + "tags": { + "leisure": "common" + }, + "name": "Common" + }, "leisure/dog_park": { "geometry": [ "point", @@ -33906,7 +59234,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "leisure": "dog_park" }, - "name": "Dog Park" + "name": "Dog Park", + "icon": "dog-park" }, "leisure/garden": { "icon": "garden", @@ -34042,6 +59371,22 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "terms": [], "name": "Basketball Court" }, + "leisure/pitch/skateboard": { + "icon": "pitch", + "fields": [ + "surface" + ], + "geometry": [ + "point", + "area" + ], + "tags": { + "leisure": "pitch", + "sport": "skateboard" + }, + "terms": [], + "name": "Skate Park" + }, "leisure/pitch/soccer": { "icon": "soccer", "fields": [ @@ -34091,6 +59436,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Volleyball Court" }, "leisure/playground": { + "icon": "playground", "geometry": [ "point", "area" @@ -34114,6 +59460,20 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Slipway" }, + "leisure/sports_center": { + "geometry": [ + "point", + "area" + ], + "tags": { + "leisure": "sports_centre" + }, + "terms": [ + "gym" + ], + "icon": "sports", + "name": "Sports Center" + }, "leisure/stadium": { "geometry": [ "point", @@ -34159,7 +59519,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": {}, "geometry": [ "line" - ] + ], + "matchScore": 0.1 }, "man_made": { "fields": [ @@ -34203,7 +59564,23 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "man_made": "lighthouse" }, - "name": "Lighthouse" + "name": "Lighthouse", + "icon": "lighthouse" + }, + "man_made/observation": { + "geometry": [ + "point", + "area" + ], + "terms": [ + "lookout tower", + "fire tower" + ], + "tags": { + "man_made": "tower", + "tower:type": "observation" + }, + "name": "Observation Tower" }, "man_made/pier": { "geometry": [ @@ -34369,6 +59746,16 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Coastline" }, + "natural/fell": { + "geometry": [ + "area" + ], + "terms": [], + "tags": { + "natural": "fell" + }, + "name": "Fell" + }, "natural/glacier": { "geometry": [ "area" @@ -34429,6 +59816,18 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ], "name": "Peak" }, + "natural/scree": { + "geometry": [ + "area" + ], + "tags": { + "natural": "scree" + }, + "terms": [ + "loose rocks" + ], + "name": "Scree" + }, "natural/scrub": { "geometry": [ "area" @@ -34452,6 +59851,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "natural/tree": { "fields": [ + "tree_type", "denotation" ], "icon": "park", @@ -34571,6 +59971,347 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "terms": [], "name": "Office" }, + "office/accountant": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "accountant" + }, + "terms": [], + "name": "Accountant" + }, + "office/administrative": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "administrative" + }, + "terms": [], + "name": "Administrative Office" + }, + "office/architect": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "architect" + }, + "terms": [], + "name": "Architect" + }, + "office/company": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "company" + }, + "terms": [], + "name": "Company Office" + }, + "office/educational_institution": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "educational_institution" + }, + "terms": [], + "name": "Educational Institution" + }, + "office/employment_agency": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "employment_agency" + }, + "terms": [], + "name": "Employment Agency" + }, + "office/estate_agent": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "estate_agent" + }, + "terms": [], + "name": "Real Estate Office" + }, + "office/financial": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "financial" + }, + "terms": [], + "name": "Financial Office" + }, + "office/government": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "government" + }, + "terms": [], + "name": "Government Office" + }, + "office/insurance": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "insurance" + }, + "terms": [], + "name": "Insurance Office" + }, + "office/it": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "it" + }, + "terms": [], + "name": "IT Office" + }, + "office/lawyer": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "lawyer" + }, + "terms": [], + "name": "Law Office" + }, + "office/newspaper": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "newspaper" + }, + "terms": [], + "name": "Newspaper" + }, + "office/ngo": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "ngo" + }, + "terms": [], + "name": "NGO Office" + }, + "office/physician": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "physician" + }, + "terms": [], + "name": "Physician" + }, + "office/political_party": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "political_party" + }, + "terms": [], + "name": "Political Party" + }, + "office/research": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "research" + }, + "terms": [], + "name": "Research Office" + }, + "office/telecommunication": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "telecommunication" + }, + "terms": [], + "name": "Telecom Office" + }, + "office/therapist": { + "icon": "commercial", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "therapist" + }, + "terms": [], + "name": "Therapist" + }, + "office/travel_agent": { + "icon": "suitcase", + "fields": [ + "address", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "office": "travel_agent" + }, + "terms": [], + "name": "Travel Agency", + "searchable": false + }, "place": { "fields": [ "place" @@ -34675,7 +60416,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": {}, "geometry": [ "point" - ] + ], + "matchScore": 0.1 }, "power": { "geometry": [ @@ -34718,6 +60460,16 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Power Line", "icon": "power-line" }, + "power/minor_line": { + "geometry": [ + "line" + ], + "tags": { + "power": "minor_line" + }, + "name": "Minor Power Line", + "icon": "power-line" + }, "power/pole": { "geometry": [ "vertex" @@ -34804,6 +60556,24 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "terms": [], "name": "Disused Railway" }, + "railway/halt": { + "icon": "rail", + "geometry": [ + "point", + "vertex" + ], + "tags": { + "railway": "halt" + }, + "name": "Railway Halt", + "terms": [ + "break", + "interrupt", + "rest", + "wait", + "interruption" + ] + }, "railway/level_crossing": { "icon": "cross", "geometry": [ @@ -34872,6 +60642,10 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "railway": "station" }, + "terms": [ + "train station", + "station" + ], "name": "Railway Station" }, "railway/subway": { @@ -34889,7 +60663,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Subway" }, "railway/subway_entrance": { - "icon": "rail-underground", + "icon": "rail-metro", "geometry": [ "point" ], @@ -34975,7 +60749,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Liquor Store" }, "shop/bakery": { - "icon": "shop", + "icon": "bakery", "fields": [ "address", "building_area", @@ -35003,6 +60777,12 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "vertex", "area" ], + "terms": [ + "nail spa", + "spa", + "salon", + "tanning" + ], "tags": { "shop": "beauty" }, @@ -35094,10 +60874,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Butcher" }, "shop/car": { - "icon": "shop", + "icon": "car", "fields": [ "address", - "building_area", "opening_hours" ], "geometry": [ @@ -35162,7 +60941,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Chemist" }, "shop/clothes": { - "icon": "shop", + "icon": "clothing-store", "fields": [ "address", "building_area", @@ -35398,6 +61177,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "vertex", "area" ], + "terms": [ + "garden centre" + ], "tags": { "shop": "garden_centre" }, @@ -35523,7 +61305,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Kiosk" }, "shop/laundry": { - "icon": "shop", + "icon": "laundry", "fields": [ "address", "building_area", @@ -35539,6 +61321,26 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Laundry" }, + "shop/locksmith": { + "icon": "shop", + "fields": [ + "address", + "building_area", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "terms": [ + "keys" + ], + "tags": { + "shop": "locksmith" + }, + "name": "Locksmith" + }, "shop/mall": { "icon": "shop", "fields": [ @@ -35659,7 +61461,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Outdoor Store" }, "shop/pet": { - "icon": "shop", + "icon": "dog-park", "fields": [ "address", "building_area", @@ -35675,6 +61477,23 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "name": "Pet Store" }, + "shop/photo": { + "icon": "camera", + "fields": [ + "address", + "building_area", + "opening_hours" + ], + "geometry": [ + "point", + "vertex", + "area" + ], + "tags": { + "shop": "photo" + }, + "name": "Photography Store" + }, "shop/shoes": { "icon": "shop", "fields": [ @@ -35748,12 +61567,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "five-and-dime", "flea market", "galleria", + "grocery store", "mall", "mart", "outlet", "outlet store", "shop", "shopping center", + "shopping centre", "shopping plaza", "stand", "store", @@ -35783,7 +61604,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "name": "Toy Store" }, "shop/travel_agency": { - "icon": "shop", + "icon": "suitcase", "fields": [ "address", "building_area", @@ -35911,6 +61732,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": { "tourism": "artwork" }, + "terms": [ + "mural", + "sculpture", + "statue" + ], "name": "Artwork" }, "tourism/attraction": { @@ -35940,7 +61766,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "vertex", "area" ], - "terms": [], + "terms": [ + "camping" + ], "tags": { "tourism": "camp_site" }, @@ -36302,6 +62130,22 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "network" ] }, + "type/route/hiking": { + "geometry": [ + "relation" + ], + "tags": { + "type": "route", + "route": "hiking" + }, + "name": "Hiking Route", + "icon": "route-foot", + "fields": [ + "ref", + "operator", + "network" + ] + }, "type/route/pipeline": { "geometry": [ "relation" @@ -36397,7 +62241,8 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "tags": {}, "geometry": [ "vertex" - ] + ], + "matchScore": 0.1 }, "waterway": { "fields": [ @@ -36547,9 +62392,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "defaults": { "area": [ "category-landuse", - "building", + "category-building", + "category-water-area", "leisure/park", - "natural/water", "amenity/hospital", "amenity/place_of_worship", "amenity/cafe", @@ -36560,7 +62405,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "category-road", "category-rail", "category-path", - "category-water", + "category-water-line", "power/line", "line" ], @@ -36593,6 +62438,19 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ] }, "categories": { + "category-building": { + "geometry": "area", + "name": "Building", + "icon": "building", + "members": [ + "building/house", + "building/apartments", + "building/commercial", + "building/industrial", + "building/residential", + "building" + ] + }, "category-landuse": { "geometry": "area", "name": "Land Use", @@ -36662,8 +62520,9 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "icon": "route", "members": [ "type/route/road", - "type/route/foot", "type/route/bicycle", + "type/route/foot", + "type/route/hiking", "type/route/bus", "type/route/train", "type/route/tram", @@ -36675,7 +62534,18 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "type/route" ] }, - "category-water": { + "category-water-area": { + "geometry": "area", + "name": "Water", + "icon": "water", + "members": [ + "natural/water/lake", + "natural/water/pond", + "natural/water/reservoir", + "natural/water" + ] + }, + "category-water-line": { "geometry": "line", "name": "Water", "icon": "category-water", @@ -36735,6 +62605,17 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," } } }, + "access_toilets": { + "key": "access", + "type": "combo", + "label": "Access", + "options": [ + "public", + "permissive", + "private", + "customers" + ] + }, "address": { "type": "address", "keys": [ @@ -36764,12 +62645,12 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "aeroway": { "key": "aeroway", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "amenity": { "key": "amenity", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "artist": { @@ -36787,9 +62668,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "type": "check", "label": "ATM" }, + "backrest": { + "key": "backrest", + "type": "check", + "label": "Backrest" + }, "barrier": { "key": "barrier", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "bicycle_parking": { @@ -36804,7 +62690,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "building": { "key": "building", - "type": "combo", + "type": "typeCombo", "label": "Building" }, "building_area": { @@ -36918,7 +62804,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "entrance": { "key": "entrance", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "fax": { @@ -36965,12 +62851,12 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "highway": { "key": "highway", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "historic": { "key": "historic", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "iata": { @@ -37011,7 +62897,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "landuse": { "key": "landuse", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "lanes": { @@ -37027,7 +62913,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "leisure": { "key": "leisure", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "levels": { @@ -37036,6 +62922,11 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "label": "Levels", "placeholder": "2, 4, 6..." }, + "lit": { + "key": "lit", + "type": "check", + "label": "Lit" + }, "location": { "key": "location", "type": "combo", @@ -37043,7 +62934,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "man_made": { "key": "man_made", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "maxspeed": { @@ -37060,7 +62951,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "natural": { "key": "natural", - "type": "combo", + "type": "typeCombo", "label": "Natural" }, "network": { @@ -37077,7 +62968,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "office": { "key": "office", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "oneway": { @@ -37130,17 +63021,17 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "place": { "key": "place", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "power": { "key": "power", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "railway": { "key": "railway", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "ref": { @@ -37215,9 +63106,23 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "type": "check", "label": "Shelter" }, + "shelter_type": { + "key": "shelter_type", + "type": "combo", + "options": [ + "public_transport", + "picnic_shelter", + "weather_shelter", + "lean_to", + "basic_hut", + "field_shelter", + "rock_shelter" + ], + "label": "Type" + }, "shop": { "key": "shop", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "source": { @@ -37261,9 +63166,14 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "type": "combo", "label": "Surface" }, + "toilets/disposal": { + "key": "toilets:disposal", + "type": "combo", + "label": "Disposal" + }, "tourism": { "key": "tourism", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "towertype": { @@ -37281,6 +63191,21 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," "type": "combo", "label": "Trail Visibility" }, + "tree_type": { + "key": "type", + "type": "combo", + "options": [ + "broad_leaved", + "conifer", + "palm" + ], + "label": "Type" + }, + "vending": { + "key": "vending", + "type": "combo", + "label": "Type of Goods" + }, "water": { "key": "water", "type": "combo", @@ -37288,7 +63213,7 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," }, "waterway": { "key": "waterway", - "type": "combo", + "type": "typeCombo", "label": "Type" }, "website": { @@ -47202,1310 +73127,1548 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," ] }, "featureIcons": { - "airfield": { + "circle-stroked": { + "12": [ + 42, + 0 + ], + "18": [ + 24, + 0 + ], + "24": [ + 0, + 0 + ] + }, + "circle": { + "12": [ + 96, + 0 + ], + "18": [ + 78, + 0 + ], + "24": [ + 54, + 0 + ] + }, + "square-stroked": { + "12": [ + 150, + 0 + ], + "18": [ + 132, + 0 + ], + "24": [ + 108, + 0 + ] + }, + "square": { + "12": [ + 204, + 0 + ], + "18": [ + 186, + 0 + ], + "24": [ + 162, + 0 + ] + }, + "triangle-stroked": { + "12": [ + 258, + 0 + ], + "18": [ + 240, + 0 + ], + "24": [ + 216, + 0 + ] + }, + "triangle": { + "12": [ + 42, + 24 + ], + "18": [ + 24, + 24 + ], + "24": [ + 0, + 24 + ] + }, + "star-stroked": { + "12": [ + 96, + 24 + ], + "18": [ + 78, + 24 + ], + "24": [ + 54, + 24 + ] + }, + "star": { "12": [ - 0, - 0 + 150, + 24 ], "18": [ - 0, - 14 + 132, + 24 ], "24": [ - 0, - 34 + 108, + 24 ] }, - "airport": { + "cross": { "12": [ - 0, - 60 + 204, + 24 ], "18": [ - 0, - 74 + 186, + 24 ], "24": [ - 0, - 94 + 162, + 24 ] }, - "alcohol-shop": { + "marker-stroked": { "12": [ - 0, - 120 + 258, + 24 ], "18": [ - 0, - 134 + 240, + 24 ], "24": [ - 0, - 154 + 216, + 24 ] }, - "america-football": { + "marker": { "12": [ - 0, - 180 + 42, + 48 ], "18": [ - 0, - 194 + 24, + 48 ], "24": [ 0, - 214 + 48 ] }, - "art-gallery": { + "religious-jewish": { "12": [ - 0, - 240 + 96, + 48 ], "18": [ - 0, - 254 + 78, + 48 ], "24": [ - 0, - 274 + 54, + 48 ] }, - "bank": { + "religious-christian": { "12": [ - 0, - 300 + 150, + 48 ], "18": [ - 0, - 314 + 132, + 48 ], "24": [ - 0, - 334 + 108, + 48 ] }, - "bar": { + "religious-muslim": { "12": [ - 0, - 360 + 204, + 48 ], "18": [ - 0, - 374 + 186, + 48 ], "24": [ - 0, - 394 + 162, + 48 ] }, - "baseball": { + "cemetery": { "12": [ - 0, - 420 + 258, + 48 ], "18": [ - 0, - 434 + 240, + 48 ], "24": [ - 0, - 454 + 216, + 48 ] }, - "basketball": { + "rocket": { "12": [ - 0, - 480 + 42, + 72 ], "18": [ - 0, - 494 + 24, + 72 ], "24": [ 0, - 514 + 72 ] }, - "beer": { + "airport": { "12": [ - 0, - 540 + 96, + 72 ], "18": [ - 0, - 554 + 78, + 72 ], "24": [ - 0, - 574 + 54, + 72 ] }, - "bicycle": { + "heliport": { "12": [ - 0, - 600 + 150, + 72 ], "18": [ - 0, - 614 + 132, + 72 ], "24": [ - 0, - 634 + 108, + 72 ] }, - "building": { + "rail": { "12": [ - 0, - 660 + 204, + 72 ], "18": [ - 0, - 674 + 186, + 72 + ], + "24": [ + 162, + 72 + ] + }, + "rail-metro": { + "12": [ + 258, + 72 + ], + "18": [ + 240, + 72 + ], + "24": [ + 216, + 72 + ] + }, + "rail-light": { + "12": [ + 42, + 96 + ], + "18": [ + 24, + 96 ], "24": [ 0, - 694 + 96 ] }, "bus": { "12": [ - 0, - 720 + 96, + 96 ], "18": [ - 0, - 734 + 78, + 96 ], "24": [ - 0, - 754 + 54, + 96 ] }, - "cafe": { + "fuel": { "12": [ - 0, - 780 + 150, + 96 ], "18": [ - 0, - 794 + 132, + 96 ], "24": [ - 0, - 814 + 108, + 96 ] }, - "campsite": { + "parking": { "12": [ - 0, - 840 + 204, + 96 ], "18": [ - 0, - 854 + 186, + 96 ], "24": [ - 0, - 874 + 162, + 96 ] }, - "cemetery": { + "parking-garage": { "12": [ - 0, - 900 + 258, + 96 ], "18": [ - 0, - 914 + 240, + 96 ], "24": [ - 0, - 934 + 216, + 96 ] }, - "cinema": { + "airfield": { "12": [ - 0, - 960 + 42, + 120 ], "18": [ - 0, - 974 + 24, + 120 ], "24": [ 0, - 994 + 120 ] }, - "circle": { + "roadblock": { "12": [ - 0, - 1020 + 96, + 120 ], "18": [ - 0, - 1034 + 78, + 120 ], "24": [ - 0, - 1054 + 54, + 120 ] }, - "circle-stroked": { + "ferry": { "12": [ - 0, - 1080 + 150, + 120 ], "18": [ - 0, - 1094 + 132, + 120 ], "24": [ - 0, - 1114 + 108, + 120 + ], + "line": [ + 2240, + 25 ] }, - "city": { + "harbor": { "12": [ - 0, - 1140 + 204, + 120 ], "18": [ - 0, - 1154 + 186, + 120 ], "24": [ - 0, - 1174 + 162, + 120 ] }, - "college": { + "bicycle": { "12": [ - 0, - 1200 + 258, + 120 ], "18": [ - 0, - 1214 + 240, + 120 ], "24": [ - 0, - 1234 + 216, + 120 ] }, - "commercial": { + "park": { "12": [ - 0, - 1260 + 42, + 144 ], "18": [ - 0, - 1274 + 24, + 144 ], "24": [ 0, - 1294 + 144 ] }, - "cricket": { + "park2": { "12": [ - 0, - 1320 + 96, + 144 ], "18": [ - 0, - 1334 + 78, + 144 ], "24": [ - 0, - 1354 + 54, + 144 ] }, - "cross": { + "museum": { "12": [ - 0, - 1380 + 150, + 144 ], "18": [ - 0, - 1394 + 132, + 144 ], "24": [ - 0, - 1414 + 108, + 144 ] }, - "dam": { + "lodging": { "12": [ - 0, - 1440 + 204, + 144 ], "18": [ - 0, - 1454 + 186, + 144 ], "24": [ - 0, - 1474 + 162, + 144 ] }, - "danger": { + "monument": { "12": [ - 0, - 1500 + 258, + 144 ], "18": [ - 0, - 1514 + 240, + 144 ], "24": [ - 0, - 1534 + 216, + 144 ] }, - "disability": { + "zoo": { "12": [ - 0, - 1560 + 42, + 168 ], "18": [ - 0, - 1574 + 24, + 168 ], "24": [ 0, - 1594 + 168 ] }, - "embassy": { + "garden": { "12": [ - 0, - 1620 + 96, + 168 ], "18": [ - 0, - 1634 + 78, + 168 ], "24": [ - 0, - 1654 + 54, + 168 ] }, - "emergency-telephone": { + "campsite": { "12": [ - 0, - 1680 + 150, + 168 ], "18": [ - 0, - 1694 + 132, + 168 ], "24": [ - 0, - 1714 + 108, + 168 ] }, - "farm": { + "theatre": { "12": [ - 0, - 1740 + 204, + 168 ], "18": [ - 0, - 1754 + 186, + 168 ], "24": [ - 0, - 1774 + 162, + 168 ] }, - "fast-food": { + "art-gallery": { "12": [ - 0, - 1800 + 258, + 168 ], "18": [ - 0, - 1814 + 240, + 168 ], "24": [ - 0, - 1834 + 216, + 168 ] }, - "ferry": { + "pitch": { "12": [ - 0, - 1860 + 42, + 192 ], "18": [ - 0, - 1874 + 24, + 192 ], "24": [ 0, - 1894 + 192 + ] + }, + "soccer": { + "12": [ + 96, + 192 ], - "line": [ - 2240, - 25 + "18": [ + 78, + 192 + ], + "24": [ + 54, + 192 ] }, - "fire-station": { + "america-football": { "12": [ - 0, - 1920 + 150, + 192 ], "18": [ - 0, - 1934 + 132, + 192 ], "24": [ - 0, - 1954 + 108, + 192 ] }, - "fuel": { + "tennis": { "12": [ - 0, - 1980 + 204, + 192 ], "18": [ - 0, - 1994 + 186, + 192 ], "24": [ - 0, - 2014 + 162, + 192 ] }, - "garden": { + "basketball": { "12": [ - 0, - 2040 + 258, + 192 ], "18": [ - 0, - 2054 + 240, + 192 ], "24": [ - 0, - 2074 + 216, + 192 ] }, - "golf": { + "baseball": { "12": [ - 0, - 2100 + 42, + 216 ], "18": [ - 0, - 2114 + 24, + 216 ], "24": [ 0, - 2134 + 216 ] }, - "grocery": { + "golf": { "12": [ - 0, - 2160 + 96, + 216 ], "18": [ - 0, - 2174 + 78, + 216 ], "24": [ - 0, - 2194 + 54, + 216 ] }, - "harbor": { + "swimming": { "12": [ - 0, - 2220 + 150, + 216 ], "18": [ - 0, - 2234 + 132, + 216 ], "24": [ - 0, - 2254 + 108, + 216 ] }, - "heliport": { + "cricket": { "12": [ - 0, - 2280 + 204, + 216 ], "18": [ - 0, - 2294 + 186, + 216 ], "24": [ - 0, - 2314 + 162, + 216 ] }, - "hospital": { + "skiing": { "12": [ - 0, - 2340 + 258, + 216 ], "18": [ - 0, - 2354 + 240, + 216 ], "24": [ - 0, - 2374 + 216, + 216 ] }, - "industrial": { + "school": { "12": [ - 0, - 2400 + 42, + 240 ], "18": [ - 0, - 2414 + 24, + 240 ], "24": [ 0, - 2434 + 240 ] }, - "land-use": { + "college": { "12": [ - 0, - 2460 + 96, + 240 ], "18": [ - 0, - 2474 + 78, + 240 ], "24": [ - 0, - 2494 + 54, + 240 ] }, "library": { "12": [ - 0, - 2520 + 150, + 240 ], "18": [ - 0, - 2534 + 132, + 240 ], "24": [ - 0, - 2554 + 108, + 240 ] }, - "lodging": { + "post": { "12": [ - 0, - 2580 + 204, + 240 ], "18": [ - 0, - 2594 + 186, + 240 ], "24": [ - 0, - 2614 + 162, + 240 ] }, - "logging": { + "fire-station": { "12": [ - 0, - 2640 + 258, + 240 ], "18": [ - 0, - 2654 + 240, + 240 ], "24": [ - 0, - 2674 + 216, + 240 ] }, - "marker": { + "town-hall": { "12": [ - 0, - 2700 + 42, + 264 ], "18": [ - 0, - 2714 + 24, + 264 ], "24": [ 0, - 2734 + 264 ] }, - "marker-stroked": { + "police": { "12": [ - 0, - 2760 + 96, + 264 ], "18": [ - 0, - 2774 + 78, + 264 ], "24": [ - 0, - 2794 + 54, + 264 ] }, - "monument": { + "prison": { "12": [ - 0, - 2820 + 150, + 264 ], "18": [ - 0, - 2834 + 132, + 264 ], "24": [ - 0, - 2854 + 108, + 264 ] }, - "museum": { + "embassy": { "12": [ - 0, - 2880 + 204, + 264 ], "18": [ - 0, - 2894 + 186, + 264 ], "24": [ - 0, - 2914 + 162, + 264 ] }, - "music": { + "beer": { "12": [ - 0, - 2940 + 258, + 264 ], "18": [ - 0, - 2954 + 240, + 264 ], "24": [ - 0, - 2974 + 216, + 264 ] }, - "oil-well": { + "restaurant": { "12": [ - 0, - 3000 + 42, + 288 ], "18": [ - 0, - 3014 + 24, + 288 ], "24": [ 0, - 3034 + 288 ] }, - "park": { + "cafe": { "12": [ - 0, - 3060 + 96, + 288 ], "18": [ - 0, - 3074 + 78, + 288 ], "24": [ - 0, - 3094 + 54, + 288 ] }, - "park2": { + "shop": { "12": [ - 0, - 3120 + 150, + 288 ], "18": [ - 0, - 3134 + 132, + 288 ], "24": [ - 0, - 3154 + 108, + 288 ] }, - "parking": { + "fast-food": { "12": [ - 0, - 3180 + 204, + 288 ], "18": [ - 0, - 3194 + 186, + 288 ], "24": [ - 0, - 3214 + 162, + 288 ] }, - "parking-garage": { + "bar": { "12": [ - 0, - 3240 + 258, + 288 ], "18": [ - 0, - 3254 + 240, + 288 + ], + "24": [ + 216, + 288 + ] + }, + "bank": { + "12": [ + 42, + 312 + ], + "18": [ + 24, + 312 ], "24": [ 0, - 3274 + 312 + ] + }, + "grocery": { + "12": [ + 96, + 312 + ], + "18": [ + 78, + 312 + ], + "24": [ + 54, + 312 + ] + }, + "cinema": { + "12": [ + 150, + 312 + ], + "18": [ + 132, + 312 + ], + "24": [ + 108, + 312 ] }, "pharmacy": { "12": [ - 0, - 3300 + 204, + 312 ], "18": [ - 0, - 3314 + 186, + 312 ], "24": [ - 0, - 3334 + 162, + 312 ] }, - "pitch": { + "hospital": { "12": [ - 0, - 3360 + 258, + 312 ], "18": [ - 0, - 3374 + 240, + 312 ], "24": [ - 0, - 3394 + 216, + 312 ] }, - "place-of-worship": { + "danger": { "12": [ - 0, - 3420 + 42, + 336 ], "18": [ - 0, - 3434 + 24, + 336 ], "24": [ 0, - 3454 + 336 ] }, - "police": { + "industrial": { "12": [ - 0, - 3480 + 96, + 336 ], "18": [ - 0, - 3494 + 78, + 336 ], "24": [ - 0, - 3514 + 54, + 336 ] }, - "post": { + "warehouse": { "12": [ - 0, - 3540 + 150, + 336 ], "18": [ - 0, - 3554 + 132, + 336 ], "24": [ - 0, - 3574 + 108, + 336 ] }, - "prison": { + "commercial": { "12": [ - 0, - 3600 + 204, + 336 ], "18": [ - 0, - 3614 + 186, + 336 ], "24": [ - 0, - 3634 + 162, + 336 ] }, - "rail": { + "building": { "12": [ - 0, - 3660 + 258, + 336 ], "18": [ - 0, - 3674 + 240, + 336 ], "24": [ - 0, - 3694 + 216, + 336 ] }, - "rail-above": { + "place-of-worship": { "12": [ - 0, - 3720 + 42, + 360 ], "18": [ - 0, - 3734 + 24, + 360 ], "24": [ 0, - 3754 + 360 ] }, - "rail-underground": { + "alcohol-shop": { "12": [ - 0, - 3780 + 96, + 360 ], "18": [ - 0, - 3794 + 78, + 360 ], "24": [ - 0, - 3814 + 54, + 360 ] }, - "religious-christian": { + "logging": { "12": [ - 0, - 3840 + 150, + 360 ], "18": [ - 0, - 3854 + 132, + 360 ], "24": [ - 0, - 3874 + 108, + 360 ] }, - "religious-jewish": { + "oil-well": { "12": [ - 0, - 3900 + 204, + 360 ], "18": [ - 0, - 3914 + 186, + 360 ], "24": [ - 0, - 3934 + 162, + 360 ] }, - "religious-muslim": { + "slaughterhouse": { "12": [ - 0, - 3960 + 258, + 360 ], "18": [ - 0, - 3974 + 240, + 360 ], "24": [ - 0, - 3994 + 216, + 360 ] }, - "restaurant": { + "dam": { "12": [ - 0, - 4020 + 42, + 384 ], "18": [ - 0, - 4034 + 24, + 384 ], "24": [ 0, - 4054 + 384 ] }, - "roadblock": { + "water": { "12": [ - 0, - 4080 + 96, + 384 ], "18": [ - 0, - 4094 + 78, + 384 ], "24": [ - 0, - 4114 + 54, + 384 ] }, - "school": { + "wetland": { "12": [ - 0, - 4140 + 150, + 384 ], "18": [ - 0, - 4154 + 132, + 384 ], "24": [ - 0, - 4174 + 108, + 384 ] }, - "shop": { + "disability": { "12": [ - 0, - 4200 + 204, + 384 ], "18": [ - 0, - 4214 + 186, + 384 ], "24": [ - 0, - 4234 + 162, + 384 ] }, - "skiing": { + "telephone": { "12": [ - 0, - 4260 + 258, + 384 ], "18": [ - 0, - 4274 + 240, + 384 ], "24": [ - 0, - 4294 + 216, + 384 ] }, - "slaughterhouse": { + "emergency-telephone": { "12": [ - 0, - 4320 + 42, + 408 ], "18": [ - 0, - 4334 + 24, + 408 ], "24": [ 0, - 4354 + 408 ] }, - "soccer": { + "toilets": { "12": [ - 0, - 4380 + 96, + 408 ], "18": [ - 0, - 4394 + 78, + 408 ], "24": [ - 0, - 4414 + 54, + 408 ] }, - "square": { + "waste-basket": { "12": [ - 0, - 4440 + 150, + 408 ], "18": [ - 0, - 4454 + 132, + 408 ], "24": [ - 0, - 4474 + 108, + 408 ] }, - "square-stroked": { + "music": { "12": [ - 0, - 4500 + 204, + 408 ], "18": [ - 0, - 4514 + 186, + 408 ], "24": [ - 0, - 4534 + 162, + 408 ] }, - "star": { + "land-use": { "12": [ - 0, - 4560 + 258, + 408 ], "18": [ - 0, - 4574 + 240, + 408 ], "24": [ - 0, - 4594 + 216, + 408 ] }, - "star-stroked": { + "city": { "12": [ - 0, - 4620 + 42, + 432 ], "18": [ - 0, - 4634 + 24, + 432 ], "24": [ 0, - 4654 + 432 ] }, - "swimming": { + "town": { "12": [ - 0, - 4680 + 96, + 432 ], "18": [ - 0, - 4694 + 78, + 432 ], "24": [ - 0, - 4714 + 54, + 432 ] }, - "telephone": { + "village": { "12": [ - 0, - 4740 + 150, + 432 ], "18": [ - 0, - 4754 + 132, + 432 ], "24": [ - 0, - 4774 + 108, + 432 ] }, - "tennis": { + "farm": { "12": [ - 0, - 4800 + 204, + 432 + ], + "18": [ + 186, + 432 + ], + "24": [ + 162, + 432 + ] + }, + "bakery": { + "12": [ + 258, + 432 + ], + "18": [ + 240, + 432 + ], + "24": [ + 216, + 432 + ] + }, + "dog-park": { + "12": [ + 42, + 456 ], "18": [ + 24, + 456 + ], + "24": [ 0, - 4814 + 456 + ] + }, + "lighthouse": { + "12": [ + 96, + 456 + ], + "18": [ + 78, + 456 + ], + "24": [ + 54, + 456 + ] + }, + "clothing-store": { + "12": [ + 150, + 456 + ], + "18": [ + 132, + 456 ], "24": [ - 0, - 4834 + 108, + 456 ] }, - "theatre": { + "polling-place": { "12": [ - 0, - 4860 + 204, + 456 ], "18": [ - 0, - 4874 + 186, + 456 ], "24": [ - 0, - 4894 + 162, + 456 ] }, - "toilets": { + "playground": { "12": [ - 0, - 4920 + 258, + 456 ], "18": [ - 0, - 4934 + 240, + 456 ], "24": [ - 0, - 4954 + 216, + 456 ] }, - "town": { + "entrance": { "12": [ - 0, - 4980 + 42, + 480 ], "18": [ - 0, - 4994 + 24, + 480 ], "24": [ 0, - 5014 + 480 ] }, - "town-hall": { + "heart": { "12": [ - 0, - 5040 + 96, + 480 ], "18": [ - 0, - 5054 + 78, + 480 ], "24": [ - 0, - 5074 + 54, + 480 ] }, - "triangle": { + "london-underground": { "12": [ - 0, - 5100 + 150, + 480 ], "18": [ - 0, - 5114 + 132, + 480 ], "24": [ - 0, - 5134 + 108, + 480 ] }, - "triangle-stroked": { + "minefield": { "12": [ - 0, - 5160 + 204, + 480 ], "18": [ - 0, - 5174 + 186, + 480 ], "24": [ - 0, - 5194 + 162, + 480 ] }, - "village": { + "rail-underground": { "12": [ - 0, - 5220 + 258, + 480 ], "18": [ - 0, - 5234 + 240, + 480 ], "24": [ - 0, - 5254 + 216, + 480 ] }, - "warehouse": { + "rail-above": { "12": [ - 0, - 5280 + 42, + 504 ], "18": [ - 0, - 5294 + 24, + 504 ], "24": [ 0, - 5314 + 504 ] }, - "waste-basket": { + "camera": { "12": [ - 0, - 5340 + 96, + 504 ], "18": [ - 0, - 5354 + 78, + 504 ], "24": [ - 0, - 5374 + 54, + 504 ] }, - "water": { + "laundry": { "12": [ - 0, - 5400 + 150, + 504 ], "18": [ - 0, - 5414 + 132, + 504 ], "24": [ - 0, - 5434 + 108, + 504 ] }, - "wetland": { + "car": { "12": [ - 0, - 5460 + 204, + 504 ], "18": [ - 0, - 5474 + 186, + 504 ], "24": [ - 0, - 5494 + 162, + 504 ] }, - "zoo": { + "suitcase": { "12": [ - 0, - 5520 + 258, + 504 ], "18": [ - 0, - 5534 + 240, + 504 ], "24": [ - 0, - 5554 + 216, + 504 ] }, "highway-motorway": { @@ -48802,2198 +74965,6991 @@ iD.introGraph = '{"n185954700":{"id":"n185954700","loc":[-85.642244,41.939081]," 25 ] }, - "route-tram": { - "relation": [ - 680, - 25 - ] + "route-tram": { + "relation": [ + 680, + 25 + ] + }, + "route-ferry": { + "relation": [ + 740, + 25 + ] + }, + "route-power": { + "relation": [ + 800, + 25 + ] + }, + "route-pipeline": { + "relation": [ + 860, + 25 + ] + }, + "route-master": { + "relation": [ + 920, + 25 + ] + } + }, + "operations": { + "icon-operation-delete": [ + 0, + 140 + ], + "icon-operation-circularize": [ + 20, + 140 + ], + "icon-operation-straighten": [ + 40, + 140 + ], + "icon-operation-split": [ + 60, + 140 + ], + "icon-operation-disconnect": [ + 80, + 140 + ], + "icon-operation-reverse": [ + 100, + 140 + ], + "icon-operation-move": [ + 120, + 140 + ], + "icon-operation-merge": [ + 140, + 140 + ], + "icon-operation-orthogonalize": [ + 160, + 140 + ], + "icon-operation-rotate": [ + 180, + 140 + ], + "icon-operation-simplify": [ + 200, + 140 + ], + "icon-operation-continue": [ + 220, + 140 + ], + "icon-operation-disabled-delete": [ + 0, + 160 + ], + "icon-operation-disabled-circularize": [ + 20, + 160 + ], + "icon-operation-disabled-straighten": [ + 40, + 160 + ], + "icon-operation-disabled-split": [ + 60, + 160 + ], + "icon-operation-disabled-disconnect": [ + 80, + 160 + ], + "icon-operation-disabled-reverse": [ + 100, + 160 + ], + "icon-operation-disabled-move": [ + 120, + 160 + ], + "icon-operation-disabled-merge": [ + 140, + 160 + ], + "icon-operation-disabled-orthogonalize": [ + 160, + 160 + ], + "icon-operation-disabled-rotate": [ + 180, + 160 + ], + "icon-operation-disabled-simplify": [ + 200, + 160 + ], + "icon-operation-disabled-continue": [ + 220, + 160 + ] + }, + "locales": [ + "af", + "ar", + "ar-AA", + "ast", + "bn", + "bs", + "bg-BG", + "ca", + "zh", + "zh-CN", + "zh-CN.GB2312", + "zh-TW", + "yue", + "hr", + "cs", + "da", + "nl", + "en-GB", + "et", + "fi", + "fr", + "de", + "el", + "hu", + "is", + "id", + "it", + "ja", + "ko", + "lv", + "lt", + "no", + "nn", + "fa", + "pl", + "pt", + "pt-BR", + "ru", + "sc", + "sr", + "sr-RS", + "sk", + "sl", + "es", + "sv", + "te", + "tr", + "uk", + "vi" + ], + "en": { + "modes": { + "add_area": { + "title": "Area", + "description": "Add parks, buildings, lakes or other areas to the map.", + "tail": "Click on the map to start drawing an area, like a park, lake, or building." + }, + "add_line": { + "title": "Line", + "description": "Add highways, streets, pedestrian paths, canals or other lines to the map.", + "tail": "Click on the map to start drawing a road, path, or route." + }, + "add_point": { + "title": "Point", + "description": "Add restaurants, monuments, postal boxes or other points to the map.", + "tail": "Click on the map to add a point." + }, + "browse": { + "title": "Browse", + "description": "Pan and zoom the map." + }, + "draw_area": { + "tail": "Click to add nodes to your area. Click the first node to finish the area." + }, + "draw_line": { + "tail": "Click to add more nodes to the line. Click on other lines to connect to them, and double-click to end the line." + } + }, + "operations": { + "add": { + "annotation": { + "point": "Added a point.", + "vertex": "Added a node to a way.", + "relation": "Added a relation." + } + }, + "start": { + "annotation": { + "line": "Started a line.", + "area": "Started an area." + } + }, + "continue": { + "key": "A", + "title": "Continue", + "description": "Continue this line.", + "not_eligible": "No line can be continued here.", + "multiple": "Several lines can be continued here. To choose a line, press the Shift key and click on it to select it.", + "annotation": { + "line": "Continued a line.", + "area": "Continued an area." + } + }, + "cancel_draw": { + "annotation": "Canceled drawing." + }, + "change_role": { + "annotation": "Changed the role of a relation member." + }, + "change_tags": { + "annotation": "Changed tags." + }, + "circularize": { + "title": "Circularize", + "description": { + "line": "Make this line circular.", + "area": "Make this area circular." + }, + "key": "O", + "annotation": { + "line": "Made a line circular.", + "area": "Made an area circular." + }, + "not_closed": "This can't be made circular because it's not a loop." + }, + "orthogonalize": { + "title": "Square", + "description": { + "line": "Square the corners of this line.", + "area": "Square the corners of this area." + }, + "key": "S", + "annotation": { + "line": "Squared the corners of a line.", + "area": "Squared the corners of an area." + }, + "not_squarish": "This can't be made square because it is not squarish." + }, + "straighten": { + "title": "Straighten", + "description": "Straighten this line.", + "key": "S", + "annotation": "Straightened a line.", + "too_bendy": "This can't be straightened because it bends too much." + }, + "delete": { + "title": "Delete", + "description": "Remove this from the map.", + "annotation": { + "point": "Deleted a point.", + "vertex": "Deleted a node from a way.", + "line": "Deleted a line.", + "area": "Deleted an area.", + "relation": "Deleted a relation.", + "multiple": "Deleted {n} objects." + }, + "incomplete_relation": "This feature can't be deleted because it hasn't been fully downloaded." + }, + "add_member": { + "annotation": "Added a member to a relation." + }, + "delete_member": { + "annotation": "Removed a member from a relation." + }, + "connect": { + "annotation": { + "point": "Connected a way to a point.", + "vertex": "Connected a way to another.", + "line": "Connected a way to a line.", + "area": "Connected a way to an area." + } + }, + "disconnect": { + "title": "Disconnect", + "description": "Disconnect these lines/areas from each other.", + "key": "D", + "annotation": "Disconnected lines/areas.", + "not_connected": "There aren't enough lines/areas here to disconnect." + }, + "merge": { + "title": "Merge", + "description": "Merge these lines.", + "key": "C", + "annotation": "Merged {n} lines.", + "not_eligible": "These features can't be merged.", + "not_adjacent": "These lines can't be merged because they aren't connected.", + "restriction": "These lines can't be merged because at least one is a member of a \"{relation}\" relation." + }, + "move": { + "title": "Move", + "description": "Move this to a different location.", + "key": "M", + "annotation": { + "point": "Moved a point.", + "vertex": "Moved a node in a way.", + "line": "Moved a line.", + "area": "Moved an area.", + "multiple": "Moved multiple objects." + }, + "incomplete_relation": "This feature can't be moved because it hasn't been fully downloaded." + }, + "rotate": { + "title": "Rotate", + "description": "Rotate this object around its center point.", + "key": "R", + "annotation": { + "line": "Rotated a line.", + "area": "Rotated an area." + } + }, + "reverse": { + "title": "Reverse", + "description": "Make this line go in the opposite direction.", + "key": "V", + "annotation": "Reversed a line." + }, + "split": { + "title": "Split", + "description": { + "line": "Split this line into two at this node.", + "area": "Split the boundary of this area into two.", + "multiple": "Split the lines/area boundaries at this node into two." + }, + "key": "X", + "annotation": { + "line": "Split a line.", + "area": "Split an area boundary.", + "multiple": "Split {n} lines/area boundaries." + }, + "not_eligible": "Lines can't be split at their beginning or end.", + "multiple_ways": "There are too many lines here to split." + } + }, + "undo": { + "tooltip": "Undo: {action}", + "nothing": "Nothing to undo." + }, + "redo": { + "tooltip": "Redo: {action}", + "nothing": "Nothing to redo." + }, + "tooltip_keyhint": "Shortcut:", + "browser_notice": "This editor is supported in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. Please upgrade your browser or use Potlatch 2 to edit the map.", + "translate": { + "translate": "Translate", + "localized_translation_label": "Multilingual name", + "localized_translation_language": "Choose language", + "localized_translation_name": "Name" + }, + "zoom_in_edit": "Zoom in to Edit", + "logout": "logout", + "loading_auth": "Connecting to OpenStreetMap...", + "report_a_bug": "report a bug", + "status": { + "error": "Unable to connect to API.", + "offline": "The API is offline. Please try editing later.", + "readonly": "The API is read-only. You will need to wait to save your changes." + }, + "commit": { + "title": "Save Changes", + "description_placeholder": "Brief description of your contributions", + "message_label": "Commit message", + "upload_explanation": "The changes you upload will be visible on all maps that use OpenStreetMap data.", + "upload_explanation_with_user": "The changes you upload as {user} will be visible on all maps that use OpenStreetMap data.", + "save": "Save", + "cancel": "Cancel", + "warnings": "Warnings", + "modified": "Modified", + "deleted": "Deleted", + "created": "Created" + }, + "contributors": { + "list": "Edits by {users}", + "truncated_list": "Edits by {users} and {count} others" + }, + "geocoder": { + "search": "Search worldwide...", + "no_results_visible": "No results in visible map area", + "no_results_worldwide": "No results found" + }, + "geolocate": { + "title": "Show My Location" + }, + "inspector": { + "no_documentation_combination": "There is no documentation available for this tag combination", + "no_documentation_key": "There is no documentation available for this key", + "show_more": "Show More", + "view_on_osm": "View on openstreetmap.org", + "all_tags": "All tags", + "all_members": "All members", + "all_relations": "All relations", + "new_relation": "New relation...", + "role": "Role", + "choose": "Select feature type", + "results": "{n} results for {search}", + "reference": "View on OpenStreetMap Wiki", + "back_tooltip": "Change feature", + "remove": "Remove", + "search": "Search", + "multiselect": "Selected items", + "unknown": "Unknown", + "incomplete": "