{"version":3,"sources":["kendo.dataviz.map.js"],"names":["f","define","defined","value","UNDEFINED","round","precision","power","pow","math","p","limitValue","min","max","rad","degrees","DEG_TO_RAD","deg","radians","isNumber","val","isNaN","valueOrDefault","defaultValue","sqr","objectKey","object","key","parts","push","sort","join","hashKey","str","i","hash","length","charCodeAt","hashObject","arrayLimits","arr","MAX_NUM","MIN_NUM","arrayMin","arrayMax","sparseArrayMin","sparseArrayLimits","sparseArrayMax","n","isFinite","undefined","last","array","append","first","second","apply","renderTemplate","text","kendo","template","useWithBlock","paramName","renderAttr","name","renderAllAttr","attrs","output","renderStyle","renderSize","size","renderPos","pos","result","toHyphens","split","isTransparent","color","arabicToRoman","literals","1","10","100","2","20","200","3","30","300","4","40","400","5","50","500","6","60","600","7","70","700","8","80","800","9","90","900","1000","values","roman","shift","romanToArabic","r","digits","prev","v","toLowerCase","x","l","c","d","m","charAt","memoize","cache","Object","create","id","arguments","this","ucs2decode","string","extra","counter","ucs2encode","map","String","fromCharCode","mergeSort","a","cmp","merge","b","ai","bi","slice","left","right","Math","floor","window","deepExtend","PI","Number","MAX_VALUE","now","Date","getTime","util","drawing","dataviz","amd","a1","a2","a3","$","zeroSize","width","height","baseline","measureText","style","measureBox","TextMetrics","current","measure","loadFonts","fonts","callback","promises","document","font","load","e","logToConsole","Promise","all","then","doc","Class","LRUCache","extend","init","_size","_length","_map","put","lru","entry","_head","_tail","newer","older","get","defaultMeasureBox","options","_cache","_initOptions","baselineMarkerSize","box","styleKey","cacheKey","cachedResult","baselineMarker","_baselineMarker","cloneNode","appendChild","body","offsetWidth","offsetHeight","offsetTop","parentNode","removeChild","jQuery","encodeBase64","input","chr1","chr2","chr3","enc1","enc2","enc3","enc4","encodeUTF8","KEY_STR","inArray","ObserversMixin","observers","_observers","addObserver","element","removeObserver","index","splice","trigger","methodName","event","observer","idx","_suspended","optionsChange","geometryChange","suspend","resume","_observerField","field","mixins","Extent","abs","atan","atan2","cos","sin","tan","Location","lat","lng","DISTANCE_ITERATIONS","DISTANCE_CONVERGENCE","DISTANCE_PRECISION","FORMAT","toArray","equals","loc","clone","wrap","distanceTo","dest","datum","greatCircleTo","distance","destination","bearing","fromLat","fromLng","dToR","datums","WGS84","asin","L","U1","sinU1","cosU1","U2","sinU2","cosU2","lambda","prevLambda","converged","sinLambda","cosLambda","sino","cosA2","coso","cos2om","sigma","sinA","C","u2","A","B","deltao","azimuthFrom","azimuthTo","sqrt","fn","toString","format","fromLngLat","ll","fromLatLng","nw","se","contains","center","containsAny","locs","include","includeAll","edges","ne","sw","overlaps","extent","World","Widget","ui","Attribution","call","items","addClass","separator","itemTemplate","filter","zoom","_extent","_zoom","_render","add","item","remove","clear","empty","_itemText","show","hide","inZoomLevel","_inZoomLevel","minZoom","maxZoom","inArea","_inArea","area","plugin","button","dir","keys","proxy","NS","BUTTONS","Navigator","on","parentElement","parent","closest","attr","_keyroot","_tabindex","_keydown","panStep","events","dispose","off","_pan","y","_click","currentTarget","is","preventDefault","which","UP","DOWN","RIGHT","LEFT","symbol","PLUS","MINUS","FF_PLUS","FF_MINUS","ZoomControl","zoomStep","_change","delta","NUMPAD_PLUS","NUMPAD_MINUS","exp","log","g","geometry","Point","limit","PI_DIV_2","PI_DIV_4","Mercator","MAX_LNG","MAX_LAT","INVERSE_ITERATIONS","INVERSE_CONVERGENCE","centralMeridian","forward","clamp","proj","lng0","_projectLat","ecc","ts","con","inverse","point","_inverseY","dphi","ecch","phi","SphericalMercator","Equirectangular","EPSG3857","crs","_proj","_tm","transform","translate","scale","_itm","toPoint","toLocation","EPSG3395","EPSG4326","projections","Layer","css","zIndex","opacity","appendTo","scrollElement","_beforeReset","_reset","_resize","_panEnd","_activate","_updateAttribution","destroy","_deactivate","reset","_applyExtent","_setVisibility","noop","matchMinZoom","matchMaxZoom","inside","visible","bind","unbind","attribution","layers","DataSource","data","Group","ShapeLayer","surface","Surface","_initRoot","movable","Movable","_markers","_handler","_mouseenter","_mouseleave","_initDataSource","autoBind","dataSource","_dataChange","setDataSource","fetch","_translateSurface","_data","_load","_root","draw","dsOptions","sender","view","container","shape","_clearMarkers","_loader","GeoJSONLoader","parse","shapeCreated","args","cancelled","Circle","_createMarker","layer","featureCreated","marker","markers","location","dataItem","_panning","suspendTracking","resumeTracking","locationToView","moveTo","originalEvent","locator","defaultStyle","root","unwrap","type","_loadGeometryTo","_featureCreated","children","_shapeCreated","group","properties","path","coords","coordinates","_loadPolygon","_setLineFill","_loadPoint","segments","anchor","fill","_loadShape","rings","_buildPolygon","j","MultiPath","Path","lineTo","circle","schemas","geojson","features","geometries","transports","read","dataType","getter","BubbleLayer","locationField","valueField","minSize","maxSize","opt","getValue","scaleType","_scaleType","_createSymbol","_drawSymbol","isFunction","scales","symbols","SqrtScale","domain","range","domainRange","outputRange","_domain","_range","_ratio","rel","Symbols","geo","square","halfSize","close","bubble","roundPoint","TileLayer","subdomains","viewType","_viewType","_view","origin","locationToLayer","viewOrigin","_updateView","TileView","support","mobileOS","throttle","extentToPoint","render","pool","TilePool","tileSize","urlTemplate","_center","_viewOrigin","pointToTileIndex","tileCount","firstTileIndex","indexToPoint","ceil","diff","subdomainText","subdomainIndex","tile","createTile","currentIndex","tileOptions","wrapIndex","offset","subdomain","errorUrlTemplate","boundary","wrapValue","remainder","ImageTile","createElement","errorUrl","target","setAttribute","removeAttribute","url","top","visibility","urlResult","urlOptions","z","s","quadkey","q","culture","_items","_remove","_create","dist","maxDist","BingLayer","baseUrl","_scheme","_onMetadata","_fetchMetadata","imagerySet","Error","ajax","uriScheme","jsonp","success","proto","protocol","replace","resource","resourceSets","resources","imageUrl","imageUrlSubdomains","zoomMin","zoomMax","_addAttribution","BingView","imageryProviders","coverageAreas","bbox","tileQuadKey","digit","mask","quadKey","bing","indexOf","Tooltip","MarkerLayer","_markerClick","titleField","arg","isArray","_addOne","update","showAt","Marker","addTo","getLocation","getTitle","title","tooltip","popup","_position","attributes","renderTooltip","contentTemplate","content","contentUrl","defaults","CSS_PREFIX","FRICTION","FRICTION_MOBILE","MOUSEWHEEL","VELOCITY_MULTIPLIER","Map","_getOrigin","_initScroller","_initMarkers","_initControls","_initLayers","_mousewheel","controls","navigator","layerDefaults","stroke","position","markerDefaults","wraparound","scroller","zoomControl","level","_setExtent","_getExtent","setOptions","_layerSize","layerToLocation","translateWith","viewToLocation","eventOffset","pageX","clientX","pageY","clientY","eventToView","cursor","eventToLayer","eventToLocation","viewSize","exportVisual","_setOrigin","topLeft","_origin","invalidate","layerWidth","layerHeight","bottomRight","_zoomAround","pivot","_createAttribution","_createNavigator","_createZoomControl","_createControlElement","defaultPos","posSelector","_navigatorPan","_navigatorCenter","scrollLeft","scrollTop","bounds","_virtualSize","one","_scrollEnd","scrollTo","_zoomControlChange","friction","zoomable","mobile","Scroller","velocityMultiplier","mousewheelScrolling","_scroll","userEvents","_scaleStart","_scale","impl","defs","_scrollOffset","_panComplete","_panEndTS","touch","touches","cancel","_scaleToZoom","gestureCenter","centerLocation","centerPoint","originPoint","scaleDelta","tiles","_resetScroller","xBounds","yBounds","dimensions","forcedMinScale","maxScale","pannable","makeVirtual","virtualSize","_renderLayers","scrollWrap","fromZoom","toZoom","postZoom","mwDelta"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;CAwBC,SAAUA,EAAGC,QACVA,OAAO,aAAc,cAAeD,IACtC,WA6WE,MA5WC,YAGG,QAASE,GAAQC,GACb,aAAcA,KAAUC,EAE5B,QAASC,GAAMF,EAAOG,GAClB,GAAIC,GAAQC,EAAIF,EAChB,OAAOG,GAAKJ,MAAMF,EAAQI,GAASA,EAEvC,QAASC,GAAIE,GACT,MAAIA,GACOD,EAAKD,IAAI,GAAIE,GAEb,EAGf,QAASC,GAAWR,EAAOS,EAAKC,GAC5B,MAAOJ,GAAKI,IAAIJ,EAAKG,IAAIT,EAAOU,GAAMD,GAE1C,QAASE,GAAIC,GACT,MAAOA,GAAUC,EAErB,QAASC,GAAIC,GACT,MAAOA,GAAUF,EAErB,QAASG,GAASC,GACd,MAAsB,gBAARA,KAAqB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\n \n \n \n \n \n \n\n*/\n(function (f, define) {\n define('util/main', ['kendo.core'], f);\n}(function () {\n (function () {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend;\n var DEG_TO_RAD = math.PI / 180, MAX_NUM = Number.MAX_VALUE, MIN_NUM = -Number.MAX_VALUE, UNDEFINED = 'undefined';\n function defined(value) {\n return typeof value !== UNDEFINED;\n }\n function round(value, precision) {\n var power = pow(precision);\n return math.round(value * power) / power;\n }\n function pow(p) {\n if (p) {\n return math.pow(10, p);\n } else {\n return 1;\n }\n }\n function limitValue(value, min, max) {\n return math.max(math.min(value, max), min);\n }\n function rad(degrees) {\n return degrees * DEG_TO_RAD;\n }\n function deg(radians) {\n return radians / DEG_TO_RAD;\n }\n function isNumber(val) {\n return typeof val === 'number' && !isNaN(val);\n }\n function valueOrDefault(value, defaultValue) {\n return defined(value) ? value : defaultValue;\n }\n function sqr(value) {\n return value * value;\n }\n function objectKey(object) {\n var parts = [];\n for (var key in object) {\n parts.push(key + object[key]);\n }\n return parts.sort().join('');\n }\n function hashKey(str) {\n var hash = 2166136261;\n for (var i = 0; i < str.length; ++i) {\n hash += (hash << 1) + (hash << 4) + (hash << 7) + (hash << 8) + (hash << 24);\n hash ^= str.charCodeAt(i);\n }\n return hash >>> 0;\n }\n function hashObject(object) {\n return hashKey(objectKey(object));\n }\n var now = Date.now;\n if (!now) {\n now = function () {\n return new Date().getTime();\n };\n }\n function arrayLimits(arr) {\n var length = arr.length, i, min = MAX_NUM, max = MIN_NUM;\n for (i = 0; i < length; i++) {\n max = math.max(max, arr[i]);\n min = math.min(min, arr[i]);\n }\n return {\n min: min,\n max: max\n };\n }\n function arrayMin(arr) {\n return arrayLimits(arr).min;\n }\n function arrayMax(arr) {\n return arrayLimits(arr).max;\n }\n function sparseArrayMin(arr) {\n return sparseArrayLimits(arr).min;\n }\n function sparseArrayMax(arr) {\n return sparseArrayLimits(arr).max;\n }\n function sparseArrayLimits(arr) {\n var min = MAX_NUM, max = MIN_NUM;\n for (var i = 0, length = arr.length; i < length; i++) {\n var n = arr[i];\n if (n !== null && isFinite(n)) {\n min = math.min(min, n);\n max = math.max(max, n);\n }\n }\n return {\n min: min === MAX_NUM ? undefined : min,\n max: max === MIN_NUM ? undefined : max\n };\n }\n function last(array) {\n if (array) {\n return array[array.length - 1];\n }\n }\n function append(first, second) {\n first.push.apply(first, second);\n return first;\n }\n function renderTemplate(text) {\n return kendo.template(text, {\n useWithBlock: false,\n paramName: 'd'\n });\n }\n function renderAttr(name, value) {\n return defined(value) && value !== null ? ' ' + name + '=\\'' + value + '\\' ' : '';\n }\n function renderAllAttr(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n output += renderAttr(attrs[i][0], attrs[i][1]);\n }\n return output;\n }\n function renderStyle(attrs) {\n var output = '';\n for (var i = 0; i < attrs.length; i++) {\n var value = attrs[i][1];\n if (defined(value)) {\n output += attrs[i][0] + ':' + value + ';';\n }\n }\n if (output !== '') {\n return output;\n }\n }\n function renderSize(size) {\n if (typeof size !== 'string') {\n size += 'px';\n }\n return size;\n }\n function renderPos(pos) {\n var result = [];\n if (pos) {\n var parts = kendo.toHyphens(pos).split('-');\n for (var i = 0; i < parts.length; i++) {\n result.push('k-pos-' + parts[i]);\n }\n }\n return result.join(' ');\n }\n function isTransparent(color) {\n return color === '' || color === null || color === 'none' || color === 'transparent' || !defined(color);\n }\n function arabicToRoman(n) {\n var literals = {\n 1: 'i',\n 10: 'x',\n 100: 'c',\n 2: 'ii',\n 20: 'xx',\n 200: 'cc',\n 3: 'iii',\n 30: 'xxx',\n 300: 'ccc',\n 4: 'iv',\n 40: 'xl',\n 400: 'cd',\n 5: 'v',\n 50: 'l',\n 500: 'd',\n 6: 'vi',\n 60: 'lx',\n 600: 'dc',\n 7: 'vii',\n 70: 'lxx',\n 700: 'dcc',\n 8: 'viii',\n 80: 'lxxx',\n 800: 'dccc',\n 9: 'ix',\n 90: 'xc',\n 900: 'cm',\n 1000: 'm'\n };\n var values = [\n 1000,\n 900,\n 800,\n 700,\n 600,\n 500,\n 400,\n 300,\n 200,\n 100,\n 90,\n 80,\n 70,\n 60,\n 50,\n 40,\n 30,\n 20,\n 10,\n 9,\n 8,\n 7,\n 6,\n 5,\n 4,\n 3,\n 2,\n 1\n ];\n var roman = '';\n while (n > 0) {\n if (n < values[0]) {\n values.shift();\n } else {\n roman += literals[values[0]];\n n -= values[0];\n }\n }\n return roman;\n }\n function romanToArabic(r) {\n r = r.toLowerCase();\n var digits = {\n i: 1,\n v: 5,\n x: 10,\n l: 50,\n c: 100,\n d: 500,\n m: 1000\n };\n var value = 0, prev = 0;\n for (var i = 0; i < r.length; ++i) {\n var v = digits[r.charAt(i)];\n if (!v) {\n return null;\n }\n value += v;\n if (v > prev) {\n value -= 2 * prev;\n }\n prev = v;\n }\n return value;\n }\n function memoize(f) {\n var cache = Object.create(null);\n return function () {\n var id = '';\n for (var i = arguments.length; --i >= 0;) {\n id += ':' + arguments[i];\n }\n return id in cache ? cache[id] : cache[id] = f.apply(this, arguments);\n };\n }\n function ucs2decode(string) {\n var output = [], counter = 0, length = string.length, value, extra;\n while (counter < length) {\n value = string.charCodeAt(counter++);\n if (value >= 55296 && value <= 56319 && counter < length) {\n extra = string.charCodeAt(counter++);\n if ((extra & 64512) == 56320) {\n output.push(((value & 1023) << 10) + (extra & 1023) + 65536);\n } else {\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n function ucs2encode(array) {\n return array.map(function (value) {\n var output = '';\n if (value > 65535) {\n value -= 65536;\n output += String.fromCharCode(value >>> 10 & 1023 | 55296);\n value = 56320 | value & 1023;\n }\n output += String.fromCharCode(value);\n return output;\n }).join('');\n }\n function mergeSort(a, cmp) {\n if (a.length < 2) {\n return a.slice();\n }\n function merge(a, b) {\n var r = [], ai = 0, bi = 0, i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[ai], b[bi]) <= 0) {\n r[i++] = a[ai++];\n } else {\n r[i++] = b[bi++];\n }\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n }\n return function sort(a) {\n if (a.length <= 1) {\n return a;\n }\n var m = Math.floor(a.length / 2);\n var left = a.slice(0, m);\n var right = a.slice(m);\n left = sort(left);\n right = sort(right);\n return merge(left, right);\n }(a);\n }\n deepExtend(kendo, {\n util: {\n MAX_NUM: MAX_NUM,\n MIN_NUM: MIN_NUM,\n append: append,\n arrayLimits: arrayLimits,\n arrayMin: arrayMin,\n arrayMax: arrayMax,\n defined: defined,\n deg: deg,\n hashKey: hashKey,\n hashObject: hashObject,\n isNumber: isNumber,\n isTransparent: isTransparent,\n last: last,\n limitValue: limitValue,\n now: now,\n objectKey: objectKey,\n round: round,\n rad: rad,\n renderAttr: renderAttr,\n renderAllAttr: renderAllAttr,\n renderPos: renderPos,\n renderSize: renderSize,\n renderStyle: renderStyle,\n renderTemplate: renderTemplate,\n sparseArrayLimits: sparseArrayLimits,\n sparseArrayMin: sparseArrayMin,\n sparseArrayMax: sparseArrayMax,\n sqr: sqr,\n valueOrDefault: valueOrDefault,\n romanToArabic: romanToArabic,\n arabicToRoman: arabicToRoman,\n memoize: memoize,\n ucs2encode: ucs2encode,\n ucs2decode: ucs2decode,\n mergeSort: mergeSort\n }\n });\n kendo.drawing.util = kendo.util;\n kendo.dataviz.util = kendo.util;\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('util/text-metrics', [\n 'kendo.core',\n 'util/main'\n ], f);\n}(function () {\n (function ($) {\n var doc = document, kendo = window.kendo, Class = kendo.Class, util = kendo.util, defined = util.defined;\n var LRUCache = Class.extend({\n init: function (size) {\n this._size = size;\n this._length = 0;\n this._map = {};\n },\n put: function (key, value) {\n var lru = this, map = lru._map, entry = {\n key: key,\n value: value\n };\n map[key] = entry;\n if (!lru._head) {\n lru._head = lru._tail = entry;\n } else {\n lru._tail.newer = entry;\n entry.older = lru._tail;\n lru._tail = entry;\n }\n if (lru._length >= lru._size) {\n map[lru._head.key] = null;\n lru._head = lru._head.newer;\n lru._head.older = null;\n } else {\n lru._length++;\n }\n },\n get: function (key) {\n var lru = this, entry = lru._map[key];\n if (entry) {\n if (entry === lru._head && entry !== lru._tail) {\n lru._head = entry.newer;\n lru._head.older = null;\n }\n if (entry !== lru._tail) {\n if (entry.older) {\n entry.older.newer = entry.newer;\n entry.newer.older = entry.older;\n }\n entry.older = lru._tail;\n entry.newer = null;\n lru._tail.newer = entry;\n lru._tail = entry;\n }\n return entry.value;\n }\n }\n });\n var defaultMeasureBox = $('
')[0];\n function zeroSize() {\n return {\n width: 0,\n height: 0,\n baseline: 0\n };\n }\n var TextMetrics = Class.extend({\n init: function (options) {\n this._cache = new LRUCache(1000);\n this._initOptions(options);\n },\n options: { baselineMarkerSize: 1 },\n measure: function (text, style, box) {\n if (!text) {\n return zeroSize();\n }\n var styleKey = util.objectKey(style), cacheKey = util.hashKey(text + styleKey), cachedResult = this._cache.get(cacheKey);\n if (cachedResult) {\n return cachedResult;\n }\n var size = zeroSize();\n var measureBox = box ? box : defaultMeasureBox;\n var baselineMarker = this._baselineMarker().cloneNode(false);\n for (var key in style) {\n var value = style[key];\n if (defined(value)) {\n measureBox.style[key] = value;\n }\n }\n $(measureBox).text(text);\n measureBox.appendChild(baselineMarker);\n doc.body.appendChild(measureBox);\n if ((text + '').length) {\n size.width = measureBox.offsetWidth - this.options.baselineMarkerSize;\n size.height = measureBox.offsetHeight;\n size.baseline = baselineMarker.offsetTop + this.options.baselineMarkerSize;\n }\n if (size.width > 0 && size.height > 0) {\n this._cache.put(cacheKey, size);\n }\n measureBox.parentNode.removeChild(measureBox);\n return size;\n },\n _baselineMarker: function () {\n return $('')[0];\n }\n });\n TextMetrics.current = new TextMetrics();\n function measureText(text, style, measureBox) {\n return TextMetrics.current.measure(text, style, measureBox);\n }\n function loadFonts(fonts, callback) {\n var promises = [];\n if (fonts.length > 0 && document.fonts) {\n try {\n promises = fonts.map(function (font) {\n return document.fonts.load(font);\n });\n } catch (e) {\n kendo.logToConsole(e);\n }\n Promise.all(promises).then(callback, callback);\n } else {\n callback();\n }\n }\n kendo.util.TextMetrics = TextMetrics;\n kendo.util.LRUCache = LRUCache;\n kendo.util.loadFonts = loadFonts;\n kendo.util.measureText = measureText;\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('util/base64', ['util/main'], f);\n}(function () {\n (function () {\n var kendo = window.kendo, deepExtend = kendo.deepExtend, fromCharCode = String.fromCharCode;\n var KEY_STR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n function encodeBase64(input) {\n var output = '';\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\n var i = 0;\n input = encodeUTF8(input);\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n enc1 = chr1 >> 2;\n enc2 = (chr1 & 3) << 4 | chr2 >> 4;\n enc3 = (chr2 & 15) << 2 | chr3 >> 6;\n enc4 = chr3 & 63;\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n output = output + KEY_STR.charAt(enc1) + KEY_STR.charAt(enc2) + KEY_STR.charAt(enc3) + KEY_STR.charAt(enc4);\n }\n return output;\n }\n function encodeUTF8(input) {\n var output = '';\n for (var i = 0; i < input.length; i++) {\n var c = input.charCodeAt(i);\n if (c < 128) {\n output += fromCharCode(c);\n } else if (c < 2048) {\n output += fromCharCode(192 | c >>> 6);\n output += fromCharCode(128 | c & 63);\n } else if (c < 65536) {\n output += fromCharCode(224 | c >>> 12);\n output += fromCharCode(128 | c >>> 6 & 63);\n output += fromCharCode(128 | c & 63);\n }\n }\n return output;\n }\n deepExtend(kendo.util, {\n encodeBase64: encodeBase64,\n encodeUTF8: encodeUTF8\n });\n }());\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('mixins/observers', ['kendo.core'], f);\n}(function () {\n (function ($) {\n var math = Math, kendo = window.kendo, deepExtend = kendo.deepExtend, inArray = $.inArray;\n var ObserversMixin = {\n observers: function () {\n this._observers = this._observers || [];\n return this._observers;\n },\n addObserver: function (element) {\n if (!this._observers) {\n this._observers = [element];\n } else {\n this._observers.push(element);\n }\n return this;\n },\n removeObserver: function (element) {\n var observers = this.observers();\n var index = inArray(element, observers);\n if (index != -1) {\n observers.splice(index, 1);\n }\n return this;\n },\n trigger: function (methodName, event) {\n var observers = this._observers;\n var observer;\n var idx;\n if (observers && !this._suspended) {\n for (idx = 0; idx < observers.length; idx++) {\n observer = observers[idx];\n if (observer[methodName]) {\n observer[methodName](event);\n }\n }\n }\n return this;\n },\n optionsChange: function (e) {\n e = e || {};\n e.element = this;\n this.trigger('optionsChange', e);\n },\n geometryChange: function () {\n this.trigger('geometryChange', { element: this });\n },\n suspend: function () {\n this._suspended = (this._suspended || 0) + 1;\n return this;\n },\n resume: function () {\n this._suspended = math.max((this._suspended || 0) - 1, 0);\n return this;\n },\n _observerField: function (field, value) {\n if (this[field]) {\n this[field].removeObserver(this);\n }\n this[field] = value;\n value.addObserver(this);\n }\n };\n deepExtend(kendo, { mixins: { ObserversMixin: ObserversMixin } });\n }(window.kendo.jQuery));\n return window.kendo;\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/location', ['kendo.drawing'], f);\n}(function () {\n (function ($, undefined) {\n var math = Math, abs = math.abs, atan = math.atan, atan2 = math.atan2, cos = math.cos, max = math.max, min = math.min, sin = math.sin, tan = math.tan, kendo = window.kendo, Class = kendo.Class, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, util = kendo.util, defined = util.defined, deg = util.deg, rad = util.rad, round = util.round, sqr = util.sqr, valueOrDefault = util.valueOrDefault;\n var Location = Class.extend({\n init: function (lat, lng) {\n if (arguments.length === 1) {\n this.lat = lat[0];\n this.lng = lat[1];\n } else {\n this.lat = lat;\n this.lng = lng;\n }\n },\n DISTANCE_ITERATIONS: 100,\n DISTANCE_CONVERGENCE: 1e-12,\n DISTANCE_PRECISION: 2,\n FORMAT: '{0:N6},{1:N6}',\n toArray: function () {\n return [\n this.lat,\n this.lng\n ];\n },\n equals: function (loc) {\n return loc && loc.lat === this.lat && loc.lng === this.lng;\n },\n clone: function () {\n return new Location(this.lat, this.lng);\n },\n round: function (precision) {\n this.lng = round(this.lng, precision);\n this.lat = round(this.lat, precision);\n return this;\n },\n wrap: function () {\n this.lng = this.lng % 180;\n this.lat = this.lat % 90;\n return this;\n },\n distanceTo: function (dest, datum) {\n return this.greatCircleTo(dest, datum).distance;\n },\n destination: function (distance, bearing, datum) {\n bearing = rad(bearing);\n datum = datum || dataviz.map.datums.WGS84;\n var fromLat = rad(this.lat);\n var fromLng = rad(this.lng);\n var dToR = distance / kendo.dataviz.map.datums.WGS84.a;\n var lat = math.asin(sin(fromLat) * cos(dToR) + cos(fromLat) * sin(dToR) * cos(bearing));\n var lng = fromLng + atan2(sin(bearing) * sin(dToR) * cos(fromLat), cos(dToR) - sin(fromLat) * sin(lat));\n return new Location(deg(lat), deg(lng));\n },\n greatCircleTo: function (dest, datum) {\n dest = Location.create(dest);\n datum = datum || dataviz.map.datums.WGS84;\n if (!dest || this.clone().round(8).equals(dest.clone().round(8))) {\n return {\n distance: 0,\n azimuthFrom: 0,\n azimuthTo: 0\n };\n }\n var a = datum.a;\n var b = datum.b;\n var f = datum.f;\n var L = rad(dest.lng - this.lng);\n var U1 = atan((1 - f) * tan(rad(this.lat)));\n var sinU1 = sin(U1);\n var cosU1 = cos(U1);\n var U2 = atan((1 - f) * tan(rad(dest.lat)));\n var sinU2 = sin(U2);\n var cosU2 = cos(U2);\n var lambda = L;\n var prevLambda;\n var i = this.DISTANCE_ITERATIONS;\n var converged = false;\n var sinLambda;\n var cosLambda;\n var sino;\n var cosA2;\n var coso;\n var cos2om;\n var sigma;\n while (!converged && i-- > 0) {\n sinLambda = sin(lambda);\n cosLambda = cos(lambda);\n sino = math.sqrt(sqr(cosU2 * sinLambda) + sqr(cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));\n coso = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;\n sigma = atan2(sino, coso);\n var sinA = cosU1 * cosU2 * sinLambda / sino;\n cosA2 = 1 - sqr(sinA);\n cos2om = 0;\n if (cosA2 !== 0) {\n cos2om = coso - 2 * sinU1 * sinU2 / cosA2;\n }\n prevLambda = lambda;\n var C = f / 16 * cosA2 * (4 + f * (4 - 3 * cosA2));\n lambda = L + (1 - C) * f * sinA * (sigma + C * sino * (cos2om + C * coso * (-1 + 2 * sqr(cos2om))));\n converged = abs(lambda - prevLambda) <= this.DISTANCE_CONVERGENCE;\n }\n var u2 = cosA2 * (sqr(a) - sqr(b)) / sqr(b);\n var A = 1 + u2 / 16384 * (4096 + u2 * (-768 + u2 * (320 - 175 * u2)));\n var B = u2 / 1024 * (256 + u2 * (-128 + u2 * (74 - 47 * u2)));\n var deltao = B * sino * (cos2om + B / 4 * (coso * (-1 + 2 * sqr(cos2om)) - B / 6 * cos2om * (-3 + 4 * sqr(sino)) * (-3 + 4 * sqr(cos2om))));\n var azimuthFrom = atan2(cosU2 * sinLambda, cosU1 * sinU2 - sinU1 * cosU2 * cosLambda);\n var azimuthTo = atan2(cosU1 * sinLambda, -sinU1 * cosU2 + cosU1 * sinU2 * cosLambda);\n return {\n distance: round(b * A * (sigma - deltao), this.DISTANCE_PRECISION),\n azimuthFrom: deg(azimuthFrom),\n azimuthTo: deg(azimuthTo)\n };\n }\n });\n Location.fn.toString = function () {\n return kendo.format(this.FORMAT, this.lat, this.lng);\n };\n Location.fromLngLat = function (ll) {\n return new Location(ll[1], ll[0]);\n };\n Location.fromLatLng = function (ll) {\n return new Location(ll[0], ll[1]);\n };\n Location.create = function (a, b) {\n if (defined(a)) {\n if (a instanceof Location) {\n return a.clone();\n } else if (arguments.length === 1 && a.length === 2) {\n return Location.fromLatLng(a);\n } else {\n return new Location(a, b);\n }\n }\n };\n var Extent = Class.extend({\n init: function (nw, se) {\n nw = Location.create(nw);\n se = Location.create(se);\n if (nw.lng + 180 > se.lng + 180 && nw.lat + 90 < se.lat + 90) {\n this.se = nw;\n this.nw = se;\n } else {\n this.se = se;\n this.nw = nw;\n }\n },\n contains: function (loc) {\n var nw = this.nw, se = this.se, lng = valueOrDefault(loc.lng, loc[1]), lat = valueOrDefault(loc.lat, loc[0]);\n return loc && lng + 180 >= nw.lng + 180 && lng + 180 <= se.lng + 180 && lat + 90 >= se.lat + 90 && lat + 90 <= nw.lat + 90;\n },\n center: function () {\n var nw = this.nw;\n var se = this.se;\n var lng = nw.lng + (se.lng - nw.lng) / 2;\n var lat = nw.lat + (se.lat - nw.lat) / 2;\n return new Location(lat, lng);\n },\n containsAny: function (locs) {\n var result = false;\n for (var i = 0; i < locs.length; i++) {\n result = result || this.contains(locs[i]);\n }\n return result;\n },\n include: function (loc) {\n var nw = this.nw, se = this.se, lng = valueOrDefault(loc.lng, loc[1]), lat = valueOrDefault(loc.lat, loc[0]);\n nw.lng = min(nw.lng, lng);\n nw.lat = max(nw.lat, lat);\n se.lng = max(se.lng, lng);\n se.lat = min(se.lat, lat);\n },\n includeAll: function (locs) {\n for (var i = 0; i < locs.length; i++) {\n this.include(locs[i]);\n }\n },\n edges: function () {\n var nw = this.nw, se = this.se;\n return {\n nw: this.nw,\n ne: new Location(nw.lat, se.lng),\n se: this.se,\n sw: new Location(se.lat, nw.lng)\n };\n },\n toArray: function () {\n var nw = this.nw, se = this.se;\n return [\n nw,\n new Location(nw.lat, se.lng),\n se,\n new Location(se.lat, nw.lng)\n ];\n },\n overlaps: function (extent) {\n return this.containsAny(extent.toArray()) || extent.containsAny(this.toArray());\n }\n });\n Extent.World = new Extent([\n 90,\n -180\n ], [\n -90,\n 180\n ]);\n Extent.create = function (a, b) {\n if (a instanceof Extent) {\n return a;\n } else if (a && b) {\n return new Extent(a, b);\n } else if (a && a.length === 4 && !b) {\n return new Extent([\n a[0],\n a[1]\n ], [\n a[2],\n a[3]\n ]);\n }\n };\n deepExtend(dataviz, {\n map: {\n Extent: Extent,\n Location: Location\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/attribution', ['kendo.drawing'], f);\n}(function () {\n (function () {\n var kendo = window.kendo, Widget = kendo.ui.Widget, template = kendo.template, valueOrDefault = kendo.util.valueOrDefault, defined = kendo.util.defined;\n var Attribution = Widget.extend({\n init: function (element, options) {\n Widget.fn.init.call(this, element, options);\n this._initOptions(options);\n this.items = [];\n this.element.addClass('k-widget k-attribution');\n },\n options: {\n name: 'Attribution',\n separator: ' | ',\n itemTemplate: '#= text #'\n },\n filter: function (extent, zoom) {\n this._extent = extent;\n this._zoom = zoom;\n this._render();\n },\n add: function (item) {\n if (defined(item)) {\n if (typeof item === 'string') {\n item = { text: item };\n }\n this.items.push(item);\n this._render();\n }\n },\n remove: function (text) {\n var result = [];\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i];\n if (item.text !== text) {\n result.push(item);\n }\n }\n this.items = result;\n this._render();\n },\n clear: function () {\n this.items = [];\n this.element.empty();\n },\n _render: function () {\n var result = [];\n var itemTemplate = template(this.options.itemTemplate);\n for (var i = 0; i < this.items.length; i++) {\n var item = this.items[i];\n var text = this._itemText(item);\n if (text !== '') {\n result.push(itemTemplate({ text: text }));\n }\n }\n if (result.length > 0) {\n this.element.empty().append(result.join(this.options.separator)).show();\n } else {\n this.element.hide();\n }\n },\n _itemText: function (item) {\n var text = '';\n var inZoomLevel = this._inZoomLevel(item.minZoom, item.maxZoom);\n var inArea = this._inArea(item.extent);\n if (inZoomLevel && inArea) {\n text += item.text;\n }\n return text;\n },\n _inZoomLevel: function (min, max) {\n var result = true;\n min = valueOrDefault(min, -Number.MAX_VALUE);\n max = valueOrDefault(max, Number.MAX_VALUE);\n result = this._zoom > min && this._zoom < max;\n return result;\n },\n _inArea: function (area) {\n var result = true;\n if (area) {\n result = area.contains(this._extent);\n }\n return result;\n }\n });\n kendo.dataviz.ui.plugin(Attribution);\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/navigator', ['kendo.core'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo;\n var Widget = kendo.ui.Widget;\n var keys = kendo.keys;\n var proxy = $.proxy;\n var NS = '.kendoNavigator';\n function button(dir) {\n return kendo.format('', dir);\n }\n var BUTTONS = button('n') + button('e') + button('s') + button('w');\n var Navigator = Widget.extend({\n init: function (element, options) {\n Widget.fn.init.call(this, element, options);\n this._initOptions(options);\n this.element.addClass('k-widget k-header k-shadow k-navigator').append(BUTTONS).on('click' + NS, '.k-button', proxy(this, '_click'));\n var parentElement = this.element.parent().closest('[' + kendo.attr('role') + ']');\n this._keyroot = parentElement.length > 0 ? parentElement : this.element;\n this._tabindex(this._keyroot);\n this._keydown = proxy(this._keydown, this);\n this._keyroot.on('keydown', this._keydown);\n },\n options: {\n name: 'Navigator',\n panStep: 1\n },\n events: ['pan'],\n dispose: function () {\n this._keyroot.off('keydown', this._keydown);\n },\n _pan: function (x, y) {\n var panStep = this.options.panStep;\n this.trigger('pan', {\n x: x * panStep,\n y: y * panStep\n });\n },\n _click: function (e) {\n var x = 0;\n var y = 0;\n var button = $(e.currentTarget);\n if (button.is('.k-navigator-n')) {\n y = 1;\n } else if (button.is('.k-navigator-s')) {\n y = -1;\n } else if (button.is('.k-navigator-e')) {\n x = 1;\n } else if (button.is('.k-navigator-w')) {\n x = -1;\n }\n this._pan(x, y);\n e.preventDefault();\n },\n _keydown: function (e) {\n switch (e.which) {\n case keys.UP:\n this._pan(0, 1);\n e.preventDefault();\n break;\n case keys.DOWN:\n this._pan(0, -1);\n e.preventDefault();\n break;\n case keys.RIGHT:\n this._pan(1, 0);\n e.preventDefault();\n break;\n case keys.LEFT:\n this._pan(-1, 0);\n e.preventDefault();\n break;\n }\n }\n });\n kendo.dataviz.ui.plugin(Navigator);\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/zoom', ['kendo.core'], f);\n}(function () {\n (function ($) {\n var kendo = window.kendo;\n var Widget = kendo.ui.Widget;\n var keys = kendo.keys;\n var proxy = $.proxy;\n function button(dir, symbol) {\n return kendo.format('', dir, symbol);\n }\n var NS = '.kendoZoomControl';\n var BUTTONS = button('in', '+') + button('out', '-');\n var PLUS = 187;\n var MINUS = 189;\n var FF_PLUS = 61;\n var FF_MINUS = 173;\n var ZoomControl = Widget.extend({\n init: function (element, options) {\n Widget.fn.init.call(this, element, options);\n this._initOptions(options);\n this.element.addClass('k-widget k-zoom-control k-button-wrap k-buttons-horizontal').append(BUTTONS).on('click' + NS, '.k-button', proxy(this, '_click'));\n var parentElement = this.element.parent().closest('[' + kendo.attr('role') + ']');\n this._keyroot = parentElement.length > 0 ? parentElement : this.element;\n this._tabindex(this._keyroot);\n this._keydown = proxy(this._keydown, this);\n this._keyroot.on('keydown', this._keydown);\n },\n options: {\n name: 'ZoomControl',\n zoomStep: 1\n },\n events: ['change'],\n _change: function (dir) {\n var zoomStep = this.options.zoomStep;\n this.trigger('change', { delta: dir * zoomStep });\n },\n _click: function (e) {\n var button = $(e.currentTarget);\n var dir = 1;\n if (button.is('.k-zoom-out')) {\n dir = -1;\n }\n this._change(dir);\n e.preventDefault();\n },\n _keydown: function (e) {\n switch (e.which) {\n case keys.NUMPAD_PLUS:\n case PLUS:\n case FF_PLUS:\n this._change(1);\n break;\n case keys.NUMPAD_MINUS:\n case MINUS:\n case FF_MINUS:\n this._change(-1);\n break;\n }\n }\n });\n kendo.dataviz.ui.plugin(ZoomControl);\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/crs', [\n 'dataviz/map/location',\n 'kendo.drawing'\n ], f);\n}(function () {\n (function ($, undefined) {\n var math = Math, atan = math.atan, exp = math.exp, pow = math.pow, sin = math.sin, log = math.log, tan = math.tan, kendo = window.kendo, Class = kendo.Class, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, g = kendo.geometry, Point = g.Point, map = dataviz.map, Location = map.Location, util = kendo.util, rad = util.rad, deg = util.deg, limit = util.limitValue;\n var PI = math.PI, PI_DIV_2 = PI / 2, PI_DIV_4 = PI / 4, DEG_TO_RAD = PI / 180;\n var WGS84 = {\n a: 6378137,\n b: 6356752.314245179,\n f: 0.0033528106647474805,\n e: 0.08181919084262149\n };\n var Mercator = Class.extend({\n init: function (options) {\n this._initOptions(options);\n },\n MAX_LNG: 180,\n MAX_LAT: 85.0840590501,\n INVERSE_ITERATIONS: 15,\n INVERSE_CONVERGENCE: 1e-12,\n options: {\n centralMeridian: 0,\n datum: WGS84\n },\n forward: function (loc, clamp) {\n var proj = this, options = proj.options, datum = options.datum, r = datum.a, lng0 = options.centralMeridian, lat = limit(loc.lat, -proj.MAX_LAT, proj.MAX_LAT), lng = clamp ? limit(loc.lng, -proj.MAX_LNG, proj.MAX_LNG) : loc.lng, x = rad(lng - lng0) * r, y = proj._projectLat(lat);\n return new Point(x, y);\n },\n _projectLat: function (lat) {\n var datum = this.options.datum, ecc = datum.e, r = datum.a, y = rad(lat), ts = tan(PI_DIV_4 + y / 2), con = ecc * sin(y), p = pow((1 - con) / (1 + con), ecc / 2);\n return r * log(ts * p);\n },\n inverse: function (point, clamp) {\n var proj = this, options = proj.options, datum = options.datum, r = datum.a, lng0 = options.centralMeridian, lng = point.x / (DEG_TO_RAD * r) + lng0, lat = limit(proj._inverseY(point.y), -proj.MAX_LAT, proj.MAX_LAT);\n if (clamp) {\n lng = limit(lng, -proj.MAX_LNG, proj.MAX_LNG);\n }\n return new Location(lat, lng);\n },\n _inverseY: function (y) {\n var proj = this, datum = proj.options.datum, r = datum.a, ecc = datum.e, ecch = ecc / 2, ts = exp(-y / r), phi = PI_DIV_2 - 2 * atan(ts), i;\n for (i = 0; i <= proj.INVERSE_ITERATIONS; i++) {\n var con = ecc * sin(phi), p = pow((1 - con) / (1 + con), ecch), dphi = PI_DIV_2 - 2 * atan(ts * p) - phi;\n phi += dphi;\n if (math.abs(dphi) <= proj.INVERSE_CONVERGENCE) {\n break;\n }\n }\n return deg(phi);\n }\n });\n var SphericalMercator = Mercator.extend({\n MAX_LAT: 85.0511287798,\n _projectLat: function (lat) {\n var r = this.options.datum.a, y = rad(lat), ts = tan(PI_DIV_4 + y / 2);\n return r * log(ts);\n },\n _inverseY: function (y) {\n var r = this.options.datum.a, ts = exp(-y / r);\n return deg(PI_DIV_2 - 2 * atan(ts));\n }\n });\n var Equirectangular = Class.extend({\n forward: function (loc) {\n return new Point(loc.lng, loc.lat);\n },\n inverse: function (point) {\n return new Location(point.y, point.x);\n }\n });\n var EPSG3857 = Class.extend({\n init: function () {\n var crs = this, proj = crs._proj = new SphericalMercator();\n var c = this.c = 2 * PI * proj.options.datum.a;\n this._tm = g.transform().translate(0.5, 0.5).scale(1 / c, -1 / c);\n this._itm = g.transform().scale(c, -c).translate(-0.5, -0.5);\n },\n toPoint: function (loc, scale, clamp) {\n var point = this._proj.forward(loc, clamp);\n return point.transform(this._tm).scale(scale || 1);\n },\n toLocation: function (point, scale, clamp) {\n point = point.clone().scale(1 / (scale || 1)).transform(this._itm);\n return this._proj.inverse(point, clamp);\n }\n });\n var EPSG3395 = Class.extend({\n init: function () {\n this._proj = new Mercator();\n },\n toPoint: function (loc) {\n return this._proj.forward(loc);\n },\n toLocation: function (point) {\n return this._proj.inverse(point);\n }\n });\n var EPSG4326 = Class.extend({\n init: function () {\n this._proj = new Equirectangular();\n },\n toPoint: function (loc) {\n return this._proj.forward(loc);\n },\n toLocation: function (point) {\n return this._proj.inverse(point);\n }\n });\n deepExtend(dataviz, {\n map: {\n crs: {\n EPSG3395: EPSG3395,\n EPSG3857: EPSG3857,\n EPSG4326: EPSG4326\n },\n datums: { WGS84: WGS84 },\n projections: {\n Equirectangular: Equirectangular,\n Mercator: Mercator,\n SphericalMercator: SphericalMercator\n }\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/base', [\n 'kendo.core',\n 'dataviz/map/location'\n ], f);\n}(function () {\n (function ($, undefined) {\n var proxy = $.proxy, kendo = window.kendo, Class = kendo.Class, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, Extent = dataviz.map.Extent, util = kendo.util, defined = util.defined;\n var Layer = Class.extend({\n init: function (map, options) {\n this._initOptions(options);\n this.map = map;\n this.element = $('').css({\n 'zIndex': this.options.zIndex,\n 'opacity': this.options.opacity\n }).appendTo(map.scrollElement);\n this._beforeReset = proxy(this._beforeReset, this);\n this._reset = proxy(this._reset, this);\n this._resize = proxy(this._resize, this);\n this._panEnd = proxy(this._panEnd, this);\n this._activate();\n this._updateAttribution();\n },\n destroy: function () {\n this._deactivate();\n },\n show: function () {\n this.reset();\n this._activate();\n this._applyExtent(true);\n },\n hide: function () {\n this._deactivate();\n this._setVisibility(false);\n },\n reset: function () {\n this._beforeReset();\n this._reset();\n },\n _reset: function () {\n this._applyExtent();\n },\n _beforeReset: $.noop,\n _resize: $.noop,\n _panEnd: function () {\n this._applyExtent();\n },\n _applyExtent: function () {\n var options = this.options;\n var zoom = this.map.zoom();\n var matchMinZoom = !defined(options.minZoom) || zoom >= options.minZoom;\n var matchMaxZoom = !defined(options.maxZoom) || zoom <= options.maxZoom;\n var extent = Extent.create(options.extent);\n var inside = !extent || extent.overlaps(this.map.extent());\n this._setVisibility(matchMinZoom && matchMaxZoom && inside);\n },\n _setVisibility: function (visible) {\n this.element.css('display', visible ? '' : 'none');\n },\n _activate: function () {\n var map = this.map;\n map.bind('beforeReset', this._beforeReset);\n map.bind('reset', this._reset);\n map.bind('resize', this._resize);\n map.bind('panEnd', this._panEnd);\n },\n _deactivate: function () {\n var map = this.map;\n map.unbind('beforeReset', this._beforeReset);\n map.unbind('reset', this._reset);\n map.unbind('resize', this._resize);\n map.unbind('panEnd', this._panEnd);\n },\n _updateAttribution: function () {\n var attr = this.map.attribution;\n if (attr) {\n attr.add(this.options.attribution);\n }\n }\n });\n deepExtend(dataviz, { map: { layers: { Layer: Layer } } });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/shape', [\n 'dataviz/map/layers/base',\n 'dataviz/map/location'\n ], f);\n}(function () {\n (function ($, undefined) {\n var proxy = $.proxy, kendo = window.kendo, Class = kendo.Class, DataSource = kendo.data.DataSource, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, last = kendo.util.last, defined = kendo.util.defined, g = kendo.geometry, d = kendo.drawing, Group = d.Group, map = dataviz.map, Location = map.Location, Layer = map.layers.Layer;\n var ShapeLayer = Layer.extend({\n init: function (map, options) {\n this._pan = proxy(this._pan, this);\n Layer.fn.init.call(this, map, options);\n this.surface = d.Surface.create(this.element, {\n width: map.scrollElement.width(),\n height: map.scrollElement.height()\n });\n this._initRoot();\n this.movable = new kendo.ui.Movable(this.surface.element);\n this._markers = [];\n this._click = this._handler('shapeClick');\n this.surface.bind('click', this._click);\n this._mouseenter = this._handler('shapeMouseEnter');\n this.surface.bind('mouseenter', this._mouseenter);\n this._mouseleave = this._handler('shapeMouseLeave');\n this.surface.bind('mouseleave', this._mouseleave);\n this._initDataSource();\n },\n options: { autoBind: true },\n destroy: function () {\n Layer.fn.destroy.call(this);\n this.surface.destroy();\n this.dataSource.unbind('change', this._dataChange);\n },\n setDataSource: function (dataSource) {\n if (this.dataSource) {\n this.dataSource.unbind('change', this._dataChange);\n }\n this.dataSource = kendo.data.DataSource.create(dataSource);\n this.dataSource.bind('change', this._dataChange);\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n _reset: function () {\n Layer.fn._reset.call(this);\n this._translateSurface();\n if (this._data) {\n this._load(this._data);\n }\n },\n _initRoot: function () {\n this._root = new Group();\n this.surface.draw(this._root);\n },\n _beforeReset: function () {\n this.surface.clear();\n this._initRoot();\n },\n _resize: function () {\n this.surface.size(this.map.size());\n },\n _initDataSource: function () {\n var dsOptions = this.options.dataSource;\n this._dataChange = proxy(this._dataChange, this);\n this.dataSource = DataSource.create(dsOptions).bind('change', this._dataChange);\n if (dsOptions && this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n _dataChange: function (e) {\n this._data = e.sender.view();\n this._load(this._data);\n },\n _load: function (data) {\n this._clearMarkers();\n if (!this._loader) {\n this._loader = new GeoJSONLoader(this.map, this.options.style, this);\n }\n var container = new Group();\n for (var i = 0; i < data.length; i++) {\n var shape = this._loader.parse(data[i]);\n if (shape) {\n container.append(shape);\n }\n }\n this._root.clear();\n this._root.append(container);\n },\n shapeCreated: function (shape) {\n var cancelled = false;\n if (shape instanceof d.Circle) {\n cancelled = defined(this._createMarker(shape));\n }\n if (!cancelled) {\n var args = {\n layer: this,\n shape: shape\n };\n cancelled = this.map.trigger('shapeCreated', args);\n }\n return cancelled;\n },\n featureCreated: function (e) {\n e.layer = this;\n this.map.trigger('shapeFeatureCreated', e);\n },\n _createMarker: function (shape) {\n var marker = this.map.markers.bind({ location: shape.location }, shape.dataItem);\n if (marker) {\n this._markers.push(marker);\n }\n return marker;\n },\n _clearMarkers: function () {\n for (var i = 0; i < this._markers.length; i++) {\n this.map.markers.remove(this._markers[i]);\n }\n this._markers = [];\n },\n _pan: function () {\n if (!this._panning) {\n this._panning = true;\n this.surface.suspendTracking();\n }\n },\n _panEnd: function (e) {\n Layer.fn._panEnd.call(this, e);\n this._translateSurface();\n this.surface.resumeTracking();\n this._panning = false;\n },\n _translateSurface: function () {\n var map = this.map;\n var nw = map.locationToView(map.extent().nw);\n if (this.surface.translate) {\n this.surface.translate(nw);\n this.movable.moveTo({\n x: nw.x,\n y: nw.y\n });\n }\n },\n _handler: function (event) {\n var layer = this;\n return function (e) {\n if (e.element) {\n var args = {\n layer: layer,\n shape: e.element,\n originalEvent: e.originalEvent\n };\n layer.map.trigger(event, args);\n }\n };\n },\n _activate: function () {\n Layer.fn._activate.call(this);\n this.map.bind('pan', this._pan);\n },\n _deactivate: function () {\n Layer.fn._deactivate.call(this);\n this.map.unbind('pan', this._pan);\n }\n });\n var GeoJSONLoader = Class.extend({\n init: function (locator, defaultStyle, observer) {\n this.observer = observer;\n this.locator = locator;\n this.style = defaultStyle;\n },\n parse: function (item) {\n var root = new Group();\n var unwrap = true;\n if (item.type === 'Feature') {\n unwrap = false;\n this._loadGeometryTo(root, item.geometry, item);\n this._featureCreated(root, item);\n } else {\n this._loadGeometryTo(root, item, item);\n }\n if (unwrap && root.children.length < 2) {\n root = root.children[0];\n }\n return root;\n },\n _shapeCreated: function (shape) {\n var cancelled = false;\n if (this.observer && this.observer.shapeCreated) {\n cancelled = this.observer.shapeCreated(shape);\n }\n return cancelled;\n },\n _featureCreated: function (group, dataItem) {\n if (this.observer && this.observer.featureCreated) {\n this.observer.featureCreated({\n group: group,\n dataItem: dataItem,\n properties: dataItem.properties\n });\n }\n },\n _loadGeometryTo: function (container, geometry, dataItem) {\n var coords = geometry.coordinates;\n var i;\n var path;\n switch (geometry.type) {\n case 'LineString':\n path = this._loadPolygon(container, [coords], dataItem);\n this._setLineFill(path);\n break;\n case 'MultiLineString':\n for (i = 0; i < coords.length; i++) {\n path = this._loadPolygon(container, [coords[i]], dataItem);\n this._setLineFill(path);\n }\n break;\n case 'Polygon':\n this._loadPolygon(container, coords, dataItem);\n break;\n case 'MultiPolygon':\n for (i = 0; i < coords.length; i++) {\n this._loadPolygon(container, coords[i], dataItem);\n }\n break;\n case 'Point':\n this._loadPoint(container, coords, dataItem);\n break;\n case 'MultiPoint':\n for (i = 0; i < coords.length; i++) {\n this._loadPoint(container, coords[i], dataItem);\n }\n break;\n }\n },\n _setLineFill: function (path) {\n var segments = path.segments;\n if (segments.length < 4 || !segments[0].anchor().equals(last(segments).anchor())) {\n path.options.fill = null;\n }\n },\n _loadShape: function (container, shape) {\n if (!this._shapeCreated(shape)) {\n container.append(shape);\n }\n return shape;\n },\n _loadPolygon: function (container, rings, dataItem) {\n var shape = this._buildPolygon(rings);\n shape.dataItem = dataItem;\n return this._loadShape(container, shape);\n },\n _buildPolygon: function (rings) {\n var type = rings.length > 1 ? d.MultiPath : d.Path;\n var path = new type(this.style);\n for (var i = 0; i < rings.length; i++) {\n for (var j = 0; j < rings[i].length; j++) {\n var point = this.locator.locationToView(Location.fromLngLat(rings[i][j]));\n if (j === 0) {\n path.moveTo(point.x, point.y);\n } else {\n path.lineTo(point.x, point.y);\n }\n }\n }\n return path;\n },\n _loadPoint: function (container, coords, dataItem) {\n var location = Location.fromLngLat(coords);\n var point = this.locator.locationToView(location);\n var circle = new g.Circle(point, 10);\n var shape = new d.Circle(circle, this.style);\n shape.dataItem = dataItem;\n shape.location = location;\n return this._loadShape(container, shape);\n }\n });\n deepExtend(kendo.data, {\n schemas: {\n geojson: {\n type: 'json',\n data: function (data) {\n if (data.type === 'FeatureCollection') {\n return data.features;\n }\n if (data.type === 'GeometryCollection') {\n return data.geometries;\n }\n return data;\n }\n }\n },\n transports: { geojson: { read: { dataType: 'json' } } }\n });\n deepExtend(dataviz, {\n map: {\n layers: {\n shape: ShapeLayer,\n ShapeLayer: ShapeLayer\n },\n GeoJSONLoader: GeoJSONLoader\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/bubble', ['dataviz/map/layers/shape'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, getter = kendo.getter, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, util = kendo.util, defined = util.defined, g = kendo.geometry, d = kendo.drawing, map = dataviz.map, Location = map.Location, ShapeLayer = map.layers.ShapeLayer;\n var BubbleLayer = ShapeLayer.extend({\n options: {\n autoBind: true,\n locationField: 'location',\n valueField: 'value',\n minSize: 0,\n maxSize: 100,\n scale: 'sqrt',\n symbol: 'circle'\n },\n _load: function (data) {\n this.surface.clear();\n if (data.length === 0) {\n return;\n }\n var opt = this.options;\n var getValue = getter(opt.valueField);\n data = data.slice(0);\n data.sort(function (a, b) {\n return getValue(b) - getValue(a);\n });\n var scaleType = this._scaleType();\n var scale;\n for (var i = 0; i < data.length; i++) {\n var dataItem = data[i];\n var location = getter(opt.locationField)(dataItem);\n var value = getter(opt.valueField)(dataItem);\n if (defined(location) && defined(value)) {\n if (!scale) {\n scale = new scaleType([\n 0,\n value\n ], [\n opt.minSize,\n opt.maxSize\n ]);\n }\n location = Location.create(location);\n var center = this.map.locationToView(location);\n var size = scale.map(value);\n var symbol = this._createSymbol({\n center: center,\n size: size,\n style: opt.style,\n dataItem: dataItem,\n location: location\n });\n symbol.dataItem = dataItem;\n symbol.location = location;\n symbol.value = value;\n this._drawSymbol(symbol);\n }\n }\n },\n _scaleType: function () {\n var scale = this.options.scale;\n if (kendo.isFunction(scale)) {\n return scale;\n }\n return dataviz.map.scales[scale];\n },\n _createSymbol: function (args) {\n var symbol = this.options.symbol;\n if (!kendo.isFunction(symbol)) {\n symbol = dataviz.map.symbols[symbol];\n }\n return symbol(args);\n },\n _drawSymbol: function (shape) {\n var args = {\n layer: this,\n shape: shape\n };\n var cancelled = this.map.trigger('shapeCreated', args);\n if (!cancelled) {\n this.surface.draw(shape);\n }\n }\n });\n var SqrtScale = kendo.Class.extend({\n init: function (domain, range) {\n this._domain = domain;\n this._range = range;\n var domainRange = Math.sqrt(domain[1]) - Math.sqrt(domain[0]);\n var outputRange = range[1] - range[0];\n this._ratio = outputRange / domainRange;\n },\n map: function (value) {\n var rel = (Math.sqrt(value) - Math.sqrt(this._domain[0])) * this._ratio;\n return this._range[0] + rel;\n }\n });\n var Symbols = {\n circle: function (args) {\n var geo = new g.Circle(args.center, args.size / 2);\n return new d.Circle(geo, args.style);\n },\n square: function (args) {\n var path = new d.Path(args.style);\n var halfSize = args.size / 2;\n var center = args.center;\n path.moveTo(center.x - halfSize, center.y - halfSize).lineTo(center.x + halfSize, center.y - halfSize).lineTo(center.x + halfSize, center.y + halfSize).lineTo(center.x - halfSize, center.y + halfSize).close();\n return path;\n }\n };\n deepExtend(dataviz, {\n map: {\n layers: {\n bubble: BubbleLayer,\n BubbleLayer: BubbleLayer\n },\n scales: { sqrt: SqrtScale },\n symbols: Symbols\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/tile', [\n 'dataviz/map/layers/base',\n 'dataviz/map/location'\n ], f);\n}(function () {\n (function ($, undefined) {\n var math = Math, proxy = $.proxy, kendo = window.kendo, Class = kendo.Class, template = kendo.template, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, g = kendo.geometry, Point = g.Point, Layer = dataviz.map.layers.Layer, util = kendo.util, round = util.round, renderSize = util.renderSize, limit = util.limitValue;\n var TileLayer = Layer.extend({\n init: function (map, options) {\n Layer.fn.init.call(this, map, options);\n if (typeof this.options.subdomains === 'string') {\n this.options.subdomains = this.options.subdomains.split('');\n }\n var viewType = this._viewType();\n this._view = new viewType(this.element, this.options);\n },\n destroy: function () {\n Layer.fn.destroy.call(this);\n this._view.destroy();\n this._view = null;\n },\n _beforeReset: function () {\n var map = this.map;\n var origin = map.locationToLayer(map.extent().nw).round();\n this._view.viewOrigin(origin);\n },\n _reset: function () {\n Layer.fn._reset.call(this);\n this._updateView();\n this._view.reset();\n },\n _viewType: function () {\n return TileView;\n },\n _activate: function () {\n Layer.fn._activate.call(this);\n if (!kendo.support.mobileOS) {\n if (!this._pan) {\n this._pan = kendo.throttle(proxy(this._render, this), 100);\n }\n this.map.bind('pan', this._pan);\n }\n },\n _deactivate: function () {\n Layer.fn._deactivate.call(this);\n if (this._pan) {\n this.map.unbind('pan', this._pan);\n }\n },\n _updateView: function () {\n var view = this._view, map = this.map, extent = map.extent(), extentToPoint = {\n nw: map.locationToLayer(extent.nw).round(),\n se: map.locationToLayer(extent.se).round()\n };\n view.center(map.locationToLayer(map.center()));\n view.extent(extentToPoint);\n view.zoom(map.zoom());\n },\n _resize: function () {\n this._render();\n },\n _panEnd: function (e) {\n Layer.fn._panEnd.call(this, e);\n this._render();\n },\n _render: function () {\n this._updateView();\n this._view.render();\n }\n });\n var TileView = Class.extend({\n init: function (element, options) {\n this.element = element;\n this._initOptions(options);\n this.pool = new TilePool();\n },\n options: {\n tileSize: 256,\n subdomains: [\n 'a',\n 'b',\n 'c'\n ],\n urlTemplate: ''\n },\n center: function (center) {\n this._center = center;\n },\n extent: function (extent) {\n this._extent = extent;\n },\n viewOrigin: function (origin) {\n this._viewOrigin = origin;\n },\n zoom: function (zoom) {\n this._zoom = zoom;\n },\n pointToTileIndex: function (point) {\n return new Point(math.floor(point.x / this.options.tileSize), math.floor(point.y / this.options.tileSize));\n },\n tileCount: function () {\n var size = this.size(), firstTileIndex = this.pointToTileIndex(this._extent.nw), nw = this._extent.nw, point = this.indexToPoint(firstTileIndex).translate(-nw.x, -nw.y);\n return {\n x: math.ceil((math.abs(point.x) + size.width) / this.options.tileSize),\n y: math.ceil((math.abs(point.y) + size.height) / this.options.tileSize)\n };\n },\n size: function () {\n var nw = this._extent.nw, se = this._extent.se, diff = se.clone().translate(-nw.x, -nw.y);\n return {\n width: diff.x,\n height: diff.y\n };\n },\n indexToPoint: function (index) {\n var x = index.x, y = index.y;\n return new Point(x * this.options.tileSize, y * this.options.tileSize);\n },\n subdomainText: function () {\n var subdomains = this.options.subdomains;\n return subdomains[this.subdomainIndex++ % subdomains.length];\n },\n destroy: function () {\n this.element.empty();\n this.pool.empty();\n },\n reset: function () {\n this.pool.reset();\n this.subdomainIndex = 0;\n this.render();\n },\n render: function () {\n var size = this.tileCount(), firstTileIndex = this.pointToTileIndex(this._extent.nw), tile, x, y;\n for (x = 0; x < size.x; x++) {\n for (y = 0; y < size.y; y++) {\n tile = this.createTile({\n x: firstTileIndex.x + x,\n y: firstTileIndex.y + y\n });\n if (!tile.visible) {\n tile.show();\n }\n }\n }\n },\n createTile: function (currentIndex) {\n var options = this.tileOptions(currentIndex);\n var tile = this.pool.get(this._center, options);\n if (tile.element.parent().length === 0) {\n this.element.append(tile.element);\n }\n return tile;\n },\n tileOptions: function (currentIndex) {\n var index = this.wrapIndex(currentIndex), point = this.indexToPoint(currentIndex), origin = this._viewOrigin, offset = point.clone().translate(-origin.x, -origin.y);\n return {\n index: index,\n currentIndex: currentIndex,\n point: point,\n offset: roundPoint(offset),\n zoom: this._zoom,\n size: this.options.tileSize,\n subdomain: this.subdomainText(),\n urlTemplate: this.options.urlTemplate,\n errorUrlTemplate: this.options.errorUrlTemplate\n };\n },\n wrapIndex: function (index) {\n var boundary = math.pow(2, this._zoom);\n return {\n x: this.wrapValue(index.x, boundary),\n y: limit(index.y, 0, boundary - 1)\n };\n },\n wrapValue: function (value, boundary) {\n var remainder = math.abs(value) % boundary;\n if (value >= 0) {\n value = remainder;\n } else {\n value = boundary - (remainder === 0 ? boundary : remainder);\n }\n return value;\n }\n });\n var ImageTile = Class.extend({\n init: function (id, options) {\n this.id = id;\n this.visible = true;\n this._initOptions(options);\n this.createElement();\n this.show();\n },\n options: {\n urlTemplate: '',\n errorUrlTemplate: ''\n },\n createElement: function () {\n this.element = $('').css({\n width: this.options.size,\n height: this.options.size\n }).on('error', proxy(function (e) {\n if (this.errorUrl()) {\n e.target.setAttribute('src', this.errorUrl());\n } else {\n e.target.removeAttribute('src');\n }\n }, this));\n },\n show: function () {\n var element = this.element[0];\n element.style.top = renderSize(this.options.offset.y);\n element.style.left = renderSize(this.options.offset.x);\n var url = this.url();\n if (url) {\n element.setAttribute('src', url);\n }\n element.style.visibility = 'visible';\n this.visible = true;\n },\n hide: function () {\n this.element[0].style.visibility = 'hidden';\n this.visible = false;\n },\n url: function () {\n var urlResult = template(this.options.urlTemplate);\n return urlResult(this.urlOptions());\n },\n errorUrl: function () {\n var urlResult = template(this.options.errorUrlTemplate);\n return urlResult(this.urlOptions());\n },\n urlOptions: function () {\n var options = this.options;\n return {\n zoom: options.zoom,\n subdomain: options.subdomain,\n z: options.zoom,\n x: options.index.x,\n y: options.index.y,\n s: options.subdomain,\n quadkey: options.quadkey,\n q: options.quadkey,\n culture: options.culture,\n c: options.culture\n };\n },\n destroy: function () {\n if (this.element) {\n this.element.remove();\n this.element = null;\n }\n }\n });\n var TilePool = Class.extend({\n init: function () {\n this._items = [];\n },\n options: { maxSize: 100 },\n get: function (center, options) {\n if (this._items.length >= this.options.maxSize) {\n this._remove(center);\n }\n return this._create(options);\n },\n empty: function () {\n var items = this._items;\n for (var i = 0; i < items.length; i++) {\n items[i].destroy();\n }\n this._items = [];\n },\n reset: function () {\n var items = this._items;\n for (var i = 0; i < items.length; i++) {\n items[i].hide();\n }\n },\n _create: function (options) {\n var items = this._items;\n var tile;\n var id = util.hashKey(options.point.toString() + options.offset.toString() + options.zoom + options.urlTemplate);\n for (var i = 0; i < items.length; i++) {\n if (items[i].id === id) {\n tile = items[i];\n break;\n }\n }\n if (tile) {\n tile.show();\n } else {\n tile = new ImageTile(id, options);\n this._items.push(tile);\n }\n return tile;\n },\n _remove: function (center) {\n var items = this._items;\n var maxDist = -1;\n var index = -1;\n for (var i = 0; i < items.length; i++) {\n var dist = items[i].options.point.distanceTo(center);\n if (dist > maxDist && !items[i].visible) {\n index = i;\n maxDist = dist;\n }\n }\n if (index !== -1) {\n items[index].destroy();\n items.splice(index, 1);\n }\n }\n });\n function roundPoint(point) {\n return new Point(round(point.x), round(point.y));\n }\n deepExtend(dataviz, {\n map: {\n layers: {\n tile: TileLayer,\n TileLayer: TileLayer,\n ImageTile: ImageTile,\n TilePool: TilePool,\n TileView: TileView\n }\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/bing', ['dataviz/map/layers/tile'], f);\n}(function () {\n (function ($, undefined) {\n var kendo = window.kendo, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, defined = kendo.util.defined, Extent = dataviz.map.Extent, Location = dataviz.map.Location, TileLayer = dataviz.map.layers.TileLayer, TileView = dataviz.map.layers.TileView;\n var BingLayer = TileLayer.extend({\n init: function (map, options) {\n this.options.baseUrl = this._scheme() + '://dev.virtualearth.net/REST/v1/Imagery/Metadata/';\n TileLayer.fn.init.call(this, map, options);\n this._onMetadata = $.proxy(this._onMetadata, this);\n this._fetchMetadata();\n },\n options: { imagerySet: 'road' },\n _fetchMetadata: function () {\n var options = this.options;\n if (!options.key) {\n throw new Error('Bing tile layer: API key is required');\n }\n $.ajax({\n url: options.baseUrl + options.imagerySet,\n data: {\n output: 'json',\n include: 'ImageryProviders',\n key: options.key,\n uriScheme: this._scheme()\n },\n type: 'get',\n dataType: 'jsonp',\n jsonp: 'jsonp',\n success: this._onMetadata\n });\n },\n _scheme: function (proto) {\n proto = proto || window.location.protocol;\n return proto.replace(':', '') === 'https' ? 'https' : 'http';\n },\n _onMetadata: function (data) {\n if (data && data.resourceSets.length) {\n var resource = this.resource = data.resourceSets[0].resources[0];\n deepExtend(this._view.options, {\n urlTemplate: resource.imageUrl.replace('{subdomain}', '#= subdomain #').replace('{quadkey}', '#= quadkey #').replace('{culture}', '#= culture #'),\n subdomains: resource.imageUrlSubdomains\n });\n var options = this.options;\n if (!defined(options.minZoom)) {\n options.minZoom = resource.zoomMin;\n }\n if (!defined(options.maxZoom)) {\n options.maxZoom = resource.zoomMax;\n }\n this._addAttribution();\n if (this.element.css('display') !== 'none') {\n this._reset();\n }\n }\n },\n _viewType: function () {\n return BingView;\n },\n _addAttribution: function () {\n var attr = this.map.attribution;\n if (attr) {\n var items = this.resource.imageryProviders;\n if (items) {\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n for (var y = 0; y < item.coverageAreas.length; y++) {\n var area = item.coverageAreas[y];\n attr.add({\n text: item.attribution,\n minZoom: area.zoomMin,\n maxZoom: area.zoomMax,\n extent: new Extent(new Location(area.bbox[2], area.bbox[1]), new Location(area.bbox[0], area.bbox[3]))\n });\n }\n }\n }\n }\n },\n imagerySet: function (value) {\n if (value) {\n this.options.imagerySet = value;\n this.map.attribution.clear();\n this._fetchMetadata();\n } else {\n return this.options.imagerySet;\n }\n }\n });\n var BingView = TileView.extend({\n options: { culture: 'en-US' },\n tileOptions: function (currentIndex) {\n var options = TileView.fn.tileOptions.call(this, currentIndex);\n options.culture = this.options.culture;\n options.quadkey = this.tileQuadKey(this.wrapIndex(currentIndex));\n return options;\n },\n tileQuadKey: function (index) {\n var quadKey = '', digit, mask, i;\n for (i = this._zoom; i > 0; i--) {\n digit = 0;\n mask = 1 << i - 1;\n if ((index.x & mask) !== 0) {\n digit++;\n }\n if ((index.y & mask) !== 0) {\n digit += 2;\n }\n quadKey += digit;\n }\n return quadKey;\n }\n });\n deepExtend(dataviz, {\n map: {\n layers: {\n bing: BingLayer,\n BingLayer: BingLayer,\n BingView: BingView\n }\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/layers/marker', [\n 'dataviz/map/layers/base',\n 'dataviz/map/location',\n 'kendo.data',\n 'kendo.tooltip'\n ], f);\n}(function () {\n (function ($, undefined) {\n var doc = document, math = Math, indexOf = $.inArray, proxy = $.proxy, kendo = window.kendo, Class = kendo.Class, DataSource = kendo.data.DataSource, Tooltip = kendo.ui.Tooltip, dataviz = kendo.dataviz, deepExtend = kendo.deepExtend, map = dataviz.map, Location = map.Location, Layer = map.layers.Layer;\n var MarkerLayer = Layer.extend({\n init: function (map, options) {\n Layer.fn.init.call(this, map, options);\n this._markerClick = proxy(this._markerClick, this);\n this.element.on('click', '.k-marker', this._markerClick);\n this.items = [];\n this._initDataSource();\n },\n destroy: function () {\n Layer.fn.destroy.call(this);\n this.element.off('click', '.k-marker', this._markerClick);\n this.dataSource.unbind('change', this._dataChange);\n this.clear();\n },\n options: {\n zIndex: 1000,\n autoBind: true,\n dataSource: {},\n locationField: 'location',\n titleField: 'title'\n },\n add: function (arg) {\n if ($.isArray(arg)) {\n for (var i = 0; i < arg.length; i++) {\n this._addOne(arg[i]);\n }\n } else {\n return this._addOne(arg);\n }\n },\n remove: function (marker) {\n marker.destroy();\n var index = indexOf(marker, this.items);\n if (index > -1) {\n this.items.splice(index, 1);\n }\n },\n clear: function () {\n for (var i = 0; i < this.items.length; i++) {\n this.items[i].destroy();\n }\n this.items = [];\n },\n update: function (marker) {\n var loc = marker.location();\n if (loc) {\n marker.showAt(this.map.locationToView(loc));\n var args = {\n marker: marker,\n layer: this\n };\n this.map.trigger('markerActivate', args);\n }\n },\n _reset: function () {\n Layer.fn._reset.call(this);\n var items = this.items;\n for (var i = 0; i < items.length; i++) {\n this.update(items[i]);\n }\n },\n bind: function (options, dataItem) {\n var marker = map.Marker.create(options, this.options);\n marker.dataItem = dataItem;\n var args = {\n marker: marker,\n layer: this\n };\n var cancelled = this.map.trigger('markerCreated', args);\n if (!cancelled) {\n this.add(marker);\n return marker;\n }\n },\n setDataSource: function (dataSource) {\n if (this.dataSource) {\n this.dataSource.unbind('change', this._dataChange);\n }\n this.dataSource = kendo.data.DataSource.create(dataSource);\n this.dataSource.bind('change', this._dataChange);\n if (this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n _addOne: function (arg) {\n var marker = Marker.create(arg, this.options);\n marker.addTo(this);\n return marker;\n },\n _initDataSource: function () {\n var dsOptions = this.options.dataSource;\n this._dataChange = proxy(this._dataChange, this);\n this.dataSource = DataSource.create(dsOptions).bind('change', this._dataChange);\n if (dsOptions && this.options.autoBind) {\n this.dataSource.fetch();\n }\n },\n _dataChange: function (e) {\n this._load(e.sender.view());\n },\n _load: function (data) {\n this._data = data;\n this.clear();\n var getLocation = kendo.getter(this.options.locationField);\n var getTitle = kendo.getter(this.options.titleField);\n for (var i = 0; i < data.length; i++) {\n var dataItem = data[i];\n this.bind({\n location: getLocation(dataItem),\n title: getTitle(dataItem)\n }, dataItem);\n }\n },\n _markerClick: function (e) {\n var args = {\n marker: $(e.target).data('kendoMarker'),\n layer: this\n };\n this.map.trigger('markerClick', args);\n }\n });\n var Marker = Class.extend({\n init: function (options) {\n this.options = options || {};\n },\n addTo: function (parent) {\n this.layer = parent.markers || parent;\n this.layer.items.push(this);\n this.layer.update(this);\n },\n location: function (value) {\n if (value) {\n this.options.location = Location.create(value).toArray();\n if (this.layer) {\n this.layer.update(this);\n }\n return this;\n } else {\n return Location.create(this.options.location);\n }\n },\n showAt: function (point) {\n this.render();\n this.element.css({\n left: math.round(point.x),\n top: math.round(point.y)\n });\n if (this.tooltip && this.tooltip.popup) {\n this.tooltip.popup._position();\n }\n },\n hide: function () {\n if (this.element) {\n this.element.remove();\n this.element = null;\n }\n if (this.tooltip) {\n this.tooltip.destroy();\n this.tooltip = null;\n }\n },\n destroy: function () {\n this.layer = null;\n this.hide();\n },\n render: function () {\n if (!this.element) {\n var options = this.options;\n var layer = this.layer;\n this.element = $(doc.createElement('span')).addClass('k-marker k-marker-' + kendo.toHyphens(options.shape || 'pin')).attr('title', options.title).attr(options.attributes || {}).data('kendoMarker', this).css('zIndex', options.zIndex);\n if (layer) {\n layer.element.append(this.element);\n }\n this.renderTooltip();\n }\n },\n renderTooltip: function () {\n var marker = this;\n var title = marker.options.title;\n var options = marker.options.tooltip || {};\n if (options && Tooltip) {\n var template = options.template;\n if (template) {\n var contentTemplate = kendo.template(template);\n options.content = function (e) {\n e.location = marker.location();\n e.marker = marker;\n return contentTemplate(e);\n };\n }\n if (title || options.content || options.contentUrl) {\n this.tooltip = new Tooltip(this.element, options);\n this.tooltip.marker = this;\n }\n }\n }\n });\n Marker.create = function (arg, defaults) {\n if (arg instanceof Marker) {\n return arg;\n }\n return new Marker(deepExtend({}, defaults, arg));\n };\n deepExtend(dataviz, {\n map: {\n layers: {\n marker: MarkerLayer,\n MarkerLayer: MarkerLayer\n },\n Marker: Marker\n }\n });\n }(window.kendo.jQuery));\n}, typeof define == 'function' && define.amd ? define : function (a1, a2, a3) {\n (a3 || a2)();\n}));\n(function (f, define) {\n define('dataviz/map/main', [\n 'dataviz/map/crs',\n 'dataviz/map/location'\n ], f);\n}(function () {\n (function ($, undefined) {\n var doc = document, math = Math, min = math.min, pow = math.pow, proxy = $.proxy, kendo = window.kendo, Widget = kendo.ui.Widget, deepExtend = kendo.deepExtend, dataviz = kendo.dataviz, ui = dataviz.ui, g = kendo.geometry, Point = g.Point, map = dataviz.map, Extent = map.Extent, Location = map.Location, EPSG3857 = map.crs.EPSG3857, util = kendo.util, defined = util.defined, limit = util.limitValue, renderPos = util.renderPos, valueOrDefault = util.valueOrDefault;\n var CSS_PREFIX = 'k-', FRICTION = 0.9, FRICTION_MOBILE = 0.93, MOUSEWHEEL = 'DOMMouseScroll mousewheel', VELOCITY_MULTIPLIER = 5;\n var Map = Widget.extend({\n init: function (element, options) {\n kendo.destroy(element);\n Widget.fn.init.call(this, element);\n this._initOptions(options);\n this.bind(this.events, options);\n this.crs = new EPSG3857();\n this.element.addClass(CSS_PREFIX + this.options.name.toLowerCase()).css('position', 'relative').empty().append(doc.createElement('div'));\n this._viewOrigin = this._getOrigin();\n this._initScroller();\n this._initMarkers();\n this._initControls();\n this._initLayers();\n this._reset();\n this._mousewheel = proxy(this._mousewheel, this);\n this.element.bind('click', proxy(this._click, this));\n this.element.bind(MOUSEWHEEL, this._mousewheel);\n },\n options: {\n name: 'Map',\n controls: {\n attribution: true,\n navigator: { panStep: 100 },\n zoom: true\n },\n layers: [],\n layerDefaults: {\n shape: {\n style: {\n fill: { color: '#fff' },\n stroke: {\n color: '#aaa',\n width: 0.5\n }\n }\n },\n bubble: {\n style: {\n fill: {\n color: '#fff',\n opacity: 0.5\n },\n stroke: {\n color: '#aaa',\n width: 0.5\n }\n }\n },\n marker: {\n shape: 'pinTarget',\n tooltip: { position: 'top' }\n }\n },\n center: [\n 0,\n 0\n ],\n zoom: 3,\n minSize: 256,\n minZoom: 1,\n maxZoom: 19,\n markers: [],\n markerDefaults: {\n shape: 'pinTarget',\n tooltip: { position: 'top' }\n },\n wraparound: true\n },\n events: [\n 'beforeReset',\n 'click',\n 'markerActivate',\n 'markerClick',\n 'markerCreated',\n 'pan',\n 'panEnd',\n 'reset',\n 'shapeClick',\n 'shapeCreated',\n 'shapeFeatureCreated',\n 'shapeMouseEnter',\n 'shapeMouseLeave',\n 'zoomEnd',\n 'zoomStart'\n ],\n destroy: function () {\n this.scroller.destroy();\n if (this.navigator) {\n this.navigator.destroy();\n }\n if (this.attribution) {\n this.attribution.destroy();\n }\n if (this.zoomControl) {\n this.zoomControl.destroy();\n }\n this.markers.destroy();\n for (var i = 0; i < this.layers.length; i++) {\n this.layers[i].destroy();\n }\n Widget.fn.destroy.call(this);\n },\n zoom: function (level) {\n var options = this.options;\n if (defined(level)) {\n level = math.round(limit(level, options.minZoom, options.maxZoom));\n if (options.zoom !== level) {\n options.zoom = level;\n this._reset();\n }\n return this;\n } else {\n return options.zoom;\n }\n },\n center: function (center) {\n if (center) {\n this.options.center = Location.create(center).toArray();\n this._reset();\n return this;\n } else {\n return Location.create(this.options.center);\n }\n },\n extent: function (extent) {\n if (extent) {\n this._setExtent(extent);\n return this;\n } else {\n return this._getExtent();\n }\n },\n setOptions: function (options) {\n Widget.fn.setOptions.call(this, options);\n this._reset();\n },\n locationToLayer: function (location, zoom) {\n var clamp = !this.options.wraparound;\n location = Location.create(location);\n return this.crs.toPoint(location, this._layerSize(zoom), clamp);\n },\n layerToLocation: function (point, zoom) {\n var clamp = !this.options.wraparound;\n point = Point.create(point);\n return this.crs.toLocation(point, this._layerSize(zoom), clamp);\n },\n locationToView: function (location) {\n location = Location.create(location);\n var origin = this.locationToLayer(this._viewOrigin);\n var point = this.locationToLayer(location);\n return point.translateWith(origin.scale(-1));\n },\n viewToLocation: function (point, zoom) {\n var origin = this.locationToLayer(this._getOrigin(), zoom);\n point = Point.create(point);\n point = point.clone().translateWith(origin);\n return this.layerToLocation(point, zoom);\n },\n eventOffset: function (e) {\n var offset = this.element.offset();\n var event = e.originalEvent || e;\n var x = valueOrDefault(event.pageX, event.clientX) - offset.left;\n var y = valueOrDefault(event.pageY, event.clientY) - offset.top;\n return new g.Point(x, y);\n },\n eventToView: function (e) {\n var cursor = this.eventOffset(e);\n return this.locationToView(this.viewToLocation(cursor));\n },\n eventToLayer: function (e) {\n return this.locationToLayer(this.eventToLocation(e));\n },\n eventToLocation: function (e) {\n var cursor = this.eventOffset(e);\n return this.viewToLocation(cursor);\n },\n viewSize: function () {\n var element = this.element;\n var scale = this._layerSize();\n var width = element.width();\n if (!this.options.wraparound) {\n width = min(scale, width);\n }\n return {\n width: width,\n height: min(scale, element.height())\n };\n },\n exportVisual: function () {\n this._reset();\n return false;\n },\n _setOrigin: function (origin, zoom) {\n var size = this.viewSize(), topLeft;\n origin = this._origin = Location.create(origin);\n topLeft = this.locationToLayer(origin, zoom);\n topLeft.x += size.width / 2;\n topLeft.y += size.height / 2;\n this.options.center = this.layerToLocation(topLeft, zoom).toArray();\n return this;\n },\n _getOrigin: function (invalidate) {\n var size = this.viewSize(), topLeft;\n if (invalidate || !this._origin) {\n topLeft = this.locationToLayer(this.center());\n topLeft.x -= size.width / 2;\n topLeft.y -= size.height / 2;\n this._origin = this.layerToLocation(topLeft);\n }\n return this._origin;\n },\n _setExtent: function (extent) {\n extent = Extent.create(extent);\n this.center(extent.center());\n var width = this.element.width();\n var height = this.element.height();\n for (var zoom = this.options.maxZoom; zoom >= this.options.minZoom; zoom--) {\n var nw = this.locationToLayer(extent.nw, zoom);\n var se = this.locationToLayer(extent.se, zoom);\n var layerWidth = math.abs(se.x - nw.x);\n var layerHeight = math.abs(se.y - nw.y);\n if (layerWidth <= width && layerHeight <= height) {\n break;\n }\n }\n this.zoom(zoom);\n },\n _getExtent: function () {\n var nw = this._getOrigin();\n var bottomRight = this.locationToLayer(nw);\n var size = this.viewSize();\n bottomRight.x += size.width;\n bottomRight.y += size.height;\n var se = this.layerToLocation(bottomRight);\n return new Extent(nw, se);\n },\n _zoomAround: function (pivot, level) {\n this._setOrigin(this.layerToLocation(pivot, level), level);\n this.zoom(level);\n },\n _initControls: function () {\n var controls = this.options.controls;\n if (ui.Attribution && controls.attribution) {\n this._createAttribution(controls.attribution);\n }\n if (!kendo.support.mobileOS) {\n if (ui.Navigator && controls.navigator) {\n this._createNavigator(controls.navigator);\n }\n if (ui.ZoomControl && controls.zoom) {\n this._createZoomControl(controls.zoom);\n }\n }\n },\n _createControlElement: function (options, defaultPos) {\n var pos = options.position || defaultPos;\n var posSelector = '.' + renderPos(pos).replace(' ', '.');\n var wrap = $('.k-map-controls' + posSelector, this.element);\n if (wrap.length === 0) {\n wrap = $('