From 5f9fa9ab5f2642eb55c5de8637aa18889a943afe Mon Sep 17 00:00:00 2001
From: Lene Wasskog <lene.wasskog@nibio.no>
Date: Thu, 16 Jan 2025 10:14:07 +0100
Subject: [PATCH] build: OpenLayers 4.6.5 -> 5.3.3

Change from ol.Attribution to ol.control.Attribution
---
 VIPSWeb/static/css/3rdparty/ol.css            |     3 +-
 VIPSWeb/static/css/3rdparty/ol.css.map        |     1 +
 VIPSWeb/static/js/3rdparty/ol-debug.js        | 96044 ----------------
 VIPSWeb/static/js/3rdparty/ol.js              |  1081 +-
 VIPSWeb/static/js/3rdparty/ol.js.map          |     1 +
 VIPSWeb/static/js/frontpageMap.js             |     2 +-
 .../static/js/weatherStationSelectorMap.js    |     2 +-
 .../static/applefruitmoth/js/map.js           |     4 +-
 .../static/observations/js/observationList.js |     4 +-
 .../observations/js/observationViewMap.js     |     4 +-
 spatial/static/spatial/js/gridmap.js          |     2 +-
 spatial/static/spatial/js/spatialMap.js       |     2 +-
 spatial/templates/spatial/gridmap.html        |     8 +-
 13 files changed, 26 insertions(+), 97132 deletions(-)
 create mode 100644 VIPSWeb/static/css/3rdparty/ol.css.map
 delete mode 100644 VIPSWeb/static/js/3rdparty/ol-debug.js
 create mode 100644 VIPSWeb/static/js/3rdparty/ol.js.map

diff --git a/VIPSWeb/static/css/3rdparty/ol.css b/VIPSWeb/static/css/3rdparty/ol.css
index 17197261..b798e8f5 100644
--- a/VIPSWeb/static/css/3rdparty/ol.css
+++ b/VIPSWeb/static/css/3rdparty/ol.css
@@ -1 +1,2 @@
-.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width}.ol-overlay-container{will-change:left,right,top,bottom}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}@media print{.ol-control{display:none}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none;line-height:inherit}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution.ol-logo-only ul{display:block}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em}.ol-attribution.ol-logo-only{background:0 0;bottom:.4em;height:1.1em;line-height:1em}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-logo-only button,.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
\ No newline at end of file
+.ol-box{box-sizing:border-box;border-radius:2px;border:2px solid #00f}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:rgba(0,60,136,.3);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid #eee;border-top:none;color:#eee;font-size:10px;text-align:center;margin:1px;will-change:contents,width}.ol-overlay-container{will-change:left,right,top,bottom}.ol-unsupported{display:none}.ol-unselectable,.ol-viewport{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:rgba(255,255,255,.4);border-radius:4px;padding:2px}.ol-control:hover{background-color:rgba(255,255,255,.6)}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}@media print{.ol-control{display:none}}.ol-control button{display:block;margin:1px;padding:0;color:#fff;font-size:1.14em;font-weight:700;text-decoration:none;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:rgba(0,60,136,.5);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;font-size:1.2em;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:focus,.ol-control button:hover{text-decoration:none;background-color:rgba(0,60,136,.7)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em)}.ol-attribution ul{margin:0;padding:0 .5em;font-size:.7rem;line-height:1.375em;color:#000;text-shadow:0 0 2px #fff}.ol-attribution li{display:inline;list-style:none;line-height:inherit}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button,.ol-attribution ul{display:inline-block}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0;height:1.1em;line-height:1em}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:inline-block}.ol-overviewmap .ol-overviewmap-map{border:1px solid #7b98bc;height:150px;margin:2px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:1px;left:2px;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:rgba(255,255,255,.8)}.ol-overviewmap-box{border:2px dotted rgba(0,60,136,.7)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move}
+/*# sourceMappingURL=ol.css.map */
\ No newline at end of file
diff --git a/VIPSWeb/static/css/3rdparty/ol.css.map b/VIPSWeb/static/css/3rdparty/ol.css.map
new file mode 100644
index 00000000..1d509975
--- /dev/null
+++ b/VIPSWeb/static/css/3rdparty/ol.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["src/ol/ol.css"],"names":[],"mappings":"AAAA,QACE,WAAY,WACZ,cAAe,IACf,OAAQ,IAAI,MAAM,KAGpB,mBACE,IAAK,IACL,MAAO,IACP,SAAU,SAGZ,eACE,WAAY,kBACZ,cAAe,IACf,OAAQ,IACR,KAAM,IACN,QAAS,IACT,SAAU,SAEZ,qBACE,OAAQ,IAAI,MAAM,KAClB,WAAY,KACZ,MAAO,KACP,UAAW,KACX,WAAY,OACZ,OAAQ,IACR,YAAa,QAAQ,CAAE,MAEzB,sBACE,YAAa,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAG9B,gBACE,QAAS,KAEG,iBAAd,aACE,sBAAuB,KACvB,oB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IACZ,UAAW,QACX,eAAgB,OAEE,uBAApB,mBACE,QAAS,aAEX,gCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,iCACE,OAAQ,EACR,MAAO,EACP,cAAe,IAAI,EAAE,EACrB,OAAQ,MACR,YAAa,IAEf,qCACE,WAAY,MACZ,WAAY,MAEd,wCACE,QAAS,KAGX,eACE,IAAK,MACL,KAAM,KACN,OAAQ,MAEV,sBACE,SAAU,SACV,OAAQ,KAGV,yBACE,IAAK,MAGP,gBACE,KAAM,KACN,OAAQ,KAEV,iCACE,OAAQ,EACR,KAAM,EACN,cAAe,EAAE,IAAI,EAAE,EAEzB,oCACA,uBACE,QAAS,aAEX,oCACE,OAAQ,IAAI,MAAM,QAClB,OAAQ,MACR,OAAQ,IACR,MAAO,MAET,0CACE,OAAQ,IACR,KAAM,IACN,SAAU,SAEZ,iDACA,wCACE,QAAS,KAEX,mCACE,WAAY,qBAEd,oBACE,OAAQ,IAAI,OAAO,kBAGrB,0CACE,OAAQ"}
\ No newline at end of file
diff --git a/VIPSWeb/static/js/3rdparty/ol-debug.js b/VIPSWeb/static/js/3rdparty/ol-debug.js
deleted file mode 100644
index eab35d60..00000000
--- a/VIPSWeb/static/js/3rdparty/ol-debug.js
+++ /dev/null
@@ -1,96044 +0,0 @@
-// OpenLayers. See https://openlayers.org/
-// License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md
-// Version: v4.6.5
-;(function (root, factory) {
-  if (typeof exports === "object") {
-    module.exports = factory();
-  } else if (typeof define === "function" && define.amd) {
-    define([], factory);
-  } else {
-    root.ol = factory();
-  }
-}(this, function () {
-  var OPENLAYERS = {};
-  var goog = this.goog = {};
-this.CLOSURE_NO_DEPS = true;
-// Copyright 2006 The Closure Library Authors. All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS-IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-/**
- * @fileoverview Bootstrap for the Google JS Library (Closure).
- *
- * In uncompiled mode base.js will attempt to load Closure's deps file, unless
- * the global <code>CLOSURE_NO_DEPS</code> is set to true.  This allows projects
- * to include their own deps file(s) from different locations.
- *
- * Avoid including base.js more than once. This is strictly discouraged and not
- * supported. goog.require(...) won't work properly in that case.
- *
- * @provideGoog
- */
-
-
-/**
- * @define {boolean} Overridden to true by the compiler.
- */
-var COMPILED = false;
-
-
-/**
- * Base namespace for the Closure library.  Checks to see goog is already
- * defined in the current scope before assigning to prevent clobbering if
- * base.js is loaded more than once.
- *
- * @const
- */
-var goog = goog || {};
-
-
-/**
- * Reference to the global context.  In most cases this will be 'window'.
- */
-goog.global = this;
-
-
-/**
- * A hook for overriding the define values in uncompiled mode.
- *
- * In uncompiled mode, {@code CLOSURE_UNCOMPILED_DEFINES} may be defined before
- * loading base.js.  If a key is defined in {@code CLOSURE_UNCOMPILED_DEFINES},
- * {@code goog.define} will use the value instead of the default value.  This
- * allows flags to be overwritten without compilation (this is normally
- * accomplished with the compiler's "define" flag).
- *
- * Example:
- * <pre>
- *   var CLOSURE_UNCOMPILED_DEFINES = {'goog.DEBUG': false};
- * </pre>
- *
- * @type {Object<string, (string|number|boolean)>|undefined}
- */
-goog.global.CLOSURE_UNCOMPILED_DEFINES;
-
-
-/**
- * A hook for overriding the define values in uncompiled or compiled mode,
- * like CLOSURE_UNCOMPILED_DEFINES but effective in compiled code.  In
- * uncompiled code CLOSURE_UNCOMPILED_DEFINES takes precedence.
- *
- * Also unlike CLOSURE_UNCOMPILED_DEFINES the values must be number, boolean or
- * string literals or the compiler will emit an error.
- *
- * While any @define value may be set, only those set with goog.define will be
- * effective for uncompiled code.
- *
- * Example:
- * <pre>
- *   var CLOSURE_DEFINES = {'goog.DEBUG': false} ;
- * </pre>
- *
- * @type {Object<string, (string|number|boolean)>|undefined}
- */
-goog.global.CLOSURE_DEFINES;
-
-
-/**
- * Returns true if the specified value is not undefined.
- *
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is defined.
- */
-goog.isDef = function(val) {
-  // void 0 always evaluates to undefined and hence we do not need to depend on
-  // the definition of the global variable named 'undefined'.
-  return val !== void 0;
-};
-
-/**
- * Returns true if the specified value is a string.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a string.
- */
-goog.isString = function(val) {
-  return typeof val == 'string';
-};
-
-
-/**
- * Returns true if the specified value is a boolean.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is boolean.
- */
-goog.isBoolean = function(val) {
-  return typeof val == 'boolean';
-};
-
-
-/**
- * Returns true if the specified value is a number.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a number.
- */
-goog.isNumber = function(val) {
-  return typeof val == 'number';
-};
-
-
-/**
- * Builds an object structure for the provided namespace path, ensuring that
- * names that already exist are not overwritten. For example:
- * "a.b.c" -> a = {};a.b={};a.b.c={};
- * Used by goog.provide and goog.exportSymbol.
- * @param {string} name name of the object that this file defines.
- * @param {*=} opt_object the object to expose at the end of the path.
- * @param {Object=} opt_objectToExportTo The object to add the path to; default
- *     is `goog.global`.
- * @private
- */
-goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
-  var parts = name.split('.');
-  var cur = opt_objectToExportTo || goog.global;
-
-  // Internet Explorer exhibits strange behavior when throwing errors from
-  // methods externed in this manner.  See the testExportSymbolExceptions in
-  // base_test.html for an example.
-  if (!(parts[0] in cur) && cur.execScript) {
-    cur.execScript('var ' + parts[0]);
-  }
-
-  for (var part; parts.length && (part = parts.shift());) {
-    if (!parts.length && goog.isDef(opt_object)) {
-      // last part and we have an object; use it
-      cur[part] = opt_object;
-    } else if (cur[part] && cur[part] !== Object.prototype[part]) {
-      cur = cur[part];
-    } else {
-      cur = cur[part] = {};
-    }
-  }
-};
-
-
-/**
- * Defines a named value. In uncompiled mode, the value is retrieved from
- * CLOSURE_DEFINES or CLOSURE_UNCOMPILED_DEFINES if the object is defined and
- * has the property specified, and otherwise used the defined defaultValue.
- * When compiled the default can be overridden using the compiler
- * options or the value set in the CLOSURE_DEFINES object.
- *
- * @param {string} name The distinguished name to provide.
- * @param {string|number|boolean} defaultValue
- */
-goog.define = function(name, defaultValue) {
-  var value = defaultValue;
-  if (!COMPILED) {
-    if (goog.global.CLOSURE_UNCOMPILED_DEFINES &&
-        // Anti DOM-clobbering runtime check (b/37736576).
-        /** @type {?} */ (goog.global.CLOSURE_UNCOMPILED_DEFINES).nodeType ===
-            undefined &&
-        Object.prototype.hasOwnProperty.call(
-            goog.global.CLOSURE_UNCOMPILED_DEFINES, name)) {
-      value = goog.global.CLOSURE_UNCOMPILED_DEFINES[name];
-    } else if (
-        goog.global.CLOSURE_DEFINES &&
-        // Anti DOM-clobbering runtime check (b/37736576).
-        /** @type {?} */ (goog.global.CLOSURE_DEFINES).nodeType === undefined &&
-        Object.prototype.hasOwnProperty.call(
-            goog.global.CLOSURE_DEFINES, name)) {
-      value = goog.global.CLOSURE_DEFINES[name];
-    }
-  }
-  goog.exportPath_(name, value);
-};
-
-
-/**
- * @define {boolean} DEBUG is provided as a convenience so that debugging code
- * that should not be included in a production. It can be easily stripped
- * by specifying --define goog.DEBUG=false to the Closure Compiler aka
- * JSCompiler. For example, most toString() methods should be declared inside an
- * "if (goog.DEBUG)" conditional because they are generally used for debugging
- * purposes and it is difficult for the JSCompiler to statically determine
- * whether they are used.
- */
-goog.define('goog.DEBUG', true);
-
-
-/**
- * @define {string} LOCALE defines the locale being used for compilation. It is
- * used to select locale specific data to be compiled in js binary. BUILD rule
- * can specify this value by "--define goog.LOCALE=<locale_name>" as a compiler
- * option.
- *
- * Take into account that the locale code format is important. You should use
- * the canonical Unicode format with hyphen as a delimiter. Language must be
- * lowercase, Language Script - Capitalized, Region - UPPERCASE.
- * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN.
- *
- * See more info about locale codes here:
- * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers
- *
- * For language codes you should use values defined by ISO 693-1. See it here
- * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from
- * this rule: the Hebrew language. For legacy reasons the old code (iw) should
- * be used instead of the new code (he).
- *
- */
-goog.define('goog.LOCALE', 'en');  // default to en
-
-
-/**
- * @define {boolean} Whether this code is running on trusted sites.
- *
- * On untrusted sites, several native functions can be defined or overridden by
- * external libraries like Prototype, Datejs, and JQuery and setting this flag
- * to false forces closure to use its own implementations when possible.
- *
- * If your JavaScript can be loaded by a third party site and you are wary about
- * relying on non-standard implementations, specify
- * "--define goog.TRUSTED_SITE=false" to the compiler.
- */
-goog.define('goog.TRUSTED_SITE', true);
-
-
-/**
- * @define {boolean} Whether a project is expected to be running in strict mode.
- *
- * This define can be used to trigger alternate implementations compatible with
- * running in EcmaScript Strict mode or warn about unavailable functionality.
- * @see https://goo.gl/PudQ4y
- *
- */
-goog.define('goog.STRICT_MODE_COMPATIBLE', false);
-
-
-/**
- * @define {boolean} Whether code that calls {@link goog.setTestOnly} should
- *     be disallowed in the compilation unit.
- */
-goog.define('goog.DISALLOW_TEST_ONLY_CODE', COMPILED && !goog.DEBUG);
-
-
-/**
- * @define {boolean} Whether to use a Chrome app CSP-compliant method for
- *     loading scripts via goog.require. @see appendScriptSrcNode_.
- */
-goog.define('goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING', false);
-
-
-/**
- * Defines a namespace in Closure.
- *
- * A namespace may only be defined once in a codebase. It may be defined using
- * goog.provide() or goog.module().
- *
- * The presence of one or more goog.provide() calls in a file indicates
- * that the file defines the given objects/namespaces.
- * Provided symbols must not be null or undefined.
- *
- * In addition, goog.provide() creates the object stubs for a namespace
- * (for example, goog.provide("goog.foo.bar") will create the object
- * goog.foo.bar if it does not already exist).
- *
- * Build tools also scan for provide/require/module statements
- * to discern dependencies, build dependency files (see deps.js), etc.
- *
- * @see goog.require
- * @see goog.module
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part".
- */
-goog.provide = function(name) {
-  if (goog.isInModuleLoader_()) {
-    throw new Error('goog.provide can not be used within a goog.module.');
-  }
-  if (!COMPILED) {
-    // Ensure that the same namespace isn't provided twice.
-    // A goog.module/goog.provide maps a goog.require to a specific file
-    if (goog.isProvided_(name)) {
-      throw new Error('Namespace "' + name + '" already declared.');
-    }
-  }
-
-  goog.constructNamespace_(name);
-};
-
-
-/**
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part".
- * @param {Object=} opt_obj The object to embed in the namespace.
- * @private
- */
-goog.constructNamespace_ = function(name, opt_obj) {
-  if (!COMPILED) {
-    delete goog.implicitNamespaces_[name];
-
-    var namespace = name;
-    while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) {
-      if (goog.getObjectByName(namespace)) {
-        break;
-      }
-      goog.implicitNamespaces_[namespace] = true;
-    }
-  }
-
-  goog.exportPath_(name, opt_obj);
-};
-
-
-/**
- * Module identifier validation regexp.
- * Note: This is a conservative check, it is very possible to be more lenient,
- *   the primary exclusion here is "/" and "\" and a leading ".", these
- *   restrictions are intended to leave the door open for using goog.require
- *   with relative file paths rather than module identifiers.
- * @private
- */
-goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
-
-
-/**
- * Defines a module in Closure.
- *
- * Marks that this file must be loaded as a module and claims the namespace.
- *
- * A namespace may only be defined once in a codebase. It may be defined using
- * goog.provide() or goog.module().
- *
- * goog.module() has three requirements:
- * - goog.module may not be used in the same file as goog.provide.
- * - goog.module must be the first statement in the file.
- * - only one goog.module is allowed per file.
- *
- * When a goog.module annotated file is loaded, it is enclosed in
- * a strict function closure. This means that:
- * - any variables declared in a goog.module file are private to the file
- * (not global), though the compiler is expected to inline the module.
- * - The code must obey all the rules of "strict" JavaScript.
- * - the file will be marked as "use strict"
- *
- * NOTE: unlike goog.provide, goog.module does not declare any symbols by
- * itself. If declared symbols are desired, use
- * goog.module.declareLegacyNamespace().
- *
- *
- * See the public goog.module proposal: http://goo.gl/Va1hin
- *
- * @param {string} name Namespace provided by this file in the form
- *     "goog.package.part", is expected but not required.
- * @return {void}
- */
-goog.module = function(name) {
-  if (!goog.isString(name) || !name ||
-      name.search(goog.VALID_MODULE_RE_) == -1) {
-    throw new Error('Invalid module identifier');
-  }
-  if (!goog.isInModuleLoader_()) {
-    throw new Error(
-        'Module ' + name + ' has been loaded incorrectly. Note, ' +
-        'modules cannot be loaded as normal scripts. They require some kind of ' +
-        'pre-processing step. You\'re likely trying to load a module via a ' +
-        'script tag or as a part of a concatenated bundle without rewriting the ' +
-        'module. For more info see: ' +
-        'https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.');
-  }
-  if (goog.moduleLoaderState_.moduleName) {
-    throw new Error('goog.module may only be called once per module.');
-  }
-
-  // Store the module name for the loader.
-  goog.moduleLoaderState_.moduleName = name;
-  if (!COMPILED) {
-    // Ensure that the same namespace isn't provided twice.
-    // A goog.module/goog.provide maps a goog.require to a specific file
-    if (goog.isProvided_(name)) {
-      throw new Error('Namespace "' + name + '" already declared.');
-    }
-    delete goog.implicitNamespaces_[name];
-  }
-};
-
-
-/**
- * @param {string} name The module identifier.
- * @return {?} The module exports for an already loaded module or null.
- *
- * Note: This is not an alternative to goog.require, it does not
- * indicate a hard dependency, instead it is used to indicate
- * an optional dependency or to access the exports of a module
- * that has already been loaded.
- * @suppress {missingProvide}
- */
-goog.module.get = function(name) {
-  return goog.module.getInternal_(name);
-};
-
-
-/**
- * @param {string} name The module identifier.
- * @return {?} The module exports for an already loaded module or null.
- * @private
- */
-goog.module.getInternal_ = function(name) {
-  if (!COMPILED) {
-    if (name in goog.loadedModules_) {
-      return goog.loadedModules_[name];
-    } else if (!goog.implicitNamespaces_[name]) {
-      var ns = goog.getObjectByName(name);
-      return ns != null ? ns : null;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @private {?{moduleName: (string|undefined), declareLegacyNamespace:boolean}}
- */
-goog.moduleLoaderState_ = null;
-
-
-/**
- * @private
- * @return {boolean} Whether a goog.module is currently being initialized.
- */
-goog.isInModuleLoader_ = function() {
-  return goog.moduleLoaderState_ != null;
-};
-
-
-/**
- * Provide the module's exports as a globally accessible object under the
- * module's declared name.  This is intended to ease migration to goog.module
- * for files that have existing usages.
- * @suppress {missingProvide}
- */
-goog.module.declareLegacyNamespace = function() {
-  if (!COMPILED && !goog.isInModuleLoader_()) {
-    throw new Error(
-        'goog.module.declareLegacyNamespace must be called from ' +
-        'within a goog.module');
-  }
-  if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
-    throw new Error(
-        'goog.module must be called prior to ' +
-        'goog.module.declareLegacyNamespace.');
-  }
-  goog.moduleLoaderState_.declareLegacyNamespace = true;
-};
-
-
-/**
- * Marks that the current file should only be used for testing, and never for
- * live code in production.
- *
- * In the case of unit tests, the message may optionally be an exact namespace
- * for the test (e.g. 'goog.stringTest'). The linter will then ignore the extra
- * provide (if not explicitly defined in the code).
- *
- * @param {string=} opt_message Optional message to add to the error that's
- *     raised when used in production code.
- */
-goog.setTestOnly = function(opt_message) {
-  if (goog.DISALLOW_TEST_ONLY_CODE) {
-    opt_message = opt_message || '';
-    throw new Error(
-        'Importing test-only code into non-debug environment' +
-        (opt_message ? ': ' + opt_message : '.'));
-  }
-};
-
-
-/**
- * Forward declares a symbol. This is an indication to the compiler that the
- * symbol may be used in the source yet is not required and may not be provided
- * in compilation.
- *
- * The most common usage of forward declaration is code that takes a type as a
- * function parameter but does not need to require it. By forward declaring
- * instead of requiring, no hard dependency is made, and (if not required
- * elsewhere) the namespace may never be required and thus, not be pulled
- * into the JavaScript binary. If it is required elsewhere, it will be type
- * checked as normal.
- *
- * Before using goog.forwardDeclare, please read the documentation at
- * https://github.com/google/closure-compiler/wiki/Bad-Type-Annotation to
- * understand the options and tradeoffs when working with forward declarations.
- *
- * @param {string} name The namespace to forward declare in the form of
- *     "goog.package.part".
- */
-goog.forwardDeclare = function(name) {};
-
-
-/**
- * Forward declare type information. Used to assign types to goog.global
- * referenced object that would otherwise result in unknown type references
- * and thus block property disambiguation.
- */
-goog.forwardDeclare('Document');
-goog.forwardDeclare('HTMLScriptElement');
-goog.forwardDeclare('XMLHttpRequest');
-
-
-if (!COMPILED) {
-  /**
-   * Check if the given name has been goog.provided. This will return false for
-   * names that are available only as implicit namespaces.
-   * @param {string} name name of the object to look for.
-   * @return {boolean} Whether the name has been provided.
-   * @private
-   */
-  goog.isProvided_ = function(name) {
-    return (name in goog.loadedModules_) ||
-        (!goog.implicitNamespaces_[name] &&
-         goog.isDefAndNotNull(goog.getObjectByName(name)));
-  };
-
-  /**
-   * Namespaces implicitly defined by goog.provide. For example,
-   * goog.provide('goog.events.Event') implicitly declares that 'goog' and
-   * 'goog.events' must be namespaces.
-   *
-   * @type {!Object<string, (boolean|undefined)>}
-   * @private
-   */
-  goog.implicitNamespaces_ = {'goog.module': true};
-
-  // NOTE: We add goog.module as an implicit namespace as goog.module is defined
-  // here and because the existing module package has not been moved yet out of
-  // the goog.module namespace. This satisifies both the debug loader and
-  // ahead-of-time dependency management.
-}
-
-
-/**
- * Returns an object based on its fully qualified external name.  The object
- * is not found if null or undefined.  If you are using a compilation pass that
- * renames property names beware that using this function will not find renamed
- * properties.
- *
- * @param {string} name The fully qualified name.
- * @param {Object=} opt_obj The object within which to look; default is
- *     |goog.global|.
- * @return {?} The value (object or primitive) or, if not found, null.
- */
-goog.getObjectByName = function(name, opt_obj) {
-  var parts = name.split('.');
-  var cur = opt_obj || goog.global;
-  for (var i = 0; i < parts.length; i++) {
-    cur = cur[parts[i]];
-    if (!goog.isDefAndNotNull(cur)) {
-      return null;
-    }
-  }
-  return cur;
-};
-
-
-/**
- * Globalizes a whole namespace, such as goog or goog.lang.
- *
- * @param {!Object} obj The namespace to globalize.
- * @param {Object=} opt_global The object to add the properties to.
- * @deprecated Properties may be explicitly exported to the global scope, but
- *     this should no longer be done in bulk.
- */
-goog.globalize = function(obj, opt_global) {
-  var global = opt_global || goog.global;
-  for (var x in obj) {
-    global[x] = obj[x];
-  }
-};
-
-
-/**
- * Adds a dependency from a file to the files it requires.
- * @param {string} relPath The path to the js file.
- * @param {!Array<string>} provides An array of strings with
- *     the names of the objects this file provides.
- * @param {!Array<string>} requires An array of strings with
- *     the names of the objects this file requires.
- * @param {boolean|!Object<string>=} opt_loadFlags Parameters indicating
- *     how the file must be loaded.  The boolean 'true' is equivalent
- *     to {'module': 'goog'} for backwards-compatibility.  Valid properties
- *     and values include {'module': 'goog'} and {'lang': 'es6'}.
- */
-goog.addDependency = function(relPath, provides, requires, opt_loadFlags) {
-  if (goog.DEPENDENCIES_ENABLED) {
-    var provide, require;
-    var path = relPath.replace(/\\/g, '/');
-    var deps = goog.dependencies_;
-    if (!opt_loadFlags || typeof opt_loadFlags === 'boolean') {
-      opt_loadFlags = opt_loadFlags ? {'module': 'goog'} : {};
-    }
-    for (var i = 0; provide = provides[i]; i++) {
-      deps.nameToPath[provide] = path;
-      deps.loadFlags[path] = opt_loadFlags;
-    }
-    for (var j = 0; require = requires[j]; j++) {
-      if (!(path in deps.requires)) {
-        deps.requires[path] = {};
-      }
-      deps.requires[path][require] = true;
-    }
-  }
-};
-
-
-
-
-// NOTE(nnaze): The debug DOM loader was included in base.js as an original way
-// to do "debug-mode" development.  The dependency system can sometimes be
-// confusing, as can the debug DOM loader's asynchronous nature.
-//
-// With the DOM loader, a call to goog.require() is not blocking -- the script
-// will not load until some point after the current script.  If a namespace is
-// needed at runtime, it needs to be defined in a previous script, or loaded via
-// require() with its registered dependencies.
-//
-// User-defined namespaces may need their own deps file. For a reference on
-// creating a deps file, see:
-// Externally: https://developers.google.com/closure/library/docs/depswriter
-//
-// Because of legacy clients, the DOM loader can't be easily removed from
-// base.js.  Work was done to make it disableable or replaceable for
-// different environments (DOM-less JavaScript interpreters like Rhino or V8,
-// for example). See bootstrap/ for more information.
-
-
-/**
- * @define {boolean} Whether to enable the debug loader.
- *
- * If enabled, a call to goog.require() will attempt to load the namespace by
- * appending a script tag to the DOM (if the namespace has been registered).
- *
- * If disabled, goog.require() will simply assert that the namespace has been
- * provided (and depend on the fact that some outside tool correctly ordered
- * the script).
- */
-goog.define('goog.ENABLE_DEBUG_LOADER', true);
-
-
-/**
- * @param {string} msg
- * @private
- */
-goog.logToConsole_ = function(msg) {
-  if (goog.global.console) {
-    goog.global.console['error'](msg);
-  }
-};
-
-
-/**
- * Implements a system for the dynamic resolution of dependencies that works in
- * parallel with the BUILD system. Note that all calls to goog.require will be
- * stripped by the compiler.
- * @see goog.provide
- * @param {string} name Namespace to include (as was given in goog.provide()) in
- *     the form "goog.package.part".
- * @return {?} If called within a goog.module file, the associated namespace or
- *     module otherwise null.
- */
-goog.require = function(name) {
-  // If the object already exists we do not need to do anything.
-  if (!COMPILED) {
-    if (goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_) {
-      goog.maybeProcessDeferredDep_(name);
-    }
-
-    if (goog.isProvided_(name)) {
-      if (goog.isInModuleLoader_()) {
-        return goog.module.getInternal_(name);
-      }
-    } else if (goog.ENABLE_DEBUG_LOADER) {
-      var path = goog.getPathFromDeps_(name);
-      if (path) {
-        goog.writeScripts_(path);
-      } else {
-        var errorMessage = 'goog.require could not find: ' + name;
-        goog.logToConsole_(errorMessage);
-
-        throw new Error(errorMessage);
-      }
-    }
-
-    return null;
-  }
-};
-
-
-/**
- * Path for included scripts.
- * @type {string}
- */
-goog.basePath = '';
-
-
-/**
- * A hook for overriding the base path.
- * @type {string|undefined}
- */
-goog.global.CLOSURE_BASE_PATH;
-
-
-/**
- * Whether to attempt to load Closure's deps file. By default, when uncompiled,
- * deps files will attempt to be loaded.
- * @type {boolean|undefined}
- */
-goog.global.CLOSURE_NO_DEPS;
-
-
-/**
- * A function to import a single script. This is meant to be overridden when
- * Closure is being run in non-HTML contexts, such as web workers. It's defined
- * in the global scope so that it can be set before base.js is loaded, which
- * allows deps.js to be imported properly.
- *
- * The function is passed the script source, which is a relative URI. It should
- * return true if the script was imported, false otherwise.
- * @type {(function(string): boolean)|undefined}
- */
-goog.global.CLOSURE_IMPORT_SCRIPT;
-
-
-/**
- * Null function used for default values of callbacks, etc.
- * @return {void} Nothing.
- */
-goog.nullFunction = function() {};
-
-
-/**
- * When defining a class Foo with an abstract method bar(), you can do:
- * Foo.prototype.bar = goog.abstractMethod
- *
- * Now if a subclass of Foo fails to override bar(), an error will be thrown
- * when bar() is invoked.
- *
- * @type {!Function}
- * @throws {Error} when invoked to indicate the method should be overridden.
- */
-goog.abstractMethod = function() {
-  throw new Error('unimplemented abstract method');
-};
-
-
-/**
- * Adds a {@code getInstance} static method that always returns the same
- * instance object.
- * @param {!Function} ctor The constructor for the class to add the static
- *     method to.
- */
-goog.addSingletonGetter = function(ctor) {
-  // instance_ is immediately set to prevent issues with sealed constructors
-  // such as are encountered when a constructor is returned as the export object
-  // of a goog.module in unoptimized code.
-  ctor.instance_ = undefined;
-  ctor.getInstance = function() {
-    if (ctor.instance_) {
-      return ctor.instance_;
-    }
-    if (goog.DEBUG) {
-      // NOTE: JSCompiler can't optimize away Array#push.
-      goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = ctor;
-    }
-    return ctor.instance_ = new ctor;
-  };
-};
-
-
-/**
- * All singleton classes that have been instantiated, for testing. Don't read
- * it directly, use the {@code goog.testing.singleton} module. The compiler
- * removes this variable if unused.
- * @type {!Array<!Function>}
- * @private
- */
-goog.instantiatedSingletons_ = [];
-
-
-/**
- * @define {boolean} Whether to load goog.modules using {@code eval} when using
- * the debug loader.  This provides a better debugging experience as the
- * source is unmodified and can be edited using Chrome Workspaces or similar.
- * However in some environments the use of {@code eval} is banned
- * so we provide an alternative.
- */
-goog.define('goog.LOAD_MODULE_USING_EVAL', true);
-
-
-/**
- * @define {boolean} Whether the exports of goog.modules should be sealed when
- * possible.
- */
-goog.define('goog.SEAL_MODULE_EXPORTS', goog.DEBUG);
-
-
-/**
- * The registry of initialized modules:
- * the module identifier to module exports map.
- * @private @const {!Object<string, ?>}
- */
-goog.loadedModules_ = {};
-
-
-/**
- * True if goog.dependencies_ is available.
- * @const {boolean}
- */
-goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
-
-
-/**
- * @define {string} How to decide whether to transpile.  Valid values
- * are 'always', 'never', and 'detect'.  The default ('detect') is to
- * use feature detection to determine which language levels need
- * transpilation.
- */
-// NOTE(user): we could expand this to accept a language level to bypass
-// detection: e.g. goog.TRANSPILE == 'es5' would transpile ES6 files but
-// would leave ES3 and ES5 files alone.
-goog.define('goog.TRANSPILE', 'detect');
-
-
-/**
- * @define {string} Path to the transpiler.  Executing the script at this
- * path (relative to base.js) should define a function $jscomp.transpile.
- */
-goog.define('goog.TRANSPILER', 'transpile.js');
-
-
-if (goog.DEPENDENCIES_ENABLED) {
-  /**
-   * This object is used to keep track of dependencies and other data that is
-   * used for loading scripts.
-   * @private
-   * @type {{
-   *   loadFlags: !Object<string, !Object<string, string>>,
-   *   nameToPath: !Object<string, string>,
-   *   requires: !Object<string, !Object<string, boolean>>,
-   *   visited: !Object<string, boolean>,
-   *   written: !Object<string, boolean>,
-   *   deferred: !Object<string, string>
-   * }}
-   */
-  goog.dependencies_ = {
-    loadFlags: {},  // 1 to 1
-
-    nameToPath: {},  // 1 to 1
-
-    requires: {},  // 1 to many
-
-    // Used when resolving dependencies to prevent us from visiting file twice.
-    visited: {},
-
-    written: {},  // Used to keep track of script files we have written.
-
-    deferred: {}  // Used to track deferred module evaluations in old IEs
-  };
-
-
-  /**
-   * Tries to detect whether is in the context of an HTML document.
-   * @return {boolean} True if it looks like HTML document.
-   * @private
-   */
-  goog.inHtmlDocument_ = function() {
-    /** @type {Document} */
-    var doc = goog.global.document;
-    return doc != null && 'write' in doc;  // XULDocument misses write.
-  };
-
-
-  /**
-   * Tries to detect the base path of base.js script that bootstraps Closure.
-   * @private
-   */
-  goog.findBasePath_ = function() {
-    if (goog.isDef(goog.global.CLOSURE_BASE_PATH) &&
-        // Anti DOM-clobbering runtime check (b/37736576).
-        goog.isString(goog.global.CLOSURE_BASE_PATH)) {
-      goog.basePath = goog.global.CLOSURE_BASE_PATH;
-      return;
-    } else if (!goog.inHtmlDocument_()) {
-      return;
-    }
-    /** @type {Document} */
-    var doc = goog.global.document;
-    // If we have a currentScript available, use it exclusively.
-    var currentScript = doc.currentScript;
-    if (currentScript) {
-      var scripts = [currentScript];
-    } else {
-      var scripts = doc.getElementsByTagName('SCRIPT');
-    }
-    // Search backwards since the current script is in almost all cases the one
-    // that has base.js.
-    for (var i = scripts.length - 1; i >= 0; --i) {
-      var script = /** @type {!HTMLScriptElement} */ (scripts[i]);
-      var src = script.src;
-      var qmark = src.lastIndexOf('?');
-      var l = qmark == -1 ? src.length : qmark;
-      if (src.substr(l - 7, 7) == 'base.js') {
-        goog.basePath = src.substr(0, l - 7);
-        return;
-      }
-    }
-  };
-
-
-  /**
-   * Imports a script if, and only if, that script hasn't already been imported.
-   * (Must be called at execution time)
-   * @param {string} src Script source.
-   * @param {string=} opt_sourceText The optionally source text to evaluate
-   * @private
-   */
-  goog.importScript_ = function(src, opt_sourceText) {
-    var importScript =
-        goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
-    if (importScript(src, opt_sourceText)) {
-      goog.dependencies_.written[src] = true;
-    }
-  };
-
-
-  /**
-   * Whether the browser is IE9 or earlier, which needs special handling
-   * for deferred modules.
-   * @const @private {boolean}
-   */
-  goog.IS_OLD_IE_ =
-      !!(!goog.global.atob && goog.global.document && goog.global.document.all);
-
-
-  /**
-   * Whether IE9 or earlier is waiting on a dependency.  This ensures that
-   * deferred modules that have no non-deferred dependencies actually get
-   * loaded, since if we defer them and then never pull in a non-deferred
-   * script, then `goog.loadQueuedModules_` will never be called.  Instead,
-   * if not waiting on anything we simply don't defer in the first place.
-   * @private {boolean}
-   */
-  goog.oldIeWaiting_ = false;
-
-
-  /**
-   * Given a URL initiate retrieval and execution of a script that needs
-   * pre-processing.
-   * @param {string} src Script source URL.
-   * @param {boolean} isModule Whether this is a goog.module.
-   * @param {boolean} needsTranspile Whether this source needs transpilation.
-   * @private
-   */
-  goog.importProcessedScript_ = function(src, isModule, needsTranspile) {
-    // In an attempt to keep browsers from timing out loading scripts using
-    // synchronous XHRs, put each load in its own script block.
-    var bootstrap = 'goog.retrieveAndExec_("' + src + '", ' + isModule + ', ' +
-        needsTranspile + ');';
-
-    goog.importScript_('', bootstrap);
-  };
-
-
-  /** @private {!Array<string>} */
-  goog.queuedModules_ = [];
-
-
-  /**
-   * Return an appropriate module text. Suitable to insert into
-   * a script tag (that is unescaped).
-   * @param {string} srcUrl
-   * @param {string} scriptText
-   * @return {string}
-   * @private
-   */
-  goog.wrapModule_ = function(srcUrl, scriptText) {
-    if (!goog.LOAD_MODULE_USING_EVAL || !goog.isDef(goog.global.JSON)) {
-      return '' +
-          'goog.loadModule(function(exports) {' +
-          '"use strict";' + scriptText +
-          '\n' +  // terminate any trailing single line comment.
-          ';return exports' +
-          '});' +
-          '\n//# sourceURL=' + srcUrl + '\n';
-    } else {
-      return '' +
-          'goog.loadModule(' +
-          goog.global.JSON.stringify(
-              scriptText + '\n//# sourceURL=' + srcUrl + '\n') +
-          ');';
-    }
-  };
-
-  // On IE9 and earlier, it is necessary to handle
-  // deferred module loads. In later browsers, the
-  // code to be evaluated is simply inserted as a script
-  // block in the correct order. To eval deferred
-  // code at the right time, we piggy back on goog.require to call
-  // goog.maybeProcessDeferredDep_.
-  //
-  // The goog.requires are used both to bootstrap
-  // the loading process (when no deps are available) and
-  // declare that they should be available.
-  //
-  // Here we eval the sources, if all the deps are available
-  // either already eval'd or goog.require'd.  This will
-  // be the case when all the dependencies have already
-  // been loaded, and the dependent module is loaded.
-  //
-  // But this alone isn't sufficient because it is also
-  // necessary to handle the case where there is no root
-  // that is not deferred.  For that there we register for an event
-  // and trigger goog.loadQueuedModules_ handle any remaining deferred
-  // evaluations.
-
-  /**
-   * Handle any remaining deferred goog.module evals.
-   * @private
-   */
-  goog.loadQueuedModules_ = function() {
-    var count = goog.queuedModules_.length;
-    if (count > 0) {
-      var queue = goog.queuedModules_;
-      goog.queuedModules_ = [];
-      for (var i = 0; i < count; i++) {
-        var path = queue[i];
-        goog.maybeProcessDeferredPath_(path);
-      }
-    }
-    goog.oldIeWaiting_ = false;
-  };
-
-
-  /**
-   * Eval the named module if its dependencies are
-   * available.
-   * @param {string} name The module to load.
-   * @private
-   */
-  goog.maybeProcessDeferredDep_ = function(name) {
-    if (goog.isDeferredModule_(name) && goog.allDepsAreAvailable_(name)) {
-      var path = goog.getPathFromDeps_(name);
-      goog.maybeProcessDeferredPath_(goog.basePath + path);
-    }
-  };
-
-  /**
-   * @param {string} name The module to check.
-   * @return {boolean} Whether the name represents a
-   *     module whose evaluation has been deferred.
-   * @private
-   */
-  goog.isDeferredModule_ = function(name) {
-    var path = goog.getPathFromDeps_(name);
-    var loadFlags = path && goog.dependencies_.loadFlags[path] || {};
-    var languageLevel = loadFlags['lang'] || 'es3';
-    if (path && (loadFlags['module'] == 'goog' ||
-                 goog.needsTranspile_(languageLevel))) {
-      var abspath = goog.basePath + path;
-      return (abspath) in goog.dependencies_.deferred;
-    }
-    return false;
-  };
-
-  /**
-   * @param {string} name The module to check.
-   * @return {boolean} Whether the name represents a
-   *     module whose declared dependencies have all been loaded
-   *     (eval'd or a deferred module load)
-   * @private
-   */
-  goog.allDepsAreAvailable_ = function(name) {
-    var path = goog.getPathFromDeps_(name);
-    if (path && (path in goog.dependencies_.requires)) {
-      for (var requireName in goog.dependencies_.requires[path]) {
-        if (!goog.isProvided_(requireName) &&
-            !goog.isDeferredModule_(requireName)) {
-          return false;
-        }
-      }
-    }
-    return true;
-  };
-
-
-  /**
-   * @param {string} abspath
-   * @private
-   */
-  goog.maybeProcessDeferredPath_ = function(abspath) {
-    if (abspath in goog.dependencies_.deferred) {
-      var src = goog.dependencies_.deferred[abspath];
-      delete goog.dependencies_.deferred[abspath];
-      goog.globalEval(src);
-    }
-  };
-
-
-  /**
-   * Load a goog.module from the provided URL.  This is not a general purpose
-   * code loader and does not support late loading code, that is it should only
-   * be used during page load. This method exists to support unit tests and
-   * "debug" loaders that would otherwise have inserted script tags. Under the
-   * hood this needs to use a synchronous XHR and is not recommeneded for
-   * production code.
-   *
-   * The module's goog.requires must have already been satisified; an exception
-   * will be thrown if this is not the case. This assumption is that no
-   * "deps.js" file exists, so there is no way to discover and locate the
-   * module-to-be-loaded's dependencies and no attempt is made to do so.
-   *
-   * There should only be one attempt to load a module.  If
-   * "goog.loadModuleFromUrl" is called for an already loaded module, an
-   * exception will be throw.
-   *
-   * @param {string} url The URL from which to attempt to load the goog.module.
-   */
-  goog.loadModuleFromUrl = function(url) {
-    // Because this executes synchronously, we don't need to do any additional
-    // bookkeeping. When "goog.loadModule" the namespace will be marked as
-    // having been provided which is sufficient.
-    goog.retrieveAndExec_(url, true, false);
-  };
-
-
-  /**
-   * Writes a new script pointing to {@code src} directly into the DOM.
-   *
-   * NOTE: This method is not CSP-compliant. @see goog.appendScriptSrcNode_ for
-   * the fallback mechanism.
-   *
-   * @param {string} src The script URL.
-   * @private
-   */
-  goog.writeScriptSrcNode_ = function(src) {
-    goog.global.document.write(
-        '<script type="text/javascript" src="' + src + '"></' +
-        'script>');
-  };
-
-
-  /**
-   * Appends a new script node to the DOM using a CSP-compliant mechanism. This
-   * method exists as a fallback for document.write (which is not allowed in a
-   * strict CSP context, e.g., Chrome apps).
-   *
-   * NOTE: This method is not analogous to using document.write to insert a
-   * <script> tag; specifically, the user agent will execute a script added by
-   * document.write immediately after the current script block finishes
-   * executing, whereas the DOM-appended script node will not be executed until
-   * the entire document is parsed and executed. That is to say, this script is
-   * added to the end of the script execution queue.
-   *
-   * The page must not attempt to call goog.required entities until after the
-   * document has loaded, e.g., in or after the window.onload callback.
-   *
-   * @param {string} src The script URL.
-   * @private
-   */
-  goog.appendScriptSrcNode_ = function(src) {
-    /** @type {Document} */
-    var doc = goog.global.document;
-    var scriptEl =
-        /** @type {HTMLScriptElement} */ (doc.createElement('script'));
-    scriptEl.type = 'text/javascript';
-    scriptEl.src = src;
-    scriptEl.defer = false;
-    scriptEl.async = false;
-    doc.head.appendChild(scriptEl);
-  };
-
-
-  /**
-   * The default implementation of the import function. Writes a script tag to
-   * import the script.
-   *
-   * @param {string} src The script url.
-   * @param {string=} opt_sourceText The optionally source text to evaluate
-   * @return {boolean} True if the script was imported, false otherwise.
-   * @private
-   */
-  goog.writeScriptTag_ = function(src, opt_sourceText) {
-    if (goog.inHtmlDocument_()) {
-      /** @type {!HTMLDocument} */
-      var doc = goog.global.document;
-
-      // If the user tries to require a new symbol after document load,
-      // something has gone terribly wrong. Doing a document.write would
-      // wipe out the page. This does not apply to the CSP-compliant method
-      // of writing script tags.
-      if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING &&
-          doc.readyState == 'complete') {
-        // Certain test frameworks load base.js multiple times, which tries
-        // to write deps.js each time. If that happens, just fail silently.
-        // These frameworks wipe the page between each load of base.js, so this
-        // is OK.
-        var isDeps = /\bdeps.js$/.test(src);
-        if (isDeps) {
-          return false;
-        } else {
-          throw new Error('Cannot write "' + src + '" after document load');
-        }
-      }
-
-      if (opt_sourceText === undefined) {
-        if (!goog.IS_OLD_IE_) {
-          if (goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING) {
-            goog.appendScriptSrcNode_(src);
-          } else {
-            goog.writeScriptSrcNode_(src);
-          }
-        } else {
-          goog.oldIeWaiting_ = true;
-          var state = ' onreadystatechange=\'goog.onScriptLoad_(this, ' +
-              ++goog.lastNonModuleScriptIndex_ + ')\' ';
-          doc.write(
-              '<script type="text/javascript" src="' + src + '"' + state +
-              '></' +
-              'script>');
-        }
-      } else {
-        doc.write(
-            '<script type="text/javascript">' +
-            goog.protectScriptTag_(opt_sourceText) + '</' +
-            'script>');
-      }
-      return true;
-    } else {
-      return false;
-    }
-  };
-
-  /**
-   * Rewrites closing script tags in input to avoid ending an enclosing script
-   * tag.
-   *
-   * @param {string} str
-   * @return {string}
-   * @private
-   */
-  goog.protectScriptTag_ = function(str) {
-    return str.replace(/<\/(SCRIPT)/ig, '\\x3c/$1');
-  };
-
-  /**
-   * Determines whether the given language needs to be transpiled.
-   * @param {string} lang
-   * @return {boolean}
-   * @private
-   */
-  goog.needsTranspile_ = function(lang) {
-    if (goog.TRANSPILE == 'always') {
-      return true;
-    } else if (goog.TRANSPILE == 'never') {
-      return false;
-    } else if (!goog.requiresTranspilation_) {
-      goog.requiresTranspilation_ = goog.createRequiresTranspilation_();
-    }
-    if (lang in goog.requiresTranspilation_) {
-      return goog.requiresTranspilation_[lang];
-    } else {
-      throw new Error('Unknown language mode: ' + lang);
-    }
-  };
-
-  /** @private {?Object<string, boolean>} */
-  goog.requiresTranspilation_ = null;
-
-
-  /** @private {number} */
-  goog.lastNonModuleScriptIndex_ = 0;
-
-
-  /**
-   * A readystatechange handler for legacy IE
-   * @param {?} script
-   * @param {number} scriptIndex
-   * @return {boolean}
-   * @private
-   */
-  goog.onScriptLoad_ = function(script, scriptIndex) {
-    // for now load the modules when we reach the last script,
-    // later allow more inter-mingling.
-    if (script.readyState == 'complete' &&
-        goog.lastNonModuleScriptIndex_ == scriptIndex) {
-      goog.loadQueuedModules_();
-    }
-    return true;
-  };
-
-  /**
-   * Resolves dependencies based on the dependencies added using addDependency
-   * and calls importScript_ in the correct order.
-   * @param {string} pathToLoad The path from which to start discovering
-   *     dependencies.
-   * @private
-   */
-  goog.writeScripts_ = function(pathToLoad) {
-    /** @type {!Array<string>} The scripts we need to write this time. */
-    var scripts = [];
-    var seenScript = {};
-    var deps = goog.dependencies_;
-
-    /** @param {string} path */
-    function visitNode(path) {
-      if (path in deps.written) {
-        return;
-      }
-
-      // We have already visited this one. We can get here if we have cyclic
-      // dependencies.
-      if (path in deps.visited) {
-        return;
-      }
-
-      deps.visited[path] = true;
-
-      if (path in deps.requires) {
-        for (var requireName in deps.requires[path]) {
-          // If the required name is defined, we assume that it was already
-          // bootstrapped by other means.
-          if (!goog.isProvided_(requireName)) {
-            if (requireName in deps.nameToPath) {
-              visitNode(deps.nameToPath[requireName]);
-            } else {
-              throw new Error('Undefined nameToPath for ' + requireName);
-            }
-          }
-        }
-      }
-
-      if (!(path in seenScript)) {
-        seenScript[path] = true;
-        scripts.push(path);
-      }
-    }
-
-    visitNode(pathToLoad);
-
-    // record that we are going to load all these scripts.
-    for (var i = 0; i < scripts.length; i++) {
-      var path = scripts[i];
-      goog.dependencies_.written[path] = true;
-    }
-
-    // If a module is loaded synchronously then we need to
-    // clear the current inModuleLoader value, and restore it when we are
-    // done loading the current "requires".
-    var moduleState = goog.moduleLoaderState_;
-    goog.moduleLoaderState_ = null;
-
-    for (var i = 0; i < scripts.length; i++) {
-      var path = scripts[i];
-      if (path) {
-        var loadFlags = deps.loadFlags[path] || {};
-        var languageLevel = loadFlags['lang'] || 'es3';
-        var needsTranspile = goog.needsTranspile_(languageLevel);
-        if (loadFlags['module'] == 'goog' || needsTranspile) {
-          goog.importProcessedScript_(
-              goog.basePath + path, loadFlags['module'] == 'goog',
-              needsTranspile);
-        } else {
-          goog.importScript_(goog.basePath + path);
-        }
-      } else {
-        goog.moduleLoaderState_ = moduleState;
-        throw new Error('Undefined script input');
-      }
-    }
-
-    // restore the current "module loading state"
-    goog.moduleLoaderState_ = moduleState;
-  };
-
-
-  /**
-   * Looks at the dependency rules and tries to determine the script file that
-   * fulfills a particular rule.
-   * @param {string} rule In the form goog.namespace.Class or project.script.
-   * @return {?string} Url corresponding to the rule, or null.
-   * @private
-   */
-  goog.getPathFromDeps_ = function(rule) {
-    if (rule in goog.dependencies_.nameToPath) {
-      return goog.dependencies_.nameToPath[rule];
-    } else {
-      return null;
-    }
-  };
-
-  goog.findBasePath_();
-
-  // Allow projects to manage the deps files themselves.
-  if (!goog.global.CLOSURE_NO_DEPS) {
-    goog.importScript_(goog.basePath + 'deps.js');
-  }
-}
-
-
-/**
- * @package {?boolean}
- * Visible for testing.
- */
-goog.hasBadLetScoping = null;
-
-
-/**
- * @return {boolean}
- * @package Visible for testing.
- */
-goog.useSafari10Workaround = function() {
-  if (goog.hasBadLetScoping == null) {
-    var hasBadLetScoping;
-    try {
-      hasBadLetScoping = !eval(
-          '"use strict";' +
-          'let x = 1; function f() { return typeof x; };' +
-          'f() == "number";');
-    } catch (e) {
-      // Assume that ES6 syntax isn't supported.
-      hasBadLetScoping = false;
-    }
-    goog.hasBadLetScoping = hasBadLetScoping;
-  }
-  return goog.hasBadLetScoping;
-};
-
-
-/**
- * @param {string} moduleDef
- * @return {string}
- * @package Visible for testing.
- */
-goog.workaroundSafari10EvalBug = function(moduleDef) {
-  return '(function(){' + moduleDef +
-      '\n' +  // Terminate any trailing single line comment.
-      ';' +   // Terminate any trailing expression.
-      '})();\n';
-};
-
-
-/**
- * @param {function(?):?|string} moduleDef The module definition.
- */
-goog.loadModule = function(moduleDef) {
-  // NOTE: we allow function definitions to be either in the from
-  // of a string to eval (which keeps the original source intact) or
-  // in a eval forbidden environment (CSP) we allow a function definition
-  // which in its body must call {@code goog.module}, and return the exports
-  // of the module.
-  var previousState = goog.moduleLoaderState_;
-  try {
-    goog.moduleLoaderState_ = {
-      moduleName: undefined,
-      declareLegacyNamespace: false
-    };
-    var exports;
-    if (goog.isFunction(moduleDef)) {
-      exports = moduleDef.call(undefined, {});
-    } else if (goog.isString(moduleDef)) {
-      if (goog.useSafari10Workaround()) {
-        moduleDef = goog.workaroundSafari10EvalBug(moduleDef);
-      }
-
-      exports = goog.loadModuleFromSource_.call(undefined, moduleDef);
-    } else {
-      throw new Error('Invalid module definition');
-    }
-
-    var moduleName = goog.moduleLoaderState_.moduleName;
-    if (!goog.isString(moduleName) || !moduleName) {
-      throw new Error('Invalid module name \"' + moduleName + '\"');
-    }
-
-    // Don't seal legacy namespaces as they may be uses as a parent of
-    // another namespace
-    if (goog.moduleLoaderState_.declareLegacyNamespace) {
-      goog.constructNamespace_(moduleName, exports);
-    } else if (
-        goog.SEAL_MODULE_EXPORTS && Object.seal && typeof exports == 'object' &&
-        exports != null) {
-      Object.seal(exports);
-    }
-
-    goog.loadedModules_[moduleName] = exports;
-  } finally {
-    goog.moduleLoaderState_ = previousState;
-  }
-};
-
-
-/**
- * @private @const
- */
-goog.loadModuleFromSource_ = /** @type {function(string):?} */ (function() {
-  // NOTE: we avoid declaring parameters or local variables here to avoid
-  // masking globals or leaking values into the module definition.
-  'use strict';
-  var exports = {};
-  eval(arguments[0]);
-  return exports;
-});
-
-
-/**
- * Normalize a file path by removing redundant ".." and extraneous "." file
- * path components.
- * @param {string} path
- * @return {string}
- * @private
- */
-goog.normalizePath_ = function(path) {
-  var components = path.split('/');
-  var i = 0;
-  while (i < components.length) {
-    if (components[i] == '.') {
-      components.splice(i, 1);
-    } else if (
-        i && components[i] == '..' && components[i - 1] &&
-        components[i - 1] != '..') {
-      components.splice(--i, 2);
-    } else {
-      i++;
-    }
-  }
-  return components.join('/');
-};
-
-
-/**
- * Provides a hook for loading a file when using Closure's goog.require() API
- * with goog.modules.  In particular this hook is provided to support Node.js.
- *
- * @type {(function(string):string)|undefined}
- */
-goog.global.CLOSURE_LOAD_FILE_SYNC;
-
-
-/**
- * Loads file by synchronous XHR. Should not be used in production environments.
- * @param {string} src Source URL.
- * @return {?string} File contents, or null if load failed.
- * @private
- */
-goog.loadFileSync_ = function(src) {
-  if (goog.global.CLOSURE_LOAD_FILE_SYNC) {
-    return goog.global.CLOSURE_LOAD_FILE_SYNC(src);
-  } else {
-    try {
-      /** @type {XMLHttpRequest} */
-      var xhr = new goog.global['XMLHttpRequest']();
-      xhr.open('get', src, false);
-      xhr.send();
-      // NOTE: Successful http: requests have a status of 200, but successful
-      // file: requests may have a status of zero.  Any other status, or a
-      // thrown exception (particularly in case of file: requests) indicates
-      // some sort of error, which we treat as a missing or unavailable file.
-      return xhr.status == 0 || xhr.status == 200 ? xhr.responseText : null;
-    } catch (err) {
-      // No need to rethrow or log, since errors should show up on their own.
-      return null;
-    }
-  }
-};
-
-
-/**
- * Retrieve and execute a script that needs some sort of wrapping.
- * @param {string} src Script source URL.
- * @param {boolean} isModule Whether to load as a module.
- * @param {boolean} needsTranspile Whether to transpile down to ES3.
- * @private
- */
-goog.retrieveAndExec_ = function(src, isModule, needsTranspile) {
-  if (!COMPILED) {
-    // The full but non-canonicalized URL for later use.
-    var originalPath = src;
-    // Canonicalize the path, removing any /./ or /../ since Chrome's debugging
-    // console doesn't auto-canonicalize XHR loads as it does <script> srcs.
-    src = goog.normalizePath_(src);
-
-    var importScript =
-        goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
-
-    var scriptText = goog.loadFileSync_(src);
-    if (scriptText == null) {
-      throw new Error('Load of "' + src + '" failed');
-    }
-
-    if (needsTranspile) {
-      scriptText = goog.transpile_.call(goog.global, scriptText, src);
-    }
-
-    if (isModule) {
-      scriptText = goog.wrapModule_(src, scriptText);
-    } else {
-      scriptText += '\n//# sourceURL=' + src;
-    }
-    var isOldIE = goog.IS_OLD_IE_;
-    if (isOldIE && goog.oldIeWaiting_) {
-      goog.dependencies_.deferred[originalPath] = scriptText;
-      goog.queuedModules_.push(originalPath);
-    } else {
-      importScript(src, scriptText);
-    }
-  }
-};
-
-
-/**
- * Lazily retrieves the transpiler and applies it to the source.
- * @param {string} code JS code.
- * @param {string} path Path to the code.
- * @return {string} The transpiled code.
- * @private
- */
-goog.transpile_ = function(code, path) {
-  var jscomp = goog.global['$jscomp'];
-  if (!jscomp) {
-    goog.global['$jscomp'] = jscomp = {};
-  }
-  var transpile = jscomp.transpile;
-  if (!transpile) {
-    var transpilerPath = goog.basePath + goog.TRANSPILER;
-    var transpilerCode = goog.loadFileSync_(transpilerPath);
-    if (transpilerCode) {
-      // This must be executed synchronously, since by the time we know we
-      // need it, we're about to load and write the ES6 code synchronously,
-      // so a normal script-tag load will be too slow.
-      eval(transpilerCode + '\n//# sourceURL=' + transpilerPath);
-      // Even though the transpiler is optional, if $gwtExport is found, it's
-      // a sign the transpiler was loaded and the $jscomp.transpile *should*
-      // be there.
-      if (goog.global['$gwtExport'] && goog.global['$gwtExport']['$jscomp'] &&
-          !goog.global['$gwtExport']['$jscomp']['transpile']) {
-        throw new Error(
-            'The transpiler did not properly export the "transpile" ' +
-            'method. $gwtExport: ' + JSON.stringify(goog.global['$gwtExport']));
-      }
-      // transpile.js only exports a single $jscomp function, transpile. We
-      // grab just that and add it to the existing definition of $jscomp which
-      // contains the polyfills.
-      goog.global['$jscomp'].transpile =
-          goog.global['$gwtExport']['$jscomp']['transpile'];
-      jscomp = goog.global['$jscomp'];
-      transpile = jscomp.transpile;
-    }
-  }
-  if (!transpile) {
-    // The transpiler is an optional component.  If it's not available then
-    // replace it with a pass-through function that simply logs.
-    var suffix = ' requires transpilation but no transpiler was found.';
-    transpile = jscomp.transpile = function(code, path) {
-      // TODO(user): figure out some way to get this error to show up
-      // in test results, noting that the failure may occur in many
-      // different ways, including in loadModule() before the test
-      // runner even comes up.
-      goog.logToConsole_(path + suffix);
-      return code;
-    };
-  }
-  // Note: any transpilation errors/warnings will be logged to the console.
-  return transpile(code, path);
-};
-
-
-//==============================================================================
-// Language Enhancements
-//==============================================================================
-
-
-/**
- * This is a "fixed" version of the typeof operator.  It differs from the typeof
- * operator in such a way that null returns 'null' and arrays return 'array'.
- * @param {?} value The value to get the type of.
- * @return {string} The name of the type.
- */
-goog.typeOf = function(value) {
-  var s = typeof value;
-  if (s == 'object') {
-    if (value) {
-      // Check these first, so we can avoid calling Object.prototype.toString if
-      // possible.
-      //
-      // IE improperly marshals typeof across execution contexts, but a
-      // cross-context object will still return false for "instanceof Object".
-      if (value instanceof Array) {
-        return 'array';
-      } else if (value instanceof Object) {
-        return s;
-      }
-
-      // HACK: In order to use an Object prototype method on the arbitrary
-      //   value, the compiler requires the value be cast to type Object,
-      //   even though the ECMA spec explicitly allows it.
-      var className = Object.prototype.toString.call(
-          /** @type {!Object} */ (value));
-      // In Firefox 3.6, attempting to access iframe window objects' length
-      // property throws an NS_ERROR_FAILURE, so we need to special-case it
-      // here.
-      if (className == '[object Window]') {
-        return 'object';
-      }
-
-      // We cannot always use constructor == Array or instanceof Array because
-      // different frames have different Array objects. In IE6, if the iframe
-      // where the array was created is destroyed, the array loses its
-      // prototype. Then dereferencing val.splice here throws an exception, so
-      // we can't use goog.isFunction. Calling typeof directly returns 'unknown'
-      // so that will work. In this case, this function will return false and
-      // most array functions will still work because the array is still
-      // array-like (supports length and []) even though it has lost its
-      // prototype.
-      // Mark Miller noticed that Object.prototype.toString
-      // allows access to the unforgeable [[Class]] property.
-      //  15.2.4.2 Object.prototype.toString ( )
-      //  When the toString method is called, the following steps are taken:
-      //      1. Get the [[Class]] property of this object.
-      //      2. Compute a string value by concatenating the three strings
-      //         "[object ", Result(1), and "]".
-      //      3. Return Result(2).
-      // and this behavior survives the destruction of the execution context.
-      if ((className == '[object Array]' ||
-           // In IE all non value types are wrapped as objects across window
-           // boundaries (not iframe though) so we have to do object detection
-           // for this edge case.
-           typeof value.length == 'number' &&
-               typeof value.splice != 'undefined' &&
-               typeof value.propertyIsEnumerable != 'undefined' &&
-               !value.propertyIsEnumerable('splice')
-
-               )) {
-        return 'array';
-      }
-      // HACK: There is still an array case that fails.
-      //     function ArrayImpostor() {}
-      //     ArrayImpostor.prototype = [];
-      //     var impostor = new ArrayImpostor;
-      // this can be fixed by getting rid of the fast path
-      // (value instanceof Array) and solely relying on
-      // (value && Object.prototype.toString.vall(value) === '[object Array]')
-      // but that would require many more function calls and is not warranted
-      // unless closure code is receiving objects from untrusted sources.
-
-      // IE in cross-window calls does not correctly marshal the function type
-      // (it appears just as an object) so we cannot use just typeof val ==
-      // 'function'. However, if the object has a call property, it is a
-      // function.
-      if ((className == '[object Function]' ||
-           typeof value.call != 'undefined' &&
-               typeof value.propertyIsEnumerable != 'undefined' &&
-               !value.propertyIsEnumerable('call'))) {
-        return 'function';
-      }
-
-    } else {
-      return 'null';
-    }
-
-  } else if (s == 'function' && typeof value.call == 'undefined') {
-    // In Safari typeof nodeList returns 'function', and on Firefox typeof
-    // behaves similarly for HTML{Applet,Embed,Object}, Elements and RegExps. We
-    // would like to return object for those and we can detect an invalid
-    // function by making sure that the function object has a call method.
-    return 'object';
-  }
-  return s;
-};
-
-
-/**
- * Returns true if the specified value is null.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is null.
- */
-goog.isNull = function(val) {
-  return val === null;
-};
-
-
-/**
- * Returns true if the specified value is defined and not null.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is defined and not null.
- */
-goog.isDefAndNotNull = function(val) {
-  // Note that undefined == null.
-  return val != null;
-};
-
-
-/**
- * Returns true if the specified value is an array.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an array.
- */
-goog.isArray = function(val) {
-  return goog.typeOf(val) == 'array';
-};
-
-
-/**
- * Returns true if the object looks like an array. To qualify as array like
- * the value needs to be either a NodeList or an object with a Number length
- * property. As a special case, a function value is not array like, because its
- * length property is fixed to correspond to the number of expected arguments.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an array.
- */
-goog.isArrayLike = function(val) {
-  var type = goog.typeOf(val);
-  // We do not use goog.isObject here in order to exclude function values.
-  return type == 'array' || type == 'object' && typeof val.length == 'number';
-};
-
-
-/**
- * Returns true if the object looks like a Date. To qualify as Date-like the
- * value needs to be an object and have a getFullYear() function.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a like a Date.
- */
-goog.isDateLike = function(val) {
-  return goog.isObject(val) && typeof val.getFullYear == 'function';
-};
-
-
-/**
- * Returns true if the specified value is a function.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is a function.
- */
-goog.isFunction = function(val) {
-  return goog.typeOf(val) == 'function';
-};
-
-
-/**
- * Returns true if the specified value is an object.  This includes arrays and
- * functions.
- * @param {?} val Variable to test.
- * @return {boolean} Whether variable is an object.
- */
-goog.isObject = function(val) {
-  var type = typeof val;
-  return type == 'object' && val != null || type == 'function';
-  // return Object(val) === val also works, but is slower, especially if val is
-  // not an object.
-};
-
-
-/**
- * Gets a unique ID for an object. This mutates the object so that further calls
- * with the same object as a parameter returns the same value. The unique ID is
- * guaranteed to be unique across the current session amongst objects that are
- * passed into {@code getUid}. There is no guarantee that the ID is unique or
- * consistent across sessions. It is unsafe to generate unique ID for function
- * prototypes.
- *
- * @param {Object} obj The object to get the unique ID for.
- * @return {number} The unique ID for the object.
- */
-goog.getUid = function(obj) {
-  // TODO(arv): Make the type stricter, do not accept null.
-
-  // In Opera window.hasOwnProperty exists but always returns false so we avoid
-  // using it. As a consequence the unique ID generated for BaseClass.prototype
-  // and SubClass.prototype will be the same.
-  return obj[goog.UID_PROPERTY_] ||
-      (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);
-};
-
-
-/**
- * Whether the given object is already assigned a unique ID.
- *
- * This does not modify the object.
- *
- * @param {!Object} obj The object to check.
- * @return {boolean} Whether there is an assigned unique id for the object.
- */
-goog.hasUid = function(obj) {
-  return !!obj[goog.UID_PROPERTY_];
-};
-
-
-/**
- * Removes the unique ID from an object. This is useful if the object was
- * previously mutated using {@code goog.getUid} in which case the mutation is
- * undone.
- * @param {Object} obj The object to remove the unique ID field from.
- */
-goog.removeUid = function(obj) {
-  // TODO(arv): Make the type stricter, do not accept null.
-
-  // In IE, DOM nodes are not instances of Object and throw an exception if we
-  // try to delete.  Instead we try to use removeAttribute.
-  if (obj !== null && 'removeAttribute' in obj) {
-    obj.removeAttribute(goog.UID_PROPERTY_);
-  }
-
-  try {
-    delete obj[goog.UID_PROPERTY_];
-  } catch (ex) {
-  }
-};
-
-
-/**
- * Name for unique ID property. Initialized in a way to help avoid collisions
- * with other closure JavaScript on the same page.
- * @type {string}
- * @private
- */
-goog.UID_PROPERTY_ = 'closure_uid_' + ((Math.random() * 1e9) >>> 0);
-
-
-/**
- * Counter for UID.
- * @type {number}
- * @private
- */
-goog.uidCounter_ = 0;
-
-
-/**
- * Adds a hash code field to an object. The hash code is unique for the
- * given object.
- * @param {Object} obj The object to get the hash code for.
- * @return {number} The hash code for the object.
- * @deprecated Use goog.getUid instead.
- */
-goog.getHashCode = goog.getUid;
-
-
-/**
- * Removes the hash code field from an object.
- * @param {Object} obj The object to remove the field from.
- * @deprecated Use goog.removeUid instead.
- */
-goog.removeHashCode = goog.removeUid;
-
-
-/**
- * Clones a value. The input may be an Object, Array, or basic type. Objects and
- * arrays will be cloned recursively.
- *
- * WARNINGS:
- * <code>goog.cloneObject</code> does not detect reference loops. Objects that
- * refer to themselves will cause infinite recursion.
- *
- * <code>goog.cloneObject</code> is unaware of unique identifiers, and copies
- * UIDs created by <code>getUid</code> into cloned results.
- *
- * @param {*} obj The value to clone.
- * @return {*} A clone of the input value.
- * @deprecated goog.cloneObject is unsafe. Prefer the goog.object methods.
- */
-goog.cloneObject = function(obj) {
-  var type = goog.typeOf(obj);
-  if (type == 'object' || type == 'array') {
-    if (obj.clone) {
-      return obj.clone();
-    }
-    var clone = type == 'array' ? [] : {};
-    for (var key in obj) {
-      clone[key] = goog.cloneObject(obj[key]);
-    }
-    return clone;
-  }
-
-  return obj;
-};
-
-
-/**
- * A native implementation of goog.bind.
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @private
- */
-goog.bindNative_ = function(fn, selfObj, var_args) {
-  return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments));
-};
-
-
-/**
- * A pure-JS implementation of goog.bind.
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @private
- */
-goog.bindJs_ = function(fn, selfObj, var_args) {
-  if (!fn) {
-    throw new Error();
-  }
-
-  if (arguments.length > 2) {
-    var boundArgs = Array.prototype.slice.call(arguments, 2);
-    return function() {
-      // Prepend the bound arguments to the current arguments.
-      var newArgs = Array.prototype.slice.call(arguments);
-      Array.prototype.unshift.apply(newArgs, boundArgs);
-      return fn.apply(selfObj, newArgs);
-    };
-
-  } else {
-    return function() {
-      return fn.apply(selfObj, arguments);
-    };
-  }
-};
-
-
-/**
- * Partially applies this function to a particular 'this object' and zero or
- * more arguments. The result is a new function with some arguments of the first
- * function pre-filled and the value of this 'pre-specified'.
- *
- * Remaining arguments specified at call-time are appended to the pre-specified
- * ones.
- *
- * Also see: {@link #partial}.
- *
- * Usage:
- * <pre>var barMethBound = goog.bind(myFunction, myObj, 'arg1', 'arg2');
- * barMethBound('arg3', 'arg4');</pre>
- *
- * @param {?function(this:T, ...)} fn A function to partially apply.
- * @param {T} selfObj Specifies the object which this should point to when the
- *     function is run.
- * @param {...*} var_args Additional arguments that are partially applied to the
- *     function.
- * @return {!Function} A partially-applied form of the function goog.bind() was
- *     invoked as a method of.
- * @template T
- * @suppress {deprecated} See above.
- */
-goog.bind = function(fn, selfObj, var_args) {
-  // TODO(nicksantos): narrow the type signature.
-  if (Function.prototype.bind &&
-      // NOTE(nicksantos): Somebody pulled base.js into the default Chrome
-      // extension environment. This means that for Chrome extensions, they get
-      // the implementation of Function.prototype.bind that calls goog.bind
-      // instead of the native one. Even worse, we don't want to introduce a
-      // circular dependency between goog.bind and Function.prototype.bind, so
-      // we have to hack this to make sure it works correctly.
-      Function.prototype.bind.toString().indexOf('native code') != -1) {
-    goog.bind = goog.bindNative_;
-  } else {
-    goog.bind = goog.bindJs_;
-  }
-  return goog.bind.apply(null, arguments);
-};
-
-
-/**
- * Like goog.bind(), except that a 'this object' is not required. Useful when
- * the target function is already bound.
- *
- * Usage:
- * var g = goog.partial(f, arg1, arg2);
- * g(arg3, arg4);
- *
- * @param {Function} fn A function to partially apply.
- * @param {...*} var_args Additional arguments that are partially applied to fn.
- * @return {!Function} A partially-applied form of the function goog.partial()
- *     was invoked as a method of.
- */
-goog.partial = function(fn, var_args) {
-  var args = Array.prototype.slice.call(arguments, 1);
-  return function() {
-    // Clone the array (with slice()) and append additional arguments
-    // to the existing arguments.
-    var newArgs = args.slice();
-    newArgs.push.apply(newArgs, arguments);
-    return fn.apply(this, newArgs);
-  };
-};
-
-
-/**
- * Copies all the members of a source object to a target object. This method
- * does not work on all browsers for all objects that contain keys such as
- * toString or hasOwnProperty. Use goog.object.extend for this purpose.
- * @param {Object} target Target.
- * @param {Object} source Source.
- */
-goog.mixin = function(target, source) {
-  for (var x in source) {
-    target[x] = source[x];
-  }
-
-  // For IE7 or lower, the for-in-loop does not contain any properties that are
-  // not enumerable on the prototype object (for example, isPrototypeOf from
-  // Object.prototype) but also it will not include 'replace' on objects that
-  // extend String and change 'replace' (not that it is common for anyone to
-  // extend anything except Object).
-};
-
-
-/**
- * @return {number} An integer value representing the number of milliseconds
- *     between midnight, January 1, 1970 and the current time.
- */
-goog.now = (goog.TRUSTED_SITE && Date.now) || (function() {
-             // Unary plus operator converts its operand to a number which in
-             // the case of
-             // a date is done by calling getTime().
-             return +new Date();
-           });
-
-
-/**
- * Evals JavaScript in the global scope.  In IE this uses execScript, other
- * browsers use goog.global.eval. If goog.global.eval does not evaluate in the
- * global scope (for example, in Safari), appends a script tag instead.
- * Throws an exception if neither execScript or eval is defined.
- * @param {string} script JavaScript string.
- */
-goog.globalEval = function(script) {
-  if (goog.global.execScript) {
-    goog.global.execScript(script, 'JavaScript');
-  } else if (goog.global.eval) {
-    // Test to see if eval works
-    if (goog.evalWorksForGlobals_ == null) {
-      goog.global.eval('var _evalTest_ = 1;');
-      if (typeof goog.global['_evalTest_'] != 'undefined') {
-        try {
-          delete goog.global['_evalTest_'];
-        } catch (ignore) {
-          // Microsoft edge fails the deletion above in strict mode.
-        }
-        goog.evalWorksForGlobals_ = true;
-      } else {
-        goog.evalWorksForGlobals_ = false;
-      }
-    }
-
-    if (goog.evalWorksForGlobals_) {
-      goog.global.eval(script);
-    } else {
-      /** @type {Document} */
-      var doc = goog.global.document;
-      var scriptElt =
-          /** @type {!HTMLScriptElement} */ (doc.createElement('SCRIPT'));
-      scriptElt.type = 'text/javascript';
-      scriptElt.defer = false;
-      // Note(user): can't use .innerHTML since "t('<test>')" will fail and
-      // .text doesn't work in Safari 2.  Therefore we append a text node.
-      scriptElt.appendChild(doc.createTextNode(script));
-      doc.body.appendChild(scriptElt);
-      doc.body.removeChild(scriptElt);
-    }
-  } else {
-    throw new Error('goog.globalEval not available');
-  }
-};
-
-
-/**
- * Indicates whether or not we can call 'eval' directly to eval code in the
- * global scope. Set to a Boolean by the first call to goog.globalEval (which
- * empirically tests whether eval works for globals). @see goog.globalEval
- * @type {?boolean}
- * @private
- */
-goog.evalWorksForGlobals_ = null;
-
-
-/**
- * Optional map of CSS class names to obfuscated names used with
- * goog.getCssName().
- * @private {!Object<string, string>|undefined}
- * @see goog.setCssNameMapping
- */
-goog.cssNameMapping_;
-
-
-/**
- * Optional obfuscation style for CSS class names. Should be set to either
- * 'BY_WHOLE' or 'BY_PART' if defined.
- * @type {string|undefined}
- * @private
- * @see goog.setCssNameMapping
- */
-goog.cssNameMappingStyle_;
-
-
-
-/**
- * A hook for modifying the default behavior goog.getCssName. The function
- * if present, will recieve the standard output of the goog.getCssName as
- * its input.
- *
- * @type {(function(string):string)|undefined}
- */
-goog.global.CLOSURE_CSS_NAME_MAP_FN;
-
-
-/**
- * Handles strings that are intended to be used as CSS class names.
- *
- * This function works in tandem with @see goog.setCssNameMapping.
- *
- * Without any mapping set, the arguments are simple joined with a hyphen and
- * passed through unaltered.
- *
- * When there is a mapping, there are two possible styles in which these
- * mappings are used. In the BY_PART style, each part (i.e. in between hyphens)
- * of the passed in css name is rewritten according to the map. In the BY_WHOLE
- * style, the full css name is looked up in the map directly. If a rewrite is
- * not specified by the map, the compiler will output a warning.
- *
- * When the mapping is passed to the compiler, it will replace calls to
- * goog.getCssName with the strings from the mapping, e.g.
- *     var x = goog.getCssName('foo');
- *     var y = goog.getCssName(this.baseClass, 'active');
- *  becomes:
- *     var x = 'foo';
- *     var y = this.baseClass + '-active';
- *
- * If one argument is passed it will be processed, if two are passed only the
- * modifier will be processed, as it is assumed the first argument was generated
- * as a result of calling goog.getCssName.
- *
- * @param {string} className The class name.
- * @param {string=} opt_modifier A modifier to be appended to the class name.
- * @return {string} The class name or the concatenation of the class name and
- *     the modifier.
- */
-goog.getCssName = function(className, opt_modifier) {
-  // String() is used for compatibility with compiled soy where the passed
-  // className can be non-string objects.
-  if (String(className).charAt(0) == '.') {
-    throw new Error(
-        'className passed in goog.getCssName must not start with ".".' +
-        ' You passed: ' + className);
-  }
-
-  var getMapping = function(cssName) {
-    return goog.cssNameMapping_[cssName] || cssName;
-  };
-
-  var renameByParts = function(cssName) {
-    // Remap all the parts individually.
-    var parts = cssName.split('-');
-    var mapped = [];
-    for (var i = 0; i < parts.length; i++) {
-      mapped.push(getMapping(parts[i]));
-    }
-    return mapped.join('-');
-  };
-
-  var rename;
-  if (goog.cssNameMapping_) {
-    rename =
-        goog.cssNameMappingStyle_ == 'BY_WHOLE' ? getMapping : renameByParts;
-  } else {
-    rename = function(a) {
-      return a;
-    };
-  }
-
-  var result =
-      opt_modifier ? className + '-' + rename(opt_modifier) : rename(className);
-
-  // The special CLOSURE_CSS_NAME_MAP_FN allows users to specify further
-  // processing of the class name.
-  if (goog.global.CLOSURE_CSS_NAME_MAP_FN) {
-    return goog.global.CLOSURE_CSS_NAME_MAP_FN(result);
-  }
-
-  return result;
-};
-
-
-/**
- * Sets the map to check when returning a value from goog.getCssName(). Example:
- * <pre>
- * goog.setCssNameMapping({
- *   "goog": "a",
- *   "disabled": "b",
- * });
- *
- * var x = goog.getCssName('goog');
- * // The following evaluates to: "a a-b".
- * goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled')
- * </pre>
- * When declared as a map of string literals to string literals, the JSCompiler
- * will replace all calls to goog.getCssName() using the supplied map if the
- * --process_closure_primitives flag is set.
- *
- * @param {!Object} mapping A map of strings to strings where keys are possible
- *     arguments to goog.getCssName() and values are the corresponding values
- *     that should be returned.
- * @param {string=} opt_style The style of css name mapping. There are two valid
- *     options: 'BY_PART', and 'BY_WHOLE'.
- * @see goog.getCssName for a description.
- */
-goog.setCssNameMapping = function(mapping, opt_style) {
-  goog.cssNameMapping_ = mapping;
-  goog.cssNameMappingStyle_ = opt_style;
-};
-
-
-/**
- * To use CSS renaming in compiled mode, one of the input files should have a
- * call to goog.setCssNameMapping() with an object literal that the JSCompiler
- * can extract and use to replace all calls to goog.getCssName(). In uncompiled
- * mode, JavaScript code should be loaded before this base.js file that declares
- * a global variable, CLOSURE_CSS_NAME_MAPPING, which is used below. This is
- * to ensure that the mapping is loaded before any calls to goog.getCssName()
- * are made in uncompiled mode.
- *
- * A hook for overriding the CSS name mapping.
- * @type {!Object<string, string>|undefined}
- */
-goog.global.CLOSURE_CSS_NAME_MAPPING;
-
-
-if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
-  // This does not call goog.setCssNameMapping() because the JSCompiler
-  // requires that goog.setCssNameMapping() be called with an object literal.
-  goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;
-}
-
-
-/**
- * Gets a localized message.
- *
- * This function is a compiler primitive. If you give the compiler a localized
- * message bundle, it will replace the string at compile-time with a localized
- * version, and expand goog.getMsg call to a concatenated string.
- *
- * Messages must be initialized in the form:
- * <code>
- * var MSG_NAME = goog.getMsg('Hello {$placeholder}', {'placeholder': 'world'});
- * </code>
- *
- * This function produces a string which should be treated as plain text. Use
- * {@link goog.html.SafeHtmlFormatter} in conjunction with goog.getMsg to
- * produce SafeHtml.
- *
- * @param {string} str Translatable string, places holders in the form {$foo}.
- * @param {Object<string, string>=} opt_values Maps place holder name to value.
- * @return {string} message with placeholders filled.
- */
-goog.getMsg = function(str, opt_values) {
-  if (opt_values) {
-    str = str.replace(/\{\$([^}]+)}/g, function(match, key) {
-      return (opt_values != null && key in opt_values) ? opt_values[key] :
-                                                         match;
-    });
-  }
-  return str;
-};
-
-
-/**
- * Gets a localized message. If the message does not have a translation, gives a
- * fallback message.
- *
- * This is useful when introducing a new message that has not yet been
- * translated into all languages.
- *
- * This function is a compiler primitive. Must be used in the form:
- * <code>var x = goog.getMsgWithFallback(MSG_A, MSG_B);</code>
- * where MSG_A and MSG_B were initialized with goog.getMsg.
- *
- * @param {string} a The preferred message.
- * @param {string} b The fallback message.
- * @return {string} The best translated message.
- */
-goog.getMsgWithFallback = function(a, b) {
-  return a;
-};
-
-
-/**
- * Exposes an unobfuscated global namespace path for the given object.
- * Note that fields of the exported object *will* be obfuscated, unless they are
- * exported in turn via this function or goog.exportProperty.
- *
- * Also handy for making public items that are defined in anonymous closures.
- *
- * ex. goog.exportSymbol('public.path.Foo', Foo);
- *
- * ex. goog.exportSymbol('public.path.Foo.staticFunction', Foo.staticFunction);
- *     public.path.Foo.staticFunction();
- *
- * ex. goog.exportSymbol('public.path.Foo.prototype.myMethod',
- *                       Foo.prototype.myMethod);
- *     new public.path.Foo().myMethod();
- *
- * @param {string} publicPath Unobfuscated name to export.
- * @param {*} object Object the name should point to.
- * @param {Object=} opt_objectToExportTo The object to add the path to; default
- *     is goog.global.
- */
-goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
-  goog.exportPath_(publicPath, object, opt_objectToExportTo);
-};
-
-
-/**
- * Exports a property unobfuscated into the object's namespace.
- * ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction);
- * ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod);
- * @param {Object} object Object whose static property is being exported.
- * @param {string} publicName Unobfuscated name to export.
- * @param {*} symbol Object the name should point to.
- */
-goog.exportProperty = function(object, publicName, symbol) {
-  object[publicName] = symbol;
-};
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * Usage:
- * <pre>
- * function ParentClass(a, b) { }
- * ParentClass.prototype.foo = function(a) { };
- *
- * function ChildClass(a, b, c) {
- *   ChildClass.base(this, 'constructor', a, b);
- * }
- * goog.inherits(ChildClass, ParentClass);
- *
- * var child = new ChildClass('a', 'b', 'see');
- * child.foo(); // This works.
- * </pre>
- *
- * @param {!Function} childCtor Child class.
- * @param {!Function} parentCtor Parent class.
- */
-goog.inherits = function(childCtor, parentCtor) {
-  /** @constructor */
-  function tempCtor() {}
-  tempCtor.prototype = parentCtor.prototype;
-  childCtor.superClass_ = parentCtor.prototype;
-  childCtor.prototype = new tempCtor();
-  /** @override */
-  childCtor.prototype.constructor = childCtor;
-
-  /**
-   * Calls superclass constructor/method.
-   *
-   * This function is only available if you use goog.inherits to
-   * express inheritance relationships between classes.
-   *
-   * NOTE: This is a replacement for goog.base and for superClass_
-   * property defined in childCtor.
-   *
-   * @param {!Object} me Should always be "this".
-   * @param {string} methodName The method name to call. Calling
-   *     superclass constructor can be done with the special string
-   *     'constructor'.
-   * @param {...*} var_args The arguments to pass to superclass
-   *     method/constructor.
-   * @return {*} The return value of the superclass method/constructor.
-   */
-  childCtor.base = function(me, methodName, var_args) {
-    // Copying using loop to avoid deop due to passing arguments object to
-    // function. This is faster in many JS engines as of late 2014.
-    var args = new Array(arguments.length - 2);
-    for (var i = 2; i < arguments.length; i++) {
-      args[i - 2] = arguments[i];
-    }
-    return parentCtor.prototype[methodName].apply(me, args);
-  };
-};
-
-
-/**
- * Call up to the superclass.
- *
- * If this is called from a constructor, then this calls the superclass
- * constructor with arguments 1-N.
- *
- * If this is called from a prototype method, then you must pass the name of the
- * method as the second argument to this function. If you do not, you will get a
- * runtime error. This calls the superclass' method with arguments 2-N.
- *
- * This function only works if you use goog.inherits to express inheritance
- * relationships between your classes.
- *
- * This function is a compiler primitive. At compile-time, the compiler will do
- * macro expansion to remove a lot of the extra overhead that this function
- * introduces. The compiler will also enforce a lot of the assumptions that this
- * function makes, and treat it as a compiler error if you break them.
- *
- * @param {!Object} me Should always be "this".
- * @param {*=} opt_methodName The method name if calling a super method.
- * @param {...*} var_args The rest of the arguments.
- * @return {*} The return value of the superclass method.
- * @suppress {es5Strict} This method can not be used in strict mode, but
- *     all Closure Library consumers must depend on this file.
- * @deprecated goog.base is not strict mode compatible.  Prefer the static
- *     "base" method added to the constructor by goog.inherits
- *     or ES6 classes and the "super" keyword.
- */
-goog.base = function(me, opt_methodName, var_args) {
-  var caller = arguments.callee.caller;
-
-  if (goog.STRICT_MODE_COMPATIBLE || (goog.DEBUG && !caller)) {
-    throw new Error(
-        'arguments.caller not defined.  goog.base() cannot be used ' +
-        'with strict mode code. See ' +
-        'http://www.ecma-international.org/ecma-262/5.1/#sec-C');
-  }
-
-  if (caller.superClass_) {
-    // Copying using loop to avoid deop due to passing arguments object to
-    // function. This is faster in many JS engines as of late 2014.
-    var ctorArgs = new Array(arguments.length - 1);
-    for (var i = 1; i < arguments.length; i++) {
-      ctorArgs[i - 1] = arguments[i];
-    }
-    // This is a constructor. Call the superclass constructor.
-    return caller.superClass_.constructor.apply(me, ctorArgs);
-  }
-
-  // Copying using loop to avoid deop due to passing arguments object to
-  // function. This is faster in many JS engines as of late 2014.
-  var args = new Array(arguments.length - 2);
-  for (var i = 2; i < arguments.length; i++) {
-    args[i - 2] = arguments[i];
-  }
-  var foundCaller = false;
-  for (var ctor = me.constructor; ctor;
-       ctor = ctor.superClass_ && ctor.superClass_.constructor) {
-    if (ctor.prototype[opt_methodName] === caller) {
-      foundCaller = true;
-    } else if (foundCaller) {
-      return ctor.prototype[opt_methodName].apply(me, args);
-    }
-  }
-
-  // If we did not find the caller in the prototype chain, then one of two
-  // things happened:
-  // 1) The caller is an instance method.
-  // 2) This method was not called by the right caller.
-  if (me[opt_methodName] === caller) {
-    return me.constructor.prototype[opt_methodName].apply(me, args);
-  } else {
-    throw new Error(
-        'goog.base called from a method of one name ' +
-        'to a method of a different name');
-  }
-};
-
-
-/**
- * Allow for aliasing within scope functions.  This function exists for
- * uncompiled code - in compiled code the calls will be inlined and the aliases
- * applied.  In uncompiled code the function is simply run since the aliases as
- * written are valid JavaScript.
- *
- *
- * @param {function()} fn Function to call.  This function can contain aliases
- *     to namespaces (e.g. "var dom = goog.dom") or classes
- *     (e.g. "var Timer = goog.Timer").
- */
-goog.scope = function(fn) {
-  if (goog.isInModuleLoader_()) {
-    throw new Error('goog.scope is not supported within a goog.module.');
-  }
-  fn.call(goog.global);
-};
-
-
-/*
- * To support uncompiled, strict mode bundles that use eval to divide source
- * like so:
- *    eval('someSource;//# sourceUrl sourcefile.js');
- * We need to export the globally defined symbols "goog" and "COMPILED".
- * Exporting "goog" breaks the compiler optimizations, so we required that
- * be defined externally.
- * NOTE: We don't use goog.exportSymbol here because we don't want to trigger
- * extern generation when that compiler option is enabled.
- */
-if (!COMPILED) {
-  goog.global['COMPILED'] = COMPILED;
-}
-
-
-//==============================================================================
-// goog.defineClass implementation
-//==============================================================================
-
-
-/**
- * Creates a restricted form of a Closure "class":
- *   - from the compiler's perspective, the instance returned from the
- *     constructor is sealed (no new properties may be added).  This enables
- *     better checks.
- *   - the compiler will rewrite this definition to a form that is optimal
- *     for type checking and optimization (initially this will be a more
- *     traditional form).
- *
- * @param {Function} superClass The superclass, Object or null.
- * @param {goog.defineClass.ClassDescriptor} def
- *     An object literal describing
- *     the class.  It may have the following properties:
- *     "constructor": the constructor function
- *     "statics": an object literal containing methods to add to the constructor
- *        as "static" methods or a function that will receive the constructor
- *        function as its only parameter to which static properties can
- *        be added.
- *     all other properties are added to the prototype.
- * @return {!Function} The class constructor.
- */
-goog.defineClass = function(superClass, def) {
-  // TODO(johnlenz): consider making the superClass an optional parameter.
-  var constructor = def.constructor;
-  var statics = def.statics;
-  // Wrap the constructor prior to setting up the prototype and static methods.
-  if (!constructor || constructor == Object.prototype.constructor) {
-    constructor = function() {
-      throw new Error(
-          'cannot instantiate an interface (no constructor defined).');
-    };
-  }
-
-  var cls = goog.defineClass.createSealingConstructor_(constructor, superClass);
-  if (superClass) {
-    goog.inherits(cls, superClass);
-  }
-
-  // Remove all the properties that should not be copied to the prototype.
-  delete def.constructor;
-  delete def.statics;
-
-  goog.defineClass.applyProperties_(cls.prototype, def);
-  if (statics != null) {
-    if (statics instanceof Function) {
-      statics(cls);
-    } else {
-      goog.defineClass.applyProperties_(cls, statics);
-    }
-  }
-
-  return cls;
-};
-
-
-/**
- * @typedef {{
- *   constructor: (!Function|undefined),
- *   statics: (Object|undefined|function(Function):void)
- * }}
- */
-goog.defineClass.ClassDescriptor;
-
-
-/**
- * @define {boolean} Whether the instances returned by goog.defineClass should
- *     be sealed when possible.
- *
- * When sealing is disabled the constructor function will not be wrapped by
- * goog.defineClass, making it incompatible with ES6 class methods.
- */
-goog.define('goog.defineClass.SEAL_CLASS_INSTANCES', goog.DEBUG);
-
-
-/**
- * If goog.defineClass.SEAL_CLASS_INSTANCES is enabled and Object.seal is
- * defined, this function will wrap the constructor in a function that seals the
- * results of the provided constructor function.
- *
- * @param {!Function} ctr The constructor whose results maybe be sealed.
- * @param {Function} superClass The superclass constructor.
- * @return {!Function} The replacement constructor.
- * @private
- */
-goog.defineClass.createSealingConstructor_ = function(ctr, superClass) {
-  if (!goog.defineClass.SEAL_CLASS_INSTANCES) {
-    // Do now wrap the constructor when sealing is disabled. Angular code
-    // depends on this for injection to work properly.
-    return ctr;
-  }
-
-  // Compute whether the constructor is sealable at definition time, rather
-  // than when the instance is being constructed.
-  var superclassSealable = !goog.defineClass.isUnsealable_(superClass);
-
-  /**
-   * @this {Object}
-   * @return {?}
-   */
-  var wrappedCtr = function() {
-    // Don't seal an instance of a subclass when it calls the constructor of
-    // its super class as there is most likely still setup to do.
-    var instance = ctr.apply(this, arguments) || this;
-    instance[goog.UID_PROPERTY_] = instance[goog.UID_PROPERTY_];
-
-    if (this.constructor === wrappedCtr && superclassSealable &&
-        Object.seal instanceof Function) {
-      Object.seal(instance);
-    }
-    return instance;
-  };
-
-  return wrappedCtr;
-};
-
-
-/**
- * @param {Function} ctr The constructor to test.
- * @return {boolean} Whether the constructor has been tagged as unsealable
- *     using goog.tagUnsealableClass.
- * @private
- */
-goog.defineClass.isUnsealable_ = function(ctr) {
-  return ctr && ctr.prototype &&
-      ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_];
-};
-
-
-// TODO(johnlenz): share these values with the goog.object
-/**
- * The names of the fields that are defined on Object.prototype.
- * @type {!Array<string>}
- * @private
- * @const
- */
-goog.defineClass.OBJECT_PROTOTYPE_FIELDS_ = [
-  'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',
-  'toLocaleString', 'toString', 'valueOf'
-];
-
-
-// TODO(johnlenz): share this function with the goog.object
-/**
- * @param {!Object} target The object to add properties to.
- * @param {!Object} source The object to copy properties from.
- * @private
- */
-goog.defineClass.applyProperties_ = function(target, source) {
-  // TODO(johnlenz): update this to support ES5 getters/setters
-
-  var key;
-  for (key in source) {
-    if (Object.prototype.hasOwnProperty.call(source, key)) {
-      target[key] = source[key];
-    }
-  }
-
-  // For IE the for-in-loop does not contain any properties that are not
-  // enumerable on the prototype object (for example isPrototypeOf from
-  // Object.prototype) and it will also not include 'replace' on objects that
-  // extend String and change 'replace' (not that it is common for anyone to
-  // extend anything except Object).
-  for (var i = 0; i < goog.defineClass.OBJECT_PROTOTYPE_FIELDS_.length; i++) {
-    key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i];
-    if (Object.prototype.hasOwnProperty.call(source, key)) {
-      target[key] = source[key];
-    }
-  }
-};
-
-
-/**
- * Sealing classes breaks the older idiom of assigning properties on the
- * prototype rather than in the constructor. As such, goog.defineClass
- * must not seal subclasses of these old-style classes until they are fixed.
- * Until then, this marks a class as "broken", instructing defineClass
- * not to seal subclasses.
- * @param {!Function} ctr The legacy constructor to tag as unsealable.
- */
-goog.tagUnsealableClass = function(ctr) {
-  if (!COMPILED && goog.defineClass.SEAL_CLASS_INSTANCES) {
-    ctr.prototype[goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_] = true;
-  }
-};
-
-
-/**
- * Name for unsealable tag property.
- * @const @private {string}
- */
-goog.UNSEALABLE_CONSTRUCTOR_PROPERTY_ = 'goog_defineClass_legacy_unsealable';
-
-
-/**
- * Returns a newly created map from language mode string to a boolean
- * indicating whether transpilation should be done for that mode.
- *
- * Guaranteed invariant:
- * For any two modes, l1 and l2 where l2 is a newer mode than l1,
- * `map[l1] == true` implies that `map[l2] == true`.
- * @private
- * @return {!Object<string, boolean>}
- */
-goog.createRequiresTranspilation_ = function() {
-  var /** !Object<string, boolean> */ requiresTranspilation = {'es3': false};
-  var transpilationRequiredForAllLaterModes = false;
-
-  /**
-   * Adds an entry to requiresTranspliation for the given language mode.
-   *
-   * IMPORTANT: Calls must be made in order from oldest to newest language
-   * mode.
-   * @param {string} modeName
-   * @param {function(): boolean} isSupported Returns true if the JS engine
-   *     supports the given mode.
-   */
-  function addNewerLanguageTranspilationCheck(modeName, isSupported) {
-    if (transpilationRequiredForAllLaterModes) {
-      requiresTranspilation[modeName] = true;
-    } else if (isSupported()) {
-      requiresTranspilation[modeName] = false;
-    } else {
-      requiresTranspilation[modeName] = true;
-      transpilationRequiredForAllLaterModes = true;
-    }
-  }
-
-  /**
-   * Does the given code evaluate without syntax errors and return a truthy
-   * result?
-   */
-  function /** boolean */ evalCheck(/** string */ code) {
-    try {
-      return !!eval(code);
-    } catch (ignored) {
-      return false;
-    }
-  }
-
-  var userAgent = goog.global.navigator && goog.global.navigator.userAgent ?
-      goog.global.navigator.userAgent :
-      '';
-
-  // Identify ES3-only browsers by their incorrect treatment of commas.
-  addNewerLanguageTranspilationCheck('es5', function() {
-    return evalCheck('[1,].length==1');
-  });
-  addNewerLanguageTranspilationCheck('es6', function() {
-    // Edge has a non-deterministic (i.e., not reproducible) bug with ES6:
-    // https://github.com/Microsoft/ChakraCore/issues/1496.
-    var re = /Edge\/(\d+)(\.\d)*/i;
-    var edgeUserAgent = userAgent.match(re);
-    if (edgeUserAgent && Number(edgeUserAgent[1]) < 15) {
-      return false;
-    }
-    // Test es6: [FF50 (?), Edge 14 (?), Chrome 50]
-    //   (a) default params (specifically shadowing locals),
-    //   (b) destructuring, (c) block-scoped functions,
-    //   (d) for-of (const), (e) new.target/Reflect.construct
-    var es6fullTest =
-        'class X{constructor(){if(new.target!=String)throw 1;this.x=42}}' +
-        'let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof ' +
-        'String))throw 1;for(const a of[2,3]){if(a==2)continue;function ' +
-        'f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()' +
-        '==3}';
-
-    return evalCheck('(()=>{"use strict";' + es6fullTest + '})()');
-  });
-  // TODO(joeltine): Remove es6-impl references for b/31340605.
-  // Consider es6-impl (widely-implemented es6 features) to be supported
-  // whenever es6 is supported. Technically es6-impl is a lower level of
-  // support than es6, but we don't have tests specifically for it.
-  addNewerLanguageTranspilationCheck('es6-impl', function() {
-    return true;
-  });
-  // ** and **= are the only new features in 'es7'
-  addNewerLanguageTranspilationCheck('es7', function() {
-    return evalCheck('2 ** 2 == 4');
-  });
-  // async functions are the only new features in 'es8'
-  addNewerLanguageTranspilationCheck('es8', function() {
-    return evalCheck('async () => 1, true');
-  });
-  return requiresTranspilation;
-};
-
-goog.provide('ol.array');
-
-
-/**
- * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.
- * https://github.com/darkskyapp/binary-search
- *
- * @param {Array.<*>} haystack Items to search through.
- * @param {*} needle The item to look for.
- * @param {Function=} opt_comparator Comparator function.
- * @return {number} The index of the item if found, -1 if not.
- */
-ol.array.binarySearch = function(haystack, needle, opt_comparator) {
-  var mid, cmp;
-  var comparator = opt_comparator || ol.array.numberSafeCompareFunction;
-  var low = 0;
-  var high = haystack.length;
-  var found = false;
-
-  while (low < high) {
-    /* Note that "(low + high) >>> 1" may overflow, and results in a typecast
-     * to double (which gives the wrong results). */
-    mid = low + (high - low >> 1);
-    cmp = +comparator(haystack[mid], needle);
-
-    if (cmp < 0.0) { /* Too low. */
-      low  = mid + 1;
-
-    } else { /* Key found or too high */
-      high = mid;
-      found = !cmp;
-    }
-  }
-
-  /* Key not found. */
-  return found ? low : ~low;
-};
-
-
-/**
- * Compare function for array sort that is safe for numbers.
- * @param {*} a The first object to be compared.
- * @param {*} b The second object to be compared.
- * @return {number} A negative number, zero, or a positive number as the first
- *     argument is less than, equal to, or greater than the second.
- */
-ol.array.numberSafeCompareFunction = function(a, b) {
-  return a > b ? 1 : a < b ? -1 : 0;
-};
-
-
-/**
- * Whether the array contains the given object.
- * @param {Array.<*>} arr The array to test for the presence of the element.
- * @param {*} obj The object for which to test.
- * @return {boolean} The object is in the array.
- */
-ol.array.includes = function(arr, obj) {
-  return arr.indexOf(obj) >= 0;
-};
-
-
-/**
- * @param {Array.<number>} arr Array.
- * @param {number} target Target.
- * @param {number} direction 0 means return the nearest, > 0
- *    means return the largest nearest, < 0 means return the
- *    smallest nearest.
- * @return {number} Index.
- */
-ol.array.linearFindNearest = function(arr, target, direction) {
-  var n = arr.length;
-  if (arr[0] <= target) {
-    return 0;
-  } else if (target <= arr[n - 1]) {
-    return n - 1;
-  } else {
-    var i;
-    if (direction > 0) {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] < target) {
-          return i - 1;
-        }
-      }
-    } else if (direction < 0) {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] <= target) {
-          return i;
-        }
-      }
-    } else {
-      for (i = 1; i < n; ++i) {
-        if (arr[i] == target) {
-          return i;
-        } else if (arr[i] < target) {
-          if (arr[i - 1] - target < target - arr[i]) {
-            return i - 1;
-          } else {
-            return i;
-          }
-        }
-      }
-    }
-    return n - 1;
-  }
-};
-
-
-/**
- * @param {Array.<*>} arr Array.
- * @param {number} begin Begin index.
- * @param {number} end End index.
- */
-ol.array.reverseSubArray = function(arr, begin, end) {
-  while (begin < end) {
-    var tmp = arr[begin];
-    arr[begin] = arr[end];
-    arr[end] = tmp;
-    ++begin;
-    --end;
-  }
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to modify.
- * @param {Array.<VALUE>|VALUE} data The elements or arrays of elements
- *     to add to arr.
- * @template VALUE
- */
-ol.array.extend = function(arr, data) {
-  var i;
-  var extension = Array.isArray(data) ? data : [data];
-  var length = extension.length;
-  for (i = 0; i < length; i++) {
-    arr[arr.length] = extension[i];
-  }
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to modify.
- * @param {VALUE} obj The element to remove.
- * @template VALUE
- * @return {boolean} If the element was removed.
- */
-ol.array.remove = function(arr, obj) {
-  var i = arr.indexOf(obj);
-  var found = i > -1;
-  if (found) {
-    arr.splice(i, 1);
-  }
-  return found;
-};
-
-
-/**
- * @param {Array.<VALUE>} arr The array to search in.
- * @param {function(VALUE, number, ?) : boolean} func The function to compare.
- * @template VALUE
- * @return {VALUE} The element found.
- */
-ol.array.find = function(arr, func) {
-  var length = arr.length >>> 0;
-  var value;
-
-  for (var i = 0; i < length; i++) {
-    value = arr[i];
-    if (func(value, i, arr)) {
-      return value;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @param {Array|Uint8ClampedArray} arr1 The first array to compare.
- * @param {Array|Uint8ClampedArray} arr2 The second array to compare.
- * @return {boolean} Whether the two arrays are equal.
- */
-ol.array.equals = function(arr1, arr2) {
-  var len1 = arr1.length;
-  if (len1 !== arr2.length) {
-    return false;
-  }
-  for (var i = 0; i < len1; i++) {
-    if (arr1[i] !== arr2[i]) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<*>} arr The array to sort (modifies original).
- * @param {Function} compareFnc Comparison function.
- */
-ol.array.stableSort = function(arr, compareFnc) {
-  var length = arr.length;
-  var tmp = Array(arr.length);
-  var i;
-  for (i = 0; i < length; i++) {
-    tmp[i] = {index: i, value: arr[i]};
-  }
-  tmp.sort(function(a, b) {
-    return compareFnc(a.value, b.value) || a.index - b.index;
-  });
-  for (i = 0; i < arr.length; i++) {
-    arr[i] = tmp[i].value;
-  }
-};
-
-
-/**
- * @param {Array.<*>} arr The array to search in.
- * @param {Function} func Comparison function.
- * @return {number} Return index.
- */
-ol.array.findIndex = function(arr, func) {
-  var index;
-  var found = !arr.every(function(el, idx) {
-    index = idx;
-    return !func(el, idx, arr);
-  });
-  return found ? index : -1;
-};
-
-
-/**
- * @param {Array.<*>} arr The array to test.
- * @param {Function=} opt_func Comparison function.
- * @param {boolean=} opt_strict Strictly sorted (default false).
- * @return {boolean} Return index.
- */
-ol.array.isSorted = function(arr, opt_func, opt_strict) {
-  var compare = opt_func || ol.array.numberSafeCompareFunction;
-  return arr.every(function(currentVal, index) {
-    if (index === 0) {
-      return true;
-    }
-    var res = compare(arr[index - 1], currentVal);
-    return !(res > 0 || opt_strict && res === 0);
-  });
-};
-
-goog.provide('ol');
-
-
-/**
- * Constants defined with the define tag cannot be changed in application
- * code, but can be set at compile time.
- * Some reduce the size of the build in advanced compile mode.
- */
-
-
-/**
- * @define {boolean} Assume touch.  Default is `false`.
- */
-ol.ASSUME_TOUCH = false;
-
-
-/**
- * TODO: rename this to something having to do with tile grids
- * see https://github.com/openlayers/openlayers/issues/2076
- * @define {number} Default maximum zoom for default tile grids.
- */
-ol.DEFAULT_MAX_ZOOM = 42;
-
-
-/**
- * @define {number} Default min zoom level for the map view.  Default is `0`.
- */
-ol.DEFAULT_MIN_ZOOM = 0;
-
-
-/**
- * @define {number} Default maximum allowed threshold  (in pixels) for
- *     reprojection triangulation. Default is `0.5`.
- */
-ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD = 0.5;
-
-
-/**
- * @define {number} Default tile size.
- */
-ol.DEFAULT_TILE_SIZE = 256;
-
-
-/**
- * @define {string} Default WMS version.
- */
-ol.DEFAULT_WMS_VERSION = '1.3.0';
-
-
-/**
- * @define {boolean} Enable the Canvas renderer.  Default is `true`. Setting
- *     this to false at compile time in advanced mode removes all code
- *     supporting the Canvas renderer from the build.
- */
-ol.ENABLE_CANVAS = true;
-
-
-/**
- * @define {boolean} Enable integration with the Proj4js library.  Default is
- *     `true`.
- */
-ol.ENABLE_PROJ4JS = true;
-
-
-/**
- * @define {boolean} Enable automatic reprojection of raster sources. Default is
- *     `true`.
- */
-ol.ENABLE_RASTER_REPROJECTION = true;
-
-
-/**
- * @define {boolean} Enable the WebGL renderer.  Default is `true`. Setting
- *     this to false at compile time in advanced mode removes all code
- *     supporting the WebGL renderer from the build.
- */
-ol.ENABLE_WEBGL = true;
-
-
-/**
- * @define {boolean} Include debuggable shader sources.  Default is `true`.
- *     This should be set to `false` for production builds (if `ol.ENABLE_WEBGL`
- *     is `true`).
- */
-ol.DEBUG_WEBGL = true;
-
-
-/**
- * @define {number} The size in pixels of the first atlas image. Default is
- * `256`.
- */
-ol.INITIAL_ATLAS_SIZE = 256;
-
-
-/**
- * @define {number} The maximum size in pixels of atlas images. Default is
- * `-1`, meaning it is not used (and `ol.WEBGL_MAX_TEXTURE_SIZE` is
- * used instead).
- */
-ol.MAX_ATLAS_SIZE = -1;
-
-
-/**
- * @define {number} Maximum mouse wheel delta.
- */
-ol.MOUSEWHEELZOOM_MAXDELTA = 1;
-
-
-/**
- * @define {number} Maximum width and/or height extent ratio that determines
- * when the overview map should be zoomed out.
- */
-ol.OVERVIEWMAP_MAX_RATIO = 0.75;
-
-
-/**
- * @define {number} Minimum width and/or height extent ratio that determines
- * when the overview map should be zoomed in.
- */
-ol.OVERVIEWMAP_MIN_RATIO = 0.1;
-
-
-/**
- * @define {number} Maximum number of source tiles for raster reprojection of
- *     a single tile.
- *     If too many source tiles are determined to be loaded to create a single
- *     reprojected tile the browser can become unresponsive or even crash.
- *     This can happen if the developer defines projections improperly and/or
- *     with unlimited extents.
- *     If too many tiles are required, no tiles are loaded and
- *     `ol.TileState.ERROR` state is set. Default is `100`.
- */
-ol.RASTER_REPROJECTION_MAX_SOURCE_TILES = 100;
-
-
-/**
- * @define {number} Maximum number of subdivision steps during raster
- *     reprojection triangulation. Prevents high memory usage and large
- *     number of proj4 calls (for certain transformations and areas).
- *     At most `2*(2^this)` triangles are created for each triangulated
- *     extent (tile/image). Default is `10`.
- */
-ol.RASTER_REPROJECTION_MAX_SUBDIVISION = 10;
-
-
-/**
- * @define {number} Maximum allowed size of triangle relative to world width.
- *     When transforming corners of world extent between certain projections,
- *     the resulting triangulation seems to have zero error and no subdivision
- *     is performed.
- *     If the triangle width is more than this (relative to world width; 0-1),
- *     subdivison is forced (up to `ol.RASTER_REPROJECTION_MAX_SUBDIVISION`).
- *     Default is `0.25`.
- */
-ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH = 0.25;
-
-
-/**
- * @define {number} Tolerance for geometry simplification in device pixels.
- */
-ol.SIMPLIFY_TOLERANCE = 0.5;
-
-
-/**
- * @define {number} Texture cache high water mark.
- */
-ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;
-
-
-/**
- * @define {string} OpenLayers version.
- */
-ol.VERSION = '';
-
-
-/**
- * The maximum supported WebGL texture size in pixels. If WebGL is not
- * supported, the value is set to `undefined`.
- * @const
- * @type {number|undefined}
- */
-ol.WEBGL_MAX_TEXTURE_SIZE; // value is set in `ol.has`
-
-
-/**
- * List of supported WebGL extensions.
- * @const
- * @type {Array.<string>}
- */
-ol.WEBGL_EXTENSIONS; // value is set in `ol.has`
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * Usage:
- *
- *     function ParentClass(a, b) { }
- *     ParentClass.prototype.foo = function(a) { }
- *
- *     function ChildClass(a, b, c) {
- *       // Call parent constructor
- *       ParentClass.call(this, a, b);
- *     }
- *     ol.inherits(ChildClass, ParentClass);
- *
- *     var child = new ChildClass('a', 'b', 'see');
- *     child.foo(); // This works.
- *
- * @param {!Function} childCtor Child constructor.
- * @param {!Function} parentCtor Parent constructor.
- * @function
- * @api
- */
-ol.inherits = function(childCtor, parentCtor) {
-  childCtor.prototype = Object.create(parentCtor.prototype);
-  childCtor.prototype.constructor = childCtor;
-};
-
-
-/**
- * A reusable function, used e.g. as a default for callbacks.
- *
- * @return {undefined} Nothing.
- */
-ol.nullFunction = function() {};
-
-
-/**
- * Gets a unique ID for an object. This mutates the object so that further calls
- * with the same object as a parameter returns the same value. Unique IDs are generated
- * as a strictly increasing sequence. Adapted from goog.getUid.
- *
- * @param {Object} obj The object to get the unique ID for.
- * @return {number} The unique ID for the object.
- */
-ol.getUid = function(obj) {
-  return obj.ol_uid ||
-      (obj.ol_uid = ++ol.uidCounter_);
-};
-
-
-/**
- * Counter for getUid.
- * @type {number}
- * @private
- */
-ol.uidCounter_ = 0;
-
-goog.provide('ol.AssertionError');
-
-goog.require('ol');
-
-/**
- * Error object thrown when an assertion failed. This is an ECMA-262 Error,
- * extended with a `code` property.
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error}
- * @constructor
- * @extends {Error}
- * @implements {oli.AssertionError}
- * @param {number} code Error code.
- */
-ol.AssertionError = function(code) {
-
-  var path = ol.VERSION ? ol.VERSION.split('-')[0] : 'latest';
-
-  /**
-   * @type {string}
-   */
-  this.message = 'Assertion failed. See https://openlayers.org/en/' + path +
-      '/doc/errors/#' + code + ' for details.';
-
-  /**
-   * Error code. The meaning of the code can be found on
-   * {@link https://openlayers.org/en/latest/doc/errors/} (replace `latest` with
-   * the version found in the OpenLayers script's header comment if a version
-   * other than the latest is used).
-   * @type {number}
-   * @api
-   */
-  this.code = code;
-
-  this.name = 'AssertionError';
-
-};
-ol.inherits(ol.AssertionError, Error);
-
-goog.provide('ol.asserts');
-
-goog.require('ol.AssertionError');
-
-
-/**
- * @param {*} assertion Assertion we expected to be truthy.
- * @param {number} errorCode Error code.
- */
-ol.asserts.assert = function(assertion, errorCode) {
-  if (!assertion) {
-    throw new ol.AssertionError(errorCode);
-  }
-};
-
-goog.provide('ol.TileRange');
-
-
-/**
- * A representation of a contiguous block of tiles.  A tile range is specified
- * by its min/max tile coordinates and is inclusive of coordinates.
- *
- * @constructor
- * @param {number} minX Minimum X.
- * @param {number} maxX Maximum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxY Maximum Y.
- * @struct
- */
-ol.TileRange = function(minX, maxX, minY, maxY) {
-
-  /**
-   * @type {number}
-   */
-  this.minX = minX;
-
-  /**
-   * @type {number}
-   */
-  this.maxX = maxX;
-
-  /**
-   * @type {number}
-   */
-  this.minY = minY;
-
-  /**
-   * @type {number}
-   */
-  this.maxY = maxY;
-
-};
-
-
-/**
- * @param {number} minX Minimum X.
- * @param {number} maxX Maximum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxY Maximum Y.
- * @param {ol.TileRange|undefined} tileRange TileRange.
- * @return {ol.TileRange} Tile range.
- */
-ol.TileRange.createOrUpdate = function(minX, maxX, minY, maxY, tileRange) {
-  if (tileRange !== undefined) {
-    tileRange.minX = minX;
-    tileRange.maxX = maxX;
-    tileRange.minY = minY;
-    tileRange.maxY = maxY;
-    return tileRange;
-  } else {
-    return new ol.TileRange(minX, maxX, minY, maxY);
-  }
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {boolean} Contains tile coordinate.
- */
-ol.TileRange.prototype.contains = function(tileCoord) {
-  return this.containsXY(tileCoord[1], tileCoord[2]);
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Contains.
- */
-ol.TileRange.prototype.containsTileRange = function(tileRange) {
-  return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX &&
-      this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;
-};
-
-
-/**
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @return {boolean} Contains coordinate.
- */
-ol.TileRange.prototype.containsXY = function(x, y) {
-  return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Equals.
- */
-ol.TileRange.prototype.equals = function(tileRange) {
-  return this.minX == tileRange.minX && this.minY == tileRange.minY &&
-      this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- */
-ol.TileRange.prototype.extend = function(tileRange) {
-  if (tileRange.minX < this.minX) {
-    this.minX = tileRange.minX;
-  }
-  if (tileRange.maxX > this.maxX) {
-    this.maxX = tileRange.maxX;
-  }
-  if (tileRange.minY < this.minY) {
-    this.minY = tileRange.minY;
-  }
-  if (tileRange.maxY > this.maxY) {
-    this.maxY = tileRange.maxY;
-  }
-};
-
-
-/**
- * @return {number} Height.
- */
-ol.TileRange.prototype.getHeight = function() {
-  return this.maxY - this.minY + 1;
-};
-
-
-/**
- * @return {ol.Size} Size.
- */
-ol.TileRange.prototype.getSize = function() {
-  return [this.getWidth(), this.getHeight()];
-};
-
-
-/**
- * @return {number} Width.
- */
-ol.TileRange.prototype.getWidth = function() {
-  return this.maxX - this.minX + 1;
-};
-
-
-/**
- * @param {ol.TileRange} tileRange Tile range.
- * @return {boolean} Intersects.
- */
-ol.TileRange.prototype.intersects = function(tileRange) {
-  return this.minX <= tileRange.maxX &&
-      this.maxX >= tileRange.minX &&
-      this.minY <= tileRange.maxY &&
-      this.maxY >= tileRange.minY;
-};
-
-goog.provide('ol.math');
-
-goog.require('ol.asserts');
-
-
-/**
- * Takes a number and clamps it to within the provided bounds.
- * @param {number} value The input number.
- * @param {number} min The minimum value to return.
- * @param {number} max The maximum value to return.
- * @return {number} The input number if it is within bounds, or the nearest
- *     number within the bounds.
- */
-ol.math.clamp = function(value, min, max) {
-  return Math.min(Math.max(value, min), max);
-};
-
-
-/**
- * Return the hyperbolic cosine of a given number. The method will use the
- * native `Math.cosh` function if it is available, otherwise the hyperbolic
- * cosine will be calculated via the reference implementation of the Mozilla
- * developer network.
- *
- * @param {number} x X.
- * @return {number} Hyperbolic cosine of x.
- */
-ol.math.cosh = (function() {
-  // Wrapped in a iife, to save the overhead of checking for the native
-  // implementation on every invocation.
-  var cosh;
-  if ('cosh' in Math) {
-    // The environment supports the native Math.cosh function, use it…
-    cosh = Math.cosh;
-  } else {
-    // … else, use the reference implementation of MDN:
-    cosh = function(x) {
-      var y = Math.exp(x);
-      return (y + 1 / y) / 2;
-    };
-  }
-  return cosh;
-}());
-
-
-/**
- * @param {number} x X.
- * @return {number} The smallest power of two greater than or equal to x.
- */
-ol.math.roundUpToPowerOfTwo = function(x) {
-  ol.asserts.assert(0 < x, 29); // `x` must be greater than `0`
-  return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));
-};
-
-
-/**
- * Returns the square of the closest distance between the point (x, y) and the
- * line segment (x1, y1) to (x2, y2).
- * @param {number} x X.
- * @param {number} y Y.
- * @param {number} x1 X1.
- * @param {number} y1 Y1.
- * @param {number} x2 X2.
- * @param {number} y2 Y2.
- * @return {number} Squared distance.
- */
-ol.math.squaredSegmentDistance = function(x, y, x1, y1, x2, y2) {
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  if (dx !== 0 || dy !== 0) {
-    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
-    if (t > 1) {
-      x1 = x2;
-      y1 = y2;
-    } else if (t > 0) {
-      x1 += dx * t;
-      y1 += dy * t;
-    }
-  }
-  return ol.math.squaredDistance(x, y, x1, y1);
-};
-
-
-/**
- * Returns the square of the distance between the points (x1, y1) and (x2, y2).
- * @param {number} x1 X1.
- * @param {number} y1 Y1.
- * @param {number} x2 X2.
- * @param {number} y2 Y2.
- * @return {number} Squared distance.
- */
-ol.math.squaredDistance = function(x1, y1, x2, y2) {
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * Solves system of linear equations using Gaussian elimination method.
- *
- * @param {Array.<Array.<number>>} mat Augmented matrix (n x n + 1 column)
- *                                     in row-major order.
- * @return {Array.<number>} The resulting vector.
- */
-ol.math.solveLinearSystem = function(mat) {
-  var n = mat.length;
-
-  for (var i = 0; i < n; i++) {
-    // Find max in the i-th column (ignoring i - 1 first rows)
-    var maxRow = i;
-    var maxEl = Math.abs(mat[i][i]);
-    for (var r = i + 1; r < n; r++) {
-      var absValue = Math.abs(mat[r][i]);
-      if (absValue > maxEl) {
-        maxEl = absValue;
-        maxRow = r;
-      }
-    }
-
-    if (maxEl === 0) {
-      return null; // matrix is singular
-    }
-
-    // Swap max row with i-th (current) row
-    var tmp = mat[maxRow];
-    mat[maxRow] = mat[i];
-    mat[i] = tmp;
-
-    // Subtract the i-th row to make all the remaining rows 0 in the i-th column
-    for (var j = i + 1; j < n; j++) {
-      var coef = -mat[j][i] / mat[i][i];
-      for (var k = i; k < n + 1; k++) {
-        if (i == k) {
-          mat[j][k] = 0;
-        } else {
-          mat[j][k] += coef * mat[i][k];
-        }
-      }
-    }
-  }
-
-  // Solve Ax=b for upper triangular matrix A (mat)
-  var x = new Array(n);
-  for (var l = n - 1; l >= 0; l--) {
-    x[l] = mat[l][n] / mat[l][l];
-    for (var m = l - 1; m >= 0; m--) {
-      mat[m][n] -= mat[m][l] * x[l];
-    }
-  }
-  return x;
-};
-
-
-/**
- * Converts radians to to degrees.
- *
- * @param {number} angleInRadians Angle in radians.
- * @return {number} Angle in degrees.
- */
-ol.math.toDegrees = function(angleInRadians) {
-  return angleInRadians * 180 / Math.PI;
-};
-
-
-/**
- * Converts degrees to radians.
- *
- * @param {number} angleInDegrees Angle in degrees.
- * @return {number} Angle in radians.
- */
-ol.math.toRadians = function(angleInDegrees) {
-  return angleInDegrees * Math.PI / 180;
-};
-
-/**
- * Returns the modulo of a / b, depending on the sign of b.
- *
- * @param {number} a Dividend.
- * @param {number} b Divisor.
- * @return {number} Modulo.
- */
-ol.math.modulo = function(a, b) {
-  var r = a % b;
-  return r * b < 0 ? r + b : r;
-};
-
-/**
- * Calculates the linearly interpolated value of x between a and b.
- *
- * @param {number} a Number
- * @param {number} b Number
- * @param {number} x Value to be interpolated.
- * @return {number} Interpolated value.
- */
-ol.math.lerp = function(a, b, x) {
-  return a + x * (b - a);
-};
-
-goog.provide('ol.size');
-
-
-/**
- * Returns a buffered size.
- * @param {ol.Size} size Size.
- * @param {number} buffer Buffer.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} The buffered size.
- */
-ol.size.buffer = function(size, buffer, opt_size) {
-  if (opt_size === undefined) {
-    opt_size = [0, 0];
-  }
-  opt_size[0] = size[0] + 2 * buffer;
-  opt_size[1] = size[1] + 2 * buffer;
-  return opt_size;
-};
-
-
-/**
- * Determines if a size has a positive area.
- * @param {ol.Size} size The size to test.
- * @return {boolean} The size has a positive area.
- */
-ol.size.hasArea = function(size) {
-  return size[0] > 0 && size[1] > 0;
-};
-
-
-/**
- * Returns a size scaled by a ratio. The result will be an array of integers.
- * @param {ol.Size} size Size.
- * @param {number} ratio Ratio.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} The scaled size.
- */
-ol.size.scale = function(size, ratio, opt_size) {
-  if (opt_size === undefined) {
-    opt_size = [0, 0];
-  }
-  opt_size[0] = (size[0] * ratio + 0.5) | 0;
-  opt_size[1] = (size[1] * ratio + 0.5) | 0;
-  return opt_size;
-};
-
-
-/**
- * Returns an `ol.Size` array for the passed in number (meaning: square) or
- * `ol.Size` array.
- * (meaning: non-square),
- * @param {number|ol.Size} size Width and height.
- * @param {ol.Size=} opt_size Optional reusable size array.
- * @return {ol.Size} Size.
- * @api
- */
-ol.size.toSize = function(size, opt_size) {
-  if (Array.isArray(size)) {
-    return size;
-  } else {
-    if (opt_size === undefined) {
-      opt_size = [size, size];
-    } else {
-      opt_size[0] = opt_size[1] = /** @type {number} */ (size);
-    }
-    return opt_size;
-  }
-};
-
-goog.provide('ol.extent.Corner');
-
-/**
- * Extent corner.
- * @enum {string}
- */
-ol.extent.Corner = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_RIGHT: 'bottom-right',
-  TOP_LEFT: 'top-left',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.extent.Relationship');
-
-
-/**
- * Relationship to an extent.
- * @enum {number}
- */
-ol.extent.Relationship = {
-  UNKNOWN: 0,
-  INTERSECTING: 1,
-  ABOVE: 2,
-  RIGHT: 4,
-  BELOW: 8,
-  LEFT: 16
-};
-
-goog.provide('ol.extent');
-
-goog.require('ol.asserts');
-goog.require('ol.extent.Corner');
-goog.require('ol.extent.Relationship');
-
-
-/**
- * Build an extent that includes all given coordinates.
- *
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @return {ol.Extent} Bounding extent.
- * @api
- */
-ol.extent.boundingExtent = function(coordinates) {
-  var extent = ol.extent.createEmpty();
-  for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-    ol.extent.extendCoordinate(extent, coordinates[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {Array.<number>} xs Xs.
- * @param {Array.<number>} ys Ys.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @private
- * @return {ol.Extent} Extent.
- */
-ol.extent.boundingExtentXYs_ = function(xs, ys, opt_extent) {
-  var minX = Math.min.apply(null, xs);
-  var minY = Math.min.apply(null, ys);
-  var maxX = Math.max.apply(null, xs);
-  var maxY = Math.max.apply(null, ys);
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * Return extent increased by the provided value.
- * @param {ol.Extent} extent Extent.
- * @param {number} value The amount by which the extent should be buffered.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.extent.buffer = function(extent, value, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0] - value;
-    opt_extent[1] = extent[1] - value;
-    opt_extent[2] = extent[2] + value;
-    opt_extent[3] = extent[3] + value;
-    return opt_extent;
-  } else {
-    return [
-      extent[0] - value,
-      extent[1] - value,
-      extent[2] + value,
-      extent[3] + value
-    ];
-  }
-};
-
-
-/**
- * Creates a clone of an extent.
- *
- * @param {ol.Extent} extent Extent to clone.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} The clone.
- */
-ol.extent.clone = function(extent, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0];
-    opt_extent[1] = extent[1];
-    opt_extent[2] = extent[2];
-    opt_extent[3] = extent[3];
-    return opt_extent;
-  } else {
-    return extent.slice();
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {number} Closest squared distance.
- */
-ol.extent.closestSquaredDistanceXY = function(extent, x, y) {
-  var dx, dy;
-  if (x < extent[0]) {
-    dx = extent[0] - x;
-  } else if (extent[2] < x) {
-    dx = x - extent[2];
-  } else {
-    dx = 0;
-  }
-  if (y < extent[1]) {
-    dy = extent[1] - y;
-  } else if (extent[3] < y) {
-    dy = y - extent[3];
-  } else {
-    dy = 0;
-  }
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * Check if the passed coordinate is contained or on the edge of the extent.
- *
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {boolean} The coordinate is contained in the extent.
- * @api
- */
-ol.extent.containsCoordinate = function(extent, coordinate) {
-  return ol.extent.containsXY(extent, coordinate[0], coordinate[1]);
-};
-
-
-/**
- * Check if one extent contains another.
- *
- * An extent is deemed contained if it lies completely within the other extent,
- * including if they share one or more edges.
- *
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {boolean} The second extent is contained by or on the edge of the
- *     first.
- * @api
- */
-ol.extent.containsExtent = function(extent1, extent2) {
-  return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] &&
-      extent1[1] <= extent2[1] && extent2[3] <= extent1[3];
-};
-
-
-/**
- * Check if the passed coordinate is contained or on the edge of the extent.
- *
- * @param {ol.Extent} extent Extent.
- * @param {number} x X coordinate.
- * @param {number} y Y coordinate.
- * @return {boolean} The x, y values are contained in the extent.
- * @api
- */
-ol.extent.containsXY = function(extent, x, y) {
-  return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];
-};
-
-
-/**
- * Get the relationship between a coordinate and extent.
- * @param {ol.Extent} extent The extent.
- * @param {ol.Coordinate} coordinate The coordinate.
- * @return {number} The relationship (bitwise compare with
- *     ol.extent.Relationship).
- */
-ol.extent.coordinateRelationship = function(extent, coordinate) {
-  var minX = extent[0];
-  var minY = extent[1];
-  var maxX = extent[2];
-  var maxY = extent[3];
-  var x = coordinate[0];
-  var y = coordinate[1];
-  var relationship = ol.extent.Relationship.UNKNOWN;
-  if (x < minX) {
-    relationship = relationship | ol.extent.Relationship.LEFT;
-  } else if (x > maxX) {
-    relationship = relationship | ol.extent.Relationship.RIGHT;
-  }
-  if (y < minY) {
-    relationship = relationship | ol.extent.Relationship.BELOW;
-  } else if (y > maxY) {
-    relationship = relationship | ol.extent.Relationship.ABOVE;
-  }
-  if (relationship === ol.extent.Relationship.UNKNOWN) {
-    relationship = ol.extent.Relationship.INTERSECTING;
-  }
-  return relationship;
-};
-
-
-/**
- * Create an empty extent.
- * @return {ol.Extent} Empty extent.
- * @api
- */
-ol.extent.createEmpty = function() {
-  return [Infinity, Infinity, -Infinity, -Infinity];
-};
-
-
-/**
- * Create a new extent or update the provided extent.
- * @param {number} minX Minimum X.
- * @param {number} minY Minimum Y.
- * @param {number} maxX Maximum X.
- * @param {number} maxY Maximum Y.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdate = function(minX, minY, maxX, maxY, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = minX;
-    opt_extent[1] = minY;
-    opt_extent[2] = maxX;
-    opt_extent[3] = maxY;
-    return opt_extent;
-  } else {
-    return [minX, minY, maxX, maxY];
-  }
-};
-
-
-/**
- * Create a new empty extent or make the provided one empty.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateEmpty = function(opt_extent) {
-  return ol.extent.createOrUpdate(
-      Infinity, Infinity, -Infinity, -Infinity, opt_extent);
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromCoordinate = function(coordinate, opt_extent) {
-  var x = coordinate[0];
-  var y = coordinate[1];
-  return ol.extent.createOrUpdate(x, y, x, y, opt_extent);
-};
-
-
-/**
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromCoordinates = function(coordinates, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendCoordinates(extent, coordinates);
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromFlatCoordinates = function(flatCoordinates, offset, end, stride, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendFlatCoordinates(
-      extent, flatCoordinates, offset, end, stride);
-};
-
-
-/**
- * @param {Array.<Array.<ol.Coordinate>>} rings Rings.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.createOrUpdateFromRings = function(rings, opt_extent) {
-  var extent = ol.extent.createOrUpdateEmpty(opt_extent);
-  return ol.extent.extendRings(extent, rings);
-};
-
-
-/**
- * Determine if two extents are equivalent.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {boolean} The two extents are equivalent.
- * @api
- */
-ol.extent.equals = function(extent1, extent2) {
-  return extent1[0] == extent2[0] && extent1[2] == extent2[2] &&
-      extent1[1] == extent2[1] && extent1[3] == extent2[3];
-};
-
-
-/**
- * Modify an extent to include another extent.
- * @param {ol.Extent} extent1 The extent to be modified.
- * @param {ol.Extent} extent2 The extent that will be included in the first.
- * @return {ol.Extent} A reference to the first (extended) extent.
- * @api
- */
-ol.extent.extend = function(extent1, extent2) {
-  if (extent2[0] < extent1[0]) {
-    extent1[0] = extent2[0];
-  }
-  if (extent2[2] > extent1[2]) {
-    extent1[2] = extent2[2];
-  }
-  if (extent2[1] < extent1[1]) {
-    extent1[1] = extent2[1];
-  }
-  if (extent2[3] > extent1[3]) {
-    extent1[3] = extent2[3];
-  }
-  return extent1;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} coordinate Coordinate.
- */
-ol.extent.extendCoordinate = function(extent, coordinate) {
-  if (coordinate[0] < extent[0]) {
-    extent[0] = coordinate[0];
-  }
-  if (coordinate[0] > extent[2]) {
-    extent[2] = coordinate[0];
-  }
-  if (coordinate[1] < extent[1]) {
-    extent[1] = coordinate[1];
-  }
-  if (coordinate[1] > extent[3]) {
-    extent[3] = coordinate[1];
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendCoordinates = function(extent, coordinates) {
-  var i, ii;
-  for (i = 0, ii = coordinates.length; i < ii; ++i) {
-    ol.extent.extendCoordinate(extent, coordinates[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendFlatCoordinates = function(extent, flatCoordinates, offset, end, stride) {
-  for (; offset < end; offset += stride) {
-    ol.extent.extendXY(
-        extent, flatCoordinates[offset], flatCoordinates[offset + 1]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {Array.<Array.<ol.Coordinate>>} rings Rings.
- * @return {ol.Extent} Extent.
- */
-ol.extent.extendRings = function(extent, rings) {
-  var i, ii;
-  for (i = 0, ii = rings.length; i < ii; ++i) {
-    ol.extent.extendCoordinates(extent, rings[i]);
-  }
-  return extent;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} x X.
- * @param {number} y Y.
- */
-ol.extent.extendXY = function(extent, x, y) {
-  extent[0] = Math.min(extent[0], x);
-  extent[1] = Math.min(extent[1], y);
-  extent[2] = Math.max(extent[2], x);
-  extent[3] = Math.max(extent[3], y);
-};
-
-
-/**
- * This function calls `callback` for each corner of the extent. If the
- * callback returns a truthy value the function returns that value
- * immediately. Otherwise the function returns `false`.
- * @param {ol.Extent} extent Extent.
- * @param {function(this:T, ol.Coordinate): S} callback Callback.
- * @param {T=} opt_this Value to use as `this` when executing `callback`.
- * @return {S|boolean} Value.
- * @template S, T
- */
-ol.extent.forEachCorner = function(extent, callback, opt_this) {
-  var val;
-  val = callback.call(opt_this, ol.extent.getBottomLeft(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getBottomRight(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getTopRight(extent));
-  if (val) {
-    return val;
-  }
-  val = callback.call(opt_this, ol.extent.getTopLeft(extent));
-  if (val) {
-    return val;
-  }
-  return false;
-};
-
-
-/**
- * Get the size of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Area.
- * @api
- */
-ol.extent.getArea = function(extent) {
-  var area = 0;
-  if (!ol.extent.isEmpty(extent)) {
-    area = ol.extent.getWidth(extent) * ol.extent.getHeight(extent);
-  }
-  return area;
-};
-
-
-/**
- * Get the bottom left coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Bottom left coordinate.
- * @api
- */
-ol.extent.getBottomLeft = function(extent) {
-  return [extent[0], extent[1]];
-};
-
-
-/**
- * Get the bottom right coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Bottom right coordinate.
- * @api
- */
-ol.extent.getBottomRight = function(extent) {
-  return [extent[2], extent[1]];
-};
-
-
-/**
- * Get the center coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Center.
- * @api
- */
-ol.extent.getCenter = function(extent) {
-  return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];
-};
-
-
-/**
- * Get a corner coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @param {ol.extent.Corner} corner Corner.
- * @return {ol.Coordinate} Corner coordinate.
- */
-ol.extent.getCorner = function(extent, corner) {
-  var coordinate;
-  if (corner === ol.extent.Corner.BOTTOM_LEFT) {
-    coordinate = ol.extent.getBottomLeft(extent);
-  } else if (corner === ol.extent.Corner.BOTTOM_RIGHT) {
-    coordinate = ol.extent.getBottomRight(extent);
-  } else if (corner === ol.extent.Corner.TOP_LEFT) {
-    coordinate = ol.extent.getTopLeft(extent);
-  } else if (corner === ol.extent.Corner.TOP_RIGHT) {
-    coordinate = ol.extent.getTopRight(extent);
-  } else {
-    ol.asserts.assert(false, 13); // Invalid corner
-  }
-  return /** @type {!ol.Coordinate} */ (coordinate);
-};
-
-
-/**
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {number} Enlarged area.
- */
-ol.extent.getEnlargedArea = function(extent1, extent2) {
-  var minX = Math.min(extent1[0], extent2[0]);
-  var minY = Math.min(extent1[1], extent2[1]);
-  var maxX = Math.max(extent1[2], extent2[2]);
-  var maxY = Math.max(extent1[3], extent2[3]);
-  return (maxX - minX) * (maxY - minY);
-};
-
-
-/**
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.getForViewAndSize = function(center, resolution, rotation, size, opt_extent) {
-  var dx = resolution * size[0] / 2;
-  var dy = resolution * size[1] / 2;
-  var cosRotation = Math.cos(rotation);
-  var sinRotation = Math.sin(rotation);
-  var xCos = dx * cosRotation;
-  var xSin = dx * sinRotation;
-  var yCos = dy * cosRotation;
-  var ySin = dy * sinRotation;
-  var x = center[0];
-  var y = center[1];
-  var x0 = x - xCos + ySin;
-  var x1 = x - xCos - ySin;
-  var x2 = x + xCos - ySin;
-  var x3 = x + xCos + ySin;
-  var y0 = y - xSin - yCos;
-  var y1 = y - xSin + yCos;
-  var y2 = y + xSin + yCos;
-  var y3 = y + xSin - yCos;
-  return ol.extent.createOrUpdate(
-      Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3),
-      Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3),
-      opt_extent);
-};
-
-
-/**
- * Get the height of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Height.
- * @api
- */
-ol.extent.getHeight = function(extent) {
-  return extent[3] - extent[1];
-};
-
-
-/**
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @return {number} Intersection area.
- */
-ol.extent.getIntersectionArea = function(extent1, extent2) {
-  var intersection = ol.extent.getIntersection(extent1, extent2);
-  return ol.extent.getArea(intersection);
-};
-
-
-/**
- * Get the intersection of two extents.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent 2.
- * @param {ol.Extent=} opt_extent Optional extent to populate with intersection.
- * @return {ol.Extent} Intersecting extent.
- * @api
- */
-ol.extent.getIntersection = function(extent1, extent2, opt_extent) {
-  var intersection = opt_extent ? opt_extent : ol.extent.createEmpty();
-  if (ol.extent.intersects(extent1, extent2)) {
-    if (extent1[0] > extent2[0]) {
-      intersection[0] = extent1[0];
-    } else {
-      intersection[0] = extent2[0];
-    }
-    if (extent1[1] > extent2[1]) {
-      intersection[1] = extent1[1];
-    } else {
-      intersection[1] = extent2[1];
-    }
-    if (extent1[2] < extent2[2]) {
-      intersection[2] = extent1[2];
-    } else {
-      intersection[2] = extent2[2];
-    }
-    if (extent1[3] < extent2[3]) {
-      intersection[3] = extent1[3];
-    } else {
-      intersection[3] = extent2[3];
-    }
-  }
-  return intersection;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @return {number} Margin.
- */
-ol.extent.getMargin = function(extent) {
-  return ol.extent.getWidth(extent) + ol.extent.getHeight(extent);
-};
-
-
-/**
- * Get the size (width, height) of an extent.
- * @param {ol.Extent} extent The extent.
- * @return {ol.Size} The extent size.
- * @api
- */
-ol.extent.getSize = function(extent) {
-  return [extent[2] - extent[0], extent[3] - extent[1]];
-};
-
-
-/**
- * Get the top left coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Top left coordinate.
- * @api
- */
-ol.extent.getTopLeft = function(extent) {
-  return [extent[0], extent[3]];
-};
-
-
-/**
- * Get the top right coordinate of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {ol.Coordinate} Top right coordinate.
- * @api
- */
-ol.extent.getTopRight = function(extent) {
-  return [extent[2], extent[3]];
-};
-
-
-/**
- * Get the width of an extent.
- * @param {ol.Extent} extent Extent.
- * @return {number} Width.
- * @api
- */
-ol.extent.getWidth = function(extent) {
-  return extent[2] - extent[0];
-};
-
-
-/**
- * Determine if one extent intersects another.
- * @param {ol.Extent} extent1 Extent 1.
- * @param {ol.Extent} extent2 Extent.
- * @return {boolean} The two extents intersect.
- * @api
- */
-ol.extent.intersects = function(extent1, extent2) {
-  return extent1[0] <= extent2[2] &&
-      extent1[2] >= extent2[0] &&
-      extent1[1] <= extent2[3] &&
-      extent1[3] >= extent2[1];
-};
-
-
-/**
- * Determine if an extent is empty.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} Is empty.
- * @api
- */
-ol.extent.isEmpty = function(extent) {
-  return extent[2] < extent[0] || extent[3] < extent[1];
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.extent.returnOrUpdate = function(extent, opt_extent) {
-  if (opt_extent) {
-    opt_extent[0] = extent[0];
-    opt_extent[1] = extent[1];
-    opt_extent[2] = extent[2];
-    opt_extent[3] = extent[3];
-    return opt_extent;
-  } else {
-    return extent;
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} value Value.
- */
-ol.extent.scaleFromCenter = function(extent, value) {
-  var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);
-  var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);
-  extent[0] -= deltaX;
-  extent[2] += deltaX;
-  extent[1] -= deltaY;
-  extent[3] += deltaY;
-};
-
-
-/**
- * Determine if the segment between two coordinates intersects (crosses,
- * touches, or is contained by) the provided extent.
- * @param {ol.Extent} extent The extent.
- * @param {ol.Coordinate} start Segment start coordinate.
- * @param {ol.Coordinate} end Segment end coordinate.
- * @return {boolean} The segment intersects the extent.
- */
-ol.extent.intersectsSegment = function(extent, start, end) {
-  var intersects = false;
-  var startRel = ol.extent.coordinateRelationship(extent, start);
-  var endRel = ol.extent.coordinateRelationship(extent, end);
-  if (startRel === ol.extent.Relationship.INTERSECTING ||
-      endRel === ol.extent.Relationship.INTERSECTING) {
-    intersects = true;
-  } else {
-    var minX = extent[0];
-    var minY = extent[1];
-    var maxX = extent[2];
-    var maxY = extent[3];
-    var startX = start[0];
-    var startY = start[1];
-    var endX = end[0];
-    var endY = end[1];
-    var slope = (endY - startY) / (endX - startX);
-    var x, y;
-    if (!!(endRel & ol.extent.Relationship.ABOVE) &&
-        !(startRel & ol.extent.Relationship.ABOVE)) {
-      // potentially intersects top
-      x = endX - ((endY - maxY) / slope);
-      intersects = x >= minX && x <= maxX;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.RIGHT) &&
-        !(startRel & ol.extent.Relationship.RIGHT)) {
-      // potentially intersects right
-      y = endY - ((endX - maxX) * slope);
-      intersects = y >= minY && y <= maxY;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.BELOW) &&
-        !(startRel & ol.extent.Relationship.BELOW)) {
-      // potentially intersects bottom
-      x = endX - ((endY - minY) / slope);
-      intersects = x >= minX && x <= maxX;
-    }
-    if (!intersects && !!(endRel & ol.extent.Relationship.LEFT) &&
-        !(startRel & ol.extent.Relationship.LEFT)) {
-      // potentially intersects left
-      y = endY - ((endX - minX) * slope);
-      intersects = y >= minY && y <= maxY;
-    }
-
-  }
-  return intersects;
-};
-
-
-/**
- * Apply a transform function to the extent.
- * @param {ol.Extent} extent Extent.
- * @param {ol.TransformFunction} transformFn Transform function.  Called with
- * [minX, minY, maxX, maxY] extent coordinates.
- * @param {ol.Extent=} opt_extent Destination extent.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.extent.applyTransform = function(extent, transformFn, opt_extent) {
-  var coordinates = [
-    extent[0], extent[1],
-    extent[0], extent[3],
-    extent[2], extent[1],
-    extent[2], extent[3]
-  ];
-  transformFn(coordinates, coordinates, 2);
-  var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]];
-  var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]];
-  return ol.extent.boundingExtentXYs_(xs, ys, opt_extent);
-};
-
-goog.provide('ol.obj');
-
-
-/**
- * Polyfill for Object.assign().  Assigns enumerable and own properties from
- * one or more source objects to a target object.
- *
- * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
- * @param {!Object} target The target object.
- * @param {...Object} var_sources The source object(s).
- * @return {!Object} The modified target object.
- */
-ol.obj.assign = (typeof Object.assign === 'function') ? Object.assign : function(target, var_sources) {
-  if (target === undefined || target === null) {
-    throw new TypeError('Cannot convert undefined or null to object');
-  }
-
-  var output = Object(target);
-  for (var i = 1, ii = arguments.length; i < ii; ++i) {
-    var source = arguments[i];
-    if (source !== undefined && source !== null) {
-      for (var key in source) {
-        if (source.hasOwnProperty(key)) {
-          output[key] = source[key];
-        }
-      }
-    }
-  }
-  return output;
-};
-
-
-/**
- * Removes all properties from an object.
- * @param {Object} object The object to clear.
- */
-ol.obj.clear = function(object) {
-  for (var property in object) {
-    delete object[property];
-  }
-};
-
-
-/**
- * Get an array of property values from an object.
- * @param {Object<K,V>} object The object from which to get the values.
- * @return {!Array<V>} The property values.
- * @template K,V
- */
-ol.obj.getValues = function(object) {
-  var values = [];
-  for (var property in object) {
-    values.push(object[property]);
-  }
-  return values;
-};
-
-
-/**
- * Determine if an object has any properties.
- * @param {Object} object The object to check.
- * @return {boolean} The object is empty.
- */
-ol.obj.isEmpty = function(object) {
-  var property;
-  for (property in object) {
-    return false;
-  }
-  return !property;
-};
-
-goog.provide('ol.geom.GeometryType');
-
-
-/**
- * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
- * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
- * `'GeometryCollection'`, `'Circle'`.
- * @enum {string}
- */
-ol.geom.GeometryType = {
-  POINT: 'Point',
-  LINE_STRING: 'LineString',
-  LINEAR_RING: 'LinearRing',
-  POLYGON: 'Polygon',
-  MULTI_POINT: 'MultiPoint',
-  MULTI_LINE_STRING: 'MultiLineString',
-  MULTI_POLYGON: 'MultiPolygon',
-  GEOMETRY_COLLECTION: 'GeometryCollection',
-  CIRCLE: 'Circle'
-};
-
-/**
- * @license
- * Latitude/longitude spherical geodesy formulae taken from
- * http://www.movable-type.co.uk/scripts/latlong.html
- * Licensed under CC-BY-3.0.
- */
-
-goog.provide('ol.Sphere');
-
-goog.require('ol.math');
-goog.require('ol.geom.GeometryType');
-
-
-/**
- * @classdesc
- * Class to create objects that can be used with {@link
- * ol.geom.Polygon.circular}.
- *
- * For example to create a sphere whose radius is equal to the semi-major
- * axis of the WGS84 ellipsoid:
- *
- * ```js
- * var wgs84Sphere= new ol.Sphere(6378137);
- * ```
- *
- * @constructor
- * @param {number} radius Radius.
- * @api
- */
-ol.Sphere = function(radius) {
-
-  /**
-   * @type {number}
-   */
-  this.radius = radius;
-
-};
-
-
-/**
- * Returns the geodesic area for a list of coordinates.
- *
- * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)
- * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
- * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
- * Laboratory, Pasadena, CA, June 2007
- *
- * @param {Array.<ol.Coordinate>} coordinates List of coordinates of a linear
- * ring. If the ring is oriented clockwise, the area will be positive,
- * otherwise it will be negative.
- * @return {number} Area.
- * @api
- */
-ol.Sphere.prototype.geodesicArea = function(coordinates) {
-  return ol.Sphere.getArea_(coordinates, this.radius);
-};
-
-
-/**
- * Returns the distance from c1 to c2 using the haversine formula.
- *
- * @param {ol.Coordinate} c1 Coordinate 1.
- * @param {ol.Coordinate} c2 Coordinate 2.
- * @return {number} Haversine distance.
- * @api
- */
-ol.Sphere.prototype.haversineDistance = function(c1, c2) {
-  return ol.Sphere.getDistance_(c1, c2, this.radius);
-};
-
-
-/**
- * Returns the coordinate at the given distance and bearing from `c1`.
- *
- * @param {ol.Coordinate} c1 The origin point (`[lon, lat]` in degrees).
- * @param {number} distance The great-circle distance between the origin
- *     point and the target point.
- * @param {number} bearing The bearing (in radians).
- * @return {ol.Coordinate} The target point.
- */
-ol.Sphere.prototype.offset = function(c1, distance, bearing) {
-  var lat1 = ol.math.toRadians(c1[1]);
-  var lon1 = ol.math.toRadians(c1[0]);
-  var dByR = distance / this.radius;
-  var lat = Math.asin(
-      Math.sin(lat1) * Math.cos(dByR) +
-      Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));
-  var lon = lon1 + Math.atan2(
-      Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),
-      Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));
-  return [ol.math.toDegrees(lon), ol.math.toDegrees(lat)];
-};
-
-
-/**
- * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.
- * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius
- * @type {number}
- */
-ol.Sphere.DEFAULT_RADIUS = 6371008.8;
-
-
-/**
- * Get the spherical length of a geometry.  This length is the sum of the
- * great circle distances between coordinates.  For polygons, the length is
- * the sum of all rings.  For points, the length is zero.  For multi-part
- * geometries, the length is the sum of the length of each part.
- * @param {ol.geom.Geometry} geometry A geometry.
- * @param {olx.SphereMetricOptions=} opt_options Options for the length
- *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.
- *     You can change this by providing a `projection` option.
- * @return {number} The spherical length (in meters).
- * @api
- */
-ol.Sphere.getLength = function(geometry, opt_options) {
-  var options = opt_options || {};
-  var radius = options.radius || ol.Sphere.DEFAULT_RADIUS;
-  var projection = options.projection || 'EPSG:3857';
-  geometry = geometry.clone().transform(projection, 'EPSG:4326');
-  var type = geometry.getType();
-  var length = 0;
-  var coordinates, coords, i, ii, j, jj;
-  switch (type) {
-    case ol.geom.GeometryType.POINT:
-    case ol.geom.GeometryType.MULTI_POINT: {
-      break;
-    }
-    case ol.geom.GeometryType.LINE_STRING:
-    case ol.geom.GeometryType.LINEAR_RING: {
-      coordinates = /** @type {ol.geom.SimpleGeometry} */ (geometry).getCoordinates();
-      length = ol.Sphere.getLength_(coordinates, radius);
-      break;
-    }
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-    case ol.geom.GeometryType.POLYGON: {
-      coordinates = /** @type {ol.geom.SimpleGeometry} */ (geometry).getCoordinates();
-      for (i = 0, ii = coordinates.length; i < ii; ++i) {
-        length += ol.Sphere.getLength_(coordinates[i], radius);
-      }
-      break;
-    }
-    case ol.geom.GeometryType.MULTI_POLYGON: {
-      coordinates = /** @type {ol.geom.SimpleGeometry} */ (geometry).getCoordinates();
-      for (i = 0, ii = coordinates.length; i < ii; ++i) {
-        coords = coordinates[i];
-        for (j = 0, jj = coords.length; j < jj; ++j) {
-          length += ol.Sphere.getLength_(coords[j], radius);
-        }
-      }
-      break;
-    }
-    case ol.geom.GeometryType.GEOMETRY_COLLECTION: {
-      var geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries();
-      for (i = 0, ii = geometries.length; i < ii; ++i) {
-        length += ol.Sphere.getLength(geometries[i], opt_options);
-      }
-      break;
-    }
-    default: {
-      throw new Error('Unsupported geometry type: ' + type);
-    }
-  }
-  return length;
-};
-
-
-/**
- * Get the cumulative great circle length of linestring coordinates (geographic).
- * @param {Array} coordinates Linestring coordinates.
- * @param {number} radius The sphere radius to use.
- * @return {number} The length (in meters).
- */
-ol.Sphere.getLength_ = function(coordinates, radius) {
-  var length = 0;
-  for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {
-    length += ol.Sphere.getDistance_(coordinates[i], coordinates[i + 1], radius);
-  }
-  return length;
-};
-
-
-/**
- * Get the great circle distance between two geographic coordinates.
- * @param {Array} c1 Starting coordinate.
- * @param {Array} c2 Ending coordinate.
- * @param {number} radius The sphere radius to use.
- * @return {number} The great circle distance between the points (in meters).
- */
-ol.Sphere.getDistance_ = function(c1, c2, radius) {
-  var lat1 = ol.math.toRadians(c1[1]);
-  var lat2 = ol.math.toRadians(c2[1]);
-  var deltaLatBy2 = (lat2 - lat1) / 2;
-  var deltaLonBy2 = ol.math.toRadians(c2[0] - c1[0]) / 2;
-  var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +
-      Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) *
-      Math.cos(lat1) * Math.cos(lat2);
-  return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
-};
-
-
-/**
- * Get the spherical area of a geometry.  This is the area (in meters) assuming
- * that polygon edges are segments of great circles on a sphere.
- * @param {ol.geom.Geometry} geometry A geometry.
- * @param {olx.SphereMetricOptions=} opt_options Options for the area
- *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.
- *     You can change this by providing a `projection` option.
- * @return {number} The spherical area (in square meters).
- * @api
- */
-ol.Sphere.getArea = function(geometry, opt_options) {
-  var options = opt_options || {};
-  var radius = options.radius || ol.Sphere.DEFAULT_RADIUS;
-  var projection = options.projection || 'EPSG:3857';
-  geometry = geometry.clone().transform(projection, 'EPSG:4326');
-  var type = geometry.getType();
-  var area = 0;
-  var coordinates, coords, i, ii, j, jj;
-  switch (type) {
-    case ol.geom.GeometryType.POINT:
-    case ol.geom.GeometryType.MULTI_POINT:
-    case ol.geom.GeometryType.LINE_STRING:
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-    case ol.geom.GeometryType.LINEAR_RING: {
-      break;
-    }
-    case ol.geom.GeometryType.POLYGON: {
-      coordinates = /** @type {ol.geom.Polygon} */ (geometry).getCoordinates();
-      area = Math.abs(ol.Sphere.getArea_(coordinates[0], radius));
-      for (i = 1, ii = coordinates.length; i < ii; ++i) {
-        area -= Math.abs(ol.Sphere.getArea_(coordinates[i], radius));
-      }
-      break;
-    }
-    case ol.geom.GeometryType.MULTI_POLYGON: {
-      coordinates = /** @type {ol.geom.SimpleGeometry} */ (geometry).getCoordinates();
-      for (i = 0, ii = coordinates.length; i < ii; ++i) {
-        coords = coordinates[i];
-        area += Math.abs(ol.Sphere.getArea_(coords[0], radius));
-        for (j = 1, jj = coords.length; j < jj; ++j) {
-          area -= Math.abs(ol.Sphere.getArea_(coords[j], radius));
-        }
-      }
-      break;
-    }
-    case ol.geom.GeometryType.GEOMETRY_COLLECTION: {
-      var geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries();
-      for (i = 0, ii = geometries.length; i < ii; ++i) {
-        area += ol.Sphere.getArea(geometries[i], opt_options);
-      }
-      break;
-    }
-    default: {
-      throw new Error('Unsupported geometry type: ' + type);
-    }
-  }
-  return area;
-};
-
-
-/**
- * Returns the spherical area for a list of coordinates.
- *
- * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)
- * Robert. G. Chamberlain and William H. Duquette, "Some Algorithms for
- * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion
- * Laboratory, Pasadena, CA, June 2007
- *
- * @param {Array.<ol.Coordinate>} coordinates List of coordinates of a linear
- * ring. If the ring is oriented clockwise, the area will be positive,
- * otherwise it will be negative.
- * @param {number} radius The sphere radius.
- * @return {number} Area (in square meters).
- */
-ol.Sphere.getArea_ = function(coordinates, radius) {
-  var area = 0, len = coordinates.length;
-  var x1 = coordinates[len - 1][0];
-  var y1 = coordinates[len - 1][1];
-  for (var i = 0; i < len; i++) {
-    var x2 = coordinates[i][0], y2 = coordinates[i][1];
-    area += ol.math.toRadians(x2 - x1) *
-        (2 + Math.sin(ol.math.toRadians(y1)) +
-        Math.sin(ol.math.toRadians(y2)));
-    x1 = x2;
-    y1 = y2;
-  }
-  return area * radius * radius / 2.0;
-};
-
-goog.provide('ol.proj.Units');
-
-
-/**
- * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or
- * `'us-ft'`.
- * @enum {string}
- */
-ol.proj.Units = {
-  DEGREES: 'degrees',
-  FEET: 'ft',
-  METERS: 'm',
-  PIXELS: 'pixels',
-  TILE_PIXELS: 'tile-pixels',
-  USFEET: 'us-ft'
-};
-
-
-/**
- * Meters per unit lookup table.
- * @const
- * @type {Object.<ol.proj.Units, number>}
- * @api
- */
-ol.proj.Units.METERS_PER_UNIT = {};
-// use the radius of the Normal sphere
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.DEGREES] =
-    2 * Math.PI * 6370997 / 360;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.FEET] = 0.3048;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.METERS] = 1;
-ol.proj.Units.METERS_PER_UNIT[ol.proj.Units.USFEET] = 1200 / 3937;
-
-goog.provide('ol.proj.proj4');
-
-
-/**
- * @private
- * @type {Proj4}
- */
-ol.proj.proj4.cache_ = null;
-
-
-/**
- * Store the proj4 function.
- * @param {Proj4} proj4 The proj4 function.
- */
-ol.proj.proj4.set = function(proj4) {
-  ol.proj.proj4.cache_ = proj4;
-};
-
-
-/**
- * Get proj4.
- * @return {Proj4} The proj4 function set above or available globally.
- */
-ol.proj.proj4.get = function() {
-  return ol.proj.proj4.cache_ || window['proj4'];
-};
-
-goog.provide('ol.proj.Projection');
-
-goog.require('ol');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.proj4');
-
-
-/**
- * @classdesc
- * Projection definition class. One of these is created for each projection
- * supported in the application and stored in the {@link ol.proj} namespace.
- * You can use these in applications, but this is not required, as API params
- * and options use {@link ol.ProjectionLike} which means the simple string
- * code will suffice.
- *
- * You can use {@link ol.proj.get} to retrieve the object for a particular
- * projection.
- *
- * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together
- * with the following aliases:
- * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,
- *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,
- *     http://www.opengis.net/gml/srs/epsg.xml#4326,
- *     urn:x-ogc:def:crs:EPSG:4326
- * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,
- *     urn:ogc:def:crs:EPSG:6.18:3:3857,
- *     http://www.opengis.net/gml/srs/epsg.xml#3857
- *
- * If you use proj4js, aliases can be added using `proj4.defs()`; see
- * [documentation](https://github.com/proj4js/proj4js). To set an alternative
- * namespace for proj4, use {@link ol.proj.setProj4}.
- *
- * @constructor
- * @param {olx.ProjectionOptions} options Projection options.
- * @struct
- * @api
- */
-ol.proj.Projection = function(options) {
-  /**
-   * @private
-   * @type {string}
-   */
-  this.code_ = options.code;
-
-  /**
-   * Units of projected coordinates. When set to `ol.proj.Units.TILE_PIXELS`, a
-   * `this.extent_` and `this.worldExtent_` must be configured properly for each
-   * tile.
-   * @private
-   * @type {ol.proj.Units}
-   */
-  this.units_ = /** @type {ol.proj.Units} */ (options.units);
-
-  /**
-   * Validity extent of the projection in projected coordinates. For projections
-   * with `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in
-   * tile pixel space.
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = options.extent !== undefined ? options.extent : null;
-
-  /**
-   * Extent of the world in EPSG:4326. For projections with
-   * `ol.proj.Units.TILE_PIXELS` units, this is the extent of the tile in
-   * projected coordinate space.
-   * @private
-   * @type {ol.Extent}
-   */
-  this.worldExtent_ = options.worldExtent !== undefined ?
-    options.worldExtent : null;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.axisOrientation_ = options.axisOrientation !== undefined ?
-    options.axisOrientation : 'enu';
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.global_ = options.global !== undefined ? options.global : false;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.canWrapX_ = !!(this.global_ && this.extent_);
-
-  /**
-   * @private
-   * @type {function(number, ol.Coordinate):number|undefined}
-   */
-  this.getPointResolutionFunc_ = options.getPointResolution;
-
-  /**
-   * @private
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.defaultTileGrid_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.metersPerUnit_ = options.metersPerUnit;
-
-  var code = options.code;
-  if (ol.ENABLE_PROJ4JS) {
-    var proj4js = ol.proj.proj4.get();
-    if (typeof proj4js == 'function') {
-      var def = proj4js.defs(code);
-      if (def !== undefined) {
-        if (def.axis !== undefined && options.axisOrientation === undefined) {
-          this.axisOrientation_ = def.axis;
-        }
-        if (options.metersPerUnit === undefined) {
-          this.metersPerUnit_ = def.to_meter;
-        }
-        if (options.units === undefined) {
-          this.units_ = def.units;
-        }
-      }
-    }
-  }
-};
-
-
-/**
- * @return {boolean} The projection is suitable for wrapping the x-axis
- */
-ol.proj.Projection.prototype.canWrapX = function() {
-  return this.canWrapX_;
-};
-
-
-/**
- * Get the code for this projection, e.g. 'EPSG:4326'.
- * @return {string} Code.
- * @api
- */
-ol.proj.Projection.prototype.getCode = function() {
-  return this.code_;
-};
-
-
-/**
- * Get the validity extent for this projection.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.proj.Projection.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-
-/**
- * Get the units of this projection.
- * @return {ol.proj.Units} Units.
- * @api
- */
-ol.proj.Projection.prototype.getUnits = function() {
-  return this.units_;
-};
-
-
-/**
- * Get the amount of meters per unit of this projection.  If the projection is
- * not configured with `metersPerUnit` or a units identifier, the return is
- * `undefined`.
- * @return {number|undefined} Meters.
- * @api
- */
-ol.proj.Projection.prototype.getMetersPerUnit = function() {
-  return this.metersPerUnit_ || ol.proj.Units.METERS_PER_UNIT[this.units_];
-};
-
-
-/**
- * Get the world extent for this projection.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.proj.Projection.prototype.getWorldExtent = function() {
-  return this.worldExtent_;
-};
-
-
-/**
- * Get the axis orientation of this projection.
- * Example values are:
- * enu - the default easting, northing, elevation.
- * neu - northing, easting, up - useful for "lat/long" geographic coordinates,
- *     or south orientated transverse mercator.
- * wnu - westing, northing, up - some planetary coordinate systems have
- *     "west positive" coordinate systems
- * @return {string} Axis orientation.
- * @api
- */
-ol.proj.Projection.prototype.getAxisOrientation = function() {
-  return this.axisOrientation_;
-};
-
-
-/**
- * Is this projection a global projection which spans the whole world?
- * @return {boolean} Whether the projection is global.
- * @api
- */
-ol.proj.Projection.prototype.isGlobal = function() {
-  return this.global_;
-};
-
-
-/**
-* Set if the projection is a global projection which spans the whole world
-* @param {boolean} global Whether the projection is global.
-* @api
-*/
-ol.proj.Projection.prototype.setGlobal = function(global) {
-  this.global_ = global;
-  this.canWrapX_ = !!(global && this.extent_);
-};
-
-
-/**
- * @return {ol.tilegrid.TileGrid} The default tile grid.
- */
-ol.proj.Projection.prototype.getDefaultTileGrid = function() {
-  return this.defaultTileGrid_;
-};
-
-
-/**
- * @param {ol.tilegrid.TileGrid} tileGrid The default tile grid.
- */
-ol.proj.Projection.prototype.setDefaultTileGrid = function(tileGrid) {
-  this.defaultTileGrid_ = tileGrid;
-};
-
-
-/**
- * Set the validity extent for this projection.
- * @param {ol.Extent} extent Extent.
- * @api
- */
-ol.proj.Projection.prototype.setExtent = function(extent) {
-  this.extent_ = extent;
-  this.canWrapX_ = !!(this.global_ && extent);
-};
-
-
-/**
- * Set the world extent for this projection.
- * @param {ol.Extent} worldExtent World extent
- *     [minlon, minlat, maxlon, maxlat].
- * @api
- */
-ol.proj.Projection.prototype.setWorldExtent = function(worldExtent) {
-  this.worldExtent_ = worldExtent;
-};
-
-
-/**
- * Set the getPointResolution function (see {@link ol.proj#getPointResolution}
- * for this projection.
- * @param {function(number, ol.Coordinate):number} func Function
- * @api
- */
-ol.proj.Projection.prototype.setGetPointResolution = function(func) {
-  this.getPointResolutionFunc_ = func;
-};
-
-
-/**
- * Get the custom point resolution function for this projection (if set).
- * @return {function(number, ol.Coordinate):number|undefined} The custom point
- * resolution function (if set).
- */
-ol.proj.Projection.prototype.getPointResolutionFunc = function() {
-  return this.getPointResolutionFunc_;
-};
-
-goog.provide('ol.proj.EPSG3857');
-
-goog.require('ol');
-goog.require('ol.math');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * Projection object for web/spherical Mercator (EPSG:3857).
- *
- * @constructor
- * @extends {ol.proj.Projection}
- * @param {string} code Code.
- * @private
- */
-ol.proj.EPSG3857.Projection_ = function(code) {
-  ol.proj.Projection.call(this, {
-    code: code,
-    units: ol.proj.Units.METERS,
-    extent: ol.proj.EPSG3857.EXTENT,
-    global: true,
-    worldExtent: ol.proj.EPSG3857.WORLD_EXTENT,
-    getPointResolution: function(resolution, point) {
-      return resolution / ol.math.cosh(point[1] / ol.proj.EPSG3857.RADIUS);
-    }
-  });
-};
-ol.inherits(ol.proj.EPSG3857.Projection_, ol.proj.Projection);
-
-
-/**
- * Radius of WGS84 sphere
- *
- * @const
- * @type {number}
- */
-ol.proj.EPSG3857.RADIUS = 6378137;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.proj.EPSG3857.HALF_SIZE = Math.PI * ol.proj.EPSG3857.RADIUS;
-
-
-/**
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG3857.EXTENT = [
-  -ol.proj.EPSG3857.HALF_SIZE, -ol.proj.EPSG3857.HALF_SIZE,
-  ol.proj.EPSG3857.HALF_SIZE, ol.proj.EPSG3857.HALF_SIZE
-];
-
-
-/**
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG3857.WORLD_EXTENT = [-180, -85, 180, 85];
-
-
-/**
- * Projections equal to EPSG:3857.
- *
- * @const
- * @type {Array.<ol.proj.Projection>}
- */
-ol.proj.EPSG3857.PROJECTIONS = [
-  new ol.proj.EPSG3857.Projection_('EPSG:3857'),
-  new ol.proj.EPSG3857.Projection_('EPSG:102100'),
-  new ol.proj.EPSG3857.Projection_('EPSG:102113'),
-  new ol.proj.EPSG3857.Projection_('EPSG:900913'),
-  new ol.proj.EPSG3857.Projection_('urn:ogc:def:crs:EPSG:6.18:3:3857'),
-  new ol.proj.EPSG3857.Projection_('urn:ogc:def:crs:EPSG::3857'),
-  new ol.proj.EPSG3857.Projection_('http://www.opengis.net/gml/srs/epsg.xml#3857')
-];
-
-
-/**
- * Transformation from EPSG:4326 to EPSG:3857.
- *
- * @param {Array.<number>} input Input array of coordinate values.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension (default is `2`).
- * @return {Array.<number>} Output array of coordinate values.
- */
-ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) {
-  var length = input.length,
-      dimension = opt_dimension > 1 ? opt_dimension : 2,
-      output = opt_output;
-  if (output === undefined) {
-    if (dimension > 2) {
-      // preserve values beyond second dimension
-      output = input.slice();
-    } else {
-      output = new Array(length);
-    }
-  }
-  var halfSize = ol.proj.EPSG3857.HALF_SIZE;
-  for (var i = 0; i < length; i += dimension) {
-    output[i] = halfSize * input[i] / 180;
-    var y = ol.proj.EPSG3857.RADIUS *
-        Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360));
-    if (y > halfSize) {
-      y = halfSize;
-    } else if (y < -halfSize) {
-      y = -halfSize;
-    }
-    output[i + 1] = y;
-  }
-  return output;
-};
-
-
-/**
- * Transformation from EPSG:3857 to EPSG:4326.
- *
- * @param {Array.<number>} input Input array of coordinate values.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension (default is `2`).
- * @return {Array.<number>} Output array of coordinate values.
- */
-ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
-  var length = input.length,
-      dimension = opt_dimension > 1 ? opt_dimension : 2,
-      output = opt_output;
-  if (output === undefined) {
-    if (dimension > 2) {
-      // preserve values beyond second dimension
-      output = input.slice();
-    } else {
-      output = new Array(length);
-    }
-  }
-  for (var i = 0; i < length; i += dimension) {
-    output[i] = 180 * input[i] / ol.proj.EPSG3857.HALF_SIZE;
-    output[i + 1] = 360 * Math.atan(
-        Math.exp(input[i + 1] / ol.proj.EPSG3857.RADIUS)) / Math.PI - 90;
-  }
-  return output;
-};
-
-goog.provide('ol.proj.EPSG4326');
-
-goog.require('ol');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * Projection object for WGS84 geographic coordinates (EPSG:4326).
- *
- * Note that OpenLayers does not strictly comply with the EPSG definition.
- * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).
- * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.
- *
- * @constructor
- * @extends {ol.proj.Projection}
- * @param {string} code Code.
- * @param {string=} opt_axisOrientation Axis orientation.
- * @private
- */
-ol.proj.EPSG4326.Projection_ = function(code, opt_axisOrientation) {
-  ol.proj.Projection.call(this, {
-    code: code,
-    units: ol.proj.Units.DEGREES,
-    extent: ol.proj.EPSG4326.EXTENT,
-    axisOrientation: opt_axisOrientation,
-    global: true,
-    metersPerUnit: ol.proj.EPSG4326.METERS_PER_UNIT,
-    worldExtent: ol.proj.EPSG4326.EXTENT
-  });
-};
-ol.inherits(ol.proj.EPSG4326.Projection_, ol.proj.Projection);
-
-
-/**
- * Radius of WGS84 sphere
- *
- * @const
- * @type {number}
- */
-ol.proj.EPSG4326.RADIUS = 6378137;
-
-
-/**
- * Extent of the EPSG:4326 projection which is the whole world.
- *
- * @const
- * @type {ol.Extent}
- */
-ol.proj.EPSG4326.EXTENT = [-180, -90, 180, 90];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.proj.EPSG4326.METERS_PER_UNIT = Math.PI * ol.proj.EPSG4326.RADIUS / 180;
-
-
-/**
- * Projections equal to EPSG:4326.
- *
- * @const
- * @type {Array.<ol.proj.Projection>}
- */
-ol.proj.EPSG4326.PROJECTIONS = [
-  new ol.proj.EPSG4326.Projection_('CRS:84'),
-  new ol.proj.EPSG4326.Projection_('EPSG:4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG::4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:1.3:CRS84'),
-  new ol.proj.EPSG4326.Projection_('urn:ogc:def:crs:OGC:2:84'),
-  new ol.proj.EPSG4326.Projection_('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),
-  new ol.proj.EPSG4326.Projection_('urn:x-ogc:def:crs:EPSG:4326', 'neu')
-];
-
-goog.provide('ol.proj.projections');
-
-
-/**
- * @private
- * @type {Object.<string, ol.proj.Projection>}
- */
-ol.proj.projections.cache_ = {};
-
-
-/**
- * Clear the projections cache.
- */
-ol.proj.projections.clear = function() {
-  ol.proj.projections.cache_ = {};
-};
-
-
-/**
- * Get a cached projection by code.
- * @param {string} code The code for the projection.
- * @return {ol.proj.Projection} The projection (if cached).
- */
-ol.proj.projections.get = function(code) {
-  var projections = ol.proj.projections.cache_;
-  return projections[code] || null;
-};
-
-
-/**
- * Add a projection to the cache.
- * @param {string} code The projection code.
- * @param {ol.proj.Projection} projection The projection to cache.
- */
-ol.proj.projections.add = function(code, projection) {
-  var projections = ol.proj.projections.cache_;
-  projections[code] = projection;
-};
-
-goog.provide('ol.proj.transforms');
-
-goog.require('ol.obj');
-
-
-/**
- * @private
- * @type {Object.<string, Object.<string, ol.TransformFunction>>}
- */
-ol.proj.transforms.cache_ = {};
-
-
-/**
- * Clear the transform cache.
- */
-ol.proj.transforms.clear = function() {
-  ol.proj.transforms.cache_ = {};
-};
-
-
-/**
- * Registers a conversion function to convert coordinates from the source
- * projection to the destination projection.
- *
- * @param {ol.proj.Projection} source Source.
- * @param {ol.proj.Projection} destination Destination.
- * @param {ol.TransformFunction} transformFn Transform.
- */
-ol.proj.transforms.add = function(source, destination, transformFn) {
-  var sourceCode = source.getCode();
-  var destinationCode = destination.getCode();
-  var transforms = ol.proj.transforms.cache_;
-  if (!(sourceCode in transforms)) {
-    transforms[sourceCode] = {};
-  }
-  transforms[sourceCode][destinationCode] = transformFn;
-};
-
-
-/**
- * Unregisters the conversion function to convert coordinates from the source
- * projection to the destination projection.  This method is used to clean up
- * cached transforms during testing.
- *
- * @param {ol.proj.Projection} source Source projection.
- * @param {ol.proj.Projection} destination Destination projection.
- * @return {ol.TransformFunction} transformFn The unregistered transform.
- */
-ol.proj.transforms.remove = function(source, destination) {
-  var sourceCode = source.getCode();
-  var destinationCode = destination.getCode();
-  var transforms = ol.proj.transforms.cache_;
-  var transform = transforms[sourceCode][destinationCode];
-  delete transforms[sourceCode][destinationCode];
-  if (ol.obj.isEmpty(transforms[sourceCode])) {
-    delete transforms[sourceCode];
-  }
-  return transform;
-};
-
-
-/**
- * Get a transform given a source code and a destination code.
- * @param {string} sourceCode The code for the source projection.
- * @param {string} destinationCode The code for the destination projection.
- * @return {ol.TransformFunction|undefined} The transform function (if found).
- */
-ol.proj.transforms.get = function(sourceCode, destinationCode) {
-  var transform;
-  var transforms = ol.proj.transforms.cache_;
-  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {
-    transform = transforms[sourceCode][destinationCode];
-  }
-  return transform;
-};
-
-goog.provide('ol.proj');
-
-goog.require('ol');
-goog.require('ol.Sphere');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.proj.EPSG3857');
-goog.require('ol.proj.EPSG4326');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.proj4');
-goog.require('ol.proj.projections');
-goog.require('ol.proj.transforms');
-
-
-/**
- * Meters per unit lookup table.
- * @const
- * @type {Object.<ol.proj.Units, number>}
- * @api
- */
-ol.proj.METERS_PER_UNIT = ol.proj.Units.METERS_PER_UNIT;
-
-
-/**
- * A place to store the mean radius of the Earth.
- * @private
- * @type {ol.Sphere}
- */
-ol.proj.SPHERE_ = new ol.Sphere(ol.Sphere.DEFAULT_RADIUS);
-
-
-if (ol.ENABLE_PROJ4JS) {
-  /**
-   * Register proj4. If not explicitly registered, it will be assumed that
-   * proj4js will be loaded in the global namespace. For example in a
-   * browserify ES6 environment you could use:
-   *
-   *     import ol from 'openlayers';
-   *     import proj4 from 'proj4';
-   *     ol.proj.setProj4(proj4);
-   *
-   * @param {Proj4} proj4 Proj4.
-   * @api
-   */
-  ol.proj.setProj4 = function(proj4) {
-    ol.proj.proj4.set(proj4);
-  };
-}
-
-
-/**
- * Get the resolution of the point in degrees or distance units.
- * For projections with degrees as the unit this will simply return the
- * provided resolution. For other projections the point resolution is
- * by default estimated by transforming the 'point' pixel to EPSG:4326,
- * measuring its width and height on the normal sphere,
- * and taking the average of the width and height.
- * A custom function can be provided for a specific projection, either
- * by setting the `getPointResolution` option in the
- * {@link ol.proj.Projection} constructor or by using
- * {@link ol.proj.Projection#setGetPointResolution} to change an existing
- * projection object.
- * @param {ol.ProjectionLike} projection The projection.
- * @param {number} resolution Nominal resolution in projection units.
- * @param {ol.Coordinate} point Point to find adjusted resolution at.
- * @param {ol.proj.Units=} opt_units Units to get the point resolution in.
- * Default is the projection's units.
- * @return {number} Point resolution.
- * @api
- */
-ol.proj.getPointResolution = function(projection, resolution, point, opt_units) {
-  projection = ol.proj.get(projection);
-  var pointResolution;
-  var getter = projection.getPointResolutionFunc();
-  if (getter) {
-    pointResolution = getter(resolution, point);
-  } else {
-    var units = projection.getUnits();
-    if (units == ol.proj.Units.DEGREES && !opt_units || opt_units == ol.proj.Units.DEGREES) {
-      pointResolution = resolution;
-    } else {
-      // Estimate point resolution by transforming the center pixel to EPSG:4326,
-      // measuring its width and height on the normal sphere, and taking the
-      // average of the width and height.
-      var toEPSG4326 = ol.proj.getTransformFromProjections(projection, ol.proj.get('EPSG:4326'));
-      var vertices = [
-        point[0] - resolution / 2, point[1],
-        point[0] + resolution / 2, point[1],
-        point[0], point[1] - resolution / 2,
-        point[0], point[1] + resolution / 2
-      ];
-      vertices = toEPSG4326(vertices, vertices, 2);
-      var width = ol.proj.SPHERE_.haversineDistance(
-          vertices.slice(0, 2), vertices.slice(2, 4));
-      var height = ol.proj.SPHERE_.haversineDistance(
-          vertices.slice(4, 6), vertices.slice(6, 8));
-      pointResolution = (width + height) / 2;
-      var metersPerUnit = opt_units ?
-        ol.proj.Units.METERS_PER_UNIT[opt_units] :
-        projection.getMetersPerUnit();
-      if (metersPerUnit !== undefined) {
-        pointResolution /= metersPerUnit;
-      }
-    }
-  }
-  return pointResolution;
-};
-
-
-/**
- * Registers transformation functions that don't alter coordinates. Those allow
- * to transform between projections with equal meaning.
- *
- * @param {Array.<ol.proj.Projection>} projections Projections.
- * @api
- */
-ol.proj.addEquivalentProjections = function(projections) {
-  ol.proj.addProjections(projections);
-  projections.forEach(function(source) {
-    projections.forEach(function(destination) {
-      if (source !== destination) {
-        ol.proj.transforms.add(source, destination, ol.proj.cloneTransform);
-      }
-    });
-  });
-};
-
-
-/**
- * Registers transformation functions to convert coordinates in any projection
- * in projection1 to any projection in projection2.
- *
- * @param {Array.<ol.proj.Projection>} projections1 Projections with equal
- *     meaning.
- * @param {Array.<ol.proj.Projection>} projections2 Projections with equal
- *     meaning.
- * @param {ol.TransformFunction} forwardTransform Transformation from any
- *   projection in projection1 to any projection in projection2.
- * @param {ol.TransformFunction} inverseTransform Transform from any projection
- *   in projection2 to any projection in projection1..
- */
-ol.proj.addEquivalentTransforms = function(projections1, projections2, forwardTransform, inverseTransform) {
-  projections1.forEach(function(projection1) {
-    projections2.forEach(function(projection2) {
-      ol.proj.transforms.add(projection1, projection2, forwardTransform);
-      ol.proj.transforms.add(projection2, projection1, inverseTransform);
-    });
-  });
-};
-
-
-/**
- * Add a Projection object to the list of supported projections that can be
- * looked up by their code.
- *
- * @param {ol.proj.Projection} projection Projection instance.
- * @api
- */
-ol.proj.addProjection = function(projection) {
-  ol.proj.projections.add(projection.getCode(), projection);
-  ol.proj.transforms.add(projection, projection, ol.proj.cloneTransform);
-};
-
-
-/**
- * @param {Array.<ol.proj.Projection>} projections Projections.
- */
-ol.proj.addProjections = function(projections) {
-  projections.forEach(ol.proj.addProjection);
-};
-
-
-/**
- * Clear all cached projections and transforms.
- */
-ol.proj.clearAllProjections = function() {
-  ol.proj.projections.clear();
-  ol.proj.transforms.clear();
-};
-
-
-/**
- * @param {ol.proj.Projection|string|undefined} projection Projection.
- * @param {string} defaultCode Default code.
- * @return {ol.proj.Projection} Projection.
- */
-ol.proj.createProjection = function(projection, defaultCode) {
-  if (!projection) {
-    return ol.proj.get(defaultCode);
-  } else if (typeof projection === 'string') {
-    return ol.proj.get(projection);
-  } else {
-    return /** @type {ol.proj.Projection} */ (projection);
-  }
-};
-
-
-/**
- * Registers coordinate transform functions to convert coordinates between the
- * source projection and the destination projection.
- * The forward and inverse functions convert coordinate pairs; this function
- * converts these into the functions used internally which also handle
- * extents and coordinate arrays.
- *
- * @param {ol.ProjectionLike} source Source projection.
- * @param {ol.ProjectionLike} destination Destination projection.
- * @param {function(ol.Coordinate): ol.Coordinate} forward The forward transform
- *     function (that is, from the source projection to the destination
- *     projection) that takes a {@link ol.Coordinate} as argument and returns
- *     the transformed {@link ol.Coordinate}.
- * @param {function(ol.Coordinate): ol.Coordinate} inverse The inverse transform
- *     function (that is, from the destination projection to the source
- *     projection) that takes a {@link ol.Coordinate} as argument and returns
- *     the transformed {@link ol.Coordinate}.
- * @api
- */
-ol.proj.addCoordinateTransforms = function(source, destination, forward, inverse) {
-  var sourceProj = ol.proj.get(source);
-  var destProj = ol.proj.get(destination);
-  ol.proj.transforms.add(sourceProj, destProj,
-      ol.proj.createTransformFromCoordinateTransform(forward));
-  ol.proj.transforms.add(destProj, sourceProj,
-      ol.proj.createTransformFromCoordinateTransform(inverse));
-};
-
-
-/**
- * Creates a {@link ol.TransformFunction} from a simple 2D coordinate transform
- * function.
- * @param {function(ol.Coordinate): ol.Coordinate} transform Coordinate
- *     transform.
- * @return {ol.TransformFunction} Transform function.
- */
-ol.proj.createTransformFromCoordinateTransform = function(transform) {
-  return (
-    /**
-     * @param {Array.<number>} input Input.
-     * @param {Array.<number>=} opt_output Output.
-     * @param {number=} opt_dimension Dimension.
-     * @return {Array.<number>} Output.
-     */
-    function(input, opt_output, opt_dimension) {
-      var length = input.length;
-      var dimension = opt_dimension !== undefined ? opt_dimension : 2;
-      var output = opt_output !== undefined ? opt_output : new Array(length);
-      var point, i, j;
-      for (i = 0; i < length; i += dimension) {
-        point = transform([input[i], input[i + 1]]);
-        output[i] = point[0];
-        output[i + 1] = point[1];
-        for (j = dimension - 1; j >= 2; --j) {
-          output[i + j] = input[i + j];
-        }
-      }
-      return output;
-    });
-};
-
-
-/**
- * Transforms a coordinate from longitude/latitude to a different projection.
- * @param {ol.Coordinate} coordinate Coordinate as longitude and latitude, i.e.
- *     an array with longitude as 1st and latitude as 2nd element.
- * @param {ol.ProjectionLike=} opt_projection Target projection. The
- *     default is Web Mercator, i.e. 'EPSG:3857'.
- * @return {ol.Coordinate} Coordinate projected to the target projection.
- * @api
- */
-ol.proj.fromLonLat = function(coordinate, opt_projection) {
-  return ol.proj.transform(coordinate, 'EPSG:4326',
-      opt_projection !== undefined ? opt_projection : 'EPSG:3857');
-};
-
-
-/**
- * Transforms a coordinate to longitude/latitude.
- * @param {ol.Coordinate} coordinate Projected coordinate.
- * @param {ol.ProjectionLike=} opt_projection Projection of the coordinate.
- *     The default is Web Mercator, i.e. 'EPSG:3857'.
- * @return {ol.Coordinate} Coordinate as longitude and latitude, i.e. an array
- *     with longitude as 1st and latitude as 2nd element.
- * @api
- */
-ol.proj.toLonLat = function(coordinate, opt_projection) {
-  var lonLat = ol.proj.transform(coordinate,
-      opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');
-  var lon = lonLat[0];
-  if (lon < -180 || lon > 180) {
-    lonLat[0] = ol.math.modulo(lon + 180, 360) - 180;
-  }
-  return lonLat;
-};
-
-
-/**
- * Fetches a Projection object for the code specified.
- *
- * @param {ol.ProjectionLike} projectionLike Either a code string which is
- *     a combination of authority and identifier such as "EPSG:4326", or an
- *     existing projection object, or undefined.
- * @return {ol.proj.Projection} Projection object, or null if not in list.
- * @api
- */
-ol.proj.get = function(projectionLike) {
-  var projection = null;
-  if (projectionLike instanceof ol.proj.Projection) {
-    projection = projectionLike;
-  } else if (typeof projectionLike === 'string') {
-    var code = projectionLike;
-    projection = ol.proj.projections.get(code);
-    if (ol.ENABLE_PROJ4JS && !projection) {
-      var proj4js = ol.proj.proj4.get();
-      if (typeof proj4js == 'function' &&
-          proj4js.defs(code) !== undefined) {
-        projection = new ol.proj.Projection({code: code});
-        ol.proj.addProjection(projection);
-      }
-    }
-  }
-  return projection;
-};
-
-
-/**
- * Checks if two projections are the same, that is every coordinate in one
- * projection does represent the same geographic point as the same coordinate in
- * the other projection.
- *
- * @param {ol.proj.Projection} projection1 Projection 1.
- * @param {ol.proj.Projection} projection2 Projection 2.
- * @return {boolean} Equivalent.
- * @api
- */
-ol.proj.equivalent = function(projection1, projection2) {
-  if (projection1 === projection2) {
-    return true;
-  }
-  var equalUnits = projection1.getUnits() === projection2.getUnits();
-  if (projection1.getCode() === projection2.getCode()) {
-    return equalUnits;
-  } else {
-    var transformFn = ol.proj.getTransformFromProjections(
-        projection1, projection2);
-    return transformFn === ol.proj.cloneTransform && equalUnits;
-  }
-};
-
-
-/**
- * Given the projection-like objects, searches for a transformation
- * function to convert a coordinates array from the source projection to the
- * destination projection.
- *
- * @param {ol.ProjectionLike} source Source.
- * @param {ol.ProjectionLike} destination Destination.
- * @return {ol.TransformFunction} Transform function.
- * @api
- */
-ol.proj.getTransform = function(source, destination) {
-  var sourceProjection = ol.proj.get(source);
-  var destinationProjection = ol.proj.get(destination);
-  return ol.proj.getTransformFromProjections(
-      sourceProjection, destinationProjection);
-};
-
-
-/**
- * Searches in the list of transform functions for the function for converting
- * coordinates from the source projection to the destination projection.
- *
- * @param {ol.proj.Projection} sourceProjection Source Projection object.
- * @param {ol.proj.Projection} destinationProjection Destination Projection
- *     object.
- * @return {ol.TransformFunction} Transform function.
- */
-ol.proj.getTransformFromProjections = function(sourceProjection, destinationProjection) {
-  var sourceCode = sourceProjection.getCode();
-  var destinationCode = destinationProjection.getCode();
-  var transform = ol.proj.transforms.get(sourceCode, destinationCode);
-  if (ol.ENABLE_PROJ4JS && !transform) {
-    var proj4js = ol.proj.proj4.get();
-    if (typeof proj4js == 'function') {
-      var sourceDef = proj4js.defs(sourceCode);
-      var destinationDef = proj4js.defs(destinationCode);
-
-      if (sourceDef !== undefined && destinationDef !== undefined) {
-        if (sourceDef === destinationDef) {
-          ol.proj.addEquivalentProjections([destinationProjection, sourceProjection]);
-        } else {
-          var proj4Transform = proj4js(destinationCode, sourceCode);
-          ol.proj.addCoordinateTransforms(destinationProjection, sourceProjection,
-              proj4Transform.forward, proj4Transform.inverse);
-        }
-        transform = ol.proj.transforms.get(sourceCode, destinationCode);
-      }
-    }
-  }
-  if (!transform) {
-    transform = ol.proj.identityTransform;
-  }
-  return transform;
-};
-
-
-/**
- * @param {Array.<number>} input Input coordinate array.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension.
- * @return {Array.<number>} Input coordinate array (same array as input).
- */
-ol.proj.identityTransform = function(input, opt_output, opt_dimension) {
-  if (opt_output !== undefined && input !== opt_output) {
-    for (var i = 0, ii = input.length; i < ii; ++i) {
-      opt_output[i] = input[i];
-    }
-    input = opt_output;
-  }
-  return input;
-};
-
-
-/**
- * @param {Array.<number>} input Input coordinate array.
- * @param {Array.<number>=} opt_output Output array of coordinate values.
- * @param {number=} opt_dimension Dimension.
- * @return {Array.<number>} Output coordinate array (new array, same coordinate
- *     values).
- */
-ol.proj.cloneTransform = function(input, opt_output, opt_dimension) {
-  var output;
-  if (opt_output !== undefined) {
-    for (var i = 0, ii = input.length; i < ii; ++i) {
-      opt_output[i] = input[i];
-    }
-    output = opt_output;
-  } else {
-    output = input.slice();
-  }
-  return output;
-};
-
-
-/**
- * Transforms a coordinate from source projection to destination projection.
- * This returns a new coordinate (and does not modify the original).
- *
- * See {@link ol.proj.transformExtent} for extent transformation.
- * See the transform method of {@link ol.geom.Geometry} and its subclasses for
- * geometry transforms.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.ProjectionLike} source Source projection-like.
- * @param {ol.ProjectionLike} destination Destination projection-like.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.proj.transform = function(coordinate, source, destination) {
-  var transformFn = ol.proj.getTransform(source, destination);
-  return transformFn(coordinate, undefined, coordinate.length);
-};
-
-
-/**
- * Transforms an extent from source projection to destination projection.  This
- * returns a new extent (and does not modify the original).
- *
- * @param {ol.Extent} extent The extent to transform.
- * @param {ol.ProjectionLike} source Source projection-like.
- * @param {ol.ProjectionLike} destination Destination projection-like.
- * @return {ol.Extent} The transformed extent.
- * @api
- */
-ol.proj.transformExtent = function(extent, source, destination) {
-  var transformFn = ol.proj.getTransform(source, destination);
-  return ol.extent.applyTransform(extent, transformFn);
-};
-
-
-/**
- * Transforms the given point to the destination projection.
- *
- * @param {ol.Coordinate} point Point.
- * @param {ol.proj.Projection} sourceProjection Source projection.
- * @param {ol.proj.Projection} destinationProjection Destination projection.
- * @return {ol.Coordinate} Point.
- */
-ol.proj.transformWithProjections = function(point, sourceProjection, destinationProjection) {
-  var transformFn = ol.proj.getTransformFromProjections(
-      sourceProjection, destinationProjection);
-  return transformFn(point);
-};
-
-/**
- * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called
- * by when this module is executed and should only need to be called again after
- * `ol.proj.clearAllProjections()` is called (e.g. in tests).
- */
-ol.proj.addCommon = function() {
-  // Add transformations that don't alter coordinates to convert within set of
-  // projections with equal meaning.
-  ol.proj.addEquivalentProjections(ol.proj.EPSG3857.PROJECTIONS);
-  ol.proj.addEquivalentProjections(ol.proj.EPSG4326.PROJECTIONS);
-  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like
-  // coordinates and back.
-  ol.proj.addEquivalentTransforms(
-      ol.proj.EPSG4326.PROJECTIONS,
-      ol.proj.EPSG3857.PROJECTIONS,
-      ol.proj.EPSG3857.fromEPSG4326,
-      ol.proj.EPSG3857.toEPSG4326);
-};
-
-ol.proj.addCommon();
-
-goog.provide('ol.tilecoord');
-
-
-/**
- * @param {number} z Z.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {ol.TileCoord=} opt_tileCoord Tile coordinate.
- * @return {ol.TileCoord} Tile coordinate.
- */
-ol.tilecoord.createOrUpdate = function(z, x, y, opt_tileCoord) {
-  if (opt_tileCoord !== undefined) {
-    opt_tileCoord[0] = z;
-    opt_tileCoord[1] = x;
-    opt_tileCoord[2] = y;
-    return opt_tileCoord;
-  } else {
-    return [z, x, y];
-  }
-};
-
-
-/**
- * @param {number} z Z.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {string} Key.
- */
-ol.tilecoord.getKeyZXY = function(z, x, y) {
-  return z + '/' + x + '/' + y;
-};
-
-
-/**
- * Get the key for a tile coord.
- * @param {ol.TileCoord} tileCoord The tile coord.
- * @return {string} Key.
- */
-ol.tilecoord.getKey = function(tileCoord) {
-  return ol.tilecoord.getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);
-};
-
-
-/**
- * Get a tile coord given a key.
- * @param {string} key The tile coord key.
- * @return {ol.TileCoord} The tile coord.
- */
-ol.tilecoord.fromKey = function(key) {
-  return key.split('/').map(Number);
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coord.
- * @return {number} Hash.
- */
-ol.tilecoord.hash = function(tileCoord) {
-  return (tileCoord[1] << tileCoord[0]) + tileCoord[2];
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coord.
- * @return {string} Quad key.
- */
-ol.tilecoord.quadKey = function(tileCoord) {
-  var z = tileCoord[0];
-  var digits = new Array(z);
-  var mask = 1 << (z - 1);
-  var i, charCode;
-  for (i = 0; i < z; ++i) {
-    // 48 is charCode for 0 - '0'.charCodeAt(0)
-    charCode = 48;
-    if (tileCoord[1] & mask) {
-      charCode += 1;
-    }
-    if (tileCoord[2] & mask) {
-      charCode += 2;
-    }
-    digits[i] = String.fromCharCode(charCode);
-    mask >>= 1;
-  }
-  return digits.join('');
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {boolean} Tile coordinate is within extent and zoom level range.
- */
-ol.tilecoord.withinExtentAndZ = function(tileCoord, tileGrid) {
-  var z = tileCoord[0];
-  var x = tileCoord[1];
-  var y = tileCoord[2];
-
-  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {
-    return false;
-  }
-  var extent = tileGrid.getExtent();
-  var tileRange;
-  if (!extent) {
-    tileRange = tileGrid.getFullTileRange(z);
-  } else {
-    tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-  }
-  if (!tileRange) {
-    return true;
-  } else {
-    return tileRange.containsXY(x, y);
-  }
-};
-
-goog.provide('ol.tilegrid.TileGrid');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.TileRange');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.size');
-goog.require('ol.tilecoord');
-
-
-/**
- * @classdesc
- * Base class for setting the grid pattern for sources accessing tiled-image
- * servers.
- *
- * @constructor
- * @param {olx.tilegrid.TileGridOptions} options Tile grid options.
- * @struct
- * @api
- */
-ol.tilegrid.TileGrid = function(options) {
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;
-
-  /**
-   * @private
-   * @type {!Array.<number>}
-   */
-  this.resolutions_ = options.resolutions;
-  ol.asserts.assert(ol.array.isSorted(this.resolutions_, function(a, b) {
-    return b - a;
-  }, true), 17); // `resolutions` must be sorted in descending order
-
-
-  // check if we've got a consistent zoom factor and origin
-  var zoomFactor;
-  if (!options.origins) {
-    for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {
-      if (!zoomFactor) {
-        zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];
-      } else {
-        if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {
-          zoomFactor = undefined;
-          break;
-        }
-      }
-    }
-  }
-
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.zoomFactor_ = zoomFactor;
-
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.maxZoom = this.resolutions_.length - 1;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.origin_ = options.origin !== undefined ? options.origin : null;
-
-  /**
-   * @private
-   * @type {Array.<ol.Coordinate>}
-   */
-  this.origins_ = null;
-  if (options.origins !== undefined) {
-    this.origins_ = options.origins;
-    ol.asserts.assert(this.origins_.length == this.resolutions_.length,
-        20); // Number of `origins` and `resolutions` must be equal
-  }
-
-  var extent = options.extent;
-
-  if (extent !== undefined &&
-      !this.origin_ && !this.origins_) {
-    this.origin_ = ol.extent.getTopLeft(extent);
-  }
-
-  ol.asserts.assert(
-      (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),
-      18); // Either `origin` or `origins` must be configured, never both
-
-  /**
-   * @private
-   * @type {Array.<number|ol.Size>}
-   */
-  this.tileSizes_ = null;
-  if (options.tileSizes !== undefined) {
-    this.tileSizes_ = options.tileSizes;
-    ol.asserts.assert(this.tileSizes_.length == this.resolutions_.length,
-        19); // Number of `tileSizes` and `resolutions` must be equal
-  }
-
-  /**
-   * @private
-   * @type {number|ol.Size}
-   */
-  this.tileSize_ = options.tileSize !== undefined ?
-    options.tileSize :
-    !this.tileSizes_ ? ol.DEFAULT_TILE_SIZE : null;
-  ol.asserts.assert(
-      (!this.tileSize_ && this.tileSizes_) ||
-      (this.tileSize_ && !this.tileSizes_),
-      22); // Either `tileSize` or `tileSizes` must be configured, never both
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent !== undefined ? extent : null;
-
-
-  /**
-   * @private
-   * @type {Array.<ol.TileRange>}
-   */
-  this.fullTileRanges_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tmpSize_ = [0, 0];
-
-  if (options.sizes !== undefined) {
-    this.fullTileRanges_ = options.sizes.map(function(size, z) {
-      var tileRange = new ol.TileRange(
-          Math.min(0, size[0]), Math.max(size[0] - 1, -1),
-          Math.min(0, size[1]), Math.max(size[1] - 1, -1));
-      return tileRange;
-    }, this);
-  } else if (extent) {
-    this.calculateTileRanges_(extent);
-  }
-
-};
-
-
-/**
- * @private
- * @type {ol.TileCoord}
- */
-ol.tilegrid.TileGrid.tmpTileCoord_ = [0, 0, 0];
-
-
-/**
- * Call a function with each tile coordinate for a given extent and zoom level.
- *
- * @param {ol.Extent} extent Extent.
- * @param {number} zoom Integer zoom level.
- * @param {function(ol.TileCoord)} callback Function called with each tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.forEachTileCoord = function(extent, zoom, callback) {
-  var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);
-  for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {
-    for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {
-      callback([zoom, i, j]);
-    }
-  }
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {function(this: T, number, ol.TileRange): boolean} callback Callback.
- * @param {T=} opt_this The object to use as `this` in `callback`.
- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {boolean} Callback succeeded.
- * @template T
- */
-ol.tilegrid.TileGrid.prototype.forEachTileCoordParentTileRange = function(tileCoord, callback, opt_this, opt_tileRange, opt_extent) {
-  var tileRange, x, y;
-  var tileCoordExtent = null;
-  var z = tileCoord[0] - 1;
-  if (this.zoomFactor_ === 2) {
-    x = tileCoord[1];
-    y = tileCoord[2];
-  } else {
-    tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);
-  }
-  while (z >= this.minZoom) {
-    if (this.zoomFactor_ === 2) {
-      x = Math.floor(x / 2);
-      y = Math.floor(y / 2);
-      tileRange = ol.TileRange.createOrUpdate(x, x, y, y, opt_tileRange);
-    } else {
-      tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);
-    }
-    if (callback.call(opt_this, z, tileRange)) {
-      return true;
-    }
-    --z;
-  }
-  return false;
-};
-
-
-/**
- * Get the extent for this tile grid, if it was configured.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.TileGrid.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-
-/**
- * Get the maximum zoom level for the grid.
- * @return {number} Max zoom.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getMaxZoom = function() {
-  return this.maxZoom;
-};
-
-
-/**
- * Get the minimum zoom level for the grid.
- * @return {number} Min zoom.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getMinZoom = function() {
-  return this.minZoom;
-};
-
-
-/**
- * Get the origin for the grid at the given zoom level.
- * @param {number} z Integer zoom level.
- * @return {ol.Coordinate} Origin.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
-  if (this.origin_) {
-    return this.origin_;
-  } else {
-    return this.origins_[z];
-  }
-};
-
-
-/**
- * Get the resolution for the given zoom level.
- * @param {number} z Integer zoom level.
- * @return {number} Resolution.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getResolution = function(z) {
-  return this.resolutions_[z];
-};
-
-
-/**
- * Get the list of resolutions for the tile grid.
- * @return {Array.<number>} Resolutions.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileRange=} opt_tileRange Temporary ol.TileRange object.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {ol.TileRange} Tile range.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordChildTileRange = function(tileCoord, opt_tileRange, opt_extent) {
-  if (tileCoord[0] < this.maxZoom) {
-    if (this.zoomFactor_ === 2) {
-      var minX = tileCoord[1] * 2;
-      var minY = tileCoord[2] * 2;
-      return ol.TileRange.createOrUpdate(minX, minX + 1, minY, minY + 1, opt_tileRange);
-    }
-    var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);
-    return this.getTileRangeForExtentAndZ(
-        tileCoordExtent, tileCoord[0] + 1, opt_tileRange);
-  }
-  return null;
-};
-
-
-/**
- * Get the extent for a tile range.
- * @param {number} z Integer zoom level.
- * @param {ol.TileRange} tileRange Tile range.
- * @param {ol.Extent=} opt_extent Temporary ol.Extent object.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.TileGrid.prototype.getTileRangeExtent = function(z, tileRange, opt_extent) {
-  var origin = this.getOrigin(z);
-  var resolution = this.getResolution(z);
-  var tileSize = ol.size.toSize(this.getTileSize(z), this.tmpSize_);
-  var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;
-  var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;
-  var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;
-  var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * Get a tile range for the given extent and integer zoom level.
- * @param {ol.Extent} extent Extent.
- * @param {number} z Integer zoom level.
- * @param {ol.TileRange=} opt_tileRange Temporary tile range object.
- * @return {ol.TileRange} Tile range.
- */
-ol.tilegrid.TileGrid.prototype.getTileRangeForExtentAndZ = function(extent, z, opt_tileRange) {
-  var tileCoord = ol.tilegrid.TileGrid.tmpTileCoord_;
-  this.getTileCoordForXYAndZ_(extent[0], extent[1], z, false, tileCoord);
-  var minX = tileCoord[1];
-  var minY = tileCoord[2];
-  this.getTileCoordForXYAndZ_(extent[2], extent[3], z, true, tileCoord);
-  return ol.TileRange.createOrUpdate(
-      minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {ol.Coordinate} Tile center.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordCenter = function(tileCoord) {
-  var origin = this.getOrigin(tileCoord[0]);
-  var resolution = this.getResolution(tileCoord[0]);
-  var tileSize = ol.size.toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
-  return [
-    origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,
-    origin[1] + (tileCoord[2] + 0.5) * tileSize[1] * resolution
-  ];
-};
-
-
-/**
- * Get the extent of a tile coordinate.
- *
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Extent=} opt_extent Temporary extent object.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordExtent = function(tileCoord, opt_extent) {
-  var origin = this.getOrigin(tileCoord[0]);
-  var resolution = this.getResolution(tileCoord[0]);
-  var tileSize = ol.size.toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);
-  var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;
-  var minY = origin[1] + tileCoord[2] * tileSize[1] * resolution;
-  var maxX = minX + tileSize[0] * resolution;
-  var maxY = minY + tileSize[1] * resolution;
-  return ol.extent.createOrUpdate(minX, minY, maxX, maxY, opt_extent);
-};
-
-
-/**
- * Get the tile coordinate for the given map coordinate and resolution.  This
- * method considers that coordinates that intersect tile boundaries should be
- * assigned the higher tile coordinate.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution = function(coordinate, resolution, opt_tileCoord) {
-  return this.getTileCoordForXYAndResolution_(
-      coordinate[0], coordinate[1], resolution, false, opt_tileCoord);
-};
-
-
-/**
- * Note that this method should not be called for resolutions that correspond
- * to an integer zoom level.  Instead call the `getTileCoordForXYAndZ_` method.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {number} resolution Resolution (for a non-integer zoom level).
- * @param {boolean} reverseIntersectionPolicy Instead of letting edge
- *     intersections go to the higher tile coordinate, let edge intersections
- *     go to the lower tile coordinate.
- * @param {ol.TileCoord=} opt_tileCoord Temporary ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @private
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForXYAndResolution_ = function(
-    x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {
-  var z = this.getZForResolution(resolution);
-  var scale = resolution / this.getResolution(z);
-  var origin = this.getOrigin(z);
-  var tileSize = ol.size.toSize(this.getTileSize(z), this.tmpSize_);
-
-  var adjustX = reverseIntersectionPolicy ? 0.5 : 0;
-  var adjustY = reverseIntersectionPolicy ? 0 : 0.5;
-  var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);
-  var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);
-  var tileCoordX = scale * xFromOrigin / tileSize[0];
-  var tileCoordY = scale * yFromOrigin / tileSize[1];
-
-  if (reverseIntersectionPolicy) {
-    tileCoordX = Math.ceil(tileCoordX) - 1;
-    tileCoordY = Math.ceil(tileCoordY) - 1;
-  } else {
-    tileCoordX = Math.floor(tileCoordX);
-    tileCoordY = Math.floor(tileCoordY);
-  }
-
-  return ol.tilecoord.createOrUpdate(z, tileCoordX, tileCoordY, opt_tileCoord);
-};
-
-
-/**
- * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,
- * they should have separate implementations.  This method is for integer zoom
- * levels.  The other method should only be called for resolutions corresponding
- * to non-integer zoom levels.
- * @param {number} x Map x coordinate.
- * @param {number} y Map y coordinate.
- * @param {number} z Integer zoom level.
- * @param {boolean} reverseIntersectionPolicy Instead of letting edge
- *     intersections go to the higher tile coordinate, let edge intersections
- *     go to the lower tile coordinate.
- * @param {ol.TileCoord=} opt_tileCoord Temporary ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @private
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForXYAndZ_ = function(x, y, z, reverseIntersectionPolicy, opt_tileCoord) {
-  var origin = this.getOrigin(z);
-  var resolution = this.getResolution(z);
-  var tileSize = ol.size.toSize(this.getTileSize(z), this.tmpSize_);
-
-  var adjustX = reverseIntersectionPolicy ? 0.5 : 0;
-  var adjustY = reverseIntersectionPolicy ? 0 : 0.5;
-  var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);
-  var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);
-  var tileCoordX = xFromOrigin / tileSize[0];
-  var tileCoordY = yFromOrigin / tileSize[1];
-
-  if (reverseIntersectionPolicy) {
-    tileCoordX = Math.ceil(tileCoordX) - 1;
-    tileCoordY = Math.ceil(tileCoordY) - 1;
-  } else {
-    tileCoordX = Math.floor(tileCoordX);
-    tileCoordY = Math.floor(tileCoordY);
-  }
-
-  return ol.tilecoord.createOrUpdate(z, tileCoordX, tileCoordY, opt_tileCoord);
-};
-
-
-/**
- * Get a tile coordinate given a map coordinate and zoom level.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} z Zoom level.
- * @param {ol.TileCoord=} opt_tileCoord Destination ol.TileCoord object.
- * @return {ol.TileCoord} Tile coordinate.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ = function(coordinate, z, opt_tileCoord) {
-  return this.getTileCoordForXYAndZ_(
-      coordinate[0], coordinate[1], z, false, opt_tileCoord);
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @return {number} Tile resolution.
- */
-ol.tilegrid.TileGrid.prototype.getTileCoordResolution = function(tileCoord) {
-  return this.resolutions_[tileCoord[0]];
-};
-
-
-/**
- * Get the tile size for a zoom level. The type of the return value matches the
- * `tileSize` or `tileSizes` that the tile grid was configured with. To always
- * get an `ol.Size`, run the result through `ol.size.toSize()`.
- * @param {number} z Z.
- * @return {number|ol.Size} Tile size.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {
-  if (this.tileSize_) {
-    return this.tileSize_;
-  } else {
-    return this.tileSizes_[z];
-  }
-};
-
-
-/**
- * @param {number} z Zoom level.
- * @return {ol.TileRange} Extent tile range for the specified zoom level.
- */
-ol.tilegrid.TileGrid.prototype.getFullTileRange = function(z) {
-  if (!this.fullTileRanges_) {
-    return null;
-  } else {
-    return this.fullTileRanges_[z];
-  }
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number=} opt_direction If 0, the nearest resolution will be used.
- *     If 1, the nearest lower resolution will be used. If -1, the nearest
- *     higher resolution will be used. Default is 0.
- * @return {number} Z.
- * @api
- */
-ol.tilegrid.TileGrid.prototype.getZForResolution = function(
-    resolution, opt_direction) {
-  var z = ol.array.linearFindNearest(this.resolutions_, resolution,
-      opt_direction || 0);
-  return ol.math.clamp(z, this.minZoom, this.maxZoom);
-};
-
-
-/**
- * @param {!ol.Extent} extent Extent for this tile grid.
- * @private
- */
-ol.tilegrid.TileGrid.prototype.calculateTileRanges_ = function(extent) {
-  var length = this.resolutions_.length;
-  var fullTileRanges = new Array(length);
-  for (var z = this.minZoom; z < length; ++z) {
-    fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);
-  }
-  this.fullTileRanges_ = fullTileRanges;
-};
-
-goog.provide('ol.tilegrid');
-
-goog.require('ol');
-goog.require('ol.size');
-goog.require('ol.extent');
-goog.require('ol.extent.Corner');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.tilegrid.TileGrid} Default tile grid for the passed projection.
- */
-ol.tilegrid.getForProjection = function(projection) {
-  var tileGrid = projection.getDefaultTileGrid();
-  if (!tileGrid) {
-    tileGrid = ol.tilegrid.createForProjection(projection);
-    projection.setDefaultTileGrid(tileGrid);
-  }
-  return tileGrid;
-};
-
-
-/**
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.TileCoord} Tile coordinate.
- */
-ol.tilegrid.wrapX = function(tileGrid, tileCoord, projection) {
-  var z = tileCoord[0];
-  var center = tileGrid.getTileCoordCenter(tileCoord);
-  var projectionExtent = ol.tilegrid.extentFromProjection(projection);
-  if (!ol.extent.containsCoordinate(projectionExtent, center)) {
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);
-    center[0] += worldWidth * worldsAway;
-    return tileGrid.getTileCoordForCoordAndZ(center, z);
-  } else {
-    return tileCoord;
-  }
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @param {ol.extent.Corner=} opt_corner Extent corner (default is
- *     ol.extent.Corner.TOP_LEFT).
- * @return {!ol.tilegrid.TileGrid} TileGrid instance.
- */
-ol.tilegrid.createForExtent = function(extent, opt_maxZoom, opt_tileSize, opt_corner) {
-  var corner = opt_corner !== undefined ?
-    opt_corner : ol.extent.Corner.TOP_LEFT;
-
-  var resolutions = ol.tilegrid.resolutionsFromExtent(
-      extent, opt_maxZoom, opt_tileSize);
-
-  return new ol.tilegrid.TileGrid({
-    extent: extent,
-    origin: ol.extent.getCorner(extent, corner),
-    resolutions: resolutions,
-    tileSize: opt_tileSize
-  });
-};
-
-
-/**
- * Creates a tile grid with a standard XYZ tiling scheme.
- * @param {olx.tilegrid.XYZOptions=} opt_options Tile grid options.
- * @return {!ol.tilegrid.TileGrid} Tile grid instance.
- * @api
- */
-ol.tilegrid.createXYZ = function(opt_options) {
-  var options = /** @type {olx.tilegrid.TileGridOptions} */ ({});
-  ol.obj.assign(options, opt_options !== undefined ?
-    opt_options : /** @type {olx.tilegrid.XYZOptions} */ ({}));
-  if (options.extent === undefined) {
-    options.extent = ol.proj.get('EPSG:3857').getExtent();
-  }
-  options.resolutions = ol.tilegrid.resolutionsFromExtent(
-      options.extent, options.maxZoom, options.tileSize);
-  delete options.maxZoom;
-
-  return new ol.tilegrid.TileGrid(options);
-};
-
-
-/**
- * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.
- * @param {ol.Extent} extent Extent.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @return {!Array.<number>} Resolutions array.
- */
-ol.tilegrid.resolutionsFromExtent = function(extent, opt_maxZoom, opt_tileSize) {
-  var maxZoom = opt_maxZoom !== undefined ?
-    opt_maxZoom : ol.DEFAULT_MAX_ZOOM;
-
-  var height = ol.extent.getHeight(extent);
-  var width = ol.extent.getWidth(extent);
-
-  var tileSize = ol.size.toSize(opt_tileSize !== undefined ?
-    opt_tileSize : ol.DEFAULT_TILE_SIZE);
-  var maxResolution = Math.max(
-      width / tileSize[0], height / tileSize[1]);
-
-  var length = maxZoom + 1;
-  var resolutions = new Array(length);
-  for (var z = 0; z < length; ++z) {
-    resolutions[z] = maxResolution / Math.pow(2, z);
-  }
-  return resolutions;
-};
-
-
-/**
- * @param {ol.ProjectionLike} projection Projection.
- * @param {number=} opt_maxZoom Maximum zoom level (default is
- *     ol.DEFAULT_MAX_ZOOM).
- * @param {number|ol.Size=} opt_tileSize Tile size (default uses
- *     ol.DEFAULT_TILE_SIZE).
- * @param {ol.extent.Corner=} opt_corner Extent corner (default is
- *     ol.extent.Corner.BOTTOM_LEFT).
- * @return {!ol.tilegrid.TileGrid} TileGrid instance.
- */
-ol.tilegrid.createForProjection = function(projection, opt_maxZoom, opt_tileSize, opt_corner) {
-  var extent = ol.tilegrid.extentFromProjection(projection);
-  return ol.tilegrid.createForExtent(
-      extent, opt_maxZoom, opt_tileSize, opt_corner);
-};
-
-
-/**
- * Generate a tile grid extent from a projection.  If the projection has an
- * extent, it is used.  If not, a global extent is assumed.
- * @param {ol.ProjectionLike} projection Projection.
- * @return {ol.Extent} Extent.
- */
-ol.tilegrid.extentFromProjection = function(projection) {
-  projection = ol.proj.get(projection);
-  var extent = projection.getExtent();
-  if (!extent) {
-    var half = 180 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
-        projection.getMetersPerUnit();
-    extent = ol.extent.createOrUpdate(-half, -half, half, half);
-  }
-  return extent;
-};
-
-goog.provide('ol.Attribution');
-
-goog.require('ol.TileRange');
-goog.require('ol.math');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * An attribution for a layer source.
- *
- * Example:
- *
- *     source: new ol.source.OSM({
- *       attributions: [
- *         new ol.Attribution({
- *           html: 'All maps &copy; ' +
- *               '<a href="https://www.opencyclemap.org/">OpenCycleMap</a>'
- *         }),
- *         ol.source.OSM.ATTRIBUTION
- *       ],
- *     ..
- *
- * @constructor
- * @deprecated This class is deprecated and will removed in the next major release.
- * @param {olx.AttributionOptions} options Attribution options.
- * @struct
- * @api
- */
-ol.Attribution = function(options) {
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.html_ = options.html;
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.TileRange>>}
-   */
-  this.tileRanges_ = options.tileRanges ? options.tileRanges : null;
-
-};
-
-
-/**
- * Get the attribution markup.
- * @return {string} The attribution HTML.
- * @api
- */
-ol.Attribution.prototype.getHTML = function() {
-  return this.html_;
-};
-
-
-/**
- * @param {Object.<string, ol.TileRange>} tileRanges Tile ranges.
- * @param {!ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {!ol.proj.Projection} projection Projection.
- * @return {boolean} Intersects any tile range.
- */
-ol.Attribution.prototype.intersectsAnyTileRange = function(tileRanges, tileGrid, projection) {
-  if (!this.tileRanges_) {
-    return true;
-  }
-  var i, ii, tileRange, zKey;
-  for (zKey in tileRanges) {
-    if (!(zKey in this.tileRanges_)) {
-      continue;
-    }
-    tileRange = tileRanges[zKey];
-    var testTileRange;
-    for (i = 0, ii = this.tileRanges_[zKey].length; i < ii; ++i) {
-      testTileRange = this.tileRanges_[zKey][i];
-      if (testTileRange.intersects(tileRange)) {
-        return true;
-      }
-      var extentTileRange = tileGrid.getTileRangeForExtentAndZ(
-          ol.tilegrid.extentFromProjection(projection), parseInt(zKey, 10));
-      var width = extentTileRange.getWidth();
-      if (tileRange.minX < extentTileRange.minX ||
-          tileRange.maxX > extentTileRange.maxX) {
-        if (testTileRange.intersects(new ol.TileRange(
-            ol.math.modulo(tileRange.minX, width),
-            ol.math.modulo(tileRange.maxX, width),
-            tileRange.minY, tileRange.maxY))) {
-          return true;
-        }
-        if (tileRange.getWidth() > width &&
-            testTileRange.intersects(extentTileRange)) {
-          return true;
-        }
-      }
-    }
-  }
-  return false;
-};
-
-goog.provide('ol.CollectionEventType');
-
-/**
- * @enum {string}
- */
-ol.CollectionEventType = {
-  /**
-   * Triggered when an item is added to the collection.
-   * @event ol.Collection.Event#add
-   * @api
-   */
-  ADD: 'add',
-  /**
-   * Triggered when an item is removed from the collection.
-   * @event ol.Collection.Event#remove
-   * @api
-   */
-  REMOVE: 'remove'
-};
-
-goog.provide('ol.ObjectEventType');
-
-/**
- * @enum {string}
- */
-ol.ObjectEventType = {
-  /**
-   * Triggered when a property is changed.
-   * @event ol.Object.Event#propertychange
-   * @api
-   */
-  PROPERTYCHANGE: 'propertychange'
-};
-
-goog.provide('ol.events');
-
-goog.require('ol.obj');
-
-
-/**
- * @param {ol.EventsKey} listenerObj Listener object.
- * @return {ol.EventsListenerFunctionType} Bound listener.
- */
-ol.events.bindListener_ = function(listenerObj) {
-  var boundListener = function(evt) {
-    var listener = listenerObj.listener;
-    var bindTo = listenerObj.bindTo || listenerObj.target;
-    if (listenerObj.callOnce) {
-      ol.events.unlistenByKey(listenerObj);
-    }
-    return listener.call(bindTo, evt);
-  };
-  listenerObj.boundListener = boundListener;
-  return boundListener;
-};
-
-
-/**
- * Finds the matching {@link ol.EventsKey} in the given listener
- * array.
- *
- * @param {!Array<!ol.EventsKey>} listeners Array of listeners.
- * @param {!Function} listener The listener function.
- * @param {Object=} opt_this The `this` value inside the listener.
- * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching
- *     listener, for {@link ol.events.unlistenByKey}.
- * @return {ol.EventsKey|undefined} The matching listener object.
- * @private
- */
-ol.events.findListener_ = function(listeners, listener, opt_this,
-    opt_setDeleteIndex) {
-  var listenerObj;
-  for (var i = 0, ii = listeners.length; i < ii; ++i) {
-    listenerObj = listeners[i];
-    if (listenerObj.listener === listener &&
-        listenerObj.bindTo === opt_this) {
-      if (opt_setDeleteIndex) {
-        listenerObj.deleteIndex = i;
-      }
-      return listenerObj;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {ol.EventTargetLike} target Target.
- * @param {string} type Type.
- * @return {Array.<ol.EventsKey>|undefined} Listeners.
- */
-ol.events.getListeners = function(target, type) {
-  var listenerMap = target.ol_lm;
-  return listenerMap ? listenerMap[type] : undefined;
-};
-
-
-/**
- * Get the lookup of listeners.  If one does not exist on the target, it is
- * created.
- * @param {ol.EventTargetLike} target Target.
- * @return {!Object.<string, Array.<ol.EventsKey>>} Map of
- *     listeners by event type.
- * @private
- */
-ol.events.getListenerMap_ = function(target) {
-  var listenerMap = target.ol_lm;
-  if (!listenerMap) {
-    listenerMap = target.ol_lm = {};
-  }
-  return listenerMap;
-};
-
-
-/**
- * Clean up all listener objects of the given type.  All properties on the
- * listener objects will be removed, and if no listeners remain in the listener
- * map, it will be removed from the target.
- * @param {ol.EventTargetLike} target Target.
- * @param {string} type Type.
- * @private
- */
-ol.events.removeListeners_ = function(target, type) {
-  var listeners = ol.events.getListeners(target, type);
-  if (listeners) {
-    for (var i = 0, ii = listeners.length; i < ii; ++i) {
-      target.removeEventListener(type, listeners[i].boundListener);
-      ol.obj.clear(listeners[i]);
-    }
-    listeners.length = 0;
-    var listenerMap = target.ol_lm;
-    if (listenerMap) {
-      delete listenerMap[type];
-      if (Object.keys(listenerMap).length === 0) {
-        delete target.ol_lm;
-      }
-    }
-  }
-};
-
-
-/**
- * Registers an event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * This function efficiently binds a `listener` to a `this` object, and returns
- * a key for use with {@link ol.events.unlistenByKey}.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- * @param {boolean=} opt_once If true, add the listener as one-off listener.
- * @return {ol.EventsKey} Unique key for the listener.
- */
-ol.events.listen = function(target, type, listener, opt_this, opt_once) {
-  var listenerMap = ol.events.getListenerMap_(target);
-  var listeners = listenerMap[type];
-  if (!listeners) {
-    listeners = listenerMap[type] = [];
-  }
-  var listenerObj = ol.events.findListener_(listeners, listener, opt_this,
-      false);
-  if (listenerObj) {
-    if (!opt_once) {
-      // Turn one-off listener into a permanent one.
-      listenerObj.callOnce = false;
-    }
-  } else {
-    listenerObj = /** @type {ol.EventsKey} */ ({
-      bindTo: opt_this,
-      callOnce: !!opt_once,
-      listener: listener,
-      target: target,
-      type: type
-    });
-    target.addEventListener(type, ol.events.bindListener_(listenerObj));
-    listeners.push(listenerObj);
-  }
-
-  return listenerObj;
-};
-
-
-/**
- * Registers a one-off event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * This function efficiently binds a `listener` as self-unregistering listener
- * to a `this` object, and returns a key for use with
- * {@link ol.events.unlistenByKey} in case the listener needs to be unregistered
- * before it is called.
- *
- * When {@link ol.events.listen} is called with the same arguments after this
- * function, the self-unregistering listener will be turned into a permanent
- * listener.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- * @return {ol.EventsKey} Key for unlistenByKey.
- */
-ol.events.listenOnce = function(target, type, listener, opt_this) {
-  return ol.events.listen(target, type, listener, opt_this, true);
-};
-
-
-/**
- * Unregisters an event listener on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * To return a listener, this function needs to be called with the exact same
- * arguments that were used for a previous {@link ol.events.listen} call.
- *
- * @param {ol.EventTargetLike} target Event target.
- * @param {string} type Event type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- * @param {Object=} opt_this Object referenced by the `this` keyword in the
- *     listener. Default is the `target`.
- */
-ol.events.unlisten = function(target, type, listener, opt_this) {
-  var listeners = ol.events.getListeners(target, type);
-  if (listeners) {
-    var listenerObj = ol.events.findListener_(listeners, listener, opt_this,
-        true);
-    if (listenerObj) {
-      ol.events.unlistenByKey(listenerObj);
-    }
-  }
-};
-
-
-/**
- * Unregisters event listeners on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * The argument passed to this function is the key returned from
- * {@link ol.events.listen} or {@link ol.events.listenOnce}.
- *
- * @param {ol.EventsKey} key The key.
- */
-ol.events.unlistenByKey = function(key) {
-  if (key && key.target) {
-    key.target.removeEventListener(key.type, key.boundListener);
-    var listeners = ol.events.getListeners(key.target, key.type);
-    if (listeners) {
-      var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);
-      if (i !== -1) {
-        listeners.splice(i, 1);
-      }
-      if (listeners.length === 0) {
-        ol.events.removeListeners_(key.target, key.type);
-      }
-    }
-    ol.obj.clear(key);
-  }
-};
-
-
-/**
- * Unregisters all event listeners on an event target. Inspired by
- * {@link https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html}
- *
- * @param {ol.EventTargetLike} target Target.
- */
-ol.events.unlistenAll = function(target) {
-  var listenerMap = ol.events.getListenerMap_(target);
-  for (var type in listenerMap) {
-    ol.events.removeListeners_(target, type);
-  }
-};
-
-goog.provide('ol.Disposable');
-
-goog.require('ol');
-
-/**
- * Objects that need to clean up after themselves.
- * @constructor
- */
-ol.Disposable = function() {};
-
-/**
- * The object has already been disposed.
- * @type {boolean}
- * @private
- */
-ol.Disposable.prototype.disposed_ = false;
-
-/**
- * Clean up.
- */
-ol.Disposable.prototype.dispose = function() {
-  if (!this.disposed_) {
-    this.disposed_ = true;
-    this.disposeInternal();
-  }
-};
-
-/**
- * Extension point for disposable objects.
- * @protected
- */
-ol.Disposable.prototype.disposeInternal = ol.nullFunction;
-
-goog.provide('ol.events.Event');
-
-
-/**
- * @classdesc
- * Stripped down implementation of the W3C DOM Level 2 Event interface.
- * @see {@link https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface}
- *
- * This implementation only provides `type` and `target` properties, and
- * `stopPropagation` and `preventDefault` methods. It is meant as base class
- * for higher level events defined in the library, and works with
- * {@link ol.events.EventTarget}.
- *
- * @constructor
- * @implements {oli.events.Event}
- * @param {string} type Type.
- */
-ol.events.Event = function(type) {
-
-  /**
-   * @type {boolean}
-   */
-  this.propagationStopped;
-
-  /**
-   * The event type.
-   * @type {string}
-   * @api
-   */
-  this.type = type;
-
-  /**
-   * The event target.
-   * @type {Object}
-   * @api
-   */
-  this.target = null;
-
-};
-
-
-/**
- * Stop event propagation.
- * @function
- * @override
- * @api
- */
-ol.events.Event.prototype.preventDefault =
-
-  /**
-   * Stop event propagation.
-   * @function
-   * @override
-   * @api
-   */
-  ol.events.Event.prototype.stopPropagation = function() {
-    this.propagationStopped = true;
-  };
-
-
-/**
- * @param {Event|ol.events.Event} evt Event
- */
-ol.events.Event.stopPropagation = function(evt) {
-  evt.stopPropagation();
-};
-
-
-/**
- * @param {Event|ol.events.Event} evt Event
- */
-ol.events.Event.preventDefault = function(evt) {
-  evt.preventDefault();
-};
-
-goog.provide('ol.events.EventTarget');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * A simplified implementation of the W3C DOM Level 2 EventTarget interface.
- * @see {@link https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget}
- *
- * There are two important simplifications compared to the specification:
- *
- * 1. The handling of `useCapture` in `addEventListener` and
- *    `removeEventListener`. There is no real capture model.
- * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.
- *    There is no event target hierarchy. When a listener calls
- *    `stopPropagation` or `preventDefault` on an event object, it means that no
- *    more listeners after this one will be called. Same as when the listener
- *    returns false.
- *
- * @constructor
- * @extends {ol.Disposable}
- */
-ol.events.EventTarget = function() {
-
-  ol.Disposable.call(this);
-
-  /**
-   * @private
-   * @type {!Object.<string, number>}
-   */
-  this.pendingRemovals_ = {};
-
-  /**
-   * @private
-   * @type {!Object.<string, number>}
-   */
-  this.dispatching_ = {};
-
-  /**
-   * @private
-   * @type {!Object.<string, Array.<ol.EventsListenerFunctionType>>}
-   */
-  this.listeners_ = {};
-
-};
-ol.inherits(ol.events.EventTarget, ol.Disposable);
-
-
-/**
- * @param {string} type Type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- */
-ol.events.EventTarget.prototype.addEventListener = function(type, listener) {
-  var listeners = this.listeners_[type];
-  if (!listeners) {
-    listeners = this.listeners_[type] = [];
-  }
-  if (listeners.indexOf(listener) === -1) {
-    listeners.push(listener);
-  }
-};
-
-
-/**
- * @param {{type: string,
- *     target: (EventTarget|ol.events.EventTarget|undefined)}|ol.events.Event|
- *     string} event Event or event type.
- * @return {boolean|undefined} `false` if anyone called preventDefault on the
- *     event object or if any of the listeners returned false.
- */
-ol.events.EventTarget.prototype.dispatchEvent = function(event) {
-  var evt = typeof event === 'string' ? new ol.events.Event(event) : event;
-  var type = evt.type;
-  evt.target = this;
-  var listeners = this.listeners_[type];
-  var propagate;
-  if (listeners) {
-    if (!(type in this.dispatching_)) {
-      this.dispatching_[type] = 0;
-      this.pendingRemovals_[type] = 0;
-    }
-    ++this.dispatching_[type];
-    for (var i = 0, ii = listeners.length; i < ii; ++i) {
-      if (listeners[i].call(this, evt) === false || evt.propagationStopped) {
-        propagate = false;
-        break;
-      }
-    }
-    --this.dispatching_[type];
-    if (this.dispatching_[type] === 0) {
-      var pendingRemovals = this.pendingRemovals_[type];
-      delete this.pendingRemovals_[type];
-      while (pendingRemovals--) {
-        this.removeEventListener(type, ol.nullFunction);
-      }
-      delete this.dispatching_[type];
-    }
-    return propagate;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.events.EventTarget.prototype.disposeInternal = function() {
-  ol.events.unlistenAll(this);
-};
-
-
-/**
- * Get the listeners for a specified event type. Listeners are returned in the
- * order that they will be called in.
- *
- * @param {string} type Type.
- * @return {Array.<ol.EventsListenerFunctionType>} Listeners.
- */
-ol.events.EventTarget.prototype.getListeners = function(type) {
-  return this.listeners_[type];
-};
-
-
-/**
- * @param {string=} opt_type Type. If not provided,
- *     `true` will be returned if this EventTarget has any listeners.
- * @return {boolean} Has listeners.
- */
-ol.events.EventTarget.prototype.hasListener = function(opt_type) {
-  return opt_type ?
-    opt_type in this.listeners_ :
-    Object.keys(this.listeners_).length > 0;
-};
-
-
-/**
- * @param {string} type Type.
- * @param {ol.EventsListenerFunctionType} listener Listener.
- */
-ol.events.EventTarget.prototype.removeEventListener = function(type, listener) {
-  var listeners = this.listeners_[type];
-  if (listeners) {
-    var index = listeners.indexOf(listener);
-    if (type in this.pendingRemovals_) {
-      // make listener a no-op, and remove later in #dispatchEvent()
-      listeners[index] = ol.nullFunction;
-      ++this.pendingRemovals_[type];
-    } else {
-      listeners.splice(index, 1);
-      if (listeners.length === 0) {
-        delete this.listeners_[type];
-      }
-    }
-  }
-};
-
-goog.provide('ol.events.EventType');
-
-/**
- * @enum {string}
- * @const
- */
-ol.events.EventType = {
-  /**
-   * Generic change event. Triggered when the revision counter is increased.
-   * @event ol.events.Event#change
-   * @api
-   */
-  CHANGE: 'change',
-
-  CLEAR: 'clear',
-  CLICK: 'click',
-  DBLCLICK: 'dblclick',
-  DRAGENTER: 'dragenter',
-  DRAGOVER: 'dragover',
-  DROP: 'drop',
-  ERROR: 'error',
-  KEYDOWN: 'keydown',
-  KEYPRESS: 'keypress',
-  LOAD: 'load',
-  MOUSEDOWN: 'mousedown',
-  MOUSEMOVE: 'mousemove',
-  MOUSEOUT: 'mouseout',
-  MOUSEUP: 'mouseup',
-  MOUSEWHEEL: 'mousewheel',
-  MSPOINTERDOWN: 'MSPointerDown',
-  RESIZE: 'resize',
-  TOUCHSTART: 'touchstart',
-  TOUCHMOVE: 'touchmove',
-  TOUCHEND: 'touchend',
-  WHEEL: 'wheel'
-};
-
-goog.provide('ol.Observable');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * An event target providing convenient methods for listener registration
- * and unregistration. A generic `change` event is always available through
- * {@link ol.Observable#changed}.
- *
- * @constructor
- * @extends {ol.events.EventTarget}
- * @fires ol.events.Event
- * @struct
- * @api
- */
-ol.Observable = function() {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.revision_ = 0;
-
-};
-ol.inherits(ol.Observable, ol.events.EventTarget);
-
-
-/**
- * Removes an event listener using the key returned by `on()` or `once()`.
- * @param {ol.EventsKey|Array.<ol.EventsKey>} key The key returned by `on()`
- *     or `once()` (or an array of keys).
- * @api
- */
-ol.Observable.unByKey = function(key) {
-  if (Array.isArray(key)) {
-    for (var i = 0, ii = key.length; i < ii; ++i) {
-      ol.events.unlistenByKey(key[i]);
-    }
-  } else {
-    ol.events.unlistenByKey(/** @type {ol.EventsKey} */ (key));
-  }
-};
-
-
-/**
- * Increases the revision counter and dispatches a 'change' event.
- * @api
- */
-ol.Observable.prototype.changed = function() {
-  ++this.revision_;
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * Dispatches an event and calls all listeners listening for events
- * of this type. The event parameter can either be a string or an
- * Object with a `type` property.
- *
- * @param {{type: string,
- *     target: (EventTarget|ol.events.EventTarget|undefined)}|ol.events.Event|
- *     string} event Event object.
- * @function
- * @api
- */
-ol.Observable.prototype.dispatchEvent;
-
-
-/**
- * Get the version number for this object.  Each time the object is modified,
- * its version number will be incremented.
- * @return {number} Revision.
- * @api
- */
-ol.Observable.prototype.getRevision = function() {
-  return this.revision_;
-};
-
-
-/**
- * Listen for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object to use as `this` in `listener`.
- * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
- *     called with an array of event types as the first argument, the return
- *     will be an array of keys.
- * @api
- */
-ol.Observable.prototype.on = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    var len = type.length;
-    var keys = new Array(len);
-    for (var i = 0; i < len; ++i) {
-      keys[i] = ol.events.listen(this, type[i], listener, opt_this);
-    }
-    return keys;
-  } else {
-    return ol.events.listen(
-        this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-
-/**
- * Listen once for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object to use as `this` in `listener`.
- * @return {ol.EventsKey|Array.<ol.EventsKey>} Unique key for the listener. If
- *     called with an array of event types as the first argument, the return
- *     will be an array of keys.
- * @api
- */
-ol.Observable.prototype.once = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    var len = type.length;
-    var keys = new Array(len);
-    for (var i = 0; i < len; ++i) {
-      keys[i] = ol.events.listenOnce(this, type[i], listener, opt_this);
-    }
-    return keys;
-  } else {
-    return ol.events.listenOnce(
-        this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-
-/**
- * Unlisten for a certain type of event.
- * @param {string|Array.<string>} type The event type or array of event types.
- * @param {function(?): ?} listener The listener function.
- * @param {Object=} opt_this The object which was used as `this` by the
- * `listener`.
- * @api
- */
-ol.Observable.prototype.un = function(type, listener, opt_this) {
-  if (Array.isArray(type)) {
-    for (var i = 0, ii = type.length; i < ii; ++i) {
-      ol.events.unlisten(this, type[i], listener, opt_this);
-    }
-    return;
-  } else {
-    ol.events.unlisten(this, /** @type {string} */ (type), listener, opt_this);
-  }
-};
-
-goog.provide('ol.Object');
-
-goog.require('ol');
-goog.require('ol.ObjectEventType');
-goog.require('ol.Observable');
-goog.require('ol.events.Event');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Most non-trivial classes inherit from this.
- *
- * This extends {@link ol.Observable} with observable properties, where each
- * property is observable as well as the object as a whole.
- *
- * Classes that inherit from this have pre-defined properties, to which you can
- * add your owns. The pre-defined properties are listed in this documentation as
- * 'Observable Properties', and have their own accessors; for example,
- * {@link ol.Map} has a `target` property, accessed with `getTarget()`  and
- * changed with `setTarget()`. Not all properties are however settable. There
- * are also general-purpose accessors `get()` and `set()`. For example,
- * `get('target')` is equivalent to `getTarget()`.
- *
- * The `set` accessors trigger a change event, and you can monitor this by
- * registering a listener. For example, {@link ol.View} has a `center`
- * property, so `view.on('change:center', function(evt) {...});` would call the
- * function whenever the value of the center property changes. Within the
- * function, `evt.target` would be the view, so `evt.target.getCenter()` would
- * return the new center.
- *
- * You can add your own observable properties with
- * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.
- * You can listen for changes on that property value with
- * `object.on('change:prop', listener)`. You can get a list of all
- * properties with {@link ol.Object#getProperties object.getProperties()}.
- *
- * Note that the observable properties are separate from standard JS properties.
- * You can, for example, give your map object a title with
- * `map.title='New title'` and with `map.set('title', 'Another title')`. The
- * first will be a `hasOwnProperty`; the second will appear in
- * `getProperties()`. Only the second is observable.
- *
- * Properties can be deleted by using the unset method. E.g.
- * object.unset('foo').
- *
- * @constructor
- * @extends {ol.Observable}
- * @param {Object.<string, *>=} opt_values An object with key-value pairs.
- * @fires ol.Object.Event
- * @api
- */
-ol.Object = function(opt_values) {
-  ol.Observable.call(this);
-
-  // Call ol.getUid to ensure that the order of objects' ids is the same as
-  // the order in which they were created.  This also helps to ensure that
-  // object properties are always added in the same order, which helps many
-  // JavaScript engines generate faster code.
-  ol.getUid(this);
-
-  /**
-   * @private
-   * @type {!Object.<string, *>}
-   */
-  this.values_ = {};
-
-  if (opt_values !== undefined) {
-    this.setProperties(opt_values);
-  }
-};
-ol.inherits(ol.Object, ol.Observable);
-
-
-/**
- * @private
- * @type {Object.<string, string>}
- */
-ol.Object.changeEventTypeCache_ = {};
-
-
-/**
- * @param {string} key Key name.
- * @return {string} Change name.
- */
-ol.Object.getChangeEventType = function(key) {
-  return ol.Object.changeEventTypeCache_.hasOwnProperty(key) ?
-    ol.Object.changeEventTypeCache_[key] :
-    (ol.Object.changeEventTypeCache_[key] = 'change:' + key);
-};
-
-
-/**
- * Gets a value.
- * @param {string} key Key name.
- * @return {*} Value.
- * @api
- */
-ol.Object.prototype.get = function(key) {
-  var value;
-  if (this.values_.hasOwnProperty(key)) {
-    value = this.values_[key];
-  }
-  return value;
-};
-
-
-/**
- * Get a list of object property names.
- * @return {Array.<string>} List of property names.
- * @api
- */
-ol.Object.prototype.getKeys = function() {
-  return Object.keys(this.values_);
-};
-
-
-/**
- * Get an object of all property names and values.
- * @return {Object.<string, *>} Object.
- * @api
- */
-ol.Object.prototype.getProperties = function() {
-  return ol.obj.assign({}, this.values_);
-};
-
-
-/**
- * @param {string} key Key name.
- * @param {*} oldValue Old value.
- */
-ol.Object.prototype.notify = function(key, oldValue) {
-  var eventType;
-  eventType = ol.Object.getChangeEventType(key);
-  this.dispatchEvent(new ol.Object.Event(eventType, key, oldValue));
-  eventType = ol.ObjectEventType.PROPERTYCHANGE;
-  this.dispatchEvent(new ol.Object.Event(eventType, key, oldValue));
-};
-
-
-/**
- * Sets a value.
- * @param {string} key Key name.
- * @param {*} value Value.
- * @param {boolean=} opt_silent Update without triggering an event.
- * @api
- */
-ol.Object.prototype.set = function(key, value, opt_silent) {
-  if (opt_silent) {
-    this.values_[key] = value;
-  } else {
-    var oldValue = this.values_[key];
-    this.values_[key] = value;
-    if (oldValue !== value) {
-      this.notify(key, oldValue);
-    }
-  }
-};
-
-
-/**
- * Sets a collection of key-value pairs.  Note that this changes any existing
- * properties and adds new ones (it does not remove any existing properties).
- * @param {Object.<string, *>} values Values.
- * @param {boolean=} opt_silent Update without triggering an event.
- * @api
- */
-ol.Object.prototype.setProperties = function(values, opt_silent) {
-  var key;
-  for (key in values) {
-    this.set(key, values[key], opt_silent);
-  }
-};
-
-
-/**
- * Unsets a property.
- * @param {string} key Key name.
- * @param {boolean=} opt_silent Unset without triggering an event.
- * @api
- */
-ol.Object.prototype.unset = function(key, opt_silent) {
-  if (key in this.values_) {
-    var oldValue = this.values_[key];
-    delete this.values_[key];
-    if (!opt_silent) {
-      this.notify(key, oldValue);
-    }
-  }
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.Object} instances are instances of this type.
- *
- * @param {string} type The event type.
- * @param {string} key The property name.
- * @param {*} oldValue The old value for `key`.
- * @extends {ol.events.Event}
- * @implements {oli.Object.Event}
- * @constructor
- */
-ol.Object.Event = function(type, key, oldValue) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The name of the property whose value is changing.
-   * @type {string}
-   * @api
-   */
-  this.key = key;
-
-  /**
-   * The old value. To get the new value use `e.target.get(e.key)` where
-   * `e` is the event object.
-   * @type {*}
-   * @api
-   */
-  this.oldValue = oldValue;
-
-};
-ol.inherits(ol.Object.Event, ol.events.Event);
-
-/**
- * An implementation of Google Maps' MVCArray.
- * @see https://developers.google.com/maps/documentation/javascript/reference
- */
-
-goog.provide('ol.Collection');
-
-goog.require('ol');
-goog.require('ol.AssertionError');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Object');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * An expanded version of standard JS Array, adding convenience methods for
- * manipulation. Add and remove changes to the Collection trigger a Collection
- * event. Note that this does not cover changes to the objects _within_ the
- * Collection; they trigger events on the appropriate object, not on the
- * Collection as a whole.
- *
- * @constructor
- * @extends {ol.Object}
- * @fires ol.Collection.Event
- * @param {Array.<T>=} opt_array Array.
- * @param {olx.CollectionOptions=} opt_options Collection options.
- * @template T
- * @api
- */
-ol.Collection = function(opt_array, opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.unique_ = !!options.unique;
-
-  /**
-   * @private
-   * @type {!Array.<T>}
-   */
-  this.array_ = opt_array ? opt_array : [];
-
-  if (this.unique_) {
-    for (var i = 0, ii = this.array_.length; i < ii; ++i) {
-      this.assertUnique_(this.array_[i], i);
-    }
-  }
-
-  this.updateLength_();
-
-};
-ol.inherits(ol.Collection, ol.Object);
-
-
-/**
- * Remove all elements from the collection.
- * @api
- */
-ol.Collection.prototype.clear = function() {
-  while (this.getLength() > 0) {
-    this.pop();
-  }
-};
-
-
-/**
- * Add elements to the collection.  This pushes each item in the provided array
- * to the end of the collection.
- * @param {!Array.<T>} arr Array.
- * @return {ol.Collection.<T>} This collection.
- * @api
- */
-ol.Collection.prototype.extend = function(arr) {
-  var i, ii;
-  for (i = 0, ii = arr.length; i < ii; ++i) {
-    this.push(arr[i]);
-  }
-  return this;
-};
-
-
-/**
- * Iterate over each element, calling the provided callback.
- * @param {function(this: S, T, number, Array.<T>): *} f The function to call
- *     for every element. This function takes 3 arguments (the element, the
- *     index and the array). The return value is ignored.
- * @param {S=} opt_this The object to use as `this` in `f`.
- * @template S
- * @api
- */
-ol.Collection.prototype.forEach = function(f, opt_this) {
-  var fn = (opt_this) ? f.bind(opt_this) : f;
-  var array = this.array_;
-  for (var i = 0, ii = array.length; i < ii; ++i) {
-    fn(array[i], i, array);
-  }
-};
-
-
-/**
- * Get a reference to the underlying Array object. Warning: if the array
- * is mutated, no events will be dispatched by the collection, and the
- * collection's "length" property won't be in sync with the actual length
- * of the array.
- * @return {!Array.<T>} Array.
- * @api
- */
-ol.Collection.prototype.getArray = function() {
-  return this.array_;
-};
-
-
-/**
- * Get the element at the provided index.
- * @param {number} index Index.
- * @return {T} Element.
- * @api
- */
-ol.Collection.prototype.item = function(index) {
-  return this.array_[index];
-};
-
-
-/**
- * Get the length of this collection.
- * @return {number} The length of the array.
- * @observable
- * @api
- */
-ol.Collection.prototype.getLength = function() {
-  return /** @type {number} */ (this.get(ol.Collection.Property_.LENGTH));
-};
-
-
-/**
- * Insert an element at the provided index.
- * @param {number} index Index.
- * @param {T} elem Element.
- * @api
- */
-ol.Collection.prototype.insertAt = function(index, elem) {
-  if (this.unique_) {
-    this.assertUnique_(elem);
-  }
-  this.array_.splice(index, 0, elem);
-  this.updateLength_();
-  this.dispatchEvent(
-      new ol.Collection.Event(ol.CollectionEventType.ADD, elem));
-};
-
-
-/**
- * Remove the last element of the collection and return it.
- * Return `undefined` if the collection is empty.
- * @return {T|undefined} Element.
- * @api
- */
-ol.Collection.prototype.pop = function() {
-  return this.removeAt(this.getLength() - 1);
-};
-
-
-/**
- * Insert the provided element at the end of the collection.
- * @param {T} elem Element.
- * @return {number} New length of the collection.
- * @api
- */
-ol.Collection.prototype.push = function(elem) {
-  if (this.unique_) {
-    this.assertUnique_(elem);
-  }
-  var n = this.getLength();
-  this.insertAt(n, elem);
-  return this.getLength();
-};
-
-
-/**
- * Remove the first occurrence of an element from the collection.
- * @param {T} elem Element.
- * @return {T|undefined} The removed element or undefined if none found.
- * @api
- */
-ol.Collection.prototype.remove = function(elem) {
-  var arr = this.array_;
-  var i, ii;
-  for (i = 0, ii = arr.length; i < ii; ++i) {
-    if (arr[i] === elem) {
-      return this.removeAt(i);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * Remove the element at the provided index and return it.
- * Return `undefined` if the collection does not contain this index.
- * @param {number} index Index.
- * @return {T|undefined} Value.
- * @api
- */
-ol.Collection.prototype.removeAt = function(index) {
-  var prev = this.array_[index];
-  this.array_.splice(index, 1);
-  this.updateLength_();
-  this.dispatchEvent(
-      new ol.Collection.Event(ol.CollectionEventType.REMOVE, prev));
-  return prev;
-};
-
-
-/**
- * Set the element at the provided index.
- * @param {number} index Index.
- * @param {T} elem Element.
- * @api
- */
-ol.Collection.prototype.setAt = function(index, elem) {
-  var n = this.getLength();
-  if (index < n) {
-    if (this.unique_) {
-      this.assertUnique_(elem, index);
-    }
-    var prev = this.array_[index];
-    this.array_[index] = elem;
-    this.dispatchEvent(
-        new ol.Collection.Event(ol.CollectionEventType.REMOVE, prev));
-    this.dispatchEvent(
-        new ol.Collection.Event(ol.CollectionEventType.ADD, elem));
-  } else {
-    var j;
-    for (j = n; j < index; ++j) {
-      this.insertAt(j, undefined);
-    }
-    this.insertAt(index, elem);
-  }
-};
-
-
-/**
- * @private
- */
-ol.Collection.prototype.updateLength_ = function() {
-  this.set(ol.Collection.Property_.LENGTH, this.array_.length);
-};
-
-
-/**
- * @private
- * @param {T} elem Element.
- * @param {number=} opt_except Optional index to ignore.
- */
-ol.Collection.prototype.assertUnique_ = function(elem, opt_except) {
-  for (var i = 0, ii = this.array_.length; i < ii; ++i) {
-    if (this.array_[i] === elem && i !== opt_except) {
-      throw new ol.AssertionError(58);
-    }
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.Collection.Property_ = {
-  LENGTH: 'length'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.Collection} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.Collection.Event}
- * @param {ol.CollectionEventType} type Type.
- * @param {*=} opt_element Element.
- */
-ol.Collection.Event = function(type, opt_element) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The element that is added to or removed from the collection.
-   * @type {*}
-   * @api
-   */
-  this.element = opt_element;
-
-};
-ol.inherits(ol.Collection.Event, ol.events.Event);
-
-goog.provide('ol.MapEvent');
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * @classdesc
- * Events emitted as map events are instances of this type.
- * See {@link ol.Map} for which events trigger a map event.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.MapEvent}
- * @param {string} type Event type.
- * @param {ol.PluggableMap} map Map.
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapEvent = function(type, map, opt_frameState) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The map where the event occurred.
-   * @type {ol.PluggableMap}
-   * @api
-   */
-  this.map = map;
-
-  /**
-   * The frame state at the time of the event.
-   * @type {?olx.FrameState}
-   * @api
-   */
-  this.frameState = opt_frameState !== undefined ? opt_frameState : null;
-
-};
-ol.inherits(ol.MapEvent, ol.events.Event);
-
-goog.provide('ol.MapBrowserEvent');
-
-goog.require('ol');
-goog.require('ol.MapEvent');
-
-
-/**
- * @classdesc
- * Events emitted as map browser events are instances of this type.
- * See {@link ol.Map} for which events trigger a map browser event.
- *
- * @constructor
- * @extends {ol.MapEvent}
- * @implements {oli.MapBrowserEvent}
- * @param {string} type Event type.
- * @param {ol.PluggableMap} map Map.
- * @param {Event} browserEvent Browser event.
- * @param {boolean=} opt_dragging Is the map currently being dragged?
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapBrowserEvent = function(type, map, browserEvent, opt_dragging,
-    opt_frameState) {
-
-  ol.MapEvent.call(this, type, map, opt_frameState);
-
-  /**
-   * The original browser event.
-   * @const
-   * @type {Event}
-   * @api
-   */
-  this.originalEvent = browserEvent;
-
-  /**
-   * The map pixel relative to the viewport corresponding to the original browser event.
-   * @type {ol.Pixel}
-   * @api
-   */
-  this.pixel = map.getEventPixel(browserEvent);
-
-  /**
-   * The coordinate in view projection corresponding to the original browser event.
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = map.getCoordinateFromPixel(this.pixel);
-
-  /**
-   * Indicates if the map is currently being dragged. Only set for
-   * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.
-   *
-   * @type {boolean}
-   * @api
-   */
-  this.dragging = opt_dragging !== undefined ? opt_dragging : false;
-
-};
-ol.inherits(ol.MapBrowserEvent, ol.MapEvent);
-
-
-/**
- * Prevents the default browser action.
- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault
- * @override
- * @api
- */
-ol.MapBrowserEvent.prototype.preventDefault = function() {
-  ol.MapEvent.prototype.preventDefault.call(this);
-  this.originalEvent.preventDefault();
-};
-
-
-/**
- * Prevents further propagation of the current event.
- * @see https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation
- * @override
- * @api
- */
-ol.MapBrowserEvent.prototype.stopPropagation = function() {
-  ol.MapEvent.prototype.stopPropagation.call(this);
-  this.originalEvent.stopPropagation();
-};
-
-goog.provide('ol.webgl');
-
-/**
- * Constants taken from goog.webgl
- */
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.ONE = 1;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.SRC_ALPHA = 0x0302;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.COLOR_ATTACHMENT0 = 0x8CE0;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.COLOR_BUFFER_BIT = 0x00004000;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TRIANGLES = 0x0004;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TRIANGLE_STRIP = 0x0005;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.ONE_MINUS_SRC_ALPHA = 0x0303;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.ARRAY_BUFFER = 0x8892;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.ELEMENT_ARRAY_BUFFER = 0x8893;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.STREAM_DRAW = 0x88E0;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.STATIC_DRAW = 0x88E4;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.DYNAMIC_DRAW = 0x88E8;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.CULL_FACE = 0x0B44;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.BLEND = 0x0BE2;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.STENCIL_TEST = 0x0B90;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.DEPTH_TEST = 0x0B71;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.SCISSOR_TEST = 0x0C11;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.UNSIGNED_BYTE = 0x1401;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.UNSIGNED_SHORT = 0x1403;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.UNSIGNED_INT = 0x1405;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.FLOAT = 0x1406;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.RGBA = 0x1908;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.FRAGMENT_SHADER = 0x8B30;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.VERTEX_SHADER = 0x8B31;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.LINK_STATUS = 0x8B82;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.LINEAR = 0x2601;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE_MAG_FILTER = 0x2800;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE_MIN_FILTER = 0x2801;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE_WRAP_S = 0x2802;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE_WRAP_T = 0x2803;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE_2D = 0x0DE1;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.TEXTURE0 = 0x84C0;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.CLAMP_TO_EDGE = 0x812F;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.COMPILE_STATUS = 0x8B81;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.webgl.FRAMEBUFFER = 0x8D40;
-
-
-/** end of goog.webgl constants
- */
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.webgl.CONTEXT_IDS_ = [
-  'experimental-webgl',
-  'webgl',
-  'webkit-3d',
-  'moz-webgl'
-];
-
-
-/**
- * @param {HTMLCanvasElement} canvas Canvas.
- * @param {Object=} opt_attributes Attributes.
- * @return {WebGLRenderingContext} WebGL rendering context.
- */
-ol.webgl.getContext = function(canvas, opt_attributes) {
-  var context, i, ii = ol.webgl.CONTEXT_IDS_.length;
-  for (i = 0; i < ii; ++i) {
-    try {
-      context = canvas.getContext(ol.webgl.CONTEXT_IDS_[i], opt_attributes);
-      if (context) {
-        return /** @type {!WebGLRenderingContext} */ (context);
-      }
-    } catch (e) {
-      // pass
-    }
-  }
-  return null;
-};
-
-goog.provide('ol.has');
-
-goog.require('ol');
-goog.require('ol.webgl');
-
-var ua = typeof navigator !== 'undefined' ?
-  navigator.userAgent.toLowerCase() : '';
-
-/**
- * User agent string says we are dealing with Firefox as browser.
- * @type {boolean}
- */
-ol.has.FIREFOX = ua.indexOf('firefox') !== -1;
-
-/**
- * User agent string says we are dealing with Safari as browser.
- * @type {boolean}
- */
-ol.has.SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;
-
-/**
- * User agent string says we are dealing with a WebKit engine.
- * @type {boolean}
- */
-ol.has.WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;
-
-/**
- * User agent string says we are dealing with a Mac as platform.
- * @type {boolean}
- */
-ol.has.MAC = ua.indexOf('macintosh') !== -1;
-
-
-/**
- * The ratio between physical pixels and device-independent pixels
- * (dips) on the device (`window.devicePixelRatio`).
- * @const
- * @type {number}
- * @api
- */
-ol.has.DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;
-
-
-/**
- * True if the browser's Canvas implementation implements {get,set}LineDash.
- * @type {boolean}
- */
-ol.has.CANVAS_LINE_DASH = false;
-
-
-/**
- * True if both the library and browser support Canvas.  Always `false`
- * if `ol.ENABLE_CANVAS` is set to `false` at compile time.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.CANVAS = ol.ENABLE_CANVAS && (
-  /**
-   * @return {boolean} Canvas supported.
-   */
-  function() {
-    if (!('HTMLCanvasElement' in window)) {
-      return false;
-    }
-    try {
-      var context = document.createElement('CANVAS').getContext('2d');
-      if (!context) {
-        return false;
-      } else {
-        if (context.setLineDash !== undefined) {
-          ol.has.CANVAS_LINE_DASH = true;
-        }
-        return true;
-      }
-    } catch (e) {
-      return false;
-    }
-  })();
-
-
-/**
- * Indicates if DeviceOrientation is supported in the user's browser.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.DEVICE_ORIENTATION = 'DeviceOrientationEvent' in window;
-
-
-/**
- * Is HTML5 geolocation supported in the current browser?
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.GEOLOCATION = 'geolocation' in navigator;
-
-
-/**
- * True if browser supports touch events.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.TOUCH = ol.ASSUME_TOUCH || 'ontouchstart' in window;
-
-
-/**
- * True if browser supports pointer events.
- * @const
- * @type {boolean}
- */
-ol.has.POINTER = 'PointerEvent' in window;
-
-
-/**
- * True if browser supports ms pointer events (IE 10).
- * @const
- * @type {boolean}
- */
-ol.has.MSPOINTER = !!(navigator.msPointerEnabled);
-
-
-/**
- * True if both OpenLayers and browser support WebGL.  Always `false`
- * if `ol.ENABLE_WEBGL` is set to `false` at compile time.
- * @const
- * @type {boolean}
- * @api
- */
-ol.has.WEBGL;
-
-
-(function() {
-  if (ol.ENABLE_WEBGL) {
-    var hasWebGL = false;
-    var textureSize;
-    var /** @type {Array.<string>} */ extensions = [];
-
-    if ('WebGLRenderingContext' in window) {
-      try {
-        var canvas = /** @type {HTMLCanvasElement} */
-            (document.createElement('CANVAS'));
-        var gl = ol.webgl.getContext(canvas, {
-          failIfMajorPerformanceCaveat: true
-        });
-        if (gl) {
-          hasWebGL = true;
-          textureSize = /** @type {number} */
-            (gl.getParameter(gl.MAX_TEXTURE_SIZE));
-          extensions = gl.getSupportedExtensions();
-        }
-      } catch (e) {
-        // pass
-      }
-    }
-    ol.has.WEBGL = hasWebGL;
-    ol.WEBGL_EXTENSIONS = extensions;
-    ol.WEBGL_MAX_TEXTURE_SIZE = textureSize;
-  }
-})();
-
-goog.provide('ol.MapBrowserEventType');
-
-goog.require('ol.events.EventType');
-
-
-/**
- * Constants for event names.
- * @enum {string}
- */
-ol.MapBrowserEventType = {
-
-  /**
-   * A true single click with no dragging and no double click. Note that this
-   * event is delayed by 250 ms to ensure that it is not a double click.
-   * @event ol.MapBrowserEvent#singleclick
-   * @api
-   */
-  SINGLECLICK: 'singleclick',
-
-  /**
-   * A click with no dragging. A double click will fire two of this.
-   * @event ol.MapBrowserEvent#click
-   * @api
-   */
-  CLICK: ol.events.EventType.CLICK,
-
-  /**
-   * A true double click, with no dragging.
-   * @event ol.MapBrowserEvent#dblclick
-   * @api
-   */
-  DBLCLICK: ol.events.EventType.DBLCLICK,
-
-  /**
-   * Triggered when a pointer is dragged.
-   * @event ol.MapBrowserEvent#pointerdrag
-   * @api
-   */
-  POINTERDRAG: 'pointerdrag',
-
-  /**
-   * Triggered when a pointer is moved. Note that on touch devices this is
-   * triggered when the map is panned, so is not the same as mousemove.
-   * @event ol.MapBrowserEvent#pointermove
-   * @api
-   */
-  POINTERMOVE: 'pointermove',
-
-  POINTERDOWN: 'pointerdown',
-  POINTERUP: 'pointerup',
-  POINTEROVER: 'pointerover',
-  POINTEROUT: 'pointerout',
-  POINTERENTER: 'pointerenter',
-  POINTERLEAVE: 'pointerleave',
-  POINTERCANCEL: 'pointercancel'
-};
-
-goog.provide('ol.MapBrowserPointerEvent');
-
-goog.require('ol');
-goog.require('ol.MapBrowserEvent');
-
-
-/**
- * @constructor
- * @extends {ol.MapBrowserEvent}
- * @param {string} type Event type.
- * @param {ol.PluggableMap} map Map.
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @param {boolean=} opt_dragging Is the map currently being dragged?
- * @param {?olx.FrameState=} opt_frameState Frame state.
- */
-ol.MapBrowserPointerEvent = function(type, map, pointerEvent, opt_dragging,
-    opt_frameState) {
-
-  ol.MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging,
-      opt_frameState);
-
-  /**
-   * @const
-   * @type {ol.pointer.PointerEvent}
-   */
-  this.pointerEvent = pointerEvent;
-
-};
-ol.inherits(ol.MapBrowserPointerEvent, ol.MapBrowserEvent);
-
-goog.provide('ol.pointer.EventType');
-
-
-/**
- * Constants for event names.
- * @enum {string}
- */
-ol.pointer.EventType = {
-  POINTERMOVE: 'pointermove',
-  POINTERDOWN: 'pointerdown',
-  POINTERUP: 'pointerup',
-  POINTEROVER: 'pointerover',
-  POINTEROUT: 'pointerout',
-  POINTERENTER: 'pointerenter',
-  POINTERLEAVE: 'pointerleave',
-  POINTERCANCEL: 'pointercancel'
-};
-
-goog.provide('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @param {!Object.<string, function(Event)>} mapping Event
- *     mapping.
- * @constructor
- */
-ol.pointer.EventSource = function(dispatcher, mapping) {
-  /**
-   * @type {ol.pointer.PointerEventHandler}
-   */
-  this.dispatcher = dispatcher;
-
-  /**
-   * @private
-   * @const
-   * @type {!Object.<string, function(Event)>}
-   */
-  this.mapping_ = mapping;
-};
-
-
-/**
- * List of events supported by this source.
- * @return {Array.<string>} Event names
- */
-ol.pointer.EventSource.prototype.getEvents = function() {
-  return Object.keys(this.mapping_);
-};
-
-
-/**
- * Returns the handler that should handle a given event type.
- * @param {string} eventType The event type.
- * @return {function(Event)} Handler
- */
-ol.pointer.EventSource.prototype.getHandlerForEvent = function(eventType) {
-  return this.mapping_[eventType];
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.MouseSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.MouseSource = function(dispatcher) {
-  var mapping = {
-    'mousedown': this.mousedown,
-    'mousemove': this.mousemove,
-    'mouseup': this.mouseup,
-    'mouseover': this.mouseover,
-    'mouseout': this.mouseout
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {Array.<ol.Pixel>}
-   */
-  this.lastTouches = [];
-};
-ol.inherits(ol.pointer.MouseSource, ol.pointer.EventSource);
-
-
-/**
- * @const
- * @type {number}
- */
-ol.pointer.MouseSource.POINTER_ID = 1;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.pointer.MouseSource.POINTER_TYPE = 'mouse';
-
-
-/**
- * Radius around touchend that swallows mouse events.
- *
- * @const
- * @type {number}
- */
-ol.pointer.MouseSource.DEDUP_DIST = 25;
-
-
-/**
- * Detect if a mouse event was simulated from a touch by
- * checking if previously there was a touch event at the
- * same position.
- *
- * FIXME - Known problem with the native Android browser on
- * Samsung GT-I9100 (Android 4.1.2):
- * In case the page is scrolled, this function does not work
- * correctly when a canvas is used (WebGL or canvas renderer).
- * Mouse listeners on canvas elements (for this browser), create
- * two mouse events: One 'good' and one 'bad' one (on other browsers or
- * when a div is used, there is only one event). For the 'bad' one,
- * clientX/clientY and also pageX/pageY are wrong when the page
- * is scrolled. Because of that, this function can not detect if
- * the events were simulated from a touch event. As result, a
- * pointer event at a wrong position is dispatched, which confuses
- * the map interactions.
- * It is unclear, how one can get the correct position for the event
- * or detect that the positions are invalid.
- *
- * @private
- * @param {Event} inEvent The in event.
- * @return {boolean} True, if the event was generated by a touch.
- */
-ol.pointer.MouseSource.prototype.isEventSimulatedFromTouch_ = function(inEvent) {
-  var lts = this.lastTouches;
-  var x = inEvent.clientX, y = inEvent.clientY;
-  for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {
-    // simulated mouse events will be swallowed near a primary touchend
-    var dx = Math.abs(x - t[0]), dy = Math.abs(y - t[1]);
-    if (dx <= ol.pointer.MouseSource.DEDUP_DIST &&
-        dy <= ol.pointer.MouseSource.DEDUP_DIST) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * Creates a copy of the original event that will be used
- * for the fake pointer event.
- *
- * @param {Event} inEvent The in event.
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @return {Object} The copied event.
- */
-ol.pointer.MouseSource.prepareEvent = function(inEvent, dispatcher) {
-  var e = dispatcher.cloneEvent(inEvent, inEvent);
-
-  // forward mouse preventDefault
-  var pd = e.preventDefault;
-  e.preventDefault = function() {
-    inEvent.preventDefault();
-    pd();
-  };
-
-  e.pointerId = ol.pointer.MouseSource.POINTER_ID;
-  e.isPrimary = true;
-  e.pointerType = ol.pointer.MouseSource.POINTER_TYPE;
-
-  return e;
-};
-
-
-/**
- * Handler for `mousedown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mousedown = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    // TODO(dfreedman) workaround for some elements not sending mouseup
-    // http://crbug/149091
-    if (ol.pointer.MouseSource.POINTER_ID.toString() in this.pointerMap) {
-      this.cancel(inEvent);
-    }
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()] = inEvent;
-    this.dispatcher.down(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mousemove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mousemove = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.move(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mouseup`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseup = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var p = this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];
-
-    if (p && p.button === inEvent.button) {
-      var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-      this.dispatcher.up(e, inEvent);
-      this.cleanupMouse();
-    }
-  }
-};
-
-
-/**
- * Handler for `mouseover`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseover = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.enterOver(e, inEvent);
-  }
-};
-
-
-/**
- * Handler for `mouseout`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.mouseout = function(inEvent) {
-  if (!this.isEventSimulatedFromTouch_(inEvent)) {
-    var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-    this.dispatcher.leaveOut(e, inEvent);
-  }
-};
-
-
-/**
- * Dispatches a `pointercancel` event.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MouseSource.prototype.cancel = function(inEvent) {
-  var e = ol.pointer.MouseSource.prepareEvent(inEvent, this.dispatcher);
-  this.dispatcher.cancel(e, inEvent);
-  this.cleanupMouse();
-};
-
-
-/**
- * Remove the mouse from the list of active pointers.
- */
-ol.pointer.MouseSource.prototype.cleanupMouse = function() {
-  delete this.pointerMap[ol.pointer.MouseSource.POINTER_ID.toString()];
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.MsSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.MsSource = function(dispatcher) {
-  var mapping = {
-    'MSPointerDown': this.msPointerDown,
-    'MSPointerMove': this.msPointerMove,
-    'MSPointerUp': this.msPointerUp,
-    'MSPointerOut': this.msPointerOut,
-    'MSPointerOver': this.msPointerOver,
-    'MSPointerCancel': this.msPointerCancel,
-    'MSGotPointerCapture': this.msGotPointerCapture,
-    'MSLostPointerCapture': this.msLostPointerCapture
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {Array.<string>}
-   */
-  this.POINTER_TYPES = [
-    '',
-    'unavailable',
-    'touch',
-    'pen',
-    'mouse'
-  ];
-};
-ol.inherits(ol.pointer.MsSource, ol.pointer.EventSource);
-
-
-/**
- * Creates a copy of the original event that will be used
- * for the fake pointer event.
- *
- * @private
- * @param {Event} inEvent The in event.
- * @return {Object} The copied event.
- */
-ol.pointer.MsSource.prototype.prepareEvent_ = function(inEvent) {
-  var e = inEvent;
-  if (typeof inEvent.pointerType === 'number') {
-    e = this.dispatcher.cloneEvent(inEvent, inEvent);
-    e.pointerType = this.POINTER_TYPES[inEvent.pointerType];
-  }
-
-  return e;
-};
-
-
-/**
- * Remove this pointer from the list of active pointers.
- * @param {number} pointerId Pointer identifier.
- */
-ol.pointer.MsSource.prototype.cleanup = function(pointerId) {
-  delete this.pointerMap[pointerId.toString()];
-};
-
-
-/**
- * Handler for `msPointerDown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerDown = function(inEvent) {
-  this.pointerMap[inEvent.pointerId.toString()] = inEvent;
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.down(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerMove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerMove = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.move(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerUp`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerUp = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.up(e, inEvent);
-  this.cleanup(inEvent.pointerId);
-};
-
-
-/**
- * Handler for `msPointerOut`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerOut = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.leaveOut(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerOver`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerOver = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.enterOver(e, inEvent);
-};
-
-
-/**
- * Handler for `msPointerCancel`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msPointerCancel = function(inEvent) {
-  var e = this.prepareEvent_(inEvent);
-  this.dispatcher.cancel(e, inEvent);
-  this.cleanup(inEvent.pointerId);
-};
-
-
-/**
- * Handler for `msLostPointerCapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msLostPointerCapture = function(inEvent) {
-  var e = this.dispatcher.makeEvent('lostpointercapture',
-      inEvent, inEvent);
-  this.dispatcher.dispatchEvent(e);
-};
-
-
-/**
- * Handler for `msGotPointerCapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.MsSource.prototype.msGotPointerCapture = function(inEvent) {
-  var e = this.dispatcher.makeEvent('gotpointercapture',
-      inEvent, inEvent);
-  this.dispatcher.dispatchEvent(e);
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.NativeSource');
-
-goog.require('ol');
-goog.require('ol.pointer.EventSource');
-
-
-/**
- * @param {ol.pointer.PointerEventHandler} dispatcher Event handler.
- * @constructor
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.NativeSource = function(dispatcher) {
-  var mapping = {
-    'pointerdown': this.pointerDown,
-    'pointermove': this.pointerMove,
-    'pointerup': this.pointerUp,
-    'pointerout': this.pointerOut,
-    'pointerover': this.pointerOver,
-    'pointercancel': this.pointerCancel,
-    'gotpointercapture': this.gotPointerCapture,
-    'lostpointercapture': this.lostPointerCapture
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-};
-ol.inherits(ol.pointer.NativeSource, ol.pointer.EventSource);
-
-
-/**
- * Handler for `pointerdown`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerDown = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointermove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerMove = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerup`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerUp = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerout`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerOut = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointerover`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerOver = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `pointercancel`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.pointerCancel = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `lostpointercapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.lostPointerCapture = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-
-/**
- * Handler for `gotpointercapture`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.NativeSource.prototype.gotPointerCapture = function(inEvent) {
-  this.dispatcher.fireNativeEvent(inEvent);
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.PointerEvent');
-
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * A class for pointer events.
- *
- * This class is used as an abstraction for mouse events,
- * touch events and even native pointer events.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @param {string} type The type of the event to create.
- * @param {Event} originalEvent The event.
- * @param {Object.<string, ?>=} opt_eventDict An optional dictionary of
- *    initial event properties.
- */
-ol.pointer.PointerEvent = function(type, originalEvent, opt_eventDict) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * @const
-   * @type {Event}
-   */
-  this.originalEvent = originalEvent;
-
-  var eventDict = opt_eventDict ? opt_eventDict : {};
-
-  /**
-   * @type {number}
-   */
-  this.buttons = this.getButtons_(eventDict);
-
-  /**
-   * @type {number}
-   */
-  this.pressure = this.getPressure_(eventDict, this.buttons);
-
-  // MouseEvent related properties
-
-  /**
-   * @type {boolean}
-   */
-  this.bubbles = 'bubbles' in eventDict ? eventDict['bubbles'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.cancelable = 'cancelable' in eventDict ? eventDict['cancelable'] : false;
-
-  /**
-   * @type {Object}
-   */
-  this.view = 'view' in eventDict ? eventDict['view'] : null;
-
-  /**
-   * @type {number}
-   */
-  this.detail = 'detail' in eventDict ? eventDict['detail'] : null;
-
-  /**
-   * @type {number}
-   */
-  this.screenX = 'screenX' in eventDict ? eventDict['screenX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.screenY = 'screenY' in eventDict ? eventDict['screenY'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.clientX = 'clientX' in eventDict ? eventDict['clientX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.clientY = 'clientY' in eventDict ? eventDict['clientY'] : 0;
-
-  /**
-   * @type {boolean}
-   */
-  this.ctrlKey = 'ctrlKey' in eventDict ? eventDict['ctrlKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.altKey = 'altKey' in eventDict ? eventDict['altKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.shiftKey = 'shiftKey' in eventDict ? eventDict['shiftKey'] : false;
-
-  /**
-   * @type {boolean}
-   */
-  this.metaKey = 'metaKey' in eventDict ? eventDict['metaKey'] : false;
-
-  /**
-   * @type {number}
-   */
-  this.button = 'button' in eventDict ? eventDict['button'] : 0;
-
-  /**
-   * @type {Node}
-   */
-  this.relatedTarget = 'relatedTarget' in eventDict ?
-    eventDict['relatedTarget'] : null;
-
-  // PointerEvent related properties
-
-  /**
-   * @const
-   * @type {number}
-   */
-  this.pointerId = 'pointerId' in eventDict ? eventDict['pointerId'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.width = 'width' in eventDict ? eventDict['width'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.height = 'height' in eventDict ? eventDict['height'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.tiltX = 'tiltX' in eventDict ? eventDict['tiltX'] : 0;
-
-  /**
-   * @type {number}
-   */
-  this.tiltY = 'tiltY' in eventDict ? eventDict['tiltY'] : 0;
-
-  /**
-   * @type {string}
-   */
-  this.pointerType = 'pointerType' in eventDict ? eventDict['pointerType'] : '';
-
-  /**
-   * @type {number}
-   */
-  this.hwTimestamp = 'hwTimestamp' in eventDict ? eventDict['hwTimestamp'] : 0;
-
-  /**
-   * @type {boolean}
-   */
-  this.isPrimary = 'isPrimary' in eventDict ? eventDict['isPrimary'] : false;
-
-  // keep the semantics of preventDefault
-  if (originalEvent.preventDefault) {
-    this.preventDefault = function() {
-      originalEvent.preventDefault();
-    };
-  }
-};
-ol.inherits(ol.pointer.PointerEvent, ol.events.Event);
-
-
-/**
- * @private
- * @param {Object.<string, ?>} eventDict The event dictionary.
- * @return {number} Button indicator.
- */
-ol.pointer.PointerEvent.prototype.getButtons_ = function(eventDict) {
-  // According to the w3c spec,
-  // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button
-  // MouseEvent.button == 0 can mean either no mouse button depressed, or the
-  // left mouse button depressed.
-  //
-  // As of now, the only way to distinguish between the two states of
-  // MouseEvent.button is by using the deprecated MouseEvent.which property, as
-  // this maps mouse buttons to positive integers > 0, and uses 0 to mean that
-  // no mouse button is held.
-  //
-  // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,
-  // but initMouseEvent does not expose an argument with which to set
-  // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set
-  // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations
-  // of app developers.
-  //
-  // The only way to propagate the correct state of MouseEvent.which and
-  // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0
-  // is to call initMouseEvent with a buttonArg value of -1.
-  //
-  // This is fixed with DOM Level 4's use of buttons
-  var buttons;
-  if (eventDict.buttons || ol.pointer.PointerEvent.HAS_BUTTONS) {
-    buttons = eventDict.buttons;
-  } else {
-    switch (eventDict.which) {
-      case 1: buttons = 1; break;
-      case 2: buttons = 4; break;
-      case 3: buttons = 2; break;
-      default: buttons = 0;
-    }
-  }
-  return buttons;
-};
-
-
-/**
- * @private
- * @param {Object.<string, ?>} eventDict The event dictionary.
- * @param {number} buttons Button indicator.
- * @return {number} The pressure.
- */
-ol.pointer.PointerEvent.prototype.getPressure_ = function(eventDict, buttons) {
-  // Spec requires that pointers without pressure specified use 0.5 for down
-  // state and 0 for up state.
-  var pressure = 0;
-  if (eventDict.pressure) {
-    pressure = eventDict.pressure;
-  } else {
-    pressure = buttons ? 0.5 : 0;
-  }
-  return pressure;
-};
-
-
-/**
- * Is the `buttons` property supported?
- * @type {boolean}
- */
-ol.pointer.PointerEvent.HAS_BUTTONS = false;
-
-
-/**
- * Checks if the `buttons` property is supported.
- */
-(function() {
-  try {
-    var ev = new MouseEvent('click', {buttons: 1});
-    ol.pointer.PointerEvent.HAS_BUTTONS = ev.buttons === 1;
-  } catch (e) {
-    // pass
-  }
-})();
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.TouchSource');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.pointer.EventSource');
-goog.require('ol.pointer.MouseSource');
-
-
-/**
- * @constructor
- * @param {ol.pointer.PointerEventHandler} dispatcher The event handler.
- * @param {ol.pointer.MouseSource} mouseSource Mouse source.
- * @extends {ol.pointer.EventSource}
- */
-ol.pointer.TouchSource = function(dispatcher, mouseSource) {
-  var mapping = {
-    'touchstart': this.touchstart,
-    'touchmove': this.touchmove,
-    'touchend': this.touchend,
-    'touchcancel': this.touchcancel
-  };
-  ol.pointer.EventSource.call(this, dispatcher, mapping);
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = dispatcher.pointerMap;
-
-  /**
-   * @const
-   * @type {ol.pointer.MouseSource}
-   */
-  this.mouseSource = mouseSource;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.firstTouchId_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.clickCount_ = 0;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.resetId_ = undefined;
-};
-ol.inherits(ol.pointer.TouchSource, ol.pointer.EventSource);
-
-
-/**
- * Mouse event timeout: This should be long enough to
- * ignore compat mouse events made by touch.
- * @const
- * @type {number}
- */
-ol.pointer.TouchSource.DEDUP_TIMEOUT = 2500;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT = 200;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.pointer.TouchSource.POINTER_TYPE = 'touch';
-
-
-/**
- * @private
- * @param {Touch} inTouch The in touch.
- * @return {boolean} True, if this is the primary touch.
- */
-ol.pointer.TouchSource.prototype.isPrimaryTouch_ = function(inTouch) {
-  return this.firstTouchId_ === inTouch.identifier;
-};
-
-
-/**
- * Set primary touch if there are no pointers, or the only pointer is the mouse.
- * @param {Touch} inTouch The in touch.
- * @private
- */
-ol.pointer.TouchSource.prototype.setPrimaryTouch_ = function(inTouch) {
-  var count = Object.keys(this.pointerMap).length;
-  if (count === 0 || (count === 1 &&
-      ol.pointer.MouseSource.POINTER_ID.toString() in this.pointerMap)) {
-    this.firstTouchId_ = inTouch.identifier;
-    this.cancelResetClickCount_();
-  }
-};
-
-
-/**
- * @private
- * @param {Object} inPointer The in pointer object.
- */
-ol.pointer.TouchSource.prototype.removePrimaryPointer_ = function(inPointer) {
-  if (inPointer.isPrimary) {
-    this.firstTouchId_ = undefined;
-    this.resetClickCount_();
-  }
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.resetClickCount_ = function() {
-  this.resetId_ = setTimeout(
-      this.resetClickCountHandler_.bind(this),
-      ol.pointer.TouchSource.CLICK_COUNT_TIMEOUT);
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.resetClickCountHandler_ = function() {
-  this.clickCount_ = 0;
-  this.resetId_ = undefined;
-};
-
-
-/**
- * @private
- */
-ol.pointer.TouchSource.prototype.cancelResetClickCount_ = function() {
-  if (this.resetId_ !== undefined) {
-    clearTimeout(this.resetId_);
-  }
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent Browser event
- * @param {Touch} inTouch Touch event
- * @return {Object} A pointer object.
- */
-ol.pointer.TouchSource.prototype.touchToPointer_ = function(browserEvent, inTouch) {
-  var e = this.dispatcher.cloneEvent(browserEvent, inTouch);
-  // Spec specifies that pointerId 1 is reserved for Mouse.
-  // Touch identifiers can start at 0.
-  // Add 2 to the touch identifier for compatibility.
-  e.pointerId = inTouch.identifier + 2;
-  // TODO: check if this is necessary?
-  //e.target = findTarget(e);
-  e.bubbles = true;
-  e.cancelable = true;
-  e.detail = this.clickCount_;
-  e.button = 0;
-  e.buttons = 1;
-  e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;
-  e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;
-  e.pressure = inTouch.webkitForce || inTouch.force || 0.5;
-  e.isPrimary = this.isPrimaryTouch_(inTouch);
-  e.pointerType = ol.pointer.TouchSource.POINTER_TYPE;
-
-  // make sure that the properties that are different for
-  // each `Touch` object are not copied from the BrowserEvent object
-  e.clientX = inTouch.clientX;
-  e.clientY = inTouch.clientY;
-  e.screenX = inTouch.screenX;
-  e.screenY = inTouch.screenY;
-
-  return e;
-};
-
-
-/**
- * @private
- * @param {Event} inEvent Touch event
- * @param {function(Event, Object)} inFunction In function.
- */
-ol.pointer.TouchSource.prototype.processTouches_ = function(inEvent, inFunction) {
-  var touches = Array.prototype.slice.call(
-      inEvent.changedTouches);
-  var count = touches.length;
-  function preventDefault() {
-    inEvent.preventDefault();
-  }
-  var i, pointer;
-  for (i = 0; i < count; ++i) {
-    pointer = this.touchToPointer_(inEvent, touches[i]);
-    // forward touch preventDefaults
-    pointer.preventDefault = preventDefault;
-    inFunction.call(this, inEvent, pointer);
-  }
-};
-
-
-/**
- * @private
- * @param {TouchList} touchList The touch list.
- * @param {number} searchId Search identifier.
- * @return {boolean} True, if the `Touch` with the given id is in the list.
- */
-ol.pointer.TouchSource.prototype.findTouch_ = function(touchList, searchId) {
-  var l = touchList.length;
-  var touch;
-  for (var i = 0; i < l; i++) {
-    touch = touchList[i];
-    if (touch.identifier === searchId) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * In some instances, a touchstart can happen without a touchend. This
- * leaves the pointermap in a broken state.
- * Therefore, on every touchstart, we remove the touches that did not fire a
- * touchend event.
- * To keep state globally consistent, we fire a pointercancel for
- * this "abandoned" touch
- *
- * @private
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.vacuumTouches_ = function(inEvent) {
-  var touchList = inEvent.touches;
-  // pointerMap.getCount() should be < touchList.length here,
-  // as the touchstart has not been processed yet.
-  var keys = Object.keys(this.pointerMap);
-  var count = keys.length;
-  if (count >= touchList.length) {
-    var d = [];
-    var i, key, value;
-    for (i = 0; i < count; ++i) {
-      key = keys[i];
-      value = this.pointerMap[key];
-      // Never remove pointerId == 1, which is mouse.
-      // Touch identifiers are 2 smaller than their pointerId, which is the
-      // index in pointermap.
-      if (key != ol.pointer.MouseSource.POINTER_ID &&
-          !this.findTouch_(touchList, key - 2)) {
-        d.push(value.out);
-      }
-    }
-    for (i = 0; i < d.length; ++i) {
-      this.cancelOut_(inEvent, d[i]);
-    }
-  }
-};
-
-
-/**
- * Handler for `touchstart`, triggers `pointerover`,
- * `pointerenter` and `pointerdown` events.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchstart = function(inEvent) {
-  this.vacuumTouches_(inEvent);
-  this.setPrimaryTouch_(inEvent.changedTouches[0]);
-  this.dedupSynthMouse_(inEvent);
-  this.clickCount_++;
-  this.processTouches_(inEvent, this.overDown_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer object.
- */
-ol.pointer.TouchSource.prototype.overDown_ = function(browserEvent, inPointer) {
-  this.pointerMap[inPointer.pointerId] = {
-    target: inPointer.target,
-    out: inPointer,
-    outTarget: inPointer.target
-  };
-  this.dispatcher.over(inPointer, browserEvent);
-  this.dispatcher.enter(inPointer, browserEvent);
-  this.dispatcher.down(inPointer, browserEvent);
-};
-
-
-/**
- * Handler for `touchmove`.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchmove = function(inEvent) {
-  inEvent.preventDefault();
-  this.processTouches_(inEvent, this.moveOverOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer.
- */
-ol.pointer.TouchSource.prototype.moveOverOut_ = function(browserEvent, inPointer) {
-  var event = inPointer;
-  var pointer = this.pointerMap[event.pointerId];
-  // a finger drifted off the screen, ignore it
-  if (!pointer) {
-    return;
-  }
-  var outEvent = pointer.out;
-  var outTarget = pointer.outTarget;
-  this.dispatcher.move(event, browserEvent);
-  if (outEvent && outTarget !== event.target) {
-    outEvent.relatedTarget = event.target;
-    event.relatedTarget = outTarget;
-    // recover from retargeting by shadow
-    outEvent.target = outTarget;
-    if (event.target) {
-      this.dispatcher.leaveOut(outEvent, browserEvent);
-      this.dispatcher.enterOver(event, browserEvent);
-    } else {
-      // clean up case when finger leaves the screen
-      event.target = outTarget;
-      event.relatedTarget = null;
-      this.cancelOut_(browserEvent, event);
-    }
-  }
-  pointer.out = event;
-  pointer.outTarget = event.target;
-};
-
-
-/**
- * Handler for `touchend`, triggers `pointerup`,
- * `pointerout` and `pointerleave` events.
- *
- * @param {Event} inEvent The event.
- */
-ol.pointer.TouchSource.prototype.touchend = function(inEvent) {
-  this.dedupSynthMouse_(inEvent);
-  this.processTouches_(inEvent, this.upOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent An event.
- * @param {Object} inPointer The inPointer object.
- */
-ol.pointer.TouchSource.prototype.upOut_ = function(browserEvent, inPointer) {
-  this.dispatcher.up(inPointer, browserEvent);
-  this.dispatcher.out(inPointer, browserEvent);
-  this.dispatcher.leave(inPointer, browserEvent);
-  this.cleanUpPointer_(inPointer);
-};
-
-
-/**
- * Handler for `touchcancel`, triggers `pointercancel`,
- * `pointerout` and `pointerleave` events.
- *
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.touchcancel = function(inEvent) {
-  this.processTouches_(inEvent, this.cancelOut_);
-};
-
-
-/**
- * @private
- * @param {Event} browserEvent The event.
- * @param {Object} inPointer The in pointer.
- */
-ol.pointer.TouchSource.prototype.cancelOut_ = function(browserEvent, inPointer) {
-  this.dispatcher.cancel(inPointer, browserEvent);
-  this.dispatcher.out(inPointer, browserEvent);
-  this.dispatcher.leave(inPointer, browserEvent);
-  this.cleanUpPointer_(inPointer);
-};
-
-
-/**
- * @private
- * @param {Object} inPointer The inPointer object.
- */
-ol.pointer.TouchSource.prototype.cleanUpPointer_ = function(inPointer) {
-  delete this.pointerMap[inPointer.pointerId];
-  this.removePrimaryPointer_(inPointer);
-};
-
-
-/**
- * Prevent synth mouse events from creating pointer events.
- *
- * @private
- * @param {Event} inEvent The in event.
- */
-ol.pointer.TouchSource.prototype.dedupSynthMouse_ = function(inEvent) {
-  var lts = this.mouseSource.lastTouches;
-  var t = inEvent.changedTouches[0];
-  // only the primary finger will synth mouse events
-  if (this.isPrimaryTouch_(t)) {
-    // remember x/y of last touch
-    var lt = [t.clientX, t.clientY];
-    lts.push(lt);
-
-    setTimeout(function() {
-      // remove touch after timeout
-      ol.array.remove(lts, lt);
-    }, ol.pointer.TouchSource.DEDUP_TIMEOUT);
-  }
-};
-
-// Based on https://github.com/Polymer/PointerEvents
-
-// Copyright (c) 2013 The Polymer Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.pointer.PointerEventHandler');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-
-goog.require('ol.has');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.MouseSource');
-goog.require('ol.pointer.MsSource');
-goog.require('ol.pointer.NativeSource');
-goog.require('ol.pointer.PointerEvent');
-goog.require('ol.pointer.TouchSource');
-
-
-/**
- * @constructor
- * @extends {ol.events.EventTarget}
- * @param {Element|HTMLDocument} element Viewport element.
- */
-ol.pointer.PointerEventHandler = function(element) {
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @const
-   * @private
-   * @type {Element|HTMLDocument}
-   */
-  this.element_ = element;
-
-  /**
-   * @const
-   * @type {!Object.<string, Event|Object>}
-   */
-  this.pointerMap = {};
-
-  /**
-   * @type {Object.<string, function(Event)>}
-   * @private
-   */
-  this.eventMap_ = {};
-
-  /**
-   * @type {Array.<ol.pointer.EventSource>}
-   * @private
-   */
-  this.eventSourceList_ = [];
-
-  this.registerSources();
-};
-ol.inherits(ol.pointer.PointerEventHandler, ol.events.EventTarget);
-
-
-/**
- * Set up the event sources (mouse, touch and native pointers)
- * that generate pointer events.
- */
-ol.pointer.PointerEventHandler.prototype.registerSources = function() {
-  if (ol.has.POINTER) {
-    this.registerSource('native', new ol.pointer.NativeSource(this));
-  } else if (ol.has.MSPOINTER) {
-    this.registerSource('ms', new ol.pointer.MsSource(this));
-  } else {
-    var mouseSource = new ol.pointer.MouseSource(this);
-    this.registerSource('mouse', mouseSource);
-
-    if (ol.has.TOUCH) {
-      this.registerSource('touch',
-          new ol.pointer.TouchSource(this, mouseSource));
-    }
-  }
-
-  // register events on the viewport element
-  this.register_();
-};
-
-
-/**
- * Add a new event source that will generate pointer events.
- *
- * @param {string} name A name for the event source
- * @param {ol.pointer.EventSource} source The source event.
- */
-ol.pointer.PointerEventHandler.prototype.registerSource = function(name, source) {
-  var s = source;
-  var newEvents = s.getEvents();
-
-  if (newEvents) {
-    newEvents.forEach(function(e) {
-      var handler = s.getHandlerForEvent(e);
-
-      if (handler) {
-        this.eventMap_[e] = handler.bind(s);
-      }
-    }, this);
-    this.eventSourceList_.push(s);
-  }
-};
-
-
-/**
- * Set up the events for all registered event sources.
- * @private
- */
-ol.pointer.PointerEventHandler.prototype.register_ = function() {
-  var l = this.eventSourceList_.length;
-  var eventSource;
-  for (var i = 0; i < l; i++) {
-    eventSource = this.eventSourceList_[i];
-    this.addEvents_(eventSource.getEvents());
-  }
-};
-
-
-/**
- * Remove all registered events.
- * @private
- */
-ol.pointer.PointerEventHandler.prototype.unregister_ = function() {
-  var l = this.eventSourceList_.length;
-  var eventSource;
-  for (var i = 0; i < l; i++) {
-    eventSource = this.eventSourceList_[i];
-    this.removeEvents_(eventSource.getEvents());
-  }
-};
-
-
-/**
- * Calls the right handler for a new event.
- * @private
- * @param {Event} inEvent Browser event.
- */
-ol.pointer.PointerEventHandler.prototype.eventHandler_ = function(inEvent) {
-  var type = inEvent.type;
-  var handler = this.eventMap_[type];
-  if (handler) {
-    handler(inEvent);
-  }
-};
-
-
-/**
- * Setup listeners for the given events.
- * @private
- * @param {Array.<string>} events List of events.
- */
-ol.pointer.PointerEventHandler.prototype.addEvents_ = function(events) {
-  events.forEach(function(eventName) {
-    ol.events.listen(this.element_, eventName, this.eventHandler_, this);
-  }, this);
-};
-
-
-/**
- * Unregister listeners for the given events.
- * @private
- * @param {Array.<string>} events List of events.
- */
-ol.pointer.PointerEventHandler.prototype.removeEvents_ = function(events) {
-  events.forEach(function(e) {
-    ol.events.unlisten(this.element_, e, this.eventHandler_, this);
-  }, this);
-};
-
-
-/**
- * Returns a snapshot of inEvent, with writable properties.
- *
- * @param {Event} event Browser event.
- * @param {Event|Touch} inEvent An event that contains
- *    properties to copy.
- * @return {Object} An object containing shallow copies of
- *    `inEvent`'s properties.
- */
-ol.pointer.PointerEventHandler.prototype.cloneEvent = function(event, inEvent) {
-  var eventCopy = {}, p;
-  for (var i = 0, ii = ol.pointer.PointerEventHandler.CLONE_PROPS.length; i < ii; i++) {
-    p = ol.pointer.PointerEventHandler.CLONE_PROPS[i][0];
-    eventCopy[p] = event[p] || inEvent[p] || ol.pointer.PointerEventHandler.CLONE_PROPS[i][1];
-  }
-
-  return eventCopy;
-};
-
-
-// EVENTS
-
-
-/**
- * Triggers a 'pointerdown' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.down = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERDOWN, data, event);
-};
-
-
-/**
- * Triggers a 'pointermove' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.move = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERMOVE, data, event);
-};
-
-
-/**
- * Triggers a 'pointerup' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.up = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERUP, data, event);
-};
-
-
-/**
- * Triggers a 'pointerenter' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.enter = function(data, event) {
-  data.bubbles = false;
-  this.fireEvent(ol.pointer.EventType.POINTERENTER, data, event);
-};
-
-
-/**
- * Triggers a 'pointerleave' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.leave = function(data, event) {
-  data.bubbles = false;
-  this.fireEvent(ol.pointer.EventType.POINTERLEAVE, data, event);
-};
-
-
-/**
- * Triggers a 'pointerover' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.over = function(data, event) {
-  data.bubbles = true;
-  this.fireEvent(ol.pointer.EventType.POINTEROVER, data, event);
-};
-
-
-/**
- * Triggers a 'pointerout' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.out = function(data, event) {
-  data.bubbles = true;
-  this.fireEvent(ol.pointer.EventType.POINTEROUT, data, event);
-};
-
-
-/**
- * Triggers a 'pointercancel' event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.cancel = function(data, event) {
-  this.fireEvent(ol.pointer.EventType.POINTERCANCEL, data, event);
-};
-
-
-/**
- * Triggers a combination of 'pointerout' and 'pointerleave' events.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.leaveOut = function(data, event) {
-  this.out(data, event);
-  if (!this.contains_(data.target, data.relatedTarget)) {
-    this.leave(data, event);
-  }
-};
-
-
-/**
- * Triggers a combination of 'pointerover' and 'pointerevents' events.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.enterOver = function(data, event) {
-  this.over(data, event);
-  if (!this.contains_(data.target, data.relatedTarget)) {
-    this.enter(data, event);
-  }
-};
-
-
-/**
- * @private
- * @param {Element} container The container element.
- * @param {Element} contained The contained element.
- * @return {boolean} Returns true if the container element
- *   contains the other element.
- */
-ol.pointer.PointerEventHandler.prototype.contains_ = function(container, contained) {
-  if (!container || !contained) {
-    return false;
-  }
-  return container.contains(contained);
-};
-
-
-// EVENT CREATION AND TRACKING
-/**
- * Creates a new Event of type `inType`, based on the information in
- * `data`.
- *
- * @param {string} inType A string representing the type of event to create.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- * @return {ol.pointer.PointerEvent} A PointerEvent of type `inType`.
- */
-ol.pointer.PointerEventHandler.prototype.makeEvent = function(inType, data, event) {
-  return new ol.pointer.PointerEvent(inType, event, data);
-};
-
-
-/**
- * Make and dispatch an event in one call.
- * @param {string} inType A string representing the type of event.
- * @param {Object} data Pointer event data.
- * @param {Event} event The event.
- */
-ol.pointer.PointerEventHandler.prototype.fireEvent = function(inType, data, event) {
-  var e = this.makeEvent(inType, data, event);
-  this.dispatchEvent(e);
-};
-
-
-/**
- * Creates a pointer event from a native pointer event
- * and dispatches this event.
- * @param {Event} event A platform event with a target.
- */
-ol.pointer.PointerEventHandler.prototype.fireNativeEvent = function(event) {
-  var e = this.makeEvent(event.type, event, event);
-  this.dispatchEvent(e);
-};
-
-
-/**
- * Wrap a native mouse event into a pointer event.
- * This proxy method is required for the legacy IE support.
- * @param {string} eventType The pointer event type.
- * @param {Event} event The event.
- * @return {ol.pointer.PointerEvent} The wrapped event.
- */
-ol.pointer.PointerEventHandler.prototype.wrapMouseEvent = function(eventType, event) {
-  var pointerEvent = this.makeEvent(
-      eventType, ol.pointer.MouseSource.prepareEvent(event, this), event);
-  return pointerEvent;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.pointer.PointerEventHandler.prototype.disposeInternal = function() {
-  this.unregister_();
-  ol.events.EventTarget.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Properties to copy when cloning an event, with default values.
- * @type {Array.<Array>}
- */
-ol.pointer.PointerEventHandler.CLONE_PROPS = [
-  // MouseEvent
-  ['bubbles', false],
-  ['cancelable', false],
-  ['view', null],
-  ['detail', null],
-  ['screenX', 0],
-  ['screenY', 0],
-  ['clientX', 0],
-  ['clientY', 0],
-  ['ctrlKey', false],
-  ['altKey', false],
-  ['shiftKey', false],
-  ['metaKey', false],
-  ['button', 0],
-  ['relatedTarget', null],
-  // DOM Level 3
-  ['buttons', 0],
-  // PointerEvent
-  ['pointerId', 0],
-  ['width', 0],
-  ['height', 0],
-  ['pressure', 0],
-  ['tiltX', 0],
-  ['tiltY', 0],
-  ['pointerType', ''],
-  ['hwTimestamp', 0],
-  ['isPrimary', false],
-  // event instance
-  ['type', ''],
-  ['target', null],
-  ['currentTarget', null],
-  ['which', 0]
-];
-
-goog.provide('ol.MapBrowserEventHandler');
-
-goog.require('ol');
-goog.require('ol.has');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.PointerEventHandler');
-
-
-/**
- * @param {ol.PluggableMap} map The map with the viewport to listen to events on.
- * @param {number|undefined} moveTolerance The minimal distance the pointer must travel to trigger a move.
- * @constructor
- * @extends {ol.events.EventTarget}
- */
-ol.MapBrowserEventHandler = function(map, moveTolerance) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * This is the element that we will listen to the real events on.
-   * @type {ol.PluggableMap}
-   * @private
-   */
-  this.map_ = map;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.clickTimeoutId_ = 0;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.dragging_ = false;
-
-  /**
-   * @type {!Array.<ol.EventsKey>}
-   * @private
-   */
-  this.dragListenerKeys_ = [];
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.moveTolerance_ = moveTolerance ?
-    moveTolerance * ol.has.DEVICE_PIXEL_RATIO : ol.has.DEVICE_PIXEL_RATIO;
-
-  /**
-   * The most recent "down" type event (or null if none have occurred).
-   * Set on pointerdown.
-   * @type {ol.pointer.PointerEvent}
-   * @private
-   */
-  this.down_ = null;
-
-  var element = this.map_.getViewport();
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.activePointers_ = 0;
-
-  /**
-   * @type {!Object.<number, boolean>}
-   * @private
-   */
-  this.trackedTouches_ = {};
-
-  /**
-   * Event handler which generates pointer events for
-   * the viewport element.
-   *
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.pointerEventHandler_ = new ol.pointer.PointerEventHandler(element);
-
-  /**
-   * Event handler which generates pointer events for
-   * the document (used when dragging).
-   *
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.documentPointerEventHandler_ = null;
-
-  /**
-   * @type {?ol.EventsKey}
-   * @private
-   */
-  this.pointerdownListenerKey_ = ol.events.listen(this.pointerEventHandler_,
-      ol.pointer.EventType.POINTERDOWN,
-      this.handlePointerDown_, this);
-
-  /**
-   * @type {?ol.EventsKey}
-   * @private
-   */
-  this.relayedListenerKey_ = ol.events.listen(this.pointerEventHandler_,
-      ol.pointer.EventType.POINTERMOVE,
-      this.relayEvent_, this);
-
-};
-ol.inherits(ol.MapBrowserEventHandler, ol.events.EventTarget);
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.emulateClick_ = function(pointerEvent) {
-  var newEvent = new ol.MapBrowserPointerEvent(
-      ol.MapBrowserEventType.CLICK, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-  if (this.clickTimeoutId_ !== 0) {
-    // double-click
-    clearTimeout(this.clickTimeoutId_);
-    this.clickTimeoutId_ = 0;
-    newEvent = new ol.MapBrowserPointerEvent(
-        ol.MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);
-    this.dispatchEvent(newEvent);
-  } else {
-    // click
-    this.clickTimeoutId_ = setTimeout(function() {
-      this.clickTimeoutId_ = 0;
-      var newEvent = new ol.MapBrowserPointerEvent(
-          ol.MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);
-      this.dispatchEvent(newEvent);
-    }.bind(this), 250);
-  }
-};
-
-
-/**
- * Keeps track on how many pointers are currently active.
- *
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.updateActivePointers_ = function(pointerEvent) {
-  var event = pointerEvent;
-
-  if (event.type == ol.MapBrowserEventType.POINTERUP ||
-      event.type == ol.MapBrowserEventType.POINTERCANCEL) {
-    delete this.trackedTouches_[event.pointerId];
-  } else if (event.type == ol.MapBrowserEventType.POINTERDOWN) {
-    this.trackedTouches_[event.pointerId] = true;
-  }
-  this.activePointers_ = Object.keys(this.trackedTouches_).length;
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerUp_ = function(pointerEvent) {
-  this.updateActivePointers_(pointerEvent);
-  var newEvent = new ol.MapBrowserPointerEvent(
-      ol.MapBrowserEventType.POINTERUP, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-
-  // We emulate click events on left mouse button click, touch contact, and pen
-  // contact. isMouseActionButton returns true in these cases (evt.button is set
-  // to 0).
-  // See http://www.w3.org/TR/pointerevents/#button-states
-  // We only fire click, singleclick, and doubleclick if nobody has called
-  // event.stopPropagation() or event.preventDefault().
-  if (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {
-    this.emulateClick_(this.down_);
-  }
-
-  if (this.activePointers_ === 0) {
-    this.dragListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.dragListenerKeys_.length = 0;
-    this.dragging_ = false;
-    this.down_ = null;
-    this.documentPointerEventHandler_.dispose();
-    this.documentPointerEventHandler_ = null;
-  }
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @return {boolean} If the left mouse button was pressed.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.isMouseActionButton_ = function(pointerEvent) {
-  return pointerEvent.button === 0;
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerDown_ = function(pointerEvent) {
-  this.updateActivePointers_(pointerEvent);
-  var newEvent = new ol.MapBrowserPointerEvent(
-      ol.MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);
-  this.dispatchEvent(newEvent);
-
-  this.down_ = pointerEvent;
-
-  if (this.dragListenerKeys_.length === 0) {
-    /* Set up a pointer event handler on the `document`,
-     * which is required when the pointer is moved outside
-     * the viewport when dragging.
-     */
-    this.documentPointerEventHandler_ =
-        new ol.pointer.PointerEventHandler(document);
-
-    this.dragListenerKeys_.push(
-        ol.events.listen(this.documentPointerEventHandler_,
-            ol.MapBrowserEventType.POINTERMOVE,
-            this.handlePointerMove_, this),
-        ol.events.listen(this.documentPointerEventHandler_,
-            ol.MapBrowserEventType.POINTERUP,
-            this.handlePointerUp_, this),
-        /* Note that the listener for `pointercancel is set up on
-       * `pointerEventHandler_` and not `documentPointerEventHandler_` like
-       * the `pointerup` and `pointermove` listeners.
-       *
-       * The reason for this is the following: `TouchSource.vacuumTouches_()`
-       * issues `pointercancel` events, when there was no `touchend` for a
-       * `touchstart`. Now, let's say a first `touchstart` is registered on
-       * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.
-       * But `documentPointerEventHandler_` doesn't know about the first
-       * `touchstart`. If there is no `touchend` for the `touchstart`, we can
-       * only receive a `touchcancel` from `pointerEventHandler_`, because it is
-       * only registered there.
-       */
-        ol.events.listen(this.pointerEventHandler_,
-            ol.MapBrowserEventType.POINTERCANCEL,
-            this.handlePointerUp_, this)
-    );
-  }
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.handlePointerMove_ = function(pointerEvent) {
-  // Between pointerdown and pointerup, pointermove events are triggered.
-  // To avoid a 'false' touchmove event to be dispatched, we test if the pointer
-  // moved a significant distance.
-  if (this.isMoving_(pointerEvent)) {
-    this.dragging_ = true;
-    var newEvent = new ol.MapBrowserPointerEvent(
-        ol.MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent,
-        this.dragging_);
-    this.dispatchEvent(newEvent);
-  }
-
-  // Some native android browser triggers mousemove events during small period
-  // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or
-  // https://code.google.com/p/android/issues/detail?id=19827
-  // ex: Galaxy Tab P3110 + Android 4.1.1
-  pointerEvent.preventDefault();
-};
-
-
-/**
- * Wrap and relay a pointer event.  Note that this requires that the type
- * string for the MapBrowserPointerEvent matches the PointerEvent type.
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.relayEvent_ = function(pointerEvent) {
-  var dragging = !!(this.down_ && this.isMoving_(pointerEvent));
-  this.dispatchEvent(new ol.MapBrowserPointerEvent(
-      pointerEvent.type, this.map_, pointerEvent, dragging));
-};
-
-
-/**
- * @param {ol.pointer.PointerEvent} pointerEvent Pointer event.
- * @return {boolean} Is moving.
- * @private
- */
-ol.MapBrowserEventHandler.prototype.isMoving_ = function(pointerEvent) {
-  return Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ ||
-      Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.MapBrowserEventHandler.prototype.disposeInternal = function() {
-  if (this.relayedListenerKey_) {
-    ol.events.unlistenByKey(this.relayedListenerKey_);
-    this.relayedListenerKey_ = null;
-  }
-  if (this.pointerdownListenerKey_) {
-    ol.events.unlistenByKey(this.pointerdownListenerKey_);
-    this.pointerdownListenerKey_ = null;
-  }
-
-  this.dragListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.dragListenerKeys_.length = 0;
-
-  if (this.documentPointerEventHandler_) {
-    this.documentPointerEventHandler_.dispose();
-    this.documentPointerEventHandler_ = null;
-  }
-  if (this.pointerEventHandler_) {
-    this.pointerEventHandler_.dispose();
-    this.pointerEventHandler_ = null;
-  }
-  ol.events.EventTarget.prototype.disposeInternal.call(this);
-};
-
-goog.provide('ol.MapEventType');
-
-/**
- * @enum {string}
- */
-ol.MapEventType = {
-
-  /**
-   * Triggered after a map frame is rendered.
-   * @event ol.MapEvent#postrender
-   * @api
-   */
-  POSTRENDER: 'postrender',
-
-  /**
-   * Triggered when the map starts moving.
-   * @event ol.MapEvent#movestart
-   * @api
-   */
-  MOVESTART: 'movestart',
-
-  /**
-   * Triggered after the map is moved.
-   * @event ol.MapEvent#moveend
-   * @api
-   */
-  MOVEEND: 'moveend'
-
-};
-
-goog.provide('ol.MapProperty');
-
-/**
- * @enum {string}
- */
-ol.MapProperty = {
-  LAYERGROUP: 'layergroup',
-  SIZE: 'size',
-  TARGET: 'target',
-  VIEW: 'view'
-};
-
-goog.provide('ol.TileState');
-
-/**
- * @enum {number}
- */
-ol.TileState = {
-  IDLE: 0,
-  LOADING: 1,
-  LOADED: 2,
-  ERROR: 3,
-  EMPTY: 4,
-  ABORT: 5
-};
-
-goog.provide('ol.structs.PriorityQueue');
-
-goog.require('ol.asserts');
-goog.require('ol.obj');
-
-
-/**
- * Priority queue.
- *
- * The implementation is inspired from the Closure Library's Heap class and
- * Python's heapq module.
- *
- * @see http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html
- * @see http://hg.python.org/cpython/file/2.7/Lib/heapq.py
- *
- * @constructor
- * @param {function(T): number} priorityFunction Priority function.
- * @param {function(T): string} keyFunction Key function.
- * @struct
- * @template T
- */
-ol.structs.PriorityQueue = function(priorityFunction, keyFunction) {
-
-  /**
-   * @type {function(T): number}
-   * @private
-   */
-  this.priorityFunction_ = priorityFunction;
-
-  /**
-   * @type {function(T): string}
-   * @private
-   */
-  this.keyFunction_ = keyFunction;
-
-  /**
-   * @type {Array.<T>}
-   * @private
-   */
-  this.elements_ = [];
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.priorities_ = [];
-
-  /**
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.queuedElements_ = {};
-
-};
-
-
-/**
- * @const
- * @type {number}
- */
-ol.structs.PriorityQueue.DROP = Infinity;
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.PriorityQueue.prototype.clear = function() {
-  this.elements_.length = 0;
-  this.priorities_.length = 0;
-  ol.obj.clear(this.queuedElements_);
-};
-
-
-/**
- * Remove and return the highest-priority element. O(log N).
- * @return {T} Element.
- */
-ol.structs.PriorityQueue.prototype.dequeue = function() {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var element = elements[0];
-  if (elements.length == 1) {
-    elements.length = 0;
-    priorities.length = 0;
-  } else {
-    elements[0] = elements.pop();
-    priorities[0] = priorities.pop();
-    this.siftUp_(0);
-  }
-  var elementKey = this.keyFunction_(element);
-  delete this.queuedElements_[elementKey];
-  return element;
-};
-
-
-/**
- * Enqueue an element. O(log N).
- * @param {T} element Element.
- * @return {boolean} The element was added to the queue.
- */
-ol.structs.PriorityQueue.prototype.enqueue = function(element) {
-  ol.asserts.assert(!(this.keyFunction_(element) in this.queuedElements_),
-      31); // Tried to enqueue an `element` that was already added to the queue
-  var priority = this.priorityFunction_(element);
-  if (priority != ol.structs.PriorityQueue.DROP) {
-    this.elements_.push(element);
-    this.priorities_.push(priority);
-    this.queuedElements_[this.keyFunction_(element)] = true;
-    this.siftDown_(0, this.elements_.length - 1);
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @return {number} Count.
- */
-ol.structs.PriorityQueue.prototype.getCount = function() {
-  return this.elements_.length;
-};
-
-
-/**
- * Gets the index of the left child of the node at the given index.
- * @param {number} index The index of the node to get the left child for.
- * @return {number} The index of the left child.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getLeftChildIndex_ = function(index) {
-  return index * 2 + 1;
-};
-
-
-/**
- * Gets the index of the right child of the node at the given index.
- * @param {number} index The index of the node to get the right child for.
- * @return {number} The index of the right child.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getRightChildIndex_ = function(index) {
-  return index * 2 + 2;
-};
-
-
-/**
- * Gets the index of the parent of the node at the given index.
- * @param {number} index The index of the node to get the parent for.
- * @return {number} The index of the parent.
- * @private
- */
-ol.structs.PriorityQueue.prototype.getParentIndex_ = function(index) {
-  return (index - 1) >> 1;
-};
-
-
-/**
- * Make this a heap. O(N).
- * @private
- */
-ol.structs.PriorityQueue.prototype.heapify_ = function() {
-  var i;
-  for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {
-    this.siftUp_(i);
-  }
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.structs.PriorityQueue.prototype.isEmpty = function() {
-  return this.elements_.length === 0;
-};
-
-
-/**
- * @param {string} key Key.
- * @return {boolean} Is key queued.
- */
-ol.structs.PriorityQueue.prototype.isKeyQueued = function(key) {
-  return key in this.queuedElements_;
-};
-
-
-/**
- * @param {T} element Element.
- * @return {boolean} Is queued.
- */
-ol.structs.PriorityQueue.prototype.isQueued = function(element) {
-  return this.isKeyQueued(this.keyFunction_(element));
-};
-
-
-/**
- * @param {number} index The index of the node to move down.
- * @private
- */
-ol.structs.PriorityQueue.prototype.siftUp_ = function(index) {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var count = elements.length;
-  var element = elements[index];
-  var priority = priorities[index];
-  var startIndex = index;
-
-  while (index < (count >> 1)) {
-    var lIndex = this.getLeftChildIndex_(index);
-    var rIndex = this.getRightChildIndex_(index);
-
-    var smallerChildIndex = rIndex < count &&
-        priorities[rIndex] < priorities[lIndex] ?
-      rIndex : lIndex;
-
-    elements[index] = elements[smallerChildIndex];
-    priorities[index] = priorities[smallerChildIndex];
-    index = smallerChildIndex;
-  }
-
-  elements[index] = element;
-  priorities[index] = priority;
-  this.siftDown_(startIndex, index);
-};
-
-
-/**
- * @param {number} startIndex The index of the root.
- * @param {number} index The index of the node to move up.
- * @private
- */
-ol.structs.PriorityQueue.prototype.siftDown_ = function(startIndex, index) {
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var element = elements[index];
-  var priority = priorities[index];
-
-  while (index > startIndex) {
-    var parentIndex = this.getParentIndex_(index);
-    if (priorities[parentIndex] > priority) {
-      elements[index] = elements[parentIndex];
-      priorities[index] = priorities[parentIndex];
-      index = parentIndex;
-    } else {
-      break;
-    }
-  }
-  elements[index] = element;
-  priorities[index] = priority;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.PriorityQueue.prototype.reprioritize = function() {
-  var priorityFunction = this.priorityFunction_;
-  var elements = this.elements_;
-  var priorities = this.priorities_;
-  var index = 0;
-  var n = elements.length;
-  var element, i, priority;
-  for (i = 0; i < n; ++i) {
-    element = elements[i];
-    priority = priorityFunction(element);
-    if (priority == ol.structs.PriorityQueue.DROP) {
-      delete this.queuedElements_[this.keyFunction_(element)];
-    } else {
-      priorities[index] = priority;
-      elements[index++] = element;
-    }
-  }
-  elements.length = index;
-  priorities.length = index;
-  this.heapify_();
-};
-
-goog.provide('ol.TileQueue');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.structs.PriorityQueue');
-
-
-/**
- * @constructor
- * @extends {ol.structs.PriorityQueue.<Array>}
- * @param {ol.TilePriorityFunction} tilePriorityFunction
- *     Tile priority function.
- * @param {function(): ?} tileChangeCallback
- *     Function called on each tile change event.
- * @struct
- */
-ol.TileQueue = function(tilePriorityFunction, tileChangeCallback) {
-
-  ol.structs.PriorityQueue.call(
-      this,
-      /**
-       * @param {Array} element Element.
-       * @return {number} Priority.
-       */
-      function(element) {
-        return tilePriorityFunction.apply(null, element);
-      },
-      /**
-       * @param {Array} element Element.
-       * @return {string} Key.
-       */
-      function(element) {
-        return /** @type {ol.Tile} */ (element[0]).getKey();
-      });
-
-  /**
-   * @private
-   * @type {function(): ?}
-   */
-  this.tileChangeCallback_ = tileChangeCallback;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tilesLoading_ = 0;
-
-  /**
-   * @private
-   * @type {!Object.<string,boolean>}
-   */
-  this.tilesLoadingKeys_ = {};
-
-};
-ol.inherits(ol.TileQueue, ol.structs.PriorityQueue);
-
-
-/**
- * @inheritDoc
- */
-ol.TileQueue.prototype.enqueue = function(element) {
-  var added = ol.structs.PriorityQueue.prototype.enqueue.call(this, element);
-  if (added) {
-    var tile = element[0];
-    ol.events.listen(tile, ol.events.EventType.CHANGE,
-        this.handleTileChange, this);
-  }
-  return added;
-};
-
-
-/**
- * @return {number} Number of tiles loading.
- */
-ol.TileQueue.prototype.getTilesLoading = function() {
-  return this.tilesLoading_;
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.TileQueue.prototype.handleTileChange = function(event) {
-  var tile = /** @type {ol.Tile} */ (event.target);
-  var state = tile.getState();
-  if (state === ol.TileState.LOADED || state === ol.TileState.ERROR ||
-      state === ol.TileState.EMPTY || state === ol.TileState.ABORT) {
-    ol.events.unlisten(tile, ol.events.EventType.CHANGE,
-        this.handleTileChange, this);
-    var tileKey = tile.getKey();
-    if (tileKey in this.tilesLoadingKeys_) {
-      delete this.tilesLoadingKeys_[tileKey];
-      --this.tilesLoading_;
-    }
-    this.tileChangeCallback_();
-  }
-};
-
-
-/**
- * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.
- * @param {number} maxNewLoads Maximum number of new tiles to load.
- */
-ol.TileQueue.prototype.loadMoreTiles = function(maxTotalLoading, maxNewLoads) {
-  var newLoads = 0;
-  var abortedTiles = false;
-  var state, tile, tileKey;
-  while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads &&
-         this.getCount() > 0) {
-    tile = /** @type {ol.Tile} */ (this.dequeue()[0]);
-    tileKey = tile.getKey();
-    state = tile.getState();
-    if (state === ol.TileState.ABORT) {
-      abortedTiles = true;
-    } else if (state === ol.TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {
-      this.tilesLoadingKeys_[tileKey] = true;
-      ++this.tilesLoading_;
-      ++newLoads;
-      tile.load();
-    }
-  }
-  if (newLoads === 0 && abortedTiles) {
-    // Do not stop the render loop when all wanted tiles were aborted due to
-    // a small, saturated tile cache.
-    this.tileChangeCallback_();
-  }
-};
-
-goog.provide('ol.CenterConstraint');
-
-goog.require('ol.math');
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @return {ol.CenterConstraintType} The constraint.
- */
-ol.CenterConstraint.createExtent = function(extent) {
-  return (
-    /**
-     * @param {ol.Coordinate|undefined} center Center.
-     * @return {ol.Coordinate|undefined} Center.
-     */
-    function(center) {
-      if (center) {
-        return [
-          ol.math.clamp(center[0], extent[0], extent[2]),
-          ol.math.clamp(center[1], extent[1], extent[3])
-        ];
-      } else {
-        return undefined;
-      }
-    });
-};
-
-
-/**
- * @param {ol.Coordinate|undefined} center Center.
- * @return {ol.Coordinate|undefined} Center.
- */
-ol.CenterConstraint.none = function(center) {
-  return center;
-};
-
-goog.provide('ol.ResolutionConstraint');
-
-goog.require('ol.array');
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} resolutions Resolutions.
- * @return {ol.ResolutionConstraintType} Zoom function.
- */
-ol.ResolutionConstraint.createSnapToResolutions = function(resolutions) {
-  return (
-    /**
-     * @param {number|undefined} resolution Resolution.
-     * @param {number} delta Delta.
-     * @param {number} direction Direction.
-     * @return {number|undefined} Resolution.
-     */
-    function(resolution, delta, direction) {
-      if (resolution !== undefined) {
-        var z =
-              ol.array.linearFindNearest(resolutions, resolution, direction);
-        z = ol.math.clamp(z + delta, 0, resolutions.length - 1);
-        var index = Math.floor(z);
-        if (z != index && index < resolutions.length - 1) {
-          var power = resolutions[index] / resolutions[index + 1];
-          return resolutions[index] / Math.pow(power, z - index);
-        } else {
-          return resolutions[index];
-        }
-      } else {
-        return undefined;
-      }
-    });
-};
-
-
-/**
- * @param {number} power Power.
- * @param {number} maxResolution Maximum resolution.
- * @param {number=} opt_maxLevel Maximum level.
- * @return {ol.ResolutionConstraintType} Zoom function.
- */
-ol.ResolutionConstraint.createSnapToPower = function(power, maxResolution, opt_maxLevel) {
-  return (
-    /**
-     * @param {number|undefined} resolution Resolution.
-     * @param {number} delta Delta.
-     * @param {number} direction Direction.
-     * @return {number|undefined} Resolution.
-     */
-    function(resolution, delta, direction) {
-      if (resolution !== undefined) {
-        var offset = -direction / 2 + 0.5;
-        var oldLevel = Math.floor(
-            Math.log(maxResolution / resolution) / Math.log(power) + offset);
-        var newLevel = Math.max(oldLevel + delta, 0);
-        if (opt_maxLevel !== undefined) {
-          newLevel = Math.min(newLevel, opt_maxLevel);
-        }
-        return maxResolution / Math.pow(power, newLevel);
-      } else {
-        return undefined;
-      }
-    });
-};
-
-goog.provide('ol.RotationConstraint');
-
-goog.require('ol.math');
-
-
-/**
- * @param {number|undefined} rotation Rotation.
- * @param {number} delta Delta.
- * @return {number|undefined} Rotation.
- */
-ol.RotationConstraint.disable = function(rotation, delta) {
-  if (rotation !== undefined) {
-    return 0;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {number|undefined} rotation Rotation.
- * @param {number} delta Delta.
- * @return {number|undefined} Rotation.
- */
-ol.RotationConstraint.none = function(rotation, delta) {
-  if (rotation !== undefined) {
-    return rotation + delta;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {number} n N.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.RotationConstraint.createSnapToN = function(n) {
-  var theta = 2 * Math.PI / n;
-  return (
-    /**
-     * @param {number|undefined} rotation Rotation.
-     * @param {number} delta Delta.
-     * @return {number|undefined} Rotation.
-     */
-    function(rotation, delta) {
-      if (rotation !== undefined) {
-        rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;
-        return rotation;
-      } else {
-        return undefined;
-      }
-    });
-};
-
-
-/**
- * @param {number=} opt_tolerance Tolerance.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.RotationConstraint.createSnapToZero = function(opt_tolerance) {
-  var tolerance = opt_tolerance || ol.math.toRadians(5);
-  return (
-    /**
-     * @param {number|undefined} rotation Rotation.
-     * @param {number} delta Delta.
-     * @return {number|undefined} Rotation.
-     */
-    function(rotation, delta) {
-      if (rotation !== undefined) {
-        if (Math.abs(rotation + delta) <= tolerance) {
-          return 0;
-        } else {
-          return rotation + delta;
-        }
-      } else {
-        return undefined;
-      }
-    });
-};
-
-goog.provide('ol.ViewHint');
-
-/**
- * @enum {number}
- */
-ol.ViewHint = {
-  ANIMATING: 0,
-  INTERACTING: 1
-};
-
-goog.provide('ol.ViewProperty');
-
-/**
- * @enum {string}
- */
-ol.ViewProperty = {
-  CENTER: 'center',
-  RESOLUTION: 'resolution',
-  ROTATION: 'rotation'
-};
-
-goog.provide('ol.string');
-
-/**
- * @param {number} number Number to be formatted
- * @param {number} width The desired width
- * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)
- * @returns {string} Formatted string
-*/
-ol.string.padNumber = function(number, width, opt_precision) {
-  var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;
-  var decimal = numberString.indexOf('.');
-  decimal = decimal === -1 ? numberString.length : decimal;
-  return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString;
-};
-
-/**
- * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js
- * @param {string|number} v1 First version
- * @param {string|number} v2 Second version
- * @returns {number} Value
- */
-ol.string.compareVersions = function(v1, v2) {
-  var s1 = ('' + v1).split('.');
-  var s2 = ('' + v2).split('.');
-
-  for (var i = 0; i < Math.max(s1.length, s2.length); i++) {
-    var n1 = parseInt(s1[i] || '0', 10);
-    var n2 = parseInt(s2[i] || '0', 10);
-
-    if (n1 > n2) {
-      return 1;
-    }
-    if (n2 > n1) {
-      return -1;
-    }
-  }
-
-  return 0;
-};
-
-goog.provide('ol.coordinate');
-
-goog.require('ol.math');
-goog.require('ol.string');
-
-
-/**
- * Add `delta` to `coordinate`. `coordinate` is modified in place and returned
- * by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     ol.coordinate.add(coord, [-2, 4]);
- *     // coord is now [5.85, 51.983333]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Coordinate} delta Delta.
- * @return {ol.Coordinate} The input coordinate adjusted by the given delta.
- * @api
- */
-ol.coordinate.add = function(coordinate, delta) {
-  coordinate[0] += delta[0];
-  coordinate[1] += delta[1];
-  return coordinate;
-};
-
-
-/**
- * Calculates the point closest to the passed coordinate on the passed circle.
- *
- * @param {ol.Coordinate} coordinate The coordinate.
- * @param {ol.geom.Circle} circle The circle.
- * @return {ol.Coordinate} Closest point on the circumference
- */
-ol.coordinate.closestOnCircle = function(coordinate, circle) {
-  var r = circle.getRadius();
-  var center = circle.getCenter();
-  var x0 = center[0];
-  var y0 = center[1];
-  var x1 = coordinate[0];
-  var y1 = coordinate[1];
-
-  var dx = x1 - x0;
-  var dy = y1 - y0;
-  if (dx === 0 && dy === 0) {
-    dx = 1;
-  }
-  var d = Math.sqrt(dx * dx + dy * dy);
-
-  var x, y;
-
-  x = x0 + r * dx / d;
-  y = y0 + r * dy / d;
-
-  return [x, y];
-};
-
-
-/**
- * Calculates the point closest to the passed coordinate on the passed segment.
- * This is the foot of the perpendicular of the coordinate to the segment when
- * the foot is on the segment, or the closest segment coordinate when the foot
- * is outside the segment.
- *
- * @param {ol.Coordinate} coordinate The coordinate.
- * @param {Array.<ol.Coordinate>} segment The two coordinates of the segment.
- * @return {ol.Coordinate} The foot of the perpendicular of the coordinate to
- *     the segment.
- */
-ol.coordinate.closestOnSegment = function(coordinate, segment) {
-  var x0 = coordinate[0];
-  var y0 = coordinate[1];
-  var start = segment[0];
-  var end = segment[1];
-  var x1 = start[0];
-  var y1 = start[1];
-  var x2 = end[0];
-  var y2 = end[1];
-  var dx = x2 - x1;
-  var dy = y2 - y1;
-  var along = (dx === 0 && dy === 0) ? 0 :
-    ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);
-  var x, y;
-  if (along <= 0) {
-    x = x1;
-    y = y1;
-  } else if (along >= 1) {
-    x = x2;
-    y = y2;
-  } else {
-    x = x1 + along * dx;
-    y = y1 + along * dy;
-  }
-  return [x, y];
-};
-
-
-/**
- * Returns a {@link ol.CoordinateFormatType} function that can be used to format
- * a {ol.Coordinate} to a string.
- *
- * Example without specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var stringifyFunc = ol.coordinate.createStringXY();
- *     var out = stringifyFunc(coord);
- *     // out is now '8, 48'
- *
- * Example with explicitly specifying 2 fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var stringifyFunc = ol.coordinate.createStringXY(2);
- *     var out = stringifyFunc(coord);
- *     // out is now '7.85, 47.98'
- *
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {ol.CoordinateFormatType} Coordinate format.
- * @api
- */
-ol.coordinate.createStringXY = function(opt_fractionDigits) {
-  return (
-    /**
-     * @param {ol.Coordinate|undefined} coordinate Coordinate.
-     * @return {string} String XY.
-     */
-    function(coordinate) {
-      return ol.coordinate.toStringXY(coordinate, opt_fractionDigits);
-    });
-};
-
-
-/**
- * @param {string} hemispheres Hemispheres.
- * @param {number} degrees Degrees.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} String.
- */
-ol.coordinate.degreesToStringHDMS = function(hemispheres, degrees, opt_fractionDigits) {
-  var normalizedDegrees = ol.math.modulo(degrees + 180, 360) - 180;
-  var x = Math.abs(3600 * normalizedDegrees);
-  var dflPrecision = opt_fractionDigits || 0;
-  var precision = Math.pow(10, dflPrecision);
-
-  var deg = Math.floor(x / 3600);
-  var min = Math.floor((x - deg * 3600) / 60);
-  var sec = x - (deg * 3600) - (min * 60);
-  sec = Math.ceil(sec * precision) / precision;
-
-  if (sec >= 60) {
-    sec = 0;
-    min += 1;
-  }
-
-  if (min >= 60) {
-    min = 0;
-    deg += 1;
-  }
-
-  return deg + '\u00b0 ' + ol.string.padNumber(min, 2) + '\u2032 ' +
-    ol.string.padNumber(sec, 2, dflPrecision) + '\u2033' +
-    (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0));
-};
-
-
-/**
- * Transforms the given {@link ol.Coordinate} to a string using the given string
- * template. The strings `{x}` and `{y}` in the template will be replaced with
- * the first and second coordinate values respectively.
- *
- * Example without specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var template = 'Coordinate is ({x}|{y}).';
- *     var out = ol.coordinate.format(coord, template);
- *     // out is now 'Coordinate is (8|48).'
- *
- * Example explicitly specifying the fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var template = 'Coordinate is ({x}|{y}).';
- *     var out = ol.coordinate.format(coord, template, 2);
- *     // out is now 'Coordinate is (7.85|47.98).'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {string} template A template string with `{x}` and `{y}` placeholders
- *     that will be replaced by first and second coordinate values.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} Formatted coordinate.
- * @api
- */
-ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
-  if (coordinate) {
-    return template
-        .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))
-        .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate1 First coordinate.
- * @param {ol.Coordinate} coordinate2 Second coordinate.
- * @return {boolean} Whether the passed coordinates are equal.
- */
-ol.coordinate.equals = function(coordinate1, coordinate2) {
-  var equals = true;
-  for (var i = coordinate1.length - 1; i >= 0; --i) {
-    if (coordinate1[i] != coordinate2[i]) {
-      equals = false;
-      break;
-    }
-  }
-  return equals;
-};
-
-
-/**
- * Rotate `coordinate` by `angle`. `coordinate` is modified in place and
- * returned by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     var rotateRadians = Math.PI / 2; // 90 degrees
- *     ol.coordinate.rotate(coord, rotateRadians);
- *     // coord is now [-47.983333, 7.85]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} angle Angle in radian.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.coordinate.rotate = function(coordinate, angle) {
-  var cosAngle = Math.cos(angle);
-  var sinAngle = Math.sin(angle);
-  var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;
-  var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;
-  coordinate[0] = x;
-  coordinate[1] = y;
-  return coordinate;
-};
-
-
-/**
- * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned
- * by the function.
- *
- * Example:
- *
- *     var coord = [7.85, 47.983333];
- *     var scale = 1.2;
- *     ol.coordinate.scale(coord, scale);
- *     // coord is now [9.42, 57.5799996]
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} scale Scale factor.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.coordinate.scale = function(coordinate, scale) {
-  coordinate[0] *= scale;
-  coordinate[1] *= scale;
-  return coordinate;
-};
-
-
-/**
- * Subtract `delta` to `coordinate`. `coordinate` is modified in place and
- * returned by the function.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Coordinate} delta Delta.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.coordinate.sub = function(coordinate, delta) {
-  coordinate[0] -= delta[0];
-  coordinate[1] -= delta[1];
-  return coordinate;
-};
-
-
-/**
- * @param {ol.Coordinate} coord1 First coordinate.
- * @param {ol.Coordinate} coord2 Second coordinate.
- * @return {number} Squared distance between coord1 and coord2.
- */
-ol.coordinate.squaredDistance = function(coord1, coord2) {
-  var dx = coord1[0] - coord2[0];
-  var dy = coord1[1] - coord2[1];
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * @param {ol.Coordinate} coord1 First coordinate.
- * @param {ol.Coordinate} coord2 Second coordinate.
- * @return {number} Distance between coord1 and coord2.
- */
-ol.coordinate.distance = function(coord1, coord2) {
-  return Math.sqrt(ol.coordinate.squaredDistance(coord1, coord2));
-};
-
-
-/**
- * Calculate the squared distance from a coordinate to a line segment.
- *
- * @param {ol.Coordinate} coordinate Coordinate of the point.
- * @param {Array.<ol.Coordinate>} segment Line segment (2 coordinates).
- * @return {number} Squared distance from the point to the line segment.
- */
-ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) {
-  return ol.coordinate.squaredDistance(coordinate,
-      ol.coordinate.closestOnSegment(coordinate, segment));
-};
-
-
-/**
- * Format a geographic coordinate with the hemisphere, degrees, minutes, and
- * seconds.
- *
- * Example without specifying fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringHDMS(coord);
- *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'
- *
- * Example explicitly specifying 1 fractional digit:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringHDMS(coord, 1);
- *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} Hemisphere, degrees, minutes and seconds.
- * @api
- */
-ol.coordinate.toStringHDMS = function(coordinate, opt_fractionDigits) {
-  if (coordinate) {
-    return ol.coordinate.degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' +
-        ol.coordinate.degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * Format a coordinate as a comma delimited string.
- *
- * Example without specifying fractional digits:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringXY(coord);
- *     // out is now '8, 48'
- *
- * Example explicitly specifying 1 fractional digit:
- *
- *     var coord = [7.85, 47.983333];
- *     var out = ol.coordinate.toStringXY(coord, 1);
- *     // out is now '7.8, 48.0'
- *
- * @param {ol.Coordinate|undefined} coordinate Coordinate.
- * @param {number=} opt_fractionDigits The number of digits to include
- *    after the decimal point. Default is `0`.
- * @return {string} XY.
- * @api
- */
-ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) {
-  return ol.coordinate.format(coordinate, '{x}, {y}', opt_fractionDigits);
-};
-
-goog.provide('ol.easing');
-
-
-/**
- * Start slow and speed up.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.easeIn = function(t) {
-  return Math.pow(t, 3);
-};
-
-
-/**
- * Start fast and slow down.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.easeOut = function(t) {
-  return 1 - ol.easing.easeIn(1 - t);
-};
-
-
-/**
- * Start slow, speed up, and then slow down again.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.inAndOut = function(t) {
-  return 3 * t * t - 2 * t * t * t;
-};
-
-
-/**
- * Maintain a constant speed over time.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.linear = function(t) {
-  return t;
-};
-
-
-/**
- * Start slow, speed up, and at the very end slow down again.  This has the
- * same general behavior as {@link ol.easing.inAndOut}, but the final slowdown
- * is delayed.
- * @param {number} t Input between 0 and 1.
- * @return {number} Output between 0 and 1.
- * @api
- */
-ol.easing.upAndDown = function(t) {
-  if (t < 0.5) {
-    return ol.easing.inAndOut(2 * t);
-  } else {
-    return 1 - ol.easing.inAndOut(2 * (t - 0.5));
-  }
-};
-
-goog.provide('ol.geom.GeometryLayout');
-
-
-/**
- * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
- * or measure ('M') coordinate is available. Supported values are `'XY'`,
- * `'XYZ'`, `'XYM'`, `'XYZM'`.
- * @enum {string}
- */
-ol.geom.GeometryLayout = {
-  XY: 'XY',
-  XYZ: 'XYZ',
-  XYM: 'XYM',
-  XYZM: 'XYZM'
-};
-
-goog.provide('ol.functions');
-
-/**
- * Always returns true.
- * @returns {boolean} true.
- */
-ol.functions.TRUE = function() {
-  return true;
-};
-
-/**
- * Always returns false.
- * @returns {boolean} false.
- */
-ol.functions.FALSE = function() {
-  return false;
-};
-
-goog.provide('ol.geom.flat.transform');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Transform} transform Transform.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.transform2D = function(flatCoordinates, offset, end, stride, transform, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var i = 0;
-  var j;
-  for (j = offset; j < end; j += stride) {
-    var x = flatCoordinates[j];
-    var y = flatCoordinates[j + 1];
-    dest[i++] = transform[0] * x + transform[2] * y + transform[4];
-    dest[i++] = transform[1] * x + transform[3] * y + transform[5];
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} angle Angle.
- * @param {Array.<number>} anchor Rotation anchor point.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.rotate = function(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var cos = Math.cos(angle);
-  var sin = Math.sin(angle);
-  var anchorX = anchor[0];
-  var anchorY = anchor[1];
-  var i = 0;
-  for (var j = offset; j < end; j += stride) {
-    var deltaX = flatCoordinates[j] - anchorX;
-    var deltaY = flatCoordinates[j + 1] - anchorY;
-    dest[i++] = anchorX + deltaX * cos - deltaY * sin;
-    dest[i++] = anchorY + deltaX * sin + deltaY * cos;
-    for (var k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * Scale the coordinates.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} sx Scale factor in the x-direction.
- * @param {number} sy Scale factor in the y-direction.
- * @param {Array.<number>} anchor Scale anchor point.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.scale = function(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var anchorX = anchor[0];
-  var anchorY = anchor[1];
-  var i = 0;
-  for (var j = offset; j < end; j += stride) {
-    var deltaX = flatCoordinates[j] - anchorX;
-    var deltaY = flatCoordinates[j + 1] - anchorY;
-    dest[i++] = anchorX + sx * deltaX;
-    dest[i++] = anchorY + sy * deltaY;
-    for (var k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed coordinates.
- */
-ol.geom.flat.transform.translate = function(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {
-  var dest = opt_dest ? opt_dest : [];
-  var i = 0;
-  var j, k;
-  for (j = offset; j < end; j += stride) {
-    dest[i++] = flatCoordinates[j] + deltaX;
-    dest[i++] = flatCoordinates[j + 1] + deltaY;
-    for (k = j + 2; k < j + stride; ++k) {
-      dest[i++] = flatCoordinates[k];
-    }
-  }
-  if (opt_dest && dest.length != i) {
-    dest.length = i;
-  }
-  return dest;
-};
-
-goog.provide('ol.transform');
-
-goog.require('ol.asserts');
-
-
-/**
- * Collection of affine 2d transformation functions. The functions work on an
- * array of 6 elements. The element order is compatible with the [SVGMatrix
- * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is
- * a subset (elements a to f) of a 3x3 martrix:
- * ```
- * [ a c e ]
- * [ b d f ]
- * [ 0 0 1 ]
- * ```
- */
-
-
-/**
- * @private
- * @type {ol.Transform}
- */
-ol.transform.tmp_ = new Array(6);
-
-
-/**
- * Create an identity transform.
- * @return {!ol.Transform} Identity transform.
- */
-ol.transform.create = function() {
-  return [1, 0, 0, 1, 0, 0];
-};
-
-
-/**
- * Resets the given transform to an identity transform.
- * @param {!ol.Transform} transform Transform.
- * @return {!ol.Transform} Transform.
- */
-ol.transform.reset = function(transform) {
-  return ol.transform.set(transform, 1, 0, 0, 1, 0, 0);
-};
-
-
-/**
- * Multiply the underlying matrices of two transforms and return the result in
- * the first transform.
- * @param {!ol.Transform} transform1 Transform parameters of matrix 1.
- * @param {!ol.Transform} transform2 Transform parameters of matrix 2.
- * @return {!ol.Transform} transform1 multiplied with transform2.
- */
-ol.transform.multiply = function(transform1, transform2) {
-  var a1 = transform1[0];
-  var b1 = transform1[1];
-  var c1 = transform1[2];
-  var d1 = transform1[3];
-  var e1 = transform1[4];
-  var f1 = transform1[5];
-  var a2 = transform2[0];
-  var b2 = transform2[1];
-  var c2 = transform2[2];
-  var d2 = transform2[3];
-  var e2 = transform2[4];
-  var f2 = transform2[5];
-
-  transform1[0] = a1 * a2 + c1 * b2;
-  transform1[1] = b1 * a2 + d1 * b2;
-  transform1[2] = a1 * c2 + c1 * d2;
-  transform1[3] = b1 * c2 + d1 * d2;
-  transform1[4] = a1 * e2 + c1 * f2 + e1;
-  transform1[5] = b1 * e2 + d1 * f2 + f1;
-
-  return transform1;
-};
-
-/**
- * Set the transform components a-f on a given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} a The a component of the transform.
- * @param {number} b The b component of the transform.
- * @param {number} c The c component of the transform.
- * @param {number} d The d component of the transform.
- * @param {number} e The e component of the transform.
- * @param {number} f The f component of the transform.
- * @return {!ol.Transform} Matrix with transform applied.
- */
-ol.transform.set = function(transform, a, b, c, d, e, f) {
-  transform[0] = a;
-  transform[1] = b;
-  transform[2] = c;
-  transform[3] = d;
-  transform[4] = e;
-  transform[5] = f;
-  return transform;
-};
-
-
-/**
- * Set transform on one matrix from another matrix.
- * @param {!ol.Transform} transform1 Matrix to set transform to.
- * @param {!ol.Transform} transform2 Matrix to set transform from.
- * @return {!ol.Transform} transform1 with transform from transform2 applied.
- */
-ol.transform.setFromArray = function(transform1, transform2) {
-  transform1[0] = transform2[0];
-  transform1[1] = transform2[1];
-  transform1[2] = transform2[2];
-  transform1[3] = transform2[3];
-  transform1[4] = transform2[4];
-  transform1[5] = transform2[5];
-  return transform1;
-};
-
-
-/**
- * Transforms the given coordinate with the given transform returning the
- * resulting, transformed coordinate. The coordinate will be modified in-place.
- *
- * @param {ol.Transform} transform The transformation.
- * @param {ol.Coordinate|ol.Pixel} coordinate The coordinate to transform.
- * @return {ol.Coordinate|ol.Pixel} return coordinate so that operations can be
- *     chained together.
- */
-ol.transform.apply = function(transform, coordinate) {
-  var x = coordinate[0], y = coordinate[1];
-  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];
-  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];
-  return coordinate;
-};
-
-
-/**
- * Applies rotation to the given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} angle Angle in radians.
- * @return {!ol.Transform} The rotated transform.
- */
-ol.transform.rotate = function(transform, angle) {
-  var cos = Math.cos(angle);
-  var sin = Math.sin(angle);
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, cos, sin, -sin, cos, 0, 0));
-};
-
-
-/**
- * Applies scale to a given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} x Scale factor x.
- * @param {number} y Scale factor y.
- * @return {!ol.Transform} The scaled transform.
- */
-ol.transform.scale = function(transform, x, y) {
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, x, 0, 0, y, 0, 0));
-};
-
-
-/**
- * Applies translation to the given transform.
- * @param {!ol.Transform} transform Transform.
- * @param {number} dx Translation x.
- * @param {number} dy Translation y.
- * @return {!ol.Transform} The translated transform.
- */
-ol.transform.translate = function(transform, dx, dy) {
-  return ol.transform.multiply(transform,
-      ol.transform.set(ol.transform.tmp_, 1, 0, 0, 1, dx, dy));
-};
-
-
-/**
- * Creates a composite transform given an initial translation, scale, rotation, and
- * final translation (in that order only, not commutative).
- * @param {!ol.Transform} transform The transform (will be modified in place).
- * @param {number} dx1 Initial translation x.
- * @param {number} dy1 Initial translation y.
- * @param {number} sx Scale factor x.
- * @param {number} sy Scale factor y.
- * @param {number} angle Rotation (in counter-clockwise radians).
- * @param {number} dx2 Final translation x.
- * @param {number} dy2 Final translation y.
- * @return {!ol.Transform} The composite transform.
- */
-ol.transform.compose = function(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {
-  var sin = Math.sin(angle);
-  var cos = Math.cos(angle);
-  transform[0] = sx * cos;
-  transform[1] = sy * sin;
-  transform[2] = -sx * sin;
-  transform[3] = sy * cos;
-  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;
-  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;
-  return transform;
-};
-
-
-/**
- * Invert the given transform.
- * @param {!ol.Transform} transform Transform.
- * @return {!ol.Transform} Inverse of the transform.
- */
-ol.transform.invert = function(transform) {
-  var det = ol.transform.determinant(transform);
-  ol.asserts.assert(det !== 0, 32); // Transformation matrix cannot be inverted
-
-  var a = transform[0];
-  var b = transform[1];
-  var c = transform[2];
-  var d = transform[3];
-  var e = transform[4];
-  var f = transform[5];
-
-  transform[0] = d / det;
-  transform[1] = -b / det;
-  transform[2] = -c / det;
-  transform[3] = a / det;
-  transform[4] = (c * f - d * e) / det;
-  transform[5] = -(a * f - b * e) / det;
-
-  return transform;
-};
-
-
-/**
- * Returns the determinant of the given matrix.
- * @param {!ol.Transform} mat Matrix.
- * @return {number} Determinant.
- */
-ol.transform.determinant = function(mat) {
-  return mat[0] * mat[3] - mat[1] * mat[2];
-};
-
-goog.provide('ol.geom.Geometry');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for vector geometries.
- *
- * To get notified of changes to the geometry, register a listener for the
- * generic `change` event on your geometry instance.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @api
- */
-ol.geom.Geometry = function() {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.extentRevision_ = -1;
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.geom.Geometry>}
-   */
-  this.simplifiedGeometryCache = {};
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.simplifiedGeometryRevision = 0;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpTransform_ = ol.transform.create();
-
-};
-ol.inherits(ol.geom.Geometry, ol.Object);
-
-
-/**
- * Make a complete copy of the geometry.
- * @abstract
- * @return {!ol.geom.Geometry} Clone.
- */
-ol.geom.Geometry.prototype.clone = function() {};
-
-
-/**
- * @abstract
- * @param {number} x X.
- * @param {number} y Y.
- * @param {ol.Coordinate} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @return {number} Minimum squared distance.
- */
-ol.geom.Geometry.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {};
-
-
-/**
- * Return the closest point of the geometry to the passed point as
- * {@link ol.Coordinate coordinate}.
- * @param {ol.Coordinate} point Point.
- * @param {ol.Coordinate=} opt_closestPoint Closest point.
- * @return {ol.Coordinate} Closest point.
- * @api
- */
-ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) {
-  var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];
-  this.closestPointXY(point[0], point[1], closestPoint, Infinity);
-  return closestPoint;
-};
-
-
-/**
- * Returns true if this geometry includes the specified coordinate. If the
- * coordinate is on the boundary of the geometry, returns false.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {boolean} Contains coordinate.
- * @api
- */
-ol.geom.Geometry.prototype.intersectsCoordinate = function(coordinate) {
-  return this.containsXY(coordinate[0], coordinate[1]);
-};
-
-
-/**
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @protected
- * @return {ol.Extent} extent Extent.
- */
-ol.geom.Geometry.prototype.computeExtent = function(extent) {};
-
-
-/**
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.Geometry.prototype.containsXY = ol.functions.FALSE;
-
-
-/**
- * Get the extent of the geometry.
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} extent Extent.
- * @api
- */
-ol.geom.Geometry.prototype.getExtent = function(opt_extent) {
-  if (this.extentRevision_ != this.getRevision()) {
-    this.extent_ = this.computeExtent(this.extent_);
-    this.extentRevision_ = this.getRevision();
-  }
-  return ol.extent.returnOrUpdate(this.extent_, opt_extent);
-};
-
-
-/**
- * Rotate the geometry around a given coordinate. This modifies the geometry
- * coordinates in place.
- * @abstract
- * @param {number} angle Rotation angle in radians.
- * @param {ol.Coordinate} anchor The rotation center.
- * @api
- */
-ol.geom.Geometry.prototype.rotate = function(angle, anchor) {};
-
-
-/**
- * Scale the geometry (with an optional origin).  This modifies the geometry
- * coordinates in place.
- * @abstract
- * @param {number} sx The scaling factor in the x-direction.
- * @param {number=} opt_sy The scaling factor in the y-direction (defaults to
- *     sx).
- * @param {ol.Coordinate=} opt_anchor The scale origin (defaults to the center
- *     of the geometry extent).
- * @api
- */
-ol.geom.Geometry.prototype.scale = function(sx, opt_sy, opt_anchor) {};
-
-
-/**
- * Create a simplified version of this geometry.  For linestrings, this uses
- * the the {@link
- * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
- * Douglas Peucker} algorithm.  For polygons, a quantization-based
- * simplification is used to preserve topology.
- * @function
- * @param {number} tolerance The tolerance distance for simplification.
- * @return {ol.geom.Geometry} A new, simplified version of the original
- *     geometry.
- * @api
- */
-ol.geom.Geometry.prototype.simplify = function(tolerance) {
-  return this.getSimplifiedGeometry(tolerance * tolerance);
-};
-
-
-/**
- * Create a simplified version of this geometry using the Douglas Peucker
- * algorithm.
- * @see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
- * @abstract
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.Geometry} Simplified geometry.
- */
-ol.geom.Geometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {};
-
-
-/**
- * Get the type of this geometry.
- * @abstract
- * @return {ol.geom.GeometryType} Geometry type.
- */
-ol.geom.Geometry.prototype.getType = function() {};
-
-
-/**
- * Apply a transform function to each coordinate of the geometry.
- * The geometry is modified in place.
- * If you do not want the geometry modified in place, first `clone()` it and
- * then use this function on the clone.
- * @abstract
- * @param {ol.TransformFunction} transformFn Transform.
- */
-ol.geom.Geometry.prototype.applyTransform = function(transformFn) {};
-
-
-/**
- * Test if the geometry and the passed extent intersect.
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @return {boolean} `true` if the geometry and the extent intersect.
- */
-ol.geom.Geometry.prototype.intersectsExtent = function(extent) {};
-
-
-/**
- * Translate the geometry.  This modifies the geometry coordinates in place.  If
- * instead you want a new geometry, first `clone()` this geometry.
- * @abstract
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- */
-ol.geom.Geometry.prototype.translate = function(deltaX, deltaY) {};
-
-
-/**
- * Transform each coordinate of the geometry from one coordinate reference
- * system to another. The geometry is modified in place.
- * For example, a line will be transformed to a line and a circle to a circle.
- * If you do not want the geometry modified in place, first `clone()` it and
- * then use this function on the clone.
- *
- * @param {ol.ProjectionLike} source The current projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @param {ol.ProjectionLike} destination The desired projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @return {ol.geom.Geometry} This geometry.  Note that original geometry is
- *     modified in place.
- * @api
- */
-ol.geom.Geometry.prototype.transform = function(source, destination) {
-  var tmpTransform = this.tmpTransform_;
-  source = ol.proj.get(source);
-  var transformFn = source.getUnits() == ol.proj.Units.TILE_PIXELS ?
-    function(inCoordinates, outCoordinates, stride) {
-      var pixelExtent = source.getExtent();
-      var projectedExtent = source.getWorldExtent();
-      var scale = ol.extent.getHeight(projectedExtent) / ol.extent.getHeight(pixelExtent);
-      ol.transform.compose(tmpTransform,
-          projectedExtent[0], projectedExtent[3],
-          scale, -scale, 0,
-          0, 0);
-      ol.geom.flat.transform.transform2D(inCoordinates, 0, inCoordinates.length, stride,
-          tmpTransform, outCoordinates);
-      return ol.proj.getTransform(source, destination)(inCoordinates, outCoordinates, stride);
-    } :
-    ol.proj.getTransform(source, destination);
-  this.applyTransform(transformFn);
-  return this;
-};
-
-goog.provide('ol.geom.SimpleGeometry');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.extent');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; only used for creating subclasses; do not instantiate
- * in apps, as cannot be rendered.
- *
- * @constructor
- * @abstract
- * @extends {ol.geom.Geometry}
- * @api
- */
-ol.geom.SimpleGeometry = function() {
-
-  ol.geom.Geometry.call(this);
-
-  /**
-   * @protected
-   * @type {ol.geom.GeometryLayout}
-   */
-  this.layout = ol.geom.GeometryLayout.XY;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.stride = 2;
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.flatCoordinates = null;
-
-};
-ol.inherits(ol.geom.SimpleGeometry, ol.geom.Geometry);
-
-
-/**
- * @param {number} stride Stride.
- * @private
- * @return {ol.geom.GeometryLayout} layout Layout.
- */
-ol.geom.SimpleGeometry.getLayoutForStride_ = function(stride) {
-  var layout;
-  if (stride == 2) {
-    layout = ol.geom.GeometryLayout.XY;
-  } else if (stride == 3) {
-    layout = ol.geom.GeometryLayout.XYZ;
-  } else if (stride == 4) {
-    layout = ol.geom.GeometryLayout.XYZM;
-  }
-  return /** @type {ol.geom.GeometryLayout} */ (layout);
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @return {number} Stride.
- */
-ol.geom.SimpleGeometry.getStrideForLayout = function(layout) {
-  var stride;
-  if (layout == ol.geom.GeometryLayout.XY) {
-    stride = 2;
-  } else if (layout == ol.geom.GeometryLayout.XYZ || layout == ol.geom.GeometryLayout.XYM) {
-    stride = 3;
-  } else if (layout == ol.geom.GeometryLayout.XYZM) {
-    stride = 4;
-  }
-  return /** @type {number} */ (stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.containsXY = ol.functions.FALSE;
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.computeExtent = function(extent) {
-  return ol.extent.createOrUpdateFromFlatCoordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      extent);
-};
-
-
-/**
- * @abstract
- * @return {Array} Coordinates.
- */
-ol.geom.SimpleGeometry.prototype.getCoordinates = function() {};
-
-
-/**
- * Return the first coordinate of the geometry.
- * @return {ol.Coordinate} First coordinate.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() {
-  return this.flatCoordinates.slice(0, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.SimpleGeometry.prototype.getFlatCoordinates = function() {
-  return this.flatCoordinates;
-};
-
-
-/**
- * Return the last coordinate of the geometry.
- * @return {ol.Coordinate} Last point.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() {
-  return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);
-};
-
-
-/**
- * Return the {@link ol.geom.GeometryLayout layout} of the geometry.
- * @return {ol.geom.GeometryLayout} Layout.
- * @api
- */
-ol.geom.SimpleGeometry.prototype.getLayout = function() {
-  return this.layout;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) {
-  if (this.simplifiedGeometryRevision != this.getRevision()) {
-    ol.obj.clear(this.simplifiedGeometryCache);
-    this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-    this.simplifiedGeometryRevision = this.getRevision();
-  }
-  // If squaredTolerance is negative or if we know that simplification will not
-  // have any effect then just return this.
-  if (squaredTolerance < 0 ||
-      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
-       squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {
-    return this;
-  }
-  var key = squaredTolerance.toString();
-  if (this.simplifiedGeometryCache.hasOwnProperty(key)) {
-    return this.simplifiedGeometryCache[key];
-  } else {
-    var simplifiedGeometry =
-        this.getSimplifiedGeometryInternal(squaredTolerance);
-    var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();
-    if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {
-      this.simplifiedGeometryCache[key] = simplifiedGeometry;
-      return simplifiedGeometry;
-    } else {
-      // Simplification did not actually remove any coordinates.  We now know
-      // that any calls to getSimplifiedGeometry with a squaredTolerance less
-      // than or equal to the current squaredTolerance will also not have any
-      // effect.  This allows us to short circuit simplification (saving CPU
-      // cycles) and prevents the cache of simplified geometries from filling
-      // up with useless identical copies of this geometry (saving memory).
-      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
-      return this;
-    }
-  }
-};
-
-
-/**
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.SimpleGeometry} Simplified geometry.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  return this;
-};
-
-
-/**
- * @return {number} Stride.
- */
-ol.geom.SimpleGeometry.prototype.getStride = function() {
-  return this.stride;
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.setFlatCoordinatesInternal = function(layout, flatCoordinates) {
-  this.stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
-  this.layout = layout;
-  this.flatCoordinates = flatCoordinates;
-};
-
-
-/**
- * @abstract
- * @param {Array} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- */
-ol.geom.SimpleGeometry.prototype.setCoordinates = function(coordinates, opt_layout) {};
-
-
-/**
- * @param {ol.geom.GeometryLayout|undefined} layout Layout.
- * @param {Array} coordinates Coordinates.
- * @param {number} nesting Nesting.
- * @protected
- */
-ol.geom.SimpleGeometry.prototype.setLayout = function(layout, coordinates, nesting) {
-  /** @type {number} */
-  var stride;
-  if (layout) {
-    stride = ol.geom.SimpleGeometry.getStrideForLayout(layout);
-  } else {
-    var i;
-    for (i = 0; i < nesting; ++i) {
-      if (coordinates.length === 0) {
-        this.layout = ol.geom.GeometryLayout.XY;
-        this.stride = 2;
-        return;
-      } else {
-        coordinates = /** @type {Array} */ (coordinates[0]);
-      }
-    }
-    stride = coordinates.length;
-    layout = ol.geom.SimpleGeometry.getLayoutForStride_(stride);
-  }
-  this.layout = layout;
-  this.stride = stride;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.applyTransform = function(transformFn) {
-  if (this.flatCoordinates) {
-    transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.rotate = function(angle, anchor) {
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.rotate(
-        flatCoordinates, 0, flatCoordinates.length,
-        stride, angle, anchor, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.scale = function(sx, opt_sy, opt_anchor) {
-  var sy = opt_sy;
-  if (sy === undefined) {
-    sy = sx;
-  }
-  var anchor = opt_anchor;
-  if (!anchor) {
-    anchor = ol.extent.getCenter(this.getExtent());
-  }
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.scale(
-        flatCoordinates, 0, flatCoordinates.length,
-        stride, sx, sy, anchor, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.SimpleGeometry.prototype.translate = function(deltaX, deltaY) {
-  var flatCoordinates = this.getFlatCoordinates();
-  if (flatCoordinates) {
-    var stride = this.getStride();
-    ol.geom.flat.transform.translate(
-        flatCoordinates, 0, flatCoordinates.length, stride,
-        deltaX, deltaY, flatCoordinates);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} simpleGeometry Simple geometry.
- * @param {ol.Transform} transform Transform.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Transformed flat coordinates.
- */
-ol.geom.SimpleGeometry.transform2D = function(simpleGeometry, transform, opt_dest) {
-  var flatCoordinates = simpleGeometry.getFlatCoordinates();
-  if (!flatCoordinates) {
-    return null;
-  } else {
-    var stride = simpleGeometry.getStride();
-    return ol.geom.flat.transform.transform2D(
-        flatCoordinates, 0, flatCoordinates.length, stride,
-        transform, opt_dest);
-  }
-};
-
-goog.provide('ol.geom.flat.area');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRing = function(flatCoordinates, offset, end, stride) {
-  var twiceArea = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    twiceArea += y1 * x2 - x1 * y2;
-    x1 = x2;
-    y1 = y2;
-  }
-  return twiceArea / 2;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRings = function(flatCoordinates, offset, ends, stride) {
-  var area = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    area += ol.geom.flat.area.linearRing(flatCoordinates, offset, end, stride);
-    offset = end;
-  }
-  return area;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @return {number} Area.
- */
-ol.geom.flat.area.linearRingss = function(flatCoordinates, offset, endss, stride) {
-  var area = 0;
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    area +=
-        ol.geom.flat.area.linearRings(flatCoordinates, offset, ends, stride);
-    offset = ends[ends.length - 1];
-  }
-  return area;
-};
-
-goog.provide('ol.geom.flat.closest');
-
-goog.require('ol.math');
-
-
-/**
- * Returns the point on the 2D line segment flatCoordinates[offset1] to
- * flatCoordinates[offset2] that is closest to the point (x, y).  Extra
- * dimensions are linearly interpolated.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset1 Offset 1.
- * @param {number} offset2 Offset 2.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- */
-ol.geom.flat.closest.point = function(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
-  var x1 = flatCoordinates[offset1];
-  var y1 = flatCoordinates[offset1 + 1];
-  var dx = flatCoordinates[offset2] - x1;
-  var dy = flatCoordinates[offset2 + 1] - y1;
-  var i, offset;
-  if (dx === 0 && dy === 0) {
-    offset = offset1;
-  } else {
-    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
-    if (t > 1) {
-      offset = offset2;
-    } else if (t > 0) {
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = ol.math.lerp(flatCoordinates[offset1 + i],
-            flatCoordinates[offset2 + i], t);
-      }
-      closestPoint.length = stride;
-      return;
-    } else {
-      offset = offset1;
-    }
-  }
-  for (i = 0; i < stride; ++i) {
-    closestPoint[i] = flatCoordinates[offset + i];
-  }
-  closestPoint.length = stride;
-};
-
-
-/**
- * Return the squared of the largest distance between any pair of consecutive
- * coordinates.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getMaxSquaredDelta = function(flatCoordinates, offset, end, stride, maxSquaredDelta) {
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  for (offset += stride; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    var squaredDelta = ol.math.squaredDistance(x1, y1, x2, y2);
-    if (squaredDelta > maxSquaredDelta) {
-      maxSquaredDelta = squaredDelta;
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getsMaxSquaredDelta = function(flatCoordinates, offset, ends, stride, maxSquaredDelta) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    maxSquaredDelta = ol.geom.flat.closest.getMaxSquaredDelta(
-        flatCoordinates, offset, end, stride, maxSquaredDelta);
-    offset = end;
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} maxSquaredDelta Max squared delta.
- * @return {number} Max squared delta.
- */
-ol.geom.flat.closest.getssMaxSquaredDelta = function(flatCoordinates, offset, endss, stride, maxSquaredDelta) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    maxSquaredDelta = ol.geom.flat.closest.getsMaxSquaredDelta(
-        flatCoordinates, offset, ends, stride, maxSquaredDelta);
-    offset = ends[ends.length - 1];
-  }
-  return maxSquaredDelta;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getClosestPoint = function(flatCoordinates, offset, end,
-    stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  if (offset == end) {
-    return minSquaredDistance;
-  }
-  var i, squaredDistance;
-  if (maxDelta === 0) {
-    // All points are identical, so just test the first point.
-    squaredDistance = ol.math.squaredDistance(
-        x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);
-    if (squaredDistance < minSquaredDistance) {
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = flatCoordinates[offset + i];
-      }
-      closestPoint.length = stride;
-      return squaredDistance;
-    } else {
-      return minSquaredDistance;
-    }
-  }
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var index = offset + stride;
-  while (index < end) {
-    ol.geom.flat.closest.point(
-        flatCoordinates, index - stride, index, stride, x, y, tmpPoint);
-    squaredDistance = ol.math.squaredDistance(x, y, tmpPoint[0], tmpPoint[1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = tmpPoint[i];
-      }
-      closestPoint.length = stride;
-      index += stride;
-    } else {
-      // Skip ahead multiple points, because we know that all the skipped
-      // points cannot be any closer than the closest point we have found so
-      // far.  We know this because we know how close the current point is, how
-      // close the closest point we have found so far is, and the maximum
-      // distance between consecutive points.  For example, if we're currently
-      // at distance 10, the best we've found so far is 3, and that the maximum
-      // distance between consecutive points is 2, then we'll need to skip at
-      // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of
-      // finding a closer point.  We use Math.max(..., 1) to ensure that we
-      // always advance at least one point, to avoid an infinite loop.
-      index += stride * Math.max(
-          ((Math.sqrt(squaredDistance) -
-            Math.sqrt(minSquaredDistance)) / maxDelta) | 0, 1);
-    }
-  }
-  if (isRing) {
-    // Check the closing segment.
-    ol.geom.flat.closest.point(
-        flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);
-    squaredDistance = ol.math.squaredDistance(x, y, tmpPoint[0], tmpPoint[1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (i = 0; i < stride; ++i) {
-        closestPoint[i] = tmpPoint[i];
-      }
-      closestPoint.length = stride;
-    }
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getsClosestPoint = function(flatCoordinates, offset, ends,
-    stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    minSquaredDistance = ol.geom.flat.closest.getClosestPoint(
-        flatCoordinates, offset, end, stride,
-        maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
-    offset = end;
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} maxDelta Max delta.
- * @param {boolean} isRing Is ring.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {Array.<number>} closestPoint Closest point.
- * @param {number} minSquaredDistance Minimum squared distance.
- * @param {Array.<number>=} opt_tmpPoint Temporary point object.
- * @return {number} Minimum squared distance.
- */
-ol.geom.flat.closest.getssClosestPoint = function(flatCoordinates, offset,
-    endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,
-    opt_tmpPoint) {
-  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    minSquaredDistance = ol.geom.flat.closest.getsClosestPoint(
-        flatCoordinates, offset, ends, stride,
-        maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
-    offset = ends[ends.length - 1];
-  }
-  return minSquaredDistance;
-};
-
-goog.provide('ol.geom.flat.deflate');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} stride Stride.
- * @return {number} offset Offset.
- */
-ol.geom.flat.deflate.coordinate = function(flatCoordinates, offset, coordinate, stride) {
-  var i, ii;
-  for (i = 0, ii = coordinate.length; i < ii; ++i) {
-    flatCoordinates[offset++] = coordinate[i];
-  }
-  return offset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {number} stride Stride.
- * @return {number} offset Offset.
- */
-ol.geom.flat.deflate.coordinates = function(flatCoordinates, offset, coordinates, stride) {
-  var i, ii;
-  for (i = 0, ii = coordinates.length; i < ii; ++i) {
-    var coordinate = coordinates[i];
-    var j;
-    for (j = 0; j < stride; ++j) {
-      flatCoordinates[offset++] = coordinate[j];
-    }
-  }
-  return offset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<ol.Coordinate>>} coordinatess Coordinatess.
- * @param {number} stride Stride.
- * @param {Array.<number>=} opt_ends Ends.
- * @return {Array.<number>} Ends.
- */
-ol.geom.flat.deflate.coordinatess = function(flatCoordinates, offset, coordinatess, stride, opt_ends) {
-  var ends = opt_ends ? opt_ends : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = coordinatess.length; j < jj; ++j) {
-    var end = ol.geom.flat.deflate.coordinates(
-        flatCoordinates, offset, coordinatess[j], stride);
-    ends[i++] = end;
-    offset = end;
-  }
-  ends.length = i;
-  return ends;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinatesss Coordinatesss.
- * @param {number} stride Stride.
- * @param {Array.<Array.<number>>=} opt_endss Endss.
- * @return {Array.<Array.<number>>} Endss.
- */
-ol.geom.flat.deflate.coordinatesss = function(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
-  var endss = opt_endss ? opt_endss : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = coordinatesss.length; j < jj; ++j) {
-    var ends = ol.geom.flat.deflate.coordinatess(
-        flatCoordinates, offset, coordinatesss[j], stride, endss[i]);
-    endss[i++] = ends;
-    offset = ends[ends.length - 1];
-  }
-  endss.length = i;
-  return endss;
-};
-
-goog.provide('ol.geom.flat.inflate');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {Array.<ol.Coordinate>=} opt_coordinates Coordinates.
- * @return {Array.<ol.Coordinate>} Coordinates.
- */
-ol.geom.flat.inflate.coordinates = function(flatCoordinates, offset, end, stride, opt_coordinates) {
-  var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
-  var i = 0;
-  var j;
-  for (j = offset; j < end; j += stride) {
-    coordinates[i++] = flatCoordinates.slice(j, j + stride);
-  }
-  coordinates.length = i;
-  return coordinates;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {Array.<Array.<ol.Coordinate>>=} opt_coordinatess Coordinatess.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinatess.
- */
-ol.geom.flat.inflate.coordinatess = function(flatCoordinates, offset, ends, stride, opt_coordinatess) {
-  var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = ends.length; j < jj; ++j) {
-    var end = ends[j];
-    coordinatess[i++] = ol.geom.flat.inflate.coordinates(
-        flatCoordinates, offset, end, stride, coordinatess[i]);
-    offset = end;
-  }
-  coordinatess.length = i;
-  return coordinatess;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>=} opt_coordinatesss
- *     Coordinatesss.
- * @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinatesss.
- */
-ol.geom.flat.inflate.coordinatesss = function(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
-  var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
-  var i = 0;
-  var j, jj;
-  for (j = 0, jj = endss.length; j < jj; ++j) {
-    var ends = endss[j];
-    coordinatesss[i++] = ol.geom.flat.inflate.coordinatess(
-        flatCoordinates, offset, ends, stride, coordinatesss[i]);
-    offset = ends[ends.length - 1];
-  }
-  coordinatesss.length = i;
-  return coordinatesss;
-};
-
-// Based on simplify-js https://github.com/mourner/simplify-js
-// Copyright (c) 2012, Vladimir Agafonkin
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-//    1. Redistributions of source code must retain the above copyright notice,
-//       this list of conditions and the following disclaimer.
-//
-//    2. Redistributions in binary form must reproduce the above copyright
-//       notice, this list of conditions and the following disclaimer in the
-//       documentation and/or other materials provided with the distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-
-goog.provide('ol.geom.flat.simplify');
-
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {boolean} highQuality Highest quality.
- * @param {Array.<number>=} opt_simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @return {Array.<number>} Simplified line string.
- */
-ol.geom.flat.simplify.lineString = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {
-  var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?
-    opt_simplifiedFlatCoordinates : [];
-  if (!highQuality) {
-    end = ol.geom.flat.simplify.radialDistance(flatCoordinates, offset, end,
-        stride, squaredTolerance,
-        simplifiedFlatCoordinates, 0);
-    flatCoordinates = simplifiedFlatCoordinates;
-    offset = 0;
-    stride = 2;
-  }
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      flatCoordinates, offset, end, stride, squaredTolerance,
-      simplifiedFlatCoordinates, 0);
-  return simplifiedFlatCoordinates;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeucker = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  var n = (end - offset) / stride;
-  if (n < 3) {
-    for (; offset < end; offset += stride) {
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + 1];
-    }
-    return simplifiedOffset;
-  }
-  /** @type {Array.<number>} */
-  var markers = new Array(n);
-  markers[0] = 1;
-  markers[n - 1] = 1;
-  /** @type {Array.<number>} */
-  var stack = [offset, end - stride];
-  var index = 0;
-  var i;
-  while (stack.length > 0) {
-    var last = stack.pop();
-    var first = stack.pop();
-    var maxSquaredDistance = 0;
-    var x1 = flatCoordinates[first];
-    var y1 = flatCoordinates[first + 1];
-    var x2 = flatCoordinates[last];
-    var y2 = flatCoordinates[last + 1];
-    for (i = first + stride; i < last; i += stride) {
-      var x = flatCoordinates[i];
-      var y = flatCoordinates[i + 1];
-      var squaredDistance = ol.math.squaredSegmentDistance(
-          x, y, x1, y1, x2, y2);
-      if (squaredDistance > maxSquaredDistance) {
-        index = i;
-        maxSquaredDistance = squaredDistance;
-      }
-    }
-    if (maxSquaredDistance > squaredTolerance) {
-      markers[(index - offset) / stride] = 1;
-      if (first + stride < index) {
-        stack.push(first, index);
-      }
-      if (index + stride < last) {
-        stack.push(index, last);
-      }
-    }
-  }
-  for (i = 0; i < n; ++i) {
-    if (markers[i]) {
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + i * stride];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + i * stride + 1];
-    }
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<number>} simplifiedEnds Simplified ends.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeuckers = function(flatCoordinates, offset,
-    ends, stride, squaredTolerance, simplifiedFlatCoordinates,
-    simplifiedOffset, simplifiedEnds) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    simplifiedOffset = ol.geom.flat.simplify.douglasPeucker(
-        flatCoordinates, offset, end, stride, squaredTolerance,
-        simplifiedFlatCoordinates, simplifiedOffset);
-    simplifiedEnds.push(simplifiedOffset);
-    offset = end;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<Array.<number>>} simplifiedEndss Simplified endss.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.douglasPeuckerss = function(
-    flatCoordinates, offset, endss, stride, squaredTolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    var simplifiedEnds = [];
-    simplifiedOffset = ol.geom.flat.simplify.douglasPeuckers(
-        flatCoordinates, offset, ends, stride, squaredTolerance,
-        simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);
-    simplifiedEndss.push(simplifiedEnds);
-    offset = ends[ends.length - 1];
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.radialDistance = function(flatCoordinates, offset, end,
-    stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  if (end <= offset + stride) {
-    // zero or one point, no simplification possible, so copy and return
-    for (; offset < end; offset += stride) {
-      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];
-      simplifiedFlatCoordinates[simplifiedOffset++] =
-          flatCoordinates[offset + 1];
-    }
-    return simplifiedOffset;
-  }
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  // copy first point
-  simplifiedFlatCoordinates[simplifiedOffset++] = x1;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y1;
-  var x2 = x1;
-  var y2 = y1;
-  for (offset += stride; offset < end; offset += stride) {
-    x2 = flatCoordinates[offset];
-    y2 = flatCoordinates[offset + 1];
-    if (ol.math.squaredDistance(x1, y1, x2, y2) > squaredTolerance) {
-      // copy point at offset
-      simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-      simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-      x1 = x2;
-      y1 = y2;
-    }
-  }
-  if (x2 != x1 || y2 != y1) {
-    // copy last point
-    simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-    simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {number} value Value.
- * @param {number} tolerance Tolerance.
- * @return {number} Rounded value.
- */
-ol.geom.flat.simplify.snap = function(value, tolerance) {
-  return tolerance * Math.round(value / tolerance);
-};
-
-
-/**
- * Simplifies a line string using an algorithm designed by Tim Schaub.
- * Coordinates are snapped to the nearest value in a virtual grid and
- * consecutive duplicate coordinates are discarded.  This effectively preserves
- * topology as the simplification of any subsection of a line string is
- * independent of the rest of the line string.  This means that, for examples,
- * the common edge between two polygons will be simplified to the same line
- * string independently in both polygons.  This implementation uses a single
- * pass over the coordinates and eliminates intermediate collinear points.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantize = function(flatCoordinates, offset, end, stride,
-    tolerance, simplifiedFlatCoordinates, simplifiedOffset) {
-  // do nothing if the line is empty
-  if (offset == end) {
-    return simplifiedOffset;
-  }
-  // snap the first coordinate (P1)
-  var x1 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-  var y1 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-  offset += stride;
-  // add the first coordinate to the output
-  simplifiedFlatCoordinates[simplifiedOffset++] = x1;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y1;
-  // find the next coordinate that does not snap to the same value as the first
-  // coordinate (P2)
-  var x2, y2;
-  do {
-    x2 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-    y2 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-    offset += stride;
-    if (offset == end) {
-      // all coordinates snap to the same value, the line collapses to a point
-      // push the last snapped value anyway to ensure that the output contains
-      // at least two points
-      // FIXME should we really return at least two points anyway?
-      simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-      simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-      return simplifiedOffset;
-    }
-  } while (x2 == x1 && y2 == y1);
-  while (offset < end) {
-    var x3, y3;
-    // snap the next coordinate (P3)
-    x3 = ol.geom.flat.simplify.snap(flatCoordinates[offset], tolerance);
-    y3 = ol.geom.flat.simplify.snap(flatCoordinates[offset + 1], tolerance);
-    offset += stride;
-    // skip P3 if it is equal to P2
-    if (x3 == x2 && y3 == y2) {
-      continue;
-    }
-    // calculate the delta between P1 and P2
-    var dx1 = x2 - x1;
-    var dy1 = y2 - y1;
-    // calculate the delta between P3 and P1
-    var dx2 = x3 - x1;
-    var dy2 = y3 - y1;
-    // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from
-    // P1 in the same direction then P2 is on the straight line between P1 and
-    // P3
-    if ((dx1 * dy2 == dy1 * dx2) &&
-        ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&
-        ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {
-      // discard P2 and set P2 = P3
-      x2 = x3;
-      y2 = y3;
-      continue;
-    }
-    // either P1, P2, and P3 are not colinear, or they are colinear but P3 is
-    // between P3 and P1 or on the opposite half of the line to P2.  add P2,
-    // and continue with P1 = P2 and P2 = P3
-    simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-    simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-    x1 = x2;
-    y1 = y2;
-    x2 = x3;
-    y2 = y3;
-  }
-  // add the last point (P2)
-  simplifiedFlatCoordinates[simplifiedOffset++] = x2;
-  simplifiedFlatCoordinates[simplifiedOffset++] = y2;
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<number>} simplifiedEnds Simplified ends.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantizes = function(
-    flatCoordinates, offset, ends, stride,
-    tolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    simplifiedOffset = ol.geom.flat.simplify.quantize(
-        flatCoordinates, offset, end, stride,
-        tolerance,
-        simplifiedFlatCoordinates, simplifiedOffset);
-    simplifiedEnds.push(simplifiedOffset);
-    offset = end;
-  }
-  return simplifiedOffset;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} tolerance Tolerance.
- * @param {Array.<number>} simplifiedFlatCoordinates Simplified flat
- *     coordinates.
- * @param {number} simplifiedOffset Simplified offset.
- * @param {Array.<Array.<number>>} simplifiedEndss Simplified endss.
- * @return {number} Simplified offset.
- */
-ol.geom.flat.simplify.quantizess = function(
-    flatCoordinates, offset, endss, stride,
-    tolerance,
-    simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    var simplifiedEnds = [];
-    simplifiedOffset = ol.geom.flat.simplify.quantizes(
-        flatCoordinates, offset, ends, stride,
-        tolerance,
-        simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);
-    simplifiedEndss.push(simplifiedEnds);
-    offset = ends[ends.length - 1];
-  }
-  return simplifiedOffset;
-};
-
-goog.provide('ol.geom.LinearRing');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Linear ring geometry. Only used as part of polygon; cannot be rendered
- * on its own.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.LinearRing = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.LinearRing} Clone.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.clone = function() {
-  var linearRing = new ol.geom.LinearRing(null);
-  linearRing.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return linearRing;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getMaxSquaredDelta(
-        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getClosestPoint(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Return the area of the linear ring on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.LinearRing.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRing(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the coordinates of the linear ring.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      squaredTolerance, simplifiedFlatCoordinates, 0);
-  var simplifiedLinearRing = new ol.geom.LinearRing(null);
-  simplifiedLinearRing.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates);
-  return simplifiedLinearRing;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LinearRing.prototype.getType = function() {
-  return ol.geom.GeometryType.LINEAR_RING;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LinearRing.prototype.intersectsExtent = function(extent) {};
-
-
-/**
- * Set the coordinates of the linear ring.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.LinearRing.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.Point');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Point geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {ol.Coordinate} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Point = function(coordinates, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  this.setCoordinates(coordinates, opt_layout);
-};
-ol.inherits(ol.geom.Point, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Point} Clone.
- * @override
- * @api
- */
-ol.geom.Point.prototype.clone = function() {
-  var point = new ol.geom.Point(null);
-  point.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return point;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Point.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  var flatCoordinates = this.flatCoordinates;
-  var squaredDistance = ol.math.squaredDistance(
-      x, y, flatCoordinates[0], flatCoordinates[1]);
-  if (squaredDistance < minSquaredDistance) {
-    var stride = this.stride;
-    var i;
-    for (i = 0; i < stride; ++i) {
-      closestPoint[i] = flatCoordinates[i];
-    }
-    closestPoint.length = stride;
-    return squaredDistance;
-  } else {
-    return minSquaredDistance;
-  }
-};
-
-
-/**
- * Return the coordinate of the point.
- * @return {ol.Coordinate} Coordinates.
- * @override
- * @api
- */
-ol.geom.Point.prototype.getCoordinates = function() {
-  return !this.flatCoordinates ? [] : this.flatCoordinates.slice();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Point.prototype.computeExtent = function(extent) {
-  return ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates, extent);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.getType = function() {
-  return ol.geom.GeometryType.POINT;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.intersectsExtent = function(extent) {
-  return ol.extent.containsXY(extent,
-      this.flatCoordinates[0], this.flatCoordinates[1]);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 0);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinate(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.Point.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.flat.contains');
-
-goog.require('ol.extent');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} Contains extent.
- */
-ol.geom.flat.contains.linearRingContainsExtent = function(flatCoordinates, offset, end, stride, extent) {
-  var outside = ol.extent.forEachCorner(extent,
-      /**
-       * @param {ol.Coordinate} coordinate Coordinate.
-       * @return {boolean} Contains (x, y).
-       */
-      function(coordinate) {
-        return !ol.geom.flat.contains.linearRingContainsXY(flatCoordinates,
-            offset, end, stride, coordinate[0], coordinate[1]);
-      });
-  return !outside;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingContainsXY = function(flatCoordinates, offset, end, stride, x, y) {
-  // http://geomalgorithms.com/a03-_inclusion.html
-  // Copyright 2000 softSurfer, 2012 Dan Sunday
-  // This code may be freely used and modified for any purpose
-  // providing that this copyright notice is included with it.
-  // SoftSurfer makes no warranty for this code, and cannot be held
-  // liable for any real or imagined damage resulting from its use.
-  // Users of this code must verify correctness for their application.
-  var wn = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    if (y1 <= y) {
-      if (y2 > y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) > 0) {
-        wn++;
-      }
-    } else if (y2 <= y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) < 0) {
-      wn--;
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  return wn !== 0;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingsContainsXY = function(flatCoordinates, offset, ends, stride, x, y) {
-  if (ends.length === 0) {
-    return false;
-  }
-  if (!ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, ends[0], stride, x, y)) {
-    return false;
-  }
-  var i, ii;
-  for (i = 1, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.contains.linearRingContainsXY(
-        flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {number} x X.
- * @param {number} y Y.
- * @return {boolean} Contains (x, y).
- */
-ol.geom.flat.contains.linearRingssContainsXY = function(flatCoordinates, offset, endss, stride, x, y) {
-  if (endss.length === 0) {
-    return false;
-  }
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    if (ol.geom.flat.contains.linearRingsContainsXY(
-        flatCoordinates, offset, ends, stride, x, y)) {
-      return true;
-    }
-    offset = ends[ends.length - 1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.interiorpoint');
-
-goog.require('ol.array');
-goog.require('ol.geom.flat.contains');
-
-
-/**
- * Calculates a point that is likely to lie in the interior of the linear rings.
- * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {Array.<number>} flatCenters Flat centers.
- * @param {number} flatCentersOffset Flat center offset.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Destination point as XYM coordinate, where M is the
- * length of the horizontal intersection that the point belongs to.
- */
-ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
-    ends, stride, flatCenters, flatCentersOffset, opt_dest) {
-  var i, ii, x, x1, x2, y1, y2;
-  var y = flatCenters[flatCentersOffset + 1];
-  /** @type {Array.<number>} */
-  var intersections = [];
-  // Calculate intersections with the horizontal line
-  for (var r = 0, rr = ends.length; r < rr; ++r) {
-    var end = ends[r];
-    x1 = flatCoordinates[end - stride];
-    y1 = flatCoordinates[end - stride + 1];
-    for (i = offset; i < end; i += stride) {
-      x2 = flatCoordinates[i];
-      y2 = flatCoordinates[i + 1];
-      if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {
-        x = (y - y1) / (y2 - y1) * (x2 - x1) + x1;
-        intersections.push(x);
-      }
-      x1 = x2;
-      y1 = y2;
-    }
-  }
-  // Find the longest segment of the horizontal line that has its center point
-  // inside the linear ring.
-  var pointX = NaN;
-  var maxSegmentLength = -Infinity;
-  intersections.sort(ol.array.numberSafeCompareFunction);
-  x1 = intersections[0];
-  for (i = 1, ii = intersections.length; i < ii; ++i) {
-    x2 = intersections[i];
-    var segmentLength = Math.abs(x2 - x1);
-    if (segmentLength > maxSegmentLength) {
-      x = (x1 + x2) / 2;
-      if (ol.geom.flat.contains.linearRingsContainsXY(
-          flatCoordinates, offset, ends, stride, x, y)) {
-        pointX = x;
-        maxSegmentLength = segmentLength;
-      }
-    }
-    x1 = x2;
-  }
-  if (isNaN(pointX)) {
-    // There is no horizontal line that has its center point inside the linear
-    // ring.  Use the center of the the linear ring's extent.
-    pointX = flatCenters[flatCentersOffset];
-  }
-  if (opt_dest) {
-    opt_dest.push(pointX, y, maxSegmentLength);
-    return opt_dest;
-  } else {
-    return [pointX, y, maxSegmentLength];
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {Array.<number>} flatCenters Flat centers.
- * @return {Array.<number>} Interior points as XYM coordinates, where M is the
- * length of the horizontal intersection that the point belongs to.
- */
-ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
-  var interiorPoints = [];
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    interiorPoints = ol.geom.flat.interiorpoint.linearRings(flatCoordinates,
-        offset, ends, stride, flatCenters, 2 * i, interiorPoints);
-    offset = ends[ends.length - 1];
-  }
-  return interiorPoints;
-};
-
-goog.provide('ol.geom.flat.segments');
-
-
-/**
- * This function calls `callback` for each segment of the flat coordinates
- * array. If the callback returns a truthy value the function returns that
- * value immediately. Otherwise the function returns `false`.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
- *     called for each segment.
- * @param {S=} opt_this The object to be used as the value of 'this'
- *     within callback.
- * @return {T|boolean} Value.
- * @template T,S
- */
-ol.geom.flat.segments.forEach = function(flatCoordinates, offset, end, stride, callback, opt_this) {
-  var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-  var point2 = [];
-  var ret;
-  for (; (offset + stride) < end; offset += stride) {
-    point2[0] = flatCoordinates[offset + stride];
-    point2[1] = flatCoordinates[offset + stride + 1];
-    ret = callback.call(opt_this, point1, point2);
-    if (ret) {
-      return ret;
-    }
-    point1[0] = point2[0];
-    point1[1] = point2[1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.intersectsextent');
-
-goog.require('ol.extent');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.segments');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.lineString = function(flatCoordinates, offset, end, stride, extent) {
-  var coordinatesExtent = ol.extent.extendFlatCoordinates(
-      ol.extent.createEmpty(), flatCoordinates, offset, end, stride);
-  if (!ol.extent.intersects(extent, coordinatesExtent)) {
-    return false;
-  }
-  if (ol.extent.containsExtent(extent, coordinatesExtent)) {
-    return true;
-  }
-  if (coordinatesExtent[0] >= extent[0] &&
-      coordinatesExtent[2] <= extent[2]) {
-    return true;
-  }
-  if (coordinatesExtent[1] >= extent[1] &&
-      coordinatesExtent[3] <= extent[3]) {
-    return true;
-  }
-  return ol.geom.flat.segments.forEach(flatCoordinates, offset, end, stride,
-      /**
-       * @param {ol.Coordinate} point1 Start point.
-       * @param {ol.Coordinate} point2 End point.
-       * @return {boolean} `true` if the segment and the extent intersect,
-       *     `false` otherwise.
-       */
-      function(point1, point2) {
-        return ol.extent.intersectsSegment(extent, point1, point2);
-      });
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.lineStrings = function(flatCoordinates, offset, ends, stride, extent) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.intersectsextent.lineString(
-        flatCoordinates, offset, ends[i], stride, extent)) {
-      return true;
-    }
-    offset = ends[i];
-  }
-  return false;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRing = function(flatCoordinates, offset, end, stride, extent) {
-  if (ol.geom.flat.intersectsextent.lineString(
-      flatCoordinates, offset, end, stride, extent)) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[0], extent[1])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[0], extent[3])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[2], extent[1])) {
-    return true;
-  }
-  if (ol.geom.flat.contains.linearRingContainsXY(
-      flatCoordinates, offset, end, stride, extent[2], extent[3])) {
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRings = function(flatCoordinates, offset, ends, stride, extent) {
-  if (!ol.geom.flat.intersectsextent.linearRing(
-      flatCoordinates, offset, ends[0], stride, extent)) {
-    return false;
-  }
-  if (ends.length === 1) {
-    return true;
-  }
-  var i, ii;
-  for (i = 1, ii = ends.length; i < ii; ++i) {
-    if (ol.geom.flat.contains.linearRingContainsExtent(
-        flatCoordinates, ends[i - 1], ends[i], stride, extent)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @param {ol.Extent} extent Extent.
- * @return {boolean} True if the geometry and the extent intersect.
- */
-ol.geom.flat.intersectsextent.linearRingss = function(flatCoordinates, offset, endss, stride, extent) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    if (ol.geom.flat.intersectsextent.linearRings(
-        flatCoordinates, offset, ends, stride, extent)) {
-      return true;
-    }
-    offset = ends[ends.length - 1];
-  }
-  return false;
-};
-
-goog.provide('ol.geom.flat.reverse');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- */
-ol.geom.flat.reverse.coordinates = function(flatCoordinates, offset, end, stride) {
-  while (offset < end - stride) {
-    var i;
-    for (i = 0; i < stride; ++i) {
-      var tmp = flatCoordinates[offset + i];
-      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];
-      flatCoordinates[end - stride + i] = tmp;
-    }
-    offset += stride;
-    end -= stride;
-  }
-};
-
-goog.provide('ol.geom.flat.orient');
-
-goog.require('ol.geom.flat.reverse');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {boolean} Is clockwise.
- */
-ol.geom.flat.orient.linearRingIsClockwise = function(flatCoordinates, offset, end, stride) {
-  // http://tinyurl.com/clockwise-method
-  // https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp
-  var edge = 0;
-  var x1 = flatCoordinates[end - stride];
-  var y1 = flatCoordinates[end - stride + 1];
-  for (; offset < end; offset += stride) {
-    var x2 = flatCoordinates[offset];
-    var y2 = flatCoordinates[offset + 1];
-    edge += (x2 - x1) * (y2 + y1);
-    x1 = x2;
-    y1 = y2;
-  }
-  return edge > 0;
-};
-
-
-/**
- * Determines if linear rings are oriented.  By default, left-hand orientation
- * is tested (first ring must be clockwise, remaining rings counter-clockwise).
- * To test for right-hand orientation, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Test for right-hand orientation
- *     (counter-clockwise exterior ring and clockwise interior rings).
- * @return {boolean} Rings are correctly oriented.
- */
-ol.geom.flat.orient.linearRingsAreOriented = function(flatCoordinates, offset, ends, stride, opt_right) {
-  var right = opt_right !== undefined ? opt_right : false;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(
-        flatCoordinates, offset, end, stride);
-    if (i === 0) {
-      if ((right && isClockwise) || (!right && !isClockwise)) {
-        return false;
-      }
-    } else {
-      if ((right && !isClockwise) || (!right && isClockwise)) {
-        return false;
-      }
-    }
-    offset = end;
-  }
-  return true;
-};
-
-
-/**
- * Determines if linear rings are oriented.  By default, left-hand orientation
- * is tested (first ring must be clockwise, remaining rings counter-clockwise).
- * To test for right-hand orientation, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Array of array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Test for right-hand orientation
- *     (counter-clockwise exterior ring and clockwise interior rings).
- * @return {boolean} Rings are correctly oriented.
- */
-ol.geom.flat.orient.linearRingssAreOriented = function(flatCoordinates, offset, endss, stride, opt_right) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    if (!ol.geom.flat.orient.linearRingsAreOriented(
-        flatCoordinates, offset, endss[i], stride, opt_right)) {
-      return false;
-    }
-  }
-  return true;
-};
-
-
-/**
- * Orient coordinates in a flat array of linear rings.  By default, rings
- * are oriented following the left-hand rule (clockwise for exterior and
- * counter-clockwise for interior rings).  To orient according to the
- * right-hand rule, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Follow the right-hand rule for orientation.
- * @return {number} End.
- */
-ol.geom.flat.orient.orientLinearRings = function(flatCoordinates, offset, ends, stride, opt_right) {
-  var right = opt_right !== undefined ? opt_right : false;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(
-        flatCoordinates, offset, end, stride);
-    var reverse = i === 0 ?
-      (right && isClockwise) || (!right && !isClockwise) :
-      (right && !isClockwise) || (!right && isClockwise);
-    if (reverse) {
-      ol.geom.flat.reverse.coordinates(flatCoordinates, offset, end, stride);
-    }
-    offset = end;
-  }
-  return offset;
-};
-
-
-/**
- * Orient coordinates in a flat array of linear rings.  By default, rings
- * are oriented following the left-hand rule (clockwise for exterior and
- * counter-clockwise for interior rings).  To orient according to the
- * right-hand rule, use the `opt_right` argument.
- *
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Array of array of end indexes.
- * @param {number} stride Stride.
- * @param {boolean=} opt_right Follow the right-hand rule for orientation.
- * @return {number} End.
- */
-ol.geom.flat.orient.orientLinearRingss = function(flatCoordinates, offset, endss, stride, opt_right) {
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    offset = ol.geom.flat.orient.orientLinearRings(
-        flatCoordinates, offset, endss[i], stride, opt_right);
-  }
-  return offset;
-};
-
-goog.provide('ol.geom.Polygon');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interiorpoint');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.simplify');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Polygon geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Array of linear
- *     rings that define the polygon. The first linear ring of the array
- *     defines the outer-boundary or surface of the polygon. Each subsequent
- *     linear ring defines a hole in the surface of the polygon. A linear ring
- *     is an array of vertices' coordinates where the first coordinate and the
- *     last are equivalent.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Polygon = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.ends_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatInteriorPointRevision_ = -1;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.flatInteriorPoint_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.orientedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.orientedFlatCoordinates_ = null;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed linear ring to this polygon.
- * @param {ol.geom.LinearRing} linearRing Linear ring.
- * @api
- */
-ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = linearRing.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates());
-  }
-  this.ends_.push(this.flatCoordinates.length);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Polygon} Clone.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.clone = function() {
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), this.ends_.slice());
-  return polygon;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getsMaxSquaredDelta(
-        this.flatCoordinates, 0, this.ends_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getsClosestPoint(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.containsXY = function(x, y) {
-  return ol.geom.flat.contains.linearRingsContainsXY(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);
-};
-
-
-/**
- * Return the area of the polygon on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.Polygon.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRings(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);
-};
-
-
-/**
- * Get the coordinate array for this geometry.  This array has the structure
- * of a GeoJSON coordinate array for polygons.
- *
- * @param {boolean=} opt_right Orient coordinates according to the right-hand
- *     rule (counter-clockwise for exterior and clockwise for interior rings).
- *     If `false`, coordinates will be oriented according to the left-hand rule
- *     (clockwise for exterior and counter-clockwise for interior rings).
- *     By default, coordinate orientation will depend on how the geometry was
- *     constructed.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.getCoordinates = function(opt_right) {
-  var flatCoordinates;
-  if (opt_right !== undefined) {
-    flatCoordinates = this.getOrientedFlatCoordinates().slice();
-    ol.geom.flat.orient.orientLinearRings(
-        flatCoordinates, 0, this.ends_, this.stride, opt_right);
-  } else {
-    flatCoordinates = this.flatCoordinates;
-  }
-
-  return ol.geom.flat.inflate.coordinatess(
-      flatCoordinates, 0, this.ends_, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Ends.
- */
-ol.geom.Polygon.prototype.getEnds = function() {
-  return this.ends_;
-};
-
-
-/**
- * @return {Array.<number>} Interior point.
- */
-ol.geom.Polygon.prototype.getFlatInteriorPoint = function() {
-  if (this.flatInteriorPointRevision_ != this.getRevision()) {
-    var flatCenter = ol.extent.getCenter(this.getExtent());
-    this.flatInteriorPoint_ = ol.geom.flat.interiorpoint.linearRings(
-        this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride,
-        flatCenter, 0);
-    this.flatInteriorPointRevision_ = this.getRevision();
-  }
-  return this.flatInteriorPoint_;
-};
-
-
-/**
- * Return an interior point of the polygon.
- * @return {ol.geom.Point} Interior point as XYM coordinate, where M is the
- * length of the horizontal intersection that the point belongs to.
- * @api
- */
-ol.geom.Polygon.prototype.getInteriorPoint = function() {
-  return new ol.geom.Point(this.getFlatInteriorPoint(), ol.geom.GeometryLayout.XYM);
-};
-
-
-/**
- * Return the number of rings of the polygon,  this includes the exterior
- * ring and any interior rings.
- *
- * @return {number} Number of rings.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRingCount = function() {
-  return this.ends_.length;
-};
-
-
-/**
- * Return the Nth linear ring of the polygon geometry. Return `null` if the
- * given index is out of range.
- * The exterior linear ring is available at index `0` and the interior rings
- * at index `1` and beyond.
- *
- * @param {number} index Index.
- * @return {ol.geom.LinearRing} Linear ring.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRing = function(index) {
-  if (index < 0 || this.ends_.length <= index) {
-    return null;
-  }
-  var linearRing = new ol.geom.LinearRing(null);
-  linearRing.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]));
-  return linearRing;
-};
-
-
-/**
- * Return the linear rings of the polygon.
- * @return {Array.<ol.geom.LinearRing>} Linear rings.
- * @api
- */
-ol.geom.Polygon.prototype.getLinearRings = function() {
-  var layout = this.layout;
-  var flatCoordinates = this.flatCoordinates;
-  var ends = this.ends_;
-  var linearRings = [];
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var linearRing = new ol.geom.LinearRing(null);
-    linearRing.setFlatCoordinates(layout, flatCoordinates.slice(offset, end));
-    linearRings.push(linearRing);
-    offset = end;
-  }
-  return linearRings;
-};
-
-
-/**
- * @return {Array.<number>} Oriented flat coordinates.
- */
-ol.geom.Polygon.prototype.getOrientedFlatCoordinates = function() {
-  if (this.orientedRevision_ != this.getRevision()) {
-    var flatCoordinates = this.flatCoordinates;
-    if (ol.geom.flat.orient.linearRingsAreOriented(
-        flatCoordinates, 0, this.ends_, this.stride)) {
-      this.orientedFlatCoordinates_ = flatCoordinates;
-    } else {
-      this.orientedFlatCoordinates_ = flatCoordinates.slice();
-      this.orientedFlatCoordinates_.length =
-          ol.geom.flat.orient.orientLinearRings(
-              this.orientedFlatCoordinates_, 0, this.ends_, this.stride);
-    }
-    this.orientedRevision_ = this.getRevision();
-  }
-  return this.orientedFlatCoordinates_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEnds = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizes(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      Math.sqrt(squaredTolerance),
-      simplifiedFlatCoordinates, 0, simplifiedEnds);
-  var simplifiedPolygon = new ol.geom.Polygon(null);
-  simplifiedPolygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEnds);
-  return simplifiedPolygon;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Polygon.prototype.getType = function() {
-  return ol.geom.GeometryType.POLYGON;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Polygon.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.linearRings(
-      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the polygon.
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 2);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var ends = ol.geom.flat.deflate.coordinatess(
-        this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
-    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>} ends Ends.
- */
-ol.geom.Polygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.ends_ = ends;
-  this.changed();
-};
-
-
-/**
- * Create an approximation of a circle on the surface of a sphere.
- * @param {ol.Sphere} sphere The sphere.
- * @param {ol.Coordinate} center Center (`[lon, lat]` in degrees).
- * @param {number} radius The great-circle distance from the center to
- *     the polygon vertices.
- * @param {number=} opt_n Optional number of vertices for the resulting
- *     polygon. Default is `32`.
- * @return {ol.geom.Polygon} The "circular" polygon.
- * @api
- */
-ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) {
-  var n = opt_n ? opt_n : 32;
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-  var i;
-  for (i = 0; i < n; ++i) {
-    ol.array.extend(
-        flatCoordinates, sphere.offset(center, radius, 2 * Math.PI * i / n));
-  }
-  flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, flatCoordinates, [flatCoordinates.length]);
-  return polygon;
-};
-
-
-/**
- * Create a polygon from an extent. The layout used is `XY`.
- * @param {ol.Extent} extent The extent.
- * @return {ol.geom.Polygon} The polygon.
- * @api
- */
-ol.geom.Polygon.fromExtent = function(extent) {
-  var minX = extent[0];
-  var minY = extent[1];
-  var maxX = extent[2];
-  var maxY = extent[3];
-  var flatCoordinates =
-      [minX, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY];
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, flatCoordinates, [flatCoordinates.length]);
-  return polygon;
-};
-
-
-/**
- * Create a regular polygon from a circle.
- * @param {ol.geom.Circle} circle Circle geometry.
- * @param {number=} opt_sides Number of sides of the polygon. Default is 32.
- * @param {number=} opt_angle Start angle for the first vertex of the polygon in
- *     radians. Default is 0.
- * @return {ol.geom.Polygon} Polygon geometry.
- * @api
- */
-ol.geom.Polygon.fromCircle = function(circle, opt_sides, opt_angle) {
-  var sides = opt_sides ? opt_sides : 32;
-  var stride = circle.getStride();
-  var layout = circle.getLayout();
-  var polygon = new ol.geom.Polygon(null, layout);
-  var arrayLength = stride * (sides + 1);
-  var flatCoordinates = new Array(arrayLength);
-  for (var i = 0; i < arrayLength; i++) {
-    flatCoordinates[i] = 0;
-  }
-  var ends = [flatCoordinates.length];
-  polygon.setFlatCoordinates(layout, flatCoordinates, ends);
-  ol.geom.Polygon.makeRegular(
-      polygon, circle.getCenter(), circle.getRadius(), opt_angle);
-  return polygon;
-};
-
-
-/**
- * Modify the coordinates of a polygon to make it a regular polygon.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {ol.Coordinate} center Center of the regular polygon.
- * @param {number} radius Radius of the regular polygon.
- * @param {number=} opt_angle Start angle for the first vertex of the polygon in
- *     radians. Default is 0.
- */
-ol.geom.Polygon.makeRegular = function(polygon, center, radius, opt_angle) {
-  var flatCoordinates = polygon.getFlatCoordinates();
-  var layout = polygon.getLayout();
-  var stride = polygon.getStride();
-  var ends = polygon.getEnds();
-  var sides = flatCoordinates.length / stride - 1;
-  var startAngle = opt_angle ? opt_angle : 0;
-  var angle, offset;
-  for (var i = 0; i <= sides; ++i) {
-    offset = i * stride;
-    angle = startAngle + (ol.math.modulo(i, sides) * 2 * Math.PI / sides);
-    flatCoordinates[offset] = center[0] + (radius * Math.cos(angle));
-    flatCoordinates[offset + 1] = center[1] + (radius * Math.sin(angle));
-  }
-  polygon.setFlatCoordinates(layout, flatCoordinates, ends);
-};
-
-goog.provide('ol.View');
-
-goog.require('ol');
-goog.require('ol.CenterConstraint');
-goog.require('ol.Object');
-goog.require('ol.ResolutionConstraint');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.ViewProperty');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.math');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * An ol.View object represents a simple 2D view of the map.
- *
- * This is the object to act upon to change the center, resolution,
- * and rotation of the map.
- *
- * ### The view states
- *
- * An `ol.View` is determined by three states: `center`, `resolution`,
- * and `rotation`. Each state has a corresponding getter and setter, e.g.
- * `getCenter` and `setCenter` for the `center` state.
- *
- * An `ol.View` has a `projection`. The projection determines the
- * coordinate system of the center, and its units determine the units of the
- * resolution (projection units per pixel). The default projection is
- * Spherical Mercator (EPSG:3857).
- *
- * ### The constraints
- *
- * `setCenter`, `setResolution` and `setRotation` can be used to change the
- * states of the view. Any value can be passed to the setters. And the value
- * that is passed to a setter will effectively be the value set in the view,
- * and returned by the corresponding getter.
- *
- * But an `ol.View` object also has a *resolution constraint*, a
- * *rotation constraint* and a *center constraint*.
- *
- * As said above, no constraints are applied when the setters are used to set
- * new states for the view. Applying constraints is done explicitly through
- * the use of the `constrain*` functions (`constrainResolution` and
- * `constrainRotation` and `constrainCenter`).
- *
- * The main users of the constraints are the interactions and the
- * controls. For example, double-clicking on the map changes the view to
- * the "next" resolution. And releasing the fingers after pinch-zooming
- * snaps to the closest resolution (with an animation).
- *
- * The *resolution constraint* snaps to specific resolutions. It is
- * determined by the following options: `resolutions`, `maxResolution`,
- * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three
- * options are ignored. See documentation for each option for more
- * information.
- *
- * The *rotation constraint* snaps to specific angles. It is determined
- * by the following options: `enableRotation` and `constrainRotation`.
- * By default the rotation value is snapped to zero when approaching the
- * horizontal.
- *
- * The *center constraint* is determined by the `extent` option. By
- * default the center is not constrained at all.
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.ViewOptions=} opt_options View options.
- * @api
- */
-ol.View = function(opt_options) {
-  ol.Object.call(this);
-
-  var options = ol.obj.assign({}, opt_options);
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.hints_ = [0, 0];
-
-  /**
-   * @private
-   * @type {Array.<Array.<ol.ViewAnimation>>}
-   */
-  this.animations_ = [];
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.updateAnimationKey_;
-
-  this.updateAnimations_ = this.updateAnimations_.bind(this);
-
-  /**
-   * @private
-   * @const
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = ol.proj.createProjection(options.projection, 'EPSG:3857');
-
-  this.applyOptions_(options);
-};
-ol.inherits(ol.View, ol.Object);
-
-
-/**
- * Set up the view with the given options.
- * @param {olx.ViewOptions} options View options.
- */
-ol.View.prototype.applyOptions_ = function(options) {
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var properties = {};
-  properties[ol.ViewProperty.CENTER] = options.center !== undefined ?
-    options.center : null;
-
-  var resolutionConstraintInfo = ol.View.createResolutionConstraint_(
-      options);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxResolution_ = resolutionConstraintInfo.maxResolution;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minResolution_ = resolutionConstraintInfo.minResolution;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;
-
-  /**
-   * @private
-   * @type {Array.<number>|undefined}
-   */
-  this.resolutions_ = options.resolutions;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minZoom_ = resolutionConstraintInfo.minZoom;
-
-  var centerConstraint = ol.View.createCenterConstraint_(options);
-  var resolutionConstraint = resolutionConstraintInfo.constraint;
-  var rotationConstraint = ol.View.createRotationConstraint_(options);
-
-  /**
-   * @private
-   * @type {ol.Constraints}
-   */
-  this.constraints_ = {
-    center: centerConstraint,
-    resolution: resolutionConstraint,
-    rotation: rotationConstraint
-  };
-
-  if (options.resolution !== undefined) {
-    properties[ol.ViewProperty.RESOLUTION] = options.resolution;
-  } else if (options.zoom !== undefined) {
-    properties[ol.ViewProperty.RESOLUTION] = this.constrainResolution(
-        this.maxResolution_, options.zoom - this.minZoom_);
-
-    if (this.resolutions_) { // in case map zoom is out of min/max zoom range
-      properties[ol.ViewProperty.RESOLUTION] = ol.math.clamp(
-          Number(this.getResolution() || properties[ol.ViewProperty.RESOLUTION]),
-          this.minResolution_, this.maxResolution_);
-    }
-  }
-  properties[ol.ViewProperty.ROTATION] =
-      options.rotation !== undefined ? options.rotation : 0;
-  this.setProperties(properties);
-
-  /**
-   * @private
-   * @type {olx.ViewOptions}
-   */
-  this.options_ = options;
-
-};
-
-/**
- * Get an updated version of the view options used to construct the view.  The
- * current resolution (or zoom), center, and rotation are applied to any stored
- * options.  The provided options can be uesd to apply new min/max zoom or
- * resolution limits.
- * @param {olx.ViewOptions} newOptions New options to be applied.
- * @return {olx.ViewOptions} New options updated with the current view state.
- */
-ol.View.prototype.getUpdatedOptions_ = function(newOptions) {
-  var options = ol.obj.assign({}, this.options_);
-
-  // preserve resolution (or zoom)
-  if (options.resolution !== undefined) {
-    options.resolution = this.getResolution();
-  } else {
-    options.zoom = this.getZoom();
-  }
-
-  // preserve center
-  options.center = this.getCenter();
-
-  // preserve rotation
-  options.rotation = this.getRotation();
-
-  return ol.obj.assign({}, options, newOptions);
-};
-
-
-/**
- * Animate the view.  The view's center, zoom (or resolution), and rotation
- * can be animated for smooth transitions between view states.  For example,
- * to animate the view to a new zoom level:
- *
- *     view.animate({zoom: view.getZoom() + 1});
- *
- * By default, the animation lasts one second and uses in-and-out easing.  You
- * can customize this behavior by including `duration` (in milliseconds) and
- * `easing` options (see {@link ol.easing}).
- *
- * To chain together multiple animations, call the method with multiple
- * animation objects.  For example, to first zoom and then pan:
- *
- *     view.animate({zoom: 10}, {center: [0, 0]});
- *
- * If you provide a function as the last argument to the animate method, it
- * will get called at the end of an animation series.  The callback will be
- * called with `true` if the animation series completed on its own or `false`
- * if it was cancelled.
- *
- * Animations are cancelled by user interactions (e.g. dragging the map) or by
- * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`
- * (or another method that calls one of these).
- *
- * @param {...(olx.AnimationOptions|function(boolean))} var_args Animation
- *     options.  Multiple animations can be run in series by passing multiple
- *     options objects.  To run multiple animations in parallel, call the method
- *     multiple times.  An optional callback can be provided as a final
- *     argument.  The callback will be called with a boolean indicating whether
- *     the animation completed without being cancelled.
- * @api
- */
-ol.View.prototype.animate = function(var_args) {
-  var animationCount = arguments.length;
-  var callback;
-  if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {
-    callback = arguments[animationCount - 1];
-    --animationCount;
-  }
-  if (!this.isDef()) {
-    // if view properties are not yet set, shortcut to the final state
-    var state = arguments[animationCount - 1];
-    if (state.center) {
-      this.setCenter(state.center);
-    }
-    if (state.zoom !== undefined) {
-      this.setZoom(state.zoom);
-    }
-    if (state.rotation !== undefined) {
-      this.setRotation(state.rotation);
-    }
-    if (callback) {
-      callback(true);
-    }
-    return;
-  }
-  var start = Date.now();
-  var center = this.getCenter().slice();
-  var resolution = this.getResolution();
-  var rotation = this.getRotation();
-  var series = [];
-  for (var i = 0; i < animationCount; ++i) {
-    var options = /** @type {olx.AnimationOptions} */ (arguments[i]);
-
-    var animation = /** @type {ol.ViewAnimation} */ ({
-      start: start,
-      complete: false,
-      anchor: options.anchor,
-      duration: options.duration !== undefined ? options.duration : 1000,
-      easing: options.easing || ol.easing.inAndOut
-    });
-
-    if (options.center) {
-      animation.sourceCenter = center;
-      animation.targetCenter = options.center;
-      center = animation.targetCenter;
-    }
-
-    if (options.zoom !== undefined) {
-      animation.sourceResolution = resolution;
-      animation.targetResolution = this.constrainResolution(
-          this.maxResolution_, options.zoom - this.minZoom_, 0);
-      resolution = animation.targetResolution;
-    } else if (options.resolution) {
-      animation.sourceResolution = resolution;
-      animation.targetResolution = options.resolution;
-      resolution = animation.targetResolution;
-    }
-
-    if (options.rotation !== undefined) {
-      animation.sourceRotation = rotation;
-      var delta = ol.math.modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;
-      animation.targetRotation = rotation + delta;
-      rotation = animation.targetRotation;
-    }
-
-    animation.callback = callback;
-
-    // check if animation is a no-op
-    if (ol.View.isNoopAnimation(animation)) {
-      animation.complete = true;
-      // we still push it onto the series for callback handling
-    } else {
-      start += animation.duration;
-    }
-    series.push(animation);
-  }
-  this.animations_.push(series);
-  this.setHint(ol.ViewHint.ANIMATING, 1);
-  this.updateAnimations_();
-};
-
-
-/**
- * Determine if the view is being animated.
- * @return {boolean} The view is being animated.
- * @api
- */
-ol.View.prototype.getAnimating = function() {
-  return this.hints_[ol.ViewHint.ANIMATING] > 0;
-};
-
-
-/**
- * Determine if the user is interacting with the view, such as panning or zooming.
- * @return {boolean} The view is being interacted with.
- * @api
- */
-ol.View.prototype.getInteracting = function() {
-  return this.hints_[ol.ViewHint.INTERACTING] > 0;
-};
-
-
-/**
- * Cancel any ongoing animations.
- * @api
- */
-ol.View.prototype.cancelAnimations = function() {
-  this.setHint(ol.ViewHint.ANIMATING, -this.hints_[ol.ViewHint.ANIMATING]);
-  for (var i = 0, ii = this.animations_.length; i < ii; ++i) {
-    var series = this.animations_[i];
-    if (series[0].callback) {
-      series[0].callback(false);
-    }
-  }
-  this.animations_.length = 0;
-};
-
-/**
- * Update all animations.
- */
-ol.View.prototype.updateAnimations_ = function() {
-  if (this.updateAnimationKey_ !== undefined) {
-    cancelAnimationFrame(this.updateAnimationKey_);
-    this.updateAnimationKey_ = undefined;
-  }
-  if (!this.getAnimating()) {
-    return;
-  }
-  var now = Date.now();
-  var more = false;
-  for (var i = this.animations_.length - 1; i >= 0; --i) {
-    var series = this.animations_[i];
-    var seriesComplete = true;
-    for (var j = 0, jj = series.length; j < jj; ++j) {
-      var animation = series[j];
-      if (animation.complete) {
-        continue;
-      }
-      var elapsed = now - animation.start;
-      var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;
-      if (fraction >= 1) {
-        animation.complete = true;
-        fraction = 1;
-      } else {
-        seriesComplete = false;
-      }
-      var progress = animation.easing(fraction);
-      if (animation.sourceCenter) {
-        var x0 = animation.sourceCenter[0];
-        var y0 = animation.sourceCenter[1];
-        var x1 = animation.targetCenter[0];
-        var y1 = animation.targetCenter[1];
-        var x = x0 + progress * (x1 - x0);
-        var y = y0 + progress * (y1 - y0);
-        this.set(ol.ViewProperty.CENTER, [x, y]);
-      }
-      if (animation.sourceResolution && animation.targetResolution) {
-        var resolution = progress === 1 ?
-          animation.targetResolution :
-          animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);
-        if (animation.anchor) {
-          this.set(ol.ViewProperty.CENTER,
-              this.calculateCenterZoom(resolution, animation.anchor));
-        }
-        this.set(ol.ViewProperty.RESOLUTION, resolution);
-      }
-      if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {
-        var rotation = progress === 1 ?
-          ol.math.modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI :
-          animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);
-        if (animation.anchor) {
-          this.set(ol.ViewProperty.CENTER,
-              this.calculateCenterRotate(rotation, animation.anchor));
-        }
-        this.set(ol.ViewProperty.ROTATION, rotation);
-      }
-      more = true;
-      if (!animation.complete) {
-        break;
-      }
-    }
-    if (seriesComplete) {
-      this.animations_[i] = null;
-      this.setHint(ol.ViewHint.ANIMATING, -1);
-      var callback = series[0].callback;
-      if (callback) {
-        callback(true);
-      }
-    }
-  }
-  // prune completed series
-  this.animations_ = this.animations_.filter(Boolean);
-  if (more && this.updateAnimationKey_ === undefined) {
-    this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_);
-  }
-};
-
-/**
- * @param {number} rotation Target rotation.
- * @param {ol.Coordinate} anchor Rotation anchor.
- * @return {ol.Coordinate|undefined} Center for rotation and anchor.
- */
-ol.View.prototype.calculateCenterRotate = function(rotation, anchor) {
-  var center;
-  var currentCenter = this.getCenter();
-  if (currentCenter !== undefined) {
-    center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];
-    ol.coordinate.rotate(center, rotation - this.getRotation());
-    ol.coordinate.add(center, anchor);
-  }
-  return center;
-};
-
-
-/**
- * @param {number} resolution Target resolution.
- * @param {ol.Coordinate} anchor Zoom anchor.
- * @return {ol.Coordinate|undefined} Center for resolution and anchor.
- */
-ol.View.prototype.calculateCenterZoom = function(resolution, anchor) {
-  var center;
-  var currentCenter = this.getCenter();
-  var currentResolution = this.getResolution();
-  if (currentCenter !== undefined && currentResolution !== undefined) {
-    var x = anchor[0] -
-        resolution * (anchor[0] - currentCenter[0]) / currentResolution;
-    var y = anchor[1] -
-        resolution * (anchor[1] - currentCenter[1]) / currentResolution;
-    center = [x, y];
-  }
-  return center;
-};
-
-
-/**
- * @private
- * @return {ol.Size} Viewport size or `[100, 100]` when no viewport is found.
- */
-ol.View.prototype.getSizeFromViewport_ = function() {
-  var size = [100, 100];
-  var selector = '.ol-viewport[data-view="' + ol.getUid(this) + '"]';
-  var element = document.querySelector(selector);
-  if (element) {
-    var metrics = getComputedStyle(element);
-    size[0] = parseInt(metrics.width, 10);
-    size[1] = parseInt(metrics.height, 10);
-  }
-  return size;
-};
-
-
-/**
- * Get the constrained center of this view.
- * @param {ol.Coordinate|undefined} center Center.
- * @return {ol.Coordinate|undefined} Constrained center.
- * @api
- */
-ol.View.prototype.constrainCenter = function(center) {
-  return this.constraints_.center(center);
-};
-
-
-/**
- * Get the constrained resolution of this view.
- * @param {number|undefined} resolution Resolution.
- * @param {number=} opt_delta Delta. Default is `0`.
- * @param {number=} opt_direction Direction. Default is `0`.
- * @return {number|undefined} Constrained resolution.
- * @api
- */
-ol.View.prototype.constrainResolution = function(
-    resolution, opt_delta, opt_direction) {
-  var delta = opt_delta || 0;
-  var direction = opt_direction || 0;
-  return this.constraints_.resolution(resolution, delta, direction);
-};
-
-
-/**
- * Get the constrained rotation of this view.
- * @param {number|undefined} rotation Rotation.
- * @param {number=} opt_delta Delta. Default is `0`.
- * @return {number|undefined} Constrained rotation.
- * @api
- */
-ol.View.prototype.constrainRotation = function(rotation, opt_delta) {
-  var delta = opt_delta || 0;
-  return this.constraints_.rotation(rotation, delta);
-};
-
-
-/**
- * Get the view center.
- * @return {ol.Coordinate|undefined} The center of the view.
- * @observable
- * @api
- */
-ol.View.prototype.getCenter = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-    this.get(ol.ViewProperty.CENTER));
-};
-
-
-/**
- * @return {ol.Constraints} Constraints.
- */
-ol.View.prototype.getConstraints = function() {
-  return this.constraints_;
-};
-
-
-/**
- * @param {Array.<number>=} opt_hints Destination array.
- * @return {Array.<number>} Hint.
- */
-ol.View.prototype.getHints = function(opt_hints) {
-  if (opt_hints !== undefined) {
-    opt_hints[0] = this.hints_[0];
-    opt_hints[1] = this.hints_[1];
-    return opt_hints;
-  } else {
-    return this.hints_.slice();
-  }
-};
-
-
-/**
- * Calculate the extent for the current view state and the passed size.
- * The size is the pixel dimensions of the box into which the calculated extent
- * should fit. In most cases you want to get the extent of the entire map,
- * that is `map.getSize()`.
- * @param {ol.Size=} opt_size Box pixel size. If not provided, the size of the
- * first map that uses this view will be used.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.View.prototype.calculateExtent = function(opt_size) {
-  var size = opt_size || this.getSizeFromViewport_();
-  var center = /** @type {!ol.Coordinate} */ (this.getCenter());
-  ol.asserts.assert(center, 1); // The view center is not defined
-  var resolution = /** @type {!number} */ (this.getResolution());
-  ol.asserts.assert(resolution !== undefined, 2); // The view resolution is not defined
-  var rotation = /** @type {!number} */ (this.getRotation());
-  ol.asserts.assert(rotation !== undefined, 3); // The view rotation is not defined
-
-  return ol.extent.getForViewAndSize(center, resolution, rotation, size);
-};
-
-
-/**
- * Get the maximum resolution of the view.
- * @return {number} The maximum resolution of the view.
- * @api
- */
-ol.View.prototype.getMaxResolution = function() {
-  return this.maxResolution_;
-};
-
-
-/**
- * Get the minimum resolution of the view.
- * @return {number} The minimum resolution of the view.
- * @api
- */
-ol.View.prototype.getMinResolution = function() {
-  return this.minResolution_;
-};
-
-
-/**
- * Get the maximum zoom level for the view.
- * @return {number} The maximum zoom level.
- * @api
- */
-ol.View.prototype.getMaxZoom = function() {
-  return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));
-};
-
-
-/**
- * Set a new maximum zoom level for the view.
- * @param {number} zoom The maximum zoom level.
- * @api
- */
-ol.View.prototype.setMaxZoom = function(zoom) {
-  this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));
-};
-
-
-/**
- * Get the minimum zoom level for the view.
- * @return {number} The minimum zoom level.
- * @api
- */
-ol.View.prototype.getMinZoom = function() {
-  return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));
-};
-
-
-/**
- * Set a new minimum zoom level for the view.
- * @param {number} zoom The minimum zoom level.
- * @api
- */
-ol.View.prototype.setMinZoom = function(zoom) {
-  this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));
-};
-
-
-/**
- * Get the view projection.
- * @return {ol.proj.Projection} The projection of the view.
- * @api
- */
-ol.View.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-/**
- * Get the view resolution.
- * @return {number|undefined} The resolution of the view.
- * @observable
- * @api
- */
-ol.View.prototype.getResolution = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.ViewProperty.RESOLUTION));
-};
-
-
-/**
- * Get the resolutions for the view. This returns the array of resolutions
- * passed to the constructor of the {ol.View}, or undefined if none were given.
- * @return {Array.<number>|undefined} The resolutions of the view.
- * @api
- */
-ol.View.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * Get the resolution for a provided extent (in map units) and size (in pixels).
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size=} opt_size Box pixel size.
- * @return {number} The resolution at which the provided extent will render at
- *     the given size.
- * @api
- */
-ol.View.prototype.getResolutionForExtent = function(extent, opt_size) {
-  var size = opt_size || this.getSizeFromViewport_();
-  var xResolution = ol.extent.getWidth(extent) / size[0];
-  var yResolution = ol.extent.getHeight(extent) / size[1];
-  return Math.max(xResolution, yResolution);
-};
-
-
-/**
- * Return a function that returns a value between 0 and 1 for a
- * resolution. Exponential scaling is assumed.
- * @param {number=} opt_power Power.
- * @return {function(number): number} Resolution for value function.
- */
-ol.View.prototype.getResolutionForValueFunction = function(opt_power) {
-  var power = opt_power || 2;
-  var maxResolution = this.maxResolution_;
-  var minResolution = this.minResolution_;
-  var max = Math.log(maxResolution / minResolution) / Math.log(power);
-  return (
-    /**
-     * @param {number} value Value.
-     * @return {number} Resolution.
-     */
-    function(value) {
-      var resolution = maxResolution / Math.pow(power, value * max);
-      return resolution;
-    });
-};
-
-
-/**
- * Get the view rotation.
- * @return {number} The rotation of the view in radians.
- * @observable
- * @api
- */
-ol.View.prototype.getRotation = function() {
-  return /** @type {number} */ (this.get(ol.ViewProperty.ROTATION));
-};
-
-
-/**
- * Return a function that returns a resolution for a value between
- * 0 and 1. Exponential scaling is assumed.
- * @param {number=} opt_power Power.
- * @return {function(number): number} Value for resolution function.
- */
-ol.View.prototype.getValueForResolutionFunction = function(opt_power) {
-  var power = opt_power || 2;
-  var maxResolution = this.maxResolution_;
-  var minResolution = this.minResolution_;
-  var max = Math.log(maxResolution / minResolution) / Math.log(power);
-  return (
-    /**
-     * @param {number} resolution Resolution.
-     * @return {number} Value.
-     */
-    function(resolution) {
-      var value =
-            (Math.log(maxResolution / resolution) / Math.log(power)) / max;
-      return value;
-    });
-};
-
-
-/**
- * @return {olx.ViewState} View state.
- */
-ol.View.prototype.getState = function() {
-  var center = /** @type {ol.Coordinate} */ (this.getCenter());
-  var projection = this.getProjection();
-  var resolution = /** @type {number} */ (this.getResolution());
-  var rotation = this.getRotation();
-  return /** @type {olx.ViewState} */ ({
-    center: center.slice(),
-    projection: projection !== undefined ? projection : null,
-    resolution: resolution,
-    rotation: rotation,
-    zoom: this.getZoom()
-  });
-};
-
-
-/**
- * Get the current zoom level.  If you configured your view with a resolutions
- * array (this is rare), this method may return non-integer zoom levels (so
- * the zoom level is not safe to use as an index into a resolutions array).
- * @return {number|undefined} Zoom.
- * @api
- */
-ol.View.prototype.getZoom = function() {
-  var zoom;
-  var resolution = this.getResolution();
-  if (resolution !== undefined) {
-    zoom = this.getZoomForResolution(resolution);
-  }
-  return zoom;
-};
-
-
-/**
- * Get the zoom level for a resolution.
- * @param {number} resolution The resolution.
- * @return {number|undefined} The zoom level for the provided resolution.
- * @api
- */
-ol.View.prototype.getZoomForResolution = function(resolution) {
-  var offset = this.minZoom_ || 0;
-  var max, zoomFactor;
-  if (this.resolutions_) {
-    var nearest = ol.array.linearFindNearest(this.resolutions_, resolution, 1);
-    offset = nearest;
-    max = this.resolutions_[nearest];
-    if (nearest == this.resolutions_.length - 1) {
-      zoomFactor = 2;
-    } else {
-      zoomFactor = max / this.resolutions_[nearest + 1];
-    }
-  } else {
-    max = this.maxResolution_;
-    zoomFactor = this.zoomFactor_;
-  }
-  return offset + Math.log(max / resolution) / Math.log(zoomFactor);
-};
-
-
-/**
- * Get the resolution for a zoom level.
- * @param {number} zoom Zoom level.
- * @return {number} The view resolution for the provided zoom level.
- * @api
- */
-ol.View.prototype.getResolutionForZoom = function(zoom) {
-  return /** @type {number} */ (this.constrainResolution(
-      this.maxResolution_, zoom - this.minZoom_, 0));
-};
-
-
-/**
- * Fit the given geometry or extent based on the given map size and border.
- * The size is pixel dimensions of the box to fit the extent into.
- * In most cases you will want to use the map size, that is `map.getSize()`.
- * Takes care of the map angle.
- * @param {ol.geom.SimpleGeometry|ol.Extent} geometryOrExtent The geometry or
- *     extent to fit the view to.
- * @param {olx.view.FitOptions=} opt_options Options.
- * @api
- */
-ol.View.prototype.fit = function(geometryOrExtent, opt_options) {
-  var options = opt_options || {};
-  var size = options.size;
-  if (!size) {
-    size = this.getSizeFromViewport_();
-  }
-  /** @type {ol.geom.SimpleGeometry} */
-  var geometry;
-  if (!(geometryOrExtent instanceof ol.geom.SimpleGeometry)) {
-    ol.asserts.assert(Array.isArray(geometryOrExtent),
-        24); // Invalid extent or geometry provided as `geometry`
-    ol.asserts.assert(!ol.extent.isEmpty(geometryOrExtent),
-        25); // Cannot fit empty extent provided as `geometry`
-    geometry = ol.geom.Polygon.fromExtent(geometryOrExtent);
-  } else if (geometryOrExtent.getType() === ol.geom.GeometryType.CIRCLE) {
-    geometryOrExtent = geometryOrExtent.getExtent();
-    geometry = ol.geom.Polygon.fromExtent(geometryOrExtent);
-    geometry.rotate(this.getRotation(), ol.extent.getCenter(geometryOrExtent));
-  } else {
-    geometry = geometryOrExtent;
-  }
-
-  var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];
-  var constrainResolution = options.constrainResolution !== undefined ?
-    options.constrainResolution : true;
-  var nearest = options.nearest !== undefined ? options.nearest : false;
-  var minResolution;
-  if (options.minResolution !== undefined) {
-    minResolution = options.minResolution;
-  } else if (options.maxZoom !== undefined) {
-    minResolution = this.constrainResolution(
-        this.maxResolution_, options.maxZoom - this.minZoom_, 0);
-  } else {
-    minResolution = 0;
-  }
-  var coords = geometry.getFlatCoordinates();
-
-  // calculate rotated extent
-  var rotation = this.getRotation();
-  var cosAngle = Math.cos(-rotation);
-  var sinAngle = Math.sin(-rotation);
-  var minRotX = +Infinity;
-  var minRotY = +Infinity;
-  var maxRotX = -Infinity;
-  var maxRotY = -Infinity;
-  var stride = geometry.getStride();
-  for (var i = 0, ii = coords.length; i < ii; i += stride) {
-    var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;
-    var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;
-    minRotX = Math.min(minRotX, rotX);
-    minRotY = Math.min(minRotY, rotY);
-    maxRotX = Math.max(maxRotX, rotX);
-    maxRotY = Math.max(maxRotY, rotY);
-  }
-
-  // calculate resolution
-  var resolution = this.getResolutionForExtent(
-      [minRotX, minRotY, maxRotX, maxRotY],
-      [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);
-  resolution = isNaN(resolution) ? minResolution :
-    Math.max(resolution, minResolution);
-  if (constrainResolution) {
-    var constrainedResolution = this.constrainResolution(resolution, 0, 0);
-    if (!nearest && constrainedResolution < resolution) {
-      constrainedResolution = this.constrainResolution(
-          constrainedResolution, -1, 0);
-    }
-    resolution = constrainedResolution;
-  }
-
-  // calculate center
-  sinAngle = -sinAngle; // go back to original rotation
-  var centerRotX = (minRotX + maxRotX) / 2;
-  var centerRotY = (minRotY + maxRotY) / 2;
-  centerRotX += (padding[1] - padding[3]) / 2 * resolution;
-  centerRotY += (padding[0] - padding[2]) / 2 * resolution;
-  var centerX = centerRotX * cosAngle - centerRotY * sinAngle;
-  var centerY = centerRotY * cosAngle + centerRotX * sinAngle;
-  var center = [centerX, centerY];
-  var callback = options.callback ? options.callback : ol.nullFunction;
-
-  if (options.duration !== undefined) {
-    this.animate({
-      resolution: resolution,
-      center: center,
-      duration: options.duration,
-      easing: options.easing
-    }, callback);
-  } else {
-    this.setResolution(resolution);
-    this.setCenter(center);
-    setTimeout(callback.bind(undefined, true), 0);
-  }
-};
-
-
-/**
- * Center on coordinate and view position.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.Size} size Box pixel size.
- * @param {ol.Pixel} position Position on the view to center on.
- * @api
- */
-ol.View.prototype.centerOn = function(coordinate, size, position) {
-  // calculate rotated position
-  var rotation = this.getRotation();
-  var cosAngle = Math.cos(-rotation);
-  var sinAngle = Math.sin(-rotation);
-  var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;
-  var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;
-  var resolution = this.getResolution();
-  rotX += (size[0] / 2 - position[0]) * resolution;
-  rotY += (position[1] - size[1] / 2) * resolution;
-
-  // go back to original angle
-  sinAngle = -sinAngle; // go back to original rotation
-  var centerX = rotX * cosAngle - rotY * sinAngle;
-  var centerY = rotY * cosAngle + rotX * sinAngle;
-
-  this.setCenter([centerX, centerY]);
-};
-
-
-/**
- * @return {boolean} Is defined.
- */
-ol.View.prototype.isDef = function() {
-  return !!this.getCenter() && this.getResolution() !== undefined;
-};
-
-
-/**
- * Rotate the view around a given coordinate.
- * @param {number} rotation New rotation value for the view.
- * @param {ol.Coordinate=} opt_anchor The rotation center.
- * @api
- */
-ol.View.prototype.rotate = function(rotation, opt_anchor) {
-  if (opt_anchor !== undefined) {
-    var center = this.calculateCenterRotate(rotation, opt_anchor);
-    this.setCenter(center);
-  }
-  this.setRotation(rotation);
-};
-
-
-/**
- * Set the center of the current view.
- * @param {ol.Coordinate|undefined} center The center of the view.
- * @observable
- * @api
- */
-ol.View.prototype.setCenter = function(center) {
-  this.set(ol.ViewProperty.CENTER, center);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * @param {ol.ViewHint} hint Hint.
- * @param {number} delta Delta.
- * @return {number} New value.
- */
-ol.View.prototype.setHint = function(hint, delta) {
-  this.hints_[hint] += delta;
-  this.changed();
-  return this.hints_[hint];
-};
-
-
-/**
- * Set the resolution for this view.
- * @param {number|undefined} resolution The resolution of the view.
- * @observable
- * @api
- */
-ol.View.prototype.setResolution = function(resolution) {
-  this.set(ol.ViewProperty.RESOLUTION, resolution);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * Set the rotation for this view.
- * @param {number} rotation The rotation of the view in radians.
- * @observable
- * @api
- */
-ol.View.prototype.setRotation = function(rotation) {
-  this.set(ol.ViewProperty.ROTATION, rotation);
-  if (this.getAnimating()) {
-    this.cancelAnimations();
-  }
-};
-
-
-/**
- * Zoom to a specific zoom level.
- * @param {number} zoom Zoom level.
- * @api
- */
-ol.View.prototype.setZoom = function(zoom) {
-  this.setResolution(this.getResolutionForZoom(zoom));
-};
-
-
-/**
- * @param {olx.ViewOptions} options View options.
- * @private
- * @return {ol.CenterConstraintType} The constraint.
- */
-ol.View.createCenterConstraint_ = function(options) {
-  if (options.extent !== undefined) {
-    return ol.CenterConstraint.createExtent(options.extent);
-  } else {
-    return ol.CenterConstraint.none;
-  }
-};
-
-
-/**
- * @private
- * @param {olx.ViewOptions} options View options.
- * @return {{constraint: ol.ResolutionConstraintType, maxResolution: number,
- *     minResolution: number, zoomFactor: number}} The constraint.
- */
-ol.View.createResolutionConstraint_ = function(options) {
-  var resolutionConstraint;
-  var maxResolution;
-  var minResolution;
-
-  // TODO: move these to be ol constants
-  // see https://github.com/openlayers/openlayers/issues/2076
-  var defaultMaxZoom = 28;
-  var defaultZoomFactor = 2;
-
-  var minZoom = options.minZoom !== undefined ?
-    options.minZoom : ol.DEFAULT_MIN_ZOOM;
-
-  var maxZoom = options.maxZoom !== undefined ?
-    options.maxZoom : defaultMaxZoom;
-
-  var zoomFactor = options.zoomFactor !== undefined ?
-    options.zoomFactor : defaultZoomFactor;
-
-  if (options.resolutions !== undefined) {
-    var resolutions = options.resolutions;
-    maxResolution = resolutions[minZoom];
-    minResolution = resolutions[maxZoom] !== undefined ?
-      resolutions[maxZoom] : resolutions[resolutions.length - 1];
-    resolutionConstraint = ol.ResolutionConstraint.createSnapToResolutions(
-        resolutions);
-  } else {
-    // calculate the default min and max resolution
-    var projection = ol.proj.createProjection(options.projection, 'EPSG:3857');
-    var extent = projection.getExtent();
-    var size = !extent ?
-      // use an extent that can fit the whole world if need be
-      360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
-            projection.getMetersPerUnit() :
-      Math.max(ol.extent.getWidth(extent), ol.extent.getHeight(extent));
-
-    var defaultMaxResolution = size / ol.DEFAULT_TILE_SIZE / Math.pow(
-        defaultZoomFactor, ol.DEFAULT_MIN_ZOOM);
-
-    var defaultMinResolution = defaultMaxResolution / Math.pow(
-        defaultZoomFactor, defaultMaxZoom - ol.DEFAULT_MIN_ZOOM);
-
-    // user provided maxResolution takes precedence
-    maxResolution = options.maxResolution;
-    if (maxResolution !== undefined) {
-      minZoom = 0;
-    } else {
-      maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);
-    }
-
-    // user provided minResolution takes precedence
-    minResolution = options.minResolution;
-    if (minResolution === undefined) {
-      if (options.maxZoom !== undefined) {
-        if (options.maxResolution !== undefined) {
-          minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);
-        } else {
-          minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);
-        }
-      } else {
-        minResolution = defaultMinResolution;
-      }
-    }
-
-    // given discrete zoom levels, minResolution may be different than provided
-    maxZoom = minZoom + Math.floor(
-        Math.log(maxResolution / minResolution) / Math.log(zoomFactor));
-    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);
-
-    resolutionConstraint = ol.ResolutionConstraint.createSnapToPower(
-        zoomFactor, maxResolution, maxZoom - minZoom);
-  }
-  return {constraint: resolutionConstraint, maxResolution: maxResolution,
-    minResolution: minResolution, minZoom: minZoom, zoomFactor: zoomFactor};
-};
-
-
-/**
- * @private
- * @param {olx.ViewOptions} options View options.
- * @return {ol.RotationConstraintType} Rotation constraint.
- */
-ol.View.createRotationConstraint_ = function(options) {
-  var enableRotation = options.enableRotation !== undefined ?
-    options.enableRotation : true;
-  if (enableRotation) {
-    var constrainRotation = options.constrainRotation;
-    if (constrainRotation === undefined || constrainRotation === true) {
-      return ol.RotationConstraint.createSnapToZero();
-    } else if (constrainRotation === false) {
-      return ol.RotationConstraint.none;
-    } else if (typeof constrainRotation === 'number') {
-      return ol.RotationConstraint.createSnapToN(constrainRotation);
-    } else {
-      return ol.RotationConstraint.none;
-    }
-  } else {
-    return ol.RotationConstraint.disable;
-  }
-};
-
-
-/**
- * Determine if an animation involves no view change.
- * @param {ol.ViewAnimation} animation The animation.
- * @return {boolean} The animation involves no view change.
- */
-ol.View.isNoopAnimation = function(animation) {
-  if (animation.sourceCenter && animation.targetCenter) {
-    if (!ol.coordinate.equals(animation.sourceCenter, animation.targetCenter)) {
-      return false;
-    }
-  }
-  if (animation.sourceResolution !== animation.targetResolution) {
-    return false;
-  }
-  if (animation.sourceRotation !== animation.targetRotation) {
-    return false;
-  }
-  return true;
-};
-
-goog.provide('ol.dom');
-
-
-/**
- * Create an html canvas element and returns its 2d context.
- * @param {number=} opt_width Canvas width.
- * @param {number=} opt_height Canvas height.
- * @return {CanvasRenderingContext2D} The context.
- */
-ol.dom.createCanvasContext2D = function(opt_width, opt_height) {
-  var canvas = document.createElement('CANVAS');
-  if (opt_width) {
-    canvas.width = opt_width;
-  }
-  if (opt_height) {
-    canvas.height = opt_height;
-  }
-  return canvas.getContext('2d');
-};
-
-
-/**
- * Get the current computed width for the given element including margin,
- * padding and border.
- * Equivalent to jQuery's `$(el).outerWidth(true)`.
- * @param {!Element} element Element.
- * @return {number} The width.
- */
-ol.dom.outerWidth = function(element) {
-  var width = element.offsetWidth;
-  var style = getComputedStyle(element);
-  width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);
-
-  return width;
-};
-
-
-/**
- * Get the current computed height for the given element including margin,
- * padding and border.
- * Equivalent to jQuery's `$(el).outerHeight(true)`.
- * @param {!Element} element Element.
- * @return {number} The height.
- */
-ol.dom.outerHeight = function(element) {
-  var height = element.offsetHeight;
-  var style = getComputedStyle(element);
-  height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);
-
-  return height;
-};
-
-/**
- * @param {Node} newNode Node to replace old node
- * @param {Node} oldNode The node to be replaced
- */
-ol.dom.replaceNode = function(newNode, oldNode) {
-  var parent = oldNode.parentNode;
-  if (parent) {
-    parent.replaceChild(newNode, oldNode);
-  }
-};
-
-/**
- * @param {Node} node The node to remove.
- * @returns {Node} The node that was removed or null.
- */
-ol.dom.removeNode = function(node) {
-  return node && node.parentNode ? node.parentNode.removeChild(node) : null;
-};
-
-/**
- * @param {Node} node The node to remove the children from.
- */
-ol.dom.removeChildren = function(node) {
-  while (node.lastChild) {
-    node.removeChild(node.lastChild);
-  }
-};
-
-goog.provide('ol.layer.Property');
-
-/**
- * @enum {string}
- */
-ol.layer.Property = {
-  OPACITY: 'opacity',
-  VISIBLE: 'visible',
-  EXTENT: 'extent',
-  Z_INDEX: 'zIndex',
-  MAX_RESOLUTION: 'maxResolution',
-  MIN_RESOLUTION: 'minResolution',
-  SOURCE: 'source'
-};
-
-goog.provide('ol.layer.Base');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.layer.Property');
-goog.require('ol.math');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Note that with `ol.layer.Base` and all its subclasses, any property set in
- * the options is set as a {@link ol.Object} property on the layer object, so
- * is observable, and has get/set accessors.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @param {olx.layer.BaseOptions} options Layer options.
- * @api
- */
-ol.layer.Base = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var properties = ol.obj.assign({}, options);
-  properties[ol.layer.Property.OPACITY] =
-      options.opacity !== undefined ? options.opacity : 1;
-  properties[ol.layer.Property.VISIBLE] =
-      options.visible !== undefined ? options.visible : true;
-  properties[ol.layer.Property.Z_INDEX] =
-      options.zIndex !== undefined ? options.zIndex : 0;
-  properties[ol.layer.Property.MAX_RESOLUTION] =
-      options.maxResolution !== undefined ? options.maxResolution : Infinity;
-  properties[ol.layer.Property.MIN_RESOLUTION] =
-      options.minResolution !== undefined ? options.minResolution : 0;
-
-  this.setProperties(properties);
-
-  /**
-   * @type {ol.LayerState}
-   * @private
-   */
-  this.state_ = /** @type {ol.LayerState} */ ({
-    layer: /** @type {ol.layer.Layer} */ (this),
-    managed: true
-  });
-
-  /**
-   * The layer type.
-   * @type {ol.LayerType}
-   * @protected;
-   */
-  this.type;
-
-};
-ol.inherits(ol.layer.Base, ol.Object);
-
-
-/**
- * Get the layer type (used when creating a layer renderer).
- * @return {ol.LayerType} The layer type.
- */
-ol.layer.Base.prototype.getType = function() {
-  return this.type;
-};
-
-
-/**
- * @return {ol.LayerState} Layer state.
- */
-ol.layer.Base.prototype.getLayerState = function() {
-  this.state_.opacity = ol.math.clamp(this.getOpacity(), 0, 1);
-  this.state_.sourceState = this.getSourceState();
-  this.state_.visible = this.getVisible();
-  this.state_.extent = this.getExtent();
-  this.state_.zIndex = this.getZIndex();
-  this.state_.maxResolution = this.getMaxResolution();
-  this.state_.minResolution = Math.max(this.getMinResolution(), 0);
-
-  return this.state_;
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.layer.Layer>=} opt_array Array of layers (to be
- *     modified in place).
- * @return {Array.<ol.layer.Layer>} Array of layers.
- */
-ol.layer.Base.prototype.getLayersArray = function(opt_array) {};
-
-
-/**
- * @abstract
- * @param {Array.<ol.LayerState>=} opt_states Optional list of layer
- *     states (to be modified in place).
- * @return {Array.<ol.LayerState>} List of layer states.
- */
-ol.layer.Base.prototype.getLayerStatesArray = function(opt_states) {};
-
-
-/**
- * Return the {@link ol.Extent extent} of the layer or `undefined` if it
- * will be visible regardless of extent.
- * @return {ol.Extent|undefined} The layer extent.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getExtent = function() {
-  return /** @type {ol.Extent|undefined} */ (
-    this.get(ol.layer.Property.EXTENT));
-};
-
-
-/**
- * Return the maximum resolution of the layer.
- * @return {number} The maximum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getMaxResolution = function() {
-  return /** @type {number} */ (
-    this.get(ol.layer.Property.MAX_RESOLUTION));
-};
-
-
-/**
- * Return the minimum resolution of the layer.
- * @return {number} The minimum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getMinResolution = function() {
-  return /** @type {number} */ (
-    this.get(ol.layer.Property.MIN_RESOLUTION));
-};
-
-
-/**
- * Return the opacity of the layer (between 0 and 1).
- * @return {number} The opacity of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getOpacity = function() {
-  return /** @type {number} */ (this.get(ol.layer.Property.OPACITY));
-};
-
-
-/**
- * @abstract
- * @return {ol.source.State} Source state.
- */
-ol.layer.Base.prototype.getSourceState = function() {};
-
-
-/**
- * Return the visibility of the layer (`true` or `false`).
- * @return {boolean} The visibility of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getVisible = function() {
-  return /** @type {boolean} */ (this.get(ol.layer.Property.VISIBLE));
-};
-
-
-/**
- * Return the Z-index of the layer, which is used to order layers before
- * rendering. The default Z-index is 0.
- * @return {number} The Z-index of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.getZIndex = function() {
-  return /** @type {number} */ (this.get(ol.layer.Property.Z_INDEX));
-};
-
-
-/**
- * Set the extent at which the layer is visible.  If `undefined`, the layer
- * will be visible at all extents.
- * @param {ol.Extent|undefined} extent The extent of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setExtent = function(extent) {
-  this.set(ol.layer.Property.EXTENT, extent);
-};
-
-
-/**
- * Set the maximum resolution at which the layer is visible.
- * @param {number} maxResolution The maximum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setMaxResolution = function(maxResolution) {
-  this.set(ol.layer.Property.MAX_RESOLUTION, maxResolution);
-};
-
-
-/**
- * Set the minimum resolution at which the layer is visible.
- * @param {number} minResolution The minimum resolution of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setMinResolution = function(minResolution) {
-  this.set(ol.layer.Property.MIN_RESOLUTION, minResolution);
-};
-
-
-/**
- * Set the opacity of the layer, allowed values range from 0 to 1.
- * @param {number} opacity The opacity of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setOpacity = function(opacity) {
-  this.set(ol.layer.Property.OPACITY, opacity);
-};
-
-
-/**
- * Set the visibility of the layer (`true` or `false`).
- * @param {boolean} visible The visibility of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setVisible = function(visible) {
-  this.set(ol.layer.Property.VISIBLE, visible);
-};
-
-
-/**
- * Set Z-index of the layer, which is used to order layers before rendering.
- * The default Z-index is 0.
- * @param {number} zindex The z-index of the layer.
- * @observable
- * @api
- */
-ol.layer.Base.prototype.setZIndex = function(zindex) {
-  this.set(ol.layer.Property.Z_INDEX, zindex);
-};
-
-goog.provide('ol.source.State');
-
-
-/**
- * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.
- * @enum {string}
- */
-ol.source.State = {
-  UNDEFINED: 'undefined',
-  LOADING: 'loading',
-  READY: 'ready',
-  ERROR: 'error'
-};
-
-
-goog.provide('ol.layer.Group');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.layer.Base');
-goog.require('ol.obj');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * A {@link ol.Collection} of layers that are handled together.
- *
- * A generic `change` event is triggered when the group/Collection changes.
- *
- * @constructor
- * @extends {ol.layer.Base}
- * @param {olx.layer.GroupOptions=} opt_options Layer options.
- * @api
- */
-ol.layer.Group = function(opt_options) {
-
-  var options = opt_options || {};
-  var baseOptions = /** @type {olx.layer.GroupOptions} */
-      (ol.obj.assign({}, options));
-  delete baseOptions.layers;
-
-  var layers = options.layers;
-
-  ol.layer.Base.call(this, baseOptions);
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.layersListenerKeys_ = [];
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.EventsKey>>}
-   */
-  this.listenerKeys_ = {};
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Group.Property_.LAYERS),
-      this.handleLayersChanged_, this);
-
-  if (layers) {
-    if (Array.isArray(layers)) {
-      layers = new ol.Collection(layers.slice(), {unique: true});
-    } else {
-      ol.asserts.assert(layers instanceof ol.Collection,
-          43); // Expected `layers` to be an array or an `ol.Collection`
-      layers = layers;
-    }
-  } else {
-    layers = new ol.Collection(undefined, {unique: true});
-  }
-
-  this.setLayers(layers);
-
-};
-ol.inherits(ol.layer.Group, ol.layer.Base);
-
-
-/**
- * @private
- */
-ol.layer.Group.prototype.handleLayerChange_ = function() {
-  this.changed();
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersChanged_ = function(event) {
-  this.layersListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.layersListenerKeys_.length = 0;
-
-  var layers = this.getLayers();
-  this.layersListenerKeys_.push(
-      ol.events.listen(layers, ol.CollectionEventType.ADD,
-          this.handleLayersAdd_, this),
-      ol.events.listen(layers, ol.CollectionEventType.REMOVE,
-          this.handleLayersRemove_, this));
-
-  for (var id in this.listenerKeys_) {
-    this.listenerKeys_[id].forEach(ol.events.unlistenByKey);
-  }
-  ol.obj.clear(this.listenerKeys_);
-
-  var layersArray = layers.getArray();
-  var i, ii, layer;
-  for (i = 0, ii = layersArray.length; i < ii; i++) {
-    layer = layersArray[i];
-    this.listenerKeys_[ol.getUid(layer).toString()] = [
-      ol.events.listen(layer, ol.ObjectEventType.PROPERTYCHANGE,
-          this.handleLayerChange_, this),
-      ol.events.listen(layer, ol.events.EventType.CHANGE,
-          this.handleLayerChange_, this)
-    ];
-  }
-
-  this.changed();
-};
-
-
-/**
- * @param {ol.Collection.Event} collectionEvent Collection event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersAdd_ = function(collectionEvent) {
-  var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
-  var key = ol.getUid(layer).toString();
-  this.listenerKeys_[key] = [
-    ol.events.listen(layer, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleLayerChange_, this),
-    ol.events.listen(layer, ol.events.EventType.CHANGE,
-        this.handleLayerChange_, this)
-  ];
-  this.changed();
-};
-
-
-/**
- * @param {ol.Collection.Event} collectionEvent Collection event.
- * @private
- */
-ol.layer.Group.prototype.handleLayersRemove_ = function(collectionEvent) {
-  var layer = /** @type {ol.layer.Base} */ (collectionEvent.element);
-  var key = ol.getUid(layer).toString();
-  this.listenerKeys_[key].forEach(ol.events.unlistenByKey);
-  delete this.listenerKeys_[key];
-  this.changed();
-};
-
-
-/**
- * Returns the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
- * in this group.
- * @return {!ol.Collection.<ol.layer.Base>} Collection of
- *   {@link ol.layer.Base layers} that are part of this group.
- * @observable
- * @api
- */
-ol.layer.Group.prototype.getLayers = function() {
-  return /** @type {!ol.Collection.<ol.layer.Base>} */ (this.get(
-      ol.layer.Group.Property_.LAYERS));
-};
-
-
-/**
- * Set the {@link ol.Collection collection} of {@link ol.layer.Layer layers}
- * in this group.
- * @param {!ol.Collection.<ol.layer.Base>} layers Collection of
- *   {@link ol.layer.Base layers} that are part of this group.
- * @observable
- * @api
- */
-ol.layer.Group.prototype.setLayers = function(layers) {
-  this.set(ol.layer.Group.Property_.LAYERS, layers);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getLayersArray = function(opt_array) {
-  var array = opt_array !== undefined ? opt_array : [];
-  this.getLayers().forEach(function(layer) {
-    layer.getLayersArray(array);
-  });
-  return array;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getLayerStatesArray = function(opt_states) {
-  var states = opt_states !== undefined ? opt_states : [];
-
-  var pos = states.length;
-
-  this.getLayers().forEach(function(layer) {
-    layer.getLayerStatesArray(states);
-  });
-
-  var ownLayerState = this.getLayerState();
-  var i, ii, layerState;
-  for (i = pos, ii = states.length; i < ii; i++) {
-    layerState = states[i];
-    layerState.opacity *= ownLayerState.opacity;
-    layerState.visible = layerState.visible && ownLayerState.visible;
-    layerState.maxResolution = Math.min(
-        layerState.maxResolution, ownLayerState.maxResolution);
-    layerState.minResolution = Math.max(
-        layerState.minResolution, ownLayerState.minResolution);
-    if (ownLayerState.extent !== undefined) {
-      if (layerState.extent !== undefined) {
-        layerState.extent = ol.extent.getIntersection(
-            layerState.extent, ownLayerState.extent);
-      } else {
-        layerState.extent = ownLayerState.extent;
-      }
-    }
-  }
-
-  return states;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Group.prototype.getSourceState = function() {
-  return ol.source.State.READY;
-};
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Group.Property_ = {
-  LAYERS: 'layers'
-};
-
-goog.provide('ol.PluginType');
-
-/**
- * A plugin type used when registering a plugin.  The supported plugin types are
- * 'MAP_RENDERER', and 'LAYER_RENDERER'.
- * @enum {string}
- */
-ol.PluginType = {
-  MAP_RENDERER: 'MAP_RENDERER',
-  LAYER_RENDERER: 'LAYER_RENDERER'
-};
-
-goog.provide('ol.plugins');
-
-goog.require('ol.PluginType');
-
-/**
- * The registry of map renderer plugins.
- * @type {Array<olx.MapRendererPlugin>}
- * @private
- */
-ol.plugins.mapRendererPlugins_ = [];
-
-
-/**
- * Get all registered map renderer plugins.
- * @return {Array<olx.MapRendererPlugin>} The registered map renderer plugins.
- */
-ol.plugins.getMapRendererPlugins = function() {
-  return ol.plugins.mapRendererPlugins_;
-};
-
-
-/**
- * The registry of layer renderer plugins.
- * @type {Array<olx.LayerRendererPlugin>}
- * @private
- */
-ol.plugins.layerRendererPlugins_ = [];
-
-
-/**
- * Get all registered layer renderer plugins.
- * @return {Array<olx.LayerRendererPlugin>} The registered layer renderer plugins.
- */
-ol.plugins.getLayerRendererPlugins = function() {
-  return ol.plugins.layerRendererPlugins_;
-};
-
-
-/**
- * Register a plugin.
- * @param {ol.PluginType} type The plugin type.
- * @param {*} plugin The plugin.
- */
-ol.plugins.register = function(type, plugin) {
-  var plugins;
-  switch (type) {
-    case ol.PluginType.MAP_RENDERER: {
-      plugins = ol.plugins.mapRendererPlugins_;
-      plugins.push(/** @type {olx.MapRendererPlugin} */ (plugin));
-      break;
-    }
-    case ol.PluginType.LAYER_RENDERER: {
-      plugins = ol.plugins.layerRendererPlugins_;
-      plugins.push(/** @type {olx.LayerRendererPlugin} */ (plugin));
-      break;
-    }
-    default: {
-      throw new Error('Unsupported plugin type: ' + type);
-    }
-  }
-};
-
-
-/**
- * Register multiple plugins.
- * @param {ol.PluginType} type The plugin type.
- * @param {Array} plugins The plugins.
- */
-ol.plugins.registerMultiple = function(type, plugins) {
-  for (var i = 0, ii = plugins.length; i < ii; ++i) {
-    ol.plugins.register(type, plugins[i]);
-  }
-};
-
-goog.provide('ol.renderer.Type');
-
-
-/**
- * Available renderers: `'canvas'` or `'webgl'`.
- * @enum {string}
- */
-ol.renderer.Type = {
-  CANVAS: 'canvas',
-  WEBGL: 'webgl'
-};
-
-goog.provide('ol.PluggableMap');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.MapBrowserEvent');
-goog.require('ol.MapBrowserEventHandler');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapEvent');
-goog.require('ol.MapEventType');
-goog.require('ol.MapProperty');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.TileQueue');
-goog.require('ol.View');
-goog.require('ol.ViewHint');
-goog.require('ol.asserts');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.has');
-goog.require('ol.layer.Group');
-goog.require('ol.obj');
-goog.require('ol.plugins');
-goog.require('ol.renderer.Type');
-goog.require('ol.size');
-goog.require('ol.structs.PriorityQueue');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.Object}
- * @param {olx.MapOptions} options Map options.
- * @fires ol.MapBrowserEvent
- * @fires ol.MapEvent
- * @fires ol.render.Event#postcompose
- * @fires ol.render.Event#precompose
- * @api
- */
-ol.PluggableMap = function(options) {
-
-  ol.Object.call(this);
-
-  var optionsInternal = ol.PluggableMap.createOptionsInternal(options);
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.loadTilesWhileAnimating_ =
-      options.loadTilesWhileAnimating !== undefined ?
-        options.loadTilesWhileAnimating : false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.loadTilesWhileInteracting_ =
-      options.loadTilesWhileInteracting !== undefined ?
-        options.loadTilesWhileInteracting : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = options.pixelRatio !== undefined ?
-    options.pixelRatio : ol.has.DEVICE_PIXEL_RATIO;
-
-  /**
-   * @private
-   * @type {Object.<string, string>}
-   */
-  this.logos_ = optionsInternal.logos;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.animationDelayKey_;
-
-  /**
-   * @private
-   */
-  this.animationDelay_ = function() {
-    this.animationDelayKey_ = undefined;
-    this.renderFrame_.call(this, Date.now());
-  }.bind(this);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.coordinateToPixelTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.pixelToCoordinateTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.frameIndex_ = 0;
-
-  /**
-   * @private
-   * @type {?olx.FrameState}
-   */
-  this.frameState_ = null;
-
-  /**
-   * The extent at the previous 'moveend' event.
-   * @private
-   * @type {ol.Extent}
-   */
-  this.previousExtent_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.viewPropertyListenerKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.viewChangeListenerKey_ = null;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.layerGroupPropertyListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.viewport_ = document.createElement('DIV');
-  this.viewport_.className = 'ol-viewport' + (ol.has.TOUCH ? ' ol-touch' : '');
-  this.viewport_.style.position = 'relative';
-  this.viewport_.style.overflow = 'hidden';
-  this.viewport_.style.width = '100%';
-  this.viewport_.style.height = '100%';
-  // prevent page zoom on IE >= 10 browsers
-  this.viewport_.style.msTouchAction = 'none';
-  this.viewport_.style.touchAction = 'none';
-
-  /**
-   * @private
-   * @type {!Element}
-   */
-  this.overlayContainer_ = document.createElement('DIV');
-  this.overlayContainer_.className = 'ol-overlaycontainer';
-  this.viewport_.appendChild(this.overlayContainer_);
-
-  /**
-   * @private
-   * @type {!Element}
-   */
-  this.overlayContainerStopEvent_ = document.createElement('DIV');
-  this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';
-  var overlayEvents = [
-    ol.events.EventType.CLICK,
-    ol.events.EventType.DBLCLICK,
-    ol.events.EventType.MOUSEDOWN,
-    ol.events.EventType.TOUCHSTART,
-    ol.events.EventType.MSPOINTERDOWN,
-    ol.MapBrowserEventType.POINTERDOWN,
-    ol.events.EventType.MOUSEWHEEL,
-    ol.events.EventType.WHEEL
-  ];
-  for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {
-    ol.events.listen(this.overlayContainerStopEvent_, overlayEvents[i],
-        ol.events.Event.stopPropagation);
-  }
-  this.viewport_.appendChild(this.overlayContainerStopEvent_);
-
-  /**
-   * @private
-   * @type {ol.MapBrowserEventHandler}
-   */
-  this.mapBrowserEventHandler_ = new ol.MapBrowserEventHandler(this, options.moveTolerance);
-  for (var key in ol.MapBrowserEventType) {
-    ol.events.listen(this.mapBrowserEventHandler_, ol.MapBrowserEventType[key],
-        this.handleMapBrowserEvent, this);
-  }
-
-  /**
-   * @private
-   * @type {Element|Document}
-   */
-  this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.keyHandlerKeys_ = null;
-
-  ol.events.listen(this.viewport_, ol.events.EventType.WHEEL,
-      this.handleBrowserEvent, this);
-  ol.events.listen(this.viewport_, ol.events.EventType.MOUSEWHEEL,
-      this.handleBrowserEvent, this);
-
-  /**
-   * @type {ol.Collection.<ol.control.Control>}
-   * @protected
-   */
-  this.controls = optionsInternal.controls || new ol.Collection();
-
-  /**
-   * @type {ol.Collection.<ol.interaction.Interaction>}
-   * @protected
-   */
-  this.interactions = optionsInternal.interactions || new ol.Collection();
-
-  /**
-   * @type {ol.Collection.<ol.Overlay>}
-   * @private
-   */
-  this.overlays_ = optionsInternal.overlays;
-
-  /**
-   * A lookup of overlays by id.
-   * @private
-   * @type {Object.<string, ol.Overlay>}
-   */
-  this.overlayIdIndex_ = {};
-
-  /**
-   * @type {ol.renderer.Map}
-   * @private
-   */
-  this.renderer_ = optionsInternal.mapRendererPlugin['create'](this.viewport_, this);
-
-  /**
-   * @type {function(Event)|undefined}
-   * @private
-   */
-  this.handleResize_;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.focus_ = null;
-
-  /**
-   * @private
-   * @type {Array.<ol.PostRenderFunction>}
-   */
-  this.postRenderFunctions_ = [];
-
-  /**
-   * @private
-   * @type {ol.TileQueue}
-   */
-  this.tileQueue_ = new ol.TileQueue(
-      this.getTilePriority.bind(this),
-      this.handleTileChange_.bind(this));
-
-  /**
-   * Uids of features to skip at rendering time.
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.skippedFeatureUids_ = {};
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.MapProperty.LAYERGROUP),
-      this.handleLayerGroupChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.VIEW),
-      this.handleViewChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.SIZE),
-      this.handleSizeChanged_, this);
-  ol.events.listen(this, ol.Object.getChangeEventType(ol.MapProperty.TARGET),
-      this.handleTargetChanged_, this);
-
-  // setProperties will trigger the rendering of the map if the map
-  // is "defined" already.
-  this.setProperties(optionsInternal.values);
-
-  this.controls.forEach(
-      /**
-       * @param {ol.control.Control} control Control.
-       * @this {ol.PluggableMap}
-       */
-      function(control) {
-        control.setMap(this);
-      }, this);
-
-  ol.events.listen(this.controls, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(this);
-      }, this);
-
-  ol.events.listen(this.controls, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(null);
-      }, this);
-
-  this.interactions.forEach(
-      /**
-       * @param {ol.interaction.Interaction} interaction Interaction.
-       * @this {ol.PluggableMap}
-       */
-      function(interaction) {
-        interaction.setMap(this);
-      }, this);
-
-  ol.events.listen(this.interactions, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(this);
-      }, this);
-
-  ol.events.listen(this.interactions, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        event.element.setMap(null);
-      }, this);
-
-  this.overlays_.forEach(this.addOverlayInternal_, this);
-
-  ol.events.listen(this.overlays_, ol.CollectionEventType.ADD,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        this.addOverlayInternal_(/** @type {ol.Overlay} */ (event.element));
-      }, this);
-
-  ol.events.listen(this.overlays_, ol.CollectionEventType.REMOVE,
-      /**
-       * @param {ol.Collection.Event} event Collection event.
-       */
-      function(event) {
-        var overlay = /** @type {ol.Overlay} */ (event.element);
-        var id = overlay.getId();
-        if (id !== undefined) {
-          delete this.overlayIdIndex_[id.toString()];
-        }
-        event.element.setMap(null);
-      }, this);
-
-};
-ol.inherits(ol.PluggableMap, ol.Object);
-
-
-/**
- * Add the given control to the map.
- * @param {ol.control.Control} control Control.
- * @api
- */
-ol.PluggableMap.prototype.addControl = function(control) {
-  this.getControls().push(control);
-};
-
-
-/**
- * Add the given interaction to the map.
- * @param {ol.interaction.Interaction} interaction Interaction to add.
- * @api
- */
-ol.PluggableMap.prototype.addInteraction = function(interaction) {
-  this.getInteractions().push(interaction);
-};
-
-
-/**
- * Adds the given layer to the top of this map. If you want to add a layer
- * elsewhere in the stack, use `getLayers()` and the methods available on
- * {@link ol.Collection}.
- * @param {ol.layer.Base} layer Layer.
- * @api
- */
-ol.PluggableMap.prototype.addLayer = function(layer) {
-  var layers = this.getLayerGroup().getLayers();
-  layers.push(layer);
-};
-
-
-/**
- * Add the given overlay to the map.
- * @param {ol.Overlay} overlay Overlay.
- * @api
- */
-ol.PluggableMap.prototype.addOverlay = function(overlay) {
-  this.getOverlays().push(overlay);
-};
-
-
-/**
- * This deals with map's overlay collection changes.
- * @param {ol.Overlay} overlay Overlay.
- * @private
- */
-ol.PluggableMap.prototype.addOverlayInternal_ = function(overlay) {
-  var id = overlay.getId();
-  if (id !== undefined) {
-    this.overlayIdIndex_[id.toString()] = overlay;
-  }
-  overlay.setMap(this);
-};
-
-
-/**
- *
- * @inheritDoc
- */
-ol.PluggableMap.prototype.disposeInternal = function() {
-  this.mapBrowserEventHandler_.dispose();
-  ol.events.unlisten(this.viewport_, ol.events.EventType.WHEEL,
-      this.handleBrowserEvent, this);
-  ol.events.unlisten(this.viewport_, ol.events.EventType.MOUSEWHEEL,
-      this.handleBrowserEvent, this);
-  if (this.handleResize_ !== undefined) {
-    window.removeEventListener(ol.events.EventType.RESIZE,
-        this.handleResize_, false);
-    this.handleResize_ = undefined;
-  }
-  if (this.animationDelayKey_) {
-    cancelAnimationFrame(this.animationDelayKey_);
-    this.animationDelayKey_ = undefined;
-  }
-  this.setTarget(null);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Detect features that intersect a pixel on the viewport, and execute a
- * callback with each intersecting feature. Layers included in the detection can
- * be configured through the `layerFilter` option in `opt_options`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {function(this: S, (ol.Feature|ol.render.Feature),
- *     ol.layer.Layer): T} callback Feature callback. The callback will be
- *     called with two arguments. The first argument is one
- *     {@link ol.Feature feature} or
- *     {@link ol.render.Feature render feature} at the pixel, the second is
- *     the {@link ol.layer.Layer layer} of the feature and will be null for
- *     unmanaged layers. To stop detection, callback functions can return a
- *     truthy value.
- * @param {olx.AtPixelOptions=} opt_options Optional options.
- * @return {T|undefined} Callback result, i.e. the return value of last
- * callback execution, or the first truthy callback return value.
- * @template S,T
- * @api
- */
-ol.PluggableMap.prototype.forEachFeatureAtPixel = function(pixel, callback, opt_options) {
-  if (!this.frameState_) {
-    return;
-  }
-  var coordinate = this.getCoordinateFromPixel(pixel);
-  opt_options = opt_options !== undefined ? opt_options : {};
-  var hitTolerance = opt_options.hitTolerance !== undefined ?
-    opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
-  var layerFilter = opt_options.layerFilter !== undefined ?
-    opt_options.layerFilter : ol.functions.TRUE;
-  return this.renderer_.forEachFeatureAtCoordinate(
-      coordinate, this.frameState_, hitTolerance, callback, null,
-      layerFilter, null);
-};
-
-
-/**
- * Get all features that intersect a pixel on the viewport.
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.AtPixelOptions=} opt_options Optional options.
- * @return {Array.<ol.Feature|ol.render.Feature>} The detected features or
- * `null` if none were found.
- * @api
- */
-ol.PluggableMap.prototype.getFeaturesAtPixel = function(pixel, opt_options) {
-  var features = null;
-  this.forEachFeatureAtPixel(pixel, function(feature) {
-    if (!features) {
-      features = [];
-    }
-    features.push(feature);
-  }, opt_options);
-  return features;
-};
-
-/**
- * Detect layers that have a color value at a pixel on the viewport, and
- * execute a callback with each matching layer. Layers included in the
- * detection can be configured through `opt_layerFilter`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback
- *     Layer callback. This callback will receive two arguments: first is the
- *     {@link ol.layer.Layer layer}, second argument is an array representing
- *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types
- *     that do not currently support this argument. To stop detection, callback
- *     functions can return a truthy value.
- * @param {S=} opt_this Value to use as `this` when executing `callback`.
- * @param {(function(this: U, ol.layer.Layer): boolean)=} opt_layerFilter Layer
- *     filter function. The filter function will receive one argument, the
- *     {@link ol.layer.Layer layer-candidate} and it should return a boolean
- *     value. Only layers which are visible and for which this function returns
- *     `true` will be tested for features. By default, all visible layers will
- *     be tested.
- * @param {U=} opt_this2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result, i.e. the return value of last
- * callback execution, or the first truthy callback return value.
- * @template S,T,U
- * @api
- */
-ol.PluggableMap.prototype.forEachLayerAtPixel = function(pixel, callback, opt_this, opt_layerFilter, opt_this2) {
-  if (!this.frameState_) {
-    return;
-  }
-  var thisArg = opt_this !== undefined ? opt_this : null;
-  var layerFilter = opt_layerFilter !== undefined ?
-    opt_layerFilter : ol.functions.TRUE;
-  var thisArg2 = opt_this2 !== undefined ? opt_this2 : null;
-  return this.renderer_.forEachLayerAtPixel(
-      pixel, this.frameState_, callback, thisArg,
-      layerFilter, thisArg2);
-};
-
-
-/**
- * Detect if features intersect a pixel on the viewport. Layers included in the
- * detection can be configured through `opt_layerFilter`.
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.AtPixelOptions=} opt_options Optional options.
- * @return {boolean} Is there a feature at the given pixel?
- * @template U
- * @api
- */
-ol.PluggableMap.prototype.hasFeatureAtPixel = function(pixel, opt_options) {
-  if (!this.frameState_) {
-    return false;
-  }
-  var coordinate = this.getCoordinateFromPixel(pixel);
-  opt_options = opt_options !== undefined ? opt_options : {};
-  var layerFilter = opt_options.layerFilter !== undefined ?
-    opt_options.layerFilter : ol.functions.TRUE;
-  var hitTolerance = opt_options.hitTolerance !== undefined ?
-    opt_options.hitTolerance * this.frameState_.pixelRatio : 0;
-  return this.renderer_.hasFeatureAtCoordinate(
-      coordinate, this.frameState_, hitTolerance, layerFilter, null);
-};
-
-
-/**
- * Returns the coordinate in view projection for a browser event.
- * @param {Event} event Event.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.PluggableMap.prototype.getEventCoordinate = function(event) {
-  return this.getCoordinateFromPixel(this.getEventPixel(event));
-};
-
-
-/**
- * Returns the map pixel position for a browser event relative to the viewport.
- * @param {Event} event Event.
- * @return {ol.Pixel} Pixel.
- * @api
- */
-ol.PluggableMap.prototype.getEventPixel = function(event) {
-  var viewportPosition = this.viewport_.getBoundingClientRect();
-  var eventPosition = event.changedTouches ? event.changedTouches[0] : event;
-  return [
-    eventPosition.clientX - viewportPosition.left,
-    eventPosition.clientY - viewportPosition.top
-  ];
-};
-
-
-/**
- * Get the target in which this map is rendered.
- * Note that this returns what is entered as an option or in setTarget:
- * if that was an element, it returns an element; if a string, it returns that.
- * @return {Element|string|undefined} The Element or id of the Element that the
- *     map is rendered in.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.getTarget = function() {
-  return /** @type {Element|string|undefined} */ (
-    this.get(ol.MapProperty.TARGET));
-};
-
-
-/**
- * Get the DOM element into which this map is rendered. In contrast to
- * `getTarget` this method always return an `Element`, or `null` if the
- * map has no target.
- * @return {Element} The element that the map is rendered in.
- * @api
- */
-ol.PluggableMap.prototype.getTargetElement = function() {
-  var target = this.getTarget();
-  if (target !== undefined) {
-    return typeof target === 'string' ?
-      document.getElementById(target) :
-      target;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Get the coordinate for a given pixel.  This returns a coordinate in the
- * map view projection.
- * @param {ol.Pixel} pixel Pixel position in the map viewport.
- * @return {ol.Coordinate} The coordinate for the pixel position.
- * @api
- */
-ol.PluggableMap.prototype.getCoordinateFromPixel = function(pixel) {
-  var frameState = this.frameState_;
-  if (!frameState) {
-    return null;
-  } else {
-    return ol.transform.apply(frameState.pixelToCoordinateTransform, pixel.slice());
-  }
-};
-
-
-/**
- * Get the map controls. Modifying this collection changes the controls
- * associated with the map.
- * @return {ol.Collection.<ol.control.Control>} Controls.
- * @api
- */
-ol.PluggableMap.prototype.getControls = function() {
-  return this.controls;
-};
-
-
-/**
- * Get the map overlays. Modifying this collection changes the overlays
- * associated with the map.
- * @return {ol.Collection.<ol.Overlay>} Overlays.
- * @api
- */
-ol.PluggableMap.prototype.getOverlays = function() {
-  return this.overlays_;
-};
-
-
-/**
- * Get an overlay by its identifier (the value returned by overlay.getId()).
- * Note that the index treats string and numeric identifiers as the same. So
- * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.
- * @param {string|number} id Overlay identifier.
- * @return {ol.Overlay} Overlay.
- * @api
- */
-ol.PluggableMap.prototype.getOverlayById = function(id) {
-  var overlay = this.overlayIdIndex_[id.toString()];
-  return overlay !== undefined ? overlay : null;
-};
-
-
-/**
- * Get the map interactions. Modifying this collection changes the interactions
- * associated with the map.
- *
- * Interactions are used for e.g. pan, zoom and rotate.
- * @return {ol.Collection.<ol.interaction.Interaction>} Interactions.
- * @api
- */
-ol.PluggableMap.prototype.getInteractions = function() {
-  return this.interactions;
-};
-
-
-/**
- * Get the layergroup associated with this map.
- * @return {ol.layer.Group} A layer group containing the layers in this map.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.getLayerGroup = function() {
-  return /** @type {ol.layer.Group} */ (this.get(ol.MapProperty.LAYERGROUP));
-};
-
-
-/**
- * Get the collection of layers associated with this map.
- * @return {!ol.Collection.<ol.layer.Base>} Layers.
- * @api
- */
-ol.PluggableMap.prototype.getLayers = function() {
-  var layers = this.getLayerGroup().getLayers();
-  return layers;
-};
-
-
-/**
- * Get the pixel for a coordinate.  This takes a coordinate in the map view
- * projection and returns the corresponding pixel.
- * @param {ol.Coordinate} coordinate A map coordinate.
- * @return {ol.Pixel} A pixel position in the map viewport.
- * @api
- */
-ol.PluggableMap.prototype.getPixelFromCoordinate = function(coordinate) {
-  var frameState = this.frameState_;
-  if (!frameState) {
-    return null;
-  } else {
-    return ol.transform.apply(frameState.coordinateToPixelTransform,
-        coordinate.slice(0, 2));
-  }
-};
-
-
-/**
- * Get the map renderer.
- * @return {ol.renderer.Map} Renderer
- */
-ol.PluggableMap.prototype.getRenderer = function() {
-  return this.renderer_;
-};
-
-
-/**
- * Get the size of this map.
- * @return {ol.Size|undefined} The size in pixels of the map in the DOM.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.getSize = function() {
-  return /** @type {ol.Size|undefined} */ (this.get(ol.MapProperty.SIZE));
-};
-
-
-/**
- * Get the view associated with this map. A view manages properties such as
- * center and resolution.
- * @return {ol.View} The view that controls this map.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.getView = function() {
-  return /** @type {ol.View} */ (this.get(ol.MapProperty.VIEW));
-};
-
-
-/**
- * Get the element that serves as the map viewport.
- * @return {Element} Viewport.
- * @api
- */
-ol.PluggableMap.prototype.getViewport = function() {
-  return this.viewport_;
-};
-
-
-/**
- * Get the element that serves as the container for overlays.  Elements added to
- * this container will let mousedown and touchstart events through to the map,
- * so clicks and gestures on an overlay will trigger {@link ol.MapBrowserEvent}
- * events.
- * @return {!Element} The map's overlay container.
- */
-ol.PluggableMap.prototype.getOverlayContainer = function() {
-  return this.overlayContainer_;
-};
-
-
-/**
- * Get the element that serves as a container for overlays that don't allow
- * event propagation. Elements added to this container won't let mousedown and
- * touchstart events through to the map, so clicks and gestures on an overlay
- * don't trigger any {@link ol.MapBrowserEvent}.
- * @return {!Element} The map's overlay container that stops events.
- */
-ol.PluggableMap.prototype.getOverlayContainerStopEvent = function() {
-  return this.overlayContainerStopEvent_;
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @param {string} tileSourceKey Tile source key.
- * @param {ol.Coordinate} tileCenter Tile center.
- * @param {number} tileResolution Tile resolution.
- * @return {number} Tile priority.
- */
-ol.PluggableMap.prototype.getTilePriority = function(tile, tileSourceKey, tileCenter, tileResolution) {
-  // Filter out tiles at higher zoom levels than the current zoom level, or that
-  // are outside the visible extent.
-  var frameState = this.frameState_;
-  if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {
-    return ol.structs.PriorityQueue.DROP;
-  }
-  if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {
-    return ol.structs.PriorityQueue.DROP;
-  }
-  // Prioritize the highest zoom level tiles closest to the focus.
-  // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).
-  // Within a zoom level, tiles are prioritized by the distance in pixels
-  // between the center of the tile and the focus.  The factor of 65536 means
-  // that the prioritization should behave as desired for tiles up to
-  // 65536 * Math.log(2) = 45426 pixels from the focus.
-  var deltaX = tileCenter[0] - frameState.focus[0];
-  var deltaY = tileCenter[1] - frameState.focus[1];
-  return 65536 * Math.log(tileResolution) +
-      Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
-};
-
-
-/**
- * @param {Event} browserEvent Browser event.
- * @param {string=} opt_type Type.
- */
-ol.PluggableMap.prototype.handleBrowserEvent = function(browserEvent, opt_type) {
-  var type = opt_type || browserEvent.type;
-  var mapBrowserEvent = new ol.MapBrowserEvent(type, this, browserEvent);
-  this.handleMapBrowserEvent(mapBrowserEvent);
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent The event to handle.
- */
-ol.PluggableMap.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
-  if (!this.frameState_) {
-    // With no view defined, we cannot translate pixels into geographical
-    // coordinates so interactions cannot be used.
-    return;
-  }
-  this.focus_ = mapBrowserEvent.coordinate;
-  mapBrowserEvent.frameState = this.frameState_;
-  var interactionsArray = this.getInteractions().getArray();
-  var i;
-  if (this.dispatchEvent(mapBrowserEvent) !== false) {
-    for (i = interactionsArray.length - 1; i >= 0; i--) {
-      var interaction = interactionsArray[i];
-      if (!interaction.getActive()) {
-        continue;
-      }
-      var cont = interaction.handleEvent(mapBrowserEvent);
-      if (!cont) {
-        break;
-      }
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.PluggableMap.prototype.handlePostRender = function() {
-
-  var frameState = this.frameState_;
-
-  // Manage the tile queue
-  // Image loads are expensive and a limited resource, so try to use them
-  // efficiently:
-  // * When the view is static we allow a large number of parallel tile loads
-  //   to complete the frame as quickly as possible.
-  // * When animating or interacting, image loads can cause janks, so we reduce
-  //   the maximum number of loads per frame and limit the number of parallel
-  //   tile loads to remain reactive to view changes and to reduce the chance of
-  //   loading tiles that will quickly disappear from view.
-  var tileQueue = this.tileQueue_;
-  if (!tileQueue.isEmpty()) {
-    var maxTotalLoading = 16;
-    var maxNewLoads = maxTotalLoading;
-    if (frameState) {
-      var hints = frameState.viewHints;
-      if (hints[ol.ViewHint.ANIMATING]) {
-        maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0;
-        maxNewLoads = 2;
-      }
-      if (hints[ol.ViewHint.INTERACTING]) {
-        maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0;
-        maxNewLoads = 2;
-      }
-    }
-    if (tileQueue.getTilesLoading() < maxTotalLoading) {
-      tileQueue.reprioritize(); // FIXME only call if view has changed
-      tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);
-    }
-  }
-
-  var postRenderFunctions = this.postRenderFunctions_;
-  var i, ii;
-  for (i = 0, ii = postRenderFunctions.length; i < ii; ++i) {
-    postRenderFunctions[i](this, frameState);
-  }
-  postRenderFunctions.length = 0;
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleSizeChanged_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleTargetChanged_ = function() {
-  // target may be undefined, null, a string or an Element.
-  // If it's a string we convert it to an Element before proceeding.
-  // If it's not now an Element we remove the viewport from the DOM.
-  // If it's an Element we append the viewport element to it.
-
-  var targetElement;
-  if (this.getTarget()) {
-    targetElement = this.getTargetElement();
-  }
-
-  if (this.keyHandlerKeys_) {
-    for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {
-      ol.events.unlistenByKey(this.keyHandlerKeys_[i]);
-    }
-    this.keyHandlerKeys_ = null;
-  }
-
-  if (!targetElement) {
-    this.renderer_.removeLayerRenderers();
-    ol.dom.removeNode(this.viewport_);
-    if (this.handleResize_ !== undefined) {
-      window.removeEventListener(ol.events.EventType.RESIZE,
-          this.handleResize_, false);
-      this.handleResize_ = undefined;
-    }
-  } else {
-    targetElement.appendChild(this.viewport_);
-
-    var keyboardEventTarget = !this.keyboardEventTarget_ ?
-      targetElement : this.keyboardEventTarget_;
-    this.keyHandlerKeys_ = [
-      ol.events.listen(keyboardEventTarget, ol.events.EventType.KEYDOWN,
-          this.handleBrowserEvent, this),
-      ol.events.listen(keyboardEventTarget, ol.events.EventType.KEYPRESS,
-          this.handleBrowserEvent, this)
-    ];
-
-    if (!this.handleResize_) {
-      this.handleResize_ = this.updateSize.bind(this);
-      window.addEventListener(ol.events.EventType.RESIZE,
-          this.handleResize_, false);
-    }
-  }
-
-  this.updateSize();
-  // updateSize calls setSize, so no need to call this.render
-  // ourselves here.
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleTileChange_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleViewPropertyChanged_ = function() {
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleViewChanged_ = function() {
-  if (this.viewPropertyListenerKey_) {
-    ol.events.unlistenByKey(this.viewPropertyListenerKey_);
-    this.viewPropertyListenerKey_ = null;
-  }
-  if (this.viewChangeListenerKey_) {
-    ol.events.unlistenByKey(this.viewChangeListenerKey_);
-    this.viewChangeListenerKey_ = null;
-  }
-  var view = this.getView();
-  if (view) {
-    this.viewport_.setAttribute('data-view', ol.getUid(view));
-    this.viewPropertyListenerKey_ = ol.events.listen(
-        view, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleViewPropertyChanged_, this);
-    this.viewChangeListenerKey_ = ol.events.listen(
-        view, ol.events.EventType.CHANGE,
-        this.handleViewPropertyChanged_, this);
-  }
-  this.render();
-};
-
-
-/**
- * @private
- */
-ol.PluggableMap.prototype.handleLayerGroupChanged_ = function() {
-  if (this.layerGroupPropertyListenerKeys_) {
-    this.layerGroupPropertyListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.layerGroupPropertyListenerKeys_ = null;
-  }
-  var layerGroup = this.getLayerGroup();
-  if (layerGroup) {
-    this.layerGroupPropertyListenerKeys_ = [
-      ol.events.listen(
-          layerGroup, ol.ObjectEventType.PROPERTYCHANGE,
-          this.render, this),
-      ol.events.listen(
-          layerGroup, ol.events.EventType.CHANGE,
-          this.render, this)
-    ];
-  }
-  this.render();
-};
-
-
-/**
- * @return {boolean} Is rendered.
- */
-ol.PluggableMap.prototype.isRendered = function() {
-  return !!this.frameState_;
-};
-
-
-/**
- * Requests an immediate render in a synchronous manner.
- * @api
- */
-ol.PluggableMap.prototype.renderSync = function() {
-  if (this.animationDelayKey_) {
-    cancelAnimationFrame(this.animationDelayKey_);
-  }
-  this.animationDelay_();
-};
-
-
-/**
- * Request a map rendering (at the next animation frame).
- * @api
- */
-ol.PluggableMap.prototype.render = function() {
-  if (this.animationDelayKey_ === undefined) {
-    this.animationDelayKey_ = requestAnimationFrame(
-        this.animationDelay_);
-  }
-};
-
-
-/**
- * Remove the given control from the map.
- * @param {ol.control.Control} control Control.
- * @return {ol.control.Control|undefined} The removed control (or undefined
- *     if the control was not found).
- * @api
- */
-ol.PluggableMap.prototype.removeControl = function(control) {
-  return this.getControls().remove(control);
-};
-
-
-/**
- * Remove the given interaction from the map.
- * @param {ol.interaction.Interaction} interaction Interaction to remove.
- * @return {ol.interaction.Interaction|undefined} The removed interaction (or
- *     undefined if the interaction was not found).
- * @api
- */
-ol.PluggableMap.prototype.removeInteraction = function(interaction) {
-  return this.getInteractions().remove(interaction);
-};
-
-
-/**
- * Removes the given layer from the map.
- * @param {ol.layer.Base} layer Layer.
- * @return {ol.layer.Base|undefined} The removed layer (or undefined if the
- *     layer was not found).
- * @api
- */
-ol.PluggableMap.prototype.removeLayer = function(layer) {
-  var layers = this.getLayerGroup().getLayers();
-  return layers.remove(layer);
-};
-
-
-/**
- * Remove the given overlay from the map.
- * @param {ol.Overlay} overlay Overlay.
- * @return {ol.Overlay|undefined} The removed overlay (or undefined
- *     if the overlay was not found).
- * @api
- */
-ol.PluggableMap.prototype.removeOverlay = function(overlay) {
-  return this.getOverlays().remove(overlay);
-};
-
-
-/**
- * @param {number} time Time.
- * @private
- */
-ol.PluggableMap.prototype.renderFrame_ = function(time) {
-  var i, ii, viewState;
-
-  var size = this.getSize();
-  var view = this.getView();
-  var extent = ol.extent.createEmpty();
-  var previousFrameState = this.frameState_;
-  /** @type {?olx.FrameState} */
-  var frameState = null;
-  if (size !== undefined && ol.size.hasArea(size) && view && view.isDef()) {
-    var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);
-    var layerStatesArray = this.getLayerGroup().getLayerStatesArray();
-    var layerStates = {};
-    for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-      layerStates[ol.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
-    }
-    viewState = view.getState();
-    var center = viewState.center;
-    var pixelResolution = viewState.resolution / this.pixelRatio_;
-    center[0] = Math.round(center[0] / pixelResolution) * pixelResolution;
-    center[1] = Math.round(center[1] / pixelResolution) * pixelResolution;
-    frameState = /** @type {olx.FrameState} */ ({
-      animate: false,
-      coordinateToPixelTransform: this.coordinateToPixelTransform_,
-      extent: extent,
-      focus: !this.focus_ ? center : this.focus_,
-      index: this.frameIndex_++,
-      layerStates: layerStates,
-      layerStatesArray: layerStatesArray,
-      logos: ol.obj.assign({}, this.logos_),
-      pixelRatio: this.pixelRatio_,
-      pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
-      postRenderFunctions: [],
-      size: size,
-      skippedFeatureUids: this.skippedFeatureUids_,
-      tileQueue: this.tileQueue_,
-      time: time,
-      usedTiles: {},
-      viewState: viewState,
-      viewHints: viewHints,
-      wantedTiles: {}
-    });
-  }
-
-  if (frameState) {
-    frameState.extent = ol.extent.getForViewAndSize(viewState.center,
-        viewState.resolution, viewState.rotation, frameState.size, extent);
-  }
-
-  this.frameState_ = frameState;
-  this.renderer_.renderFrame(frameState);
-
-  if (frameState) {
-    if (frameState.animate) {
-      this.render();
-    }
-    Array.prototype.push.apply(
-        this.postRenderFunctions_, frameState.postRenderFunctions);
-
-    if (previousFrameState) {
-      var moveStart = !this.previousExtent_ ||
-                  (!ol.extent.isEmpty(this.previousExtent_) &&
-                  !ol.extent.equals(frameState.extent, this.previousExtent_));
-      if (moveStart) {
-        this.dispatchEvent(
-            new ol.MapEvent(ol.MapEventType.MOVESTART, this, previousFrameState));
-        this.previousExtent_ = ol.extent.createOrUpdateEmpty(this.previousExtent_);
-      }
-    }
-
-    var idle = this.previousExtent_ &&
-        !frameState.viewHints[ol.ViewHint.ANIMATING] &&
-        !frameState.viewHints[ol.ViewHint.INTERACTING] &&
-        !ol.extent.equals(frameState.extent, this.previousExtent_);
-
-    if (idle) {
-      this.dispatchEvent(
-          new ol.MapEvent(ol.MapEventType.MOVEEND, this, frameState));
-      ol.extent.clone(frameState.extent, this.previousExtent_);
-    }
-  }
-
-  this.dispatchEvent(
-      new ol.MapEvent(ol.MapEventType.POSTRENDER, this, frameState));
-
-  setTimeout(this.handlePostRender.bind(this), 0);
-
-};
-
-
-/**
- * Sets the layergroup of this map.
- * @param {ol.layer.Group} layerGroup A layer group containing the layers in
- *     this map.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.setLayerGroup = function(layerGroup) {
-  this.set(ol.MapProperty.LAYERGROUP, layerGroup);
-};
-
-
-/**
- * Set the size of this map.
- * @param {ol.Size|undefined} size The size in pixels of the map in the DOM.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.setSize = function(size) {
-  this.set(ol.MapProperty.SIZE, size);
-};
-
-
-/**
- * Set the target element to render this map into.
- * @param {Element|string|undefined} target The Element or id of the Element
- *     that the map is rendered in.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.setTarget = function(target) {
-  this.set(ol.MapProperty.TARGET, target);
-};
-
-
-/**
- * Set the view for this map.
- * @param {ol.View} view The view that controls this map.
- * @observable
- * @api
- */
-ol.PluggableMap.prototype.setView = function(view) {
-  this.set(ol.MapProperty.VIEW, view);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- */
-ol.PluggableMap.prototype.skipFeature = function(feature) {
-  var featureUid = ol.getUid(feature).toString();
-  this.skippedFeatureUids_[featureUid] = true;
-  this.render();
-};
-
-
-/**
- * Force a recalculation of the map viewport size.  This should be called when
- * third-party code changes the size of the map viewport.
- * @api
- */
-ol.PluggableMap.prototype.updateSize = function() {
-  var targetElement = this.getTargetElement();
-
-  if (!targetElement) {
-    this.setSize(undefined);
-  } else {
-    var computedStyle = getComputedStyle(targetElement);
-    this.setSize([
-      targetElement.offsetWidth -
-          parseFloat(computedStyle['borderLeftWidth']) -
-          parseFloat(computedStyle['paddingLeft']) -
-          parseFloat(computedStyle['paddingRight']) -
-          parseFloat(computedStyle['borderRightWidth']),
-      targetElement.offsetHeight -
-          parseFloat(computedStyle['borderTopWidth']) -
-          parseFloat(computedStyle['paddingTop']) -
-          parseFloat(computedStyle['paddingBottom']) -
-          parseFloat(computedStyle['borderBottomWidth'])
-    ]);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- */
-ol.PluggableMap.prototype.unskipFeature = function(feature) {
-  var featureUid = ol.getUid(feature).toString();
-  delete this.skippedFeatureUids_[featureUid];
-  this.render();
-};
-
-
-/**
- * @type {Array.<ol.renderer.Type>}
- * @const
- */
-ol.PluggableMap.DEFAULT_RENDERER_TYPES = [
-  ol.renderer.Type.CANVAS,
-  ol.renderer.Type.WEBGL
-];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.PluggableMap.LOGO_URL = 'data:image/png;base64,' +
-    'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBI' +
-    'WXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAA' +
-    'AhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszW' +
-    'WMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvY' +
-    'asvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvX' +
-    'H1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1Vk' +
-    'bMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW' +
-    '2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLP' +
-    'VcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqT' +
-    'acrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaar' +
-    'ldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+Hi' +
-    'zeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDn' +
-    'BAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSF' +
-    'hYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJ' +
-    'REFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxC' +
-    'Brb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe' +
-    '0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8' +
-    'a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7a' +
-    'hgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCn' +
-    'B3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDg' +
-    'q82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC';
-
-
-/**
- * @param {olx.MapOptions} options Map options.
- * @return {ol.MapOptionsInternal} Internal map options.
- */
-ol.PluggableMap.createOptionsInternal = function(options) {
-
-  /**
-   * @type {Element|Document}
-   */
-  var keyboardEventTarget = null;
-  if (options.keyboardEventTarget !== undefined) {
-    keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ?
-      document.getElementById(options.keyboardEventTarget) :
-      options.keyboardEventTarget;
-  }
-
-  /**
-   * @type {Object.<string, *>}
-   */
-  var values = {};
-
-  var logos = {};
-  if (options.logo === undefined ||
-      (typeof options.logo === 'boolean' && options.logo)) {
-    logos[ol.PluggableMap.LOGO_URL] = 'https://openlayers.org/';
-  } else {
-    var logo = options.logo;
-    if (typeof logo === 'string') {
-      logos[logo] = '';
-    } else if (logo instanceof HTMLElement) {
-      logos[ol.getUid(logo).toString()] = logo;
-    } else if (logo) {
-      ol.asserts.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
-      ol.asserts.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
-      logos[logo.src] = logo.href;
-    }
-  }
-
-  var layerGroup = (options.layers instanceof ol.layer.Group) ?
-    options.layers : new ol.layer.Group({layers: options.layers});
-  values[ol.MapProperty.LAYERGROUP] = layerGroup;
-
-  values[ol.MapProperty.TARGET] = options.target;
-
-  values[ol.MapProperty.VIEW] = options.view !== undefined ?
-    options.view : new ol.View();
-
-  /**
-   * @type {Array.<ol.renderer.Type>}
-   */
-  var rendererTypes;
-
-  if (options.renderer !== undefined) {
-    if (Array.isArray(options.renderer)) {
-      rendererTypes = options.renderer;
-    } else if (typeof options.renderer === 'string') {
-      rendererTypes = [options.renderer];
-    } else {
-      ol.asserts.assert(false, 46); // Incorrect format for `renderer` option
-    }
-    if (rendererTypes.indexOf(/** @type {ol.renderer.Type} */ ('dom')) >= 0) {
-      rendererTypes = rendererTypes.concat(ol.PluggableMap.DEFAULT_RENDERER_TYPES);
-    }
-  } else {
-    rendererTypes = ol.PluggableMap.DEFAULT_RENDERER_TYPES;
-  }
-
-  /**
-   * @type {olx.MapRendererPlugin}
-   */
-  var mapRendererPlugin;
-
-  var mapRendererPlugins = ol.plugins.getMapRendererPlugins();
-  outer: for (var i = 0, ii = rendererTypes.length; i < ii; ++i) {
-    var rendererType = rendererTypes[i];
-    for (var j = 0, jj = mapRendererPlugins.length; j < jj; ++j) {
-      var candidate = mapRendererPlugins[j];
-      if (candidate['handles'](rendererType)) {
-        mapRendererPlugin = candidate;
-        break outer;
-      }
-    }
-  }
-
-  if (!mapRendererPlugin) {
-    throw new Error('Unable to create a map renderer for types: ' +  rendererTypes.join(', '));
-  }
-
-  var controls;
-  if (options.controls !== undefined) {
-    if (Array.isArray(options.controls)) {
-      controls = new ol.Collection(options.controls.slice());
-    } else {
-      ol.asserts.assert(options.controls instanceof ol.Collection,
-          47); // Expected `controls` to be an array or an `ol.Collection`
-      controls = options.controls;
-    }
-  }
-
-  var interactions;
-  if (options.interactions !== undefined) {
-    if (Array.isArray(options.interactions)) {
-      interactions = new ol.Collection(options.interactions.slice());
-    } else {
-      ol.asserts.assert(options.interactions instanceof ol.Collection,
-          48); // Expected `interactions` to be an array or an `ol.Collection`
-      interactions = options.interactions;
-    }
-  }
-
-  var overlays;
-  if (options.overlays !== undefined) {
-    if (Array.isArray(options.overlays)) {
-      overlays = new ol.Collection(options.overlays.slice());
-    } else {
-      ol.asserts.assert(options.overlays instanceof ol.Collection,
-          49); // Expected `overlays` to be an array or an `ol.Collection`
-      overlays = options.overlays;
-    }
-  } else {
-    overlays = new ol.Collection();
-  }
-
-  return {
-    controls: controls,
-    interactions: interactions,
-    keyboardEventTarget: keyboardEventTarget,
-    logos: logos,
-    overlays: overlays,
-    mapRendererPlugin: mapRendererPlugin,
-    values: values
-  };
-
-};
-
-goog.provide('ol.control.Control');
-
-goog.require('ol');
-goog.require('ol.MapEventType');
-goog.require('ol.Object');
-goog.require('ol.dom');
-goog.require('ol.events');
-
-
-/**
- * @classdesc
- * A control is a visible widget with a DOM element in a fixed position on the
- * screen. They can involve user input (buttons), or be informational only;
- * the position is determined using CSS. By default these are placed in the
- * container with CSS class name `ol-overlaycontainer-stopevent`, but can use
- * any outside DOM element.
- *
- * This is the base class for controls. You can use it for simple custom
- * controls by creating the element with listeners, creating an instance:
- * ```js
- * var myControl = new ol.control.Control({element: myElement});
- * ```
- * and then adding this to the map.
- *
- * The main advantage of having this as a control rather than a simple separate
- * DOM element is that preventing propagation is handled for you. Controls
- * will also be `ol.Object`s in a `ol.Collection`, so you can use their
- * methods.
- *
- * You can also extend this base for your own control class. See
- * examples/custom-controls for an example of how to do this.
- *
- * @constructor
- * @extends {ol.Object}
- * @implements {oli.control.Control}
- * @param {olx.control.ControlOptions} options Control options.
- * @api
- */
-ol.control.Control = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @protected
-   * @type {Element}
-   */
-  this.element = options.element ? options.element : null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.target_ = null;
-
-  /**
-   * @private
-   * @type {ol.PluggableMap}
-   */
-  this.map_ = null;
-
-  /**
-   * @protected
-   * @type {!Array.<ol.EventsKey>}
-   */
-  this.listenerKeys = [];
-
-  /**
-   * @type {function(ol.MapEvent)}
-   */
-  this.render = options.render ? options.render : ol.nullFunction;
-
-  if (options.target) {
-    this.setTarget(options.target);
-  }
-
-};
-ol.inherits(ol.control.Control, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.control.Control.prototype.disposeInternal = function() {
-  ol.dom.removeNode(this.element);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the map associated with this control.
- * @return {ol.PluggableMap} Map.
- * @api
- */
-ol.control.Control.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * Remove the control from its current map and attach it to the new map.
- * Subclasses may set up event handlers to get notified about changes to
- * the map here.
- * @param {ol.PluggableMap} map Map.
- * @override
- * @api
- */
-ol.control.Control.prototype.setMap = function(map) {
-  if (this.map_) {
-    ol.dom.removeNode(this.element);
-  }
-  for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {
-    ol.events.unlistenByKey(this.listenerKeys[i]);
-  }
-  this.listenerKeys.length = 0;
-  this.map_ = map;
-  if (this.map_) {
-    var target = this.target_ ?
-      this.target_ : map.getOverlayContainerStopEvent();
-    target.appendChild(this.element);
-    if (this.render !== ol.nullFunction) {
-      this.listenerKeys.push(ol.events.listen(map,
-          ol.MapEventType.POSTRENDER, this.render, this));
-    }
-    map.render();
-  }
-};
-
-
-/**
- * This function is used to set a target element for the control. It has no
- * effect if it is called after the control has been added to the map (i.e.
- * after `setMap` is called on the control). If no `target` is set in the
- * options passed to the control constructor and if `setTarget` is not called
- * then the control is added to the map's overlay container.
- * @param {Element|string} target Target.
- * @api
- */
-ol.control.Control.prototype.setTarget = function(target) {
-  this.target_ = typeof target === 'string' ?
-    document.getElementById(target) :
-    target;
-};
-
-goog.provide('ol.css');
-
-
-/**
- * The CSS class for hidden feature.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_HIDDEN = 'ol-hidden';
-
-
-/**
- * The CSS class that we'll give the DOM elements to have them selectable.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_SELECTABLE = 'ol-selectable';
-
-/**
- * The CSS class that we'll give the DOM elements to have them unselectable.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_UNSELECTABLE = 'ol-unselectable';
-
-
-/**
- * The CSS class for unsupported feature.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_UNSUPPORTED = 'ol-unsupported';
-
-
-/**
- * The CSS class for controls.
- *
- * @const
- * @type {string}
- */
-ol.css.CLASS_CONTROL = 'ol-control';
-
-
-/**
- * Get the list of font families from a font spec.  Note that this doesn't work
- * for font families that have commas in them.
- * @param {string} The CSS font property.
- * @return {Object.<string>} The font families (or null if the input spec is invalid).
- */
-ol.css.getFontFamilies = (function() {
-  var style;
-  var cache = {};
-  return function(font) {
-    if (!style) {
-      style = document.createElement('div').style;
-    }
-    if (!(font in cache)) {
-      style.font = font;
-      var family = style.fontFamily;
-      style.font = '';
-      if (!family) {
-        return null;
-      }
-      cache[font] = family.split(/,\s?/);
-    }
-    return cache[font];
-  };
-})();
-
-goog.provide('ol.render.EventType');
-
-/**
- * @enum {string}
- */
-ol.render.EventType = {
-  /**
-   * @event ol.render.Event#postcompose
-   * @api
-   */
-  POSTCOMPOSE: 'postcompose',
-  /**
-   * @event ol.render.Event#precompose
-   * @api
-   */
-  PRECOMPOSE: 'precompose',
-  /**
-   * @event ol.render.Event#render
-   * @api
-   */
-  RENDER: 'render'
-};
-
-goog.provide('ol.layer.Layer');
-
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.layer.Base');
-goog.require('ol.layer.Property');
-goog.require('ol.obj');
-goog.require('ol.render.EventType');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * A visual representation of raster or vector map data.
- * Layers group together those properties that pertain to how the data is to be
- * displayed, irrespective of the source of that data.
- *
- * Layers are usually added to a map with {@link ol.Map#addLayer}. Components
- * like {@link ol.interaction.Select} use unmanaged layers internally. These
- * unmanaged layers are associated with the map using
- * {@link ol.layer.Layer#setMap} instead.
- *
- * A generic `change` event is fired when the state of the source changes.
- *
- * @constructor
- * @abstract
- * @extends {ol.layer.Base}
- * @fires ol.render.Event
- * @param {olx.layer.LayerOptions} options Layer options.
- * @api
- */
-ol.layer.Layer = function(options) {
-
-  var baseOptions = ol.obj.assign({}, options);
-  delete baseOptions.source;
-
-  ol.layer.Base.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.mapPrecomposeKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.mapRenderKey_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.sourceChangeKey_ = null;
-
-  if (options.map) {
-    this.setMap(options.map);
-  }
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Property.SOURCE),
-      this.handleSourcePropertyChange_, this);
-
-  var source = options.source ? options.source : null;
-  this.setSource(source);
-};
-ol.inherits(ol.layer.Layer, ol.layer.Base);
-
-
-/**
- * Return `true` if the layer is visible, and if the passed resolution is
- * between the layer's minResolution and maxResolution. The comparison is
- * inclusive for `minResolution` and exclusive for `maxResolution`.
- * @param {ol.LayerState} layerState Layer state.
- * @param {number} resolution Resolution.
- * @return {boolean} The layer is visible at the given resolution.
- */
-ol.layer.Layer.visibleAtResolution = function(layerState, resolution) {
-  return layerState.visible && resolution >= layerState.minResolution &&
-      resolution < layerState.maxResolution;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Layer.prototype.getLayersArray = function(opt_array) {
-  var array = opt_array ? opt_array : [];
-  array.push(this);
-  return array;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.layer.Layer.prototype.getLayerStatesArray = function(opt_states) {
-  var states = opt_states ? opt_states : [];
-  states.push(this.getLayerState());
-  return states;
-};
-
-
-/**
- * Get the layer source.
- * @return {ol.source.Source} The layer source (or `null` if not yet set).
- * @observable
- * @api
- */
-ol.layer.Layer.prototype.getSource = function() {
-  var source = this.get(ol.layer.Property.SOURCE);
-  return /** @type {ol.source.Source} */ (source) || null;
-};
-
-
-/**
-  * @inheritDoc
-  */
-ol.layer.Layer.prototype.getSourceState = function() {
-  var source = this.getSource();
-  return !source ? ol.source.State.UNDEFINED : source.getState();
-};
-
-
-/**
- * @private
- */
-ol.layer.Layer.prototype.handleSourceChange_ = function() {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.layer.Layer.prototype.handleSourcePropertyChange_ = function() {
-  if (this.sourceChangeKey_) {
-    ol.events.unlistenByKey(this.sourceChangeKey_);
-    this.sourceChangeKey_ = null;
-  }
-  var source = this.getSource();
-  if (source) {
-    this.sourceChangeKey_ = ol.events.listen(source,
-        ol.events.EventType.CHANGE, this.handleSourceChange_, this);
-  }
-  this.changed();
-};
-
-
-/**
- * Sets the layer to be rendered on top of other layers on a map. The map will
- * not manage this layer in its layers collection, and the callback in
- * {@link ol.Map#forEachLayerAtPixel} will receive `null` as layer. This
- * is useful for temporary layers. To remove an unmanaged layer from the map,
- * use `#setMap(null)`.
- *
- * To add the layer to a map and have it managed by the map, use
- * {@link ol.Map#addLayer} instead.
- * @param {ol.PluggableMap} map Map.
- * @api
- */
-ol.layer.Layer.prototype.setMap = function(map) {
-  if (this.mapPrecomposeKey_) {
-    ol.events.unlistenByKey(this.mapPrecomposeKey_);
-    this.mapPrecomposeKey_ = null;
-  }
-  if (!map) {
-    this.changed();
-  }
-  if (this.mapRenderKey_) {
-    ol.events.unlistenByKey(this.mapRenderKey_);
-    this.mapRenderKey_ = null;
-  }
-  if (map) {
-    this.mapPrecomposeKey_ = ol.events.listen(
-        map, ol.render.EventType.PRECOMPOSE, function(evt) {
-          var layerState = this.getLayerState();
-          layerState.managed = false;
-          layerState.zIndex = Infinity;
-          evt.frameState.layerStatesArray.push(layerState);
-          evt.frameState.layerStates[ol.getUid(this)] = layerState;
-        }, this);
-    this.mapRenderKey_ = ol.events.listen(
-        this, ol.events.EventType.CHANGE, map.render, map);
-    this.changed();
-  }
-};
-
-
-/**
- * Set the layer source.
- * @param {ol.source.Source} source The layer source.
- * @observable
- * @api
- */
-ol.layer.Layer.prototype.setSource = function(source) {
-  this.set(ol.layer.Property.SOURCE, source);
-};
-
-// FIXME handle date line wrap
-
-goog.provide('ol.control.Attribution');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.layer.Layer');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Control to show all the attributions associated with the layer sources
- * in the map. This control is one of the default controls included in maps.
- * By default it will show in the bottom right portion of the map, but this can
- * be changed by using a css selector for `.ol-attribution`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.AttributionOptions=} opt_options Attribution options.
- * @api
- */
-ol.control.Attribution = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.ulElement_ = document.createElement('UL');
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.logoLi_ = document.createElement('LI');
-
-  this.ulElement_.appendChild(this.logoLi_);
-  this.logoLi_.style.display = 'none';
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsible_ = options.collapsible !== undefined ?
-    options.collapsible : true;
-
-  if (!this.collapsible_) {
-    this.collapsed_ = false;
-  }
-
-  var className = options.className !== undefined ? options.className : 'ol-attribution';
-
-  var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';
-
-  var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00BB';
-
-  if (typeof collapseLabel === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.collapseLabel_ = document.createElement('span');
-    this.collapseLabel_.textContent = collapseLabel;
-  } else {
-    this.collapseLabel_ = collapseLabel;
-  }
-
-  var label = options.label !== undefined ? options.label : 'i';
-
-  if (typeof label === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.label_ = document.createElement('span');
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-  }
-
-
-  var activeLabel = (this.collapsible_ && !this.collapsed_) ?
-    this.collapseLabel_ : this.label_;
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(activeLabel);
-
-  ol.events.listen(button, ol.events.EventType.CLICK, this.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL +
-      (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
-      (this.collapsible_ ? '' : ' ol-uncollapsible');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(this.ulElement_);
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.Attribution.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /**
-   * A list of currently rendered resolutions.
-   * @type {Array.<string>}
-   * @private
-   */
-  this.renderedAttributions_ = [];
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = true;
-
-  /**
-   * @private
-   * @type {Object.<string, Element>}
-   */
-  this.logoElements_ = {};
-
-};
-ol.inherits(ol.control.Attribution, ol.control.Control);
-
-
-/**
- * Get a list of visible attributions.
- * @param {olx.FrameState} frameState Frame state.
- * @return {Array.<string>} Attributions.
- * @private
- */
-ol.control.Attribution.prototype.getSourceAttributions_ = function(frameState) {
-  /**
-   * Used to determine if an attribution already exists.
-   * @type {Object.<string, boolean>}
-   */
-  var lookup = {};
-
-  /**
-   * A list of visible attributions.
-   * @type {Array.<string>}
-   */
-  var visibleAttributions = [];
-
-  var layerStatesArray = frameState.layerStatesArray;
-  var resolution = frameState.viewState.resolution;
-  for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    var layerState = layerStatesArray[i];
-    if (!ol.layer.Layer.visibleAtResolution(layerState, resolution)) {
-      continue;
-    }
-
-    var source = layerState.layer.getSource();
-    if (!source) {
-      continue;
-    }
-
-    var attributionGetter = source.getAttributions2();
-    if (!attributionGetter) {
-      continue;
-    }
-
-    var attributions = attributionGetter(frameState);
-    if (!attributions) {
-      continue;
-    }
-
-    if (Array.isArray(attributions)) {
-      for (var j = 0, jj = attributions.length; j < jj; ++j) {
-        if (!(attributions[j] in lookup)) {
-          visibleAttributions.push(attributions[j]);
-          lookup[attributions[j]] = true;
-        }
-      }
-    } else {
-      if (!(attributions in lookup)) {
-        visibleAttributions.push(attributions);
-        lookup[attributions] = true;
-      }
-    }
-  }
-  return visibleAttributions;
-};
-
-
-/**
- * Update the attribution element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.Attribution}
- * @api
- */
-ol.control.Attribution.render = function(mapEvent) {
-  this.updateElement_(mapEvent.frameState);
-};
-
-
-/**
- * @private
- * @param {?olx.FrameState} frameState Frame state.
- */
-ol.control.Attribution.prototype.updateElement_ = function(frameState) {
-  if (!frameState) {
-    if (this.renderedVisible_) {
-      this.element.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var attributions = this.getSourceAttributions_(frameState);
-  if (ol.array.equals(attributions, this.renderedAttributions_)) {
-    return;
-  }
-
-  // remove everything but the logo
-  while (this.ulElement_.lastChild !== this.logoLi_) {
-    this.ulElement_.removeChild(this.ulElement_.lastChild);
-  }
-
-  // append the attributions
-  for (var i = 0, ii = attributions.length; i < ii; ++i) {
-    var element = document.createElement('LI');
-    element.innerHTML = attributions[i];
-    this.ulElement_.appendChild(element);
-  }
-
-
-  if (attributions.length === 0 && this.renderedAttributions_.length > 0) {
-    this.element.classList.add('ol-logo-only');
-  } else if (this.renderedAttributions_.length === 0 && attributions.length > 0) {
-    this.element.classList.remove('ol-logo-only');
-  }
-
-  var visible = attributions.length > 0 || !ol.obj.isEmpty(frameState.logos);
-  if (this.renderedVisible_ != visible) {
-    this.element.style.display = visible ? '' : 'none';
-    this.renderedVisible_ = visible;
-  }
-
-  this.renderedAttributions_ = attributions;
-  this.insertLogos_(frameState);
-};
-
-
-/**
- * @param {?olx.FrameState} frameState Frame state.
- * @private
- */
-ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
-
-  var logo;
-  var logos = frameState.logos;
-  var logoElements = this.logoElements_;
-
-  for (logo in logoElements) {
-    if (!(logo in logos)) {
-      ol.dom.removeNode(logoElements[logo]);
-      delete logoElements[logo];
-    }
-  }
-
-  var image, logoElement, logoKey;
-  for (logoKey in logos) {
-    var logoValue = logos[logoKey];
-    if (logoValue instanceof HTMLElement) {
-      this.logoLi_.appendChild(logoValue);
-      logoElements[logoKey] = logoValue;
-    }
-    if (!(logoKey in logoElements)) {
-      image = new Image();
-      image.src = logoKey;
-      if (logoValue === '') {
-        logoElement = image;
-      } else {
-        logoElement = document.createElement('a');
-        logoElement.href = logoValue;
-        logoElement.appendChild(image);
-      }
-      this.logoLi_.appendChild(logoElement);
-      logoElements[logoKey] = logoElement;
-    }
-  }
-
-  this.logoLi_.style.display = !ol.obj.isEmpty(logos) ? '' : 'none';
-
-};
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Attribution.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleToggle_();
-};
-
-
-/**
- * @private
- */
-ol.control.Attribution.prototype.handleToggle_ = function() {
-  this.element.classList.toggle('ol-collapsed');
-  if (this.collapsed_) {
-    ol.dom.replaceNode(this.collapseLabel_, this.label_);
-  } else {
-    ol.dom.replaceNode(this.label_, this.collapseLabel_);
-  }
-  this.collapsed_ = !this.collapsed_;
-};
-
-
-/**
- * Return `true` if the attribution is collapsible, `false` otherwise.
- * @return {boolean} True if the widget is collapsible.
- * @api
- */
-ol.control.Attribution.prototype.getCollapsible = function() {
-  return this.collapsible_;
-};
-
-
-/**
- * Set whether the attribution should be collapsible.
- * @param {boolean} collapsible True if the widget is collapsible.
- * @api
- */
-ol.control.Attribution.prototype.setCollapsible = function(collapsible) {
-  if (this.collapsible_ === collapsible) {
-    return;
-  }
-  this.collapsible_ = collapsible;
-  this.element.classList.toggle('ol-uncollapsible');
-  if (!collapsible && this.collapsed_) {
-    this.handleToggle_();
-  }
-};
-
-
-/**
- * Collapse or expand the attribution according to the passed parameter. Will
- * not do anything if the attribution isn't collapsible or if the current
- * collapsed state is already the one requested.
- * @param {boolean} collapsed True if the widget is collapsed.
- * @api
- */
-ol.control.Attribution.prototype.setCollapsed = function(collapsed) {
-  if (!this.collapsible_ || this.collapsed_ === collapsed) {
-    return;
-  }
-  this.handleToggle_();
-};
-
-
-/**
- * Return `true` when the attribution is currently collapsed or `false`
- * otherwise.
- * @return {boolean} True if the widget is collapsed.
- * @api
- */
-ol.control.Attribution.prototype.getCollapsed = function() {
-  return this.collapsed_;
-};
-
-goog.provide('ol.control.Rotate');
-
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-
-
-/**
- * @classdesc
- * A button control to reset rotation to 0.
- * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css
- * selector is added to the button when the rotation is 0.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.RotateOptions=} opt_options Rotate options.
- * @api
- */
-ol.control.Rotate = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-rotate';
-
-  var label = options.label !== undefined ? options.label : '\u21E7';
-
-  /**
-   * @type {Element}
-   * @private
-   */
-  this.label_ = null;
-
-  if (typeof label === 'string') {
-    this.label_ = document.createElement('span');
-    this.label_.className = 'ol-compass';
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-    this.label_.classList.add('ol-compass');
-  }
-
-  var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';
-
-  var button = document.createElement('button');
-  button.className = className + '-reset';
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(this.label_);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      ol.control.Rotate.prototype.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.Rotate.render;
-
-  this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = undefined;
-
-  if (this.autoHide_) {
-    this.element.classList.add(ol.css.CLASS_HIDDEN);
-  }
-
-};
-ol.inherits(ol.control.Rotate, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Rotate.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  if (this.callResetNorth_ !== undefined) {
-    this.callResetNorth_();
-  } else {
-    this.resetNorth_();
-  }
-};
-
-
-/**
- * @private
- */
-ol.control.Rotate.prototype.resetNorth_ = function() {
-  var map = this.getMap();
-  var view = map.getView();
-  if (!view) {
-    // the map does not have a view, so we can't act
-    // upon it
-    return;
-  }
-  if (view.getRotation() !== undefined) {
-    if (this.duration_ > 0) {
-      view.animate({
-        rotation: 0,
-        duration: this.duration_,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.setRotation(0);
-    }
-  }
-};
-
-
-/**
- * Update the rotate control element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.Rotate}
- * @api
- */
-ol.control.Rotate.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    return;
-  }
-  var rotation = frameState.viewState.rotation;
-  if (rotation != this.rotation_) {
-    var transform = 'rotate(' + rotation + 'rad)';
-    if (this.autoHide_) {
-      var contains = this.element.classList.contains(ol.css.CLASS_HIDDEN);
-      if (!contains && rotation === 0) {
-        this.element.classList.add(ol.css.CLASS_HIDDEN);
-      } else if (contains && rotation !== 0) {
-        this.element.classList.remove(ol.css.CLASS_HIDDEN);
-      }
-    }
-    this.label_.style.msTransform = transform;
-    this.label_.style.webkitTransform = transform;
-    this.label_.style.transform = transform;
-  }
-  this.rotation_ = rotation;
-};
-
-goog.provide('ol.control.Zoom');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-
-
-/**
- * @classdesc
- * A control with 2 buttons, one for zoom in and one for zoom out.
- * This control is one of the default controls of a map. To style this control
- * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomOptions=} opt_options Zoom options.
- * @api
- */
-ol.control.Zoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-zoom';
-
-  var delta = options.delta !== undefined ? options.delta : 1;
-
-  var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';
-  var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\u2212';
-
-  var zoomInTipLabel = options.zoomInTipLabel !== undefined ?
-    options.zoomInTipLabel : 'Zoom in';
-  var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ?
-    options.zoomOutTipLabel : 'Zoom out';
-
-  var inElement = document.createElement('button');
-  inElement.className = className + '-in';
-  inElement.setAttribute('type', 'button');
-  inElement.title = zoomInTipLabel;
-  inElement.appendChild(
-      typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel
-  );
-
-  ol.events.listen(inElement, ol.events.EventType.CLICK,
-      ol.control.Zoom.prototype.handleClick_.bind(this, delta));
-
-  var outElement = document.createElement('button');
-  outElement.className = className + '-out';
-  outElement.setAttribute('type', 'button');
-  outElement.title = zoomOutTipLabel;
-  outElement.appendChild(
-      typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel
-  );
-
-  ol.events.listen(outElement, ol.events.EventType.CLICK,
-      ol.control.Zoom.prototype.handleClick_.bind(this, -delta));
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(inElement);
-  element.appendChild(outElement);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.control.Zoom, ol.control.Control);
-
-
-/**
- * @param {number} delta Zoom delta.
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.Zoom.prototype.handleClick_ = function(delta, event) {
-  event.preventDefault();
-  this.zoomByDelta_(delta);
-};
-
-
-/**
- * @param {number} delta Zoom delta.
- * @private
- */
-ol.control.Zoom.prototype.zoomByDelta_ = function(delta) {
-  var map = this.getMap();
-  var view = map.getView();
-  if (!view) {
-    // the map does not have a view, so we can't act
-    // upon it
-    return;
-  }
-  var currentResolution = view.getResolution();
-  if (currentResolution) {
-    var newResolution = view.constrainResolution(currentResolution, delta);
-    if (this.duration_ > 0) {
-      if (view.getAnimating()) {
-        view.cancelAnimations();
-      }
-      view.animate({
-        resolution: newResolution,
-        duration: this.duration_,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.setResolution(newResolution);
-    }
-  }
-};
-
-goog.provide('ol.control');
-
-goog.require('ol.Collection');
-goog.require('ol.control.Attribution');
-goog.require('ol.control.Rotate');
-goog.require('ol.control.Zoom');
-
-
-/**
- * Set of controls included in maps by default. Unless configured otherwise,
- * this returns a collection containing an instance of each of the following
- * controls:
- * * {@link ol.control.Zoom}
- * * {@link ol.control.Rotate}
- * * {@link ol.control.Attribution}
- *
- * @param {olx.control.DefaultsOptions=} opt_options Defaults options.
- * @return {ol.Collection.<ol.control.Control>} Controls.
- * @api
- */
-ol.control.defaults = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var controls = new ol.Collection();
-
-  var zoomControl = options.zoom !== undefined ? options.zoom : true;
-  if (zoomControl) {
-    controls.push(new ol.control.Zoom(options.zoomOptions));
-  }
-
-  var rotateControl = options.rotate !== undefined ? options.rotate : true;
-  if (rotateControl) {
-    controls.push(new ol.control.Rotate(options.rotateOptions));
-  }
-
-  var attributionControl = options.attribution !== undefined ?
-    options.attribution : true;
-  if (attributionControl) {
-    controls.push(new ol.control.Attribution(options.attributionOptions));
-  }
-
-  return controls;
-
-};
-
-goog.provide('ol.Kinetic');
-
-
-/**
- * @classdesc
- * Implementation of inertial deceleration for map movement.
- *
- * @constructor
- * @param {number} decay Rate of decay (must be negative).
- * @param {number} minVelocity Minimum velocity (pixels/millisecond).
- * @param {number} delay Delay to consider to calculate the kinetic
- *     initial values (milliseconds).
- * @struct
- * @api
- */
-ol.Kinetic = function(decay, minVelocity, delay) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.decay_ = decay;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minVelocity_ = minVelocity;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delay_ = delay;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.points_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.angle_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.initialVelocity_ = 0;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.Kinetic.prototype.begin = function() {
-  this.points_.length = 0;
-  this.angle_ = 0;
-  this.initialVelocity_ = 0;
-};
-
-
-/**
- * @param {number} x X.
- * @param {number} y Y.
- */
-ol.Kinetic.prototype.update = function(x, y) {
-  this.points_.push(x, y, Date.now());
-};
-
-
-/**
- * @return {boolean} Whether we should do kinetic animation.
- */
-ol.Kinetic.prototype.end = function() {
-  if (this.points_.length < 6) {
-    // at least 2 points are required (i.e. there must be at least 6 elements
-    // in the array)
-    return false;
-  }
-  var delay = Date.now() - this.delay_;
-  var lastIndex = this.points_.length - 3;
-  if (this.points_[lastIndex + 2] < delay) {
-    // the last tracked point is too old, which means that the user stopped
-    // panning before releasing the map
-    return false;
-  }
-
-  // get the first point which still falls into the delay time
-  var firstIndex = lastIndex - 3;
-  while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {
-    firstIndex -= 3;
-  }
-
-  var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];
-  // we don't want a duration of 0 (divide by zero)
-  // we also make sure the user panned for a duration of at least one frame
-  // (1/60s) to compute sane displacement values
-  if (duration < 1000 / 60) {
-    return false;
-  }
-
-  var dx = this.points_[lastIndex] - this.points_[firstIndex];
-  var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];
-  this.angle_ = Math.atan2(dy, dx);
-  this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;
-  return this.initialVelocity_ > this.minVelocity_;
-};
-
-
-/**
- * @return {number} Total distance travelled (pixels).
- */
-ol.Kinetic.prototype.getDistance = function() {
-  return (this.minVelocity_ - this.initialVelocity_) / this.decay_;
-};
-
-
-/**
- * @return {number} Angle of the kinetic panning animation (radians).
- */
-ol.Kinetic.prototype.getAngle = function() {
-  return this.angle_;
-};
-
-goog.provide('ol.interaction.Property');
-
-/**
- * @enum {string}
- */
-ol.interaction.Property = {
-  ACTIVE: 'active'
-};
-
-// FIXME factor out key precondition (shift et. al)
-
-goog.provide('ol.interaction.Interaction');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.easing');
-goog.require('ol.interaction.Property');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * User actions that change the state of the map. Some are similar to controls,
- * but are not associated with a DOM element.
- * For example, {@link ol.interaction.KeyboardZoom} is functionally the same as
- * {@link ol.control.Zoom}, but triggered by a keyboard event not a button
- * element event.
- * Although interactions do not have a DOM element, some of them do render
- * vectors and so are visible on the screen.
- *
- * @constructor
- * @param {olx.interaction.InteractionOptions} options Options.
- * @extends {ol.Object}
- * @api
- */
-ol.interaction.Interaction = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.PluggableMap}
-   */
-  this.map_ = null;
-
-  this.setActive(true);
-
-  /**
-   * @type {function(ol.MapBrowserEvent):boolean}
-   */
-  this.handleEvent = options.handleEvent;
-
-};
-ol.inherits(ol.interaction.Interaction, ol.Object);
-
-
-/**
- * Return whether the interaction is currently active.
- * @return {boolean} `true` if the interaction is active, `false` otherwise.
- * @observable
- * @api
- */
-ol.interaction.Interaction.prototype.getActive = function() {
-  return /** @type {boolean} */ (
-    this.get(ol.interaction.Property.ACTIVE));
-};
-
-
-/**
- * Get the map associated with this interaction.
- * @return {ol.PluggableMap} Map.
- * @api
- */
-ol.interaction.Interaction.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * Activate or deactivate the interaction.
- * @param {boolean} active Active.
- * @observable
- * @api
- */
-ol.interaction.Interaction.prototype.setActive = function(active) {
-  this.set(ol.interaction.Property.ACTIVE, active);
-};
-
-
-/**
- * Remove the interaction from its current map and attach it to the new map.
- * Subclasses may set up event handlers to get notified about changes to
- * the map here.
- * @param {ol.PluggableMap} map Map.
- */
-ol.interaction.Interaction.prototype.setMap = function(map) {
-  this.map_ = map;
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {ol.Coordinate} delta Delta.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.pan = function(view, delta, opt_duration) {
-  var currentCenter = view.getCenter();
-  if (currentCenter) {
-    var center = view.constrainCenter(
-        [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);
-    if (opt_duration) {
-      view.animate({
-        duration: opt_duration,
-        easing: ol.easing.linear,
-        center: center
-      });
-    } else {
-      view.setCenter(center);
-    }
-  }
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} rotation Rotation.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.rotate = function(view, rotation, opt_anchor, opt_duration) {
-  rotation = view.constrainRotation(rotation, 0);
-  ol.interaction.Interaction.rotateWithoutConstraints(
-      view, rotation, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} rotation Rotation.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.rotateWithoutConstraints = function(view, rotation, opt_anchor, opt_duration) {
-  if (rotation !== undefined) {
-    var currentRotation = view.getRotation();
-    var currentCenter = view.getCenter();
-    if (currentRotation !== undefined && currentCenter && opt_duration > 0) {
-      view.animate({
-        rotation: rotation,
-        anchor: opt_anchor,
-        duration: opt_duration,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      view.rotate(rotation, opt_anchor);
-    }
-  }
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} resolution Resolution to go to.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- * @param {number=} opt_direction Zooming direction; > 0 indicates
- *     zooming out, in which case the constraints system will select
- *     the largest nearest resolution; < 0 indicates zooming in, in
- *     which case the constraints system will select the smallest
- *     nearest resolution; == 0 indicates that the zooming direction
- *     is unknown/not relevant, in which case the constraints system
- *     will select the nearest resolution. If not defined 0 is
- *     assumed.
- */
-ol.interaction.Interaction.zoom = function(view, resolution, opt_anchor, opt_duration, opt_direction) {
-  resolution = view.constrainResolution(resolution, 0, opt_direction);
-  ol.interaction.Interaction.zoomWithoutConstraints(
-      view, resolution, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number} delta Delta from previous zoom level.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.zoomByDelta = function(view, delta, opt_anchor, opt_duration) {
-  var currentResolution = view.getResolution();
-  var resolution = view.constrainResolution(currentResolution, delta, 0);
-
-  if (resolution !== undefined) {
-    var resolutions = view.getResolutions();
-    resolution = ol.math.clamp(
-        resolution,
-        view.getMinResolution() || resolutions[resolutions.length - 1],
-        view.getMaxResolution() || resolutions[0]);
-  }
-
-  // If we have a constraint on center, we need to change the anchor so that the
-  // new center is within the extent. We first calculate the new center, apply
-  // the constraint to it, and then calculate back the anchor
-  if (opt_anchor && resolution !== undefined && resolution !== currentResolution) {
-    var currentCenter = view.getCenter();
-    var center = view.calculateCenterZoom(resolution, opt_anchor);
-    center = view.constrainCenter(center);
-
-    opt_anchor = [
-      (resolution * currentCenter[0] - currentResolution * center[0]) /
-          (resolution - currentResolution),
-      (resolution * currentCenter[1] - currentResolution * center[1]) /
-          (resolution - currentResolution)
-    ];
-  }
-
-  ol.interaction.Interaction.zoomWithoutConstraints(
-      view, resolution, opt_anchor, opt_duration);
-};
-
-
-/**
- * @param {ol.View} view View.
- * @param {number|undefined} resolution Resolution to go to.
- * @param {ol.Coordinate=} opt_anchor Anchor coordinate.
- * @param {number=} opt_duration Duration.
- */
-ol.interaction.Interaction.zoomWithoutConstraints = function(view, resolution, opt_anchor, opt_duration) {
-  if (resolution) {
-    var currentResolution = view.getResolution();
-    var currentCenter = view.getCenter();
-    if (currentResolution !== undefined && currentCenter &&
-        resolution !== currentResolution && opt_duration) {
-      view.animate({
-        resolution: resolution,
-        anchor: opt_anchor,
-        duration: opt_duration,
-        easing: ol.easing.easeOut
-      });
-    } else {
-      if (opt_anchor) {
-        var center = view.calculateCenterZoom(resolution, opt_anchor);
-        view.setCenter(center);
-      }
-      view.setResolution(resolution);
-    }
-  }
-};
-
-goog.provide('ol.interaction.DoubleClickZoom');
-
-goog.require('ol');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to zoom by double-clicking on the map.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.DoubleClickZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DoubleClickZoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = options.delta ? options.delta : 1;
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.DoubleClickZoom.handleEvent
-  });
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.interaction.DoubleClickZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
- * doubleclick) and eventually zooms the map.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.DoubleClickZoom}
- * @api
- */
-ol.interaction.DoubleClickZoom.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  var browserEvent = mapBrowserEvent.originalEvent;
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK) {
-    var map = mapBrowserEvent.map;
-    var anchor = mapBrowserEvent.coordinate;
-    var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;
-    var view = map.getView();
-    ol.interaction.Interaction.zoomByDelta(
-        view, delta, anchor, this.duration_);
-    mapBrowserEvent.preventDefault();
-    stopEvent = true;
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.events.condition');
-
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.asserts');
-goog.require('ol.functions');
-goog.require('ol.has');
-
-
-/**
- * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when
- * additionally the shift-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the alt key is pressed.
- * @api
- */
-ol.events.condition.altKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-    originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise
- * (e.g. when additionally the platform-modifier-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the alt and shift keys are pressed.
- * @api
- */
-ol.events.condition.altShiftKeysOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-    originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      originalEvent.shiftKey);
-};
-
-
-/**
- * Return always true.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True.
- * @function
- * @api
- */
-ol.events.condition.always = ol.functions.TRUE;
-
-
-/**
- * Return `true` if the event is a `click` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `click` event.
- * @api
- */
-ol.events.condition.click = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.CLICK;
-};
-
-
-/**
- * Return `true` if the event has an "action"-producing mouse button.
- *
- * By definition, this includes left-click on windows/linux, and left-click
- * without the ctrl key on Macs.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} The result.
- */
-ol.events.condition.mouseActionButton = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return originalEvent.button == 0 &&
-      !(ol.has.WEBKIT && ol.has.MAC && originalEvent.ctrlKey);
-};
-
-
-/**
- * Return always false.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} False.
- * @function
- * @api
- */
-ol.events.condition.never = ol.functions.FALSE;
-
-
-/**
- * Return `true` if the browser event is a `pointermove` event, `false`
- * otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the browser event is a `pointermove` event.
- * @api
- */
-ol.events.condition.pointerMove = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == 'pointermove';
-};
-
-
-/**
- * Return `true` if the event is a map `singleclick` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `singleclick` event.
- * @api
- */
-ol.events.condition.singleClick = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK;
-};
-
-
-/**
- * Return `true` if the event is a map `dblclick` event, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event is a map `dblclick` event.
- * @api
- */
-ol.events.condition.doubleClick = function(mapBrowserEvent) {
-  return mapBrowserEvent.type == ol.MapBrowserEventType.DBLCLICK;
-};
-
-
-/**
- * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is
- * pressed.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True only if there no modifier keys are pressed.
- * @api
- */
-ol.events.condition.noModifierKeys = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-    !originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the platform-modifier-key (the meta-key on Mac,
- * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally
- * the shift-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the platform modifier key is pressed.
- * @api
- */
-ol.events.condition.platformModifierKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-    !originalEvent.altKey &&
-      (ol.has.MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&
-      !originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when
- * additionally the alt-key is pressed).
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if only the shift key is pressed.
- * @api
- */
-ol.events.condition.shiftKeyOnly = function(mapBrowserEvent) {
-  var originalEvent = mapBrowserEvent.originalEvent;
-  return (
-    !originalEvent.altKey &&
-      !(originalEvent.metaKey || originalEvent.ctrlKey) &&
-      originalEvent.shiftKey);
-};
-
-
-/**
- * Return `true` if the target element is not editable, i.e. not a `<input>`-,
- * `<select>`- or `<textarea>`-element, `false` otherwise.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True only if the target element is not editable.
- * @api
- */
-ol.events.condition.targetNotEditable = function(mapBrowserEvent) {
-  var target = mapBrowserEvent.originalEvent.target;
-  var tagName = target.tagName;
-  return (
-    tagName !== 'INPUT' &&
-      tagName !== 'SELECT' &&
-      tagName !== 'TEXTAREA');
-};
-
-
-/**
- * Return `true` if the event originates from a mouse device.
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event originates from a mouse device.
- * @api
- */
-ol.events.condition.mouseOnly = function(mapBrowserEvent) {
-  ol.asserts.assert(mapBrowserEvent.pointerEvent, 56); // mapBrowserEvent must originate from a pointer event
-  // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType
-  return /** @type {ol.MapBrowserEvent} */ (mapBrowserEvent).pointerEvent.pointerType == 'mouse';
-};
-
-
-/**
- * Return `true` if the event originates from a primary pointer in
- * contact with the surface or if the left mouse button is pressed.
- * @see http://www.w3.org/TR/pointerevents/#button-states
- *
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} True if the event originates from a primary pointer.
- * @api
- */
-ol.events.condition.primaryAction = function(mapBrowserEvent) {
-  var pointerEvent = mapBrowserEvent.pointerEvent;
-  return pointerEvent.isPrimary && pointerEvent.button === 0;
-};
-
-goog.provide('ol.interaction.Pointer');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Base class that calls user-defined functions on `down`, `move` and `up`
- * events. This class also manages "drag sequences".
- *
- * When the `handleDownEvent` user function returns `true` a drag sequence is
- * started. During a drag sequence the `handleDragEvent` user function is
- * called on `move` events. The drag sequence ends when the `handleUpEvent`
- * user function is called and returns `false`.
- *
- * @constructor
- * @param {olx.interaction.PointerOptions=} opt_options Options.
- * @extends {ol.interaction.Interaction}
- * @api
- */
-ol.interaction.Pointer = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var handleEvent = options.handleEvent ?
-    options.handleEvent : ol.interaction.Pointer.handleEvent;
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: handleEvent
-  });
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent):boolean}
-   * @private
-   */
-  this.handleDownEvent_ = options.handleDownEvent ?
-    options.handleDownEvent : ol.interaction.Pointer.handleDownEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent)}
-   * @private
-   */
-  this.handleDragEvent_ = options.handleDragEvent ?
-    options.handleDragEvent : ol.interaction.Pointer.handleDragEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent)}
-   * @private
-   */
-  this.handleMoveEvent_ = options.handleMoveEvent ?
-    options.handleMoveEvent : ol.interaction.Pointer.handleMoveEvent;
-
-  /**
-   * @type {function(ol.MapBrowserPointerEvent):boolean}
-   * @private
-   */
-  this.handleUpEvent_ = options.handleUpEvent ?
-    options.handleUpEvent : ol.interaction.Pointer.handleUpEvent;
-
-  /**
-   * @type {boolean}
-   * @protected
-   */
-  this.handlingDownUpSequence = false;
-
-  /**
-   * @type {Object.<string, ol.pointer.PointerEvent>}
-   * @private
-   */
-  this.trackedPointers_ = {};
-
-  /**
-   * @type {Array.<ol.pointer.PointerEvent>}
-   * @protected
-   */
-  this.targetPointers = [];
-
-};
-ol.inherits(ol.interaction.Pointer, ol.interaction.Interaction);
-
-
-/**
- * @param {Array.<ol.pointer.PointerEvent>} pointerEvents List of events.
- * @return {ol.Pixel} Centroid pixel.
- */
-ol.interaction.Pointer.centroid = function(pointerEvents) {
-  var length = pointerEvents.length;
-  var clientX = 0;
-  var clientY = 0;
-  for (var i = 0; i < length; i++) {
-    clientX += pointerEvents[i].clientX;
-    clientY += pointerEvents[i].clientY;
-  }
-  return [clientX / length, clientY / length];
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Whether the event is a pointerdown, pointerdrag
- *     or pointerup event.
- * @private
- */
-ol.interaction.Pointer.prototype.isPointerDraggingEvent_ = function(mapBrowserEvent) {
-  var type = mapBrowserEvent.type;
-  return (
-    type === ol.MapBrowserEventType.POINTERDOWN ||
-      type === ol.MapBrowserEventType.POINTERDRAG ||
-      type === ol.MapBrowserEventType.POINTERUP);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @private
- */
-ol.interaction.Pointer.prototype.updateTrackedPointers_ = function(mapBrowserEvent) {
-  if (this.isPointerDraggingEvent_(mapBrowserEvent)) {
-    var event = mapBrowserEvent.pointerEvent;
-
-    var id = event.pointerId.toString();
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
-      delete this.trackedPointers_[id];
-    } else if (mapBrowserEvent.type ==
-        ol.MapBrowserEventType.POINTERDOWN) {
-      this.trackedPointers_[id] = event;
-    } else if (id in this.trackedPointers_) {
-      // update only when there was a pointerdown event for this pointer
-      this.trackedPointers_[id] = event;
-    }
-    this.targetPointers = ol.obj.getValues(this.trackedPointers_);
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleDragEvent = ol.nullFunction;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Capture dragging.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleUpEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Capture dragging.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleDownEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.Pointer}
- */
-ol.interaction.Pointer.handleMoveEvent = ol.nullFunction;
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may call into
- * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
- * detected.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Pointer}
- * @api
- */
-ol.interaction.Pointer.handleEvent = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-
-  var stopEvent = false;
-  this.updateTrackedPointers_(mapBrowserEvent);
-  if (this.handlingDownUpSequence) {
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDRAG) {
-      this.handleDragEvent_(mapBrowserEvent);
-    } else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERUP) {
-      var handledUp = this.handleUpEvent_(mapBrowserEvent);
-      this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;
-    }
-  } else {
-    if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERDOWN) {
-      var handled = this.handleDownEvent_(mapBrowserEvent);
-      this.handlingDownUpSequence = handled;
-      stopEvent = this.shouldStopEvent(handled);
-    } else if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE) {
-      this.handleMoveEvent_(mapBrowserEvent);
-    }
-  }
-  return !stopEvent;
-};
-
-
-/**
- * This method is used to determine if "down" events should be propagated to
- * other interactions or should be stopped.
- *
- * The method receives the return code of the "handleDownEvent" function.
- *
- * By default this function is the "identity" function. It's overidden in
- * child classes.
- *
- * @param {boolean} handled Was the event handled by the interaction?
- * @return {boolean} Should the event be stopped?
- * @protected
- */
-ol.interaction.Pointer.prototype.shouldStopEvent = function(handled) {
-  return handled;
-};
-
-goog.provide('ol.interaction.DragPan');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to pan the map by dragging the map.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragPanOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragPan = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragPan.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragPan.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragPan.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.Kinetic|undefined}
-   */
-  this.kinetic_ = options.kinetic;
-
-  /**
-   * @type {ol.Pixel}
-   */
-  this.lastCentroid = null;
-
-  /**
-   * @type {number}
-   */
-  this.lastPointersCount_;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.noModifierKeys;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.noKinetic_ = false;
-
-};
-ol.inherits(ol.interaction.DragPan, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleDragEvent_ = function(mapBrowserEvent) {
-  var targetPointers = this.targetPointers;
-  var centroid =
-      ol.interaction.Pointer.centroid(targetPointers);
-  if (targetPointers.length == this.lastPointersCount_) {
-    if (this.kinetic_) {
-      this.kinetic_.update(centroid[0], centroid[1]);
-    }
-    if (this.lastCentroid) {
-      var deltaX = this.lastCentroid[0] - centroid[0];
-      var deltaY = centroid[1] - this.lastCentroid[1];
-      var map = mapBrowserEvent.map;
-      var view = map.getView();
-      var viewState = view.getState();
-      var center = [deltaX, deltaY];
-      ol.coordinate.scale(center, viewState.resolution);
-      ol.coordinate.rotate(center, viewState.rotation);
-      ol.coordinate.add(center, viewState.center);
-      center = view.constrainCenter(center);
-      view.setCenter(center);
-    }
-  } else if (this.kinetic_) {
-    // reset so we don't overestimate the kinetic energy after
-    // after one finger down, tiny drag, second finger down
-    this.kinetic_.begin();
-  }
-  this.lastCentroid = centroid;
-  this.lastPointersCount_ = targetPointers.length;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleUpEvent_ = function(mapBrowserEvent) {
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (this.targetPointers.length === 0) {
-    if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {
-      var distance = this.kinetic_.getDistance();
-      var angle = this.kinetic_.getAngle();
-      var center = /** @type {!ol.Coordinate} */ (view.getCenter());
-      var centerpx = map.getPixelFromCoordinate(center);
-      var dest = map.getCoordinateFromPixel([
-        centerpx[0] - distance * Math.cos(angle),
-        centerpx[1] - distance * Math.sin(angle)
-      ]);
-      view.animate({
-        center: view.constrainCenter(dest),
-        duration: 500,
-        easing: ol.easing.easeOut
-      });
-    }
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    return false;
-  } else {
-    if (this.kinetic_) {
-      // reset so we don't overestimate the kinetic energy after
-      // after one finger up, tiny drag, second finger up
-      this.kinetic_.begin();
-    }
-    this.lastCentroid = null;
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragPan}
- * @private
- */
-ol.interaction.DragPan.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    this.lastCentroid = null;
-    if (!this.handlingDownUpSequence) {
-      view.setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    // stop any current animation
-    if (view.getAnimating()) {
-      view.setCenter(mapBrowserEvent.frameState.viewState.center);
-    }
-    if (this.kinetic_) {
-      this.kinetic_.begin();
-    }
-    // No kinetic as soon as more than one pointer on the screen is
-    // detected. This is to prevent nasty pans after pinch.
-    this.noKinetic_ = this.targetPointers.length > 1;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragPan.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction.DragRotate');
-
-goog.require('ol');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to rotate the map by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when the alt and shift keys are held down.
- *
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragRotateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragRotate = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragRotate.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragRotate.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragRotate.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.altShiftKeysOnly;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-};
-ol.inherits(ol.interaction.DragRotate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (view.getConstraints().rotation === ol.RotationConstraint.disable) {
-    return;
-  }
-  var size = map.getSize();
-  var offset = mapBrowserEvent.pixel;
-  var theta =
-      Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);
-  if (this.lastAngle_ !== undefined) {
-    var delta = theta - this.lastAngle_;
-    var rotation = view.getRotation();
-    ol.interaction.Interaction.rotateWithoutConstraints(
-        view, rotation - delta);
-  }
-  this.lastAngle_ = theta;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-  var rotation = view.getRotation();
-  ol.interaction.Interaction.rotate(view, rotation,
-      undefined, this.duration_);
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragRotate}
- * @private
- */
-ol.interaction.DragRotate.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (ol.events.condition.mouseActionButton(mapBrowserEvent) &&
-      this.condition_(mapBrowserEvent)) {
-    var map = mapBrowserEvent.map;
-    map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.lastAngle_ = undefined;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragRotate.prototype.shouldStopEvent = ol.functions.FALSE;
-
-// FIXME add rotation
-
-goog.provide('ol.render.Box');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.geom.Polygon');
-
-
-/**
- * @constructor
- * @extends {ol.Disposable}
- * @param {string} className CSS class name.
- */
-ol.render.Box = function(className) {
-
-  /**
-   * @type {ol.geom.Polygon}
-   * @private
-   */
-  this.geometry_ = null;
-
-  /**
-   * @type {HTMLDivElement}
-   * @private
-   */
-  this.element_ = /** @type {HTMLDivElement} */ (document.createElement('div'));
-  this.element_.style.position = 'absolute';
-  this.element_.className = 'ol-box ' + className;
-
-  /**
-   * @private
-   * @type {ol.PluggableMap}
-   */
-  this.map_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.startPixel_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.endPixel_ = null;
-
-};
-ol.inherits(ol.render.Box, ol.Disposable);
-
-
-/**
- * @inheritDoc
- */
-ol.render.Box.prototype.disposeInternal = function() {
-  this.setMap(null);
-};
-
-
-/**
- * @private
- */
-ol.render.Box.prototype.render_ = function() {
-  var startPixel = this.startPixel_;
-  var endPixel = this.endPixel_;
-  var px = 'px';
-  var style = this.element_.style;
-  style.left = Math.min(startPixel[0], endPixel[0]) + px;
-  style.top = Math.min(startPixel[1], endPixel[1]) + px;
-  style.width = Math.abs(endPixel[0] - startPixel[0]) + px;
-  style.height = Math.abs(endPixel[1] - startPixel[1]) + px;
-};
-
-
-/**
- * @param {ol.PluggableMap} map Map.
- */
-ol.render.Box.prototype.setMap = function(map) {
-  if (this.map_) {
-    this.map_.getOverlayContainer().removeChild(this.element_);
-    var style = this.element_.style;
-    style.left = style.top = style.width = style.height = 'inherit';
-  }
-  this.map_ = map;
-  if (this.map_) {
-    this.map_.getOverlayContainer().appendChild(this.element_);
-  }
-};
-
-
-/**
- * @param {ol.Pixel} startPixel Start pixel.
- * @param {ol.Pixel} endPixel End pixel.
- */
-ol.render.Box.prototype.setPixels = function(startPixel, endPixel) {
-  this.startPixel_ = startPixel;
-  this.endPixel_ = endPixel;
-  this.createOrUpdateGeometry();
-  this.render_();
-};
-
-
-/**
- * Creates or updates the cached geometry.
- */
-ol.render.Box.prototype.createOrUpdateGeometry = function() {
-  var startPixel = this.startPixel_;
-  var endPixel = this.endPixel_;
-  var pixels = [
-    startPixel,
-    [startPixel[0], endPixel[1]],
-    endPixel,
-    [endPixel[0], startPixel[1]]
-  ];
-  var coordinates = pixels.map(this.map_.getCoordinateFromPixel, this.map_);
-  // close the polygon
-  coordinates[4] = coordinates[0].slice();
-  if (!this.geometry_) {
-    this.geometry_ = new ol.geom.Polygon([coordinates]);
-  } else {
-    this.geometry_.setCoordinates([coordinates]);
-  }
-};
-
-
-/**
- * @return {ol.geom.Polygon} Geometry.
- */
-ol.render.Box.prototype.getGeometry = function() {
-  return this.geometry_;
-};
-
-// FIXME draw drag box
-goog.provide('ol.interaction.DragBox');
-
-goog.require('ol.events.Event');
-goog.require('ol');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.render.Box');
-
-
-/**
- * @classdesc
- * Allows the user to draw a vector box by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when the shift or other key is held down. This is used, for example,
- * for zooming to a specific area of the map
- * (see {@link ol.interaction.DragZoom} and
- * {@link ol.interaction.DragRotateAndZoom}).
- *
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.DragBox.Event
- * @param {olx.interaction.DragBoxOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragBox = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragBox.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragBox.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragBox.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.render.Box}
-   * @private
-   */
-  this.box_ = new ol.render.Box(options.className || 'ol-dragbox');
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minArea_ = options.minArea !== undefined ? options.minArea : 64;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.startPixel_ = null;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.always;
-
-  /**
-   * @private
-   * @type {ol.DragBoxEndConditionType}
-   */
-  this.boxEndCondition_ = options.boxEndCondition ?
-    options.boxEndCondition : ol.interaction.DragBox.defaultBoxEndCondition;
-};
-ol.inherits(ol.interaction.DragBox, ol.interaction.Pointer);
-
-
-/**
- * The default condition for determining whether the boxend event
- * should fire.
- * @param {ol.MapBrowserEvent} mapBrowserEvent The originating MapBrowserEvent
- *     leading to the box end.
- * @param {ol.Pixel} startPixel The starting pixel of the box.
- * @param {ol.Pixel} endPixel The end pixel of the box.
- * @return {boolean} Whether or not the boxend condition should be fired.
- * @this {ol.interaction.DragBox}
- */
-ol.interaction.DragBox.defaultBoxEndCondition = function(mapBrowserEvent, startPixel, endPixel) {
-  var width = endPixel[0] - startPixel[0];
-  var height = endPixel[1] - startPixel[1];
-  return width * width + height * height >= this.minArea_;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);
-
-  this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXDRAG,
-      mapBrowserEvent.coordinate, mapBrowserEvent));
-};
-
-
-/**
- * Returns geometry of last drawn box.
- * @return {ol.geom.Polygon} Geometry.
- * @api
- */
-ol.interaction.DragBox.prototype.getGeometry = function() {
-  return this.box_.getGeometry();
-};
-
-
-/**
- * To be overridden by child classes.
- * FIXME: use constructor option instead of relying on overriding.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @protected
- */
-ol.interaction.DragBox.prototype.onBoxEnd = ol.nullFunction;
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  this.box_.setMap(null);
-
-  if (this.boxEndCondition_(mapBrowserEvent,
-      this.startPixel_, mapBrowserEvent.pixel)) {
-    this.onBoxEnd(mapBrowserEvent);
-    this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXEND,
-        mapBrowserEvent.coordinate, mapBrowserEvent));
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragBox}
- * @private
- */
-ol.interaction.DragBox.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (ol.events.condition.mouseActionButton(mapBrowserEvent) &&
-      this.condition_(mapBrowserEvent)) {
-    this.startPixel_ = mapBrowserEvent.pixel;
-    this.box_.setMap(mapBrowserEvent.map);
-    this.box_.setPixels(this.startPixel_, this.startPixel_);
-    this.dispatchEvent(new ol.interaction.DragBox.Event(ol.interaction.DragBox.EventType_.BOXSTART,
-        mapBrowserEvent.coordinate, mapBrowserEvent));
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.DragBox.EventType_ = {
-  /**
-   * Triggered upon drag box start.
-   * @event ol.interaction.DragBox.Event#boxstart
-   * @api
-   */
-  BOXSTART: 'boxstart',
-
-  /**
-   * Triggered on drag when box is active.
-   * @event ol.interaction.DragBox.Event#boxdrag
-   * @api
-   */
-  BOXDRAG: 'boxdrag',
-
-  /**
-   * Triggered upon drag box end.
-   * @event ol.interaction.DragBox.Event#boxend
-   * @api
-   */
-  BOXEND: 'boxend'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragBox} instances are instances of
- * this type.
- *
- * @param {string} type The event type.
- * @param {ol.Coordinate} coordinate The event coordinate.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Originating event.
- * @extends {ol.events.Event}
- * @constructor
- * @implements {oli.DragBoxEvent}
- */
-ol.interaction.DragBox.Event = function(type, coordinate, mapBrowserEvent) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The coordinate of the drag event.
-   * @const
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = coordinate;
-
-  /**
-   * @const
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserEvent;
-
-};
-ol.inherits(ol.interaction.DragBox.Event, ol.events.Event);
-
-goog.provide('ol.interaction.DragZoom');
-
-goog.require('ol');
-goog.require('ol.easing');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.interaction.DragBox');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by clicking and dragging on the map,
- * normally combined with an {@link ol.events.condition} that limits
- * it to when a key, shift by default, is held down.
- *
- * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or
- * your custom one configured with `className`.
- *
- * @constructor
- * @extends {ol.interaction.DragBox}
- * @param {olx.interaction.DragZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragZoom = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var condition = options.condition ?
-    options.condition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 200;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.out_ = options.out !== undefined ? options.out : false;
-
-  ol.interaction.DragBox.call(this, {
-    condition: condition,
-    className: options.className || 'ol-dragzoom'
-  });
-
-};
-ol.inherits(ol.interaction.DragZoom, ol.interaction.DragBox);
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragZoom.prototype.onBoxEnd = function() {
-  var map = this.getMap();
-
-  var view = /** @type {!ol.View} */ (map.getView());
-
-  var size = /** @type {!ol.Size} */ (map.getSize());
-
-  var extent = this.getGeometry().getExtent();
-
-  if (this.out_) {
-    var mapExtent = view.calculateExtent(size);
-    var boxPixelExtent = ol.extent.createOrUpdateFromCoordinates([
-      map.getPixelFromCoordinate(ol.extent.getBottomLeft(extent)),
-      map.getPixelFromCoordinate(ol.extent.getTopRight(extent))]);
-    var factor = view.getResolutionForExtent(boxPixelExtent, size);
-
-    ol.extent.scaleFromCenter(mapExtent, 1 / factor);
-    extent = mapExtent;
-  }
-
-  var resolution = view.constrainResolution(
-      view.getResolutionForExtent(extent, size));
-
-  var center = ol.extent.getCenter(extent);
-  center = view.constrainCenter(center);
-
-  view.animate({
-    resolution: resolution,
-    center: center,
-    duration: this.duration_,
-    easing: ol.easing.easeOut
-  });
-
-};
-
-goog.provide('ol.events.KeyCode');
-
-/**
- * @enum {number}
- * @const
- */
-ol.events.KeyCode = {
-  LEFT: 37,
-  UP: 38,
-  RIGHT: 39,
-  DOWN: 40
-};
-
-goog.provide('ol.interaction.KeyboardPan');
-
-goog.require('ol');
-goog.require('ol.coordinate');
-goog.require('ol.events.EventType');
-goog.require('ol.events.KeyCode');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to pan the map using keyboard arrows.
- * Note that, although this interaction is by default included in maps,
- * the keys can only be used when browser focus is on the element to which
- * the keyboard events are attached. By default, this is the map div,
- * though you can change this with the `keyboardEventTarget` in
- * {@link ol.Map}. `document` never loses focus but, for any other element,
- * focus will have to be on, and returned to, this element if the keys are to
- * function.
- * See also {@link ol.interaction.KeyboardZoom}.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
- * @api
- */
-ol.interaction.KeyboardPan = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.KeyboardPan.handleEvent
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
-   * @return {boolean} Combined condition result.
-   */
-  this.defaultCondition_ = function(mapBrowserEvent) {
-    return ol.events.condition.noModifierKeys(mapBrowserEvent) &&
-      ol.events.condition.targetNotEditable(mapBrowserEvent);
-  };
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition !== undefined ?
-    options.condition : this.defaultCondition_;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 100;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelDelta_ = options.pixelDelta !== undefined ?
-    options.pixelDelta : 128;
-
-};
-ol.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction);
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} if it was a
- * `KeyEvent`, and decides the direction to pan to (if an arrow key was
- * pressed).
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.KeyboardPan}
- * @api
- */
-ol.interaction.KeyboardPan.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  if (mapBrowserEvent.type == ol.events.EventType.KEYDOWN) {
-    var keyEvent = mapBrowserEvent.originalEvent;
-    var keyCode = keyEvent.keyCode;
-    if (this.condition_(mapBrowserEvent) &&
-        (keyCode == ol.events.KeyCode.DOWN ||
-        keyCode == ol.events.KeyCode.LEFT ||
-        keyCode == ol.events.KeyCode.RIGHT ||
-        keyCode == ol.events.KeyCode.UP)) {
-      var map = mapBrowserEvent.map;
-      var view = map.getView();
-      var mapUnitsDelta = view.getResolution() * this.pixelDelta_;
-      var deltaX = 0, deltaY = 0;
-      if (keyCode == ol.events.KeyCode.DOWN) {
-        deltaY = -mapUnitsDelta;
-      } else if (keyCode == ol.events.KeyCode.LEFT) {
-        deltaX = -mapUnitsDelta;
-      } else if (keyCode == ol.events.KeyCode.RIGHT) {
-        deltaX = mapUnitsDelta;
-      } else {
-        deltaY = mapUnitsDelta;
-      }
-      var delta = [deltaX, deltaY];
-      ol.coordinate.rotate(delta, view.getRotation());
-      ol.interaction.Interaction.pan(view, delta, this.duration_);
-      mapBrowserEvent.preventDefault();
-      stopEvent = true;
-    }
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.interaction.KeyboardZoom');
-
-goog.require('ol');
-goog.require('ol.events.EventType');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map using keyboard + and -.
- * Note that, although this interaction is by default included in maps,
- * the keys can only be used when browser focus is on the element to which
- * the keyboard events are attached. By default, this is the map div,
- * though you can change this with the `keyboardEventTarget` in
- * {@link ol.Map}. `document` never loses focus but, for any other element,
- * focus will have to be on, and returned to, this element if the keys are to
- * function.
- * See also {@link ol.interaction.KeyboardPan}.
- *
- * @constructor
- * @param {olx.interaction.KeyboardZoomOptions=} opt_options Options.
- * @extends {ol.interaction.Interaction}
- * @api
- */
-ol.interaction.KeyboardZoom = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.KeyboardZoom.handleEvent
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ? options.condition :
-    ol.events.condition.targetNotEditable;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = options.delta ? options.delta : 1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 100;
-
-};
-ol.inherits(ol.interaction.KeyboardZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} if it was a
- * `KeyEvent`, and decides whether to zoom in or out (depending on whether the
- * key pressed was '+' or '-').
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.KeyboardZoom}
- * @api
- */
-ol.interaction.KeyboardZoom.handleEvent = function(mapBrowserEvent) {
-  var stopEvent = false;
-  if (mapBrowserEvent.type == ol.events.EventType.KEYDOWN ||
-      mapBrowserEvent.type == ol.events.EventType.KEYPRESS) {
-    var keyEvent = mapBrowserEvent.originalEvent;
-    var charCode = keyEvent.charCode;
-    if (this.condition_(mapBrowserEvent) &&
-        (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {
-      var map = mapBrowserEvent.map;
-      var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;
-      var view = map.getView();
-      ol.interaction.Interaction.zoomByDelta(
-          view, delta, undefined, this.duration_);
-      mapBrowserEvent.preventDefault();
-      stopEvent = true;
-    }
-  }
-  return !stopEvent;
-};
-
-goog.provide('ol.interaction.MouseWheelZoom');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.easing');
-goog.require('ol.events.EventType');
-goog.require('ol.has');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by scrolling the mouse wheel.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.MouseWheelZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.MouseWheelZoom = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.MouseWheelZoom.handleEvent
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.delta_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.timeout_ = options.timeout !== undefined ? options.timeout : 80;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.useAnchor_ = options.useAnchor !== undefined ? options.useAnchor : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.constrainResolution_ = options.constrainResolution || false;
-
-  /**
-   * @private
-   * @type {?ol.Coordinate}
-   */
-  this.lastAnchor_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.startTime_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.timeoutId_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.interaction.MouseWheelZoom.Mode_|undefined}
-   */
-  this.mode_ = undefined;
-
-  /**
-   * Trackpad events separated by this delay will be considered separate
-   * interactions.
-   * @type {number}
-   */
-  this.trackpadEventGap_ = 400;
-
-  /**
-   * @type {number|undefined}
-   */
-  this.trackpadTimeoutId_ = undefined;
-
-  /**
-   * The number of delta values per zoom level
-   * @private
-   * @type {number}
-   */
-  this.trackpadDeltaPerZoom_ = 300;
-
-  /**
-   * The zoom factor by which scroll zooming is allowed to exceed the limits.
-   * @private
-   * @type {number}
-   */
-  this.trackpadZoomBuffer_ = 1.5;
-
-};
-ol.inherits(ol.interaction.MouseWheelZoom, ol.interaction.Interaction);
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} (if it was a
- * mousewheel-event) and eventually zooms the map.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} Allow event propagation.
- * @this {ol.interaction.MouseWheelZoom}
- * @api
- */
-ol.interaction.MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
-  var type = mapBrowserEvent.type;
-  if (type !== ol.events.EventType.WHEEL && type !== ol.events.EventType.MOUSEWHEEL) {
-    return true;
-  }
-
-  mapBrowserEvent.preventDefault();
-
-  var map = mapBrowserEvent.map;
-  var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);
-
-  if (this.useAnchor_) {
-    this.lastAnchor_ = mapBrowserEvent.coordinate;
-  }
-
-  // Delta normalisation inspired by
-  // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js
-  var delta;
-  if (mapBrowserEvent.type == ol.events.EventType.WHEEL) {
-    delta = wheelEvent.deltaY;
-    if (ol.has.FIREFOX &&
-        wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
-      delta /= ol.has.DEVICE_PIXEL_RATIO;
-    }
-    if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {
-      delta *= 40;
-    }
-  } else if (mapBrowserEvent.type == ol.events.EventType.MOUSEWHEEL) {
-    delta = -wheelEvent.wheelDeltaY;
-    if (ol.has.SAFARI) {
-      delta /= 3;
-    }
-  }
-
-  if (delta === 0) {
-    return false;
-  }
-
-  var now = Date.now();
-
-  if (this.startTime_ === undefined) {
-    this.startTime_ = now;
-  }
-
-  if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {
-    this.mode_ = Math.abs(delta) < 4 ?
-      ol.interaction.MouseWheelZoom.Mode_.TRACKPAD :
-      ol.interaction.MouseWheelZoom.Mode_.WHEEL;
-  }
-
-  if (this.mode_ === ol.interaction.MouseWheelZoom.Mode_.TRACKPAD) {
-    var view = map.getView();
-    if (this.trackpadTimeoutId_) {
-      clearTimeout(this.trackpadTimeoutId_);
-    } else {
-      view.setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);
-    var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);
-    var minResolution = view.getMinResolution();
-    var maxResolution = view.getMaxResolution();
-    var rebound = 0;
-    if (resolution < minResolution) {
-      resolution = Math.max(resolution, minResolution / this.trackpadZoomBuffer_);
-      rebound = 1;
-    } else if (resolution > maxResolution) {
-      resolution = Math.min(resolution, maxResolution * this.trackpadZoomBuffer_);
-      rebound = -1;
-    }
-    if (this.lastAnchor_) {
-      var center = view.calculateCenterZoom(resolution, this.lastAnchor_);
-      view.setCenter(view.constrainCenter(center));
-    }
-    view.setResolution(resolution);
-
-    if (rebound === 0 && this.constrainResolution_) {
-      view.animate({
-        resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: this.duration_
-      });
-    }
-
-    if (rebound > 0) {
-      view.animate({
-        resolution: minResolution,
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: 500
-      });
-    } else if (rebound < 0) {
-      view.animate({
-        resolution: maxResolution,
-        easing: ol.easing.easeOut,
-        anchor: this.lastAnchor_,
-        duration: 500
-      });
-    }
-    this.startTime_ = now;
-    return false;
-  }
-
-  this.delta_ += delta;
-
-  var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);
-
-  clearTimeout(this.timeoutId_);
-  this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);
-
-  return false;
-};
-
-
-/**
- * @private
- */
-ol.interaction.MouseWheelZoom.prototype.decrementInteractingHint_ = function() {
-  this.trackpadTimeoutId_ = undefined;
-  var view = this.getMap().getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-};
-
-
-/**
- * @private
- * @param {ol.PluggableMap} map Map.
- */
-ol.interaction.MouseWheelZoom.prototype.handleWheelZoom_ = function(map) {
-  var view = map.getView();
-  if (view.getAnimating()) {
-    view.cancelAnimations();
-  }
-  var maxDelta = ol.MOUSEWHEELZOOM_MAXDELTA;
-  var delta = ol.math.clamp(this.delta_, -maxDelta, maxDelta);
-  ol.interaction.Interaction.zoomByDelta(view, -delta, this.lastAnchor_,
-      this.duration_);
-  this.mode_ = undefined;
-  this.delta_ = 0;
-  this.lastAnchor_ = null;
-  this.startTime_ = undefined;
-  this.timeoutId_ = undefined;
-};
-
-
-/**
- * Enable or disable using the mouse's location as an anchor when zooming
- * @param {boolean} useAnchor true to zoom to the mouse's location, false
- * to zoom to the center of the map
- * @api
- */
-ol.interaction.MouseWheelZoom.prototype.setMouseAnchor = function(useAnchor) {
-  this.useAnchor_ = useAnchor;
-  if (!useAnchor) {
-    this.lastAnchor_ = null;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.MouseWheelZoom.Mode_ = {
-  TRACKPAD: 'trackpad',
-  WHEEL: 'wheel'
-};
-
-goog.provide('ol.interaction.PinchRotate');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.RotationConstraint');
-
-
-/**
- * @classdesc
- * Allows the user to rotate the map by twisting with two fingers
- * on a touch screen.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.PinchRotateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.PinchRotate = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.PinchRotate.handleDownEvent_,
-    handleDragEvent: ol.interaction.PinchRotate.handleDragEvent_,
-    handleUpEvent: ol.interaction.PinchRotate.handleUpEvent_
-  });
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.rotating_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.rotationDelta_ = 0.0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 250;
-
-};
-ol.inherits(ol.interaction.PinchRotate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
-  var rotationDelta = 0.0;
-
-  var touch0 = this.targetPointers[0];
-  var touch1 = this.targetPointers[1];
-
-  // angle between touches
-  var angle = Math.atan2(
-      touch1.clientY - touch0.clientY,
-      touch1.clientX - touch0.clientX);
-
-  if (this.lastAngle_ !== undefined) {
-    var delta = angle - this.lastAngle_;
-    this.rotationDelta_ += delta;
-    if (!this.rotating_ &&
-        Math.abs(this.rotationDelta_) > this.threshold_) {
-      this.rotating_ = true;
-    }
-    rotationDelta = delta;
-  }
-  this.lastAngle_ = angle;
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  if (view.getConstraints().rotation === ol.RotationConstraint.disable) {
-    return;
-  }
-
-  // rotate anchor point.
-  // FIXME: should be the intersection point between the lines:
-  //     touch0,touch1 and previousTouch0,previousTouch1
-  var viewportPosition = map.getViewport().getBoundingClientRect();
-  var centroid = ol.interaction.Pointer.centroid(this.targetPointers);
-  centroid[0] -= viewportPosition.left;
-  centroid[1] -= viewportPosition.top;
-  this.anchor_ = map.getCoordinateFromPixel(centroid);
-
-  // rotate
-  if (this.rotating_) {
-    var rotation = view.getRotation();
-    map.render();
-    ol.interaction.Interaction.rotateWithoutConstraints(view,
-        rotation + rotationDelta, this.anchor_);
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length < 2) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    if (this.rotating_) {
-      var rotation = view.getRotation();
-      ol.interaction.Interaction.rotate(
-          view, rotation, this.anchor_, this.duration_);
-    }
-    return false;
-  } else {
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.PinchRotate}
- * @private
- */
-ol.interaction.PinchRotate.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length >= 2) {
-    var map = mapBrowserEvent.map;
-    this.anchor_ = null;
-    this.lastAngle_ = undefined;
-    this.rotating_ = false;
-    this.rotationDelta_ = 0.0;
-    if (!this.handlingDownUpSequence) {
-      map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.PinchRotate.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction.PinchZoom');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.functions');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to zoom the map by pinching with two fingers
- * on a touch screen.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.PinchZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.PinchZoom = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.PinchZoom.handleDownEvent_,
-    handleDragEvent: ol.interaction.PinchZoom.handleDragEvent_,
-    handleUpEvent: ol.interaction.PinchZoom.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.constrainResolution_ = options.constrainResolution || false;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 400;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastDistance_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.lastScaleDelta_ = 1;
-
-};
-ol.inherits(ol.interaction.PinchZoom, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleDragEvent_ = function(mapBrowserEvent) {
-  var scaleDelta = 1.0;
-
-  var touch0 = this.targetPointers[0];
-  var touch1 = this.targetPointers[1];
-  var dx = touch0.clientX - touch1.clientX;
-  var dy = touch0.clientY - touch1.clientY;
-
-  // distance between touches
-  var distance = Math.sqrt(dx * dx + dy * dy);
-
-  if (this.lastDistance_ !== undefined) {
-    scaleDelta = this.lastDistance_ / distance;
-  }
-  this.lastDistance_ = distance;
-
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  var resolution = view.getResolution();
-  var maxResolution = view.getMaxResolution();
-  var minResolution = view.getMinResolution();
-  var newResolution = resolution * scaleDelta;
-  if (newResolution > maxResolution) {
-    scaleDelta = maxResolution / resolution;
-    newResolution = maxResolution;
-  } else if (newResolution < minResolution) {
-    scaleDelta = minResolution / resolution;
-    newResolution = minResolution;
-  }
-
-  if (scaleDelta != 1.0) {
-    this.lastScaleDelta_ = scaleDelta;
-  }
-
-  // scale anchor point.
-  var viewportPosition = map.getViewport().getBoundingClientRect();
-  var centroid = ol.interaction.Pointer.centroid(this.targetPointers);
-  centroid[0] -= viewportPosition.left;
-  centroid[1] -= viewportPosition.top;
-  this.anchor_ = map.getCoordinateFromPixel(centroid);
-
-  // scale, bypass the resolution constraint
-  map.render();
-  ol.interaction.Interaction.zoomWithoutConstraints(view, newResolution, this.anchor_);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleUpEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length < 2) {
-    var map = mapBrowserEvent.map;
-    var view = map.getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-    var resolution = view.getResolution();
-    if (this.constrainResolution_ ||
-        resolution < view.getMinResolution() ||
-        resolution > view.getMaxResolution()) {
-      // Zoom to final resolution, with an animation, and provide a
-      // direction not to zoom out/in if user was pinching in/out.
-      // Direction is > 0 if pinching out, and < 0 if pinching in.
-      var direction = this.lastScaleDelta_ - 1;
-      ol.interaction.Interaction.zoom(view, resolution,
-          this.anchor_, this.duration_, direction);
-    }
-    return false;
-  } else {
-    return true;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.PinchZoom}
- * @private
- */
-ol.interaction.PinchZoom.handleDownEvent_ = function(mapBrowserEvent) {
-  if (this.targetPointers.length >= 2) {
-    var map = mapBrowserEvent.map;
-    this.anchor_ = null;
-    this.lastDistance_ = undefined;
-    this.lastScaleDelta_ = 1;
-    if (!this.handlingDownUpSequence) {
-      map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    }
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.PinchZoom.prototype.shouldStopEvent = ol.functions.FALSE;
-
-goog.provide('ol.interaction');
-
-goog.require('ol.Collection');
-goog.require('ol.Kinetic');
-goog.require('ol.interaction.DoubleClickZoom');
-goog.require('ol.interaction.DragPan');
-goog.require('ol.interaction.DragRotate');
-goog.require('ol.interaction.DragZoom');
-goog.require('ol.interaction.KeyboardPan');
-goog.require('ol.interaction.KeyboardZoom');
-goog.require('ol.interaction.MouseWheelZoom');
-goog.require('ol.interaction.PinchRotate');
-goog.require('ol.interaction.PinchZoom');
-
-
-/**
- * Set of interactions included in maps by default. Specific interactions can be
- * excluded by setting the appropriate option to false in the constructor
- * options, but the order of the interactions is fixed.  If you want to specify
- * a different order for interactions, you will need to create your own
- * {@link ol.interaction.Interaction} instances and insert them into a
- * {@link ol.Collection} in the order you want before creating your
- * {@link ol.Map} instance. The default set of interactions, in sequence, is:
- * * {@link ol.interaction.DragRotate}
- * * {@link ol.interaction.DoubleClickZoom}
- * * {@link ol.interaction.DragPan}
- * * {@link ol.interaction.PinchRotate}
- * * {@link ol.interaction.PinchZoom}
- * * {@link ol.interaction.KeyboardPan}
- * * {@link ol.interaction.KeyboardZoom}
- * * {@link ol.interaction.MouseWheelZoom}
- * * {@link ol.interaction.DragZoom}
- *
- * @param {olx.interaction.DefaultsOptions=} opt_options Defaults options.
- * @return {ol.Collection.<ol.interaction.Interaction>} A collection of
- * interactions to be used with the ol.Map constructor's interactions option.
- * @api
- */
-ol.interaction.defaults = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var interactions = new ol.Collection();
-
-  var kinetic = new ol.Kinetic(-0.005, 0.05, 100);
-
-  var altShiftDragRotate = options.altShiftDragRotate !== undefined ?
-    options.altShiftDragRotate : true;
-  if (altShiftDragRotate) {
-    interactions.push(new ol.interaction.DragRotate());
-  }
-
-  var doubleClickZoom = options.doubleClickZoom !== undefined ?
-    options.doubleClickZoom : true;
-  if (doubleClickZoom) {
-    interactions.push(new ol.interaction.DoubleClickZoom({
-      delta: options.zoomDelta,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var dragPan = options.dragPan !== undefined ? options.dragPan : true;
-  if (dragPan) {
-    interactions.push(new ol.interaction.DragPan({
-      kinetic: kinetic
-    }));
-  }
-
-  var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :
-    true;
-  if (pinchRotate) {
-    interactions.push(new ol.interaction.PinchRotate());
-  }
-
-  var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
-  if (pinchZoom) {
-    interactions.push(new ol.interaction.PinchZoom({
-      constrainResolution: options.constrainResolution,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var keyboard = options.keyboard !== undefined ? options.keyboard : true;
-  if (keyboard) {
-    interactions.push(new ol.interaction.KeyboardPan());
-    interactions.push(new ol.interaction.KeyboardZoom({
-      delta: options.zoomDelta,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var mouseWheelZoom = options.mouseWheelZoom !== undefined ?
-    options.mouseWheelZoom : true;
-  if (mouseWheelZoom) {
-    interactions.push(new ol.interaction.MouseWheelZoom({
-      constrainResolution: options.constrainResolution,
-      duration: options.zoomDuration
-    }));
-  }
-
-  var shiftDragZoom = options.shiftDragZoom !== undefined ?
-    options.shiftDragZoom : true;
-  if (shiftDragZoom) {
-    interactions.push(new ol.interaction.DragZoom({
-      duration: options.zoomDuration
-    }));
-  }
-
-  return interactions;
-
-};
-
-goog.provide('ol.ImageBase');
-
-goog.require('ol');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.events.EventTarget}
- * @param {ol.Extent} extent Extent.
- * @param {number|undefined} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.ImageState} state State.
- */
-ol.ImageBase = function(extent, resolution, pixelRatio, state) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @protected
-   * @type {ol.Extent}
-   */
-  this.extent = extent;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.resolution = resolution;
-
-  /**
-   * @protected
-   * @type {ol.ImageState}
-   */
-  this.state = state;
-
-};
-ol.inherits(ol.ImageBase, ol.events.EventTarget);
-
-
-/**
- * @protected
- */
-ol.ImageBase.prototype.changed = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @return {ol.Extent} Extent.
- */
-ol.ImageBase.prototype.getExtent = function() {
-  return this.extent;
-};
-
-
-/**
- * @abstract
- * @return {HTMLCanvasElement|Image|HTMLVideoElement} Image.
- */
-ol.ImageBase.prototype.getImage = function() {};
-
-
-/**
- * @return {number} PixelRatio.
- */
-ol.ImageBase.prototype.getPixelRatio = function() {
-  return this.pixelRatio_;
-};
-
-
-/**
- * @return {number} Resolution.
- */
-ol.ImageBase.prototype.getResolution = function() {
-  return /** @type {number} */ (this.resolution);
-};
-
-
-/**
- * @return {ol.ImageState} State.
- */
-ol.ImageBase.prototype.getState = function() {
-  return this.state;
-};
-
-
-/**
- * Load not yet loaded URI.
- * @abstract
- */
-ol.ImageBase.prototype.load = function() {};
-
-goog.provide('ol.ImageState');
-
-/**
- * @enum {number}
- */
-ol.ImageState = {
-  IDLE: 0,
-  LOADING: 1,
-  LOADED: 2,
-  ERROR: 3
-};
-
-goog.provide('ol.ImageCanvas');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-
-
-/**
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {HTMLCanvasElement} canvas Canvas.
- * @param {ol.ImageCanvasLoader=} opt_loader Optional loader function to
- *     support asynchronous canvas drawing.
- */
-ol.ImageCanvas = function(extent, resolution, pixelRatio, canvas, opt_loader) {
-
-  /**
-   * Optional canvas loader function.
-   * @type {?ol.ImageCanvasLoader}
-   * @private
-   */
-  this.loader_ = opt_loader !== undefined ? opt_loader : null;
-
-  var state = opt_loader !== undefined ?
-    ol.ImageState.IDLE : ol.ImageState.LOADED;
-
-  ol.ImageBase.call(this, extent, resolution, pixelRatio, state);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = canvas;
-
-  /**
-   * @private
-   * @type {Error}
-   */
-  this.error_ = null;
-
-};
-ol.inherits(ol.ImageCanvas, ol.ImageBase);
-
-
-/**
- * Get any error associated with asynchronous rendering.
- * @return {Error} Any error that occurred during rendering.
- */
-ol.ImageCanvas.prototype.getError = function() {
-  return this.error_;
-};
-
-
-/**
- * Handle async drawing complete.
- * @param {Error} err Any error during drawing.
- * @private
- */
-ol.ImageCanvas.prototype.handleLoad_ = function(err) {
-  if (err) {
-    this.error_ = err;
-    this.state = ol.ImageState.ERROR;
-  } else {
-    this.state = ol.ImageState.LOADED;
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageCanvas.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-    this.loader_(this.handleLoad_.bind(this));
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageCanvas.prototype.getImage = function() {
-  return this.canvas_;
-};
-
-goog.provide('ol.LayerType');
-
-/**
- * A layer type used when creating layer renderers.
- * @enum {string}
- */
-ol.LayerType = {
-  IMAGE: 'IMAGE',
-  TILE: 'TILE',
-  VECTOR_TILE: 'VECTOR_TILE',
-  VECTOR: 'VECTOR'
-};
-
-goog.provide('ol.layer.VectorRenderType');
-
-/**
- * @enum {string}
- * Render mode for vector layers:
- *  * `'image'`: Vector layers are rendered as images. Great performance, but
- *    point symbols and texts are always rotated with the view and pixels are
- *    scaled during zoom animations.
- *  * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering
- *    even during animations, but slower performance.
- * @api
- */
-ol.layer.VectorRenderType = {
-  IMAGE: 'image',
-  VECTOR: 'vector'
-};
-
-goog.provide('ol.render.Event');
-
-goog.require('ol');
-goog.require('ol.events.Event');
-
-
-/**
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.render.Event}
- * @param {ol.render.EventType} type Type.
- * @param {ol.render.VectorContext=} opt_vectorContext Vector context.
- * @param {olx.FrameState=} opt_frameState Frame state.
- * @param {?CanvasRenderingContext2D=} opt_context Context.
- * @param {?ol.webgl.Context=} opt_glContext WebGL Context.
- */
-ol.render.Event = function(
-    type, opt_vectorContext, opt_frameState, opt_context,
-    opt_glContext) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
-   * @type {ol.render.VectorContext|undefined}
-   * @api
-   */
-  this.vectorContext = opt_vectorContext;
-
-  /**
-   * An object representing the current render frame state.
-   * @type {olx.FrameState|undefined}
-   * @api
-   */
-  this.frameState = opt_frameState;
-
-  /**
-   * Canvas context. Only available when a Canvas renderer is used, null
-   * otherwise.
-   * @type {CanvasRenderingContext2D|null|undefined}
-   * @api
-   */
-  this.context = opt_context;
-
-  /**
-   * WebGL context. Only available when a WebGL renderer is used, null
-   * otherwise.
-   * @type {ol.webgl.Context|null|undefined}
-   * @api
-   */
-  this.glContext = opt_glContext;
-
-};
-ol.inherits(ol.render.Event, ol.events.Event);
-
-goog.provide('ol.structs.LRUCache');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * Implements a Least-Recently-Used cache where the keys do not conflict with
- * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
- * items from the cache is the responsibility of the user.
- * @constructor
- * @extends {ol.events.EventTarget}
- * @fires ol.events.Event
- * @struct
- * @template T
- * @param {number=} opt_highWaterMark High water mark.
- */
-ol.structs.LRUCache = function(opt_highWaterMark) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @type {number}
-   */
-  this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.count_ = 0;
-
-  /**
-   * @private
-   * @type {!Object.<string, ol.LRUCacheEntry>}
-   */
-  this.entries_ = {};
-
-  /**
-   * @private
-   * @type {?ol.LRUCacheEntry}
-   */
-  this.oldest_ = null;
-
-  /**
-   * @private
-   * @type {?ol.LRUCacheEntry}
-   */
-  this.newest_ = null;
-
-};
-
-ol.inherits(ol.structs.LRUCache, ol.events.EventTarget);
-
-
-/**
- * @return {boolean} Can expire cache.
- */
-ol.structs.LRUCache.prototype.canExpireCache = function() {
-  return this.getCount() > this.highWaterMark;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.structs.LRUCache.prototype.clear = function() {
-  this.count_ = 0;
-  this.entries_ = {};
-  this.oldest_ = null;
-  this.newest_ = null;
-  this.dispatchEvent(ol.events.EventType.CLEAR);
-};
-
-
-/**
- * @param {string} key Key.
- * @return {boolean} Contains key.
- */
-ol.structs.LRUCache.prototype.containsKey = function(key) {
-  return this.entries_.hasOwnProperty(key);
-};
-
-
-/**
- * @param {function(this: S, T, string, ol.structs.LRUCache): ?} f The function
- *     to call for every entry from the oldest to the newer. This function takes
- *     3 arguments (the entry value, the entry key and the LRUCache object).
- *     The return value is ignored.
- * @param {S=} opt_this The object to use as `this` in `f`.
- * @template S
- */
-ol.structs.LRUCache.prototype.forEach = function(f, opt_this) {
-  var entry = this.oldest_;
-  while (entry) {
-    f.call(opt_this, entry.value_, entry.key_, this);
-    entry = entry.newer;
-  }
-};
-
-
-/**
- * @param {string} key Key.
- * @return {T} Value.
- */
-ol.structs.LRUCache.prototype.get = function(key) {
-  var entry = this.entries_[key];
-  ol.asserts.assert(entry !== undefined,
-      15); // Tried to get a value for a key that does not exist in the cache
-  if (entry === this.newest_) {
-    return entry.value_;
-  } else if (entry === this.oldest_) {
-    this.oldest_ = /** @type {ol.LRUCacheEntry} */ (this.oldest_.newer);
-    this.oldest_.older = null;
-  } else {
-    entry.newer.older = entry.older;
-    entry.older.newer = entry.newer;
-  }
-  entry.newer = null;
-  entry.older = this.newest_;
-  this.newest_.newer = entry;
-  this.newest_ = entry;
-  return entry.value_;
-};
-
-
-/**
- * Remove an entry from the cache.
- * @param {string} key The entry key.
- * @return {T} The removed entry.
- */
-ol.structs.LRUCache.prototype.remove = function(key) {
-  var entry = this.entries_[key];
-  ol.asserts.assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache
-  if (entry === this.newest_) {
-    this.newest_ = /** @type {ol.LRUCacheEntry} */ (entry.older);
-    if (this.newest_) {
-      this.newest_.newer = null;
-    }
-  } else if (entry === this.oldest_) {
-    this.oldest_ = /** @type {ol.LRUCacheEntry} */ (entry.newer);
-    if (this.oldest_) {
-      this.oldest_.older = null;
-    }
-  } else {
-    entry.newer.older = entry.older;
-    entry.older.newer = entry.newer;
-  }
-  delete this.entries_[key];
-  --this.count_;
-  return entry.value_;
-};
-
-
-/**
- * @return {number} Count.
- */
-ol.structs.LRUCache.prototype.getCount = function() {
-  return this.count_;
-};
-
-
-/**
- * @return {Array.<string>} Keys.
- */
-ol.structs.LRUCache.prototype.getKeys = function() {
-  var keys = new Array(this.count_);
-  var i = 0;
-  var entry;
-  for (entry = this.newest_; entry; entry = entry.older) {
-    keys[i++] = entry.key_;
-  }
-  return keys;
-};
-
-
-/**
- * @return {Array.<T>} Values.
- */
-ol.structs.LRUCache.prototype.getValues = function() {
-  var values = new Array(this.count_);
-  var i = 0;
-  var entry;
-  for (entry = this.newest_; entry; entry = entry.older) {
-    values[i++] = entry.value_;
-  }
-  return values;
-};
-
-
-/**
- * @return {T} Last value.
- */
-ol.structs.LRUCache.prototype.peekLast = function() {
-  return this.oldest_.value_;
-};
-
-
-/**
- * @return {string} Last key.
- */
-ol.structs.LRUCache.prototype.peekLastKey = function() {
-  return this.oldest_.key_;
-};
-
-
-/**
- * Get the key of the newest item in the cache.  Throws if the cache is empty.
- * @return {string} The newest key.
- */
-ol.structs.LRUCache.prototype.peekFirstKey = function() {
-  return this.newest_.key_;
-};
-
-
-/**
- * @return {T} value Value.
- */
-ol.structs.LRUCache.prototype.pop = function() {
-  var entry = this.oldest_;
-  delete this.entries_[entry.key_];
-  if (entry.newer) {
-    entry.newer.older = null;
-  }
-  this.oldest_ = /** @type {ol.LRUCacheEntry} */ (entry.newer);
-  if (!this.oldest_) {
-    this.newest_ = null;
-  }
-  --this.count_;
-  return entry.value_;
-};
-
-
-/**
- * @param {string} key Key.
- * @param {T} value Value.
- */
-ol.structs.LRUCache.prototype.replace = function(key, value) {
-  this.get(key);  // update `newest_`
-  this.entries_[key].value_ = value;
-};
-
-
-/**
- * @param {string} key Key.
- * @param {T} value Value.
- */
-ol.structs.LRUCache.prototype.set = function(key, value) {
-  ol.asserts.assert(!(key in this.entries_),
-      16); // Tried to set a value for a key that is used already
-  var entry = /** @type {ol.LRUCacheEntry} */ ({
-    key_: key,
-    newer: null,
-    older: this.newest_,
-    value_: value
-  });
-  if (!this.newest_) {
-    this.oldest_ = entry;
-  } else {
-    this.newest_.newer = entry;
-  }
-  this.newest_ = entry;
-  this.entries_[key] = entry;
-  ++this.count_;
-};
-
-
-/**
- * Prune the cache.
- */
-ol.structs.LRUCache.prototype.prune = function() {
-  while (this.canExpireCache()) {
-    this.pop();
-  }
-};
-
-goog.provide('ol.render.canvas');
-
-
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.obj');
-goog.require('ol.structs.LRUCache');
-goog.require('ol.transform');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultFont = '10px sans-serif';
-
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.canvas.defaultFillStyle = [0, 0, 0, 1];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultLineCap = 'round';
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.render.canvas.defaultLineDash = [];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultLineDashOffset = 0;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultLineJoin = 'round';
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultMiterLimit = 10;
-
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.canvas.defaultStrokeStyle = [0, 0, 0, 1];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultTextAlign = 'center';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.canvas.defaultTextBaseline = 'middle';
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.render.canvas.defaultPadding = [0, 0, 0, 0];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.canvas.defaultLineWidth = 1;
-
-
-/**
- * @type {ol.structs.LRUCache.<HTMLCanvasElement>}
- */
-ol.render.canvas.labelCache = new ol.structs.LRUCache();
-
-
-/**
- * @type {!Object.<string, number>}
- */
-ol.render.canvas.checkedFonts_ = {};
-
-
-/**
- * @type {CanvasRenderingContext2D}
- */
-ol.render.canvas.measureContext_ = null;
-
-
-/**
- * @type {!Object.<string, number>}
- */
-ol.render.canvas.textHeights_ = {};
-
-
-/**
- * Clears the label cache when a font becomes available.
- * @param {string} fontSpec CSS font spec.
- */
-ol.render.canvas.checkFont = (function() {
-  var retries = 60;
-  var checked = ol.render.canvas.checkedFonts_;
-  var labelCache = ol.render.canvas.labelCache;
-  var font = '32px monospace';
-  var text = 'wmytzilWMYTZIL@#/&?$%10';
-  var interval, referenceWidth;
-
-  function isAvailable(fontFamily) {
-    var context = ol.render.canvas.getMeasureContext();
-    context.font = font;
-    referenceWidth = context.measureText(text).width;
-    var available = true;
-    if (fontFamily != 'monospace') {
-      context.font = '32px ' + fontFamily + ',monospace';
-      var width = context.measureText(text).width;
-      // If width and referenceWidth are the same, then the 'monospace'
-      // fallback was used instead of the font we wanted, so the font is not
-      // available.
-      available = width != referenceWidth;
-    }
-    return available;
-  }
-
-  function check() {
-    var done = true;
-    for (var font in checked) {
-      if (checked[font] < retries) {
-        if (isAvailable(font)) {
-          checked[font] = retries;
-          ol.obj.clear(ol.render.canvas.textHeights_);
-          // Make sure that loaded fonts are picked up by Safari
-          ol.render.canvas.measureContext_ = null;
-          labelCache.clear();
-        } else {
-          ++checked[font];
-          done = false;
-        }
-      }
-    }
-    if (done) {
-      window.clearInterval(interval);
-      interval = undefined;
-    }
-  }
-
-  return function(fontSpec) {
-    var fontFamilies = ol.css.getFontFamilies(fontSpec);
-    if (!fontFamilies) {
-      return;
-    }
-    for (var i = 0, ii = fontFamilies.length; i < ii; ++i) {
-      var fontFamily = fontFamilies[i];
-      if (!(fontFamily in checked)) {
-        checked[fontFamily] = retries;
-        if (!isAvailable(fontFamily)) {
-          checked[fontFamily] = 0;
-          if (interval === undefined) {
-            interval = window.setInterval(check, 32);
-          }
-        }
-      }
-    }
-  };
-})();
-
-
-/**
- * @return {CanvasRenderingContext2D} Measure context.
- */
-ol.render.canvas.getMeasureContext = function() {
-  var context = ol.render.canvas.measureContext_;
-  if (!context) {
-    context = ol.render.canvas.measureContext_ = ol.dom.createCanvasContext2D(1, 1);
-  }
-  return context;
-};
-
-
-/**
- * @param {string} font Font to use for measuring.
- * @return {ol.Size} Measurement.
- */
-ol.render.canvas.measureTextHeight = (function() {
-  var span;
-  var heights = ol.render.canvas.textHeights_;
-  return function(font) {
-    var height = heights[font];
-    if (height == undefined) {
-      if (!span) {
-        span = document.createElement('span');
-        span.textContent = 'M';
-        span.style.margin = span.style.padding = '0 !important';
-        span.style.position = 'absolute !important';
-        span.style.left = '-99999px !important';
-      }
-      span.style.font = font;
-      document.body.appendChild(span);
-      height = heights[font] = span.offsetHeight;
-      document.body.removeChild(span);
-    }
-    return height;
-  };
-})();
-
-
-/**
- * @param {string} font Font.
- * @param {string} text Text.
- * @return {number} Width.
- */
-ol.render.canvas.measureTextWidth = function(font, text) {
-  var measureContext = ol.render.canvas.getMeasureContext();
-  if (font != measureContext.font) {
-    measureContext.font = font;
-  }
-  return measureContext.measureText(text).width;
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} rotation Rotation.
- * @param {number} offsetX X offset.
- * @param {number} offsetY Y offset.
- */
-ol.render.canvas.rotateAtOffset = function(context, rotation, offsetX, offsetY) {
-  if (rotation !== 0) {
-    context.translate(offsetX, offsetY);
-    context.rotate(rotation);
-    context.translate(-offsetX, -offsetY);
-  }
-};
-
-
-ol.render.canvas.resetTransform_ = ol.transform.create();
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform|null} transform Transform.
- * @param {number} opacity Opacity.
- * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.
- * @param {number} originX Origin X.
- * @param {number} originY Origin Y.
- * @param {number} w Width.
- * @param {number} h Height.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {number} scale Scale.
- */
-ol.render.canvas.drawImage = function(context,
-    transform, opacity, image, originX, originY, w, h, x, y, scale) {
-  var alpha;
-  if (opacity != 1) {
-    alpha = context.globalAlpha;
-    context.globalAlpha = alpha * opacity;
-  }
-  if (transform) {
-    context.setTransform.apply(context, transform);
-  }
-
-  context.drawImage(image, originX, originY, w, h, x, y, w * scale, h * scale);
-
-  if (alpha) {
-    context.globalAlpha = alpha;
-  }
-  if (transform) {
-    context.setTransform.apply(context, ol.render.canvas.resetTransform_);
-  }
-};
-
-goog.provide('ol.color');
-
-goog.require('ol.asserts');
-goog.require('ol.math');
-
-
-/**
- * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.
- * @const
- * @type {RegExp}
- * @private
- */
-ol.color.HEX_COLOR_RE_ = /^#(?:[0-9a-f]{3,4}){1,2}$/i;
-
-
-/**
- * Regular expression for matching potential named color style strings.
- * @const
- * @type {RegExp}
- * @private
- */
-ol.color.NAMED_COLOR_RE_ = /^([a-z]*)$/i;
-
-
-/**
- * Return the color as an array. This function maintains a cache of calculated
- * arrays which means the result should not be modified.
- * @param {ol.Color|string} color Color.
- * @return {ol.Color} Color.
- * @api
- */
-ol.color.asArray = function(color) {
-  if (Array.isArray(color)) {
-    return color;
-  } else {
-    return ol.color.fromString(/** @type {string} */ (color));
-  }
-};
-
-
-/**
- * Return the color as an rgba string.
- * @param {ol.Color|string} color Color.
- * @return {string} Rgba string.
- * @api
- */
-ol.color.asString = function(color) {
-  if (typeof color === 'string') {
-    return color;
-  } else {
-    return ol.color.toString(color);
-  }
-};
-
-/**
- * Return named color as an rgba string.
- * @param {string} color Named color.
- * @return {string} Rgb string.
- */
-ol.color.fromNamed = function(color) {
-  var el = document.createElement('div');
-  el.style.color = color;
-  document.body.appendChild(el);
-  var rgb = getComputedStyle(el).color;
-  document.body.removeChild(el);
-  return rgb;
-};
-
-
-/**
- * @param {string} s String.
- * @return {ol.Color} Color.
- */
-ol.color.fromString = (
-  function() {
-
-    // We maintain a small cache of parsed strings.  To provide cheap LRU-like
-    // semantics, whenever the cache grows too large we simply delete an
-    // arbitrary 25% of the entries.
-
-    /**
-     * @const
-     * @type {number}
-     */
-    var MAX_CACHE_SIZE = 1024;
-
-    /**
-     * @type {Object.<string, ol.Color>}
-     */
-    var cache = {};
-
-    /**
-     * @type {number}
-     */
-    var cacheSize = 0;
-
-    return (
-      /**
-       * @param {string} s String.
-       * @return {ol.Color} Color.
-       */
-      function(s) {
-        var color;
-        if (cache.hasOwnProperty(s)) {
-          color = cache[s];
-        } else {
-          if (cacheSize >= MAX_CACHE_SIZE) {
-            var i = 0;
-            var key;
-            for (key in cache) {
-              if ((i++ & 3) === 0) {
-                delete cache[key];
-                --cacheSize;
-              }
-            }
-          }
-          color = ol.color.fromStringInternal_(s);
-          cache[s] = color;
-          ++cacheSize;
-        }
-        return color;
-      });
-
-  })();
-
-
-/**
- * @param {string} s String.
- * @private
- * @return {ol.Color} Color.
- */
-ol.color.fromStringInternal_ = function(s) {
-  var r, g, b, a, color, parts;
-
-  if (ol.color.NAMED_COLOR_RE_.exec(s)) {
-    s = ol.color.fromNamed(s);
-  }
-
-  if (ol.color.HEX_COLOR_RE_.exec(s)) { // hex
-    var n = s.length - 1; // number of hex digits
-    var d; // number of digits per channel
-    if (n <= 4) {
-      d = 1;
-    } else {
-      d = 2;
-    }
-    var hasAlpha = n === 4 || n === 8;
-    r = parseInt(s.substr(1 + 0 * d, d), 16);
-    g = parseInt(s.substr(1 + 1 * d, d), 16);
-    b = parseInt(s.substr(1 + 2 * d, d), 16);
-    if (hasAlpha) {
-      a = parseInt(s.substr(1 + 3 * d, d), 16);
-    } else {
-      a = 255;
-    }
-    if (d == 1) {
-      r = (r << 4) + r;
-      g = (g << 4) + g;
-      b = (b << 4) + b;
-      if (hasAlpha) {
-        a = (a << 4) + a;
-      }
-    }
-    color = [r, g, b, a / 255];
-  } else if (s.indexOf('rgba(') == 0) { // rgba()
-    parts = s.slice(5, -1).split(',').map(Number);
-    color = ol.color.normalize(parts);
-  } else if (s.indexOf('rgb(') == 0) { // rgb()
-    parts = s.slice(4, -1).split(',').map(Number);
-    parts.push(1);
-    color = ol.color.normalize(parts);
-  } else {
-    ol.asserts.assert(false, 14); // Invalid color
-  }
-  return /** @type {ol.Color} */ (color);
-};
-
-
-/**
- * @param {ol.Color} color Color.
- * @param {ol.Color=} opt_color Color.
- * @return {ol.Color} Clamped color.
- */
-ol.color.normalize = function(color, opt_color) {
-  var result = opt_color || [];
-  result[0] = ol.math.clamp((color[0] + 0.5) | 0, 0, 255);
-  result[1] = ol.math.clamp((color[1] + 0.5) | 0, 0, 255);
-  result[2] = ol.math.clamp((color[2] + 0.5) | 0, 0, 255);
-  result[3] = ol.math.clamp(color[3], 0, 1);
-  return result;
-};
-
-
-/**
- * @param {ol.Color} color Color.
- * @return {string} String.
- */
-ol.color.toString = function(color) {
-  var r = color[0];
-  if (r != (r | 0)) {
-    r = (r + 0.5) | 0;
-  }
-  var g = color[1];
-  if (g != (g | 0)) {
-    g = (g + 0.5) | 0;
-  }
-  var b = color[2];
-  if (b != (b | 0)) {
-    b = (b + 0.5) | 0;
-  }
-  var a = color[3] === undefined ? 1 : color[3];
-  return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';
-};
-
-goog.provide('ol.colorlike');
-
-goog.require('ol.color');
-
-
-/**
- * @param {ol.Color|ol.ColorLike} color Color.
- * @return {ol.ColorLike} The color as an ol.ColorLike
- * @api
- */
-ol.colorlike.asColorLike = function(color) {
-  if (ol.colorlike.isColorLike(color)) {
-    return /** @type {string|CanvasPattern|CanvasGradient} */ (color);
-  } else {
-    return ol.color.asString(/** @type {ol.Color} */ (color));
-  }
-};
-
-
-/**
- * @param {?} color The value that is potentially an ol.ColorLike
- * @return {boolean} Whether the color is an ol.ColorLike
- */
-ol.colorlike.isColorLike = function(color) {
-  return (
-    typeof color === 'string' ||
-    color instanceof CanvasPattern ||
-    color instanceof CanvasGradient
-  );
-};
-
-goog.provide('ol.render.VectorContext');
-
-
-/**
- * Context for drawing geometries.  A vector context is available on render
- * events and does not need to be constructed directly.
- * @constructor
- * @abstract
- * @struct
- * @api
- */
-ol.render.VectorContext = function() {
-};
-
-
-/**
- * Render a geometry with a custom renderer.
- *
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {Function} renderer Renderer.
- */
-ol.render.VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
-
-
-/**
- * Render a geometry.
- *
- * @param {ol.geom.Geometry} geometry The geometry to render.
- */
-ol.render.VectorContext.prototype.drawGeometry = function(geometry) {};
-
-
-/**
- * Set the rendering style.
- *
- * @param {ol.style.Style} style The rendering style.
- */
-ol.render.VectorContext.prototype.setStyle = function(style) {};
-
-
-/**
- * @param {ol.geom.Circle} circleGeometry Circle geometry.
- * @param {ol.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawCircle = function(circleGeometry, feature) {};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- */
-ol.render.VectorContext.prototype.drawFeature = function(feature, style) {};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geometryCollectionGeometry Geometry
- *     collection.
- * @param {ol.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.LineString|ol.render.Feature} lineStringGeometry Line
- *     string geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiLineString|ol.render.Feature} multiLineStringGeometry
- *     MultiLineString geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
- *     geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.Point|ol.render.Feature} pointGeometry Point geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.Polygon|ol.render.Feature} polygonGeometry Polygon
- *     geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
-
-
-/**
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.VectorContext.prototype.drawText = function(geometry, feature) {};
-
-
-/**
- * @param {ol.style.Fill} fillStyle Fill style.
- * @param {ol.style.Stroke} strokeStyle Stroke style.
- */
-ol.render.VectorContext.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {};
-
-
-/**
- * @param {ol.style.Image} imageStyle Image style.
- * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter.
- */
-ol.render.VectorContext.prototype.setImageStyle = function(imageStyle, opt_declutterGroup) {};
-
-
-/**
- * @param {ol.style.Text} textStyle Text style.
- * @param {ol.DeclutterGroup=} opt_declutterGroup Declutter.
- */
-ol.render.VectorContext.prototype.setTextStyle = function(textStyle, opt_declutterGroup) {};
-
-// FIXME test, especially polygons with holes and multipolygons
-// FIXME need to handle large thick features (where pixel size matters)
-// FIXME add offset and end to ol.geom.flat.transform.transform2D?
-
-goog.provide('ol.render.canvas.Immediate');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.colorlike');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.has');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * A concrete subclass of {@link ol.render.VectorContext} that implements
- * direct rendering of features and geometries to an HTML5 Canvas context.
- * Instances of this class are created internally by the library and
- * provided to application code as vectorContext member of the
- * {@link ol.render.Event} object associated with postcompose, precompose and
- * render events emitted by layers and maps.
- *
- * @constructor
- * @extends {ol.render.VectorContext}
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Extent} extent Extent.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @struct
- */
-ol.render.canvas.Immediate = function(context, pixelRatio, extent, transform, viewRotation) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = context;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = transform;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.viewRotation_ = viewRotation;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.contextFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.contextStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.contextTextState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.fillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.strokeState_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageAnchorX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageAnchorY_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageHeight_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOpacity_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOriginX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageOriginY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.imageRotateWithView_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageRotation_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageScale_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.imageSnapToPixel_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.imageWidth_ = 0;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = '';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.textRotateWithView_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textRotation_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textScale_ = 0;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.textFillState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.textStrokeState_ = null;
-
-  /**
-   * @private
-   * @type {?ol.CanvasTextState}
-   */
-  this.textState_ = null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.pixelCoordinates_ = [];
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpLocalTransform_ = ol.transform.create();
-
-};
-ol.inherits(ol.render.canvas.Immediate, ol.render.VectorContext);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- */
-ol.render.canvas.Immediate.prototype.drawImages_ = function(flatCoordinates, offset, end, stride) {
-  if (!this.image_) {
-    return;
-  }
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, 2, this.transform_,
-      this.pixelCoordinates_);
-  var context = this.context_;
-  var localTransform = this.tmpLocalTransform_;
-  var alpha = context.globalAlpha;
-  if (this.imageOpacity_ != 1) {
-    context.globalAlpha = alpha * this.imageOpacity_;
-  }
-  var rotation = this.imageRotation_;
-  if (this.imageRotateWithView_) {
-    rotation += this.viewRotation_;
-  }
-  var i, ii;
-  for (i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {
-    var x = pixelCoordinates[i] - this.imageAnchorX_;
-    var y = pixelCoordinates[i + 1] - this.imageAnchorY_;
-    if (this.imageSnapToPixel_) {
-      x = Math.round(x);
-      y = Math.round(y);
-    }
-    if (rotation !== 0 || this.imageScale_ != 1) {
-      var centerX = x + this.imageAnchorX_;
-      var centerY = y + this.imageAnchorY_;
-      ol.transform.compose(localTransform,
-          centerX, centerY,
-          this.imageScale_, this.imageScale_,
-          rotation,
-          -centerX, -centerY);
-      context.setTransform.apply(context, localTransform);
-    }
-    context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_,
-        this.imageWidth_, this.imageHeight_, x, y,
-        this.imageWidth_, this.imageHeight_);
-  }
-  if (rotation !== 0 || this.imageScale_ != 1) {
-    context.setTransform(1, 0, 0, 1, 0, 0);
-  }
-  if (this.imageOpacity_ != 1) {
-    context.globalAlpha = alpha;
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- */
-ol.render.canvas.Immediate.prototype.drawText_ = function(flatCoordinates, offset, end, stride) {
-  if (!this.textState_ || this.text_ === '') {
-    return;
-  }
-  if (this.textFillState_) {
-    this.setContextFillState_(this.textFillState_);
-  }
-  if (this.textStrokeState_) {
-    this.setContextStrokeState_(this.textStrokeState_);
-  }
-  this.setContextTextState_(this.textState_);
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, stride, this.transform_,
-      this.pixelCoordinates_);
-  var context = this.context_;
-  var rotation = this.textRotation_;
-  if (this.textRotateWithView_) {
-    rotation += this.viewRotation_;
-  }
-  for (; offset < end; offset += stride) {
-    var x = pixelCoordinates[offset] + this.textOffsetX_;
-    var y = pixelCoordinates[offset + 1] + this.textOffsetY_;
-    if (rotation !== 0 || this.textScale_ != 1) {
-      var localTransform = ol.transform.compose(this.tmpLocalTransform_,
-          x, y,
-          this.textScale_, this.textScale_,
-          rotation,
-          -x, -y);
-      context.setTransform.apply(context, localTransform);
-    }
-    if (this.textStrokeState_) {
-      context.strokeText(this.text_, x, y);
-    }
-    if (this.textFillState_) {
-      context.fillText(this.text_, x, y);
-    }
-  }
-  if (rotation !== 0 || this.textScale_ != 1) {
-    context.setTransform(1, 0, 0, 1, 0, 0);
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {boolean} close Close.
- * @private
- * @return {number} end End.
- */
-ol.render.canvas.Immediate.prototype.moveToLineTo_ = function(flatCoordinates, offset, end, stride, close) {
-  var context = this.context_;
-  var pixelCoordinates = ol.geom.flat.transform.transform2D(
-      flatCoordinates, offset, end, stride, this.transform_,
-      this.pixelCoordinates_);
-  context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);
-  var length = pixelCoordinates.length;
-  if (close) {
-    length -= 2;
-  }
-  for (var i = 2; i < length; i += 2) {
-    context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);
-  }
-  if (close) {
-    context.closePath();
-  }
-  return end;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @private
- * @return {number} End.
- */
-ol.render.canvas.Immediate.prototype.drawRings_ = function(flatCoordinates, offset, ends, stride) {
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    offset = this.moveToLineTo_(
-        flatCoordinates, offset, ends[i], stride, true);
-  }
-  return offset;
-};
-
-
-/**
- * Render a circle geometry into the canvas.  Rendering is immediate and uses
- * the current fill and stroke styles.
- *
- * @param {ol.geom.Circle} geometry Circle geometry.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawCircle = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.fillState_ || this.strokeState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var pixelCoordinates = ol.geom.SimpleGeometry.transform2D(
-        geometry, this.transform_, this.pixelCoordinates_);
-    var dx = pixelCoordinates[2] - pixelCoordinates[0];
-    var dy = pixelCoordinates[3] - pixelCoordinates[1];
-    var radius = Math.sqrt(dx * dx + dy * dy);
-    var context = this.context_;
-    context.beginPath();
-    context.arc(
-        pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    this.drawText_(geometry.getCenter(), 0, 2, 2);
-  }
-};
-
-
-/**
- * Set the rendering style.  Note that since this is an immediate rendering API,
- * any `zIndex` on the provided style will be ignored.
- *
- * @param {ol.style.Style} style The rendering style.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.setStyle = function(style) {
-  this.setFillStrokeStyle(style.getFill(), style.getStroke());
-  this.setImageStyle(style.getImage());
-  this.setTextStyle(style.getText());
-};
-
-
-/**
- * Render a geometry into the canvas.  Call
- * {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style.
- *
- * @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawGeometry = function(geometry) {
-  var type = geometry.getType();
-  switch (type) {
-    case ol.geom.GeometryType.POINT:
-      this.drawPoint(/** @type {ol.geom.Point} */ (geometry));
-      break;
-    case ol.geom.GeometryType.LINE_STRING:
-      this.drawLineString(/** @type {ol.geom.LineString} */ (geometry));
-      break;
-    case ol.geom.GeometryType.POLYGON:
-      this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_POINT:
-      this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-      this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry));
-      break;
-    case ol.geom.GeometryType.MULTI_POLYGON:
-      this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry));
-      break;
-    case ol.geom.GeometryType.GEOMETRY_COLLECTION:
-      this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry));
-      break;
-    case ol.geom.GeometryType.CIRCLE:
-      this.drawCircle(/** @type {ol.geom.Circle} */ (geometry));
-      break;
-    default:
-  }
-};
-
-
-/**
- * Render a feature into the canvas.  Note that any `zIndex` on the provided
- * style will be ignored - features are rendered immediately in the order that
- * this method is called.  If you need `zIndex` support, you should be using an
- * {@link ol.layer.Vector} instead.
- *
- * @param {ol.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @override
- * @api
- */
-ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
-  var geometry = style.getGeometryFunction()(feature);
-  if (!geometry ||
-      !ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  this.setStyle(style);
-  this.drawGeometry(geometry);
-};
-
-
-/**
- * Render a GeometryCollection to the canvas.  Rendering is immediate and
- * uses the current styles appropriate for each geometry in the collection.
- *
- * @param {ol.geom.GeometryCollection} geometry Geometry collection.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawGeometryCollection = function(geometry) {
-  var geometries = geometry.getGeometriesArray();
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    this.drawGeometry(geometries[i]);
-  }
-};
-
-
-/**
- * Render a Point geometry into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.Point|ol.render.Feature} geometry Point geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawPoint = function(geometry) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  if (this.image_) {
-    this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-  if (this.text_ !== '') {
-    this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-};
-
-
-/**
- * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and
- * uses the current style.
- *
- * @param {ol.geom.MultiPoint|ol.render.Feature} geometry MultiPoint geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiPoint = function(geometry) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  if (this.image_) {
-    this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-  if (this.text_ !== '') {
-    this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-};
-
-
-/**
- * Render a LineString into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.LineString|ol.render.Feature} geometry LineString geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawLineString = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_) {
-    this.setContextStrokeState_(this.strokeState_);
-    var context = this.context_;
-    var flatCoordinates = geometry.getFlatCoordinates();
-    context.beginPath();
-    this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length,
-        geometry.getStride(), false);
-    context.stroke();
-  }
-  if (this.text_ !== '') {
-    var flatMidpoint = geometry.getFlatMidpoint();
-    this.drawText_(flatMidpoint, 0, 2, 2);
-  }
-};
-
-
-/**
- * Render a MultiLineString geometry into the canvas.  Rendering is immediate
- * and uses the current style.
- *
- * @param {ol.geom.MultiLineString|ol.render.Feature} geometry MultiLineString
- *     geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiLineString = function(geometry) {
-  var geometryExtent = geometry.getExtent();
-  if (!ol.extent.intersects(this.extent_, geometryExtent)) {
-    return;
-  }
-  if (this.strokeState_) {
-    this.setContextStrokeState_(this.strokeState_);
-    var context = this.context_;
-    var flatCoordinates = geometry.getFlatCoordinates();
-    var offset = 0;
-    var ends = geometry.getEnds();
-    var stride = geometry.getStride();
-    context.beginPath();
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      offset = this.moveToLineTo_(
-          flatCoordinates, offset, ends[i], stride, false);
-    }
-    context.stroke();
-  }
-  if (this.text_ !== '') {
-    var flatMidpoints = geometry.getFlatMidpoints();
-    this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);
-  }
-};
-
-
-/**
- * Render a Polygon geometry into the canvas.  Rendering is immediate and uses
- * the current style.
- *
- * @param {ol.geom.Polygon|ol.render.Feature} geometry Polygon geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawPolygon = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_ || this.fillState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var context = this.context_;
-    context.beginPath();
-    this.drawRings_(geometry.getOrientedFlatCoordinates(),
-        0, geometry.getEnds(), geometry.getStride());
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    var flatInteriorPoint = geometry.getFlatInteriorPoint();
-    this.drawText_(flatInteriorPoint, 0, 2, 2);
-  }
-};
-
-
-/**
- * Render MultiPolygon geometry into the canvas.  Rendering is immediate and
- * uses the current style.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @override
- */
-ol.render.canvas.Immediate.prototype.drawMultiPolygon = function(geometry) {
-  if (!ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  if (this.strokeState_ || this.fillState_) {
-    if (this.fillState_) {
-      this.setContextFillState_(this.fillState_);
-    }
-    if (this.strokeState_) {
-      this.setContextStrokeState_(this.strokeState_);
-    }
-    var context = this.context_;
-    var flatCoordinates = geometry.getOrientedFlatCoordinates();
-    var offset = 0;
-    var endss = geometry.getEndss();
-    var stride = geometry.getStride();
-    var i, ii;
-    context.beginPath();
-    for (i = 0, ii = endss.length; i < ii; ++i) {
-      var ends = endss[i];
-      offset = this.drawRings_(flatCoordinates, offset, ends, stride);
-    }
-    if (this.fillState_) {
-      context.fill();
-    }
-    if (this.strokeState_) {
-      context.stroke();
-    }
-  }
-  if (this.text_ !== '') {
-    var flatInteriorPoints = geometry.getFlatInteriorPoints();
-    this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);
-  }
-};
-
-
-/**
- * @param {ol.CanvasFillState} fillState Fill state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextFillState_ = function(fillState) {
-  var context = this.context_;
-  var contextFillState = this.contextFillState_;
-  if (!contextFillState) {
-    context.fillStyle = fillState.fillStyle;
-    this.contextFillState_ = {
-      fillStyle: fillState.fillStyle
-    };
-  } else {
-    if (contextFillState.fillStyle != fillState.fillStyle) {
-      contextFillState.fillStyle = context.fillStyle = fillState.fillStyle;
-    }
-  }
-};
-
-
-/**
- * @param {ol.CanvasStrokeState} strokeState Stroke state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextStrokeState_ = function(strokeState) {
-  var context = this.context_;
-  var contextStrokeState = this.contextStrokeState_;
-  if (!contextStrokeState) {
-    context.lineCap = strokeState.lineCap;
-    if (ol.has.CANVAS_LINE_DASH) {
-      context.setLineDash(strokeState.lineDash);
-      context.lineDashOffset = strokeState.lineDashOffset;
-    }
-    context.lineJoin = strokeState.lineJoin;
-    context.lineWidth = strokeState.lineWidth;
-    context.miterLimit = strokeState.miterLimit;
-    context.strokeStyle = strokeState.strokeStyle;
-    this.contextStrokeState_ = {
-      lineCap: strokeState.lineCap,
-      lineDash: strokeState.lineDash,
-      lineDashOffset: strokeState.lineDashOffset,
-      lineJoin: strokeState.lineJoin,
-      lineWidth: strokeState.lineWidth,
-      miterLimit: strokeState.miterLimit,
-      strokeStyle: strokeState.strokeStyle
-    };
-  } else {
-    if (contextStrokeState.lineCap != strokeState.lineCap) {
-      contextStrokeState.lineCap = context.lineCap = strokeState.lineCap;
-    }
-    if (ol.has.CANVAS_LINE_DASH) {
-      if (!ol.array.equals(
-          contextStrokeState.lineDash, strokeState.lineDash)) {
-        context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);
-      }
-      if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {
-        contextStrokeState.lineDashOffset = context.lineDashOffset =
-            strokeState.lineDashOffset;
-      }
-    }
-    if (contextStrokeState.lineJoin != strokeState.lineJoin) {
-      contextStrokeState.lineJoin = context.lineJoin = strokeState.lineJoin;
-    }
-    if (contextStrokeState.lineWidth != strokeState.lineWidth) {
-      contextStrokeState.lineWidth = context.lineWidth = strokeState.lineWidth;
-    }
-    if (contextStrokeState.miterLimit != strokeState.miterLimit) {
-      contextStrokeState.miterLimit = context.miterLimit =
-          strokeState.miterLimit;
-    }
-    if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {
-      contextStrokeState.strokeStyle = context.strokeStyle =
-          strokeState.strokeStyle;
-    }
-  }
-};
-
-
-/**
- * @param {ol.CanvasTextState} textState Text state.
- * @private
- */
-ol.render.canvas.Immediate.prototype.setContextTextState_ = function(textState) {
-  var context = this.context_;
-  var contextTextState = this.contextTextState_;
-  var textAlign = textState.textAlign ?
-    textState.textAlign : ol.render.canvas.defaultTextAlign;
-  if (!contextTextState) {
-    context.font = textState.font;
-    context.textAlign = textAlign;
-    context.textBaseline = textState.textBaseline;
-    this.contextTextState_ = {
-      font: textState.font,
-      textAlign: textAlign,
-      textBaseline: textState.textBaseline
-    };
-  } else {
-    if (contextTextState.font != textState.font) {
-      contextTextState.font = context.font = textState.font;
-    }
-    if (contextTextState.textAlign != textAlign) {
-      contextTextState.textAlign = textAlign;
-    }
-    if (contextTextState.textBaseline != textState.textBaseline) {
-      contextTextState.textBaseline = context.textBaseline =
-          textState.textBaseline;
-    }
-  }
-};
-
-
-/**
- * Set the fill and stroke style for subsequent draw operations.  To clear
- * either fill or stroke styles, pass null for the appropriate parameter.
- *
- * @param {ol.style.Fill} fillStyle Fill style.
- * @param {ol.style.Stroke} strokeStyle Stroke style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  if (!fillStyle) {
-    this.fillState_ = null;
-  } else {
-    var fillStyleColor = fillStyle.getColor();
-    this.fillState_ = {
-      fillStyle: ol.colorlike.asColorLike(fillStyleColor ?
-        fillStyleColor : ol.render.canvas.defaultFillStyle)
-    };
-  }
-  if (!strokeStyle) {
-    this.strokeState_ = null;
-  } else {
-    var strokeStyleColor = strokeStyle.getColor();
-    var strokeStyleLineCap = strokeStyle.getLineCap();
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    var strokeStyleLineJoin = strokeStyle.getLineJoin();
-    var strokeStyleWidth = strokeStyle.getWidth();
-    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-    this.strokeState_ = {
-      lineCap: strokeStyleLineCap !== undefined ?
-        strokeStyleLineCap : ol.render.canvas.defaultLineCap,
-      lineDash: strokeStyleLineDash ?
-        strokeStyleLineDash : ol.render.canvas.defaultLineDash,
-      lineDashOffset: strokeStyleLineDashOffset ?
-        strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
-      lineJoin: strokeStyleLineJoin !== undefined ?
-        strokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
-      lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?
-        strokeStyleWidth : ol.render.canvas.defaultLineWidth),
-      miterLimit: strokeStyleMiterLimit !== undefined ?
-        strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
-      strokeStyle: ol.colorlike.asColorLike(strokeStyleColor ?
-        strokeStyleColor : ol.render.canvas.defaultStrokeStyle)
-    };
-  }
-};
-
-
-/**
- * Set the image style for subsequent draw operations.  Pass null to remove
- * the image style.
- *
- * @param {ol.style.Image} imageStyle Image style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
-  if (!imageStyle) {
-    this.image_ = null;
-  } else {
-    var imageAnchor = imageStyle.getAnchor();
-    // FIXME pixel ratio
-    var imageImage = imageStyle.getImage(1);
-    var imageOrigin = imageStyle.getOrigin();
-    var imageSize = imageStyle.getSize();
-    this.imageAnchorX_ = imageAnchor[0];
-    this.imageAnchorY_ = imageAnchor[1];
-    this.imageHeight_ = imageSize[1];
-    this.image_ = imageImage;
-    this.imageOpacity_ = imageStyle.getOpacity();
-    this.imageOriginX_ = imageOrigin[0];
-    this.imageOriginY_ = imageOrigin[1];
-    this.imageRotateWithView_ = imageStyle.getRotateWithView();
-    this.imageRotation_ = imageStyle.getRotation();
-    this.imageScale_ = imageStyle.getScale() * this.pixelRatio_;
-    this.imageSnapToPixel_ = imageStyle.getSnapToPixel();
-    this.imageWidth_ = imageSize[0];
-  }
-};
-
-
-/**
- * Set the text style for subsequent draw operations.  Pass null to
- * remove the text style.
- *
- * @param {ol.style.Text} textStyle Text style.
- * @override
- */
-ol.render.canvas.Immediate.prototype.setTextStyle = function(textStyle) {
-  if (!textStyle) {
-    this.text_ = '';
-  } else {
-    var textFillStyle = textStyle.getFill();
-    if (!textFillStyle) {
-      this.textFillState_ = null;
-    } else {
-      var textFillStyleColor = textFillStyle.getColor();
-      this.textFillState_ = {
-        fillStyle: ol.colorlike.asColorLike(textFillStyleColor ?
-          textFillStyleColor : ol.render.canvas.defaultFillStyle)
-      };
-    }
-    var textStrokeStyle = textStyle.getStroke();
-    if (!textStrokeStyle) {
-      this.textStrokeState_ = null;
-    } else {
-      var textStrokeStyleColor = textStrokeStyle.getColor();
-      var textStrokeStyleLineCap = textStrokeStyle.getLineCap();
-      var textStrokeStyleLineDash = textStrokeStyle.getLineDash();
-      var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();
-      var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();
-      var textStrokeStyleWidth = textStrokeStyle.getWidth();
-      var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();
-      this.textStrokeState_ = {
-        lineCap: textStrokeStyleLineCap !== undefined ?
-          textStrokeStyleLineCap : ol.render.canvas.defaultLineCap,
-        lineDash: textStrokeStyleLineDash ?
-          textStrokeStyleLineDash : ol.render.canvas.defaultLineDash,
-        lineDashOffset: textStrokeStyleLineDashOffset ?
-          textStrokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset,
-        lineJoin: textStrokeStyleLineJoin !== undefined ?
-          textStrokeStyleLineJoin : ol.render.canvas.defaultLineJoin,
-        lineWidth: textStrokeStyleWidth !== undefined ?
-          textStrokeStyleWidth : ol.render.canvas.defaultLineWidth,
-        miterLimit: textStrokeStyleMiterLimit !== undefined ?
-          textStrokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit,
-        strokeStyle: ol.colorlike.asColorLike(textStrokeStyleColor ?
-          textStrokeStyleColor : ol.render.canvas.defaultStrokeStyle)
-      };
-    }
-    var textFont = textStyle.getFont();
-    var textOffsetX = textStyle.getOffsetX();
-    var textOffsetY = textStyle.getOffsetY();
-    var textRotateWithView = textStyle.getRotateWithView();
-    var textRotation = textStyle.getRotation();
-    var textScale = textStyle.getScale();
-    var textText = textStyle.getText();
-    var textTextAlign = textStyle.getTextAlign();
-    var textTextBaseline = textStyle.getTextBaseline();
-    this.textState_ = {
-      font: textFont !== undefined ?
-        textFont : ol.render.canvas.defaultFont,
-      textAlign: textTextAlign !== undefined ?
-        textTextAlign : ol.render.canvas.defaultTextAlign,
-      textBaseline: textTextBaseline !== undefined ?
-        textTextBaseline : ol.render.canvas.defaultTextBaseline
-    };
-    this.text_ = textText !== undefined ? textText : '';
-    this.textOffsetX_ =
-        textOffsetX !== undefined ? (this.pixelRatio_ * textOffsetX) : 0;
-    this.textOffsetY_ =
-        textOffsetY !== undefined ? (this.pixelRatio_ * textOffsetY) : 0;
-    this.textRotateWithView_ = textRotateWithView !== undefined ? textRotateWithView : false;
-    this.textRotation_ = textRotation !== undefined ? textRotation : 0;
-    this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?
-      textScale : 1);
-  }
-};
-
-goog.provide('ol.renderer.Layer');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.Observable');
-goog.require('ol.TileState');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.functions');
-goog.require('ol.source.State');
-
-
-/**
- * @constructor
- * @extends {ol.Observable}
- * @param {ol.layer.Layer} layer Layer.
- * @struct
- */
-ol.renderer.Layer = function(layer) {
-
-  ol.Observable.call(this);
-
-  /**
-   * @private
-   * @type {ol.layer.Layer}
-   */
-  this.layer_ = layer;
-
-
-};
-ol.inherits(ol.renderer.Layer, ol.Observable);
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState Frame state.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: S, (ol.Feature|ol.render.Feature), ol.layer.Layer): T}
- *     callback Feature callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @return {T|undefined} Callback result.
- * @template S,T
- */
-ol.renderer.Layer.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState Frame state.
- * @return {boolean} Is there a feature at the given coordinate?
- */
-ol.renderer.Layer.prototype.hasFeatureAtCoordinate = ol.functions.FALSE;
-
-
-/**
- * Create a function that adds loaded tiles to the tile lookup.
- * @param {ol.source.Tile} source Tile source.
- * @param {ol.proj.Projection} projection Projection of the tiles.
- * @param {Object.<number, Object.<string, ol.Tile>>} tiles Lookup of loaded
- *     tiles by zoom level.
- * @return {function(number, ol.TileRange):boolean} A function that can be
- *     called with a zoom level and a tile range to add loaded tiles to the
- *     lookup.
- * @protected
- */
-ol.renderer.Layer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
-  return (
-    /**
-     * @param {number} zoom Zoom level.
-     * @param {ol.TileRange} tileRange Tile range.
-     * @return {boolean} The tile range is fully loaded.
-     */
-    function(zoom, tileRange) {
-      function callback(tile) {
-        if (!tiles[zoom]) {
-          tiles[zoom] = {};
-        }
-        tiles[zoom][tile.tileCoord.toString()] = tile;
-      }
-      return source.forEachLoadedTile(projection, zoom, tileRange, callback);
-    });
-};
-
-
-/**
- * @return {ol.layer.Layer} Layer.
- */
-ol.renderer.Layer.prototype.getLayer = function() {
-  return this.layer_;
-};
-
-
-/**
- * Handle changes in image state.
- * @param {ol.events.Event} event Image change event.
- * @private
- */
-ol.renderer.Layer.prototype.handleImageChange_ = function(event) {
-  var image = /** @type {ol.Image} */ (event.target);
-  if (image.getState() === ol.ImageState.LOADED) {
-    this.renderIfReadyAndVisible();
-  }
-};
-
-
-/**
- * Load the image if not already loaded, and register the image change
- * listener if needed.
- * @param {ol.ImageBase} image Image.
- * @return {boolean} `true` if the image is already loaded, `false`
- *     otherwise.
- * @protected
- */
-ol.renderer.Layer.prototype.loadImage = function(image) {
-  var imageState = image.getState();
-  if (imageState != ol.ImageState.LOADED &&
-      imageState != ol.ImageState.ERROR) {
-    ol.events.listen(image, ol.events.EventType.CHANGE,
-        this.handleImageChange_, this);
-  }
-  if (imageState == ol.ImageState.IDLE) {
-    image.load();
-    imageState = image.getState();
-  }
-  return imageState == ol.ImageState.LOADED;
-};
-
-
-/**
- * @protected
- */
-ol.renderer.Layer.prototype.renderIfReadyAndVisible = function() {
-  var layer = this.getLayer();
-  if (layer.getVisible() && layer.getSourceState() == ol.source.State.READY) {
-    this.changed();
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Tile} tileSource Tile source.
- * @protected
- */
-ol.renderer.Layer.prototype.scheduleExpireCache = function(frameState, tileSource) {
-  if (tileSource.canExpireCache()) {
-    /**
-     * @param {ol.source.Tile} tileSource Tile source.
-     * @param {ol.PluggableMap} map Map.
-     * @param {olx.FrameState} frameState Frame state.
-     */
-    var postRenderFunction = function(tileSource, map, frameState) {
-      var tileSourceKey = ol.getUid(tileSource).toString();
-      if (tileSourceKey in frameState.usedTiles) {
-        tileSource.expireCache(frameState.viewState.projection,
-            frameState.usedTiles[tileSourceKey]);
-      }
-    }.bind(null, tileSource);
-
-    frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-    );
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Source} source Source.
- * @protected
- */
-ol.renderer.Layer.prototype.updateLogos = function(frameState, source) {
-  var logo = source.getLogo();
-  if (logo !== undefined) {
-    if (typeof logo === 'string') {
-      frameState.logos[logo] = '';
-    } else if (logo) {
-      ol.asserts.assert(typeof logo.href == 'string', 44); // `logo.href` should be a string.
-      ol.asserts.assert(typeof logo.src == 'string', 45); // `logo.src` should be a string.
-      frameState.logos[logo.src] = logo.href;
-    }
-  }
-};
-
-
-/**
- * @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.
- * @param {ol.source.Tile} tileSource Tile source.
- * @param {number} z Z.
- * @param {ol.TileRange} tileRange Tile range.
- * @protected
- */
-ol.renderer.Layer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, tileRange) {
-  // FIXME should we use tilesToDrawByZ instead?
-  var tileSourceKey = ol.getUid(tileSource).toString();
-  var zKey = z.toString();
-  if (tileSourceKey in usedTiles) {
-    if (zKey in usedTiles[tileSourceKey]) {
-      usedTiles[tileSourceKey][zKey].extend(tileRange);
-    } else {
-      usedTiles[tileSourceKey][zKey] = tileRange;
-    }
-  } else {
-    usedTiles[tileSourceKey] = {};
-    usedTiles[tileSourceKey][zKey] = tileRange;
-  }
-};
-
-
-/**
- * Manage tile pyramid.
- * This function performs a number of functions related to the tiles at the
- * current zoom and lower zoom levels:
- * - registers idle tiles in frameState.wantedTiles so that they are not
- *   discarded by the tile queue
- * - enqueues missing tiles
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.source.Tile} tileSource Tile source.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {ol.Extent} extent Extent.
- * @param {number} currentZ Current Z.
- * @param {number} preload Load low resolution tiles up to 'preload' levels.
- * @param {function(this: T, ol.Tile)=} opt_tileCallback Tile callback.
- * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.
- * @protected
- * @template T
- */
-ol.renderer.Layer.prototype.manageTilePyramid = function(
-    frameState, tileSource, tileGrid, pixelRatio, projection, extent,
-    currentZ, preload, opt_tileCallback, opt_this) {
-  var tileSourceKey = ol.getUid(tileSource).toString();
-  if (!(tileSourceKey in frameState.wantedTiles)) {
-    frameState.wantedTiles[tileSourceKey] = {};
-  }
-  var wantedTiles = frameState.wantedTiles[tileSourceKey];
-  var tileQueue = frameState.tileQueue;
-  var minZoom = tileGrid.getMinZoom();
-  var tile, tileRange, tileResolution, x, y, z;
-  for (z = minZoom; z <= currentZ; ++z) {
-    tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);
-    tileResolution = tileGrid.getResolution(z);
-    for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-      for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-        if (currentZ - z <= preload) {
-          tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-          if (tile.getState() == ol.TileState.IDLE) {
-            wantedTiles[tile.getKey()] = true;
-            if (!tileQueue.isKeyQueued(tile.getKey())) {
-              tileQueue.enqueue([tile, tileSourceKey,
-                tileGrid.getTileCoordCenter(tile.tileCoord), tileResolution]);
-            }
-          }
-          if (opt_tileCallback !== undefined) {
-            opt_tileCallback.call(opt_this, tile);
-          }
-        } else {
-          tileSource.useTile(z, x, y, projection);
-        }
-      }
-    }
-  }
-};
-
-goog.provide('ol.renderer.canvas.Layer');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.renderer.Layer');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.renderer.Layer}
- * @param {ol.layer.Layer} layer Layer.
- */
-ol.renderer.canvas.Layer = function(layer) {
-
-  ol.renderer.Layer.call(this, layer);
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.renderedResolution;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-};
-ol.inherits(ol.renderer.canvas.Layer, ol.renderer.Layer);
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Extent} extent Clip extent.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.clip = function(context, frameState, extent) {
-  var pixelRatio = frameState.pixelRatio;
-  var width = frameState.size[0] * pixelRatio;
-  var height = frameState.size[1] * pixelRatio;
-  var rotation = frameState.viewState.rotation;
-  var topLeft = ol.extent.getTopLeft(/** @type {ol.Extent} */ (extent));
-  var topRight = ol.extent.getTopRight(/** @type {ol.Extent} */ (extent));
-  var bottomRight = ol.extent.getBottomRight(/** @type {ol.Extent} */ (extent));
-  var bottomLeft = ol.extent.getBottomLeft(/** @type {ol.Extent} */ (extent));
-
-  ol.transform.apply(frameState.coordinateToPixelTransform, topLeft);
-  ol.transform.apply(frameState.coordinateToPixelTransform, topRight);
-  ol.transform.apply(frameState.coordinateToPixelTransform, bottomRight);
-  ol.transform.apply(frameState.coordinateToPixelTransform, bottomLeft);
-
-  context.save();
-  ol.render.canvas.rotateAtOffset(context, -rotation, width / 2, height / 2);
-  context.beginPath();
-  context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);
-  context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);
-  context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);
-  context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);
-  context.clip();
-  ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-};
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @private
- */
-ol.renderer.canvas.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState, opt_transform) {
-  var layer = this.getLayer();
-  if (layer.hasListener(type)) {
-    var width = frameState.size[0] * frameState.pixelRatio;
-    var height = frameState.size[1] * frameState.pixelRatio;
-    var rotation = frameState.viewState.rotation;
-    ol.render.canvas.rotateAtOffset(context, -rotation, width / 2, height / 2);
-    var transform = opt_transform !== undefined ?
-      opt_transform : this.getTransform(frameState, 0);
-    var render = new ol.render.canvas.Immediate(
-        context, frameState.pixelRatio, frameState.extent, transform,
-        frameState.viewState.rotation);
-    var composeEvent = new ol.render.Event(type, render, frameState,
-        context, null);
-    layer.dispatchEvent(composeEvent);
-    ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
- *     callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
-  var hasFeature = this.forEachFeatureAtCoordinate(
-      coordinate, frameState, 0, ol.functions.TRUE, this);
-
-  if (hasFeature) {
-    return callback.call(thisArg, this.getLayer(), null);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.postCompose = function(context, frameState, layerState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.preCompose = function(context, frameState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.Transform=} opt_transform Transform.
- * @protected
- */
-ol.renderer.canvas.Layer.prototype.dispatchRenderEvent = function(context, frameState, opt_transform) {
-  this.dispatchComposeEvent_(ol.render.EventType.RENDER, context,
-      frameState, opt_transform);
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {number} offsetX Offset on the x-axis in view coordinates.
- * @protected
- * @return {!ol.Transform} Transform.
- */
-ol.renderer.canvas.Layer.prototype.getTransform = function(frameState, offsetX) {
-  var viewState = frameState.viewState;
-  var pixelRatio = frameState.pixelRatio;
-  var dx1 = pixelRatio * frameState.size[0] / 2;
-  var dy1 = pixelRatio * frameState.size[1] / 2;
-  var sx = pixelRatio / viewState.resolution;
-  var sy = -sx;
-  var angle = -viewState.rotation;
-  var dx2 = -viewState.center[0] + offsetX;
-  var dy2 = -viewState.center[1];
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);
-};
-
-
-/**
- * @abstract
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {CanvasRenderingContext2D} context Context.
- */
-ol.renderer.canvas.Layer.prototype.composeFrame = function(frameState, layerState, context) {};
-
-/**
- * @abstract
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @return {boolean} whether composeFrame should be called.
- */
-ol.renderer.canvas.Layer.prototype.prepareFrame = function(frameState, layerState) {};
-
-goog.provide('ol.renderer.canvas.IntermediateCanvas');
-
-goog.require('ol');
-goog.require('ol.coordinate');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.renderer.canvas.Layer');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.renderer.canvas.Layer}
- * @param {ol.layer.Layer} layer Layer.
- */
-ol.renderer.canvas.IntermediateCanvas = function(layer) {
-
-  ol.renderer.canvas.Layer.call(this, layer);
-
-  /**
-   * @protected
-   * @type {ol.Transform}
-   */
-  this.coordinateToCanvasPixelTransform = ol.transform.create();
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.hitCanvasContext_ = null;
-
-};
-ol.inherits(ol.renderer.canvas.IntermediateCanvas, ol.renderer.canvas.Layer);
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.composeFrame = function(frameState, layerState, context) {
-
-  this.preCompose(context, frameState);
-
-  var image = this.getImage();
-  if (image) {
-
-    // clipped rendering if layer extent is set
-    var extent = layerState.extent;
-    var clipped = extent !== undefined &&
-        !ol.extent.containsExtent(extent, frameState.extent) &&
-        ol.extent.intersects(extent, frameState.extent);
-    if (clipped) {
-      this.clip(context, frameState, /** @type {ol.Extent} */ (extent));
-    }
-
-    var imageTransform = this.getImageTransform();
-    // for performance reasons, context.save / context.restore is not used
-    // to save and restore the transformation matrix and the opacity.
-    // see http://jsperf.com/context-save-restore-versus-variable
-    var alpha = context.globalAlpha;
-    context.globalAlpha = layerState.opacity;
-
-    // for performance reasons, context.setTransform is only used
-    // when the view is rotated. see http://jsperf.com/canvas-transform
-    var dx = imageTransform[4];
-    var dy = imageTransform[5];
-    var dw = image.width * imageTransform[0];
-    var dh = image.height * imageTransform[3];
-    context.drawImage(image, 0, 0, +image.width, +image.height,
-        Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));
-    context.globalAlpha = alpha;
-
-    if (clipped) {
-      context.restore();
-    }
-  }
-
-  this.postCompose(context, frameState, layerState);
-};
-
-
-/**
- * @abstract
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Canvas.
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.getImage = function() {};
-
-
-/**
- * @abstract
- * @return {!ol.Transform} Image transform.
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.getImageTransform = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  var layer = this.getLayer();
-  var source = layer.getSource();
-  var resolution = frameState.viewState.resolution;
-  var rotation = frameState.viewState.rotation;
-  var skippedFeatureUids = frameState.skippedFeatureUids;
-  return source.forEachFeatureAtCoordinate(
-      coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {?} Callback result.
-       */
-      function(feature) {
-        return callback.call(thisArg, feature, layer);
-      });
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.IntermediateCanvas.prototype.forEachLayerAtCoordinate = function(coordinate, frameState, callback, thisArg) {
-  if (!this.getImage()) {
-    return undefined;
-  }
-
-  if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
-    // for ImageCanvas sources use the original hit-detection logic,
-    // so that for example also transparent polygons are detected
-    return ol.renderer.canvas.Layer.prototype.forEachLayerAtCoordinate.apply(this, arguments);
-  } else {
-    var pixel = ol.transform.apply(this.coordinateToCanvasPixelTransform, coordinate.slice());
-    ol.coordinate.scale(pixel, frameState.viewState.resolution / this.renderedResolution);
-
-    if (!this.hitCanvasContext_) {
-      this.hitCanvasContext_ = ol.dom.createCanvasContext2D(1, 1);
-    }
-
-    this.hitCanvasContext_.clearRect(0, 0, 1, 1);
-    this.hitCanvasContext_.drawImage(this.getImage(), pixel[0], pixel[1], 1, 1, 0, 0, 1, 1);
-
-    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;
-    if (imageData[3] > 0) {
-      return callback.call(thisArg, this.getLayer(),  imageData);
-    } else {
-      return undefined;
-    }
-  }
-};
-
-goog.provide('ol.renderer.canvas.ImageLayer');
-
-goog.require('ol');
-goog.require('ol.ImageCanvas');
-goog.require('ol.LayerType');
-goog.require('ol.ViewHint');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.layer.VectorRenderType');
-goog.require('ol.obj');
-goog.require('ol.plugins');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.IntermediateCanvas');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.IntermediateCanvas}
- * @param {ol.layer.Image} imageLayer Single image layer.
- * @api
- */
-ol.renderer.canvas.ImageLayer = function(imageLayer) {
-
-  ol.renderer.canvas.IntermediateCanvas.call(this, imageLayer);
-
-  /**
-   * @private
-   * @type {?ol.ImageBase}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.imageTransform_ = ol.transform.create();
-
-  /**
-   * @type {!Array.<string>}
-   */
-  this.skippedFeatures_ = [];
-
-  /**
-   * @private
-   * @type {ol.renderer.canvas.VectorLayer}
-   */
-  this.vectorRenderer_ = null;
-
-};
-ol.inherits(ol.renderer.canvas.ImageLayer, ol.renderer.canvas.IntermediateCanvas);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.canvas.ImageLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.CANVAS && (layer.getType() === ol.LayerType.IMAGE ||
-      layer.getType() === ol.LayerType.VECTOR &&
-      /** @type {ol.layer.Vector} */ (layer).getRenderMode() === ol.layer.VectorRenderType.IMAGE);
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.canvas.ImageLayer} The layer renderer.
- */
-ol.renderer.canvas.ImageLayer['create'] = function(mapRenderer, layer) {
-  var renderer = new ol.renderer.canvas.ImageLayer(/** @type {ol.layer.Image} */ (layer));
-  if (layer.getType() === ol.LayerType.VECTOR) {
-    var candidates = ol.plugins.getLayerRendererPlugins();
-    for (var i = 0, ii = candidates.length; i < ii; ++i) {
-      var candidate = /** @type {Object.<string, Function>} */ (candidates[i]);
-      if (candidate !== ol.renderer.canvas.ImageLayer && candidate['handles'](ol.renderer.Type.CANVAS, layer)) {
-        renderer.setVectorRenderer(candidate['create'](mapRenderer, layer));
-      }
-    }
-  }
-  return renderer;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.getImage = function() {
-  return !this.image_ ? null : this.image_.getImage();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.getImageTransform = function() {
-  return this.imageTransform_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var pixelRatio = frameState.pixelRatio;
-  var size = frameState.size;
-  var viewState = frameState.viewState;
-  var viewCenter = viewState.center;
-  var viewResolution = viewState.resolution;
-
-  var image;
-  var imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
-  var imageSource = imageLayer.getSource();
-
-  var hints = frameState.viewHints;
-
-  var renderedExtent = frameState.extent;
-  if (layerState.extent !== undefined) {
-    renderedExtent = ol.extent.getIntersection(
-        renderedExtent, layerState.extent);
-  }
-
-  if (!hints[ol.ViewHint.ANIMATING] && !hints[ol.ViewHint.INTERACTING] &&
-      !ol.extent.isEmpty(renderedExtent)) {
-    var projection = viewState.projection;
-    if (!ol.ENABLE_RASTER_REPROJECTION) {
-      var sourceProjection = imageSource.getProjection();
-      if (sourceProjection) {
-        projection = sourceProjection;
-      }
-    }
-    var vectorRenderer = this.vectorRenderer_;
-    if (vectorRenderer) {
-      var context = vectorRenderer.context;
-      var imageFrameState = /** @type {olx.FrameState} */ (ol.obj.assign({}, frameState, {
-        size: [
-          ol.extent.getWidth(renderedExtent) / viewResolution,
-          ol.extent.getHeight(renderedExtent) / viewResolution
-        ],
-        viewState: /** @type {olx.ViewState} */ (ol.obj.assign({}, frameState.viewState, {
-          rotation: 0
-        }))
-      }));
-      var skippedFeatures = Object.keys(imageFrameState.skippedFeatureUids).sort();
-      if (vectorRenderer.prepareFrame(imageFrameState, layerState) &&
-          (vectorRenderer.replayGroupChanged ||
-          !ol.array.equals(skippedFeatures, this.skippedFeatures_))) {
-        context.canvas.width = imageFrameState.size[0] * pixelRatio;
-        context.canvas.height = imageFrameState.size[1] * pixelRatio;
-        vectorRenderer.composeFrame(imageFrameState, layerState, context);
-        this.image_ = new ol.ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas);
-        this.skippedFeatures_ = skippedFeatures;
-      }
-    } else {
-      image = imageSource.getImage(
-          renderedExtent, viewResolution, pixelRatio, projection);
-      if (image) {
-        var loaded = this.loadImage(image);
-        if (loaded) {
-          this.image_ = image;
-        }
-      }
-    }
-  }
-
-  if (this.image_) {
-    image = this.image_;
-    var imageExtent = image.getExtent();
-    var imageResolution = image.getResolution();
-    var imagePixelRatio = image.getPixelRatio();
-    var scale = pixelRatio * imageResolution /
-        (viewResolution * imagePixelRatio);
-    var transform = ol.transform.compose(this.imageTransform_,
-        pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,
-        scale, scale,
-        0,
-        imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,
-        imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);
-    ol.transform.compose(this.coordinateToCanvasPixelTransform,
-        pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],
-        pixelRatio / viewResolution, -pixelRatio / viewResolution,
-        0,
-        -viewCenter[0], -viewCenter[1]);
-
-    this.updateLogos(frameState, imageSource);
-    this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;
-  }
-
-  return !!this.image_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  if (this.vectorRenderer_) {
-    return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback, thisArg);
-  } else {
-    return ol.renderer.canvas.IntermediateCanvas.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback, thisArg);
-  }
-};
-
-
-/**
- * @param {ol.renderer.canvas.VectorLayer} renderer Vector renderer.
- */
-ol.renderer.canvas.ImageLayer.prototype.setVectorRenderer = function(renderer) {
-  this.vectorRenderer_ = renderer;
-};
-
-goog.provide('ol.style.IconImageCache');
-
-goog.require('ol.color');
-
-
-/**
- * Singleton class. Available through {@link ol.style.iconImageCache}.
- * @constructor
- */
-ol.style.IconImageCache = function() {
-
-  /**
-   * @type {Object.<string, ol.style.IconImage>}
-   * @private
-   */
-  this.cache_ = {};
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.cacheSize_ = 0;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxCacheSize_ = 32;
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @return {string} Cache key.
- */
-ol.style.IconImageCache.getKey = function(src, crossOrigin, color) {
-  var colorString = color ? ol.color.asString(color) : 'null';
-  return crossOrigin + ':' + src + ':' + colorString;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.style.IconImageCache.prototype.clear = function() {
-  this.cache_ = {};
-  this.cacheSize_ = 0;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.style.IconImageCache.prototype.expire = function() {
-  if (this.cacheSize_ > this.maxCacheSize_) {
-    var i = 0;
-    var key, iconImage;
-    for (key in this.cache_) {
-      iconImage = this.cache_[key];
-      if ((i++ & 3) === 0 && !iconImage.hasListener()) {
-        delete this.cache_[key];
-        --this.cacheSize_;
-      }
-    }
-  }
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @return {ol.style.IconImage} Icon image.
- */
-ol.style.IconImageCache.prototype.get = function(src, crossOrigin, color) {
-  var key = ol.style.IconImageCache.getKey(src, crossOrigin, color);
-  return key in this.cache_ ? this.cache_[key] : null;
-};
-
-
-/**
- * @param {string} src Src.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.Color} color Color.
- * @param {ol.style.IconImage} iconImage Icon image.
- */
-ol.style.IconImageCache.prototype.set = function(src, crossOrigin, color, iconImage) {
-  var key = ol.style.IconImageCache.getKey(src, crossOrigin, color);
-  this.cache_[key] = iconImage;
-  ++this.cacheSize_;
-};
-
-
-/**
- * Set the cache size of the icon cache. Default is `32`. Change this value when
- * your map uses more than 32 different icon images and you are not caching icon
- * styles on the application level.
- * @param {number} maxCacheSize Cache max size.
- * @api
- */
-ol.style.IconImageCache.prototype.setSize = function(maxCacheSize) {
-  this.maxCacheSize_ = maxCacheSize;
-  this.expire();
-};
-
-goog.provide('ol.style');
-
-goog.require('ol.style.IconImageCache');
-
-/**
- * The {@link ol.style.IconImageCache} for {@link ol.style.Icon} images.
- * @api
- */
-ol.style.iconImageCache = new ol.style.IconImageCache();
-
-goog.provide('ol.renderer.Map');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.layer.Layer');
-goog.require('ol.plugins');
-goog.require('ol.style');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.Disposable}
- * @param {Element} container Container.
- * @param {ol.PluggableMap} map Map.
- * @struct
- */
-ol.renderer.Map = function(container, map) {
-
-  ol.Disposable.call(this);
-
-
-  /**
-   * @private
-   * @type {ol.PluggableMap}
-   */
-  this.map_ = map;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.renderer.Layer>}
-   */
-  this.layerRenderers_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, ol.EventsKey>}
-   */
-  this.layerRendererListeners_ = {};
-
-};
-ol.inherits(ol.renderer.Map, ol.Disposable);
-
-
-/**
- * @param {olx.FrameState} frameState FrameState.
- * @protected
- */
-ol.renderer.Map.prototype.calculateMatrices2D = function(frameState) {
-  var viewState = frameState.viewState;
-  var coordinateToPixelTransform = frameState.coordinateToPixelTransform;
-  var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;
-
-  ol.transform.compose(coordinateToPixelTransform,
-      frameState.size[0] / 2, frameState.size[1] / 2,
-      1 / viewState.resolution, -1 / viewState.resolution,
-      -viewState.rotation,
-      -viewState.center[0], -viewState.center[1]);
-
-  ol.transform.invert(
-      ol.transform.setFromArray(pixelToCoordinateTransform, coordinateToPixelTransform));
-};
-
-
-/**
- * Removes all layer renderers.
- */
-ol.renderer.Map.prototype.removeLayerRenderers = function() {
-  for (var key in this.layerRenderers_) {
-    this.removeLayerRendererByKey_(key).dispose();
-  }
-};
-
-
-/**
- * @param {ol.PluggableMap} map Map.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.Map.expireIconCache_ = function(map, frameState) {
-  var cache = ol.style.iconImageCache;
-  cache.expire();
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: S, (ol.Feature|ol.render.Feature),
- *     ol.layer.Layer): T} callback Feature callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg,
-    layerFilter, thisArg2) {
-  var result;
-  var viewState = frameState.viewState;
-  var viewResolution = viewState.resolution;
-
-  /**
-   * @param {ol.Feature|ol.render.Feature} feature Feature.
-   * @param {ol.layer.Layer} layer Layer.
-   * @return {?} Callback result.
-   */
-  function forEachFeatureAtCoordinate(feature, layer) {
-    var key = ol.getUid(feature).toString();
-    var managed = frameState.layerStates[ol.getUid(layer)].managed;
-    if (!(key in frameState.skippedFeatureUids && !managed)) {
-      return callback.call(thisArg, feature, managed ? layer : null);
-    }
-  }
-
-  var projection = viewState.projection;
-
-  var translatedCoordinate = coordinate;
-  if (projection.canWrapX()) {
-    var projectionExtent = projection.getExtent();
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var x = coordinate[0];
-    if (x < projectionExtent[0] || x > projectionExtent[2]) {
-      var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);
-      translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]];
-    }
-  }
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-        layerFilter.call(thisArg2, layer)) {
-      var layerRenderer = this.getLayerRenderer(layer);
-      if (layer.getSource()) {
-        result = layerRenderer.forEachFeatureAtCoordinate(
-            layer.getSource().getWrapX() ? translatedCoordinate : coordinate,
-            frameState, hitTolerance, forEachFeatureAtCoordinate, thisArg);
-      }
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @abstract
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.FrameState} frameState FrameState.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
- *     callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-    layerFilter, thisArg2) {};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {olx.FrameState} frameState FrameState.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {function(this: U, ol.layer.Layer): boolean} layerFilter Layer filter
- *     function, only layers which are visible and for which this function
- *     returns `true` will be tested for features.  By default, all visible
- *     layers will be tested.
- * @param {U} thisArg Value to use as `this` when executing `layerFilter`.
- * @return {boolean} Is there a feature at the given coordinate?
- * @template U
- */
-ol.renderer.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
-  var hasFeature = this.forEachFeatureAtCoordinate(
-      coordinate, frameState, hitTolerance, ol.functions.TRUE, this, layerFilter, thisArg);
-
-  return hasFeature !== undefined;
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @protected
- * @return {ol.renderer.Layer} Layer renderer.
- */
-ol.renderer.Map.prototype.getLayerRenderer = function(layer) {
-  var layerKey = ol.getUid(layer).toString();
-  if (layerKey in this.layerRenderers_) {
-    return this.layerRenderers_[layerKey];
-  } else {
-    var layerRendererPlugins = ol.plugins.getLayerRendererPlugins();
-    var renderer;
-    var type = this.getType();
-    for (var i = 0, ii = layerRendererPlugins.length; i < ii; ++i) {
-      var plugin = layerRendererPlugins[i];
-      if (plugin['handles'](type, layer)) {
-        renderer = plugin['create'](this, layer);
-        break;
-      }
-    }
-    if (renderer) {
-      this.layerRenderers_[layerKey] = renderer;
-      this.layerRendererListeners_[layerKey] = ol.events.listen(renderer,
-          ol.events.EventType.CHANGE, this.handleLayerRendererChange_, this);
-    } else {
-      throw new Error('Unable to create renderer for layer: ' + layer.getType());
-    }
-    return renderer;
-  }
-};
-
-
-/**
- * @param {string} layerKey Layer key.
- * @protected
- * @return {ol.renderer.Layer} Layer renderer.
- */
-ol.renderer.Map.prototype.getLayerRendererByKey = function(layerKey) {
-  return this.layerRenderers_[layerKey];
-};
-
-
-/**
- * @protected
- * @return {Object.<string, ol.renderer.Layer>} Layer renderers.
- */
-ol.renderer.Map.prototype.getLayerRenderers = function() {
-  return this.layerRenderers_;
-};
-
-
-/**
- * @return {ol.PluggableMap} Map.
- */
-ol.renderer.Map.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * @abstract
- * @return {ol.renderer.Type} Type
- */
-ol.renderer.Map.prototype.getType = function() {};
-
-
-/**
- * Handle changes in a layer renderer.
- * @private
- */
-ol.renderer.Map.prototype.handleLayerRendererChange_ = function() {
-  this.map_.render();
-};
-
-
-/**
- * @param {string} layerKey Layer key.
- * @return {ol.renderer.Layer} Layer renderer.
- * @private
- */
-ol.renderer.Map.prototype.removeLayerRendererByKey_ = function(layerKey) {
-  var layerRenderer = this.layerRenderers_[layerKey];
-  delete this.layerRenderers_[layerKey];
-
-  ol.events.unlistenByKey(this.layerRendererListeners_[layerKey]);
-  delete this.layerRendererListeners_[layerKey];
-
-  return layerRenderer;
-};
-
-
-/**
- * Render.
- * @param {?olx.FrameState} frameState Frame state.
- */
-ol.renderer.Map.prototype.renderFrame = ol.nullFunction;
-
-
-/**
- * @param {ol.PluggableMap} map Map.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.Map.prototype.removeUnusedLayerRenderers_ = function(map, frameState) {
-  var layerKey;
-  for (layerKey in this.layerRenderers_) {
-    if (!frameState || !(layerKey in frameState.layerStates)) {
-      this.removeLayerRendererByKey_(layerKey).dispose();
-    }
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @protected
- */
-ol.renderer.Map.prototype.scheduleExpireIconCache = function(frameState) {
-  frameState.postRenderFunctions.push(
-      /** @type {ol.PostRenderFunction} */ (ol.renderer.Map.expireIconCache_)
-  );
-};
-
-
-/**
- * @param {!olx.FrameState} frameState Frame state.
- * @protected
- */
-ol.renderer.Map.prototype.scheduleRemoveUnusedLayerRenderers = function(frameState) {
-  var layerKey;
-  for (layerKey in this.layerRenderers_) {
-    if (!(layerKey in frameState.layerStates)) {
-      frameState.postRenderFunctions.push(
-          /** @type {ol.PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))
-      );
-      return;
-    }
-  }
-};
-
-
-/**
- * @param {ol.LayerState} state1 First layer state.
- * @param {ol.LayerState} state2 Second layer state.
- * @return {number} The zIndex difference.
- */
-ol.renderer.Map.sortByZIndex = function(state1, state2) {
-  return state1.zIndex - state2.zIndex;
-};
-
-// FIXME offset panning
-
-goog.provide('ol.renderer.canvas.Map');
-
-goog.require('ol.transform');
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.layer.Layer');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.renderer.Map');
-goog.require('ol.renderer.Type');
-goog.require('ol.source.State');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.Map}
- * @param {Element} container Container.
- * @param {ol.PluggableMap} map Map.
- * @api
- */
-ol.renderer.canvas.Map = function(container, map) {
-
-  ol.renderer.Map.call(this, container, map);
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = this.context_.canvas;
-
-  this.canvas_.style.width = '100%';
-  this.canvas_.style.height = '100%';
-  this.canvas_.style.display = 'block';
-  this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
-  container.insertBefore(this.canvas_, container.childNodes[0] || null);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = true;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-};
-ol.inherits(ol.renderer.canvas.Map, ol.renderer.Map);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.canvas.Map['handles'] = function(type) {
-  return type === ol.renderer.Type.CANVAS;
-};
-
-
-/**
- * Create the map renderer.
- * @param {Element} container Container.
- * @param {ol.PluggableMap} map Map.
- * @return {ol.renderer.canvas.Map} The map renderer.
- */
-ol.renderer.canvas.Map['create'] = function(container, map) {
-  return new ol.renderer.canvas.Map(container, map);
-};
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.canvas.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
-  var map = this.getMap();
-  var context = this.context_;
-  if (map.hasListener(type)) {
-    var extent = frameState.extent;
-    var pixelRatio = frameState.pixelRatio;
-    var viewState = frameState.viewState;
-    var rotation = viewState.rotation;
-
-    var transform = this.getTransform(frameState);
-
-    var vectorContext = new ol.render.canvas.Immediate(context, pixelRatio,
-        extent, transform, rotation);
-    var composeEvent = new ol.render.Event(type, vectorContext,
-        frameState, context, null);
-    map.dispatchEvent(composeEvent);
-  }
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @protected
- * @return {!ol.Transform} Transform.
- */
-ol.renderer.canvas.Map.prototype.getTransform = function(frameState) {
-  var viewState = frameState.viewState;
-  var dx1 = this.canvas_.width / 2;
-  var dy1 = this.canvas_.height / 2;
-  var sx = frameState.pixelRatio / viewState.resolution;
-  var sy = -sx;
-  var angle = -viewState.rotation;
-  var dx2 = -viewState.center[0];
-  var dy2 = -viewState.center[1];
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.getType = function() {
-  return ol.renderer.Type.CANVAS;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
-
-  if (!frameState) {
-    if (this.renderedVisible_) {
-      this.canvas_.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var context = this.context_;
-  var pixelRatio = frameState.pixelRatio;
-  var width = Math.round(frameState.size[0] * pixelRatio);
-  var height = Math.round(frameState.size[1] * pixelRatio);
-  if (this.canvas_.width != width || this.canvas_.height != height) {
-    this.canvas_.width = width;
-    this.canvas_.height = height;
-  } else {
-    context.clearRect(0, 0, width, height);
-  }
-
-  var rotation = frameState.viewState.rotation;
-
-  this.calculateMatrices2D(frameState);
-
-  this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, frameState);
-
-  var layerStatesArray = frameState.layerStatesArray;
-  ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex);
-
-  if (rotation) {
-    context.save();
-    ol.render.canvas.rotateAtOffset(context, rotation, width / 2, height / 2);
-  }
-
-  var viewResolution = frameState.viewState.resolution;
-  var i, ii, layer, layerRenderer, layerState;
-  for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    layerState = layerStatesArray[i];
-    layer = layerState.layer;
-    layerRenderer = /** @type {ol.renderer.canvas.Layer} */ (this.getLayerRenderer(layer));
-    if (!ol.layer.Layer.visibleAtResolution(layerState, viewResolution) ||
-        layerState.sourceState != ol.source.State.READY) {
-      continue;
-    }
-    if (layerRenderer.prepareFrame(frameState, layerState)) {
-      layerRenderer.composeFrame(frameState, layerState, context);
-    }
-  }
-
-  if (rotation) {
-    context.restore();
-  }
-
-  this.dispatchComposeEvent_(
-      ol.render.EventType.POSTCOMPOSE, frameState);
-
-  if (!this.renderedVisible_) {
-    this.canvas_.style.display = '';
-    this.renderedVisible_ = true;
-  }
-
-  this.scheduleRemoveUnusedLayerRenderers(frameState);
-  this.scheduleExpireIconCache(frameState);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-    layerFilter, thisArg2) {
-  var result;
-  var viewState = frameState.viewState;
-  var viewResolution = viewState.resolution;
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-
-  var coordinate = ol.transform.apply(
-      frameState.pixelToCoordinateTransform, pixel.slice());
-
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-        layerFilter.call(thisArg2, layer)) {
-      var layerRenderer = /** @type {ol.renderer.canvas.Layer} */ (this.getLayerRenderer(layer));
-      result = layerRenderer.forEachLayerAtCoordinate(
-          coordinate, frameState, callback, thisArg);
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-goog.provide('ol.renderer.canvas.TileLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.TileRange');
-goog.require('ol.TileState');
-goog.require('ol.ViewHint');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.IntermediateCanvas');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.IntermediateCanvas}
- * @param {ol.layer.Tile|ol.layer.VectorTile} tileLayer Tile layer.
- * @api
- */
-ol.renderer.canvas.TileLayer = function(tileLayer) {
-
-  ol.renderer.canvas.IntermediateCanvas.call(this, tileLayer);
-
-  /**
-   * @protected
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context = this.context === null ? null :  ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.oversampling_;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedExtent_ = null;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.renderedRevision;
-
-  /**
-   * @protected
-   * @type {!Array.<ol.Tile>}
-   */
-  this.renderedTiles = [];
-
-  /**
-   * @protected
-   * @type {ol.Extent}
-   */
-  this.tmpExtent = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {ol.TileRange}
-   */
-  this.tmpTileRange_ = new ol.TileRange(0, 0, 0, 0);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.imageTransform_ = ol.transform.create();
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.zDirection = 0;
-
-};
-ol.inherits(ol.renderer.canvas.TileLayer, ol.renderer.canvas.IntermediateCanvas);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.canvas.TileLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.CANVAS && layer.getType() === ol.LayerType.TILE;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.canvas.TileLayer} The layer renderer.
- */
-ol.renderer.canvas.TileLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.canvas.TileLayer(/** @type {ol.layer.Tile} */ (layer));
-};
-
-
-/**
- * @private
- * @param {ol.Tile} tile Tile.
- * @return {boolean} Tile is drawable.
- */
-ol.renderer.canvas.TileLayer.prototype.isDrawableTile_ = function(tile) {
-  var tileState = tile.getState();
-  var useInterimTilesOnError = this.getLayer().getUseInterimTilesOnError();
-  return tileState == ol.TileState.LOADED ||
-      tileState == ol.TileState.EMPTY ||
-      tileState == ol.TileState.ERROR && !useInterimTilesOnError;
-};
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var pixelRatio = frameState.pixelRatio;
-  var size = frameState.size;
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var viewResolution = viewState.resolution;
-  var viewCenter = viewState.center;
-
-  var tileLayer = this.getLayer();
-  var tileSource = /** @type {ol.source.Tile} */ (tileLayer.getSource());
-  var sourceRevision = tileSource.getRevision();
-  var tileGrid = tileSource.getTileGridForProjection(projection);
-  var z = tileGrid.getZForResolution(viewResolution, this.zDirection);
-  var tileResolution = tileGrid.getResolution(z);
-  var oversampling = Math.round(viewResolution / tileResolution) || 1;
-  var extent = frameState.extent;
-
-  if (layerState.extent !== undefined) {
-    extent = ol.extent.getIntersection(extent, layerState.extent);
-  }
-  if (ol.extent.isEmpty(extent)) {
-    // Return false to prevent the rendering of the layer.
-    return false;
-  }
-
-  var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-  var imageExtent = tileGrid.getTileRangeExtent(z, tileRange);
-
-  var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);
-
-  /**
-   * @type {Object.<number, Object.<string, ol.Tile>>}
-   */
-  var tilesToDrawByZ = {};
-  tilesToDrawByZ[z] = {};
-
-  var findLoadedTiles = this.createLoadedTileFinder(
-      tileSource, projection, tilesToDrawByZ);
-
-  var tmpExtent = this.tmpExtent;
-  var tmpTileRange = this.tmpTileRange_;
-  var newTiles = false;
-  var tile, x, y;
-  for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-    for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-      tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-      if (tile.getState() == ol.TileState.ERROR) {
-        if (!tileLayer.getUseInterimTilesOnError()) {
-          // When useInterimTilesOnError is false, we consider the error tile as loaded.
-          tile.setState(ol.TileState.LOADED);
-        } else if (tileLayer.getPreload() > 0) {
-          // Preloaded tiles for lower resolutions might have finished loading.
-          newTiles = true;
-        }
-      }
-      if (!this.isDrawableTile_(tile)) {
-        tile = tile.getInterimTile();
-      }
-      if (this.isDrawableTile_(tile)) {
-        var uid = ol.getUid(this);
-        if (tile.getState() == ol.TileState.LOADED) {
-          tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
-          var inTransition = tile.inTransition(uid);
-          if (!newTiles && (inTransition || this.renderedTiles.indexOf(tile) === -1)) {
-            newTiles = true;
-          }
-        }
-        if (tile.getAlpha(uid, frameState.time) === 1) {
-          // don't look for alt tiles if alpha is 1
-          continue;
-        }
-      }
-
-      var childTileRange = tileGrid.getTileCoordChildTileRange(
-          tile.tileCoord, tmpTileRange, tmpExtent);
-      var covered = false;
-      if (childTileRange) {
-        covered = findLoadedTiles(z + 1, childTileRange);
-      }
-      if (!covered) {
-        tileGrid.forEachTileCoordParentTileRange(
-            tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);
-      }
-
-    }
-  }
-
-  var renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;
-  var hints = frameState.viewHints;
-  var animatingOrInteracting = hints[ol.ViewHint.ANIMATING] || hints[ol.ViewHint.INTERACTING];
-  if (!(this.renderedResolution && Date.now() - frameState.time > 16 && animatingOrInteracting) && (
-    newTiles ||
-        !(this.renderedExtent_ && ol.extent.containsExtent(this.renderedExtent_, extent)) ||
-        this.renderedRevision != sourceRevision ||
-        oversampling != this.oversampling_ ||
-        !animatingOrInteracting && renderedResolution != this.renderedResolution
-  )) {
-
-    var context = this.context;
-    if (context) {
-      var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);
-      var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);
-      var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);
-      var canvas = context.canvas;
-      if (canvas.width != width || canvas.height != height) {
-        this.oversampling_ = oversampling;
-        canvas.width = width;
-        canvas.height = height;
-      } else {
-        if (this.renderedExtent_ && !ol.extent.equals(imageExtent, this.renderedExtent_)) {
-          context.clearRect(0, 0, width, height);
-        }
-        oversampling = this.oversampling_;
-      }
-    }
-
-    this.renderedTiles.length = 0;
-    /** @type {Array.<number>} */
-    var zs = Object.keys(tilesToDrawByZ).map(Number);
-    zs.sort(function(a, b) {
-      if (a === z) {
-        return 1;
-      } else if (b === z) {
-        return -1;
-      } else {
-        return a > b ? 1 : a < b ? -1 : 0;
-      }
-    });
-    var currentResolution, currentScale, currentTilePixelSize, currentZ, i, ii;
-    var tileExtent, tileGutter, tilesToDraw, w, h;
-    for (i = 0, ii = zs.length; i < ii; ++i) {
-      currentZ = zs[i];
-      currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);
-      currentResolution = tileGrid.getResolution(currentZ);
-      currentScale = currentResolution / tileResolution;
-      tileGutter = tilePixelRatio * tileSource.getGutter(projection);
-      tilesToDraw = tilesToDrawByZ[currentZ];
-      for (var tileCoordKey in tilesToDraw) {
-        tile = tilesToDraw[tileCoordKey];
-        tileExtent = tileGrid.getTileCoordExtent(tile.getTileCoord(), tmpExtent);
-        x = (tileExtent[0] - imageExtent[0]) / tileResolution * tilePixelRatio / oversampling;
-        y = (imageExtent[3] - tileExtent[3]) / tileResolution * tilePixelRatio / oversampling;
-        w = currentTilePixelSize[0] * currentScale / oversampling;
-        h = currentTilePixelSize[1] * currentScale / oversampling;
-        this.drawTileImage(tile, frameState, layerState, x, y, w, h, tileGutter, z === currentZ);
-        this.renderedTiles.push(tile);
-      }
-    }
-
-    this.renderedRevision = sourceRevision;
-    this.renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;
-    this.renderedExtent_ = imageExtent;
-  }
-
-  var scale = this.renderedResolution / viewResolution;
-  var transform = ol.transform.compose(this.imageTransform_,
-      pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,
-      scale, scale,
-      0,
-      (this.renderedExtent_[0] - viewCenter[0]) / this.renderedResolution * pixelRatio,
-      (viewCenter[1] - this.renderedExtent_[3]) / this.renderedResolution * pixelRatio);
-  ol.transform.compose(this.coordinateToCanvasPixelTransform,
-      pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],
-      pixelRatio / viewResolution, -pixelRatio / viewResolution,
-      0,
-      -viewCenter[0], -viewCenter[1]);
-
-
-  this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);
-  this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,
-      projection, extent, z, tileLayer.getPreload());
-  this.scheduleExpireCache(frameState, tileSource);
-  this.updateLogos(frameState, tileSource);
-
-  return this.renderedTiles.length > 0;
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {number} x Left of the tile.
- * @param {number} y Top of the tile.
- * @param {number} w Width of the tile.
- * @param {number} h Height of the tile.
- * @param {number} gutter Tile gutter.
- * @param {boolean} transition Apply an alpha transition.
- */
-ol.renderer.canvas.TileLayer.prototype.drawTileImage = function(tile, frameState, layerState, x, y, w, h, gutter, transition) {
-  var image = tile.getImage(this.getLayer());
-  if (!image) {
-    return;
-  }
-  var uid = ol.getUid(this);
-  var alpha = transition ? tile.getAlpha(uid, frameState.time) : 1;
-  if (alpha === 1 && !this.getLayer().getSource().getOpaque(frameState.viewState.projection)) {
-    this.context.clearRect(x, y, w, h);
-  }
-  var alphaChanged = alpha !== this.context.globalAlpha;
-  if (alphaChanged) {
-    this.context.save();
-    this.context.globalAlpha = alpha;
-  }
-  this.context.drawImage(image, gutter, gutter,
-      image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);
-
-  if (alphaChanged) {
-    this.context.restore();
-  }
-  if (alpha !== 1) {
-    frameState.animate = true;
-  } else if (transition) {
-    tile.endTransition(uid);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.getImage = function() {
-  var context = this.context;
-  return context ? context.canvas : null;
-};
-
-
-/**
- * @function
- * @return {ol.layer.Tile|ol.layer.VectorTile}
- */
-ol.renderer.canvas.TileLayer.prototype.getLayer;
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.TileLayer.prototype.getImageTransform = function() {
-  return this.imageTransform_;
-};
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.rbush');
-
-/** @typedef {function(*)} */
-ol.ext.rbush = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var quickselect_1 = quickselect;
-var default_1 = quickselect;
-function quickselect(arr, k, left, right, compare) {
-    quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);
-}
-function quickselectStep(arr, k, left, right, compare) {
-    while (right > left) {
-        if (right - left > 600) {
-            var n = right - left + 1;
-            var m = k - left + 1;
-            var z = Math.log(n);
-            var s = 0.5 * Math.exp(2 * z / 3);
-            var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);
-            var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));
-            var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));
-            quickselectStep(arr, k, newLeft, newRight, compare);
-        }
-        var t = arr[k];
-        var i = left;
-        var j = right;
-        swap(arr, left, k);
-        if (compare(arr[right], t) > 0) swap(arr, left, right);
-        while (i < j) {
-            swap(arr, i, j);
-            i++;
-            j--;
-            while (compare(arr[i], t) < 0) i++;
-            while (compare(arr[j], t) > 0) j--;
-        }
-        if (compare(arr[left], t) === 0) swap(arr, left, j);
-        else {
-            j++;
-            swap(arr, j, right);
-        }
-        if (j <= k) left = j + 1;
-        if (k <= j) right = j - 1;
-    }
-}
-function swap(arr, i, j) {
-    var tmp = arr[i];
-    arr[i] = arr[j];
-    arr[j] = tmp;
-}
-function defaultCompare(a, b) {
-    return a < b ? -1 : a > b ? 1 : 0;
-}
-quickselect_1.default = default_1;
-
-var rbush_1 = rbush;
-function rbush(maxEntries, format) {
-    if (!(this instanceof rbush)) return new rbush(maxEntries, format);
-    this._maxEntries = Math.max(4, maxEntries || 9);
-    this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));
-    if (format) {
-        this._initFormat(format);
-    }
-    this.clear();
-}
-rbush.prototype = {
-    all: function () {
-        return this._all(this.data, []);
-    },
-    search: function (bbox) {
-        var node = this.data,
-            result = [],
-            toBBox = this.toBBox;
-        if (!intersects(bbox, node)) return result;
-        var nodesToSearch = [],
-            i, len, child, childBBox;
-        while (node) {
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                childBBox = node.leaf ? toBBox(child) : child;
-                if (intersects(bbox, childBBox)) {
-                    if (node.leaf) result.push(child);
-                    else if (contains(bbox, childBBox)) this._all(child, result);
-                    else nodesToSearch.push(child);
-                }
-            }
-            node = nodesToSearch.pop();
-        }
-        return result;
-    },
-    collides: function (bbox) {
-        var node = this.data,
-            toBBox = this.toBBox;
-        if (!intersects(bbox, node)) return false;
-        var nodesToSearch = [],
-            i, len, child, childBBox;
-        while (node) {
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                childBBox = node.leaf ? toBBox(child) : child;
-                if (intersects(bbox, childBBox)) {
-                    if (node.leaf || contains(bbox, childBBox)) return true;
-                    nodesToSearch.push(child);
-                }
-            }
-            node = nodesToSearch.pop();
-        }
-        return false;
-    },
-    load: function (data) {
-        if (!(data && data.length)) return this;
-        if (data.length < this._minEntries) {
-            for (var i = 0, len = data.length; i < len; i++) {
-                this.insert(data[i]);
-            }
-            return this;
-        }
-        var node = this._build(data.slice(), 0, data.length - 1, 0);
-        if (!this.data.children.length) {
-            this.data = node;
-        } else if (this.data.height === node.height) {
-            this._splitRoot(this.data, node);
-        } else {
-            if (this.data.height < node.height) {
-                var tmpNode = this.data;
-                this.data = node;
-                node = tmpNode;
-            }
-            this._insert(node, this.data.height - node.height - 1, true);
-        }
-        return this;
-    },
-    insert: function (item) {
-        if (item) this._insert(item, this.data.height - 1);
-        return this;
-    },
-    clear: function () {
-        this.data = createNode([]);
-        return this;
-    },
-    remove: function (item, equalsFn) {
-        if (!item) return this;
-        var node = this.data,
-            bbox = this.toBBox(item),
-            path = [],
-            indexes = [],
-            i, parent, index, goingUp;
-        while (node || path.length) {
-            if (!node) {
-                node = path.pop();
-                parent = path[path.length - 1];
-                i = indexes.pop();
-                goingUp = true;
-            }
-            if (node.leaf) {
-                index = findItem(item, node.children, equalsFn);
-                if (index !== -1) {
-                    node.children.splice(index, 1);
-                    path.push(node);
-                    this._condense(path);
-                    return this;
-                }
-            }
-            if (!goingUp && !node.leaf && contains(node, bbox)) {
-                path.push(node);
-                indexes.push(i);
-                i = 0;
-                parent = node;
-                node = node.children[0];
-            } else if (parent) {
-                i++;
-                node = parent.children[i];
-                goingUp = false;
-            } else node = null;
-        }
-        return this;
-    },
-    toBBox: function (item) { return item; },
-    compareMinX: compareNodeMinX,
-    compareMinY: compareNodeMinY,
-    toJSON: function () { return this.data; },
-    fromJSON: function (data) {
-        this.data = data;
-        return this;
-    },
-    _all: function (node, result) {
-        var nodesToSearch = [];
-        while (node) {
-            if (node.leaf) result.push.apply(result, node.children);
-            else nodesToSearch.push.apply(nodesToSearch, node.children);
-            node = nodesToSearch.pop();
-        }
-        return result;
-    },
-    _build: function (items, left, right, height) {
-        var N = right - left + 1,
-            M = this._maxEntries,
-            node;
-        if (N <= M) {
-            node = createNode(items.slice(left, right + 1));
-            calcBBox(node, this.toBBox);
-            return node;
-        }
-        if (!height) {
-            height = Math.ceil(Math.log(N) / Math.log(M));
-            M = Math.ceil(N / Math.pow(M, height - 1));
-        }
-        node = createNode([]);
-        node.leaf = false;
-        node.height = height;
-        var N2 = Math.ceil(N / M),
-            N1 = N2 * Math.ceil(Math.sqrt(M)),
-            i, j, right2, right3;
-        multiSelect(items, left, right, N1, this.compareMinX);
-        for (i = left; i <= right; i += N1) {
-            right2 = Math.min(i + N1 - 1, right);
-            multiSelect(items, i, right2, N2, this.compareMinY);
-            for (j = i; j <= right2; j += N2) {
-                right3 = Math.min(j + N2 - 1, right2);
-                node.children.push(this._build(items, j, right3, height - 1));
-            }
-        }
-        calcBBox(node, this.toBBox);
-        return node;
-    },
-    _chooseSubtree: function (bbox, node, level, path) {
-        var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;
-        while (true) {
-            path.push(node);
-            if (node.leaf || path.length - 1 === level) break;
-            minArea = minEnlargement = Infinity;
-            for (i = 0, len = node.children.length; i < len; i++) {
-                child = node.children[i];
-                area = bboxArea(child);
-                enlargement = enlargedArea(bbox, child) - area;
-                if (enlargement < minEnlargement) {
-                    minEnlargement = enlargement;
-                    minArea = area < minArea ? area : minArea;
-                    targetNode = child;
-                } else if (enlargement === minEnlargement) {
-                    if (area < minArea) {
-                        minArea = area;
-                        targetNode = child;
-                    }
-                }
-            }
-            node = targetNode || node.children[0];
-        }
-        return node;
-    },
-    _insert: function (item, level, isNode) {
-        var toBBox = this.toBBox,
-            bbox = isNode ? item : toBBox(item),
-            insertPath = [];
-        var node = this._chooseSubtree(bbox, this.data, level, insertPath);
-        node.children.push(item);
-        extend(node, bbox);
-        while (level >= 0) {
-            if (insertPath[level].children.length > this._maxEntries) {
-                this._split(insertPath, level);
-                level--;
-            } else break;
-        }
-        this._adjustParentBBoxes(bbox, insertPath, level);
-    },
-    _split: function (insertPath, level) {
-        var node = insertPath[level],
-            M = node.children.length,
-            m = this._minEntries;
-        this._chooseSplitAxis(node, m, M);
-        var splitIndex = this._chooseSplitIndex(node, m, M);
-        var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));
-        newNode.height = node.height;
-        newNode.leaf = node.leaf;
-        calcBBox(node, this.toBBox);
-        calcBBox(newNode, this.toBBox);
-        if (level) insertPath[level - 1].children.push(newNode);
-        else this._splitRoot(node, newNode);
-    },
-    _splitRoot: function (node, newNode) {
-        this.data = createNode([node, newNode]);
-        this.data.height = node.height + 1;
-        this.data.leaf = false;
-        calcBBox(this.data, this.toBBox);
-    },
-    _chooseSplitIndex: function (node, m, M) {
-        var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;
-        minOverlap = minArea = Infinity;
-        for (i = m; i <= M - m; i++) {
-            bbox1 = distBBox(node, 0, i, this.toBBox);
-            bbox2 = distBBox(node, i, M, this.toBBox);
-            overlap = intersectionArea(bbox1, bbox2);
-            area = bboxArea(bbox1) + bboxArea(bbox2);
-            if (overlap < minOverlap) {
-                minOverlap = overlap;
-                index = i;
-                minArea = area < minArea ? area : minArea;
-            } else if (overlap === minOverlap) {
-                if (area < minArea) {
-                    minArea = area;
-                    index = i;
-                }
-            }
-        }
-        return index;
-    },
-    _chooseSplitAxis: function (node, m, M) {
-        var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,
-            compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,
-            xMargin = this._allDistMargin(node, m, M, compareMinX),
-            yMargin = this._allDistMargin(node, m, M, compareMinY);
-        if (xMargin < yMargin) node.children.sort(compareMinX);
-    },
-    _allDistMargin: function (node, m, M, compare) {
-        node.children.sort(compare);
-        var toBBox = this.toBBox,
-            leftBBox = distBBox(node, 0, m, toBBox),
-            rightBBox = distBBox(node, M - m, M, toBBox),
-            margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),
-            i, child;
-        for (i = m; i < M - m; i++) {
-            child = node.children[i];
-            extend(leftBBox, node.leaf ? toBBox(child) : child);
-            margin += bboxMargin(leftBBox);
-        }
-        for (i = M - m - 1; i >= m; i--) {
-            child = node.children[i];
-            extend(rightBBox, node.leaf ? toBBox(child) : child);
-            margin += bboxMargin(rightBBox);
-        }
-        return margin;
-    },
-    _adjustParentBBoxes: function (bbox, path, level) {
-        for (var i = level; i >= 0; i--) {
-            extend(path[i], bbox);
-        }
-    },
-    _condense: function (path) {
-        for (var i = path.length - 1, siblings; i >= 0; i--) {
-            if (path[i].children.length === 0) {
-                if (i > 0) {
-                    siblings = path[i - 1].children;
-                    siblings.splice(siblings.indexOf(path[i]), 1);
-                } else this.clear();
-            } else calcBBox(path[i], this.toBBox);
-        }
-    },
-    _initFormat: function (format) {
-        var compareArr = ['return a', ' - b', ';'];
-        this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));
-        this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));
-        this.toBBox = new Function('a',
-            'return {minX: a' + format[0] +
-            ', minY: a' + format[1] +
-            ', maxX: a' + format[2] +
-            ', maxY: a' + format[3] + '};');
-    }
-};
-function findItem(item, items, equalsFn) {
-    if (!equalsFn) return items.indexOf(item);
-    for (var i = 0; i < items.length; i++) {
-        if (equalsFn(item, items[i])) return i;
-    }
-    return -1;
-}
-function calcBBox(node, toBBox) {
-    distBBox(node, 0, node.children.length, toBBox, node);
-}
-function distBBox(node, k, p, toBBox, destNode) {
-    if (!destNode) destNode = createNode(null);
-    destNode.minX = Infinity;
-    destNode.minY = Infinity;
-    destNode.maxX = -Infinity;
-    destNode.maxY = -Infinity;
-    for (var i = k, child; i < p; i++) {
-        child = node.children[i];
-        extend(destNode, node.leaf ? toBBox(child) : child);
-    }
-    return destNode;
-}
-function extend(a, b) {
-    a.minX = Math.min(a.minX, b.minX);
-    a.minY = Math.min(a.minY, b.minY);
-    a.maxX = Math.max(a.maxX, b.maxX);
-    a.maxY = Math.max(a.maxY, b.maxY);
-    return a;
-}
-function compareNodeMinX(a, b) { return a.minX - b.minX; }
-function compareNodeMinY(a, b) { return a.minY - b.minY; }
-function bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }
-function bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }
-function enlargedArea(a, b) {
-    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *
-           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));
-}
-function intersectionArea(a, b) {
-    var minX = Math.max(a.minX, b.minX),
-        minY = Math.max(a.minY, b.minY),
-        maxX = Math.min(a.maxX, b.maxX),
-        maxY = Math.min(a.maxY, b.maxY);
-    return Math.max(0, maxX - minX) *
-           Math.max(0, maxY - minY);
-}
-function contains(a, b) {
-    return a.minX <= b.minX &&
-           a.minY <= b.minY &&
-           b.maxX <= a.maxX &&
-           b.maxY <= a.maxY;
-}
-function intersects(a, b) {
-    return b.minX <= a.maxX &&
-           b.minY <= a.maxY &&
-           b.maxX >= a.minX &&
-           b.maxY >= a.minY;
-}
-function createNode(children) {
-    return {
-        children: children,
-        height: 1,
-        leaf: true,
-        minX: Infinity,
-        minY: Infinity,
-        maxX: -Infinity,
-        maxY: -Infinity
-    };
-}
-function multiSelect(arr, left, right, n, compare) {
-    var stack = [left, right],
-        mid;
-    while (stack.length) {
-        right = stack.pop();
-        left = stack.pop();
-        if (right - left <= n) continue;
-        mid = left + Math.ceil((right - left) / n / 2) * n;
-        quickselect_1(arr, mid, left, right, compare);
-        stack.push(left, mid, mid, right);
-    }
-}
-
-exports['default'] = rbush_1;
-
-}((this.rbush = this.rbush || {})));}).call(ol.ext);
-ol.ext.rbush = ol.ext.rbush.default;
-
-goog.provide('ol.render.ReplayGroup');
-
-
-/**
- * Base class for replay groups.
- * @constructor
- * @abstract
- */
-ol.render.ReplayGroup = function() {};
-
-
-/**
- * @abstract
- * @param {number|undefined} zIndex Z index.
- * @param {ol.render.ReplayType} replayType Replay type.
- * @return {ol.render.VectorContext} Replay.
- */
-ol.render.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {};
-
-
-/**
- * @abstract
- * @return {boolean} Is empty.
- */
-ol.render.ReplayGroup.prototype.isEmpty = function() {};
-
-goog.provide('ol.render.ReplayType');
-
-
-/**
- * @enum {string}
- */
-ol.render.ReplayType = {
-  CIRCLE: 'Circle',
-  DEFAULT: 'Default',
-  IMAGE: 'Image',
-  LINE_STRING: 'LineString',
-  POLYGON: 'Polygon',
-  TEXT: 'Text'
-};
-
-goog.provide('ol.geom.flat.length');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Length.
- */
-ol.geom.flat.length.lineString = function(flatCoordinates, offset, end, stride) {
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  var length = 0;
-  var i;
-  for (i = offset + stride; i < end; i += stride) {
-    var x2 = flatCoordinates[i];
-    var y2 = flatCoordinates[i + 1];
-    length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
-    x1 = x2;
-    y1 = y2;
-  }
-  return length;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} Perimeter.
- */
-ol.geom.flat.length.linearRing = function(flatCoordinates, offset, end, stride) {
-  var perimeter =
-      ol.geom.flat.length.lineString(flatCoordinates, offset, end, stride);
-  var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
-  var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
-  perimeter += Math.sqrt(dx * dx + dy * dy);
-  return perimeter;
-};
-
-goog.provide('ol.geom.flat.textpath');
-
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Path to put text on.
- * @param {number} offset Start offset of the `flatCoordinates`.
- * @param {number} end End offset of the `flatCoordinates`.
- * @param {number} stride Stride.
- * @param {string} text Text to place on the path.
- * @param {function(string):number} measure Measure function returning the
- * width of the character passed as 1st argument.
- * @param {number} startM m along the path where the text starts.
- * @param {number} maxAngle Max angle between adjacent chars in radians.
- * @return {Array.<Array.<*>>} The result array of null if `maxAngle` was
- * exceeded. Entries of the array are x, y, anchorX, angle, chunk.
- */
-ol.geom.flat.textpath.lineString = function(
-    flatCoordinates, offset, end, stride, text, measure, startM, maxAngle) {
-  var result = [];
-
-  // Keep text upright
-  var reverse = flatCoordinates[offset] > flatCoordinates[end - stride];
-
-  var numChars = text.length;
-
-  var x1 = flatCoordinates[offset];
-  var y1 = flatCoordinates[offset + 1];
-  offset += stride;
-  var x2 = flatCoordinates[offset];
-  var y2 = flatCoordinates[offset + 1];
-  var segmentM = 0;
-  var segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
-
-  var chunk = '';
-  var chunkLength = 0;
-  var data, index, previousAngle;
-  for (var i = 0; i < numChars; ++i) {
-    index = reverse ? numChars - i - 1 : i;
-    var char = text.charAt(index);
-    chunk = reverse ? char + chunk : chunk + char;
-    var charLength = measure(chunk) - chunkLength;
-    chunkLength += charLength;
-    var charM = startM + charLength / 2;
-    while (offset < end - stride && segmentM + segmentLength < charM) {
-      x1 = x2;
-      y1 = y2;
-      offset += stride;
-      x2 = flatCoordinates[offset];
-      y2 = flatCoordinates[offset + 1];
-      segmentM += segmentLength;
-      segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
-    }
-    var segmentPos = charM - segmentM;
-    var angle = Math.atan2(y2 - y1, x2 - x1);
-    if (reverse) {
-      angle += angle > 0 ? -Math.PI : Math.PI;
-    }
-    if (previousAngle !== undefined) {
-      var delta = angle - previousAngle;
-      delta += (delta > Math.PI) ? -2 * Math.PI : (delta < -Math.PI) ? 2 * Math.PI : 0;
-      if (Math.abs(delta) > maxAngle) {
-        return null;
-      }
-    }
-    var interpolate = segmentPos / segmentLength;
-    var x = ol.math.lerp(x1, x2, interpolate);
-    var y = ol.math.lerp(y1, y2, interpolate);
-    if (previousAngle == angle) {
-      if (reverse) {
-        data[0] = x;
-        data[1] = y;
-        data[2] = charLength / 2;
-      }
-      data[4] = chunk;
-    } else {
-      chunk = char;
-      chunkLength = charLength;
-      data = [x, y, charLength / 2, angle, chunk];
-      if (reverse) {
-        result.unshift(data);
-      } else {
-        result.push(data);
-      }
-      previousAngle = angle;
-    }
-    startM += charLength;
-  }
-  return result;
-};
-
-goog.provide('ol.render.canvas.Instruction');
-
-/**
- * @enum {number}
- */
-ol.render.canvas.Instruction = {
-  BEGIN_GEOMETRY: 0,
-  BEGIN_PATH: 1,
-  CIRCLE: 2,
-  CLOSE_PATH: 3,
-  CUSTOM: 4,
-  DRAW_CHARS: 5,
-  DRAW_IMAGE: 6,
-  END_GEOMETRY: 7,
-  FILL: 8,
-  MOVE_TO_LINE_TO: 9,
-  SET_FILL_STYLE: 10,
-  SET_STROKE_STYLE: 11,
-  STROKE: 12
-};
-
-goog.provide('ol.render.replay');
-
-goog.require('ol.render.ReplayType');
-
-
-/**
- * @const
- * @type {Array.<ol.render.ReplayType>}
- */
-ol.render.replay.ORDER = [
-  ol.render.ReplayType.POLYGON,
-  ol.render.ReplayType.CIRCLE,
-  ol.render.ReplayType.LINE_STRING,
-  ol.render.ReplayType.IMAGE,
-  ol.render.ReplayType.TEXT,
-  ol.render.ReplayType.DEFAULT
-];
-
-/**
- * @const
- * @enum {number}
- */
-ol.render.replay.TEXT_ALIGN = {};
-ol.render.replay.TEXT_ALIGN['left'] = 0;
-ol.render.replay.TEXT_ALIGN['end'] = 0;
-ol.render.replay.TEXT_ALIGN['center'] = 0.5;
-ol.render.replay.TEXT_ALIGN['right'] = 1;
-ol.render.replay.TEXT_ALIGN['start'] = 1;
-ol.render.replay.TEXT_ALIGN['top'] = 0;
-ol.render.replay.TEXT_ALIGN['middle'] = 0.5;
-ol.render.replay.TEXT_ALIGN['hanging'] = 0.2;
-ol.render.replay.TEXT_ALIGN['alphabetic'] = 0.8;
-ol.render.replay.TEXT_ALIGN['ideographic'] = 0.8;
-ol.render.replay.TEXT_ALIGN['bottom'] = 1;
-
-goog.provide('ol.render.canvas.Replay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.colorlike');
-goog.require('ol.extent');
-goog.require('ol.extent.Relationship');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.length');
-goog.require('ol.geom.flat.textpath');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.has');
-goog.require('ol.obj');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.replay');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.render.VectorContext}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @param {?} declutterTree Declutter tree.
- * @struct
- */
-ol.render.canvas.Replay = function(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @type {?}
-   */
-  this.declutterTree = declutterTree;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.tmpExtent_ = ol.extent.createEmpty();
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.tolerance = tolerance;
-
-  /**
-   * @protected
-   * @const
-   * @type {ol.Extent}
-   */
-  this.maxExtent = maxExtent;
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.overlaps = overlaps;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.pixelRatio = pixelRatio;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.maxLineWidth = 0;
-
-  /**
-   * @protected
-   * @const
-   * @type {number}
-   */
-  this.resolution = resolution;
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.fillOrigin_;
-
-  /**
-   * @private
-   * @type {Array.<*>}
-   */
-  this.beginGeometryInstruction1_ = null;
-
-  /**
-   * @private
-   * @type {Array.<*>}
-   */
-  this.beginGeometryInstruction2_ = null;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.bufferedMaxExtent_ = null;
-
-  /**
-   * @protected
-   * @type {Array.<*>}
-   */
-  this.instructions = [];
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.coordinates = [];
-
-  /**
-   * @private
-   * @type {Object.<number,ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>>}
-   */
-  this.coordinateCache_ = {};
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.renderedTransform_ = ol.transform.create();
-
-  /**
-   * @protected
-   * @type {Array.<*>}
-   */
-  this.hitDetectionInstructions = [];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.pixelCoordinates_ = null;
-
-  /**
-   * @protected
-   * @type {ol.CanvasFillStrokeState}
-   */
-  this.state = /** @type {ol.CanvasFillStrokeState} */ ({});
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.viewRotation_ = 0;
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.tmpLocalTransform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {!ol.Transform}
-   */
-  this.resetTransform_ = ol.transform.create();
-};
-ol.inherits(ol.render.canvas.Replay, ol.render.VectorContext);
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Coordinate} p1 1st point of the background box.
- * @param {ol.Coordinate} p2 2nd point of the background box.
- * @param {ol.Coordinate} p3 3rd point of the background box.
- * @param {ol.Coordinate} p4 4th point of the background box.
- * @param {Array.<*>} fillInstruction Fill instruction.
- * @param {Array.<*>} strokeInstruction Stroke instruction.
- */
-ol.render.canvas.Replay.prototype.replayTextBackground_ = function(context, p1, p2, p3, p4,
-    fillInstruction, strokeInstruction) {
-  context.beginPath();
-  context.moveTo.apply(context, p1);
-  context.lineTo.apply(context, p2);
-  context.lineTo.apply(context, p3);
-  context.lineTo.apply(context, p4);
-  context.lineTo.apply(context, p1);
-  if (fillInstruction) {
-    this.fillOrigin_ = /** @type {Array.<number>} */ (fillInstruction[2]);
-    this.fill_(context);
-  }
-  if (strokeInstruction) {
-    this.setStrokeStyle_(context, /** @type {Array.<*>} */ (strokeInstruction));
-    context.stroke();
-  }
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} x X.
- * @param {number} y Y.
- * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.
- * @param {number} anchorX Anchor X.
- * @param {number} anchorY Anchor Y.
- * @param {ol.DeclutterGroup} declutterGroup Declutter group.
- * @param {number} height Height.
- * @param {number} opacity Opacity.
- * @param {number} originX Origin X.
- * @param {number} originY Origin Y.
- * @param {number} rotation Rotation.
- * @param {number} scale Scale.
- * @param {boolean} snapToPixel Snap to pixel.
- * @param {number} width Width.
- * @param {Array.<number>} padding Padding.
- * @param {Array.<*>} fillInstruction Fill instruction.
- * @param {Array.<*>} strokeInstruction Stroke instruction.
- */
-ol.render.canvas.Replay.prototype.replayImage_ = function(context, x, y, image,
-    anchorX, anchorY, declutterGroup, height, opacity, originX, originY,
-    rotation, scale, snapToPixel, width, padding, fillInstruction, strokeInstruction) {
-  var fillStroke = fillInstruction || strokeInstruction;
-  var localTransform = this.tmpLocalTransform_;
-  anchorX *= scale;
-  anchorY *= scale;
-  x -= anchorX;
-  y -= anchorY;
-  if (snapToPixel) {
-    x = Math.round(x);
-    y = Math.round(y);
-  }
-
-  var w = (width + originX > image.width) ? image.width - originX : width;
-  var h = (height + originY > image.height) ? image.height - originY : height;
-  var box = this.tmpExtent_;
-  var boxW = padding[3] + w * scale + padding[1];
-  var boxH = padding[0] + h * scale + padding[2];
-  var boxX = x - padding[3];
-  var boxY = y - padding[0];
-
-  /** @type {ol.Coordinate} */
-  var p1;
-  /** @type {ol.Coordinate} */
-  var p2;
-  /** @type {ol.Coordinate} */
-  var p3;
-  /** @type {ol.Coordinate} */
-  var p4;
-  if (fillStroke || rotation !== 0) {
-    p1 = [boxX, boxY];
-    p2 = [boxX + boxW, boxY];
-    p3 = [boxX + boxW, boxY + boxH];
-    p4 = [boxX, boxY + boxH];
-  }
-
-  var transform = null;
-  if (rotation !== 0) {
-    var centerX = x + anchorX;
-    var centerY = y + anchorY;
-    transform = ol.transform.compose(localTransform,
-        centerX, centerY, 1, 1, rotation, -centerX, -centerY);
-
-    ol.extent.createOrUpdateEmpty(box);
-    ol.extent.extendCoordinate(box, ol.transform.apply(localTransform, p1));
-    ol.extent.extendCoordinate(box, ol.transform.apply(localTransform, p2));
-    ol.extent.extendCoordinate(box, ol.transform.apply(localTransform, p3));
-    ol.extent.extendCoordinate(box, ol.transform.apply(localTransform, p4));
-  } else {
-    ol.extent.createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, box);
-  }
-  var canvas = context.canvas;
-  var intersects = box[0] <= canvas.width && box[2] >= 0 && box[1] <= canvas.height && box[3] >= 0;
-  if (declutterGroup) {
-    if (!intersects && declutterGroup[4] == 1) {
-      return;
-    }
-    ol.extent.extend(declutterGroup, box);
-    var declutterArgs = intersects ?
-      [context, transform ? transform.slice(0) : null, opacity, image, originX, originY, w, h, x, y, scale] :
-      null;
-    if (declutterArgs && fillStroke) {
-      declutterArgs.push(fillInstruction, strokeInstruction, p1, p2, p3, p4);
-    }
-    declutterGroup.push(declutterArgs);
-  } else if (intersects) {
-    if (fillStroke) {
-      this.replayTextBackground_(context, p1, p2, p3, p4,
-          /** @type {Array.<*>} */ (fillInstruction),
-          /** @type {Array.<*>} */ (strokeInstruction));
-    }
-    ol.render.canvas.drawImage(context, transform, opacity, image, originX, originY, w, h, x, y, scale);
-  }
-};
-
-
-/**
- * @protected
- * @param {Array.<number>} dashArray Dash array.
- * @return {Array.<number>} Dash array with pixel ratio applied
- */
-ol.render.canvas.Replay.prototype.applyPixelRatio = function(dashArray) {
-  var pixelRatio = this.pixelRatio;
-  return pixelRatio == 1 ? dashArray : dashArray.map(function(dash) {
-    return dash * pixelRatio;
-  });
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {boolean} closed Last input coordinate equals first.
- * @param {boolean} skipFirst Skip first coordinate.
- * @protected
- * @return {number} My end.
- */
-ol.render.canvas.Replay.prototype.appendFlatCoordinates = function(flatCoordinates, offset, end, stride, closed, skipFirst) {
-
-  var myEnd = this.coordinates.length;
-  var extent = this.getBufferedMaxExtent();
-  if (skipFirst) {
-    offset += stride;
-  }
-  var lastCoord = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-  var nextCoord = [NaN, NaN];
-  var skipped = true;
-
-  var i, lastRel, nextRel;
-  for (i = offset + stride; i < end; i += stride) {
-    nextCoord[0] = flatCoordinates[i];
-    nextCoord[1] = flatCoordinates[i + 1];
-    nextRel = ol.extent.coordinateRelationship(extent, nextCoord);
-    if (nextRel !== lastRel) {
-      if (skipped) {
-        this.coordinates[myEnd++] = lastCoord[0];
-        this.coordinates[myEnd++] = lastCoord[1];
-      }
-      this.coordinates[myEnd++] = nextCoord[0];
-      this.coordinates[myEnd++] = nextCoord[1];
-      skipped = false;
-    } else if (nextRel === ol.extent.Relationship.INTERSECTING) {
-      this.coordinates[myEnd++] = nextCoord[0];
-      this.coordinates[myEnd++] = nextCoord[1];
-      skipped = false;
-    } else {
-      skipped = true;
-    }
-    lastCoord[0] = nextCoord[0];
-    lastCoord[1] = nextCoord[1];
-    lastRel = nextRel;
-  }
-
-  // Last coordinate equals first or only one point to append:
-  if ((closed && skipped) || i === offset + stride) {
-    this.coordinates[myEnd++] = lastCoord[0];
-    this.coordinates[myEnd++] = lastCoord[1];
-  }
-  return myEnd;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {Array.<number>} replayEnds Replay ends.
- * @return {number} Offset.
- */
-ol.render.canvas.Replay.prototype.drawCustomCoordinates_ = function(flatCoordinates, offset, ends, stride, replayEnds) {
-  for (var i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var replayEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);
-    replayEnds.push(replayEnd);
-    offset = end;
-  }
-  return offset;
-};
-
-
-/**
- * @inheritDoc.
- */
-ol.render.canvas.Replay.prototype.drawCustom = function(geometry, feature, renderer) {
-  this.beginGeometry(geometry, feature);
-  var type = geometry.getType();
-  var stride = geometry.getStride();
-  var replayBegin = this.coordinates.length;
-  var flatCoordinates, replayEnd, replayEnds, replayEndss;
-  var offset;
-  if (type == ol.geom.GeometryType.MULTI_POLYGON) {
-    geometry = /** @type {ol.geom.MultiPolygon} */ (geometry);
-    flatCoordinates = geometry.getOrientedFlatCoordinates();
-    replayEndss = [];
-    var endss = geometry.getEndss();
-    offset = 0;
-    for (var i = 0, ii = endss.length; i < ii; ++i) {
-      var myEnds = [];
-      offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);
-      replayEndss.push(myEnds);
-    }
-    this.instructions.push([ol.render.canvas.Instruction.CUSTOM,
-      replayBegin, replayEndss, geometry, renderer, ol.geom.flat.inflate.coordinatesss]);
-  } else if (type == ol.geom.GeometryType.POLYGON || type == ol.geom.GeometryType.MULTI_LINE_STRING) {
-    replayEnds = [];
-    flatCoordinates = (type == ol.geom.GeometryType.POLYGON) ?
-      /** @type {ol.geom.Polygon} */ (geometry).getOrientedFlatCoordinates() :
-      geometry.getFlatCoordinates();
-    offset = this.drawCustomCoordinates_(flatCoordinates, 0,
-        /** @type {ol.geom.Polygon|ol.geom.MultiLineString} */ (geometry).getEnds(),
-        stride, replayEnds);
-    this.instructions.push([ol.render.canvas.Instruction.CUSTOM,
-      replayBegin, replayEnds, geometry, renderer, ol.geom.flat.inflate.coordinatess]);
-  } else if (type == ol.geom.GeometryType.LINE_STRING || type == ol.geom.GeometryType.MULTI_POINT) {
-    flatCoordinates = geometry.getFlatCoordinates();
-    replayEnd = this.appendFlatCoordinates(
-        flatCoordinates, 0, flatCoordinates.length, stride, false, false);
-    this.instructions.push([ol.render.canvas.Instruction.CUSTOM,
-      replayBegin, replayEnd, geometry, renderer, ol.geom.flat.inflate.coordinates]);
-  } else if (type == ol.geom.GeometryType.POINT) {
-    flatCoordinates = geometry.getFlatCoordinates();
-    this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);
-    replayEnd = this.coordinates.length;
-    this.instructions.push([ol.render.canvas.Instruction.CUSTOM,
-      replayBegin, replayEnd, geometry, renderer]);
-  }
-  this.endGeometry(geometry, feature);
-};
-
-
-/**
- * @protected
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.canvas.Replay.prototype.beginGeometry = function(geometry, feature) {
-  this.beginGeometryInstruction1_ =
-      [ol.render.canvas.Instruction.BEGIN_GEOMETRY, feature, 0];
-  this.instructions.push(this.beginGeometryInstruction1_);
-  this.beginGeometryInstruction2_ =
-      [ol.render.canvas.Instruction.BEGIN_GEOMETRY, feature, 0];
-  this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- */
-ol.render.canvas.Replay.prototype.fill_ = function(context) {
-  if (this.fillOrigin_) {
-    var origin = ol.transform.apply(this.renderedTransform_, this.fillOrigin_.slice());
-    context.translate(origin[0], origin[1]);
-    context.rotate(this.viewRotation_);
-  }
-  context.fill();
-  if (this.fillOrigin_) {
-    context.setTransform.apply(context, ol.render.canvas.resetTransform_);
-  }
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- * @param {Array.<*>} instruction Instruction.
- */
-ol.render.canvas.Replay.prototype.setStrokeStyle_ = function(context, instruction) {
-  context.strokeStyle = /** @type {ol.ColorLike} */ (instruction[1]);
-  context.lineWidth = /** @type {number} */ (instruction[2]);
-  context.lineCap = /** @type {string} */ (instruction[3]);
-  context.lineJoin = /** @type {string} */ (instruction[4]);
-  context.miterLimit = /** @type {number} */ (instruction[5]);
-  if (ol.has.CANVAS_LINE_DASH) {
-    context.lineDashOffset = /** @type {number} */ (instruction[7]);
-    context.setLineDash(/** @type {Array.<number>} */ (instruction[6]));
-  }
-};
-
-
-/**
- * @param {ol.DeclutterGroup} declutterGroup Declutter group.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.canvas.Replay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
-  if (declutterGroup && declutterGroup.length > 5) {
-    var groupCount = declutterGroup[4];
-    if (groupCount == 1 || groupCount == declutterGroup.length - 5) {
-      /** @type {ol.RBushEntry} */
-      var box = {
-        minX: /** @type {number} */ (declutterGroup[0]),
-        minY: /** @type {number} */ (declutterGroup[1]),
-        maxX: /** @type {number} */ (declutterGroup[2]),
-        maxY: /** @type {number} */ (declutterGroup[3]),
-        value: feature
-      };
-      if (!this.declutterTree.collides(box)) {
-        this.declutterTree.insert(box);
-        var drawImage = ol.render.canvas.drawImage;
-        for (var j = 5, jj = declutterGroup.length; j < jj; ++j) {
-          var declutterData = /** @type {Array} */ (declutterGroup[j]);
-          if (declutterData) {
-            if (declutterData.length > 11) {
-              this.replayTextBackground_(declutterData[0],
-                  declutterData[13], declutterData[14], declutterData[15], declutterData[16],
-                  declutterData[11], declutterData[12]);
-            }
-            drawImage.apply(undefined, declutterData);
-          }
-        }
-      }
-      declutterGroup.length = 5;
-      ol.extent.createOrUpdateEmpty(declutterGroup);
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {Array.<*>} instructions Instructions array.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined}
- *     featureCallback Feature callback.
- * @param {ol.Extent=} opt_hitExtent Only check features that intersect this
- *     extent.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.Replay.prototype.replay_ = function(
-    context, transform, skippedFeaturesHash,
-    instructions, featureCallback, opt_hitExtent) {
-  /** @type {Array.<number>} */
-  var pixelCoordinates;
-  if (this.pixelCoordinates_ && ol.array.equals(transform, this.renderedTransform_)) {
-    pixelCoordinates = this.pixelCoordinates_;
-  } else {
-    if (!this.pixelCoordinates_) {
-      this.pixelCoordinates_ = [];
-    }
-    pixelCoordinates = ol.geom.flat.transform.transform2D(
-        this.coordinates, 0, this.coordinates.length, 2,
-        transform, this.pixelCoordinates_);
-    ol.transform.setFromArray(this.renderedTransform_, transform);
-  }
-  var skipFeatures = !ol.obj.isEmpty(skippedFeaturesHash);
-  var i = 0; // instruction index
-  var ii = instructions.length; // end of instructions
-  var d = 0; // data index
-  var dd; // end of per-instruction data
-  var anchorX, anchorY, prevX, prevY, roundX, roundY, declutterGroup, image;
-  var pendingFill = 0;
-  var pendingStroke = 0;
-  var lastFillInstruction = null;
-  var lastStrokeInstruction = null;
-  var coordinateCache = this.coordinateCache_;
-  var viewRotation = this.viewRotation_;
-
-  var state = /** @type {olx.render.State} */ ({
-    context: context,
-    pixelRatio: this.pixelRatio,
-    resolution: this.resolution,
-    rotation: viewRotation
-  });
-
-  // When the batch size gets too big, performance decreases. 200 is a good
-  // balance between batch size and number of fill/stroke instructions.
-  var batchSize =
-      this.instructions != instructions || this.overlaps ? 0 : 200;
-  while (i < ii) {
-    var instruction = instructions[i];
-    var type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
-    var /** @type {ol.Feature|ol.render.Feature} */ feature, x, y;
-    switch (type) {
-      case ol.render.canvas.Instruction.BEGIN_GEOMETRY:
-        feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
-        if ((skipFeatures &&
-            skippedFeaturesHash[ol.getUid(feature).toString()]) ||
-            !feature.getGeometry()) {
-          i = /** @type {number} */ (instruction[2]);
-        } else if (opt_hitExtent !== undefined && !ol.extent.intersects(
-            opt_hitExtent, feature.getGeometry().getExtent())) {
-          i = /** @type {number} */ (instruction[2]) + 1;
-        } else {
-          ++i;
-        }
-        break;
-      case ol.render.canvas.Instruction.BEGIN_PATH:
-        if (pendingFill > batchSize) {
-          this.fill_(context);
-          pendingFill = 0;
-        }
-        if (pendingStroke > batchSize) {
-          context.stroke();
-          pendingStroke = 0;
-        }
-        if (!pendingFill && !pendingStroke) {
-          context.beginPath();
-          prevX = prevY = NaN;
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.CIRCLE:
-        d = /** @type {number} */ (instruction[1]);
-        var x1 = pixelCoordinates[d];
-        var y1 = pixelCoordinates[d + 1];
-        var x2 = pixelCoordinates[d + 2];
-        var y2 = pixelCoordinates[d + 3];
-        var dx = x2 - x1;
-        var dy = y2 - y1;
-        var r = Math.sqrt(dx * dx + dy * dy);
-        context.moveTo(x1 + r, y1);
-        context.arc(x1, y1, r, 0, 2 * Math.PI, true);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.CLOSE_PATH:
-        context.closePath();
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.CUSTOM:
-        d = /** @type {number} */ (instruction[1]);
-        dd = instruction[2];
-        var geometry = /** @type {ol.geom.SimpleGeometry} */ (instruction[3]);
-        var renderer = instruction[4];
-        var fn = instruction.length == 6 ? instruction[5] : undefined;
-        state.geometry = geometry;
-        state.feature = feature;
-        if (!(i in coordinateCache)) {
-          coordinateCache[i] = [];
-        }
-        var coords = coordinateCache[i];
-        if (fn) {
-          fn(pixelCoordinates, d, dd, 2, coords);
-        } else {
-          coords[0] = pixelCoordinates[d];
-          coords[1] = pixelCoordinates[d + 1];
-          coords.length = 2;
-        }
-        renderer(coords, state);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.DRAW_IMAGE:
-        d = /** @type {number} */ (instruction[1]);
-        dd = /** @type {number} */ (instruction[2]);
-        image =  /** @type {HTMLCanvasElement|HTMLVideoElement|Image} */
-            (instruction[3]);
-        // Remaining arguments in DRAW_IMAGE are in alphabetical order
-        anchorX = /** @type {number} */ (instruction[4]);
-        anchorY = /** @type {number} */ (instruction[5]);
-        declutterGroup = featureCallback ? null : /** @type {ol.DeclutterGroup} */ (instruction[6]);
-        var height = /** @type {number} */ (instruction[7]);
-        var opacity = /** @type {number} */ (instruction[8]);
-        var originX = /** @type {number} */ (instruction[9]);
-        var originY = /** @type {number} */ (instruction[10]);
-        var rotateWithView = /** @type {boolean} */ (instruction[11]);
-        var rotation = /** @type {number} */ (instruction[12]);
-        var scale = /** @type {number} */ (instruction[13]);
-        var snapToPixel = /** @type {boolean} */ (instruction[14]);
-        var width = /** @type {number} */ (instruction[15]);
-
-        var padding, backgroundFill, backgroundStroke;
-        if (instruction.length > 16) {
-          padding = /** @type {Array.<number>} */ (instruction[16]);
-          backgroundFill = /** @type {boolean} */ (instruction[17]);
-          backgroundStroke = /** @type {boolean} */ (instruction[18]);
-        } else {
-          padding = ol.render.canvas.defaultPadding;
-          backgroundFill = backgroundStroke = false;
-        }
-
-        if (rotateWithView) {
-          rotation += viewRotation;
-        }
-        for (; d < dd; d += 2) {
-          this.replayImage_(context,
-              pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY,
-              declutterGroup, height, opacity, originX, originY, rotation, scale,
-              snapToPixel, width, padding,
-              backgroundFill ? /** @type {Array.<*>} */ (lastFillInstruction) : null,
-              backgroundStroke ? /** @type {Array.<*>} */ (lastStrokeInstruction) : null);
-        }
-        this.renderDeclutter_(declutterGroup, feature);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.DRAW_CHARS:
-        var begin = /** @type {number} */ (instruction[1]);
-        var end = /** @type {number} */ (instruction[2]);
-        var baseline = /** @type {number} */ (instruction[3]);
-        declutterGroup = featureCallback ? null : /** @type {ol.DeclutterGroup} */ (instruction[4]);
-        var overflow = /** @type {number} */ (instruction[5]);
-        var fillKey = /** @type {string} */ (instruction[6]);
-        var maxAngle = /** @type {number} */ (instruction[7]);
-        var measure = /** @type {function(string):number} */ (instruction[8]);
-        var offsetY = /** @type {number} */ (instruction[9]);
-        var strokeKey = /** @type {string} */ (instruction[10]);
-        var strokeWidth =  /** @type {number} */ (instruction[11]);
-        var text = /** @type {string} */ (instruction[12]);
-        var textKey = /** @type {string} */ (instruction[13]);
-        var textScale = /** @type {number} */ (instruction[14]);
-
-        var pathLength = ol.geom.flat.length.lineString(pixelCoordinates, begin, end, 2);
-        var textLength = measure(text);
-        if (overflow || textLength <= pathLength) {
-          var textAlign = /** @type {ol.render.canvas.TextReplay} */ (this).textStates[textKey].textAlign;
-          var startM = (pathLength - textLength) * ol.render.replay.TEXT_ALIGN[textAlign];
-          var parts = ol.geom.flat.textpath.lineString(
-              pixelCoordinates, begin, end, 2, text, measure, startM, maxAngle);
-          if (parts) {
-            var c, cc, chars, label, part;
-            if (strokeKey) {
-              for (c = 0, cc = parts.length; c < cc; ++c) {
-                part = parts[c]; // x, y, anchorX, rotation, chunk
-                chars = /** @type {string} */ (part[4]);
-                label = /** @type {ol.render.canvas.TextReplay} */ (this).getImage(chars, textKey, '', strokeKey);
-                anchorX = /** @type {number} */ (part[2]) + strokeWidth;
-                anchorY = baseline * label.height + (0.5 - baseline) * 2 * strokeWidth - offsetY;
-                this.replayImage_(context,
-                    /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,
-                    anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,
-                    /** @type {number} */ (part[3]), textScale, false, label.width,
-                    ol.render.canvas.defaultPadding, null, null);
-              }
-            }
-            if (fillKey) {
-              for (c = 0, cc = parts.length; c < cc; ++c) {
-                part = parts[c]; // x, y, anchorX, rotation, chunk
-                chars = /** @type {string} */ (part[4]);
-                label = /** @type {ol.render.canvas.TextReplay} */ (this).getImage(chars, textKey, fillKey, '');
-                anchorX = /** @type {number} */ (part[2]);
-                anchorY = baseline * label.height - offsetY;
-                this.replayImage_(context,
-                    /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,
-                    anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,
-                    /** @type {number} */ (part[3]), textScale, false, label.width,
-                    ol.render.canvas.defaultPadding, null, null);
-              }
-            }
-          }
-        }
-        this.renderDeclutter_(declutterGroup, feature);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.END_GEOMETRY:
-        if (featureCallback !== undefined) {
-          feature = /** @type {ol.Feature|ol.render.Feature} */ (instruction[1]);
-          var result = featureCallback(feature);
-          if (result) {
-            return result;
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.FILL:
-        if (batchSize) {
-          pendingFill++;
-        } else {
-          this.fill_(context);
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.MOVE_TO_LINE_TO:
-        d = /** @type {number} */ (instruction[1]);
-        dd = /** @type {number} */ (instruction[2]);
-        x = pixelCoordinates[d];
-        y = pixelCoordinates[d + 1];
-        roundX = (x + 0.5) | 0;
-        roundY = (y + 0.5) | 0;
-        if (roundX !== prevX || roundY !== prevY) {
-          context.moveTo(x, y);
-          prevX = roundX;
-          prevY = roundY;
-        }
-        for (d += 2; d < dd; d += 2) {
-          x = pixelCoordinates[d];
-          y = pixelCoordinates[d + 1];
-          roundX = (x + 0.5) | 0;
-          roundY = (y + 0.5) | 0;
-          if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {
-            context.lineTo(x, y);
-            prevX = roundX;
-            prevY = roundY;
-          }
-        }
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.SET_FILL_STYLE:
-        lastFillInstruction = instruction;
-        this.fillOrigin_ = instruction[2];
-
-        if (pendingFill) {
-          this.fill_(context);
-          pendingFill = 0;
-          if (pendingStroke) {
-            context.stroke();
-            pendingStroke = 0;
-          }
-        }
-
-        context.fillStyle = /** @type {ol.ColorLike} */ (instruction[1]);
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.SET_STROKE_STYLE:
-        lastStrokeInstruction = instruction;
-        if (pendingStroke) {
-          context.stroke();
-          pendingStroke = 0;
-        }
-        this.setStrokeStyle_(context, /** @type {Array.<*>} */ (instruction));
-        ++i;
-        break;
-      case ol.render.canvas.Instruction.STROKE:
-        if (batchSize) {
-          pendingStroke++;
-        } else {
-          context.stroke();
-        }
-        ++i;
-        break;
-      default:
-        ++i; // consume the instruction anyway, to avoid an infinite loop
-        break;
-    }
-  }
-  if (pendingFill) {
-    this.fill_(context);
-  }
-  if (pendingStroke) {
-    context.stroke();
-  }
-  return undefined;
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- */
-ol.render.canvas.Replay.prototype.replay = function(
-    context, transform, viewRotation, skippedFeaturesHash) {
-  this.viewRotation_ = viewRotation;
-  this.replay_(context, transform,
-      skippedFeaturesHash, this.instructions, undefined, undefined);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T=} opt_featureCallback
- *     Feature callback.
- * @param {ol.Extent=} opt_hitExtent Only check features that intersect this
- *     extent.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.Replay.prototype.replayHitDetection = function(
-    context, transform, viewRotation, skippedFeaturesHash,
-    opt_featureCallback, opt_hitExtent) {
-  this.viewRotation_ = viewRotation;
-  return this.replay_(context, transform, skippedFeaturesHash,
-      this.hitDetectionInstructions, opt_featureCallback, opt_hitExtent);
-};
-
-
-/**
- * Reverse the hit detection instructions.
- */
-ol.render.canvas.Replay.prototype.reverseHitDetectionInstructions = function() {
-  var hitDetectionInstructions = this.hitDetectionInstructions;
-  // step 1 - reverse array
-  hitDetectionInstructions.reverse();
-  // step 2 - reverse instructions within geometry blocks
-  var i;
-  var n = hitDetectionInstructions.length;
-  var instruction;
-  var type;
-  var begin = -1;
-  for (i = 0; i < n; ++i) {
-    instruction = hitDetectionInstructions[i];
-    type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
-    if (type == ol.render.canvas.Instruction.END_GEOMETRY) {
-      begin = i;
-    } else if (type == ol.render.canvas.Instruction.BEGIN_GEOMETRY) {
-      instruction[2] = i;
-      ol.array.reverseSubArray(this.hitDetectionInstructions, begin, i);
-      begin = -1;
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.Replay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var state = this.state;
-  if (fillStyle) {
-    var fillStyleColor = fillStyle.getColor();
-    state.fillStyle = ol.colorlike.asColorLike(fillStyleColor ?
-      fillStyleColor : ol.render.canvas.defaultFillStyle);
-  } else {
-    state.fillStyle = undefined;
-  }
-  if (strokeStyle) {
-    var strokeStyleColor = strokeStyle.getColor();
-    state.strokeStyle = ol.colorlike.asColorLike(strokeStyleColor ?
-      strokeStyleColor : ol.render.canvas.defaultStrokeStyle);
-    var strokeStyleLineCap = strokeStyle.getLineCap();
-    state.lineCap = strokeStyleLineCap !== undefined ?
-      strokeStyleLineCap : ol.render.canvas.defaultLineCap;
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    state.lineDash = strokeStyleLineDash ?
-      strokeStyleLineDash.slice() : ol.render.canvas.defaultLineDash;
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    state.lineDashOffset = strokeStyleLineDashOffset ?
-      strokeStyleLineDashOffset : ol.render.canvas.defaultLineDashOffset;
-    var strokeStyleLineJoin = strokeStyle.getLineJoin();
-    state.lineJoin = strokeStyleLineJoin !== undefined ?
-      strokeStyleLineJoin : ol.render.canvas.defaultLineJoin;
-    var strokeStyleWidth = strokeStyle.getWidth();
-    state.lineWidth = strokeStyleWidth !== undefined ?
-      strokeStyleWidth : ol.render.canvas.defaultLineWidth;
-    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-    state.miterLimit = strokeStyleMiterLimit !== undefined ?
-      strokeStyleMiterLimit : ol.render.canvas.defaultMiterLimit;
-
-    if (state.lineWidth > this.maxLineWidth) {
-      this.maxLineWidth = state.lineWidth;
-      // invalidate the buffered max extent cache
-      this.bufferedMaxExtent_ = null;
-    }
-  } else {
-    state.strokeStyle = undefined;
-    state.lineCap = undefined;
-    state.lineDash = null;
-    state.lineDashOffset = undefined;
-    state.lineJoin = undefined;
-    state.lineWidth = undefined;
-    state.miterLimit = undefined;
-  }
-};
-
-
-/**
- * @param {ol.CanvasFillStrokeState} state State.
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- */
-ol.render.canvas.Replay.prototype.applyFill = function(state, geometry) {
-  var fillStyle = state.fillStyle;
-  var fillInstruction = [ol.render.canvas.Instruction.SET_FILL_STYLE, fillStyle];
-  if (typeof fillStyle !== 'string') {
-    var fillExtent = geometry.getExtent();
-    fillInstruction.push([fillExtent[0], fillExtent[3]]);
-  }
-  this.instructions.push(fillInstruction);
-};
-
-
-/**
- * @param {ol.CanvasFillStrokeState} state State.
- */
-ol.render.canvas.Replay.prototype.applyStroke = function(state) {
-  this.instructions.push([
-    ol.render.canvas.Instruction.SET_STROKE_STYLE,
-    state.strokeStyle, state.lineWidth * this.pixelRatio, state.lineCap,
-    state.lineJoin, state.miterLimit,
-    this.applyPixelRatio(state.lineDash), state.lineDashOffset * this.pixelRatio
-  ]);
-};
-
-
-/**
- * @param {ol.CanvasFillStrokeState} state State.
- * @param {function(this:ol.render.canvas.Replay, ol.CanvasFillStrokeState, (ol.geom.Geometry|ol.render.Feature))} applyFill Apply fill.
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- */
-ol.render.canvas.Replay.prototype.updateFillStyle = function(state, applyFill, geometry) {
-  var fillStyle = state.fillStyle;
-  if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {
-    applyFill.call(this, state, geometry);
-    state.currentFillStyle = fillStyle;
-  }
-};
-
-
-/**
- * @param {ol.CanvasFillStrokeState} state State.
- * @param {function(this:ol.render.canvas.Replay, ol.CanvasFillStrokeState)} applyStroke Apply stroke.
- */
-ol.render.canvas.Replay.prototype.updateStrokeStyle = function(state, applyStroke) {
-  var strokeStyle = state.strokeStyle;
-  var lineCap = state.lineCap;
-  var lineDash = state.lineDash;
-  var lineDashOffset = state.lineDashOffset;
-  var lineJoin = state.lineJoin;
-  var lineWidth = state.lineWidth;
-  var miterLimit = state.miterLimit;
-  if (state.currentStrokeStyle != strokeStyle ||
-      state.currentLineCap != lineCap ||
-      (lineDash != state.currentLineDash && !ol.array.equals(state.currentLineDash, lineDash)) ||
-      state.currentLineDashOffset != lineDashOffset ||
-      state.currentLineJoin != lineJoin ||
-      state.currentLineWidth != lineWidth ||
-      state.currentMiterLimit != miterLimit) {
-    applyStroke.call(this, state);
-    state.currentStrokeStyle = strokeStyle;
-    state.currentLineCap = lineCap;
-    state.currentLineDash = lineDash;
-    state.currentLineDashOffset = lineDashOffset;
-    state.currentLineJoin = lineJoin;
-    state.currentLineWidth = lineWidth;
-    state.currentMiterLimit = miterLimit;
-  }
-};
-
-
-/**
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- */
-ol.render.canvas.Replay.prototype.endGeometry = function(geometry, feature) {
-  this.beginGeometryInstruction1_[2] = this.instructions.length;
-  this.beginGeometryInstruction1_ = null;
-  this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;
-  this.beginGeometryInstruction2_ = null;
-  var endGeometryInstruction =
-      [ol.render.canvas.Instruction.END_GEOMETRY, feature];
-  this.instructions.push(endGeometryInstruction);
-  this.hitDetectionInstructions.push(endGeometryInstruction);
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.render.canvas.Replay.prototype.finish = ol.nullFunction;
-
-
-/**
- * Get the buffered rendering extent.  Rendering will be clipped to the extent
- * provided to the constructor.  To account for symbolizers that may intersect
- * this extent, we calculate a buffered extent (e.g. based on stroke width).
- * @return {ol.Extent} The buffered rendering extent.
- * @protected
- */
-ol.render.canvas.Replay.prototype.getBufferedMaxExtent = function() {
-  if (!this.bufferedMaxExtent_) {
-    this.bufferedMaxExtent_ = ol.extent.clone(this.maxExtent);
-    if (this.maxLineWidth > 0) {
-      var width = this.resolution * (this.maxLineWidth + 1) / 2;
-      ol.extent.buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);
-    }
-  }
-  return this.bufferedMaxExtent_;
-};
-
-goog.provide('ol.render.canvas.ImageReplay');
-
-goog.require('ol');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @param {?} declutterTree Declutter tree.
- * @struct
- */
-ol.render.canvas.ImageReplay = function(
-    tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
-  ol.render.canvas.Replay.call(this,
-      tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
-
-  /**
-   * @private
-   * @type {ol.DeclutterGroup}
-   */
-  this.declutterGroup_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.hitDetectionImage_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLVideoElement|Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.anchorX_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.anchorY_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.height_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.opacity_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.originX_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.originY_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.rotateWithView_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.scale_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.snapToPixel_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.width_ = undefined;
-
-};
-ol.inherits(ol.render.canvas.ImageReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- * @return {number} My end.
- */
-ol.render.canvas.ImageReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
-  return this.appendFlatCoordinates(
-      flatCoordinates, offset, end, stride, false, false);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
-  if (!this.image_) {
-    return;
-  }
-  this.beginGeometry(pointGeometry, feature);
-  var flatCoordinates = pointGeometry.getFlatCoordinates();
-  var stride = pointGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  var myEnd = this.drawCoordinates_(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-  this.instructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
-    // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_ * this.pixelRatio, this.snapToPixel_, this.width_
-  ]);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
-    this.hitDetectionImage_,
-    // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.endGeometry(pointGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.drawMultiPoint = function(multiPointGeometry, feature) {
-  if (!this.image_) {
-    return;
-  }
-  this.beginGeometry(multiPointGeometry, feature);
-  var flatCoordinates = multiPointGeometry.getFlatCoordinates();
-  var stride = multiPointGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  var myEnd = this.drawCoordinates_(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-  this.instructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd, this.image_,
-    // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_ * this.pixelRatio, this.snapToPixel_, this.width_
-  ]);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.DRAW_IMAGE, myBegin, myEnd,
-    this.hitDetectionImage_,
-    // Remaining arguments to DRAW_IMAGE are in alphabetical order
-    this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,
-    this.originX_, this.originY_, this.rotateWithView_, this.rotation_,
-    this.scale_, this.snapToPixel_, this.width_
-  ]);
-  this.endGeometry(multiPointGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.finish = function() {
-  this.reverseHitDetectionInstructions();
-  // FIXME this doesn't really protect us against further calls to draw*Geometry
-  this.anchorX_ = undefined;
-  this.anchorY_ = undefined;
-  this.hitDetectionImage_ = null;
-  this.image_ = null;
-  this.height_ = undefined;
-  this.scale_ = undefined;
-  this.opacity_ = undefined;
-  this.originX_ = undefined;
-  this.originY_ = undefined;
-  this.rotateWithView_ = undefined;
-  this.rotation_ = undefined;
-  this.snapToPixel_ = undefined;
-  this.width_ = undefined;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ImageReplay.prototype.setImageStyle = function(imageStyle, declutterGroup) {
-  var anchor = imageStyle.getAnchor();
-  var size = imageStyle.getSize();
-  var hitDetectionImage = imageStyle.getHitDetectionImage(1);
-  var image = imageStyle.getImage(1);
-  var origin = imageStyle.getOrigin();
-  this.anchorX_ = anchor[0];
-  this.anchorY_ = anchor[1];
-  this.declutterGroup_ = /** @type {ol.DeclutterGroup} */ (declutterGroup);
-  this.hitDetectionImage_ = hitDetectionImage;
-  this.image_ = image;
-  this.height_ = size[1];
-  this.opacity_ = imageStyle.getOpacity();
-  this.originX_ = origin[0];
-  this.originY_ = origin[1];
-  this.rotateWithView_ = imageStyle.getRotateWithView();
-  this.rotation_ = imageStyle.getRotation();
-  this.scale_ = imageStyle.getScale();
-  this.snapToPixel_ = imageStyle.getSnapToPixel();
-  this.width_ = size[0];
-};
-
-goog.provide('ol.render.canvas.LineStringReplay');
-
-goog.require('ol');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @param {?} declutterTree Declutter tree.
- * @struct
- */
-ol.render.canvas.LineStringReplay = function(
-    tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
-  ol.render.canvas.Replay.call(this,
-      tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
-};
-ol.inherits(ol.render.canvas.LineStringReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @private
- * @return {number} end.
- */
-ol.render.canvas.LineStringReplay.prototype.drawFlatCoordinates_ = function(flatCoordinates, offset, end, stride) {
-  var myBegin = this.coordinates.length;
-  var myEnd = this.appendFlatCoordinates(
-      flatCoordinates, offset, end, stride, false, false);
-  var moveToLineToInstruction =
-      [ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
-  this.instructions.push(moveToLineToInstruction);
-  this.hitDetectionInstructions.push(moveToLineToInstruction);
-  return end;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.drawLineString = function(lineStringGeometry, feature) {
-  var state = this.state;
-  var strokeStyle = state.strokeStyle;
-  var lineWidth = state.lineWidth;
-  if (strokeStyle === undefined || lineWidth === undefined) {
-    return;
-  }
-  this.updateStrokeStyle(state, this.applyStroke);
-  this.beginGeometry(lineStringGeometry, feature);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_STROKE_STYLE,
-    state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-    state.miterLimit, state.lineDash, state.lineDashOffset
-  ], [
-    ol.render.canvas.Instruction.BEGIN_PATH
-  ]);
-  var flatCoordinates = lineStringGeometry.getFlatCoordinates();
-  var stride = lineStringGeometry.getStride();
-  this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.STROKE]);
-  this.endGeometry(lineStringGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {
-  var state = this.state;
-  var strokeStyle = state.strokeStyle;
-  var lineWidth = state.lineWidth;
-  if (strokeStyle === undefined || lineWidth === undefined) {
-    return;
-  }
-  this.updateStrokeStyle(state, this.applyStroke);
-  this.beginGeometry(multiLineStringGeometry, feature);
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_STROKE_STYLE,
-    state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-    state.miterLimit, state.lineDash, state.lineDashOffset
-  ], [
-    ol.render.canvas.Instruction.BEGIN_PATH
-  ]);
-  var ends = multiLineStringGeometry.getEnds();
-  var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();
-  var stride = multiLineStringGeometry.getStride();
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    offset = this.drawFlatCoordinates_(
-        flatCoordinates, offset, ends[i], stride);
-  }
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.STROKE]);
-  this.endGeometry(multiLineStringGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.LineStringReplay.prototype.finish = function() {
-  var state = this.state;
-  if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {
-    this.instructions.push([ol.render.canvas.Instruction.STROKE]);
-  }
-  this.reverseHitDetectionInstructions();
-  this.state = null;
-};
-
-
-/**
- * @inheritDoc.
- */
-ol.render.canvas.LineStringReplay.prototype.applyStroke = function(state) {
-  if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {
-    this.instructions.push([ol.render.canvas.Instruction.STROKE]);
-    state.lastStroke = this.coordinates.length;
-  }
-  state.lastStroke = 0;
-  ol.render.canvas.Replay.prototype.applyStroke.call(this, state);
-  this.instructions.push([ol.render.canvas.Instruction.BEGIN_PATH]);
-};
-
-goog.provide('ol.render.canvas.PolygonReplay');
-
-goog.require('ol');
-goog.require('ol.color');
-goog.require('ol.geom.flat.simplify');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @param {?} declutterTree Declutter tree.
- * @struct
- */
-ol.render.canvas.PolygonReplay = function(
-    tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
-  ol.render.canvas.Replay.call(this,
-      tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
-};
-ol.inherits(ol.render.canvas.PolygonReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @private
- * @return {number} End.
- */
-ol.render.canvas.PolygonReplay.prototype.drawFlatCoordinatess_ = function(flatCoordinates, offset, ends, stride) {
-  var state = this.state;
-  var fill = state.fillStyle !== undefined;
-  var stroke = state.strokeStyle != undefined;
-  var numEnds = ends.length;
-  var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
-  this.instructions.push(beginPathInstruction);
-  this.hitDetectionInstructions.push(beginPathInstruction);
-  for (var i = 0; i < numEnds; ++i) {
-    var end = ends[i];
-    var myBegin = this.coordinates.length;
-    var myEnd = this.appendFlatCoordinates(
-        flatCoordinates, offset, end, stride, true, !stroke);
-    var moveToLineToInstruction =
-        [ol.render.canvas.Instruction.MOVE_TO_LINE_TO, myBegin, myEnd];
-    this.instructions.push(moveToLineToInstruction);
-    this.hitDetectionInstructions.push(moveToLineToInstruction);
-    if (stroke) {
-      // Performance optimization: only call closePath() when we have a stroke.
-      // Otherwise the ring is closed already (see appendFlatCoordinates above).
-      var closePathInstruction = [ol.render.canvas.Instruction.CLOSE_PATH];
-      this.instructions.push(closePathInstruction);
-      this.hitDetectionInstructions.push(closePathInstruction);
-    }
-    offset = end;
-  }
-  var fillInstruction = [ol.render.canvas.Instruction.FILL];
-  this.hitDetectionInstructions.push(fillInstruction);
-  if (fill) {
-    this.instructions.push(fillInstruction);
-  }
-  if (stroke) {
-    var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
-    this.instructions.push(strokeInstruction);
-    this.hitDetectionInstructions.push(strokeInstruction);
-  }
-  return offset;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawCircle = function(circleGeometry, feature) {
-  var state = this.state;
-  var fillStyle = state.fillStyle;
-  var strokeStyle = state.strokeStyle;
-  if (fillStyle === undefined && strokeStyle === undefined) {
-    return;
-  }
-  this.setFillStrokeStyles_(circleGeometry);
-  this.beginGeometry(circleGeometry, feature);
-  // always fill the circle for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)
-  ]);
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset
-    ]);
-  }
-  var flatCoordinates = circleGeometry.getFlatCoordinates();
-  var stride = circleGeometry.getStride();
-  var myBegin = this.coordinates.length;
-  this.appendFlatCoordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride, false, false);
-  var beginPathInstruction = [ol.render.canvas.Instruction.BEGIN_PATH];
-  var circleInstruction = [ol.render.canvas.Instruction.CIRCLE, myBegin];
-  this.instructions.push(beginPathInstruction, circleInstruction);
-  this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);
-  var fillInstruction = [ol.render.canvas.Instruction.FILL];
-  this.hitDetectionInstructions.push(fillInstruction);
-  if (state.fillStyle !== undefined) {
-    this.instructions.push(fillInstruction);
-  }
-  if (state.strokeStyle !== undefined) {
-    var strokeInstruction = [ol.render.canvas.Instruction.STROKE];
-    this.instructions.push(strokeInstruction);
-    this.hitDetectionInstructions.push(strokeInstruction);
-  }
-  this.endGeometry(circleGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawPolygon = function(polygonGeometry, feature) {
-  var state = this.state;
-  this.setFillStrokeStyles_(polygonGeometry);
-  this.beginGeometry(polygonGeometry, feature);
-  // always fill the polygon for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)]
-  );
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset
-    ]);
-  }
-  var ends = polygonGeometry.getEnds();
-  var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();
-  var stride = polygonGeometry.getStride();
-  this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride);
-  this.endGeometry(polygonGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {
-  var state = this.state;
-  var fillStyle = state.fillStyle;
-  var strokeStyle = state.strokeStyle;
-  if (fillStyle === undefined && strokeStyle === undefined) {
-    return;
-  }
-  this.setFillStrokeStyles_(multiPolygonGeometry);
-  this.beginGeometry(multiPolygonGeometry, feature);
-  // always fill the multi-polygon for hit detection
-  this.hitDetectionInstructions.push([
-    ol.render.canvas.Instruction.SET_FILL_STYLE,
-    ol.color.asString(ol.render.canvas.defaultFillStyle)
-  ]);
-  if (state.strokeStyle !== undefined) {
-    this.hitDetectionInstructions.push([
-      ol.render.canvas.Instruction.SET_STROKE_STYLE,
-      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,
-      state.miterLimit, state.lineDash, state.lineDashOffset
-    ]);
-  }
-  var endss = multiPolygonGeometry.getEndss();
-  var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();
-  var stride = multiPolygonGeometry.getStride();
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    offset = this.drawFlatCoordinatess_(
-        flatCoordinates, offset, endss[i], stride);
-  }
-  this.endGeometry(multiPolygonGeometry, feature);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.PolygonReplay.prototype.finish = function() {
-  this.reverseHitDetectionInstructions();
-  this.state = null;
-  // We want to preserve topology when drawing polygons.  Polygons are
-  // simplified using quantization and point elimination. However, we might
-  // have received a mix of quantized and non-quantized geometries, so ensure
-  // that all are quantized by quantizing all coordinates in the batch.
-  var tolerance = this.tolerance;
-  if (tolerance !== 0) {
-    var coordinates = this.coordinates;
-    var i, ii;
-    for (i = 0, ii = coordinates.length; i < ii; ++i) {
-      coordinates[i] = ol.geom.flat.simplify.snap(coordinates[i], tolerance);
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- */
-ol.render.canvas.PolygonReplay.prototype.setFillStrokeStyles_ = function(geometry) {
-  var state = this.state;
-  var fillStyle = state.fillStyle;
-  if (fillStyle !== undefined) {
-    this.updateFillStyle(state, this.applyFill, geometry);
-  }
-  if (state.strokeStyle !== undefined) {
-    this.updateStrokeStyle(state, this.applyStroke);
-  }
-};
-
-goog.provide('ol.geom.flat.straightchunk');
-
-
-/**
- * @param {number} maxAngle Maximum acceptable angle delta between segments.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {Array.<number>} Start and end of the first suitable chunk of the
- * given `flatCoordinates`.
- */
-ol.geom.flat.straightchunk.lineString = function(maxAngle, flatCoordinates, offset, end, stride) {
-  var chunkStart = offset;
-  var chunkEnd = offset;
-  var chunkM = 0;
-  var m = 0;
-  var start = offset;
-  var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;
-  for (i = offset; i < end; i += stride) {
-    var x2 = flatCoordinates[i];
-    var y2 = flatCoordinates[i + 1];
-    if (x1 !== undefined) {
-      x23 = x2 - x1;
-      y23 = y2 - y1;
-      m23 = Math.sqrt(x23 * x23 + y23 * y23);
-      if (x12 !== undefined) {
-        m += m12;
-        acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));
-        if (acos > maxAngle) {
-          if (m > chunkM) {
-            chunkM = m;
-            chunkStart = start;
-            chunkEnd = i;
-          }
-          m = 0;
-          start = i - stride;
-        }
-      }
-      m12 = m23;
-      x12 = x23;
-      y12 = y23;
-    }
-    x1 = x2;
-    y1 = y2;
-  }
-  m += m23;
-  return m > chunkM ? [start, i] : [chunkStart, chunkEnd];
-};
-
-goog.provide('ol.style.TextPlacement');
-
-
-/**
- * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that
- * `'line'` requires the underlying geometry to be a {@link ol.geom.LineString},
- * {@link ol.geom.Polygon}, {@link ol.geom.MultiLineString} or
- * {@link ol.geom.MultiPolygon}.
- * @enum {string}
- */
-ol.style.TextPlacement = {
-  POINT: 'point',
-  LINE: 'line'
-};
-
-goog.provide('ol.render.canvas.TextReplay');
-
-goog.require('ol');
-goog.require('ol.colorlike');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.straightchunk');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.has');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.Instruction');
-goog.require('ol.render.canvas.Replay');
-goog.require('ol.render.replay');
-goog.require('ol.style.TextPlacement');
-
-
-/**
- * @constructor
- * @extends {ol.render.canvas.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Maximum extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay can have overlapping geometries.
- * @param {?} declutterTree Declutter tree.
- * @struct
- */
-ol.render.canvas.TextReplay = function(
-    tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
-  ol.render.canvas.Replay.call(this,
-      tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
-
-  /**
-   * @private
-   * @type {ol.DeclutterGroup}
-   */
-  this.declutterGroup_;
-
-  /**
-   * @private
-   * @type {Array.<HTMLCanvasElement>}
-   */
-  this.labels_ = null;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = '';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetX_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textOffsetY_ = 0;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.textRotateWithView_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textRotation_ = 0;
-
-  /**
-   * @private
-   * @type {?ol.CanvasFillState}
-   */
-  this.textFillState_ = null;
-
-  /**
-   * @type {Object.<string, ol.CanvasFillState>}
-   */
-  this.fillStates = {};
-
-  /**
-   * @private
-   * @type {?ol.CanvasStrokeState}
-   */
-  this.textStrokeState_ = null;
-
-  /**
-   * @type {Object.<string, ol.CanvasStrokeState>}
-   */
-  this.strokeStates = {};
-
-  /**
-   * @private
-   * @type {ol.CanvasTextState}
-   */
-  this.textState_ = /** @type {ol.CanvasTextState} */ ({});
-
-  /**
-   * @type {Object.<string, ol.CanvasTextState>}
-   */
-  this.textStates = {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.textKey_ = '';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.fillKey_ = '';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.strokeKey_ = '';
-
-  /**
-   * @private
-   * @type {Object.<string, Object.<string, number>>}
-   */
-  this.widths_ = {};
-
-  var labelCache = ol.render.canvas.labelCache;
-  labelCache.prune();
-
-};
-ol.inherits(ol.render.canvas.TextReplay, ol.render.canvas.Replay);
-
-
-/**
- * @param {string} font Font to use for measuring.
- * @param {Array.<string>} lines Lines to measure.
- * @param {Array.<number>} widths Array will be populated with the widths of
- * each line.
- * @return {number} Width of the whole text.
- */
-ol.render.canvas.TextReplay.measureTextWidths = function(font, lines, widths) {
-  var numLines = lines.length;
-  var width = 0;
-  var currentWidth, i;
-  for (i = 0; i < numLines; ++i) {
-    currentWidth = ol.render.canvas.measureTextWidth(font, lines[i]);
-    width = Math.max(width, currentWidth);
-    widths.push(currentWidth);
-  }
-  return width;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.TextReplay.prototype.drawText = function(geometry, feature) {
-  var fillState = this.textFillState_;
-  var strokeState = this.textStrokeState_;
-  var textState = this.textState_;
-  if (this.text_ === '' || !textState || (!fillState && !strokeState)) {
-    return;
-  }
-
-  var begin = this.coordinates.length;
-
-  var geometryType = geometry.getType();
-  var flatCoordinates = null;
-  var end = 2;
-  var stride = 2;
-  var i, ii;
-
-  if (textState.placement === ol.style.TextPlacement.LINE) {
-    if (!ol.extent.intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {
-      return;
-    }
-    var ends;
-    flatCoordinates = geometry.getFlatCoordinates();
-    stride = geometry.getStride();
-    if (geometryType == ol.geom.GeometryType.LINE_STRING) {
-      ends = [flatCoordinates.length];
-    } else if (geometryType == ol.geom.GeometryType.MULTI_LINE_STRING) {
-      ends = geometry.getEnds();
-    } else if (geometryType == ol.geom.GeometryType.POLYGON) {
-      ends = geometry.getEnds().slice(0, 1);
-    } else if (geometryType == ol.geom.GeometryType.MULTI_POLYGON) {
-      var endss = geometry.getEndss();
-      ends = [];
-      for (i = 0, ii = endss.length; i < ii; ++i) {
-        ends.push(endss[i][0]);
-      }
-    }
-    this.beginGeometry(geometry, feature);
-    var textAlign = textState.textAlign;
-    var flatOffset = 0;
-    var flatEnd;
-    for (var o = 0, oo = ends.length; o < oo; ++o) {
-      if (textAlign == undefined) {
-        var range = ol.geom.flat.straightchunk.lineString(
-            textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);
-        flatOffset = range[0];
-        flatEnd = range[1];
-      } else {
-        flatEnd = ends[o];
-      }
-      for (i = flatOffset; i < flatEnd; i += stride) {
-        this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);
-      }
-      end = this.coordinates.length;
-      flatOffset = ends[o];
-      this.drawChars_(begin, end, this.declutterGroup_);
-      begin = end;
-    }
-    this.endGeometry(geometry, feature);
-
-  } else {
-    var label = this.getImage(this.text_, this.textKey_, this.fillKey_, this.strokeKey_);
-    var width = label.width / this.pixelRatio;
-    switch (geometryType) {
-      case ol.geom.GeometryType.POINT:
-      case ol.geom.GeometryType.MULTI_POINT:
-        flatCoordinates = geometry.getFlatCoordinates();
-        end = flatCoordinates.length;
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint();
-        break;
-      case ol.geom.GeometryType.CIRCLE:
-        flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter();
-        break;
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints();
-        end = flatCoordinates.length;
-        break;
-      case ol.geom.GeometryType.POLYGON:
-        flatCoordinates = /** @type {ol.geom.Polygon} */ (geometry).getFlatInteriorPoint();
-        if (!textState.overflow && flatCoordinates[2] / this.resolution < width) {
-          return;
-        }
-        stride = 3;
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        var interiorPoints = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints();
-        flatCoordinates = [];
-        for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {
-          if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {
-            flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);
-          }
-        }
-        end = flatCoordinates.length;
-        if (end == 0) {
-          return;
-        }
-        break;
-      default:
-    }
-    end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);
-    this.beginGeometry(geometry, feature);
-    if (textState.backgroundFill || textState.backgroundStroke) {
-      this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);
-      this.updateFillStyle(this.state, this.applyFill, geometry);
-      this.updateStrokeStyle(this.state, this.applyStroke);
-    }
-    this.drawTextImage_(label, begin, end);
-    this.endGeometry(geometry, feature);
-  }
-};
-
-
-/**
- * @param {string} text Text.
- * @param {string} textKey Text style key.
- * @param {string} fillKey Fill style key.
- * @param {string} strokeKey Stroke style key.
- * @return {HTMLCanvasElement} Image.
- */
-ol.render.canvas.TextReplay.prototype.getImage = function(text, textKey, fillKey, strokeKey) {
-  var label;
-  var key = strokeKey + textKey + text + fillKey + this.pixelRatio;
-
-  var labelCache = ol.render.canvas.labelCache;
-  if (!labelCache.containsKey(key)) {
-    var strokeState = strokeKey ? this.strokeStates[strokeKey] || this.textStrokeState_ : null;
-    var fillState = fillKey ? this.fillStates[fillKey] || this.textFillState_ : null;
-    var textState = this.textStates[textKey] || this.textState_;
-    var pixelRatio = this.pixelRatio;
-    var scale = textState.scale * pixelRatio;
-    var align =  ol.render.replay.TEXT_ALIGN[textState.textAlign || ol.render.canvas.defaultTextAlign];
-    var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;
-
-    var lines = text.split('\n');
-    var numLines = lines.length;
-    var widths = [];
-    var width = ol.render.canvas.TextReplay.measureTextWidths(textState.font, lines, widths);
-    var lineHeight = ol.render.canvas.measureTextHeight(textState.font);
-    var height = lineHeight * numLines;
-    var renderWidth = (width + strokeWidth);
-    var context = ol.dom.createCanvasContext2D(
-        Math.ceil(renderWidth * scale),
-        Math.ceil((height + strokeWidth) * scale));
-    label = context.canvas;
-    labelCache.set(key, label);
-    if (scale != 1) {
-      context.scale(scale, scale);
-    }
-    context.font = textState.font;
-    if (strokeKey) {
-      context.strokeStyle = strokeState.strokeStyle;
-      context.lineWidth = strokeWidth * (ol.has.SAFARI ? scale : 1);
-      context.lineCap = strokeState.lineCap;
-      context.lineJoin = strokeState.lineJoin;
-      context.miterLimit = strokeState.miterLimit;
-      if (ol.has.CANVAS_LINE_DASH && strokeState.lineDash.length) {
-        context.setLineDash(strokeState.lineDash);
-        context.lineDashOffset = strokeState.lineDashOffset;
-      }
-    }
-    if (fillKey) {
-      context.fillStyle = fillState.fillStyle;
-    }
-    context.textBaseline = 'middle';
-    context.textAlign = 'center';
-    var leftRight = (0.5 - align);
-    var x = align * label.width / scale + leftRight * strokeWidth;
-    var i;
-    if (strokeKey) {
-      for (i = 0; i < numLines; ++i) {
-        context.strokeText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);
-      }
-    }
-    if (fillKey) {
-      for (i = 0; i < numLines; ++i) {
-        context.fillText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);
-      }
-    }
-  }
-  return labelCache.get(key);
-};
-
-
-/**
- * @private
- * @param {HTMLCanvasElement} label Label.
- * @param {number} begin Begin.
- * @param {number} end End.
- */
-ol.render.canvas.TextReplay.prototype.drawTextImage_ = function(label, begin, end) {
-  var textState = this.textState_;
-  var strokeState = this.textStrokeState_;
-  var pixelRatio = this.pixelRatio;
-  var align = ol.render.replay.TEXT_ALIGN[textState.textAlign || ol.render.canvas.defaultTextAlign];
-  var baseline = ol.render.replay.TEXT_ALIGN[textState.textBaseline];
-  var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;
-
-  var anchorX = align * label.width / pixelRatio + 2 * (0.5 - align) * strokeWidth;
-  var anchorY = baseline * label.height / pixelRatio + 2 * (0.5 - baseline) * strokeWidth;
-  this.instructions.push([ol.render.canvas.Instruction.DRAW_IMAGE, begin, end,
-    label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,
-    this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,
-    1, true, label.width,
-    textState.padding == ol.render.canvas.defaultPadding ?
-      ol.render.canvas.defaultPadding : textState.padding.map(function(p) {
-        return p * pixelRatio;
-      }),
-    !!textState.backgroundFill, !!textState.backgroundStroke
-  ]);
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.DRAW_IMAGE, begin, end,
-    label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,
-    this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,
-    1 / pixelRatio, true, label.width, textState.padding,
-    !!textState.backgroundFill, !!textState.backgroundStroke
-  ]);
-};
-
-
-/**
- * @private
- * @param {number} begin Begin.
- * @param {number} end End.
- * @param {ol.DeclutterGroup} declutterGroup Declutter group.
- */
-ol.render.canvas.TextReplay.prototype.drawChars_ = function(begin, end, declutterGroup) {
-  var strokeState = this.textStrokeState_;
-  var textState = this.textState_;
-  var fillState = this.textFillState_;
-
-  var strokeKey = this.strokeKey_;
-  if (strokeState) {
-    if (!(strokeKey in this.strokeStates)) {
-      this.strokeStates[strokeKey] = /** @type {ol.CanvasStrokeState} */ ({
-        strokeStyle: strokeState.strokeStyle,
-        lineCap: strokeState.lineCap,
-        lineDashOffset: strokeState.lineDashOffset,
-        lineWidth: strokeState.lineWidth,
-        lineJoin: strokeState.lineJoin,
-        miterLimit: strokeState.miterLimit,
-        lineDash: strokeState.lineDash
-      });
-    }
-  }
-  var textKey = this.textKey_;
-  if (!(this.textKey_ in this.textStates)) {
-    this.textStates[this.textKey_] = /** @type {ol.CanvasTextState} */ ({
-      font: textState.font,
-      textAlign: textState.textAlign || ol.render.canvas.defaultTextAlign,
-      scale: textState.scale
-    });
-  }
-  var fillKey = this.fillKey_;
-  if (fillState) {
-    if (!(fillKey in this.fillStates)) {
-      this.fillStates[fillKey] = /** @type {ol.CanvasFillState} */ ({
-        fillStyle: fillState.fillStyle
-      });
-    }
-  }
-
-  var pixelRatio = this.pixelRatio;
-  var baseline = ol.render.replay.TEXT_ALIGN[textState.textBaseline];
-
-  var offsetY = this.textOffsetY_ * pixelRatio;
-  var text = this.text_;
-  var font = textState.font;
-  var textScale = textState.scale;
-  var strokeWidth = strokeState ? strokeState.lineWidth * textScale / 2 : 0;
-  var widths = this.widths_[font];
-  if (!widths) {
-    this.widths_[font] = widths = {};
-  }
-  this.instructions.push([ol.render.canvas.Instruction.DRAW_CHARS,
-    begin, end, baseline, declutterGroup,
-    textState.overflow, fillKey, textState.maxAngle,
-    function(text) {
-      var width = widths[text];
-      if (!width) {
-        width = widths[text] = ol.render.canvas.measureTextWidth(font, text);
-      }
-      return width * textScale * pixelRatio;
-    },
-    offsetY, strokeKey, strokeWidth * pixelRatio, text, textKey, 1
-  ]);
-  this.hitDetectionInstructions.push([ol.render.canvas.Instruction.DRAW_CHARS,
-    begin, end, baseline, declutterGroup,
-    textState.overflow, fillKey, textState.maxAngle,
-    function(text) {
-      var width = widths[text];
-      if (!width) {
-        width = widths[text] = ol.render.canvas.measureTextWidth(font, text);
-      }
-      return width * textScale;
-    },
-    offsetY, strokeKey, strokeWidth, text, textKey, 1 / pixelRatio
-  ]);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.TextReplay.prototype.setTextStyle = function(textStyle, declutterGroup) {
-  var textState, fillState, strokeState;
-  if (!textStyle) {
-    this.text_ = '';
-  } else {
-    this.declutterGroup_ = /** @type {ol.DeclutterGroup} */ (declutterGroup);
-
-    var textFillStyle = textStyle.getFill();
-    if (!textFillStyle) {
-      fillState = this.textFillState_ = null;
-    } else {
-      fillState = this.textFillState_;
-      if (!fillState) {
-        fillState = this.textFillState_ = /** @type {ol.CanvasFillState} */ ({});
-      }
-      fillState.fillStyle = ol.colorlike.asColorLike(
-          textFillStyle.getColor() || ol.render.canvas.defaultFillStyle);
-    }
-
-    var textStrokeStyle = textStyle.getStroke();
-    if (!textStrokeStyle) {
-      strokeState = this.textStrokeState_ = null;
-    } else {
-      strokeState = this.textStrokeState_;
-      if (!strokeState) {
-        strokeState = this.textStrokeState_ = /** @type {ol.CanvasStrokeState} */ ({});
-      }
-      var lineDash = textStrokeStyle.getLineDash();
-      var lineDashOffset = textStrokeStyle.getLineDashOffset();
-      var lineWidth = textStrokeStyle.getWidth();
-      var miterLimit = textStrokeStyle.getMiterLimit();
-      strokeState.lineCap = textStrokeStyle.getLineCap() || ol.render.canvas.defaultLineCap;
-      strokeState.lineDash = lineDash ? lineDash.slice() : ol.render.canvas.defaultLineDash;
-      strokeState.lineDashOffset =
-          lineDashOffset === undefined ? ol.render.canvas.defaultLineDashOffset : lineDashOffset;
-      strokeState.lineJoin = textStrokeStyle.getLineJoin() || ol.render.canvas.defaultLineJoin;
-      strokeState.lineWidth =
-          lineWidth === undefined ? ol.render.canvas.defaultLineWidth : lineWidth;
-      strokeState.miterLimit =
-          miterLimit === undefined ? ol.render.canvas.defaultMiterLimit : miterLimit;
-      strokeState.strokeStyle = ol.colorlike.asColorLike(
-          textStrokeStyle.getColor() || ol.render.canvas.defaultStrokeStyle);
-    }
-
-    textState = this.textState_;
-    var font = textStyle.getFont() || ol.render.canvas.defaultFont;
-    ol.render.canvas.checkFont(font);
-    var textScale = textStyle.getScale();
-    textState.overflow = textStyle.getOverflow();
-    textState.font = font;
-    textState.maxAngle = textStyle.getMaxAngle();
-    textState.placement = textStyle.getPlacement();
-    textState.textAlign = textStyle.getTextAlign();
-    textState.textBaseline = textStyle.getTextBaseline() || ol.render.canvas.defaultTextBaseline;
-    textState.backgroundFill = textStyle.getBackgroundFill();
-    textState.backgroundStroke = textStyle.getBackgroundStroke();
-    textState.padding = textStyle.getPadding() || ol.render.canvas.defaultPadding;
-    textState.scale = textScale === undefined ? 1 : textScale;
-
-    var textOffsetX = textStyle.getOffsetX();
-    var textOffsetY = textStyle.getOffsetY();
-    var textRotateWithView = textStyle.getRotateWithView();
-    var textRotation = textStyle.getRotation();
-    this.text_ = textStyle.getText() || '';
-    this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;
-    this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;
-    this.textRotateWithView_ = textRotateWithView === undefined ? false : textRotateWithView;
-    this.textRotation_ = textRotation === undefined ? 0 : textRotation;
-
-    this.strokeKey_ = strokeState ?
-      (typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : ol.getUid(strokeState.strokeStyle)) +
-      strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +
-      strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :
-      '';
-    this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');
-    this.fillKey_ = fillState ?
-      (typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + ol.getUid(fillState.fillStyle))) :
-      '';
-  }
-};
-
-goog.provide('ol.render.canvas.ReplayGroup');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.obj');
-goog.require('ol.render.ReplayGroup');
-goog.require('ol.render.ReplayType');
-goog.require('ol.render.canvas.Replay');
-goog.require('ol.render.canvas.ImageReplay');
-goog.require('ol.render.canvas.LineStringReplay');
-goog.require('ol.render.canvas.PolygonReplay');
-goog.require('ol.render.canvas.TextReplay');
-goog.require('ol.render.replay');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.render.ReplayGroup}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {boolean} overlaps The replay group can have overlapping geometries.
- * @param {?} declutterTree Declutter tree
- * for declutter processing in postrender.
- * @param {number=} opt_renderBuffer Optional rendering buffer.
- * @struct
- */
-ol.render.canvas.ReplayGroup = function(
-    tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree, opt_renderBuffer) {
-  ol.render.ReplayGroup.call(this);
-
-  /**
-   * Declutter tree.
-   * @private
-   */
-  this.declutterTree_ = declutterTree;
-
-  /**
-   * @type {ol.DeclutterGroup}
-   * @private
-   */
-  this.declutterGroup_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tolerance_ = tolerance;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.maxExtent_ = maxExtent;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = overlaps;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.resolution_ = resolution;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.renderBuffer_ = opt_renderBuffer;
-
-  /**
-   * @private
-   * @type {!Object.<string,
-   *        Object.<ol.render.ReplayType, ol.render.canvas.Replay>>}
-   */
-  this.replaysByZIndex_ = {};
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.hitDetectionContext_ = ol.dom.createCanvasContext2D(1, 1);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.hitDetectionTransform_ = ol.transform.create();
-};
-ol.inherits(ol.render.canvas.ReplayGroup, ol.render.ReplayGroup);
-
-
-/**
- * This cache is used for storing calculated pixel circles for increasing performance.
- * It is a static property to allow each Replaygroup to access it.
- * @type {Object.<number, Array.<Array.<(boolean|undefined)>>>}
- * @private
- */
-ol.render.canvas.ReplayGroup.circleArrayCache_ = {
-  0: [[true]]
-};
-
-
-/**
- * This method fills a row in the array from the given coordinate to the
- * middle with `true`.
- * @param {Array.<Array.<(boolean|undefined)>>} array The array that will be altered.
- * @param {number} x X coordinate.
- * @param {number} y Y coordinate.
- * @private
- */
-ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_ = function(array, x, y) {
-  var i;
-  var radius = Math.floor(array.length / 2);
-  if (x >= radius) {
-    for (i = radius; i < x; i++) {
-      array[i][y] = true;
-    }
-  } else if (x < radius) {
-    for (i = x + 1; i < radius; i++) {
-      array[i][y] = true;
-    }
-  }
-};
-
-
-/**
- * This methods creates a circle inside a fitting array. Points inside the
- * circle are marked by true, points on the outside are undefined.
- * It uses the midpoint circle algorithm.
- * A cache is used to increase performance.
- * @param {number} radius Radius.
- * @returns {Array.<Array.<(boolean|undefined)>>} An array with marked circle points.
- * @private
- */
-ol.render.canvas.ReplayGroup.getCircleArray_ = function(radius) {
-  if (ol.render.canvas.ReplayGroup.circleArrayCache_[radius] !== undefined) {
-    return ol.render.canvas.ReplayGroup.circleArrayCache_[radius];
-  }
-
-  var arraySize = radius * 2 + 1;
-  var arr = new Array(arraySize);
-  for (var i = 0; i < arraySize; i++) {
-    arr[i] = new Array(arraySize);
-  }
-
-  var x = radius;
-  var y = 0;
-  var error = 0;
-
-  while (x >= y) {
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + x, radius + y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + y, radius + x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - y, radius + x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - x, radius + y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - x, radius - y);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius - y, radius - x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + y, radius - x);
-    ol.render.canvas.ReplayGroup.fillCircleArrayRowToMiddle_(arr, radius + x, radius - y);
-
-    y++;
-    error += 1 + 2 * y;
-    if (2 * (error - x) + 1 > 0) {
-      x -= 1;
-      error += 1 - 2 * x;
-    }
-  }
-
-  ol.render.canvas.ReplayGroup.circleArrayCache_[radius] = arr;
-  return arr;
-};
-
-
-/**
- * @param {!Object.<string, Array.<*>>} declutterReplays Declutter replays.
- * @param {CanvasRenderingContext2D} context Context.
- * @param {number} rotation Rotation.
- */
-ol.render.canvas.ReplayGroup.replayDeclutter = function(declutterReplays, context, rotation) {
-  var zs = Object.keys(declutterReplays).map(Number).sort(ol.array.numberSafeCompareFunction);
-  var skippedFeatureUids = {};
-  for (var z = 0, zz = zs.length; z < zz; ++z) {
-    var replayData = declutterReplays[zs[z].toString()];
-    for (var i = 0, ii = replayData.length; i < ii;) {
-      var replay = replayData[i++];
-      var transform = replayData[i++];
-      replay.replay(context, transform, rotation, skippedFeatureUids);
-    }
-  }
-};
-
-
-/**
- * @param {boolean} group Group with previous replay.
- * @return {ol.DeclutterGroup} Declutter instruction group.
- */
-ol.render.canvas.ReplayGroup.prototype.addDeclutter = function(group) {
-  var declutter = null;
-  if (this.declutterTree_) {
-    if (group) {
-      declutter = this.declutterGroup_;
-      /** @type {number} */ (declutter[4])++;
-    } else {
-      declutter = this.declutterGroup_ = ol.extent.createEmpty();
-      declutter.push(1);
-    }
-  }
-  return declutter;
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- */
-ol.render.canvas.ReplayGroup.prototype.clip = function(context, transform) {
-  var flatClipCoords = this.getClipCoords(transform);
-  context.beginPath();
-  context.moveTo(flatClipCoords[0], flatClipCoords[1]);
-  context.lineTo(flatClipCoords[2], flatClipCoords[3]);
-  context.lineTo(flatClipCoords[4], flatClipCoords[5]);
-  context.lineTo(flatClipCoords[6], flatClipCoords[7]);
-  context.clip();
-};
-
-
-/**
- * @param {Array.<ol.render.ReplayType>} replays Replays.
- * @return {boolean} Has replays of the provided types.
- */
-ol.render.canvas.ReplayGroup.prototype.hasReplays = function(replays) {
-  for (var zIndex in this.replaysByZIndex_) {
-    var candidates = this.replaysByZIndex_[zIndex];
-    for (var i = 0, ii = replays.length; i < ii; ++i) {
-      if (replays[i] in candidates) {
-        return true;
-      }
-    }
-  }
-  return false;
-};
-
-
-/**
- * FIXME empty description for jsdoc
- */
-ol.render.canvas.ReplayGroup.prototype.finish = function() {
-  var zKey;
-  for (zKey in this.replaysByZIndex_) {
-    var replays = this.replaysByZIndex_[zKey];
-    var replayKey;
-    for (replayKey in replays) {
-      replays[replayKey].finish();
-    }
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
- *     callback.
- * @param {Object.<string, ol.DeclutterGroup>} declutterReplays Declutter
- *     replays.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.canvas.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
-    coordinate, resolution, rotation, hitTolerance, skippedFeaturesHash, callback, declutterReplays) {
-
-  hitTolerance = Math.round(hitTolerance);
-  var contextSize = hitTolerance * 2 + 1;
-  var transform = ol.transform.compose(this.hitDetectionTransform_,
-      hitTolerance + 0.5, hitTolerance + 0.5,
-      1 / resolution, -1 / resolution,
-      -rotation,
-      -coordinate[0], -coordinate[1]);
-  var context = this.hitDetectionContext_;
-
-  if (context.canvas.width !== contextSize || context.canvas.height !== contextSize) {
-    context.canvas.width = contextSize;
-    context.canvas.height = contextSize;
-  } else {
-    context.clearRect(0, 0, contextSize, contextSize);
-  }
-
-  /**
-   * @type {ol.Extent}
-   */
-  var hitExtent;
-  if (this.renderBuffer_ !== undefined) {
-    hitExtent = ol.extent.createEmpty();
-    ol.extent.extendCoordinate(hitExtent, coordinate);
-    ol.extent.buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);
-  }
-
-  var mask = ol.render.canvas.ReplayGroup.getCircleArray_(hitTolerance);
-  var declutteredFeatures;
-  if (this.declutterTree_) {
-    declutteredFeatures = this.declutterTree_.all().map(function(entry) {
-      return entry.value;
-    });
-  }
-
-  var replayType;
-
-  /**
-   * @param {ol.Feature|ol.render.Feature} feature Feature.
-   * @return {?} Callback result.
-   */
-  function featureCallback(feature) {
-    var imageData = context.getImageData(0, 0, contextSize, contextSize).data;
-    for (var i = 0; i < contextSize; i++) {
-      for (var j = 0; j < contextSize; j++) {
-        if (mask[i][j]) {
-          if (imageData[(j * contextSize + i) * 4 + 3] > 0) {
-            var result;
-            if (!(declutteredFeatures && (replayType == ol.render.ReplayType.IMAGE || replayType == ol.render.ReplayType.TEXT)) ||
-                declutteredFeatures.indexOf(feature) !== -1) {
-              result = callback(feature);
-            }
-            if (result) {
-              return result;
-            } else {
-              context.clearRect(0, 0, contextSize, contextSize);
-              return undefined;
-            }
-          }
-        }
-      }
-    }
-  }
-
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(ol.array.numberSafeCompareFunction);
-
-  var i, j, replays, replay, result;
-  for (i = zs.length - 1; i >= 0; --i) {
-    var zIndexKey = zs[i].toString();
-    replays = this.replaysByZIndex_[zIndexKey];
-    for (j = ol.render.replay.ORDER.length - 1; j >= 0; --j) {
-      replayType = ol.render.replay.ORDER[j];
-      replay = replays[replayType];
-      if (replay !== undefined) {
-        if (declutterReplays &&
-            (replayType == ol.render.ReplayType.IMAGE || replayType == ol.render.ReplayType.TEXT)) {
-          var declutter = declutterReplays[zIndexKey];
-          if (!declutter) {
-            declutterReplays[zIndexKey] = [replay, transform.slice(0)];
-          } else {
-            declutter.push(replay, transform.slice(0));
-          }
-        } else {
-          result = replay.replayHitDetection(context, transform, rotation,
-              skippedFeaturesHash, featureCallback, hitExtent);
-          if (result) {
-            return result;
-          }
-        }
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {ol.Transform} transform Transform.
- * @return {Array.<number>} Clip coordinates.
- */
-ol.render.canvas.ReplayGroup.prototype.getClipCoords = function(transform) {
-  var maxExtent = this.maxExtent_;
-  var minX = maxExtent[0];
-  var minY = maxExtent[1];
-  var maxX = maxExtent[2];
-  var maxY = maxExtent[3];
-  var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];
-  ol.geom.flat.transform.transform2D(
-      flatClipCoords, 0, 8, 2, transform, flatClipCoords);
-  return flatClipCoords;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
-  var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
-  var replays = this.replaysByZIndex_[zIndexKey];
-  if (replays === undefined) {
-    replays = {};
-    this.replaysByZIndex_[zIndexKey] = replays;
-  }
-  var replay = replays[replayType];
-  if (replay === undefined) {
-    var Constructor = ol.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_[replayType];
-    replay = new Constructor(this.tolerance_, this.maxExtent_,
-        this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);
-    replays[replayType] = replay;
-  }
-  return replay;
-};
-
-
-/**
- * @return {Object.<string, Object.<ol.render.ReplayType, ol.render.canvas.Replay>>} Replays.
- */
-ol.render.canvas.ReplayGroup.prototype.getReplays = function() {
-  return this.replaysByZIndex_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.canvas.ReplayGroup.prototype.isEmpty = function() {
-  return ol.obj.isEmpty(this.replaysByZIndex_);
-};
-
-
-/**
- * @param {CanvasRenderingContext2D} context Context.
- * @param {ol.Transform} transform Transform.
- * @param {number} viewRotation View rotation.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *     to skip.
- * @param {Array.<ol.render.ReplayType>=} opt_replayTypes Ordered replay types
- *     to replay. Default is {@link ol.render.replay.ORDER}
- * @param {Object.<string, ol.DeclutterGroup>=} opt_declutterReplays Declutter
- *     replays.
- */
-ol.render.canvas.ReplayGroup.prototype.replay = function(context,
-    transform, viewRotation, skippedFeaturesHash, opt_replayTypes, opt_declutterReplays) {
-
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(ol.array.numberSafeCompareFunction);
-
-  // setup clipping so that the parts of over-simplified geometries are not
-  // visible outside the current extent when panning
-  context.save();
-  this.clip(context, transform);
-
-  var replayTypes = opt_replayTypes ? opt_replayTypes : ol.render.replay.ORDER;
-  var i, ii, j, jj, replays, replay;
-  for (i = 0, ii = zs.length; i < ii; ++i) {
-    var zIndexKey = zs[i].toString();
-    replays = this.replaysByZIndex_[zIndexKey];
-    for (j = 0, jj = replayTypes.length; j < jj; ++j) {
-      var replayType = replayTypes[j];
-      replay = replays[replayType];
-      if (replay !== undefined) {
-        if (opt_declutterReplays &&
-            (replayType == ol.render.ReplayType.IMAGE || replayType == ol.render.ReplayType.TEXT)) {
-          var declutter = opt_declutterReplays[zIndexKey];
-          if (!declutter) {
-            opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];
-          } else {
-            declutter.push(replay, transform.slice(0));
-          }
-        } else {
-          replay.replay(context, transform, viewRotation, skippedFeaturesHash);
-        }
-      }
-    }
-  }
-
-  context.restore();
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.render.ReplayType,
- *                function(new: ol.render.canvas.Replay, number, ol.Extent,
- *                number, number, boolean, Array.<ol.DeclutterGroup>)>}
- */
-ol.render.canvas.ReplayGroup.BATCH_CONSTRUCTORS_ = {
-  'Circle': ol.render.canvas.PolygonReplay,
-  'Default': ol.render.canvas.Replay,
-  'Image': ol.render.canvas.ImageReplay,
-  'LineString': ol.render.canvas.LineStringReplay,
-  'Polygon': ol.render.canvas.PolygonReplay,
-  'Text': ol.render.canvas.TextReplay
-};
-
-goog.provide('ol.renderer.vector');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.render.ReplayType');
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature1 Feature 1.
- * @param {ol.Feature|ol.render.Feature} feature2 Feature 2.
- * @return {number} Order.
- */
-ol.renderer.vector.defaultOrder = function(feature1, feature2) {
-  return ol.getUid(feature1) - ol.getUid(feature2);
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @return {number} Squared pixel tolerance.
- */
-ol.renderer.vector.getSquaredTolerance = function(resolution, pixelRatio) {
-  var tolerance = ol.renderer.vector.getTolerance(resolution, pixelRatio);
-  return tolerance * tolerance;
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @return {number} Pixel tolerance.
- */
-ol.renderer.vector.getTolerance = function(resolution, pixelRatio) {
-  return ol.SIMPLIFY_TOLERANCE * resolution / pixelRatio;
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Circle} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderCircleGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (fillStyle || strokeStyle) {
-    var circleReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.CIRCLE);
-    circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    circleReplay.drawCircle(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @return {boolean} `true` if style is loading.
- * @template T
- */
-ol.renderer.vector.renderFeature = function(
-    replayGroup, feature, style, squaredTolerance, listener, thisArg) {
-  var loading = false;
-  var imageStyle, imageState;
-  imageStyle = style.getImage();
-  if (imageStyle) {
-    imageState = imageStyle.getImageState();
-    if (imageState == ol.ImageState.LOADED ||
-        imageState == ol.ImageState.ERROR) {
-      imageStyle.unlistenImageChange(listener, thisArg);
-    } else {
-      if (imageState == ol.ImageState.IDLE) {
-        imageStyle.load();
-      }
-      imageState = imageStyle.getImageState();
-      imageStyle.listenImageChange(listener, thisArg);
-      loading = true;
-    }
-  }
-  ol.renderer.vector.renderFeature_(replayGroup, feature, style,
-      squaredTolerance);
-
-  return loading;
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.style.Style} style Style.
- * @param {number} squaredTolerance Squared tolerance.
- * @private
- */
-ol.renderer.vector.renderFeature_ = function(
-    replayGroup, feature, style, squaredTolerance) {
-  var geometry = style.getGeometryFunction()(feature);
-  if (!geometry) {
-    return;
-  }
-  var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
-  var renderer = style.getRenderer();
-  if (renderer) {
-    ol.renderer.vector.renderGeometry_(replayGroup, simplifiedGeometry, style, feature);
-  } else {
-    var geometryRenderer =
-        ol.renderer.vector.GEOMETRY_RENDERERS_[simplifiedGeometry.getType()];
-    geometryRenderer(replayGroup, simplifiedGeometry, style, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderGeometry_ = function(replayGroup, geometry, style, feature) {
-  if (geometry.getType() == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-    var geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries();
-    for (var i = 0, ii = geometries.length; i < ii; ++i) {
-      ol.renderer.vector.renderGeometry_(replayGroup, geometries[i], style, feature);
-    }
-    return;
-  }
-  var replay = replayGroup.getReplay(style.getZIndex(), ol.render.ReplayType.DEFAULT);
-  replay.drawCustom(/** @type {ol.geom.SimpleGeometry} */ (geometry), feature, style.getRenderer());
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderGeometryCollectionGeometry_ = function(replayGroup, geometry, style, feature) {
-  var geometries = geometry.getGeometriesArray();
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    var geometryRenderer =
-        ol.renderer.vector.GEOMETRY_RENDERERS_[geometries[i].getType()];
-    geometryRenderer(replayGroup, geometries[i], style, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.LineString|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
-  var strokeStyle = style.getStroke();
-  if (strokeStyle) {
-    var lineStringReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.LINE_STRING);
-    lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-    lineStringReplay.drawLineString(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiLineString|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiLineStringGeometry_ = function(replayGroup, geometry, style, feature) {
-  var strokeStyle = style.getStroke();
-  if (strokeStyle) {
-    var lineStringReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.LINE_STRING);
-    lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-    lineStringReplay.drawMultiLineString(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (strokeStyle || fillStyle) {
-    var polygonReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.POLYGON);
-    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    polygonReplay.drawMultiPolygon(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Point|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderPointGeometry_ = function(replayGroup, geometry, style, feature) {
-  var imageStyle = style.getImage();
-  if (imageStyle) {
-    if (imageStyle.getImageState() != ol.ImageState.LOADED) {
-      return;
-    }
-    var imageReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.IMAGE);
-    imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));
-    imageReplay.drawPoint(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.MultiPoint|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderMultiPointGeometry_ = function(replayGroup, geometry, style, feature) {
-  var imageStyle = style.getImage();
-  if (imageStyle) {
-    if (imageStyle.getImageState() != ol.ImageState.LOADED) {
-      return;
-    }
-    var imageReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.IMAGE);
-    imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));
-    imageReplay.drawMultiPoint(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Polygon|ol.render.Feature} geometry Geometry.
- * @param {ol.style.Style} style Style.
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.renderer.vector.renderPolygonGeometry_ = function(replayGroup, geometry, style, feature) {
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  if (fillStyle || strokeStyle) {
-    var polygonReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.POLYGON);
-    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);
-    polygonReplay.drawPolygon(geometry, feature);
-  }
-  var textStyle = style.getText();
-  if (textStyle) {
-    var textReplay = replayGroup.getReplay(
-        style.getZIndex(), ol.render.ReplayType.TEXT);
-    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));
-    textReplay.drawText(geometry, feature);
-  }
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.geom.GeometryType,
- *                function(ol.render.ReplayGroup, ol.geom.Geometry,
- *                         ol.style.Style, Object)>}
- */
-ol.renderer.vector.GEOMETRY_RENDERERS_ = {
-  'Point': ol.renderer.vector.renderPointGeometry_,
-  'LineString': ol.renderer.vector.renderLineStringGeometry_,
-  'Polygon': ol.renderer.vector.renderPolygonGeometry_,
-  'MultiPoint': ol.renderer.vector.renderMultiPointGeometry_,
-  'MultiLineString': ol.renderer.vector.renderMultiLineStringGeometry_,
-  'MultiPolygon': ol.renderer.vector.renderMultiPolygonGeometry_,
-  'GeometryCollection': ol.renderer.vector.renderGeometryCollectionGeometry_,
-  'Circle': ol.renderer.vector.renderCircleGeometry_
-};
-
-goog.provide('ol.renderer.canvas.VectorLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.ViewHint');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.ext.rbush');
-goog.require('ol.extent');
-goog.require('ol.render.EventType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.Layer');
-goog.require('ol.renderer.vector');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.Layer}
- * @param {ol.layer.Vector} vectorLayer Vector layer.
- * @api
- */
-ol.renderer.canvas.VectorLayer = function(vectorLayer) {
-
-  ol.renderer.canvas.Layer.call(this, vectorLayer);
-
-  /**
-   * Declutter tree.
-   * @private
-   */
-  this.declutterTree_ = vectorLayer.getDeclutter() ?
-    ol.ext.rbush(9) : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.dirty_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedResolution_ = NaN;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedExtent_ = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {function(ol.Feature, ol.Feature): number|null}
-   */
-  this.renderedRenderOrder_ = null;
-
-  /**
-   * @private
-   * @type {ol.render.canvas.ReplayGroup}
-   */
-  this.replayGroup_ = null;
-
-  /**
-   * A new replay group had to be created by `prepareFrame()`
-   * @type {boolean}
-   */
-  this.replayGroupChanged = true;
-
-  /**
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context = ol.dom.createCanvasContext2D();
-
-  ol.events.listen(ol.render.canvas.labelCache, ol.events.EventType.CLEAR, this.handleFontsChanged_, this);
-
-};
-ol.inherits(ol.renderer.canvas.VectorLayer, ol.renderer.canvas.Layer);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.canvas.VectorLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.CANVAS && layer.getType() === ol.LayerType.VECTOR;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.canvas.VectorLayer} The layer renderer.
- */
-ol.renderer.canvas.VectorLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.canvas.VectorLayer(/** @type {ol.layer.Vector} */ (layer));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.disposeInternal = function() {
-  ol.events.unlisten(ol.render.canvas.labelCache, ol.events.EventType.CLEAR, this.handleFontsChanged_, this);
-  ol.renderer.canvas.Layer.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
-
-  var extent = frameState.extent;
-  var pixelRatio = frameState.pixelRatio;
-  var skippedFeatureUids = layerState.managed ?
-    frameState.skippedFeatureUids : {};
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var rotation = viewState.rotation;
-  var projectionExtent = projection.getExtent();
-  var vectorSource = /** @type {ol.source.Vector} */ (this.getLayer().getSource());
-
-  var transform = this.getTransform(frameState, 0);
-
-  this.preCompose(context, frameState, transform);
-
-  // clipped rendering if layer extent is set
-  var clipExtent = layerState.extent;
-  var clipped = clipExtent !== undefined;
-  if (clipped) {
-    this.clip(context, frameState,  /** @type {ol.Extent} */ (clipExtent));
-  }
-  var replayGroup = this.replayGroup_;
-  if (replayGroup && !replayGroup.isEmpty()) {
-    if (this.declutterTree_) {
-      this.declutterTree_.clear();
-    }
-    var layer = /** @type {ol.layer.Vector} */ (this.getLayer());
-    var drawOffsetX = 0;
-    var drawOffsetY = 0;
-    var replayContext;
-    var transparentLayer = layerState.opacity !== 1;
-    var hasRenderListeners = layer.hasListener(ol.render.EventType.RENDER);
-    if (transparentLayer || hasRenderListeners) {
-      var drawWidth = context.canvas.width;
-      var drawHeight = context.canvas.height;
-      if (rotation) {
-        var drawSize = Math.round(Math.sqrt(drawWidth * drawWidth + drawHeight * drawHeight));
-        drawOffsetX = (drawSize - drawWidth) / 2;
-        drawOffsetY = (drawSize - drawHeight) / 2;
-        drawWidth = drawHeight = drawSize;
-      }
-      // resize and clear
-      this.context.canvas.width = drawWidth;
-      this.context.canvas.height = drawHeight;
-      replayContext = this.context;
-    } else {
-      replayContext = context;
-    }
-
-    var alpha = replayContext.globalAlpha;
-    if (!transparentLayer) {
-      // for performance reasons, context.save / context.restore is not used
-      // to save and restore the transformation matrix and the opacity.
-      // see http://jsperf.com/context-save-restore-versus-variable
-      replayContext.globalAlpha = layerState.opacity;
-    }
-
-    if (replayContext != context) {
-      replayContext.translate(drawOffsetX, drawOffsetY);
-    }
-
-    var width = frameState.size[0] * pixelRatio;
-    var height = frameState.size[1] * pixelRatio;
-    ol.render.canvas.rotateAtOffset(replayContext, -rotation,
-        width / 2, height / 2);
-    replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids);
-    if (vectorSource.getWrapX() && projection.canWrapX() &&
-        !ol.extent.containsExtent(projectionExtent, extent)) {
-      var startX = extent[0];
-      var worldWidth = ol.extent.getWidth(projectionExtent);
-      var world = 0;
-      var offsetX;
-      while (startX < projectionExtent[0]) {
-        --world;
-        offsetX = worldWidth * world;
-        transform = this.getTransform(frameState, offsetX);
-        replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids);
-        startX += worldWidth;
-      }
-      world = 0;
-      startX = extent[2];
-      while (startX > projectionExtent[2]) {
-        ++world;
-        offsetX = worldWidth * world;
-        transform = this.getTransform(frameState, offsetX);
-        replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids);
-        startX -= worldWidth;
-      }
-      // restore original transform for render and compose events
-      transform = this.getTransform(frameState, 0);
-    }
-    ol.render.canvas.rotateAtOffset(replayContext, rotation,
-        width / 2, height / 2);
-
-    if (replayContext != context) {
-      if (hasRenderListeners) {
-        this.dispatchRenderEvent(replayContext, frameState, transform);
-      }
-      if (transparentLayer) {
-        var mainContextAlpha = context.globalAlpha;
-        context.globalAlpha = layerState.opacity;
-        context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);
-        context.globalAlpha = mainContextAlpha;
-      } else {
-        context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);
-      }
-      replayContext.translate(-drawOffsetX, -drawOffsetY);
-    }
-
-    if (!transparentLayer) {
-      replayContext.globalAlpha = alpha;
-    }
-  }
-
-  if (clipped) {
-    context.restore();
-  }
-  this.postCompose(context, frameState, layerState, transform);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  if (!this.replayGroup_) {
-    return undefined;
-  } else {
-    var resolution = frameState.viewState.resolution;
-    var rotation = frameState.viewState.rotation;
-    var layer = /** @type {ol.layer.Vector} */ (this.getLayer());
-    /** @type {Object.<string, boolean>} */
-    var features = {};
-    var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution,
-        rotation, hitTolerance, {},
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var key = ol.getUid(feature).toString();
-          if (!(key in features)) {
-            features[key] = true;
-            return callback.call(thisArg, feature, layer);
-          }
-        }, null);
-    return result;
-  }
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- */
-ol.renderer.canvas.VectorLayer.prototype.handleFontsChanged_ = function(event) {
-  var layer = this.getLayer();
-  if (layer.getVisible() && this.replayGroup_) {
-    layer.changed();
-  }
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.renderer.canvas.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
-  this.renderIfReadyAndVisible();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorLayer.prototype.prepareFrame = function(frameState, layerState) {
-
-  var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
-  var vectorSource = vectorLayer.getSource();
-
-  this.updateLogos(frameState, vectorSource);
-
-  var animating = frameState.viewHints[ol.ViewHint.ANIMATING];
-  var interacting = frameState.viewHints[ol.ViewHint.INTERACTING];
-  var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
-  var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();
-
-  if (!this.dirty_ && (!updateWhileAnimating && animating) ||
-      (!updateWhileInteracting && interacting)) {
-    return true;
-  }
-
-  var frameStateExtent = frameState.extent;
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var resolution = viewState.resolution;
-  var pixelRatio = frameState.pixelRatio;
-  var vectorLayerRevision = vectorLayer.getRevision();
-  var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();
-  var vectorLayerRenderOrder = vectorLayer.getRenderOrder();
-
-  if (vectorLayerRenderOrder === undefined) {
-    vectorLayerRenderOrder = ol.renderer.vector.defaultOrder;
-  }
-
-  var extent = ol.extent.buffer(frameStateExtent,
-      vectorLayerRenderBuffer * resolution);
-  var projectionExtent = viewState.projection.getExtent();
-
-  if (vectorSource.getWrapX() && viewState.projection.canWrapX() &&
-      !ol.extent.containsExtent(projectionExtent, frameState.extent)) {
-    // For the replay group, we need an extent that intersects the real world
-    // (-180° to +180°). To support geometries in a coordinate range from -540°
-    // to +540°, we add at least 1 world width on each side of the projection
-    // extent. If the viewport is wider than the world, we need to add half of
-    // the viewport width to make sure we cover the whole viewport.
-    var worldWidth = ol.extent.getWidth(projectionExtent);
-    var buffer = Math.max(ol.extent.getWidth(extent) / 2, worldWidth);
-    extent[0] = projectionExtent[0] - buffer;
-    extent[2] = projectionExtent[2] + buffer;
-  }
-
-  if (!this.dirty_ &&
-      this.renderedResolution_ == resolution &&
-      this.renderedRevision_ == vectorLayerRevision &&
-      this.renderedRenderOrder_ == vectorLayerRenderOrder &&
-      ol.extent.containsExtent(this.renderedExtent_, extent)) {
-    this.replayGroupChanged = false;
-    return true;
-  }
-
-  this.replayGroup_ = null;
-
-  this.dirty_ = false;
-
-  var replayGroup = new ol.render.canvas.ReplayGroup(
-      ol.renderer.vector.getTolerance(resolution, pixelRatio), extent, resolution,
-      pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());
-  vectorSource.loadFeatures(extent, resolution, projection);
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @this {ol.renderer.canvas.VectorLayer}
-   */
-  var renderFeature = function(feature) {
-    var styles;
-    var styleFunction = feature.getStyleFunction();
-    if (styleFunction) {
-      styles = styleFunction.call(feature, resolution);
-    } else {
-      styleFunction = vectorLayer.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction(feature, resolution);
-      }
-    }
-    if (styles) {
-      var dirty = this.renderFeature(
-          feature, resolution, pixelRatio, styles, replayGroup);
-      this.dirty_ = this.dirty_ || dirty;
-    }
-  }.bind(this);
-  if (vectorLayerRenderOrder) {
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    vectorSource.forEachFeatureInExtent(extent,
-        /**
-         * @param {ol.Feature} feature Feature.
-         */
-        function(feature) {
-          features.push(feature);
-        }, this);
-    features.sort(vectorLayerRenderOrder);
-    for (var i = 0, ii = features.length; i < ii; ++i) {
-      renderFeature(features[i]);
-    }
-  } else {
-    vectorSource.forEachFeatureInExtent(extent, renderFeature, this);
-  }
-  replayGroup.finish();
-
-  this.renderedResolution_ = resolution;
-  this.renderedRevision_ = vectorLayerRevision;
-  this.renderedRenderOrder_ = vectorLayerRenderOrder;
-  this.renderedExtent_ = extent;
-  this.replayGroup_ = replayGroup;
-
-  this.replayGroupChanged = true;
-  return true;
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
- *     styles.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- */
-ol.renderer.canvas.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
-  if (!styles) {
-    return false;
-  }
-  var loading = false;
-  if (Array.isArray(styles)) {
-    for (var i = 0, ii = styles.length; i < ii; ++i) {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles[i],
-          ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-          this.handleStyleImageChange_, this) || loading;
-    }
-  } else {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles,
-        ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-        this.handleStyleImageChange_, this);
-  }
-  return loading;
-};
-
-goog.provide('ol.layer.VectorTileRenderType');
-
-/**
- * @enum {string}
- * Render mode for vector tiles:
- *  * `'image'`: Vector tiles are rendered as images. Great performance, but
- *    point symbols and texts are always rotated with the view and pixels are
- *    scaled during zoom animations.
- *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels
- *    are scaled during zoom animations. Point symbols and texts are accurately
- *    rendered as vectors and can stay upright on rotated views.
- *  * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering
- *    even during animations, but slower performance than the other options.
- * @api
- */
-ol.layer.VectorTileRenderType = {
-  IMAGE: 'image',
-  HYBRID: 'hybrid',
-  VECTOR: 'vector'
-};
-
-goog.provide('ol.renderer.canvas.VectorTileLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.ext.rbush');
-goog.require('ol.extent');
-goog.require('ol.layer.VectorTileRenderType');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-goog.require('ol.render.ReplayType');
-goog.require('ol.render.canvas');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.render.replay');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.vector');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.canvas.TileLayer}
- * @param {ol.layer.VectorTile} layer VectorTile layer.
- * @api
- */
-ol.renderer.canvas.VectorTileLayer = function(layer) {
-
-  /**
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context = null;
-
-  ol.renderer.canvas.TileLayer.call(this, layer);
-
-  /**
-   * Declutter tree.
-   * @private
-     */
-  this.declutterTree_ = layer.getDeclutter() ? ol.ext.rbush(9) : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.dirty_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedLayerRevision_;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpTransform_ = ol.transform.create();
-
-  // Use lower resolution for pure vector rendering. Closest resolution otherwise.
-  this.zDirection =
-      layer.getRenderMode() == ol.layer.VectorTileRenderType.VECTOR ? 1 : 0;
-
-  ol.events.listen(ol.render.canvas.labelCache, ol.events.EventType.CLEAR, this.handleFontsChanged_, this);
-
-};
-ol.inherits(ol.renderer.canvas.VectorTileLayer, ol.renderer.canvas.TileLayer);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.canvas.VectorTileLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.CANVAS && layer.getType() === ol.LayerType.VECTOR_TILE;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.canvas.VectorTileLayer} The layer renderer.
- */
-ol.renderer.canvas.VectorTileLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.canvas.VectorTileLayer(/** @type {ol.layer.VectorTile} */ (layer));
-};
-
-
-/**
- * @const
- * @type {!Object.<string, Array.<ol.render.ReplayType>>}
- */
-ol.renderer.canvas.VectorTileLayer.IMAGE_REPLAYS = {
-  'image': [ol.render.ReplayType.POLYGON, ol.render.ReplayType.CIRCLE,
-    ol.render.ReplayType.LINE_STRING, ol.render.ReplayType.IMAGE, ol.render.ReplayType.TEXT],
-  'hybrid': [ol.render.ReplayType.POLYGON, ol.render.ReplayType.LINE_STRING]
-};
-
-
-/**
- * @const
- * @type {!Object.<string, Array.<ol.render.ReplayType>>}
- */
-ol.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS = {
-  'image': [ol.render.ReplayType.DEFAULT],
-  'hybrid': [ol.render.ReplayType.IMAGE, ol.render.ReplayType.TEXT, ol.render.ReplayType.DEFAULT],
-  'vector': ol.render.replay.ORDER
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.disposeInternal = function() {
-  ol.events.unlisten(ol.render.canvas.labelCache, ol.events.EventType.CLEAR, this.handleFontsChanged_, this);
-  ol.renderer.canvas.TileLayer.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.prepareFrame = function(frameState, layerState) {
-  var layer = this.getLayer();
-  var layerRevision = layer.getRevision();
-  if (this.renderedLayerRevision_ != layerRevision) {
-    this.renderedTiles.length = 0;
-    var renderMode = layer.getRenderMode();
-    if (!this.context && renderMode != ol.layer.VectorTileRenderType.VECTOR) {
-      this.context = ol.dom.createCanvasContext2D();
-    }
-    if (this.context && renderMode == ol.layer.VectorTileRenderType.VECTOR) {
-      this.context = null;
-    }
-  }
-  this.renderedLayerRevision_ = layerRevision;
-  return ol.renderer.canvas.TileLayer.prototype.prepareFrame.apply(this, arguments);
-};
-
-
-/**
- * @param {ol.VectorImageTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.createReplayGroup_ = function(
-    tile, frameState) {
-  var layer = this.getLayer();
-  var pixelRatio = frameState.pixelRatio;
-  var projection = frameState.viewState.projection;
-  var revision = layer.getRevision();
-  var renderOrder = /** @type {ol.RenderOrderFunction} */
-      (layer.getRenderOrder()) || null;
-
-  var replayState = tile.getReplayState(layer);
-  if (!replayState.dirty && replayState.renderedRevision == revision &&
-      replayState.renderedRenderOrder == renderOrder) {
-    return;
-  }
-
-  var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-  var sourceTileGrid = source.getTileGrid();
-  var tileGrid = source.getTileGridForProjection(projection);
-  var resolution = tileGrid.getResolution(tile.tileCoord[0]);
-  var tileExtent = tileGrid.getTileCoordExtent(tile.wrappedTileCoord);
-
-  var zIndexKeys = {};
-  for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-    var sourceTile = tile.getTile(tile.tileKeys[t]);
-    if (sourceTile.getState() == ol.TileState.ERROR) {
-      continue;
-    }
-
-    var sourceTileCoord = sourceTile.tileCoord;
-    var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);
-    var sharedExtent = ol.extent.getIntersection(tileExtent, sourceTileExtent);
-    var bufferedExtent = ol.extent.equals(sourceTileExtent, sharedExtent) ? null :
-      ol.extent.buffer(sharedExtent, layer.getRenderBuffer() * resolution);
-    var tileProjection = sourceTile.getProjection();
-    var reproject = false;
-    if (!ol.proj.equivalent(projection, tileProjection)) {
-      reproject = true;
-      sourceTile.setProjection(projection);
-    }
-    replayState.dirty = false;
-    var replayGroup = new ol.render.canvas.ReplayGroup(0, sharedExtent, resolution,
-        pixelRatio, source.getOverlaps(), this.declutterTree_, layer.getRenderBuffer());
-    var squaredTolerance = ol.renderer.vector.getSquaredTolerance(
-        resolution, pixelRatio);
-
-    /**
-     * @param {ol.Feature|ol.render.Feature} feature Feature.
-     * @this {ol.renderer.canvas.VectorTileLayer}
-     */
-    var renderFeature = function(feature) {
-      var styles;
-      var styleFunction = feature.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction.call(/** @type {ol.Feature} */ (feature), resolution);
-      } else {
-        styleFunction = layer.getStyleFunction();
-        if (styleFunction) {
-          styles = styleFunction(feature, resolution);
-        }
-      }
-      if (styles) {
-        var dirty = this.renderFeature(feature, squaredTolerance, styles,
-            replayGroup);
-        this.dirty_ = this.dirty_ || dirty;
-        replayState.dirty = replayState.dirty || dirty;
-      }
-    };
-
-    var features = sourceTile.getFeatures();
-    if (renderOrder && renderOrder !== replayState.renderedRenderOrder) {
-      features.sort(renderOrder);
-    }
-    var feature;
-    for (var i = 0, ii = features.length; i < ii; ++i) {
-      feature = features[i];
-      if (reproject) {
-        if (tileProjection.getUnits() == ol.proj.Units.TILE_PIXELS) {
-          // projected tile extent
-          tileProjection.setWorldExtent(sourceTileExtent);
-          // tile extent in tile pixel space
-          tileProjection.setExtent(sourceTile.getExtent());
-        }
-        feature.getGeometry().transform(tileProjection, projection);
-      }
-      if (!bufferedExtent || ol.extent.intersects(bufferedExtent, feature.getGeometry().getExtent())) {
-        renderFeature.call(this, feature);
-      }
-    }
-    replayGroup.finish();
-    for (var r in replayGroup.getReplays()) {
-      zIndexKeys[r] = true;
-    }
-    sourceTile.setReplayGroup(layer, tile.tileCoord.toString(), replayGroup);
-  }
-  replayState.renderedRevision = revision;
-  replayState.renderedRenderOrder = renderOrder;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.drawTileImage = function(
-    tile, frameState, layerState, x, y, w, h, gutter, transition) {
-  var vectorImageTile = /** @type {ol.VectorImageTile} */ (tile);
-  this.createReplayGroup_(vectorImageTile, frameState);
-  if (this.context) {
-    this.renderTileImage_(vectorImageTile, frameState, layerState);
-    ol.renderer.canvas.TileLayer.prototype.drawTileImage.apply(this, arguments);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  var resolution = frameState.viewState.resolution;
-  var rotation = frameState.viewState.rotation;
-  hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;
-  var layer = this.getLayer();
-  /** @type {Object.<string, boolean>} */
-  var features = {};
-
-  /** @type {Array.<ol.VectorImageTile>} */
-  var renderedTiles = this.renderedTiles;
-
-  var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-  var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-  var bufferedExtent, found;
-  var i, ii, replayGroup;
-  var tile, tileCoord, tileExtent;
-  for (i = 0, ii = renderedTiles.length; i < ii; ++i) {
-    tile = renderedTiles[i];
-    tileCoord = tile.wrappedTileCoord;
-    tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);
-    bufferedExtent = ol.extent.buffer(tileExtent, hitTolerance * resolution, bufferedExtent);
-    if (!ol.extent.containsCoordinate(bufferedExtent, coordinate)) {
-      continue;
-    }
-    for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-      var sourceTile = tile.getTile(tile.tileKeys[t]);
-      if (sourceTile.getState() == ol.TileState.ERROR) {
-        continue;
-      }
-      replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
-      found = found || replayGroup.forEachFeatureAtCoordinate(
-          coordinate, resolution, rotation, hitTolerance, {},
-          /**
-           * @param {ol.Feature|ol.render.Feature} feature Feature.
-           * @return {?} Callback result.
-           */
-          function(feature) {
-            var key = ol.getUid(feature).toString();
-            if (!(key in features)) {
-              features[key] = true;
-              return callback.call(thisArg, feature, layer);
-            }
-          }, null);
-    }
-  }
-  return found;
-};
-
-
-/**
- * @param {ol.VectorTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @return {ol.Transform} transform Transform.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.getReplayTransform_ = function(tile, frameState) {
-  var layer = this.getLayer();
-  var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-  var tileGrid = source.getTileGrid();
-  var tileCoord = tile.tileCoord;
-  var tileResolution = tileGrid.getResolution(tileCoord[0]);
-  var viewState = frameState.viewState;
-  var pixelRatio = frameState.pixelRatio;
-  var renderResolution = viewState.resolution / pixelRatio;
-  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);
-  var center = viewState.center;
-  var origin = ol.extent.getTopLeft(tileExtent);
-  var size = frameState.size;
-  var offsetX = Math.round(pixelRatio * size[0] / 2);
-  var offsetY = Math.round(pixelRatio * size[1] / 2);
-  return ol.transform.compose(this.tmpTransform_,
-      offsetX, offsetY,
-      tileResolution / renderResolution, tileResolution / renderResolution,
-      viewState.rotation,
-      (origin[0] - center[0]) / tileResolution,
-      (center[1] - origin[1]) / tileResolution);
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- */
-ol.renderer.canvas.VectorTileLayer.prototype.handleFontsChanged_ = function(event) {
-  var layer = this.getLayer();
-  if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {
-    layer.changed();
-  }
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.handleStyleImageChange_ = function(event) {
-  this.renderIfReadyAndVisible();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.canvas.VectorTileLayer.prototype.postCompose = function(context, frameState, layerState) {
-  var layer = this.getLayer();
-  var declutterReplays = layer.getDeclutter() ? {} : null;
-  var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-  var renderMode = layer.getRenderMode();
-  var replayTypes = ol.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[renderMode];
-  var pixelRatio = frameState.pixelRatio;
-  var rotation = frameState.viewState.rotation;
-  var size = frameState.size;
-  var offsetX, offsetY;
-  if (rotation) {
-    offsetX = Math.round(pixelRatio * size[0] / 2);
-    offsetY = Math.round(pixelRatio * size[1] / 2);
-    ol.render.canvas.rotateAtOffset(context, -rotation, offsetX, offsetY);
-  }
-  if (declutterReplays) {
-    this.declutterTree_.clear();
-  }
-  var tiles = this.renderedTiles;
-  var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-  var clips = [];
-  var zs = [];
-  for (var i = tiles.length - 1; i >= 0; --i) {
-    var tile = /** @type {ol.VectorImageTile} */ (tiles[i]);
-    if (tile.getState() == ol.TileState.ABORT) {
-      continue;
-    }
-    var tileCoord = tile.tileCoord;
-    var worldOffset = tileGrid.getTileCoordExtent(tileCoord)[0] -
-        tileGrid.getTileCoordExtent(tile.wrappedTileCoord)[0];
-    var transform = undefined;
-    for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {
-      var sourceTile = tile.getTile(tile.tileKeys[t]);
-      if (sourceTile.getState() == ol.TileState.ERROR) {
-        continue;
-      }
-      var replayGroup = sourceTile.getReplayGroup(layer, tileCoord.toString());
-      if (renderMode != ol.layer.VectorTileRenderType.VECTOR && !replayGroup.hasReplays(replayTypes)) {
-        continue;
-      }
-      if (!transform) {
-        transform = this.getTransform(frameState, worldOffset);
-      }
-      var currentZ = sourceTile.tileCoord[0];
-      var currentClip = replayGroup.getClipCoords(transform);
-      context.save();
-      context.globalAlpha = layerState.opacity;
-      // Create a clip mask for regions in this low resolution tile that are
-      // already filled by a higher resolution tile
-      for (var j = 0, jj = clips.length; j < jj; ++j) {
-        var clip = clips[j];
-        if (currentZ < zs[j]) {
-          context.beginPath();
-          // counter-clockwise (outer ring) for current tile
-          context.moveTo(currentClip[0], currentClip[1]);
-          context.lineTo(currentClip[2], currentClip[3]);
-          context.lineTo(currentClip[4], currentClip[5]);
-          context.lineTo(currentClip[6], currentClip[7]);
-          // clockwise (inner ring) for higher resolution tile
-          context.moveTo(clip[6], clip[7]);
-          context.lineTo(clip[4], clip[5]);
-          context.lineTo(clip[2], clip[3]);
-          context.lineTo(clip[0], clip[1]);
-          context.clip();
-        }
-      }
-      replayGroup.replay(context, transform, rotation, {}, replayTypes, declutterReplays);
-      context.restore();
-      clips.push(currentClip);
-      zs.push(currentZ);
-    }
-  }
-  if (declutterReplays) {
-    ol.render.canvas.ReplayGroup.replayDeclutter(declutterReplays, context, rotation);
-  }
-  if (rotation) {
-    ol.render.canvas.rotateAtOffset(context, rotation,
-        /** @type {number} */ (offsetX), /** @type {number} */ (offsetY));
-  }
-  ol.renderer.canvas.TileLayer.prototype.postCompose.apply(this, arguments);
-};
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
- *     styles.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- */
-ol.renderer.canvas.VectorTileLayer.prototype.renderFeature = function(feature, squaredTolerance, styles, replayGroup) {
-  if (!styles) {
-    return false;
-  }
-  var loading = false;
-  if (Array.isArray(styles)) {
-    for (var i = 0, ii = styles.length; i < ii; ++i) {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles[i], squaredTolerance,
-          this.handleStyleImageChange_, this) || loading;
-    }
-  } else {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles, squaredTolerance,
-        this.handleStyleImageChange_, this);
-  }
-  return loading;
-};
-
-
-/**
- * @param {ol.VectorImageTile} tile Tile.
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @private
- */
-ol.renderer.canvas.VectorTileLayer.prototype.renderTileImage_ = function(
-    tile, frameState, layerState) {
-  var layer = this.getLayer();
-  var replayState = tile.getReplayState(layer);
-  var revision = layer.getRevision();
-  var replays = ol.renderer.canvas.VectorTileLayer.IMAGE_REPLAYS[layer.getRenderMode()];
-  if (replays && replayState.renderedTileRevision !== revision) {
-    replayState.renderedTileRevision = revision;
-    var tileCoord = tile.wrappedTileCoord;
-    var z = tileCoord[0];
-    var pixelRatio = frameState.pixelRatio;
-    var source = /** @type {ol.source.VectorTile} */ (layer.getSource());
-    var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);
-    var resolution = tileGrid.getResolution(z);
-    var context = tile.getContext(layer);
-    var size = source.getTilePixelSize(z, pixelRatio, frameState.viewState.projection);
-    context.canvas.width = size[0];
-    context.canvas.height = size[1];
-    var tileExtent = tileGrid.getTileCoordExtent(tileCoord);
-    for (var i = 0, ii = tile.tileKeys.length; i < ii; ++i) {
-      var sourceTile = tile.getTile(tile.tileKeys[i]);
-      if (sourceTile.getState() == ol.TileState.ERROR) {
-        continue;
-      }
-      var pixelScale = pixelRatio / resolution;
-      var transform = ol.transform.reset(this.tmpTransform_);
-      ol.transform.scale(transform, pixelScale, -pixelScale);
-      ol.transform.translate(transform, -tileExtent[0], -tileExtent[3]);
-      var replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
-      replayGroup.replay(context, transform, 0, {}, replays);
-    }
-  }
-};
-
-goog.provide('ol.CanvasMap');
-
-goog.require('ol');
-goog.require('ol.PluggableMap');
-goog.require('ol.PluginType');
-goog.require('ol.control');
-goog.require('ol.interaction');
-goog.require('ol.obj');
-goog.require('ol.plugins');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.canvas.Map');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.canvas.VectorLayer');
-goog.require('ol.renderer.canvas.VectorTileLayer');
-
-
-ol.plugins.register(ol.PluginType.MAP_RENDERER, ol.renderer.canvas.Map);
-ol.plugins.registerMultiple(ol.PluginType.LAYER_RENDERER, [
-  ol.renderer.canvas.ImageLayer,
-  ol.renderer.canvas.TileLayer,
-  ol.renderer.canvas.VectorLayer,
-  ol.renderer.canvas.VectorTileLayer
-]);
-
-
-/**
- * @classdesc
- * The map is the core component of OpenLayers. For a map to render, a view,
- * one or more layers, and a target container are needed:
- *
- *     var map = new ol.CanvasMap({
- *       view: new ol.View({
- *         center: [0, 0],
- *         zoom: 1
- *       }),
- *       layers: [
- *         new ol.layer.Tile({
- *           source: new ol.source.OSM()
- *         })
- *       ],
- *       target: 'map'
- *     });
- *
- * The above snippet creates a map using a {@link ol.layer.Tile} to display
- * {@link ol.source.OSM} OSM data and render it to a DOM element with the
- * id `map`.
- *
- * The constructor places a viewport container (with CSS class name
- * `ol-viewport`) in the target element (see `getViewport()`), and then two
- * further elements within the viewport: one with CSS class name
- * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with
- * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`
- * option of {@link ol.Overlay} for the difference). The map itself is placed in
- * a further element within the viewport.
- *
- * Layers are stored as a `ol.Collection` in layerGroups. A top-level group is
- * provided by the library. This is what is accessed by `getLayerGroup` and
- * `setLayerGroup`. Layers entered in the options are added to this group, and
- * `addLayer` and `removeLayer` change the layer collection in the group.
- * `getLayers` is a convenience function for `getLayerGroup().getLayers()`.
- * Note that `ol.layer.Group` is a subclass of `ol.layer.Base`, so layers
- * entered in the options or added with `addLayer` can be groups, which can
- * contain further groups, and so on.
- *
- * @constructor
- * @extends {ol.PluggableMap}
- * @param {olx.MapOptions} options Map options.
- * @fires ol.MapBrowserEvent
- * @fires ol.MapEvent
- * @fires ol.render.Event#postcompose
- * @fires ol.render.Event#precompose
- * @api
- */
-ol.CanvasMap = function(options) {
-  options = ol.obj.assign({}, options);
-  delete options.renderer;
-  if (!options.controls) {
-    options.controls = ol.control.defaults();
-  }
-  if (!options.interactions) {
-    options.interactions = ol.interaction.defaults();
-  }
-
-  ol.PluggableMap.call(this, options);
-};
-ol.inherits(ol.CanvasMap, ol.PluggableMap);
-
-goog.provide('ol.control.FullScreen');
-
-goog.require('ol');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Provides a button that when clicked fills up the full screen with the map.
- * The full screen source element is by default the element containing the map viewport unless
- * overridden by providing the `source` option. In which case, the dom
- * element introduced using this parameter will be displayed in full screen.
- *
- * When in full screen mode, a close button is shown to exit full screen mode.
- * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to
- * toggle the map in full screen mode.
- *
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.FullScreenOptions=} opt_options Options.
- * @api
- */
-ol.control.FullScreen = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.cssClassName_ = options.className !== undefined ? options.className :
-    'ol-full-screen';
-
-  var label = options.label !== undefined ? options.label : '\u2922';
-
-  /**
-   * @private
-   * @type {Node}
-   */
-  this.labelNode_ = typeof label === 'string' ?
-    document.createTextNode(label) : label;
-
-  var labelActive = options.labelActive !== undefined ? options.labelActive : '\u00d7';
-
-  /**
-   * @private
-   * @type {Node}
-   */
-  this.labelActiveNode_ = typeof labelActive === 'string' ?
-    document.createTextNode(labelActive) : labelActive;
-
-  var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';
-  var button = document.createElement('button');
-  button.className = this.cssClassName_ + '-' + ol.control.FullScreen.isFullScreen();
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(this.labelNode_);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  var cssClasses = this.cssClassName_ + ' ' + ol.css.CLASS_UNSELECTABLE +
-      ' ' + ol.css.CLASS_CONTROL + ' ' +
-      (!ol.control.FullScreen.isFullScreenSupported() ? ol.css.CLASS_UNSUPPORTED : '');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.keys_ = options.keys !== undefined ? options.keys : false;
-
-  /**
-   * @private
-   * @type {Element|string|undefined}
-   */
-  this.source_ = options.source;
-
-};
-ol.inherits(ol.control.FullScreen, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.FullScreen.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleFullScreen_();
-};
-
-
-/**
- * @private
- */
-ol.control.FullScreen.prototype.handleFullScreen_ = function() {
-  if (!ol.control.FullScreen.isFullScreenSupported()) {
-    return;
-  }
-  var map = this.getMap();
-  if (!map) {
-    return;
-  }
-  if (ol.control.FullScreen.isFullScreen()) {
-    ol.control.FullScreen.exitFullScreen();
-  } else {
-    var element;
-    if (this.source_) {
-      element = typeof this.source_ === 'string' ?
-        document.getElementById(this.source_) :
-        this.source_;
-    } else {
-      element = map.getTargetElement();
-    }
-    if (this.keys_) {
-      ol.control.FullScreen.requestFullScreenWithKeys(element);
-
-    } else {
-      ol.control.FullScreen.requestFullScreen(element);
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.control.FullScreen.prototype.handleFullScreenChange_ = function() {
-  var button = this.element.firstElementChild;
-  var map = this.getMap();
-  if (ol.control.FullScreen.isFullScreen()) {
-    button.className = this.cssClassName_ + '-true';
-    ol.dom.replaceNode(this.labelActiveNode_, this.labelNode_);
-  } else {
-    button.className = this.cssClassName_ + '-false';
-    ol.dom.replaceNode(this.labelNode_, this.labelActiveNode_);
-  }
-  if (map) {
-    map.updateSize();
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.FullScreen.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    this.listenerKeys.push(ol.events.listen(document,
-        ol.control.FullScreen.getChangeType_(),
-        this.handleFullScreenChange_, this)
-    );
-  }
-};
-
-/**
- * @return {boolean} Fullscreen is supported by the current platform.
- */
-ol.control.FullScreen.isFullScreenSupported = function() {
-  var body = document.body;
-  return !!(
-    body.webkitRequestFullscreen ||
-    (body.mozRequestFullScreen && document.mozFullScreenEnabled) ||
-    (body.msRequestFullscreen && document.msFullscreenEnabled) ||
-    (body.requestFullscreen && document.fullscreenEnabled)
-  );
-};
-
-/**
- * @return {boolean} Element is currently in fullscreen.
- */
-ol.control.FullScreen.isFullScreen = function() {
-  return !!(
-    document.webkitIsFullScreen || document.mozFullScreen ||
-    document.msFullscreenElement || document.fullscreenElement
-  );
-};
-
-/**
- * Request to fullscreen an element.
- * @param {Node} element Element to request fullscreen
- */
-ol.control.FullScreen.requestFullScreen = function(element) {
-  if (element.requestFullscreen) {
-    element.requestFullscreen();
-  } else if (element.msRequestFullscreen) {
-    element.msRequestFullscreen();
-  } else if (element.mozRequestFullScreen) {
-    element.mozRequestFullScreen();
-  } else if (element.webkitRequestFullscreen) {
-    element.webkitRequestFullscreen();
-  }
-};
-
-/**
- * Request to fullscreen an element with keyboard input.
- * @param {Node} element Element to request fullscreen
- */
-ol.control.FullScreen.requestFullScreenWithKeys = function(element) {
-  if (element.mozRequestFullScreenWithKeys) {
-    element.mozRequestFullScreenWithKeys();
-  } else if (element.webkitRequestFullscreen) {
-    element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
-  } else {
-    ol.control.FullScreen.requestFullScreen(element);
-  }
-};
-
-/**
- * Exit fullscreen.
- */
-ol.control.FullScreen.exitFullScreen = function() {
-  if (document.exitFullscreen) {
-    document.exitFullscreen();
-  } else if (document.msExitFullscreen) {
-    document.msExitFullscreen();
-  } else if (document.mozCancelFullScreen) {
-    document.mozCancelFullScreen();
-  } else if (document.webkitExitFullscreen) {
-    document.webkitExitFullscreen();
-  }
-};
-
-/**
- * @return {string} Change type.
- * @private
- */
-ol.control.FullScreen.getChangeType_ = (function() {
-  var changeType;
-  return function() {
-    if (!changeType) {
-      var body = document.body;
-      if (body.webkitRequestFullscreen) {
-        changeType = 'webkitfullscreenchange';
-      } else if (body.mozRequestFullScreen) {
-        changeType = 'mozfullscreenchange';
-      } else if (body.msRequestFullscreen) {
-        changeType = 'MSFullscreenChange';
-      } else if (body.requestFullscreen) {
-        changeType = 'fullscreenchange';
-      }
-    }
-    return changeType;
-  };
-})();
-
-// FIXME should listen on appropriate pane, once it is defined
-
-goog.provide('ol.control.MousePosition');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.Object');
-goog.require('ol.control.Control');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * A control to show the 2D coordinates of the mouse cursor. By default, these
- * are in the view projection, but can be in any supported projection.
- * By default the control is shown in the top right corner of the map, but this
- * can be changed by using the css selector `.ol-mouse-position`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.MousePositionOptions=} opt_options Mouse position
- *     options.
- * @api
- */
-ol.control.MousePosition = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var element = document.createElement('DIV');
-  element.className = options.className !== undefined ? options.className : 'ol-mouse-position';
-
-  var render = options.render ?
-    options.render : ol.control.MousePosition.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.control.MousePosition.Property_.PROJECTION),
-      this.handleProjectionChanged_, this);
-
-  if (options.coordinateFormat) {
-    this.setCoordinateFormat(options.coordinateFormat);
-  }
-  if (options.projection) {
-    this.setProjection(options.projection);
-  }
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : '';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.renderedHTML_ = element.innerHTML;
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.mapProjection_ = null;
-
-  /**
-   * @private
-   * @type {?ol.TransformFunction}
-   */
-  this.transform_ = null;
-
-  /**
-   * @private
-   * @type {ol.Pixel}
-   */
-  this.lastMouseMovePixel_ = null;
-
-};
-ol.inherits(ol.control.MousePosition, ol.control.Control);
-
-
-/**
- * Update the mouseposition element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.MousePosition}
- * @api
- */
-ol.control.MousePosition.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    this.mapProjection_ = null;
-  } else {
-    if (this.mapProjection_ != frameState.viewState.projection) {
-      this.mapProjection_ = frameState.viewState.projection;
-      this.transform_ = null;
-    }
-  }
-  this.updateHTML_(this.lastMouseMovePixel_);
-};
-
-
-/**
- * @private
- */
-ol.control.MousePosition.prototype.handleProjectionChanged_ = function() {
-  this.transform_ = null;
-};
-
-
-/**
- * Return the coordinate format type used to render the current position or
- * undefined.
- * @return {ol.CoordinateFormatType|undefined} The format to render the current
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.getCoordinateFormat = function() {
-  return /** @type {ol.CoordinateFormatType|undefined} */ (
-    this.get(ol.control.MousePosition.Property_.COORDINATE_FORMAT));
-};
-
-
-/**
- * Return the projection that is used to report the mouse position.
- * @return {ol.proj.Projection|undefined} The projection to report mouse
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.getProjection = function() {
-  return /** @type {ol.proj.Projection|undefined} */ (
-    this.get(ol.control.MousePosition.Property_.PROJECTION));
-};
-
-
-/**
- * @param {Event} event Browser event.
- * @protected
- */
-ol.control.MousePosition.prototype.handleMouseMove = function(event) {
-  var map = this.getMap();
-  this.lastMouseMovePixel_ = map.getEventPixel(event);
-  this.updateHTML_(this.lastMouseMovePixel_);
-};
-
-
-/**
- * @param {Event} event Browser event.
- * @protected
- */
-ol.control.MousePosition.prototype.handleMouseOut = function(event) {
-  this.updateHTML_(null);
-  this.lastMouseMovePixel_ = null;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.MousePosition.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    var viewport = map.getViewport();
-    this.listenerKeys.push(
-        ol.events.listen(viewport, ol.events.EventType.MOUSEMOVE,
-            this.handleMouseMove, this),
-        ol.events.listen(viewport, ol.events.EventType.MOUSEOUT,
-            this.handleMouseOut, this)
-    );
-  }
-};
-
-
-/**
- * Set the coordinate format type used to render the current position.
- * @param {ol.CoordinateFormatType} format The format to render the current
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.setCoordinateFormat = function(format) {
-  this.set(ol.control.MousePosition.Property_.COORDINATE_FORMAT, format);
-};
-
-
-/**
- * Set the projection that is used to report the mouse position.
- * @param {ol.ProjectionLike} projection The projection to report mouse
- *     position in.
- * @observable
- * @api
- */
-ol.control.MousePosition.prototype.setProjection = function(projection) {
-  this.set(ol.control.MousePosition.Property_.PROJECTION, ol.proj.get(projection));
-};
-
-
-/**
- * @param {?ol.Pixel} pixel Pixel.
- * @private
- */
-ol.control.MousePosition.prototype.updateHTML_ = function(pixel) {
-  var html = this.undefinedHTML_;
-  if (pixel && this.mapProjection_) {
-    if (!this.transform_) {
-      var projection = this.getProjection();
-      if (projection) {
-        this.transform_ = ol.proj.getTransformFromProjections(
-            this.mapProjection_, projection);
-      } else {
-        this.transform_ = ol.proj.identityTransform;
-      }
-    }
-    var map = this.getMap();
-    var coordinate = map.getCoordinateFromPixel(pixel);
-    if (coordinate) {
-      this.transform_(coordinate, coordinate);
-      var coordinateFormat = this.getCoordinateFormat();
-      if (coordinateFormat) {
-        html = coordinateFormat(coordinate);
-      } else {
-        html = coordinate.toString();
-      }
-    }
-  }
-  if (!this.renderedHTML_ || html != this.renderedHTML_) {
-    this.element.innerHTML = html;
-    this.renderedHTML_ = html;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.control.MousePosition.Property_ = {
-  PROJECTION: 'projection',
-  COORDINATE_FORMAT: 'coordinateFormat'
-};
-
-goog.provide('ol.OverlayPositioning');
-
-/**
- * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,
- * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,
- * `'top-center'`, `'top-right'`
- * @enum {string}
- */
-ol.OverlayPositioning = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_CENTER: 'bottom-center',
-  BOTTOM_RIGHT: 'bottom-right',
-  CENTER_LEFT: 'center-left',
-  CENTER_CENTER: 'center-center',
-  CENTER_RIGHT: 'center-right',
-  TOP_LEFT: 'top-left',
-  TOP_CENTER: 'top-center',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.Overlay');
-
-goog.require('ol');
-goog.require('ol.MapEventType');
-goog.require('ol.Object');
-goog.require('ol.OverlayPositioning');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.extent');
-
-
-/**
- * @classdesc
- * An element to be displayed over the map and attached to a single map
- * location.  Like {@link ol.control.Control}, Overlays are visible widgets.
- * Unlike Controls, they are not in a fixed position on the screen, but are tied
- * to a geographical coordinate, so panning the map will move an Overlay but not
- * a Control.
- *
- * Example:
- *
- *     var popup = new ol.Overlay({
- *       element: document.getElementById('popup')
- *     });
- *     popup.setPosition(coordinate);
- *     map.addOverlay(popup);
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.OverlayOptions} options Overlay options.
- * @api
- */
-ol.Overlay = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @protected
-   * @type {olx.OverlayOptions}
-   */
-  this.options = options;
-
-  /**
-   * @protected
-   * @type {number|string|undefined}
-   */
-  this.id = options.id;
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.insertFirst = options.insertFirst !== undefined ?
-    options.insertFirst : true;
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;
-
-  /**
-   * @protected
-   * @type {Element}
-   */
-  this.element = document.createElement('DIV');
-  this.element.className = options.className !== undefined ?
-    options.className : 'ol-overlay-container ' + ol.css.CLASS_SELECTABLE;
-  this.element.style.position = 'absolute';
-
-  /**
-   * @protected
-   * @type {boolean}
-   */
-  this.autoPan = options.autoPan !== undefined ? options.autoPan : false;
-
-  /**
-   * @protected
-   * @type {olx.OverlayPanOptions}
-   */
-  this.autoPanAnimation = options.autoPanAnimation ||
-    /** @type {olx.OverlayPanOptions} */ ({});
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.autoPanMargin = options.autoPanMargin !== undefined ?
-    options.autoPanMargin : 20;
-
-  /**
-   * @protected
-   * @type {{bottom_: string,
-   *         left_: string,
-   *         right_: string,
-   *         top_: string,
-   *         visible: boolean}}
-   */
-  this.rendered = {
-    bottom_: '',
-    left_: '',
-    right_: '',
-    top_: '',
-    visible: true
-  };
-
-  /**
-   * @protected
-   * @type {?ol.EventsKey}
-   */
-  this.mapPostrenderListenerKey = null;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property.ELEMENT),
-      this.handleElementChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property.MAP),
-      this.handleMapChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property.OFFSET),
-      this.handleOffsetChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property.POSITION),
-      this.handlePositionChanged, this);
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.Overlay.Property.POSITIONING),
-      this.handlePositioningChanged, this);
-
-  if (options.element !== undefined) {
-    this.setElement(options.element);
-  }
-
-  this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);
-
-  this.setPositioning(options.positioning !== undefined ?
-    /** @type {ol.OverlayPositioning} */ (options.positioning) :
-    ol.OverlayPositioning.TOP_LEFT);
-
-  if (options.position !== undefined) {
-    this.setPosition(options.position);
-  }
-
-};
-ol.inherits(ol.Overlay, ol.Object);
-
-
-/**
- * Get the DOM element of this overlay.
- * @return {Element|undefined} The Element containing the overlay.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getElement = function() {
-  return /** @type {Element|undefined} */ (
-    this.get(ol.Overlay.Property.ELEMENT));
-};
-
-
-/**
- * Get the overlay identifier which is set on constructor.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.Overlay.prototype.getId = function() {
-  return this.id;
-};
-
-
-/**
- * Get the map associated with this overlay.
- * @return {ol.PluggableMap|undefined} The map that the overlay is part of.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getMap = function() {
-  return /** @type {ol.PluggableMap|undefined} */ (
-    this.get(ol.Overlay.Property.MAP));
-};
-
-
-/**
- * Get the offset of this overlay.
- * @return {Array.<number>} The offset.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getOffset = function() {
-  return /** @type {Array.<number>} */ (
-    this.get(ol.Overlay.Property.OFFSET));
-};
-
-
-/**
- * Get the current position of this overlay.
- * @return {ol.Coordinate|undefined} The spatial point that the overlay is
- *     anchored at.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getPosition = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-    this.get(ol.Overlay.Property.POSITION));
-};
-
-
-/**
- * Get the current positioning of this overlay.
- * @return {ol.OverlayPositioning} How the overlay is positioned
- *     relative to its point on the map.
- * @observable
- * @api
- */
-ol.Overlay.prototype.getPositioning = function() {
-  return /** @type {ol.OverlayPositioning} */ (
-    this.get(ol.Overlay.Property.POSITIONING));
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleElementChanged = function() {
-  ol.dom.removeChildren(this.element);
-  var element = this.getElement();
-  if (element) {
-    this.element.appendChild(element);
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleMapChanged = function() {
-  if (this.mapPostrenderListenerKey) {
-    ol.dom.removeNode(this.element);
-    ol.events.unlistenByKey(this.mapPostrenderListenerKey);
-    this.mapPostrenderListenerKey = null;
-  }
-  var map = this.getMap();
-  if (map) {
-    this.mapPostrenderListenerKey = ol.events.listen(map,
-        ol.MapEventType.POSTRENDER, this.render, this);
-    this.updatePixelPosition();
-    var container = this.stopEvent ?
-      map.getOverlayContainerStopEvent() : map.getOverlayContainer();
-    if (this.insertFirst) {
-      container.insertBefore(this.element, container.childNodes[0] || null);
-    } else {
-      container.appendChild(this.element);
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.render = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handleOffsetChanged = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handlePositionChanged = function() {
-  this.updatePixelPosition();
-  if (this.get(ol.Overlay.Property.POSITION) && this.autoPan) {
-    this.panIntoView();
-  }
-};
-
-
-/**
- * @protected
- */
-ol.Overlay.prototype.handlePositioningChanged = function() {
-  this.updatePixelPosition();
-};
-
-
-/**
- * Set the DOM element to be associated with this overlay.
- * @param {Element|undefined} element The Element containing the overlay.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setElement = function(element) {
-  this.set(ol.Overlay.Property.ELEMENT, element);
-};
-
-
-/**
- * Set the map to be associated with this overlay.
- * @param {ol.PluggableMap|undefined} map The map that the overlay is part of.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setMap = function(map) {
-  this.set(ol.Overlay.Property.MAP, map);
-};
-
-
-/**
- * Set the offset for this overlay.
- * @param {Array.<number>} offset Offset.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setOffset = function(offset) {
-  this.set(ol.Overlay.Property.OFFSET, offset);
-};
-
-
-/**
- * Set the position for this overlay. If the position is `undefined` the
- * overlay is hidden.
- * @param {ol.Coordinate|undefined} position The spatial point that the overlay
- *     is anchored at.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setPosition = function(position) {
-  this.set(ol.Overlay.Property.POSITION, position);
-};
-
-
-/**
- * Pan the map so that the overlay is entirely visible in the current viewport
- * (if necessary).
- * @protected
- */
-ol.Overlay.prototype.panIntoView = function() {
-  var map = this.getMap();
-
-  if (!map || !map.getTargetElement()) {
-    return;
-  }
-
-  var mapRect = this.getRect(map.getTargetElement(), map.getSize());
-  var element = /** @type {!Element} */ (this.getElement());
-  var overlayRect = this.getRect(element,
-      [ol.dom.outerWidth(element), ol.dom.outerHeight(element)]);
-
-  var margin = this.autoPanMargin;
-  if (!ol.extent.containsExtent(mapRect, overlayRect)) {
-    // the overlay is not completely inside the viewport, so pan the map
-    var offsetLeft = overlayRect[0] - mapRect[0];
-    var offsetRight = mapRect[2] - overlayRect[2];
-    var offsetTop = overlayRect[1] - mapRect[1];
-    var offsetBottom = mapRect[3] - overlayRect[3];
-
-    var delta = [0, 0];
-    if (offsetLeft < 0) {
-      // move map to the left
-      delta[0] = offsetLeft - margin;
-    } else if (offsetRight < 0) {
-      // move map to the right
-      delta[0] = Math.abs(offsetRight) + margin;
-    }
-    if (offsetTop < 0) {
-      // move map up
-      delta[1] = offsetTop - margin;
-    } else if (offsetBottom < 0) {
-      // move map down
-      delta[1] = Math.abs(offsetBottom) + margin;
-    }
-
-    if (delta[0] !== 0 || delta[1] !== 0) {
-      var center = /** @type {ol.Coordinate} */ (map.getView().getCenter());
-      var centerPx = map.getPixelFromCoordinate(center);
-      var newCenterPx = [
-        centerPx[0] + delta[0],
-        centerPx[1] + delta[1]
-      ];
-
-      map.getView().animate({
-        center: map.getCoordinateFromPixel(newCenterPx),
-        duration: this.autoPanAnimation.duration,
-        easing: this.autoPanAnimation.easing
-      });
-    }
-  }
-};
-
-
-/**
- * Get the extent of an element relative to the document
- * @param {Element|undefined} element The element.
- * @param {ol.Size|undefined} size The size of the element.
- * @return {ol.Extent} The extent.
- * @protected
- */
-ol.Overlay.prototype.getRect = function(element, size) {
-  var box = element.getBoundingClientRect();
-  var offsetX = box.left + window.pageXOffset;
-  var offsetY = box.top + window.pageYOffset;
-  return [
-    offsetX,
-    offsetY,
-    offsetX + size[0],
-    offsetY + size[1]
-  ];
-};
-
-
-/**
- * Set the positioning for this overlay.
- * @param {ol.OverlayPositioning} positioning how the overlay is
- *     positioned relative to its point on the map.
- * @observable
- * @api
- */
-ol.Overlay.prototype.setPositioning = function(positioning) {
-  this.set(ol.Overlay.Property.POSITIONING, positioning);
-};
-
-
-/**
- * Modify the visibility of the element.
- * @param {boolean} visible Element visibility.
- * @protected
- */
-ol.Overlay.prototype.setVisible = function(visible) {
-  if (this.rendered.visible !== visible) {
-    this.element.style.display = visible ? '' : 'none';
-    this.rendered.visible = visible;
-  }
-};
-
-
-/**
- * Update pixel position.
- * @protected
- */
-ol.Overlay.prototype.updatePixelPosition = function() {
-  var map = this.getMap();
-  var position = this.getPosition();
-  if (!map || !map.isRendered() || !position) {
-    this.setVisible(false);
-    return;
-  }
-
-  var pixel = map.getPixelFromCoordinate(position);
-  var mapSize = map.getSize();
-  this.updateRenderedPosition(pixel, mapSize);
-};
-
-
-/**
- * @param {ol.Pixel} pixel The pixel location.
- * @param {ol.Size|undefined} mapSize The map size.
- * @protected
- */
-ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
-  var style = this.element.style;
-  var offset = this.getOffset();
-
-  var positioning = this.getPositioning();
-
-  this.setVisible(true);
-
-  var offsetX = offset[0];
-  var offsetY = offset[1];
-  if (positioning == ol.OverlayPositioning.BOTTOM_RIGHT ||
-      positioning == ol.OverlayPositioning.CENTER_RIGHT ||
-      positioning == ol.OverlayPositioning.TOP_RIGHT) {
-    if (this.rendered.left_ !== '') {
-      this.rendered.left_ = style.left = '';
-    }
-    var right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px';
-    if (this.rendered.right_ != right) {
-      this.rendered.right_ = style.right = right;
-    }
-  } else {
-    if (this.rendered.right_ !== '') {
-      this.rendered.right_ = style.right = '';
-    }
-    if (positioning == ol.OverlayPositioning.BOTTOM_CENTER ||
-        positioning == ol.OverlayPositioning.CENTER_CENTER ||
-        positioning == ol.OverlayPositioning.TOP_CENTER) {
-      offsetX -= this.element.offsetWidth / 2;
-    }
-    var left = Math.round(pixel[0] + offsetX) + 'px';
-    if (this.rendered.left_ != left) {
-      this.rendered.left_ = style.left = left;
-    }
-  }
-  if (positioning == ol.OverlayPositioning.BOTTOM_LEFT ||
-      positioning == ol.OverlayPositioning.BOTTOM_CENTER ||
-      positioning == ol.OverlayPositioning.BOTTOM_RIGHT) {
-    if (this.rendered.top_ !== '') {
-      this.rendered.top_ = style.top = '';
-    }
-    var bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px';
-    if (this.rendered.bottom_ != bottom) {
-      this.rendered.bottom_ = style.bottom = bottom;
-    }
-  } else {
-    if (this.rendered.bottom_ !== '') {
-      this.rendered.bottom_ = style.bottom = '';
-    }
-    if (positioning == ol.OverlayPositioning.CENTER_LEFT ||
-        positioning == ol.OverlayPositioning.CENTER_CENTER ||
-        positioning == ol.OverlayPositioning.CENTER_RIGHT) {
-      offsetY -= this.element.offsetHeight / 2;
-    }
-    var top = Math.round(pixel[1] + offsetY) + 'px';
-    if (this.rendered.top_ != top) {
-      this.rendered.top_ = style.top = top;
-    }
-  }
-};
-
-
-/**
- * returns the options this Overlay has been created with
- * @public
- * @return {olx.OverlayOptions} overlay options
- */
-ol.Overlay.prototype.getOptions = function() {
-  return this.options;
-};
-
-
-/**
- * @enum {string}
- * @protected
- */
-ol.Overlay.Property = {
-  ELEMENT: 'element',
-  MAP: 'map',
-  OFFSET: 'offset',
-  POSITION: 'position',
-  POSITIONING: 'positioning'
-};
-
-goog.provide('ol.control.OverviewMap');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.PluggableMap');
-goog.require('ol.MapEventType');
-goog.require('ol.MapProperty');
-goog.require('ol.Object');
-goog.require('ol.ObjectEventType');
-goog.require('ol.Overlay');
-goog.require('ol.OverlayPositioning');
-goog.require('ol.ViewProperty');
-goog.require('ol.control.Control');
-goog.require('ol.coordinate');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-
-
-/**
- * Create a new control with a map acting as an overview map for an other
- * defined map.
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.OverviewMapOptions=} opt_options OverviewMap options.
- * @api
- */
-ol.control.OverviewMap = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.collapsible_ = options.collapsible !== undefined ?
-    options.collapsible : true;
-
-  if (!this.collapsible_) {
-    this.collapsed_ = false;
-  }
-
-  var className = options.className !== undefined ? options.className : 'ol-overviewmap';
-
-  var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';
-
-  var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\u00AB';
-
-  if (typeof collapseLabel === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.collapseLabel_ = document.createElement('span');
-    this.collapseLabel_.textContent = collapseLabel;
-  } else {
-    this.collapseLabel_ = collapseLabel;
-  }
-
-  var label = options.label !== undefined ? options.label : '\u00BB';
-
-
-  if (typeof label === 'string') {
-    /**
-     * @private
-     * @type {Node}
-     */
-    this.label_ = document.createElement('span');
-    this.label_.textContent = label;
-  } else {
-    this.label_ = label;
-  }
-
-  var activeLabel = (this.collapsible_ && !this.collapsed_) ?
-    this.collapseLabel_ : this.label_;
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(activeLabel);
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  /**
-   * @type {Element}
-   * @private
-   */
-  this.ovmapDiv_ = document.createElement('DIV');
-  this.ovmapDiv_.className = 'ol-overviewmap-map';
-
-  /**
-   * @type {ol.PluggableMap}
-   * @private
-   */
-  this.ovmap_ = new ol.PluggableMap({
-    controls: new ol.Collection(),
-    interactions: new ol.Collection(),
-    view: options.view
-  });
-  var ovmap = this.ovmap_;
-
-  if (options.layers) {
-    options.layers.forEach(
-        /**
-       * @param {ol.layer.Layer} layer Layer.
-       */
-        function(layer) {
-          ovmap.addLayer(layer);
-        }, this);
-  }
-
-  var box = document.createElement('DIV');
-  box.className = 'ol-overviewmap-box';
-  box.style.boxSizing = 'border-box';
-
-  /**
-   * @type {ol.Overlay}
-   * @private
-   */
-  this.boxOverlay_ = new ol.Overlay({
-    position: [0, 0],
-    positioning: ol.OverlayPositioning.BOTTOM_LEFT,
-    element: box
-  });
-  this.ovmap_.addOverlay(this.boxOverlay_);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL +
-      (this.collapsed_ && this.collapsible_ ? ' ol-collapsed' : '') +
-      (this.collapsible_ ? '' : ' ol-uncollapsible');
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(this.ovmapDiv_);
-  element.appendChild(button);
-
-  var render = options.render ? options.render : ol.control.OverviewMap.render;
-
-  ol.control.Control.call(this, {
-    element: element,
-    render: render,
-    target: options.target
-  });
-
-  /* Interactive map */
-
-  var scope = this;
-
-  var overlay = this.boxOverlay_;
-  var overlayBox = this.boxOverlay_.getElement();
-
-  /* Functions definition */
-
-  var computeDesiredMousePosition = function(mousePosition) {
-    return {
-      clientX: mousePosition.clientX - (overlayBox.offsetWidth / 2),
-      clientY: mousePosition.clientY + (overlayBox.offsetHeight / 2)
-    };
-  };
-
-  var move = function(event) {
-    var coordinates = ovmap.getEventCoordinate(computeDesiredMousePosition(event));
-
-    overlay.setPosition(coordinates);
-  };
-
-  var endMoving = function(event) {
-    var coordinates = ovmap.getEventCoordinate(event);
-
-    scope.getMap().getView().setCenter(coordinates);
-
-    window.removeEventListener('mousemove', move);
-    window.removeEventListener('mouseup', endMoving);
-  };
-
-  /* Binding */
-
-  overlayBox.addEventListener('mousedown', function() {
-    window.addEventListener('mousemove', move);
-    window.addEventListener('mouseup', endMoving);
-  });
-};
-ol.inherits(ol.control.OverviewMap, ol.control.Control);
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.control.OverviewMap.prototype.setMap = function(map) {
-  var oldMap = this.getMap();
-  if (map === oldMap) {
-    return;
-  }
-  if (oldMap) {
-    var oldView = oldMap.getView();
-    if (oldView) {
-      this.unbindView_(oldView);
-    }
-    this.ovmap_.setTarget(null);
-  }
-  ol.control.Control.prototype.setMap.call(this, map);
-
-  if (map) {
-    this.ovmap_.setTarget(this.ovmapDiv_);
-    this.listenerKeys.push(ol.events.listen(
-        map, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleMapPropertyChange_, this));
-
-    // TODO: to really support map switching, this would need to be reworked
-    if (this.ovmap_.getLayers().getLength() === 0) {
-      this.ovmap_.setLayerGroup(map.getLayerGroup());
-    }
-
-    var view = map.getView();
-    if (view) {
-      this.bindView_(view);
-      if (view.isDef()) {
-        this.ovmap_.updateSize();
-        this.resetExtent_();
-      }
-    }
-  }
-};
-
-
-/**
- * Handle map property changes.  This only deals with changes to the map's view.
- * @param {ol.Object.Event} event The propertychange event.
- * @private
- */
-ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
-  if (event.key === ol.MapProperty.VIEW) {
-    var oldView = /** @type {ol.View} */ (event.oldValue);
-    if (oldView) {
-      this.unbindView_(oldView);
-    }
-    var newView = this.getMap().getView();
-    this.bindView_(newView);
-  }
-};
-
-
-/**
- * Register listeners for view property changes.
- * @param {ol.View} view The view.
- * @private
- */
-ol.control.OverviewMap.prototype.bindView_ = function(view) {
-  ol.events.listen(view,
-      ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
-      this.handleRotationChanged_, this);
-};
-
-
-/**
- * Unregister listeners for view property changes.
- * @param {ol.View} view The view.
- * @private
- */
-ol.control.OverviewMap.prototype.unbindView_ = function(view) {
-  ol.events.unlisten(view,
-      ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
-      this.handleRotationChanged_, this);
-};
-
-
-/**
- * Handle rotation changes to the main map.
- * TODO: This should rotate the extent rectrangle instead of the
- * overview map's view.
- * @private
- */
-ol.control.OverviewMap.prototype.handleRotationChanged_ = function() {
-  this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());
-};
-
-
-/**
- * Update the overview map element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.OverviewMap}
- * @api
- */
-ol.control.OverviewMap.render = function(mapEvent) {
-  this.validateExtent_();
-  this.updateBox_();
-};
-
-
-/**
- * Reset the overview map extent if the box size (width or
- * height) is less than the size of the overview map size times minRatio
- * or is greater than the size of the overview size times maxRatio.
- *
- * If the map extent was not reset, the box size can fits in the defined
- * ratio sizes. This method then checks if is contained inside the overview
- * map current extent. If not, recenter the overview map to the current
- * main map center location.
- * @private
- */
-ol.control.OverviewMap.prototype.validateExtent_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  if (!map.isRendered() || !ovmap.isRendered()) {
-    return;
-  }
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-  var extent = view.calculateExtent(mapSize);
-
-  var ovmapSize = /** @type {ol.Size} */ (ovmap.getSize());
-
-  var ovview = ovmap.getView();
-  var ovextent = ovview.calculateExtent(ovmapSize);
-
-  var topLeftPixel =
-      ovmap.getPixelFromCoordinate(ol.extent.getTopLeft(extent));
-  var bottomRightPixel =
-      ovmap.getPixelFromCoordinate(ol.extent.getBottomRight(extent));
-
-  var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);
-  var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);
-
-  var ovmapWidth = ovmapSize[0];
-  var ovmapHeight = ovmapSize[1];
-
-  if (boxWidth < ovmapWidth * ol.OVERVIEWMAP_MIN_RATIO ||
-      boxHeight < ovmapHeight * ol.OVERVIEWMAP_MIN_RATIO ||
-      boxWidth > ovmapWidth * ol.OVERVIEWMAP_MAX_RATIO ||
-      boxHeight > ovmapHeight * ol.OVERVIEWMAP_MAX_RATIO) {
-    this.resetExtent_();
-  } else if (!ol.extent.containsExtent(ovextent, extent)) {
-    this.recenter_();
-  }
-};
-
-
-/**
- * Reset the overview map extent to half calculated min and max ratio times
- * the extent of the main map.
- * @private
- */
-ol.control.OverviewMap.prototype.resetExtent_ = function() {
-  if (ol.OVERVIEWMAP_MAX_RATIO === 0 || ol.OVERVIEWMAP_MIN_RATIO === 0) {
-    return;
-  }
-
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-  var extent = view.calculateExtent(mapSize);
-
-  var ovview = ovmap.getView();
-
-  // get how many times the current map overview could hold different
-  // box sizes using the min and max ratio, pick the step in the middle used
-  // to calculate the extent from the main map to set it to the overview map,
-  var steps = Math.log(
-      ol.OVERVIEWMAP_MAX_RATIO / ol.OVERVIEWMAP_MIN_RATIO) / Math.LN2;
-  var ratio = 1 / (Math.pow(2, steps / 2) * ol.OVERVIEWMAP_MIN_RATIO);
-  ol.extent.scaleFromCenter(extent, ratio);
-  ovview.fit(extent);
-};
-
-
-/**
- * Set the center of the overview map to the map center without changing its
- * resolution.
- * @private
- */
-ol.control.OverviewMap.prototype.recenter_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  var view = map.getView();
-
-  var ovview = ovmap.getView();
-
-  ovview.setCenter(view.getCenter());
-};
-
-
-/**
- * Update the box using the main map extent
- * @private
- */
-ol.control.OverviewMap.prototype.updateBox_ = function() {
-  var map = this.getMap();
-  var ovmap = this.ovmap_;
-
-  if (!map.isRendered() || !ovmap.isRendered()) {
-    return;
-  }
-
-  var mapSize = /** @type {ol.Size} */ (map.getSize());
-
-  var view = map.getView();
-
-  var ovview = ovmap.getView();
-
-  var rotation = view.getRotation();
-
-  var overlay = this.boxOverlay_;
-  var box = this.boxOverlay_.getElement();
-  var extent = view.calculateExtent(mapSize);
-  var ovresolution = ovview.getResolution();
-  var bottomLeft = ol.extent.getBottomLeft(extent);
-  var topRight = ol.extent.getTopRight(extent);
-
-  // set position using bottom left coordinates
-  var rotateBottomLeft = this.calculateCoordinateRotate_(rotation, bottomLeft);
-  overlay.setPosition(rotateBottomLeft);
-
-  // set box size calculated from map extent size and overview map resolution
-  if (box) {
-    box.style.width = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution) + 'px';
-    box.style.height = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution) + 'px';
-  }
-};
-
-
-/**
- * @param {number} rotation Target rotation.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {ol.Coordinate|undefined} Coordinate for rotation and center anchor.
- * @private
- */
-ol.control.OverviewMap.prototype.calculateCoordinateRotate_ = function(
-    rotation, coordinate) {
-  var coordinateRotate;
-
-  var map = this.getMap();
-  var view = map.getView();
-
-  var currentCenter = view.getCenter();
-
-  if (currentCenter) {
-    coordinateRotate = [
-      coordinate[0] - currentCenter[0],
-      coordinate[1] - currentCenter[1]
-    ];
-    ol.coordinate.rotate(coordinateRotate, rotation);
-    ol.coordinate.add(coordinateRotate, currentCenter);
-  }
-  return coordinateRotate;
-};
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.OverviewMap.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleToggle_();
-};
-
-
-/**
- * @private
- */
-ol.control.OverviewMap.prototype.handleToggle_ = function() {
-  this.element.classList.toggle('ol-collapsed');
-  if (this.collapsed_) {
-    ol.dom.replaceNode(this.collapseLabel_, this.label_);
-  } else {
-    ol.dom.replaceNode(this.label_, this.collapseLabel_);
-  }
-  this.collapsed_ = !this.collapsed_;
-
-  // manage overview map if it had not been rendered before and control
-  // is expanded
-  var ovmap = this.ovmap_;
-  if (!this.collapsed_ && !ovmap.isRendered()) {
-    ovmap.updateSize();
-    this.resetExtent_();
-    ol.events.listenOnce(ovmap, ol.MapEventType.POSTRENDER,
-        function(event) {
-          this.updateBox_();
-        },
-        this);
-  }
-};
-
-
-/**
- * Return `true` if the overview map is collapsible, `false` otherwise.
- * @return {boolean} True if the widget is collapsible.
- * @api
- */
-ol.control.OverviewMap.prototype.getCollapsible = function() {
-  return this.collapsible_;
-};
-
-
-/**
- * Set whether the overview map should be collapsible.
- * @param {boolean} collapsible True if the widget is collapsible.
- * @api
- */
-ol.control.OverviewMap.prototype.setCollapsible = function(collapsible) {
-  if (this.collapsible_ === collapsible) {
-    return;
-  }
-  this.collapsible_ = collapsible;
-  this.element.classList.toggle('ol-uncollapsible');
-  if (!collapsible && this.collapsed_) {
-    this.handleToggle_();
-  }
-};
-
-
-/**
- * Collapse or expand the overview map according to the passed parameter. Will
- * not do anything if the overview map isn't collapsible or if the current
- * collapsed state is already the one requested.
- * @param {boolean} collapsed True if the widget is collapsed.
- * @api
- */
-ol.control.OverviewMap.prototype.setCollapsed = function(collapsed) {
-  if (!this.collapsible_ || this.collapsed_ === collapsed) {
-    return;
-  }
-  this.handleToggle_();
-};
-
-
-/**
- * Determine if the overview map is collapsed.
- * @return {boolean} The overview map is collapsed.
- * @api
- */
-ol.control.OverviewMap.prototype.getCollapsed = function() {
-  return this.collapsed_;
-};
-
-
-/**
- * Return the overview map.
- * @return {ol.PluggableMap} Overview map.
- * @api
- */
-ol.control.OverviewMap.prototype.getOverviewMap = function() {
-  return this.ovmap_;
-};
-
-goog.provide('ol.control.ScaleLineUnits');
-
-/**
- * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,
- * `'nautical'`, `'metric'`, `'us'`.
- * @enum {string}
- */
-ol.control.ScaleLineUnits = {
-  DEGREES: 'degrees',
-  IMPERIAL: 'imperial',
-  NAUTICAL: 'nautical',
-  METRIC: 'metric',
-  US: 'us'
-};
-
-goog.provide('ol.control.ScaleLine');
-
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.asserts');
-goog.require('ol.control.Control');
-goog.require('ol.control.ScaleLineUnits');
-goog.require('ol.css');
-goog.require('ol.events');
-goog.require('ol.proj');
-goog.require('ol.proj.Units');
-
-
-/**
- * @classdesc
- * A control displaying rough y-axis distances, calculated for the center of the
- * viewport. For conformal projections (e.g. EPSG:3857, the default view
- * projection in OpenLayers), the scale is valid for all directions.
- * No scale line will be shown when the y-axis distance of a pixel at the
- * viewport center cannot be calculated in the view projection.
- * By default the scale line will show in the bottom left portion of the map,
- * but this can be changed by using the css selector `.ol-scale-line`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ScaleLineOptions=} opt_options Scale line options.
- * @api
- */
-ol.control.ScaleLine = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  var className = options.className !== undefined ? options.className : 'ol-scale-line';
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.innerElement_ = document.createElement('DIV');
-  this.innerElement_.className = className + '-inner';
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.element_ = document.createElement('DIV');
-  this.element_.className = className + ' ' + ol.css.CLASS_UNSELECTABLE;
-  this.element_.appendChild(this.innerElement_);
-
-  /**
-   * @private
-   * @type {?olx.ViewState}
-   */
-  this.viewState_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = false;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.renderedWidth_ = undefined;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.renderedHTML_ = '';
-
-  var render = options.render ? options.render : ol.control.ScaleLine.render;
-
-  ol.control.Control.call(this, {
-    element: this.element_,
-    render: render,
-    target: options.target
-  });
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.control.ScaleLine.Property_.UNITS),
-      this.handleUnitsChanged_, this);
-
-  this.setUnits(/** @type {ol.control.ScaleLineUnits} */ (options.units) ||
-      ol.control.ScaleLineUnits.METRIC);
-
-};
-ol.inherits(ol.control.ScaleLine, ol.control.Control);
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.control.ScaleLine.LEADING_DIGITS = [1, 2, 5];
-
-
-/**
- * Return the units to use in the scale line.
- * @return {ol.control.ScaleLineUnits|undefined} The units to use in the scale
- *     line.
- * @observable
- * @api
- */
-ol.control.ScaleLine.prototype.getUnits = function() {
-  return /** @type {ol.control.ScaleLineUnits|undefined} */ (
-    this.get(ol.control.ScaleLine.Property_.UNITS));
-};
-
-
-/**
- * Update the scale line element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.ScaleLine}
- * @api
- */
-ol.control.ScaleLine.render = function(mapEvent) {
-  var frameState = mapEvent.frameState;
-  if (!frameState) {
-    this.viewState_ = null;
-  } else {
-    this.viewState_ = frameState.viewState;
-  }
-  this.updateElement_();
-};
-
-
-/**
- * @private
- */
-ol.control.ScaleLine.prototype.handleUnitsChanged_ = function() {
-  this.updateElement_();
-};
-
-
-/**
- * Set the units to use in the scale line.
- * @param {ol.control.ScaleLineUnits} units The units to use in the scale line.
- * @observable
- * @api
- */
-ol.control.ScaleLine.prototype.setUnits = function(units) {
-  this.set(ol.control.ScaleLine.Property_.UNITS, units);
-};
-
-
-/**
- * @private
- */
-ol.control.ScaleLine.prototype.updateElement_ = function() {
-  var viewState = this.viewState_;
-
-  if (!viewState) {
-    if (this.renderedVisible_) {
-      this.element_.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return;
-  }
-
-  var center = viewState.center;
-  var projection = viewState.projection;
-  var units = this.getUnits();
-  var pointResolutionUnits = units == ol.control.ScaleLineUnits.DEGREES ?
-    ol.proj.Units.DEGREES :
-    ol.proj.Units.METERS;
-  var pointResolution =
-      ol.proj.getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);
-  if (units != ol.control.ScaleLineUnits.DEGREES) {
-    pointResolution *= projection.getMetersPerUnit();
-  }
-
-  var nominalCount = this.minWidth_ * pointResolution;
-  var suffix = '';
-  if (units == ol.control.ScaleLineUnits.DEGREES) {
-    var metersPerDegree = ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES];
-    if (projection.getUnits() == ol.proj.Units.DEGREES) {
-      nominalCount *= metersPerDegree;
-    } else {
-      pointResolution /= metersPerDegree;
-    }
-    if (nominalCount < metersPerDegree / 60) {
-      suffix = '\u2033'; // seconds
-      pointResolution *= 3600;
-    } else if (nominalCount < metersPerDegree) {
-      suffix = '\u2032'; // minutes
-      pointResolution *= 60;
-    } else {
-      suffix = '\u00b0'; // degrees
-    }
-  } else if (units == ol.control.ScaleLineUnits.IMPERIAL) {
-    if (nominalCount < 0.9144) {
-      suffix = 'in';
-      pointResolution /= 0.0254;
-    } else if (nominalCount < 1609.344) {
-      suffix = 'ft';
-      pointResolution /= 0.3048;
-    } else {
-      suffix = 'mi';
-      pointResolution /= 1609.344;
-    }
-  } else if (units == ol.control.ScaleLineUnits.NAUTICAL) {
-    pointResolution /= 1852;
-    suffix = 'nm';
-  } else if (units == ol.control.ScaleLineUnits.METRIC) {
-    if (nominalCount < 0.001) {
-      suffix = 'μm';
-      pointResolution *= 1000000;
-    } else if (nominalCount < 1) {
-      suffix = 'mm';
-      pointResolution *= 1000;
-    } else if (nominalCount < 1000) {
-      suffix = 'm';
-    } else {
-      suffix = 'km';
-      pointResolution /= 1000;
-    }
-  } else if (units == ol.control.ScaleLineUnits.US) {
-    if (nominalCount < 0.9144) {
-      suffix = 'in';
-      pointResolution *= 39.37;
-    } else if (nominalCount < 1609.344) {
-      suffix = 'ft';
-      pointResolution /= 0.30480061;
-    } else {
-      suffix = 'mi';
-      pointResolution /= 1609.3472;
-    }
-  } else {
-    ol.asserts.assert(false, 33); // Invalid units
-  }
-
-  var i = 3 * Math.floor(
-      Math.log(this.minWidth_ * pointResolution) / Math.log(10));
-  var count, width;
-  while (true) {
-    count = ol.control.ScaleLine.LEADING_DIGITS[((i % 3) + 3) % 3] *
-        Math.pow(10, Math.floor(i / 3));
-    width = Math.round(count / pointResolution);
-    if (isNaN(width)) {
-      this.element_.style.display = 'none';
-      this.renderedVisible_ = false;
-      return;
-    } else if (width >= this.minWidth_) {
-      break;
-    }
-    ++i;
-  }
-
-  var html = count + ' ' + suffix;
-  if (this.renderedHTML_ != html) {
-    this.innerElement_.innerHTML = html;
-    this.renderedHTML_ = html;
-  }
-
-  if (this.renderedWidth_ != width) {
-    this.innerElement_.style.width = width + 'px';
-    this.renderedWidth_ = width;
-  }
-
-  if (!this.renderedVisible_) {
-    this.element_.style.display = '';
-    this.renderedVisible_ = true;
-  }
-
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.control.ScaleLine.Property_ = {
-  UNITS: 'units'
-};
-
-// FIXME should possibly show tooltip when dragging?
-
-goog.provide('ol.control.ZoomSlider');
-
-goog.require('ol');
-goog.require('ol.ViewHint');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-goog.require('ol.easing');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.math');
-goog.require('ol.pointer.EventType');
-goog.require('ol.pointer.PointerEventHandler');
-
-
-/**
- * @classdesc
- * A slider type of control for zooming.
- *
- * Example:
- *
- *     map.addControl(new ol.control.ZoomSlider());
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomSliderOptions=} opt_options Zoom slider options.
- * @api
- */
-ol.control.ZoomSlider = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * Will hold the current resolution of the view.
-   *
-   * @type {number|undefined}
-   * @private
-   */
-  this.currentResolution_ = undefined;
-
-  /**
-   * The direction of the slider. Will be determined from actual display of the
-   * container and defaults to ol.control.ZoomSlider.Direction_.VERTICAL.
-   *
-   * @type {ol.control.ZoomSlider.Direction_}
-   * @private
-   */
-  this.direction_ = ol.control.ZoomSlider.Direction_.VERTICAL;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.dragging_;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.heightLimit_ = 0;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.widthLimit_ = 0;
-
-  /**
-   * @type {number|undefined}
-   * @private
-   */
-  this.previousX_;
-
-  /**
-   * @type {number|undefined}
-   * @private
-   */
-  this.previousY_;
-
-  /**
-   * The calculated thumb size (border box plus margins).  Set when initSlider_
-   * is called.
-   * @type {ol.Size}
-   * @private
-   */
-  this.thumbSize_ = null;
-
-  /**
-   * Whether the slider is initialized.
-   * @type {boolean}
-   * @private
-   */
-  this.sliderInitialized_ = false;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 200;
-
-  var className = options.className !== undefined ? options.className : 'ol-zoomslider';
-  var thumbElement = document.createElement('button');
-  thumbElement.setAttribute('type', 'button');
-  thumbElement.className = className + '-thumb ' + ol.css.CLASS_UNSELECTABLE;
-  var containerElement = document.createElement('div');
-  containerElement.className = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' + ol.css.CLASS_CONTROL;
-  containerElement.appendChild(thumbElement);
-  /**
-   * @type {ol.pointer.PointerEventHandler}
-   * @private
-   */
-  this.dragger_ = new ol.pointer.PointerEventHandler(containerElement);
-
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERDOWN,
-      this.handleDraggerStart_, this);
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERMOVE,
-      this.handleDraggerDrag_, this);
-  ol.events.listen(this.dragger_, ol.pointer.EventType.POINTERUP,
-      this.handleDraggerEnd_, this);
-
-  ol.events.listen(containerElement, ol.events.EventType.CLICK,
-      this.handleContainerClick_, this);
-  ol.events.listen(thumbElement, ol.events.EventType.CLICK,
-      ol.events.Event.stopPropagation);
-
-  var render = options.render ? options.render : ol.control.ZoomSlider.render;
-
-  ol.control.Control.call(this, {
-    element: containerElement,
-    render: render
-  });
-};
-ol.inherits(ol.control.ZoomSlider, ol.control.Control);
-
-
-/**
- * @inheritDoc
- */
-ol.control.ZoomSlider.prototype.disposeInternal = function() {
-  this.dragger_.dispose();
-  ol.control.Control.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * The enum for available directions.
- *
- * @enum {number}
- * @private
- */
-ol.control.ZoomSlider.Direction_ = {
-  VERTICAL: 0,
-  HORIZONTAL: 1
-};
-
-
-/**
- * @inheritDoc
- */
-ol.control.ZoomSlider.prototype.setMap = function(map) {
-  ol.control.Control.prototype.setMap.call(this, map);
-  if (map) {
-    map.render();
-  }
-};
-
-
-/**
- * Initializes the slider element. This will determine and set this controls
- * direction_ and also constrain the dragging of the thumb to always be within
- * the bounds of the container.
- *
- * @private
- */
-ol.control.ZoomSlider.prototype.initSlider_ = function() {
-  var container = this.element;
-  var containerSize = {
-    width: container.offsetWidth, height: container.offsetHeight
-  };
-
-  var thumb = container.firstElementChild;
-  var computedStyle = getComputedStyle(thumb);
-  var thumbWidth = thumb.offsetWidth +
-      parseFloat(computedStyle['marginRight']) +
-      parseFloat(computedStyle['marginLeft']);
-  var thumbHeight = thumb.offsetHeight +
-      parseFloat(computedStyle['marginTop']) +
-      parseFloat(computedStyle['marginBottom']);
-  this.thumbSize_ = [thumbWidth, thumbHeight];
-
-  if (containerSize.width > containerSize.height) {
-    this.direction_ = ol.control.ZoomSlider.Direction_.HORIZONTAL;
-    this.widthLimit_ = containerSize.width - thumbWidth;
-  } else {
-    this.direction_ = ol.control.ZoomSlider.Direction_.VERTICAL;
-    this.heightLimit_ = containerSize.height - thumbHeight;
-  }
-  this.sliderInitialized_ = true;
-};
-
-
-/**
- * Update the zoomslider element.
- * @param {ol.MapEvent} mapEvent Map event.
- * @this {ol.control.ZoomSlider}
- * @api
- */
-ol.control.ZoomSlider.render = function(mapEvent) {
-  if (!mapEvent.frameState) {
-    return;
-  }
-  if (!this.sliderInitialized_) {
-    this.initSlider_();
-  }
-  var res = mapEvent.frameState.viewState.resolution;
-  if (res !== this.currentResolution_) {
-    this.currentResolution_ = res;
-    this.setThumbPosition_(res);
-  }
-};
-
-
-/**
- * @param {Event} event The browser event to handle.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleContainerClick_ = function(event) {
-  var view = this.getMap().getView();
-
-  var relativePosition = this.getRelativePosition_(
-      event.offsetX - this.thumbSize_[0] / 2,
-      event.offsetY - this.thumbSize_[1] / 2);
-
-  var resolution = this.getResolutionForPosition_(relativePosition);
-
-  view.animate({
-    resolution: view.constrainResolution(resolution),
-    duration: this.duration_,
-    easing: ol.easing.easeOut
-  });
-};
-
-
-/**
- * Handle dragger start events.
- * @param {ol.pointer.PointerEvent} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerStart_ = function(event) {
-  if (!this.dragging_ && event.originalEvent.target === this.element.firstElementChild) {
-    this.getMap().getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.previousX_ = event.clientX;
-    this.previousY_ = event.clientY;
-    this.dragging_ = true;
-  }
-};
-
-
-/**
- * Handle dragger drag events.
- *
- * @param {ol.pointer.PointerEvent|Event} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerDrag_ = function(event) {
-  if (this.dragging_) {
-    var element = this.element.firstElementChild;
-    var deltaX = event.clientX - this.previousX_ + parseInt(element.style.left, 10);
-    var deltaY = event.clientY - this.previousY_ + parseInt(element.style.top, 10);
-    var relativePosition = this.getRelativePosition_(deltaX, deltaY);
-    this.currentResolution_ = this.getResolutionForPosition_(relativePosition);
-    this.getMap().getView().setResolution(this.currentResolution_);
-    this.setThumbPosition_(this.currentResolution_);
-    this.previousX_ = event.clientX;
-    this.previousY_ = event.clientY;
-  }
-};
-
-
-/**
- * Handle dragger end events.
- * @param {ol.pointer.PointerEvent|Event} event The drag event.
- * @private
- */
-ol.control.ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
-  if (this.dragging_) {
-    var view = this.getMap().getView();
-    view.setHint(ol.ViewHint.INTERACTING, -1);
-
-    view.animate({
-      resolution: view.constrainResolution(this.currentResolution_),
-      duration: this.duration_,
-      easing: ol.easing.easeOut
-    });
-
-    this.dragging_ = false;
-    this.previousX_ = undefined;
-    this.previousY_ = undefined;
-  }
-};
-
-
-/**
- * Positions the thumb inside its container according to the given resolution.
- *
- * @param {number} res The res.
- * @private
- */
-ol.control.ZoomSlider.prototype.setThumbPosition_ = function(res) {
-  var position = this.getPositionForResolution_(res);
-  var thumb = this.element.firstElementChild;
-
-  if (this.direction_ == ol.control.ZoomSlider.Direction_.HORIZONTAL) {
-    thumb.style.left = this.widthLimit_ * position + 'px';
-  } else {
-    thumb.style.top = this.heightLimit_ * position + 'px';
-  }
-};
-
-
-/**
- * Calculates the relative position of the thumb given x and y offsets.  The
- * relative position scales from 0 to 1.  The x and y offsets are assumed to be
- * in pixel units within the dragger limits.
- *
- * @param {number} x Pixel position relative to the left of the slider.
- * @param {number} y Pixel position relative to the top of the slider.
- * @return {number} The relative position of the thumb.
- * @private
- */
-ol.control.ZoomSlider.prototype.getRelativePosition_ = function(x, y) {
-  var amount;
-  if (this.direction_ === ol.control.ZoomSlider.Direction_.HORIZONTAL) {
-    amount = x / this.widthLimit_;
-  } else {
-    amount = y / this.heightLimit_;
-  }
-  return ol.math.clamp(amount, 0, 1);
-};
-
-
-/**
- * Calculates the corresponding resolution of the thumb given its relative
- * position (where 0 is the minimum and 1 is the maximum).
- *
- * @param {number} position The relative position of the thumb.
- * @return {number} The corresponding resolution.
- * @private
- */
-ol.control.ZoomSlider.prototype.getResolutionForPosition_ = function(position) {
-  var fn = this.getMap().getView().getResolutionForValueFunction();
-  return fn(1 - position);
-};
-
-
-/**
- * Determines the relative position of the slider for the given resolution.  A
- * relative position of 0 corresponds to the minimum view resolution.  A
- * relative position of 1 corresponds to the maximum view resolution.
- *
- * @param {number} res The resolution.
- * @return {number} The relative position value (between 0 and 1).
- * @private
- */
-ol.control.ZoomSlider.prototype.getPositionForResolution_ = function(res) {
-  var fn = this.getMap().getView().getValueForResolutionFunction();
-  return 1 - fn(res);
-};
-
-goog.provide('ol.control.ZoomToExtent');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.control.Control');
-goog.require('ol.css');
-
-
-/**
- * @classdesc
- * A button control which, when pressed, changes the map view to a specific
- * extent. To style this control use the css selector `.ol-zoom-extent`.
- *
- * @constructor
- * @extends {ol.control.Control}
- * @param {olx.control.ZoomToExtentOptions=} opt_options Options.
- * @api
- */
-ol.control.ZoomToExtent = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.Extent}
-   * @protected
-   */
-  this.extent = options.extent ? options.extent : null;
-
-  var className = options.className !== undefined ? options.className :
-    'ol-zoom-extent';
-
-  var label = options.label !== undefined ? options.label : 'E';
-  var tipLabel = options.tipLabel !== undefined ?
-    options.tipLabel : 'Fit to extent';
-  var button = document.createElement('button');
-  button.setAttribute('type', 'button');
-  button.title = tipLabel;
-  button.appendChild(
-      typeof label === 'string' ? document.createTextNode(label) : label
-  );
-
-  ol.events.listen(button, ol.events.EventType.CLICK,
-      this.handleClick_, this);
-
-  var cssClasses = className + ' ' + ol.css.CLASS_UNSELECTABLE + ' ' +
-      ol.css.CLASS_CONTROL;
-  var element = document.createElement('div');
-  element.className = cssClasses;
-  element.appendChild(button);
-
-  ol.control.Control.call(this, {
-    element: element,
-    target: options.target
-  });
-};
-ol.inherits(ol.control.ZoomToExtent, ol.control.Control);
-
-
-/**
- * @param {Event} event The event to handle
- * @private
- */
-ol.control.ZoomToExtent.prototype.handleClick_ = function(event) {
-  event.preventDefault();
-  this.handleZoomToExtent();
-};
-
-
-/**
- * @protected
- */
-ol.control.ZoomToExtent.prototype.handleZoomToExtent = function() {
-  var map = this.getMap();
-  var view = map.getView();
-  var extent = !this.extent ? view.getProjection().getExtent() : this.extent;
-  view.fit(extent);
-};
-
-goog.provide('ol.DeviceOrientation');
-
-goog.require('ol.events');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.has');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * The ol.DeviceOrientation class provides access to information from
- * DeviceOrientation events.  See the [HTML 5 DeviceOrientation Specification](
- * http://www.w3.org/TR/orientation-event/) for more details.
- *
- * Many new computers, and especially mobile phones
- * and tablets, provide hardware support for device orientation. Web
- * developers targeting mobile devices will be especially interested in this
- * class.
- *
- * Device orientation data are relative to a common starting point. For mobile
- * devices, the starting point is to lay your phone face up on a table with the
- * top of the phone pointing north. This represents the zero state. All
- * angles are then relative to this state. For computers, it is the same except
- * the screen is open at 90 degrees.
- *
- * Device orientation is reported as three angles - `alpha`, `beta`, and
- * `gamma` - relative to the starting position along the three planar axes X, Y
- * and Z. The X axis runs from the left edge to the right edge through the
- * middle of the device. Similarly, the Y axis runs from the bottom to the top
- * of the device through the middle. The Z axis runs from the back to the front
- * through the middle. In the starting position, the X axis points to the
- * right, the Y axis points away from you and the Z axis points straight up
- * from the device lying flat.
- *
- * The three angles representing the device orientation are relative to the
- * three axes. `alpha` indicates how much the device has been rotated around the
- * Z axis, which is commonly interpreted as the compass heading (see note
- * below). `beta` indicates how much the device has been rotated around the X
- * axis, or how much it is tilted from front to back.  `gamma` indicates how
- * much the device has been rotated around the Y axis, or how much it is tilted
- * from left to right.
- *
- * For most browsers, the `alpha` value returns the compass heading so if the
- * device points north, it will be 0.  With Safari on iOS, the 0 value of
- * `alpha` is calculated from when device orientation was first requested.
- * ol.DeviceOrientation provides the `heading` property which normalizes this
- * behavior across all browsers for you.
- *
- * It is important to note that the HTML 5 DeviceOrientation specification
- * indicates that `alpha`, `beta` and `gamma` are in degrees while the
- * equivalent properties in ol.DeviceOrientation are in radians for consistency
- * with all other uses of angles throughout OpenLayers.
- *
- * To get notified of device orientation changes, register a listener for the
- * generic `change` event on your `ol.DeviceOrientation` instance.
- *
- * @see {@link http://www.w3.org/TR/orientation-event/}
- *
- * @deprecated This class is deprecated and will removed in the next major release.
- *
- * @constructor
- * @extends {ol.Object}
- * @param {olx.DeviceOrientationOptions=} opt_options Options.
- * @api
- */
-ol.DeviceOrientation = function(opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.listenerKey_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.DeviceOrientation.Property_.TRACKING),
-      this.handleTrackingChanged_, this);
-
-  this.setTracking(options.tracking !== undefined ? options.tracking : false);
-
-};
-ol.inherits(ol.DeviceOrientation, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.DeviceOrientation.prototype.disposeInternal = function() {
-  this.setTracking(false);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @private
- * @param {Event} originalEvent Event.
- */
-ol.DeviceOrientation.prototype.orientationChange_ = function(originalEvent) {
-  var event = /** @type {DeviceOrientationEvent} */ (originalEvent);
-  if (event.alpha !== null) {
-    var alpha = ol.math.toRadians(event.alpha);
-    this.set(ol.DeviceOrientation.Property_.ALPHA, alpha);
-    // event.absolute is undefined in iOS.
-    if (typeof event.absolute === 'boolean' && event.absolute) {
-      this.set(ol.DeviceOrientation.Property_.HEADING, alpha);
-    } else if (typeof event.webkitCompassHeading === 'number' &&
-               event.webkitCompassAccuracy != -1) {
-      var heading = ol.math.toRadians(event.webkitCompassHeading);
-      this.set(ol.DeviceOrientation.Property_.HEADING, heading);
-    }
-  }
-  if (event.beta !== null) {
-    this.set(ol.DeviceOrientation.Property_.BETA,
-        ol.math.toRadians(event.beta));
-  }
-  if (event.gamma !== null) {
-    this.set(ol.DeviceOrientation.Property_.GAMMA,
-        ol.math.toRadians(event.gamma));
-  }
-  this.changed();
-};
-
-
-/**
- * Rotation around the device z-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     standard Z axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getAlpha = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.DeviceOrientation.Property_.ALPHA));
-};
-
-
-/**
- * Rotation around the device x-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     planar X axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getBeta = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.DeviceOrientation.Property_.BETA));
-};
-
-
-/**
- * Rotation around the device y-axis (in radians).
- * @return {number|undefined} The euler angle in radians of the device from the
- *     planar Y axis.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getGamma = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.DeviceOrientation.Property_.GAMMA));
-};
-
-
-/**
- * The heading of the device relative to north (in radians).
- * @return {number|undefined} The heading of the device relative to north, in
- *     radians, normalizing for different browser behavior.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getHeading = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.DeviceOrientation.Property_.HEADING));
-};
-
-
-/**
- * Determine if orientation is being tracked.
- * @return {boolean} Changes in device orientation are being tracked.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.getTracking = function() {
-  return /** @type {boolean} */ (
-    this.get(ol.DeviceOrientation.Property_.TRACKING));
-};
-
-
-/**
- * @private
- */
-ol.DeviceOrientation.prototype.handleTrackingChanged_ = function() {
-  if (ol.has.DEVICE_ORIENTATION) {
-    var tracking = this.getTracking();
-    if (tracking && !this.listenerKey_) {
-      this.listenerKey_ = ol.events.listen(window, 'deviceorientation',
-          this.orientationChange_, this);
-    } else if (!tracking && this.listenerKey_ !== null) {
-      ol.events.unlistenByKey(this.listenerKey_);
-      this.listenerKey_ = null;
-    }
-  }
-};
-
-
-/**
- * Enable or disable tracking of device orientation events.
- * @param {boolean} tracking The status of tracking changes to alpha, beta and
- *     gamma. If true, changes are tracked and reported immediately.
- * @observable
- * @api
- */
-ol.DeviceOrientation.prototype.setTracking = function(tracking) {
-  this.set(ol.DeviceOrientation.Property_.TRACKING, tracking);
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.DeviceOrientation.Property_ = {
-  ALPHA: 'alpha',
-  BETA: 'beta',
-  GAMMA: 'gamma',
-  HEADING: 'heading',
-  TRACKING: 'tracking'
-};
-
-goog.provide('ol.style.Image');
-
-
-/**
- * @classdesc
- * A base class used for creating subclasses and not instantiated in
- * apps. Base class for {@link ol.style.Icon}, {@link ol.style.Circle} and
- * {@link ol.style.RegularShape}.
- *
- * @constructor
- * @abstract
- * @param {ol.StyleImageOptions} options Options.
- * @api
- */
-ol.style.Image = function(options) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.opacity_ = options.opacity;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.rotateWithView_ = options.rotateWithView;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.rotation_ = options.rotation;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.scale_ = options.scale;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.snapToPixel_ = options.snapToPixel;
-
-};
-
-
-/**
- * Get the symbolizer opacity.
- * @return {number} Opacity.
- * @api
- */
-ol.style.Image.prototype.getOpacity = function() {
-  return this.opacity_;
-};
-
-
-/**
- * Determine whether the symbolizer rotates with the map.
- * @return {boolean} Rotate with map.
- * @api
- */
-ol.style.Image.prototype.getRotateWithView = function() {
-  return this.rotateWithView_;
-};
-
-
-/**
- * Get the symoblizer rotation.
- * @return {number} Rotation.
- * @api
- */
-ol.style.Image.prototype.getRotation = function() {
-  return this.rotation_;
-};
-
-
-/**
- * Get the symbolizer scale.
- * @return {number} Scale.
- * @api
- */
-ol.style.Image.prototype.getScale = function() {
-  return this.scale_;
-};
-
-
-/**
- * Determine whether the symbolizer should be snapped to a pixel.
- * @return {boolean} The symbolizer should snap to a pixel.
- * @api
- */
-ol.style.Image.prototype.getSnapToPixel = function() {
-  return this.snapToPixel_;
-};
-
-
-/**
- * Get the anchor point in pixels. The anchor determines the center point for the
- * symbolizer.
- * @abstract
- * @return {Array.<number>} Anchor.
- */
-ol.style.Image.prototype.getAnchor = function() {};
-
-
-/**
- * Get the image element for the symbolizer.
- * @abstract
- * @param {number} pixelRatio Pixel ratio.
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
- */
-ol.style.Image.prototype.getImage = function(pixelRatio) {};
-
-
-/**
- * @abstract
- * @param {number} pixelRatio Pixel ratio.
- * @return {HTMLCanvasElement|HTMLVideoElement|Image} Image element.
- */
-ol.style.Image.prototype.getHitDetectionImage = function(pixelRatio) {};
-
-
-/**
- * @abstract
- * @return {ol.ImageState} Image state.
- */
-ol.style.Image.prototype.getImageState = function() {};
-
-
-/**
- * @abstract
- * @return {ol.Size} Image size.
- */
-ol.style.Image.prototype.getImageSize = function() {};
-
-
-/**
- * @abstract
- * @return {ol.Size} Size of the hit-detection image.
- */
-ol.style.Image.prototype.getHitDetectionImageSize = function() {};
-
-
-/**
- * Get the origin of the symbolizer.
- * @abstract
- * @return {Array.<number>} Origin.
- */
-ol.style.Image.prototype.getOrigin = function() {};
-
-
-/**
- * Get the size of the symbolizer (in pixels).
- * @abstract
- * @return {ol.Size} Size.
- */
-ol.style.Image.prototype.getSize = function() {};
-
-
-/**
- * Set the opacity.
- *
- * @param {number} opacity Opacity.
- * @api
- */
-ol.style.Image.prototype.setOpacity = function(opacity) {
-  this.opacity_ = opacity;
-};
-
-
-/**
- * Set whether to rotate the style with the view.
- *
- * @param {boolean} rotateWithView Rotate with map.
- */
-ol.style.Image.prototype.setRotateWithView = function(rotateWithView) {
-  this.rotateWithView_ = rotateWithView;
-};
-
-
-/**
- * Set the rotation.
- *
- * @param {number} rotation Rotation.
- * @api
- */
-ol.style.Image.prototype.setRotation = function(rotation) {
-  this.rotation_ = rotation;
-};
-
-
-/**
- * Set the scale.
- *
- * @param {number} scale Scale.
- * @api
- */
-ol.style.Image.prototype.setScale = function(scale) {
-  this.scale_ = scale;
-};
-
-
-/**
- * Set whether to snap the image to the closest pixel.
- *
- * @param {boolean} snapToPixel Snap to pixel?
- */
-ol.style.Image.prototype.setSnapToPixel = function(snapToPixel) {
-  this.snapToPixel_ = snapToPixel;
-};
-
-
-/**
- * @abstract
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @return {ol.EventsKey|undefined} Listener key.
- * @template T
- */
-ol.style.Image.prototype.listenImageChange = function(listener, thisArg) {};
-
-
-/**
- * Load not yet loaded URI.
- * @abstract
- */
-ol.style.Image.prototype.load = function() {};
-
-
-/**
- * @abstract
- * @param {function(this: T, ol.events.Event)} listener Listener function.
- * @param {T} thisArg Value to use as `this` when executing `listener`.
- * @template T
- */
-ol.style.Image.prototype.unlistenImageChange = function(listener, thisArg) {};
-
-goog.provide('ol.style.RegularShape');
-
-goog.require('ol');
-goog.require('ol.colorlike');
-goog.require('ol.dom');
-goog.require('ol.has');
-goog.require('ol.ImageState');
-goog.require('ol.render.canvas');
-goog.require('ol.style.Image');
-
-
-/**
- * @classdesc
- * Set regular shape style for vector features. The resulting shape will be
- * a regular polygon when `radius` is provided, or a star when `radius1` and
- * `radius2` are provided.
- *
- * @constructor
- * @param {olx.style.RegularShapeOptions} options Options.
- * @extends {ol.style.Image}
- * @api
- */
-ol.style.RegularShape = function(options) {
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.checksums_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.hitDetectionCanvas_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill : null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.origin_ = [0, 0];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.points_ = options.points;
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.radius_ = /** @type {number} */ (options.radius !== undefined ?
-    options.radius : options.radius1);
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.radius2_ = options.radius2;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.angle_ = options.angle !== undefined ? options.angle : 0;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.anchor_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.hitDetectionImageSize_ = null;
-
-  /**
-   * @protected
-   * @type {ol.style.AtlasManager|undefined}
-   */
-  this.atlasManager_ = options.atlasManager;
-
-  this.render_(this.atlasManager_);
-
-  /**
-   * @type {boolean}
-   */
-  var snapToPixel = options.snapToPixel !== undefined ?
-    options.snapToPixel : true;
-
-  /**
-   * @type {boolean}
-   */
-  var rotateWithView = options.rotateWithView !== undefined ?
-    options.rotateWithView : false;
-
-  ol.style.Image.call(this, {
-    opacity: 1,
-    rotateWithView: rotateWithView,
-    rotation: options.rotation !== undefined ? options.rotation : 0,
-    scale: 1,
-    snapToPixel: snapToPixel
-  });
-};
-ol.inherits(ol.style.RegularShape, ol.style.Image);
-
-
-/**
- * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.
- * @return {ol.style.RegularShape} The cloned style.
- * @api
- */
-ol.style.RegularShape.prototype.clone = function() {
-  var style = new ol.style.RegularShape({
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    points: this.getPoints(),
-    radius: this.getRadius(),
-    radius2: this.getRadius2(),
-    angle: this.getAngle(),
-    snapToPixel: this.getSnapToPixel(),
-    stroke: this.getStroke() ?  this.getStroke().clone() : undefined,
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView(),
-    atlasManager: this.atlasManager_
-  });
-  style.setOpacity(this.getOpacity());
-  style.setScale(this.getScale());
-  return style;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getAnchor = function() {
-  return this.anchor_;
-};
-
-
-/**
- * Get the angle used in generating the shape.
- * @return {number} Shape's rotation in radians.
- * @api
- */
-ol.style.RegularShape.prototype.getAngle = function() {
-  return this.angle_;
-};
-
-
-/**
- * Get the fill style for the shape.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.RegularShape.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getHitDetectionImage = function(pixelRatio) {
-  return this.hitDetectionCanvas_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getImage = function(pixelRatio) {
-  return this.canvas_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getImageSize = function() {
-  return this.imageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getHitDetectionImageSize = function() {
-  return this.hitDetectionImageSize_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.getImageState = function() {
-  return ol.ImageState.LOADED;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getOrigin = function() {
-  return this.origin_;
-};
-
-
-/**
- * Get the number of points for generating the shape.
- * @return {number} Number of points for stars and regular polygons.
- * @api
- */
-ol.style.RegularShape.prototype.getPoints = function() {
-  return this.points_;
-};
-
-
-/**
- * Get the (primary) radius for the shape.
- * @return {number} Radius.
- * @api
- */
-ol.style.RegularShape.prototype.getRadius = function() {
-  return this.radius_;
-};
-
-
-/**
- * Get the secondary radius for the shape.
- * @return {number|undefined} Radius2.
- * @api
- */
-ol.style.RegularShape.prototype.getRadius2 = function() {
-  return this.radius2_;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.RegularShape.prototype.getSize = function() {
-  return this.size_;
-};
-
-
-/**
- * Get the stroke style for the shape.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.RegularShape.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.listenImageChange = function(listener, thisArg) {};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.load = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.style.RegularShape.prototype.unlistenImageChange = function(listener, thisArg) {};
-
-
-/**
- * @protected
- * @param {ol.style.AtlasManager|undefined} atlasManager An atlas manager.
- */
-ol.style.RegularShape.prototype.render_ = function(atlasManager) {
-  var imageSize;
-  var lineCap = '';
-  var lineJoin = '';
-  var miterLimit = 0;
-  var lineDash = null;
-  var lineDashOffset = 0;
-  var strokeStyle;
-  var strokeWidth = 0;
-
-  if (this.stroke_) {
-    strokeStyle = this.stroke_.getColor();
-    if (strokeStyle === null) {
-      strokeStyle = ol.render.canvas.defaultStrokeStyle;
-    }
-    strokeStyle = ol.colorlike.asColorLike(strokeStyle);
-    strokeWidth = this.stroke_.getWidth();
-    if (strokeWidth === undefined) {
-      strokeWidth = ol.render.canvas.defaultLineWidth;
-    }
-    lineDash = this.stroke_.getLineDash();
-    lineDashOffset = this.stroke_.getLineDashOffset();
-    if (!ol.has.CANVAS_LINE_DASH) {
-      lineDash = null;
-      lineDashOffset = 0;
-    }
-    lineJoin = this.stroke_.getLineJoin();
-    if (lineJoin === undefined) {
-      lineJoin = ol.render.canvas.defaultLineJoin;
-    }
-    lineCap = this.stroke_.getLineCap();
-    if (lineCap === undefined) {
-      lineCap = ol.render.canvas.defaultLineCap;
-    }
-    miterLimit = this.stroke_.getMiterLimit();
-    if (miterLimit === undefined) {
-      miterLimit = ol.render.canvas.defaultMiterLimit;
-    }
-  }
-
-  var size = 2 * (this.radius_ + strokeWidth) + 1;
-
-  /** @type {ol.RegularShapeRenderOptions} */
-  var renderOptions = {
-    strokeStyle: strokeStyle,
-    strokeWidth: strokeWidth,
-    size: size,
-    lineCap: lineCap,
-    lineDash: lineDash,
-    lineDashOffset: lineDashOffset,
-    lineJoin: lineJoin,
-    miterLimit: miterLimit
-  };
-
-  if (atlasManager === undefined) {
-    // no atlas manager is used, create a new canvas
-    var context = ol.dom.createCanvasContext2D(size, size);
-    this.canvas_ = context.canvas;
-
-    // canvas.width and height are rounded to the closest integer
-    size = this.canvas_.width;
-    imageSize = size;
-
-    this.draw_(renderOptions, context, 0, 0);
-
-    this.createHitDetectionCanvas_(renderOptions);
-  } else {
-    // an atlas manager is used, add the symbol to an atlas
-    size = Math.round(size);
-
-    var hasCustomHitDetectionImage = !this.fill_;
-    var renderHitDetectionCallback;
-    if (hasCustomHitDetectionImage) {
-      // render the hit-detection image into a separate atlas image
-      renderHitDetectionCallback =
-          this.drawHitDetectionCanvas_.bind(this, renderOptions);
-    }
-
-    var id = this.getChecksum();
-    var info = atlasManager.add(
-        id, size, size, this.draw_.bind(this, renderOptions),
-        renderHitDetectionCallback);
-
-    this.canvas_ = info.image;
-    this.origin_ = [info.offsetX, info.offsetY];
-    imageSize = info.image.width;
-
-    if (hasCustomHitDetectionImage) {
-      this.hitDetectionCanvas_ = info.hitImage;
-      this.hitDetectionImageSize_ =
-          [info.hitImage.width, info.hitImage.height];
-    } else {
-      this.hitDetectionCanvas_ = this.canvas_;
-      this.hitDetectionImageSize_ = [imageSize, imageSize];
-    }
-  }
-
-  this.anchor_ = [size / 2, size / 2];
-  this.size_ = [size, size];
-  this.imageSize_ = [imageSize, imageSize];
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The rendering context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.RegularShape.prototype.draw_ = function(renderOptions, context, x, y) {
-  var i, angle0, radiusC;
-  // reset transform
-  context.setTransform(1, 0, 0, 1, 0, 0);
-
-  // then move to (x, y)
-  context.translate(x, y);
-
-  context.beginPath();
-
-  var points = this.points_;
-  if (points === Infinity) {
-    context.arc(
-        renderOptions.size / 2, renderOptions.size / 2,
-        this.radius_, 0, 2 * Math.PI, true);
-  } else {
-    var radius2 = (this.radius2_ !== undefined) ? this.radius2_
-      : this.radius_;
-    if (radius2 !== this.radius_) {
-      points = 2 * points;
-    }
-    for (i = 0; i <= points; i++) {
-      angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
-      radiusC = i % 2 === 0 ? this.radius_ : radius2;
-      context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
-          renderOptions.size / 2 + radiusC * Math.sin(angle0));
-    }
-  }
-
-
-  if (this.fill_) {
-    var color = this.fill_.getColor();
-    if (color === null) {
-      color = ol.render.canvas.defaultFillStyle;
-    }
-    context.fillStyle = ol.colorlike.asColorLike(color);
-    context.fill();
-  }
-  if (this.stroke_) {
-    context.strokeStyle = renderOptions.strokeStyle;
-    context.lineWidth = renderOptions.strokeWidth;
-    if (renderOptions.lineDash) {
-      context.setLineDash(renderOptions.lineDash);
-      context.lineDashOffset = renderOptions.lineDashOffset;
-    }
-    context.lineCap = renderOptions.lineCap;
-    context.lineJoin = renderOptions.lineJoin;
-    context.miterLimit = renderOptions.miterLimit;
-    context.stroke();
-  }
-  context.closePath();
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- */
-ol.style.RegularShape.prototype.createHitDetectionCanvas_ = function(renderOptions) {
-  this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];
-  if (this.fill_) {
-    this.hitDetectionCanvas_ = this.canvas_;
-    return;
-  }
-
-  // if no fill style is set, create an extra hit-detection image with a
-  // default fill style
-  var context = ol.dom.createCanvasContext2D(renderOptions.size, renderOptions.size);
-  this.hitDetectionCanvas_ = context.canvas;
-
-  this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);
-};
-
-
-/**
- * @private
- * @param {ol.RegularShapeRenderOptions} renderOptions Render options.
- * @param {CanvasRenderingContext2D} context The context.
- * @param {number} x The origin for the symbol (x).
- * @param {number} y The origin for the symbol (y).
- */
-ol.style.RegularShape.prototype.drawHitDetectionCanvas_ = function(renderOptions, context, x, y) {
-  // reset transform
-  context.setTransform(1, 0, 0, 1, 0, 0);
-
-  // then move to (x, y)
-  context.translate(x, y);
-
-  context.beginPath();
-
-  var points = this.points_;
-  if (points === Infinity) {
-    context.arc(
-        renderOptions.size / 2, renderOptions.size / 2,
-        this.radius_, 0, 2 * Math.PI, true);
-  } else {
-    var radius2 = (this.radius2_ !== undefined) ? this.radius2_
-      : this.radius_;
-    if (radius2 !== this.radius_) {
-      points = 2 * points;
-    }
-    var i, radiusC, angle0;
-    for (i = 0; i <= points; i++) {
-      angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;
-      radiusC = i % 2 === 0 ? this.radius_ : radius2;
-      context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),
-          renderOptions.size / 2 + radiusC * Math.sin(angle0));
-    }
-  }
-
-  context.fillStyle = ol.render.canvas.defaultFillStyle;
-  context.fill();
-  if (this.stroke_) {
-    context.strokeStyle = renderOptions.strokeStyle;
-    context.lineWidth = renderOptions.strokeWidth;
-    if (renderOptions.lineDash) {
-      context.setLineDash(renderOptions.lineDash);
-      context.lineDashOffset = renderOptions.lineDashOffset;
-    }
-    context.stroke();
-  }
-  context.closePath();
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.RegularShape.prototype.getChecksum = function() {
-  var strokeChecksum = this.stroke_ ?
-    this.stroke_.getChecksum() : '-';
-  var fillChecksum = this.fill_ ?
-    this.fill_.getChecksum() : '-';
-
-  var recalculate = !this.checksums_ ||
-      (strokeChecksum != this.checksums_[1] ||
-      fillChecksum != this.checksums_[2] ||
-      this.radius_ != this.checksums_[3] ||
-      this.radius2_ != this.checksums_[4] ||
-      this.angle_ != this.checksums_[5] ||
-      this.points_ != this.checksums_[6]);
-
-  if (recalculate) {
-    var checksum = 'r' + strokeChecksum + fillChecksum +
-        (this.radius_ !== undefined ? this.radius_.toString() : '-') +
-        (this.radius2_ !== undefined ? this.radius2_.toString() : '-') +
-        (this.angle_ !== undefined ? this.angle_.toString() : '-') +
-        (this.points_ !== undefined ? this.points_.toString() : '-');
-    this.checksums_ = [checksum, strokeChecksum, fillChecksum,
-      this.radius_, this.radius2_, this.angle_, this.points_];
-  }
-
-  return this.checksums_[0];
-};
-
-goog.provide('ol.style.Circle');
-
-goog.require('ol');
-goog.require('ol.style.RegularShape');
-
-
-/**
- * @classdesc
- * Set circle style for vector features.
- *
- * @constructor
- * @param {olx.style.CircleOptions=} opt_options Options.
- * @extends {ol.style.RegularShape}
- * @api
- */
-ol.style.Circle = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.style.RegularShape.call(this, {
-    points: Infinity,
-    fill: options.fill,
-    radius: options.radius,
-    snapToPixel: options.snapToPixel,
-    stroke: options.stroke,
-    atlasManager: options.atlasManager
-  });
-
-};
-ol.inherits(ol.style.Circle, ol.style.RegularShape);
-
-
-/**
- * Clones the style.  If an atlasmanager was provided to the original style it will be used in the cloned style, too.
- * @return {ol.style.Circle} The cloned style.
- * @override
- * @api
- */
-ol.style.Circle.prototype.clone = function() {
-  var style = new ol.style.Circle({
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    radius: this.getRadius(),
-    snapToPixel: this.getSnapToPixel(),
-    atlasManager: this.atlasManager_
-  });
-  style.setOpacity(this.getOpacity());
-  style.setScale(this.getScale());
-  return style;
-};
-
-
-/**
- * Set the circle radius.
- *
- * @param {number} radius Circle radius.
- * @api
- */
-ol.style.Circle.prototype.setRadius = function(radius) {
-  this.radius_ = radius;
-  this.render_(this.atlasManager_);
-};
-
-goog.provide('ol.style.Fill');
-
-goog.require('ol');
-goog.require('ol.color');
-
-
-/**
- * @classdesc
- * Set fill style for vector features.
- *
- * @constructor
- * @param {olx.style.FillOptions=} opt_options Options.
- * @api
- */
-ol.style.Fill = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Color|ol.ColorLike}
-   */
-  this.color_ = options.color !== undefined ? options.color : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Clones the style. The color is not cloned if it is an {@link ol.ColorLike}.
- * @return {ol.style.Fill} The cloned style.
- * @api
- */
-ol.style.Fill.prototype.clone = function() {
-  var color = this.getColor();
-  return new ol.style.Fill({
-    color: (color && color.slice) ? color.slice() : color || undefined
-  });
-};
-
-
-/**
- * Get the fill color.
- * @return {ol.Color|ol.ColorLike} Color.
- * @api
- */
-ol.style.Fill.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Set the color.
- *
- * @param {ol.Color|ol.ColorLike} color Color.
- * @api
- */
-ol.style.Fill.prototype.setColor = function(color) {
-  this.color_ = color;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.Fill.prototype.getChecksum = function() {
-  if (this.checksum_ === undefined) {
-    if (
-      this.color_ instanceof CanvasPattern ||
-        this.color_ instanceof CanvasGradient
-    ) {
-      this.checksum_ = ol.getUid(this.color_).toString();
-    } else {
-      this.checksum_ = 'f' + (this.color_ ?
-        ol.color.asString(this.color_) : '-');
-    }
-  }
-
-  return this.checksum_;
-};
-
-goog.provide('ol.style.Stroke');
-
-goog.require('ol');
-
-
-/**
- * @classdesc
- * Set stroke style for vector features.
- * Note that the defaults given are the Canvas defaults, which will be used if
- * option is not defined. The `get` functions return whatever was entered in
- * the options; they will not return the default.
- *
- * @constructor
- * @param {olx.style.StrokeOptions=} opt_options Options.
- * @api
- */
-ol.style.Stroke = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {ol.Color|ol.ColorLike}
-   */
-  this.color_ = options.color !== undefined ? options.color : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.lineCap_ = options.lineCap;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lineDashOffset_ = options.lineDashOffset;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.lineJoin_ = options.lineJoin;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.miterLimit_ = options.miterLimit;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.width_ = options.width;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Clones the style.
- * @return {ol.style.Stroke} The cloned style.
- * @api
- */
-ol.style.Stroke.prototype.clone = function() {
-  var color = this.getColor();
-  return new ol.style.Stroke({
-    color: (color && color.slice) ? color.slice() : color || undefined,
-    lineCap: this.getLineCap(),
-    lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,
-    lineDashOffset: this.getLineDashOffset(),
-    lineJoin: this.getLineJoin(),
-    miterLimit: this.getMiterLimit(),
-    width: this.getWidth()
-  });
-};
-
-
-/**
- * Get the stroke color.
- * @return {ol.Color|ol.ColorLike} Color.
- * @api
- */
-ol.style.Stroke.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Get the line cap type for the stroke.
- * @return {string|undefined} Line cap.
- * @api
- */
-ol.style.Stroke.prototype.getLineCap = function() {
-  return this.lineCap_;
-};
-
-
-/**
- * Get the line dash style for the stroke.
- * @return {Array.<number>} Line dash.
- * @api
- */
-ol.style.Stroke.prototype.getLineDash = function() {
-  return this.lineDash_;
-};
-
-
-/**
- * Get the line dash offset for the stroke.
- * @return {number|undefined} Line dash offset.
- * @api
- */
-ol.style.Stroke.prototype.getLineDashOffset = function() {
-  return this.lineDashOffset_;
-};
-
-
-/**
- * Get the line join type for the stroke.
- * @return {string|undefined} Line join.
- * @api
- */
-ol.style.Stroke.prototype.getLineJoin = function() {
-  return this.lineJoin_;
-};
-
-
-/**
- * Get the miter limit for the stroke.
- * @return {number|undefined} Miter limit.
- * @api
- */
-ol.style.Stroke.prototype.getMiterLimit = function() {
-  return this.miterLimit_;
-};
-
-
-/**
- * Get the stroke width.
- * @return {number|undefined} Width.
- * @api
- */
-ol.style.Stroke.prototype.getWidth = function() {
-  return this.width_;
-};
-
-
-/**
- * Set the color.
- *
- * @param {ol.Color|ol.ColorLike} color Color.
- * @api
- */
-ol.style.Stroke.prototype.setColor = function(color) {
-  this.color_ = color;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line cap.
- *
- * @param {string|undefined} lineCap Line cap.
- * @api
- */
-ol.style.Stroke.prototype.setLineCap = function(lineCap) {
-  this.lineCap_ = lineCap;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line dash.
- *
- * Please note that Internet Explorer 10 and lower [do not support][mdn] the
- * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this
- * property will have no visual effect in these browsers.
- *
- * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility
- *
- * @param {Array.<number>} lineDash Line dash.
- * @api
- */
-ol.style.Stroke.prototype.setLineDash = function(lineDash) {
-  this.lineDash_ = lineDash;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line dash offset.
- *
- * @param {number|undefined} lineDashOffset Line dash offset.
- * @api
- */
-ol.style.Stroke.prototype.setLineDashOffset = function(lineDashOffset) {
-  this.lineDashOffset_ = lineDashOffset;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the line join.
- *
- * @param {string|undefined} lineJoin Line join.
- * @api
- */
-ol.style.Stroke.prototype.setLineJoin = function(lineJoin) {
-  this.lineJoin_ = lineJoin;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the miter limit.
- *
- * @param {number|undefined} miterLimit Miter limit.
- * @api
- */
-ol.style.Stroke.prototype.setMiterLimit = function(miterLimit) {
-  this.miterLimit_ = miterLimit;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * Set the width.
- *
- * @param {number|undefined} width Width.
- * @api
- */
-ol.style.Stroke.prototype.setWidth = function(width) {
-  this.width_ = width;
-  this.checksum_ = undefined;
-};
-
-
-/**
- * @return {string} The checksum.
- */
-ol.style.Stroke.prototype.getChecksum = function() {
-  if (this.checksum_ === undefined) {
-    this.checksum_ = 's';
-    if (this.color_) {
-      if (typeof this.color_ === 'string') {
-        this.checksum_ += this.color_;
-      } else {
-        this.checksum_ += ol.getUid(this.color_).toString();
-      }
-    } else {
-      this.checksum_ += '-';
-    }
-    this.checksum_ += ',' +
-        (this.lineCap_ !== undefined ?
-          this.lineCap_.toString() : '-') + ',' +
-        (this.lineDash_ ?
-          this.lineDash_.toString() : '-') + ',' +
-        (this.lineDashOffset_ !== undefined ?
-          this.lineDashOffset_ : '-') + ',' +
-        (this.lineJoin_ !== undefined ?
-          this.lineJoin_ : '-') + ',' +
-        (this.miterLimit_ !== undefined ?
-          this.miterLimit_.toString() : '-') + ',' +
-        (this.width_ !== undefined ?
-          this.width_.toString() : '-');
-  }
-
-  return this.checksum_;
-};
-
-goog.provide('ol.style.Style');
-
-goog.require('ol.asserts');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.style.Circle');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Stroke');
-
-
-/**
- * @classdesc
- * Container for vector feature rendering styles. Any changes made to the style
- * or its children through `set*()` methods will not take effect until the
- * feature or layer that uses the style is re-rendered.
- *
- * @constructor
- * @struct
- * @param {olx.style.StyleOptions=} opt_options Style options.
- * @api
- */
-ol.style.Style = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {string|ol.geom.Geometry|ol.StyleGeometryFunction}
-   */
-  this.geometry_ = null;
-
-  /**
-   * @private
-   * @type {!ol.StyleGeometryFunction}
-   */
-  this.geometryFunction_ = ol.style.Style.defaultGeometryFunction;
-
-  if (options.geometry !== undefined) {
-    this.setGeometry(options.geometry);
-  }
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill : null;
-
-  /**
-   * @private
-   * @type {ol.style.Image}
-   */
-  this.image_ = options.image !== undefined ? options.image : null;
-
-  /**
-   * @private
-   * @type {ol.StyleRenderFunction|null}
-   */
-  this.renderer_ = options.renderer !== undefined ? options.renderer : null;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {ol.style.Text}
-   */
-  this.text_ = options.text !== undefined ? options.text : null;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.zIndex_ = options.zIndex;
-
-};
-
-
-/**
- * Clones the style.
- * @return {ol.style.Style} The cloned style.
- * @api
- */
-ol.style.Style.prototype.clone = function() {
-  var geometry = this.getGeometry();
-  if (geometry && geometry.clone) {
-    geometry = geometry.clone();
-  }
-  return new ol.style.Style({
-    geometry: geometry,
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    image: this.getImage() ? this.getImage().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    text: this.getText() ? this.getText().clone() : undefined,
-    zIndex: this.getZIndex()
-  });
-};
-
-
-/**
- * Get the custom renderer function that was configured with
- * {@link #setRenderer} or the `renderer` constructor option.
- * @return {ol.StyleRenderFunction|null} Custom renderer function.
- * @api
- */
-ol.style.Style.prototype.getRenderer = function() {
-  return this.renderer_;
-};
-
-
-/**
- * Sets a custom renderer function for this style. When set, `fill`, `stroke`
- * and `image` options of the style will be ignored.
- * @param {ol.StyleRenderFunction|null} renderer Custom renderer function.
- * @api
- */
-ol.style.Style.prototype.setRenderer = function(renderer) {
-  this.renderer_ = renderer;
-};
-
-
-/**
- * Get the geometry to be rendered.
- * @return {string|ol.geom.Geometry|ol.StyleGeometryFunction}
- * Feature property or geometry or function that returns the geometry that will
- * be rendered with this style.
- * @api
- */
-ol.style.Style.prototype.getGeometry = function() {
-  return this.geometry_;
-};
-
-
-/**
- * Get the function used to generate a geometry for rendering.
- * @return {!ol.StyleGeometryFunction} Function that is called with a feature
- * and returns the geometry to render instead of the feature's geometry.
- * @api
- */
-ol.style.Style.prototype.getGeometryFunction = function() {
-  return this.geometryFunction_;
-};
-
-
-/**
- * Get the fill style.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Style.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * Set the fill style.
- * @param {ol.style.Fill} fill Fill style.
- * @api
- */
-ol.style.Style.prototype.setFill = function(fill) {
-  this.fill_ = fill;
-};
-
-
-/**
- * Get the image style.
- * @return {ol.style.Image} Image style.
- * @api
- */
-ol.style.Style.prototype.getImage = function() {
-  return this.image_;
-};
-
-
-/**
- * Set the image style.
- * @param {ol.style.Image} image Image style.
- * @api
- */
-ol.style.Style.prototype.setImage = function(image) {
-  this.image_ = image;
-};
-
-
-/**
- * Get the stroke style.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Style.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * Set the stroke style.
- * @param {ol.style.Stroke} stroke Stroke style.
- * @api
- */
-ol.style.Style.prototype.setStroke = function(stroke) {
-  this.stroke_ = stroke;
-};
-
-
-/**
- * Get the text style.
- * @return {ol.style.Text} Text style.
- * @api
- */
-ol.style.Style.prototype.getText = function() {
-  return this.text_;
-};
-
-
-/**
- * Set the text style.
- * @param {ol.style.Text} text Text style.
- * @api
- */
-ol.style.Style.prototype.setText = function(text) {
-  this.text_ = text;
-};
-
-
-/**
- * Get the z-index for the style.
- * @return {number|undefined} ZIndex.
- * @api
- */
-ol.style.Style.prototype.getZIndex = function() {
-  return this.zIndex_;
-};
-
-
-/**
- * Set a geometry that is rendered instead of the feature's geometry.
- *
- * @param {string|ol.geom.Geometry|ol.StyleGeometryFunction} geometry
- *     Feature property or geometry or function returning a geometry to render
- *     for this style.
- * @api
- */
-ol.style.Style.prototype.setGeometry = function(geometry) {
-  if (typeof geometry === 'function') {
-    this.geometryFunction_ = geometry;
-  } else if (typeof geometry === 'string') {
-    this.geometryFunction_ = function(feature) {
-      return /** @type {ol.geom.Geometry} */ (feature.get(geometry));
-    };
-  } else if (!geometry) {
-    this.geometryFunction_ = ol.style.Style.defaultGeometryFunction;
-  } else if (geometry !== undefined) {
-    this.geometryFunction_ = function() {
-      return /** @type {ol.geom.Geometry} */ (geometry);
-    };
-  }
-  this.geometry_ = geometry;
-};
-
-
-/**
- * Set the z-index.
- *
- * @param {number|undefined} zIndex ZIndex.
- * @api
- */
-ol.style.Style.prototype.setZIndex = function(zIndex) {
-  this.zIndex_ = zIndex;
-};
-
-
-/**
- * Convert the provided object into a style function.  Functions passed through
- * unchanged.  Arrays of ol.style.Style or single style objects wrapped in a
- * new style function.
- * @param {ol.StyleFunction|Array.<ol.style.Style>|ol.style.Style} obj
- *     A style function, a single style, or an array of styles.
- * @return {ol.StyleFunction} A style function.
- */
-ol.style.Style.createFunction = function(obj) {
-  var styleFunction;
-
-  if (typeof obj === 'function') {
-    styleFunction = obj;
-  } else {
-    /**
-     * @type {Array.<ol.style.Style>}
-     */
-    var styles;
-    if (Array.isArray(obj)) {
-      styles = obj;
-    } else {
-      ol.asserts.assert(obj instanceof ol.style.Style,
-          41); // Expected an `ol.style.Style` or an array of `ol.style.Style`
-      styles = [obj];
-    }
-    styleFunction = function() {
-      return styles;
-    };
-  }
-  return styleFunction;
-};
-
-
-/**
- * @type {Array.<ol.style.Style>}
- * @private
- */
-ol.style.Style.default_ = null;
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.style.Style>} Style.
- */
-ol.style.Style.defaultFunction = function(feature, resolution) {
-  // We don't use an immediately-invoked function
-  // and a closure so we don't get an error at script evaluation time in
-  // browsers that do not support Canvas. (ol.style.Circle does
-  // canvas.getContext('2d') at construction time, which will cause an.error
-  // in such browsers.)
-  if (!ol.style.Style.default_) {
-    var fill = new ol.style.Fill({
-      color: 'rgba(255,255,255,0.4)'
-    });
-    var stroke = new ol.style.Stroke({
-      color: '#3399CC',
-      width: 1.25
-    });
-    ol.style.Style.default_ = [
-      new ol.style.Style({
-        image: new ol.style.Circle({
-          fill: fill,
-          stroke: stroke,
-          radius: 5
-        }),
-        fill: fill,
-        stroke: stroke
-      })
-    ];
-  }
-  return ol.style.Style.default_;
-};
-
-
-/**
- * Default styles for editing features.
- * @return {Object.<ol.geom.GeometryType, Array.<ol.style.Style>>} Styles
- */
-ol.style.Style.createDefaultEditing = function() {
-  /** @type {Object.<ol.geom.GeometryType, Array.<ol.style.Style>>} */
-  var styles = {};
-  var white = [255, 255, 255, 1];
-  var blue = [0, 153, 255, 1];
-  var width = 3;
-  styles[ol.geom.GeometryType.POLYGON] = [
-    new ol.style.Style({
-      fill: new ol.style.Fill({
-        color: [255, 255, 255, 0.5]
-      })
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_POLYGON] =
-      styles[ol.geom.GeometryType.POLYGON];
-
-  styles[ol.geom.GeometryType.LINE_STRING] = [
-    new ol.style.Style({
-      stroke: new ol.style.Stroke({
-        color: white,
-        width: width + 2
-      })
-    }),
-    new ol.style.Style({
-      stroke: new ol.style.Stroke({
-        color: blue,
-        width: width
-      })
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_LINE_STRING] =
-      styles[ol.geom.GeometryType.LINE_STRING];
-
-  styles[ol.geom.GeometryType.CIRCLE] =
-      styles[ol.geom.GeometryType.POLYGON].concat(
-          styles[ol.geom.GeometryType.LINE_STRING]
-      );
-
-
-  styles[ol.geom.GeometryType.POINT] = [
-    new ol.style.Style({
-      image: new ol.style.Circle({
-        radius: width * 2,
-        fill: new ol.style.Fill({
-          color: blue
-        }),
-        stroke: new ol.style.Stroke({
-          color: white,
-          width: width / 2
-        })
-      }),
-      zIndex: Infinity
-    })
-  ];
-  styles[ol.geom.GeometryType.MULTI_POINT] =
-      styles[ol.geom.GeometryType.POINT];
-
-  styles[ol.geom.GeometryType.GEOMETRY_COLLECTION] =
-      styles[ol.geom.GeometryType.POLYGON].concat(
-          styles[ol.geom.GeometryType.LINE_STRING],
-          styles[ol.geom.GeometryType.POINT]
-      );
-
-  return styles;
-};
-
-
-/**
- * Function that is called with a feature and returns its default geometry.
- * @param {ol.Feature|ol.render.Feature} feature Feature to get the geometry
- *     for.
- * @return {ol.geom.Geometry|ol.render.Feature|undefined} Geometry to render.
- */
-ol.style.Style.defaultGeometryFunction = function(feature) {
-  return feature.getGeometry();
-};
-
-goog.provide('ol.Feature');
-
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.geom.Geometry');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * A vector object for geographic features with a geometry and other
- * attribute properties, similar to the features in vector file formats like
- * GeoJSON.
- *
- * Features can be styled individually with `setStyle`; otherwise they use the
- * style of their vector layer.
- *
- * Note that attribute properties are set as {@link ol.Object} properties on
- * the feature object, so they are observable, and have get/set accessors.
- *
- * Typically, a feature has a single geometry property. You can set the
- * geometry using the `setGeometry` method and get it with `getGeometry`.
- * It is possible to store more than one geometry on a feature using attribute
- * properties. By default, the geometry used for rendering is identified by
- * the property name `geometry`. If you want to use another geometry property
- * for rendering, use the `setGeometryName` method to change the attribute
- * property associated with the geometry for the feature.  For example:
- *
- * ```js
- * var feature = new ol.Feature({
- *   geometry: new ol.geom.Polygon(polyCoords),
- *   labelPoint: new ol.geom.Point(labelCoords),
- *   name: 'My Polygon'
- * });
- *
- * // get the polygon geometry
- * var poly = feature.getGeometry();
- *
- * // Render the feature as a point using the coordinates from labelPoint
- * feature.setGeometryName('labelPoint');
- *
- * // get the point geometry
- * var point = feature.getGeometry();
- * ```
- *
- * @constructor
- * @extends {ol.Object}
- * @param {ol.geom.Geometry|Object.<string, *>=} opt_geometryOrProperties
- *     You may pass a Geometry object directly, or an object literal
- *     containing properties.  If you pass an object literal, you may
- *     include a Geometry associated with a `geometry` key.
- * @api
- */
-ol.Feature = function(opt_geometryOrProperties) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {number|string|undefined}
-   */
-  this.id_ = undefined;
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.geometryName_ = 'geometry';
-
-  /**
-   * User provided style.
-   * @private
-   * @type {ol.style.Style|Array.<ol.style.Style>|
-   *     ol.FeatureStyleFunction}
-   */
-  this.style_ = null;
-
-  /**
-   * @private
-   * @type {ol.FeatureStyleFunction|undefined}
-   */
-  this.styleFunction_ = undefined;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.geometryChangeKey_ = null;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-
-  if (opt_geometryOrProperties !== undefined) {
-    if (opt_geometryOrProperties instanceof ol.geom.Geometry ||
-        !opt_geometryOrProperties) {
-      var geometry = opt_geometryOrProperties;
-      this.setGeometry(geometry);
-    } else {
-      /** @type {Object.<string, *>} */
-      var properties = opt_geometryOrProperties;
-      this.setProperties(properties);
-    }
-  }
-};
-ol.inherits(ol.Feature, ol.Object);
-
-
-/**
- * Clone this feature. If the original feature has a geometry it
- * is also cloned. The feature id is not set in the clone.
- * @return {ol.Feature} The clone.
- * @api
- */
-ol.Feature.prototype.clone = function() {
-  var clone = new ol.Feature(this.getProperties());
-  clone.setGeometryName(this.getGeometryName());
-  var geometry = this.getGeometry();
-  if (geometry) {
-    clone.setGeometry(geometry.clone());
-  }
-  var style = this.getStyle();
-  if (style) {
-    clone.setStyle(style);
-  }
-  return clone;
-};
-
-
-/**
- * Get the feature's default geometry.  A feature may have any number of named
- * geometries.  The "default" geometry (the one that is rendered by default) is
- * set when calling {@link ol.Feature#setGeometry}.
- * @return {ol.geom.Geometry|undefined} The default geometry for the feature.
- * @api
- * @observable
- */
-ol.Feature.prototype.getGeometry = function() {
-  return /** @type {ol.geom.Geometry|undefined} */ (
-    this.get(this.geometryName_));
-};
-
-
-/**
- * Get the feature identifier.  This is a stable identifier for the feature and
- * is either set when reading data from a remote source or set explicitly by
- * calling {@link ol.Feature#setId}.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.Feature.prototype.getId = function() {
-  return this.id_;
-};
-
-
-/**
- * Get the name of the feature's default geometry.  By default, the default
- * geometry is named `geometry`.
- * @return {string} Get the property name associated with the default geometry
- *     for this feature.
- * @api
- */
-ol.Feature.prototype.getGeometryName = function() {
-  return this.geometryName_;
-};
-
-
-/**
- * Get the feature's style. Will return what was provided to the
- * {@link ol.Feature#setStyle} method.
- * @return {ol.style.Style|Array.<ol.style.Style>|
- *     ol.FeatureStyleFunction|ol.StyleFunction} The feature style.
- * @api
- */
-ol.Feature.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the feature's style function.
- * @return {ol.FeatureStyleFunction|undefined} Return a function
- * representing the current style of this feature.
- * @api
- */
-ol.Feature.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @private
- */
-ol.Feature.prototype.handleGeometryChange_ = function() {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.Feature.prototype.handleGeometryChanged_ = function() {
-  if (this.geometryChangeKey_) {
-    ol.events.unlistenByKey(this.geometryChangeKey_);
-    this.geometryChangeKey_ = null;
-  }
-  var geometry = this.getGeometry();
-  if (geometry) {
-    this.geometryChangeKey_ = ol.events.listen(geometry,
-        ol.events.EventType.CHANGE, this.handleGeometryChange_, this);
-  }
-  this.changed();
-};
-
-
-/**
- * Set the default geometry for the feature.  This will update the property
- * with the name returned by {@link ol.Feature#getGeometryName}.
- * @param {ol.geom.Geometry|undefined} geometry The new geometry.
- * @api
- * @observable
- */
-ol.Feature.prototype.setGeometry = function(geometry) {
-  this.set(this.geometryName_, geometry);
-};
-
-
-/**
- * Set the style for the feature.  This can be a single style object, an array
- * of styles, or a function that takes a resolution and returns an array of
- * styles. If it is `null` the feature has no style (a `null` style).
- * @param {ol.style.Style|Array.<ol.style.Style>|
- *     ol.FeatureStyleFunction|ol.StyleFunction} style Style for this feature.
- * @api
- * @fires ol.events.Event#event:change
- */
-ol.Feature.prototype.setStyle = function(style) {
-  this.style_ = style;
-  this.styleFunction_ = !style ?
-    undefined : ol.Feature.createStyleFunction(style);
-  this.changed();
-};
-
-
-/**
- * Set the feature id.  The feature id is considered stable and may be used when
- * requesting features or comparing identifiers returned from a remote source.
- * The feature id can be used with the {@link ol.source.Vector#getFeatureById}
- * method.
- * @param {number|string|undefined} id The feature id.
- * @api
- * @fires ol.events.Event#event:change
- */
-ol.Feature.prototype.setId = function(id) {
-  this.id_ = id;
-  this.changed();
-};
-
-
-/**
- * Set the property name to be used when getting the feature's default geometry.
- * When calling {@link ol.Feature#getGeometry}, the value of the property with
- * this name will be returned.
- * @param {string} name The property name of the default geometry.
- * @api
- */
-ol.Feature.prototype.setGeometryName = function(name) {
-  ol.events.unlisten(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-  this.geometryName_ = name;
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(this.geometryName_),
-      this.handleGeometryChanged_, this);
-  this.handleGeometryChanged_();
-};
-
-
-/**
- * Convert the provided object into a feature style function.  Functions passed
- * through unchanged.  Arrays of ol.style.Style or single style objects wrapped
- * in a new feature style function.
- * @param {ol.FeatureStyleFunction|!Array.<ol.style.Style>|!ol.style.Style} obj
- *     A feature style function, a single style, or an array of styles.
- * @return {ol.FeatureStyleFunction} A style function.
- */
-ol.Feature.createStyleFunction = function(obj) {
-  var styleFunction;
-
-  if (typeof obj === 'function') {
-    if (obj.length == 2) {
-      styleFunction = function(resolution) {
-        return /** @type {ol.StyleFunction} */ (obj)(this, resolution);
-      };
-    } else {
-      styleFunction = obj;
-    }
-  } else {
-    /**
-     * @type {Array.<ol.style.Style>}
-     */
-    var styles;
-    if (Array.isArray(obj)) {
-      styles = obj;
-    } else {
-      ol.asserts.assert(obj instanceof ol.style.Style,
-          41); // Expected an `ol.style.Style` or an array of `ol.style.Style`
-      styles = [obj];
-    }
-    styleFunction = function() {
-      return styles;
-    };
-  }
-  return styleFunction;
-};
-
-goog.provide('ol.format.FormatType');
-
-
-/**
- * @enum {string}
- */
-ol.format.FormatType = {
-  ARRAY_BUFFER: 'arraybuffer',
-  JSON: 'json',
-  TEXT: 'text',
-  XML: 'xml'
-};
-
-goog.provide('ol.xml');
-
-goog.require('ol.array');
-
-
-/**
- * This document should be used when creating nodes for XML serializations. This
- * document is also used by {@link ol.xml.createElementNS} and
- * {@link ol.xml.setAttributeNS}
- * @const
- * @type {Document}
- */
-ol.xml.DOCUMENT = document.implementation.createDocument('', '', null);
-
-
-/**
- * @param {string} namespaceURI Namespace URI.
- * @param {string} qualifiedName Qualified name.
- * @return {Node} Node.
- */
-ol.xml.createElementNS = function(namespaceURI, qualifiedName) {
-  return ol.xml.DOCUMENT.createElementNS(namespaceURI, qualifiedName);
-};
-
-
-/**
- * Recursively grab all text content of child nodes into a single string.
- * @param {Node} node Node.
- * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
- * breaks.
- * @return {string} All text content.
- * @api
- */
-ol.xml.getAllTextContent = function(node, normalizeWhitespace) {
-  return ol.xml.getAllTextContent_(node, normalizeWhitespace, []).join('');
-};
-
-
-/**
- * Recursively grab all text content of child nodes into a single string.
- * @param {Node} node Node.
- * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line
- * breaks.
- * @param {Array.<string>} accumulator Accumulator.
- * @private
- * @return {Array.<string>} Accumulator.
- */
-ol.xml.getAllTextContent_ = function(node, normalizeWhitespace, accumulator) {
-  if (node.nodeType == Node.CDATA_SECTION_NODE ||
-      node.nodeType == Node.TEXT_NODE) {
-    if (normalizeWhitespace) {
-      accumulator.push(String(node.nodeValue).replace(/(\r\n|\r|\n)/g, ''));
-    } else {
-      accumulator.push(node.nodeValue);
-    }
-  } else {
-    var n;
-    for (n = node.firstChild; n; n = n.nextSibling) {
-      ol.xml.getAllTextContent_(n, normalizeWhitespace, accumulator);
-    }
-  }
-  return accumulator;
-};
-
-
-/**
- * @param {?} value Value.
- * @return {boolean} Is document.
- */
-ol.xml.isDocument = function(value) {
-  return value instanceof Document;
-};
-
-
-/**
- * @param {?} value Value.
- * @return {boolean} Is node.
- */
-ol.xml.isNode = function(value) {
-  return value instanceof Node;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {?string} namespaceURI Namespace URI.
- * @param {string} name Attribute name.
- * @return {string} Value
- */
-ol.xml.getAttributeNS = function(node, namespaceURI, name) {
-  return node.getAttributeNS(namespaceURI, name) || '';
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {?string} namespaceURI Namespace URI.
- * @param {string} name Attribute name.
- * @param {string|number} value Value.
- */
-ol.xml.setAttributeNS = function(node, namespaceURI, name, value) {
-  node.setAttributeNS(namespaceURI, name, value);
-};
-
-
-/**
- * Parse an XML string to an XML Document.
- * @param {string} xml XML.
- * @return {Document} Document.
- * @api
- */
-ol.xml.parse = function(xml) {
-  return new DOMParser().parseFromString(xml, 'application/xml');
-};
-
-
-/**
- * Make an array extender function for extending the array at the top of the
- * object stack.
- * @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)}
- *     valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeArrayExtender = function(valueReader, opt_this) {
-  return (
-    /**
-     * @param {Node} node Node.
-     * @param {Array.<*>} objectStack Object stack.
-     */
-    function(node, objectStack) {
-      var value = valueReader.call(opt_this, node, objectStack);
-      if (value !== undefined) {
-        var array = /** @type {Array.<*>} */
-              (objectStack[objectStack.length - 1]);
-        ol.array.extend(array, value);
-      }
-    });
-};
-
-
-/**
- * Make an array pusher function for pushing to the array at the top of the
- * object stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeArrayPusher = function(valueReader, opt_this) {
-  return (
-    /**
-     * @param {Node} node Node.
-     * @param {Array.<*>} objectStack Object stack.
-     */
-    function(node, objectStack) {
-      var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-          node, objectStack);
-      if (value !== undefined) {
-        var array = objectStack[objectStack.length - 1];
-        array.push(value);
-      }
-    });
-};
-
-
-/**
- * Make an object stack replacer function for replacing the object at the
- * top of the stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeReplacer = function(valueReader, opt_this) {
-  return (
-    /**
-     * @param {Node} node Node.
-     * @param {Array.<*>} objectStack Object stack.
-     */
-    function(node, objectStack) {
-      var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-          node, objectStack);
-      if (value !== undefined) {
-        objectStack[objectStack.length - 1] = value;
-      }
-    });
-};
-
-
-/**
- * Make an object property pusher function for adding a property to the
- * object at the top of the stack.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {string=} opt_property Property.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeObjectPropertyPusher = function(valueReader, opt_property, opt_this) {
-  return (
-    /**
-     * @param {Node} node Node.
-     * @param {Array.<*>} objectStack Object stack.
-     */
-    function(node, objectStack) {
-      var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-          node, objectStack);
-      if (value !== undefined) {
-        var object = /** @type {Object} */
-              (objectStack[objectStack.length - 1]);
-        var property = opt_property !== undefined ?
-          opt_property : node.localName;
-        var array;
-        if (property in object) {
-          array = object[property];
-        } else {
-          array = object[property] = [];
-        }
-        array.push(value);
-      }
-    });
-};
-
-
-/**
- * Make an object property setter function.
- * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader.
- * @param {string=} opt_property Property.
- * @param {T=} opt_this The object to use as `this` in `valueReader`.
- * @return {ol.XmlParser} Parser.
- * @template T
- */
-ol.xml.makeObjectPropertySetter = function(valueReader, opt_property, opt_this) {
-  return (
-    /**
-     * @param {Node} node Node.
-     * @param {Array.<*>} objectStack Object stack.
-     */
-    function(node, objectStack) {
-      var value = valueReader.call(opt_this !== undefined ? opt_this : this,
-          node, objectStack);
-      if (value !== undefined) {
-        var object = /** @type {Object} */
-              (objectStack[objectStack.length - 1]);
-        var property = opt_property !== undefined ?
-          opt_property : node.localName;
-        object[property] = value;
-      }
-    });
-};
-
-
-/**
- * Create a serializer that appends nodes written by its `nodeWriter` to its
- * designated parent. The parent is the `node` of the
- * {@link ol.XmlNodeStackItem} at the top of the `objectStack`.
- * @param {function(this: T, Node, V, Array.<*>)}
- *     nodeWriter Node writer.
- * @param {T=} opt_this The object to use as `this` in `nodeWriter`.
- * @return {ol.XmlSerializer} Serializer.
- * @template T, V
- */
-ol.xml.makeChildAppender = function(nodeWriter, opt_this) {
-  return function(node, value, objectStack) {
-    nodeWriter.call(opt_this !== undefined ? opt_this : this,
-        node, value, objectStack);
-    var parent = objectStack[objectStack.length - 1];
-    var parentNode = parent.node;
-    parentNode.appendChild(node);
-  };
-};
-
-
-/**
- * Create a serializer that calls the provided `nodeWriter` from
- * {@link ol.xml.serialize}. This can be used by the parent writer to have the
- * 'nodeWriter' called with an array of values when the `nodeWriter` was
- * designed to serialize a single item. An example would be a LineString
- * geometry writer, which could be reused for writing MultiLineString
- * geometries.
- * @param {function(this: T, Node, V, Array.<*>)}
- *     nodeWriter Node writer.
- * @param {T=} opt_this The object to use as `this` in `nodeWriter`.
- * @return {ol.XmlSerializer} Serializer.
- * @template T, V
- */
-ol.xml.makeArraySerializer = function(nodeWriter, opt_this) {
-  var serializersNS, nodeFactory;
-  return function(node, value, objectStack) {
-    if (serializersNS === undefined) {
-      serializersNS = {};
-      var serializers = {};
-      serializers[node.localName] = nodeWriter;
-      serializersNS[node.namespaceURI] = serializers;
-      nodeFactory = ol.xml.makeSimpleNodeFactory(node.localName);
-    }
-    ol.xml.serialize(serializersNS, nodeFactory, value, objectStack);
-  };
-};
-
-
-/**
- * Create a node factory which can use the `opt_keys` passed to
- * {@link ol.xml.serialize} or {@link ol.xml.pushSerializeAndPop} as node names,
- * or a fixed node name. The namespace of the created nodes can either be fixed,
- * or the parent namespace will be used.
- * @param {string=} opt_nodeName Fixed node name which will be used for all
- *     created nodes. If not provided, the 3rd argument to the resulting node
- *     factory needs to be provided and will be the nodeName.
- * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for
- *     all created nodes. If not provided, the namespace of the parent node will
- *     be used.
- * @return {function(*, Array.<*>, string=): (Node|undefined)} Node factory.
- */
-ol.xml.makeSimpleNodeFactory = function(opt_nodeName, opt_namespaceURI) {
-  var fixedNodeName = opt_nodeName;
-  return (
-    /**
-     * @param {*} value Value.
-     * @param {Array.<*>} objectStack Object stack.
-     * @param {string=} opt_nodeName Node name.
-     * @return {Node} Node.
-     */
-    function(value, objectStack, opt_nodeName) {
-      var context = objectStack[objectStack.length - 1];
-      var node = context.node;
-      var nodeName = fixedNodeName;
-      if (nodeName === undefined) {
-        nodeName = opt_nodeName;
-      }
-      var namespaceURI = opt_namespaceURI;
-      if (opt_namespaceURI === undefined) {
-        namespaceURI = node.namespaceURI;
-      }
-      return ol.xml.createElementNS(namespaceURI, /** @type {string} */ (nodeName));
-    }
-  );
-};
-
-
-/**
- * A node factory that creates a node using the parent's `namespaceURI` and the
- * `nodeName` passed by {@link ol.xml.serialize} or
- * {@link ol.xml.pushSerializeAndPop} to the node factory.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- */
-ol.xml.OBJECT_PROPERTY_NODE_FACTORY = ol.xml.makeSimpleNodeFactory();
-
-
-/**
- * Create an array of `values` to be used with {@link ol.xml.serialize} or
- * {@link ol.xml.pushSerializeAndPop}, where `orderedKeys` has to be provided as
- * `opt_key` argument.
- * @param {Object.<string, V>} object Key-value pairs for the sequence. Keys can
- *     be a subset of the `orderedKeys`.
- * @param {Array.<string>} orderedKeys Keys in the order of the sequence.
- * @return {Array.<V>} Values in the order of the sequence. The resulting array
- *     has the same length as the `orderedKeys` array. Values that are not
- *     present in `object` will be `undefined` in the resulting array.
- * @template V
- */
-ol.xml.makeSequence = function(object, orderedKeys) {
-  var length = orderedKeys.length;
-  var sequence = new Array(length);
-  for (var i = 0; i < length; ++i) {
-    sequence[i] = object[orderedKeys[i]];
-  }
-  return sequence;
-};
-
-
-/**
- * Create a namespaced structure, using the same values for each namespace.
- * This can be used as a starting point for versioned parsers, when only a few
- * values are version specific.
- * @param {Array.<string>} namespaceURIs Namespace URIs.
- * @param {T} structure Structure.
- * @param {Object.<string, T>=} opt_structureNS Namespaced structure to add to.
- * @return {Object.<string, T>} Namespaced structure.
- * @template T
- */
-ol.xml.makeStructureNS = function(namespaceURIs, structure, opt_structureNS) {
-  /**
-   * @type {Object.<string, *>}
-   */
-  var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};
-  var i, ii;
-  for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {
-    structureNS[namespaceURIs[i]] = structure;
-  }
-  return structureNS;
-};
-
-
-/**
- * Parse a node using the parsers and object stack.
- * @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
- *     Parsers by namespace.
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @param {*=} opt_this The object to use as `this`.
- */
-ol.xml.parseNode = function(parsersNS, node, objectStack, opt_this) {
-  var n;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var parsers = parsersNS[n.namespaceURI];
-    if (parsers !== undefined) {
-      var parser = parsers[n.localName];
-      if (parser !== undefined) {
-        parser.call(opt_this, n, objectStack);
-      }
-    }
-  }
-};
-
-
-/**
- * Push an object on top of the stack, parse and return the popped object.
- * @param {T} object Object.
- * @param {Object.<string, Object.<string, ol.XmlParser>>} parsersNS
- *     Parsers by namespace.
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @param {*=} opt_this The object to use as `this`.
- * @return {T} Object.
- * @template T
- */
-ol.xml.pushParseAndPop = function(
-    object, parsersNS, node, objectStack, opt_this) {
-  objectStack.push(object);
-  ol.xml.parseNode(parsersNS, node, objectStack, opt_this);
-  return objectStack.pop();
-};
-
-
-/**
- * Walk through an array of `values` and call a serializer for each value.
- * @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
- *     Namespaced serializers.
- * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
- *     Node factory. The `nodeFactory` creates the node whose namespace and name
- *     will be used to choose a node writer from `serializersNS`. This
- *     separation allows us to decide what kind of node to create, depending on
- *     the value we want to serialize. An example for this would be different
- *     geometry writers based on the geometry type.
- * @param {Array.<*>} values Values to serialize. An example would be an array
- *     of {@link ol.Feature} instances.
- * @param {Array.<*>} objectStack Node stack.
- * @param {Array.<string>=} opt_keys Keys of the `values`. Will be passed to the
- *     `nodeFactory`. This is used for serializing object literals where the
- *     node name relates to the property key. The array length of `opt_keys` has
- *     to match the length of `values`. For serializing a sequence, `opt_keys`
- *     determines the order of the sequence.
- * @param {T=} opt_this The object to use as `this` for the node factory and
- *     serializers.
- * @template T
- */
-ol.xml.serialize = function(
-    serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {
-  var length = (opt_keys !== undefined ? opt_keys : values).length;
-  var value, node;
-  for (var i = 0; i < length; ++i) {
-    value = values[i];
-    if (value !== undefined) {
-      node = nodeFactory.call(opt_this, value, objectStack,
-          opt_keys !== undefined ? opt_keys[i] : undefined);
-      if (node !== undefined) {
-        serializersNS[node.namespaceURI][node.localName]
-            .call(opt_this, node, value, objectStack);
-      }
-    }
-  }
-};
-
-
-/**
- * @param {O} object Object.
- * @param {Object.<string, Object.<string, ol.XmlSerializer>>} serializersNS
- *     Namespaced serializers.
- * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory
- *     Node factory. The `nodeFactory` creates the node whose namespace and name
- *     will be used to choose a node writer from `serializersNS`. This
- *     separation allows us to decide what kind of node to create, depending on
- *     the value we want to serialize. An example for this would be different
- *     geometry writers based on the geometry type.
- * @param {Array.<*>} values Values to serialize. An example would be an array
- *     of {@link ol.Feature} instances.
- * @param {Array.<*>} objectStack Node stack.
- * @param {Array.<string>=} opt_keys Keys of the `values`. Will be passed to the
- *     `nodeFactory`. This is used for serializing object literals where the
- *     node name relates to the property key. The array length of `opt_keys` has
- *     to match the length of `values`. For serializing a sequence, `opt_keys`
- *     determines the order of the sequence.
- * @param {T=} opt_this The object to use as `this` for the node factory and
- *     serializers.
- * @return {O|undefined} Object.
- * @template O, T
- */
-ol.xml.pushSerializeAndPop = function(object,
-    serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {
-  objectStack.push(object);
-  ol.xml.serialize(
-      serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);
-  return objectStack.pop();
-};
-
-goog.provide('ol.featureloader');
-
-goog.require('ol');
-goog.require('ol.format.FormatType');
-goog.require('ol.xml');
-
-
-/**
- * @param {string|ol.FeatureUrlFunction} url Feature URL service.
- * @param {ol.format.Feature} format Feature format.
- * @param {function(this:ol.VectorTile, Array.<ol.Feature>, ol.proj.Projection, ol.Extent)|function(this:ol.source.Vector, Array.<ol.Feature>)} success
- *     Function called with the loaded features and optionally with the data
- *     projection. Called with the vector tile or source as `this`.
- * @param {function(this:ol.VectorTile)|function(this:ol.source.Vector)} failure
- *     Function called when loading failed. Called with the vector tile or
- *     source as `this`.
- * @return {ol.FeatureLoader} The feature loader.
- */
-ol.featureloader.loadFeaturesXhr = function(url, format, success, failure) {
-  return (
-    /**
-     * @param {ol.Extent} extent Extent.
-     * @param {number} resolution Resolution.
-     * @param {ol.proj.Projection} projection Projection.
-     * @this {ol.source.Vector|ol.VectorTile}
-     */
-    function(extent, resolution, projection) {
-      var xhr = new XMLHttpRequest();
-      xhr.open('GET',
-          typeof url === 'function' ? url(extent, resolution, projection) : url,
-          true);
-      if (format.getType() == ol.format.FormatType.ARRAY_BUFFER) {
-        xhr.responseType = 'arraybuffer';
-      }
-      /**
-       * @param {Event} event Event.
-       * @private
-       */
-      xhr.onload = function(event) {
-        // status will be 0 for file:// urls
-        if (!xhr.status || xhr.status >= 200 && xhr.status < 300) {
-          var type = format.getType();
-          /** @type {Document|Node|Object|string|undefined} */
-          var source;
-          if (type == ol.format.FormatType.JSON ||
-                type == ol.format.FormatType.TEXT) {
-            source = xhr.responseText;
-          } else if (type == ol.format.FormatType.XML) {
-            source = xhr.responseXML;
-            if (!source) {
-              source = ol.xml.parse(xhr.responseText);
-            }
-          } else if (type == ol.format.FormatType.ARRAY_BUFFER) {
-            source = /** @type {ArrayBuffer} */ (xhr.response);
-          }
-          if (source) {
-            success.call(this, format.readFeatures(source,
-                {featureProjection: projection}),
-            format.readProjection(source), format.getLastExtent());
-          } else {
-            failure.call(this);
-          }
-        } else {
-          failure.call(this);
-        }
-      }.bind(this);
-      /**
-       * @private
-       */
-      xhr.onerror = function() {
-        failure.call(this);
-      }.bind(this);
-      xhr.send();
-    });
-};
-
-
-/**
- * Create an XHR feature loader for a `url` and `format`. The feature loader
- * loads features (with XHR), parses the features, and adds them to the
- * vector source.
- * @param {string|ol.FeatureUrlFunction} url Feature URL service.
- * @param {ol.format.Feature} format Feature format.
- * @return {ol.FeatureLoader} The feature loader.
- * @api
- */
-ol.featureloader.xhr = function(url, format) {
-  return ol.featureloader.loadFeaturesXhr(url, format,
-      /**
-       * @param {Array.<ol.Feature>} features The loaded features.
-       * @param {ol.proj.Projection} dataProjection Data projection.
-       * @this {ol.source.Vector}
-       */
-      function(features, dataProjection) {
-        this.addFeatures(features);
-      }, /* FIXME handle error */ ol.nullFunction);
-};
-
-goog.provide('ol.format.Feature');
-
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for feature formats.
- * {ol.format.Feature} subclasses provide the ability to decode and encode
- * {@link ol.Feature} objects from a variety of commonly used geospatial
- * file formats.  See the documentation for each format for more details.
- *
- * @constructor
- * @abstract
- * @api
- */
-ol.format.Feature = function() {
-
-  /**
-   * @protected
-   * @type {ol.proj.Projection}
-   */
-  this.defaultDataProjection = null;
-
-  /**
-   * @protected
-   * @type {ol.proj.Projection}
-   */
-  this.defaultFeatureProjection = null;
-
-};
-
-
-/**
- * Adds the data projection to the read options.
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {olx.format.ReadOptions|undefined} Options.
- * @protected
- */
-ol.format.Feature.prototype.getReadOptions = function(source, opt_options) {
-  var options;
-  if (opt_options) {
-    options = {
-      dataProjection: opt_options.dataProjection ?
-        opt_options.dataProjection : this.readProjection(source),
-      featureProjection: opt_options.featureProjection
-    };
-  }
-  return this.adaptOptions(options);
-};
-
-
-/**
- * Sets the `defaultDataProjection` on the options, if no `dataProjection`
- * is set.
- * @param {olx.format.WriteOptions|olx.format.ReadOptions|undefined} options
- *     Options.
- * @protected
- * @return {olx.format.WriteOptions|olx.format.ReadOptions|undefined}
- *     Updated options.
- */
-ol.format.Feature.prototype.adaptOptions = function(options) {
-  return ol.obj.assign({
-    dataProjection: this.defaultDataProjection,
-    featureProjection: this.defaultFeatureProjection
-  }, options);
-};
-
-
-/**
- * Get the extent from the source of the last {@link readFeatures} call.
- * @return {ol.Extent} Tile extent.
- */
-ol.format.Feature.prototype.getLastExtent = function() {
-  return null;
-};
-
-
-/**
- * @abstract
- * @return {ol.format.FormatType} Format.
- */
-ol.format.Feature.prototype.getType = function() {};
-
-
-/**
- * Read a single feature from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- */
-ol.format.Feature.prototype.readFeature = function(source, opt_options) {};
-
-
-/**
- * Read all features from a source.
- *
- * @abstract
- * @param {Document|Node|ArrayBuffer|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.Feature.prototype.readFeatures = function(source, opt_options) {};
-
-
-/**
- * Read a single geometry from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.Feature.prototype.readGeometry = function(source, opt_options) {};
-
-
-/**
- * Read the projection from a source.
- *
- * @abstract
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.Feature.prototype.readProjection = function(source) {};
-
-
-/**
- * Encode a feature in this format.
- *
- * @abstract
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeFeature = function(feature, opt_options) {};
-
-
-/**
- * Encode an array of features in this format.
- *
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeFeatures = function(features, opt_options) {};
-
-
-/**
- * Write a single geometry in this format.
- *
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- */
-ol.format.Feature.prototype.writeGeometry = function(geometry, opt_options) {};
-
-
-/**
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {boolean} write Set to true for writing, false for reading.
- * @param {(olx.format.WriteOptions|olx.format.ReadOptions)=} opt_options
- *     Options.
- * @return {ol.geom.Geometry|ol.Extent} Transformed geometry.
- * @protected
- */
-ol.format.Feature.transformWithOptions = function(
-    geometry, write, opt_options) {
-  var featureProjection = opt_options ?
-    ol.proj.get(opt_options.featureProjection) : null;
-  var dataProjection = opt_options ?
-    ol.proj.get(opt_options.dataProjection) : null;
-  /**
-   * @type {ol.geom.Geometry|ol.Extent}
-   */
-  var transformed;
-  if (featureProjection && dataProjection &&
-      !ol.proj.equivalent(featureProjection, dataProjection)) {
-    if (geometry instanceof ol.geom.Geometry) {
-      transformed = (write ? geometry.clone() : geometry).transform(
-          write ? featureProjection : dataProjection,
-          write ? dataProjection : featureProjection);
-    } else {
-      // FIXME this is necessary because ol.format.GML treats extents
-      // as geometries
-      transformed = ol.proj.transformExtent(
-          geometry,
-          dataProjection,
-          featureProjection);
-    }
-  } else {
-    transformed = geometry;
-  }
-  if (write && opt_options && opt_options.decimals !== undefined) {
-    var power = Math.pow(10, opt_options.decimals);
-    // if decimals option on write, round each coordinate appropriately
-    /**
-     * @param {Array.<number>} coordinates Coordinates.
-     * @return {Array.<number>} Transformed coordinates.
-     */
-    var transform = function(coordinates) {
-      for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-        coordinates[i] = Math.round(coordinates[i] * power) / power;
-      }
-      return coordinates;
-    };
-    if (transformed === geometry) {
-      transformed = transformed.clone();
-    }
-    transformed.applyTransform(transform);
-  }
-  return transformed;
-};
-
-goog.provide('ol.format.JSONFeature');
-
-goog.require('ol');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for JSON feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.JSONFeature = function() {
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.JSONFeature, ol.format.Feature);
-
-
-/**
- * @param {Document|Node|Object|string} source Source.
- * @private
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.getObject_ = function(source) {
-  if (typeof source === 'string') {
-    var object = JSON.parse(source);
-    return object ? /** @type {Object} */ (object) : null;
-  } else if (source !== null) {
-    return source;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.getType = function() {
-  return ol.format.FormatType.JSON;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readFeature = function(source, opt_options) {
-  return this.readFeatureFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readFeatures = function(source, opt_options) {
-  return this.readFeaturesFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.Feature} Feature.
- */
-ol.format.JSONFeature.prototype.readFeatureFromObject = function(object, opt_options) {};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.JSONFeature.prototype.readFeaturesFromObject = function(object, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readGeometry = function(source, opt_options) {
-  return this.readGeometryFromObject(
-      this.getObject_(source), this.getReadOptions(source, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.JSONFeature.prototype.readGeometryFromObject = function(object, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.readProjection = function(source) {
-  return this.readProjectionFromObject(this.getObject_(source));
-};
-
-
-/**
- * @abstract
- * @param {Object} object Object.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.JSONFeature.prototype.readProjectionFromObject = function(object) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeFeature = function(feature, opt_options) {
-  return JSON.stringify(this.writeFeatureObject(feature, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeFeatureObject = function(feature, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeFeatures = function(features, opt_options) {
-  return JSON.stringify(this.writeFeaturesObject(features, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeFeaturesObject = function(features, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.JSONFeature.prototype.writeGeometry = function(geometry, opt_options) {
-  return JSON.stringify(this.writeGeometryObject(geometry, opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- */
-ol.format.JSONFeature.prototype.writeGeometryObject = function(geometry, opt_options) {};
-
-goog.provide('ol.geom.flat.interpolate');
-
-goog.require('ol.array');
-goog.require('ol.math');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} fraction Fraction.
- * @param {Array.<number>=} opt_dest Destination.
- * @return {Array.<number>} Destination.
- */
-ol.geom.flat.interpolate.lineString = function(flatCoordinates, offset, end, stride, fraction, opt_dest) {
-  var pointX = NaN;
-  var pointY = NaN;
-  var n = (end - offset) / stride;
-  if (n === 1) {
-    pointX = flatCoordinates[offset];
-    pointY = flatCoordinates[offset + 1];
-  } else if (n == 2) {
-    pointX = (1 - fraction) * flatCoordinates[offset] +
-        fraction * flatCoordinates[offset + stride];
-    pointY = (1 - fraction) * flatCoordinates[offset + 1] +
-        fraction * flatCoordinates[offset + stride + 1];
-  } else if (n !== 0) {
-    var x1 = flatCoordinates[offset];
-    var y1 = flatCoordinates[offset + 1];
-    var length = 0;
-    var cumulativeLengths = [0];
-    var i;
-    for (i = offset + stride; i < end; i += stride) {
-      var x2 = flatCoordinates[i];
-      var y2 = flatCoordinates[i + 1];
-      length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
-      cumulativeLengths.push(length);
-      x1 = x2;
-      y1 = y2;
-    }
-    var target = fraction * length;
-    var index = ol.array.binarySearch(cumulativeLengths, target);
-    if (index < 0) {
-      var t = (target - cumulativeLengths[-index - 2]) /
-          (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);
-      var o = offset + (-index - 2) * stride;
-      pointX = ol.math.lerp(
-          flatCoordinates[o], flatCoordinates[o + stride], t);
-      pointY = ol.math.lerp(
-          flatCoordinates[o + 1], flatCoordinates[o + stride + 1], t);
-    } else {
-      pointX = flatCoordinates[offset + index * stride];
-      pointY = flatCoordinates[offset + index * stride + 1];
-    }
-  }
-  if (opt_dest) {
-    opt_dest[0] = pointX;
-    opt_dest[1] = pointY;
-    return opt_dest;
-  } else {
-    return [pointX, pointY];
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {number} m M.
- * @param {boolean} extrapolate Extrapolate.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.geom.flat.interpolate.lineStringCoordinateAtM = function(flatCoordinates, offset, end, stride, m, extrapolate) {
-  if (end == offset) {
-    return null;
-  }
-  var coordinate;
-  if (m < flatCoordinates[offset + stride - 1]) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(offset, offset + stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  } else if (flatCoordinates[end - 1] < m) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(end - stride, end);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  // FIXME use O(1) search
-  if (m == flatCoordinates[offset + stride - 1]) {
-    return flatCoordinates.slice(offset, offset + stride);
-  }
-  var lo = offset / stride;
-  var hi = end / stride;
-  while (lo < hi) {
-    var mid = (lo + hi) >> 1;
-    if (m < flatCoordinates[(mid + 1) * stride - 1]) {
-      hi = mid;
-    } else {
-      lo = mid + 1;
-    }
-  }
-  var m0 = flatCoordinates[lo * stride - 1];
-  if (m == m0) {
-    return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);
-  }
-  var m1 = flatCoordinates[(lo + 1) * stride - 1];
-  var t = (m - m0) / (m1 - m0);
-  coordinate = [];
-  var i;
-  for (i = 0; i < stride - 1; ++i) {
-    coordinate.push(ol.math.lerp(flatCoordinates[(lo - 1) * stride + i],
-        flatCoordinates[lo * stride + i], t));
-  }
-  coordinate.push(m);
-  return coordinate;
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<number>} ends Ends.
- * @param {number} stride Stride.
- * @param {number} m M.
- * @param {boolean} extrapolate Extrapolate.
- * @param {boolean} interpolate Interpolate.
- * @return {ol.Coordinate} Coordinate.
- */
-ol.geom.flat.interpolate.lineStringsCoordinateAtM = function(
-    flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
-  if (interpolate) {
-    return ol.geom.flat.interpolate.lineStringCoordinateAtM(
-        flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);
-  }
-  var coordinate;
-  if (m < flatCoordinates[stride - 1]) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(0, stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  if (flatCoordinates[flatCoordinates.length - 1] < m) {
-    if (extrapolate) {
-      coordinate = flatCoordinates.slice(flatCoordinates.length - stride);
-      coordinate[stride - 1] = m;
-      return coordinate;
-    } else {
-      return null;
-    }
-  }
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    if (offset == end) {
-      continue;
-    }
-    if (m < flatCoordinates[offset + stride - 1]) {
-      return null;
-    } else if (m <= flatCoordinates[end - 1]) {
-      return ol.geom.flat.interpolate.lineStringCoordinateAtM(
-          flatCoordinates, offset, end, stride, m, false);
-    }
-    offset = end;
-  }
-  return null;
-};
-
-goog.provide('ol.geom.LineString');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interpolate');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.length');
-goog.require('ol.geom.flat.segments');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Linestring geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.LineString = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.flatMidpoint_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatMidpointRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.LineString, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed coordinate to the coordinates of the linestring.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @api
- */
-ol.geom.LineString.prototype.appendCoordinate = function(coordinate) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = coordinate.slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, coordinate);
-  }
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.LineString} Clone.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.clone = function() {
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return lineString;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getMaxSquaredDelta(
-        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getClosestPoint(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Iterate over each segment, calling the provided callback.
- * If the callback returns a truthy value the function returns that
- * value immediately. Otherwise the function returns `false`.
- *
- * @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
- *     called for each segment.
- * @param {S=} opt_this The object to be used as the value of 'this'
- *     within callback.
- * @return {T|boolean} Value.
- * @template T,S
- * @api
- */
-ol.geom.LineString.prototype.forEachSegment = function(callback, opt_this) {
-  return ol.geom.flat.segments.forEach(this.flatCoordinates, 0,
-      this.flatCoordinates.length, this.stride, callback, opt_this);
-};
-
-
-/**
- * Returns the coordinate at `m` using linear interpolation, or `null` if no
- * such coordinate exists.
- *
- * `opt_extrapolate` controls extrapolation beyond the range of Ms in the
- * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
- * M will return the first coordinate and Ms greater than the last M will
- * return the last coordinate.
- *
- * @param {number} m M.
- * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) {
-  if (this.layout != ol.geom.GeometryLayout.XYM &&
-      this.layout != ol.geom.GeometryLayout.XYZM) {
-    return null;
-  }
-  var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
-  return ol.geom.flat.interpolate.lineStringCoordinateAtM(this.flatCoordinates, 0,
-      this.flatCoordinates.length, this.stride, m, extrapolate);
-};
-
-
-/**
- * Return the coordinates of the linestring.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the coordinate at the provided fraction along the linestring.
- * The `fraction` is a number between 0 and 1, where 0 is the start of the
- * linestring and 1 is the end.
- * @param {number} fraction Fraction.
- * @param {ol.Coordinate=} opt_dest Optional coordinate whose values will
- *     be modified. If not provided, a new coordinate will be returned.
- * @return {ol.Coordinate} Coordinate of the interpolated point.
- * @api
- */
-ol.geom.LineString.prototype.getCoordinateAt = function(fraction, opt_dest) {
-  return ol.geom.flat.interpolate.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      fraction, opt_dest);
-};
-
-
-/**
- * Return the length of the linestring on projected plane.
- * @return {number} Length (on projected plane).
- * @api
- */
-ol.geom.LineString.prototype.getLength = function() {
-  return ol.geom.flat.length.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoint.
- */
-ol.geom.LineString.prototype.getFlatMidpoint = function() {
-  if (this.flatMidpointRevision_ != this.getRevision()) {
-    this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);
-    this.flatMidpointRevision_ = this.getRevision();
-  }
-  return this.flatMidpoint_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.LineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeucker(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      squaredTolerance, simplifiedFlatCoordinates, 0);
-  var simplifiedLineString = new ol.geom.LineString(null);
-  simplifiedLineString.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates);
-  return simplifiedLineString;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LineString.prototype.getType = function() {
-  return ol.geom.GeometryType.LINE_STRING;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.LineString.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.lineString(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,
-      extent);
-};
-
-
-/**
- * Set the coordinates of the linestring.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.LineString.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.MultiLineString');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interpolate');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Multi-linestring geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiLineString = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.ends_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed linestring to the multilinestring.
- * @param {ol.geom.LineString} lineString LineString.
- * @api
- */
-ol.geom.MultiLineString.prototype.appendLineString = function(lineString) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = lineString.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(
-        this.flatCoordinates, lineString.getFlatCoordinates().slice());
-  }
-  this.ends_.push(this.flatCoordinates.length);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiLineString} Clone.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.clone = function() {
-  var multiLineString = new ol.geom.MultiLineString(null);
-  multiLineString.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), this.ends_.slice());
-  return multiLineString;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiLineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getsMaxSquaredDelta(
-        this.flatCoordinates, 0, this.ends_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getsClosestPoint(
-      this.flatCoordinates, 0, this.ends_, this.stride,
-      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * Returns the coordinate at `m` using linear interpolation, or `null` if no
- * such coordinate exists.
- *
- * `opt_extrapolate` controls extrapolation beyond the range of Ms in the
- * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
- * M will return the first coordinate and Ms greater than the last M will
- * return the last coordinate.
- *
- * `opt_interpolate` controls interpolation between consecutive LineStrings
- * within the MultiLineString. If `opt_interpolate` is `true` the coordinates
- * will be linearly interpolated between the last coordinate of one LineString
- * and the first coordinate of the next LineString.  If `opt_interpolate` is
- * `false` then the function will return `null` for Ms falling between
- * LineStrings.
- *
- * @param {number} m M.
- * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.
- * @param {boolean=} opt_interpolate Interpolate. Default is `false`.
- * @return {ol.Coordinate} Coordinate.
- * @api
- */
-ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) {
-  if ((this.layout != ol.geom.GeometryLayout.XYM &&
-       this.layout != ol.geom.GeometryLayout.XYZM) ||
-      this.flatCoordinates.length === 0) {
-    return null;
-  }
-  var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
-  var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;
-  return ol.geom.flat.interpolate.lineStringsCoordinateAtM(this.flatCoordinates, 0,
-      this.ends_, this.stride, m, extrapolate, interpolate);
-};
-
-
-/**
- * Return the coordinates of the multilinestring.
- * @return {Array.<Array.<ol.Coordinate>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinatess(
-      this.flatCoordinates, 0, this.ends_, this.stride);
-};
-
-
-/**
- * @return {Array.<number>} Ends.
- */
-ol.geom.MultiLineString.prototype.getEnds = function() {
-  return this.ends_;
-};
-
-
-/**
- * Return the linestring at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.LineString} LineString.
- * @api
- */
-ol.geom.MultiLineString.prototype.getLineString = function(index) {
-  if (index < 0 || this.ends_.length <= index) {
-    return null;
-  }
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]));
-  return lineString;
-};
-
-
-/**
- * Return the linestrings of this multilinestring.
- * @return {Array.<ol.geom.LineString>} LineStrings.
- * @api
- */
-ol.geom.MultiLineString.prototype.getLineStrings = function() {
-  var flatCoordinates = this.flatCoordinates;
-  var ends = this.ends_;
-  var layout = this.layout;
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = [];
-  var offset = 0;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(layout, flatCoordinates.slice(offset, end));
-    lineStrings.push(lineString);
-    offset = end;
-  }
-  return lineStrings;
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoints.
- */
-ol.geom.MultiLineString.prototype.getFlatMidpoints = function() {
-  var midpoints = [];
-  var flatCoordinates = this.flatCoordinates;
-  var offset = 0;
-  var ends = this.ends_;
-  var stride = this.stride;
-  var i, ii;
-  for (i = 0, ii = ends.length; i < ii; ++i) {
-    var end = ends[i];
-    var midpoint = ol.geom.flat.interpolate.lineString(
-        flatCoordinates, offset, end, stride, 0.5);
-    ol.array.extend(midpoints, midpoint);
-    offset = end;
-  }
-  return midpoints;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEnds = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.douglasPeuckers(
-      this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance,
-      simplifiedFlatCoordinates, 0, simplifiedEnds);
-  var simplifiedMultiLineString = new ol.geom.MultiLineString(null);
-  simplifiedMultiLineString.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEnds);
-  return simplifiedMultiLineString;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiLineString.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_LINE_STRING;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiLineString.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.lineStrings(
-      this.flatCoordinates, 0, this.ends_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the multilinestring.
- * @param {Array.<Array.<ol.Coordinate>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.ends_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 2);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var ends = ol.geom.flat.deflate.coordinatess(
-        this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
-    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>} ends Ends.
- */
-ol.geom.MultiLineString.prototype.setFlatCoordinates = function(layout, flatCoordinates, ends) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.ends_ = ends;
-  this.changed();
-};
-
-
-/**
- * @param {Array.<ol.geom.LineString>} lineStrings LineStrings.
- */
-ol.geom.MultiLineString.prototype.setLineStrings = function(lineStrings) {
-  var layout = this.getLayout();
-  var flatCoordinates = [];
-  var ends = [];
-  var i, ii;
-  for (i = 0, ii = lineStrings.length; i < ii; ++i) {
-    var lineString = lineStrings[i];
-    if (i === 0) {
-      layout = lineString.getLayout();
-    }
-    ol.array.extend(flatCoordinates, lineString.getFlatCoordinates());
-    ends.push(flatCoordinates.length);
-  }
-  this.setFlatCoordinates(layout, flatCoordinates, ends);
-};
-
-goog.provide('ol.geom.MultiPoint');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.math');
-
-
-/**
- * @classdesc
- * Multi-point geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiPoint = function(coordinates, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  this.setCoordinates(coordinates, opt_layout);
-};
-ol.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed point to this multipoint.
- * @param {ol.geom.Point} point Point.
- * @api
- */
-ol.geom.MultiPoint.prototype.appendPoint = function(point) {
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = point.getFlatCoordinates().slice();
-  } else {
-    ol.array.extend(this.flatCoordinates, point.getFlatCoordinates());
-  }
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiPoint} Clone.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.clone = function() {
-  var multiPoint = new ol.geom.MultiPoint(null);
-  multiPoint.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return multiPoint;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPoint.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  var flatCoordinates = this.flatCoordinates;
-  var stride = this.stride;
-  var i, ii, j;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    var squaredDistance = ol.math.squaredDistance(
-        x, y, flatCoordinates[i], flatCoordinates[i + 1]);
-    if (squaredDistance < minSquaredDistance) {
-      minSquaredDistance = squaredDistance;
-      for (j = 0; j < stride; ++j) {
-        closestPoint[j] = flatCoordinates[i + j];
-      }
-      closestPoint.length = stride;
-    }
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * Return the coordinates of the multipoint.
- * @return {Array.<ol.Coordinate>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.getCoordinates = function() {
-  return ol.geom.flat.inflate.coordinates(
-      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
-};
-
-
-/**
- * Return the point at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.Point} Point.
- * @api
- */
-ol.geom.MultiPoint.prototype.getPoint = function(index) {
-  var n = !this.flatCoordinates ?
-    0 : this.flatCoordinates.length / this.stride;
-  if (index < 0 || n <= index) {
-    return null;
-  }
-  var point = new ol.geom.Point(null);
-  point.setFlatCoordinates(this.layout, this.flatCoordinates.slice(
-      index * this.stride, (index + 1) * this.stride));
-  return point;
-};
-
-
-/**
- * Return the points of this multipoint.
- * @return {Array.<ol.geom.Point>} Points.
- * @api
- */
-ol.geom.MultiPoint.prototype.getPoints = function() {
-  var flatCoordinates = this.flatCoordinates;
-  var layout = this.layout;
-  var stride = this.stride;
-  /** @type {Array.<ol.geom.Point>} */
-  var points = [];
-  var i, ii;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(layout, flatCoordinates.slice(i, i + stride));
-    points.push(point);
-  }
-  return points;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPoint.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_POINT;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPoint.prototype.intersectsExtent = function(extent) {
-  var flatCoordinates = this.flatCoordinates;
-  var stride = this.stride;
-  var i, ii, x, y;
-  for (i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
-    x = flatCoordinates[i];
-    y = flatCoordinates[i + 1];
-    if (ol.extent.containsXY(extent, x, y)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * Set the coordinates of the multipoint.
- * @param {Array.<ol.Coordinate>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, coordinates, 1);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    this.flatCoordinates.length = ol.geom.flat.deflate.coordinates(
-        this.flatCoordinates, 0, coordinates, this.stride);
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.MultiPoint.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-goog.provide('ol.geom.flat.center');
-
-goog.require('ol.extent');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {Array.<Array.<number>>} endss Endss.
- * @param {number} stride Stride.
- * @return {Array.<number>} Flat centers.
- */
-ol.geom.flat.center.linearRingss = function(flatCoordinates, offset, endss, stride) {
-  var flatCenters = [];
-  var i, ii;
-  var extent = ol.extent.createEmpty();
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    extent = ol.extent.createOrUpdateFromFlatCoordinates(
-        flatCoordinates, offset, ends[0], stride);
-    flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);
-    offset = ends[ends.length - 1];
-  }
-  return flatCenters;
-};
-
-goog.provide('ol.geom.MultiPolygon');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.area');
-goog.require('ol.geom.flat.center');
-goog.require('ol.geom.flat.closest');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.geom.flat.interiorpoint');
-goog.require('ol.geom.flat.intersectsextent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.simplify');
-
-
-/**
- * @classdesc
- * Multi-polygon geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.MultiPolygon = function(coordinates, opt_layout) {
-
-  ol.geom.SimpleGeometry.call(this);
-
-  /**
-   * @type {Array.<Array.<number>>}
-   * @private
-   */
-  this.endss_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.flatInteriorPointsRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatInteriorPoints_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDelta_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxDeltaRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.orientedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.orientedFlatCoordinates_ = null;
-
-  this.setCoordinates(coordinates, opt_layout);
-
-};
-ol.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry);
-
-
-/**
- * Append the passed polygon to this multipolygon.
- * @param {ol.geom.Polygon} polygon Polygon.
- * @api
- */
-ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
-  /** @type {Array.<number>} */
-  var ends;
-  if (!this.flatCoordinates) {
-    this.flatCoordinates = polygon.getFlatCoordinates().slice();
-    ends = polygon.getEnds().slice();
-    this.endss_.push();
-  } else {
-    var offset = this.flatCoordinates.length;
-    ol.array.extend(this.flatCoordinates, polygon.getFlatCoordinates());
-    ends = polygon.getEnds().slice();
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      ends[i] += offset;
-    }
-  }
-  this.endss_.push(ends);
-  this.changed();
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.MultiPolygon} Clone.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.clone = function() {
-  var multiPolygon = new ol.geom.MultiPolygon(null);
-
-  var len = this.endss_.length;
-  var newEndss = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    newEndss[i] = this.endss_[i].slice();
-  }
-
-  multiPolygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(), newEndss);
-  return multiPolygon;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  if (this.maxDeltaRevision_ != this.getRevision()) {
-    this.maxDelta_ = Math.sqrt(ol.geom.flat.closest.getssMaxSquaredDelta(
-        this.flatCoordinates, 0, this.endss_, this.stride, 0));
-    this.maxDeltaRevision_ = this.getRevision();
-  }
-  return ol.geom.flat.closest.getssClosestPoint(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,
-      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.containsXY = function(x, y) {
-  return ol.geom.flat.contains.linearRingssContainsXY(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);
-};
-
-
-/**
- * Return the area of the multipolygon on projected plane.
- * @return {number} Area (on projected plane).
- * @api
- */
-ol.geom.MultiPolygon.prototype.getArea = function() {
-  return ol.geom.flat.area.linearRingss(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);
-};
-
-
-/**
- * Get the coordinate array for this geometry.  This array has the structure
- * of a GeoJSON coordinate array for multi-polygons.
- *
- * @param {boolean=} opt_right Orient coordinates according to the right-hand
- *     rule (counter-clockwise for exterior and clockwise for interior rings).
- *     If `false`, coordinates will be oriented according to the left-hand rule
- *     (clockwise for exterior and counter-clockwise for interior rings).
- *     By default, coordinate orientation will depend on how the geometry was
- *     constructed.
- * @return {Array.<Array.<Array.<ol.Coordinate>>>} Coordinates.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.getCoordinates = function(opt_right) {
-  var flatCoordinates;
-  if (opt_right !== undefined) {
-    flatCoordinates = this.getOrientedFlatCoordinates().slice();
-    ol.geom.flat.orient.orientLinearRingss(
-        flatCoordinates, 0, this.endss_, this.stride, opt_right);
-  } else {
-    flatCoordinates = this.flatCoordinates;
-  }
-
-  return ol.geom.flat.inflate.coordinatesss(
-      flatCoordinates, 0, this.endss_, this.stride);
-};
-
-
-/**
- * @return {Array.<Array.<number>>} Endss.
- */
-ol.geom.MultiPolygon.prototype.getEndss = function() {
-  return this.endss_;
-};
-
-
-/**
- * @return {Array.<number>} Flat interior points.
- */
-ol.geom.MultiPolygon.prototype.getFlatInteriorPoints = function() {
-  if (this.flatInteriorPointsRevision_ != this.getRevision()) {
-    var flatCenters = ol.geom.flat.center.linearRingss(
-        this.flatCoordinates, 0, this.endss_, this.stride);
-    this.flatInteriorPoints_ = ol.geom.flat.interiorpoint.linearRingss(
-        this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,
-        flatCenters);
-    this.flatInteriorPointsRevision_ = this.getRevision();
-  }
-  return this.flatInteriorPoints_;
-};
-
-
-/**
- * Return the interior points as {@link ol.geom.MultiPoint multipoint}.
- * @return {ol.geom.MultiPoint} Interior points as XYM coordinates, where M is
- * the length of the horizontal intersection that the point belongs to.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getInteriorPoints = function() {
-  var interiorPoints = new ol.geom.MultiPoint(null);
-  interiorPoints.setFlatCoordinates(ol.geom.GeometryLayout.XYM,
-      this.getFlatInteriorPoints().slice());
-  return interiorPoints;
-};
-
-
-/**
- * @return {Array.<number>} Oriented flat coordinates.
- */
-ol.geom.MultiPolygon.prototype.getOrientedFlatCoordinates = function() {
-  if (this.orientedRevision_ != this.getRevision()) {
-    var flatCoordinates = this.flatCoordinates;
-    if (ol.geom.flat.orient.linearRingssAreOriented(
-        flatCoordinates, 0, this.endss_, this.stride)) {
-      this.orientedFlatCoordinates_ = flatCoordinates;
-    } else {
-      this.orientedFlatCoordinates_ = flatCoordinates.slice();
-      this.orientedFlatCoordinates_.length =
-          ol.geom.flat.orient.orientLinearRingss(
-              this.orientedFlatCoordinates_, 0, this.endss_, this.stride);
-    }
-    this.orientedRevision_ = this.getRevision();
-  }
-  return this.orientedFlatCoordinates_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = function(squaredTolerance) {
-  var simplifiedFlatCoordinates = [];
-  var simplifiedEndss = [];
-  simplifiedFlatCoordinates.length = ol.geom.flat.simplify.quantizess(
-      this.flatCoordinates, 0, this.endss_, this.stride,
-      Math.sqrt(squaredTolerance),
-      simplifiedFlatCoordinates, 0, simplifiedEndss);
-  var simplifiedMultiPolygon = new ol.geom.MultiPolygon(null);
-  simplifiedMultiPolygon.setFlatCoordinates(
-      ol.geom.GeometryLayout.XY, simplifiedFlatCoordinates, simplifiedEndss);
-  return simplifiedMultiPolygon;
-};
-
-
-/**
- * Return the polygon at the specified index.
- * @param {number} index Index.
- * @return {ol.geom.Polygon} Polygon.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getPolygon = function(index) {
-  if (index < 0 || this.endss_.length <= index) {
-    return null;
-  }
-  var offset;
-  if (index === 0) {
-    offset = 0;
-  } else {
-    var prevEnds = this.endss_[index - 1];
-    offset = prevEnds[prevEnds.length - 1];
-  }
-  var ends = this.endss_[index].slice();
-  var end = ends[ends.length - 1];
-  if (offset !== 0) {
-    var i, ii;
-    for (i = 0, ii = ends.length; i < ii; ++i) {
-      ends[i] -= offset;
-    }
-  }
-  var polygon = new ol.geom.Polygon(null);
-  polygon.setFlatCoordinates(
-      this.layout, this.flatCoordinates.slice(offset, end), ends);
-  return polygon;
-};
-
-
-/**
- * Return the polygons of this multipolygon.
- * @return {Array.<ol.geom.Polygon>} Polygons.
- * @api
- */
-ol.geom.MultiPolygon.prototype.getPolygons = function() {
-  var layout = this.layout;
-  var flatCoordinates = this.flatCoordinates;
-  var endss = this.endss_;
-  var polygons = [];
-  var offset = 0;
-  var i, ii, j, jj;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i].slice();
-    var end = ends[ends.length - 1];
-    if (offset !== 0) {
-      for (j = 0, jj = ends.length; j < jj; ++j) {
-        ends[j] -= offset;
-      }
-    }
-    var polygon = new ol.geom.Polygon(null);
-    polygon.setFlatCoordinates(
-        layout, flatCoordinates.slice(offset, end), ends);
-    polygons.push(polygon);
-    offset = end;
-  }
-  return polygons;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPolygon.prototype.getType = function() {
-  return ol.geom.GeometryType.MULTI_POLYGON;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.MultiPolygon.prototype.intersectsExtent = function(extent) {
-  return ol.geom.flat.intersectsextent.linearRingss(
-      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);
-};
-
-
-/**
- * Set the coordinates of the multipolygon.
- * @param {Array.<Array.<Array.<ol.Coordinate>>>} coordinates Coordinates.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @override
- * @api
- */
-ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) {
-  if (!coordinates) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null, this.endss_);
-  } else {
-    this.setLayout(opt_layout, coordinates, 3);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    var endss = ol.geom.flat.deflate.coordinatesss(
-        this.flatCoordinates, 0, coordinates, this.stride, this.endss_);
-    if (endss.length === 0) {
-      this.flatCoordinates.length = 0;
-    } else {
-      var lastEnds = endss[endss.length - 1];
-      this.flatCoordinates.length = lastEnds.length === 0 ?
-        0 : lastEnds[lastEnds.length - 1];
-    }
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<Array.<number>>} endss Endss.
- */
-ol.geom.MultiPolygon.prototype.setFlatCoordinates = function(layout, flatCoordinates, endss) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.endss_ = endss;
-  this.changed();
-};
-
-
-/**
- * @param {Array.<ol.geom.Polygon>} polygons Polygons.
- */
-ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) {
-  var layout = this.getLayout();
-  var flatCoordinates = [];
-  var endss = [];
-  var i, ii, ends;
-  for (i = 0, ii = polygons.length; i < ii; ++i) {
-    var polygon = polygons[i];
-    if (i === 0) {
-      layout = polygon.getLayout();
-    }
-    var offset = flatCoordinates.length;
-    ends = polygon.getEnds();
-    var j, jj;
-    for (j = 0, jj = ends.length; j < jj; ++j) {
-      ends[j] += offset;
-    }
-    ol.array.extend(flatCoordinates, polygon.getFlatCoordinates());
-    endss.push(ends);
-  }
-  this.setFlatCoordinates(layout, flatCoordinates, endss);
-};
-
-goog.provide('ol.format.EsriJSON');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.flat.deflate');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the EsriJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.EsriJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.EsriJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * Name of the geometry attribute for features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-};
-ol.inherits(ol.format.EsriJSON, ol.format.JSONFeature);
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.EsriJSON.readGeometry_ = function(object, opt_options) {
-  if (!object) {
-    return null;
-  }
-  /** @type {ol.geom.GeometryType} */
-  var type;
-  if (typeof object.x === 'number' && typeof object.y === 'number') {
-    type = ol.geom.GeometryType.POINT;
-  } else if (object.points) {
-    type = ol.geom.GeometryType.MULTI_POINT;
-  } else if (object.paths) {
-    if (object.paths.length === 1) {
-      type = ol.geom.GeometryType.LINE_STRING;
-    } else {
-      type = ol.geom.GeometryType.MULTI_LINE_STRING;
-    }
-  } else if (object.rings) {
-    var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-    var rings = ol.format.EsriJSON.convertRings_(object.rings, layout);
-    object = /** @type {EsriJSONGeometry} */(ol.obj.assign({}, object));
-    if (rings.length === 1) {
-      type = ol.geom.GeometryType.POLYGON;
-      object.rings = rings[0];
-    } else {
-      type = ol.geom.GeometryType.MULTI_POLYGON;
-      object.rings = rings;
-    }
-  }
-  var geometryReader = ol.format.EsriJSON.GEOMETRY_READERS_[type];
-  return /** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(
-        geometryReader(object), false, opt_options));
-};
-
-
-/**
- * Determines inner and outer rings.
- * Checks if any polygons in this array contain any other polygons in this
- * array. It is used for checking for holes.
- * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser
- * @param {Array.<!Array.<!Array.<number>>>} rings Rings.
- * @param {ol.geom.GeometryLayout} layout Geometry layout.
- * @private
- * @return {Array.<!Array.<!Array.<number>>>} Transformed rings.
- */
-ol.format.EsriJSON.convertRings_ = function(rings, layout) {
-  var flatRing = [];
-  var outerRings = [];
-  var holes = [];
-  var i, ii;
-  for (i = 0, ii = rings.length; i < ii; ++i) {
-    flatRing.length = 0;
-    ol.geom.flat.deflate.coordinates(flatRing, 0, rings[i], layout.length);
-    // is this ring an outer ring? is it clockwise?
-    var clockwise = ol.geom.flat.orient.linearRingIsClockwise(flatRing, 0,
-        flatRing.length, layout.length);
-    if (clockwise) {
-      outerRings.push([rings[i]]);
-    } else {
-      holes.push(rings[i]);
-    }
-  }
-  while (holes.length) {
-    var hole = holes.shift();
-    var matched = false;
-    // loop over all outer rings and see if they contain our hole.
-    for (i = outerRings.length - 1; i >= 0; i--) {
-      var outerRing = outerRings[i][0];
-      var containsHole = ol.extent.containsExtent(
-          new ol.geom.LinearRing(outerRing).getExtent(),
-          new ol.geom.LinearRing(hole).getExtent()
-      );
-      if (containsHole) {
-        // the hole is contained push it into our polygon
-        outerRings[i].push(hole);
-        matched = true;
-        break;
-      }
-    }
-    if (!matched) {
-      // no outer rings contain this hole turn it into and outer
-      // ring (reverse it)
-      outerRings.push([hole.reverse()]);
-    }
-  }
-  return outerRings;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} Point.
- */
-ol.format.EsriJSON.readPointGeometry_ = function(object) {
-  var point;
-  if (object.m !== undefined && object.z !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.z, object.m],
-        ol.geom.GeometryLayout.XYZM);
-  } else if (object.z !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.z],
-        ol.geom.GeometryLayout.XYZ);
-  } else if (object.m !== undefined) {
-    point = new ol.geom.Point([object.x, object.y, object.m],
-        ol.geom.GeometryLayout.XYM);
-  } else {
-    point = new ol.geom.Point([object.x, object.y]);
-  }
-  return point;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} LineString.
- */
-ol.format.EsriJSON.readLineStringGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.LineString(object.paths[0], layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiLineString.
- */
-ol.format.EsriJSON.readMultiLineStringGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiLineString(object.paths, layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.GeometryLayout} The geometry layout to use.
- */
-ol.format.EsriJSON.getGeometryLayout_ = function(object) {
-  var layout = ol.geom.GeometryLayout.XY;
-  if (object.hasZ === true && object.hasM === true) {
-    layout = ol.geom.GeometryLayout.XYZM;
-  } else if (object.hasZ === true) {
-    layout = ol.geom.GeometryLayout.XYZ;
-  } else if (object.hasM === true) {
-    layout = ol.geom.GeometryLayout.XYM;
-  }
-  return layout;
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiPoint.
- */
-ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiPoint(object.points, layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} MultiPolygon.
- */
-ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.MultiPolygon(
-      /** @type {Array.<Array.<Array.<Array.<number>>>>} */(object.rings),
-      layout);
-};
-
-
-/**
- * @param {EsriJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Geometry} Polygon.
- */
-ol.format.EsriJSON.readPolygonGeometry_ = function(object) {
-  var layout = ol.format.EsriJSON.getGeometryLayout_(object);
-  return new ol.geom.Polygon(object.rings, layout);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONGeometry} EsriJSON geometry.
- */
-ol.format.EsriJSON.writePointGeometry_ = function(geometry, opt_options) {
-  var coordinates = /** @type {ol.geom.Point} */ (geometry).getCoordinates();
-  var esriJSON;
-  var layout = /** @type {ol.geom.Point} */ (geometry).getLayout();
-  if (layout === ol.geom.GeometryLayout.XYZ) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      z: coordinates[2]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XYM) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      m: coordinates[2]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XYZM) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1],
-      z: coordinates[2],
-      m: coordinates[3]
-    });
-  } else if (layout === ol.geom.GeometryLayout.XY) {
-    esriJSON = /** @type {EsriJSONPoint} */ ({
-      x: coordinates[0],
-      y: coordinates[1]
-    });
-  } else {
-    ol.asserts.assert(false, 34); // Invalid geometry layout
-  }
-  return /** @type {EsriJSONGeometry} */ (esriJSON);
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @private
- * @return {Object} Object with boolean hasZ and hasM keys.
- */
-ol.format.EsriJSON.getHasZM_ = function(geometry) {
-  var layout = geometry.getLayout();
-  return {
-    hasZ: (layout === ol.geom.GeometryLayout.XYZ ||
-      layout === ol.geom.GeometryLayout.XYZM),
-    hasM: (layout === ol.geom.GeometryLayout.XYM ||
-      layout === ol.geom.GeometryLayout.XYZM)
-  };
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolyline} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.LineString} */(geometry));
-  return /** @type {EsriJSONPolyline} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    paths: [
-      /** @type {ol.geom.LineString} */ (geometry).getCoordinates()
-    ]
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolygon} EsriJSON geometry.
- */
-ol.format.EsriJSON.writePolygonGeometry_ = function(geometry, opt_options) {
-  // Esri geometries use the left-hand rule
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.Polygon} */(geometry));
-  return /** @type {EsriJSONPolygon} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    rings: /** @type {ol.geom.Polygon} */ (geometry).getCoordinates(false)
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolyline} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiLineString} */(geometry));
-  return /** @type {EsriJSONPolyline} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    paths: /** @type {ol.geom.MultiLineString} */ (geometry).getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONMultipoint} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiPoint} */(geometry));
-  return /** @type {EsriJSONMultipoint} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    points: /** @type {ol.geom.MultiPoint} */ (geometry).getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONPolygon} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeMultiPolygonGeometry_ = function(geometry,
-    opt_options) {
-  var hasZM = ol.format.EsriJSON.getHasZM_(/** @type {ol.geom.MultiPolygon} */(geometry));
-  var coordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getCoordinates(false);
-  var output = [];
-  for (var i = 0; i < coordinates.length; i++) {
-    for (var x = coordinates[i].length - 1; x >= 0; x--) {
-      output.push(coordinates[i][x]);
-    }
-  }
-  return /** @type {EsriJSONPolygon} */ ({
-    hasZ: hasZM.hasZ,
-    hasM: hasZM.hasM,
-    rings: output
-  });
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<ol.geom.GeometryType, function(EsriJSONGeometry): ol.geom.Geometry>}
- */
-ol.format.EsriJSON.GEOMETRY_READERS_ = {};
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.POINT] =
-  ol.format.EsriJSON.readPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.LINE_STRING] =
-  ol.format.EsriJSON.readLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.POLYGON] =
-  ol.format.EsriJSON.readPolygonGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_POINT] =
-  ol.format.EsriJSON.readMultiPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_LINE_STRING] =
-  ol.format.EsriJSON.readMultiLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_READERS_[ol.geom.GeometryType.MULTI_POLYGON] =
-  ol.format.EsriJSON.readMultiPolygonGeometry_;
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (EsriJSONGeometry)>}
- */
-ol.format.EsriJSON.GEOMETRY_WRITERS_ = {};
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.POINT] =
-  ol.format.EsriJSON.writePointGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.LINE_STRING] =
-  ol.format.EsriJSON.writeLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.POLYGON] =
-  ol.format.EsriJSON.writePolygonGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_POINT] =
-  ol.format.EsriJSON.writeMultiPointGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_LINE_STRING] =
-  ol.format.EsriJSON.writeMultiLineStringGeometry_;
-ol.format.EsriJSON.GEOMETRY_WRITERS_[ol.geom.GeometryType.MULTI_POLYGON] =
-  ol.format.EsriJSON.writeMultiPolygonGeometry_;
-
-
-/**
- * Read a feature from a EsriJSON Feature source.  Only works for Feature,
- * use `readFeatures` to read FeatureCollection source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.EsriJSON.prototype.readFeature;
-
-
-/**
- * Read all features from a EsriJSON source.  Works with both Feature and
- * FeatureCollection sources.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.EsriJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readFeatureFromObject = function(
-    object, opt_options) {
-  var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);
-  var geometry = ol.format.EsriJSON.readGeometry_(esriJSONFeature.geometry,
-      opt_options);
-  var feature = new ol.Feature();
-  if (this.geometryName_) {
-    feature.setGeometryName(this.geometryName_);
-  }
-  feature.setGeometry(geometry);
-  if (opt_options && opt_options.idField &&
-    esriJSONFeature.attributes[opt_options.idField]) {
-    feature.setId(/** @type {number} */(
-      esriJSONFeature.attributes[opt_options.idField]));
-  }
-  if (esriJSONFeature.attributes) {
-    feature.setProperties(esriJSONFeature.attributes);
-  }
-  return feature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  var esriJSONObject = /** @type {EsriJSONObject} */ (object);
-  var options = opt_options ? opt_options : {};
-  if (esriJSONObject.features) {
-    var esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */
-      (object);
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    var esriJSONFeatures = esriJSONFeatureCollection.features;
-    var i, ii;
-    options.idField = object.objectIdFieldName;
-    for (i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {
-      features.push(this.readFeatureFromObject(esriJSONFeatures[i],
-          options));
-    }
-    return features;
-  } else {
-    return [this.readFeatureFromObject(object, options)];
-  }
-};
-
-
-/**
- * Read a geometry from a EsriJSON source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.EsriJSON.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readGeometryFromObject = function(
-    object, opt_options) {
-  return ol.format.EsriJSON.readGeometry_(
-      /** @type {EsriJSONGeometry} */(object), opt_options);
-};
-
-
-/**
- * Read the projection from a EsriJSON source.
- *
- * @function
- * @param {ArrayBuffer|Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.EsriJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.EsriJSON.prototype.readProjectionFromObject = function(object) {
-  var esriJSONObject = /** @type {EsriJSONObject} */ (object);
-  if (esriJSONObject.spatialReference && esriJSONObject.spatialReference.wkid) {
-    var crs = esriJSONObject.spatialReference.wkid;
-    return ol.proj.get('EPSG:' + crs);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {EsriJSONGeometry} EsriJSON geometry.
- */
-ol.format.EsriJSON.writeGeometry_ = function(geometry, opt_options) {
-  var geometryWriter = ol.format.EsriJSON.GEOMETRY_WRITERS_[geometry.getType()];
-  return geometryWriter(/** @type {ol.geom.Geometry} */(
-    ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
-  opt_options);
-};
-
-
-/**
- * Encode a geometry as a EsriJSON string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeGeometry;
-
-
-/**
- * Encode a geometry as a EsriJSON object.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {EsriJSONGeometry} Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeGeometryObject = function(geometry,
-    opt_options) {
-  return ol.format.EsriJSON.writeGeometry_(geometry,
-      this.adaptOptions(opt_options));
-};
-
-
-/**
- * Encode a feature as a EsriJSON Feature string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeature;
-
-
-/**
- * Encode a feature as a esriJSON Feature object.
- *
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeatureObject = function(
-    feature, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var object = {};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    object['geometry'] =
-      ol.format.EsriJSON.writeGeometry_(geometry, opt_options);
-    if (opt_options && opt_options.featureProjection) {
-      object['geometry']['spatialReference'] = /** @type {EsriJSONCRS} */({
-        wkid: ol.proj.get(
-            opt_options.featureProjection).getCode().split(':').pop()
-      });
-    }
-  }
-  var properties = feature.getProperties();
-  delete properties[feature.getGeometryName()];
-  if (!ol.obj.isEmpty(properties)) {
-    object['attributes'] = properties;
-  } else {
-    object['attributes'] = {};
-  }
-  return object;
-};
-
-
-/**
- * Encode an array of features as EsriJSON.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} EsriJSON.
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features as a EsriJSON object.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {Object} EsriJSON Object.
- * @override
- * @api
- */
-ol.format.EsriJSON.prototype.writeFeaturesObject = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var objects = [];
-  var i, ii;
-  for (i = 0, ii = features.length; i < ii; ++i) {
-    objects.push(this.writeFeatureObject(features[i], opt_options));
-  }
-  return /** @type {EsriJSONFeatureCollection} */ ({
-    'features': objects
-  });
-};
-
-goog.provide('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature filters.
- *
- * deprecated: This class will no longer be exported starting from the next major version.
- *
- * @constructor
- * @abstract
- * @param {!string} tagName The XML tag name for this filter.
- * @struct
- * @api
- */
-ol.format.filter.Filter = function(tagName) {
-
-  /**
-   * @private
-   * @type {!string}
-   */
-  this.tagName_ = tagName;
-};
-
-/**
- * The XML tag name for a filter.
- * @returns {!string} Name.
- */
-ol.format.filter.Filter.prototype.getTagName = function() {
-  return this.tagName_;
-};
-
-goog.provide('ol.format.filter.LogicalNary');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature n-ary logical filters.
- *
- * @constructor
- * @abstract
- * @param {!string} tagName The XML tag name for this filter.
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.Filter}
- */
-ol.format.filter.LogicalNary = function(tagName, conditions) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {Array.<ol.format.filter.Filter>}
-   */
-  this.conditions = Array.prototype.slice.call(arguments, 1);
-  ol.asserts.assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.
-};
-ol.inherits(ol.format.filter.LogicalNary, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.And');
-
-goog.require('ol');
-goog.require('ol.format.filter.LogicalNary');
-
-/**
- * @classdesc
- * Represents a logical `<And>` operator between two or more filter conditions.
- *
- * deprecated: This class will no longer be exported starting from the next major version.
- *
- * @constructor
- * @abstract
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.LogicalNary}
- * @api
- */
-ol.format.filter.And = function(conditions) {
-  var params = ['And'].concat(Array.prototype.slice.call(arguments));
-  ol.format.filter.LogicalNary.apply(this, params);
-};
-ol.inherits(ol.format.filter.And, ol.format.filter.LogicalNary);
-
-goog.provide('ol.format.filter.Bbox');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Represents a `<BBOX>` operator to test whether a geometry-valued property
- * intersects a fixed bounding box
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.Extent} extent Extent.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Bbox = function(geometryName, extent, opt_srsName) {
-
-  ol.format.filter.Filter.call(this, 'BBOX');
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.geometryName = geometryName;
-
-  /**
-   * @public
-   * @type {ol.Extent}
-   */
-  this.extent = extent;
-
-  /**
-   * @public
-   * @type {string|undefined}
-   */
-  this.srsName = opt_srsName;
-};
-ol.inherits(ol.format.filter.Bbox, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.Spatial');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Represents a spatial operator to test whether a geometry-valued property
- * relates to a given geometry.
- *
- * deprecated: This class will no longer be exported starting from the next major version.
- *
- * @constructor
- * @abstract
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Spatial = function(tagName, geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.geometryName = geometryName || 'the_geom';
-
-  /**
-   * @public
-   * @type {ol.geom.Geometry}
-   */
-  this.geometry = geometry;
-
-  /**
-   * @public
-   * @type {string|undefined}
-   */
-  this.srsName = opt_srsName;
-};
-ol.inherits(ol.format.filter.Spatial, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.Contains');
-
-goog.require('ol');
-goog.require('ol.format.filter.Spatial');
-
-
-/**
- * @classdesc
- * Represents a `<Contains>` operator to test whether a geometry-valued property
- * contains a given geometry.
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Spatial}
- * @api
- */
-ol.format.filter.Contains = function(geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Spatial.call(this, 'Contains', geometryName, geometry, opt_srsName);
-
-};
-ol.inherits(ol.format.filter.Contains, ol.format.filter.Spatial);
-
-goog.provide('ol.format.filter.Comparison');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature property comparison filters.
- *
- * deprecated: This class will no longer be exported starting from the next major version.
- *
- * @constructor
- * @abstract
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} propertyName Name of the context property to compare.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Comparison = function(tagName, propertyName) {
-
-  ol.format.filter.Filter.call(this, tagName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.propertyName = propertyName;
-};
-ol.inherits(ol.format.filter.Comparison, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.During');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<During>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} begin The begin date in ISO-8601 format.
- * @param {!string} end The end date in ISO-8601 format.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.During = function(propertyName, begin, end) {
-  ol.format.filter.Comparison.call(this, 'During', propertyName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.begin = begin;
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.end = end;
-};
-ol.inherits(ol.format.filter.During, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.ComparisonBinary');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Abstract class; normally only used for creating subclasses and not instantiated in apps.
- * Base class for WFS GetFeature property binary comparison filters.
- *
- * deprecated: This class will no longer be exported starting from the next major version.
- *
- * @constructor
- * @abstract
- * @param {!string} tagName The XML tag name for this filter.
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.ComparisonBinary = function(
-    tagName, propertyName, expression, opt_matchCase) {
-
-  ol.format.filter.Comparison.call(this, tagName, propertyName);
-
-  /**
-   * @public
-   * @type {!(string|number)}
-   */
-  this.expression = expression;
-
-  /**
-   * @public
-   * @type {boolean|undefined}
-   */
-  this.matchCase = opt_matchCase;
-};
-ol.inherits(ol.format.filter.ComparisonBinary, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.EqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.EqualTo = function(propertyName, expression, opt_matchCase) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);
-};
-ol.inherits(ol.format.filter.EqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.GreaterThan');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsGreaterThan>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.GreaterThan = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThan', propertyName, expression);
-};
-ol.inherits(ol.format.filter.GreaterThan, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.GreaterThanOrEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.GreaterThanOrEqualTo = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);
-};
-ol.inherits(ol.format.filter.GreaterThanOrEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Intersects');
-
-goog.require('ol');
-goog.require('ol.format.filter.Spatial');
-
-
-/**
- * @classdesc
- * Represents a `<Intersects>` operator to test whether a geometry-valued property
- * intersects a given geometry.
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Spatial}
- * @api
- */
-ol.format.filter.Intersects = function(geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Spatial.call(this, 'Intersects', geometryName, geometry, opt_srsName);
-
-};
-ol.inherits(ol.format.filter.Intersects, ol.format.filter.Spatial);
-
-goog.provide('ol.format.filter.IsBetween');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsBetween>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} lowerBoundary The lower bound of the range.
- * @param {!number} upperBoundary The upper bound of the range.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsBetween = function(propertyName, lowerBoundary, upperBoundary) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsBetween', propertyName);
-
-  /**
-   * @public
-   * @type {!number}
-   */
-  this.lowerBoundary = lowerBoundary;
-
-  /**
-   * @public
-   * @type {!number}
-   */
-  this.upperBoundary = upperBoundary;
-};
-ol.inherits(ol.format.filter.IsBetween, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.IsLike');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLike>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} pattern Text pattern.
- * @param {string=} opt_wildCard Pattern character which matches any sequence of
- *    zero or more string characters. Default is '*'.
- * @param {string=} opt_singleChar pattern character which matches any single
- *    string character. Default is '.'.
- * @param {string=} opt_escapeChar Escape character which can be used to escape
- *    the pattern characters. Default is '!'.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsLike = function(propertyName, pattern,
-    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsLike', propertyName);
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.pattern = pattern;
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*';
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.';
-
-  /**
-   * @public
-   * @type {!string}
-   */
-  this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!';
-
-  /**
-   * @public
-   * @type {boolean|undefined}
-   */
-  this.matchCase = opt_matchCase;
-};
-ol.inherits(ol.format.filter.IsLike, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.IsNull');
-
-goog.require('ol');
-goog.require('ol.format.filter.Comparison');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsNull>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @extends {ol.format.filter.Comparison}
- * @api
- */
-ol.format.filter.IsNull = function(propertyName) {
-  ol.format.filter.Comparison.call(this, 'PropertyIsNull', propertyName);
-};
-ol.inherits(ol.format.filter.IsNull, ol.format.filter.Comparison);
-
-goog.provide('ol.format.filter.LessThan');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLessThan>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.LessThan = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThan', propertyName, expression);
-};
-ol.inherits(ol.format.filter.LessThan, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.LessThanOrEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.LessThanOrEqualTo = function(propertyName, expression) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);
-};
-ol.inherits(ol.format.filter.LessThanOrEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Not');
-
-goog.require('ol');
-goog.require('ol.format.filter.Filter');
-
-
-/**
- * @classdesc
- * Represents a logical `<Not>` operator for a filter condition.
- *
- * @constructor
- * @param {!ol.format.filter.Filter} condition Filter condition.
- * @extends {ol.format.filter.Filter}
- * @api
- */
-ol.format.filter.Not = function(condition) {
-
-  ol.format.filter.Filter.call(this, 'Not');
-
-  /**
-   * @public
-   * @type {!ol.format.filter.Filter}
-   */
-  this.condition = condition;
-};
-ol.inherits(ol.format.filter.Not, ol.format.filter.Filter);
-
-goog.provide('ol.format.filter.NotEqualTo');
-
-goog.require('ol');
-goog.require('ol.format.filter.ComparisonBinary');
-
-
-/**
- * @classdesc
- * Represents a `<PropertyIsNotEqualTo>` comparison operator.
- *
- * @constructor
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @extends {ol.format.filter.ComparisonBinary}
- * @api
- */
-ol.format.filter.NotEqualTo = function(propertyName, expression, opt_matchCase) {
-  ol.format.filter.ComparisonBinary.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);
-};
-ol.inherits(ol.format.filter.NotEqualTo, ol.format.filter.ComparisonBinary);
-
-goog.provide('ol.format.filter.Or');
-
-goog.require('ol');
-goog.require('ol.format.filter.LogicalNary');
-
-
-/**
- * @classdesc
- * Represents a logical `<Or>` operator between two ore more filter conditions.
- *
- * @constructor
- * @param {...ol.format.filter.Filter} conditions Conditions.
- * @extends {ol.format.filter.LogicalNary}
- * @api
- */
-ol.format.filter.Or = function(conditions) {
-  var params = ['Or'].concat(Array.prototype.slice.call(arguments));
-  ol.format.filter.LogicalNary.apply(this, params);
-};
-ol.inherits(ol.format.filter.Or, ol.format.filter.LogicalNary);
-
-goog.provide('ol.format.filter.Within');
-
-goog.require('ol');
-goog.require('ol.format.filter.Spatial');
-
-
-/**
- * @classdesc
- * Represents a `<Within>` operator to test whether a geometry-valued property
- * is within a given geometry.
- *
- * @constructor
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @extends {ol.format.filter.Spatial}
- * @api
- */
-ol.format.filter.Within = function(geometryName, geometry, opt_srsName) {
-
-  ol.format.filter.Spatial.call(this, 'Within', geometryName, geometry, opt_srsName);
-
-};
-ol.inherits(ol.format.filter.Within, ol.format.filter.Spatial);
-
-goog.provide('ol.format.filter');
-
-goog.require('ol.format.filter.And');
-goog.require('ol.format.filter.Bbox');
-goog.require('ol.format.filter.Contains');
-goog.require('ol.format.filter.During');
-goog.require('ol.format.filter.EqualTo');
-goog.require('ol.format.filter.GreaterThan');
-goog.require('ol.format.filter.GreaterThanOrEqualTo');
-goog.require('ol.format.filter.Intersects');
-goog.require('ol.format.filter.IsBetween');
-goog.require('ol.format.filter.IsLike');
-goog.require('ol.format.filter.IsNull');
-goog.require('ol.format.filter.LessThan');
-goog.require('ol.format.filter.LessThanOrEqualTo');
-goog.require('ol.format.filter.Not');
-goog.require('ol.format.filter.NotEqualTo');
-goog.require('ol.format.filter.Or');
-goog.require('ol.format.filter.Within');
-
-
-/**
- * Create a logical `<And>` operator between two or more filter conditions.
- *
- * @param {...ol.format.filter.Filter} conditions Filter conditions.
- * @returns {!ol.format.filter.And} `<And>` operator.
- * @api
- */
-ol.format.filter.and = function(conditions) {
-  var params = [null].concat(Array.prototype.slice.call(arguments));
-  return new (Function.prototype.bind.apply(ol.format.filter.And, params));
-};
-
-
-/**
- * Create a logical `<Or>` operator between two or more filter conditions.
- *
- * @param {...ol.format.filter.Filter} conditions Filter conditions.
- * @returns {!ol.format.filter.Or} `<Or>` operator.
- * @api
- */
-ol.format.filter.or = function(conditions) {
-  var params = [null].concat(Array.prototype.slice.call(arguments));
-  return new (Function.prototype.bind.apply(ol.format.filter.Or, params));
-};
-
-
-/**
- * Represents a logical `<Not>` operator for a filter condition.
- *
- * @param {!ol.format.filter.Filter} condition Filter condition.
- * @returns {!ol.format.filter.Not} `<Not>` operator.
- * @api
- */
-ol.format.filter.not = function(condition) {
-  return new ol.format.filter.Not(condition);
-};
-
-
-/**
- * Create a `<BBOX>` operator to test whether a geometry-valued property
- * intersects a fixed bounding box
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.Extent} extent Extent.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Bbox} `<BBOX>` operator.
- * @api
- */
-ol.format.filter.bbox = function(geometryName, extent, opt_srsName) {
-  return new ol.format.filter.Bbox(geometryName, extent, opt_srsName);
-};
-
-/**
- * Create a `<Contains>` operator to test whether a geometry-valued property
- * contains a given geometry.
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Contains} `<Contains>` operator.
- * @api
- */
-ol.format.filter.contains = function(geometryName, geometry, opt_srsName) {
-  return new ol.format.filter.Contains(geometryName, geometry, opt_srsName);
-};
-
-/**
- * Create a `<Intersects>` operator to test whether a geometry-valued property
- * intersects a given geometry.
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Intersects} `<Intersects>` operator.
- * @api
- */
-ol.format.filter.intersects = function(geometryName, geometry, opt_srsName) {
-  return new ol.format.filter.Intersects(geometryName, geometry, opt_srsName);
-};
-
-/**
- * Create a `<Within>` operator to test whether a geometry-valued property
- * is within a given geometry.
- *
- * @param {!string} geometryName Geometry name to use.
- * @param {!ol.geom.Geometry} geometry Geometry.
- * @param {string=} opt_srsName SRS name. No srsName attribute will be
- *    set on geometries when this is not provided.
- * @returns {!ol.format.filter.Within} `<Within>` operator.
- * @api
- */
-ol.format.filter.within = function(geometryName, geometry, opt_srsName) {
-  return new ol.format.filter.Within(geometryName, geometry, opt_srsName);
-};
-
-
-/**
- * Creates a `<PropertyIsEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.EqualTo} `<PropertyIsEqualTo>` operator.
- * @api
- */
-ol.format.filter.equalTo = function(propertyName, expression, opt_matchCase) {
-  return new ol.format.filter.EqualTo(propertyName, expression, opt_matchCase);
-};
-
-
-/**
- * Creates a `<PropertyIsNotEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!(string|number)} expression The value to compare.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.NotEqualTo} `<PropertyIsNotEqualTo>` operator.
- * @api
- */
-ol.format.filter.notEqualTo = function(propertyName, expression, opt_matchCase) {
-  return new ol.format.filter.NotEqualTo(propertyName, expression, opt_matchCase);
-};
-
-
-/**
- * Creates a `<PropertyIsLessThan>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.LessThan} `<PropertyIsLessThan>` operator.
- * @api
- */
-ol.format.filter.lessThan = function(propertyName, expression) {
-  return new ol.format.filter.LessThan(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
- * @api
- */
-ol.format.filter.lessThanOrEqualTo = function(propertyName, expression) {
-  return new ol.format.filter.LessThanOrEqualTo(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsGreaterThan>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.GreaterThan} `<PropertyIsGreaterThan>` operator.
- * @api
- */
-ol.format.filter.greaterThan = function(propertyName, expression) {
-  return new ol.format.filter.GreaterThan(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} expression The value to compare.
- * @returns {!ol.format.filter.GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
- * @api
- */
-ol.format.filter.greaterThanOrEqualTo = function(propertyName, expression) {
-  return new ol.format.filter.GreaterThanOrEqualTo(propertyName, expression);
-};
-
-
-/**
- * Creates a `<PropertyIsNull>` comparison operator to test whether a property value
- * is null.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @returns {!ol.format.filter.IsNull} `<PropertyIsNull>` operator.
- * @api
- */
-ol.format.filter.isNull = function(propertyName) {
-  return new ol.format.filter.IsNull(propertyName);
-};
-
-
-/**
- * Creates a `<PropertyIsBetween>` comparison operator to test whether an expression
- * value lies within a range given by a lower and upper bound (inclusive).
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!number} lowerBoundary The lower bound of the range.
- * @param {!number} upperBoundary The upper bound of the range.
- * @returns {!ol.format.filter.IsBetween} `<PropertyIsBetween>` operator.
- * @api
- */
-ol.format.filter.between = function(propertyName, lowerBoundary, upperBoundary) {
-  return new ol.format.filter.IsBetween(propertyName, lowerBoundary, upperBoundary);
-};
-
-
-/**
- * Represents a `<PropertyIsLike>` comparison operator that matches a string property
- * value against a text pattern.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} pattern Text pattern.
- * @param {string=} opt_wildCard Pattern character which matches any sequence of
- *    zero or more string characters. Default is '*'.
- * @param {string=} opt_singleChar pattern character which matches any single
- *    string character. Default is '.'.
- * @param {string=} opt_escapeChar Escape character which can be used to escape
- *    the pattern characters. Default is '!'.
- * @param {boolean=} opt_matchCase Case-sensitive?
- * @returns {!ol.format.filter.IsLike} `<PropertyIsLike>` operator.
- * @api
- */
-ol.format.filter.like = function(propertyName, pattern,
-    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {
-  return new ol.format.filter.IsLike(propertyName, pattern,
-      opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);
-};
-
-
-/**
- * Create a `<During>` temporal operator.
- *
- * @param {!string} propertyName Name of the context property to compare.
- * @param {!string} begin The begin date in ISO-8601 format.
- * @param {!string} end The end date in ISO-8601 format.
- * @returns {!ol.format.filter.During} `<During>` operator.
- * @api
- */
-ol.format.filter.during = function(propertyName, begin, end) {
-  return new ol.format.filter.During(propertyName, begin, end);
-};
-
-goog.provide('ol.geom.GeometryCollection');
-
-goog.require('ol');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * An array of {@link ol.geom.Geometry} objects.
- *
- * @constructor
- * @extends {ol.geom.Geometry}
- * @param {Array.<ol.geom.Geometry>=} opt_geometries Geometries.
- * @api
- */
-ol.geom.GeometryCollection = function(opt_geometries) {
-
-  ol.geom.Geometry.call(this);
-
-  /**
-   * @private
-   * @type {Array.<ol.geom.Geometry>}
-   */
-  this.geometries_ = opt_geometries ? opt_geometries : null;
-
-  this.listenGeometriesChange_();
-};
-ol.inherits(ol.geom.GeometryCollection, ol.geom.Geometry);
-
-
-/**
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- * @private
- * @return {Array.<ol.geom.Geometry>} Cloned geometries.
- */
-ol.geom.GeometryCollection.cloneGeometries_ = function(geometries) {
-  var clonedGeometries = [];
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    clonedGeometries.push(geometries[i].clone());
-  }
-  return clonedGeometries;
-};
-
-
-/**
- * @private
- */
-ol.geom.GeometryCollection.prototype.unlistenGeometriesChange_ = function() {
-  var i, ii;
-  if (!this.geometries_) {
-    return;
-  }
-  for (i = 0, ii = this.geometries_.length; i < ii; ++i) {
-    ol.events.unlisten(
-        this.geometries_[i], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-};
-
-
-/**
- * @private
- */
-ol.geom.GeometryCollection.prototype.listenGeometriesChange_ = function() {
-  var i, ii;
-  if (!this.geometries_) {
-    return;
-  }
-  for (i = 0, ii = this.geometries_.length; i < ii; ++i) {
-    ol.events.listen(
-        this.geometries_[i], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-};
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.GeometryCollection} Clone.
- * @override
- * @api
- */
-ol.geom.GeometryCollection.prototype.clone = function() {
-  var geometryCollection = new ol.geom.GeometryCollection(null);
-  geometryCollection.setGeometries(this.geometries_);
-  return geometryCollection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  if (minSquaredDistance <
-      ol.extent.closestSquaredDistanceXY(this.getExtent(), x, y)) {
-    return minSquaredDistance;
-  }
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    minSquaredDistance = geometries[i].closestPointXY(
-        x, y, closestPoint, minSquaredDistance);
-  }
-  return minSquaredDistance;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.containsXY = function(x, y) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    if (geometries[i].containsXY(x, y)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.computeExtent = function(extent) {
-  ol.extent.createOrUpdateEmpty(extent);
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    ol.extent.extend(extent, geometries[i].getExtent());
-  }
-  return extent;
-};
-
-
-/**
- * Return the geometries that make up this geometry collection.
- * @return {Array.<ol.geom.Geometry>} Geometries.
- * @api
- */
-ol.geom.GeometryCollection.prototype.getGeometries = function() {
-  return ol.geom.GeometryCollection.cloneGeometries_(this.geometries_);
-};
-
-
-/**
- * @return {Array.<ol.geom.Geometry>} Geometries.
- */
-ol.geom.GeometryCollection.prototype.getGeometriesArray = function() {
-  return this.geometries_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) {
-  if (this.simplifiedGeometryRevision != this.getRevision()) {
-    ol.obj.clear(this.simplifiedGeometryCache);
-    this.simplifiedGeometryMaxMinSquaredTolerance = 0;
-    this.simplifiedGeometryRevision = this.getRevision();
-  }
-  if (squaredTolerance < 0 ||
-      (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
-       squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {
-    return this;
-  }
-  var key = squaredTolerance.toString();
-  if (this.simplifiedGeometryCache.hasOwnProperty(key)) {
-    return this.simplifiedGeometryCache[key];
-  } else {
-    var simplifiedGeometries = [];
-    var geometries = this.geometries_;
-    var simplified = false;
-    var i, ii;
-    for (i = 0, ii = geometries.length; i < ii; ++i) {
-      var geometry = geometries[i];
-      var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
-      simplifiedGeometries.push(simplifiedGeometry);
-      if (simplifiedGeometry !== geometry) {
-        simplified = true;
-      }
-    }
-    if (simplified) {
-      var simplifiedGeometryCollection = new ol.geom.GeometryCollection(null);
-      simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);
-      this.simplifiedGeometryCache[key] = simplifiedGeometryCollection;
-      return simplifiedGeometryCollection;
-    } else {
-      this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
-      return this;
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.getType = function() {
-  return ol.geom.GeometryType.GEOMETRY_COLLECTION;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.intersectsExtent = function(extent) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    if (geometries[i].intersectsExtent(extent)) {
-      return true;
-    }
-  }
-  return false;
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.geom.GeometryCollection.prototype.isEmpty = function() {
-  return this.geometries_.length === 0;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.rotate = function(angle, anchor) {
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].rotate(angle, anchor);
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.scale = function(sx, opt_sy, opt_anchor) {
-  var anchor = opt_anchor;
-  if (!anchor) {
-    anchor = ol.extent.getCenter(this.getExtent());
-  }
-  var geometries = this.geometries_;
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].scale(sx, opt_sy, anchor);
-  }
-  this.changed();
-};
-
-
-/**
- * Set the geometries that make up this geometry collection.
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- * @api
- */
-ol.geom.GeometryCollection.prototype.setGeometries = function(geometries) {
-  this.setGeometriesArray(
-      ol.geom.GeometryCollection.cloneGeometries_(geometries));
-};
-
-
-/**
- * @param {Array.<ol.geom.Geometry>} geometries Geometries.
- */
-ol.geom.GeometryCollection.prototype.setGeometriesArray = function(geometries) {
-  this.unlistenGeometriesChange_();
-  this.geometries_ = geometries;
-  this.listenGeometriesChange_();
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.GeometryCollection.prototype.applyTransform = function(transformFn) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].applyTransform(transformFn);
-  }
-  this.changed();
-};
-
-
-/**
- * Translate the geometry.
- * @param {number} deltaX Delta X.
- * @param {number} deltaY Delta Y.
- * @override
- * @api
- */
-ol.geom.GeometryCollection.prototype.translate = function(deltaX, deltaY) {
-  var geometries = this.geometries_;
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    geometries[i].translate(deltaX, deltaY);
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.GeometryCollection.prototype.disposeInternal = function() {
-  this.unlistenGeometriesChange_();
-  ol.geom.Geometry.prototype.disposeInternal.call(this);
-};
-
-// TODO: serialize dataProjection as crs member when writing
-// see https://github.com/openlayers/openlayers/issues/2078
-
-goog.provide('ol.format.GeoJSON');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GeoJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.GeoJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.GeoJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get(
-      options.defaultDataProjection ?
-        options.defaultDataProjection : 'EPSG:4326');
-
-
-  if (options.featureProjection) {
-    this.defaultFeatureProjection = ol.proj.get(options.featureProjection);
-  }
-
-  /**
-   * Name of the geometry attribute for features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-  /**
-   * Look for the geometry name in the feature GeoJSON
-   * @type {boolean|undefined}
-   * @private
-   */
-  this.extractGeometryName_ = options.extractGeometryName;
-
-};
-ol.inherits(ol.format.GeoJSON, ol.format.JSONFeature);
-
-
-/**
- * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.GeoJSON.readGeometry_ = function(object, opt_options) {
-  if (!object) {
-    return null;
-  }
-  var geometryReader = ol.format.GeoJSON.GEOMETRY_READERS_[object.type];
-  return /** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(
-        geometryReader(object), false, opt_options));
-};
-
-
-/**
- * @param {GeoJSONGeometryCollection} object Object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @private
- * @return {ol.geom.GeometryCollection} Geometry collection.
- */
-ol.format.GeoJSON.readGeometryCollectionGeometry_ = function(
-    object, opt_options) {
-  var geometries = object.geometries.map(
-      /**
-       * @param {GeoJSONGeometry} geometry Geometry.
-       * @return {ol.geom.Geometry} geometry Geometry.
-       */
-      function(geometry) {
-        return ol.format.GeoJSON.readGeometry_(geometry, opt_options);
-      });
-  return new ol.geom.GeometryCollection(geometries);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Point} Point.
- */
-ol.format.GeoJSON.readPointGeometry_ = function(object) {
-  return new ol.geom.Point(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.LineString} LineString.
- */
-ol.format.GeoJSON.readLineStringGeometry_ = function(object) {
-  return new ol.geom.LineString(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiLineString} MultiLineString.
- */
-ol.format.GeoJSON.readMultiLineStringGeometry_ = function(object) {
-  return new ol.geom.MultiLineString(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiPoint} MultiPoint.
- */
-ol.format.GeoJSON.readMultiPointGeometry_ = function(object) {
-  return new ol.geom.MultiPoint(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.MultiPolygon} MultiPolygon.
- */
-ol.format.GeoJSON.readMultiPolygonGeometry_ = function(object) {
-  return new ol.geom.MultiPolygon(object.coordinates);
-};
-
-
-/**
- * @param {GeoJSONGeometry} object Object.
- * @private
- * @return {ol.geom.Polygon} Polygon.
- */
-ol.format.GeoJSON.readPolygonGeometry_ = function(object) {
-  return new ol.geom.Polygon(object.coordinates);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry|GeoJSONGeometryCollection} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeGeometry_ = function(geometry, opt_options) {
-  var geometryWriter = ol.format.GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];
-  return geometryWriter(/** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
-  opt_options);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @private
- * @return {GeoJSONGeometryCollection} Empty GeoJSON geometry collection.
- */
-ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_ = function(geometry) {
-  return /** @type {GeoJSONGeometryCollection} */ ({
-    type: 'GeometryCollection',
-    geometries: []
-  });
-};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.
- */
-ol.format.GeoJSON.writeGeometryCollectionGeometry_ = function(
-    geometry, opt_options) {
-  var geometries = geometry.getGeometriesArray().map(function(geometry) {
-    var options = ol.obj.assign({}, opt_options);
-    delete options.featureProjection;
-    return ol.format.GeoJSON.writeGeometry_(geometry, options);
-  });
-  return /** @type {GeoJSONGeometryCollection} */ ({
-    type: 'GeometryCollection',
-    geometries: geometries
-  });
-};
-
-
-/**
- * @param {ol.geom.LineString} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeLineStringGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'LineString',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiLineStringGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiLineString',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiPointGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiPoint',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writeMultiPolygonGeometry_ = function(geometry, opt_options) {
-  var right;
-  if (opt_options) {
-    right = opt_options.rightHanded;
-  }
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'MultiPolygon',
-    coordinates: geometry.getCoordinates(right)
-  });
-};
-
-
-/**
- * @param {ol.geom.Point} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writePointGeometry_ = function(geometry, opt_options) {
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'Point',
-    coordinates: geometry.getCoordinates()
-  });
-};
-
-
-/**
- * @param {ol.geom.Polygon} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @private
- * @return {GeoJSONGeometry} GeoJSON geometry.
- */
-ol.format.GeoJSON.writePolygonGeometry_ = function(geometry, opt_options) {
-  var right;
-  if (opt_options) {
-    right = opt_options.rightHanded;
-  }
-  return /** @type {GeoJSONGeometry} */ ({
-    type: 'Polygon',
-    coordinates: geometry.getCoordinates(right)
-  });
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(GeoJSONObject): ol.geom.Geometry>}
- */
-ol.format.GeoJSON.GEOMETRY_READERS_ = {
-  'Point': ol.format.GeoJSON.readPointGeometry_,
-  'LineString': ol.format.GeoJSON.readLineStringGeometry_,
-  'Polygon': ol.format.GeoJSON.readPolygonGeometry_,
-  'MultiPoint': ol.format.GeoJSON.readMultiPointGeometry_,
-  'MultiLineString': ol.format.GeoJSON.readMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.GeoJSON.readMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.GeoJSON.readGeometryCollectionGeometry_
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(ol.geom.Geometry, olx.format.WriteOptions=): (GeoJSONGeometry|GeoJSONGeometryCollection)>}
- */
-ol.format.GeoJSON.GEOMETRY_WRITERS_ = {
-  'Point': ol.format.GeoJSON.writePointGeometry_,
-  'LineString': ol.format.GeoJSON.writeLineStringGeometry_,
-  'Polygon': ol.format.GeoJSON.writePolygonGeometry_,
-  'MultiPoint': ol.format.GeoJSON.writeMultiPointGeometry_,
-  'MultiLineString': ol.format.GeoJSON.writeMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.GeoJSON.writeMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.GeoJSON.writeGeometryCollectionGeometry_,
-  'Circle': ol.format.GeoJSON.writeEmptyGeometryCollectionGeometry_
-};
-
-
-/**
- * Read a feature from a GeoJSON Feature source.  Only works for Feature or
- * geometry types.  Use {@link ol.format.GeoJSON#readFeatures} to read
- * FeatureCollection source. If feature at source has an id, it will be used
- * as Feature id by calling {@link ol.Feature#setId} internally.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.GeoJSON.prototype.readFeature;
-
-
-/**
- * Read all features from a GeoJSON source.  Works for all GeoJSON types.
- * If the source includes only geometries, features will be created with those
- * geometries.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GeoJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readFeatureFromObject = function(
-    object, opt_options) {
-  /**
-   * @type {GeoJSONFeature}
-   */
-  var geoJSONFeature = null;
-  if (object.type === 'Feature') {
-    geoJSONFeature = /** @type {GeoJSONFeature} */ (object);
-  } else {
-    geoJSONFeature = /** @type {GeoJSONFeature} */ ({
-      type: 'Feature',
-      geometry: /** @type {GeoJSONGeometry|GeoJSONGeometryCollection} */ (object)
-    });
-  }
-
-  var geometry = ol.format.GeoJSON.readGeometry_(geoJSONFeature.geometry, opt_options);
-  var feature = new ol.Feature();
-  if (this.geometryName_) {
-    feature.setGeometryName(this.geometryName_);
-  } else if (this.extractGeometryName_ && geoJSONFeature.geometry_name !== undefined) {
-    feature.setGeometryName(geoJSONFeature.geometry_name);
-  }
-  feature.setGeometry(geometry);
-  if (geoJSONFeature.id !== undefined) {
-    feature.setId(geoJSONFeature.id);
-  }
-  if (geoJSONFeature.properties) {
-    feature.setProperties(geoJSONFeature.properties);
-  }
-  return feature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  var geoJSONObject = /** @type {GeoJSONObject} */ (object);
-  /** @type {Array.<ol.Feature>} */
-  var features = null;
-  if (geoJSONObject.type === 'FeatureCollection') {
-    var geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */
-        (object);
-    features = [];
-    var geoJSONFeatures = geoJSONFeatureCollection.features;
-    var i, ii;
-    for (i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {
-      features.push(this.readFeatureFromObject(geoJSONFeatures[i],
-          opt_options));
-    }
-  } else {
-    features = [this.readFeatureFromObject(object, opt_options)];
-  }
-  return features;
-};
-
-
-/**
- * Read a geometry from a GeoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.GeoJSON.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readGeometryFromObject = function(
-    object, opt_options) {
-  return ol.format.GeoJSON.readGeometry_(
-      /** @type {GeoJSONGeometry} */ (object), opt_options);
-};
-
-
-/**
- * Read the projection from a GeoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.GeoJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GeoJSON.prototype.readProjectionFromObject = function(object) {
-  var geoJSONObject = /** @type {GeoJSONObject} */ (object);
-  var crs = geoJSONObject.crs;
-  var projection;
-  if (crs) {
-    if (crs.type == 'name') {
-      projection = ol.proj.get(crs.properties.name);
-    } else {
-      ol.asserts.assert(false, 36); // Unknown SRS type
-    }
-  } else {
-    projection = this.defaultDataProjection;
-  }
-  return /** @type {ol.proj.Projection} */ (projection);
-};
-
-
-/**
- * Encode a feature as a GeoJSON Feature string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeature;
-
-
-/**
- * Encode a feature as a GeoJSON Feature object.
- *
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONFeature} Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeatureObject = function(feature, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-
-  var object = /** @type {GeoJSONFeature} */ ({
-    'type': 'Feature'
-  });
-  var id = feature.getId();
-  if (id !== undefined) {
-    object.id = id;
-  }
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    object.geometry =
-        ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
-  } else {
-    object.geometry = null;
-  }
-  var properties = feature.getProperties();
-  delete properties[feature.getGeometryName()];
-  if (!ol.obj.isEmpty(properties)) {
-    object.properties = properties;
-  } else {
-    object.properties = null;
-  }
-  return object;
-};
-
-
-/**
- * Encode an array of features as GeoJSON.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features as a GeoJSON object.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONFeatureCollection} GeoJSON Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeFeaturesObject = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var objects = [];
-  var i, ii;
-  for (i = 0, ii = features.length; i < ii; ++i) {
-    objects.push(this.writeFeatureObject(features[i], opt_options));
-  }
-  return /** @type {GeoJSONFeatureCollection} */ ({
-    type: 'FeatureCollection',
-    features: objects
-  });
-};
-
-
-/**
- * Encode a geometry as a GeoJSON string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} GeoJSON.
- * @api
- */
-ol.format.GeoJSON.prototype.writeGeometry;
-
-
-/**
- * Encode a geometry as a GeoJSON object.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.
- * @override
- * @api
- */
-ol.format.GeoJSON.prototype.writeGeometryObject = function(geometry,
-    opt_options) {
-  return ol.format.GeoJSON.writeGeometry_(geometry,
-      this.adaptOptions(opt_options));
-};
-
-goog.provide('ol.format.XMLFeature');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for XML feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.XMLFeature = function() {
-
-  /**
-   * @type {XMLSerializer}
-   * @private
-   */
-  this.xmlSerializer_ = new XMLSerializer();
-
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.XMLFeature, ol.format.Feature);
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.getType = function() {
-  return ol.format.FormatType.XML;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readFeature = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeatureFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeatureFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeatureFromDocument(doc, opt_options);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {ol.Feature} Feature.
- */
-ol.format.XMLFeature.prototype.readFeatureFromDocument = function(
-    doc, opt_options) {
-  var features = this.readFeaturesFromDocument(doc, opt_options);
-  if (features.length > 0) {
-    return features[0];
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {ol.Feature} Feature.
- */
-ol.format.XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readFeatures = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeaturesFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeaturesFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeaturesFromDocument(doc, opt_options);
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.XMLFeature.prototype.readFeaturesFromDocument = function(
-    doc, opt_options) {
-  /** @type {Array.<ol.Feature>} */
-  var features = [];
-  var n;
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(features, this.readFeaturesFromNode(n, opt_options));
-    }
-  }
-  return features;
-};
-
-
-/**
- * @abstract
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.XMLFeature.prototype.readFeaturesFromNode = function(node, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readGeometry = function(source, opt_options) {
-  if (ol.xml.isDocument(source)) {
-    return this.readGeometryFromDocument(
-        /** @type {Document} */ (source), opt_options);
-  } else if (ol.xml.isNode(source)) {
-    return this.readGeometryFromNode(/** @type {Node} */ (source), opt_options);
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readGeometryFromDocument(doc, opt_options);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.readProjection = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readProjectionFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readProjectionFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readProjectionFromDocument(doc);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.XMLFeature.prototype.readProjectionFromDocument = function(doc) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @param {Node} node Node.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.XMLFeature.prototype.readProjectionFromNode = function(node) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeFeature = function(feature, opt_options) {
-  var node = this.writeFeatureNode(feature, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @protected
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeFeatures = function(features, opt_options) {
-  var node = this.writeFeaturesNode(features, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_options) {
-  return null; // not implemented
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
-  var node = this.writeGeometryNode(geometry, opt_options);
-  return this.xmlSerializer_.serializeToString(node);
-};
-
-
-/**
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- */
-ol.format.XMLFeature.prototype.writeGeometryNode = function(geometry, opt_options) {
-  return null; // not implemented
-};
-
-// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part
-// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect
-// envelopes/extents, only geometries!
-goog.provide('ol.format.GMLBase');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Feature base format for reading and writing data in the GML format.
- * This class cannot be instantiated, it contains only base content that
- * is shared with versioned format classes ol.format.GML2 and
- * ol.format.GML3.
- *
- * @constructor
- * @abstract
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.XMLFeature}
- */
-ol.format.GMLBase = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  /**
-   * @protected
-   * @type {Array.<string>|string|undefined}
-   */
-  this.featureType = options.featureType;
-
-  /**
-   * @protected
-   * @type {Object.<string, string>|string|undefined}
-   */
-  this.featureNS = options.featureNS;
-
-  /**
-   * @protected
-   * @type {string}
-   */
-  this.srsName = options.srsName;
-
-  /**
-   * @protected
-   * @type {string}
-   */
-  this.schemaLocation = '';
-
-  /**
-   * @type {Object.<string, Object.<string, Object>>}
-   */
-  this.FEATURE_COLLECTION_PARSERS = {};
-  this.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS] = {
-    'featureMember': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFeaturesInternal),
-    'featureMembers': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFeaturesInternal)
-  };
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.GMLBase, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.GMLBase.GMLNS = 'http://www.opengis.net/gml';
-
-
-/**
- * A regular expression that matches if a string only contains whitespace
- * characters. It will e.g. match `''`, `' '`, `'\n'` etc. The non-breaking
- * space (0xa0) is explicitly included as IE doesn't include it in its
- * definition of `\s`.
- *
- * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160
- *
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.GMLBase.ONLY_WHITESPACE_RE_ = /^[\s\xa0]*$/;
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<ol.Feature> | undefined} Features.
- */
-ol.format.GMLBase.prototype.readFeaturesInternal = function(node, objectStack) {
-  var localName = node.localName;
-  var features = null;
-  if (localName == 'FeatureCollection') {
-    if (node.namespaceURI === 'http://www.opengis.net/wfs') {
-      features = ol.xml.pushParseAndPop([],
-          this.FEATURE_COLLECTION_PARSERS, node,
-          objectStack, this);
-    } else {
-      features = ol.xml.pushParseAndPop(null,
-          this.FEATURE_COLLECTION_PARSERS, node,
-          objectStack, this);
-    }
-  } else if (localName == 'featureMembers' || localName == 'featureMember') {
-    var context = objectStack[0];
-    var featureType = context['featureType'];
-    var featureNS = context['featureNS'];
-    var i, ii, prefix = 'p', defaultPrefix = 'p0';
-    if (!featureType && node.childNodes) {
-      featureType = [], featureNS = {};
-      for (i = 0, ii = node.childNodes.length; i < ii; ++i) {
-        var child = node.childNodes[i];
-        if (child.nodeType === 1) {
-          var ft = child.nodeName.split(':').pop();
-          if (featureType.indexOf(ft) === -1) {
-            var key = '';
-            var count = 0;
-            var uri = child.namespaceURI;
-            for (var candidate in featureNS) {
-              if (featureNS[candidate] === uri) {
-                key = candidate;
-                break;
-              }
-              ++count;
-            }
-            if (!key) {
-              key = prefix + count;
-              featureNS[key] = uri;
-            }
-            featureType.push(key + ':' + ft);
-          }
-        }
-      }
-      if (localName != 'featureMember') {
-        // recheck featureType for each featureMember
-        context['featureType'] = featureType;
-        context['featureNS'] = featureNS;
-      }
-    }
-    if (typeof featureNS === 'string') {
-      var ns = featureNS;
-      featureNS = {};
-      featureNS[defaultPrefix] = ns;
-    }
-    var parsersNS = {};
-    var featureTypes = Array.isArray(featureType) ? featureType : [featureType];
-    for (var p in featureNS) {
-      var parsers = {};
-      for (i = 0, ii = featureTypes.length; i < ii; ++i) {
-        var featurePrefix = featureTypes[i].indexOf(':') === -1 ?
-          defaultPrefix : featureTypes[i].split(':')[0];
-        if (featurePrefix === p) {
-          parsers[featureTypes[i].split(':').pop()] =
-              (localName == 'featureMembers') ?
-                ol.xml.makeArrayPusher(this.readFeatureElement, this) :
-                ol.xml.makeReplacer(this.readFeatureElement, this);
-        }
-      }
-      parsersNS[featureNS[p]] = parsers;
-    }
-    if (localName == 'featureMember') {
-      features = ol.xml.pushParseAndPop(undefined, parsersNS, node, objectStack);
-    } else {
-      features = ol.xml.pushParseAndPop([], parsersNS, node, objectStack);
-    }
-  }
-  if (features === null) {
-    features = [];
-  }
-  return features;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Geometry|undefined} Geometry.
- */
-ol.format.GMLBase.prototype.readGeometryElement = function(node, objectStack) {
-  var context = /** @type {Object} */ (objectStack[0]);
-  context['srsName'] = node.firstElementChild.getAttribute('srsName');
-  context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');
-  /** @type {ol.geom.Geometry} */
-  var geometry = ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_PARSERS_, node, objectStack, this);
-  if (geometry) {
-    return /** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, false, context));
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.Feature} Feature.
- */
-ol.format.GMLBase.prototype.readFeatureElement = function(node, objectStack) {
-  var n;
-  var fid = node.getAttribute('fid') ||
-      ol.xml.getAttributeNS(node, ol.format.GMLBase.GMLNS, 'id');
-  var values = {}, geometryName;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    // Assume attribute elements have one child node and that the child
-    // is a text or CDATA node (to be treated as text).
-    // Otherwise assume it is a geometry node.
-    if (n.childNodes.length === 0 ||
-        (n.childNodes.length === 1 &&
-        (n.firstChild.nodeType === 3 || n.firstChild.nodeType === 4))) {
-      var value = ol.xml.getAllTextContent(n, false);
-      if (ol.format.GMLBase.ONLY_WHITESPACE_RE_.test(value)) {
-        value = undefined;
-      }
-      values[localName] = value;
-    } else {
-      // boundedBy is an extent and must not be considered as a geometry
-      if (localName !== 'boundedBy') {
-        geometryName = localName;
-      }
-      values[localName] = this.readGeometryElement(n, objectStack);
-    }
-  }
-  var feature = new ol.Feature(values);
-  if (geometryName) {
-    feature.setGeometryName(geometryName);
-  }
-  if (fid) {
-    feature.setId(fid);
-  }
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Point|undefined} Point.
- */
-ol.format.GMLBase.prototype.readPoint = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return point;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiPoint|undefined} MultiPoint.
- */
-ol.format.GMLBase.prototype.readMultiPoint = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var coordinates = ol.xml.pushParseAndPop([],
-      this.MULTIPOINT_PARSERS_, node, objectStack, this);
-  if (coordinates) {
-    return new ol.geom.MultiPoint(coordinates);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.GMLBase.prototype.readMultiLineString = function(node, objectStack) {
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = ol.xml.pushParseAndPop([],
-      this.MULTILINESTRING_PARSERS_, node, objectStack, this);
-  if (lineStrings) {
-    var multiLineString = new ol.geom.MultiLineString(null);
-    multiLineString.setLineStrings(lineStrings);
-    return multiLineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
- */
-ol.format.GMLBase.prototype.readMultiPolygon = function(node, objectStack) {
-  /** @type {Array.<ol.geom.Polygon>} */
-  var polygons = ol.xml.pushParseAndPop([],
-      this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
-  if (polygons) {
-    var multiPolygon = new ol.geom.MultiPolygon(null);
-    multiPolygon.setPolygons(polygons);
-    return multiPolygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.pointMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.POINTMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.lineStringMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.LINESTRINGMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GMLBase.prototype.polygonMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.POLYGONMEMBER_PARSERS_, node,
-      objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.GMLBase.prototype.readLineString = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} LinearRing flat coordinates.
- */
-ol.format.GMLBase.prototype.readFlatLinearRing_ = function(node, objectStack) {
-  var ring = ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
-      objectStack, this);
-  if (ring) {
-    return ring;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.LinearRing|undefined} LinearRing.
- */
-ol.format.GMLBase.prototype.readLinearRing = function(node, objectStack) {
-  var flatCoordinates =
-      this.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var ring = new ol.geom.LinearRing(null);
-    ring.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return ring;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node,
-      objectStack, this);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTIPOINT_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.pointMemberParser_),
-    'pointMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.pointMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTILINESTRING_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.lineStringMemberParser_),
-    'lineStringMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.lineStringMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.MULTIPOLYGON_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'polygonMember': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.polygonMemberParser_),
-    'polygonMembers': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.polygonMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.POINTMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readFlatCoordinatesFromNode_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineString': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readLineString)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GMLBase.prototype.POLYGONMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Polygon': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readPolygon)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @protected
- */
-ol.format.GMLBase.prototype.RING_PARSERS = {
-  'http://www.opengis.net/gml': {
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readFlatLinearRing_)
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readGeometryFromNode = function(node, opt_options) {
-  var geometry = this.readGeometryElement(node,
-      [this.getReadOptions(node, opt_options ? opt_options : {})]);
-  return geometry ? geometry : null;
-};
-
-
-/**
- * Read all features from a GML FeatureCollection.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GMLBase.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = {
-    featureType: this.featureType,
-    featureNS: this.featureNS
-  };
-  if (opt_options) {
-    ol.obj.assign(options, this.getReadOptions(node, opt_options));
-  }
-  var features = this.readFeaturesInternal(node, [options]);
-  return features || [];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.GMLBase.prototype.readProjectionFromNode = function(node) {
-  return ol.proj.get(this.srsName ? this.srsName :
-    node.firstElementChild.getAttribute('srsName'));
-};
-
-goog.provide('ol.format.XSD');
-
-goog.require('ol.xml');
-goog.require('ol.string');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.XSD.NAMESPACE_URI = 'http://www.w3.org/2001/XMLSchema';
-
-
-/**
- * @param {Node} node Node.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XSD.readBoolean = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readBooleanString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XSD.readBooleanString = function(string) {
-  var m = /^\s*(true|1)|(false|0)\s*$/.exec(string);
-  if (m) {
-    return m[1] !== undefined || false;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} DateTime in seconds.
- */
-ol.format.XSD.readDateTime = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var dateTime = Date.parse(s);
-  return isNaN(dateTime) ? undefined : dateTime / 1000;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} Decimal.
- */
-ol.format.XSD.readDecimal = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readDecimalString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {number|undefined} Decimal.
- */
-ol.format.XSD.readDecimalString = function(string) {
-  // FIXME check spec
-  var m = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(string);
-  if (m) {
-    return parseFloat(m[1]);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {number|undefined} Non negative integer.
- */
-ol.format.XSD.readNonNegativeInteger = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  return ol.format.XSD.readNonNegativeIntegerString(s);
-};
-
-
-/**
- * @param {string} string String.
- * @return {number|undefined} Non negative integer.
- */
-ol.format.XSD.readNonNegativeIntegerString = function(string) {
-  var m = /^\s*(\d+)\s*$/.exec(string);
-  if (m) {
-    return parseInt(m[1], 10);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {string|undefined} String.
- */
-ol.format.XSD.readString = function(node) {
-  return ol.xml.getAllTextContent(node, false).trim();
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the boolean to.
- * @param {boolean} bool Boolean.
- */
-ol.format.XSD.writeBooleanTextNode = function(node, bool) {
-  ol.format.XSD.writeStringTextNode(node, (bool) ? '1' : '0');
-};
-
-
-/**
- * @param {Node} node Node to append a CDATA Section with the string to.
- * @param {string} string String.
- */
-ol.format.XSD.writeCDATASection = function(node, string) {
-  node.appendChild(ol.xml.DOCUMENT.createCDATASection(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the dateTime to.
- * @param {number} dateTime DateTime in seconds.
- */
-ol.format.XSD.writeDateTimeTextNode = function(node, dateTime) {
-  var date = new Date(dateTime * 1000);
-  var string = date.getUTCFullYear() + '-' +
-      ol.string.padNumber(date.getUTCMonth() + 1, 2) + '-' +
-      ol.string.padNumber(date.getUTCDate(), 2) + 'T' +
-      ol.string.padNumber(date.getUTCHours(), 2) + ':' +
-      ol.string.padNumber(date.getUTCMinutes(), 2) + ':' +
-      ol.string.padNumber(date.getUTCSeconds(), 2) + 'Z';
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the decimal to.
- * @param {number} decimal Decimal.
- */
-ol.format.XSD.writeDecimalTextNode = function(node, decimal) {
-  var string = decimal.toPrecision();
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the decimal to.
- * @param {number} nonNegativeInteger Non negative integer.
- */
-ol.format.XSD.writeNonNegativeIntegerTextNode = function(node, nonNegativeInteger) {
-  var string = nonNegativeInteger.toString();
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the string to.
- * @param {string} string String.
- */
-ol.format.XSD.writeStringTextNode = function(node, string) {
-  node.appendChild(ol.xml.DOCUMENT.createTextNode(string));
-};
-
-goog.provide('ol.format.GML3');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format
- * version 3.1.1.
- * Currently only supports GML 3.1.1 Simple Features profile.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML3 = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  ol.format.GMLBase.call(this, options);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.surface_ = options.surface !== undefined ? options.surface : false;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.curve_ = options.curve !== undefined ? options.curve : false;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multiCurve_ = options.multiCurve !== undefined ?
-    options.multiCurve : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multiSurface_ = options.multiSurface !== undefined ?
-    options.multiSurface : true;
-
-  /**
-   * @inheritDoc
-   */
-  this.schemaLocation = options.schemaLocation ?
-    options.schemaLocation : ol.format.GML3.schemaLocation_;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hasZ = options.hasZ !== undefined ?
-    options.hasZ : false;
-
-};
-ol.inherits(ol.format.GML3, ol.format.GMLBase);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GML3.schemaLocation_ = ol.format.GMLBase.GMLNS +
-    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +
-    '1.0.0/gmlsf.xsd';
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.GML3.prototype.readMultiCurve_ = function(node, objectStack) {
-  /** @type {Array.<ol.geom.LineString>} */
-  var lineStrings = ol.xml.pushParseAndPop([],
-      this.MULTICURVE_PARSERS_, node, objectStack, this);
-  if (lineStrings) {
-    var multiLineString = new ol.geom.MultiLineString(null);
-    multiLineString.setLineStrings(lineStrings);
-    return multiLineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiPolygon|undefined} MultiPolygon.
- */
-ol.format.GML3.prototype.readMultiSurface_ = function(node, objectStack) {
-  /** @type {Array.<ol.geom.Polygon>} */
-  var polygons = ol.xml.pushParseAndPop([],
-      this.MULTISURFACE_PARSERS_, node, objectStack, this);
-  if (polygons) {
-    var multiPolygon = new ol.geom.MultiPolygon(null);
-    multiPolygon.setPolygons(polygons);
-    return multiPolygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.curveMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.CURVEMEMBER_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.surfaceMemberParser_ = function(node, objectStack) {
-  ol.xml.parseNode(this.SURFACEMEMBER_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<(Array.<number>)>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readPatch_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.PATCHES_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readSegment_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.SEGMENTS_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<(Array.<number>)>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readPolygonPatch_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} flat coordinates.
- */
-ol.format.GML3.prototype.readLineStringSegment_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop([null],
-      this.GEOMETRY_FLAT_COORDINATES_PARSERS_,
-      node, objectStack, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.interiorParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML3.prototype.exteriorParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
-  /** @type {Array.<Array.<number>>} */
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      this.SURFACE_PARSERS_, node, objectStack, this);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.GML3.prototype.readCurve_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.CURVE_PARSERS_, node, objectStack, this);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Extent|undefined} Envelope.
- */
-ol.format.GML3.prototype.readEnvelope_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.ENVELOPE_PARSERS_, node, objectStack, this);
-  return ol.extent.createOrUpdate(flatCoordinates[1][0],
-      flatCoordinates[1][1], flatCoordinates[2][0],
-      flatCoordinates[2][1]);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML3.prototype.readFlatPos_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var re = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-  var m;
-  while ((m = re.exec(s))) {
-    flatCoordinates.push(parseFloat(m[1]));
-    s = s.substr(m[0].length);
-  }
-  if (s !== '') {
-    return undefined;
-  }
-  var context = objectStack[0];
-  var containerSrs = context['srsName'];
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    axisOrientation = proj.getAxisOrientation();
-  }
-  if (axisOrientation === 'neu') {
-    var i, ii;
-    for (i = 0, ii = flatCoordinates.length; i < ii; i += 3) {
-      var y = flatCoordinates[i];
-      var x = flatCoordinates[i + 1];
-      flatCoordinates[i] = x;
-      flatCoordinates[i + 1] = y;
-    }
-  }
-  var len = flatCoordinates.length;
-  if (len == 2) {
-    flatCoordinates.push(0);
-  }
-  if (len === 0) {
-    return undefined;
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML3.prototype.readFlatPosList_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false).replace(/^\s*|\s*$/g, '');
-  var context = objectStack[0];
-  var containerSrs = context['srsName'];
-  var contextDimension = context['srsDimension'];
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    axisOrientation = proj.getAxisOrientation();
-  }
-  var coords = s.split(/\s+/);
-  // The "dimension" attribute is from the GML 3.0.1 spec.
-  var dim = 2;
-  if (node.getAttribute('srsDimension')) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(
-        node.getAttribute('srsDimension'));
-  } else if (node.getAttribute('dimension')) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(
-        node.getAttribute('dimension'));
-  } else if (node.parentNode.getAttribute('srsDimension')) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(
-        node.parentNode.getAttribute('srsDimension'));
-  } else if (contextDimension) {
-    dim = ol.format.XSD.readNonNegativeIntegerString(contextDimension);
-  }
-  var x, y, z;
-  var flatCoordinates = [];
-  for (var i = 0, ii = coords.length; i < ii; i += dim) {
-    x = parseFloat(coords[i]);
-    y = parseFloat(coords[i + 1]);
-    z = (dim === 3) ? parseFloat(coords[i + 2]) : 0;
-    if (axisOrientation.substr(0, 2) === 'en') {
-      flatCoordinates.push(x, y, z);
-    } else {
-      flatCoordinates.push(y, x, z);
-    }
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'pos': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPos_),
-    'posList': ol.xml.makeReplacer(ol.format.GML3.prototype.readFlatPosList_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'interior': ol.format.GML3.prototype.interiorParser_,
-    'exterior': ol.format.GML3.prototype.exteriorParser_
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
-    'MultiPoint': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPoint),
-    'LineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLineString),
-    'MultiLineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiLineString),
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLinearRing),
-    'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
-    'MultiPolygon': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPolygon),
-    'Surface': ol.xml.makeReplacer(ol.format.GML3.prototype.readSurface_),
-    'MultiSurface': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readMultiSurface_),
-    'Curve': ol.xml.makeReplacer(ol.format.GML3.prototype.readCurve_),
-    'MultiCurve': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readMultiCurve_),
-    'Envelope': ol.xml.makeReplacer(ol.format.GML3.prototype.readEnvelope_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.MULTICURVE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'curveMember': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.curveMemberParser_),
-    'curveMembers': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.curveMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.MULTISURFACE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.surfaceMemberParser_),
-    'surfaceMembers': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.surfaceMemberParser_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.CURVEMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineString': ol.xml.makeArrayPusher(
-        ol.format.GMLBase.prototype.readLineString),
-    'Curve': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readCurve_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SURFACEMEMBER_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Polygon': ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readPolygon),
-    'Surface': ol.xml.makeArrayPusher(ol.format.GML3.prototype.readSurface_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SURFACE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'patches': ol.xml.makeReplacer(ol.format.GML3.prototype.readPatch_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.CURVE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'segments': ol.xml.makeReplacer(ol.format.GML3.prototype.readSegment_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.ENVELOPE_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.readFlatPosList_),
-    'upperCorner': ol.xml.makeArrayPusher(
-        ol.format.GML3.prototype.readFlatPosList_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.PATCHES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'PolygonPatch': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readPolygonPatch_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML3.prototype.SEGMENTS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'LineStringSegment': ol.xml.makeReplacer(
-        ol.format.GML3.prototype.readLineStringSegment_)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} value Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePos_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsDimension = hasZ ? 3 : 2;
-  node.setAttribute('srsDimension', srsDimension);
-  var srsName = context['srsName'];
-  var axisOrientation = 'enu';
-  if (srsName) {
-    axisOrientation = ol.proj.get(srsName).getAxisOrientation();
-  }
-  var point = value.getCoordinates();
-  var coords;
-  // only 2d for simple features profile
-  if (axisOrientation.substr(0, 2) === 'en') {
-    coords = (point[0] + ' ' + point[1]);
-  } else {
-    coords = (point[1] + ' ' + point[0]);
-  }
-  if (hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ' ' + z;
-  }
-  ol.format.XSD.writeStringTextNode(node, coords);
-};
-
-
-/**
- * @param {Array.<number>} point Point geometry.
- * @param {string=} opt_srsName Optional srsName
- * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.
- * @return {string} The coords string.
- * @private
- */
-ol.format.GML3.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
-  var axisOrientation = 'enu';
-  if (opt_srsName) {
-    axisOrientation = ol.proj.get(opt_srsName).getAxisOrientation();
-  }
-  var coords = ((axisOrientation.substr(0, 2) === 'en') ?
-    point[0] + ' ' + point[1] :
-    point[1] + ' ' + point[0]);
-  if (opt_hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ' ' + z;
-  }
-
-  return coords;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePosList_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsDimension = hasZ ? 3 : 2;
-  node.setAttribute('srsDimension', srsDimension);
-  var srsName = context['srsName'];
-  // only 2d for simple features profile
-  var points = value.getCoordinates();
-  var len = points.length;
-  var parts = new Array(len);
-  var point;
-  for (var i = 0; i < len; ++i) {
-    point = points[i];
-    parts[i] = this.getCoords_(point, srsName, hasZ);
-  }
-  ol.format.XSD.writeStringTextNode(node, parts.join(' '));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} geometry Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePoint_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var pos = ol.xml.createElementNS(node.namespaceURI, 'pos');
-  node.appendChild(pos);
-  this.writePos_(pos, geometry, objectStack);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.ENVELOPE_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-    'upperCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Extent} extent Extent.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeEnvelope = function(node, extent, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var keys = ['lowerCorner', 'upperCorner'];
-  var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node}), ol.format.GML3.ENVELOPE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values,
-      objectStack, keys, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} geometry LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var posList = ol.xml.createElementNS(node.namespaceURI, 'posList');
-  node.appendChild(posList);
-  this.writePosList_(posList, geometry, objectStack);
-};
-
-
-/**
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node} Node.
- * @private
- */
-ol.format.GML3.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var exteriorWritten = context['exteriorWritten'];
-  if (exteriorWritten === undefined) {
-    context['exteriorWritten'] = true;
-  }
-  return ol.xml.createElementNS(parentNode.namespaceURI,
-      exteriorWritten !== undefined ? 'interior' : 'exterior');
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} geometry Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'PolygonPatch' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {
-    var rings = geometry.getLinearRings();
-    ol.xml.pushSerializeAndPop(
-        {node: node, hasZ: hasZ, srsName: srsName},
-        ol.format.GML3.RING_SERIALIZERS_,
-        this.RING_NODE_FACTORY_,
-        rings, objectStack, undefined, this);
-  } else if (node.nodeName === 'Surface') {
-    var patches = ol.xml.createElementNS(node.namespaceURI, 'patches');
-    node.appendChild(patches);
-    this.writeSurfacePatches_(
-        patches, geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} geometry LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'LineStringSegment' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'LineString' ||
-      node.nodeName === 'LineStringSegment') {
-    var posList = ol.xml.createElementNS(node.namespaceURI, 'posList');
-    node.appendChild(posList);
-    this.writePosList_(posList, geometry, objectStack);
-  } else if (node.nodeName === 'Curve') {
-    var segments = ol.xml.createElementNS(node.namespaceURI, 'segments');
-    node.appendChild(segments);
-    this.writeCurveSegments_(segments,
-        geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var surface = context['surface'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var polygons = geometry.getPolygons();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},
-      ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPoint} geometry MultiPoint geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiPoint_ = function(node, geometry,
-    objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  var hasZ = context['hasZ'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var points = geometry.getPoints();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},
-      ol.format.GML3.POINTMEMBER_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('pointMember'), points,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiLineString} geometry MultiLineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var curve = context['curve'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var lines = geometry.getLineStrings();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},
-      ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} ring LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeRing_ = function(node, ring, objectStack) {
-  var linearRing = ol.xml.createElementNS(node.namespaceURI, 'LinearRing');
-  node.appendChild(linearRing);
-  this.writeLinearRing_(linearRing, ring, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(
-      polygon, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} point Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writePointMember_ = function(node, point, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
-  node.appendChild(child);
-  this.writePoint_(child, point, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeCurveOrLineString_(child, line, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
-  node.appendChild(child);
-  this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeCurveSegments_ = function(node, line, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI,
-      'LineStringSegment');
-  node.appendChild(child);
-  this.writeCurveOrLineString_(child, line, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeGeometryElement = function(node, geometry, objectStack) {
-  var context = /** @type {olx.format.WriteOptions} */ (objectStack[objectStack.length - 1]);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  var value;
-  if (Array.isArray(geometry)) {
-    if (context.dataProjection) {
-      value = ol.proj.transformExtent(
-          geometry, context.featureProjection, context.dataProjection);
-    } else {
-      value = geometry;
-    }
-  } else {
-    value =
-        ol.format.Feature.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context);
-  }
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), ol.format.GML3.GEOMETRY_SERIALIZERS_,
-      this.GEOMETRY_NODE_FACTORY_, [value],
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML3.prototype.writeFeatureElement = function(node, feature, objectStack) {
-  var fid = feature.getId();
-  if (fid) {
-    node.setAttribute('fid', fid);
-  }
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureNS = context['featureNS'];
-  var geometryName = feature.getGeometryName();
-  if (!context.serializers) {
-    context.serializers = {};
-    context.serializers[featureNS] = {};
-  }
-  var properties = feature.getProperties();
-  var keys = [], values = [];
-  for (var key in properties) {
-    var value = properties[key];
-    if (value !== null) {
-      keys.push(key);
-      values.push(value);
-      if (key == geometryName || value instanceof ol.geom.Geometry) {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              this.writeGeometryElement, this);
-        }
-      } else {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              ol.format.XSD.writeStringTextNode);
-        }
-      }
-    }
-  }
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), context.serializers,
-      ol.xml.makeSimpleNodeFactory(undefined, featureNS),
-      values,
-      objectStack, keys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<ol.Feature>} features Features.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML3.prototype.writeFeatureMembers_ = function(node, features, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureType = context['featureType'];
-  var featureNS = context['featureNS'];
-  var serializers = {};
-  serializers[featureNS] = {};
-  serializers[featureNS][featureType] = ol.xml.makeChildAppender(
-      this.writeFeatureElement, this);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item),
-      serializers,
-      ol.xml.makeSimpleNodeFactory(featureType, featureNS), features,
-      objectStack);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygonMember_),
-    'polygonMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygonMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.POINTMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writePointMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLineStringOrCurveMember_),
-    'curveMember': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLineStringOrCurveMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.RING_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'exterior': ol.xml.makeChildAppender(ol.format.GML3.prototype.writeRing_),
-    'interior': ol.xml.makeChildAppender(ol.format.GML3.prototype.writeRing_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML3.GEOMETRY_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'Curve': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeCurveOrLineString_),
-    'MultiCurve': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiCurveOrLineString_),
-    'Point': ol.xml.makeChildAppender(ol.format.GML3.prototype.writePoint_),
-    'MultiPoint': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiPoint_),
-    'LineString': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeCurveOrLineString_),
-    'MultiLineString': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiCurveOrLineString_),
-    'LinearRing': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeLinearRing_),
-    'Polygon': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygon_),
-    'MultiPolygon': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_),
-    'Surface': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeSurfaceOrPolygon_),
-    'MultiSurface': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeMultiSurfaceOrPolygon_),
-    'Envelope': ol.xml.makeChildAppender(
-        ol.format.GML3.prototype.writeEnvelope)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
-  'MultiLineString': 'lineStringMember',
-  'MultiCurve': 'curveMember',
-  'MultiPolygon': 'polygonMember',
-  'MultiSurface': 'surfaceMember'
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      ol.format.GML3.MULTIGEOMETRY_TO_MEMBER_NODENAME_[parentNode.nodeName]);
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML3.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var multiSurface = context['multiSurface'];
-  var surface = context['surface'];
-  var curve = context['curve'];
-  var multiCurve = context['multiCurve'];
-  var nodeName;
-  if (!Array.isArray(value)) {
-    nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
-    if (nodeName === 'MultiPolygon' && multiSurface === true) {
-      nodeName = 'MultiSurface';
-    } else if (nodeName === 'Polygon' && surface === true) {
-      nodeName = 'Surface';
-    } else if (nodeName === 'LineString' && curve === true) {
-      nodeName = 'Curve';
-    } else if (nodeName === 'MultiLineString' && multiCurve === true) {
-      nodeName = 'MultiCurve';
-    }
-  } else {
-    nodeName = 'Envelope';
-  }
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      nodeName);
-};
-
-
-/**
- * Encode a geometry in GML 3.1.1 Simple Features.
- *
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GML3.prototype.writeGeometryNode = function(geometry, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var geom = ol.xml.createElementNS('http://www.opengis.net/gml', 'geom');
-  var context = {node: geom, hasZ: this.hasZ, srsName: this.srsName,
-    curve: this.curve_, surface: this.surface_,
-    multiSurface: this.multiSurface_, multiCurve: this.multiCurve_};
-  if (opt_options) {
-    ol.obj.assign(context, opt_options);
-  }
-  this.writeGeometryElement(geom, geometry, [context]);
-  return geom;
-};
-
-
-/**
- * Encode an array of features in GML 3.1.1 Simple Features.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.GML3.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GML 3.1.1 format as an XML node.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GML3.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var node = ol.xml.createElementNS('http://www.opengis.net/gml',
-      'featureMembers');
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', this.schemaLocation);
-  var context = {
-    srsName: this.srsName,
-    hasZ: this.hasZ,
-    curve: this.curve_,
-    surface: this.surface_,
-    multiSurface: this.multiSurface_,
-    multiCurve: this.multiCurve_,
-    featureNS: this.featureNS,
-    featureType: this.featureType
-  };
-  if (opt_options) {
-    ol.obj.assign(context, opt_options);
-  }
-  this.writeFeatureMembers_(node, features, [context]);
-  return node;
-};
-
-goog.provide('ol.format.GML');
-
-goog.require('ol.format.GML3');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format
- * version 3.1.1.
- * Currently only supports GML 3.1.1 Simple Features profile.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML = ol.format.GML3;
-
-
-/**
- * Encode an array of features in GML 3.1.1 Simple Features.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.GML.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GML 3.1.1 format as an XML node.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @api
- */
-ol.format.GML.prototype.writeFeaturesNode;
-
-goog.provide('ol.format.GML2');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GML format,
- * version 2.1.2.
- *
- * @constructor
- * @param {olx.format.GMLOptions=} opt_options Optional configuration object.
- * @extends {ol.format.GMLBase}
- * @api
- */
-ol.format.GML2 = function(opt_options) {
-  var options = /** @type {olx.format.GMLOptions} */
-      (opt_options ? opt_options : {});
-
-  ol.format.GMLBase.call(this, options);
-
-  this.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
-      'featureMember'] =
-      ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readFeaturesInternal);
-
-  /**
-   * @inheritDoc
-   */
-  this.schemaLocation = options.schemaLocation ?
-    options.schemaLocation : ol.format.GML2.schemaLocation_;
-
-};
-ol.inherits(ol.format.GML2, ol.format.GMLBase);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GML2.schemaLocation_ = ol.format.GMLBase.GMLNS +
-    ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.GML2.prototype.readFlatCoordinates_ = function(node, objectStack) {
-  var s = ol.xml.getAllTextContent(node, false).replace(/^\s*|\s*$/g, '');
-  var context = /** @type {ol.XmlNodeStackItem} */ (objectStack[0]);
-  var containerSrs = context['srsName'];
-  var axisOrientation = 'enu';
-  if (containerSrs) {
-    var proj = ol.proj.get(containerSrs);
-    if (proj) {
-      axisOrientation = proj.getAxisOrientation();
-    }
-  }
-  var coordsGroups = s.trim().split(/\s+/);
-  var x, y, z;
-  var flatCoordinates = [];
-  for (var i = 0, ii = coordsGroups.length; i < ii; i++) {
-    var coords = coordsGroups[i].split(/,+/);
-    x = parseFloat(coords[0]);
-    y = parseFloat(coords[1]);
-    z = (coords.length === 3) ? parseFloat(coords[2]) : 0;
-    if (axisOrientation.substr(0, 2) === 'en') {
-      flatCoordinates.push(x, y, z);
-    } else {
-      flatCoordinates.push(y, x, z);
-    }
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Extent|undefined} Envelope.
- */
-ol.format.GML2.prototype.readBox_ = function(node, objectStack) {
-  /** @type {Array.<number>} */
-  var flatCoordinates = ol.xml.pushParseAndPop([null],
-      this.BOX_PARSERS_, node, objectStack, this);
-  return ol.extent.createOrUpdate(flatCoordinates[1][0],
-      flatCoordinates[1][1], flatCoordinates[1][3],
-      flatCoordinates[1][4]);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML2.prototype.innerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GML2.prototype.outerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      this.RING_PARSERS, node, objectStack, this);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'coordinates': ol.xml.makeReplacer(
-        ol.format.GML2.prototype.readFlatCoordinates_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.FLAT_LINEAR_RINGS_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'innerBoundaryIs': ol.format.GML2.prototype.innerBoundaryIsParser_,
-    'outerBoundaryIs': ol.format.GML2.prototype.outerBoundaryIsParser_
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.BOX_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'coordinates': ol.xml.makeArrayPusher(
-        ol.format.GML2.prototype.readFlatCoordinates_)
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'Point': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPoint),
-    'MultiPoint': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPoint),
-    'LineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLineString),
-    'MultiLineString': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiLineString),
-    'LinearRing': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readLinearRing),
-    'Polygon': ol.xml.makeReplacer(ol.format.GMLBase.prototype.readPolygon),
-    'MultiPolygon': ol.xml.makeReplacer(
-        ol.format.GMLBase.prototype.readMultiPolygon),
-    'Box': ol.xml.makeReplacer(ol.format.GML2.prototype.readBox_)
-  }
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML2.prototype.GEOMETRY_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var multiSurface = context['multiSurface'];
-  var surface = context['surface'];
-  var multiCurve = context['multiCurve'];
-  var nodeName;
-  if (!Array.isArray(value)) {
-    nodeName = /** @type {ol.geom.Geometry} */ (value).getType();
-    if (nodeName === 'MultiPolygon' && multiSurface === true) {
-      nodeName = 'MultiSurface';
-    } else if (nodeName === 'Polygon' && surface === true) {
-      nodeName = 'Surface';
-    } else if (nodeName === 'MultiLineString' && multiCurve === true) {
-      nodeName = 'MultiCurve';
-    }
-  } else {
-    nodeName = 'Envelope';
-  }
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      nodeName);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML2.prototype.writeFeatureElement = function(node, feature, objectStack) {
-  var fid = feature.getId();
-  if (fid) {
-    node.setAttribute('fid', fid);
-  }
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featureNS = context['featureNS'];
-  var geometryName = feature.getGeometryName();
-  if (!context.serializers) {
-    context.serializers = {};
-    context.serializers[featureNS] = {};
-  }
-  var properties = feature.getProperties();
-  var keys = [], values = [];
-  for (var key in properties) {
-    var value = properties[key];
-    if (value !== null) {
-      keys.push(key);
-      values.push(value);
-      if (key == geometryName || value instanceof ol.geom.Geometry) {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              this.writeGeometryElement, this);
-        }
-      } else {
-        if (!(key in context.serializers[featureNS])) {
-          context.serializers[featureNS][key] = ol.xml.makeChildAppender(
-              ol.format.XSD.writeStringTextNode);
-        }
-      }
-    }
-  }
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), context.serializers,
-      ol.xml.makeSimpleNodeFactory(undefined, featureNS),
-      values,
-      objectStack, keys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry|ol.Extent} geometry Geometry.
- * @param {Array.<*>} objectStack Node stack.
- */
-ol.format.GML2.prototype.writeGeometryElement = function(node, geometry, objectStack) {
-  var context = /** @type {olx.format.WriteOptions} */ (objectStack[objectStack.length - 1]);
-  var item = ol.obj.assign({}, context);
-  item.node = node;
-  var value;
-  if (Array.isArray(geometry)) {
-    if (context.dataProjection) {
-      value = ol.proj.transformExtent(
-          geometry, context.featureProjection, context.dataProjection);
-    } else {
-      value = geometry;
-    }
-  } else {
-    value =
-        ol.format.Feature.transformWithOptions(/** @type {ol.geom.Geometry} */ (geometry), true, context);
-  }
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      (item), ol.format.GML2.GEOMETRY_SERIALIZERS_,
-      this.GEOMETRY_NODE_FACTORY_, [value],
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} geometry LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'LineStringSegment' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'LineString' ||
-      node.nodeName === 'LineStringSegment') {
-    var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-    node.appendChild(coordinates);
-    this.writeCoordinates_(coordinates, geometry, objectStack);
-  } else if (node.nodeName === 'Curve') {
-    var segments = ol.xml.createElementNS(node.namespaceURI, 'segments');
-    node.appendChild(segments);
-    this.writeCurveSegments_(segments,
-        geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {string} namespaceURI XML namespace.
- * @returns {Node} coordinates node.
- * @private
- */
-ol.format.GML2.prototype.createCoordinatesNode_ = function(namespaceURI) {
-  var coordinates = ol.xml.createElementNS(namespaceURI, 'coordinates');
-  coordinates.setAttribute('decimal', '.');
-  coordinates.setAttribute('cs', ',');
-  coordinates.setAttribute('ts', ' ');
-
-  return coordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCoordinates_ = function(node, value, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  // only 2d for simple features profile
-  var points = value.getCoordinates();
-  var len = points.length;
-  var parts = new Array(len);
-  var point;
-  for (var i = 0; i < len; ++i) {
-    point = points[i];
-    parts[i] = this.getCoords_(point, srsName, hasZ);
-  }
-  ol.format.XSD.writeStringTextNode(node, parts.join(' '));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeCurveSegments_ = function(node, line, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI,
-      'LineStringSegment');
-  node.appendChild(child);
-  this.writeCurveOrLineString_(child, line, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} geometry Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (node.nodeName !== 'PolygonPatch' && srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {
-    var rings = geometry.getLinearRings();
-    ol.xml.pushSerializeAndPop(
-        {node: node, hasZ: hasZ, srsName: srsName},
-        ol.format.GML2.RING_SERIALIZERS_,
-        this.RING_NODE_FACTORY_,
-        rings, objectStack, undefined, this);
-  } else if (node.nodeName === 'Surface') {
-    var patches = ol.xml.createElementNS(node.namespaceURI, 'patches');
-    node.appendChild(patches);
-    this.writeSurfacePatches_(
-        patches, geometry, objectStack);
-  }
-};
-
-
-/**
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node} Node.
- * @private
- */
-ol.format.GML2.prototype.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var exteriorWritten = context['exteriorWritten'];
-  if (exteriorWritten === undefined) {
-    context['exteriorWritten'] = true;
-  }
-  return ol.xml.createElementNS(parentNode.namespaceURI,
-      exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfacePatches_ = function(node, polygon, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch');
-  node.appendChild(child);
-  this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} ring LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeRing_ = function(node, ring, objectStack) {
-  var linearRing = ol.xml.createElementNS(node.namespaceURI, 'LinearRing');
-  node.appendChild(linearRing);
-  this.writeLinearRing_(linearRing, ring, objectStack);
-};
-
-
-/**
- * @param {Array.<number>} point Point geometry.
- * @param {string=} opt_srsName Optional srsName
- * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.
- * @return {string} The coords string.
- * @private
- */
-ol.format.GML2.prototype.getCoords_ = function(point, opt_srsName, opt_hasZ) {
-  var axisOrientation = 'enu';
-  if (opt_srsName) {
-    axisOrientation = ol.proj.get(opt_srsName).getAxisOrientation();
-  }
-  var coords = ((axisOrientation.substr(0, 2) === 'en') ?
-    point[0] + ',' + point[1] :
-    point[1] + ',' + point[0]);
-  if (opt_hasZ) {
-    // For newly created points, Z can be undefined.
-    var z = point[2] || 0;
-    coords += ',' + z;
-  }
-
-  return coords;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiLineString} geometry MultiLineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiCurveOrLineString_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var curve = context['curve'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var lines = geometry.getLineStrings();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},
-      ol.format.GML2.LINESTRINGORCURVEMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} geometry Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writePoint_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-  node.appendChild(coordinates);
-  var point = geometry.getCoordinates();
-  var coord = this.getCoords_(point, srsName, hasZ);
-  ol.format.XSD.writeStringTextNode(coordinates, coord);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPoint} geometry MultiPoint geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiPoint_ = function(node, geometry,
-    objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var points = geometry.getPoints();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},
-      ol.format.GML2.POINTMEMBER_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('pointMember'), points,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Point} point Point geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writePointMember_ = function(node, point, objectStack) {
-  var child = ol.xml.createElementNS(node.namespaceURI, 'Point');
-  node.appendChild(child);
-  this.writePoint_(child, point, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} line LineString geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeLineStringOrCurveMember_ = function(node, line, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeCurveOrLineString_(child, line, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} geometry LinearRing geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeLinearRing_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var coordinates = this.createCoordinatesNode_(node.namespaceURI);
-  node.appendChild(coordinates);
-  this.writeCoordinates_(coordinates, geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.MultiPolygon} geometry MultiPolygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_ = function(node, geometry, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var hasZ = context['hasZ'];
-  var srsName = context['srsName'];
-  var surface = context['surface'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var polygons = geometry.getPolygons();
-  ol.xml.pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},
-      ol.format.GML2.SURFACEORPOLYGONMEMBER_SERIALIZERS_,
-      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,
-      objectStack, undefined, this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon geometry.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeSurfaceOrPolygonMember_ = function(node, polygon, objectStack) {
-  var child = this.GEOMETRY_NODE_FACTORY_(
-      polygon, objectStack);
-  if (child) {
-    node.appendChild(child);
-    this.writeSurfaceOrPolygon_(child, polygon, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Extent} extent Extent.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GML2.prototype.writeEnvelope = function(node, extent, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var srsName = context['srsName'];
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  var keys = ['lowerCorner', 'upperCorner'];
-  var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node}), ol.format.GML2.ENVELOPE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values,
-      objectStack, keys, this);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.GEOMETRY_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'Curve': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeCurveOrLineString_),
-    'MultiCurve': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiCurveOrLineString_),
-    'Point': ol.xml.makeChildAppender(ol.format.GML2.prototype.writePoint_),
-    'MultiPoint': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiPoint_),
-    'LineString': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeCurveOrLineString_),
-    'MultiLineString': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiCurveOrLineString_),
-    'LinearRing': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLinearRing_),
-    'Polygon': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygon_),
-    'MultiPolygon': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_),
-    'Surface': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygon_),
-    'MultiSurface': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeMultiSurfaceOrPolygon_),
-    'Envelope': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeEnvelope)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.RING_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'outerBoundaryIs': ol.xml.makeChildAppender(ol.format.GML2.prototype.writeRing_),
-    'innerBoundaryIs': ol.xml.makeChildAppender(ol.format.GML2.prototype.writeRing_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.POINTMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'pointMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writePointMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lineStringMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLineStringOrCurveMember_),
-    'curveMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeLineStringOrCurveMember_)
-  }
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS('http://www.opengis.net/gml',
-      ol.format.GML2.MULTIGEOMETRY_TO_MEMBER_NODENAME_[parentNode.nodeName]);
-};
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GML2.MULTIGEOMETRY_TO_MEMBER_NODENAME_ = {
-  'MultiLineString': 'lineStringMember',
-  'MultiCurve': 'curveMember',
-  'MultiPolygon': 'polygonMember',
-  'MultiSurface': 'surfaceMember'
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'surfaceMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygonMember_),
-    'polygonMember': ol.xml.makeChildAppender(
-        ol.format.GML2.prototype.writeSurfaceOrPolygonMember_)
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GML2.ENVELOPE_SERIALIZERS_ = {
-  'http://www.opengis.net/gml': {
-    'lowerCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-    'upperCorner': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-goog.provide('ol.format.GPX');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.array');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.Point');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the GPX format.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.GPXOptions=} opt_options Options.
- * @api
- */
-ol.format.GPX = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.XMLFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @type {function(ol.Feature, Node)|undefined}
-   * @private
-   */
-  this.readExtensions_ = options.readExtensions;
-};
-ol.inherits(ol.format.GPX, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.GPX.NAMESPACE_URIS_ = [
-  null,
-  'http://www.topografix.com/GPX/1/0',
-  'http://www.topografix.com/GPX/1/1'
-];
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.GPX.SCHEMA_LOCATION_ = 'http://www.topografix.com/GPX/1/1 ' +
-    'http://www.topografix.com/GPX/1/1/gpx.xsd';
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {ol.LayoutOptions} layoutOptions Layout options.
- * @param {Node} node Node.
- * @param {Object} values Values.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.GPX.appendCoordinate_ = function(flatCoordinates, layoutOptions, node, values) {
-  flatCoordinates.push(
-      parseFloat(node.getAttribute('lon')),
-      parseFloat(node.getAttribute('lat')));
-  if ('ele' in values) {
-    flatCoordinates.push(/** @type {number} */ (values['ele']));
-    delete values['ele'];
-    layoutOptions.hasZ = true;
-  } else {
-    flatCoordinates.push(0);
-  }
-  if ('time' in values) {
-    flatCoordinates.push(/** @type {number} */ (values['time']));
-    delete values['time'];
-    layoutOptions.hasM = true;
-  } else {
-    flatCoordinates.push(0);
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates
- * and ends arrays by shrinking them accordingly (removing unused zero entries).
- *
- * @param {ol.LayoutOptions} layoutOptions Layout options.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<number>=} ends Ends.
- * @return {ol.geom.GeometryLayout} Layout.
- */
-ol.format.GPX.applyLayoutOptions_ = function(layoutOptions, flatCoordinates, ends) {
-  var layout = ol.geom.GeometryLayout.XY;
-  var stride = 2;
-  if (layoutOptions.hasZ && layoutOptions.hasM) {
-    layout = ol.geom.GeometryLayout.XYZM;
-    stride = 4;
-  } else if (layoutOptions.hasZ) {
-    layout = ol.geom.GeometryLayout.XYZ;
-    stride = 3;
-  } else if (layoutOptions.hasM) {
-    layout = ol.geom.GeometryLayout.XYM;
-    stride = 3;
-  }
-  if (stride !== 4) {
-    var i, ii;
-    for (i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {
-      flatCoordinates[i * stride] = flatCoordinates[i * 4];
-      flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];
-      if (layoutOptions.hasZ) {
-        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];
-      }
-      if (layoutOptions.hasM) {
-        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];
-      }
-    }
-    flatCoordinates.length = flatCoordinates.length / 4 * stride;
-    if (ends) {
-      for (i = 0, ii = ends.length; i < ii; i++) {
-        ends[i] = ends[i] / 4 * stride;
-      }
-    }
-  }
-  return layout;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseLink_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var href = node.getAttribute('href');
-  if (href !== null) {
-    values['link'] = href;
-  }
-  ol.xml.parseNode(ol.format.GPX.LINK_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseExtensions_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values['extensionsNode_'] = node;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseRtePt_ = function(node, objectStack) {
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.RTEPT_PARSERS_, node, objectStack);
-  if (values) {
-    var rteValues = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    var flatCoordinates = /** @type {Array.<number>} */
-        (rteValues['flatCoordinates']);
-    var layoutOptions = /** @type {ol.LayoutOptions} */
-        (rteValues['layoutOptions']);
-    ol.format.GPX.appendCoordinate_(flatCoordinates, layoutOptions, node, values);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseTrkPt_ = function(node, objectStack) {
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.TRKPT_PARSERS_, node, objectStack);
-  if (values) {
-    var trkValues = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    var flatCoordinates = /** @type {Array.<number>} */
-        (trkValues['flatCoordinates']);
-    var layoutOptions = /** @type {ol.LayoutOptions} */
-        (trkValues['layoutOptions']);
-    ol.format.GPX.appendCoordinate_(flatCoordinates, layoutOptions, node, values);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.parseTrkSeg_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  ol.xml.parseNode(ol.format.GPX.TRKSEG_PARSERS_, node, objectStack);
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  var ends = /** @type {Array.<number>} */ (values['ends']);
-  ends.push(flatCoordinates.length);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Track.
- */
-ol.format.GPX.readRte_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop({
-    'flatCoordinates': [],
-    'layoutOptions': {}
-  }, ol.format.GPX.RTE_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  delete values['flatCoordinates'];
-  var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']);
-  delete values['layoutOptions'];
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, flatCoordinates);
-  var geometry = new ol.geom.LineString(null);
-  geometry.setFlatCoordinates(layout, flatCoordinates);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Track.
- */
-ol.format.GPX.readTrk_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop({
-    'flatCoordinates': [],
-    'ends': [],
-    'layoutOptions': {}
-  }, ol.format.GPX.TRK_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var flatCoordinates = /** @type {Array.<number>} */
-      (values['flatCoordinates']);
-  delete values['flatCoordinates'];
-  var ends = /** @type {Array.<number>} */ (values['ends']);
-  delete values['ends'];
-  var layoutOptions = /** @type {ol.LayoutOptions} */ (values['layoutOptions']);
-  delete values['layoutOptions'];
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, flatCoordinates, ends);
-  var geometry = new ol.geom.MultiLineString(null);
-  geometry.setFlatCoordinates(layout, flatCoordinates, ends);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Waypoint.
- */
-ol.format.GPX.readWpt_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var values = ol.xml.pushParseAndPop(
-      {}, ol.format.GPX.WPT_PARSERS_, node, objectStack);
-  if (!values) {
-    return undefined;
-  }
-  var layoutOptions = /** @type {ol.LayoutOptions} */ ({});
-  var coordinates = ol.format.GPX.appendCoordinate_([], layoutOptions, node, values);
-  var layout = ol.format.GPX.applyLayoutOptions_(layoutOptions, coordinates);
-  var geometry = new ol.geom.Point(coordinates, layout);
-  ol.format.Feature.transformWithOptions(geometry, false, options);
-  var feature = new ol.Feature(geometry);
-  feature.setProperties(values);
-  return feature;
-};
-
-
-/**
- * @const
- * @type {Object.<string, function(Node, Array.<*>): (ol.Feature|undefined)>}
- * @private
- */
-ol.format.GPX.FEATURE_READER_ = {
-  'rte': ol.format.GPX.readRte_,
-  'trk': ol.format.GPX.readTrk_,
-  'wpt': ol.format.GPX.readWpt_
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.GPX_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'rte': ol.xml.makeArrayPusher(ol.format.GPX.readRte_),
-      'trk': ol.xml.makeArrayPusher(ol.format.GPX.readTrk_),
-      'wpt': ol.xml.makeArrayPusher(ol.format.GPX.readWpt_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'text':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readString, 'linkText'),
-      'type':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readString, 'linkType')
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.RTE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'number':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'extensions': ol.format.GPX.parseExtensions_,
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'rtept': ol.format.GPX.parseRtePt_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.RTEPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'number':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'extensions': ol.format.GPX.parseExtensions_,
-      'trkseg': ol.format.GPX.parseTrkSeg_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRKSEG_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'trkpt': ol.format.GPX.parseTrkPt_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.TRKPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.GPX.WPT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'time': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDateTime),
-      'magvar': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'geoidheight': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'cmt': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'desc': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'src': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'link': ol.format.GPX.parseLink_,
-      'sym': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'type': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'fix': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'sat': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'hdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'vdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'pdop': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'ageofdgpsdata':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'dgpsid':
-          ol.xml.makeObjectPropertySetter(ol.format.XSD.readNonNegativeInteger),
-      'extensions': ol.format.GPX.parseExtensions_
-    });
-
-
-/**
- * @param {Array.<ol.Feature>} features List of features.
- * @private
- */
-ol.format.GPX.prototype.handleReadExtensions_ = function(features) {
-  if (!features) {
-    features = [];
-  }
-  for (var i = 0, ii = features.length; i < ii; ++i) {
-    var feature = features[i];
-    if (this.readExtensions_) {
-      var extensionsNode = feature.get('extensionsNode_') || null;
-      this.readExtensions_(feature, extensionsNode);
-    }
-    feature.set('extensionsNode_', undefined);
-  }
-};
-
-
-/**
- * Read the first feature from a GPX source.
- * Routes (`<rte>`) are converted into LineString geometries, and tracks (`<trk>`)
- * into MultiLineString. Any properties on route and track waypoints are ignored.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.GPX.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GPX.prototype.readFeatureFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
-    return null;
-  }
-  var featureReader = ol.format.GPX.FEATURE_READER_[node.localName];
-  if (!featureReader) {
-    return null;
-  }
-  var feature = featureReader(node, [this.getReadOptions(node, opt_options)]);
-  if (!feature) {
-    return null;
-  }
-  this.handleReadExtensions_([feature]);
-  return feature;
-};
-
-
-/**
- * Read all features from a GPX source.
- * Routes (`<rte>`) are converted into LineString geometries, and tracks (`<trk>`)
- * into MultiLineString. Any properties on route and track waypoints are ignored.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.GPX.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
-    return [];
-  }
-  if (node.localName == 'gpx') {
-    /** @type {Array.<ol.Feature>} */
-    var features = ol.xml.pushParseAndPop([], ol.format.GPX.GPX_PARSERS_,
-        node, [this.getReadOptions(node, opt_options)]);
-    if (features) {
-      this.handleReadExtensions_(features);
-      return features;
-    } else {
-      return [];
-    }
-  }
-  return [];
-};
-
-
-/**
- * Read the projection from a GPX source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.GPX.prototype.readProjection;
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value Value for the link's `href` attribute.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.GPX.writeLink_ = function(node, value, objectStack) {
-  node.setAttribute('href', value);
-  var context = objectStack[objectStack.length - 1];
-  var properties = context['properties'];
-  var link = [
-    properties['linkText'],
-    properties['linkType']
-  ];
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ ({node: node}),
-      ol.format.GPX.LINK_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      link, objectStack, ol.format.GPX.LINK_SEQUENCE_);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeWptType_ = function(node, coordinate, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var parentNode = context.node;
-  var namespaceURI = parentNode.namespaceURI;
-  var properties = context['properties'];
-  //FIXME Projection handling
-  ol.xml.setAttributeNS(node, null, 'lat', coordinate[1]);
-  ol.xml.setAttributeNS(node, null, 'lon', coordinate[0]);
-  var geometryLayout = context['geometryLayout'];
-  switch (geometryLayout) {
-    case ol.geom.GeometryLayout.XYZM:
-      if (coordinate[3] !== 0) {
-        properties['time'] = coordinate[3];
-      }
-      // fall through
-    case ol.geom.GeometryLayout.XYZ:
-      if (coordinate[2] !== 0) {
-        properties['ele'] = coordinate[2];
-      }
-      break;
-    case ol.geom.GeometryLayout.XYM:
-      if (coordinate[2] !== 0) {
-        properties['time'] = coordinate[2];
-      }
-      break;
-    default:
-      // pass
-  }
-  var orderedKeys = (node.nodeName == 'rtept') ?
-    ol.format.GPX.RTEPT_TYPE_SEQUENCE_[namespaceURI] :
-    ol.format.GPX.WPT_TYPE_SEQUENCE_[namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: node, 'properties': properties}),
-      ol.format.GPX.WPT_TYPE_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeRte_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var properties = feature.getProperties();
-  var context = {node: node, 'properties': properties};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.LineString} */
-      (ol.format.Feature.transformWithOptions(geometry, true, options));
-    context['geometryLayout'] = geometry.getLayout();
-    properties['rtept'] = geometry.getCoordinates();
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.GPX.RTE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.RTE_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeTrk_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var properties = feature.getProperties();
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node, 'properties': properties};
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.MultiLineString} */
-      (ol.format.Feature.transformWithOptions(geometry, true, options));
-    properties['trkseg'] = geometry.getLineStrings();
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.GPX.TRK_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.TRK_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LineString} lineString LineString.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeTrkSeg_ = function(node, lineString, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node, 'geometryLayout': lineString.getLayout(),
-    'properties': {}};
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.GPX.TRKSEG_SERIALIZERS_, ol.format.GPX.TRKSEG_NODE_FACTORY_,
-      lineString.getCoordinates(), objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.GPX.writeWpt_ = function(node, feature, objectStack) {
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var context = objectStack[objectStack.length - 1];
-  context['properties'] = feature.getProperties();
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry = /** @type {ol.geom.Point} */
-      (ol.format.Feature.transformWithOptions(geometry, true, options));
-    context['geometryLayout'] = geometry.getLayout();
-    ol.format.GPX.writeWptType_(node, geometry.getCoordinates(), objectStack);
-  }
-};
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.GPX.LINK_SEQUENCE_ = ['text', 'type'];
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.LINK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'text': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.RTE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'rtept'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.RTE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'number': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'rtept': ol.xml.makeArraySerializer(ol.xml.makeChildAppender(
-          ol.format.GPX.writeWptType_))
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.RTEPT_TYPE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'ele', 'time'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.TRK_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'trkseg'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.TRK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'number': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'trkseg': ol.xml.makeArraySerializer(ol.xml.makeChildAppender(
-          ol.format.GPX.writeTrkSeg_))
-    });
-
-
-/**
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.GPX.TRKSEG_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('trkpt');
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.TRKSEG_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'trkpt': ol.xml.makeChildAppender(ol.format.GPX.writeWptType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.GPX.WPT_TYPE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, [
-      'ele', 'time', 'magvar', 'geoidheight', 'name', 'cmt', 'desc', 'src',
-      'link', 'sym', 'type', 'fix', 'sat', 'hdop', 'vdop', 'pdop',
-      'ageofdgpsdata', 'dgpsid'
-    ]);
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.WPT_TYPE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'ele': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'time': ol.xml.makeChildAppender(ol.format.XSD.writeDateTimeTextNode),
-      'magvar': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'geoidheight': ol.xml.makeChildAppender(
-          ol.format.XSD.writeDecimalTextNode),
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'cmt': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'desc': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'src': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'link': ol.xml.makeChildAppender(ol.format.GPX.writeLink_),
-      'sym': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'type': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'fix': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'sat': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode),
-      'hdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'vdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'pdop': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'ageofdgpsdata': ol.xml.makeChildAppender(
-          ol.format.XSD.writeDecimalTextNode),
-      'dgpsid': ol.xml.makeChildAppender(
-          ol.format.XSD.writeNonNegativeIntegerTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_ = {
-  'Point': 'wpt',
-  'LineString': 'rte',
-  'MultiLineString': 'trk'
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.GPX.GPX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  var geometry = /** @type {ol.Feature} */ (value).getGeometry();
-  if (geometry) {
-    var nodeName = ol.format.GPX.GEOMETRY_TYPE_TO_NODENAME_[geometry.getType()];
-    if (nodeName) {
-      var parentNode = objectStack[objectStack.length - 1].node;
-      return ol.xml.createElementNS(parentNode.namespaceURI, nodeName);
-    }
-  }
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.GPX.GPX_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.GPX.NAMESPACE_URIS_, {
-      'rte': ol.xml.makeChildAppender(ol.format.GPX.writeRte_),
-      'trk': ol.xml.makeChildAppender(ol.format.GPX.writeTrk_),
-      'wpt': ol.xml.makeChildAppender(ol.format.GPX.writeWpt_)
-    });
-
-
-/**
- * Encode an array of features in the GPX format.
- * LineString geometries are output as routes (`<rte>`), and MultiLineString
- * as tracks (`<trk>`).
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Result.
- * @api
- */
-ol.format.GPX.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the GPX format as an XML node.
- * LineString geometries are output as routes (`<rte>`), and MultiLineString
- * as tracks (`<trk>`).
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.GPX.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  //FIXME Serialize metadata
-  var gpx = ol.xml.createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');
-  var xmlnsUri = 'http://www.w3.org/2000/xmlns/';
-  var xmlSchemaInstanceUri = 'http://www.w3.org/2001/XMLSchema-instance';
-  ol.xml.setAttributeNS(gpx, xmlnsUri, 'xmlns:xsi', xmlSchemaInstanceUri);
-  ol.xml.setAttributeNS(gpx, xmlSchemaInstanceUri, 'xsi:schemaLocation',
-      ol.format.GPX.SCHEMA_LOCATION_);
-  gpx.setAttribute('version', '1.1');
-  gpx.setAttribute('creator', 'OpenLayers');
-
-  ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */
-      ({node: gpx}), ol.format.GPX.GPX_SERIALIZERS_,
-      ol.format.GPX.GPX_NODE_FACTORY_, features, [opt_options]);
-  return gpx;
-};
-
-goog.provide('ol.format.IGCZ');
-
-/**
- * IGC altitude/z. One of 'barometric', 'gps', 'none'.
- * @enum {string}
- */
-ol.format.IGCZ = {
-  BAROMETRIC: 'barometric',
-  GPS: 'gps',
-  NONE: 'none'
-};
-
-goog.provide('ol.format.TextFeature');
-
-goog.require('ol');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for text feature formats.
- *
- * @constructor
- * @abstract
- * @extends {ol.format.Feature}
- */
-ol.format.TextFeature = function() {
-  ol.format.Feature.call(this);
-};
-ol.inherits(ol.format.TextFeature, ol.format.Feature);
-
-
-/**
- * @param {Document|Node|Object|string} source Source.
- * @private
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.getText_ = function(source) {
-  if (typeof source === 'string') {
-    return source;
-  } else {
-    return '';
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.getType = function() {
-  return ol.format.FormatType.TEXT;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readFeature = function(source, opt_options) {
-  return this.readFeatureFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.Feature} Feature.
- */
-ol.format.TextFeature.prototype.readFeatureFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readFeatures = function(source, opt_options) {
-  return this.readFeaturesFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {Array.<ol.Feature>} Features.
- */
-ol.format.TextFeature.prototype.readFeaturesFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readGeometry = function(source, opt_options) {
-  return this.readGeometryFromText(
-      this.getText_(source), this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {string} text Text.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @protected
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.TextFeature.prototype.readGeometryFromText = function(text, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.readProjection = function(source) {
-  return this.readProjectionFromText(this.getText_(source));
-};
-
-
-/**
- * @param {string} text Text.
- * @protected
- * @return {ol.proj.Projection} Projection.
- */
-ol.format.TextFeature.prototype.readProjectionFromText = function(text) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeFeature = function(feature, opt_options) {
-  return this.writeFeatureText(feature, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.Feature} feature Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeFeatureText = function(feature, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeFeatures = function(
-    features, opt_options) {
-  return this.writeFeaturesText(features, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeFeaturesText = function(features, opt_options) {};
-
-
-/**
- * @inheritDoc
- */
-ol.format.TextFeature.prototype.writeGeometry = function(
-    geometry, opt_options) {
-  return this.writeGeometryText(geometry, this.adaptOptions(opt_options));
-};
-
-
-/**
- * @abstract
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @protected
- * @return {string} Text.
- */
-ol.format.TextFeature.prototype.writeGeometryText = function(geometry, opt_options) {};
-
-goog.provide('ol.format.IGC');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.IGCZ');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for `*.igc` flight recording files.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.IGCOptions=} opt_options Options.
- * @api
- */
-ol.format.IGC = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {ol.format.IGCZ}
-   */
-  this.altitudeMode_ = options.altitudeMode ?
-    options.altitudeMode : ol.format.IGCZ.NONE;
-
-};
-ol.inherits(ol.format.IGC, ol.format.TextFeature);
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.B_RECORD_RE_ =
-    /^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/;
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.H_RECORD_RE_ = /^H.([A-Z]{3}).*?:(.*)/;
-
-
-/**
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.HFDTE_RECORD_RE_ = /^HFDTE(\d{2})(\d{2})(\d{2})/;
-
-
-/**
- * A regular expression matching the newline characters `\r\n`, `\r` and `\n`.
- *
- * @const
- * @type {RegExp}
- * @private
- */
-ol.format.IGC.NEWLINE_RE_ = /\r\n|\r|\n/;
-
-
-/**
- * Read the feature from the IGC source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.IGC.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.IGC.prototype.readFeatureFromText = function(text, opt_options) {
-  var altitudeMode = this.altitudeMode_;
-  var lines = text.split(ol.format.IGC.NEWLINE_RE_);
-  /** @type {Object.<string, string>} */
-  var properties = {};
-  var flatCoordinates = [];
-  var year = 2000;
-  var month = 0;
-  var day = 1;
-  var lastDateTime = -1;
-  var i, ii;
-  for (i = 0, ii = lines.length; i < ii; ++i) {
-    var line = lines[i];
-    var m;
-    if (line.charAt(0) == 'B') {
-      m = ol.format.IGC.B_RECORD_RE_.exec(line);
-      if (m) {
-        var hour = parseInt(m[1], 10);
-        var minute = parseInt(m[2], 10);
-        var second = parseInt(m[3], 10);
-        var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;
-        if (m[6] == 'S') {
-          y = -y;
-        }
-        var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;
-        if (m[9] == 'W') {
-          x = -x;
-        }
-        flatCoordinates.push(x, y);
-        if (altitudeMode != ol.format.IGCZ.NONE) {
-          var z;
-          if (altitudeMode == ol.format.IGCZ.GPS) {
-            z = parseInt(m[11], 10);
-          } else if (altitudeMode == ol.format.IGCZ.BAROMETRIC) {
-            z = parseInt(m[12], 10);
-          } else {
-            z = 0;
-          }
-          flatCoordinates.push(z);
-        }
-        var dateTime = Date.UTC(year, month, day, hour, minute, second);
-        // Detect UTC midnight wrap around.
-        if (dateTime < lastDateTime) {
-          dateTime = Date.UTC(year, month, day + 1, hour, minute, second);
-        }
-        flatCoordinates.push(dateTime / 1000);
-        lastDateTime = dateTime;
-      }
-    } else if (line.charAt(0) == 'H') {
-      m = ol.format.IGC.HFDTE_RECORD_RE_.exec(line);
-      if (m) {
-        day = parseInt(m[1], 10);
-        month = parseInt(m[2], 10) - 1;
-        year = 2000 + parseInt(m[3], 10);
-      } else {
-        m = ol.format.IGC.H_RECORD_RE_.exec(line);
-        if (m) {
-          properties[m[1]] = m[2].trim();
-        }
-      }
-    }
-  }
-  if (flatCoordinates.length === 0) {
-    return null;
-  }
-  var lineString = new ol.geom.LineString(null);
-  var layout = altitudeMode == ol.format.IGCZ.NONE ?
-    ol.geom.GeometryLayout.XYM : ol.geom.GeometryLayout.XYZM;
-  lineString.setFlatCoordinates(layout, flatCoordinates);
-  var feature = new ol.Feature(ol.format.Feature.transformWithOptions(
-      lineString, false, opt_options));
-  feature.setProperties(properties);
-  return feature;
-};
-
-
-/**
- * Read the feature from the source. As IGC sources contain a single
- * feature, this will return the feature in an array.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.IGC.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.IGC.prototype.readFeaturesFromText = function(text, opt_options) {
-  var feature = this.readFeatureFromText(text, opt_options);
-  if (feature) {
-    return [feature];
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Read the projection from the IGC source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.IGC.prototype.readProjection;
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeFeatureText = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeFeaturesText = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.writeGeometryText = function(geometry, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.IGC.prototype.readGeometryFromText = function(text, opt_options) {};
-
-goog.provide('ol.style.IconAnchorUnits');
-
-/**
- * Icon anchor units. One of 'fraction', 'pixels'.
- * @enum {string}
- */
-ol.style.IconAnchorUnits = {
-  FRACTION: 'fraction',
-  PIXELS: 'pixels'
-};
-
-goog.provide('ol.style.IconImage');
-
-goog.require('ol');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-goog.require('ol.ImageState');
-goog.require('ol.style');
-
-
-/**
- * @constructor
- * @param {Image|HTMLCanvasElement} image Image.
- * @param {string|undefined} src Src.
- * @param {ol.Size} size Size.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageState} imageState Image state.
- * @param {ol.Color} color Color.
- * @extends {ol.events.EventTarget}
- */
-ol.style.IconImage = function(image, src, size, crossOrigin, imageState,
-    color) {
-
-  ol.events.EventTarget.call(this);
-
-  /**
-   * @private
-   * @type {Image|HTMLCanvasElement}
-   */
-  this.hitDetectionImage_ = null;
-
-  /**
-   * @private
-   * @type {Image|HTMLCanvasElement}
-   */
-  this.image_ = !image ? new Image() : image;
-
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = color ?
-    /** @type {HTMLCanvasElement} */ (document.createElement('CANVAS')) :
-    null;
-
-  /**
-   * @private
-   * @type {ol.Color}
-   */
-  this.color_ = color;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {ol.ImageState}
-   */
-  this.imageState_ = imageState;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = size;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.tainting_ = false;
-  if (this.imageState_ == ol.ImageState.LOADED) {
-    this.determineTainting_();
-  }
-
-};
-ol.inherits(ol.style.IconImage, ol.events.EventTarget);
-
-
-/**
- * @param {Image|HTMLCanvasElement} image Image.
- * @param {string} src Src.
- * @param {ol.Size} size Size.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageState} imageState Image state.
- * @param {ol.Color} color Color.
- * @return {ol.style.IconImage} Icon image.
- */
-ol.style.IconImage.get = function(image, src, size, crossOrigin, imageState,
-    color) {
-  var iconImageCache = ol.style.iconImageCache;
-  var iconImage = iconImageCache.get(src, crossOrigin, color);
-  if (!iconImage) {
-    iconImage = new ol.style.IconImage(
-        image, src, size, crossOrigin, imageState, color);
-    iconImageCache.set(src, crossOrigin, color, iconImage);
-  }
-  return iconImage;
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.determineTainting_ = function() {
-  var context = ol.dom.createCanvasContext2D(1, 1);
-  try {
-    context.drawImage(this.image_, 0, 0);
-    context.getImageData(0, 0, 1, 1);
-  } catch (e) {
-    this.tainting_ = true;
-  }
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.dispatchChangeEvent_ = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.handleImageError_ = function() {
-  this.imageState_ = ol.ImageState.ERROR;
-  this.unlistenImage_();
-  this.dispatchChangeEvent_();
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.handleImageLoad_ = function() {
-  this.imageState_ = ol.ImageState.LOADED;
-  if (this.size_) {
-    this.image_.width = this.size_[0];
-    this.image_.height = this.size_[1];
-  }
-  this.size_ = [this.image_.width, this.image_.height];
-  this.unlistenImage_();
-  this.determineTainting_();
-  this.replaceColor_();
-  this.dispatchChangeEvent_();
-};
-
-
-/**
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image or Canvas element.
- */
-ol.style.IconImage.prototype.getImage = function(pixelRatio) {
-  return this.canvas_ ? this.canvas_ : this.image_;
-};
-
-
-/**
- * @return {ol.ImageState} Image state.
- */
-ol.style.IconImage.prototype.getImageState = function() {
-  return this.imageState_;
-};
-
-
-/**
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image element.
- */
-ol.style.IconImage.prototype.getHitDetectionImage = function(pixelRatio) {
-  if (!this.hitDetectionImage_) {
-    if (this.tainting_) {
-      var width = this.size_[0];
-      var height = this.size_[1];
-      var context = ol.dom.createCanvasContext2D(width, height);
-      context.fillRect(0, 0, width, height);
-      this.hitDetectionImage_ = context.canvas;
-    } else {
-      this.hitDetectionImage_ = this.image_;
-    }
-  }
-  return this.hitDetectionImage_;
-};
-
-
-/**
- * @return {ol.Size} Image size.
- */
-ol.style.IconImage.prototype.getSize = function() {
-  return this.size_;
-};
-
-
-/**
- * @return {string|undefined} Image src.
- */
-ol.style.IconImage.prototype.getSrc = function() {
-  return this.src_;
-};
-
-
-/**
- * Load not yet loaded URI.
- */
-ol.style.IconImage.prototype.load = function() {
-  if (this.imageState_ == ol.ImageState.IDLE) {
-    this.imageState_ = ol.ImageState.LOADING;
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    try {
-      this.image_.src = this.src_;
-    } catch (e) {
-      this.handleImageError_();
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.style.IconImage.prototype.replaceColor_ = function() {
-  if (this.tainting_ || this.color_ === null) {
-    return;
-  }
-
-  this.canvas_.width = this.image_.width;
-  this.canvas_.height = this.image_.height;
-
-  var ctx = this.canvas_.getContext('2d');
-  ctx.drawImage(this.image_, 0, 0);
-
-  var imgData = ctx.getImageData(0, 0, this.image_.width, this.image_.height);
-  var data = imgData.data;
-  var r = this.color_[0] / 255.0;
-  var g = this.color_[1] / 255.0;
-  var b = this.color_[2] / 255.0;
-
-  for (var i = 0, ii = data.length; i < ii; i += 4) {
-    data[i] *= r;
-    data[i + 1] *= g;
-    data[i + 2] *= b;
-  }
-  ctx.putImageData(imgData, 0, 0);
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.style.IconImage.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-goog.provide('ol.style.IconOrigin');
-
-/**
- * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.
- * @enum {string}
- */
-ol.style.IconOrigin = {
-  BOTTOM_LEFT: 'bottom-left',
-  BOTTOM_RIGHT: 'bottom-right',
-  TOP_LEFT: 'top-left',
-  TOP_RIGHT: 'top-right'
-};
-
-goog.provide('ol.style.Icon');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.asserts');
-goog.require('ol.color');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.style.IconAnchorUnits');
-goog.require('ol.style.IconImage');
-goog.require('ol.style.IconOrigin');
-goog.require('ol.style.Image');
-
-
-/**
- * @classdesc
- * Set icon style for vector features.
- *
- * @constructor
- * @param {olx.style.IconOptions=} opt_options Options.
- * @extends {ol.style.Image}
- * @api
- */
-ol.style.Icon = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.normalizedAnchor_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.IconOrigin}
-   */
-  this.anchorOrigin_ = options.anchorOrigin !== undefined ?
-    options.anchorOrigin : ol.style.IconOrigin.TOP_LEFT;
-
-  /**
-   * @private
-   * @type {ol.style.IconAnchorUnits}
-   */
-  this.anchorXUnits_ = options.anchorXUnits !== undefined ?
-    options.anchorXUnits : ol.style.IconAnchorUnits.FRACTION;
-
-  /**
-   * @private
-   * @type {ol.style.IconAnchorUnits}
-   */
-  this.anchorYUnits_ = options.anchorYUnits !== undefined ?
-    options.anchorYUnits : ol.style.IconAnchorUnits.FRACTION;
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @type {Image|HTMLCanvasElement}
-   */
-  var image = options.img !== undefined ? options.img : null;
-
-  /**
-   * @type {ol.Size}
-   */
-  var imgSize = options.imgSize !== undefined ? options.imgSize : null;
-
-  /**
-   * @type {string|undefined}
-   */
-  var src = options.src;
-
-  ol.asserts.assert(!(src !== undefined && image),
-      4); // `image` and `src` cannot be provided at the same time
-  ol.asserts.assert(!image || (image && imgSize),
-      5); // `imgSize` must be set when `image` is provided
-
-  if ((src === undefined || src.length === 0) && image) {
-    src = image.src || ol.getUid(image).toString();
-  }
-  ol.asserts.assert(src !== undefined && src.length > 0,
-      6); // A defined and non-empty `src` or `image` must be provided
-
-  /**
-   * @type {ol.ImageState}
-   */
-  var imageState = options.src !== undefined ?
-    ol.ImageState.IDLE : ol.ImageState.LOADED;
-
-  /**
-   * @private
-   * @type {ol.Color}
-   */
-  this.color_ = options.color !== undefined ? ol.color.asArray(options.color) :
-    null;
-
-  /**
-   * @private
-   * @type {ol.style.IconImage}
-   */
-  this.iconImage_ = ol.style.IconImage.get(
-      image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_);
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.offset_ = options.offset !== undefined ? options.offset : [0, 0];
-
-  /**
-   * @private
-   * @type {ol.style.IconOrigin}
-   */
-  this.offsetOrigin_ = options.offsetOrigin !== undefined ?
-    options.offsetOrigin : ol.style.IconOrigin.TOP_LEFT;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.origin_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.size_ = options.size !== undefined ? options.size : null;
-
-  /**
-   * @type {number}
-   */
-  var opacity = options.opacity !== undefined ? options.opacity : 1;
-
-  /**
-   * @type {boolean}
-   */
-  var rotateWithView = options.rotateWithView !== undefined ?
-    options.rotateWithView : false;
-
-  /**
-   * @type {number}
-   */
-  var rotation = options.rotation !== undefined ? options.rotation : 0;
-
-  /**
-   * @type {number}
-   */
-  var scale = options.scale !== undefined ? options.scale : 1;
-
-  /**
-   * @type {boolean}
-   */
-  var snapToPixel = options.snapToPixel !== undefined ?
-    options.snapToPixel : true;
-
-  ol.style.Image.call(this, {
-    opacity: opacity,
-    rotation: rotation,
-    scale: scale,
-    snapToPixel: snapToPixel,
-    rotateWithView: rotateWithView
-  });
-
-};
-ol.inherits(ol.style.Icon, ol.style.Image);
-
-
-/**
- * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
- * @return {ol.style.Icon} The cloned style.
- * @api
- */
-ol.style.Icon.prototype.clone = function() {
-  return new ol.style.Icon({
-    anchor: this.anchor_.slice(),
-    anchorOrigin: this.anchorOrigin_,
-    anchorXUnits: this.anchorXUnits_,
-    anchorYUnits: this.anchorYUnits_,
-    crossOrigin: this.crossOrigin_,
-    color: (this.color_ && this.color_.slice) ? this.color_.slice() : this.color_ || undefined,
-    src: this.getSrc(),
-    offset: this.offset_.slice(),
-    offsetOrigin: this.offsetOrigin_,
-    size: this.size_ !== null ? this.size_.slice() : undefined,
-    opacity: this.getOpacity(),
-    scale: this.getScale(),
-    snapToPixel: this.getSnapToPixel(),
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView()
-  });
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getAnchor = function() {
-  if (this.normalizedAnchor_) {
-    return this.normalizedAnchor_;
-  }
-  var anchor = this.anchor_;
-  var size = this.getSize();
-  if (this.anchorXUnits_ == ol.style.IconAnchorUnits.FRACTION ||
-      this.anchorYUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-    if (!size) {
-      return null;
-    }
-    anchor = this.anchor_.slice();
-    if (this.anchorXUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-      anchor[0] *= size[0];
-    }
-    if (this.anchorYUnits_ == ol.style.IconAnchorUnits.FRACTION) {
-      anchor[1] *= size[1];
-    }
-  }
-
-  if (this.anchorOrigin_ != ol.style.IconOrigin.TOP_LEFT) {
-    if (!size) {
-      return null;
-    }
-    if (anchor === this.anchor_) {
-      anchor = this.anchor_.slice();
-    }
-    if (this.anchorOrigin_ == ol.style.IconOrigin.TOP_RIGHT ||
-        this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      anchor[0] = -anchor[0] + size[0];
-    }
-    if (this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_LEFT ||
-        this.anchorOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      anchor[1] = -anchor[1] + size[1];
-    }
-  }
-  this.normalizedAnchor_ = anchor;
-  return this.normalizedAnchor_;
-};
-
-
-/**
- * Get the icon color.
- * @return {ol.Color} Color.
- * @api
- */
-ol.style.Icon.prototype.getColor = function() {
-  return this.color_;
-};
-
-
-/**
- * Get the image icon.
- * @param {number} pixelRatio Pixel ratio.
- * @return {Image|HTMLCanvasElement} Image or Canvas element.
- * @override
- * @api
- */
-ol.style.Icon.prototype.getImage = function(pixelRatio) {
-  return this.iconImage_.getImage(pixelRatio);
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getImageSize = function() {
-  return this.iconImage_.getSize();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getHitDetectionImageSize = function() {
-  return this.getImageSize();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getImageState = function() {
-  return this.iconImage_.getImageState();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.getHitDetectionImage = function(pixelRatio) {
-  return this.iconImage_.getHitDetectionImage(pixelRatio);
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getOrigin = function() {
-  if (this.origin_) {
-    return this.origin_;
-  }
-  var offset = this.offset_;
-
-  if (this.offsetOrigin_ != ol.style.IconOrigin.TOP_LEFT) {
-    var size = this.getSize();
-    var iconImageSize = this.iconImage_.getSize();
-    if (!size || !iconImageSize) {
-      return null;
-    }
-    offset = offset.slice();
-    if (this.offsetOrigin_ == ol.style.IconOrigin.TOP_RIGHT ||
-        this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      offset[0] = iconImageSize[0] - size[0] - offset[0];
-    }
-    if (this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_LEFT ||
-        this.offsetOrigin_ == ol.style.IconOrigin.BOTTOM_RIGHT) {
-      offset[1] = iconImageSize[1] - size[1] - offset[1];
-    }
-  }
-  this.origin_ = offset;
-  return this.origin_;
-};
-
-
-/**
- * Get the image URL.
- * @return {string|undefined} Image src.
- * @api
- */
-ol.style.Icon.prototype.getSrc = function() {
-  return this.iconImage_.getSrc();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.style.Icon.prototype.getSize = function() {
-  return !this.size_ ? this.iconImage_.getSize() : this.size_;
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.listenImageChange = function(listener, thisArg) {
-  return ol.events.listen(this.iconImage_, ol.events.EventType.CHANGE,
-      listener, thisArg);
-};
-
-
-/**
- * Load not yet loaded URI.
- * When rendering a feature with an icon style, the vector renderer will
- * automatically call this method. However, you might want to call this
- * method yourself for preloading or other purposes.
- * @override
- * @api
- */
-ol.style.Icon.prototype.load = function() {
-  this.iconImage_.load();
-};
-
-
-/**
- * @override
- */
-ol.style.Icon.prototype.unlistenImageChange = function(listener, thisArg) {
-  ol.events.unlisten(this.iconImage_, ol.events.EventType.CHANGE,
-      listener, thisArg);
-};
-
-goog.provide('ol.style.Text');
-
-
-goog.require('ol.style.Fill');
-goog.require('ol.style.TextPlacement');
-
-
-/**
- * @classdesc
- * Set text style for vector features.
- *
- * @constructor
- * @param {olx.style.TextOptions=} opt_options Options.
- * @api
- */
-ol.style.Text = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.font_ = options.font;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.rotation_ = options.rotation;
-
-  /**
-   * @private
-   * @type {boolean|undefined}
-   */
-  this.rotateWithView_ = options.rotateWithView;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.scale_ = options.scale;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.text_ = options.text;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.textAlign_ = options.textAlign;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.textBaseline_ = options.textBaseline;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fill_ = options.fill !== undefined ? options.fill :
-    new ol.style.Fill({color: ol.style.Text.DEFAULT_FILL_COLOR_});
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxAngle_ = options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;
-
-  /**
-   * @private
-   * @type {ol.style.TextPlacement|string}
-   */
-  this.placement_ = options.placement !== undefined ? options.placement : ol.style.TextPlacement.POINT;
-
-  //TODO Use options.overflow directly after removing @deprecated exceedLength
-  var overflow = options.overflow === undefined ? options.exceedLength : options.overflow;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overflow_ = overflow !== undefined ? overflow : false;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.stroke_ = options.stroke !== undefined ? options.stroke : null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.padding_ = options.padding === undefined ? null : options.padding;
-};
-
-
-/**
- * The default fill color to use if no fill was set at construction time; a
- * blackish `#333`.
- *
- * @const {string}
- * @private
- */
-ol.style.Text.DEFAULT_FILL_COLOR_ = '#333';
-
-
-/**
- * Clones the style.
- * @return {ol.style.Text} The cloned style.
- * @api
- */
-ol.style.Text.prototype.clone = function() {
-  return new ol.style.Text({
-    font: this.getFont(),
-    placement: this.getPlacement(),
-    maxAngle: this.getMaxAngle(),
-    overflow: this.getOverflow(),
-    rotation: this.getRotation(),
-    rotateWithView: this.getRotateWithView(),
-    scale: this.getScale(),
-    text: this.getText(),
-    textAlign: this.getTextAlign(),
-    textBaseline: this.getTextBaseline(),
-    fill: this.getFill() ? this.getFill().clone() : undefined,
-    stroke: this.getStroke() ? this.getStroke().clone() : undefined,
-    offsetX: this.getOffsetX(),
-    offsetY: this.getOffsetY()
-  });
-};
-
-
-/**
- * Get the `overflow` configuration.
- * @return {boolean} Let text overflow the length of the path they follow.
- * @api
- */
-ol.style.Text.prototype.getOverflow = function() {
-  return this.overflow_;
-};
-
-
-/**
- * Get the font name.
- * @return {string|undefined} Font.
- * @api
- */
-ol.style.Text.prototype.getFont = function() {
-  return this.font_;
-};
-
-
-/**
- * Get the maximum angle between adjacent characters.
- * @return {number} Angle in radians.
- * @api
- */
-ol.style.Text.prototype.getMaxAngle = function() {
-  return this.maxAngle_;
-};
-
-
-/**
- * Get the label placement.
- * @return {ol.style.TextPlacement|string} Text placement.
- * @api
- */
-ol.style.Text.prototype.getPlacement = function() {
-  return this.placement_;
-};
-
-
-/**
- * Get the x-offset for the text.
- * @return {number} Horizontal text offset.
- * @api
- */
-ol.style.Text.prototype.getOffsetX = function() {
-  return this.offsetX_;
-};
-
-
-/**
- * Get the y-offset for the text.
- * @return {number} Vertical text offset.
- * @api
- */
-ol.style.Text.prototype.getOffsetY = function() {
-  return this.offsetY_;
-};
-
-
-/**
- * Get the fill style for the text.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Text.prototype.getFill = function() {
-  return this.fill_;
-};
-
-
-/**
- * Determine whether the text rotates with the map.
- * @return {boolean|undefined} Rotate with map.
- * @api
- */
-ol.style.Text.prototype.getRotateWithView = function() {
-  return this.rotateWithView_;
-};
-
-
-/**
- * Get the text rotation.
- * @return {number|undefined} Rotation.
- * @api
- */
-ol.style.Text.prototype.getRotation = function() {
-  return this.rotation_;
-};
-
-
-/**
- * Get the text scale.
- * @return {number|undefined} Scale.
- * @api
- */
-ol.style.Text.prototype.getScale = function() {
-  return this.scale_;
-};
-
-
-/**
- * Get the stroke style for the text.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Text.prototype.getStroke = function() {
-  return this.stroke_;
-};
-
-
-/**
- * Get the text to be rendered.
- * @return {string|undefined} Text.
- * @api
- */
-ol.style.Text.prototype.getText = function() {
-  return this.text_;
-};
-
-
-/**
- * Get the text alignment.
- * @return {string|undefined} Text align.
- * @api
- */
-ol.style.Text.prototype.getTextAlign = function() {
-  return this.textAlign_;
-};
-
-
-/**
- * Get the text baseline.
- * @return {string|undefined} Text baseline.
- * @api
- */
-ol.style.Text.prototype.getTextBaseline = function() {
-  return this.textBaseline_;
-};
-
-
-/**
- * Get the background fill style for the text.
- * @return {ol.style.Fill} Fill style.
- * @api
- */
-ol.style.Text.prototype.getBackgroundFill = function() {
-  return this.backgroundFill_;
-};
-
-
-/**
- * Get the background stroke style for the text.
- * @return {ol.style.Stroke} Stroke style.
- * @api
- */
-ol.style.Text.prototype.getBackgroundStroke = function() {
-  return this.backgroundStroke_;
-};
-
-
-/**
- * Get the padding for the text.
- * @return {Array.<number>} Padding.
- * @api
- */
-ol.style.Text.prototype.getPadding = function() {
-  return this.padding_;
-};
-
-
-/**
- * Set the `overflow` property.
- *
- * @param {boolean} overflow Let text overflow the path that it follows.
- * @api
- */
-ol.style.Text.prototype.setOverflow = function(overflow) {
-  this.overflow_ = overflow;
-};
-
-
-/**
- * Set the font.
- *
- * @param {string|undefined} font Font.
- * @api
- */
-ol.style.Text.prototype.setFont = function(font) {
-  this.font_ = font;
-};
-
-
-/**
- * Set the maximum angle between adjacent characters.
- *
- * @param {number} maxAngle Angle in radians.
- * @api
- */
-ol.style.Text.prototype.setMaxAngle = function(maxAngle) {
-  this.maxAngle_ = maxAngle;
-};
-
-
-/**
- * Set the x offset.
- *
- * @param {number} offsetX Horizontal text offset.
- * @api
- */
-ol.style.Text.prototype.setOffsetX = function(offsetX) {
-  this.offsetX_ = offsetX;
-};
-
-
-/**
- * Set the y offset.
- *
- * @param {number} offsetY Vertical text offset.
- * @api
- */
-ol.style.Text.prototype.setOffsetY = function(offsetY) {
-  this.offsetY_ = offsetY;
-};
-
-
-/**
- * Set the text placement.
- *
- * @param {ol.style.TextPlacement|string} placement Placement.
- * @api
- */
-ol.style.Text.prototype.setPlacement = function(placement) {
-  this.placement_ = placement;
-};
-
-
-/**
- * Set the fill.
- *
- * @param {ol.style.Fill} fill Fill style.
- * @api
- */
-ol.style.Text.prototype.setFill = function(fill) {
-  this.fill_ = fill;
-};
-
-
-/**
- * Set the rotation.
- *
- * @param {number|undefined} rotation Rotation.
- * @api
- */
-ol.style.Text.prototype.setRotation = function(rotation) {
-  this.rotation_ = rotation;
-};
-
-
-/**
- * Set the scale.
- *
- * @param {number|undefined} scale Scale.
- * @api
- */
-ol.style.Text.prototype.setScale = function(scale) {
-  this.scale_ = scale;
-};
-
-
-/**
- * Set the stroke.
- *
- * @param {ol.style.Stroke} stroke Stroke style.
- * @api
- */
-ol.style.Text.prototype.setStroke = function(stroke) {
-  this.stroke_ = stroke;
-};
-
-
-/**
- * Set the text.
- *
- * @param {string|undefined} text Text.
- * @api
- */
-ol.style.Text.prototype.setText = function(text) {
-  this.text_ = text;
-};
-
-
-/**
- * Set the text alignment.
- *
- * @param {string|undefined} textAlign Text align.
- * @api
- */
-ol.style.Text.prototype.setTextAlign = function(textAlign) {
-  this.textAlign_ = textAlign;
-};
-
-
-/**
- * Set the text baseline.
- *
- * @param {string|undefined} textBaseline Text baseline.
- * @api
- */
-ol.style.Text.prototype.setTextBaseline = function(textBaseline) {
-  this.textBaseline_ = textBaseline;
-};
-
-
-/**
- * Set the background fill.
- *
- * @param {ol.style.Fill} fill Fill style.
- * @api
- */
-ol.style.Text.prototype.setBackgroundFill = function(fill) {
-  this.backgroundFill_ = fill;
-};
-
-
-/**
- * Set the background stroke.
- *
- * @param {ol.style.Stroke} stroke Stroke style.
- * @api
- */
-ol.style.Text.prototype.setBackgroundStroke = function(stroke) {
-  this.backgroundStroke_ = stroke;
-};
-
-
-/**
- * Set the padding (`[top, right, bottom, left]`).
- *
- * @param {!Array.<number>} padding Padding.
- * @api
- */
-ol.style.Text.prototype.setPadding = function(padding) {
-  this.padding_ = padding;
-};
-
-// FIXME http://earth.google.com/kml/1.0 namespace?
-// FIXME why does node.getAttribute return an unknown type?
-// FIXME serialize arbitrary feature properties
-// FIXME don't parse style if extractStyles is false
-
-goog.provide('ol.format.KML');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.color');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Icon');
-goog.require('ol.style.IconAnchorUnits');
-goog.require('ol.style.IconOrigin');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Style');
-goog.require('ol.style.Text');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the KML format.
- *
- * Note that the KML format uses the URL() constructor. Older browsers such as IE
- * which do not support this will need a URL polyfill to be loaded before use.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.KMLOptions=} opt_options Options.
- * @api
- */
-ol.format.KML = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.XMLFeature.call(this);
-
-  if (!ol.format.KML.DEFAULT_STYLE_ARRAY_) {
-    ol.format.KML.createStyleDefaults_();
-  }
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Style>}
-   */
-  this.defaultStyle_ = options.defaultStyle ?
-    options.defaultStyle : ol.format.KML.DEFAULT_STYLE_ARRAY_;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.extractStyles_ = options.extractStyles !== undefined ?
-    options.extractStyles : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.writeStyles_ = options.writeStyles !== undefined ?
-    options.writeStyles : true;
-
-  /**
-   * @private
-   * @type {Object.<string, (Array.<ol.style.Style>|string)>}
-   */
-  this.sharedStyles_ = {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.showPointNames_ = options.showPointNames !== undefined ?
-    options.showPointNames : true;
-
-};
-ol.inherits(ol.format.KML, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.KML.GX_NAMESPACE_URIS_ = [
-  'http://www.google.com/kml/ext/2.2'
-];
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.KML.NAMESPACE_URIS_ = [
-  null,
-  'http://earth.google.com/kml/2.0',
-  'http://earth.google.com/kml/2.1',
-  'http://earth.google.com/kml/2.2',
-  'http://www.opengis.net/kml/2.2'
-];
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.KML.SCHEMA_LOCATION_ = 'http://www.opengis.net/kml/2.2 ' +
-    'https://developers.google.com/kml/schema/kml22gx.xsd';
-
-
-/**
- * @return {Array.<ol.style.Style>} Default style.
- * @private
- */
-ol.format.KML.createStyleDefaults_ = function() {
-  /**
-   * @const
-   * @type {ol.Color}
-   * @private
-   */
-  ol.format.KML.DEFAULT_COLOR_ = [255, 255, 255, 1];
-
-  /**
-   * @const
-   * @type {ol.style.Fill}
-   * @private
-   */
-  ol.format.KML.DEFAULT_FILL_STYLE_ = new ol.style.Fill({
-    color: ol.format.KML.DEFAULT_COLOR_
-  });
-
-  /**
-   * @const
-   * @type {ol.Size}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_ = [20, 2]; // FIXME maybe [8, 32] ?
-
-  /**
-   * @const
-   * @type {ol.style.IconAnchorUnits}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_ =
-      ol.style.IconAnchorUnits.PIXELS;
-
-  /**
-   * @const
-   * @type {ol.style.IconAnchorUnits}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_ =
-      ol.style.IconAnchorUnits.PIXELS;
-
-  /**
-   * @const
-   * @type {ol.Size}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_ = [64, 64];
-
-  /**
-   * @const
-   * @type {string}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_ =
-      'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';
-
-  /**
-   * @const
-   * @type {number}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_ = 0.5;
-
-  /**
-   * @const
-   * @type {ol.style.Image}
-   * @private
-   */
-  ol.format.KML.DEFAULT_IMAGE_STYLE_ = new ol.style.Icon({
-    anchor: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_,
-    anchorOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
-    anchorXUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_,
-    anchorYUnits: ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_,
-    crossOrigin: 'anonymous',
-    rotation: 0,
-    scale: ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_,
-    size: ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_,
-    src: ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_
-  });
-
-  /**
-   * @const
-   * @type {string}
-   * @private
-   */
-  ol.format.KML.DEFAULT_NO_IMAGE_STYLE_ = 'NO_IMAGE';
-
-  /**
-   * @const
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STROKE_STYLE_ = new ol.style.Stroke({
-    color: ol.format.KML.DEFAULT_COLOR_,
-    width: 1
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_ = new ol.style.Stroke({
-    color: [51, 51, 51, 1],
-    width: 2
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Text}
-   * @private
-   */
-  ol.format.KML.DEFAULT_TEXT_STYLE_ = new ol.style.Text({
-    font: 'bold 16px Helvetica',
-    fill: ol.format.KML.DEFAULT_FILL_STYLE_,
-    stroke: ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_,
-    scale: 0.8
-  });
-
-  /**
-   * @const
-   * @type {ol.style.Style}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STYLE_ = new ol.style.Style({
-    fill: ol.format.KML.DEFAULT_FILL_STYLE_,
-    image: ol.format.KML.DEFAULT_IMAGE_STYLE_,
-    text: ol.format.KML.DEFAULT_TEXT_STYLE_,
-    stroke: ol.format.KML.DEFAULT_STROKE_STYLE_,
-    zIndex: 0
-  });
-
-  /**
-   * @const
-   * @type {Array.<ol.style.Style>}
-   * @private
-   */
-  ol.format.KML.DEFAULT_STYLE_ARRAY_ = [ol.format.KML.DEFAULT_STYLE_];
-
-  return ol.format.KML.DEFAULT_STYLE_ARRAY_;
-};
-
-
-/**
- * @const
- * @type {Object.<string, ol.style.IconAnchorUnits>}
- * @private
- */
-ol.format.KML.ICON_ANCHOR_UNITS_MAP_ = {
-  'fraction': ol.style.IconAnchorUnits.FRACTION,
-  'pixels': ol.style.IconAnchorUnits.PIXELS,
-  'insetPixels': ol.style.IconAnchorUnits.PIXELS
-};
-
-
-/**
- * @param {ol.style.Style|undefined} foundStyle Style.
- * @param {string} name Name.
- * @return {ol.style.Style} style Style.
- * @private
- */
-ol.format.KML.createNameStyleFunction_ = function(foundStyle, name) {
-  var textStyle = null;
-  var textOffset = [0, 0];
-  var textAlign = 'start';
-  if (foundStyle.getImage()) {
-    var imageSize = foundStyle.getImage().getImageSize();
-    if (imageSize === null) {
-      imageSize = ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_;
-    }
-    if (imageSize.length == 2) {
-      var imageScale = foundStyle.getImage().getScale();
-      // Offset the label to be centered to the right of the icon, if there is
-      // one.
-      textOffset[0] = imageScale * imageSize[0] / 2;
-      textOffset[1] = -imageScale * imageSize[1] / 2;
-      textAlign = 'left';
-    }
-  }
-  if (foundStyle.getText() !== null) {
-    // clone the text style, customizing it with name, alignments and offset.
-    // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).
-    var foundText = foundStyle.getText();
-    textStyle = foundText.clone();
-    textStyle.setFont(foundText.getFont() || ol.format.KML.DEFAULT_TEXT_STYLE_.getFont());
-    textStyle.setScale(foundText.getScale() || ol.format.KML.DEFAULT_TEXT_STYLE_.getScale());
-    textStyle.setFill(foundText.getFill() || ol.format.KML.DEFAULT_TEXT_STYLE_.getFill());
-    textStyle.setStroke(foundText.getStroke() || ol.format.KML.DEFAULT_TEXT_STROKE_STYLE_);
-  } else {
-    textStyle = ol.format.KML.DEFAULT_TEXT_STYLE_.clone();
-  }
-  textStyle.setText(name);
-  textStyle.setOffsetX(textOffset[0]);
-  textStyle.setOffsetY(textOffset[1]);
-  textStyle.setTextAlign(textAlign);
-
-  var nameStyle = new ol.style.Style({
-    text: textStyle
-  });
-  return nameStyle;
-};
-
-
-/**
- * @param {Array.<ol.style.Style>|undefined} style Style.
- * @param {string} styleUrl Style URL.
- * @param {Array.<ol.style.Style>} defaultStyle Default style.
- * @param {Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles Shared
- *          styles.
- * @param {boolean|undefined} showPointNames true to show names for point
- *          placemarks.
- * @return {ol.FeatureStyleFunction} Feature style function.
- * @private
- */
-ol.format.KML.createFeatureStyleFunction_ = function(style, styleUrl,
-    defaultStyle, sharedStyles, showPointNames) {
-
-  return (
-  /**
-       * @param {number} resolution Resolution.
-       * @return {Array.<ol.style.Style>} Style.
-       * @this {ol.Feature}
-       */
-    function(resolution) {
-      var drawName = showPointNames;
-      /** @type {ol.style.Style|undefined} */
-      var nameStyle;
-      var name = '';
-      if (drawName) {
-        if (this.getGeometry()) {
-          drawName = (this.getGeometry().getType() ===
-                        ol.geom.GeometryType.POINT);
-        }
-      }
-
-      if (drawName) {
-        name = /** @type {string} */ (this.get('name'));
-        drawName = drawName && name;
-      }
-
-      if (style) {
-        if (drawName) {
-          nameStyle = ol.format.KML.createNameStyleFunction_(style[0],
-              name);
-          return style.concat(nameStyle);
-        }
-        return style;
-      }
-      if (styleUrl) {
-        var foundStyle = ol.format.KML.findStyle_(styleUrl, defaultStyle,
-            sharedStyles);
-        if (drawName) {
-          nameStyle = ol.format.KML.createNameStyleFunction_(foundStyle[0],
-              name);
-          return foundStyle.concat(nameStyle);
-        }
-        return foundStyle;
-      }
-      if (drawName) {
-        nameStyle = ol.format.KML.createNameStyleFunction_(defaultStyle[0],
-            name);
-        return defaultStyle.concat(nameStyle);
-      }
-      return defaultStyle;
-    });
-};
-
-
-/**
- * @param {Array.<ol.style.Style>|string|undefined} styleValue Style value.
- * @param {Array.<ol.style.Style>} defaultStyle Default style.
- * @param {Object.<string, (Array.<ol.style.Style>|string)>} sharedStyles
- * Shared styles.
- * @return {Array.<ol.style.Style>} Style.
- * @private
- */
-ol.format.KML.findStyle_ = function(styleValue, defaultStyle, sharedStyles) {
-  if (Array.isArray(styleValue)) {
-    return styleValue;
-  } else if (typeof styleValue === 'string') {
-    // KML files in the wild occasionally forget the leading `#` on styleUrls
-    // defined in the same document.  Add a leading `#` if it enables to find
-    // a style.
-    if (!(styleValue in sharedStyles) && ('#' + styleValue in sharedStyles)) {
-      styleValue = '#' + styleValue;
-    }
-    return ol.format.KML.findStyle_(
-        sharedStyles[styleValue], defaultStyle, sharedStyles);
-  } else {
-    return defaultStyle;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {ol.Color|undefined} Color.
- */
-ol.format.KML.readColor_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  // The KML specification states that colors should not include a leading `#`
-  // but we tolerate them.
-  var m = /^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(s);
-  if (m) {
-    var hexColor = m[1];
-    return [
-      parseInt(hexColor.substr(6, 2), 16),
-      parseInt(hexColor.substr(4, 2), 16),
-      parseInt(hexColor.substr(2, 2), 16),
-      parseInt(hexColor.substr(0, 2), 16) / 255
-    ];
-
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {Array.<number>|undefined} Flat coordinates.
- */
-ol.format.KML.readFlatCoordinates_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false);
-  var flatCoordinates = [];
-  // The KML specification states that coordinate tuples should not include
-  // spaces, but we tolerate them.
-  var re =
-      /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;
-  var m;
-  while ((m = re.exec(s))) {
-    var x = parseFloat(m[1]);
-    var y = parseFloat(m[2]);
-    var z = m[3] ? parseFloat(m[3]) : 0;
-    flatCoordinates.push(x, y, z);
-    s = s.substr(m[0].length);
-  }
-  if (s !== '') {
-    return undefined;
-  }
-  return flatCoordinates;
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {string} URI.
- */
-ol.format.KML.readURI_ = function(node) {
-  var s = ol.xml.getAllTextContent(node, false).trim();
-  var baseURI = node.baseURI;
-  if (!baseURI || baseURI == 'about:blank') {
-    baseURI = window.location.href;
-  }
-  if (baseURI) {
-    var url = new URL(s, baseURI);
-    return url.href;
-  } else {
-    return s;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {ol.KMLVec2_} Vec2.
- */
-ol.format.KML.readVec2_ = function(node) {
-  var xunits = node.getAttribute('xunits');
-  var yunits = node.getAttribute('yunits');
-  var origin;
-  if (xunits !== 'insetPixels') {
-    if (yunits !== 'insetPixels') {
-      origin = ol.style.IconOrigin.BOTTOM_LEFT;
-    } else {
-      origin = ol.style.IconOrigin.TOP_LEFT;
-    }
-  } else {
-    if (yunits !== 'insetPixels') {
-      origin = ol.style.IconOrigin.BOTTOM_RIGHT;
-    } else {
-      origin = ol.style.IconOrigin.TOP_RIGHT;
-    }
-  }
-  return {
-    x: parseFloat(node.getAttribute('x')),
-    xunits: ol.format.KML.ICON_ANCHOR_UNITS_MAP_[xunits],
-    y: parseFloat(node.getAttribute('y')),
-    yunits: ol.format.KML.ICON_ANCHOR_UNITS_MAP_[yunits],
-    origin: origin
-  };
-};
-
-
-/**
- * @param {Node} node Node.
- * @private
- * @return {number|undefined} Scale.
- */
-ol.format.KML.readScale_ = function(node) {
-  return ol.format.XSD.readDecimal(node);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.style.Style>|string|undefined} StyleMap.
- */
-ol.format.KML.readStyleMapValue_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.STYLE_MAP_PARSERS_, node, objectStack);
-};
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.IconStyleParser_ = function(node, objectStack) {
-  // FIXME refreshMode
-  // FIXME refreshInterval
-  // FIXME viewRefreshTime
-  // FIXME viewBoundScale
-  // FIXME viewFormat
-  // FIXME httpQuery
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.ICON_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var IconObject = 'Icon' in object ? object['Icon'] : {};
-  var drawIcon = (!('Icon' in object) || Object.keys(IconObject).length > 0);
-  var src;
-  var href = /** @type {string|undefined} */
-      (IconObject['href']);
-  if (href) {
-    src = href;
-  } else if (drawIcon) {
-    src = ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_;
-  }
-  var anchor, anchorXUnits, anchorYUnits;
-  var anchorOrigin = ol.style.IconOrigin.BOTTOM_LEFT;
-  var hotSpot = /** @type {ol.KMLVec2_|undefined} */
-      (object['hotSpot']);
-  if (hotSpot) {
-    anchor = [hotSpot.x, hotSpot.y];
-    anchorXUnits = hotSpot.xunits;
-    anchorYUnits = hotSpot.yunits;
-    anchorOrigin = hotSpot.origin;
-  } else if (src === ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_) {
-    anchor = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_;
-    anchorXUnits = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS_;
-    anchorYUnits = ol.format.KML.DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS_;
-  } else if (/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(src)) {
-    anchor = [0.5, 0];
-    anchorXUnits = ol.style.IconAnchorUnits.FRACTION;
-    anchorYUnits = ol.style.IconAnchorUnits.FRACTION;
-  }
-
-  var offset;
-  var x = /** @type {number|undefined} */
-      (IconObject['x']);
-  var y = /** @type {number|undefined} */
-      (IconObject['y']);
-  if (x !== undefined && y !== undefined) {
-    offset = [x, y];
-  }
-
-  var size;
-  var w = /** @type {number|undefined} */
-      (IconObject['w']);
-  var h = /** @type {number|undefined} */
-      (IconObject['h']);
-  if (w !== undefined && h !== undefined) {
-    size = [w, h];
-  }
-
-  var rotation;
-  var heading = /** @type {number} */
-      (object['heading']);
-  if (heading !== undefined) {
-    rotation = ol.math.toRadians(heading);
-  }
-
-  var scale = /** @type {number|undefined} */
-      (object['scale']);
-
-  if (drawIcon) {
-    if (src == ol.format.KML.DEFAULT_IMAGE_STYLE_SRC_) {
-      size = ol.format.KML.DEFAULT_IMAGE_STYLE_SIZE_;
-      if (scale === undefined) {
-        scale = ol.format.KML.DEFAULT_IMAGE_SCALE_MULTIPLIER_;
-      }
-    }
-
-    var imageStyle = new ol.style.Icon({
-      anchor: anchor,
-      anchorOrigin: anchorOrigin,
-      anchorXUnits: anchorXUnits,
-      anchorYUnits: anchorYUnits,
-      crossOrigin: 'anonymous', // FIXME should this be configurable?
-      offset: offset,
-      offsetOrigin: ol.style.IconOrigin.BOTTOM_LEFT,
-      rotation: rotation,
-      scale: scale,
-      size: size,
-      src: src
-    });
-    styleObject['imageStyle'] = imageStyle;
-  } else {
-    // handle the case when we explicitly want to draw no icon.
-    styleObject['imageStyle'] = ol.format.KML.DEFAULT_NO_IMAGE_STYLE_;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LabelStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.LABEL_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var textStyle = new ol.style.Text({
-    fill: new ol.style.Fill({
-      color: /** @type {ol.Color} */
-          ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_)
-    }),
-    scale: /** @type {number|undefined} */
-        (object['scale'])
-  });
-  styleObject['textStyle'] = textStyle;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LineStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  // FIXME gx:outerColor
-  // FIXME gx:outerWidth
-  // FIXME gx:physicalWidth
-  // FIXME gx:labelVisibility
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.LINE_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var strokeStyle = new ol.style.Stroke({
-    color: /** @type {ol.Color} */
-        ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_),
-    width: /** @type {number} */ ('width' in object ? object['width'] : 1)
-  });
-  styleObject['strokeStyle'] = strokeStyle;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PolyStyleParser_ = function(node, objectStack) {
-  // FIXME colorMode
-  var object = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.POLY_STYLE_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var styleObject = objectStack[objectStack.length - 1];
-  var fillStyle = new ol.style.Fill({
-    color: /** @type {ol.Color} */
-        ('color' in object ? object['color'] : ol.format.KML.DEFAULT_COLOR_)
-  });
-  styleObject['fillStyle'] = fillStyle;
-  var fill = /** @type {boolean|undefined} */ (object['fill']);
-  if (fill !== undefined) {
-    styleObject['fill'] = fill;
-  }
-  var outline =
-      /** @type {boolean|undefined} */ (object['outline']);
-  if (outline !== undefined) {
-    styleObject['outline'] = outline;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} LinearRing flat coordinates.
- */
-ol.format.KML.readFlatLinearRing_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      ol.format.KML.FLAT_LINEAR_RING_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.gxCoordParser_ = function(node, objectStack) {
-  var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
-      (objectStack[objectStack.length - 1]);
-  var flatCoordinates = gxTrackObject.flatCoordinates;
-  var s = ol.xml.getAllTextContent(node, false);
-  var re =
-      /^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i;
-  var m = re.exec(s);
-  if (m) {
-    var x = parseFloat(m[1]);
-    var y = parseFloat(m[2]);
-    var z = parseFloat(m[3]);
-    flatCoordinates.push(x, y, z, 0);
-  } else {
-    flatCoordinates.push(0, 0, 0, 0);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.MultiLineString|undefined} MultiLineString.
- */
-ol.format.KML.readGxMultiTrack_ = function(node, objectStack) {
-  var lineStrings = ol.xml.pushParseAndPop([],
-      ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_, node, objectStack);
-  if (!lineStrings) {
-    return undefined;
-  }
-  var multiLineString = new ol.geom.MultiLineString(null);
-  multiLineString.setLineStrings(lineStrings);
-  return multiLineString;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.KML.readGxTrack_ = function(node, objectStack) {
-  var gxTrackObject = ol.xml.pushParseAndPop(
-      /** @type {ol.KMLGxTrackObject_} */ ({
-        flatCoordinates: [],
-        whens: []
-      }), ol.format.KML.GX_TRACK_PARSERS_, node, objectStack);
-  if (!gxTrackObject) {
-    return undefined;
-  }
-  var flatCoordinates = gxTrackObject.flatCoordinates;
-  var whens = gxTrackObject.whens;
-  var i, ii;
-  for (i = 0, ii = Math.min(flatCoordinates.length, whens.length); i < ii;
-    ++i) {
-    flatCoordinates[4 * i + 3] = whens[i];
-  }
-  var lineString = new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZM, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object} Icon object.
- */
-ol.format.KML.readIcon_ = function(node, objectStack) {
-  var iconObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.ICON_PARSERS_, node, objectStack);
-  if (iconObject) {
-    return iconObject;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<number>} Flat coordinates.
- */
-ol.format.KML.readFlatCoordinatesFromNode_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(null,
-      ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.LineString|undefined} LineString.
- */
-ol.format.KML.readLineString_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var lineString = new ol.geom.LineString(null);
-    lineString.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    lineString.setProperties(properties);
-    return lineString;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.KML.readLinearRing_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var polygon = new ol.geom.Polygon(null);
-    polygon.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates,
-        [flatCoordinates.length]);
-    polygon.setProperties(properties);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Geometry} Geometry.
- */
-ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
-  var geometries = ol.xml.pushParseAndPop([],
-      ol.format.KML.MULTI_GEOMETRY_PARSERS_, node, objectStack);
-  if (!geometries) {
-    return null;
-  }
-  if (geometries.length === 0) {
-    return new ol.geom.GeometryCollection(geometries);
-  }
-  /** @type {ol.geom.Geometry} */
-  var multiGeometry;
-  var homogeneous = true;
-  var type = geometries[0].getType();
-  var geometry, i, ii;
-  for (i = 1, ii = geometries.length; i < ii; ++i) {
-    geometry = geometries[i];
-    if (geometry.getType() != type) {
-      homogeneous = false;
-      break;
-    }
-  }
-  if (homogeneous) {
-    var layout;
-    var flatCoordinates;
-    if (type == ol.geom.GeometryType.POINT) {
-      var point = geometries[0];
-      layout = point.getLayout();
-      flatCoordinates = point.getFlatCoordinates();
-      for (i = 1, ii = geometries.length; i < ii; ++i) {
-        geometry = geometries[i];
-        ol.array.extend(flatCoordinates, geometry.getFlatCoordinates());
-      }
-      multiGeometry = new ol.geom.MultiPoint(null);
-      multiGeometry.setFlatCoordinates(layout, flatCoordinates);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.LINE_STRING) {
-      multiGeometry = new ol.geom.MultiLineString(null);
-      multiGeometry.setLineStrings(geometries);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.POLYGON) {
-      multiGeometry = new ol.geom.MultiPolygon(null);
-      multiGeometry.setPolygons(geometries);
-      ol.format.KML.setCommonGeometryProperties_(multiGeometry, geometries);
-    } else if (type == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-      multiGeometry = new ol.geom.GeometryCollection(geometries);
-    } else {
-      ol.asserts.assert(false, 37); // Unknown geometry type found
-    }
-  } else {
-    multiGeometry = new ol.geom.GeometryCollection(geometries);
-  }
-  return /** @type {ol.geom.Geometry} */ (multiGeometry);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Point|undefined} Point.
- */
-ol.format.KML.readPoint_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop({},
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatCoordinates =
-      ol.format.KML.readFlatCoordinatesFromNode_(node, objectStack);
-  if (flatCoordinates) {
-    var point = new ol.geom.Point(null);
-    point.setFlatCoordinates(ol.geom.GeometryLayout.XYZ, flatCoordinates);
-    point.setProperties(properties);
-    return point;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.geom.Polygon|undefined} Polygon.
- */
-ol.format.KML.readPolygon_ = function(node, objectStack) {
-  var properties = ol.xml.pushParseAndPop(/** @type {Object<string,*>} */ ({}),
-      ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_, node,
-      objectStack);
-  var flatLinearRings = ol.xml.pushParseAndPop([null],
-      ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack);
-  if (flatLinearRings && flatLinearRings[0]) {
-    var polygon = new ol.geom.Polygon(null);
-    var flatCoordinates = flatLinearRings[0];
-    var ends = [flatCoordinates.length];
-    var i, ii;
-    for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
-      ol.array.extend(flatCoordinates, flatLinearRings[i]);
-      ends.push(flatCoordinates.length);
-    }
-    polygon.setFlatCoordinates(
-        ol.geom.GeometryLayout.XYZ, flatCoordinates, ends);
-    polygon.setProperties(properties);
-    return polygon;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.style.Style>} Style.
- */
-ol.format.KML.readStyle_ = function(node, objectStack) {
-  var styleObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.STYLE_PARSERS_, node, objectStack);
-  if (!styleObject) {
-    return null;
-  }
-  var fillStyle = /** @type {ol.style.Fill} */
-      ('fillStyle' in styleObject ?
-        styleObject['fillStyle'] : ol.format.KML.DEFAULT_FILL_STYLE_);
-  var fill = /** @type {boolean|undefined} */ (styleObject['fill']);
-  if (fill !== undefined && !fill) {
-    fillStyle = null;
-  }
-  var imageStyle = /** @type {ol.style.Image} */
-      ('imageStyle' in styleObject ?
-        styleObject['imageStyle'] : ol.format.KML.DEFAULT_IMAGE_STYLE_);
-  if (imageStyle == ol.format.KML.DEFAULT_NO_IMAGE_STYLE_) {
-    imageStyle = undefined;
-  }
-  var textStyle = /** @type {ol.style.Text} */
-      ('textStyle' in styleObject ?
-        styleObject['textStyle'] : ol.format.KML.DEFAULT_TEXT_STYLE_);
-  var strokeStyle = /** @type {ol.style.Stroke} */
-      ('strokeStyle' in styleObject ?
-        styleObject['strokeStyle'] : ol.format.KML.DEFAULT_STROKE_STYLE_);
-  var outline = /** @type {boolean|undefined} */
-      (styleObject['outline']);
-  if (outline !== undefined && !outline) {
-    strokeStyle = null;
-  }
-  return [new ol.style.Style({
-    fill: fillStyle,
-    image: imageStyle,
-    stroke: strokeStyle,
-    text: textStyle,
-    zIndex: undefined // FIXME
-  })];
-};
-
-
-/**
- * Reads an array of geometries and creates arrays for common geometry
- * properties. Then sets them to the multi geometry.
- * @param {ol.geom.MultiPoint|ol.geom.MultiLineString|ol.geom.MultiPolygon}
- *     multiGeometry A multi-geometry.
- * @param {Array.<ol.geom.Geometry>} geometries List of geometries.
- * @private
- */
-ol.format.KML.setCommonGeometryProperties_ = function(multiGeometry,
-    geometries) {
-  var ii = geometries.length;
-  var extrudes = new Array(geometries.length);
-  var tessellates = new Array(geometries.length);
-  var altitudeModes = new Array(geometries.length);
-  var geometry, i, hasExtrude, hasTessellate, hasAltitudeMode;
-  hasExtrude = hasTessellate = hasAltitudeMode = false;
-  for (i = 0; i < ii; ++i) {
-    geometry = geometries[i];
-    extrudes[i] = geometry.get('extrude');
-    tessellates[i] = geometry.get('tessellate');
-    altitudeModes[i] = geometry.get('altitudeMode');
-    hasExtrude = hasExtrude || extrudes[i] !== undefined;
-    hasTessellate = hasTessellate || tessellates[i] !== undefined;
-    hasAltitudeMode = hasAltitudeMode || altitudeModes[i];
-  }
-  if (hasExtrude) {
-    multiGeometry.set('extrude', extrudes);
-  }
-  if (hasTessellate) {
-    multiGeometry.set('tessellate', tessellates);
-  }
-  if (hasAltitudeMode) {
-    multiGeometry.set('altitudeMode', altitudeModes);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.DataParser_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  ol.xml.parseNode(ol.format.KML.DATA_PARSERS_, node, objectStack);
-  var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  if (name !== null) {
-    featureObject[name] = featureObject.value;
-  } else if (featureObject.displayName !== null) {
-    featureObject[featureObject.displayName] = featureObject.value;
-  }
-  delete featureObject['value'];
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.ExtendedDataParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.EXTENDED_DATA_PARSERS_, node, objectStack);
-};
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.RegionParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.REGION_PARSERS_, node, objectStack);
-};
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PairDataParser_ = function(node, objectStack) {
-  var pairObject = ol.xml.pushParseAndPop(
-      {}, ol.format.KML.PAIR_PARSERS_, node, objectStack);
-  if (!pairObject) {
-    return;
-  }
-  var key = /** @type {string|undefined} */
-      (pairObject['key']);
-  if (key && key == 'normal') {
-    var styleUrl = /** @type {string|undefined} */
-        (pairObject['styleUrl']);
-    if (styleUrl) {
-      objectStack[objectStack.length - 1] = styleUrl;
-    }
-    var Style = /** @type {ol.style.Style} */
-        (pairObject['Style']);
-    if (Style) {
-      objectStack[objectStack.length - 1] = Style;
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.PlacemarkStyleMapParser_ = function(node, objectStack) {
-  var styleMapValue = ol.format.KML.readStyleMapValue_(node, objectStack);
-  if (!styleMapValue) {
-    return;
-  }
-  var placemarkObject = objectStack[objectStack.length - 1];
-  if (Array.isArray(styleMapValue)) {
-    placemarkObject['Style'] = styleMapValue;
-  } else if (typeof styleMapValue === 'string') {
-    placemarkObject['styleUrl'] = styleMapValue;
-  } else {
-    ol.asserts.assert(false, 38); // `styleMapValue` has an unknown type
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.SchemaDataParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.SCHEMA_DATA_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.SimpleDataParser_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  if (name !== null) {
-    var data = ol.format.XSD.readString(node);
-    var featureObject =
-        /** @type {Object} */ (objectStack[objectStack.length - 1]);
-    featureObject[name] = data;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LatLonAltBoxParser_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({}, ol.format.KML.LAT_LON_ALT_BOX_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var extent = [
-    parseFloat(object['west']),
-    parseFloat(object['south']),
-    parseFloat(object['east']),
-    parseFloat(object['north'])
-  ];
-  regionObject['extent'] = extent;
-  regionObject['altitudeMode'] = object['altitudeMode'];
-  regionObject['minAltitude'] = parseFloat(object['minAltitude']);
-  regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LodParser_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({}, ol.format.KML.LOD_PARSERS_, node, objectStack);
-  if (!object) {
-    return;
-  }
-  var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);
-  lodObject['maxLodPixels'] = parseFloat(object['maxLodPixels']);
-  lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);
-  lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.innerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.INNER_BOUNDARY_IS_PARSERS_, node, objectStack);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings.push(flatLinearRing);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.outerBoundaryIsParser_ = function(node, objectStack) {
-  /** @type {Array.<number>|undefined} */
-  var flatLinearRing = ol.xml.pushParseAndPop(undefined,
-      ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_, node, objectStack);
-  if (flatLinearRing) {
-    var flatLinearRings = /** @type {Array.<Array.<number>>} */
-        (objectStack[objectStack.length - 1]);
-    flatLinearRings[0] = flatLinearRing;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.LinkParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.KML.LINK_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.whenParser_ = function(node, objectStack) {
-  var gxTrackObject = /** @type {ol.KMLGxTrackObject_} */
-      (objectStack[objectStack.length - 1]);
-  var whens = gxTrackObject.whens;
-  var s = ol.xml.getAllTextContent(node, false);
-  var when = Date.parse(s);
-  whens.push(isNaN(when) ? 0 : when);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'displayName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'value': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.EXTENDED_DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Data': ol.format.KML.DataParser_,
-      'SchemaData': ol.format.KML.SchemaDataParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.REGION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LatLonAltBox': ol.format.KML.LatLonAltBoxParser_,
-      'Lod': ol.format.KML.LodParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LAT_LON_ALT_BOX_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'altitudeMode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'minAltitude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxAltitude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'north': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'south': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'east': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'west': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LOD_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'minLodPixels': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxLodPixels': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'minFadeExtent': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'maxFadeExtent': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.EXTRUDE_AND_ALTITUDE_MODE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'extrude': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'tessellate': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'altitudeMode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.FLAT_LINEAR_RING_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'coordinates': ol.xml.makeReplacer(ol.format.KML.readFlatCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.FLAT_LINEAR_RINGS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'innerBoundaryIs': ol.format.KML.innerBoundaryIsParser_,
-      'outerBoundaryIs': ol.format.KML.outerBoundaryIsParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GX_TRACK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'when': ol.format.KML.whenParser_
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'coord': ol.format.KML.gxCoordParser_
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GEOMETRY_FLAT_COORDINATES_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'coordinates': ol.xml.makeReplacer(ol.format.KML.readFlatCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.ICON_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'x': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'y': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'w': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-          'h': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Icon': ol.xml.makeObjectPropertySetter(ol.format.KML.readIcon_),
-      'heading': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal),
-      'hotSpot': ol.xml.makeObjectPropertySetter(ol.format.KML.readVec2_),
-      'scale': ol.xml.makeObjectPropertySetter(ol.format.KML.readScale_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.INNER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeReplacer(ol.format.KML.readFlatLinearRing_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'scale': ol.xml.makeObjectPropertySetter(ol.format.KML.readScale_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'width': ol.xml.makeObjectPropertySetter(ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.MULTI_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LineString': ol.xml.makeArrayPusher(ol.format.KML.readLineString_),
-      'LinearRing': ol.xml.makeArrayPusher(ol.format.KML.readLinearRing_),
-      'MultiGeometry': ol.xml.makeArrayPusher(ol.format.KML.readMultiGeometry_),
-      'Point': ol.xml.makeArrayPusher(ol.format.KML.readPoint_),
-      'Polygon': ol.xml.makeArrayPusher(ol.format.KML.readPolygon_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.GX_MULTITRACK_GEOMETRY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.GX_NAMESPACE_URIS_, {
-      'Track': ol.xml.makeArrayPusher(ol.format.KML.readGxTrack_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.NETWORK_LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.format.KML.ExtendedDataParser_,
-      'Region': ol.format.KML.RegionParser_,
-      'Link': ol.format.KML.LinkParser_,
-      'address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'description': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'open': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'phoneNumber': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'visibility': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.LINK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.OUTER_BOUNDARY_IS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeReplacer(ol.format.KML.readFlatLinearRing_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.PAIR_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Style': ol.xml.makeObjectPropertySetter(ol.format.KML.readStyle_),
-      'key': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'styleUrl': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.PLACEMARK_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.format.KML.ExtendedDataParser_,
-      'Region': ol.format.KML.RegionParser_,
-      'MultiGeometry': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readMultiGeometry_, 'geometry'),
-      'LineString': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readLineString_, 'geometry'),
-      'LinearRing': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readLinearRing_, 'geometry'),
-      'Point': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readPoint_, 'geometry'),
-      'Polygon': ol.xml.makeObjectPropertySetter(
-          ol.format.KML.readPolygon_, 'geometry'),
-      'Style': ol.xml.makeObjectPropertySetter(ol.format.KML.readStyle_),
-      'StyleMap': ol.format.KML.PlacemarkStyleMapParser_,
-      'address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'description': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'open': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'phoneNumber': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'styleUrl': ol.xml.makeObjectPropertySetter(ol.format.KML.readURI_),
-      'visibility': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'MultiTrack': ol.xml.makeObjectPropertySetter(
-              ol.format.KML.readGxMultiTrack_, 'geometry'),
-          'Track': ol.xml.makeObjectPropertySetter(
-              ol.format.KML.readGxTrack_, 'geometry')
-        }
-    ));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.POLY_STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeObjectPropertySetter(ol.format.KML.readColor_),
-      'fill': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean),
-      'outline': ol.xml.makeObjectPropertySetter(ol.format.XSD.readBoolean)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.SCHEMA_DATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'SimpleData': ol.format.KML.SimpleDataParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'IconStyle': ol.format.KML.IconStyleParser_,
-      'LabelStyle': ol.format.KML.LabelStyleParser_,
-      'LineStyle': ol.format.KML.LineStyleParser_,
-      'PolyStyle': ol.format.KML.PolyStyleParser_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.KML.STYLE_MAP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Pair': ol.format.KML.PairDataParser_
-    });
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<ol.Feature>|undefined} Features.
- */
-ol.format.KML.prototype.readDocumentOrFolder_ = function(node, objectStack) {
-  // FIXME use scope somehow
-  var parsersNS = ol.xml.makeStructureNS(
-      ol.format.KML.NAMESPACE_URIS_, {
-        'Document': ol.xml.makeArrayExtender(this.readDocumentOrFolder_, this),
-        'Folder': ol.xml.makeArrayExtender(this.readDocumentOrFolder_, this),
-        'Placemark': ol.xml.makeArrayPusher(this.readPlacemark_, this),
-        'Style': this.readSharedStyle_.bind(this),
-        'StyleMap': this.readSharedStyleMap_.bind(this)
-      });
-  /** @type {Array.<ol.Feature>} */
-  var features = ol.xml.pushParseAndPop([], parsersNS, node, objectStack, this);
-  if (features) {
-    return features;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {ol.Feature|undefined} Feature.
- */
-ol.format.KML.prototype.readPlacemark_ = function(node, objectStack) {
-  var object = ol.xml.pushParseAndPop({'geometry': null},
-      ol.format.KML.PLACEMARK_PARSERS_, node, objectStack);
-  if (!object) {
-    return undefined;
-  }
-  var feature = new ol.Feature();
-  var id = node.getAttribute('id');
-  if (id !== null) {
-    feature.setId(id);
-  }
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-
-  var geometry = object['geometry'];
-  if (geometry) {
-    ol.format.Feature.transformWithOptions(geometry, false, options);
-  }
-  feature.setGeometry(geometry);
-  delete object['geometry'];
-
-  if (this.extractStyles_) {
-    var style = object['Style'];
-    var styleUrl = object['styleUrl'];
-    var styleFunction = ol.format.KML.createFeatureStyleFunction_(
-        style, styleUrl, this.defaultStyle_, this.sharedStyles_,
-        this.showPointNames_);
-    feature.setStyle(styleFunction);
-  }
-  delete object['Style'];
-  // we do not remove the styleUrl property from the object, so it
-  // gets stored on feature when setProperties is called
-
-  feature.setProperties(object);
-
-  return feature;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.prototype.readSharedStyle_ = function(node, objectStack) {
-  var id = node.getAttribute('id');
-  if (id !== null) {
-    var style = ol.format.KML.readStyle_(node, objectStack);
-    if (style) {
-      var styleUri;
-      var baseURI = node.baseURI;
-      if (!baseURI || baseURI == 'about:blank') {
-        baseURI = window.location.href;
-      }
-      if (baseURI) {
-        var url = new URL('#' + id, baseURI);
-        styleUri = url.href;
-      } else {
-        styleUri = '#' + id;
-      }
-      this.sharedStyles_[styleUri] = style;
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) {
-  var id = node.getAttribute('id');
-  if (id === null) {
-    return;
-  }
-  var styleMapValue = ol.format.KML.readStyleMapValue_(node, objectStack);
-  if (!styleMapValue) {
-    return;
-  }
-  var styleUri;
-  var baseURI = node.baseURI;
-  if (!baseURI || baseURI == 'about:blank') {
-    baseURI = window.location.href;
-  }
-  if (baseURI) {
-    var url = new URL('#' + id, baseURI);
-    styleUri = url.href;
-  } else {
-    styleUri = '#' + id;
-  }
-  this.sharedStyles_[styleUri] = styleMapValue;
-};
-
-
-/**
- * Read the first feature from a KML source. MultiGeometries are converted into
- * GeometryCollections if they are a mix of geometry types, and into MultiPoint/
- * MultiLineString/MultiPolygon if they are all of the same type.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.KML.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.KML.prototype.readFeatureFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
-    return null;
-  }
-  var feature = this.readPlacemark_(
-      node, [this.getReadOptions(node, opt_options)]);
-  if (feature) {
-    return feature;
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Read all features from a KML source. MultiGeometries are converted into
- * GeometryCollections if they are a mix of geometry types, and into MultiPoint/
- * MultiLineString/MultiPolygon if they are all of the same type.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.KML.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.KML.prototype.readFeaturesFromNode = function(node, opt_options) {
-  if (!ol.array.includes(ol.format.KML.NAMESPACE_URIS_, node.namespaceURI)) {
-    return [];
-  }
-  var features;
-  var localName = node.localName;
-  if (localName == 'Document' || localName == 'Folder') {
-    features = this.readDocumentOrFolder_(
-        node, [this.getReadOptions(node, opt_options)]);
-    if (features) {
-      return features;
-    } else {
-      return [];
-    }
-  } else if (localName == 'Placemark') {
-    var feature = this.readPlacemark_(
-        node, [this.getReadOptions(node, opt_options)]);
-    if (feature) {
-      return [feature];
-    } else {
-      return [];
-    }
-  } else if (localName == 'kml') {
-    features = [];
-    var n;
-    for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-      var fs = this.readFeaturesFromNode(n, opt_options);
-      if (fs) {
-        ol.array.extend(features, fs);
-      }
-    }
-    return features;
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Read the name of the KML.
- *
- * @param {Document|Node|string} source Souce.
- * @return {string|undefined} Name.
- * @api
- */
-ol.format.KML.prototype.readName = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readNameFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readNameFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readNameFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {string|undefined} Name.
- */
-ol.format.KML.prototype.readNameFromDocument = function(doc) {
-  var n;
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      var name = this.readNameFromNode(n);
-      if (name) {
-        return name;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {string|undefined} Name.
- */
-ol.format.KML.prototype.readNameFromNode = function(node) {
-  var n;
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'name') {
-      return ol.format.XSD.readString(n);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'Placemark' ||
-         localName == 'kml')) {
-      var name = this.readNameFromNode(n);
-      if (name) {
-        return name;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * Read the network links of the KML.
- *
- * @param {Document|Node|string} source Source.
- * @return {Array.<Object>} Network links.
- * @api
- */
-ol.format.KML.prototype.readNetworkLinks = function(source) {
-  var networkLinks = [];
-  if (ol.xml.isDocument(source)) {
-    ol.array.extend(networkLinks, this.readNetworkLinksFromDocument(
-        /** @type {Document} */ (source)));
-  } else if (ol.xml.isNode(source)) {
-    ol.array.extend(networkLinks, this.readNetworkLinksFromNode(
-        /** @type {Node} */ (source)));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    ol.array.extend(networkLinks, this.readNetworkLinksFromDocument(doc));
-  }
-  return networkLinks;
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {Array.<Object>} Network links.
- */
-ol.format.KML.prototype.readNetworkLinksFromDocument = function(doc) {
-  var n, networkLinks = [];
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(networkLinks, this.readNetworkLinksFromNode(n));
-    }
-  }
-  return networkLinks;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {Array.<Object>} Network links.
- */
-ol.format.KML.prototype.readNetworkLinksFromNode = function(node) {
-  var n, networkLinks = [];
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'NetworkLink') {
-      var obj = ol.xml.pushParseAndPop({}, ol.format.KML.NETWORK_LINK_PARSERS_,
-          n, []);
-      networkLinks.push(obj);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'kml')) {
-      ol.array.extend(networkLinks, this.readNetworkLinksFromNode(n));
-    }
-  }
-  return networkLinks;
-};
-
-
-/**
- * Read the regions of the KML.
- *
- * @param {Document|Node|string} source Source.
- * @return {Array.<Object>} Regions.
- * @api
- */
-ol.format.KML.prototype.readRegion = function(source) {
-  var regions = [];
-  if (ol.xml.isDocument(source)) {
-    ol.array.extend(regions, this.readRegionFromDocument(
-        /** @type {Document} */ (source)));
-  } else if (ol.xml.isNode(source)) {
-    ol.array.extend(regions, this.readRegionFromNode(
-        /** @type {Node} */ (source)));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    ol.array.extend(regions, this.readRegionFromDocument(doc));
-  }
-  return regions;
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {Array.<Object>} Region.
- */
-ol.format.KML.prototype.readRegionFromDocument = function(doc) {
-  var n, regions = [];
-  for (n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      ol.array.extend(regions, this.readRegionFromNode(n));
-    }
-  }
-  return regions;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {Array.<Object>} Region.
- * @api
- */
-ol.format.KML.prototype.readRegionFromNode = function(node) {
-  var n, regions = [];
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        n.localName == 'Region') {
-      var obj = ol.xml.pushParseAndPop({}, ol.format.KML.REGION_PARSERS_,
-          n, []);
-      regions.push(obj);
-    }
-  }
-  for (n = node.firstElementChild; n; n = n.nextElementSibling) {
-    var localName = n.localName;
-    if (ol.array.includes(ol.format.KML.NAMESPACE_URIS_, n.namespaceURI) &&
-        (localName == 'Document' ||
-         localName == 'Folder' ||
-         localName == 'kml')) {
-      ol.array.extend(regions, this.readRegionFromNode(n));
-    }
-  }
-  return regions;
-};
-
-
-/**
- * Read the projection from a KML source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.KML.prototype.readProjection;
-
-
-/**
- * @param {Node} node Node to append a TextNode with the color to.
- * @param {ol.Color|string} color Color.
- * @private
- */
-ol.format.KML.writeColorTextNode_ = function(node, color) {
-  var rgba = ol.color.asArray(color);
-  var opacity = (rgba.length == 4) ? rgba[3] : 1;
-  var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];
-  var i;
-  for (i = 0; i < 4; ++i) {
-    var hex = parseInt(abgr[i], 10).toString(16);
-    abgr[i] = (hex.length == 1) ? '0' + hex : hex;
-  }
-  ol.format.XSD.writeStringTextNode(node, abgr.join(''));
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the coordinates to.
- * @param {Array.<number>} coordinates Coordinates.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeCoordinatesTextNode_ = function(node, coordinates, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-
-  var layout = context['layout'];
-  var stride = context['stride'];
-
-  var dimension;
-  if (layout == ol.geom.GeometryLayout.XY ||
-      layout == ol.geom.GeometryLayout.XYM) {
-    dimension = 2;
-  } else if (layout == ol.geom.GeometryLayout.XYZ ||
-      layout == ol.geom.GeometryLayout.XYZM) {
-    dimension = 3;
-  } else {
-    ol.asserts.assert(false, 34); // Invalid geometry layout
-  }
-
-  var d, i;
-  var ii = coordinates.length;
-  var text = '';
-  if (ii > 0) {
-    text += coordinates[0];
-    for (d = 1; d < dimension; ++d) {
-      text += ',' + coordinates[d];
-    }
-    for (i = stride; i < ii; i += stride) {
-      text += ' ' + coordinates[i];
-      for (d = 1; d < dimension; ++d) {
-        text += ',' + coordinates[i + d];
-      }
-    }
-  }
-  ol.format.XSD.writeStringTextNode(node, text);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{name: *, value: *}} pair Name value pair.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeDataNode_ = function(node, pair, objectStack) {
-  node.setAttribute('name', pair.name);
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var value = pair.value;
-
-  if (typeof value == 'object') {
-    if (value !== null && value.displayName) {
-      ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-          ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);
-    }
-
-    if (value !== null && value.value) {
-      ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-          ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);
-    }
-  } else {
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-        ol.xml.OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);
-  }
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the name to.
- * @param {string} name DisplayName.
- * @private
- */
-ol.format.KML.writeDataNodeName_ = function(node, name) {
-  ol.format.XSD.writeCDATASection(node, name);
-};
-
-
-/**
- * @param {Node} node Node to append a CDATA Section with the value to.
- * @param {string} value Value.
- * @private
- */
-ol.format.KML.writeDataNodeValue_ = function(node, value) {
-  ol.format.XSD.writeStringTextNode(node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<ol.Feature>} features Features.
- * @param {Array.<*>} objectStack Object stack.
- * @this {ol.format.KML}
- * @private
- */
-ol.format.KML.writeDocument_ = function(node, features, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.DOCUMENT_SERIALIZERS_,
-      ol.format.KML.DOCUMENT_NODE_FACTORY_, features, objectStack, undefined,
-      this);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{names: Array<string>, values: (Array<*>)}} namesAndValues Names and values.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeExtendedData_ = function(node, namesAndValues, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var names = namesAndValues.names, values = namesAndValues.values;
-  var length = names.length;
-
-  for (var i = 0; i < length; i++) {
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_,
-        ol.format.KML.DATA_NODE_FACTORY_, [{name: names[i], value: values[i]}], objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Object} icon Icon object.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeIcon_ = function(node, icon, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.ICON_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(icon, orderedKeys);
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.ICON_SERIALIZERS_, ol.xml.OBJECT_PROPERTY_NODE_FACTORY,
-      values, objectStack, orderedKeys);
-  orderedKeys =
-      ol.format.KML.ICON_SEQUENCE_[ol.format.KML.GX_NAMESPACE_URIS_[0]];
-  values = ol.xml.makeSequence(icon, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.ICON_SERIALIZERS_,
-      ol.format.KML.GX_NODE_FACTORY_, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Icon} style Icon style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeIconStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var src = style.getSrc();
-  var size = style.getSize();
-  var iconImageSize = style.getImageSize();
-  var iconProperties = {
-    'href': src
-  };
-
-  if (size) {
-    iconProperties['w'] = size[0];
-    iconProperties['h'] = size[1];
-    var anchor = style.getAnchor(); // top-left
-    var origin = style.getOrigin(); // top-left
-
-    if (origin && iconImageSize && origin[0] !== 0 && origin[1] !== size[1]) {
-      iconProperties['x'] = origin[0];
-      iconProperties['y'] = iconImageSize[1] - (origin[1] + size[1]);
-    }
-
-    if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !== size[1] / 2)) {
-      var /** @type {ol.KMLVec2_} */ hotSpot = {
-        x: anchor[0],
-        xunits: ol.style.IconAnchorUnits.PIXELS,
-        y: size[1] - anchor[1],
-        yunits: ol.style.IconAnchorUnits.PIXELS
-      };
-      properties['hotSpot'] = hotSpot;
-    }
-  }
-
-  properties['Icon'] = iconProperties;
-
-  var scale = style.getScale();
-  if (scale !== 1) {
-    properties['scale'] = scale;
-  }
-
-  var rotation = style.getRotation();
-  if (rotation !== 0) {
-    properties['heading'] = rotation; // 0-360
-  }
-
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.ICON_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.ICON_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Text} style style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeLabelStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var fill = style.getFill();
-  if (fill) {
-    properties['color'] = fill.getColor();
-  }
-  var scale = style.getScale();
-  if (scale && scale !== 1) {
-    properties['scale'] = scale;
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys =
-      ol.format.KML.LABEL_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.LABEL_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Stroke} style style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeLineStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {
-    'color': style.getColor(),
-    'width': style.getWidth()
-  };
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.LINE_STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.LINE_STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeMultiGeometry_ = function(node, geometry, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {node: node};
-  var type = geometry.getType();
-  /** @type {Array.<ol.geom.Geometry>} */
-  var geometries;
-  /** @type {function(*, Array.<*>, string=): (Node|undefined)} */
-  var factory;
-  if (type == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-    geometries = /** @type {ol.geom.GeometryCollection} */ (geometry).getGeometries();
-    factory = ol.format.KML.GEOMETRY_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_POINT) {
-    geometries = /** @type {ol.geom.MultiPoint} */ (geometry).getPoints();
-    factory = ol.format.KML.POINT_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_LINE_STRING) {
-    geometries =
-        (/** @type {ol.geom.MultiLineString} */ (geometry)).getLineStrings();
-    factory = ol.format.KML.LINE_STRING_NODE_FACTORY_;
-  } else if (type == ol.geom.GeometryType.MULTI_POLYGON) {
-    geometries =
-        (/** @type {ol.geom.MultiPolygon} */ (geometry)).getPolygons();
-    factory = ol.format.KML.POLYGON_NODE_FACTORY_;
-  } else {
-    ol.asserts.assert(false, 39); // Unknown geometry type
-  }
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.MULTI_GEOMETRY_SERIALIZERS_, factory,
-      geometries, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.LinearRing} linearRing Linear ring.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeBoundaryIs_ = function(node, linearRing, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.BOUNDARY_IS_SERIALIZERS_,
-      ol.format.KML.LINEAR_RING_NODE_FACTORY_, [linearRing], objectStack);
-};
-
-
-/**
- * FIXME currently we do serialize arbitrary/custom feature properties
- * (ExtendedData).
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Object stack.
- * @this {ol.format.KML}
- * @private
- */
-ol.format.KML.writePlacemark_ = function(node, feature, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-
-  // set id
-  if (feature.getId()) {
-    node.setAttribute('id', feature.getId());
-  }
-
-  // serialize properties (properties unknown to KML are not serialized)
-  var properties = feature.getProperties();
-
-  // don't export these to ExtendedData
-  var filter = {'address': 1, 'description': 1, 'name': 1, 'open': 1,
-    'phoneNumber': 1, 'styleUrl': 1, 'visibility': 1};
-  filter[feature.getGeometryName()] = 1;
-  var keys = Object.keys(properties || {}).sort().filter(function(v) {
-    return !filter[v];
-  });
-
-  if (keys.length > 0) {
-    var sequence = ol.xml.makeSequence(properties, keys);
-    var namesAndValues = {names: keys, values: sequence};
-    ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-        ol.format.KML.EXTENDEDDATA_NODE_FACTORY_, [namesAndValues], objectStack);
-  }
-
-  var styleFunction = feature.getStyleFunction();
-  if (styleFunction) {
-    // FIXME the styles returned by the style function are supposed to be
-    // resolution-independent here
-    var styles = styleFunction.call(feature, 0);
-    if (styles) {
-      var style = Array.isArray(styles) ? styles[0] : styles;
-      if (this.writeStyles_) {
-        properties['Style'] = style;
-      }
-      var textStyle = style.getText();
-      if (textStyle) {
-        properties['name'] = textStyle.getText();
-      }
-    }
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.PLACEMARK_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-
-  // serialize geometry
-  var options = /** @type {olx.format.WriteOptions} */ (objectStack[0]);
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    geometry =
-        ol.format.Feature.transformWithOptions(geometry, true, options);
-  }
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.PLACEMARK_SERIALIZERS_,
-      ol.format.KML.GEOMETRY_NODE_FACTORY_, [geometry], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePrimitiveGeometry_ = function(node, geometry, objectStack) {
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  context['layout'] = geometry.getLayout();
-  context['stride'] = geometry.getStride();
-
-  // serialize properties (properties unknown to KML are not serialized)
-  var properties = geometry.getProperties();
-  properties.coordinates = flatCoordinates;
-
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.PRIMITIVE_GEOMETRY_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.geom.Polygon} polygon Polygon.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePolygon_ = function(node, polygon, objectStack) {
-  var linearRings = polygon.getLinearRings();
-  var outerRing = linearRings.shift();
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  // inner rings
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.POLYGON_SERIALIZERS_,
-      ol.format.KML.INNER_BOUNDARY_NODE_FACTORY_,
-      linearRings, objectStack);
-  // outer ring
-  ol.xml.pushSerializeAndPop(context,
-      ol.format.KML.POLYGON_SERIALIZERS_,
-      ol.format.KML.OUTER_BOUNDARY_NODE_FACTORY_,
-      [outerRing], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Fill} style Style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writePolyStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.POLY_STYLE_SERIALIZERS_,
-      ol.format.KML.COLOR_NODE_FACTORY_, [style.getColor()], objectStack);
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the scale to.
- * @param {number|undefined} scale Scale.
- * @private
- */
-ol.format.KML.writeScaleTextNode_ = function(node, scale) {
-  // the Math is to remove any excess decimals created by float arithmetic
-  ol.format.XSD.writeDecimalTextNode(node,
-      Math.round(scale * 1e6) / 1e6);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.style.Style} style Style.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.KML.writeStyle_ = function(node, style, objectStack) {
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: node};
-  var properties = {};
-  var fillStyle = style.getFill();
-  var strokeStyle = style.getStroke();
-  var imageStyle = style.getImage();
-  var textStyle = style.getText();
-  if (imageStyle instanceof ol.style.Icon) {
-    properties['IconStyle'] = imageStyle;
-  }
-  if (textStyle) {
-    properties['LabelStyle'] = textStyle;
-  }
-  if (strokeStyle) {
-    properties['LineStyle'] = strokeStyle;
-  }
-  if (fillStyle) {
-    properties['PolyStyle'] = fillStyle;
-  }
-  var parentNode = objectStack[objectStack.length - 1].node;
-  var orderedKeys = ol.format.KML.STYLE_SEQUENCE_[parentNode.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.STYLE_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);
-};
-
-
-/**
- * @param {Node} node Node to append a TextNode with the Vec2 to.
- * @param {ol.KMLVec2_} vec2 Vec2.
- * @private
- */
-ol.format.KML.writeVec2_ = function(node, vec2) {
-  node.setAttribute('x', vec2.x);
-  node.setAttribute('y', vec2.y);
-  node.setAttribute('xunits', vec2.xunits);
-  node.setAttribute('yunits', vec2.yunits);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.KML_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'Document', 'Placemark'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.KML_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Document': ol.xml.makeChildAppender(ol.format.KML.writeDocument_),
-      'Placemark': ol.xml.makeChildAppender(ol.format.KML.writePlacemark_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.DOCUMENT_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Placemark': ol.xml.makeChildAppender(ol.format.KML.writePlacemark_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.EXTENDEDDATA_NODE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Data': ol.xml.makeChildAppender(ol.format.KML.writeDataNode_),
-      'value': ol.xml.makeChildAppender(ol.format.KML.writeDataNodeValue_),
-      'displayName': ol.xml.makeChildAppender(ol.format.KML.writeDataNodeName_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- * @private
- */
-ol.format.KML.GEOMETRY_TYPE_TO_NODENAME_ = {
-  'Point': 'Point',
-  'LineString': 'LineString',
-  'LinearRing': 'LinearRing',
-  'Polygon': 'Polygon',
-  'MultiPoint': 'MultiGeometry',
-  'MultiLineString': 'MultiGeometry',
-  'MultiPolygon': 'MultiGeometry',
-  'GeometryCollection': 'MultiGeometry'
-};
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.ICON_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'href'
-    ],
-    ol.xml.makeStructureNS(ol.format.KML.GX_NAMESPACE_URIS_, [
-      'x', 'y', 'w', 'h'
-    ]));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.ICON_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'href': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-    }, ol.xml.makeStructureNS(
-        ol.format.KML.GX_NAMESPACE_URIS_, {
-          'x': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'y': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'w': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-          'h': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode)
-        }));
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'scale', 'heading', 'Icon', 'hotSpot'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.ICON_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'Icon': ol.xml.makeChildAppender(ol.format.KML.writeIcon_),
-      'heading': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode),
-      'hotSpot': ol.xml.makeChildAppender(ol.format.KML.writeVec2_),
-      'scale': ol.xml.makeChildAppender(ol.format.KML.writeScaleTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'color', 'scale'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.LABEL_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_),
-      'scale': ol.xml.makeChildAppender(ol.format.KML.writeScaleTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'color', 'width'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.LINE_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_),
-      'width': ol.xml.makeChildAppender(ol.format.XSD.writeDecimalTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.BOUNDARY_IS_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LinearRing': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.MULTI_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'LineString': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Point': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Polygon': ol.xml.makeChildAppender(ol.format.KML.writePolygon_),
-      'GeometryCollection': ol.xml.makeChildAppender(
-          ol.format.KML.writeMultiGeometry_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.PLACEMARK_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'name', 'open', 'visibility', 'address', 'phoneNumber', 'description',
-      'styleUrl', 'Style'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.PLACEMARK_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'ExtendedData': ol.xml.makeChildAppender(
-          ol.format.KML.writeExtendedData_),
-      'MultiGeometry': ol.xml.makeChildAppender(
-          ol.format.KML.writeMultiGeometry_),
-      'LineString': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'LinearRing': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Point': ol.xml.makeChildAppender(
-          ol.format.KML.writePrimitiveGeometry_),
-      'Polygon': ol.xml.makeChildAppender(ol.format.KML.writePolygon_),
-      'Style': ol.xml.makeChildAppender(ol.format.KML.writeStyle_),
-      'address': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'description': ol.xml.makeChildAppender(
-          ol.format.XSD.writeStringTextNode),
-      'name': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'open': ol.xml.makeChildAppender(ol.format.XSD.writeBooleanTextNode),
-      'phoneNumber': ol.xml.makeChildAppender(
-          ol.format.XSD.writeStringTextNode),
-      'styleUrl': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'visibility': ol.xml.makeChildAppender(
-          ol.format.XSD.writeBooleanTextNode)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.PRIMITIVE_GEOMETRY_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'extrude', 'tessellate', 'altitudeMode', 'coordinates'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.PRIMITIVE_GEOMETRY_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'extrude': ol.xml.makeChildAppender(ol.format.XSD.writeBooleanTextNode),
-      'tessellate': ol.xml.makeChildAppender(ol.format.XSD.writeBooleanTextNode),
-      'altitudeMode': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode),
-      'coordinates': ol.xml.makeChildAppender(
-          ol.format.KML.writeCoordinatesTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.POLYGON_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'outerBoundaryIs': ol.xml.makeChildAppender(
-          ol.format.KML.writeBoundaryIs_),
-      'innerBoundaryIs': ol.xml.makeChildAppender(
-          ol.format.KML.writeBoundaryIs_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.POLY_STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'color': ol.xml.makeChildAppender(ol.format.KML.writeColorTextNode_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Array.<string>>}
- * @private
- */
-ol.format.KML.STYLE_SEQUENCE_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, [
-      'IconStyle', 'LabelStyle', 'LineStyle', 'PolyStyle'
-    ]);
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.KML.STYLE_SERIALIZERS_ = ol.xml.makeStructureNS(
-    ol.format.KML.NAMESPACE_URIS_, {
-      'IconStyle': ol.xml.makeChildAppender(ol.format.KML.writeIconStyle_),
-      'LabelStyle': ol.xml.makeChildAppender(ol.format.KML.writeLabelStyle_),
-      'LineStyle': ol.xml.makeChildAppender(ol.format.KML.writeLineStyle_),
-      'PolyStyle': ol.xml.makeChildAppender(ol.format.KML.writePolyStyle_)
-    });
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.GX_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) {
-  return ol.xml.createElementNS(ol.format.KML.GX_NAMESPACE_URIS_[0],
-      'gx:' + opt_nodeName);
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.DOCUMENT_NODE_FACTORY_ = function(value, objectStack,
-    opt_nodeName) {
-  var parentNode = objectStack[objectStack.length - 1].node;
-  return ol.xml.createElementNS(parentNode.namespaceURI, 'Placemark');
-};
-
-
-/**
- * @const
- * @param {*} value Value.
- * @param {Array.<*>} objectStack Object stack.
- * @param {string=} opt_nodeName Node name.
- * @return {Node|undefined} Node.
- * @private
- */
-ol.format.KML.GEOMETRY_NODE_FACTORY_ = function(value, objectStack,
-    opt_nodeName) {
-  if (value) {
-    var parentNode = objectStack[objectStack.length - 1].node;
-    return ol.xml.createElementNS(parentNode.namespaceURI,
-        ol.format.KML.GEOMETRY_TYPE_TO_NODENAME_[/** @type {ol.geom.Geometry} */ (value).getType()]);
-  }
-};
-
-
-/**
- * A factory for creating coordinates nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.COLOR_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('color');
-
-
-/**
- * A factory for creating Data nodes.
- * @const
- * @type {function(*, Array.<*>): (Node|undefined)}
- * @private
- */
-ol.format.KML.DATA_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Data');
-
-
-/**
- * A factory for creating ExtendedData nodes.
- * @const
- * @type {function(*, Array.<*>): (Node|undefined)}
- * @private
- */
-ol.format.KML.EXTENDEDDATA_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('ExtendedData');
-
-
-/**
- * A factory for creating innerBoundaryIs nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.INNER_BOUNDARY_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('innerBoundaryIs');
-
-
-/**
- * A factory for creating Point nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.POINT_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Point');
-
-
-/**
- * A factory for creating LineString nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.LINE_STRING_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('LineString');
-
-
-/**
- * A factory for creating LinearRing nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.LINEAR_RING_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('LinearRing');
-
-
-/**
- * A factory for creating Polygon nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.POLYGON_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('Polygon');
-
-
-/**
- * A factory for creating outerBoundaryIs nodes.
- * @const
- * @type {function(*, Array.<*>, string=): (Node|undefined)}
- * @private
- */
-ol.format.KML.OUTER_BOUNDARY_NODE_FACTORY_ =
-    ol.xml.makeSimpleNodeFactory('outerBoundaryIs');
-
-
-/**
- * Encode an array of features in the KML format. GeometryCollections, MultiPoints,
- * MultiLineStrings, and MultiPolygons are output as MultiGeometries.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {string} Result.
- * @api
- */
-ol.format.KML.prototype.writeFeatures;
-
-
-/**
- * Encode an array of features in the KML format as an XML node. GeometryCollections,
- * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
- *
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Options.
- * @return {Node} Node.
- * @override
- * @api
- */
-ol.format.KML.prototype.writeFeaturesNode = function(features, opt_options) {
-  opt_options = this.adaptOptions(opt_options);
-  var kml = ol.xml.createElementNS(ol.format.KML.NAMESPACE_URIS_[4], 'kml');
-  var xmlnsUri = 'http://www.w3.org/2000/xmlns/';
-  var xmlSchemaInstanceUri = 'http://www.w3.org/2001/XMLSchema-instance';
-  ol.xml.setAttributeNS(kml, xmlnsUri, 'xmlns:gx',
-      ol.format.KML.GX_NAMESPACE_URIS_[0]);
-  ol.xml.setAttributeNS(kml, xmlnsUri, 'xmlns:xsi', xmlSchemaInstanceUri);
-  ol.xml.setAttributeNS(kml, xmlSchemaInstanceUri, 'xsi:schemaLocation',
-      ol.format.KML.SCHEMA_LOCATION_);
-
-  var /** @type {ol.XmlNodeStackItem} */ context = {node: kml};
-  var properties = {};
-  if (features.length > 1) {
-    properties['Document'] = features;
-  } else if (features.length == 1) {
-    properties['Placemark'] = features[0];
-  }
-  var orderedKeys = ol.format.KML.KML_SEQUENCE_[kml.namespaceURI];
-  var values = ol.xml.makeSequence(properties, orderedKeys);
-  ol.xml.pushSerializeAndPop(context, ol.format.KML.KML_SERIALIZERS_,
-      ol.xml.OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys,
-      this);
-  return kml;
-};
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.PBF');
-
-/** @typedef {function(*)} */
-ol.ext.PBF = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var read = function (buffer, offset, isLE, mLen, nBytes) {
-  var e, m;
-  var eLen = (nBytes * 8) - mLen - 1;
-  var eMax = (1 << eLen) - 1;
-  var eBias = eMax >> 1;
-  var nBits = -7;
-  var i = isLE ? (nBytes - 1) : 0;
-  var d = isLE ? -1 : 1;
-  var s = buffer[offset + i];
-  i += d;
-  e = s & ((1 << (-nBits)) - 1);
-  s >>= (-nBits);
-  nBits += eLen;
-  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
-  m = e & ((1 << (-nBits)) - 1);
-  e >>= (-nBits);
-  nBits += mLen;
-  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
-  if (e === 0) {
-    e = 1 - eBias;
-  } else if (e === eMax) {
-    return m ? NaN : ((s ? -1 : 1) * Infinity)
-  } else {
-    m = m + Math.pow(2, mLen);
-    e = e - eBias;
-  }
-  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
-};
-var write = function (buffer, value, offset, isLE, mLen, nBytes) {
-  var e, m, c;
-  var eLen = (nBytes * 8) - mLen - 1;
-  var eMax = (1 << eLen) - 1;
-  var eBias = eMax >> 1;
-  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0);
-  var i = isLE ? 0 : (nBytes - 1);
-  var d = isLE ? 1 : -1;
-  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0;
-  value = Math.abs(value);
-  if (isNaN(value) || value === Infinity) {
-    m = isNaN(value) ? 1 : 0;
-    e = eMax;
-  } else {
-    e = Math.floor(Math.log(value) / Math.LN2);
-    if (value * (c = Math.pow(2, -e)) < 1) {
-      e--;
-      c *= 2;
-    }
-    if (e + eBias >= 1) {
-      value += rt / c;
-    } else {
-      value += rt * Math.pow(2, 1 - eBias);
-    }
-    if (value * c >= 2) {
-      e++;
-      c /= 2;
-    }
-    if (e + eBias >= eMax) {
-      m = 0;
-      e = eMax;
-    } else if (e + eBias >= 1) {
-      m = ((value * c) - 1) * Math.pow(2, mLen);
-      e = e + eBias;
-    } else {
-      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
-      e = 0;
-    }
-  }
-  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
-  e = (e << mLen) | m;
-  eLen += mLen;
-  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
-  buffer[offset + i - d] |= s * 128;
-};
-var ieee754 = {
-	read: read,
-	write: write
-};
-
-var pbf = Pbf;
-function Pbf(buf) {
-    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);
-    this.pos = 0;
-    this.type = 0;
-    this.length = this.buf.length;
-}
-Pbf.Varint  = 0;
-Pbf.Fixed64 = 1;
-Pbf.Bytes   = 2;
-Pbf.Fixed32 = 5;
-var SHIFT_LEFT_32 = (1 << 16) * (1 << 16);
-var SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;
-Pbf.prototype = {
-    destroy: function() {
-        this.buf = null;
-    },
-    readFields: function(readField, result, end) {
-        end = end || this.length;
-        while (this.pos < end) {
-            var val = this.readVarint(),
-                tag = val >> 3,
-                startPos = this.pos;
-            this.type = val & 0x7;
-            readField(tag, result, this);
-            if (this.pos === startPos) this.skip(val);
-        }
-        return result;
-    },
-    readMessage: function(readField, result) {
-        return this.readFields(readField, result, this.readVarint() + this.pos);
-    },
-    readFixed32: function() {
-        var val = readUInt32(this.buf, this.pos);
-        this.pos += 4;
-        return val;
-    },
-    readSFixed32: function() {
-        var val = readInt32(this.buf, this.pos);
-        this.pos += 4;
-        return val;
-    },
-    readFixed64: function() {
-        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
-        this.pos += 8;
-        return val;
-    },
-    readSFixed64: function() {
-        var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
-        this.pos += 8;
-        return val;
-    },
-    readFloat: function() {
-        var val = ieee754.read(this.buf, this.pos, true, 23, 4);
-        this.pos += 4;
-        return val;
-    },
-    readDouble: function() {
-        var val = ieee754.read(this.buf, this.pos, true, 52, 8);
-        this.pos += 8;
-        return val;
-    },
-    readVarint: function(isSigned) {
-        var buf = this.buf,
-            val, b;
-        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;
-        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;
-        b = buf[this.pos];   val |= (b & 0x0f) << 28;
-        return readVarintRemainder(val, isSigned, this);
-    },
-    readVarint64: function() {
-        return this.readVarint(true);
-    },
-    readSVarint: function() {
-        var num = this.readVarint();
-        return num % 2 === 1 ? (num + 1) / -2 : num / 2;
-    },
-    readBoolean: function() {
-        return Boolean(this.readVarint());
-    },
-    readString: function() {
-        var end = this.readVarint() + this.pos,
-            str = readUtf8(this.buf, this.pos, end);
-        this.pos = end;
-        return str;
-    },
-    readBytes: function() {
-        var end = this.readVarint() + this.pos,
-            buffer = this.buf.subarray(this.pos, end);
-        this.pos = end;
-        return buffer;
-    },
-    readPackedVarint: function(arr, isSigned) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readVarint(isSigned));
-        return arr;
-    },
-    readPackedSVarint: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSVarint());
-        return arr;
-    },
-    readPackedBoolean: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readBoolean());
-        return arr;
-    },
-    readPackedFloat: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFloat());
-        return arr;
-    },
-    readPackedDouble: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readDouble());
-        return arr;
-    },
-    readPackedFixed32: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFixed32());
-        return arr;
-    },
-    readPackedSFixed32: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSFixed32());
-        return arr;
-    },
-    readPackedFixed64: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readFixed64());
-        return arr;
-    },
-    readPackedSFixed64: function(arr) {
-        var end = readPackedEnd(this);
-        arr = arr || [];
-        while (this.pos < end) arr.push(this.readSFixed64());
-        return arr;
-    },
-    skip: function(val) {
-        var type = val & 0x7;
-        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}
-        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;
-        else if (type === Pbf.Fixed32) this.pos += 4;
-        else if (type === Pbf.Fixed64) this.pos += 8;
-        else throw new Error('Unimplemented type: ' + type);
-    },
-    writeTag: function(tag, type) {
-        this.writeVarint((tag << 3) | type);
-    },
-    realloc: function(min) {
-        var length = this.length || 16;
-        while (length < this.pos + min) length *= 2;
-        if (length !== this.length) {
-            var buf = new Uint8Array(length);
-            buf.set(this.buf);
-            this.buf = buf;
-            this.length = length;
-        }
-    },
-    finish: function() {
-        this.length = this.pos;
-        this.pos = 0;
-        return this.buf.subarray(0, this.length);
-    },
-    writeFixed32: function(val) {
-        this.realloc(4);
-        writeInt32(this.buf, val, this.pos);
-        this.pos += 4;
-    },
-    writeSFixed32: function(val) {
-        this.realloc(4);
-        writeInt32(this.buf, val, this.pos);
-        this.pos += 4;
-    },
-    writeFixed64: function(val) {
-        this.realloc(8);
-        writeInt32(this.buf, val & -1, this.pos);
-        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
-        this.pos += 8;
-    },
-    writeSFixed64: function(val) {
-        this.realloc(8);
-        writeInt32(this.buf, val & -1, this.pos);
-        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
-        this.pos += 8;
-    },
-    writeVarint: function(val) {
-        val = +val || 0;
-        if (val > 0xfffffff || val < 0) {
-            writeBigVarint(val, this);
-            return;
-        }
-        this.realloc(4);
-        this.buf[this.pos++] =           val & 0x7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
-        this.buf[this.pos++] =   (val >>> 7) & 0x7f;
-    },
-    writeSVarint: function(val) {
-        this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);
-    },
-    writeBoolean: function(val) {
-        this.writeVarint(Boolean(val));
-    },
-    writeString: function(str) {
-        str = String(str);
-        this.realloc(str.length * 4);
-        this.pos++;
-        var startPos = this.pos;
-        this.pos = writeUtf8(this.buf, str, this.pos);
-        var len = this.pos - startPos;
-        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
-        this.pos = startPos - 1;
-        this.writeVarint(len);
-        this.pos += len;
-    },
-    writeFloat: function(val) {
-        this.realloc(4);
-        ieee754.write(this.buf, val, this.pos, true, 23, 4);
-        this.pos += 4;
-    },
-    writeDouble: function(val) {
-        this.realloc(8);
-        ieee754.write(this.buf, val, this.pos, true, 52, 8);
-        this.pos += 8;
-    },
-    writeBytes: function(buffer) {
-        var len = buffer.length;
-        this.writeVarint(len);
-        this.realloc(len);
-        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];
-    },
-    writeRawMessage: function(fn, obj) {
-        this.pos++;
-        var startPos = this.pos;
-        fn(obj, this);
-        var len = this.pos - startPos;
-        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
-        this.pos = startPos - 1;
-        this.writeVarint(len);
-        this.pos += len;
-    },
-    writeMessage: function(tag, fn, obj) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeRawMessage(fn, obj);
-    },
-    writePackedVarint:   function(tag, arr) { this.writeMessage(tag, writePackedVarint, arr);   },
-    writePackedSVarint:  function(tag, arr) { this.writeMessage(tag, writePackedSVarint, arr);  },
-    writePackedBoolean:  function(tag, arr) { this.writeMessage(tag, writePackedBoolean, arr);  },
-    writePackedFloat:    function(tag, arr) { this.writeMessage(tag, writePackedFloat, arr);    },
-    writePackedDouble:   function(tag, arr) { this.writeMessage(tag, writePackedDouble, arr);   },
-    writePackedFixed32:  function(tag, arr) { this.writeMessage(tag, writePackedFixed32, arr);  },
-    writePackedSFixed32: function(tag, arr) { this.writeMessage(tag, writePackedSFixed32, arr); },
-    writePackedFixed64:  function(tag, arr) { this.writeMessage(tag, writePackedFixed64, arr);  },
-    writePackedSFixed64: function(tag, arr) { this.writeMessage(tag, writePackedSFixed64, arr); },
-    writeBytesField: function(tag, buffer) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeBytes(buffer);
-    },
-    writeFixed32Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeFixed32(val);
-    },
-    writeSFixed32Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeSFixed32(val);
-    },
-    writeFixed64Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeFixed64(val);
-    },
-    writeSFixed64Field: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeSFixed64(val);
-    },
-    writeVarintField: function(tag, val) {
-        this.writeTag(tag, Pbf.Varint);
-        this.writeVarint(val);
-    },
-    writeSVarintField: function(tag, val) {
-        this.writeTag(tag, Pbf.Varint);
-        this.writeSVarint(val);
-    },
-    writeStringField: function(tag, str) {
-        this.writeTag(tag, Pbf.Bytes);
-        this.writeString(str);
-    },
-    writeFloatField: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed32);
-        this.writeFloat(val);
-    },
-    writeDoubleField: function(tag, val) {
-        this.writeTag(tag, Pbf.Fixed64);
-        this.writeDouble(val);
-    },
-    writeBooleanField: function(tag, val) {
-        this.writeVarintField(tag, Boolean(val));
-    }
-};
-function readVarintRemainder(l, s, p) {
-    var buf = p.buf,
-        h, b;
-    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);
-    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);
-    throw new Error('Expected varint not more than 10 bytes');
-}
-function readPackedEnd(pbf) {
-    return pbf.type === Pbf.Bytes ?
-        pbf.readVarint() + pbf.pos : pbf.pos + 1;
-}
-function toNum(low, high, isSigned) {
-    if (isSigned) {
-        return high * 0x100000000 + (low >>> 0);
-    }
-    return ((high >>> 0) * 0x100000000) + (low >>> 0);
-}
-function writeBigVarint(val, pbf) {
-    var low, high;
-    if (val >= 0) {
-        low  = (val % 0x100000000) | 0;
-        high = (val / 0x100000000) | 0;
-    } else {
-        low  = ~(-val % 0x100000000);
-        high = ~(-val / 0x100000000);
-        if (low ^ 0xffffffff) {
-            low = (low + 1) | 0;
-        } else {
-            low = 0;
-            high = (high + 1) | 0;
-        }
-    }
-    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {
-        throw new Error('Given varint doesn\'t fit into 10 bytes');
-    }
-    pbf.realloc(10);
-    writeBigVarintLow(low, high, pbf);
-    writeBigVarintHigh(high, pbf);
-}
-function writeBigVarintLow(low, high, pbf) {
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
-    pbf.buf[pbf.pos]   = low & 0x7f;
-}
-function writeBigVarintHigh(high, pbf) {
-    var lsb = (high & 0x07) << 4;
-    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
-    pbf.buf[pbf.pos++]  = high & 0x7f;
-}
-function makeRoomForExtraLength(startPos, len, pbf) {
-    var extraLen =
-        len <= 0x3fff ? 1 :
-        len <= 0x1fffff ? 2 :
-        len <= 0xfffffff ? 3 : Math.ceil(Math.log(len) / (Math.LN2 * 7));
-    pbf.realloc(extraLen);
-    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
-}
-function writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }
-function writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }
-function writePackedFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }
-function writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }
-function writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }
-function writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);  }
-function writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }
-function writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }
-function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }
-function readUInt32(buf, pos) {
-    return ((buf[pos]) |
-        (buf[pos + 1] << 8) |
-        (buf[pos + 2] << 16)) +
-        (buf[pos + 3] * 0x1000000);
-}
-function writeInt32(buf, val, pos) {
-    buf[pos] = val;
-    buf[pos + 1] = (val >>> 8);
-    buf[pos + 2] = (val >>> 16);
-    buf[pos + 3] = (val >>> 24);
-}
-function readInt32(buf, pos) {
-    return ((buf[pos]) |
-        (buf[pos + 1] << 8) |
-        (buf[pos + 2] << 16)) +
-        (buf[pos + 3] << 24);
-}
-function readUtf8(buf, pos, end) {
-    var str = '';
-    var i = pos;
-    while (i < end) {
-        var b0 = buf[i];
-        var c = null;
-        var bytesPerSequence =
-            b0 > 0xEF ? 4 :
-            b0 > 0xDF ? 3 :
-            b0 > 0xBF ? 2 : 1;
-        if (i + bytesPerSequence > end) break;
-        var b1, b2, b3;
-        if (bytesPerSequence === 1) {
-            if (b0 < 0x80) {
-                c = b0;
-            }
-        } else if (bytesPerSequence === 2) {
-            b1 = buf[i + 1];
-            if ((b1 & 0xC0) === 0x80) {
-                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);
-                if (c <= 0x7F) {
-                    c = null;
-                }
-            }
-        } else if (bytesPerSequence === 3) {
-            b1 = buf[i + 1];
-            b2 = buf[i + 2];
-            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {
-                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);
-                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {
-                    c = null;
-                }
-            }
-        } else if (bytesPerSequence === 4) {
-            b1 = buf[i + 1];
-            b2 = buf[i + 2];
-            b3 = buf[i + 3];
-            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
-                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);
-                if (c <= 0xFFFF || c >= 0x110000) {
-                    c = null;
-                }
-            }
-        }
-        if (c === null) {
-            c = 0xFFFD;
-            bytesPerSequence = 1;
-        } else if (c > 0xFFFF) {
-            c -= 0x10000;
-            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);
-            c = 0xDC00 | c & 0x3FF;
-        }
-        str += String.fromCharCode(c);
-        i += bytesPerSequence;
-    }
-    return str;
-}
-function writeUtf8(buf, str, pos) {
-    for (var i = 0, c, lead; i < str.length; i++) {
-        c = str.charCodeAt(i);
-        if (c > 0xD7FF && c < 0xE000) {
-            if (lead) {
-                if (c < 0xDC00) {
-                    buf[pos++] = 0xEF;
-                    buf[pos++] = 0xBF;
-                    buf[pos++] = 0xBD;
-                    lead = c;
-                    continue;
-                } else {
-                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;
-                    lead = null;
-                }
-            } else {
-                if (c > 0xDBFF || (i + 1 === str.length)) {
-                    buf[pos++] = 0xEF;
-                    buf[pos++] = 0xBF;
-                    buf[pos++] = 0xBD;
-                } else {
-                    lead = c;
-                }
-                continue;
-            }
-        } else if (lead) {
-            buf[pos++] = 0xEF;
-            buf[pos++] = 0xBF;
-            buf[pos++] = 0xBD;
-            lead = null;
-        }
-        if (c < 0x80) {
-            buf[pos++] = c;
-        } else {
-            if (c < 0x800) {
-                buf[pos++] = c >> 0x6 | 0xC0;
-            } else {
-                if (c < 0x10000) {
-                    buf[pos++] = c >> 0xC | 0xE0;
-                } else {
-                    buf[pos++] = c >> 0x12 | 0xF0;
-                    buf[pos++] = c >> 0xC & 0x3F | 0x80;
-                }
-                buf[pos++] = c >> 0x6 & 0x3F | 0x80;
-            }
-            buf[pos++] = c & 0x3F | 0x80;
-        }
-    }
-    return pos;
-}
-
-exports['default'] = pbf;
-
-}((this.PBF = this.PBF || {})));}).call(ol.ext);
-ol.ext.PBF = ol.ext.PBF.default;
-
-goog.provide('ol.render.Feature');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.flat.center');
-goog.require('ol.geom.flat.interiorpoint');
-goog.require('ol.geom.flat.interpolate');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.transform');
-
-
-/**
- * Lightweight, read-only, {@link ol.Feature} and {@link ol.geom.Geometry} like
- * structure, optimized for vector tile rendering and styling. Geometry access
- * through the API is limited to getting the type and extent of the geometry.
- *
- * @constructor
- * @param {ol.geom.GeometryType} type Geometry type.
- * @param {Array.<number>} flatCoordinates Flat coordinates. These always need
- *     to be right-handed for polygons.
- * @param {Array.<number>|Array.<Array.<number>>} ends Ends or Endss.
- * @param {Object.<string, *>} properties Properties.
- * @param {number|string|undefined} id Feature id.
- */
-ol.render.Feature = function(type, flatCoordinates, ends, properties, id) {
-  /**
-   * @private
-   * @type {ol.Extent|undefined}
-   */
-  this.extent_;
-
-  /**
-   * @private
-   * @type {number|string|undefined}
-   */
-  this.id_ = id;
-
-  /**
-   * @private
-   * @type {ol.geom.GeometryType}
-   */
-  this.type_ = type;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatCoordinates_ = flatCoordinates;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatInteriorPoints_ = null;
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.flatMidpoints_ = null;
-
-  /**
-   * @private
-   * @type {Array.<number>|Array.<Array.<number>>}
-   */
-  this.ends_ = ends;
-
-  /**
-   * @private
-   * @type {Object.<string, *>}
-   */
-  this.properties_ = properties;
-
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.tmpTransform_ = ol.transform.create();
-};
-
-
-/**
- * Get a feature property by its key.
- * @param {string} key Key
- * @return {*} Value for the requested key.
- * @api
- */
-ol.render.Feature.prototype.get = function(key) {
-  return this.properties_[key];
-};
-
-
-/**
- * @return {Array.<number>|Array.<Array.<number>>} Ends or endss.
- */
-ol.render.Feature.prototype.getEnds =
-ol.render.Feature.prototype.getEndss = function() {
-  return this.ends_;
-};
-
-
-/**
- * Get the extent of this feature's geometry.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.render.Feature.prototype.getExtent = function() {
-  if (!this.extent_) {
-    this.extent_ = this.type_ === ol.geom.GeometryType.POINT ?
-      ol.extent.createOrUpdateFromCoordinate(this.flatCoordinates_) :
-      ol.extent.createOrUpdateFromFlatCoordinates(
-          this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);
-
-  }
-  return this.extent_;
-};
-
-
-/**
- * @return {Array.<number>} Flat interior points.
- */
-ol.render.Feature.prototype.getFlatInteriorPoint = function() {
-  if (!this.flatInteriorPoints_) {
-    var flatCenter = ol.extent.getCenter(this.getExtent());
-    this.flatInteriorPoints_ = ol.geom.flat.interiorpoint.linearRings(
-        this.flatCoordinates_, 0, this.ends_, 2, flatCenter, 0);
-  }
-  return this.flatInteriorPoints_;
-};
-
-
-/**
- * @return {Array.<number>} Flat interior points.
- */
-ol.render.Feature.prototype.getFlatInteriorPoints = function() {
-  if (!this.flatInteriorPoints_) {
-    var flatCenters = ol.geom.flat.center.linearRingss(
-        this.flatCoordinates_, 0, this.ends_, 2);
-    this.flatInteriorPoints_ = ol.geom.flat.interiorpoint.linearRingss(
-        this.flatCoordinates_, 0, this.ends_, 2, flatCenters);
-  }
-  return this.flatInteriorPoints_;
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoint.
- */
-ol.render.Feature.prototype.getFlatMidpoint = function() {
-  if (!this.flatMidpoints_) {
-    this.flatMidpoints_ = ol.geom.flat.interpolate.lineString(
-        this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, 0.5);
-  }
-  return this.flatMidpoints_;
-};
-
-
-/**
- * @return {Array.<number>} Flat midpoints.
- */
-ol.render.Feature.prototype.getFlatMidpoints = function() {
-  if (!this.flatMidpoints_) {
-    this.flatMidpoints_ = [];
-    var flatCoordinates = this.flatCoordinates_;
-    var offset = 0;
-    var ends = this.ends_;
-    for (var i = 0, ii = ends.length; i < ii; ++i) {
-      var end = ends[i];
-      var midpoint = ol.geom.flat.interpolate.lineString(
-          flatCoordinates, offset, end, 2, 0.5);
-      ol.array.extend(this.flatMidpoints_, midpoint);
-      offset = end;
-    }
-  }
-  return this.flatMidpoints_;
-};
-
-/**
- * Get the feature identifier.  This is a stable identifier for the feature and
- * is set when reading data from a remote source.
- * @return {number|string|undefined} Id.
- * @api
- */
-ol.render.Feature.prototype.getId = function() {
-  return this.id_;
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.render.Feature.prototype.getOrientedFlatCoordinates = function() {
-  return this.flatCoordinates_;
-};
-
-
-/**
- * @return {Array.<number>} Flat coordinates.
- */
-ol.render.Feature.prototype.getFlatCoordinates =
-    ol.render.Feature.prototype.getOrientedFlatCoordinates;
-
-
-/**
- * For API compatibility with {@link ol.Feature}, this method is useful when
- * determining the geometry type in style function (see {@link #getType}).
- * @return {ol.render.Feature} Feature.
- * @api
- */
-ol.render.Feature.prototype.getGeometry = function() {
-  return this;
-};
-
-
-/**
- * Get the feature properties.
- * @return {Object.<string, *>} Feature properties.
- * @api
- */
-ol.render.Feature.prototype.getProperties = function() {
-  return this.properties_;
-};
-
-
-/**
- * Get the feature for working with its geometry.
- * @return {ol.render.Feature} Feature.
- */
-ol.render.Feature.prototype.getSimplifiedGeometry =
-    ol.render.Feature.prototype.getGeometry;
-
-
-/**
- * @return {number} Stride.
- */
-ol.render.Feature.prototype.getStride = function() {
-  return 2;
-};
-
-
-/**
- * @return {undefined}
- */
-ol.render.Feature.prototype.getStyleFunction = ol.nullFunction;
-
-
-/**
- * Get the type of this feature's geometry.
- * @return {ol.geom.GeometryType} Geometry type.
- * @api
- */
-ol.render.Feature.prototype.getType = function() {
-  return this.type_;
-};
-
-/**
- * Transform geometry coordinates from tile pixel space to projected.
- * The SRS of the source and destination are expected to be the same.
- *
- * @param {ol.ProjectionLike} source The current projection
- * @param {ol.ProjectionLike} destination The desired projection.
- */
-ol.render.Feature.prototype.transform = function(source, destination) {
-  var pixelExtent = source.getExtent();
-  var projectedExtent = source.getWorldExtent();
-  var scale = ol.extent.getHeight(projectedExtent) / ol.extent.getHeight(pixelExtent);
-  var transform = this.tmpTransform_;
-  ol.transform.compose(transform,
-      projectedExtent[0], projectedExtent[3],
-      scale, -scale, 0,
-      0, 0);
-  ol.geom.flat.transform.transform2D(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2,
-      transform, this.flatCoordinates_);
-};
-
-//FIXME Implement projection handling
-
-goog.provide('ol.format.MVT');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.ext.PBF');
-goog.require('ol.format.Feature');
-goog.require('ol.format.FormatType');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.render.Feature');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the Mapbox MVT format.
- *
- * @constructor
- * @extends {ol.format.Feature}
- * @param {olx.format.MVTOptions=} opt_options Options.
- * @api
- */
-ol.format.MVT = function(opt_options) {
-
-  ol.format.Feature.call(this);
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.proj.Projection}
-   */
-  this.defaultDataProjection = new ol.proj.Projection({
-    code: 'EPSG:3857',
-    units: ol.proj.Units.TILE_PIXELS
-  });
-
-  /**
-   * @private
-   * @type {function((ol.geom.Geometry|Object.<string,*>)=)|
-   *     function(ol.geom.GeometryType,Array.<number>,
-   *         (Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)}
-   */
-  this.featureClass_ = options.featureClass ?
-    options.featureClass : ol.render.Feature;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.geometryName_ = options.geometryName;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.layerName_ = options.layerName ? options.layerName : 'layer';
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = null;
-
-};
-ol.inherits(ol.format.MVT, ol.format.Feature);
-
-
-/**
- * Reader callbacks for parsing the PBF.
- * @type {Object.<string, function(number, Object, ol.ext.PBF)>}
- */
-ol.format.MVT.pbfReaders_ = {
-  layers: function(tag, layers, pbf) {
-    if (tag === 3) {
-      var layer = {
-        keys: [],
-        values: [],
-        features: []
-      };
-      var end = pbf.readVarint() + pbf.pos;
-      pbf.readFields(ol.format.MVT.pbfReaders_.layer, layer, end);
-      layer.length = layer.features.length;
-      if (layer.length) {
-        layers[layer.name] = layer;
-      }
-    }
-  },
-  layer: function(tag, layer, pbf) {
-    if (tag === 15) {
-      layer.version = pbf.readVarint();
-    } else if (tag === 1) {
-      layer.name = pbf.readString();
-    } else if (tag === 5) {
-      layer.extent = pbf.readVarint();
-    } else if (tag === 2) {
-      layer.features.push(pbf.pos);
-    } else if (tag === 3) {
-      layer.keys.push(pbf.readString());
-    } else if (tag === 4) {
-      var value = null;
-      var end = pbf.readVarint() + pbf.pos;
-      while (pbf.pos < end) {
-        tag = pbf.readVarint() >> 3;
-        value = tag === 1 ? pbf.readString() :
-          tag === 2 ? pbf.readFloat() :
-            tag === 3 ? pbf.readDouble() :
-              tag === 4 ? pbf.readVarint64() :
-                tag === 5 ? pbf.readVarint() :
-                  tag === 6 ? pbf.readSVarint() :
-                    tag === 7 ? pbf.readBoolean() : null;
-      }
-      layer.values.push(value);
-    }
-  },
-  feature: function(tag, feature, pbf) {
-    if (tag == 1) {
-      feature.id = pbf.readVarint();
-    } else if (tag == 2) {
-      var end = pbf.readVarint() + pbf.pos;
-      while (pbf.pos < end) {
-        var key = feature.layer.keys[pbf.readVarint()];
-        var value = feature.layer.values[pbf.readVarint()];
-        feature.properties[key] = value;
-      }
-    } else if (tag == 3) {
-      feature.type = pbf.readVarint();
-    } else if (tag == 4) {
-      feature.geometry = pbf.pos;
-    }
-  }
-};
-
-
-/**
- * Read a raw feature from the pbf offset stored at index `i` in the raw layer.
- * @suppress {missingProperties}
- * @private
- * @param {ol.ext.PBF} pbf PBF.
- * @param {Object} layer Raw layer.
- * @param {number} i Index of the feature in the raw layer's `features` array.
- * @return {Object} Raw feature.
- */
-ol.format.MVT.readRawFeature_ = function(pbf, layer, i) {
-  pbf.pos = layer.features[i];
-  var end = pbf.readVarint() + pbf.pos;
-
-  var feature = {
-    layer: layer,
-    type: 0,
-    properties: {}
-  };
-  pbf.readFields(ol.format.MVT.pbfReaders_.feature, feature, end);
-  return feature;
-};
-
-
-/**
- * Read the raw geometry from the pbf offset stored in a raw feature's geometry
- * proeprty.
- * @suppress {missingProperties}
- * @private
- * @param {ol.ext.PBF} pbf PBF.
- * @param {Object} feature Raw feature.
- * @param {Array.<number>} flatCoordinates Array to store flat coordinates in.
- * @param {Array.<number>} ends Array to store ends in.
- */
-ol.format.MVT.readRawGeometry_ = function(pbf, feature, flatCoordinates, ends) {
-  pbf.pos = feature.geometry;
-
-  var end = pbf.readVarint() + pbf.pos;
-  var cmd = 1;
-  var length = 0;
-  var x = 0;
-  var y = 0;
-  var coordsLen = 0;
-  var currentEnd = 0;
-
-  while (pbf.pos < end) {
-    if (!length) {
-      var cmdLen = pbf.readVarint();
-      cmd = cmdLen & 0x7;
-      length = cmdLen >> 3;
-    }
-
-    length--;
-
-    if (cmd === 1 || cmd === 2) {
-      x += pbf.readSVarint();
-      y += pbf.readSVarint();
-
-      if (cmd === 1) { // moveTo
-        if (coordsLen > currentEnd) {
-          ends.push(coordsLen);
-          currentEnd = coordsLen;
-        }
-      }
-
-      flatCoordinates.push(x, y);
-      coordsLen += 2;
-
-    } else if (cmd === 7) {
-
-      if (coordsLen > currentEnd) {
-        // close polygon
-        flatCoordinates.push(
-            flatCoordinates[currentEnd], flatCoordinates[currentEnd + 1]);
-        coordsLen += 2;
-      }
-
-    } else {
-      ol.asserts.assert(false, 59); // Invalid command found in the PBF
-    }
-  }
-
-  if (coordsLen > currentEnd) {
-    ends.push(coordsLen);
-    currentEnd = coordsLen;
-  }
-
-};
-
-
-/**
- * @suppress {missingProperties}
- * @private
- * @param {number} type The raw feature's geometry type
- * @param {number} numEnds Number of ends of the flat coordinates of the
- * geometry.
- * @return {ol.geom.GeometryType} The geometry type.
- */
-ol.format.MVT.getGeometryType_ = function(type, numEnds) {
-  /** @type {ol.geom.GeometryType} */
-  var geometryType;
-  if (type === 1) {
-    geometryType = numEnds === 1 ?
-      ol.geom.GeometryType.POINT : ol.geom.GeometryType.MULTI_POINT;
-  } else if (type === 2) {
-    geometryType = numEnds === 1 ?
-      ol.geom.GeometryType.LINE_STRING :
-      ol.geom.GeometryType.MULTI_LINE_STRING;
-  } else if (type === 3) {
-    geometryType = ol.geom.GeometryType.POLYGON;
-    // MultiPolygon not relevant for rendering - winding order determines
-    // outer rings of polygons.
-  }
-  return geometryType;
-};
-
-/**
- * @private
- * @param {ol.ext.PBF} pbf PBF
- * @param {Object} rawFeature Raw Mapbox feature.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature|ol.render.Feature} Feature.
- */
-ol.format.MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
-  var type = rawFeature.type;
-  if (type === 0) {
-    return null;
-  }
-
-  var feature;
-  var id = rawFeature.id;
-  var values = rawFeature.properties;
-  values[this.layerName_] = rawFeature.layer.name;
-
-  var flatCoordinates = [];
-  var ends = [];
-  ol.format.MVT.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);
-
-  var geometryType = ol.format.MVT.getGeometryType_(type, ends.length);
-
-  if (this.featureClass_ === ol.render.Feature) {
-    feature = new this.featureClass_(geometryType, flatCoordinates, ends, values, id);
-  } else {
-    var geom;
-    if (geometryType == ol.geom.GeometryType.POLYGON) {
-      var endss = [];
-      var offset = 0;
-      var prevEndIndex = 0;
-      for (var i = 0, ii = ends.length; i < ii; ++i) {
-        var end = ends[i];
-        if (!ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates, offset, end, 2)) {
-          endss.push(ends.slice(prevEndIndex, i));
-          prevEndIndex = i;
-        }
-        offset = end;
-      }
-      if (endss.length > 1) {
-        ends = endss;
-        geom = new ol.geom.MultiPolygon(null);
-      } else {
-        geom = new ol.geom.Polygon(null);
-      }
-    } else {
-      geom = geometryType === ol.geom.GeometryType.POINT ? new ol.geom.Point(null) :
-        geometryType === ol.geom.GeometryType.LINE_STRING ? new ol.geom.LineString(null) :
-          geometryType === ol.geom.GeometryType.POLYGON ? new ol.geom.Polygon(null) :
-            geometryType === ol.geom.GeometryType.MULTI_POINT ? new ol.geom.MultiPoint (null) :
-              geometryType === ol.geom.GeometryType.MULTI_LINE_STRING ? new ol.geom.MultiLineString(null) :
-                null;
-    }
-    geom.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates, ends);
-    feature = new this.featureClass_();
-    if (this.geometryName_) {
-      feature.setGeometryName(this.geometryName_);
-    }
-    var geometry = ol.format.Feature.transformWithOptions(geom, false, this.adaptOptions(opt_options));
-    feature.setGeometry(geometry);
-    feature.setId(id);
-    feature.setProperties(values);
-  }
-
-  return feature;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.format.MVT.prototype.getLastExtent = function() {
-  return this.extent_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.MVT.prototype.getType = function() {
-  return ol.format.FormatType.ARRAY_BUFFER;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.format.MVT.prototype.readFeatures = function(source, opt_options) {
-  var layers = this.layers_;
-
-  var pbf = new ol.ext.PBF(/** @type {ArrayBuffer} */ (source));
-  var pbfLayers = pbf.readFields(ol.format.MVT.pbfReaders_.layers, {});
-  /** @type {Array.<ol.Feature|ol.render.Feature>} */
-  var features = [];
-  var pbfLayer;
-  for (var name in pbfLayers) {
-    if (layers && layers.indexOf(name) == -1) {
-      continue;
-    }
-    pbfLayer = pbfLayers[name];
-
-    var rawFeature;
-    for (var i = 0, ii = pbfLayer.length; i < ii; ++i) {
-      rawFeature = ol.format.MVT.readRawFeature_(pbf, pbfLayer, i);
-      features.push(this.createFeature_(pbf, rawFeature));
-    }
-    this.extent_ = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;
-  }
-
-  return features;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.format.MVT.prototype.readProjection = function(source) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * Sets the layers that features will be read from.
- * @param {Array.<string>} layers Layers.
- * @api
- */
-ol.format.MVT.prototype.setLayers = function(layers) {
-  this.layers_ = layers;
-};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.readFeature = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.readGeometry = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeFeature = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeGeometry = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.MVT.prototype.writeFeatures = function() {};
-
-// FIXME add typedef for stack state objects
-goog.provide('ol.format.OSMXML');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the
- * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @api
- */
-ol.format.OSMXML = function() {
-  ol.format.XMLFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-};
-ol.inherits(ol.format.OSMXML, ol.format.XMLFeature);
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readNode_ = function(node, objectStack) {
-  var options = /** @type {olx.format.ReadOptions} */ (objectStack[0]);
-  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var id = node.getAttribute('id');
-  /** @type {ol.Coordinate} */
-  var coordinates = [
-    parseFloat(node.getAttribute('lon')),
-    parseFloat(node.getAttribute('lat'))
-  ];
-  state.nodes[id] = coordinates;
-
-  var values = ol.xml.pushParseAndPop({
-    tags: {}
-  }, ol.format.OSMXML.NODE_PARSERS_, node, objectStack);
-  if (!ol.obj.isEmpty(values.tags)) {
-    var geometry = new ol.geom.Point(coordinates);
-    ol.format.Feature.transformWithOptions(geometry, false, options);
-    var feature = new ol.Feature(geometry);
-    feature.setId(id);
-    feature.setProperties(values.tags);
-    state.features.push(feature);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readWay_ = function(node, objectStack) {
-  var id = node.getAttribute('id');
-  var values = ol.xml.pushParseAndPop({
-    id: id,
-    ndrefs: [],
-    tags: {}
-  }, ol.format.OSMXML.WAY_PARSERS_, node, objectStack);
-  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  state.ways.push(values);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readNd_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values.ndrefs.push(node.getAttribute('ref'));
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.OSMXML.readTag_ = function(node, objectStack) {
-  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  values.tags[node.getAttribute('k')] = node.getAttribute('v');
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.OSMXML.NAMESPACE_URIS_ = [
-  null
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.WAY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'nd': ol.format.OSMXML.readNd_,
-      'tag': ol.format.OSMXML.readTag_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'node': ol.format.OSMXML.readNode_,
-      'way': ol.format.OSMXML.readWay_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OSMXML.NODE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OSMXML.NAMESPACE_URIS_, {
-      'tag': ol.format.OSMXML.readTag_
-    });
-
-
-/**
- * Read all features from an OSM source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.OSMXML.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = this.getReadOptions(node, opt_options);
-  if (node.localName == 'osm') {
-    var state = ol.xml.pushParseAndPop({
-      nodes: {},
-      ways: [],
-      features: []
-    }, ol.format.OSMXML.PARSERS_, node, [options]);
-    // parse nodes in ways
-    for (var j = 0; j < state.ways.length; j++) {
-      var values = /** @type {Object} */ (state.ways[j]);
-      /** @type {Array.<number>} */
-      var flatCoordinates = [];
-      for (var i = 0, ii = values.ndrefs.length; i < ii; i++) {
-        var point = state.nodes[values.ndrefs[i]];
-        ol.array.extend(flatCoordinates, point);
-      }
-      var geometry;
-      if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {
-        // closed way
-        geometry = new ol.geom.Polygon(null);
-        geometry.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates,
-            [flatCoordinates.length]);
-      } else {
-        geometry = new ol.geom.LineString(null);
-        geometry.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-      }
-      ol.format.Feature.transformWithOptions(geometry, false, options);
-      var feature = new ol.Feature(geometry);
-      feature.setId(values.id);
-      feature.setProperties(values.tags);
-      state.features.push(feature);
-    }
-    if (state.features) {
-      return state.features;
-    }
-  }
-  return [];
-};
-
-
-/**
- * Read the projection from an OSM source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.OSMXML.prototype.readProjection;
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeFeatureNode = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeFeaturesNode = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.OSMXML.prototype.writeGeometryNode = function(geometry, opt_options) {};
-
-goog.provide('ol.format.XLink');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.XLink.NAMESPACE_URI = 'http://www.w3.org/1999/xlink';
-
-
-/**
- * @param {Node} node Node.
- * @return {boolean|undefined} Boolean.
- */
-ol.format.XLink.readHref = function(node) {
-  return node.getAttributeNS(ol.format.XLink.NAMESPACE_URI, 'href');
-};
-
-goog.provide('ol.format.XML');
-
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Generic format for reading non-feature XML data
- *
- * @constructor
- * @abstract
- * @struct
- */
-ol.format.XML = function() {
-};
-
-
-/**
- * @param {Document|Node|string} source Source.
- * @return {Object} The parsed result.
- */
-ol.format.XML.prototype.read = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFromDocument(/** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFromDocument(doc);
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * @abstract
- * @param {Document} doc Document.
- * @return {Object} Object
- */
-ol.format.XML.prototype.readFromDocument = function(doc) {};
-
-
-/**
- * @abstract
- * @param {Node} node Node.
- * @return {Object} Object
- */
-ol.format.XML.prototype.readFromNode = function(node) {};
-
-goog.provide('ol.format.OWS');
-
-goog.require('ol');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @constructor
- * @extends {ol.format.XML}
- */
-ol.format.OWS = function() {
-  ol.format.XML.call(this);
-};
-ol.inherits(ol.format.OWS, ol.format.XML);
-
-
-/**
- * @inheritDoc
- */
-ol.format.OWS.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.OWS.prototype.readFromNode = function(node) {
-  var owsObject = ol.xml.pushParseAndPop({},
-      ol.format.OWS.PARSERS_, node, []);
-  return owsObject ? owsObject : null;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The address.
- */
-ol.format.OWS.readAddress_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.ADDRESS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The values.
- */
-ol.format.OWS.readAllowedValues_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.ALLOWED_VALUES_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The constraint.
- */
-ol.format.OWS.readConstraint_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  if (!name) {
-    return undefined;
-  }
-  return ol.xml.pushParseAndPop({'name': name},
-      ol.format.OWS.CONSTRAINT_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The contact info.
- */
-ol.format.OWS.readContactInfo_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.CONTACT_INFO_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The DCP.
- */
-ol.format.OWS.readDcp_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.DCP_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The GET object.
- */
-ol.format.OWS.readGet_ = function(node, objectStack) {
-  var href = ol.format.XLink.readHref(node);
-  if (!href) {
-    return undefined;
-  }
-  return ol.xml.pushParseAndPop({'href': href},
-      ol.format.OWS.REQUEST_METHOD_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The HTTP object.
- */
-ol.format.OWS.readHttp_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({}, ol.format.OWS.HTTP_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The operation.
- */
-ol.format.OWS.readOperation_ = function(node, objectStack) {
-  var name = node.getAttribute('name');
-  var value = ol.xml.pushParseAndPop({},
-      ol.format.OWS.OPERATION_PARSERS_, node, objectStack);
-  if (!value) {
-    return undefined;
-  }
-  var object = /** @type {Object} */
-      (objectStack[objectStack.length - 1]);
-  object[name] = value;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The operations metadata.
- */
-ol.format.OWS.readOperationsMetadata_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.OPERATIONS_METADATA_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The phone.
- */
-ol.format.OWS.readPhone_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.OWS.PHONE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service identification.
- */
-ol.format.OWS.readServiceIdentification_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service contact.
- */
-ol.format.OWS.readServiceContact_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_CONTACT_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} The service provider.
- */
-ol.format.OWS.readServiceProvider_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.OWS.SERVICE_PROVIDER_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {string|undefined} The value.
- */
-ol.format.OWS.readValue_ = function(node, objectStack) {
-  return ol.format.XSD.readString(node);
-};
-
-
-/**
- * @const
- * @type {Array.<string>}
- * @private
- */
-ol.format.OWS.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/ows/1.1'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'ServiceIdentification': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readServiceIdentification_),
-      'ServiceProvider': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readServiceProvider_),
-      'OperationsMetadata': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readOperationsMetadata_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'DeliveryPoint': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'City': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'AdministrativeArea': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'PostalCode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Country': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'ElectronicMailAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.ALLOWED_VALUES_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Value': ol.xml.makeObjectPropertyPusher(ol.format.OWS.readValue_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.CONSTRAINT_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'AllowedValues': ol.xml.makeObjectPropertySetter(
-          ol.format.OWS.readAllowedValues_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.CONTACT_INFO_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Phone': ol.xml.makeObjectPropertySetter(ol.format.OWS.readPhone_),
-      'Address': ol.xml.makeObjectPropertySetter(ol.format.OWS.readAddress_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.DCP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'HTTP': ol.xml.makeObjectPropertySetter(ol.format.OWS.readHttp_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.HTTP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Get': ol.xml.makeObjectPropertyPusher(ol.format.OWS.readGet_),
-      'Post': undefined // TODO
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.OPERATION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'DCP': ol.xml.makeObjectPropertySetter(ol.format.OWS.readDcp_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.OPERATIONS_METADATA_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Operation': ol.format.OWS.readOperation_
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.PHONE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Voice': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Facsimile': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.REQUEST_METHOD_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.OWS.NAMESPACE_URIS_, {
-      'Constraint': ol.xml.makeObjectPropertyPusher(
-          ol.format.OWS.readConstraint_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_CONTACT_PARSERS_ =
-    ol.xml.makeStructureNS(
-        ol.format.OWS.NAMESPACE_URIS_, {
-          'IndividualName': ol.xml.makeObjectPropertySetter(
-              ol.format.XSD.readString),
-          'PositionName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'ContactInfo': ol.xml.makeObjectPropertySetter(
-              ol.format.OWS.readContactInfo_)
-        });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_IDENTIFICATION_PARSERS_ =
-    ol.xml.makeStructureNS(
-        ol.format.OWS.NAMESPACE_URIS_, {
-          'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'AccessConstraints': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'Fees': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'ServiceTypeVersion': ol.xml.makeObjectPropertySetter(
-              ol.format.XSD.readString),
-          'ServiceType': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-        });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.OWS.SERVICE_PROVIDER_PARSERS_ =
-    ol.xml.makeStructureNS(
-        ol.format.OWS.NAMESPACE_URIS_, {
-          'ProviderName': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-          'ProviderSite': ol.xml.makeObjectPropertySetter(ol.format.XLink.readHref),
-          'ServiceContact': ol.xml.makeObjectPropertySetter(
-              ol.format.OWS.readServiceContact_)
-        });
-
-goog.provide('ol.geom.flat.flip');
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @param {Array.<number>=} opt_dest Destination.
- * @param {number=} opt_destOffset Destination offset.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
-  var dest, destOffset;
-  if (opt_dest !== undefined) {
-    dest = opt_dest;
-    destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;
-  } else {
-    dest = [];
-    destOffset = 0;
-  }
-  var j = offset;
-  while (j < end) {
-    var x = flatCoordinates[j++];
-    dest[destOffset++] = flatCoordinates[j++];
-    dest[destOffset++] = x;
-    for (var k = 2; k < stride; ++k) {
-      dest[destOffset++] = flatCoordinates[j++];
-    }
-  }
-  dest.length = destOffset;
-  return dest;
-};
-
-goog.provide('ol.format.Polyline');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.flip');
-goog.require('ol.geom.flat.inflate');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the Encoded
- * Polyline Algorithm Format.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.PolylineOptions=} opt_options
- *     Optional configuration object.
- * @api
- */
-ol.format.Polyline = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get('EPSG:4326');
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.factor_ = options.factor ? options.factor : 1e5;
-
-  /**
-   * @private
-   * @type {ol.geom.GeometryLayout}
-   */
-  this.geometryLayout_ = options.geometryLayout ?
-    options.geometryLayout : ol.geom.GeometryLayout.XY;
-};
-ol.inherits(ol.format.Polyline, ol.format.TextFeature);
-
-
-/**
- * Encode a list of n-dimensional points and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of n-dimensional points.
- * @param {number} stride The number of dimension of the points in the list.
- * @param {number=} opt_factor The factor by which the numbers will be
- *     multiplied. The remaining decimal places will get rounded away.
- *     Default is `1e5`.
- * @return {string} The encoded string.
- * @api
- */
-ol.format.Polyline.encodeDeltas = function(numbers, stride, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var d;
-
-  var lastNumbers = new Array(stride);
-  for (d = 0; d < stride; ++d) {
-    lastNumbers[d] = 0;
-  }
-
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii;) {
-    for (d = 0; d < stride; ++d, ++i) {
-      var num = numbers[i];
-      var delta = num - lastNumbers[d];
-      lastNumbers[d] = num;
-
-      numbers[i] = delta;
-    }
-  }
-
-  return ol.format.Polyline.encodeFloats(numbers, factor);
-};
-
-
-/**
- * Decode a list of n-dimensional points from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @param {number} stride The number of dimension of the points in the
- *     encoded string.
- * @param {number=} opt_factor The factor by which the resulting numbers will
- *     be divided. Default is `1e5`.
- * @return {Array.<number>} A list of n-dimensional points.
- * @api
- */
-ol.format.Polyline.decodeDeltas = function(encoded, stride, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var d;
-
-  /** @type {Array.<number>} */
-  var lastNumbers = new Array(stride);
-  for (d = 0; d < stride; ++d) {
-    lastNumbers[d] = 0;
-  }
-
-  var numbers = ol.format.Polyline.decodeFloats(encoded, factor);
-
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii;) {
-    for (d = 0; d < stride; ++d, ++i) {
-      lastNumbers[d] += numbers[i];
-
-      numbers[i] = lastNumbers[d];
-    }
-  }
-
-  return numbers;
-};
-
-
-/**
- * Encode a list of floating point numbers and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of floating point numbers.
- * @param {number=} opt_factor The factor by which the numbers will be
- *     multiplied. The remaining decimal places will get rounded away.
- *     Default is `1e5`.
- * @return {string} The encoded string.
- * @api
- */
-ol.format.Polyline.encodeFloats = function(numbers, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    numbers[i] = Math.round(numbers[i] * factor);
-  }
-
-  return ol.format.Polyline.encodeSignedIntegers(numbers);
-};
-
-
-/**
- * Decode a list of floating point numbers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @param {number=} opt_factor The factor by which the result will be divided.
- *     Default is `1e5`.
- * @return {Array.<number>} A list of floating point numbers.
- * @api
- */
-ol.format.Polyline.decodeFloats = function(encoded, opt_factor) {
-  var factor = opt_factor ? opt_factor : 1e5;
-  var numbers = ol.format.Polyline.decodeSignedIntegers(encoded);
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    numbers[i] /= factor;
-  }
-  return numbers;
-};
-
-
-/**
- * Encode a list of signed integers and return an encoded string
- *
- * Attention: This function will modify the passed array!
- *
- * @param {Array.<number>} numbers A list of signed integers.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeSignedIntegers = function(numbers) {
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    var num = numbers[i];
-    numbers[i] = (num < 0) ? ~(num << 1) : (num << 1);
-  }
-  return ol.format.Polyline.encodeUnsignedIntegers(numbers);
-};
-
-
-/**
- * Decode a list of signed integers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @return {Array.<number>} A list of signed integers.
- */
-ol.format.Polyline.decodeSignedIntegers = function(encoded) {
-  var numbers = ol.format.Polyline.decodeUnsignedIntegers(encoded);
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    var num = numbers[i];
-    numbers[i] = (num & 1) ? ~(num >> 1) : (num >> 1);
-  }
-  return numbers;
-};
-
-
-/**
- * Encode a list of unsigned integers and return an encoded string
- *
- * @param {Array.<number>} numbers A list of unsigned integers.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeUnsignedIntegers = function(numbers) {
-  var encoded = '';
-  var i, ii;
-  for (i = 0, ii = numbers.length; i < ii; ++i) {
-    encoded += ol.format.Polyline.encodeUnsignedInteger(numbers[i]);
-  }
-  return encoded;
-};
-
-
-/**
- * Decode a list of unsigned integers from an encoded string
- *
- * @param {string} encoded An encoded string.
- * @return {Array.<number>} A list of unsigned integers.
- */
-ol.format.Polyline.decodeUnsignedIntegers = function(encoded) {
-  var numbers = [];
-  var current = 0;
-  var shift = 0;
-  var i, ii;
-  for (i = 0, ii = encoded.length; i < ii; ++i) {
-    var b = encoded.charCodeAt(i) - 63;
-    current |= (b & 0x1f) << shift;
-    if (b < 0x20) {
-      numbers.push(current);
-      current = 0;
-      shift = 0;
-    } else {
-      shift += 5;
-    }
-  }
-  return numbers;
-};
-
-
-/**
- * Encode one single unsigned integer and return an encoded string
- *
- * @param {number} num Unsigned integer that should be encoded.
- * @return {string} The encoded string.
- */
-ol.format.Polyline.encodeUnsignedInteger = function(num) {
-  var value, encoded = '';
-  while (num >= 0x20) {
-    value = (0x20 | (num & 0x1f)) + 63;
-    encoded += String.fromCharCode(value);
-    num >>= 5;
-  }
-  value = num + 63;
-  encoded += String.fromCharCode(value);
-  return encoded;
-};
-
-
-/**
- * Read the feature from the Polyline source. The coordinates are assumed to be
- * in two dimensions and in latitude, longitude order.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.Polyline.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readFeatureFromText = function(text, opt_options) {
-  var geometry = this.readGeometryFromText(text, opt_options);
-  return new ol.Feature(geometry);
-};
-
-
-/**
- * Read the feature from the source. As Polyline sources contain a single
- * feature, this will return the feature in an array.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.Polyline.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readFeaturesFromText = function(text, opt_options) {
-  var feature = this.readFeatureFromText(text, opt_options);
-  return [feature];
-};
-
-
-/**
- * Read the geometry from the source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.Polyline.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.readGeometryFromText = function(text, opt_options) {
-  var stride = ol.geom.SimpleGeometry.getStrideForLayout(this.geometryLayout_);
-  var flatCoordinates = ol.format.Polyline.decodeDeltas(
-      text, stride, this.factor_);
-  ol.geom.flat.flip.flipXY(
-      flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
-  var coordinates = ol.geom.flat.inflate.coordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-
-  return /** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(
-        new ol.geom.LineString(coordinates, this.geometryLayout_), false,
-        this.adaptOptions(opt_options)));
-};
-
-
-/**
- * Read the projection from a Polyline source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.format.Polyline.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeFeatureText = function(feature, opt_options) {
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    return this.writeGeometryText(geometry, opt_options);
-  } else {
-    ol.asserts.assert(false, 40); // Expected `feature` to have a geometry
-    return '';
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeFeaturesText = function(features, opt_options) {
-  return this.writeFeatureText(features[0], opt_options);
-};
-
-
-/**
- * Write a single geometry in Polyline format.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} Geometry.
- * @api
- */
-ol.format.Polyline.prototype.writeGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.Polyline.prototype.writeGeometryText = function(geometry, opt_options) {
-  geometry = /** @type {ol.geom.LineString} */
-    (ol.format.Feature.transformWithOptions(
-        geometry, true, this.adaptOptions(opt_options)));
-  var flatCoordinates = geometry.getFlatCoordinates();
-  var stride = geometry.getStride();
-  ol.geom.flat.flip.flipXY(
-      flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);
-  return ol.format.Polyline.encodeDeltas(flatCoordinates, stride, this.factor_);
-};
-
-goog.provide('ol.format.TopoJSON');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.JSONFeature');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Feature format for reading data in the TopoJSON format.
- *
- * @constructor
- * @extends {ol.format.JSONFeature}
- * @param {olx.format.TopoJSONOptions=} opt_options Options.
- * @api
- */
-ol.format.TopoJSON = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.JSONFeature.call(this);
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.layerName_ = options.layerName;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-  /**
-   * @inheritDoc
-   */
-  this.defaultDataProjection = ol.proj.get(
-      options.defaultDataProjection ?
-        options.defaultDataProjection : 'EPSG:4326');
-
-};
-ol.inherits(ol.format.TopoJSON, ol.format.JSONFeature);
-
-
-/**
- * Concatenate arcs into a coordinate array.
- * @param {Array.<number>} indices Indices of arcs to concatenate.  Negative
- *     values indicate arcs need to be reversed.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs (already
- *     transformed).
- * @return {Array.<ol.Coordinate>} Coordinates array.
- * @private
- */
-ol.format.TopoJSON.concatenateArcs_ = function(indices, arcs) {
-  /** @type {Array.<ol.Coordinate>} */
-  var coordinates = [];
-  var index, arc;
-  var i, ii;
-  var j, jj;
-  for (i = 0, ii = indices.length; i < ii; ++i) {
-    index = indices[i];
-    if (i > 0) {
-      // splicing together arcs, discard last point
-      coordinates.pop();
-    }
-    if (index >= 0) {
-      // forward arc
-      arc = arcs[index];
-    } else {
-      // reverse arc
-      arc = arcs[~index].slice().reverse();
-    }
-    coordinates.push.apply(coordinates, arc);
-  }
-  // provide fresh copies of coordinate arrays
-  for (j = 0, jj = coordinates.length; j < jj; ++j) {
-    coordinates[j] = coordinates[j].slice();
-  }
-  return coordinates;
-};
-
-
-/**
- * Create a point from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @return {ol.geom.Point} Geometry.
- * @private
- */
-ol.format.TopoJSON.readPointGeometry_ = function(object, scale, translate) {
-  var coordinates = object.coordinates;
-  if (scale && translate) {
-    ol.format.TopoJSON.transformVertex_(coordinates, scale, translate);
-  }
-  return new ol.geom.Point(coordinates);
-};
-
-
-/**
- * Create a multi-point from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @return {ol.geom.MultiPoint} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiPointGeometry_ = function(object, scale,
-    translate) {
-  var coordinates = object.coordinates;
-  var i, ii;
-  if (scale && translate) {
-    for (i = 0, ii = coordinates.length; i < ii; ++i) {
-      ol.format.TopoJSON.transformVertex_(coordinates[i], scale, translate);
-    }
-  }
-  return new ol.geom.MultiPoint(coordinates);
-};
-
-
-/**
- * Create a linestring from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.LineString} Geometry.
- * @private
- */
-ol.format.TopoJSON.readLineStringGeometry_ = function(object, arcs) {
-  var coordinates = ol.format.TopoJSON.concatenateArcs_(object.arcs, arcs);
-  return new ol.geom.LineString(coordinates);
-};
-
-
-/**
- * Create a multi-linestring from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.MultiLineString} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiLineStringGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    coordinates[i] = ol.format.TopoJSON.concatenateArcs_(object.arcs[i], arcs);
-  }
-  return new ol.geom.MultiLineString(coordinates);
-};
-
-
-/**
- * Create a polygon from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.Polygon} Geometry.
- * @private
- */
-ol.format.TopoJSON.readPolygonGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    coordinates[i] = ol.format.TopoJSON.concatenateArcs_(object.arcs[i], arcs);
-  }
-  return new ol.geom.Polygon(coordinates);
-};
-
-
-/**
- * Create a multi-polygon from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @return {ol.geom.MultiPolygon} Geometry.
- * @private
- */
-ol.format.TopoJSON.readMultiPolygonGeometry_ = function(object, arcs) {
-  var coordinates = [];
-  var polyArray, ringCoords, j, jj;
-  var i, ii;
-  for (i = 0, ii = object.arcs.length; i < ii; ++i) {
-    // for each polygon
-    polyArray = object.arcs[i];
-    ringCoords = [];
-    for (j = 0, jj = polyArray.length; j < jj; ++j) {
-      // for each ring
-      ringCoords[j] = ol.format.TopoJSON.concatenateArcs_(polyArray[j], arcs);
-    }
-    coordinates[i] = ringCoords;
-  }
-  return new ol.geom.MultiPolygon(coordinates);
-};
-
-
-/**
- * Create features from a TopoJSON GeometryCollection object.
- *
- * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry
- *     object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
- *     object to.
- * @param {string} name Name of the `Topology`'s child object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Array of features.
- * @private
- */
-ol.format.TopoJSON.readFeaturesFromGeometryCollection_ = function(
-    collection, arcs, scale, translate, property, name, opt_options) {
-  var geometries = collection.geometries;
-  var features = [];
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    features[i] = ol.format.TopoJSON.readFeatureFromGeometry_(
-        geometries[i], arcs, scale, translate, property, name, opt_options);
-  }
-  return features;
-};
-
-
-/**
- * Create a feature from a TopoJSON geometry object.
- *
- * @param {TopoJSONGeometry} object TopoJSON geometry object.
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @param {string|undefined} property Property to set the `GeometryCollection`'s parent
- *     object to.
- * @param {string} name Name of the `Topology`'s child object.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @private
- */
-ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs,
-    scale, translate, property, name, opt_options) {
-  var geometry;
-  var type = object.type;
-  var geometryReader = ol.format.TopoJSON.GEOMETRY_READERS_[type];
-  if ((type === 'Point') || (type === 'MultiPoint')) {
-    geometry = geometryReader(object, scale, translate);
-  } else {
-    geometry = geometryReader(object, arcs);
-  }
-  var feature = new ol.Feature();
-  feature.setGeometry(/** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(geometry, false, opt_options)));
-  if (object.id !== undefined) {
-    feature.setId(object.id);
-  }
-  var properties = object.properties;
-  if (property) {
-    if (!properties) {
-      properties = {};
-    }
-    properties[property] = name;
-  }
-  if (properties) {
-    feature.setProperties(properties);
-  }
-  return feature;
-};
-
-
-/**
- * Read all features from a TopoJSON source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.TopoJSON.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.readFeaturesFromObject = function(
-    object, opt_options) {
-  if (object.type == 'Topology') {
-    var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);
-    var transform, scale = null, translate = null;
-    if (topoJSONTopology.transform) {
-      transform = topoJSONTopology.transform;
-      scale = transform.scale;
-      translate = transform.translate;
-    }
-    var arcs = topoJSONTopology.arcs;
-    if (transform) {
-      ol.format.TopoJSON.transformArcs_(arcs, scale, translate);
-    }
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    var topoJSONFeatures = topoJSONTopology.objects;
-    var property = this.layerName_;
-    var objectName, feature;
-    for (objectName in topoJSONFeatures) {
-      if (this.layers_ && this.layers_.indexOf(objectName) == -1) {
-        continue;
-      }
-      if (topoJSONFeatures[objectName].type === 'GeometryCollection') {
-        feature = /** @type {TopoJSONGeometryCollection} */
-          (topoJSONFeatures[objectName]);
-        features.push.apply(features,
-            ol.format.TopoJSON.readFeaturesFromGeometryCollection_(
-                feature, arcs, scale, translate, property, objectName, opt_options));
-      } else {
-        feature = /** @type {TopoJSONGeometry} */
-          (topoJSONFeatures[objectName]);
-        features.push(ol.format.TopoJSON.readFeatureFromGeometry_(
-            feature, arcs, scale, translate, property, objectName, opt_options));
-      }
-    }
-    return features;
-  } else {
-    return [];
-  }
-};
-
-
-/**
- * Apply a linear transform to array of arcs.  The provided array of arcs is
- * modified in place.
- *
- * @param {Array.<Array.<ol.Coordinate>>} arcs Array of arcs.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformArcs_ = function(arcs, scale, translate) {
-  var i, ii;
-  for (i = 0, ii = arcs.length; i < ii; ++i) {
-    ol.format.TopoJSON.transformArc_(arcs[i], scale, translate);
-  }
-};
-
-
-/**
- * Apply a linear transform to an arc.  The provided arc is modified in place.
- *
- * @param {Array.<ol.Coordinate>} arc Arc.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformArc_ = function(arc, scale, translate) {
-  var x = 0;
-  var y = 0;
-  var vertex;
-  var i, ii;
-  for (i = 0, ii = arc.length; i < ii; ++i) {
-    vertex = arc[i];
-    x += vertex[0];
-    y += vertex[1];
-    vertex[0] = x;
-    vertex[1] = y;
-    ol.format.TopoJSON.transformVertex_(vertex, scale, translate);
-  }
-};
-
-
-/**
- * Apply a linear transform to a vertex.  The provided vertex is modified in
- * place.
- *
- * @param {ol.Coordinate} vertex Vertex.
- * @param {Array.<number>} scale Scale for each dimension.
- * @param {Array.<number>} translate Translation for each dimension.
- * @private
- */
-ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) {
-  vertex[0] = vertex[0] * scale[0] + translate[0];
-  vertex[1] = vertex[1] * scale[1] + translate[1];
-};
-
-
-/**
- * Read the projection from a TopoJSON source.
- *
- * @param {Document|Node|Object|string} object Source.
- * @return {ol.proj.Projection} Projection.
- * @override
- * @api
- */
-ol.format.TopoJSON.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.readProjectionFromObject = function(object) {
-  return this.defaultDataProjection;
-};
-
-
-/**
- * @const
- * @private
- * @type {Object.<string, function(TopoJSONGeometry, Array, ...Array): ol.geom.Geometry>}
- */
-ol.format.TopoJSON.GEOMETRY_READERS_ = {
-  'Point': ol.format.TopoJSON.readPointGeometry_,
-  'LineString': ol.format.TopoJSON.readLineStringGeometry_,
-  'Polygon': ol.format.TopoJSON.readPolygonGeometry_,
-  'MultiPoint': ol.format.TopoJSON.readMultiPointGeometry_,
-  'MultiLineString': ol.format.TopoJSON.readMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.TopoJSON.readMultiPolygonGeometry_
-};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeFeatureObject = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeFeaturesObject = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.TopoJSON.prototype.writeGeometryObject = function(geometry, opt_options) {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.TopoJSON.prototype.readGeometryFromObject = function() {};
-
-
-/**
- * Not implemented.
- * @override
- */
-ol.format.TopoJSON.prototype.readFeatureFromObject = function() {};
-
-goog.provide('ol.format.WFS');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.format.GML2');
-goog.require('ol.format.GML3');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.filter');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.format.XSD');
-goog.require('ol.geom.Geometry');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Feature format for reading and writing data in the WFS format.
- * By default, supports WFS version 1.1.0. You can pass a GML format
- * as option if you want to read a WFS that contains GML2 (WFS 1.0.0).
- * Also see {@link ol.format.GMLBase} which is used by this format.
- *
- * @constructor
- * @param {olx.format.WFSOptions=} opt_options
- *     Optional configuration object.
- * @extends {ol.format.XMLFeature}
- * @api
- */
-ol.format.WFS = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {Array.<string>|string|undefined}
-   */
-  this.featureType_ = options.featureType;
-
-  /**
-   * @private
-   * @type {Object.<string, string>|string|undefined}
-   */
-  this.featureNS_ = options.featureNS;
-
-  /**
-   * @private
-   * @type {ol.format.GMLBase}
-   */
-  this.gmlFormat_ = options.gmlFormat ?
-    options.gmlFormat : new ol.format.GML3();
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.schemaLocation_ = options.schemaLocation ?
-    options.schemaLocation :
-    ol.format.WFS.SCHEMA_LOCATIONS[ol.format.WFS.DEFAULT_VERSION];
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.WFS, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.FEATURE_PREFIX = 'feature';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.XMLNS = 'http://www.w3.org/2000/xmlns/';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.OGCNS = 'http://www.opengis.net/ogc';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.WFSNS = 'http://www.opengis.net/wfs';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.FESNS = 'http://www.opengis.net/fes';
-
-
-/**
- * @const
- * @type {Object.<string, string>}
- */
-ol.format.WFS.SCHEMA_LOCATIONS = {
-  '1.1.0': 'http://www.opengis.net/wfs ' +
-      'http://schemas.opengis.net/wfs/1.1.0/wfs.xsd',
-  '1.0.0': 'http://www.opengis.net/wfs ' +
-      'http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'
-};
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WFS.DEFAULT_VERSION = '1.1.0';
-
-
-/**
- * @return {Array.<string>|string|undefined} featureType
- */
-ol.format.WFS.prototype.getFeatureType = function() {
-  return this.featureType_;
-};
-
-
-/**
- * @param {Array.<string>|string|undefined} featureType Feature type(s) to parse.
- */
-ol.format.WFS.prototype.setFeatureType = function(featureType) {
-  this.featureType_ = featureType;
-};
-
-
-/**
- * Read all features from a WFS FeatureCollection.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WFS.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var context = /** @type {ol.XmlNodeStackItem} */ ({
-    'featureType': this.featureType_,
-    'featureNS': this.featureNS_
-  });
-  ol.obj.assign(context, this.getReadOptions(node,
-      opt_options ? opt_options : {}));
-  var objectStack = [context];
-  this.gmlFormat_.FEATURE_COLLECTION_PARSERS[ol.format.GMLBase.GMLNS][
-      'featureMember'] =
-      ol.xml.makeArrayPusher(ol.format.GMLBase.prototype.readFeaturesInternal);
-  var features = ol.xml.pushParseAndPop([],
-      this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,
-      objectStack, this.gmlFormat_);
-  if (!features) {
-    features = [];
-  }
-  return features;
-};
-
-
-/**
- * Read transaction response of the source.
- *
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- * @api
- */
-ol.format.WFS.prototype.readTransactionResponse = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readTransactionResponseFromDocument(
-        /** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readTransactionResponseFromNode(/** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readTransactionResponseFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * Read feature collection metadata of the source.
- *
- * @param {Document|Node|Object|string} source Source.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- * @api
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadata = function(source) {
-  if (ol.xml.isDocument(source)) {
-    return this.readFeatureCollectionMetadataFromDocument(
-        /** @type {Document} */ (source));
-  } else if (ol.xml.isNode(source)) {
-    return this.readFeatureCollectionMetadataFromNode(
-        /** @type {Node} */ (source));
-  } else if (typeof source === 'string') {
-    var doc = ol.xml.parse(source);
-    return this.readFeatureCollectionMetadataFromDocument(doc);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadataFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFeatureCollectionMetadataFromNode(n);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.FEATURE_COLLECTION_PARSERS_ = {
-  'http://www.opengis.net/gml': {
-    'boundedBy': ol.xml.makeObjectPropertySetter(
-        ol.format.GMLBase.prototype.readGeometryElement, 'bounds')
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {ol.WFSFeatureCollectionMetadata|undefined}
- *     FeatureCollection metadata.
- */
-ol.format.WFS.prototype.readFeatureCollectionMetadataFromNode = function(node) {
-  var result = {};
-  var value = ol.format.XSD.readNonNegativeIntegerString(
-      node.getAttribute('numberOfFeatures'));
-  result['numberOfFeatures'] = value;
-  return ol.xml.pushParseAndPop(
-      /** @type {ol.WFSFeatureCollectionMetadata} */ (result),
-      ol.format.WFS.FEATURE_COLLECTION_PARSERS_, node, [], this.gmlFormat_);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_SUMMARY_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'totalInserted': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger),
-    'totalUpdated': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger),
-    'totalDeleted': ol.xml.makeObjectPropertySetter(
-        ol.format.XSD.readNonNegativeInteger)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Transaction Summary.
- * @private
- */
-ol.format.WFS.readTransactionSummary_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WFS.TRANSACTION_SUMMARY_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.OGC_FID_PARSERS_ = {
-  'http://www.opengis.net/ogc': {
-    'FeatureId': ol.xml.makeArrayPusher(function(node, objectStack) {
-      return node.getAttribute('fid');
-    })
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- */
-ol.format.WFS.fidParser_ = function(node, objectStack) {
-  ol.xml.parseNode(ol.format.WFS.OGC_FID_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.INSERT_RESULTS_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Feature': ol.format.WFS.fidParser_
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<string>|undefined} Insert results.
- * @private
- */
-ol.format.WFS.readInsertResults_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      [], ol.format.WFS.INSERT_RESULTS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_ = {
-  'http://www.opengis.net/wfs': {
-    'TransactionSummary': ol.xml.makeObjectPropertySetter(
-        ol.format.WFS.readTransactionSummary_, 'transactionSummary'),
-    'InsertResults': ol.xml.makeObjectPropertySetter(
-        ol.format.WFS.readInsertResults_, 'insertIds')
-  }
-};
-
-
-/**
- * @param {Document} doc Document.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- */
-ol.format.WFS.prototype.readTransactionResponseFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readTransactionResponseFromNode(n);
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {Node} node Node.
- * @return {ol.WFSTransactionResponse|undefined} Transaction response.
- */
-ol.format.WFS.prototype.readTransactionResponseFromNode = function(node) {
-  return ol.xml.pushParseAndPop(
-      /** @type {ol.WFSTransactionResponse} */({}),
-      ol.format.WFS.TRANSACTION_RESPONSE_PARSERS_, node, []);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.QUERY_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'PropertyName': ol.xml.makeChildAppender(ol.format.XSD.writeStringTextNode)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeFeature_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  var featureType = context['featureType'];
-  var featureNS = context['featureNS'];
-  var gmlVersion = context['gmlVersion'];
-  var child = ol.xml.createElementNS(featureNS, featureType);
-  node.appendChild(child);
-  if (gmlVersion === 2) {
-    ol.format.GML2.prototype.writeFeatureElement(child, feature, objectStack);
-  } else {
-    ol.format.GML3.prototype.writeFeatureElement(child, feature, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {number|string} fid Feature identifier.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeOgcFidFilter_ = function(node, fid, objectStack) {
-  var filter = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-  var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'FeatureId');
-  filter.appendChild(child);
-  child.setAttribute('fid', fid);
-  node.appendChild(filter);
-};
-
-
-/**
- * @param {string|undefined} featurePrefix The prefix of the feature.
- * @param {string} featureType The type of the feature.
- * @returns {string} The value of the typeName property.
- * @private
- */
-ol.format.WFS.getTypeName_ = function(featurePrefix, featureType) {
-  featurePrefix = featurePrefix ? featurePrefix :
-    ol.format.WFS.FEATURE_PREFIX;
-  var prefix = featurePrefix + ':';
-  // The featureType already contains the prefix.
-  if (featureType.indexOf(prefix) === 0) {
-    return featureType;
-  } else {
-    return prefix + featureType;
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeDelete_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  ol.asserts.assert(feature.getId() !== undefined, 26); // Features must have an id set
-  var featureType = context['featureType'];
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  node.setAttribute('typeName', typeName);
-  ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-      featureNS);
-  var fid = feature.getId();
-  if (fid !== undefined) {
-    ol.format.WFS.writeOgcFidFilter_(node, fid, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.Feature} feature Feature.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeUpdate_ = function(node, feature, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  ol.asserts.assert(feature.getId() !== undefined, 27); // Features must have an id set
-  var featureType = context['featureType'];
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  var geometryName = feature.getGeometryName();
-  node.setAttribute('typeName', typeName);
-  ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-      featureNS);
-  var fid = feature.getId();
-  if (fid !== undefined) {
-    var keys = feature.getKeys();
-    var values = [];
-    for (var i = 0, ii = keys.length; i < ii; i++) {
-      var value = feature.get(keys[i]);
-      if (value !== undefined) {
-        var name = keys[i];
-        if (value instanceof ol.geom.Geometry) {
-          name = geometryName;
-        }
-        values.push({name: name, value: value});
-      }
-    }
-    ol.xml.pushSerializeAndPop(/** @type {ol.XmlNodeStackItem} */ (
-      {'gmlVersion': context['gmlVersion'], node: node,
-        'hasZ': context['hasZ'], 'srsName': context['srsName']}),
-    ol.format.WFS.TRANSACTION_SERIALIZERS_,
-    ol.xml.makeSimpleNodeFactory('Property'), values,
-    objectStack);
-    ol.format.WFS.writeOgcFidFilter_(node, fid, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Object} pair Property name and value.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeProperty_ = function(node, pair, objectStack) {
-  var name = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Name');
-  var context = objectStack[objectStack.length - 1];
-  var gmlVersion = context['gmlVersion'];
-  node.appendChild(name);
-  ol.format.XSD.writeStringTextNode(name, pair.name);
-  if (pair.value !== undefined && pair.value !== null) {
-    var value = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Value');
-    node.appendChild(value);
-    if (pair.value instanceof ol.geom.Geometry) {
-      if (gmlVersion === 2) {
-        ol.format.GML2.prototype.writeGeometryElement(value,
-            pair.value, objectStack);
-      } else {
-        ol.format.GML3.prototype.writeGeometryElement(value,
-            pair.value, objectStack);
-      }
-    } else {
-      ol.format.XSD.writeStringTextNode(value, pair.value);
-    }
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {{vendorId: string, safeToIgnore: boolean, value: string}}
- *     nativeElement The native element.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeNative_ = function(node, nativeElement, objectStack) {
-  if (nativeElement.vendorId) {
-    node.setAttribute('vendorId', nativeElement.vendorId);
-  }
-  if (nativeElement.safeToIgnore !== undefined) {
-    node.setAttribute('safeToIgnore', nativeElement.safeToIgnore);
-  }
-  if (nativeElement.value !== undefined) {
-    ol.format.XSD.writeStringTextNode(node, nativeElement.value);
-  }
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.TRANSACTION_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Insert': ol.xml.makeChildAppender(ol.format.WFS.writeFeature_),
-    'Update': ol.xml.makeChildAppender(ol.format.WFS.writeUpdate_),
-    'Delete': ol.xml.makeChildAppender(ol.format.WFS.writeDelete_),
-    'Property': ol.xml.makeChildAppender(ol.format.WFS.writeProperty_),
-    'Native': ol.xml.makeChildAppender(ol.format.WFS.writeNative_)
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} featureType Feature type.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeQuery_ = function(node, featureType, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var featurePrefix = context['featurePrefix'];
-  var featureNS = context['featureNS'];
-  var propertyNames = context['propertyNames'];
-  var srsName = context['srsName'];
-  var typeName;
-  // If feature prefix is not defined, we must not use the default prefix.
-  if (featurePrefix) {
-    typeName = ol.format.WFS.getTypeName_(featurePrefix, featureType);
-  } else {
-    typeName = featureType;
-  }
-  node.setAttribute('typeName', typeName);
-  if (srsName) {
-    node.setAttribute('srsName', srsName);
-  }
-  if (featureNS) {
-    ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
-        featureNS);
-  }
-  var item = /** @type {ol.XmlNodeStackItem} */ (ol.obj.assign({}, context));
-  item.node = node;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.QUERY_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('PropertyName'), propertyNames,
-      objectStack);
-  var filter = context['filter'];
-  if (filter) {
-    var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-    node.appendChild(child);
-    ol.format.WFS.writeFilterCondition_(child, filter, objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Filter} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeFilterCondition_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory(filter.getTagName()),
-      [filter], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Bbox} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeBboxFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.extent, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Contains} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeContainsFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Intersects} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIntersectsFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Within} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeWithinFilter_ = function(node, filter, objectStack) {
-  var context = objectStack[objectStack.length - 1];
-  context['srsName'] = filter.srsName;
-
-  ol.format.WFS.writeOgcPropertyName_(node, filter.geometryName);
-  ol.format.GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.During} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeDuringFilter_ = function(node, filter, objectStack) {
-
-  var valueReference = ol.xml.createElementNS(ol.format.WFS.FESNS, 'ValueReference');
-  ol.format.XSD.writeStringTextNode(valueReference, filter.propertyName);
-  node.appendChild(valueReference);
-
-  var timePeriod = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'TimePeriod');
-
-  node.appendChild(timePeriod);
-
-  var begin = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'begin');
-  timePeriod.appendChild(begin);
-  ol.format.WFS.writeTimeInstant_(begin, filter.begin);
-
-  var end = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'end');
-  timePeriod.appendChild(end);
-  ol.format.WFS.writeTimeInstant_(end, filter.end);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.LogicalNary} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeLogicalFilter_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  var conditions = filter.conditions;
-  for (var i = 0, ii = conditions.length; i < ii; ++i) {
-    var condition = conditions[i];
-    ol.xml.pushSerializeAndPop(item,
-        ol.format.WFS.GETFEATURE_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory(condition.getTagName()),
-        [condition], objectStack);
-  }
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.Not} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeNotFilter_ = function(node, filter, objectStack) {
-  /** @type {ol.XmlNodeStackItem} */
-  var item = {node: node};
-  var condition = filter.condition;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory(condition.getTagName()),
-      [condition], objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.ComparisonBinary} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeComparisonFilter_ = function(node, filter, objectStack) {
-  if (filter.matchCase !== undefined) {
-    node.setAttribute('matchCase', filter.matchCase.toString());
-  }
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-  ol.format.WFS.writeOgcLiteral_(node, '' + filter.expression);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsNull} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsNullFilter_ = function(node, filter, objectStack) {
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsBetween} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsBetweenFilter_ = function(node, filter, objectStack) {
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-
-  var lowerBoundary = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'LowerBoundary');
-  node.appendChild(lowerBoundary);
-  ol.format.WFS.writeOgcLiteral_(lowerBoundary, '' + filter.lowerBoundary);
-
-  var upperBoundary = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'UpperBoundary');
-  node.appendChild(upperBoundary);
-  ol.format.WFS.writeOgcLiteral_(upperBoundary, '' + filter.upperBoundary);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {ol.format.filter.IsLike} filter Filter.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeIsLikeFilter_ = function(node, filter, objectStack) {
-  node.setAttribute('wildCard', filter.wildCard);
-  node.setAttribute('singleChar', filter.singleChar);
-  node.setAttribute('escapeChar', filter.escapeChar);
-  if (filter.matchCase !== undefined) {
-    node.setAttribute('matchCase', filter.matchCase.toString());
-  }
-  ol.format.WFS.writeOgcPropertyName_(node, filter.propertyName);
-  ol.format.WFS.writeOgcLiteral_(node, '' + filter.pattern);
-};
-
-
-/**
- * @param {string} tagName Tag name.
- * @param {Node} node Node.
- * @param {string} value Value.
- * @private
- */
-ol.format.WFS.writeOgcExpression_ = function(tagName, node, value) {
-  var property = ol.xml.createElementNS(ol.format.WFS.OGCNS, tagName);
-  ol.format.XSD.writeStringTextNode(property, value);
-  node.appendChild(property);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value PropertyName value.
- * @private
- */
-ol.format.WFS.writeOgcPropertyName_ = function(node, value) {
-  ol.format.WFS.writeOgcExpression_('PropertyName', node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} value PropertyName value.
- * @private
- */
-ol.format.WFS.writeOgcLiteral_ = function(node, value) {
-  ol.format.WFS.writeOgcExpression_('Literal', node, value);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {string} time PropertyName value.
- * @private
- */
-ol.format.WFS.writeTimeInstant_ = function(node, time) {
-  var timeInstant = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'TimeInstant');
-  node.appendChild(timeInstant);
-
-  var timePosition = ol.xml.createElementNS(ol.format.GMLBase.GMLNS, 'timePosition');
-  timeInstant.appendChild(timePosition);
-  ol.format.XSD.writeStringTextNode(timePosition, time);
-};
-
-
-/**
- * @type {Object.<string, Object.<string, ol.XmlSerializer>>}
- * @private
- */
-ol.format.WFS.GETFEATURE_SERIALIZERS_ = {
-  'http://www.opengis.net/wfs': {
-    'Query': ol.xml.makeChildAppender(ol.format.WFS.writeQuery_)
-  },
-  'http://www.opengis.net/ogc': {
-    'During': ol.xml.makeChildAppender(ol.format.WFS.writeDuringFilter_),
-    'And': ol.xml.makeChildAppender(ol.format.WFS.writeLogicalFilter_),
-    'Or': ol.xml.makeChildAppender(ol.format.WFS.writeLogicalFilter_),
-    'Not': ol.xml.makeChildAppender(ol.format.WFS.writeNotFilter_),
-    'BBOX': ol.xml.makeChildAppender(ol.format.WFS.writeBboxFilter_),
-    'Contains': ol.xml.makeChildAppender(ol.format.WFS.writeContainsFilter_),
-    'Intersects': ol.xml.makeChildAppender(ol.format.WFS.writeIntersectsFilter_),
-    'Within': ol.xml.makeChildAppender(ol.format.WFS.writeWithinFilter_),
-    'PropertyIsEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsNotEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsLessThan': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsLessThanOrEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsGreaterThan': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsGreaterThanOrEqualTo': ol.xml.makeChildAppender(ol.format.WFS.writeComparisonFilter_),
-    'PropertyIsNull': ol.xml.makeChildAppender(ol.format.WFS.writeIsNullFilter_),
-    'PropertyIsBetween': ol.xml.makeChildAppender(ol.format.WFS.writeIsBetweenFilter_),
-    'PropertyIsLike': ol.xml.makeChildAppender(ol.format.WFS.writeIsLikeFilter_)
-  }
-};
-
-
-/**
- * Encode filter as WFS `Filter` and return the Node.
- *
- * @param {ol.format.filter.Filter} filter Filter.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.writeFilter = function(filter) {
-  var child = ol.xml.createElementNS(ol.format.WFS.OGCNS, 'Filter');
-  ol.format.WFS.writeFilterCondition_(child, filter, []);
-  return child;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<string>} featureTypes Feature types.
- * @param {Array.<*>} objectStack Node stack.
- * @private
- */
-ol.format.WFS.writeGetFeature_ = function(node, featureTypes, objectStack) {
-  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
-  var item = /** @type {ol.XmlNodeStackItem} */ (ol.obj.assign({}, context));
-  item.node = node;
-  ol.xml.pushSerializeAndPop(item,
-      ol.format.WFS.GETFEATURE_SERIALIZERS_,
-      ol.xml.makeSimpleNodeFactory('Query'), featureTypes,
-      objectStack);
-};
-
-
-/**
- * Encode format as WFS `GetFeature` and return the Node.
- *
- * @param {olx.format.WFSWriteGetFeatureOptions} options Options.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.prototype.writeGetFeature = function(options) {
-  var node = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'GetFeature');
-  node.setAttribute('service', 'WFS');
-  node.setAttribute('version', '1.1.0');
-  var filter;
-  if (options) {
-    if (options.handle) {
-      node.setAttribute('handle', options.handle);
-    }
-    if (options.outputFormat) {
-      node.setAttribute('outputFormat', options.outputFormat);
-    }
-    if (options.maxFeatures !== undefined) {
-      node.setAttribute('maxFeatures', options.maxFeatures);
-    }
-    if (options.resultType) {
-      node.setAttribute('resultType', options.resultType);
-    }
-    if (options.startIndex !== undefined) {
-      node.setAttribute('startIndex', options.startIndex);
-    }
-    if (options.count !== undefined) {
-      node.setAttribute('count', options.count);
-    }
-    filter = options.filter;
-    if (options.bbox) {
-      ol.asserts.assert(options.geometryName,
-          12); // `options.geometryName` must also be provided when `options.bbox` is set
-      var bbox = ol.format.filter.bbox(
-          /** @type {string} */ (options.geometryName), options.bbox, options.srsName);
-      if (filter) {
-        // if bbox and filter are both set, combine the two into a single filter
-        filter = ol.format.filter.and(filter, bbox);
-      } else {
-        filter = bbox;
-      }
-    }
-  }
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', this.schemaLocation_);
-  /** @type {ol.XmlNodeStackItem} */
-  var context = {
-    node: node,
-    'srsName': options.srsName,
-    'featureNS': options.featureNS ? options.featureNS : this.featureNS_,
-    'featurePrefix': options.featurePrefix,
-    'geometryName': options.geometryName,
-    'filter': filter,
-    'propertyNames': options.propertyNames ? options.propertyNames : []
-  };
-  ol.asserts.assert(Array.isArray(options.featureTypes),
-      11); // `options.featureTypes` should be an Array
-  ol.format.WFS.writeGetFeature_(node, /** @type {!Array.<string>} */ (options.featureTypes), [context]);
-  return node;
-};
-
-
-/**
- * Encode format as WFS `Transaction` and return the Node.
- *
- * @param {Array.<ol.Feature>} inserts The features to insert.
- * @param {Array.<ol.Feature>} updates The features to update.
- * @param {Array.<ol.Feature>} deletes The features to delete.
- * @param {olx.format.WFSWriteTransactionOptions} options Write options.
- * @return {Node} Result.
- * @api
- */
-ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes,
-    options) {
-  var objectStack = [];
-  var node = ol.xml.createElementNS(ol.format.WFS.WFSNS, 'Transaction');
-  var version = options.version ?
-    options.version : ol.format.WFS.DEFAULT_VERSION;
-  var gmlVersion = version === '1.0.0' ? 2 : 3;
-  node.setAttribute('service', 'WFS');
-  node.setAttribute('version', version);
-  var baseObj;
-  /** @type {ol.XmlNodeStackItem} */
-  var obj;
-  if (options) {
-    baseObj = options.gmlOptions ? options.gmlOptions : {};
-    if (options.handle) {
-      node.setAttribute('handle', options.handle);
-    }
-  }
-  var schemaLocation = ol.format.WFS.SCHEMA_LOCATIONS[version];
-  ol.xml.setAttributeNS(node, 'http://www.w3.org/2001/XMLSchema-instance',
-      'xsi:schemaLocation', schemaLocation);
-  var featurePrefix = options.featurePrefix ? options.featurePrefix : ol.format.WFS.FEATURE_PREFIX;
-  if (inserts) {
-    obj = {node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': featurePrefix,
-      'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName};
-    ol.obj.assign(obj, baseObj);
-    ol.xml.pushSerializeAndPop(obj,
-        ol.format.WFS.TRANSACTION_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory('Insert'), inserts,
-        objectStack);
-  }
-  if (updates) {
-    obj = {node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': featurePrefix,
-      'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName};
-    ol.obj.assign(obj, baseObj);
-    ol.xml.pushSerializeAndPop(obj,
-        ol.format.WFS.TRANSACTION_SERIALIZERS_,
-        ol.xml.makeSimpleNodeFactory('Update'), updates,
-        objectStack);
-  }
-  if (deletes) {
-    ol.xml.pushSerializeAndPop({node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': featurePrefix,
-      'gmlVersion': gmlVersion, 'srsName': options.srsName},
-    ol.format.WFS.TRANSACTION_SERIALIZERS_,
-    ol.xml.makeSimpleNodeFactory('Delete'), deletes,
-    objectStack);
-  }
-  if (options.nativeElements) {
-    ol.xml.pushSerializeAndPop({node: node, 'featureNS': options.featureNS,
-      'featureType': options.featureType, 'featurePrefix': featurePrefix,
-      'gmlVersion': gmlVersion, 'srsName': options.srsName},
-    ol.format.WFS.TRANSACTION_SERIALIZERS_,
-    ol.xml.makeSimpleNodeFactory('Native'), options.nativeElements,
-    objectStack);
-  }
-  return node;
-};
-
-
-/**
- * Read the projection from a WFS source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @return {?ol.proj.Projection} Projection.
- * @api
- */
-ol.format.WFS.prototype.readProjection;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readProjectionFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readProjectionFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WFS.prototype.readProjectionFromNode = function(node) {
-  if (node.firstElementChild &&
-      node.firstElementChild.firstElementChild) {
-    node = node.firstElementChild.firstElementChild;
-    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {
-      if (!(n.childNodes.length === 0 ||
-          (n.childNodes.length === 1 &&
-          n.firstChild.nodeType === 3))) {
-        var objectStack = [{}];
-        this.gmlFormat_.readGeometryElement(n, objectStack);
-        return ol.proj.get(objectStack.pop().srsName);
-      }
-    }
-  }
-
-  return null;
-};
-
-goog.provide('ol.format.WKT');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.format.Feature');
-goog.require('ol.format.TextFeature');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-
-
-/**
- * @classdesc
- * Geometry format for reading and writing data in the `WellKnownText` (WKT)
- * format.
- *
- * @constructor
- * @extends {ol.format.TextFeature}
- * @param {olx.format.WKTOptions=} opt_options Options.
- * @api
- */
-ol.format.WKT = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.format.TextFeature.call(this);
-
-  /**
-   * Split GeometryCollection into multiple features.
-   * @type {boolean}
-   * @private
-   */
-  this.splitCollection_ = options.splitCollection !== undefined ?
-    options.splitCollection : false;
-
-};
-ol.inherits(ol.format.WKT, ol.format.TextFeature);
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.EMPTY = 'EMPTY';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.Z = 'Z';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.M = 'M';
-
-
-/**
- * @const
- * @type {string}
- */
-ol.format.WKT.ZM = 'ZM';
-
-
-/**
- * @param {ol.geom.Point} geom Point geometry.
- * @return {string} Coordinates part of Point as WKT.
- * @private
- */
-ol.format.WKT.encodePointGeometry_ = function(geom) {
-  var coordinates = geom.getCoordinates();
-  if (coordinates.length === 0) {
-    return '';
-  }
-  return coordinates.join(' ');
-};
-
-
-/**
- * @param {ol.geom.MultiPoint} geom MultiPoint geometry.
- * @return {string} Coordinates part of MultiPoint as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiPointGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getPoints();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodePointGeometry_(components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.GeometryCollection} geom GeometryCollection geometry.
- * @return {string} Coordinates part of GeometryCollection as WKT.
- * @private
- */
-ol.format.WKT.encodeGeometryCollectionGeometry_ = function(geom) {
-  var array = [];
-  var geoms = geom.getGeometries();
-  for (var i = 0, ii = geoms.length; i < ii; ++i) {
-    array.push(ol.format.WKT.encode_(geoms[i]));
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.LineString|ol.geom.LinearRing} geom LineString geometry.
- * @return {string} Coordinates part of LineString as WKT.
- * @private
- */
-ol.format.WKT.encodeLineStringGeometry_ = function(geom) {
-  var coordinates = geom.getCoordinates();
-  var array = [];
-  for (var i = 0, ii = coordinates.length; i < ii; ++i) {
-    array.push(coordinates[i].join(' '));
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.MultiLineString} geom MultiLineString geometry.
- * @return {string} Coordinates part of MultiLineString as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiLineStringGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getLineStrings();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodeLineStringGeometry_(
-        components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.Polygon} geom Polygon geometry.
- * @return {string} Coordinates part of Polygon as WKT.
- * @private
- */
-ol.format.WKT.encodePolygonGeometry_ = function(geom) {
-  var array = [];
-  var rings = geom.getLinearRings();
-  for (var i = 0, ii = rings.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodeLineStringGeometry_(
-        rings[i]) + ')');
-  }
-  return array.join(',');
-};
-
-
-/**
- * @param {ol.geom.MultiPolygon} geom MultiPolygon geometry.
- * @return {string} Coordinates part of MultiPolygon as WKT.
- * @private
- */
-ol.format.WKT.encodeMultiPolygonGeometry_ = function(geom) {
-  var array = [];
-  var components = geom.getPolygons();
-  for (var i = 0, ii = components.length; i < ii; ++i) {
-    array.push('(' + ol.format.WKT.encodePolygonGeometry_(
-        components[i]) + ')');
-  }
-  return array.join(',');
-};
-
-/**
- * @param {ol.geom.SimpleGeometry} geom SimpleGeometry geometry.
- * @return {string} Potential dimensional information for WKT type.
- * @private
- */
-ol.format.WKT.encodeGeometryLayout_ = function(geom) {
-  var layout = geom.getLayout();
-  var dimInfo = '';
-  if (layout === ol.geom.GeometryLayout.XYZ || layout === ol.geom.GeometryLayout.XYZM) {
-    dimInfo += ol.format.WKT.Z;
-  }
-  if (layout === ol.geom.GeometryLayout.XYM || layout === ol.geom.GeometryLayout.XYZM) {
-    dimInfo += ol.format.WKT.M;
-  }
-  return dimInfo;
-};
-
-
-/**
- * Encode a geometry as WKT.
- * @param {ol.geom.Geometry} geom The geometry to encode.
- * @return {string} WKT string for the geometry.
- * @private
- */
-ol.format.WKT.encode_ = function(geom) {
-  var type = geom.getType();
-  var geometryEncoder = ol.format.WKT.GeometryEncoder_[type];
-  var enc = geometryEncoder(geom);
-  type = type.toUpperCase();
-  if (geom instanceof ol.geom.SimpleGeometry) {
-    var dimInfo = ol.format.WKT.encodeGeometryLayout_(geom);
-    if (dimInfo.length > 0) {
-      type += ' ' + dimInfo;
-    }
-  }
-  if (enc.length === 0) {
-    return type + ' ' + ol.format.WKT.EMPTY;
-  }
-  return type + '(' + enc + ')';
-};
-
-
-/**
- * @const
- * @type {Object.<string, function(ol.geom.Geometry): string>}
- * @private
- */
-ol.format.WKT.GeometryEncoder_ = {
-  'Point': ol.format.WKT.encodePointGeometry_,
-  'LineString': ol.format.WKT.encodeLineStringGeometry_,
-  'Polygon': ol.format.WKT.encodePolygonGeometry_,
-  'MultiPoint': ol.format.WKT.encodeMultiPointGeometry_,
-  'MultiLineString': ol.format.WKT.encodeMultiLineStringGeometry_,
-  'MultiPolygon': ol.format.WKT.encodeMultiPolygonGeometry_,
-  'GeometryCollection': ol.format.WKT.encodeGeometryCollectionGeometry_
-};
-
-
-/**
- * Parse a WKT string.
- * @param {string} wkt WKT string.
- * @return {ol.geom.Geometry|undefined}
- *     The geometry created.
- * @private
- */
-ol.format.WKT.prototype.parse_ = function(wkt) {
-  var lexer = new ol.format.WKT.Lexer(wkt);
-  var parser = new ol.format.WKT.Parser(lexer);
-  return parser.parse();
-};
-
-
-/**
- * Read a feature from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.Feature} Feature.
- * @api
- */
-ol.format.WKT.prototype.readFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readFeatureFromText = function(text, opt_options) {
-  var geom = this.readGeometryFromText(text, opt_options);
-  if (geom) {
-    var feature = new ol.Feature();
-    feature.setGeometry(geom);
-    return feature;
-  }
-  return null;
-};
-
-
-/**
- * Read all features from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WKT.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readFeaturesFromText = function(text, opt_options) {
-  var geometries = [];
-  var geometry = this.readGeometryFromText(text, opt_options);
-  if (this.splitCollection_ &&
-      geometry.getType() == ol.geom.GeometryType.GEOMETRY_COLLECTION) {
-    geometries = (/** @type {ol.geom.GeometryCollection} */ (geometry))
-        .getGeometriesArray();
-  } else {
-    geometries = [geometry];
-  }
-  var feature, features = [];
-  for (var i = 0, ii = geometries.length; i < ii; ++i) {
-    feature = new ol.Feature();
-    feature.setGeometry(geometries[i]);
-    features.push(feature);
-  }
-  return features;
-};
-
-
-/**
- * Read a single geometry from a WKT source.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Read options.
- * @return {ol.geom.Geometry} Geometry.
- * @api
- */
-ol.format.WKT.prototype.readGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.readGeometryFromText = function(text, opt_options) {
-  var geometry = this.parse_(text);
-  if (geometry) {
-    return /** @type {ol.geom.Geometry} */ (
-      ol.format.Feature.transformWithOptions(geometry, false, opt_options));
-  } else {
-    return null;
-  }
-};
-
-
-/**
- * Encode a feature as a WKT string.
- *
- * @function
- * @param {ol.Feature} feature Feature.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeFeature;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeFeatureText = function(feature, opt_options) {
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    return this.writeGeometryText(geometry, opt_options);
-  }
-  return '';
-};
-
-
-/**
- * Encode an array of features as a WKT string.
- *
- * @function
- * @param {Array.<ol.Feature>} features Features.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeFeaturesText = function(features, opt_options) {
-  if (features.length == 1) {
-    return this.writeFeatureText(features[0], opt_options);
-  }
-  var geometries = [];
-  for (var i = 0, ii = features.length; i < ii; ++i) {
-    geometries.push(features[i].getGeometry());
-  }
-  var collection = new ol.geom.GeometryCollection(geometries);
-  return this.writeGeometryText(collection, opt_options);
-};
-
-
-/**
- * Write a single geometry as a WKT string.
- *
- * @function
- * @param {ol.geom.Geometry} geometry Geometry.
- * @param {olx.format.WriteOptions=} opt_options Write options.
- * @return {string} WKT string.
- * @api
- */
-ol.format.WKT.prototype.writeGeometry;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WKT.prototype.writeGeometryText = function(geometry, opt_options) {
-  return ol.format.WKT.encode_(/** @type {ol.geom.Geometry} */ (
-    ol.format.Feature.transformWithOptions(geometry, true, opt_options)));
-};
-
-
-/**
- * @const
- * @enum {number}
- * @private
- */
-ol.format.WKT.TokenType_ = {
-  TEXT: 1,
-  LEFT_PAREN: 2,
-  RIGHT_PAREN: 3,
-  NUMBER: 4,
-  COMMA: 5,
-  EOF: 6
-};
-
-
-/**
- * Class to tokenize a WKT string.
- * @param {string} wkt WKT string.
- * @constructor
- * @protected
- */
-ol.format.WKT.Lexer = function(wkt) {
-
-  /**
-   * @type {string}
-   */
-  this.wkt = wkt;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.index_ = -1;
-};
-
-
-/**
- * @param {string} c Character.
- * @return {boolean} Whether the character is alphabetic.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isAlpha_ = function(c) {
-  return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';
-};
-
-
-/**
- * @param {string} c Character.
- * @param {boolean=} opt_decimal Whether the string number
- *     contains a dot, i.e. is a decimal number.
- * @return {boolean} Whether the character is numeric.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isNumeric_ = function(c, opt_decimal) {
-  var decimal = opt_decimal !== undefined ? opt_decimal : false;
-  return c >= '0' && c <= '9' || c == '.' && !decimal;
-};
-
-
-/**
- * @param {string} c Character.
- * @return {boolean} Whether the character is whitespace.
- * @private
- */
-ol.format.WKT.Lexer.prototype.isWhiteSpace_ = function(c) {
-  return c == ' ' || c == '\t' || c == '\r' || c == '\n';
-};
-
-
-/**
- * @return {string} Next string character.
- * @private
- */
-ol.format.WKT.Lexer.prototype.nextChar_ = function() {
-  return this.wkt.charAt(++this.index_);
-};
-
-
-/**
- * Fetch and return the next token.
- * @return {!ol.WKTToken} Next string token.
- */
-ol.format.WKT.Lexer.prototype.nextToken = function() {
-  var c = this.nextChar_();
-  var token = {position: this.index_, value: c};
-
-  if (c == '(') {
-    token.type = ol.format.WKT.TokenType_.LEFT_PAREN;
-  } else if (c == ',') {
-    token.type = ol.format.WKT.TokenType_.COMMA;
-  } else if (c == ')') {
-    token.type = ol.format.WKT.TokenType_.RIGHT_PAREN;
-  } else if (this.isNumeric_(c) || c == '-') {
-    token.type = ol.format.WKT.TokenType_.NUMBER;
-    token.value = this.readNumber_();
-  } else if (this.isAlpha_(c)) {
-    token.type = ol.format.WKT.TokenType_.TEXT;
-    token.value = this.readText_();
-  } else if (this.isWhiteSpace_(c)) {
-    return this.nextToken();
-  } else if (c === '') {
-    token.type = ol.format.WKT.TokenType_.EOF;
-  } else {
-    throw new Error('Unexpected character: ' + c);
-  }
-
-  return token;
-};
-
-
-/**
- * @return {number} Numeric token value.
- * @private
- */
-ol.format.WKT.Lexer.prototype.readNumber_ = function() {
-  var c, index = this.index_;
-  var decimal = false;
-  var scientificNotation = false;
-  do {
-    if (c == '.') {
-      decimal = true;
-    } else if (c == 'e' || c == 'E') {
-      scientificNotation = true;
-    }
-    c = this.nextChar_();
-  } while (
-    this.isNumeric_(c, decimal) ||
-      // if we haven't detected a scientific number before, 'e' or 'E'
-      // hint that we should continue to read
-      !scientificNotation && (c == 'e' || c == 'E') ||
-      // once we know that we have a scientific number, both '-' and '+'
-      // are allowed
-      scientificNotation && (c == '-' || c == '+')
-  );
-  return parseFloat(this.wkt.substring(index, this.index_--));
-};
-
-
-/**
- * @return {string} String token value.
- * @private
- */
-ol.format.WKT.Lexer.prototype.readText_ = function() {
-  var c, index = this.index_;
-  do {
-    c = this.nextChar_();
-  } while (this.isAlpha_(c));
-  return this.wkt.substring(index, this.index_--).toUpperCase();
-};
-
-
-/**
- * Class to parse the tokens from the WKT string.
- * @param {ol.format.WKT.Lexer} lexer The lexer.
- * @constructor
- * @protected
- */
-ol.format.WKT.Parser = function(lexer) {
-
-  /**
-   * @type {ol.format.WKT.Lexer}
-   * @private
-   */
-  this.lexer_ = lexer;
-
-  /**
-   * @type {ol.WKTToken}
-   * @private
-   */
-  this.token_;
-
-  /**
-   * @type {ol.geom.GeometryLayout}
-   * @private
-   */
-  this.layout_ = ol.geom.GeometryLayout.XY;
-};
-
-
-/**
- * Fetch the next token form the lexer and replace the active token.
- * @private
- */
-ol.format.WKT.Parser.prototype.consume_ = function() {
-  this.token_ = this.lexer_.nextToken();
-};
-
-/**
- * Tests if the given type matches the type of the current token.
- * @param {ol.format.WKT.TokenType_} type Token type.
- * @return {boolean} Whether the token matches the given type.
- */
-ol.format.WKT.Parser.prototype.isTokenType = function(type) {
-  var isMatch = this.token_.type == type;
-  return isMatch;
-};
-
-
-/**
- * If the given type matches the current token, consume it.
- * @param {ol.format.WKT.TokenType_} type Token type.
- * @return {boolean} Whether the token matches the given type.
- */
-ol.format.WKT.Parser.prototype.match = function(type) {
-  var isMatch = this.isTokenType(type);
-  if (isMatch) {
-    this.consume_();
-  }
-  return isMatch;
-};
-
-
-/**
- * Try to parse the tokens provided by the lexer.
- * @return {ol.geom.Geometry} The geometry.
- */
-ol.format.WKT.Parser.prototype.parse = function() {
-  this.consume_();
-  var geometry = this.parseGeometry_();
-  return geometry;
-};
-
-
-/**
- * Try to parse the dimensional info.
- * @return {ol.geom.GeometryLayout} The layout.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometryLayout_ = function() {
-  var layout = ol.geom.GeometryLayout.XY;
-  var dimToken = this.token_;
-  if (this.isTokenType(ol.format.WKT.TokenType_.TEXT)) {
-    var dimInfo = dimToken.value;
-    if (dimInfo === ol.format.WKT.Z) {
-      layout = ol.geom.GeometryLayout.XYZ;
-    } else if (dimInfo === ol.format.WKT.M) {
-      layout = ol.geom.GeometryLayout.XYM;
-    } else if (dimInfo === ol.format.WKT.ZM) {
-      layout = ol.geom.GeometryLayout.XYZM;
-    }
-    if (layout !== ol.geom.GeometryLayout.XY) {
-      this.consume_();
-    }
-  }
-  return layout;
-};
-
-
-/**
- * @return {!ol.geom.Geometry} The geometry.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometry_ = function() {
-  var token = this.token_;
-  if (this.match(ol.format.WKT.TokenType_.TEXT)) {
-    var geomType = token.value;
-    this.layout_ = this.parseGeometryLayout_();
-    if (geomType == ol.geom.GeometryType.GEOMETRY_COLLECTION.toUpperCase()) {
-      var geometries = this.parseGeometryCollectionText_();
-      return new ol.geom.GeometryCollection(geometries);
-    } else {
-      var parser = ol.format.WKT.Parser.GeometryParser_[geomType];
-      var ctor = ol.format.WKT.Parser.GeometryConstructor_[geomType];
-      if (!parser || !ctor) {
-        throw new Error('Invalid geometry type: ' + geomType);
-      }
-      var coordinates = parser.call(this);
-      return new ctor(coordinates, this.layout_);
-    }
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<ol.geom.Geometry>} A collection of geometries.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseGeometryCollectionText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var geometries = [];
-    do {
-      geometries.push(this.parseGeometry_());
-    } while (this.match(ol.format.WKT.TokenType_.COMMA));
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return geometries;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {Array.<number>} All values in a point.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePoint_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return null;
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a linestring.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseLineStringText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePointList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a polygon.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePolygonText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parseLineStringTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All points in a multipoint.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiPointText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates;
-    if (this.token_.type == ol.format.WKT.TokenType_.LEFT_PAREN) {
-      coordinates = this.parsePointTextList_();
-    } else {
-      coordinates = this.parsePointList_();
-    }
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All linestring points
- *                                        in a multilinestring.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiLineStringText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parseLineStringTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} All polygon points in a multipolygon.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseMultiPolygonText_ = function() {
-  if (this.match(ol.format.WKT.TokenType_.LEFT_PAREN)) {
-    var coordinates = this.parsePolygonTextList_();
-    if (this.match(ol.format.WKT.TokenType_.RIGHT_PAREN)) {
-      return coordinates;
-    }
-  } else if (this.isEmptyGeometry_()) {
-    return [];
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<number>} A point.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePoint_ = function() {
-  var coordinates = [];
-  var dimensions = this.layout_.length;
-  for (var i = 0; i < dimensions; ++i) {
-    var token = this.token_;
-    if (this.match(ol.format.WKT.TokenType_.NUMBER)) {
-      coordinates.push(token.value);
-    } else {
-      break;
-    }
-  }
-  if (coordinates.length == dimensions) {
-    return coordinates;
-  }
-  throw new Error(this.formatErrorMessage_());
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointList_ = function() {
-  var coordinates = [this.parsePoint_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePoint_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePointTextList_ = function() {
-  var coordinates = [this.parsePointText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePointText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parseLineStringTextList_ = function() {
-  var coordinates = [this.parseLineStringText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parseLineStringText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {!Array.<!Array.<number>>} An array of points.
- * @private
- */
-ol.format.WKT.Parser.prototype.parsePolygonTextList_ = function() {
-  var coordinates = [this.parsePolygonText_()];
-  while (this.match(ol.format.WKT.TokenType_.COMMA)) {
-    coordinates.push(this.parsePolygonText_());
-  }
-  return coordinates;
-};
-
-
-/**
- * @return {boolean} Whether the token implies an empty geometry.
- * @private
- */
-ol.format.WKT.Parser.prototype.isEmptyGeometry_ = function() {
-  var isEmpty = this.isTokenType(ol.format.WKT.TokenType_.TEXT) &&
-      this.token_.value == ol.format.WKT.EMPTY;
-  if (isEmpty) {
-    this.consume_();
-  }
-  return isEmpty;
-};
-
-
-/**
- * Create an error message for an unexpected token error.
- * @return {string} Error message.
- * @private
- */
-ol.format.WKT.Parser.prototype.formatErrorMessage_ = function() {
-  return 'Unexpected `' + this.token_.value + '` at position ' +
-      this.token_.position + ' in `' + this.lexer_.wkt + '`';
-};
-
-
-/**
- * @enum {function (new:ol.geom.Geometry, Array, ol.geom.GeometryLayout)}
- * @private
- */
-ol.format.WKT.Parser.GeometryConstructor_ = {
-  'POINT': ol.geom.Point,
-  'LINESTRING': ol.geom.LineString,
-  'POLYGON': ol.geom.Polygon,
-  'MULTIPOINT': ol.geom.MultiPoint,
-  'MULTILINESTRING': ol.geom.MultiLineString,
-  'MULTIPOLYGON': ol.geom.MultiPolygon
-};
-
-
-/**
- * @enum {(function(): Array)}
- * @private
- */
-ol.format.WKT.Parser.GeometryParser_ = {
-  'POINT': ol.format.WKT.Parser.prototype.parsePointText_,
-  'LINESTRING': ol.format.WKT.Parser.prototype.parseLineStringText_,
-  'POLYGON': ol.format.WKT.Parser.prototype.parsePolygonText_,
-  'MULTIPOINT': ol.format.WKT.Parser.prototype.parseMultiPointText_,
-  'MULTILINESTRING': ol.format.WKT.Parser.prototype.parseMultiLineStringText_,
-  'MULTIPOLYGON': ol.format.WKT.Parser.prototype.parseMultiPolygonText_
-};
-
-goog.provide('ol.format.WMSCapabilities');
-
-goog.require('ol');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMS capabilities data
- *
- * @constructor
- * @extends {ol.format.XML}
- * @api
- */
-ol.format.WMSCapabilities = function() {
-
-  ol.format.XML.call(this);
-
-  /**
-   * @type {string|undefined}
-   */
-  this.version = undefined;
-};
-ol.inherits(ol.format.WMSCapabilities, ol.format.XML);
-
-
-/**
- * Read a WMS capabilities document.
- *
- * @function
- * @param {Document|Node|string} source The XML source.
- * @return {Object} An object representing the WMS capabilities.
- * @api
- */
-ol.format.WMSCapabilities.prototype.read;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSCapabilities.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSCapabilities.prototype.readFromNode = function(node) {
-  this.version = node.getAttribute('version').trim();
-  var wmsCapabilityObject = ol.xml.pushParseAndPop({
-    'version': this.version
-  }, ol.format.WMSCapabilities.PARSERS_, node, []);
-  return wmsCapabilityObject ? wmsCapabilityObject : null;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Attribution object.
- */
-ol.format.WMSCapabilities.readAttribution_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object} Bounding box object.
- */
-ol.format.WMSCapabilities.readBoundingBox_ = function(node, objectStack) {
-  var extent = [
-    ol.format.XSD.readDecimalString(node.getAttribute('minx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('miny')),
-    ol.format.XSD.readDecimalString(node.getAttribute('maxx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('maxy'))
-  ];
-
-  var resolutions = [
-    ol.format.XSD.readDecimalString(node.getAttribute('resx')),
-    ol.format.XSD.readDecimalString(node.getAttribute('resy'))
-  ];
-
-  return {
-    'crs': node.getAttribute('CRS'),
-    'extent': extent,
-    'res': resolutions
-  };
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {ol.Extent|undefined} Bounding box object.
- */
-ol.format.WMSCapabilities.readEXGeographicBoundingBox_ = function(node, objectStack) {
-  var geographicBoundingBox = ol.xml.pushParseAndPop(
-      {},
-      ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_,
-      node, objectStack);
-  if (!geographicBoundingBox) {
-    return undefined;
-  }
-  var westBoundLongitude = /** @type {number|undefined} */
-        (geographicBoundingBox['westBoundLongitude']);
-  var southBoundLatitude = /** @type {number|undefined} */
-        (geographicBoundingBox['southBoundLatitude']);
-  var eastBoundLongitude = /** @type {number|undefined} */
-        (geographicBoundingBox['eastBoundLongitude']);
-  var northBoundLatitude = /** @type {number|undefined} */
-        (geographicBoundingBox['northBoundLatitude']);
-  if (westBoundLongitude === undefined || southBoundLatitude === undefined ||
-        eastBoundLongitude === undefined || northBoundLatitude === undefined) {
-    return undefined;
-  }
-  return [
-    westBoundLongitude, southBoundLatitude,
-    eastBoundLongitude, northBoundLatitude
-  ];
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Capability object.
- */
-ol.format.WMSCapabilities.readCapability_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.CAPABILITY_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Service object.
- */
-ol.format.WMSCapabilities.readService_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.SERVICE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact information object.
- */
-ol.format.WMSCapabilities.readContactInformation_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact person object.
- */
-ol.format.WMSCapabilities.readContactPersonPrimary_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Contact address object.
- */
-ol.format.WMSCapabilities.readContactAddress_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Array.<string>|undefined} Format array.
- */
-ol.format.WMSCapabilities.readException_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      [], ol.format.WMSCapabilities.EXCEPTION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @private
- * @return {Object|undefined} Layer object.
- */
-ol.format.WMSCapabilities.readCapabilityLayer_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.LAYER_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Layer object.
- */
-ol.format.WMSCapabilities.readLayer_ = function(node, objectStack) {
-  var parentLayerObject = /**  @type {Object.<string,*>} */
-        (objectStack[objectStack.length - 1]);
-
-  var layerObject = ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.LAYER_PARSERS_, node, objectStack);
-
-  if (!layerObject) {
-    return undefined;
-  }
-  var queryable =
-        ol.format.XSD.readBooleanString(node.getAttribute('queryable'));
-  if (queryable === undefined) {
-    queryable = parentLayerObject['queryable'];
-  }
-  layerObject['queryable'] = queryable !== undefined ? queryable : false;
-
-  var cascaded = ol.format.XSD.readNonNegativeIntegerString(
-      node.getAttribute('cascaded'));
-  if (cascaded === undefined) {
-    cascaded = parentLayerObject['cascaded'];
-  }
-  layerObject['cascaded'] = cascaded;
-
-  var opaque = ol.format.XSD.readBooleanString(node.getAttribute('opaque'));
-  if (opaque === undefined) {
-    opaque = parentLayerObject['opaque'];
-  }
-  layerObject['opaque'] = opaque !== undefined ? opaque : false;
-
-  var noSubsets =
-        ol.format.XSD.readBooleanString(node.getAttribute('noSubsets'));
-  if (noSubsets === undefined) {
-    noSubsets = parentLayerObject['noSubsets'];
-  }
-  layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;
-
-  var fixedWidth =
-        ol.format.XSD.readDecimalString(node.getAttribute('fixedWidth'));
-  if (!fixedWidth) {
-    fixedWidth = parentLayerObject['fixedWidth'];
-  }
-  layerObject['fixedWidth'] = fixedWidth;
-
-  var fixedHeight =
-        ol.format.XSD.readDecimalString(node.getAttribute('fixedHeight'));
-  if (!fixedHeight) {
-    fixedHeight = parentLayerObject['fixedHeight'];
-  }
-  layerObject['fixedHeight'] = fixedHeight;
-
-  // See 7.2.4.8
-  var addKeys = ['Style', 'CRS', 'AuthorityURL'];
-  addKeys.forEach(function(key) {
-    if (key in parentLayerObject) {
-      var childValue = layerObject[key] || [];
-      layerObject[key] = childValue.concat(parentLayerObject[key]);
-    }
-  });
-
-  var replaceKeys = ['EX_GeographicBoundingBox', 'BoundingBox', 'Dimension',
-    'Attribution', 'MinScaleDenominator', 'MaxScaleDenominator'];
-  replaceKeys.forEach(function(key) {
-    if (!(key in layerObject)) {
-      var parentValue = parentLayerObject[key];
-      layerObject[key] = parentValue;
-    }
-  });
-
-  return layerObject;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object} Dimension object.
- */
-ol.format.WMSCapabilities.readDimension_ = function(node, objectStack) {
-  var dimensionObject = {
-    'name': node.getAttribute('name'),
-    'units': node.getAttribute('units'),
-    'unitSymbol': node.getAttribute('unitSymbol'),
-    'default': node.getAttribute('default'),
-    'multipleValues': ol.format.XSD.readBooleanString(
-        node.getAttribute('multipleValues')),
-    'nearestValue': ol.format.XSD.readBooleanString(
-        node.getAttribute('nearestValue')),
-    'current': ol.format.XSD.readBooleanString(node.getAttribute('current')),
-    'values': ol.format.XSD.readString(node)
-  };
-  return dimensionObject;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Online resource object.
- */
-ol.format.WMSCapabilities.readFormatOnlineresource_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_,
-      node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Request object.
- */
-ol.format.WMSCapabilities.readRequest_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.REQUEST_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} DCP type object.
- */
-ol.format.WMSCapabilities.readDCPType_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.DCPTYPE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} HTTP object.
- */
-ol.format.WMSCapabilities.readHTTP_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.HTTP_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Operation type object.
- */
-ol.format.WMSCapabilities.readOperationType_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Online resource object.
- */
-ol.format.WMSCapabilities.readSizedFormatOnlineresource_ = function(node, objectStack) {
-  var formatOnlineresource =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (formatOnlineresource) {
-    var size = [
-      ol.format.XSD.readNonNegativeIntegerString(node.getAttribute('width')),
-      ol.format.XSD.readNonNegativeIntegerString(node.getAttribute('height'))
-    ];
-    formatOnlineresource['size'] = size;
-    return formatOnlineresource;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Authority URL object.
- */
-ol.format.WMSCapabilities.readAuthorityURL_ = function(node, objectStack) {
-  var authorityObject =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (authorityObject) {
-    authorityObject['name'] = node.getAttribute('name');
-    return authorityObject;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Metadata URL object.
- */
-ol.format.WMSCapabilities.readMetadataURL_ = function(node, objectStack) {
-  var metadataObject =
-        ol.format.WMSCapabilities.readFormatOnlineresource_(node, objectStack);
-  if (metadataObject) {
-    metadataObject['type'] = node.getAttribute('type');
-    return metadataObject;
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Style object.
- */
-ol.format.WMSCapabilities.readStyle_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      {}, ol.format.WMSCapabilities.STYLE_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<string>|undefined} Keyword list.
- */
-ol.format.WMSCapabilities.readKeywordList_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop(
-      [], ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMSCapabilities.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/wms'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Service': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readService_),
-      'Capability': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readCapability_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CAPABILITY_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Request': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readRequest_),
-      'Exception': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readException_),
-      'Layer': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readCapabilityLayer_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.SERVICE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'KeywordList': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readKeywordList_),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref),
-      'ContactInformation': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactInformation_),
-      'Fees': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'AccessConstraints': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'LayerLimit': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_INFORMATION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'ContactPersonPrimary': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactPersonPrimary_),
-      'ContactPosition': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readContactAddress_),
-      'ContactVoiceTelephone': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactFacsimileTelephone': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactElectronicMailAddress': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_PERSON_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'ContactPerson': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'ContactOrganization': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.CONTACT_ADDRESS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'AddressType': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Address': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'City': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'StateOrProvince': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'PostCode': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Country': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.EXCEPTION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeArrayPusher(ol.format.XSD.readString)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'KeywordList': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readKeywordList_),
-      'CRS': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'EX_GeographicBoundingBox': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readEXGeographicBoundingBox_),
-      'BoundingBox': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readBoundingBox_),
-      'Dimension': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readDimension_),
-      'Attribution': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readAttribution_),
-      'AuthorityURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readAuthorityURL_),
-      'Identifier': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'MetadataURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readMetadataURL_),
-      'DataURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'FeatureListURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'Style': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readStyle_),
-      'MinScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'MaxScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'Layer': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readLayer_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.ATTRIBUTION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref),
-      'LogoURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readSizedFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS_ =
-    ol.xml.makeStructureNS(ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'westBoundLongitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'eastBoundLongitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'southBoundLatitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'northBoundLatitude': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.REQUEST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'GetCapabilities': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_),
-      'GetMap': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_),
-      'GetFeatureInfo': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readOperationType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.OPERATIONTYPE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeObjectPropertyPusher(ol.format.XSD.readString),
-      'DCPType': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readDCPType_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.DCPTYPE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'HTTP': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readHTTP_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.HTTP_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Get': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'Post': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Name': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Title': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'LegendURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMSCapabilities.readSizedFormatOnlineresource_),
-      'StyleSheetURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_),
-      'StyleURL': ol.xml.makeObjectPropertySetter(
-          ol.format.WMSCapabilities.readFormatOnlineresource_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.FORMAT_ONLINERESOURCE_PARSERS_ =
-    ol.xml.makeStructureNS(ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Format': ol.xml.makeObjectPropertySetter(ol.format.XSD.readString),
-      'OnlineResource': ol.xml.makeObjectPropertySetter(
-          ol.format.XLink.readHref)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMSCapabilities.KEYWORDLIST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMSCapabilities.NAMESPACE_URIS_, {
-      'Keyword': ol.xml.makeArrayPusher(ol.format.XSD.readString)
-    });
-
-goog.provide('ol.format.WMSGetFeatureInfo');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.format.GML2');
-goog.require('ol.format.XMLFeature');
-goog.require('ol.obj');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMSGetFeatureInfo format. It uses
- * {@link ol.format.GML2} to read features.
- *
- * @constructor
- * @extends {ol.format.XMLFeature}
- * @param {olx.format.WMSGetFeatureInfoOptions=} opt_options Options.
- * @api
- */
-ol.format.WMSGetFeatureInfo = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';
-
-
-  /**
-   * @private
-   * @type {ol.format.GML2}
-   */
-  this.gmlFormat_ = new ol.format.GML2();
-
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.layers_ = options.layers ? options.layers : null;
-
-  ol.format.XMLFeature.call(this);
-};
-ol.inherits(ol.format.WMSGetFeatureInfo, ol.format.XMLFeature);
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.WMSGetFeatureInfo.featureIdentifier_ = '_feature';
-
-
-/**
- * @const
- * @type {string}
- * @private
- */
-ol.format.WMSGetFeatureInfo.layerIdentifier_ = '_layer';
-
-
-/**
- * @return {Array.<string>} layers
- */
-ol.format.WMSGetFeatureInfo.prototype.getLayers = function() {
-  return this.layers_;
-};
-
-
-/**
- * @param {Array.<string>} layers Layers to parse.
- */
-ol.format.WMSGetFeatureInfo.prototype.setLayers = function(layers) {
-  this.layers_ = layers;
-};
-
-
-/**
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Array.<ol.Feature>} Features.
- * @private
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = function(node, objectStack) {
-  node.setAttribute('namespaceURI', this.featureNS_);
-  var localName = node.localName;
-  /** @type {Array.<ol.Feature>} */
-  var features = [];
-  if (node.childNodes.length === 0) {
-    return features;
-  }
-  if (localName == 'msGMLOutput') {
-    for (var i = 0, ii = node.childNodes.length; i < ii; i++) {
-      var layer = node.childNodes[i];
-      if (layer.nodeType !== Node.ELEMENT_NODE) {
-        continue;
-      }
-      var context = objectStack[0];
-
-      var toRemove = ol.format.WMSGetFeatureInfo.layerIdentifier_;
-      var layerName = layer.localName.replace(toRemove, '');
-
-      if (this.layers_ && !ol.array.includes(this.layers_, layerName)) {
-        continue;
-      }
-
-      var featureType = layerName +
-          ol.format.WMSGetFeatureInfo.featureIdentifier_;
-
-      context['featureType'] = featureType;
-      context['featureNS'] = this.featureNS_;
-
-      var parsers = {};
-      parsers[featureType] = ol.xml.makeArrayPusher(
-          this.gmlFormat_.readFeatureElement, this.gmlFormat_);
-      var parsersNS = ol.xml.makeStructureNS(
-          [context['featureNS'], null], parsers);
-      layer.setAttribute('namespaceURI', this.featureNS_);
-      var layerFeatures = ol.xml.pushParseAndPop(
-          [], parsersNS, layer, objectStack, this.gmlFormat_);
-      if (layerFeatures) {
-        ol.array.extend(features, layerFeatures);
-      }
-    }
-  }
-  if (localName == 'FeatureCollection') {
-    var gmlFeatures = ol.xml.pushParseAndPop([],
-        this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,
-        [{}], this.gmlFormat_);
-    if (gmlFeatures) {
-      features = gmlFeatures;
-    }
-  }
-  return features;
-};
-
-
-/**
- * Read all features from a WMSGetFeatureInfo response.
- *
- * @function
- * @param {Document|Node|Object|string} source Source.
- * @param {olx.format.ReadOptions=} opt_options Options.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeatures;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.readFeaturesFromNode = function(node, opt_options) {
-  var options = {};
-  if (opt_options) {
-    ol.obj.assign(options, this.getReadOptions(node, opt_options));
-  }
-  return this.readFeatures_(node, [options]);
-};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeFeatureNode = function(feature, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeFeaturesNode = function(features, opt_options) {};
-
-
-/**
- * Not implemented.
- * @inheritDoc
- */
-ol.format.WMSGetFeatureInfo.prototype.writeGeometryNode = function(geometry, opt_options) {};
-
-goog.provide('ol.format.WMTSCapabilities');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.format.OWS');
-goog.require('ol.format.XLink');
-goog.require('ol.format.XML');
-goog.require('ol.format.XSD');
-goog.require('ol.xml');
-
-
-/**
- * @classdesc
- * Format for reading WMTS capabilities data.
- *
- * @constructor
- * @extends {ol.format.XML}
- * @api
- */
-ol.format.WMTSCapabilities = function() {
-  ol.format.XML.call(this);
-
-  /**
-   * @type {ol.format.OWS}
-   * @private
-   */
-  this.owsParser_ = new ol.format.OWS();
-};
-ol.inherits(ol.format.WMTSCapabilities, ol.format.XML);
-
-
-/**
- * Read a WMTS capabilities document.
- *
- * @function
- * @param {Document|Node|string} source The XML source.
- * @return {Object} An object representing the WMTS capabilities.
- * @api
- */
-ol.format.WMTSCapabilities.prototype.read;
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMTSCapabilities.prototype.readFromDocument = function(doc) {
-  for (var n = doc.firstChild; n; n = n.nextSibling) {
-    if (n.nodeType == Node.ELEMENT_NODE) {
-      return this.readFromNode(n);
-    }
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.format.WMTSCapabilities.prototype.readFromNode = function(node) {
-  var version = node.getAttribute('version').trim();
-  var WMTSCapabilityObject = this.owsParser_.readFromNode(node);
-  if (!WMTSCapabilityObject) {
-    return null;
-  }
-  WMTSCapabilityObject['version'] = version;
-  WMTSCapabilityObject = ol.xml.pushParseAndPop(WMTSCapabilityObject,
-      ol.format.WMTSCapabilities.PARSERS_, node, []);
-  return WMTSCapabilityObject ? WMTSCapabilityObject : null;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Attribution object.
- */
-ol.format.WMTSCapabilities.readContents_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.CONTENTS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Layers object.
- */
-ol.format.WMTSCapabilities.readLayer_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.LAYER_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Tile Matrix Set object.
- */
-ol.format.WMTSCapabilities.readTileMatrixSet_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Style object.
- */
-ol.format.WMTSCapabilities.readStyle_ = function(node, objectStack) {
-  var style = ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.STYLE_PARSERS_, node, objectStack);
-  if (!style) {
-    return undefined;
-  }
-  var isDefault = node.getAttribute('isDefault') === 'true';
-  style['isDefault'] = isDefault;
-  return style;
-
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Tile Matrix Set Link object.
- */
-ol.format.WMTSCapabilities.readTileMatrixSetLink_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Dimension object.
- */
-ol.format.WMTSCapabilities.readDimensions_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.DIMENSION_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Resource URL object.
- */
-ol.format.WMTSCapabilities.readResourceUrl_ = function(node, objectStack) {
-  var format = node.getAttribute('format');
-  var template = node.getAttribute('template');
-  var resourceType = node.getAttribute('resourceType');
-  var resource = {};
-  if (format) {
-    resource['format'] = format;
-  }
-  if (template) {
-    resource['template'] = template;
-  }
-  if (resourceType) {
-    resource['resourceType'] = resourceType;
-  }
-  return resource;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} WGS84 BBox object.
- */
-ol.format.WMTSCapabilities.readWgs84BoundingBox_ = function(node, objectStack) {
-  var coordinates = ol.xml.pushParseAndPop([],
-      ol.format.WMTSCapabilities.WGS84_BBOX_READERS_, node, objectStack);
-  if (coordinates.length != 2) {
-    return undefined;
-  }
-  return ol.extent.boundingExtent(coordinates);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Legend object.
- */
-ol.format.WMTSCapabilities.readLegendUrl_ = function(node, objectStack) {
-  var legend = {};
-  legend['format'] = node.getAttribute('format');
-  legend['href'] = ol.format.XLink.readHref(node);
-  return legend;
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} Coordinates object.
- */
-ol.format.WMTSCapabilities.readCoordinates_ = function(node, objectStack) {
-  var coordinates = ol.format.XSD.readString(node).split(' ');
-  if (!coordinates || coordinates.length != 2) {
-    return undefined;
-  }
-  var x = +coordinates[0];
-  var y = +coordinates[1];
-  if (isNaN(x) || isNaN(y)) {
-    return undefined;
-  }
-  return [x, y];
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrix object.
- */
-ol.format.WMTSCapabilities.readTileMatrix_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TM_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrixSetLimits Object.
- */
-ol.format.WMTSCapabilities.readTileMatrixLimitsList_ = function(node,
-    objectStack) {
-  return ol.xml.pushParseAndPop([],
-      ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_, node,
-      objectStack);
-};
-
-
-/**
- * @private
- * @param {Node} node Node.
- * @param {Array.<*>} objectStack Object stack.
- * @return {Object|undefined} TileMatrixLimits Array.
- */
-ol.format.WMTSCapabilities.readTileMatrixLimits_ = function(node, objectStack) {
-  return ol.xml.pushParseAndPop({},
-      ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_, node, objectStack);
-};
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMTSCapabilities.NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/wmts/1.0'
-];
-
-
-/**
- * @const
- * @private
- * @type {Array.<string>}
- */
-ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_ = [
-  null,
-  'http://www.opengis.net/ows/1.1'
-];
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Contents': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readContents_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.CONTENTS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Layer': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readLayer_),
-      'TileMatrixSet': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrixSet_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.LAYER_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Style': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readStyle_),
-      'Format': ol.xml.makeObjectPropertyPusher(
-          ol.format.XSD.readString),
-      'TileMatrixSetLink': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrixSetLink_),
-      'Dimension': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readDimensions_),
-      'ResourceURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readResourceUrl_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Abstract': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'WGS84BoundingBox': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readWgs84BoundingBox_),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.STYLE_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'LegendURL': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readLegendUrl_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Title': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LINKS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrixSet': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'TileMatrixSetLimits': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readTileMatrixLimitsList_)
-    });
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LIMITS_LIST_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrixLimits': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readTileMatrixLimits_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_LIMITS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TileMatrix': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'MinTileRow': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxTileRow': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MinTileCol': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MaxTileCol': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.DIMENSION_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'Default': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Value': ol.xml.makeObjectPropertyPusher(
-          ol.format.XSD.readString)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.WGS84_BBOX_READERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'LowerCorner': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readCoordinates_),
-      'UpperCorner': ol.xml.makeArrayPusher(
-          ol.format.WMTSCapabilities.readCoordinates_)
-    });
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TMS_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'WellKnownScaleSet': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'TileMatrix': ol.xml.makeObjectPropertyPusher(
-          ol.format.WMTSCapabilities.readTileMatrix_)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'SupportedCRS': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString),
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-
-/**
- * @const
- * @type {Object.<string, Object.<string, ol.XmlParser>>}
- * @private
- */
-ol.format.WMTSCapabilities.TM_PARSERS_ = ol.xml.makeStructureNS(
-    ol.format.WMTSCapabilities.NAMESPACE_URIS_, {
-      'TopLeftCorner': ol.xml.makeObjectPropertySetter(
-          ol.format.WMTSCapabilities.readCoordinates_),
-      'ScaleDenominator': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readDecimal),
-      'TileWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'TileHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MatrixWidth': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger),
-      'MatrixHeight': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readNonNegativeInteger)
-    }, ol.xml.makeStructureNS(ol.format.WMTSCapabilities.OWS_NAMESPACE_URIS_, {
-      'Identifier': ol.xml.makeObjectPropertySetter(
-          ol.format.XSD.readString)
-    }));
-
-goog.provide('ol.GeolocationProperty');
-
-
-/**
- * @enum {string}
- */
-ol.GeolocationProperty = {
-  ACCURACY: 'accuracy',
-  ACCURACY_GEOMETRY: 'accuracyGeometry',
-  ALTITUDE: 'altitude',
-  ALTITUDE_ACCURACY: 'altitudeAccuracy',
-  HEADING: 'heading',
-  POSITION: 'position',
-  PROJECTION: 'projection',
-  SPEED: 'speed',
-  TRACKING: 'tracking',
-  TRACKING_OPTIONS: 'trackingOptions'
-};
-
-// FIXME handle geolocation not supported
-
-goog.provide('ol.Geolocation');
-
-goog.require('ol');
-goog.require('ol.GeolocationProperty');
-goog.require('ol.Object');
-goog.require('ol.Sphere');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.has');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.proj.EPSG4326');
-
-
-/**
- * @classdesc
- * Helper class for providing HTML5 Geolocation capabilities.
- * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)
- * is used to locate a user's position.
- *
- * To get notified of position changes, register a listener for the generic
- * `change` event on your instance of `ol.Geolocation`.
- *
- * Example:
- *
- *     var geolocation = new ol.Geolocation({
- *       // take the projection to use from the map's view
- *       projection: view.getProjection()
- *     });
- *     // listen to changes in position
- *     geolocation.on('change', function(evt) {
- *       window.console.log(geolocation.getPosition());
- *     });
- *
- * @fires error
- * @constructor
- * @extends {ol.Object}
- * @param {olx.GeolocationOptions=} opt_options Options.
- * @api
- */
-ol.Geolocation = function(opt_options) {
-
-  ol.Object.call(this);
-
-  var options = opt_options || {};
-
-  /**
-   * The unprojected (EPSG:4326) device position.
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.position_ = null;
-
-  /**
-   * @private
-   * @type {ol.TransformFunction}
-   */
-  this.transform_ = ol.proj.identityTransform;
-
-  /**
-   * @private
-   * @type {ol.Sphere}
-   */
-  this.sphere_ = new ol.Sphere(ol.proj.EPSG4326.RADIUS);
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.watchId_ = undefined;
-
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.GeolocationProperty.PROJECTION),
-      this.handleProjectionChanged_, this);
-  ol.events.listen(
-      this, ol.Object.getChangeEventType(ol.GeolocationProperty.TRACKING),
-      this.handleTrackingChanged_, this);
-
-  if (options.projection !== undefined) {
-    this.setProjection(options.projection);
-  }
-  if (options.trackingOptions !== undefined) {
-    this.setTrackingOptions(options.trackingOptions);
-  }
-
-  this.setTracking(options.tracking !== undefined ? options.tracking : false);
-
-};
-ol.inherits(ol.Geolocation, ol.Object);
-
-
-/**
- * @inheritDoc
- */
-ol.Geolocation.prototype.disposeInternal = function() {
-  this.setTracking(false);
-  ol.Object.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @private
- */
-ol.Geolocation.prototype.handleProjectionChanged_ = function() {
-  var projection = this.getProjection();
-  if (projection) {
-    this.transform_ = ol.proj.getTransformFromProjections(
-        ol.proj.get('EPSG:4326'), projection);
-    if (this.position_) {
-      this.set(
-          ol.GeolocationProperty.POSITION, this.transform_(this.position_));
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.Geolocation.prototype.handleTrackingChanged_ = function() {
-  if (ol.has.GEOLOCATION) {
-    var tracking = this.getTracking();
-    if (tracking && this.watchId_ === undefined) {
-      this.watchId_ = navigator.geolocation.watchPosition(
-          this.positionChange_.bind(this),
-          this.positionError_.bind(this),
-          this.getTrackingOptions());
-    } else if (!tracking && this.watchId_ !== undefined) {
-      navigator.geolocation.clearWatch(this.watchId_);
-      this.watchId_ = undefined;
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {GeolocationPosition} position position event.
- */
-ol.Geolocation.prototype.positionChange_ = function(position) {
-  var coords = position.coords;
-  this.set(ol.GeolocationProperty.ACCURACY, coords.accuracy);
-  this.set(ol.GeolocationProperty.ALTITUDE,
-      coords.altitude === null ? undefined : coords.altitude);
-  this.set(ol.GeolocationProperty.ALTITUDE_ACCURACY,
-      coords.altitudeAccuracy === null ?
-        undefined : coords.altitudeAccuracy);
-  this.set(ol.GeolocationProperty.HEADING, coords.heading === null ?
-    undefined : ol.math.toRadians(coords.heading));
-  if (!this.position_) {
-    this.position_ = [coords.longitude, coords.latitude];
-  } else {
-    this.position_[0] = coords.longitude;
-    this.position_[1] = coords.latitude;
-  }
-  var projectedPosition = this.transform_(this.position_);
-  this.set(ol.GeolocationProperty.POSITION, projectedPosition);
-  this.set(ol.GeolocationProperty.SPEED,
-      coords.speed === null ? undefined : coords.speed);
-  var geometry = ol.geom.Polygon.circular(
-      this.sphere_, this.position_, coords.accuracy);
-  geometry.applyTransform(this.transform_);
-  this.set(ol.GeolocationProperty.ACCURACY_GEOMETRY, geometry);
-  this.changed();
-};
-
-/**
- * Triggered when the Geolocation returns an error.
- * @event error
- * @api
- */
-
-/**
- * @private
- * @param {GeolocationPositionError} error error object.
- */
-ol.Geolocation.prototype.positionError_ = function(error) {
-  error.type = ol.events.EventType.ERROR;
-  this.setTracking(false);
-  this.dispatchEvent(/** @type {{type: string, target: undefined}} */ (error));
-};
-
-
-/**
- * Get the accuracy of the position in meters.
- * @return {number|undefined} The accuracy of the position measurement in
- *     meters.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAccuracy = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.GeolocationProperty.ACCURACY));
-};
-
-
-/**
- * Get a geometry of the position accuracy.
- * @return {?ol.geom.Polygon} A geometry of the position accuracy.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAccuracyGeometry = function() {
-  return /** @type {?ol.geom.Polygon} */ (
-    this.get(ol.GeolocationProperty.ACCURACY_GEOMETRY) || null);
-};
-
-
-/**
- * Get the altitude associated with the position.
- * @return {number|undefined} The altitude of the position in meters above mean
- *     sea level.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAltitude = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.GeolocationProperty.ALTITUDE));
-};
-
-
-/**
- * Get the altitude accuracy of the position.
- * @return {number|undefined} The accuracy of the altitude measurement in
- *     meters.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getAltitudeAccuracy = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.GeolocationProperty.ALTITUDE_ACCURACY));
-};
-
-
-/**
- * Get the heading as radians clockwise from North.
- * @return {number|undefined} The heading of the device in radians from north.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getHeading = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.GeolocationProperty.HEADING));
-};
-
-
-/**
- * Get the position of the device.
- * @return {ol.Coordinate|undefined} The current position of the device reported
- *     in the current projection.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getPosition = function() {
-  return /** @type {ol.Coordinate|undefined} */ (
-    this.get(ol.GeolocationProperty.POSITION));
-};
-
-
-/**
- * Get the projection associated with the position.
- * @return {ol.proj.Projection|undefined} The projection the position is
- *     reported in.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getProjection = function() {
-  return /** @type {ol.proj.Projection|undefined} */ (
-    this.get(ol.GeolocationProperty.PROJECTION));
-};
-
-
-/**
- * Get the speed in meters per second.
- * @return {number|undefined} The instantaneous speed of the device in meters
- *     per second.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getSpeed = function() {
-  return /** @type {number|undefined} */ (
-    this.get(ol.GeolocationProperty.SPEED));
-};
-
-
-/**
- * Determine if the device location is being tracked.
- * @return {boolean} The device location is being tracked.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getTracking = function() {
-  return /** @type {boolean} */ (
-    this.get(ol.GeolocationProperty.TRACKING));
-};
-
-
-/**
- * Get the tracking options.
- * @see http://www.w3.org/TR/geolocation-API/#position-options
- * @return {GeolocationPositionOptions|undefined} PositionOptions as defined by
- *     the [HTML5 Geolocation spec
- *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
- * @observable
- * @api
- */
-ol.Geolocation.prototype.getTrackingOptions = function() {
-  return /** @type {GeolocationPositionOptions|undefined} */ (
-    this.get(ol.GeolocationProperty.TRACKING_OPTIONS));
-};
-
-
-/**
- * Set the projection to use for transforming the coordinates.
- * @param {ol.ProjectionLike} projection The projection the position is
- *     reported in.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setProjection = function(projection) {
-  this.set(ol.GeolocationProperty.PROJECTION, ol.proj.get(projection));
-};
-
-
-/**
- * Enable or disable tracking.
- * @param {boolean} tracking Enable tracking.
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setTracking = function(tracking) {
-  this.set(ol.GeolocationProperty.TRACKING, tracking);
-};
-
-
-/**
- * Set the tracking options.
- * @see http://www.w3.org/TR/geolocation-API/#position-options
- * @param {GeolocationPositionOptions} options PositionOptions as defined by the
- *     [HTML5 Geolocation spec
- *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).
- * @observable
- * @api
- */
-ol.Geolocation.prototype.setTrackingOptions = function(options) {
-  this.set(ol.GeolocationProperty.TRACKING_OPTIONS, options);
-};
-
-goog.provide('ol.geom.Circle');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.geom.flat.deflate');
-
-
-/**
- * @classdesc
- * Circle geometry.
- *
- * @constructor
- * @extends {ol.geom.SimpleGeometry}
- * @param {ol.Coordinate} center Center.
- * @param {number=} opt_radius Radius.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Circle = function(center, opt_radius, opt_layout) {
-  ol.geom.SimpleGeometry.call(this);
-  var radius = opt_radius ? opt_radius : 0;
-  this.setCenterAndRadius(center, radius, opt_layout);
-};
-ol.inherits(ol.geom.Circle, ol.geom.SimpleGeometry);
-
-
-/**
- * Make a complete copy of the geometry.
- * @return {!ol.geom.Circle} Clone.
- * @override
- * @api
- */
-ol.geom.Circle.prototype.clone = function() {
-  var circle = new ol.geom.Circle(null);
-  circle.setFlatCoordinates(this.layout, this.flatCoordinates.slice());
-  return circle;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDistance) {
-  var flatCoordinates = this.flatCoordinates;
-  var dx = x - flatCoordinates[0];
-  var dy = y - flatCoordinates[1];
-  var squaredDistance = dx * dx + dy * dy;
-  if (squaredDistance < minSquaredDistance) {
-    var i;
-    if (squaredDistance === 0) {
-      for (i = 0; i < this.stride; ++i) {
-        closestPoint[i] = flatCoordinates[i];
-      }
-    } else {
-      var delta = this.getRadius() / Math.sqrt(squaredDistance);
-      closestPoint[0] = flatCoordinates[0] + delta * dx;
-      closestPoint[1] = flatCoordinates[1] + delta * dy;
-      for (i = 2; i < this.stride; ++i) {
-        closestPoint[i] = flatCoordinates[i];
-      }
-    }
-    closestPoint.length = this.stride;
-    return squaredDistance;
-  } else {
-    return minSquaredDistance;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.containsXY = function(x, y) {
-  var flatCoordinates = this.flatCoordinates;
-  var dx = x - flatCoordinates[0];
-  var dy = y - flatCoordinates[1];
-  return dx * dx + dy * dy <= this.getRadiusSquared_();
-};
-
-
-/**
- * Return the center of the circle as {@link ol.Coordinate coordinate}.
- * @return {ol.Coordinate} Center.
- * @api
- */
-ol.geom.Circle.prototype.getCenter = function() {
-  return this.flatCoordinates.slice(0, this.stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.computeExtent = function(extent) {
-  var flatCoordinates = this.flatCoordinates;
-  var radius = flatCoordinates[this.stride] - flatCoordinates[0];
-  return ol.extent.createOrUpdate(
-      flatCoordinates[0] - radius, flatCoordinates[1] - radius,
-      flatCoordinates[0] + radius, flatCoordinates[1] + radius,
-      extent);
-};
-
-
-/**
- * Return the radius of the circle.
- * @return {number} Radius.
- * @api
- */
-ol.geom.Circle.prototype.getRadius = function() {
-  return Math.sqrt(this.getRadiusSquared_());
-};
-
-
-/**
- * @private
- * @return {number} Radius squared.
- */
-ol.geom.Circle.prototype.getRadiusSquared_ = function() {
-  var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];
-  var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];
-  return dx * dx + dy * dy;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Circle.prototype.getType = function() {
-  return ol.geom.GeometryType.CIRCLE;
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.geom.Circle.prototype.intersectsExtent = function(extent) {
-  var circleExtent = this.getExtent();
-  if (ol.extent.intersects(extent, circleExtent)) {
-    var center = this.getCenter();
-
-    if (extent[0] <= center[0] && extent[2] >= center[0]) {
-      return true;
-    }
-    if (extent[1] <= center[1] && extent[3] >= center[1]) {
-      return true;
-    }
-
-    return ol.extent.forEachCorner(extent, this.intersectsCoordinate, this);
-  }
-  return false;
-
-};
-
-
-/**
- * Set the center of the circle as {@link ol.Coordinate coordinate}.
- * @param {ol.Coordinate} center Center.
- * @api
- */
-ol.geom.Circle.prototype.setCenter = function(center) {
-  var stride = this.stride;
-  var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];
-  var flatCoordinates = center.slice();
-  flatCoordinates[stride] = flatCoordinates[0] + radius;
-  var i;
-  for (i = 1; i < stride; ++i) {
-    flatCoordinates[stride + i] = center[i];
-  }
-  this.setFlatCoordinates(this.layout, flatCoordinates);
-};
-
-
-/**
- * Set the center (as {@link ol.Coordinate coordinate}) and the radius (as
- * number) of the circle.
- * @param {ol.Coordinate} center Center.
- * @param {number} radius Radius.
- * @param {ol.geom.GeometryLayout=} opt_layout Layout.
- * @api
- */
-ol.geom.Circle.prototype.setCenterAndRadius = function(center, radius, opt_layout) {
-  if (!center) {
-    this.setFlatCoordinates(ol.geom.GeometryLayout.XY, null);
-  } else {
-    this.setLayout(opt_layout, center, 0);
-    if (!this.flatCoordinates) {
-      this.flatCoordinates = [];
-    }
-    /** @type {Array.<number>} */
-    var flatCoordinates = this.flatCoordinates;
-    var offset = ol.geom.flat.deflate.coordinate(
-        flatCoordinates, 0, center, this.stride);
-    flatCoordinates[offset++] = flatCoordinates[0] + radius;
-    var i, ii;
-    for (i = 1, ii = this.stride; i < ii; ++i) {
-      flatCoordinates[offset++] = flatCoordinates[i];
-    }
-    flatCoordinates.length = offset;
-    this.changed();
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.getCoordinates = function() {};
-
-
-/**
- * @inheritDoc
- */
-ol.geom.Circle.prototype.setCoordinates = function(coordinates, opt_layout) {};
-
-
-/**
- * @param {ol.geom.GeometryLayout} layout Layout.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- */
-ol.geom.Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates) {
-  this.setFlatCoordinatesInternal(layout, flatCoordinates);
-  this.changed();
-};
-
-
-/**
- * Set the radius of the circle. The radius is in the units of the projection.
- * @param {number} radius Radius.
- * @api
- */
-ol.geom.Circle.prototype.setRadius = function(radius) {
-  this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;
-  this.changed();
-};
-
-
-/**
- * Transform each coordinate of the circle from one coordinate reference system
- * to another. The geometry is modified in place.
- * If you do not want the geometry modified in place, first clone() it and
- * then use this function on the clone.
- *
- * Internally a circle is currently represented by two points: the center of
- * the circle `[cx, cy]`, and the point to the right of the circle
- * `[cx + r, cy]`. This `transform` function just transforms these two points.
- * So the resulting geometry is also a circle, and that circle does not
- * correspond to the shape that would be obtained by transforming every point
- * of the original circle.
- *
- * @param {ol.ProjectionLike} source The current projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @param {ol.ProjectionLike} destination The desired projection.  Can be a
- *     string identifier or a {@link ol.proj.Projection} object.
- * @return {ol.geom.Circle} This geometry.  Note that original geometry is
- *     modified in place.
- * @function
- * @api
- */
-ol.geom.Circle.prototype.transform;
-
-goog.provide('ol.geom.flat.geodesic');
-
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * @private
- * @param {function(number): ol.Coordinate} interpolate Interpolate function.
- * @param {ol.TransformFunction} transform Transform from longitude/latitude to
- *     projected coordinates.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.line_ = function(interpolate, transform, squaredTolerance) {
-  // FIXME reduce garbage generation
-  // FIXME optimize stack operations
-
-  /** @type {Array.<number>} */
-  var flatCoordinates = [];
-
-  var geoA = interpolate(0);
-  var geoB = interpolate(1);
-
-  var a = transform(geoA);
-  var b = transform(geoB);
-
-  /** @type {Array.<ol.Coordinate>} */
-  var geoStack = [geoB, geoA];
-  /** @type {Array.<ol.Coordinate>} */
-  var stack = [b, a];
-  /** @type {Array.<number>} */
-  var fractionStack = [1, 0];
-
-  /** @type {Object.<string, boolean>} */
-  var fractions = {};
-
-  var maxIterations = 1e5;
-  var geoM, m, fracA, fracB, fracM, key;
-
-  while (--maxIterations > 0 && fractionStack.length > 0) {
-    // Pop the a coordinate off the stack
-    fracA = fractionStack.pop();
-    geoA = geoStack.pop();
-    a = stack.pop();
-    // Add the a coordinate if it has not been added yet
-    key = fracA.toString();
-    if (!(key in fractions)) {
-      flatCoordinates.push(a[0], a[1]);
-      fractions[key] = true;
-    }
-    // Pop the b coordinate off the stack
-    fracB = fractionStack.pop();
-    geoB = geoStack.pop();
-    b = stack.pop();
-    // Find the m point between the a and b coordinates
-    fracM = (fracA + fracB) / 2;
-    geoM = interpolate(fracM);
-    m = transform(geoM);
-    if (ol.math.squaredSegmentDistance(m[0], m[1], a[0], a[1],
-        b[0], b[1]) < squaredTolerance) {
-      // If the m point is sufficiently close to the straight line, then we
-      // discard it.  Just use the b coordinate and move on to the next line
-      // segment.
-      flatCoordinates.push(b[0], b[1]);
-      key = fracB.toString();
-      fractions[key] = true;
-    } else {
-      // Otherwise, we need to subdivide the current line segment.  Split it
-      // into two and push the two line segments onto the stack.
-      fractionStack.push(fracB, fracM, fracM, fracA);
-      stack.push(b, m, m, a);
-      geoStack.push(geoB, geoM, geoM, geoA);
-    }
-  }
-
-  return flatCoordinates;
-};
-
-
-/**
-* Generate a great-circle arcs between two lat/lon points.
-* @param {number} lon1 Longitude 1 in degrees.
-* @param {number} lat1 Latitude 1 in degrees.
-* @param {number} lon2 Longitude 2 in degrees.
-* @param {number} lat2 Latitude 2 in degrees.
- * @param {ol.proj.Projection} projection Projection.
-* @param {number} squaredTolerance Squared tolerance.
-* @return {Array.<number>} Flat coordinates.
-*/
-ol.geom.flat.geodesic.greatCircleArc = function(
-    lon1, lat1, lon2, lat2, projection, squaredTolerance) {
-
-  var geoProjection = ol.proj.get('EPSG:4326');
-
-  var cosLat1 = Math.cos(ol.math.toRadians(lat1));
-  var sinLat1 = Math.sin(ol.math.toRadians(lat1));
-  var cosLat2 = Math.cos(ol.math.toRadians(lat2));
-  var sinLat2 = Math.sin(ol.math.toRadians(lat2));
-  var cosDeltaLon = Math.cos(ol.math.toRadians(lon2 - lon1));
-  var sinDeltaLon = Math.sin(ol.math.toRadians(lon2 - lon1));
-  var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;
-
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        if (1 <= d) {
-          return [lon2, lat2];
-        }
-        var D = frac * Math.acos(d);
-        var cosD = Math.cos(D);
-        var sinD = Math.sin(D);
-        var y = sinDeltaLon * cosLat2;
-        var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;
-        var theta = Math.atan2(y, x);
-        var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));
-        var lon = ol.math.toRadians(lon1) +
-            Math.atan2(Math.sin(theta) * sinD * cosLat1,
-                cosD - sinLat1 * Math.sin(lat));
-        return [ol.math.toDegrees(lon), ol.math.toDegrees(lat)];
-      }, ol.proj.getTransform(geoProjection, projection), squaredTolerance);
-};
-
-
-/**
- * Generate a meridian (line at constant longitude).
- * @param {number} lon Longitude.
- * @param {number} lat1 Latitude 1.
- * @param {number} lat2 Latitude 2.
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.meridian = function(lon, lat1, lat2, projection, squaredTolerance) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        return [lon, lat1 + ((lat2 - lat1) * frac)];
-      },
-      ol.proj.getTransform(epsg4326Projection, projection), squaredTolerance);
-};
-
-
-/**
- * Generate a parallel (line at constant latitude).
- * @param {number} lat Latitude.
- * @param {number} lon1 Longitude 1.
- * @param {number} lon2 Longitude 2.
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {Array.<number>} Flat coordinates.
- */
-ol.geom.flat.geodesic.parallel = function(lat, lon1, lon2, projection, squaredTolerance) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-  return ol.geom.flat.geodesic.line_(
-      /**
-       * @param {number} frac Fraction.
-       * @return {ol.Coordinate} Coordinate.
-       */
-      function(frac) {
-        return [lon1 + ((lon2 - lon1) * frac), lat];
-      },
-      ol.proj.getTransform(epsg4326Projection, projection), squaredTolerance);
-};
-
-goog.provide('ol.geom.flat.topology');
-
-goog.require('ol.geom.flat.area');
-
-/**
- * Check if the linestring is a boundary.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {boolean} The linestring is a boundary.
- */
-ol.geom.flat.topology.lineStringIsClosed = function(flatCoordinates, offset, end, stride) {
-  var lastCoord = end - stride;
-  if (flatCoordinates[offset] === flatCoordinates[lastCoord] &&
-      flatCoordinates[offset + 1] === flatCoordinates[lastCoord + 1] && (end - offset) / stride > 3) {
-    return !!ol.geom.flat.area.linearRing(flatCoordinates, offset, end, stride);
-  }
-  return false;
-};
-
-goog.provide('ol.Graticule');
-
-goog.require('ol.coordinate');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryLayout');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.flat.geodesic');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.render.EventType');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Text');
-
-
-/**
- * Render a grid for a coordinate system on a map.
- * @constructor
- * @param {olx.GraticuleOptions=} opt_options Options.
- * @api
- */
-ol.Graticule = function(opt_options) {
-  var options = opt_options || {};
-
-  /**
-   * @type {ol.PluggableMap}
-   * @private
-   */
-  this.map_ = null;
-
-  /**
-   * @type {ol.proj.Projection}
-   * @private
-   */
-  this.projection_ = null;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxLat_ = Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxLon_ = Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minLat_ = -Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minLon_ = -Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxLatP_ = Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxLonP_ = Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minLatP_ = -Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.minLonP_ = -Infinity;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.targetSize_ = options.targetSize !== undefined ?
-    options.targetSize : 100;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;
-
-  /**
-   * @type {Array.<ol.geom.LineString>}
-   * @private
-   */
-  this.meridians_ = [];
-
-  /**
-   * @type {Array.<ol.geom.LineString>}
-   * @private
-   */
-  this.parallels_ = [];
-
-  /**
-   * @type {ol.style.Stroke}
-   * @private
-   */
-  this.strokeStyle_ = options.strokeStyle !== undefined ?
-    options.strokeStyle : ol.Graticule.DEFAULT_STROKE_STYLE_;
-
-  /**
-   * @type {ol.TransformFunction|undefined}
-   * @private
-   */
-  this.fromLonLatTransform_ = undefined;
-
-  /**
-   * @type {ol.TransformFunction|undefined}
-   * @private
-   */
-  this.toLonLatTransform_ = undefined;
-
-  /**
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.projectionCenterLonLat_ = null;
-
-  /**
-   * @type {Array.<ol.GraticuleLabelDataType>}
-   * @private
-   */
-  this.meridiansLabels_ = null;
-
-  /**
-   * @type {Array.<ol.GraticuleLabelDataType>}
-   * @private
-   */
-  this.parallelsLabels_ = null;
-
-  if (options.showLabels == true) {
-    var degreesToString = ol.coordinate.degreesToStringHDMS;
-
-    /**
-     * @type {null|function(number):string}
-     * @private
-     */
-    this.lonLabelFormatter_ = options.lonLabelFormatter == undefined ?
-      degreesToString.bind(this, 'EW') : options.lonLabelFormatter;
-
-    /**
-     * @type {function(number):string}
-     * @private
-     */
-    this.latLabelFormatter_ = options.latLabelFormatter == undefined ?
-      degreesToString.bind(this, 'NS') : options.latLabelFormatter;
-
-    /**
-     * Longitude label position in fractions (0..1) of view extent. 0 means
-     * bottom, 1 means top.
-     * @type {number}
-     * @private
-     */
-    this.lonLabelPosition_ = options.lonLabelPosition == undefined ? 0 :
-      options.lonLabelPosition;
-
-    /**
-     * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1
-     * means right.
-     * @type {number}
-     * @private
-     */
-    this.latLabelPosition_ = options.latLabelPosition == undefined ? 1 :
-      options.latLabelPosition;
-
-    /**
-     * @type {ol.style.Text}
-     * @private
-     */
-    this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :
-      new ol.style.Text({
-        font: '12px Calibri,sans-serif',
-        textBaseline: 'bottom',
-        fill: new ol.style.Fill({
-          color: 'rgba(0,0,0,1)'
-        }),
-        stroke: new ol.style.Stroke({
-          color: 'rgba(255,255,255,1)',
-          width: 3
-        })
-      });
-
-    /**
-     * @type {ol.style.Text}
-     * @private
-     */
-    this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle :
-      new ol.style.Text({
-        font: '12px Calibri,sans-serif',
-        textAlign: 'end',
-        fill: new ol.style.Fill({
-          color: 'rgba(0,0,0,1)'
-        }),
-        stroke: new ol.style.Stroke({
-          color: 'rgba(255,255,255,1)',
-          width: 3
-        })
-      });
-
-    this.meridiansLabels_ = [];
-    this.parallelsLabels_ = [];
-  }
-
-  this.setMap(options.map !== undefined ? options.map : null);
-};
-
-
-/**
- * @type {ol.style.Stroke}
- * @private
- * @const
- */
-ol.Graticule.DEFAULT_STROKE_STYLE_ = new ol.style.Stroke({
-  color: 'rgba(0,0,0,0.2)'
-});
-
-
-/**
- * TODO can be configurable
- * @type {Array.<number>}
- * @private
- */
-ol.Graticule.intervals_ = [90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05,
-  0.01, 0.005, 0.002, 0.001];
-
-
-/**
- * @param {number} lon Longitude.
- * @param {number} minLat Minimal latitude.
- * @param {number} maxLat Maximal latitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {number} Index.
- * @private
- */
-ol.Graticule.prototype.addMeridian_ = function(lon, minLat, maxLat, squaredTolerance, extent, index) {
-  var lineString = this.getMeridian_(lon, minLat, maxLat,
-      squaredTolerance, index);
-  if (ol.extent.intersects(lineString.getExtent(), extent)) {
-    if (this.meridiansLabels_) {
-      var textPoint = this.getMeridianPoint_(lineString, extent, index);
-      this.meridiansLabels_[index] = {
-        geom: textPoint,
-        text: this.lonLabelFormatter_(lon)
-      };
-    }
-    this.meridians_[index++] = lineString;
-  }
-  return index;
-};
-
-/**
- * @param {ol.geom.LineString} lineString Meridian
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {ol.geom.Point} Meridian point.
- * @private
- */
-ol.Graticule.prototype.getMeridianPoint_ = function(lineString, extent, index) {
-  var flatCoordinates = lineString.getFlatCoordinates();
-  var clampedBottom = Math.max(extent[1], flatCoordinates[1]);
-  var clampedTop = Math.min(extent[3], flatCoordinates[flatCoordinates.length - 1]);
-  var lat = ol.math.clamp(
-      extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_,
-      clampedBottom, clampedTop);
-  var coordinate = [flatCoordinates[0], lat];
-  var point = this.meridiansLabels_[index] !== undefined ?
-    this.meridiansLabels_[index].geom : new ol.geom.Point(null);
-  point.setCoordinates(coordinate);
-  return point;
-};
-
-
-/**
- * @param {number} lat Latitude.
- * @param {number} minLon Minimal longitude.
- * @param {number} maxLon Maximal longitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {number} Index.
- * @private
- */
-ol.Graticule.prototype.addParallel_ = function(lat, minLon, maxLon, squaredTolerance, extent, index) {
-  var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance,
-      index);
-  if (ol.extent.intersects(lineString.getExtent(), extent)) {
-    if (this.parallelsLabels_) {
-      var textPoint = this.getParallelPoint_(lineString, extent, index);
-      this.parallelsLabels_[index] = {
-        geom: textPoint,
-        text: this.latLabelFormatter_(lat)
-      };
-    }
-    this.parallels_[index++] = lineString;
-  }
-  return index;
-};
-
-
-/**
- * @param {ol.geom.LineString} lineString Parallels.
- * @param {ol.Extent} extent Extent.
- * @param {number} index Index.
- * @return {ol.geom.Point} Parallel point.
- * @private
- */
-ol.Graticule.prototype.getParallelPoint_ = function(lineString, extent, index) {
-  var flatCoordinates = lineString.getFlatCoordinates();
-  var clampedLeft = Math.max(extent[0], flatCoordinates[0]);
-  var clampedRight = Math.min(extent[2], flatCoordinates[flatCoordinates.length - 2]);
-  var lon = ol.math.clamp(
-      extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_,
-      clampedLeft, clampedRight);
-  var coordinate = [lon, flatCoordinates[1]];
-  var point = this.parallelsLabels_[index] !== undefined ?
-    this.parallelsLabels_[index].geom : new ol.geom.Point(null);
-  point.setCoordinates(coordinate);
-  return point;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} squaredTolerance Squared tolerance.
- * @private
- */
-ol.Graticule.prototype.createGraticule_ = function(extent, center, resolution, squaredTolerance) {
-
-  var interval = this.getInterval_(resolution);
-  if (interval == -1) {
-    this.meridians_.length = this.parallels_.length = 0;
-    if (this.meridiansLabels_) {
-      this.meridiansLabels_.length = 0;
-    }
-    if (this.parallelsLabels_) {
-      this.parallelsLabels_.length = 0;
-    }
-    return;
-  }
-
-  var centerLonLat = this.toLonLatTransform_(center);
-  var centerLon = centerLonLat[0];
-  var centerLat = centerLonLat[1];
-  var maxLines = this.maxLines_;
-  var cnt, idx, lat, lon;
-
-  var validExtent = [
-    Math.max(extent[0], this.minLonP_),
-    Math.max(extent[1], this.minLatP_),
-    Math.min(extent[2], this.maxLonP_),
-    Math.min(extent[3], this.maxLatP_)
-  ];
-
-  validExtent = ol.proj.transformExtent(validExtent, this.projection_,
-      'EPSG:4326');
-  var maxLat = validExtent[3];
-  var maxLon = validExtent[2];
-  var minLat = validExtent[1];
-  var minLon = validExtent[0];
-
-  // Create meridians
-
-  centerLon = Math.floor(centerLon / interval) * interval;
-  lon = ol.math.clamp(centerLon, this.minLon_, this.maxLon_);
-
-  idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);
-
-  cnt = 0;
-  while (lon != this.minLon_ && cnt++ < maxLines) {
-    lon = Math.max(lon - interval, this.minLon_);
-    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);
-  }
-
-  lon = ol.math.clamp(centerLon, this.minLon_, this.maxLon_);
-
-  cnt = 0;
-  while (lon != this.maxLon_ && cnt++ < maxLines) {
-    lon = Math.min(lon + interval, this.maxLon_);
-    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);
-  }
-
-  this.meridians_.length = idx;
-  if (this.meridiansLabels_) {
-    this.meridiansLabels_.length = idx;
-  }
-
-  // Create parallels
-
-  centerLat = Math.floor(centerLat / interval) * interval;
-  lat = ol.math.clamp(centerLat, this.minLat_, this.maxLat_);
-
-  idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);
-
-  cnt = 0;
-  while (lat != this.minLat_ && cnt++ < maxLines) {
-    lat = Math.max(lat - interval, this.minLat_);
-    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);
-  }
-
-  lat = ol.math.clamp(centerLat, this.minLat_, this.maxLat_);
-
-  cnt = 0;
-  while (lat != this.maxLat_ && cnt++ < maxLines) {
-    lat = Math.min(lat + interval, this.maxLat_);
-    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);
-  }
-
-  this.parallels_.length = idx;
-  if (this.parallelsLabels_) {
-    this.parallelsLabels_.length = idx;
-  }
-
-};
-
-
-/**
- * @param {number} resolution Resolution.
- * @return {number} The interval in degrees.
- * @private
- */
-ol.Graticule.prototype.getInterval_ = function(resolution) {
-  var centerLon = this.projectionCenterLonLat_[0];
-  var centerLat = this.projectionCenterLonLat_[1];
-  var interval = -1;
-  var i, ii, delta, dist;
-  var target = Math.pow(this.targetSize_ * resolution, 2);
-  /** @type {Array.<number>} **/
-  var p1 = [];
-  /** @type {Array.<number>} **/
-  var p2 = [];
-  for (i = 0, ii = ol.Graticule.intervals_.length; i < ii; ++i) {
-    delta = ol.Graticule.intervals_[i] / 2;
-    p1[0] = centerLon - delta;
-    p1[1] = centerLat - delta;
-    p2[0] = centerLon + delta;
-    p2[1] = centerLat + delta;
-    this.fromLonLatTransform_(p1, p1);
-    this.fromLonLatTransform_(p2, p2);
-    dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);
-    if (dist <= target) {
-      break;
-    }
-    interval = ol.Graticule.intervals_[i];
-  }
-  return interval;
-};
-
-
-/**
- * Get the map associated with this graticule.
- * @return {ol.PluggableMap} The map.
- * @api
- */
-ol.Graticule.prototype.getMap = function() {
-  return this.map_;
-};
-
-
-/**
- * @param {number} lon Longitude.
- * @param {number} minLat Minimal latitude.
- * @param {number} maxLat Maximal latitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.LineString} The meridian line string.
- * @param {number} index Index.
- * @private
- */
-ol.Graticule.prototype.getMeridian_ = function(lon, minLat, maxLat,
-    squaredTolerance, index) {
-  var flatCoordinates = ol.geom.flat.geodesic.meridian(lon,
-      minLat, maxLat, this.projection_, squaredTolerance);
-  var lineString = this.meridians_[index] !== undefined ?
-    this.meridians_[index] : new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * Get the list of meridians.  Meridians are lines of equal longitude.
- * @return {Array.<ol.geom.LineString>} The meridians.
- * @api
- */
-ol.Graticule.prototype.getMeridians = function() {
-  return this.meridians_;
-};
-
-
-/**
- * @param {number} lat Latitude.
- * @param {number} minLon Minimal longitude.
- * @param {number} maxLon Maximal longitude.
- * @param {number} squaredTolerance Squared tolerance.
- * @return {ol.geom.LineString} The parallel line string.
- * @param {number} index Index.
- * @private
- */
-ol.Graticule.prototype.getParallel_ = function(lat, minLon, maxLon,
-    squaredTolerance, index) {
-  var flatCoordinates = ol.geom.flat.geodesic.parallel(lat,
-      minLon, maxLon, this.projection_, squaredTolerance);
-  var lineString = this.parallels_[index] !== undefined ?
-    this.parallels_[index] : new ol.geom.LineString(null);
-  lineString.setFlatCoordinates(ol.geom.GeometryLayout.XY, flatCoordinates);
-  return lineString;
-};
-
-
-/**
- * Get the list of parallels.  Parallels are lines of equal latitude.
- * @return {Array.<ol.geom.LineString>} The parallels.
- * @api
- */
-ol.Graticule.prototype.getParallels = function() {
-  return this.parallels_;
-};
-
-
-/**
- * @param {ol.render.Event} e Event.
- * @private
- */
-ol.Graticule.prototype.handlePostCompose_ = function(e) {
-  var vectorContext = e.vectorContext;
-  var frameState = e.frameState;
-  var extent = frameState.extent;
-  var viewState = frameState.viewState;
-  var center = viewState.center;
-  var projection = viewState.projection;
-  var resolution = viewState.resolution;
-  var pixelRatio = frameState.pixelRatio;
-  var squaredTolerance =
-      resolution * resolution / (4 * pixelRatio * pixelRatio);
-
-  var updateProjectionInfo = !this.projection_ ||
-      !ol.proj.equivalent(this.projection_, projection);
-
-  if (updateProjectionInfo) {
-    this.updateProjectionInfo_(projection);
-  }
-
-  this.createGraticule_(extent, center, resolution, squaredTolerance);
-
-  // Draw the lines
-  vectorContext.setFillStrokeStyle(null, this.strokeStyle_);
-  var i, l, line;
-  for (i = 0, l = this.meridians_.length; i < l; ++i) {
-    line = this.meridians_[i];
-    vectorContext.drawGeometry(line);
-  }
-  for (i = 0, l = this.parallels_.length; i < l; ++i) {
-    line = this.parallels_[i];
-    vectorContext.drawGeometry(line);
-  }
-  var labelData;
-  if (this.meridiansLabels_) {
-    for (i = 0, l = this.meridiansLabels_.length; i < l; ++i) {
-      labelData = this.meridiansLabels_[i];
-      this.lonLabelStyle_.setText(labelData.text);
-      vectorContext.setTextStyle(this.lonLabelStyle_);
-      vectorContext.drawGeometry(labelData.geom);
-    }
-  }
-  if (this.parallelsLabels_) {
-    for (i = 0, l = this.parallelsLabels_.length; i < l; ++i) {
-      labelData = this.parallelsLabels_[i];
-      this.latLabelStyle_.setText(labelData.text);
-      vectorContext.setTextStyle(this.latLabelStyle_);
-      vectorContext.drawGeometry(labelData.geom);
-    }
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @private
- */
-ol.Graticule.prototype.updateProjectionInfo_ = function(projection) {
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var extent = projection.getExtent();
-  var worldExtent = projection.getWorldExtent();
-  var worldExtentP = ol.proj.transformExtent(worldExtent,
-      epsg4326Projection, projection);
-
-  var maxLat = worldExtent[3];
-  var maxLon = worldExtent[2];
-  var minLat = worldExtent[1];
-  var minLon = worldExtent[0];
-
-  var maxLatP = worldExtentP[3];
-  var maxLonP = worldExtentP[2];
-  var minLatP = worldExtentP[1];
-  var minLonP = worldExtentP[0];
-
-  this.maxLat_ = maxLat;
-  this.maxLon_ = maxLon;
-  this.minLat_ = minLat;
-  this.minLon_ = minLon;
-
-  this.maxLatP_ = maxLatP;
-  this.maxLonP_ = maxLonP;
-  this.minLatP_ = minLatP;
-  this.minLonP_ = minLonP;
-
-
-  this.fromLonLatTransform_ = ol.proj.getTransform(
-      epsg4326Projection, projection);
-
-  this.toLonLatTransform_ = ol.proj.getTransform(
-      projection, epsg4326Projection);
-
-  this.projectionCenterLonLat_ = this.toLonLatTransform_(
-      ol.extent.getCenter(extent));
-
-  this.projection_ = projection;
-};
-
-
-/**
- * Set the map for this graticule.  The graticule will be rendered on the
- * provided map.
- * @param {ol.PluggableMap} map Map.
- * @api
- */
-ol.Graticule.prototype.setMap = function(map) {
-  if (this.map_) {
-    this.map_.un(ol.render.EventType.POSTCOMPOSE,
-        this.handlePostCompose_, this);
-    this.map_.render();
-  }
-  if (map) {
-    map.on(ol.render.EventType.POSTCOMPOSE,
-        this.handlePostCompose_, this);
-    map.render();
-  }
-  this.map_ = map;
-};
-
-goog.provide('ol.Image');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-
-
-/**
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.Extent} extent Extent.
- * @param {number|undefined} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- */
-ol.Image = function(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {
-
-  ol.ImageBase.call(this, extent, resolution, pixelRatio, ol.ImageState.IDLE);
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|Image|HTMLVideoElement}
-   */
-  this.image_ = new Image();
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @protected
-   * @type {ol.ImageState}
-   */
-  this.state = ol.ImageState.IDLE;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = imageLoadFunction;
-
-};
-ol.inherits(ol.Image, ol.ImageBase);
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.Image.prototype.getImage = function() {
-  return this.image_;
-};
-
-
-/**
- * Tracks loading or read errors.
- *
- * @private
- */
-ol.Image.prototype.handleImageError_ = function() {
-  this.state = ol.ImageState.ERROR;
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * Tracks successful image load.
- *
- * @private
- */
-ol.Image.prototype.handleImageLoad_ = function() {
-  if (this.resolution === undefined) {
-    this.resolution = ol.extent.getHeight(this.extent) / this.image_.height;
-  }
-  this.state = ol.ImageState.LOADED;
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * Load the image or retry if loading previously failed.
- * Loading is taken care of by the tile queue, and calling this method is
- * only needed for preloading or for reloading in case of an error.
- * @override
- * @api
- */
-ol.Image.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE || this.state == ol.ImageState.ERROR) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    this.imageLoadFunction_(this, this.src_);
-  }
-};
-
-
-/**
- * @param {HTMLCanvasElement|Image|HTMLVideoElement} image Image.
- */
-ol.Image.prototype.setImage = function(image) {
-  this.image_ = image;
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.Image.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-goog.provide('ol.Tile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.easing');
-goog.require('ol.events.EventTarget');
-goog.require('ol.events.EventType');
-
-
-/**
- * @classdesc
- * Base class for tiles.
- *
- * @constructor
- * @abstract
- * @extends {ol.events.EventTarget}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {olx.TileOptions=} opt_options Tile options.
- */
-ol.Tile = function(tileCoord, state, opt_options) {
-  ol.events.EventTarget.call(this);
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.TileCoord}
-   */
-  this.tileCoord = tileCoord;
-
-  /**
-   * @protected
-   * @type {ol.TileState}
-   */
-  this.state = state;
-
-  /**
-   * An "interim" tile for this tile. The interim tile may be used while this
-   * one is loading, for "smooth" transitions when changing params/dimensions
-   * on the source.
-   * @type {ol.Tile}
-   */
-  this.interimTile = null;
-
-  /**
-   * A key assigned to the tile. This is used by the tile source to determine
-   * if this tile can effectively be used, or if a new tile should be created
-   * and this one be used as an interim tile for this new tile.
-   * @type {string}
-   */
-  this.key = '';
-
-  /**
-   * The duration for the opacity transition.
-   * @type {number}
-   */
-  this.transition_ = options.transition === undefined ?
-    250 : options.transition;
-
-  /**
-   * Lookup of start times for rendering transitions.  If the start time is
-   * equal to -1, the transition is complete.
-   * @type {Object.<number, number>}
-   */
-  this.transitionStarts_ = {};
-
-};
-ol.inherits(ol.Tile, ol.events.EventTarget);
-
-
-/**
- * @protected
- */
-ol.Tile.prototype.changed = function() {
-  this.dispatchEvent(ol.events.EventType.CHANGE);
-};
-
-
-/**
- * @return {string} Key.
- */
-ol.Tile.prototype.getKey = function() {
-  return this.key + '/' + this.tileCoord;
-};
-
-/**
- * Get the interim tile most suitable for rendering using the chain of interim
- * tiles. This corresponds to the  most recent tile that has been loaded, if no
- * such tile exists, the original tile is returned.
- * @return {!ol.Tile} Best tile for rendering.
- */
-ol.Tile.prototype.getInterimTile = function() {
-  if (!this.interimTile) {
-    //empty chain
-    return this;
-  }
-  var tile = this.interimTile;
-
-  // find the first loaded tile and return it. Since the chain is sorted in
-  // decreasing order of creation time, there is no need to search the remainder
-  // of the list (all those tiles correspond to older requests and will be
-  // cleaned up by refreshInterimChain)
-  do {
-    if (tile.getState() == ol.TileState.LOADED) {
-      return tile;
-    }
-    tile = tile.interimTile;
-  } while (tile);
-
-  // we can not find a better tile
-  return this;
-};
-
-/**
- * Goes through the chain of interim tiles and discards sections of the chain
- * that are no longer relevant.
- */
-ol.Tile.prototype.refreshInterimChain = function() {
-  if (!this.interimTile) {
-    return;
-  }
-
-  var tile = this.interimTile;
-  var prev = this;
-
-  do {
-    if (tile.getState() == ol.TileState.LOADED) {
-      //we have a loaded tile, we can discard the rest of the list
-      //we would could abort any LOADING tile request
-      //older than this tile (i.e. any LOADING tile following this entry in the chain)
-      tile.interimTile = null;
-      break;
-    } else if (tile.getState() == ol.TileState.LOADING) {
-      //keep this LOADING tile any loaded tiles later in the chain are
-      //older than this tile, so we're still interested in the request
-      prev = tile;
-    } else if (tile.getState() == ol.TileState.IDLE) {
-      //the head of the list is the most current tile, we don't need
-      //to start any other requests for this chain
-      prev.interimTile = tile.interimTile;
-    } else {
-      prev = tile;
-    }
-    tile = prev.interimTile;
-  } while (tile);
-};
-
-/**
- * Get the tile coordinate for this tile.
- * @return {ol.TileCoord} The tile coordinate.
- * @api
- */
-ol.Tile.prototype.getTileCoord = function() {
-  return this.tileCoord;
-};
-
-
-/**
- * @return {ol.TileState} State.
- */
-ol.Tile.prototype.getState = function() {
-  return this.state;
-};
-
-/**
- * @param {ol.TileState} state State.
- */
-ol.Tile.prototype.setState = function(state) {
-  this.state = state;
-  this.changed();
-};
-
-/**
- * Load the image or retry if loading previously failed.
- * Loading is taken care of by the tile queue, and calling this method is
- * only needed for preloading or for reloading in case of an error.
- * @abstract
- * @api
- */
-ol.Tile.prototype.load = function() {};
-
-/**
- * Get the alpha value for rendering.
- * @param {number} id An id for the renderer.
- * @param {number} time The render frame time.
- * @return {number} A number between 0 and 1.
- */
-ol.Tile.prototype.getAlpha = function(id, time) {
-  if (!this.transition_) {
-    return 1;
-  }
-
-  var start = this.transitionStarts_[id];
-  if (!start) {
-    start = time;
-    this.transitionStarts_[id] = start;
-  } else if (start === -1) {
-    return 1;
-  }
-
-  var delta = time - start + (1000 / 60); // avoid rendering at 0
-  if (delta >= this.transition_) {
-    return 1;
-  }
-  return ol.easing.easeIn(delta / this.transition_);
-};
-
-/**
- * Determine if a tile is in an alpha transition.  A tile is considered in
- * transition if tile.getAlpha() has not yet been called or has been called
- * and returned 1.
- * @param {number} id An id for the renderer.
- * @return {boolean} The tile is in transition.
- */
-ol.Tile.prototype.inTransition = function(id) {
-  if (!this.transition_) {
-    return false;
-  }
-  return this.transitionStarts_[id] !== -1;
-};
-
-/**
- * Mark a transition as complete.
- * @param {number} id An id for the renderer.
- */
-ol.Tile.prototype.endTransition = function(id) {
-  if (this.transition_) {
-    this.transitionStarts_[id] = -1;
-  }
-};
-
-goog.provide('ol.ImageTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @param {olx.TileOptions=} opt_options Tile options.
- */
-ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
-
-  ol.Tile.call(this, tileCoord, state, opt_options);
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ = crossOrigin;
-
-  /**
-   * Image URI
-   *
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {Image|HTMLCanvasElement}
-   */
-  this.image_ = new Image();
-  if (crossOrigin !== null) {
-    this.image_.crossOrigin = crossOrigin;
-  }
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.imageListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction_ = tileLoadFunction;
-
-};
-ol.inherits(ol.ImageTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.ImageTile.prototype.disposeInternal = function() {
-  if (this.state == ol.TileState.LOADING) {
-    this.unlistenImage_();
-    this.image_ = ol.ImageTile.getBlankImage();
-  }
-  if (this.interimTile) {
-    this.interimTile.dispose();
-  }
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the HTML image element for this tile (may be a Canvas, Image, or Video).
- * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
- * @api
- */
-ol.ImageTile.prototype.getImage = function() {
-  return this.image_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.ImageTile.prototype.getKey = function() {
-  return this.src_;
-};
-
-
-/**
- * Tracks loading or read errors.
- *
- * @private
- */
-ol.ImageTile.prototype.handleImageError_ = function() {
-  this.state = ol.TileState.ERROR;
-  this.unlistenImage_();
-  this.image_ = ol.ImageTile.getBlankImage();
-  this.changed();
-};
-
-
-/**
- * Tracks successful image load.
- *
- * @private
- */
-ol.ImageTile.prototype.handleImageLoad_ = function() {
-  if (this.image_.naturalWidth && this.image_.naturalHeight) {
-    this.state = ol.TileState.LOADED;
-  } else {
-    this.state = ol.TileState.EMPTY;
-  }
-  this.unlistenImage_();
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.ImageTile.prototype.load = function() {
-  if (this.state == ol.TileState.ERROR) {
-    this.state = ol.TileState.IDLE;
-    this.image_ = new Image();
-    if (this.crossOrigin_ !== null) {
-      this.image_.crossOrigin = this.crossOrigin_;
-    }
-  }
-  if (this.state == ol.TileState.IDLE) {
-    this.state = ol.TileState.LOADING;
-    this.changed();
-    this.imageListenerKeys_ = [
-      ol.events.listenOnce(this.image_, ol.events.EventType.ERROR,
-          this.handleImageError_, this),
-      ol.events.listenOnce(this.image_, ol.events.EventType.LOAD,
-          this.handleImageLoad_, this)
-    ];
-    this.tileLoadFunction_(this, this.src_);
-  }
-};
-
-
-/**
- * Discards event handlers which listen for load completion or errors.
- *
- * @private
- */
-ol.ImageTile.prototype.unlistenImage_ = function() {
-  this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.imageListenerKeys_ = null;
-};
-
-
-/**
- * Get a 1-pixel blank image.
- * @return {HTMLCanvasElement} Blank image.
- */
-ol.ImageTile.getBlankImage = function() {
-  var ctx = ol.dom.createCanvasContext2D(1, 1);
-  ctx.fillStyle = 'rgba(0,0,0,0)';
-  ctx.fillRect(0, 0, 1, 1);
-  return ctx.canvas;
-};
-
-// FIXME should handle all geo-referenced data, not just vector data
-
-goog.provide('ol.interaction.DragAndDrop');
-
-goog.require('ol');
-goog.require('ol.functions');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Handles input of vector data by drag and drop.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @fires ol.interaction.DragAndDrop.Event
- * @param {olx.interaction.DragAndDropOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragAndDrop = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.DragAndDrop.handleEvent
-  });
-
-  /**
-   * @private
-   * @type {Array.<function(new: ol.format.Feature)>}
-   */
-  this.formatConstructors_ = options.formatConstructors ?
-    options.formatConstructors : [];
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = options.projection ?
-    ol.proj.get(options.projection) : null;
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.dropListenKeys_ = null;
-
-  /**
-   * @private
-   * @type {ol.source.Vector}
-   */
-  this.source_ = options.source || null;
-
-  /**
-   * @private
-   * @type {Element}
-   */
-  this.target = options.target ? options.target : null;
-
-};
-ol.inherits(ol.interaction.DragAndDrop, ol.interaction.Interaction);
-
-
-/**
- * @param {Event} event Event.
- * @this {ol.interaction.DragAndDrop}
- * @private
- */
-ol.interaction.DragAndDrop.handleDrop_ = function(event) {
-  var files = event.dataTransfer.files;
-  var i, ii, file;
-  for (i = 0, ii = files.length; i < ii; ++i) {
-    file = files.item(i);
-    var reader = new FileReader();
-    reader.addEventListener(ol.events.EventType.LOAD,
-        this.handleResult_.bind(this, file));
-    reader.readAsText(file);
-  }
-};
-
-
-/**
- * @param {Event} event Event.
- * @private
- */
-ol.interaction.DragAndDrop.handleStop_ = function(event) {
-  event.stopPropagation();
-  event.preventDefault();
-  event.dataTransfer.dropEffect = 'copy';
-};
-
-
-/**
- * @param {File} file File.
- * @param {Event} event Load event.
- * @private
- */
-ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) {
-  var result = event.target.result;
-  var map = this.getMap();
-  var projection = this.projection_;
-  if (!projection) {
-    var view = map.getView();
-    projection = view.getProjection();
-  }
-
-  var formatConstructors = this.formatConstructors_;
-  var features = [];
-  var i, ii;
-  for (i = 0, ii = formatConstructors.length; i < ii; ++i) {
-    /**
-     * Avoid "cannot instantiate abstract class" error.
-     * @type {Function}
-     */
-    var formatConstructor = formatConstructors[i];
-    /**
-     * @type {ol.format.Feature}
-     */
-    var format = new formatConstructor();
-    features = this.tryReadFeatures_(format, result, {
-      featureProjection: projection
-    });
-    if (features && features.length > 0) {
-      break;
-    }
-  }
-  if (this.source_) {
-    this.source_.clear();
-    this.source_.addFeatures(features);
-  }
-  this.dispatchEvent(
-      new ol.interaction.DragAndDrop.Event(
-          ol.interaction.DragAndDrop.EventType_.ADD_FEATURES, file,
-          features, projection));
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} unconditionally and
- * neither prevents the browser default nor stops event propagation.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.DragAndDrop}
- * @api
- */
-ol.interaction.DragAndDrop.handleEvent = ol.functions.TRUE;
-
-
-/**
- * @private
- */
-ol.interaction.DragAndDrop.prototype.registerListeners_ = function() {
-  var map = this.getMap();
-  if (map) {
-    var dropArea = this.target ? this.target : map.getViewport();
-    this.dropListenKeys_ = [
-      ol.events.listen(dropArea, ol.events.EventType.DROP,
-          ol.interaction.DragAndDrop.handleDrop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DRAGENTER,
-          ol.interaction.DragAndDrop.handleStop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DRAGOVER,
-          ol.interaction.DragAndDrop.handleStop_, this),
-      ol.events.listen(dropArea, ol.events.EventType.DROP,
-          ol.interaction.DragAndDrop.handleStop_, this)
-    ];
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragAndDrop.prototype.setActive = function(active) {
-  ol.interaction.Interaction.prototype.setActive.call(this, active);
-  if (active) {
-    this.registerListeners_();
-  } else {
-    this.unregisterListeners_();
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.DragAndDrop.prototype.setMap = function(map) {
-  this.unregisterListeners_();
-  ol.interaction.Interaction.prototype.setMap.call(this, map);
-  if (this.getActive()) {
-    this.registerListeners_();
-  }
-};
-
-
-/**
- * @param {ol.format.Feature} format Format.
- * @param {string} text Text.
- * @param {olx.format.ReadOptions} options Read options.
- * @private
- * @return {Array.<ol.Feature>} Features.
- */
-ol.interaction.DragAndDrop.prototype.tryReadFeatures_ = function(format, text, options) {
-  try {
-    return format.readFeatures(text, options);
-  } catch (e) {
-    return null;
-  }
-};
-
-
-/**
- * @private
- */
-ol.interaction.DragAndDrop.prototype.unregisterListeners_ = function() {
-  if (this.dropListenKeys_) {
-    this.dropListenKeys_.forEach(ol.events.unlistenByKey);
-    this.dropListenKeys_ = null;
-  }
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.DragAndDrop.EventType_ = {
-  /**
-   * Triggered when features are added
-   * @event ol.interaction.DragAndDrop.Event#addfeatures
-   * @api
-   */
-  ADD_FEATURES: 'addfeatures'
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.DragAndDrop} instances are instances
- * of this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.DragAndDropEvent}
- * @param {ol.interaction.DragAndDrop.EventType_} type Type.
- * @param {File} file File.
- * @param {Array.<ol.Feature>=} opt_features Features.
- * @param {ol.proj.Projection=} opt_projection Projection.
- */
-ol.interaction.DragAndDrop.Event = function(type, file, opt_features, opt_projection) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features parsed from dropped data.
-   * @type {Array.<ol.Feature>|undefined}
-   * @api
-   */
-  this.features = opt_features;
-
-  /**
-   * The dropped file.
-   * @type {File}
-   * @api
-   */
-  this.file = file;
-
-  /**
-   * The feature projection.
-   * @type {ol.proj.Projection|undefined}
-   * @api
-   */
-  this.projection = opt_projection;
-
-};
-ol.inherits(ol.interaction.DragAndDrop.Event, ol.events.Event);
-
-goog.provide('ol.interaction.DragRotateAndZoom');
-
-goog.require('ol');
-goog.require('ol.RotationConstraint');
-goog.require('ol.ViewHint');
-goog.require('ol.events.condition');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.Pointer');
-
-
-/**
- * @classdesc
- * Allows the user to zoom and rotate the map by clicking and dragging
- * on the map.  By default, this interaction is limited to when the shift
- * key is held down.
- *
- * This interaction is only supported for mouse devices.
- *
- * And this interaction is not included in the default interactions.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.DragRotateAndZoomOptions=} opt_options Options.
- * @api
- */
-ol.interaction.DragRotateAndZoom = function(opt_options) {
-
-  var options = opt_options ? opt_options : {};
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.DragRotateAndZoom.handleDownEvent_,
-    handleDragEvent: ol.interaction.DragRotateAndZoom.handleDragEvent_,
-    handleUpEvent: ol.interaction.DragRotateAndZoom.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastAngle_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.lastMagnitude_ = undefined;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.lastScaleDelta_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.duration_ = options.duration !== undefined ? options.duration : 400;
-
-};
-ol.inherits(ol.interaction.DragRotateAndZoom, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return;
-  }
-
-  var map = mapBrowserEvent.map;
-  var size = map.getSize();
-  var offset = mapBrowserEvent.pixel;
-  var deltaX = offset[0] - size[0] / 2;
-  var deltaY = size[1] / 2 - offset[1];
-  var theta = Math.atan2(deltaY, deltaX);
-  var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
-  var view = map.getView();
-  if (view.getConstraints().rotation !== ol.RotationConstraint.disable && this.lastAngle_ !== undefined) {
-    var angleDelta = theta - this.lastAngle_;
-    ol.interaction.Interaction.rotateWithoutConstraints(
-        view, view.getRotation() - angleDelta);
-  }
-  this.lastAngle_ = theta;
-  if (this.lastMagnitude_ !== undefined) {
-    var resolution = this.lastMagnitude_ * (view.getResolution() / magnitude);
-    ol.interaction.Interaction.zoomWithoutConstraints(view, resolution);
-  }
-  if (this.lastMagnitude_ !== undefined) {
-    this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;
-  }
-  this.lastMagnitude_ = magnitude;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return true;
-  }
-
-  var map = mapBrowserEvent.map;
-  var view = map.getView();
-  view.setHint(ol.ViewHint.INTERACTING, -1);
-  var direction = this.lastScaleDelta_ - 1;
-  ol.interaction.Interaction.rotate(view, view.getRotation());
-  ol.interaction.Interaction.zoom(view, view.getResolution(),
-      undefined, this.duration_, direction);
-  this.lastScaleDelta_ = 0;
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.DragRotateAndZoom}
- * @private
- */
-ol.interaction.DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
-  if (!ol.events.condition.mouseOnly(mapBrowserEvent)) {
-    return false;
-  }
-
-  if (this.condition_(mapBrowserEvent)) {
-    mapBrowserEvent.map.getView().setHint(ol.ViewHint.INTERACTING, 1);
-    this.lastAngle_ = undefined;
-    this.lastMagnitude_ = undefined;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-goog.provide('ol.interaction.DrawEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.DrawEventType = {
-  /**
-   * Triggered upon feature draw start
-   * @event ol.interaction.Draw.Event#drawstart
-   * @api
-   */
-  DRAWSTART: 'drawstart',
-  /**
-   * Triggered upon feature draw end
-   * @event ol.interaction.Draw.Event#drawend
-   * @api
-   */
-  DRAWEND: 'drawend'
-};
-
-goog.provide('ol.layer.Vector');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.layer.Layer');
-goog.require('ol.layer.VectorRenderType');
-goog.require('ol.obj');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Vector data that is rendered client-side.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.VectorOptions=} opt_options Options.
- * @api
- */
-ol.layer.Vector = function(opt_options) {
-  var options = opt_options ?
-    opt_options : /** @type {olx.layer.VectorOptions} */ ({});
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.style;
-  delete baseOptions.renderBuffer;
-  delete baseOptions.updateWhileAnimating;
-  delete baseOptions.updateWhileInteracting;
-  ol.layer.Layer.call(this, /** @type {olx.layer.LayerOptions} */ (baseOptions));
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.declutter_ = options.declutter !== undefined ? options.declutter : false;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.renderBuffer_ = options.renderBuffer !== undefined ?
-    options.renderBuffer : 100;
-
-  /**
-   * User provided style.
-   * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
-   * @private
-   */
-  this.style_ = null;
-
-  /**
-   * Style function for use within the library.
-   * @type {ol.StyleFunction|undefined}
-   * @private
-   */
-  this.styleFunction_ = undefined;
-
-  this.setStyle(options.style);
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.updateWhileAnimating_ = options.updateWhileAnimating !== undefined ?
-    options.updateWhileAnimating : false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.updateWhileInteracting_ = options.updateWhileInteracting !== undefined ?
-    options.updateWhileInteracting : false;
-
-  /**
-   * @private
-   * @type {ol.layer.VectorTileRenderType|string}
-   */
-  this.renderMode_ = options.renderMode || ol.layer.VectorRenderType.VECTOR;
-
-  /**
-   * The layer type.
-   * @protected
-   * @type {ol.LayerType}
-   */
-  this.type = ol.LayerType.VECTOR;
-
-};
-ol.inherits(ol.layer.Vector, ol.layer.Layer);
-
-
-/**
- * @return {boolean} Declutter.
- */
-ol.layer.Vector.prototype.getDeclutter = function() {
-  return this.declutter_;
-};
-
-
-/**
- * @param {boolean} declutter Declutter.
- */
-ol.layer.Vector.prototype.setDeclutter = function(declutter) {
-  this.declutter_ = declutter;
-};
-
-
-/**
- * @return {number|undefined} Render buffer.
- */
-ol.layer.Vector.prototype.getRenderBuffer = function() {
-  return this.renderBuffer_;
-};
-
-
-/**
- * @return {function(ol.Feature, ol.Feature): number|null|undefined} Render
- *     order.
- */
-ol.layer.Vector.prototype.getRenderOrder = function() {
-  return /** @type {ol.RenderOrderFunction|null|undefined} */ (
-    this.get(ol.layer.Vector.Property_.RENDER_ORDER));
-};
-
-
-/**
- * Return the associated {@link ol.source.Vector vectorsource} of the layer.
- * @function
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.layer.Vector.prototype.getSource;
-
-
-/**
- * Get the style for features.  This returns whatever was passed to the `style`
- * option at construction or to the `setStyle` method.
- * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
- *     Layer style.
- * @api
- */
-ol.layer.Vector.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the style function.
- * @return {ol.StyleFunction|undefined} Layer style function.
- * @api
- */
-ol.layer.Vector.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @return {boolean} Whether the rendered layer should be updated while
- *     animating.
- */
-ol.layer.Vector.prototype.getUpdateWhileAnimating = function() {
-  return this.updateWhileAnimating_;
-};
-
-
-/**
- * @return {boolean} Whether the rendered layer should be updated while
- *     interacting.
- */
-ol.layer.Vector.prototype.getUpdateWhileInteracting = function() {
-  return this.updateWhileInteracting_;
-};
-
-
-/**
- * @param {ol.RenderOrderFunction|null|undefined} renderOrder
- *     Render order.
- */
-ol.layer.Vector.prototype.setRenderOrder = function(renderOrder) {
-  this.set(ol.layer.Vector.Property_.RENDER_ORDER, renderOrder);
-};
-
-
-/**
- * Set the style for features.  This can be a single style object, an array
- * of styles, or a function that takes a feature and resolution and returns
- * an array of styles. If it is `undefined` the default style is used. If
- * it is `null` the layer has no style (a `null` style), so only features
- * that have their own styles will be rendered in the layer. See
- * {@link ol.style} for information on the default style.
- * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|null|undefined}
- *     style Layer style.
- * @api
- */
-ol.layer.Vector.prototype.setStyle = function(style) {
-  this.style_ = style !== undefined ? style : ol.style.Style.defaultFunction;
-  this.styleFunction_ = style === null ?
-    undefined : ol.style.Style.createFunction(this.style_);
-  this.changed();
-};
-
-
-/**
- * @return {ol.layer.VectorRenderType|string} The render mode.
- */
-ol.layer.Vector.prototype.getRenderMode = function() {
-  return this.renderMode_;
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Vector.Property_ = {
-  RENDER_ORDER: 'renderOrder'
-};
-
-goog.provide('ol.loadingstrategy');
-
-
-/**
- * Strategy function for loading all features with a single request.
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.Extent>} Extents.
- * @api
- */
-ol.loadingstrategy.all = function(extent, resolution) {
-  return [[-Infinity, -Infinity, Infinity, Infinity]];
-};
-
-
-/**
- * Strategy function for loading features based on the view's extent and
- * resolution.
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @return {Array.<ol.Extent>} Extents.
- * @api
- */
-ol.loadingstrategy.bbox = function(extent, resolution) {
-  return [extent];
-};
-
-
-/**
- * Creates a strategy function for loading features based on a tile grid.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {function(ol.Extent, number): Array.<ol.Extent>} Loading strategy.
- * @api
- */
-ol.loadingstrategy.tile = function(tileGrid) {
-  return (
-  /**
-       * @param {ol.Extent} extent Extent.
-       * @param {number} resolution Resolution.
-       * @return {Array.<ol.Extent>} Extents.
-       */
-    function(extent, resolution) {
-      var z = tileGrid.getZForResolution(resolution);
-      var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-      /** @type {Array.<ol.Extent>} */
-      var extents = [];
-      /** @type {ol.TileCoord} */
-      var tileCoord = [z, 0, 0];
-      for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX;
-        ++tileCoord[1]) {
-        for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY;
-          ++tileCoord[2]) {
-          extents.push(tileGrid.getTileCoordExtent(tileCoord));
-        }
-      }
-      return extents;
-    });
-};
-
-goog.provide('ol.source.Source');
-
-goog.require('ol');
-goog.require('ol.Attribution');
-goog.require('ol.Object');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for {@link ol.layer.Layer} sources.
- *
- * A generic `change` event is triggered when the state of the source changes.
- *
- * @constructor
- * @abstract
- * @extends {ol.Object}
- * @param {ol.SourceSourceOptions} options Source options.
- * @api
- */
-ol.source.Source = function(options) {
-
-  ol.Object.call(this);
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_ = ol.proj.get(options.projection);
-
-  /**
-   * @private
-   * @type {Array.<ol.Attribution>}
-   */
-  this.attributions_ = null;
-
-  /**
-   * @private
-   * @type {?ol.Attribution2}
-   */
-  this.attributions2_ = this.adaptAttributions_(options.attributions);
-
-  /**
-   * @private
-   * @type {string|olx.LogoOptions|undefined}
-   */
-  this.logo_ = options.logo;
-
-  /**
-   * @private
-   * @type {ol.source.State}
-   */
-  this.state_ = options.state !== undefined ?
-    options.state : ol.source.State.READY;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;
-
-};
-ol.inherits(ol.source.Source, ol.Object);
-
-/**
- * Turns the attributions option into an attributions function.
- * @suppress {deprecated}
- * @param {ol.AttributionLike|undefined} attributionLike The attribution option.
- * @return {?ol.Attribution2} An attribution function (or null).
- */
-ol.source.Source.prototype.adaptAttributions_ = function(attributionLike) {
-  if (!attributionLike) {
-    return null;
-  }
-  if (attributionLike instanceof ol.Attribution) {
-
-    // TODO: remove attributions_ in next major release
-    this.attributions_ = [attributionLike];
-
-    return function(frameState) {
-      return [attributionLike.getHTML()];
-    };
-  }
-  if (Array.isArray(attributionLike)) {
-    if (attributionLike[0] instanceof ol.Attribution) {
-
-      // TODO: remove attributions_ in next major release
-      this.attributions_ = attributionLike;
-
-      var attributions = attributionLike.map(function(attribution) {
-        return attribution.getHTML();
-      });
-      return function(frameState) {
-        return attributions;
-      };
-    }
-
-    // TODO: remove attributions_ in next major release
-    this.attributions_ = attributionLike.map(function(attribution) {
-      return new ol.Attribution({html: attribution});
-    });
-
-    return function(frameState) {
-      return attributionLike;
-    };
-  }
-
-  if (typeof attributionLike === 'function') {
-    return attributionLike;
-  }
-
-  // TODO: remove attributions_ in next major release
-  this.attributions_ = [
-    new ol.Attribution({html: attributionLike})
-  ];
-
-  return function(frameState) {
-    return [attributionLike];
-  };
-};
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
- * @param {function((ol.Feature|ol.render.Feature)): T} callback Feature
- *     callback.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.source.Source.prototype.forEachFeatureAtCoordinate = ol.nullFunction;
-
-
-/**
- * Get the attributions of the source.
- * @return {Array.<ol.Attribution>} Attributions.
- * @api
- */
-ol.source.Source.prototype.getAttributions = function() {
-  return this.attributions_;
-};
-
-
-/**
- * Get the attribution function for the source.
- * @return {?ol.Attribution2} Attribution function.
- */
-ol.source.Source.prototype.getAttributions2 = function() {
-  return this.attributions2_;
-};
-
-
-/**
- * Get the logo of the source.
- * @return {string|olx.LogoOptions|undefined} Logo.
- * @api
- */
-ol.source.Source.prototype.getLogo = function() {
-  return this.logo_;
-};
-
-
-/**
- * Get the projection of the source.
- * @return {ol.proj.Projection} Projection.
- * @api
- */
-ol.source.Source.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-/**
- * @abstract
- * @return {Array.<number>|undefined} Resolutions.
- */
-ol.source.Source.prototype.getResolutions = function() {};
-
-
-/**
- * Get the state of the source, see {@link ol.source.State} for possible states.
- * @return {ol.source.State} State.
- * @api
- */
-ol.source.Source.prototype.getState = function() {
-  return this.state_;
-};
-
-
-/**
- * @return {boolean|undefined} Wrap X.
- */
-ol.source.Source.prototype.getWrapX = function() {
-  return this.wrapX_;
-};
-
-
-/**
- * Refreshes the source and finally dispatches a 'change' event.
- * @api
- */
-ol.source.Source.prototype.refresh = function() {
-  this.changed();
-};
-
-
-/**
- * Set the attributions of the source.
- * @param {ol.AttributionLike|undefined} attributions Attributions.
- *     Can be passed as `string`, `Array<string>`, `{@link ol.Attribution2}`,
- *     or `undefined`.
- * @api
- */
-ol.source.Source.prototype.setAttributions = function(attributions) {
-  this.attributions2_ = this.adaptAttributions_(attributions);
-  this.changed();
-};
-
-
-/**
- * Set the logo of the source.
- * @param {string|olx.LogoOptions|undefined} logo Logo.
- */
-ol.source.Source.prototype.setLogo = function(logo) {
-  this.logo_ = logo;
-};
-
-
-/**
- * Set the state of the source.
- * @param {ol.source.State} state State.
- * @protected
- */
-ol.source.Source.prototype.setState = function(state) {
-  this.state_ = state;
-  this.changed();
-};
-
-goog.provide('ol.source.VectorEventType');
-
-/**
- * @enum {string}
- */
-ol.source.VectorEventType = {
-  /**
-   * Triggered when a feature is added to the source.
-   * @event ol.source.Vector.Event#addfeature
-   * @api
-   */
-  ADDFEATURE: 'addfeature',
-
-  /**
-   * Triggered when a feature is updated.
-   * @event ol.source.Vector.Event#changefeature
-   * @api
-   */
-  CHANGEFEATURE: 'changefeature',
-
-  /**
-   * Triggered when the clear method is called on the source.
-   * @event ol.source.Vector.Event#clear
-   * @api
-   */
-  CLEAR: 'clear',
-
-  /**
-   * Triggered when a feature is removed from the source.
-   * See {@link ol.source.Vector#clear source.clear()} for exceptions.
-   * @event ol.source.Vector.Event#removefeature
-   * @api
-   */
-  REMOVEFEATURE: 'removefeature'
-};
-
-goog.provide('ol.structs.RBush');
-
-goog.require('ol');
-goog.require('ol.ext.rbush');
-goog.require('ol.extent');
-goog.require('ol.obj');
-
-
-/**
- * Wrapper around the RBush by Vladimir Agafonkin.
- *
- * @constructor
- * @param {number=} opt_maxEntries Max entries.
- * @see https://github.com/mourner/rbush
- * @struct
- * @template T
- */
-ol.structs.RBush = function(opt_maxEntries) {
-
-  /**
-   * @private
-   */
-  this.rbush_ = ol.ext.rbush(opt_maxEntries);
-
-  /**
-   * A mapping between the objects added to this rbush wrapper
-   * and the objects that are actually added to the internal rbush.
-   * @private
-   * @type {Object.<number, ol.RBushEntry>}
-   */
-  this.items_ = {};
-
-};
-
-
-/**
- * Insert a value into the RBush.
- * @param {ol.Extent} extent Extent.
- * @param {T} value Value.
- */
-ol.structs.RBush.prototype.insert = function(extent, value) {
-  /** @type {ol.RBushEntry} */
-  var item = {
-    minX: extent[0],
-    minY: extent[1],
-    maxX: extent[2],
-    maxY: extent[3],
-    value: value
-  };
-
-  this.rbush_.insert(item);
-  this.items_[ol.getUid(value)] = item;
-};
-
-
-/**
- * Bulk-insert values into the RBush.
- * @param {Array.<ol.Extent>} extents Extents.
- * @param {Array.<T>} values Values.
- */
-ol.structs.RBush.prototype.load = function(extents, values) {
-  var items = new Array(values.length);
-  for (var i = 0, l = values.length; i < l; i++) {
-    var extent = extents[i];
-    var value = values[i];
-
-    /** @type {ol.RBushEntry} */
-    var item = {
-      minX: extent[0],
-      minY: extent[1],
-      maxX: extent[2],
-      maxY: extent[3],
-      value: value
-    };
-    items[i] = item;
-    this.items_[ol.getUid(value)] = item;
-  }
-  this.rbush_.load(items);
-};
-
-
-/**
- * Remove a value from the RBush.
- * @param {T} value Value.
- * @return {boolean} Removed.
- */
-ol.structs.RBush.prototype.remove = function(value) {
-  var uid = ol.getUid(value);
-
-  // get the object in which the value was wrapped when adding to the
-  // internal rbush. then use that object to do the removal.
-  var item = this.items_[uid];
-  delete this.items_[uid];
-  return this.rbush_.remove(item) !== null;
-};
-
-
-/**
- * Update the extent of a value in the RBush.
- * @param {ol.Extent} extent Extent.
- * @param {T} value Value.
- */
-ol.structs.RBush.prototype.update = function(extent, value) {
-  var item = this.items_[ol.getUid(value)];
-  var bbox = [item.minX, item.minY, item.maxX, item.maxY];
-  if (!ol.extent.equals(bbox, extent)) {
-    this.remove(value);
-    this.insert(extent, value);
-  }
-};
-
-
-/**
- * Return all values in the RBush.
- * @return {Array.<T>} All.
- */
-ol.structs.RBush.prototype.getAll = function() {
-  var items = this.rbush_.all();
-  return items.map(function(item) {
-    return item.value;
-  });
-};
-
-
-/**
- * Return all values in the given extent.
- * @param {ol.Extent} extent Extent.
- * @return {Array.<T>} All in extent.
- */
-ol.structs.RBush.prototype.getInExtent = function(extent) {
-  /** @type {ol.RBushEntry} */
-  var bbox = {
-    minX: extent[0],
-    minY: extent[1],
-    maxX: extent[2],
-    maxY: extent[3]
-  };
-  var items = this.rbush_.search(bbox);
-  return items.map(function(item) {
-    return item.value;
-  });
-};
-
-
-/**
- * Calls a callback function with each value in the tree.
- * If the callback returns a truthy value, this value is returned without
- * checking the rest of the tree.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEach = function(callback, opt_this) {
-  return this.forEach_(this.getAll(), callback, opt_this);
-};
-
-
-/**
- * Calls a callback function with each value in the provided extent.
- * @param {ol.Extent} extent Extent.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEachInExtent = function(extent, callback, opt_this) {
-  return this.forEach_(this.getInExtent(extent), callback, opt_this);
-};
-
-
-/**
- * @param {Array.<T>} values Values.
- * @param {function(this: S, T): *} callback Callback.
- * @param {S=} opt_this The object to use as `this` in `callback`.
- * @private
- * @return {*} Callback return value.
- * @template S
- */
-ol.structs.RBush.prototype.forEach_ = function(values, callback, opt_this) {
-  var result;
-  for (var i = 0, l = values.length; i < l; i++) {
-    result = callback.call(opt_this, values[i]);
-    if (result) {
-      return result;
-    }
-  }
-  return result;
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.structs.RBush.prototype.isEmpty = function() {
-  return ol.obj.isEmpty(this.items_);
-};
-
-
-/**
- * Remove all values from the RBush.
- */
-ol.structs.RBush.prototype.clear = function() {
-  this.rbush_.clear();
-  this.items_ = {};
-};
-
-
-/**
- * @param {ol.Extent=} opt_extent Extent.
- * @return {ol.Extent} Extent.
- */
-ol.structs.RBush.prototype.getExtent = function(opt_extent) {
-  // FIXME add getExtent() to rbush
-  var data = this.rbush_.data;
-  return ol.extent.createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);
-};
-
-
-/**
- * @param {ol.structs.RBush} rbush R-Tree.
- */
-ol.structs.RBush.prototype.concat = function(rbush) {
-  this.rbush_.load(rbush.rbush_.all());
-  for (var i in rbush.items_) {
-    this.items_[i | 0] = rbush.items_[i | 0];
-  }
-};
-
-// FIXME bulk feature upload - suppress events
-// FIXME make change-detection more refined (notably, geometry hint)
-
-goog.provide('ol.source.Vector');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.ObjectEventType');
-goog.require('ol.array');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.featureloader');
-goog.require('ol.functions');
-goog.require('ol.loadingstrategy');
-goog.require('ol.obj');
-goog.require('ol.source.Source');
-goog.require('ol.source.State');
-goog.require('ol.source.VectorEventType');
-goog.require('ol.structs.RBush');
-
-
-/**
- * @classdesc
- * Provides a source of features for vector layers. Vector features provided
- * by this source are suitable for editing. See {@link ol.source.VectorTile} for
- * vector data that is optimized for rendering.
- *
- * @constructor
- * @extends {ol.source.Source}
- * @fires ol.source.Vector.Event
- * @param {olx.source.VectorOptions=} opt_options Vector source options.
- * @api
- */
-ol.source.Vector = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: undefined,
-    state: ol.source.State.READY,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_ = ol.nullFunction;
-
-  /**
-   * @private
-   * @type {ol.format.Feature|undefined}
-   */
-  this.format_ = options.format;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
-
-  /**
-   * @private
-   * @type {string|ol.FeatureUrlFunction|undefined}
-   */
-  this.url_ = options.url;
-
-  if (options.loader !== undefined) {
-    this.loader_ = options.loader;
-  } else if (this.url_ !== undefined) {
-    ol.asserts.assert(this.format_, 7); // `format` must be set when `url` is set
-    // create a XHR feature loader for "url" and "format"
-    this.loader_ = ol.featureloader.xhr(this.url_, /** @type {ol.format.Feature} */ (this.format_));
-  }
-
-  /**
-   * @private
-   * @type {ol.LoadingStrategy}
-   */
-  this.strategy_ = options.strategy !== undefined ? options.strategy :
-    ol.loadingstrategy.all;
-
-  var useSpatialIndex =
-      options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;
-
-  /**
-   * @private
-   * @type {ol.structs.RBush.<ol.Feature>}
-   */
-  this.featuresRtree_ = useSpatialIndex ? new ol.structs.RBush() : null;
-
-  /**
-   * @private
-   * @type {ol.structs.RBush.<{extent: ol.Extent}>}
-   */
-  this.loadedExtentsRtree_ = new ol.structs.RBush();
-
-  /**
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.nullGeometryFeatures_ = {};
-
-  /**
-   * A lookup of features by id (the return from feature.getId()).
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.idIndex_ = {};
-
-  /**
-   * A lookup of features without id (keyed by ol.getUid(feature)).
-   * @private
-   * @type {Object.<string, ol.Feature>}
-   */
-  this.undefIdIndex_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, Array.<ol.EventsKey>>}
-   */
-  this.featureChangeKeys_ = {};
-
-  /**
-   * @private
-   * @type {ol.Collection.<ol.Feature>}
-   */
-  this.featuresCollection_ = null;
-
-  var collection, features;
-  if (options.features instanceof ol.Collection) {
-    collection = options.features;
-    features = collection.getArray();
-  } else if (Array.isArray(options.features)) {
-    features = options.features;
-  }
-  if (!useSpatialIndex && collection === undefined) {
-    collection = new ol.Collection(features);
-  }
-  if (features !== undefined) {
-    this.addFeaturesInternal(features);
-  }
-  if (collection !== undefined) {
-    this.bindFeaturesCollection_(collection);
-  }
-
-};
-ol.inherits(ol.source.Vector, ol.source.Source);
-
-
-/**
- * Add a single feature to the source.  If you want to add a batch of features
- * at once, call {@link ol.source.Vector#addFeatures source.addFeatures()}
- * instead. A feature will not be added to the source if feature with
- * the same id is already there. The reason for this behavior is to avoid
- * feature duplication when using bbox or tile loading strategies.
- * @param {ol.Feature} feature Feature to add.
- * @api
- */
-ol.source.Vector.prototype.addFeature = function(feature) {
-  this.addFeatureInternal(feature);
-  this.changed();
-};
-
-
-/**
- * Add a feature without firing a `change` event.
- * @param {ol.Feature} feature Feature.
- * @protected
- */
-ol.source.Vector.prototype.addFeatureInternal = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-
-  if (!this.addToIndex_(featureKey, feature)) {
-    return;
-  }
-
-  this.setupChangeEvents_(featureKey, feature);
-
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    var extent = geometry.getExtent();
-    if (this.featuresRtree_) {
-      this.featuresRtree_.insert(extent, feature);
-    }
-  } else {
-    this.nullGeometryFeatures_[featureKey] = feature;
-  }
-
-  this.dispatchEvent(
-      new ol.source.Vector.Event(ol.source.VectorEventType.ADDFEATURE, feature));
-};
-
-
-/**
- * @param {string} featureKey Unique identifier for the feature.
- * @param {ol.Feature} feature The feature.
- * @private
- */
-ol.source.Vector.prototype.setupChangeEvents_ = function(featureKey, feature) {
-  this.featureChangeKeys_[featureKey] = [
-    ol.events.listen(feature, ol.events.EventType.CHANGE,
-        this.handleFeatureChange_, this),
-    ol.events.listen(feature, ol.ObjectEventType.PROPERTYCHANGE,
-        this.handleFeatureChange_, this)
-  ];
-};
-
-
-/**
- * @param {string} featureKey Unique identifier for the feature.
- * @param {ol.Feature} feature The feature.
- * @return {boolean} The feature is "valid", in the sense that it is also a
- *     candidate for insertion into the Rtree.
- * @private
- */
-ol.source.Vector.prototype.addToIndex_ = function(featureKey, feature) {
-  var valid = true;
-  var id = feature.getId();
-  if (id !== undefined) {
-    if (!(id.toString() in this.idIndex_)) {
-      this.idIndex_[id.toString()] = feature;
-    } else {
-      valid = false;
-    }
-  } else {
-    ol.asserts.assert(!(featureKey in this.undefIdIndex_),
-        30); // The passed `feature` was already added to the source
-    this.undefIdIndex_[featureKey] = feature;
-  }
-  return valid;
-};
-
-
-/**
- * Add a batch of features to the source.
- * @param {Array.<ol.Feature>} features Features to add.
- * @api
- */
-ol.source.Vector.prototype.addFeatures = function(features) {
-  this.addFeaturesInternal(features);
-  this.changed();
-};
-
-
-/**
- * Add features without firing a `change` event.
- * @param {Array.<ol.Feature>} features Features.
- * @protected
- */
-ol.source.Vector.prototype.addFeaturesInternal = function(features) {
-  var featureKey, i, length, feature;
-
-  var extents = [];
-  var newFeatures = [];
-  var geometryFeatures = [];
-
-  for (i = 0, length = features.length; i < length; i++) {
-    feature = features[i];
-    featureKey = ol.getUid(feature).toString();
-    if (this.addToIndex_(featureKey, feature)) {
-      newFeatures.push(feature);
-    }
-  }
-
-  for (i = 0, length = newFeatures.length; i < length; i++) {
-    feature = newFeatures[i];
-    featureKey = ol.getUid(feature).toString();
-    this.setupChangeEvents_(featureKey, feature);
-
-    var geometry = feature.getGeometry();
-    if (geometry) {
-      var extent = geometry.getExtent();
-      extents.push(extent);
-      geometryFeatures.push(feature);
-    } else {
-      this.nullGeometryFeatures_[featureKey] = feature;
-    }
-  }
-  if (this.featuresRtree_) {
-    this.featuresRtree_.load(extents, geometryFeatures);
-  }
-
-  for (i = 0, length = newFeatures.length; i < length; i++) {
-    this.dispatchEvent(new ol.source.Vector.Event(
-        ol.source.VectorEventType.ADDFEATURE, newFeatures[i]));
-  }
-};
-
-
-/**
- * @param {!ol.Collection.<ol.Feature>} collection Collection.
- * @private
- */
-ol.source.Vector.prototype.bindFeaturesCollection_ = function(collection) {
-  var modifyingCollection = false;
-  ol.events.listen(this, ol.source.VectorEventType.ADDFEATURE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          collection.push(evt.feature);
-          modifyingCollection = false;
-        }
-      });
-  ol.events.listen(this, ol.source.VectorEventType.REMOVEFEATURE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          collection.remove(evt.feature);
-          modifyingCollection = false;
-        }
-      });
-  ol.events.listen(collection, ol.CollectionEventType.ADD,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          this.addFeature(/** @type {ol.Feature} */ (evt.element));
-          modifyingCollection = false;
-        }
-      }, this);
-  ol.events.listen(collection, ol.CollectionEventType.REMOVE,
-      function(evt) {
-        if (!modifyingCollection) {
-          modifyingCollection = true;
-          this.removeFeature(/** @type {ol.Feature} */ (evt.element));
-          modifyingCollection = false;
-        }
-      }, this);
-  this.featuresCollection_ = collection;
-};
-
-
-/**
- * Remove all features from the source.
- * @param {boolean=} opt_fast Skip dispatching of {@link removefeature} events.
- * @api
- */
-ol.source.Vector.prototype.clear = function(opt_fast) {
-  if (opt_fast) {
-    for (var featureId in this.featureChangeKeys_) {
-      var keys = this.featureChangeKeys_[featureId];
-      keys.forEach(ol.events.unlistenByKey);
-    }
-    if (!this.featuresCollection_) {
-      this.featureChangeKeys_ = {};
-      this.idIndex_ = {};
-      this.undefIdIndex_ = {};
-    }
-  } else {
-    if (this.featuresRtree_) {
-      this.featuresRtree_.forEach(this.removeFeatureInternal, this);
-      for (var id in this.nullGeometryFeatures_) {
-        this.removeFeatureInternal(this.nullGeometryFeatures_[id]);
-      }
-    }
-  }
-  if (this.featuresCollection_) {
-    this.featuresCollection_.clear();
-  }
-
-  if (this.featuresRtree_) {
-    this.featuresRtree_.clear();
-  }
-  this.loadedExtentsRtree_.clear();
-  this.nullGeometryFeatures_ = {};
-
-  var clearEvent = new ol.source.Vector.Event(ol.source.VectorEventType.CLEAR);
-  this.dispatchEvent(clearEvent);
-  this.changed();
-};
-
-
-/**
- * Iterate through all features on the source, calling the provided callback
- * with each one.  If the callback returns any "truthy" value, iteration will
- * stop and the function will return the same value.
- *
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     on the source.  Return a truthy value to stop iteration.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeature = function(callback, opt_this) {
-  if (this.featuresRtree_) {
-    return this.featuresRtree_.forEach(callback, opt_this);
-  } else if (this.featuresCollection_) {
-    return this.featuresCollection_.forEach(callback, opt_this);
-  }
-};
-
-
-/**
- * Iterate through all features whose geometries contain the provided
- * coordinate, calling the callback with each feature.  If the callback returns
- * a "truthy" value, iteration will stop and the function will return the same
- * value.
- *
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose goemetry contains the provided coordinate.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- */
-ol.source.Vector.prototype.forEachFeatureAtCoordinateDirect = function(coordinate, callback, opt_this) {
-  var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];
-  return this.forEachFeatureInExtent(extent, function(feature) {
-    var geometry = feature.getGeometry();
-    if (geometry.intersectsCoordinate(coordinate)) {
-      return callback.call(opt_this, feature);
-    } else {
-      return undefined;
-    }
-  });
-};
-
-
-/**
- * Iterate through all features whose bounding box intersects the provided
- * extent (note that the feature's geometry may not intersect the extent),
- * calling the callback with each feature.  If the callback returns a "truthy"
- * value, iteration will stop and the function will return the same value.
- *
- * If you are interested in features whose geometry intersects an extent, call
- * the {@link ol.source.Vector#forEachFeatureIntersectingExtent
- * source.forEachFeatureIntersectingExtent()} method instead.
- *
- * When `useSpatialIndex` is set to false, this method will loop through all
- * features, equivalent to {@link ol.source.Vector#forEachFeature}.
- *
- * @param {ol.Extent} extent Extent.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose bounding box intersects the provided extent.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeatureInExtent = function(extent, callback, opt_this) {
-  if (this.featuresRtree_) {
-    return this.featuresRtree_.forEachInExtent(extent, callback, opt_this);
-  } else if (this.featuresCollection_) {
-    return this.featuresCollection_.forEach(callback, opt_this);
-  }
-};
-
-
-/**
- * Iterate through all features whose geometry intersects the provided extent,
- * calling the callback with each feature.  If the callback returns a "truthy"
- * value, iteration will stop and the function will return the same value.
- *
- * If you only want to test for bounding box intersection, call the
- * {@link ol.source.Vector#forEachFeatureInExtent
- * source.forEachFeatureInExtent()} method instead.
- *
- * @param {ol.Extent} extent Extent.
- * @param {function(this: T, ol.Feature): S} callback Called with each feature
- *     whose geometry intersects the provided extent.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @return {S|undefined} The return value from the last call to the callback.
- * @template T,S
- * @api
- */
-ol.source.Vector.prototype.forEachFeatureIntersectingExtent = function(extent, callback, opt_this) {
-  return this.forEachFeatureInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       * @return {S|undefined} The return value from the last call to the callback.
-       * @template S
-       */
-      function(feature) {
-        var geometry = feature.getGeometry();
-        if (geometry.intersectsExtent(extent)) {
-          var result = callback.call(opt_this, feature);
-          if (result) {
-            return result;
-          }
-        }
-      });
-};
-
-
-/**
- * Get the features collection associated with this source. Will be `null`
- * unless the source was configured with `useSpatialIndex` set to `false`, or
- * with an {@link ol.Collection} as `features`.
- * @return {ol.Collection.<ol.Feature>} The collection of features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesCollection = function() {
-  return this.featuresCollection_;
-};
-
-
-/**
- * Get all features on the source in random order.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeatures = function() {
-  var features;
-  if (this.featuresCollection_) {
-    features = this.featuresCollection_.getArray();
-  } else if (this.featuresRtree_) {
-    features = this.featuresRtree_.getAll();
-    if (!ol.obj.isEmpty(this.nullGeometryFeatures_)) {
-      ol.array.extend(
-          features, ol.obj.getValues(this.nullGeometryFeatures_));
-    }
-  }
-  return /** @type {Array.<ol.Feature>} */ (features);
-};
-
-
-/**
- * Get all features whose geometry intersects the provided coordinate.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesAtCoordinate = function(coordinate) {
-  var features = [];
-  this.forEachFeatureAtCoordinateDirect(coordinate, function(feature) {
-    features.push(feature);
-  });
-  return features;
-};
-
-
-/**
- * Get all features in the provided extent.  Note that this returns an array of
- * all features intersecting the given extent in random order (so it may include
- * features whose geometries do not intersect the extent).
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Extent} extent Extent.
- * @return {Array.<ol.Feature>} Features.
- * @api
- */
-ol.source.Vector.prototype.getFeaturesInExtent = function(extent) {
-  return this.featuresRtree_.getInExtent(extent);
-};
-
-
-/**
- * Get the closest feature to the provided coordinate.
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(ol.Feature):boolean=} opt_filter Feature filter function.
- *     The filter function will receive one argument, the {@link ol.Feature feature}
- *     and it should return a boolean value. By default, no filtering is made.
- * @return {ol.Feature} Closest feature.
- * @api
- */
-ol.source.Vector.prototype.getClosestFeatureToCoordinate = function(coordinate, opt_filter) {
-  // Find the closest feature using branch and bound.  We start searching an
-  // infinite extent, and find the distance from the first feature found.  This
-  // becomes the closest feature.  We then compute a smaller extent which any
-  // closer feature must intersect.  We continue searching with this smaller
-  // extent, trying to find a closer feature.  Every time we find a closer
-  // feature, we update the extent being searched so that any even closer
-  // feature must intersect it.  We continue until we run out of features.
-  var x = coordinate[0];
-  var y = coordinate[1];
-  var closestFeature = null;
-  var closestPoint = [NaN, NaN];
-  var minSquaredDistance = Infinity;
-  var extent = [-Infinity, -Infinity, Infinity, Infinity];
-  var filter = opt_filter ? opt_filter : ol.functions.TRUE;
-  this.featuresRtree_.forEachInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       */
-      function(feature) {
-        if (filter(feature)) {
-          var geometry = feature.getGeometry();
-          var previousMinSquaredDistance = minSquaredDistance;
-          minSquaredDistance = geometry.closestPointXY(
-              x, y, closestPoint, minSquaredDistance);
-          if (minSquaredDistance < previousMinSquaredDistance) {
-            closestFeature = feature;
-            // This is sneaky.  Reduce the extent that it is currently being
-            // searched while the R-Tree traversal using this same extent object
-            // is still in progress.  This is safe because the new extent is
-            // strictly contained by the old extent.
-            var minDistance = Math.sqrt(minSquaredDistance);
-            extent[0] = x - minDistance;
-            extent[1] = y - minDistance;
-            extent[2] = x + minDistance;
-            extent[3] = y + minDistance;
-          }
-        }
-      });
-  return closestFeature;
-};
-
-
-/**
- * Get the extent of the features currently in the source.
- *
- * This method is not available when the source is configured with
- * `useSpatialIndex` set to `false`.
- * @param {ol.Extent=} opt_extent Destination extent. If provided, no new extent
- *     will be created. Instead, that extent's coordinates will be overwritten.
- * @return {ol.Extent} Extent.
- * @api
- */
-ol.source.Vector.prototype.getExtent = function(opt_extent) {
-  return this.featuresRtree_.getExtent(opt_extent);
-};
-
-
-/**
- * Get a feature by its identifier (the value returned by feature.getId()).
- * Note that the index treats string and numeric identifiers as the same.  So
- * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.
- *
- * @param {string|number} id Feature identifier.
- * @return {ol.Feature} The feature (or `null` if not found).
- * @api
- */
-ol.source.Vector.prototype.getFeatureById = function(id) {
-  var feature = this.idIndex_[id.toString()];
-  return feature !== undefined ? feature : null;
-};
-
-
-/**
- * Get the format associated with this source.
- *
- * @return {ol.format.Feature|undefined} The feature format.
- * @api
- */
-ol.source.Vector.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * @return {boolean} The source can have overlapping geometries.
- */
-ol.source.Vector.prototype.getOverlaps = function() {
-  return this.overlaps_;
-};
-
-
-/**
- * @override
- */
-ol.source.Vector.prototype.getResolutions = function() {};
-
-
-/**
- * Get the url associated with this source.
- *
- * @return {string|ol.FeatureUrlFunction|undefined} The url.
- * @api
- */
-ol.source.Vector.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @private
- */
-ol.source.Vector.prototype.handleFeatureChange_ = function(event) {
-  var feature = /** @type {ol.Feature} */ (event.target);
-  var featureKey = ol.getUid(feature).toString();
-  var geometry = feature.getGeometry();
-  if (!geometry) {
-    if (!(featureKey in this.nullGeometryFeatures_)) {
-      if (this.featuresRtree_) {
-        this.featuresRtree_.remove(feature);
-      }
-      this.nullGeometryFeatures_[featureKey] = feature;
-    }
-  } else {
-    var extent = geometry.getExtent();
-    if (featureKey in this.nullGeometryFeatures_) {
-      delete this.nullGeometryFeatures_[featureKey];
-      if (this.featuresRtree_) {
-        this.featuresRtree_.insert(extent, feature);
-      }
-    } else {
-      if (this.featuresRtree_) {
-        this.featuresRtree_.update(extent, feature);
-      }
-    }
-  }
-  var id = feature.getId();
-  if (id !== undefined) {
-    var sid = id.toString();
-    if (featureKey in this.undefIdIndex_) {
-      delete this.undefIdIndex_[featureKey];
-      this.idIndex_[sid] = feature;
-    } else {
-      if (this.idIndex_[sid] !== feature) {
-        this.removeFromIdIndex_(feature);
-        this.idIndex_[sid] = feature;
-      }
-    }
-  } else {
-    if (!(featureKey in this.undefIdIndex_)) {
-      this.removeFromIdIndex_(feature);
-      this.undefIdIndex_[featureKey] = feature;
-    }
-  }
-  this.changed();
-  this.dispatchEvent(new ol.source.Vector.Event(
-      ol.source.VectorEventType.CHANGEFEATURE, feature));
-};
-
-
-/**
- * @return {boolean} Is empty.
- */
-ol.source.Vector.prototype.isEmpty = function() {
-  return this.featuresRtree_.isEmpty() &&
-      ol.obj.isEmpty(this.nullGeometryFeatures_);
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {ol.proj.Projection} projection Projection.
- */
-ol.source.Vector.prototype.loadFeatures = function(
-    extent, resolution, projection) {
-  var loadedExtentsRtree = this.loadedExtentsRtree_;
-  var extentsToLoad = this.strategy_(extent, resolution);
-  var i, ii;
-  for (i = 0, ii = extentsToLoad.length; i < ii; ++i) {
-    var extentToLoad = extentsToLoad[i];
-    var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad,
-        /**
-         * @param {{extent: ol.Extent}} object Object.
-         * @return {boolean} Contains.
-         */
-        function(object) {
-          return ol.extent.containsExtent(object.extent, extentToLoad);
-        });
-    if (!alreadyLoaded) {
-      this.loader_.call(this, extentToLoad, resolution, projection);
-      loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});
-    }
-  }
-};
-
-
-/**
- * Remove an extent from the list of loaded extents.
- * @param {ol.Extent} extent Extent.
- * @api
- */
-ol.source.Vector.prototype.removeLoadedExtent = function(extent) {
-  var loadedExtentsRtree = this.loadedExtentsRtree_;
-  var obj;
-  loadedExtentsRtree.forEachInExtent(extent, function(object) {
-    if (ol.extent.equals(object.extent, extent)) {
-      obj = object;
-      return true;
-    }
-  });
-  if (obj) {
-    loadedExtentsRtree.remove(obj);
-  }
-};
-
-
-/**
- * Remove a single feature from the source.  If you want to remove all features
- * at once, use the {@link ol.source.Vector#clear source.clear()} method
- * instead.
- * @param {ol.Feature} feature Feature to remove.
- * @api
- */
-ol.source.Vector.prototype.removeFeature = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-  if (featureKey in this.nullGeometryFeatures_) {
-    delete this.nullGeometryFeatures_[featureKey];
-  } else {
-    if (this.featuresRtree_) {
-      this.featuresRtree_.remove(feature);
-    }
-  }
-  this.removeFeatureInternal(feature);
-  this.changed();
-};
-
-
-/**
- * Remove feature without firing a `change` event.
- * @param {ol.Feature} feature Feature.
- * @protected
- */
-ol.source.Vector.prototype.removeFeatureInternal = function(feature) {
-  var featureKey = ol.getUid(feature).toString();
-  this.featureChangeKeys_[featureKey].forEach(ol.events.unlistenByKey);
-  delete this.featureChangeKeys_[featureKey];
-  var id = feature.getId();
-  if (id !== undefined) {
-    delete this.idIndex_[id.toString()];
-  } else {
-    delete this.undefIdIndex_[featureKey];
-  }
-  this.dispatchEvent(new ol.source.Vector.Event(
-      ol.source.VectorEventType.REMOVEFEATURE, feature));
-};
-
-
-/**
- * Remove a feature from the id index.  Called internally when the feature id
- * may have changed.
- * @param {ol.Feature} feature The feature.
- * @return {boolean} Removed the feature from the index.
- * @private
- */
-ol.source.Vector.prototype.removeFromIdIndex_ = function(feature) {
-  var removed = false;
-  for (var id in this.idIndex_) {
-    if (this.idIndex_[id] === feature) {
-      delete this.idIndex_[id];
-      removed = true;
-      break;
-    }
-  }
-  return removed;
-};
-
-
-/**
- * Set the new loader of the source. The next loadFeatures call will use the
- * new loader.
- * @param {ol.FeatureLoader} loader The loader to set.
- * @api
- */
-ol.source.Vector.prototype.setLoader = function(loader) {
-  this.loader_ = loader;
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Vector} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.Vector.Event}
- * @param {string} type Type.
- * @param {ol.Feature=} opt_feature Feature.
- */
-ol.source.Vector.Event = function(type, opt_feature) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The feature being added or removed.
-   * @type {ol.Feature|undefined}
-   * @api
-   */
-  this.feature = opt_feature;
-
-};
-ol.inherits(ol.source.Vector.Event, ol.events.Event);
-
-goog.provide('ol.interaction.Draw');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.Object');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.geom.Circle');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.DrawEventType');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Property');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Interaction for drawing feature geometries.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Draw.Event
- * @param {olx.interaction.DrawOptions} options Options.
- * @api
- */
-ol.interaction.Draw = function(options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Draw.handleDownEvent_,
-    handleEvent: ol.interaction.Draw.handleEvent,
-    handleUpEvent: ol.interaction.Draw.handleUpEvent_
-  });
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.shouldHandle_ = false;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.downPx_ = null;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.freehand_ = false;
-
-  /**
-   * Target source for drawn features.
-   * @type {ol.source.Vector}
-   * @private
-   */
-  this.source_ = options.source ? options.source : null;
-
-  /**
-   * Target collection for drawn features.
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features ? options.features : null;
-
-  /**
-   * Pixel distance for snapping.
-   * @type {number}
-   * @private
-   */
-  this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;
-
-  /**
-   * Geometry type.
-   * @type {ol.geom.GeometryType}
-   * @private
-   */
-  this.type_ = /** @type {ol.geom.GeometryType} */ (options.type);
-
-  /**
-   * Drawing mode (derived from geometry type.
-   * @type {ol.interaction.Draw.Mode_}
-   * @private
-   */
-  this.mode_ = ol.interaction.Draw.getMode_(this.type_);
-
-  /**
-   * Stop click, singleclick, and doubleclick events from firing during drawing.
-   * Default is `false`.
-   * @type {boolean}
-   * @private
-   */
-  this.stopClick_ = !!options.stopClick;
-
-  /**
-   * The number of points that must be drawn before a polygon ring or line
-   * string can be finished.  The default is 3 for polygon rings and 2 for
-   * line strings.
-   * @type {number}
-   * @private
-   */
-  this.minPoints_ = options.minPoints ?
-    options.minPoints :
-    (this.mode_ === ol.interaction.Draw.Mode_.POLYGON ? 3 : 2);
-
-  /**
-   * The number of points that can be drawn before a polygon ring or line string
-   * is finished. The default is no restriction.
-   * @type {number}
-   * @private
-   */
-  this.maxPoints_ = options.maxPoints ? options.maxPoints : Infinity;
-
-  /**
-   * A function to decide if a potential finish coordinate is permissible
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.finishCondition_ = options.finishCondition ? options.finishCondition : ol.functions.TRUE;
-
-  var geometryFunction = options.geometryFunction;
-  if (!geometryFunction) {
-    if (this.type_ === ol.geom.GeometryType.CIRCLE) {
-      /**
-       * @param {!Array.<ol.Coordinate>} coordinates
-       *     The coordinates.
-       * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
-       * @return {ol.geom.SimpleGeometry} A geometry.
-       */
-      geometryFunction = function(coordinates, opt_geometry) {
-        var circle = opt_geometry ? /** @type {ol.geom.Circle} */ (opt_geometry) :
-          new ol.geom.Circle([NaN, NaN]);
-        var squaredLength = ol.coordinate.squaredDistance(
-            coordinates[0], coordinates[1]);
-        circle.setCenterAndRadius(coordinates[0], Math.sqrt(squaredLength));
-        return circle;
-      };
-    } else {
-      var Constructor;
-      var mode = this.mode_;
-      if (mode === ol.interaction.Draw.Mode_.POINT) {
-        Constructor = ol.geom.Point;
-      } else if (mode === ol.interaction.Draw.Mode_.LINE_STRING) {
-        Constructor = ol.geom.LineString;
-      } else if (mode === ol.interaction.Draw.Mode_.POLYGON) {
-        Constructor = ol.geom.Polygon;
-      }
-      /**
-       * @param {!Array.<ol.Coordinate>} coordinates
-       *     The coordinates.
-       * @param {ol.geom.SimpleGeometry=} opt_geometry Optional geometry.
-       * @return {ol.geom.SimpleGeometry} A geometry.
-       */
-      geometryFunction = function(coordinates, opt_geometry) {
-        var geometry = opt_geometry;
-        if (geometry) {
-          if (mode === ol.interaction.Draw.Mode_.POLYGON) {
-            if (coordinates[0].length) {
-              // Add a closing coordinate to match the first
-              geometry.setCoordinates([coordinates[0].concat([coordinates[0][0]])]);
-            } else {
-              geometry.setCoordinates([]);
-            }
-          } else {
-            geometry.setCoordinates(coordinates);
-          }
-        } else {
-          geometry = new Constructor(coordinates);
-        }
-        return geometry;
-      };
-    }
-  }
-
-  /**
-   * @type {ol.DrawGeometryFunctionType}
-   * @private
-   */
-  this.geometryFunction_ = geometryFunction;
-
-  /**
-   * Finish coordinate for the feature (first point for polygons, last point for
-   * linestrings).
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.finishCoordinate_ = null;
-
-  /**
-   * Sketch feature.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchFeature_ = null;
-
-  /**
-   * Sketch point.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchPoint_ = null;
-
-  /**
-   * Sketch coordinates. Used when drawing a line or polygon.
-   * @type {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>}
-   * @private
-   */
-  this.sketchCoords_ = null;
-
-  /**
-   * Sketch line. Used when drawing polygon.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.sketchLine_ = null;
-
-  /**
-   * Sketch line coordinates. Used when drawing a polygon or circle.
-   * @type {Array.<ol.Coordinate>}
-   * @private
-   */
-  this.sketchLineCoords_ = null;
-
-  /**
-   * Squared tolerance for handling up events.  If the squared distance
-   * between a down and up event is greater than this tolerance, up events
-   * will not be handled.
-   * @type {number}
-   * @private
-   */
-  this.squaredClickTolerance_ = options.clickTolerance ?
-    options.clickTolerance * options.clickTolerance : 36;
-
-  /**
-   * Draw overlay where our sketch features are drawn.
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.overlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: options.wrapX ? options.wrapX : false
-    }),
-    style: options.style ? options.style :
-      ol.interaction.Draw.getDefaultStyleFunction()
-  });
-
-  /**
-   * Name of the geometry attribute for newly created features.
-   * @type {string|undefined}
-   * @private
-   */
-  this.geometryName_ = options.geometryName;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.noModifierKeys;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.freehandCondition_;
-  if (options.freehand) {
-    this.freehandCondition_ = ol.events.condition.always;
-  } else {
-    this.freehandCondition_ = options.freehandCondition ?
-      options.freehandCondition : ol.events.condition.shiftKeyOnly;
-  }
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.interaction.Property.ACTIVE),
-      this.updateState_, this);
-
-};
-ol.inherits(ol.interaction.Draw, ol.interaction.Pointer);
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Draw.getDefaultStyleFunction = function() {
-  var styles = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return styles[feature.getGeometry().getType()];
-  };
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Draw.prototype.setMap = function(map) {
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-  this.updateState_();
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may actually
- * draw or finish the drawing.
- * @param {ol.MapBrowserEvent} event Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Draw}
- * @api
- */
-ol.interaction.Draw.handleEvent = function(event) {
-  this.freehand_ = this.mode_ !== ol.interaction.Draw.Mode_.POINT && this.freehandCondition_(event);
-  var pass = true;
-  if (this.freehand_ &&
-      event.type === ol.MapBrowserEventType.POINTERDRAG &&
-      this.sketchFeature_ !== null) {
-    this.addToDrawing_(event);
-    pass = false;
-  } else if (this.freehand_ &&
-      event.type === ol.MapBrowserEventType.POINTERDOWN) {
-    pass = false;
-  } else if (event.type === ol.MapBrowserEventType.POINTERMOVE) {
-    pass = this.handlePointerMove_(event);
-  } else if (event.type === ol.MapBrowserEventType.DBLCLICK) {
-    pass = false;
-  }
-  return ol.interaction.Pointer.handleEvent.call(this, event) && pass;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Draw}
- * @private
- */
-ol.interaction.Draw.handleDownEvent_ = function(event) {
-  this.shouldHandle_ = !this.freehand_;
-
-  if (this.freehand_) {
-    this.downPx_ = event.pixel;
-    if (!this.finishCoordinate_) {
-      this.startDrawing_(event);
-    }
-    return true;
-  } else if (this.condition_(event)) {
-    this.downPx_ = event.pixel;
-    return true;
-  } else {
-    return false;
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Draw}
- * @private
- */
-ol.interaction.Draw.handleUpEvent_ = function(event) {
-  var pass = true;
-
-  this.handlePointerMove_(event);
-
-  var circleMode = this.mode_ === ol.interaction.Draw.Mode_.CIRCLE;
-
-  if (this.shouldHandle_) {
-    if (!this.finishCoordinate_) {
-      this.startDrawing_(event);
-      if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-        this.finishDrawing();
-      }
-    } else if (this.freehand_ || circleMode) {
-      this.finishDrawing();
-    } else if (this.atFinish_(event)) {
-      if (this.finishCondition_(event)) {
-        this.finishDrawing();
-      }
-    } else {
-      this.addToDrawing_(event);
-    }
-    pass = false;
-  } else if (this.freehand_) {
-    this.finishCoordinate_ = null;
-    this.abortDrawing_();
-  }
-  if (!pass && this.stopClick_) {
-    event.stopPropagation();
-  }
-  return pass;
-};
-
-
-/**
- * Handle move events.
- * @param {ol.MapBrowserEvent} event A move event.
- * @return {boolean} Pass the event to other interactions.
- * @private
- */
-ol.interaction.Draw.prototype.handlePointerMove_ = function(event) {
-  if (this.downPx_ &&
-      ((!this.freehand_ && this.shouldHandle_) ||
-      (this.freehand_ && !this.shouldHandle_))) {
-    var downPx = this.downPx_;
-    var clickPx = event.pixel;
-    var dx = downPx[0] - clickPx[0];
-    var dy = downPx[1] - clickPx[1];
-    var squaredDistance = dx * dx + dy * dy;
-    this.shouldHandle_ = this.freehand_ ?
-      squaredDistance > this.squaredClickTolerance_ :
-      squaredDistance <= this.squaredClickTolerance_;
-  }
-
-  if (this.finishCoordinate_) {
-    this.modifyDrawing_(event);
-  } else {
-    this.createOrUpdateSketchPoint_(event);
-  }
-  return true;
-};
-
-
-/**
- * Determine if an event is within the snapping tolerance of the start coord.
- * @param {ol.MapBrowserEvent} event Event.
- * @return {boolean} The event is within the snapping tolerance of the start.
- * @private
- */
-ol.interaction.Draw.prototype.atFinish_ = function(event) {
-  var at = false;
-  if (this.sketchFeature_) {
-    var potentiallyDone = false;
-    var potentiallyFinishCoordinates = [this.finishCoordinate_];
-    if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-      potentiallyDone = this.sketchCoords_.length > this.minPoints_;
-    } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-      potentiallyDone = this.sketchCoords_[0].length >
-          this.minPoints_;
-      potentiallyFinishCoordinates = [this.sketchCoords_[0][0],
-        this.sketchCoords_[0][this.sketchCoords_[0].length - 2]];
-    }
-    if (potentiallyDone) {
-      var map = event.map;
-      for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {
-        var finishCoordinate = potentiallyFinishCoordinates[i];
-        var finishPixel = map.getPixelFromCoordinate(finishCoordinate);
-        var pixel = event.pixel;
-        var dx = pixel[0] - finishPixel[0];
-        var dy = pixel[1] - finishPixel[1];
-        var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;
-        at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;
-        if (at) {
-          this.finishCoordinate_ = finishCoordinate;
-          break;
-        }
-      }
-    }
-  }
-  return at;
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.createOrUpdateSketchPoint_ = function(event) {
-  var coordinates = event.coordinate.slice();
-  if (!this.sketchPoint_) {
-    this.sketchPoint_ = new ol.Feature(new ol.geom.Point(coordinates));
-    this.updateSketchFeatures_();
-  } else {
-    var sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry());
-    sketchPointGeom.setCoordinates(coordinates);
-  }
-};
-
-
-/**
- * Start the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.startDrawing_ = function(event) {
-  var start = event.coordinate;
-  this.finishCoordinate_ = start;
-  if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-    this.sketchCoords_ = start.slice();
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    this.sketchCoords_ = [[start.slice(), start.slice()]];
-    this.sketchLineCoords_ = this.sketchCoords_[0];
-  } else {
-    this.sketchCoords_ = [start.slice(), start.slice()];
-    if (this.mode_ === ol.interaction.Draw.Mode_.CIRCLE) {
-      this.sketchLineCoords_ = this.sketchCoords_;
-    }
-  }
-  if (this.sketchLineCoords_) {
-    this.sketchLine_ = new ol.Feature(
-        new ol.geom.LineString(this.sketchLineCoords_));
-  }
-  var geometry = this.geometryFunction_(this.sketchCoords_);
-  this.sketchFeature_ = new ol.Feature();
-  if (this.geometryName_) {
-    this.sketchFeature_.setGeometryName(this.geometryName_);
-  }
-  this.sketchFeature_.setGeometry(geometry);
-  this.updateSketchFeatures_();
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWSTART, this.sketchFeature_));
-};
-
-
-/**
- * Modify the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.modifyDrawing_ = function(event) {
-  var coordinate = event.coordinate;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var coordinates, last;
-  if (this.mode_ === ol.interaction.Draw.Mode_.POINT) {
-    last = this.sketchCoords_;
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    last = coordinates[coordinates.length - 1];
-    if (this.atFinish_(event)) {
-      // snap to finish
-      coordinate = this.finishCoordinate_.slice();
-    }
-  } else {
-    coordinates = this.sketchCoords_;
-    last = coordinates[coordinates.length - 1];
-  }
-  last[0] = coordinate[0];
-  last[1] = coordinate[1];
-  this.geometryFunction_(/** @type {!Array.<ol.Coordinate>} */ (this.sketchCoords_), geometry);
-  if (this.sketchPoint_) {
-    var sketchPointGeom = /** @type {ol.geom.Point} */ (this.sketchPoint_.getGeometry());
-    sketchPointGeom.setCoordinates(coordinate);
-  }
-  var sketchLineGeom;
-  if (geometry instanceof ol.geom.Polygon &&
-      this.mode_ !== ol.interaction.Draw.Mode_.POLYGON) {
-    if (!this.sketchLine_) {
-      this.sketchLine_ = new ol.Feature(new ol.geom.LineString(null));
-    }
-    var ring = geometry.getLinearRing(0);
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setFlatCoordinates(
-        ring.getLayout(), ring.getFlatCoordinates());
-  } else if (this.sketchLineCoords_) {
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setCoordinates(this.sketchLineCoords_);
-  }
-  this.updateSketchFeatures_();
-};
-
-
-/**
- * Add a new coordinate to the drawing.
- * @param {ol.MapBrowserEvent} event Event.
- * @private
- */
-ol.interaction.Draw.prototype.addToDrawing_ = function(event) {
-  var coordinate = event.coordinate;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var done;
-  var coordinates;
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    this.finishCoordinate_ = coordinate.slice();
-    coordinates = this.sketchCoords_;
-    if (coordinates.length >= this.maxPoints_) {
-      if (this.freehand_) {
-        coordinates.pop();
-      } else {
-        done = true;
-      }
-    }
-    coordinates.push(coordinate.slice());
-    this.geometryFunction_(coordinates, geometry);
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    if (coordinates.length >= this.maxPoints_) {
-      if (this.freehand_) {
-        coordinates.pop();
-      } else {
-        done = true;
-      }
-    }
-    coordinates.push(coordinate.slice());
-    if (done) {
-      this.finishCoordinate_ = coordinates[0];
-    }
-    this.geometryFunction_(this.sketchCoords_, geometry);
-  }
-  this.updateSketchFeatures_();
-  if (done) {
-    this.finishDrawing();
-  }
-};
-
-
-/**
- * Remove last point of the feature currently being drawn.
- * @api
- */
-ol.interaction.Draw.prototype.removeLastPoint = function() {
-  if (!this.sketchFeature_) {
-    return;
-  }
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (this.sketchFeature_.getGeometry());
-  var coordinates, sketchLineGeom;
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    coordinates = this.sketchCoords_;
-    coordinates.splice(-2, 1);
-    this.geometryFunction_(coordinates, geometry);
-    if (coordinates.length >= 2) {
-      this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();
-    }
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    coordinates = this.sketchCoords_[0];
-    coordinates.splice(-2, 1);
-    sketchLineGeom = /** @type {ol.geom.LineString} */ (this.sketchLine_.getGeometry());
-    sketchLineGeom.setCoordinates(coordinates);
-    this.geometryFunction_(this.sketchCoords_, geometry);
-  }
-
-  if (coordinates.length === 0) {
-    this.finishCoordinate_ = null;
-  }
-
-  this.updateSketchFeatures_();
-};
-
-
-/**
- * Stop drawing and add the sketch feature to the target layer.
- * The {@link ol.interaction.DrawEventType.DRAWEND} event is dispatched before
- * inserting the feature.
- * @api
- */
-ol.interaction.Draw.prototype.finishDrawing = function() {
-  var sketchFeature = this.abortDrawing_();
-  var coordinates = this.sketchCoords_;
-  var geometry = /** @type {ol.geom.SimpleGeometry} */ (sketchFeature.getGeometry());
-  if (this.mode_ === ol.interaction.Draw.Mode_.LINE_STRING) {
-    // remove the redundant last point
-    coordinates.pop();
-    this.geometryFunction_(coordinates, geometry);
-  } else if (this.mode_ === ol.interaction.Draw.Mode_.POLYGON) {
-    // remove the redundant last point in ring
-    coordinates[0].pop();
-    this.geometryFunction_(coordinates, geometry);
-    coordinates = geometry.getCoordinates();
-  }
-
-  // cast multi-part geometries
-  if (this.type_ === ol.geom.GeometryType.MULTI_POINT) {
-    sketchFeature.setGeometry(new ol.geom.MultiPoint([coordinates]));
-  } else if (this.type_ === ol.geom.GeometryType.MULTI_LINE_STRING) {
-    sketchFeature.setGeometry(new ol.geom.MultiLineString([coordinates]));
-  } else if (this.type_ === ol.geom.GeometryType.MULTI_POLYGON) {
-    sketchFeature.setGeometry(new ol.geom.MultiPolygon([coordinates]));
-  }
-
-  // First dispatch event to allow full set up of feature
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWEND, sketchFeature));
-
-  // Then insert feature
-  if (this.features_) {
-    this.features_.push(sketchFeature);
-  }
-  if (this.source_) {
-    this.source_.addFeature(sketchFeature);
-  }
-};
-
-
-/**
- * Stop drawing without adding the sketch feature to the target layer.
- * @return {ol.Feature} The sketch feature (or null if none).
- * @private
- */
-ol.interaction.Draw.prototype.abortDrawing_ = function() {
-  this.finishCoordinate_ = null;
-  var sketchFeature = this.sketchFeature_;
-  if (sketchFeature) {
-    this.sketchFeature_ = null;
-    this.sketchPoint_ = null;
-    this.sketchLine_ = null;
-    this.overlay_.getSource().clear(true);
-  }
-  return sketchFeature;
-};
-
-
-/**
- * Extend an existing geometry by adding additional points. This only works
- * on features with `LineString` geometries, where the interaction will
- * extend lines by adding points to the end of the coordinates array.
- * @param {!ol.Feature} feature Feature to be extended.
- * @api
- */
-ol.interaction.Draw.prototype.extend = function(feature) {
-  var geometry = feature.getGeometry();
-  var lineString = /** @type {ol.geom.LineString} */ (geometry);
-  this.sketchFeature_ = feature;
-  this.sketchCoords_ = lineString.getCoordinates();
-  var last = this.sketchCoords_[this.sketchCoords_.length - 1];
-  this.finishCoordinate_ = last.slice();
-  this.sketchCoords_.push(last.slice());
-  this.updateSketchFeatures_();
-  this.dispatchEvent(new ol.interaction.Draw.Event(
-      ol.interaction.DrawEventType.DRAWSTART, this.sketchFeature_));
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Draw.prototype.shouldStopEvent = ol.functions.FALSE;
-
-
-/**
- * Redraw the sketch features.
- * @private
- */
-ol.interaction.Draw.prototype.updateSketchFeatures_ = function() {
-  var sketchFeatures = [];
-  if (this.sketchFeature_) {
-    sketchFeatures.push(this.sketchFeature_);
-  }
-  if (this.sketchLine_) {
-    sketchFeatures.push(this.sketchLine_);
-  }
-  if (this.sketchPoint_) {
-    sketchFeatures.push(this.sketchPoint_);
-  }
-  var overlaySource = this.overlay_.getSource();
-  overlaySource.clear(true);
-  overlaySource.addFeatures(sketchFeatures);
-};
-
-
-/**
- * @private
- */
-ol.interaction.Draw.prototype.updateState_ = function() {
-  var map = this.getMap();
-  var active = this.getActive();
-  if (!map || !active) {
-    this.abortDrawing_();
-  }
-  this.overlay_.setMap(active ? map : null);
-};
-
-
-/**
- * Create a `geometryFunction` for `type: 'Circle'` that will create a regular
- * polygon with a user specified number of sides and start angle instead of an
- * `ol.geom.Circle` geometry.
- * @param {number=} opt_sides Number of sides of the regular polygon. Default is
- *     32.
- * @param {number=} opt_angle Angle of the first point in radians. 0 means East.
- *     Default is the angle defined by the heading from the center of the
- *     regular polygon to the current pointer position.
- * @return {ol.DrawGeometryFunctionType} Function that draws a
- *     polygon.
- * @api
- */
-ol.interaction.Draw.createRegularPolygon = function(opt_sides, opt_angle) {
-  return (
-  /**
-       * @param {ol.Coordinate|Array.<ol.Coordinate>|Array.<Array.<ol.Coordinate>>} coordinates
-       * @param {ol.geom.SimpleGeometry=} opt_geometry
-       * @return {ol.geom.SimpleGeometry}
-       */
-    function(coordinates, opt_geometry) {
-      var center = coordinates[0];
-      var end = coordinates[1];
-      var radius = Math.sqrt(
-          ol.coordinate.squaredDistance(center, end));
-      var geometry = opt_geometry ? /** @type {ol.geom.Polygon} */ (opt_geometry) :
-        ol.geom.Polygon.fromCircle(new ol.geom.Circle(center), opt_sides);
-      var angle = opt_angle ? opt_angle :
-        Math.atan((end[1] - center[1]) / (end[0] - center[0]));
-      ol.geom.Polygon.makeRegular(geometry, center, radius, angle);
-      return geometry;
-    }
-  );
-};
-
-
-/**
- * Create a `geometryFunction` that will create a box-shaped polygon (aligned
- * with the coordinate system axes).  Use this with the draw interaction and
- * `type: 'Circle'` to return a box instead of a circle geometry.
- * @return {ol.DrawGeometryFunctionType} Function that draws a box-shaped polygon.
- * @api
- */
-ol.interaction.Draw.createBox = function() {
-  return (
-    /**
-     * @param {Array.<ol.Coordinate>} coordinates
-     * @param {ol.geom.SimpleGeometry=} opt_geometry
-     * @return {ol.geom.SimpleGeometry}
-     */
-    function(coordinates, opt_geometry) {
-      var extent = ol.extent.boundingExtent(coordinates);
-      var geometry = opt_geometry || new ol.geom.Polygon(null);
-      geometry.setCoordinates([[
-        ol.extent.getBottomLeft(extent),
-        ol.extent.getBottomRight(extent),
-        ol.extent.getTopRight(extent),
-        ol.extent.getTopLeft(extent),
-        ol.extent.getBottomLeft(extent)
-      ]]);
-      return geometry;
-    }
-  );
-};
-
-
-/**
- * Get the drawing mode.  The mode for mult-part geometries is the same as for
- * their single-part cousins.
- * @param {ol.geom.GeometryType} type Geometry type.
- * @return {ol.interaction.Draw.Mode_} Drawing mode.
- * @private
- */
-ol.interaction.Draw.getMode_ = function(type) {
-  var mode;
-  if (type === ol.geom.GeometryType.POINT ||
-      type === ol.geom.GeometryType.MULTI_POINT) {
-    mode = ol.interaction.Draw.Mode_.POINT;
-  } else if (type === ol.geom.GeometryType.LINE_STRING ||
-      type === ol.geom.GeometryType.MULTI_LINE_STRING) {
-    mode = ol.interaction.Draw.Mode_.LINE_STRING;
-  } else if (type === ol.geom.GeometryType.POLYGON ||
-      type === ol.geom.GeometryType.MULTI_POLYGON) {
-    mode = ol.interaction.Draw.Mode_.POLYGON;
-  } else if (type === ol.geom.GeometryType.CIRCLE) {
-    mode = ol.interaction.Draw.Mode_.CIRCLE;
-  }
-  return /** @type {!ol.interaction.Draw.Mode_} */ (mode);
-};
-
-
-/**
- * Draw mode.  This collapses multi-part geometry types with their single-part
- * cousins.
- * @enum {string}
- * @private
- */
-ol.interaction.Draw.Mode_ = {
-  POINT: 'Point',
-  LINE_STRING: 'LineString',
-  POLYGON: 'Polygon',
-  CIRCLE: 'Circle'
-};
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Draw} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.DrawEvent}
- * @param {ol.interaction.DrawEventType} type Type.
- * @param {ol.Feature} feature The feature drawn.
- */
-ol.interaction.Draw.Event = function(type, feature) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The feature being drawn.
-   * @type {ol.Feature}
-   * @api
-   */
-  this.feature = feature;
-
-};
-ol.inherits(ol.interaction.Draw.Event, ol.events.Event);
-
-goog.provide('ol.interaction.ExtentEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.ExtentEventType = {
-  /**
-   * Triggered after the extent is changed
-   * @event ol.interaction.Extent.Event#extentchanged
-   * @api
-   */
-  EXTENTCHANGED: 'extentchanged'
-};
-
-goog.provide('ol.interaction.Extent');
-
-goog.require('ol');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.coordinate');
-goog.require('ol.events.Event');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.ExtentEventType');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Allows the user to draw a vector box by clicking and dragging on the map.
- * Once drawn, the vector box can be modified by dragging its vertices or edges.
- * This interaction is only supported for mouse devices.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Extent.Event
- * @param {olx.interaction.ExtentOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Extent = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * Extent of the drawn box
-   * @type {ol.Extent}
-   * @private
-   */
-  this.extent_ = null;
-
-  /**
-   * Handler for pointer move events
-   * @type {function (ol.Coordinate): ol.Extent|null}
-   * @private
-   */
-  this.pointerHandler_ = null;
-
-  /**
-   * Pixel threshold to snap to extent
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = options.pixelTolerance !== undefined ?
-    options.pixelTolerance : 10;
-
-  /**
-   * Is the pointer snapped to an extent vertex
-   * @type {boolean}
-   * @private
-   */
-  this.snappedToVertex_ = false;
-
-  /**
-   * Feature for displaying the visible extent
-   * @type {ol.Feature}
-   * @private
-   */
-  this.extentFeature_ = null;
-
-  /**
-   * Feature for displaying the visible pointer
-   * @type {ol.Feature}
-   * @private
-   */
-  this.vertexFeature_ = null;
-
-  if (!opt_options) {
-    opt_options = {};
-  }
-
-  /* Inherit ol.interaction.Pointer */
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Extent.handleDownEvent_,
-    handleDragEvent: ol.interaction.Extent.handleDragEvent_,
-    handleEvent: ol.interaction.Extent.handleEvent_,
-    handleUpEvent: ol.interaction.Extent.handleUpEvent_
-  });
-
-  /**
-   * Layer for the extentFeature
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.extentOverlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!opt_options.wrapX
-    }),
-    style: opt_options.boxStyle ? opt_options.boxStyle : ol.interaction.Extent.getDefaultExtentStyleFunction_(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-   * Layer for the vertexFeature
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.vertexOverlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!opt_options.wrapX
-    }),
-    style: opt_options.pointerStyle ? opt_options.pointerStyle : ol.interaction.Extent.getDefaultPointerStyleFunction_(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  if (opt_options.extent) {
-    this.setExtent(opt_options.extent);
-  }
-};
-
-ol.inherits(ol.interaction.Extent, ol.interaction.Pointer);
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent Event.
- * @return {boolean} Propagate event?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleEvent_ = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-  //display pointer (if not dragging)
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE && !this.handlingDownUpSequence) {
-    this.handlePointerMove_(mapBrowserEvent);
-  }
-  //call pointer to determine up/down/drag
-  ol.interaction.Pointer.handleEvent.call(this, mapBrowserEvent);
-  //return false to stop propagation
-  return false;
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Event handled?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleDownEvent_ = function(mapBrowserEvent) {
-  var pixel = mapBrowserEvent.pixel;
-  var map = mapBrowserEvent.map;
-
-  var extent = this.getExtent();
-  var vertex = this.snapToVertex_(pixel, map);
-
-  //find the extent corner opposite the passed corner
-  var getOpposingPoint = function(point) {
-    var x_ = null;
-    var y_ = null;
-    if (point[0] == extent[0]) {
-      x_ = extent[2];
-    } else if (point[0] == extent[2]) {
-      x_ = extent[0];
-    }
-    if (point[1] == extent[1]) {
-      y_ = extent[3];
-    } else if (point[1] == extent[3]) {
-      y_ = extent[1];
-    }
-    if (x_ !== null && y_ !== null) {
-      return [x_, y_];
-    }
-    return null;
-  };
-  if (vertex && extent) {
-    var x = (vertex[0] == extent[0] || vertex[0] == extent[2]) ? vertex[0] : null;
-    var y = (vertex[1] == extent[1] || vertex[1] == extent[3]) ? vertex[1] : null;
-
-    //snap to point
-    if (x !== null && y !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getPointHandler_(getOpposingPoint(vertex));
-    //snap to edge
-    } else if (x !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getEdgeHandler_(
-          getOpposingPoint([x, extent[1]]),
-          getOpposingPoint([x, extent[3]])
-      );
-    } else if (y !== null) {
-      this.pointerHandler_ = ol.interaction.Extent.getEdgeHandler_(
-          getOpposingPoint([extent[0], y]),
-          getOpposingPoint([extent[2], y])
-      );
-    }
-  //no snap - new bbox
-  } else {
-    vertex = map.getCoordinateFromPixel(pixel);
-    this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);
-    this.pointerHandler_ = ol.interaction.Extent.getPointHandler_(vertex);
-  }
-  return true; //event handled; start downup sequence
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Event handled?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleDragEvent_ = function(mapBrowserEvent) {
-  if (this.pointerHandler_) {
-    var pixelCoordinate = mapBrowserEvent.coordinate;
-    this.setExtent(this.pointerHandler_(pixelCoordinate));
-    this.createOrUpdatePointerFeature_(pixelCoordinate);
-  }
-  return true;
-};
-
-/**
- * @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Extent}
- * @private
- */
-ol.interaction.Extent.handleUpEvent_ = function(mapBrowserEvent) {
-  this.pointerHandler_ = null;
-  //If bbox is zero area, set to null;
-  var extent = this.getExtent();
-  if (!extent || ol.extent.getArea(extent) === 0) {
-    this.setExtent(null);
-  }
-  return false; //Stop handling downup sequence
-};
-
-/**
- * Returns the default style for the drawn bbox
- *
- * @return {ol.StyleFunction} Default Extent style
- * @private
- */
-ol.interaction.Extent.getDefaultExtentStyleFunction_ = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POLYGON];
-  };
-};
-
-/**
- * Returns the default style for the pointer
- *
- * @return {ol.StyleFunction} Default pointer style
- * @private
- */
-ol.interaction.Extent.getDefaultPointerStyleFunction_ = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POINT];
-  };
-};
-
-/**
- * @param {ol.Coordinate} fixedPoint corner that will be unchanged in the new extent
- * @returns {function (ol.Coordinate): ol.Extent} event handler
- * @private
- */
-ol.interaction.Extent.getPointHandler_ = function(fixedPoint) {
-  return function(point) {
-    return ol.extent.boundingExtent([fixedPoint, point]);
-  };
-};
-
-/**
- * @param {ol.Coordinate} fixedP1 first corner that will be unchanged in the new extent
- * @param {ol.Coordinate} fixedP2 second corner that will be unchanged in the new extent
- * @returns {function (ol.Coordinate): ol.Extent|null} event handler
- * @private
- */
-ol.interaction.Extent.getEdgeHandler_ = function(fixedP1, fixedP2) {
-  if (fixedP1[0] == fixedP2[0]) {
-    return function(point) {
-      return ol.extent.boundingExtent([fixedP1, [point[0], fixedP2[1]]]);
-    };
-  } else if (fixedP1[1] == fixedP2[1]) {
-    return function(point) {
-      return ol.extent.boundingExtent([fixedP1, [fixedP2[0], point[1]]]);
-    };
-  } else {
-    return null;
-  }
-};
-
-/**
- * @param {ol.Extent} extent extent
- * @returns {Array<Array<ol.Coordinate>>} extent line segments
- * @private
- */
-ol.interaction.Extent.getSegments_ = function(extent) {
-  return [
-    [[extent[0], extent[1]], [extent[0], extent[3]]],
-    [[extent[0], extent[3]], [extent[2], extent[3]]],
-    [[extent[2], extent[3]], [extent[2], extent[1]]],
-    [[extent[2], extent[1]], [extent[0], extent[1]]]
-  ];
-};
-
-/**
- * @param {ol.Pixel} pixel cursor location
- * @param {ol.PluggableMap} map map
- * @returns {ol.Coordinate|null} snapped vertex on extent
- * @private
- */
-ol.interaction.Extent.prototype.snapToVertex_ = function(pixel, map) {
-  var pixelCoordinate = map.getCoordinateFromPixel(pixel);
-  var sortByDistance = function(a, b) {
-    return ol.coordinate.squaredDistanceToSegment(pixelCoordinate, a) -
-        ol.coordinate.squaredDistanceToSegment(pixelCoordinate, b);
-  };
-  var extent = this.getExtent();
-  if (extent) {
-    //convert extents to line segments and find the segment closest to pixelCoordinate
-    var segments = ol.interaction.Extent.getSegments_(extent);
-    segments.sort(sortByDistance);
-    var closestSegment = segments[0];
-
-    var vertex = (ol.coordinate.closestOnSegment(pixelCoordinate,
-        closestSegment));
-    var vertexPixel = map.getPixelFromCoordinate(vertex);
-
-    //if the distance is within tolerance, snap to the segment
-    if (ol.coordinate.distance(pixel, vertexPixel) <= this.pixelTolerance_) {
-      //test if we should further snap to a vertex
-      var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-      var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-      var squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-      var squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-      var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-      this.snappedToVertex_ = dist <= this.pixelTolerance_;
-      if (this.snappedToVertex_) {
-        vertex = squaredDist1 > squaredDist2 ?
-          closestSegment[1] : closestSegment[0];
-      }
-      return vertex;
-    }
-  }
-  return null;
-};
-
-/**
- * @param {ol.MapBrowserEvent} mapBrowserEvent pointer move event
- * @private
- */
-ol.interaction.Extent.prototype.handlePointerMove_ = function(mapBrowserEvent) {
-  var pixel = mapBrowserEvent.pixel;
-  var map = mapBrowserEvent.map;
-
-  var vertex = this.snapToVertex_(pixel, map);
-  if (!vertex) {
-    vertex = map.getCoordinateFromPixel(pixel);
-  }
-  this.createOrUpdatePointerFeature_(vertex);
-};
-
-/**
- * @param {ol.Extent} extent extent
- * @returns {ol.Feature} extent as featrue
- * @private
- */
-ol.interaction.Extent.prototype.createOrUpdateExtentFeature_ = function(extent) {
-  var extentFeature = this.extentFeature_;
-
-  if (!extentFeature) {
-    if (!extent) {
-      extentFeature = new ol.Feature({});
-    } else {
-      extentFeature = new ol.Feature(ol.geom.Polygon.fromExtent(extent));
-    }
-    this.extentFeature_ = extentFeature;
-    this.extentOverlay_.getSource().addFeature(extentFeature);
-  } else {
-    if (!extent) {
-      extentFeature.setGeometry(undefined);
-    } else {
-      extentFeature.setGeometry(ol.geom.Polygon.fromExtent(extent));
-    }
-  }
-  return extentFeature;
-};
-
-
-/**
- * @param {ol.Coordinate} vertex location of feature
- * @returns {ol.Feature} vertex as feature
- * @private
- */
-ol.interaction.Extent.prototype.createOrUpdatePointerFeature_ = function(vertex) {
-  var vertexFeature = this.vertexFeature_;
-  if (!vertexFeature) {
-    vertexFeature = new ol.Feature(new ol.geom.Point(vertex));
-    this.vertexFeature_ = vertexFeature;
-    this.vertexOverlay_.getSource().addFeature(vertexFeature);
-  } else {
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    geometry.setCoordinates(vertex);
-  }
-  return vertexFeature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Extent.prototype.setMap = function(map) {
-  this.extentOverlay_.setMap(map);
-  this.vertexOverlay_.setMap(map);
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-};
-
-/**
- * Returns the current drawn extent in the view projection
- *
- * @return {ol.Extent} Drawn extent in the view projection.
- * @api
- */
-ol.interaction.Extent.prototype.getExtent = function() {
-  return this.extent_;
-};
-
-/**
- * Manually sets the drawn extent, using the view projection.
- *
- * @param {ol.Extent} extent Extent
- * @api
- */
-ol.interaction.Extent.prototype.setExtent = function(extent) {
-  //Null extent means no bbox
-  this.extent_ = extent ? extent : null;
-  this.createOrUpdateExtentFeature_(extent);
-  this.dispatchEvent(new ol.interaction.Extent.Event(this.extent_));
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Extent} instances are instances of
- * this type.
- *
- * @constructor
- * @implements {oli.ExtentEvent}
- * @param {ol.Extent} extent the new extent
- * @extends {ol.events.Event}
- */
-ol.interaction.Extent.Event = function(extent) {
-  ol.events.Event.call(this, ol.interaction.ExtentEventType.EXTENTCHANGED);
-
-  /**
-   * The current extent.
-   * @type {ol.Extent}
-   * @api
-   */
-  this.extent = extent;
-
-};
-ol.inherits(ol.interaction.Extent.Event, ol.events.Event);
-
-goog.provide('ol.interaction.ModifyEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.ModifyEventType = {
-  /**
-   * Triggered upon feature modification start
-   * @event ol.interaction.Modify.Event#modifystart
-   * @api
-   */
-  MODIFYSTART: 'modifystart',
-  /**
-   * Triggered upon feature modification end
-   * @event ol.interaction.Modify.Event#modifyend
-   * @api
-   */
-  MODIFYEND: 'modifyend'
-};
-
-goog.provide('ol.interaction.Modify');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.Feature');
-goog.require('ol.MapBrowserEventType');
-goog.require('ol.MapBrowserPointerEvent');
-goog.require('ol.array');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Point');
-goog.require('ol.interaction.ModifyEventType');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.layer.Vector');
-goog.require('ol.source.Vector');
-goog.require('ol.source.VectorEventType');
-goog.require('ol.structs.RBush');
-goog.require('ol.style.Style');
-
-/**
- * @classdesc
- * Interaction for modifying feature geometries.  To modify features that have
- * been added to an existing source, construct the modify interaction with the
- * `source` option.  If you want to modify features in a collection (for example,
- * the collection used by a select interaction), construct the interaction with
- * the `features` option.  The interaction must be constructed with either a
- * `source` or `features` option.
- *
- * By default, the interaction will allow deletion of vertices when the `alt`
- * key is pressed.  To configure the interaction with a different condition
- * for deletion, use the `deleteCondition` option.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.ModifyOptions} options Options.
- * @fires ol.interaction.Modify.Event
- * @api
- */
-ol.interaction.Modify = function(options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Modify.handleDownEvent_,
-    handleDragEvent: ol.interaction.Modify.handleDragEvent_,
-    handleEvent: ol.interaction.Modify.handleEvent,
-    handleUpEvent: ol.interaction.Modify.handleUpEvent_
-  });
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.primaryAction;
-
-
-  /**
-   * @private
-   * @param {ol.MapBrowserEvent} mapBrowserEvent Browser event.
-   * @return {boolean} Combined condition result.
-   */
-  this.defaultDeleteCondition_ = function(mapBrowserEvent) {
-    return ol.events.condition.altKeyOnly(mapBrowserEvent) &&
-      ol.events.condition.singleClick(mapBrowserEvent);
-  };
-
-  /**
-   * @type {ol.EventsConditionType}
-   * @private
-   */
-  this.deleteCondition_ = options.deleteCondition ?
-    options.deleteCondition : this.defaultDeleteCondition_;
-
-  /**
-   * @type {ol.EventsConditionType}
-   * @private
-   */
-  this.insertVertexCondition_ = options.insertVertexCondition ?
-    options.insertVertexCondition : ol.events.condition.always;
-
-  /**
-   * Editing vertex.
-   * @type {ol.Feature}
-   * @private
-   */
-  this.vertexFeature_ = null;
-
-  /**
-   * Segments intersecting {@link this.vertexFeature_} by segment uid.
-   * @type {Object.<string, boolean>}
-   * @private
-   */
-  this.vertexSegments_ = null;
-
-  /**
-   * @type {ol.Pixel}
-   * @private
-   */
-  this.lastPixel_ = [0, 0];
-
-  /**
-   * Tracks if the next `singleclick` event should be ignored to prevent
-   * accidental deletion right after vertex creation.
-   * @type {boolean}
-   * @private
-   */
-  this.ignoreNextSingleClick_ = false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.modified_ = false;
-
-  /**
-   * Segment RTree for each layer
-   * @type {ol.structs.RBush.<ol.ModifySegmentDataType>}
-   * @private
-   */
-  this.rBush_ = new ol.structs.RBush();
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = options.pixelTolerance !== undefined ?
-    options.pixelTolerance : 10;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.snappedToVertex_ = false;
-
-  /**
-   * Indicate whether the interaction is currently changing a feature's
-   * coordinates.
-   * @type {boolean}
-   * @private
-   */
-  this.changingFeature_ = false;
-
-  /**
-   * @type {Array}
-   * @private
-   */
-  this.dragSegments_ = [];
-
-  /**
-   * Draw overlay where sketch features are drawn.
-   * @type {ol.layer.Vector}
-   * @private
-   */
-  this.overlay_ = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      wrapX: !!options.wrapX
-    }),
-    style: options.style ? options.style :
-      ol.interaction.Modify.getDefaultStyleFunction(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-  * @const
-  * @private
-  * @type {Object.<string, function(ol.Feature, ol.geom.Geometry)>}
-  */
-  this.SEGMENT_WRITERS_ = {
-    'Point': this.writePointGeometry_,
-    'LineString': this.writeLineStringGeometry_,
-    'LinearRing': this.writeLineStringGeometry_,
-    'Polygon': this.writePolygonGeometry_,
-    'MultiPoint': this.writeMultiPointGeometry_,
-    'MultiLineString': this.writeMultiLineStringGeometry_,
-    'MultiPolygon': this.writeMultiPolygonGeometry_,
-    'Circle': this.writeCircleGeometry_,
-    'GeometryCollection': this.writeGeometryCollectionGeometry_
-  };
-
-
-  /**
-   * @type {ol.source.Vector}
-   * @private
-   */
-  this.source_ = null;
-
-  var features;
-  if (options.source) {
-    this.source_ = options.source;
-    features = new ol.Collection(this.source_.getFeatures());
-    ol.events.listen(this.source_, ol.source.VectorEventType.ADDFEATURE,
-        this.handleSourceAdd_, this);
-    ol.events.listen(this.source_, ol.source.VectorEventType.REMOVEFEATURE,
-        this.handleSourceRemove_, this);
-  } else {
-    features = options.features;
-  }
-  if (!features) {
-    throw new Error('The modify interaction requires features or a source');
-  }
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = features;
-
-  this.features_.forEach(this.addFeature_, this);
-  ol.events.listen(this.features_, ol.CollectionEventType.ADD,
-      this.handleFeatureAdd_, this);
-  ol.events.listen(this.features_, ol.CollectionEventType.REMOVE,
-      this.handleFeatureRemove_, this);
-
-  /**
-   * @type {ol.MapBrowserPointerEvent}
-   * @private
-   */
-  this.lastPointerEvent_ = null;
-
-};
-ol.inherits(ol.interaction.Modify, ol.interaction.Pointer);
-
-
-/**
- * @define {number} The segment index assigned to a circle's center when
- * breaking up a cicrle into ModifySegmentDataType segments.
- */
-ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX = 0;
-
-/**
- * @define {number} The segment index assigned to a circle's circumference when
- * breaking up a circle into ModifySegmentDataType segments.
- */
-ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX = 1;
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.addFeature_ = function(feature) {
-  var geometry = feature.getGeometry();
-  if (geometry && geometry.getType() in this.SEGMENT_WRITERS_) {
-    this.SEGMENT_WRITERS_[geometry.getType()].call(this, feature, geometry);
-  }
-  var map = this.getMap();
-  if (map && map.isRendered() && this.getActive()) {
-    this.handlePointerAtPixel_(this.lastPixel_, map);
-  }
-  ol.events.listen(feature, ol.events.EventType.CHANGE,
-      this.handleFeatureChange_, this);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Map browser event
- * @private
- */
-ol.interaction.Modify.prototype.willModifyFeatures_ = function(evt) {
-  if (!this.modified_) {
-    this.modified_ = true;
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYSTART, this.features_, evt));
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.removeFeature_ = function(feature) {
-  this.removeFeatureSegmentData_(feature);
-  // Remove the vertex feature if the collection of canditate features
-  // is empty.
-  if (this.vertexFeature_ && this.features_.getLength() === 0) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-  ol.events.unlisten(feature, ol.events.EventType.CHANGE,
-      this.handleFeatureChange_, this);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Modify.prototype.removeFeatureSegmentData_ = function(feature) {
-  var rBush = this.rBush_;
-  var /** @type {Array.<ol.ModifySegmentDataType>} */ nodesToRemove = [];
-  rBush.forEach(
-      /**
-       * @param {ol.ModifySegmentDataType} node RTree node.
-       */
-      function(node) {
-        if (feature === node.feature) {
-          nodesToRemove.push(node);
-        }
-      });
-  for (var i = nodesToRemove.length - 1; i >= 0; --i) {
-    rBush.remove(nodesToRemove[i]);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Modify.prototype.setActive = function(active) {
-  if (this.vertexFeature_ && !active) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-  ol.interaction.Pointer.prototype.setActive.call(this, active);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Modify.prototype.setMap = function(map) {
-  this.overlay_.setMap(map);
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-};
-
-
-/**
- * @param {ol.source.Vector.Event} event Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleSourceAdd_ = function(event) {
-  if (event.feature) {
-    this.features_.push(event.feature);
-  }
-};
-
-
-/**
- * @param {ol.source.Vector.Event} event Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleSourceRemove_ = function(event) {
-  if (event.feature) {
-    this.features_.remove(event.feature);
-  }
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureAdd_ = function(evt) {
-  this.addFeature_(/** @type {ol.Feature} */ (evt.element));
-};
-
-
-/**
- * @param {ol.events.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureChange_ = function(evt) {
-  if (!this.changingFeature_) {
-    var feature = /** @type {ol.Feature} */ (evt.target);
-    this.removeFeature_(feature);
-    this.addFeature_(feature);
-  }
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handleFeatureRemove_ = function(evt) {
-  var feature = /** @type {ol.Feature} */ (evt.element);
-  this.removeFeature_(feature);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Point} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writePointGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    segment: [coordinates, coordinates]
-  });
-  this.rBush_.insert(geometry.getExtent(), segmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
-  var points = geometry.getCoordinates();
-  var coordinates, i, ii, segmentData;
-  for (i = 0, ii = points.length; i < ii; ++i) {
-    coordinates = points[i];
-    segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-      feature: feature,
-      geometry: geometry,
-      depth: [i],
-      index: i,
-      segment: [coordinates, coordinates]
-    });
-    this.rBush_.insert(geometry.getExtent(), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.LineString} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeLineStringGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-      feature: feature,
-      geometry: geometry,
-      index: i,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
-  var lines = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = lines.length; j < jj; ++j) {
-    coordinates = lines[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-        feature: feature,
-        geometry: geometry,
-        depth: [j],
-        index: i,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Polygon} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writePolygonGeometry_ = function(feature, geometry) {
-  var rings = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = rings.length; j < jj; ++j) {
-    coordinates = rings[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-        feature: feature,
-        geometry: geometry,
-        depth: [j],
-        index: i,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
-  var polygons = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
-  for (k = 0, kk = polygons.length; k < kk; ++k) {
-    rings = polygons[k];
-    for (j = 0, jj = rings.length; j < jj; ++j) {
-      coordinates = rings[j];
-      for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-        segment = coordinates.slice(i, i + 2);
-        segmentData = /** @type {ol.ModifySegmentDataType} */ ({
-          feature: feature,
-          geometry: geometry,
-          depth: [j, k],
-          index: i,
-          segment: segment
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-      }
-    }
-  }
-};
-
-
-/**
- * We convert a circle into two segments.  The segment at index
- * {@link ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX} is the
- * circle's center (a point).  The segment at index
- * {@link ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX} is
- * the circumference, and is not a line segment.
- *
- * @param {ol.Feature} feature Feature.
- * @param {ol.geom.Circle} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeCircleGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCenter();
-  var centerSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    index: ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX,
-    segment: [coordinates, coordinates]
-  });
-  var circumferenceSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    feature: feature,
-    geometry: geometry,
-    index: ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX,
-    segment: [coordinates, coordinates]
-  });
-  var featureSegments = [centerSegmentData, circumferenceSegmentData];
-  centerSegmentData.featureSegments = circumferenceSegmentData.featureSegments = featureSegments;
-  this.rBush_.insert(ol.extent.createOrUpdateFromCoordinate(coordinates), centerSegmentData);
-  this.rBush_.insert(geometry.getExtent(), circumferenceSegmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @private
- */
-ol.interaction.Modify.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
-  var i, geometries = geometry.getGeometriesArray();
-  for (i = 0; i < geometries.length; ++i) {
-    this.SEGMENT_WRITERS_[geometries[i].getType()].call(
-        this, feature, geometries[i]);
-  }
-};
-
-
-/**
- * @param {ol.Coordinate} coordinates Coordinates.
- * @return {ol.Feature} Vertex feature.
- * @private
- */
-ol.interaction.Modify.prototype.createOrUpdateVertexFeature_ = function(coordinates) {
-  var vertexFeature = this.vertexFeature_;
-  if (!vertexFeature) {
-    vertexFeature = new ol.Feature(new ol.geom.Point(coordinates));
-    this.vertexFeature_ = vertexFeature;
-    this.overlay_.getSource().addFeature(vertexFeature);
-  } else {
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    geometry.setCoordinates(coordinates);
-  }
-  return vertexFeature;
-};
-
-
-/**
- * @param {ol.ModifySegmentDataType} a The first segment data.
- * @param {ol.ModifySegmentDataType} b The second segment data.
- * @return {number} The difference in indexes.
- * @private
- */
-ol.interaction.Modify.compareIndexes_ = function(a, b) {
-  return a.index - b.index;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleDownEvent_ = function(evt) {
-  if (!this.condition_(evt)) {
-    return false;
-  }
-  this.handlePointerAtPixel_(evt.pixel, evt.map);
-  var pixelCoordinate = evt.map.getCoordinateFromPixel(evt.pixel);
-  this.dragSegments_.length = 0;
-  this.modified_ = false;
-  var vertexFeature = this.vertexFeature_;
-  if (vertexFeature) {
-    var insertVertices = [];
-    var geometry = /** @type {ol.geom.Point} */ (vertexFeature.getGeometry());
-    var vertex = geometry.getCoordinates();
-    var vertexExtent = ol.extent.boundingExtent([vertex]);
-    var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);
-    var componentSegments = {};
-    segmentDataMatches.sort(ol.interaction.Modify.compareIndexes_);
-    for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {
-      var segmentDataMatch = segmentDataMatches[i];
-      var segment = segmentDataMatch.segment;
-      var uid = ol.getUid(segmentDataMatch.feature);
-      var depth = segmentDataMatch.depth;
-      if (depth) {
-        uid += '-' + depth.join('-'); // separate feature components
-      }
-      if (!componentSegments[uid]) {
-        componentSegments[uid] = new Array(2);
-      }
-      if (segmentDataMatch.geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-      segmentDataMatch.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-
-        var closestVertex = ol.interaction.Modify.closestOnSegmentData_(pixelCoordinate, segmentDataMatch);
-        if (ol.coordinate.equals(closestVertex, vertex) && !componentSegments[uid][0]) {
-          this.dragSegments_.push([segmentDataMatch, 0]);
-          componentSegments[uid][0] = segmentDataMatch;
-        }
-      } else if (ol.coordinate.equals(segment[0], vertex) &&
-          !componentSegments[uid][0]) {
-        this.dragSegments_.push([segmentDataMatch, 0]);
-        componentSegments[uid][0] = segmentDataMatch;
-      } else if (ol.coordinate.equals(segment[1], vertex) &&
-          !componentSegments[uid][1]) {
-
-        // prevent dragging closed linestrings by the connecting node
-        if ((segmentDataMatch.geometry.getType() ===
-            ol.geom.GeometryType.LINE_STRING ||
-            segmentDataMatch.geometry.getType() ===
-            ol.geom.GeometryType.MULTI_LINE_STRING) &&
-            componentSegments[uid][0] &&
-            componentSegments[uid][0].index === 0) {
-          continue;
-        }
-
-        this.dragSegments_.push([segmentDataMatch, 1]);
-        componentSegments[uid][1] = segmentDataMatch;
-      } else if (this.insertVertexCondition_(evt) && ol.getUid(segment) in this.vertexSegments_ &&
-          (!componentSegments[uid][0] && !componentSegments[uid][1])) {
-        insertVertices.push([segmentDataMatch, vertex]);
-      }
-    }
-    if (insertVertices.length) {
-      this.willModifyFeatures_(evt);
-    }
-    for (var j = insertVertices.length - 1; j >= 0; --j) {
-      this.insertVertex_.apply(this, insertVertices[j]);
-    }
-  }
-  return !!this.vertexFeature_;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleDragEvent_ = function(evt) {
-  this.ignoreNextSingleClick_ = false;
-  this.willModifyFeatures_(evt);
-
-  var vertex = evt.coordinate;
-  for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {
-    var dragSegment = this.dragSegments_[i];
-    var segmentData = dragSegment[0];
-    var depth = segmentData.depth;
-    var geometry = segmentData.geometry;
-    var coordinates;
-    var segment = segmentData.segment;
-    var index = dragSegment[1];
-
-    while (vertex.length < geometry.getStride()) {
-      vertex.push(segment[index][vertex.length]);
-    }
-
-    switch (geometry.getType()) {
-      case ol.geom.GeometryType.POINT:
-        coordinates = vertex;
-        segment[0] = segment[1] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_POINT:
-        coordinates = geometry.getCoordinates();
-        coordinates[segmentData.index] = vertex;
-        segment[0] = segment[1] = vertex;
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        coordinates = geometry.getCoordinates();
-        coordinates[segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.POLYGON:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        coordinates = geometry.getCoordinates();
-        coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;
-        segment[index] = vertex;
-        break;
-      case ol.geom.GeometryType.CIRCLE:
-        segment[0] = segment[1] = vertex;
-        if (segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CENTER_INDEX) {
-          this.changingFeature_ = true;
-          geometry.setCenter(vertex);
-          this.changingFeature_ = false;
-        } else { // We're dragging the circle's circumference:
-          this.changingFeature_ = true;
-          geometry.setRadius(ol.coordinate.distance(geometry.getCenter(), vertex));
-          this.changingFeature_ = false;
-        }
-        break;
-      default:
-        // pass
-    }
-
-    if (coordinates) {
-      this.setGeometryCoordinates_(geometry, coordinates);
-    }
-  }
-  this.createOrUpdateVertexFeature_(vertex);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Modify}
- * @private
- */
-ol.interaction.Modify.handleUpEvent_ = function(evt) {
-  var segmentData;
-  var geometry;
-  for (var i = this.dragSegments_.length - 1; i >= 0; --i) {
-    segmentData = this.dragSegments_[i][0];
-    geometry = segmentData.geometry;
-    if (geometry.getType() === ol.geom.GeometryType.CIRCLE) {
-      // Update a circle object in the R* bush:
-      var coordinates = geometry.getCenter();
-      var centerSegmentData = segmentData.featureSegments[0];
-      var circumferenceSegmentData = segmentData.featureSegments[1];
-      centerSegmentData.segment[0] = centerSegmentData.segment[1] = coordinates;
-      circumferenceSegmentData.segment[0] = circumferenceSegmentData.segment[1] = coordinates;
-      this.rBush_.update(ol.extent.createOrUpdateFromCoordinate(coordinates), centerSegmentData);
-      this.rBush_.update(geometry.getExtent(), circumferenceSegmentData);
-    } else {
-      this.rBush_.update(ol.extent.boundingExtent(segmentData.segment),
-          segmentData);
-    }
-  }
-  if (this.modified_) {
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
-    this.modified_ = false;
-  }
-  return false;
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may modify the
- * geometry.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Modify}
- * @api
- */
-ol.interaction.Modify.handleEvent = function(mapBrowserEvent) {
-  if (!(mapBrowserEvent instanceof ol.MapBrowserPointerEvent)) {
-    return true;
-  }
-  this.lastPointerEvent_ = mapBrowserEvent;
-
-  var handled;
-  if (!mapBrowserEvent.map.getView().getInteracting() &&
-      mapBrowserEvent.type == ol.MapBrowserEventType.POINTERMOVE &&
-      !this.handlingDownUpSequence) {
-    this.handlePointerMove_(mapBrowserEvent);
-  }
-  if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {
-    if (mapBrowserEvent.type != ol.MapBrowserEventType.SINGLECLICK ||
-        !this.ignoreNextSingleClick_) {
-      handled = this.removePoint();
-    } else {
-      handled = true;
-    }
-  }
-
-  if (mapBrowserEvent.type == ol.MapBrowserEventType.SINGLECLICK) {
-    this.ignoreNextSingleClick_ = false;
-  }
-
-  return ol.interaction.Pointer.handleEvent.call(this, mapBrowserEvent) &&
-      !handled;
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} evt Event.
- * @private
- */
-ol.interaction.Modify.prototype.handlePointerMove_ = function(evt) {
-  this.lastPixel_ = evt.pixel;
-  this.handlePointerAtPixel_(evt.pixel, evt.map);
-};
-
-
-/**
- * @param {ol.Pixel} pixel Pixel
- * @param {ol.PluggableMap} map Map.
- * @private
- */
-ol.interaction.Modify.prototype.handlePointerAtPixel_ = function(pixel, map) {
-  var pixelCoordinate = map.getCoordinateFromPixel(pixel);
-  var sortByDistance = function(a, b) {
-    return ol.interaction.Modify.pointDistanceToSegmentDataSquared_(pixelCoordinate, a) -
-        ol.interaction.Modify.pointDistanceToSegmentDataSquared_(pixelCoordinate, b);
-  };
-
-  var box = ol.extent.buffer(
-      ol.extent.createOrUpdateFromCoordinate(pixelCoordinate),
-      map.getView().getResolution() * this.pixelTolerance_);
-
-  var rBush = this.rBush_;
-  var nodes = rBush.getInExtent(box);
-  if (nodes.length > 0) {
-    nodes.sort(sortByDistance);
-    var node = nodes[0];
-    var closestSegment = node.segment;
-    var vertex = ol.interaction.Modify.closestOnSegmentData_(pixelCoordinate, node);
-    var vertexPixel = map.getPixelFromCoordinate(vertex);
-    var dist = ol.coordinate.distance(pixel, vertexPixel);
-    if (dist <= this.pixelTolerance_) {
-      var vertexSegments = {};
-
-      if (node.geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-      node.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-
-        this.snappedToVertex_ = true;
-        this.createOrUpdateVertexFeature_(vertex);
-      } else {
-        var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-        var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-        var squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-        var squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-        dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-        this.snappedToVertex_ = dist <= this.pixelTolerance_;
-        if (this.snappedToVertex_) {
-          vertex = squaredDist1 > squaredDist2 ?
-            closestSegment[1] : closestSegment[0];
-        }
-        this.createOrUpdateVertexFeature_(vertex);
-        var segment;
-        for (var i = 1, ii = nodes.length; i < ii; ++i) {
-          segment = nodes[i].segment;
-          if ((ol.coordinate.equals(closestSegment[0], segment[0]) &&
-              ol.coordinate.equals(closestSegment[1], segment[1]) ||
-              (ol.coordinate.equals(closestSegment[0], segment[1]) &&
-              ol.coordinate.equals(closestSegment[1], segment[0])))) {
-            vertexSegments[ol.getUid(segment)] = true;
-          } else {
-            break;
-          }
-        }
-      }
-
-      vertexSegments[ol.getUid(closestSegment)] = true;
-      this.vertexSegments_ = vertexSegments;
-      return;
-    }
-  }
-  if (this.vertexFeature_) {
-    this.overlay_.getSource().removeFeature(this.vertexFeature_);
-    this.vertexFeature_ = null;
-  }
-};
-
-
-/**
- * Returns the distance from a point to a line segment.
- *
- * @param {ol.Coordinate} pointCoordinates The coordinates of the point from
- *        which to calculate the distance.
- * @param {ol.ModifySegmentDataType} segmentData The object describing the line
- *        segment we are calculating the distance to.
- * @return {number} The square of the distance between a point and a line segment.
- */
-ol.interaction.Modify.pointDistanceToSegmentDataSquared_ = function(pointCoordinates, segmentData) {
-  var geometry = segmentData.geometry;
-
-  if (geometry.getType() === ol.geom.GeometryType.CIRCLE) {
-    var circleGeometry = /** @type {ol.geom.Circle} */ (geometry);
-
-    if (segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-      var distanceToCenterSquared =
-            ol.coordinate.squaredDistance(circleGeometry.getCenter(), pointCoordinates);
-      var distanceToCircumference =
-            Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();
-      return distanceToCircumference * distanceToCircumference;
-    }
-  }
-  return ol.coordinate.squaredDistanceToSegment(pointCoordinates, segmentData.segment);
-};
-
-/**
- * Returns the point closest to a given line segment.
- *
- * @param {ol.Coordinate} pointCoordinates The point to which a closest point
- *        should be found.
- * @param {ol.ModifySegmentDataType} segmentData The object describing the line
- *        segment which should contain the closest point.
- * @return {ol.Coordinate} The point closest to the specified line segment.
- */
-ol.interaction.Modify.closestOnSegmentData_ = function(pointCoordinates, segmentData) {
-  var geometry = segmentData.geometry;
-
-  if (geometry.getType() === ol.geom.GeometryType.CIRCLE &&
-  segmentData.index === ol.interaction.Modify.MODIFY_SEGMENT_CIRCLE_CIRCUMFERENCE_INDEX) {
-    return geometry.getClosestPoint(pointCoordinates);
-  }
-  return ol.coordinate.closestOnSegment(pointCoordinates, segmentData.segment);
-};
-
-
-/**
- * @param {ol.ModifySegmentDataType} segmentData Segment data.
- * @param {ol.Coordinate} vertex Vertex.
- * @private
- */
-ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
-  var segment = segmentData.segment;
-  var feature = segmentData.feature;
-  var geometry = segmentData.geometry;
-  var depth = segmentData.depth;
-  var index = /** @type {number} */ (segmentData.index);
-  var coordinates;
-
-  while (vertex.length < geometry.getStride()) {
-    vertex.push(0);
-  }
-
-  switch (geometry.getType()) {
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.POLYGON:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.MULTI_POLYGON:
-      coordinates = geometry.getCoordinates();
-      coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);
-      break;
-    case ol.geom.GeometryType.LINE_STRING:
-      coordinates = geometry.getCoordinates();
-      coordinates.splice(index + 1, 0, vertex);
-      break;
-    default:
-      return;
-  }
-
-  this.setGeometryCoordinates_(geometry, coordinates);
-  var rTree = this.rBush_;
-  rTree.remove(segmentData);
-  this.updateSegmentIndices_(geometry, index, depth, 1);
-  var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-    segment: [segment[0], vertex],
-    feature: feature,
-    geometry: geometry,
-    depth: depth,
-    index: index
-  });
-  rTree.insert(ol.extent.boundingExtent(newSegmentData.segment),
-      newSegmentData);
-  this.dragSegments_.push([newSegmentData, 1]);
-
-  var newSegmentData2 = /** @type {ol.ModifySegmentDataType} */ ({
-    segment: [vertex, segment[1]],
-    feature: feature,
-    geometry: geometry,
-    depth: depth,
-    index: index + 1
-  });
-  rTree.insert(ol.extent.boundingExtent(newSegmentData2.segment),
-      newSegmentData2);
-  this.dragSegments_.push([newSegmentData2, 0]);
-  this.ignoreNextSingleClick_ = true;
-};
-
-/**
- * Removes the vertex currently being pointed.
- * @return {boolean} True when a vertex was removed.
- * @api
- */
-ol.interaction.Modify.prototype.removePoint = function() {
-  if (this.lastPointerEvent_ && this.lastPointerEvent_.type != ol.MapBrowserEventType.POINTERDRAG) {
-    var evt = this.lastPointerEvent_;
-    this.willModifyFeatures_(evt);
-    this.removeVertex_();
-    this.dispatchEvent(new ol.interaction.Modify.Event(
-        ol.interaction.ModifyEventType.MODIFYEND, this.features_, evt));
-    this.modified_ = false;
-    return true;
-  }
-  return false;
-};
-
-/**
- * Removes a vertex from all matching features.
- * @return {boolean} True when a vertex was removed.
- * @private
- */
-ol.interaction.Modify.prototype.removeVertex_ = function() {
-  var dragSegments = this.dragSegments_;
-  var segmentsByFeature = {};
-  var deleted = false;
-  var component, coordinates, dragSegment, geometry, i, index, left;
-  var newIndex, right, segmentData, uid;
-  for (i = dragSegments.length - 1; i >= 0; --i) {
-    dragSegment = dragSegments[i];
-    segmentData = dragSegment[0];
-    uid = ol.getUid(segmentData.feature);
-    if (segmentData.depth) {
-      // separate feature components
-      uid += '-' + segmentData.depth.join('-');
-    }
-    if (!(uid in segmentsByFeature)) {
-      segmentsByFeature[uid] = {};
-    }
-    if (dragSegment[1] === 0) {
-      segmentsByFeature[uid].right = segmentData;
-      segmentsByFeature[uid].index = segmentData.index;
-    } else if (dragSegment[1] == 1) {
-      segmentsByFeature[uid].left = segmentData;
-      segmentsByFeature[uid].index = segmentData.index + 1;
-    }
-
-  }
-  for (uid in segmentsByFeature) {
-    right = segmentsByFeature[uid].right;
-    left = segmentsByFeature[uid].left;
-    index = segmentsByFeature[uid].index;
-    newIndex = index - 1;
-    if (left !== undefined) {
-      segmentData = left;
-    } else {
-      segmentData = right;
-    }
-    if (newIndex < 0) {
-      newIndex = 0;
-    }
-    geometry = segmentData.geometry;
-    coordinates = geometry.getCoordinates();
-    component = coordinates;
-    deleted = false;
-    switch (geometry.getType()) {
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        if (coordinates[segmentData.depth[0]].length > 2) {
-          coordinates[segmentData.depth[0]].splice(index, 1);
-          deleted = true;
-        }
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        if (coordinates.length > 2) {
-          coordinates.splice(index, 1);
-          deleted = true;
-        }
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        component = component[segmentData.depth[1]];
-        /* falls through */
-      case ol.geom.GeometryType.POLYGON:
-        component = component[segmentData.depth[0]];
-        if (component.length > 4) {
-          if (index == component.length - 1) {
-            index = 0;
-          }
-          component.splice(index, 1);
-          deleted = true;
-          if (index === 0) {
-            // close the ring again
-            component.pop();
-            component.push(component[0]);
-            newIndex = component.length - 1;
-          }
-        }
-        break;
-      default:
-        // pass
-    }
-
-    if (deleted) {
-      this.setGeometryCoordinates_(geometry, coordinates);
-      var segments = [];
-      if (left !== undefined) {
-        this.rBush_.remove(left);
-        segments.push(left.segment[0]);
-      }
-      if (right !== undefined) {
-        this.rBush_.remove(right);
-        segments.push(right.segment[1]);
-      }
-      if (left !== undefined && right !== undefined) {
-        var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({
-          depth: segmentData.depth,
-          feature: segmentData.feature,
-          geometry: segmentData.geometry,
-          index: newIndex,
-          segment: segments
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(newSegmentData.segment),
-            newSegmentData);
-      }
-      this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);
-      if (this.vertexFeature_) {
-        this.overlay_.getSource().removeFeature(this.vertexFeature_);
-        this.vertexFeature_ = null;
-      }
-      dragSegments.length = 0;
-    }
-
-  }
-  return deleted;
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {Array} coordinates Coordinates.
- * @private
- */
-ol.interaction.Modify.prototype.setGeometryCoordinates_ = function(geometry, coordinates) {
-  this.changingFeature_ = true;
-  geometry.setCoordinates(coordinates);
-  this.changingFeature_ = false;
-};
-
-
-/**
- * @param {ol.geom.SimpleGeometry} geometry Geometry.
- * @param {number} index Index.
- * @param {Array.<number>|undefined} depth Depth.
- * @param {number} delta Delta (1 or -1).
- * @private
- */
-ol.interaction.Modify.prototype.updateSegmentIndices_ = function(
-    geometry, index, depth, delta) {
-  this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) {
-    if (segmentDataMatch.geometry === geometry &&
-        (depth === undefined || segmentDataMatch.depth === undefined ||
-        ol.array.equals(segmentDataMatch.depth, depth)) &&
-        segmentDataMatch.index > index) {
-      segmentDataMatch.index += delta;
-    }
-  });
-};
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Modify.getDefaultStyleFunction = function() {
-  var style = ol.style.Style.createDefaultEditing();
-  return function(feature, resolution) {
-    return style[ol.geom.GeometryType.POINT];
-  };
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Modify} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.ModifyEvent}
- * @param {ol.interaction.ModifyEventType} type Type.
- * @param {ol.Collection.<ol.Feature>} features The features modified.
- * @param {ol.MapBrowserPointerEvent} mapBrowserPointerEvent Associated
- *     {@link ol.MapBrowserPointerEvent}.
- */
-ol.interaction.Modify.Event = function(type, features, mapBrowserPointerEvent) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features being modified.
-   * @type {ol.Collection.<ol.Feature>}
-   * @api
-   */
-  this.features = features;
-
-  /**
-   * Associated {@link ol.MapBrowserEvent}.
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserPointerEvent;
-};
-ol.inherits(ol.interaction.Modify.Event, ol.events.Event);
-
-goog.provide('ol.interaction.Select');
-
-goog.require('ol');
-goog.require('ol.CollectionEventType');
-goog.require('ol.array');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.functions');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.layer.Vector');
-goog.require('ol.obj');
-goog.require('ol.source.Vector');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Interaction for selecting vector features. By default, selected features are
- * styled differently, so this interaction can be used for visual highlighting,
- * as well as selecting features for other actions, such as modification or
- * output. There are three ways of controlling which features are selected:
- * using the browser event as defined by the `condition` and optionally the
- * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a
- * further feature filter using the `filter` option.
- *
- * Selected features are added to an internal unmanaged layer.
- *
- * @constructor
- * @extends {ol.interaction.Interaction}
- * @param {olx.interaction.SelectOptions=} opt_options Options.
- * @fires ol.interaction.Select.Event
- * @api
- */
-ol.interaction.Select = function(opt_options) {
-
-  ol.interaction.Interaction.call(this, {
-    handleEvent: ol.interaction.Select.handleEvent
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.condition_ = options.condition ?
-    options.condition : ol.events.condition.singleClick;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.addCondition_ = options.addCondition ?
-    options.addCondition : ol.events.condition.never;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.removeCondition_ = options.removeCondition ?
-    options.removeCondition : ol.events.condition.never;
-
-  /**
-   * @private
-   * @type {ol.EventsConditionType}
-   */
-  this.toggleCondition_ = options.toggleCondition ?
-    options.toggleCondition : ol.events.condition.shiftKeyOnly;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.multi_ = options.multi ? options.multi : false;
-
-  /**
-   * @private
-   * @type {ol.SelectFilterFunction}
-   */
-  this.filter_ = options.filter ? options.filter :
-    ol.functions.TRUE;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
-
-  var featureOverlay = new ol.layer.Vector({
-    source: new ol.source.Vector({
-      useSpatialIndex: false,
-      features: options.features,
-      wrapX: options.wrapX
-    }),
-    style: options.style ? options.style :
-      ol.interaction.Select.getDefaultStyleFunction(),
-    updateWhileAnimating: true,
-    updateWhileInteracting: true
-  });
-
-  /**
-   * @private
-   * @type {ol.layer.Vector}
-   */
-  this.featureOverlay_ = featureOverlay;
-
-  /** @type {function(ol.layer.Layer): boolean} */
-  var layerFilter;
-  if (options.layers) {
-    if (typeof options.layers === 'function') {
-      layerFilter = options.layers;
-    } else {
-      var layers = options.layers;
-      layerFilter = function(layer) {
-        return ol.array.includes(layers, layer);
-      };
-    }
-  } else {
-    layerFilter = ol.functions.TRUE;
-  }
-
-  /**
-   * @private
-   * @type {function(ol.layer.Layer): boolean}
-   */
-  this.layerFilter_ = layerFilter;
-
-  /**
-   * An association between selected feature (key)
-   * and layer (value)
-   * @private
-   * @type {Object.<number, ol.layer.Layer>}
-   */
-  this.featureLayerAssociation_ = {};
-
-  var features = this.featureOverlay_.getSource().getFeaturesCollection();
-  ol.events.listen(features, ol.CollectionEventType.ADD,
-      this.addFeature_, this);
-  ol.events.listen(features, ol.CollectionEventType.REMOVE,
-      this.removeFeature_, this);
-
-};
-ol.inherits(ol.interaction.Select, ol.interaction.Interaction);
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {ol.layer.Layer} layer Layer.
- * @private
- */
-ol.interaction.Select.prototype.addFeatureLayerAssociation_ = function(feature, layer) {
-  var key = ol.getUid(feature);
-  this.featureLayerAssociation_[key] = layer;
-};
-
-
-/**
- * Get the selected features.
- * @return {ol.Collection.<ol.Feature>} Features collection.
- * @api
- */
-ol.interaction.Select.prototype.getFeatures = function() {
-  return this.featureOverlay_.getSource().getFeaturesCollection();
-};
-
-
-/**
- * Returns the Hit-detection tolerance.
- * @returns {number} Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Select.prototype.getHitTolerance = function() {
-  return this.hitTolerance_;
-};
-
-
-/**
- * Returns the associated {@link ol.layer.Vector vectorlayer} of
- * the (last) selected feature. Note that this will not work with any
- * programmatic method like pushing features to
- * {@link ol.interaction.Select#getFeatures collection}.
- * @param {ol.Feature|ol.render.Feature} feature Feature
- * @return {ol.layer.Vector} Layer.
- * @api
- */
-ol.interaction.Select.prototype.getLayer = function(feature) {
-  var key = ol.getUid(feature);
-  return /** @type {ol.layer.Vector} */ (this.featureLayerAssociation_[key]);
-};
-
-
-/**
- * Handles the {@link ol.MapBrowserEvent map browser event} and may change the
- * selected state of features.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Map browser event.
- * @return {boolean} `false` to stop event propagation.
- * @this {ol.interaction.Select}
- * @api
- */
-ol.interaction.Select.handleEvent = function(mapBrowserEvent) {
-  if (!this.condition_(mapBrowserEvent)) {
-    return true;
-  }
-  var add = this.addCondition_(mapBrowserEvent);
-  var remove = this.removeCondition_(mapBrowserEvent);
-  var toggle = this.toggleCondition_(mapBrowserEvent);
-  var set = !add && !remove && !toggle;
-  var map = mapBrowserEvent.map;
-  var features = this.featureOverlay_.getSource().getFeaturesCollection();
-  var deselected = [];
-  var selected = [];
-  if (set) {
-    // Replace the currently selected feature(s) with the feature(s) at the
-    // pixel, or clear the selected feature(s) if there is no feature at
-    // the pixel.
-    ol.obj.clear(this.featureLayerAssociation_);
-    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
-        (
-          /**
-           * @param {ol.Feature|ol.render.Feature} feature Feature.
-           * @param {ol.layer.Layer} layer Layer.
-           * @return {boolean|undefined} Continue to iterate over the features.
-           */
-          function(feature, layer) {
-            if (this.filter_(feature, layer)) {
-              selected.push(feature);
-              this.addFeatureLayerAssociation_(feature, layer);
-              return !this.multi_;
-            }
-          }).bind(this), {
-          layerFilter: this.layerFilter_,
-          hitTolerance: this.hitTolerance_
-        });
-    var i;
-    for (i = features.getLength() - 1; i >= 0; --i) {
-      var feature = features.item(i);
-      var index = selected.indexOf(feature);
-      if (index > -1) {
-        // feature is already selected
-        selected.splice(index, 1);
-      } else {
-        features.remove(feature);
-        deselected.push(feature);
-      }
-    }
-    if (selected.length !== 0) {
-      features.extend(selected);
-    }
-  } else {
-    // Modify the currently selected feature(s).
-    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,
-        (
-          /**
-           * @param {ol.Feature|ol.render.Feature} feature Feature.
-           * @param {ol.layer.Layer} layer Layer.
-           * @return {boolean|undefined} Continue to iterate over the features.
-           */
-          function(feature, layer) {
-            if (this.filter_(feature, layer)) {
-              if ((add || toggle) &&
-                !ol.array.includes(features.getArray(), feature)) {
-                selected.push(feature);
-                this.addFeatureLayerAssociation_(feature, layer);
-              } else if ((remove || toggle) &&
-                ol.array.includes(features.getArray(), feature)) {
-                deselected.push(feature);
-                this.removeFeatureLayerAssociation_(feature);
-              }
-              return !this.multi_;
-            }
-          }).bind(this), {
-          layerFilter: this.layerFilter_,
-          hitTolerance: this.hitTolerance_
-        });
-    var j;
-    for (j = deselected.length - 1; j >= 0; --j) {
-      features.remove(deselected[j]);
-    }
-    features.extend(selected);
-  }
-  if (selected.length > 0 || deselected.length > 0) {
-    this.dispatchEvent(
-        new ol.interaction.Select.Event(ol.interaction.Select.EventType_.SELECT,
-            selected, deselected, mapBrowserEvent));
-  }
-  return ol.events.condition.pointerMove(mapBrowserEvent);
-};
-
-
-/**
- * Hit-detection tolerance. Pixels inside the radius around the given position
- * will be checked for features. This only works for the canvas renderer and
- * not for WebGL.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Select.prototype.setHitTolerance = function(hitTolerance) {
-  this.hitTolerance_ = hitTolerance;
-};
-
-
-/**
- * Remove the interaction from its current map, if any,  and attach it to a new
- * map, if any. Pass `null` to just remove the interaction from the current map.
- * @param {ol.PluggableMap} map Map.
- * @override
- * @api
- */
-ol.interaction.Select.prototype.setMap = function(map) {
-  var currentMap = this.getMap();
-  var selectedFeatures =
-      this.featureOverlay_.getSource().getFeaturesCollection();
-  if (currentMap) {
-    selectedFeatures.forEach(currentMap.unskipFeature, currentMap);
-  }
-  ol.interaction.Interaction.prototype.setMap.call(this, map);
-  this.featureOverlay_.setMap(map);
-  if (map) {
-    selectedFeatures.forEach(map.skipFeature, map);
-  }
-};
-
-
-/**
- * @return {ol.StyleFunction} Styles.
- */
-ol.interaction.Select.getDefaultStyleFunction = function() {
-  var styles = ol.style.Style.createDefaultEditing();
-  ol.array.extend(styles[ol.geom.GeometryType.POLYGON],
-      styles[ol.geom.GeometryType.LINE_STRING]);
-  ol.array.extend(styles[ol.geom.GeometryType.GEOMETRY_COLLECTION],
-      styles[ol.geom.GeometryType.LINE_STRING]);
-
-  return function(feature, resolution) {
-    if (!feature.getGeometry()) {
-      return null;
-    }
-    return styles[feature.getGeometry().getType()];
-  };
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Select.prototype.addFeature_ = function(evt) {
-  var map = this.getMap();
-  if (map) {
-    map.skipFeature(/** @type {ol.Feature} */ (evt.element));
-  }
-};
-
-
-/**
- * @param {ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Select.prototype.removeFeature_ = function(evt) {
-  var map = this.getMap();
-  if (map) {
-    map.unskipFeature(/** @type {ol.Feature} */ (evt.element));
-  }
-};
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @private
- */
-ol.interaction.Select.prototype.removeFeatureLayerAssociation_ = function(feature) {
-  var key = ol.getUid(feature);
-  delete this.featureLayerAssociation_[key];
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Select} instances are instances of
- * this type.
- *
- * @param {ol.interaction.Select.EventType_} type The event type.
- * @param {Array.<ol.Feature>} selected Selected features.
- * @param {Array.<ol.Feature>} deselected Deselected features.
- * @param {ol.MapBrowserEvent} mapBrowserEvent Associated
- *     {@link ol.MapBrowserEvent}.
- * @implements {oli.SelectEvent}
- * @extends {ol.events.Event}
- * @constructor
- */
-ol.interaction.Select.Event = function(type, selected, deselected, mapBrowserEvent) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * Selected features array.
-   * @type {Array.<ol.Feature>}
-   * @api
-   */
-  this.selected = selected;
-
-  /**
-   * Deselected features array.
-   * @type {Array.<ol.Feature>}
-   * @api
-   */
-  this.deselected = deselected;
-
-  /**
-   * Associated {@link ol.MapBrowserEvent}.
-   * @type {ol.MapBrowserEvent}
-   * @api
-   */
-  this.mapBrowserEvent = mapBrowserEvent;
-};
-ol.inherits(ol.interaction.Select.Event, ol.events.Event);
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.interaction.Select.EventType_ = {
-  /**
-   * Triggered when feature(s) has been (de)selected.
-   * @event ol.interaction.Select.Event#select
-   * @api
-   */
-  SELECT: 'select'
-};
-
-goog.provide('ol.interaction.Snap');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.CollectionEventType');
-goog.require('ol.coordinate');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.geom.Polygon');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.obj');
-goog.require('ol.source.Vector');
-goog.require('ol.source.VectorEventType');
-goog.require('ol.structs.RBush');
-
-
-/**
- * @classdesc
- * Handles snapping of vector features while modifying or drawing them.  The
- * features can come from a {@link ol.source.Vector} or {@link ol.Collection}
- * Any interaction object that allows the user to interact
- * with the features using the mouse can benefit from the snapping, as long
- * as it is added before.
- *
- * The snap interaction modifies map browser event `coordinate` and `pixel`
- * properties to force the snap to occur to any interaction that them.
- *
- * Example:
- *
- *     var snap = new ol.interaction.Snap({
- *       source: source
- *     });
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @param {olx.interaction.SnapOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Snap = function(opt_options) {
-
-  ol.interaction.Pointer.call(this, {
-    handleEvent: ol.interaction.Snap.handleEvent_,
-    handleDownEvent: ol.functions.TRUE,
-    handleUpEvent: ol.interaction.Snap.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * @type {ol.source.Vector}
-   * @private
-   */
-  this.source_ = options.source ? options.source : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.vertex_ = options.vertex !== undefined ? options.vertex : true;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.edge_ = options.edge !== undefined ? options.edge : true;
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features ? options.features : null;
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   * @private
-   */
-  this.featuresListenerKeys_ = [];
-
-  /**
-   * @type {Object.<number, ol.EventsKey>}
-   * @private
-   */
-  this.featureChangeListenerKeys_ = {};
-
-  /**
-   * Extents are preserved so indexed segment can be quickly removed
-   * when its feature geometry changes
-   * @type {Object.<number, ol.Extent>}
-   * @private
-   */
-  this.indexedFeaturesExtents_ = {};
-
-  /**
-   * If a feature geometry changes while a pointer drag|move event occurs, the
-   * feature doesn't get updated right away.  It will be at the next 'pointerup'
-   * event fired.
-   * @type {Object.<number, ol.Feature>}
-   * @private
-   */
-  this.pendingFeatures_ = {};
-
-  /**
-   * Used for distance sorting in sortByDistance_
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.pixelCoordinate_ = null;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.pixelTolerance_ = options.pixelTolerance !== undefined ?
-    options.pixelTolerance : 10;
-
-  /**
-   * @type {function(ol.SnapSegmentDataType, ol.SnapSegmentDataType): number}
-   * @private
-   */
-  this.sortByDistance_ = ol.interaction.Snap.sortByDistance.bind(this);
-
-
-  /**
-  * Segment RTree for each layer
-  * @type {ol.structs.RBush.<ol.SnapSegmentDataType>}
-  * @private
-  */
-  this.rBush_ = new ol.structs.RBush();
-
-
-  /**
-  * @const
-  * @private
-  * @type {Object.<string, function(ol.Feature, ol.geom.Geometry)>}
-  */
-  this.SEGMENT_WRITERS_ = {
-    'Point': this.writePointGeometry_,
-    'LineString': this.writeLineStringGeometry_,
-    'LinearRing': this.writeLineStringGeometry_,
-    'Polygon': this.writePolygonGeometry_,
-    'MultiPoint': this.writeMultiPointGeometry_,
-    'MultiLineString': this.writeMultiLineStringGeometry_,
-    'MultiPolygon': this.writeMultiPolygonGeometry_,
-    'GeometryCollection': this.writeGeometryCollectionGeometry_,
-    'Circle': this.writeCircleGeometry_
-  };
-};
-ol.inherits(ol.interaction.Snap, ol.interaction.Pointer);
-
-
-/**
- * Add a feature to the collection of features that we may snap to.
- * @param {ol.Feature} feature Feature.
- * @param {boolean=} opt_listen Whether to listen to the feature change or not
- *     Defaults to `true`.
- * @api
- */
-ol.interaction.Snap.prototype.addFeature = function(feature, opt_listen) {
-  var listen = opt_listen !== undefined ? opt_listen : true;
-  var feature_uid = ol.getUid(feature);
-  var geometry = feature.getGeometry();
-  if (geometry) {
-    var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];
-    if (segmentWriter) {
-      this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(
-          ol.extent.createEmpty());
-      segmentWriter.call(this, feature, geometry);
-    }
-  }
-
-  if (listen) {
-    this.featureChangeListenerKeys_[feature_uid] = ol.events.listen(
-        feature,
-        ol.events.EventType.CHANGE,
-        this.handleFeatureChange_, this);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Snap.prototype.forEachFeatureAdd_ = function(feature) {
-  this.addFeature(feature);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @private
- */
-ol.interaction.Snap.prototype.forEachFeatureRemove_ = function(feature) {
-  this.removeFeature(feature);
-};
-
-
-/**
- * @return {ol.Collection.<ol.Feature>|Array.<ol.Feature>} Features.
- * @private
- */
-ol.interaction.Snap.prototype.getFeatures_ = function() {
-  var features;
-  if (this.features_) {
-    features = this.features_;
-  } else if (this.source_) {
-    features = this.source_.getFeatures();
-  }
-  return /** @type {!Array.<ol.Feature>|!ol.Collection.<ol.Feature>} */ (features);
-};
-
-
-/**
- * @param {ol.source.Vector.Event|ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureAdd_ = function(evt) {
-  var feature;
-  if (evt instanceof ol.source.Vector.Event) {
-    feature = evt.feature;
-  } else if (evt instanceof ol.Collection.Event) {
-    feature = evt.element;
-  }
-  this.addFeature(/** @type {ol.Feature} */ (feature));
-};
-
-
-/**
- * @param {ol.source.Vector.Event|ol.Collection.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureRemove_ = function(evt) {
-  var feature;
-  if (evt instanceof ol.source.Vector.Event) {
-    feature = evt.feature;
-  } else if (evt instanceof ol.Collection.Event) {
-    feature = evt.element;
-  }
-  this.removeFeature(/** @type {ol.Feature} */ (feature));
-};
-
-
-/**
- * @param {ol.events.Event} evt Event.
- * @private
- */
-ol.interaction.Snap.prototype.handleFeatureChange_ = function(evt) {
-  var feature = /** @type {ol.Feature} */ (evt.target);
-  if (this.handlingDownUpSequence) {
-    var uid = ol.getUid(feature);
-    if (!(uid in this.pendingFeatures_)) {
-      this.pendingFeatures_[uid] = feature;
-    }
-  } else {
-    this.updateFeature_(feature);
-  }
-};
-
-
-/**
- * Remove a feature from the collection of features that we may snap to.
- * @param {ol.Feature} feature Feature
- * @param {boolean=} opt_unlisten Whether to unlisten to the feature change
- *     or not. Defaults to `true`.
- * @api
- */
-ol.interaction.Snap.prototype.removeFeature = function(feature, opt_unlisten) {
-  var unlisten = opt_unlisten !== undefined ? opt_unlisten : true;
-  var feature_uid = ol.getUid(feature);
-  var extent = this.indexedFeaturesExtents_[feature_uid];
-  if (extent) {
-    var rBush = this.rBush_;
-    var i, nodesToRemove = [];
-    rBush.forEachInExtent(extent, function(node) {
-      if (feature === node.feature) {
-        nodesToRemove.push(node);
-      }
-    });
-    for (i = nodesToRemove.length - 1; i >= 0; --i) {
-      rBush.remove(nodesToRemove[i]);
-    }
-  }
-
-  if (unlisten) {
-    ol.events.unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);
-    delete this.featureChangeListenerKeys_[feature_uid];
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Snap.prototype.setMap = function(map) {
-  var currentMap = this.getMap();
-  var keys = this.featuresListenerKeys_;
-  var features = this.getFeatures_();
-
-  if (currentMap) {
-    keys.forEach(ol.events.unlistenByKey);
-    keys.length = 0;
-    features.forEach(this.forEachFeatureRemove_, this);
-  }
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-
-  if (map) {
-    if (this.features_) {
-      keys.push(
-          ol.events.listen(this.features_, ol.CollectionEventType.ADD,
-              this.handleFeatureAdd_, this),
-          ol.events.listen(this.features_, ol.CollectionEventType.REMOVE,
-              this.handleFeatureRemove_, this)
-      );
-    } else if (this.source_) {
-      keys.push(
-          ol.events.listen(this.source_, ol.source.VectorEventType.ADDFEATURE,
-              this.handleFeatureAdd_, this),
-          ol.events.listen(this.source_, ol.source.VectorEventType.REMOVEFEATURE,
-              this.handleFeatureRemove_, this)
-      );
-    }
-    features.forEach(this.forEachFeatureAdd_, this);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Snap.prototype.shouldStopEvent = ol.functions.FALSE;
-
-
-/**
- * @param {ol.Pixel} pixel Pixel
- * @param {ol.Coordinate} pixelCoordinate Coordinate
- * @param {ol.PluggableMap} map Map.
- * @return {ol.SnapResultType} Snap result
- */
-ol.interaction.Snap.prototype.snapTo = function(pixel, pixelCoordinate, map) {
-
-  var lowerLeft = map.getCoordinateFromPixel(
-      [pixel[0] - this.pixelTolerance_, pixel[1] + this.pixelTolerance_]);
-  var upperRight = map.getCoordinateFromPixel(
-      [pixel[0] + this.pixelTolerance_, pixel[1] - this.pixelTolerance_]);
-  var box = ol.extent.boundingExtent([lowerLeft, upperRight]);
-
-  var segments = this.rBush_.getInExtent(box);
-
-  // If snapping on vertices only, don't consider circles
-  if (this.vertex_ && !this.edge_) {
-    segments = segments.filter(function(segment) {
-      return segment.feature.getGeometry().getType() !==
-          ol.geom.GeometryType.CIRCLE;
-    });
-  }
-
-  var snappedToVertex = false;
-  var snapped = false;
-  var vertex = null;
-  var vertexPixel = null;
-  var dist, pixel1, pixel2, squaredDist1, squaredDist2;
-  if (segments.length > 0) {
-    this.pixelCoordinate_ = pixelCoordinate;
-    segments.sort(this.sortByDistance_);
-    var closestSegment = segments[0].segment;
-    var isCircle = segments[0].feature.getGeometry().getType() ===
-        ol.geom.GeometryType.CIRCLE;
-    if (this.vertex_ && !this.edge_) {
-      pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-      pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-      squaredDist1 = ol.coordinate.squaredDistance(pixel, pixel1);
-      squaredDist2 = ol.coordinate.squaredDistance(pixel, pixel2);
-      dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-      snappedToVertex = dist <= this.pixelTolerance_;
-      if (snappedToVertex) {
-        snapped = true;
-        vertex = squaredDist1 > squaredDist2 ?
-          closestSegment[1] : closestSegment[0];
-        vertexPixel = map.getPixelFromCoordinate(vertex);
-      }
-    } else if (this.edge_) {
-      if (isCircle) {
-        vertex = ol.coordinate.closestOnCircle(pixelCoordinate,
-            /** @type {ol.geom.Circle} */ (segments[0].feature.getGeometry()));
-      } else {
-        vertex = (ol.coordinate.closestOnSegment(pixelCoordinate,
-            closestSegment));
-      }
-      vertexPixel = map.getPixelFromCoordinate(vertex);
-      if (ol.coordinate.distance(pixel, vertexPixel) <= this.pixelTolerance_) {
-        snapped = true;
-        if (this.vertex_ && !isCircle) {
-          pixel1 = map.getPixelFromCoordinate(closestSegment[0]);
-          pixel2 = map.getPixelFromCoordinate(closestSegment[1]);
-          squaredDist1 = ol.coordinate.squaredDistance(vertexPixel, pixel1);
-          squaredDist2 = ol.coordinate.squaredDistance(vertexPixel, pixel2);
-          dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));
-          snappedToVertex = dist <= this.pixelTolerance_;
-          if (snappedToVertex) {
-            vertex = squaredDist1 > squaredDist2 ?
-              closestSegment[1] : closestSegment[0];
-            vertexPixel = map.getPixelFromCoordinate(vertex);
-          }
-        }
-      }
-    }
-    if (snapped) {
-      vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];
-    }
-  }
-  return /** @type {ol.SnapResultType} */ ({
-    snapped: snapped,
-    vertex: vertex,
-    vertexPixel: vertexPixel
-  });
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @private
- */
-ol.interaction.Snap.prototype.updateFeature_ = function(feature) {
-  this.removeFeature(feature, false);
-  this.addFeature(feature, false);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Circle} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeCircleGeometry_ = function(feature, geometry) {
-  var polygon = ol.geom.Polygon.fromCircle(geometry);
-  var coordinates = polygon.getCoordinates()[0];
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.GeometryCollection} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeGeometryCollectionGeometry_ = function(feature, geometry) {
-  var i, geometries = geometry.getGeometriesArray();
-  for (i = 0; i < geometries.length; ++i) {
-    var segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];
-    if (segmentWriter) {
-      segmentWriter.call(this, feature, geometries[i]);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.LineString} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeLineStringGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var i, ii, segment, segmentData;
-  for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-    segment = coordinates.slice(i, i + 2);
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: segment
-    });
-    this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiLineString} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiLineStringGeometry_ = function(feature, geometry) {
-  var lines = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = lines.length; j < jj; ++j) {
-    coordinates = lines[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-        feature: feature,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPoint} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiPointGeometry_ = function(feature, geometry) {
-  var points = geometry.getCoordinates();
-  var coordinates, i, ii, segmentData;
-  for (i = 0, ii = points.length; i < ii; ++i) {
-    coordinates = points[i];
-    segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-      feature: feature,
-      segment: [coordinates, coordinates]
-    });
-    this.rBush_.insert(geometry.getExtent(), segmentData);
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.MultiPolygon} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writeMultiPolygonGeometry_ = function(feature, geometry) {
-  var polygons = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, k, kk, rings, segment, segmentData;
-  for (k = 0, kk = polygons.length; k < kk; ++k) {
-    rings = polygons[k];
-    for (j = 0, jj = rings.length; j < jj; ++j) {
-      coordinates = rings[j];
-      for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-        segment = coordinates.slice(i, i + 2);
-        segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-          feature: feature,
-          segment: segment
-        });
-        this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-      }
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Point} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writePointGeometry_ = function(feature, geometry) {
-  var coordinates = geometry.getCoordinates();
-  var segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-    feature: feature,
-    segment: [coordinates, coordinates]
-  });
-  this.rBush_.insert(geometry.getExtent(), segmentData);
-};
-
-
-/**
- * @param {ol.Feature} feature Feature
- * @param {ol.geom.Polygon} geometry Geometry.
- * @private
- */
-ol.interaction.Snap.prototype.writePolygonGeometry_ = function(feature, geometry) {
-  var rings = geometry.getCoordinates();
-  var coordinates, i, ii, j, jj, segment, segmentData;
-  for (j = 0, jj = rings.length; j < jj; ++j) {
-    coordinates = rings[j];
-    for (i = 0, ii = coordinates.length - 1; i < ii; ++i) {
-      segment = coordinates.slice(i, i + 2);
-      segmentData = /** @type {ol.SnapSegmentDataType} */ ({
-        feature: feature,
-        segment: segment
-      });
-      this.rBush_.insert(ol.extent.boundingExtent(segment), segmentData);
-    }
-  }
-};
-
-
-/**
- * Handle all pointer events events.
- * @param {ol.MapBrowserEvent} evt A move event.
- * @return {boolean} Pass the event to other interactions.
- * @this {ol.interaction.Snap}
- * @private
- */
-ol.interaction.Snap.handleEvent_ = function(evt) {
-  var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);
-  if (result.snapped) {
-    evt.coordinate = result.vertex.slice(0, 2);
-    evt.pixel = result.vertexPixel;
-  }
-  return ol.interaction.Pointer.handleEvent.call(this, evt);
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} evt Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Snap}
- * @private
- */
-ol.interaction.Snap.handleUpEvent_ = function(evt) {
-  var featuresToUpdate = ol.obj.getValues(this.pendingFeatures_);
-  if (featuresToUpdate.length) {
-    featuresToUpdate.forEach(this.updateFeature_, this);
-    this.pendingFeatures_ = {};
-  }
-  return false;
-};
-
-
-/**
- * Sort segments by distance, helper function
- * @param {ol.SnapSegmentDataType} a The first segment data.
- * @param {ol.SnapSegmentDataType} b The second segment data.
- * @return {number} The difference in distance.
- * @this {ol.interaction.Snap}
- */
-ol.interaction.Snap.sortByDistance = function(a, b) {
-  return ol.coordinate.squaredDistanceToSegment(
-      this.pixelCoordinate_, a.segment) -
-      ol.coordinate.squaredDistanceToSegment(
-          this.pixelCoordinate_, b.segment);
-};
-
-goog.provide('ol.interaction.TranslateEventType');
-
-
-/**
- * @enum {string}
- */
-ol.interaction.TranslateEventType = {
-  /**
-   * Triggered upon feature translation start.
-   * @event ol.interaction.Translate.Event#translatestart
-   * @api
-   */
-  TRANSLATESTART: 'translatestart',
-  /**
-   * Triggered upon feature translation.
-   * @event ol.interaction.Translate.Event#translating
-   * @api
-   */
-  TRANSLATING: 'translating',
-  /**
-   * Triggered upon feature translation end.
-   * @event ol.interaction.Translate.Event#translateend
-   * @api
-   */
-  TRANSLATEEND: 'translateend'
-};
-
-goog.provide('ol.interaction.Translate');
-
-goog.require('ol');
-goog.require('ol.Collection');
-goog.require('ol.Object');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.functions');
-goog.require('ol.array');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Property');
-goog.require('ol.interaction.TranslateEventType');
-
-
-/**
- * @classdesc
- * Interaction for translating (moving) features.
- *
- * @constructor
- * @extends {ol.interaction.Pointer}
- * @fires ol.interaction.Translate.Event
- * @param {olx.interaction.TranslateOptions=} opt_options Options.
- * @api
- */
-ol.interaction.Translate = function(opt_options) {
-  ol.interaction.Pointer.call(this, {
-    handleDownEvent: ol.interaction.Translate.handleDownEvent_,
-    handleDragEvent: ol.interaction.Translate.handleDragEvent_,
-    handleMoveEvent: ol.interaction.Translate.handleMoveEvent_,
-    handleUpEvent: ol.interaction.Translate.handleUpEvent_
-  });
-
-  var options = opt_options ? opt_options : {};
-
-  /**
-   * The last position we translated to.
-   * @type {ol.Coordinate}
-   * @private
-   */
-  this.lastCoordinate_ = null;
-
-
-  /**
-   * @type {ol.Collection.<ol.Feature>}
-   * @private
-   */
-  this.features_ = options.features !== undefined ? options.features : null;
-
-  /** @type {function(ol.layer.Layer): boolean} */
-  var layerFilter;
-  if (options.layers) {
-    if (typeof options.layers === 'function') {
-      layerFilter = options.layers;
-    } else {
-      var layers = options.layers;
-      layerFilter = function(layer) {
-        return ol.array.includes(layers, layer);
-      };
-    }
-  } else {
-    layerFilter = ol.functions.TRUE;
-  }
-
-  /**
-   * @private
-   * @type {function(ol.layer.Layer): boolean}
-   */
-  this.layerFilter_ = layerFilter;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;
-
-  /**
-   * @type {ol.Feature}
-   * @private
-   */
-  this.lastFeature_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.interaction.Property.ACTIVE),
-      this.handleActiveChanged_, this);
-
-};
-ol.inherits(ol.interaction.Translate, ol.interaction.Pointer);
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Start drag sequence?
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleDownEvent_ = function(event) {
-  this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);
-  if (!this.lastCoordinate_ && this.lastFeature_) {
-    this.lastCoordinate_ = event.coordinate;
-    ol.interaction.Translate.handleMoveEvent_.call(this, event);
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATESTART, features,
-            event.coordinate));
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @return {boolean} Stop drag sequence?
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleUpEvent_ = function(event) {
-  if (this.lastCoordinate_) {
-    this.lastCoordinate_ = null;
-    ol.interaction.Translate.handleMoveEvent_.call(this, event);
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATEEND, features,
-            event.coordinate));
-    return true;
-  }
-  return false;
-};
-
-
-/**
- * @param {ol.MapBrowserPointerEvent} event Event.
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleDragEvent_ = function(event) {
-  if (this.lastCoordinate_) {
-    var newCoordinate = event.coordinate;
-    var deltaX = newCoordinate[0] - this.lastCoordinate_[0];
-    var deltaY = newCoordinate[1] - this.lastCoordinate_[1];
-
-    var features = this.features_ || new ol.Collection([this.lastFeature_]);
-
-    features.forEach(function(feature) {
-      var geom = feature.getGeometry();
-      geom.translate(deltaX, deltaY);
-      feature.setGeometry(geom);
-    });
-
-    this.lastCoordinate_ = newCoordinate;
-    this.dispatchEvent(
-        new ol.interaction.Translate.Event(
-            ol.interaction.TranslateEventType.TRANSLATING, features,
-            newCoordinate));
-  }
-};
-
-
-/**
- * @param {ol.MapBrowserEvent} event Event.
- * @this {ol.interaction.Translate}
- * @private
- */
-ol.interaction.Translate.handleMoveEvent_ = function(event) {
-  var elem = event.map.getViewport();
-
-  // Change the cursor to grab/grabbing if hovering any of the features managed
-  // by the interaction
-  if (this.featuresAtPixel_(event.pixel, event.map)) {
-    elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');
-    elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');
-  } else {
-    elem.classList.remove('ol-grab', 'ol-grabbing');
-  }
-};
-
-
-/**
- * Tests to see if the given coordinates intersects any of our selected
- * features.
- * @param {ol.Pixel} pixel Pixel coordinate to test for intersection.
- * @param {ol.PluggableMap} map Map to test the intersection on.
- * @return {ol.Feature} Returns the feature found at the specified pixel
- * coordinates.
- * @private
- */
-ol.interaction.Translate.prototype.featuresAtPixel_ = function(pixel, map) {
-  return map.forEachFeatureAtPixel(pixel,
-      function(feature) {
-        if (!this.features_ ||
-            ol.array.includes(this.features_.getArray(), feature)) {
-          return feature;
-        }
-      }.bind(this), {
-        layerFilter: this.layerFilter_,
-        hitTolerance: this.hitTolerance_
-      });
-};
-
-
-/**
- * Returns the Hit-detection tolerance.
- * @returns {number} Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Translate.prototype.getHitTolerance = function() {
-  return this.hitTolerance_;
-};
-
-
-/**
- * Hit-detection tolerance. Pixels inside the radius around the given position
- * will be checked for features. This only works for the canvas renderer and
- * not for WebGL.
- * @param {number} hitTolerance Hit tolerance in pixels.
- * @api
- */
-ol.interaction.Translate.prototype.setHitTolerance = function(hitTolerance) {
-  this.hitTolerance_ = hitTolerance;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.interaction.Translate.prototype.setMap = function(map) {
-  var oldMap = this.getMap();
-  ol.interaction.Pointer.prototype.setMap.call(this, map);
-  this.updateState_(oldMap);
-};
-
-
-/**
- * @private
- */
-ol.interaction.Translate.prototype.handleActiveChanged_ = function() {
-  this.updateState_(null);
-};
-
-
-/**
- * @param {ol.PluggableMap} oldMap Old map.
- * @private
- */
-ol.interaction.Translate.prototype.updateState_ = function(oldMap) {
-  var map = this.getMap();
-  var active = this.getActive();
-  if (!map || !active) {
-    map = map || oldMap;
-    if (map) {
-      var elem = map.getViewport();
-      elem.classList.remove('ol-grab', 'ol-grabbing');
-    }
-  }
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.interaction.Translate} instances are instances of
- * this type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.interaction.TranslateEvent}
- * @param {ol.interaction.TranslateEventType} type Type.
- * @param {ol.Collection.<ol.Feature>} features The features translated.
- * @param {ol.Coordinate} coordinate The event coordinate.
- */
-ol.interaction.Translate.Event = function(type, features, coordinate) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The features being translated.
-   * @type {ol.Collection.<ol.Feature>}
-   * @api
-   */
-  this.features = features;
-
-  /**
-   * The coordinate of the drag event.
-   * @const
-   * @type {ol.Coordinate}
-   * @api
-   */
-  this.coordinate = coordinate;
-};
-ol.inherits(ol.interaction.Translate.Event, ol.events.Event);
-
-goog.provide('ol.layer.Heatmap');
-
-goog.require('ol.events');
-goog.require('ol');
-goog.require('ol.Object');
-goog.require('ol.dom');
-goog.require('ol.layer.Vector');
-goog.require('ol.math');
-goog.require('ol.obj');
-goog.require('ol.render.EventType');
-goog.require('ol.style.Icon');
-goog.require('ol.style.Style');
-
-
-/**
- * @classdesc
- * Layer for rendering vector data as a heatmap.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Vector}
- * @fires ol.render.Event
- * @param {olx.layer.HeatmapOptions=} opt_options Options.
- * @api
- */
-ol.layer.Heatmap = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.gradient;
-  delete baseOptions.radius;
-  delete baseOptions.blur;
-  delete baseOptions.shadow;
-  delete baseOptions.weight;
-  ol.layer.Vector.call(this, /** @type {olx.layer.VectorOptions} */ (baseOptions));
-
-  /**
-   * @private
-   * @type {Uint8ClampedArray}
-   */
-  this.gradient_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.shadow_ = options.shadow !== undefined ? options.shadow : 250;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.circleImage_ = undefined;
-
-  /**
-   * @private
-   * @type {Array.<Array.<ol.style.Style>>}
-   */
-  this.styleCache_ = null;
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.GRADIENT),
-      this.handleGradientChanged_, this);
-
-  this.setGradient(options.gradient ?
-    options.gradient : ol.layer.Heatmap.DEFAULT_GRADIENT);
-
-  this.setBlur(options.blur !== undefined ? options.blur : 15);
-
-  this.setRadius(options.radius !== undefined ? options.radius : 8);
-
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.BLUR),
-      this.handleStyleChanged_, this);
-  ol.events.listen(this,
-      ol.Object.getChangeEventType(ol.layer.Heatmap.Property_.RADIUS),
-      this.handleStyleChanged_, this);
-
-  this.handleStyleChanged_();
-
-  var weight = options.weight ? options.weight : 'weight';
-  var weightFunction;
-  if (typeof weight === 'string') {
-    weightFunction = function(feature) {
-      return feature.get(weight);
-    };
-  } else {
-    weightFunction = weight;
-  }
-
-  this.setStyle(function(feature, resolution) {
-    var weight = weightFunction(feature);
-    var opacity = weight !== undefined ? ol.math.clamp(weight, 0, 1) : 1;
-    // cast to 8 bits
-    var index = (255 * opacity) | 0;
-    var style = this.styleCache_[index];
-    if (!style) {
-      style = [
-        new ol.style.Style({
-          image: new ol.style.Icon({
-            opacity: opacity,
-            src: this.circleImage_
-          })
-        })
-      ];
-      this.styleCache_[index] = style;
-    }
-    return style;
-  }.bind(this));
-
-  // For performance reasons, don't sort the features before rendering.
-  // The render order is not relevant for a heatmap representation.
-  this.setRenderOrder(null);
-
-  ol.events.listen(this, ol.render.EventType.RENDER, this.handleRender_, this);
-};
-ol.inherits(ol.layer.Heatmap, ol.layer.Vector);
-
-
-/**
- * @const
- * @type {Array.<string>}
- */
-ol.layer.Heatmap.DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
-
-
-/**
- * @param {Array.<string>} colors A list of colored.
- * @return {Uint8ClampedArray} An array.
- * @private
- */
-ol.layer.Heatmap.createGradient_ = function(colors) {
-  var width = 1;
-  var height = 256;
-  var context = ol.dom.createCanvasContext2D(width, height);
-
-  var gradient = context.createLinearGradient(0, 0, width, height);
-  var step = 1 / (colors.length - 1);
-  for (var i = 0, ii = colors.length; i < ii; ++i) {
-    gradient.addColorStop(i * step, colors[i]);
-  }
-
-  context.fillStyle = gradient;
-  context.fillRect(0, 0, width, height);
-
-  return context.getImageData(0, 0, width, height).data;
-};
-
-
-/**
- * @return {string} Data URL for a circle.
- * @private
- */
-ol.layer.Heatmap.prototype.createCircle_ = function() {
-  var radius = this.getRadius();
-  var blur = this.getBlur();
-  var halfSize = radius + blur + 1;
-  var size = 2 * halfSize;
-  var context = ol.dom.createCanvasContext2D(size, size);
-  context.shadowOffsetX = context.shadowOffsetY = this.shadow_;
-  context.shadowBlur = blur;
-  context.shadowColor = '#000';
-  context.beginPath();
-  var center = halfSize - this.shadow_;
-  context.arc(center, center, radius, 0, Math.PI * 2, true);
-  context.fill();
-  return context.canvas.toDataURL();
-};
-
-
-/**
- * Return the blur size in pixels.
- * @return {number} Blur size in pixels.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getBlur = function() {
-  return /** @type {number} */ (this.get(ol.layer.Heatmap.Property_.BLUR));
-};
-
-
-/**
- * Return the gradient colors as array of strings.
- * @return {Array.<string>} Colors.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getGradient = function() {
-  return /** @type {Array.<string>} */ (
-    this.get(ol.layer.Heatmap.Property_.GRADIENT));
-};
-
-
-/**
- * Return the size of the radius in pixels.
- * @return {number} Radius size in pixel.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.getRadius = function() {
-  return /** @type {number} */ (this.get(ol.layer.Heatmap.Property_.RADIUS));
-};
-
-
-/**
- * @private
- */
-ol.layer.Heatmap.prototype.handleGradientChanged_ = function() {
-  this.gradient_ = ol.layer.Heatmap.createGradient_(this.getGradient());
-};
-
-
-/**
- * @private
- */
-ol.layer.Heatmap.prototype.handleStyleChanged_ = function() {
-  this.circleImage_ = this.createCircle_();
-  this.styleCache_ = new Array(256);
-  this.changed();
-};
-
-
-/**
- * @param {ol.render.Event} event Post compose event
- * @private
- */
-ol.layer.Heatmap.prototype.handleRender_ = function(event) {
-  var context = event.context;
-  var canvas = context.canvas;
-  var image = context.getImageData(0, 0, canvas.width, canvas.height);
-  var view8 = image.data;
-  var i, ii, alpha;
-  for (i = 0, ii = view8.length; i < ii; i += 4) {
-    alpha = view8[i + 3] * 4;
-    if (alpha) {
-      view8[i] = this.gradient_[alpha];
-      view8[i + 1] = this.gradient_[alpha + 1];
-      view8[i + 2] = this.gradient_[alpha + 2];
-    }
-  }
-  context.putImageData(image, 0, 0);
-};
-
-
-/**
- * Set the blur size in pixels.
- * @param {number} blur Blur size in pixels.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setBlur = function(blur) {
-  this.set(ol.layer.Heatmap.Property_.BLUR, blur);
-};
-
-
-/**
- * Set the gradient colors as array of strings.
- * @param {Array.<string>} colors Gradient.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setGradient = function(colors) {
-  this.set(ol.layer.Heatmap.Property_.GRADIENT, colors);
-};
-
-
-/**
- * Set the size of the radius in pixels.
- * @param {number} radius Radius size in pixel.
- * @api
- * @observable
- */
-ol.layer.Heatmap.prototype.setRadius = function(radius) {
-  this.set(ol.layer.Heatmap.Property_.RADIUS, radius);
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.layer.Heatmap.Property_ = {
-  BLUR: 'blur',
-  GRADIENT: 'gradient',
-  RADIUS: 'radius'
-};
-
-goog.provide('ol.layer.Image');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.layer.Layer');
-
-
-/**
- * @classdesc
- * Server-rendered images that are available for arbitrary extents and
- * resolutions.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.ImageOptions=} opt_options Layer options.
- * @api
- */
-ol.layer.Image = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-  ol.layer.Layer.call(this,  /** @type {olx.layer.LayerOptions} */ (options));
-
-  /**
-   * The layer type.
-   * @protected
-   * @type {ol.LayerType}
-   */
-  this.type = ol.LayerType.IMAGE;
-
-};
-ol.inherits(ol.layer.Image, ol.layer.Layer);
-
-
-/**
- * Return the associated {@link ol.source.Image source} of the image layer.
- * @function
- * @return {ol.source.Image} Source.
- * @api
- */
-ol.layer.Image.prototype.getSource;
-
-goog.provide('ol.layer.TileProperty');
-
-/**
- * @enum {string}
- */
-ol.layer.TileProperty = {
-  PRELOAD: 'preload',
-  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'
-};
-
-goog.provide('ol.layer.Tile');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.layer.Layer');
-goog.require('ol.layer.TileProperty');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * For layer sources that provide pre-rendered, tiled images in grids that are
- * organized by zoom levels for specific resolutions.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Layer}
- * @fires ol.render.Event
- * @param {olx.layer.TileOptions=} opt_options Tile layer options.
- * @api
- */
-ol.layer.Tile = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.preload;
-  delete baseOptions.useInterimTilesOnError;
-  ol.layer.Layer.call(this,  /** @type {olx.layer.LayerOptions} */ (baseOptions));
-
-  this.setPreload(options.preload !== undefined ? options.preload : 0);
-  this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
-    options.useInterimTilesOnError : true);
-
-  /**
-   * The layer type.
-   * @protected
-   * @type {ol.LayerType}
-   */
-  this.type = ol.LayerType.TILE;
-
-};
-ol.inherits(ol.layer.Tile, ol.layer.Layer);
-
-
-/**
- * Return the level as number to which we will preload tiles up to.
- * @return {number} The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.getPreload = function() {
-  return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD));
-};
-
-
-/**
- * Return the associated {@link ol.source.Tile tilesource} of the layer.
- * @function
- * @return {ol.source.Tile} Source.
- * @api
- */
-ol.layer.Tile.prototype.getSource;
-
-
-/**
- * Set the level as number to which we will preload tiles up to.
- * @param {number} preload The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.setPreload = function(preload) {
-  this.set(ol.layer.TileProperty.PRELOAD, preload);
-};
-
-
-/**
- * Whether we use interim tiles on error.
- * @return {boolean} Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.getUseInterimTilesOnError = function() {
-  return /** @type {boolean} */ (
-    this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
-};
-
-
-/**
- * Set whether we use interim tiles on error.
- * @param {boolean} useInterimTilesOnError Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.Tile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
-  this.set(
-      ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
-};
-
-goog.provide('ol.layer.VectorTile');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.asserts');
-goog.require('ol.layer.TileProperty');
-goog.require('ol.layer.Vector');
-goog.require('ol.layer.VectorTileRenderType');
-goog.require('ol.obj');
-
-
-/**
- * @classdesc
- * Layer for vector tile data that is rendered client-side.
- * Note that any property set in the options is set as a {@link ol.Object}
- * property on the layer object; for example, setting `title: 'My Title'` in the
- * options means that `title` is observable, and has get/set accessors.
- *
- * @constructor
- * @extends {ol.layer.Vector}
- * @param {olx.layer.VectorTileOptions=} opt_options Options.
- * @api
- */
-ol.layer.VectorTile = function(opt_options) {
-  var options = opt_options ? opt_options : {};
-
-  var renderMode = options.renderMode || ol.layer.VectorTileRenderType.HYBRID;
-  ol.asserts.assert(renderMode == undefined ||
-      renderMode == ol.layer.VectorTileRenderType.IMAGE ||
-      renderMode == ol.layer.VectorTileRenderType.HYBRID ||
-      renderMode == ol.layer.VectorTileRenderType.VECTOR,
-  28); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`
-  if (options.declutter && renderMode == ol.layer.VectorTileRenderType.IMAGE) {
-    renderMode = ol.layer.VectorTileRenderType.HYBRID;
-  }
-  options.renderMode = renderMode;
-
-  var baseOptions = ol.obj.assign({}, options);
-
-  delete baseOptions.preload;
-  delete baseOptions.useInterimTilesOnError;
-  ol.layer.Vector.call(this,  /** @type {olx.layer.VectorOptions} */ (baseOptions));
-
-  this.setPreload(options.preload ? options.preload : 0);
-  this.setUseInterimTilesOnError(options.useInterimTilesOnError ?
-    options.useInterimTilesOnError : true);
-
-  /**
-   * The layer type.
-   * @protected
-   * @type {ol.LayerType}
-   */
-  this.type = ol.LayerType.VECTOR_TILE;
-
-};
-ol.inherits(ol.layer.VectorTile, ol.layer.Vector);
-
-
-/**
- * Return the level as number to which we will preload tiles up to.
- * @return {number} The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.getPreload = function() {
-  return /** @type {number} */ (this.get(ol.layer.TileProperty.PRELOAD));
-};
-
-
-/**
- * Whether we use interim tiles on error.
- * @return {boolean} Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.getUseInterimTilesOnError = function() {
-  return /** @type {boolean} */ (
-    this.get(ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR));
-};
-
-
-/**
- * Set the level as number to which we will preload tiles up to.
- * @param {number} preload The level to preload tiles up to.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.setPreload = function(preload) {
-  this.set(ol.layer.TileProperty.PRELOAD, preload);
-};
-
-
-/**
- * Set whether we use interim tiles on error.
- * @param {boolean} useInterimTilesOnError Use interim tiles on error.
- * @observable
- * @api
- */
-ol.layer.VectorTile.prototype.setUseInterimTilesOnError = function(useInterimTilesOnError) {
-  this.set(
-      ol.layer.TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
-};
-
-
-/**
- * Return the associated {@link ol.source.VectorTile vectortilesource} of the layer.
- * @function
- * @return {ol.source.VectorTile} Source.
- * @api
- */
-ol.layer.VectorTile.prototype.getSource;
-
-goog.provide('ol.webgl.Shader');
-
-goog.require('ol.functions');
-
-
-/**
- * @constructor
- * @abstract
- * @param {string} source Source.
- * @struct
- */
-ol.webgl.Shader = function(source) {
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.source_ = source;
-
-};
-
-
-/**
- * @abstract
- * @return {number} Type.
- */
-ol.webgl.Shader.prototype.getType = function() {};
-
-
-/**
- * @return {string} Source.
- */
-ol.webgl.Shader.prototype.getSource = function() {
-  return this.source_;
-};
-
-
-/**
- * @return {boolean} Is animated?
- */
-ol.webgl.Shader.prototype.isAnimated = ol.functions.FALSE;
-
-goog.provide('ol.webgl.Fragment');
-
-goog.require('ol');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Shader');
-
-
-/**
- * @constructor
- * @extends {ol.webgl.Shader}
- * @param {string} source Source.
- * @struct
- */
-ol.webgl.Fragment = function(source) {
-  ol.webgl.Shader.call(this, source);
-};
-ol.inherits(ol.webgl.Fragment, ol.webgl.Shader);
-
-
-/**
- * @inheritDoc
- */
-ol.webgl.Fragment.prototype.getType = function() {
-  return ol.webgl.FRAGMENT_SHADER;
-};
-
-goog.provide('ol.webgl.Vertex');
-
-goog.require('ol');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Shader');
-
-
-/**
- * @constructor
- * @extends {ol.webgl.Shader}
- * @param {string} source Source.
- * @struct
- */
-ol.webgl.Vertex = function(source) {
-  ol.webgl.Shader.call(this, source);
-};
-ol.inherits(ol.webgl.Vertex, ol.webgl.Shader);
-
-
-/**
- * @inheritDoc
- */
-ol.webgl.Vertex.prototype.getType = function() {
-  return ol.webgl.VERTEX_SHADER;
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.circlereplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.render.webgl.circlereplay.defaultshader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  float radius = length(windowCenter - windowOffset);\n  float dist = length(windowCenter - gl_FragCoord.xy);\n  if (dist > radius + v_halfWidth) {\n    if (u_strokeColor.a == 0.0) {\n      gl_FragColor = u_fillColor;\n    } else {\n      gl_FragColor = u_strokeColor;\n    }\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n  } else if (u_fillColor.a == 0.0) {\n    // Hooray, no fill, just stroke. We can use real antialiasing.\n    gl_FragColor = u_strokeColor;\n    if (dist < radius - v_halfWidth) {\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n    }\n  } else {\n    gl_FragColor = u_fillColor;\n    float strokeDist = radius - v_halfWidth;\n    float antialias = 2.0 * v_pixelRatio;\n    if (dist > strokeDist) {\n      gl_FragColor = u_strokeColor;\n    } else if (dist >= strokeDist - antialias) {\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n    }\n  }\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\n  if (gl_FragColor.a <= 0.0) {\n    discard;\n  }\n}\n' :
-  'precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}');
-
-ol.render.webgl.circlereplay.defaultshader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  'varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n  v_pixelRatio = u_pixelRatio;\n  float lineWidth = u_lineWidth * u_pixelRatio;\n  v_halfWidth = lineWidth / 2.0;\n  if (lineWidth == 0.0) {\n    lineWidth = 2.0 * u_pixelRatio;\n  }\n  vec2 offset;\n  // Radius with anitaliasing (roughly).\n  float radius = a_radius + 3.0 * u_pixelRatio;\n  // Until we get gl_VertexID in WebGL, we store an instruction.\n  if (a_instruction == 0.0) {\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n    offset = vec2(-1.0, 1.0);\n  } else if (a_instruction == 1.0) {\n    offset = vec2(-1.0, -1.0);\n  } else if (a_instruction == 2.0) {\n    offset = vec2(1.0, -1.0);\n  } else {\n    offset = vec2(1.0, 1.0);\n  }\n\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n      0.0, 1.0)).xy;\n\n  if (distance(v_center, v_offset) > 20000.0) {\n    gl_Position = vec4(v_center, 0.0, 1.0);\n  }\n}\n\n\n' :
-  'varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.circlereplay.defaultshader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.render.webgl.circlereplay.defaultshader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_projectionMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetScaleMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetRotateMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_lineWidth = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_pixelRatio = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'l');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_opacity = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_fillColor = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_fillColor' : 'n');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_strokeColor = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_strokeColor' : 'o');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_size = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_size' : 'p');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
-
-  /**
-   * @type {number}
-   */
-  this.a_instruction = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_instruction' : 'f');
-
-  /**
-   * @type {number}
-   */
-  this.a_radius = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_radius' : 'g');
-};
-
-goog.provide('ol.vec.Mat4');
-
-
-/**
- * @return {Array.<number>} 4x4 matrix representing a 3D identity transform.
- */
-ol.vec.Mat4.create = function() {
-  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];
-};
-
-
-/**
- * @param {Array.<number>} mat4 Flattened 4x4 matrix receiving the result.
- * @param {ol.Transform} transform Transformation matrix.
- * @return {Array.<number>} 2D transformation matrix as flattened 4x4 matrix.
- */
-ol.vec.Mat4.fromTransform = function(mat4, transform) {
-  mat4[0] = transform[0];
-  mat4[1] = transform[1];
-  mat4[4] = transform[2];
-  mat4[5] = transform[3];
-  mat4[12] = transform[4];
-  mat4[13] = transform[5];
-  return mat4;
-};
-
-goog.provide('ol.render.webgl.Replay');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.render.VectorContext');
-goog.require('ol.transform');
-goog.require('ol.vec.Mat4');
-goog.require('ol.webgl');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.render.VectorContext}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.Replay = function(tolerance, maxExtent) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @protected
-   * @type {number}
-   */
-  this.tolerance = tolerance;
-
-  /**
-   * @protected
-   * @const
-   * @type {ol.Extent}
-   */
-  this.maxExtent = maxExtent;
-
-  /**
-   * The origin of the coordinate system for the point coordinates sent to
-   * the GPU. To eliminate jitter caused by precision problems in the GPU
-   * we use the "Rendering Relative to Eye" technique described in the "3D
-   * Engine Design for Virtual Globes" book.
-   * @protected
-   * @type {ol.Coordinate}
-   */
-  this.origin = ol.extent.getCenter(maxExtent);
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.projectionMatrix_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.offsetRotateMatrix_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.offsetScaleMatrix_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.tmpMat4_ = ol.vec.Mat4.create();
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.indices = [];
-
-  /**
-   * @protected
-   * @type {?ol.webgl.Buffer}
-   */
-  this.indicesBuffer = null;
-
-  /**
-   * Start index per feature (the index).
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.startIndices = [];
-
-  /**
-   * Start index per feature (the feature).
-   * @protected
-   * @type {Array.<ol.Feature|ol.render.Feature>}
-   */
-  this.startIndicesFeature = [];
-
-  /**
-   * @protected
-   * @type {Array.<number>}
-   */
-  this.vertices = [];
-
-  /**
-   * @protected
-   * @type {?ol.webgl.Buffer}
-   */
-  this.verticesBuffer = null;
-
-  /**
-   * Optional parameter for PolygonReplay instances.
-   * @protected
-   * @type {ol.render.webgl.LineStringReplay|undefined}
-   */
-  this.lineStringReplay = undefined;
-
-};
-ol.inherits(ol.render.webgl.Replay, ol.render.VectorContext);
-
-
-/**
- * @abstract
- * @param {ol.webgl.Context} context WebGL context.
- * @return {function()} Delete resources function.
- */
-ol.render.webgl.Replay.prototype.getDeleteResourcesFunction = function(context) {};
-
-
-/**
- * @abstract
- * @param {ol.webgl.Context} context Context.
- */
-ol.render.webgl.Replay.prototype.finish = function(context) {};
-
-
-/**
- * @abstract
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @return {ol.render.webgl.circlereplay.defaultshader.Locations|
-            ol.render.webgl.linestringreplay.defaultshader.Locations|
-            ol.render.webgl.polygonreplay.defaultshader.Locations|
-            ol.render.webgl.texturereplay.defaultshader.Locations} Locations.
- */
-ol.render.webgl.Replay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {};
-
-
-/**
- * @abstract
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.render.webgl.circlereplay.defaultshader.Locations|
-           ol.render.webgl.linestringreplay.defaultshader.Locations|
-           ol.render.webgl.polygonreplay.defaultshader.Locations|
-           ol.render.webgl.texturereplay.defaultshader.Locations} locations Locations.
- */
-ol.render.webgl.Replay.prototype.shutDownProgram = function(gl, locations) {};
-
-
-/**
- * @abstract
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {boolean} hitDetection Hit detection mode.
- */
-ol.render.webgl.Replay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {};
-
-
-/**
- * @abstract
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
- * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
- *  this extent are checked.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.Replay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {};
-
-
-/**
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
- * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
- * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
- *  this extent are checked.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.Replay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeaturesHash,
-    featureCallback, oneByOne, opt_hitExtent) {
-  if (!oneByOne) {
-    // draw all hit-detection features in "once" (by texture group)
-    return this.drawHitDetectionReplayAll(gl, context,
-        skippedFeaturesHash, featureCallback);
-  } else {
-    // draw hit-detection features one by one
-    return this.drawHitDetectionReplayOneByOne(gl, context,
-        skippedFeaturesHash, featureCallback, opt_hitExtent);
-  }
-};
-
-
-/**
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.Replay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedFeaturesHash,
-    featureCallback) {
-  gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-  this.drawReplay(gl, context, skippedFeaturesHash, true);
-
-  var result = featureCallback(null);
-  if (result) {
-    return result;
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} opacity Global opacity.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
- * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
- * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
- *  this extent are checked.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.Replay.prototype.replay = function(context,
-    center, resolution, rotation, size, pixelRatio,
-    opacity, skippedFeaturesHash,
-    featureCallback, oneByOne, opt_hitExtent) {
-  var gl = context.getGL();
-  var tmpStencil, tmpStencilFunc, tmpStencilMaskVal, tmpStencilRef, tmpStencilMask,
-      tmpStencilOpFail, tmpStencilOpPass, tmpStencilOpZFail;
-
-  if (this.lineStringReplay) {
-    tmpStencil = gl.isEnabled(gl.STENCIL_TEST);
-    tmpStencilFunc = gl.getParameter(gl.STENCIL_FUNC);
-    tmpStencilMaskVal = gl.getParameter(gl.STENCIL_VALUE_MASK);
-    tmpStencilRef = gl.getParameter(gl.STENCIL_REF);
-    tmpStencilMask = gl.getParameter(gl.STENCIL_WRITEMASK);
-    tmpStencilOpFail = gl.getParameter(gl.STENCIL_FAIL);
-    tmpStencilOpPass = gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS);
-    tmpStencilOpZFail = gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL);
-
-    gl.enable(gl.STENCIL_TEST);
-    gl.clear(gl.STENCIL_BUFFER_BIT);
-    gl.stencilMask(255);
-    gl.stencilFunc(gl.ALWAYS, 1, 255);
-    gl.stencilOp(gl.KEEP, gl.KEEP, gl.REPLACE);
-
-    this.lineStringReplay.replay(context,
-        center, resolution, rotation, size, pixelRatio,
-        opacity, skippedFeaturesHash,
-        featureCallback, oneByOne, opt_hitExtent);
-
-    gl.stencilMask(0);
-    gl.stencilFunc(gl.NOTEQUAL, 1, 255);
-  }
-
-  context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.verticesBuffer);
-
-  context.bindBuffer(ol.webgl.ELEMENT_ARRAY_BUFFER, this.indicesBuffer);
-
-  var locations = this.setUpProgram(gl, context, size, pixelRatio);
-
-  // set the "uniform" values
-  var projectionMatrix = ol.transform.reset(this.projectionMatrix_);
-  ol.transform.scale(projectionMatrix, 2 / (resolution * size[0]), 2 / (resolution * size[1]));
-  ol.transform.rotate(projectionMatrix, -rotation);
-  ol.transform.translate(projectionMatrix, -(center[0] - this.origin[0]), -(center[1] - this.origin[1]));
-
-  var offsetScaleMatrix = ol.transform.reset(this.offsetScaleMatrix_);
-  ol.transform.scale(offsetScaleMatrix, 2 / size[0], 2 / size[1]);
-
-  var offsetRotateMatrix = ol.transform.reset(this.offsetRotateMatrix_);
-  if (rotation !== 0) {
-    ol.transform.rotate(offsetRotateMatrix, -rotation);
-  }
-
-  gl.uniformMatrix4fv(locations.u_projectionMatrix, false,
-      ol.vec.Mat4.fromTransform(this.tmpMat4_, projectionMatrix));
-  gl.uniformMatrix4fv(locations.u_offsetScaleMatrix, false,
-      ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetScaleMatrix));
-  gl.uniformMatrix4fv(locations.u_offsetRotateMatrix, false,
-      ol.vec.Mat4.fromTransform(this.tmpMat4_, offsetRotateMatrix));
-  gl.uniform1f(locations.u_opacity, opacity);
-
-  // draw!
-  var result;
-  if (featureCallback === undefined) {
-    this.drawReplay(gl, context, skippedFeaturesHash, false);
-  } else {
-    // draw feature by feature for the hit-detection
-    result = this.drawHitDetectionReplay(gl, context, skippedFeaturesHash,
-        featureCallback, oneByOne, opt_hitExtent);
-  }
-
-  // disable the vertex attrib arrays
-  this.shutDownProgram(gl, locations);
-
-  if (this.lineStringReplay) {
-    if (!tmpStencil) {
-      gl.disable(gl.STENCIL_TEST);
-    }
-    gl.clear(gl.STENCIL_BUFFER_BIT);
-    gl.stencilFunc(/** @type {number} */ (tmpStencilFunc),
-        /** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));
-    gl.stencilMask(/** @type {number} */ (tmpStencilMask));
-    gl.stencilOp(/** @type {number} */ (tmpStencilOpFail),
-        /** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));
-  }
-
-  return result;
-};
-
-/**
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {number} start Start index.
- * @param {number} end End index.
- */
-ol.render.webgl.Replay.prototype.drawElements = function(
-    gl, context, start, end) {
-  var elementType = context.hasOESElementIndexUint ?
-    ol.webgl.UNSIGNED_INT : ol.webgl.UNSIGNED_SHORT;
-  var elementSize = context.hasOESElementIndexUint ? 4 : 2;
-
-  var numItems = end - start;
-  var offsetInBytes = start * elementSize;
-  gl.drawElements(ol.webgl.TRIANGLES, numItems, elementType, offsetInBytes);
-};
-
-goog.provide('ol.render.webgl');
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.webgl.defaultFont = '10px sans-serif';
-
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.webgl.defaultFillStyle = [0.0, 0.0, 0.0, 1.0];
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.webgl.defaultLineCap = 'round';
-
-
-/**
- * @const
- * @type {Array.<number>}
- */
-ol.render.webgl.defaultLineDash = [];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.defaultLineDashOffset = 0;
-
-
-/**
- * @const
- * @type {string}
- */
-ol.render.webgl.defaultLineJoin = 'round';
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.defaultMiterLimit = 10;
-
-/**
- * @const
- * @type {ol.Color}
- */
-ol.render.webgl.defaultStrokeStyle = [0.0, 0.0, 0.0, 1.0];
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.defaultTextAlign = 0.5;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.defaultTextBaseline = 0.5;
-
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.defaultLineWidth = 1;
-
-/**
- * Calculates the orientation of a triangle based on the determinant method.
- * @param {number} x1 First X coordinate.
- * @param {number} y1 First Y coordinate.
- * @param {number} x2 Second X coordinate.
- * @param {number} y2 Second Y coordinate.
- * @param {number} x3 Third X coordinate.
- * @param {number} y3 Third Y coordinate.
- * @return {boolean|undefined} Triangle is clockwise.
- */
-ol.render.webgl.triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {
-  var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
-  return (area <= ol.render.webgl.EPSILON && area >= -ol.render.webgl.EPSILON) ?
-    undefined : area > 0;
-};
-
-/**
- * @const
- * @type {number}
- */
-ol.render.webgl.EPSILON = Number.EPSILON || 2.220446049250313e-16;
-
-goog.provide('ol.webgl.Buffer');
-
-goog.require('ol.webgl');
-
-
-/**
- * @constructor
- * @param {Array.<number>=} opt_arr Array.
- * @param {number=} opt_usage Usage.
- * @struct
- */
-ol.webgl.Buffer = function(opt_arr, opt_usage) {
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.arr_ = opt_arr !== undefined ? opt_arr : [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.usage_ = opt_usage !== undefined ?
-    opt_usage : ol.webgl.Buffer.Usage_.STATIC_DRAW;
-
-};
-
-
-/**
- * @return {Array.<number>} Array.
- */
-ol.webgl.Buffer.prototype.getArray = function() {
-  return this.arr_;
-};
-
-
-/**
- * @return {number} Usage.
- */
-ol.webgl.Buffer.prototype.getUsage = function() {
-  return this.usage_;
-};
-
-
-/**
- * @enum {number}
- * @private
- */
-ol.webgl.Buffer.Usage_ = {
-  STATIC_DRAW: ol.webgl.STATIC_DRAW,
-  STREAM_DRAW: ol.webgl.STREAM_DRAW,
-  DYNAMIC_DRAW: ol.webgl.DYNAMIC_DRAW
-};
-
-goog.provide('ol.render.webgl.CircleReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.render.webgl.circlereplay.defaultshader');
-goog.require('ol.render.webgl.circlereplay.defaultshader.Locations');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.render.webgl.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.CircleReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-  /**
-   * @private
-   * @type {ol.render.webgl.circlereplay.defaultshader.Locations}
-   */
-  this.defaultLocations_ = null;
-
-  /**
-   * @private
-   * @type {Array.<Array.<Array.<number>|number>>}
-   */
-  this.styles_ = [];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.styleIndices_ = [];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.radius_ = 0;
-
-  /**
-   * @private
-   * @type {{fillColor: (Array.<number>|null),
-   *         strokeColor: (Array.<number>|null),
-   *         lineDash: Array.<number>,
-   *         lineDashOffset: (number|undefined),
-   *         lineWidth: (number|undefined),
-   *         changed: boolean}|null}
-   */
-  this.state_ = {
-    fillColor: null,
-    strokeColor: null,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineWidth: undefined,
-    changed: false
-  };
-
-};
-ol.inherits(ol.render.webgl.CircleReplay, ol.render.webgl.Replay);
-
-
-/**
- * @private
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- */
-ol.render.webgl.CircleReplay.prototype.drawCoordinates_ = function(
-    flatCoordinates, offset, end, stride) {
-  var numVertices = this.vertices.length;
-  var numIndices = this.indices.length;
-  var n = numVertices / 4;
-  var i, ii;
-  for (i = offset, ii = end; i < ii; i += stride) {
-    this.vertices[numVertices++] = flatCoordinates[i];
-    this.vertices[numVertices++] = flatCoordinates[i + 1];
-    this.vertices[numVertices++] = 0;
-    this.vertices[numVertices++] = this.radius_;
-
-    this.vertices[numVertices++] = flatCoordinates[i];
-    this.vertices[numVertices++] = flatCoordinates[i + 1];
-    this.vertices[numVertices++] = 1;
-    this.vertices[numVertices++] = this.radius_;
-
-    this.vertices[numVertices++] = flatCoordinates[i];
-    this.vertices[numVertices++] = flatCoordinates[i + 1];
-    this.vertices[numVertices++] = 2;
-    this.vertices[numVertices++] = this.radius_;
-
-    this.vertices[numVertices++] = flatCoordinates[i];
-    this.vertices[numVertices++] = flatCoordinates[i + 1];
-    this.vertices[numVertices++] = 3;
-    this.vertices[numVertices++] = this.radius_;
-
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = n + 1;
-    this.indices[numIndices++] = n + 2;
-
-    this.indices[numIndices++] = n + 2;
-    this.indices[numIndices++] = n + 3;
-    this.indices[numIndices++] = n;
-
-    n += 4;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.drawCircle = function(circleGeometry, feature) {
-  var radius = circleGeometry.getRadius();
-  var stride = circleGeometry.getStride();
-  if (radius) {
-    this.startIndices.push(this.indices.length);
-    this.startIndicesFeature.push(feature);
-    if (this.state_.changed) {
-      this.styleIndices_.push(this.indices.length);
-      this.state_.changed = false;
-    }
-
-    this.radius_ = radius;
-    var flatCoordinates = circleGeometry.getFlatCoordinates();
-    flatCoordinates = ol.geom.flat.transform.translate(flatCoordinates, 0, 2,
-        stride, -this.origin[0], -this.origin[1]);
-    this.drawCoordinates_(flatCoordinates, 0, 2, stride);
-  } else {
-    if (this.state_.changed) {
-      this.styles_.pop();
-      if (this.styles_.length) {
-        var lastState = this.styles_[this.styles_.length - 1];
-        this.state_.fillColor =  /** @type {Array.<number>} */ (lastState[0]);
-        this.state_.strokeColor = /** @type {Array.<number>} */ (lastState[1]);
-        this.state_.lineWidth = /** @type {number} */ (lastState[2]);
-        this.state_.changed = false;
-      }
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- **/
-ol.render.webgl.CircleReplay.prototype.finish = function(context) {
-  // create, bind, and populate the vertices buffer
-  this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-  // create, bind, and populate the indices buffer
-  this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-  this.startIndices.push(this.indices.length);
-
-  //Clean up, if there is nothing to draw
-  if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-    this.styles_ = [];
-  }
-
-  this.vertices = null;
-  this.indices = null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.getDeleteResourcesFunction = function(context) {
-  // We only delete our stuff here. The shaders and the program may
-  // be used by other CircleReplay instances (for other layers). And
-  // they will be deleted when disposing of the ol.webgl.Context
-  // object.
-  var verticesBuffer = this.verticesBuffer;
-  var indicesBuffer = this.indicesBuffer;
-  return function() {
-    context.deleteBuffer(verticesBuffer);
-    context.deleteBuffer(indicesBuffer);
-  };
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-  // get the program
-  var fragmentShader, vertexShader;
-  fragmentShader = ol.render.webgl.circlereplay.defaultshader.fragment;
-  vertexShader = ol.render.webgl.circlereplay.defaultshader.vertex;
-  var program = context.getProgram(fragmentShader, vertexShader);
-
-  // get the locations
-  var locations;
-  if (!this.defaultLocations_) {
-    locations = new ol.render.webgl.circlereplay.defaultshader.Locations(gl, program);
-    this.defaultLocations_ = locations;
-  } else {
-    locations = this.defaultLocations_;
-  }
-
-  context.useProgram(program);
-
-  // enable the vertex attrib arrays
-  gl.enableVertexAttribArray(locations.a_position);
-  gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-      false, 16, 0);
-
-  gl.enableVertexAttribArray(locations.a_instruction);
-  gl.vertexAttribPointer(locations.a_instruction, 1, ol.webgl.FLOAT,
-      false, 16, 8);
-
-  gl.enableVertexAttribArray(locations.a_radius);
-  gl.vertexAttribPointer(locations.a_radius, 1, ol.webgl.FLOAT,
-      false, 16, 12);
-
-  // Enable renderer specific uniforms.
-  gl.uniform2fv(locations.u_size, size);
-  gl.uniform1f(locations.u_pixelRatio, pixelRatio);
-
-  return locations;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.shutDownProgram = function(gl, locations) {
-  gl.disableVertexAttribArray(locations.a_position);
-  gl.disableVertexAttribArray(locations.a_instruction);
-  gl.disableVertexAttribArray(locations.a_radius);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-  if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-    this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-  } else {
-    //Draw by style groups to minimize drawElements() calls.
-    var i, start, end, nextStyle;
-    end = this.startIndices[this.startIndices.length - 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      start = this.styleIndices_[i];
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-      this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-          /** @type {number} */ (nextStyle[2]));
-      this.drawElements(gl, context, start, end);
-      end = start;
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-    featureCallback, opt_hitExtent) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-  featureIndex = this.startIndices.length - 2;
-  end = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-    this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-        /** @type {number} */ (nextStyle[2]));
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      start = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid] === undefined &&
-          feature.getGeometry() &&
-          (opt_hitExtent === undefined || ol.extent.intersects(
-              /** @type {Array<number>} */ (opt_hitExtent),
-              feature.getGeometry().getExtent()))) {
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        this.drawElements(gl, context, start, end);
-
-        var result = featureCallback(feature);
-
-        if (result) {
-          return result;
-        }
-
-      }
-      featureIndex--;
-      end = start;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object} skippedFeaturesHash Ids of features to skip.
- */
-ol.render.webgl.CircleReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-  featureIndex = this.startIndices.length - 2;
-  end = start = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setFillStyle_(gl, /** @type {Array.<number>} */ (nextStyle[0]));
-    this.setStrokeStyle_(gl, /** @type {Array.<number>} */ (nextStyle[1]),
-        /** @type {number} */ (nextStyle[2]));
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      featureStart = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid]) {
-        if (start !== end) {
-          this.drawElements(gl, context, start, end);
-        }
-        end = featureStart;
-      }
-      featureIndex--;
-      start = featureStart;
-    }
-    if (start !== end) {
-      this.drawElements(gl, context, start, end);
-    }
-    start = end = groupStart;
-  }
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {Array.<number>} color Color.
- */
-ol.render.webgl.CircleReplay.prototype.setFillStyle_ = function(gl, color) {
-  gl.uniform4fv(this.defaultLocations_.u_fillColor, color);
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {Array.<number>} color Color.
- * @param {number} lineWidth Line width.
- */
-ol.render.webgl.CircleReplay.prototype.setStrokeStyle_ = function(gl, color, lineWidth) {
-  gl.uniform4fv(this.defaultLocations_.u_strokeColor, color);
-  gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.CircleReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var strokeStyleColor, strokeStyleWidth;
-  if (strokeStyle) {
-    var strokeStyleLineDash = strokeStyle.getLineDash();
-    this.state_.lineDash = strokeStyleLineDash ?
-      strokeStyleLineDash : ol.render.webgl.defaultLineDash;
-    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-    this.state_.lineDashOffset = strokeStyleLineDashOffset ?
-      strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
-    strokeStyleColor = strokeStyle.getColor();
-    if (!(strokeStyleColor instanceof CanvasGradient) &&
-        !(strokeStyleColor instanceof CanvasPattern)) {
-      strokeStyleColor = ol.color.asArray(strokeStyleColor).map(function(c, i) {
-        return i != 3 ? c / 255 : c;
-      }) || ol.render.webgl.defaultStrokeStyle;
-    } else {
-      strokeStyleColor = ol.render.webgl.defaultStrokeStyle;
-    }
-    strokeStyleWidth = strokeStyle.getWidth();
-    strokeStyleWidth = strokeStyleWidth !== undefined ?
-      strokeStyleWidth : ol.render.webgl.defaultLineWidth;
-  } else {
-    strokeStyleColor = [0, 0, 0, 0];
-    strokeStyleWidth = 0;
-  }
-  var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];
-  if (!(fillStyleColor instanceof CanvasGradient) &&
-      !(fillStyleColor instanceof CanvasPattern)) {
-    fillStyleColor = ol.color.asArray(fillStyleColor).map(function(c, i) {
-      return i != 3 ? c / 255 : c;
-    }) || ol.render.webgl.defaultFillStyle;
-  } else {
-    fillStyleColor = ol.render.webgl.defaultFillStyle;
-  }
-  if (!this.state_.strokeColor || !ol.array.equals(this.state_.strokeColor, strokeStyleColor) ||
-      !this.state_.fillColor || !ol.array.equals(this.state_.fillColor, fillStyleColor) ||
-      this.state_.lineWidth !== strokeStyleWidth) {
-    this.state_.changed = true;
-    this.state_.fillColor = fillStyleColor;
-    this.state_.strokeColor = strokeStyleColor;
-    this.state_.lineWidth = strokeStyleWidth;
-    this.styles_.push([fillStyleColor, strokeStyleColor, strokeStyleWidth]);
-  }
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.texturereplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.render.webgl.texturereplay.defaultshader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_image, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  float alpha = texColor.a * v_opacity * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n' :
-  'precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');
-
-ol.render.webgl.texturereplay.defaultshader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  'varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix;\n  if (a_rotateWithView == 1.0) {\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  }\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  v_texCoord = a_texCoord;\n  v_opacity = a_opacity;\n}\n\n\n' :
-  'varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.texturereplay.defaultshader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.render.webgl.texturereplay.defaultshader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_projectionMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetScaleMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetRotateMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_opacity = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_opacity' : 'k');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_image = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_image' : 'l');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'c');
-
-  /**
-   * @type {number}
-   */
-  this.a_texCoord = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'd');
-
-  /**
-   * @type {number}
-   */
-  this.a_offsets = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_offsets' : 'e');
-
-  /**
-   * @type {number}
-   */
-  this.a_opacity = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_opacity' : 'f');
-
-  /**
-   * @type {number}
-   */
-  this.a_rotateWithView = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
-};
-
-goog.provide('ol.webgl.ContextEventType');
-
-
-/**
- * @enum {string}
- */
-ol.webgl.ContextEventType = {
-  LOST: 'webglcontextlost',
-  RESTORED: 'webglcontextrestored'
-};
-
-goog.provide('ol.webgl.Context');
-
-goog.require('ol');
-goog.require('ol.Disposable');
-goog.require('ol.array');
-goog.require('ol.events');
-goog.require('ol.obj');
-goog.require('ol.webgl');
-goog.require('ol.webgl.ContextEventType');
-
-
-/**
- * @classdesc
- * A WebGL context for accessing low-level WebGL capabilities.
- *
- * @constructor
- * @extends {ol.Disposable}
- * @param {HTMLCanvasElement} canvas Canvas.
- * @param {WebGLRenderingContext} gl GL.
- */
-ol.webgl.Context = function(canvas, gl) {
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = canvas;
-
-  /**
-   * @private
-   * @type {WebGLRenderingContext}
-   */
-  this.gl_ = gl;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.WebglBufferCacheEntry>}
-   */
-  this.bufferCache_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, WebGLShader>}
-   */
-  this.shaderCache_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string, WebGLProgram>}
-   */
-  this.programCache_ = {};
-
-  /**
-   * @private
-   * @type {WebGLProgram}
-   */
-  this.currentProgram_ = null;
-
-  /**
-   * @private
-   * @type {WebGLFramebuffer}
-   */
-  this.hitDetectionFramebuffer_ = null;
-
-  /**
-   * @private
-   * @type {WebGLTexture}
-   */
-  this.hitDetectionTexture_ = null;
-
-  /**
-   * @private
-   * @type {WebGLRenderbuffer}
-   */
-  this.hitDetectionRenderbuffer_ = null;
-
-  /**
-   * @type {boolean}
-   */
-  this.hasOESElementIndexUint = ol.array.includes(
-      ol.WEBGL_EXTENSIONS, 'OES_element_index_uint');
-
-  // use the OES_element_index_uint extension if available
-  if (this.hasOESElementIndexUint) {
-    gl.getExtension('OES_element_index_uint');
-  }
-
-  ol.events.listen(this.canvas_, ol.webgl.ContextEventType.LOST,
-      this.handleWebGLContextLost, this);
-  ol.events.listen(this.canvas_, ol.webgl.ContextEventType.RESTORED,
-      this.handleWebGLContextRestored, this);
-
-};
-ol.inherits(ol.webgl.Context, ol.Disposable);
-
-
-/**
- * Just bind the buffer if it's in the cache. Otherwise create
- * the WebGL buffer, bind it, populate it, and add an entry to
- * the cache.
- * @param {number} target Target.
- * @param {ol.webgl.Buffer} buf Buffer.
- */
-ol.webgl.Context.prototype.bindBuffer = function(target, buf) {
-  var gl = this.getGL();
-  var arr = buf.getArray();
-  var bufferKey = String(ol.getUid(buf));
-  if (bufferKey in this.bufferCache_) {
-    var bufferCacheEntry = this.bufferCache_[bufferKey];
-    gl.bindBuffer(target, bufferCacheEntry.buffer);
-  } else {
-    var buffer = gl.createBuffer();
-    gl.bindBuffer(target, buffer);
-    var /** @type {ArrayBufferView} */ arrayBuffer;
-    if (target == ol.webgl.ARRAY_BUFFER) {
-      arrayBuffer = new Float32Array(arr);
-    } else if (target == ol.webgl.ELEMENT_ARRAY_BUFFER) {
-      arrayBuffer = this.hasOESElementIndexUint ?
-        new Uint32Array(arr) : new Uint16Array(arr);
-    }
-    gl.bufferData(target, arrayBuffer, buf.getUsage());
-    this.bufferCache_[bufferKey] = {
-      buf: buf,
-      buffer: buffer
-    };
-  }
-};
-
-
-/**
- * @param {ol.webgl.Buffer} buf Buffer.
- */
-ol.webgl.Context.prototype.deleteBuffer = function(buf) {
-  var gl = this.getGL();
-  var bufferKey = String(ol.getUid(buf));
-  var bufferCacheEntry = this.bufferCache_[bufferKey];
-  if (!gl.isContextLost()) {
-    gl.deleteBuffer(bufferCacheEntry.buffer);
-  }
-  delete this.bufferCache_[bufferKey];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.webgl.Context.prototype.disposeInternal = function() {
-  ol.events.unlistenAll(this.canvas_);
-  var gl = this.getGL();
-  if (!gl.isContextLost()) {
-    var key;
-    for (key in this.bufferCache_) {
-      gl.deleteBuffer(this.bufferCache_[key].buffer);
-    }
-    for (key in this.programCache_) {
-      gl.deleteProgram(this.programCache_[key]);
-    }
-    for (key in this.shaderCache_) {
-      gl.deleteShader(this.shaderCache_[key]);
-    }
-    // delete objects for hit-detection
-    gl.deleteFramebuffer(this.hitDetectionFramebuffer_);
-    gl.deleteRenderbuffer(this.hitDetectionRenderbuffer_);
-    gl.deleteTexture(this.hitDetectionTexture_);
-  }
-};
-
-
-/**
- * @return {HTMLCanvasElement} Canvas.
- */
-ol.webgl.Context.prototype.getCanvas = function() {
-  return this.canvas_;
-};
-
-
-/**
- * Get the WebGL rendering context
- * @return {WebGLRenderingContext} The rendering context.
- * @api
- */
-ol.webgl.Context.prototype.getGL = function() {
-  return this.gl_;
-};
-
-
-/**
- * Get the frame buffer for hit detection.
- * @return {WebGLFramebuffer} The hit detection frame buffer.
- */
-ol.webgl.Context.prototype.getHitDetectionFramebuffer = function() {
-  if (!this.hitDetectionFramebuffer_) {
-    this.initHitDetectionFramebuffer_();
-  }
-  return this.hitDetectionFramebuffer_;
-};
-
-
-/**
- * Get shader from the cache if it's in the cache. Otherwise, create
- * the WebGL shader, compile it, and add entry to cache.
- * @param {ol.webgl.Shader} shaderObject Shader object.
- * @return {WebGLShader} Shader.
- */
-ol.webgl.Context.prototype.getShader = function(shaderObject) {
-  var shaderKey = String(ol.getUid(shaderObject));
-  if (shaderKey in this.shaderCache_) {
-    return this.shaderCache_[shaderKey];
-  } else {
-    var gl = this.getGL();
-    var shader = gl.createShader(shaderObject.getType());
-    gl.shaderSource(shader, shaderObject.getSource());
-    gl.compileShader(shader);
-    this.shaderCache_[shaderKey] = shader;
-    return shader;
-  }
-};
-
-
-/**
- * Get the program from the cache if it's in the cache. Otherwise create
- * the WebGL program, attach the shaders to it, and add an entry to the
- * cache.
- * @param {ol.webgl.Fragment} fragmentShaderObject Fragment shader.
- * @param {ol.webgl.Vertex} vertexShaderObject Vertex shader.
- * @return {WebGLProgram} Program.
- */
-ol.webgl.Context.prototype.getProgram = function(
-    fragmentShaderObject, vertexShaderObject) {
-  var programKey =
-      ol.getUid(fragmentShaderObject) + '/' + ol.getUid(vertexShaderObject);
-  if (programKey in this.programCache_) {
-    return this.programCache_[programKey];
-  } else {
-    var gl = this.getGL();
-    var program = gl.createProgram();
-    gl.attachShader(program, this.getShader(fragmentShaderObject));
-    gl.attachShader(program, this.getShader(vertexShaderObject));
-    gl.linkProgram(program);
-    this.programCache_[programKey] = program;
-    return program;
-  }
-};
-
-
-/**
- * FIXME empy description for jsdoc
- */
-ol.webgl.Context.prototype.handleWebGLContextLost = function() {
-  ol.obj.clear(this.bufferCache_);
-  ol.obj.clear(this.shaderCache_);
-  ol.obj.clear(this.programCache_);
-  this.currentProgram_ = null;
-  this.hitDetectionFramebuffer_ = null;
-  this.hitDetectionTexture_ = null;
-  this.hitDetectionRenderbuffer_ = null;
-};
-
-
-/**
- * FIXME empy description for jsdoc
- */
-ol.webgl.Context.prototype.handleWebGLContextRestored = function() {
-};
-
-
-/**
- * Creates a 1x1 pixel framebuffer for the hit-detection.
- * @private
- */
-ol.webgl.Context.prototype.initHitDetectionFramebuffer_ = function() {
-  var gl = this.gl_;
-  var framebuffer = gl.createFramebuffer();
-  gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);
-
-  var texture = ol.webgl.Context.createEmptyTexture(gl, 1, 1);
-  var renderbuffer = gl.createRenderbuffer();
-  gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);
-  gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, 1, 1);
-  gl.framebufferTexture2D(
-      gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
-  gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT,
-      gl.RENDERBUFFER, renderbuffer);
-
-  gl.bindTexture(gl.TEXTURE_2D, null);
-  gl.bindRenderbuffer(gl.RENDERBUFFER, null);
-  gl.bindFramebuffer(gl.FRAMEBUFFER, null);
-
-  this.hitDetectionFramebuffer_ = framebuffer;
-  this.hitDetectionTexture_ = texture;
-  this.hitDetectionRenderbuffer_ = renderbuffer;
-};
-
-
-/**
- * Use a program.  If the program is already in use, this will return `false`.
- * @param {WebGLProgram} program Program.
- * @return {boolean} Changed.
- * @api
- */
-ol.webgl.Context.prototype.useProgram = function(program) {
-  if (program == this.currentProgram_) {
-    return false;
-  } else {
-    var gl = this.getGL();
-    gl.useProgram(program);
-    this.currentProgram_ = program;
-    return true;
-  }
-};
-
-
-/**
- * @param {WebGLRenderingContext} gl WebGL rendering context.
- * @param {number=} opt_wrapS wrapS.
- * @param {number=} opt_wrapT wrapT.
- * @return {WebGLTexture} The texture.
- * @private
- */
-ol.webgl.Context.createTexture_ = function(gl, opt_wrapS, opt_wrapT) {
-  var texture = gl.createTexture();
-  gl.bindTexture(gl.TEXTURE_2D, texture);
-  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
-  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
-
-  if (opt_wrapS !== undefined) {
-    gl.texParameteri(
-        ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_S, opt_wrapS);
-  }
-  if (opt_wrapT !== undefined) {
-    gl.texParameteri(
-        ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_T, opt_wrapT);
-  }
-
-  return texture;
-};
-
-
-/**
- * @param {WebGLRenderingContext} gl WebGL rendering context.
- * @param {number} width Width.
- * @param {number} height Height.
- * @param {number=} opt_wrapS wrapS.
- * @param {number=} opt_wrapT wrapT.
- * @return {WebGLTexture} The texture.
- */
-ol.webgl.Context.createEmptyTexture = function(
-    gl, width, height, opt_wrapS, opt_wrapT) {
-  var texture = ol.webgl.Context.createTexture_(gl, opt_wrapS, opt_wrapT);
-  gl.texImage2D(
-      gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE,
-      null);
-
-  return texture;
-};
-
-
-/**
- * @param {WebGLRenderingContext} gl WebGL rendering context.
- * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.
- * @param {number=} opt_wrapS wrapS.
- * @param {number=} opt_wrapT wrapT.
- * @return {WebGLTexture} The texture.
- */
-ol.webgl.Context.createTexture = function(gl, image, opt_wrapS, opt_wrapT) {
-  var texture = ol.webgl.Context.createTexture_(gl, opt_wrapS, opt_wrapT);
-  gl.texImage2D(
-      gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
-
-  return texture;
-};
-
-goog.provide('ol.render.webgl.TextureReplay');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.render.webgl.texturereplay.defaultshader');
-goog.require('ol.render.webgl.texturereplay.defaultshader.Locations');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Context');
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.render.webgl.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.TextureReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.anchorX = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.anchorY = undefined;
-
-  /**
-   * @type {Array.<number>}
-   * @protected
-   */
-  this.groupIndices = [];
-
-  /**
-   * @type {Array.<number>}
-   * @protected
-   */
-  this.hitDetectionGroupIndices = [];
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.height = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.imageHeight = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.imageWidth = undefined;
-
-  /**
-   * @protected
-   * @type {ol.render.webgl.texturereplay.defaultshader.Locations}
-   */
-  this.defaultLocations = null;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.opacity = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.originX = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.originY = undefined;
-
-  /**
-   * @protected
-   * @type {boolean|undefined}
-   */
-  this.rotateWithView = undefined;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.rotation = undefined;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.scale = undefined;
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.width = undefined;
-};
-ol.inherits(ol.render.webgl.TextureReplay, ol.render.webgl.Replay);
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.getDeleteResourcesFunction = function(context) {
-  var verticesBuffer = this.verticesBuffer;
-  var indicesBuffer = this.indicesBuffer;
-  var textures = this.getTextures(true);
-  var gl = context.getGL();
-  return function() {
-    if (!gl.isContextLost()) {
-      var i, ii;
-      for (i = 0, ii = textures.length; i < ii; ++i) {
-        gl.deleteTexture(textures[i]);
-      }
-    }
-    context.deleteBuffer(verticesBuffer);
-    context.deleteBuffer(indicesBuffer);
-  };
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {number} My end.
- * @protected
- */
-ol.render.webgl.TextureReplay.prototype.drawCoordinates = function(flatCoordinates, offset, end, stride) {
-  var anchorX = /** @type {number} */ (this.anchorX);
-  var anchorY = /** @type {number} */ (this.anchorY);
-  var height = /** @type {number} */ (this.height);
-  var imageHeight = /** @type {number} */ (this.imageHeight);
-  var imageWidth = /** @type {number} */ (this.imageWidth);
-  var opacity = /** @type {number} */ (this.opacity);
-  var originX = /** @type {number} */ (this.originX);
-  var originY = /** @type {number} */ (this.originY);
-  var rotateWithView = this.rotateWithView ? 1.0 : 0.0;
-  // this.rotation_ is anti-clockwise, but rotation is clockwise
-  var rotation = /** @type {number} */ (-this.rotation);
-  var scale = /** @type {number} */ (this.scale);
-  var width = /** @type {number} */ (this.width);
-  var cos = Math.cos(rotation);
-  var sin = Math.sin(rotation);
-  var numIndices = this.indices.length;
-  var numVertices = this.vertices.length;
-  var i, n, offsetX, offsetY, x, y;
-  for (i = offset; i < end; i += stride) {
-    x = flatCoordinates[i] - this.origin[0];
-    y = flatCoordinates[i + 1] - this.origin[1];
-
-    // There are 4 vertices per [x, y] point, one for each corner of the
-    // rectangle we're going to draw. We'd use 1 vertex per [x, y] point if
-    // WebGL supported Geometry Shaders (which can emit new vertices), but that
-    // is not currently the case.
-    //
-    // And each vertex includes 8 values: the x and y coordinates, the x and
-    // y offsets used to calculate the position of the corner, the u and
-    // v texture coordinates for the corner, the opacity, and whether the
-    // the image should be rotated with the view (rotateWithView).
-
-    n = numVertices / 8;
-
-    // bottom-left corner
-    offsetX = -scale * anchorX;
-    offsetY = -scale * (height - anchorY);
-    this.vertices[numVertices++] = x;
-    this.vertices[numVertices++] = y;
-    this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-    this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-    this.vertices[numVertices++] = originX / imageWidth;
-    this.vertices[numVertices++] = (originY + height) / imageHeight;
-    this.vertices[numVertices++] = opacity;
-    this.vertices[numVertices++] = rotateWithView;
-
-    // bottom-right corner
-    offsetX = scale * (width - anchorX);
-    offsetY = -scale * (height - anchorY);
-    this.vertices[numVertices++] = x;
-    this.vertices[numVertices++] = y;
-    this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-    this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-    this.vertices[numVertices++] = (originX + width) / imageWidth;
-    this.vertices[numVertices++] = (originY + height) / imageHeight;
-    this.vertices[numVertices++] = opacity;
-    this.vertices[numVertices++] = rotateWithView;
-
-    // top-right corner
-    offsetX = scale * (width - anchorX);
-    offsetY = scale * anchorY;
-    this.vertices[numVertices++] = x;
-    this.vertices[numVertices++] = y;
-    this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-    this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-    this.vertices[numVertices++] = (originX + width) / imageWidth;
-    this.vertices[numVertices++] = originY / imageHeight;
-    this.vertices[numVertices++] = opacity;
-    this.vertices[numVertices++] = rotateWithView;
-
-    // top-left corner
-    offsetX = -scale * anchorX;
-    offsetY = scale * anchorY;
-    this.vertices[numVertices++] = x;
-    this.vertices[numVertices++] = y;
-    this.vertices[numVertices++] = offsetX * cos - offsetY * sin;
-    this.vertices[numVertices++] = offsetX * sin + offsetY * cos;
-    this.vertices[numVertices++] = originX / imageWidth;
-    this.vertices[numVertices++] = originY / imageHeight;
-    this.vertices[numVertices++] = opacity;
-    this.vertices[numVertices++] = rotateWithView;
-
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = n + 1;
-    this.indices[numIndices++] = n + 2;
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = n + 2;
-    this.indices[numIndices++] = n + 3;
-  }
-
-  return numVertices;
-};
-
-
-/**
- * @protected
- * @param {Array.<WebGLTexture>} textures Textures.
- * @param {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>} images
- *    Images.
- * @param {Object.<string, WebGLTexture>} texturePerImage Texture cache.
- * @param {WebGLRenderingContext} gl Gl.
- */
-ol.render.webgl.TextureReplay.prototype.createTextures = function(textures, images, texturePerImage, gl) {
-  var texture, image, uid, i;
-  var ii = images.length;
-  for (i = 0; i < ii; ++i) {
-    image = images[i];
-
-    uid = ol.getUid(image).toString();
-    if (uid in texturePerImage) {
-      texture = texturePerImage[uid];
-    } else {
-      texture = ol.webgl.Context.createTexture(
-          gl, image, ol.webgl.CLAMP_TO_EDGE, ol.webgl.CLAMP_TO_EDGE);
-      texturePerImage[uid] = texture;
-    }
-    textures[i] = texture;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-  // get the program
-  var fragmentShader = ol.render.webgl.texturereplay.defaultshader.fragment;
-  var vertexShader = ol.render.webgl.texturereplay.defaultshader.vertex;
-  var program = context.getProgram(fragmentShader, vertexShader);
-
-  // get the locations
-  var locations;
-  if (!this.defaultLocations) {
-    locations = new ol.render.webgl.texturereplay.defaultshader.Locations(gl, program);
-    this.defaultLocations = locations;
-  } else {
-    locations = this.defaultLocations;
-  }
-
-  // use the program (FIXME: use the return value)
-  context.useProgram(program);
-
-  // enable the vertex attrib arrays
-  gl.enableVertexAttribArray(locations.a_position);
-  gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-      false, 32, 0);
-
-  gl.enableVertexAttribArray(locations.a_offsets);
-  gl.vertexAttribPointer(locations.a_offsets, 2, ol.webgl.FLOAT,
-      false, 32, 8);
-
-  gl.enableVertexAttribArray(locations.a_texCoord);
-  gl.vertexAttribPointer(locations.a_texCoord, 2, ol.webgl.FLOAT,
-      false, 32, 16);
-
-  gl.enableVertexAttribArray(locations.a_opacity);
-  gl.vertexAttribPointer(locations.a_opacity, 1, ol.webgl.FLOAT,
-      false, 32, 24);
-
-  gl.enableVertexAttribArray(locations.a_rotateWithView);
-  gl.vertexAttribPointer(locations.a_rotateWithView, 1, ol.webgl.FLOAT,
-      false, 32, 28);
-
-  return locations;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.shutDownProgram = function(gl, locations) {
-  gl.disableVertexAttribArray(locations.a_position);
-  gl.disableVertexAttribArray(locations.a_offsets);
-  gl.disableVertexAttribArray(locations.a_texCoord);
-  gl.disableVertexAttribArray(locations.a_opacity);
-  gl.disableVertexAttribArray(locations.a_rotateWithView);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-  var textures = hitDetection ? this.getHitDetectionTextures() : this.getTextures();
-  var groupIndices = hitDetection ? this.hitDetectionGroupIndices : this.groupIndices;
-
-  if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-    this.drawReplaySkipping(
-        gl, context, skippedFeaturesHash, textures, groupIndices);
-  } else {
-    var i, ii, start;
-    for (i = 0, ii = textures.length, start = 0; i < ii; ++i) {
-      gl.bindTexture(ol.webgl.TEXTURE_2D, textures[i]);
-      var end = groupIndices[i];
-      this.drawElements(gl, context, start, end);
-      start = end;
-    }
-  }
-};
-
-
-/**
- * Draw the replay while paying attention to skipped features.
- *
- * This functions creates groups of features that can be drawn to together,
- * so that the number of `drawElements` calls is minimized.
- *
- * For example given the following texture groups:
- *
- *    Group 1: A B C
- *    Group 2: D [E] F G
- *
- * If feature E should be skipped, the following `drawElements` calls will be
- * made:
- *
- *    drawElements with feature A, B and C
- *    drawElements with feature D
- *    drawElements with feature F and G
- *
- * @protected
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {Array.<WebGLTexture>} textures Textures.
- * @param {Array.<number>} groupIndices Texture group indices.
- */
-ol.render.webgl.TextureReplay.prototype.drawReplaySkipping = function(gl, context, skippedFeaturesHash, textures,
-    groupIndices) {
-  var featureIndex = 0;
-
-  var i, ii;
-  for (i = 0, ii = textures.length; i < ii; ++i) {
-    gl.bindTexture(ol.webgl.TEXTURE_2D, textures[i]);
-    var groupStart = (i > 0) ? groupIndices[i - 1] : 0;
-    var groupEnd = groupIndices[i];
-
-    var start = groupStart;
-    var end = groupStart;
-    while (featureIndex < this.startIndices.length &&
-        this.startIndices[featureIndex] <= groupEnd) {
-      var feature = this.startIndicesFeature[featureIndex];
-
-      var featureUid = ol.getUid(feature).toString();
-      if (skippedFeaturesHash[featureUid] !== undefined) {
-        // feature should be skipped
-        if (start !== end) {
-          // draw the features so far
-          this.drawElements(gl, context, start, end);
-        }
-        // continue with the next feature
-        start = (featureIndex === this.startIndices.length - 1) ?
-          groupEnd : this.startIndices[featureIndex + 1];
-        end = start;
-      } else {
-        // the feature is not skipped, augment the end index
-        end = (featureIndex === this.startIndices.length - 1) ?
-          groupEnd : this.startIndices[featureIndex + 1];
-      }
-      featureIndex++;
-    }
-
-    if (start !== end) {
-      // draw the remaining features (in case there was no skipped feature
-      // in this texture group, all features of a group are drawn together)
-      this.drawElements(gl, context, start, end);
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-    featureCallback, opt_hitExtent) {
-  var i, groupStart, start, end, feature, featureUid;
-  var featureIndex = this.startIndices.length - 1;
-  var hitDetectionTextures = this.getHitDetectionTextures();
-  for (i = hitDetectionTextures.length - 1; i >= 0; --i) {
-    gl.bindTexture(ol.webgl.TEXTURE_2D, hitDetectionTextures[i]);
-    groupStart = (i > 0) ? this.hitDetectionGroupIndices[i - 1] : 0;
-    end = this.hitDetectionGroupIndices[i];
-
-    // draw all features for this texture group
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      start = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid] === undefined &&
-          feature.getGeometry() &&
-          (opt_hitExtent === undefined || ol.extent.intersects(
-              /** @type {Array<number>} */ (opt_hitExtent),
-              feature.getGeometry().getExtent()))) {
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        this.drawElements(gl, context, start, end);
-
-        var result = featureCallback(feature);
-        if (result) {
-          return result;
-        }
-      }
-
-      end = start;
-      featureIndex--;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextureReplay.prototype.finish = function(context) {
-  this.anchorX = undefined;
-  this.anchorY = undefined;
-  this.height = undefined;
-  this.imageHeight = undefined;
-  this.imageWidth = undefined;
-  this.indices = null;
-  this.opacity = undefined;
-  this.originX = undefined;
-  this.originY = undefined;
-  this.rotateWithView = undefined;
-  this.rotation = undefined;
-  this.scale = undefined;
-  this.vertices = null;
-  this.width = undefined;
-};
-
-
-/**
- * @abstract
- * @protected
- * @param {boolean=} opt_all Return hit detection textures with regular ones.
- * @returns {Array.<WebGLTexture>} Textures.
- */
-ol.render.webgl.TextureReplay.prototype.getTextures = function(opt_all) {};
-
-
-/**
- * @abstract
- * @protected
- * @returns {Array.<WebGLTexture>} Textures.
- */
-ol.render.webgl.TextureReplay.prototype.getHitDetectionTextures = function() {};
-
-goog.provide('ol.render.webgl.ImageReplay');
-
-goog.require('ol');
-goog.require('ol.render.webgl.TextureReplay');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.render.webgl.TextureReplay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.ImageReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.TextureReplay.call(this, tolerance, maxExtent);
-
-  /**
-   * @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
-   * @protected
-   */
-  this.images_ = [];
-
-  /**
-   * @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
-   * @protected
-   */
-  this.hitDetectionImages_ = [];
-
-  /**
-   * @type {Array.<WebGLTexture>}
-   * @private
-   */
-  this.textures_ = [];
-
-  /**
-   * @type {Array.<WebGLTexture>}
-   * @private
-   */
-  this.hitDetectionTextures_ = [];
-
-};
-ol.inherits(ol.render.webgl.ImageReplay, ol.render.webgl.TextureReplay);
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.drawMultiPoint = function(multiPointGeometry, feature) {
-  this.startIndices.push(this.indices.length);
-  this.startIndicesFeature.push(feature);
-  var flatCoordinates = multiPointGeometry.getFlatCoordinates();
-  var stride = multiPointGeometry.getStride();
-  this.drawCoordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.drawPoint = function(pointGeometry, feature) {
-  this.startIndices.push(this.indices.length);
-  this.startIndicesFeature.push(feature);
-  var flatCoordinates = pointGeometry.getFlatCoordinates();
-  var stride = pointGeometry.getStride();
-  this.drawCoordinates(
-      flatCoordinates, 0, flatCoordinates.length, stride);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.finish = function(context) {
-  var gl = context.getGL();
-
-  this.groupIndices.push(this.indices.length);
-  this.hitDetectionGroupIndices.push(this.indices.length);
-
-  // create, bind, and populate the vertices buffer
-  this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-  var indices = this.indices;
-
-  // create, bind, and populate the indices buffer
-  this.indicesBuffer = new ol.webgl.Buffer(indices);
-
-  // create textures
-  /** @type {Object.<string, WebGLTexture>} */
-  var texturePerImage = {};
-
-  this.createTextures(this.textures_, this.images_, texturePerImage, gl);
-
-  this.createTextures(this.hitDetectionTextures_, this.hitDetectionImages_,
-      texturePerImage, gl);
-
-  this.images_ = null;
-  this.hitDetectionImages_ = null;
-  ol.render.webgl.TextureReplay.prototype.finish.call(this, context);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.setImageStyle = function(imageStyle) {
-  var anchor = imageStyle.getAnchor();
-  var image = imageStyle.getImage(1);
-  var imageSize = imageStyle.getImageSize();
-  var hitDetectionImage = imageStyle.getHitDetectionImage(1);
-  var opacity = imageStyle.getOpacity();
-  var origin = imageStyle.getOrigin();
-  var rotateWithView = imageStyle.getRotateWithView();
-  var rotation = imageStyle.getRotation();
-  var size = imageStyle.getSize();
-  var scale = imageStyle.getScale();
-
-  var currentImage;
-  if (this.images_.length === 0) {
-    this.images_.push(image);
-  } else {
-    currentImage = this.images_[this.images_.length - 1];
-    if (ol.getUid(currentImage) != ol.getUid(image)) {
-      this.groupIndices.push(this.indices.length);
-      this.images_.push(image);
-    }
-  }
-
-  if (this.hitDetectionImages_.length === 0) {
-    this.hitDetectionImages_.push(hitDetectionImage);
-  } else {
-    currentImage =
-        this.hitDetectionImages_[this.hitDetectionImages_.length - 1];
-    if (ol.getUid(currentImage) != ol.getUid(hitDetectionImage)) {
-      this.hitDetectionGroupIndices.push(this.indices.length);
-      this.hitDetectionImages_.push(hitDetectionImage);
-    }
-  }
-
-  this.anchorX = anchor[0];
-  this.anchorY = anchor[1];
-  this.height = size[1];
-  this.imageHeight = imageSize[1];
-  this.imageWidth = imageSize[0];
-  this.opacity = opacity;
-  this.originX = origin[0];
-  this.originY = origin[1];
-  this.rotation = rotation;
-  this.rotateWithView = rotateWithView;
-  this.scale = scale;
-  this.width = size[0];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.getTextures = function(opt_all) {
-  return opt_all ? this.textures_.concat(this.hitDetectionTextures_) : this.textures_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ImageReplay.prototype.getHitDetectionTextures = function() {
-  return this.hitDetectionTextures_;
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.linestringreplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.render.webgl.linestringreplay.defaultshader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  if (v_round > 0.0) {\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n      discard;\n    }\n  }\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n' :
-  'precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');
-
-ol.render.webgl.linestringreplay.defaultshader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  'varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n  float epsilon = 0.000000000001;\n  return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n  vec2 dirVect = nextP - a_position;\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n  offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n  float halfWidth = u_lineWidth / 2.0;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_nextPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n  offset = normal * direction * miterLength;\n  round = 0.0;\n  if (isRound) {\n    round = 1.0;\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\n    offset = halfWidth * tmpNormal * direction;\n  }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n  bool degenerate = false;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_lastPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  vec2 longOffset, shortOffset, longVertex;\n  vec4 shortProjVertex;\n  float halfWidth = u_lineWidth / 2.0;\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n    longOffset = tmpNormal * direction * halfWidth;\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_nextPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n  } else {\n    shortOffset = tmpNormal * direction * halfWidth;\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_lastPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n  }\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n  float epsilon = 0.000000000001;\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n    offset = shortProjVertex.xy;\n    degenerate = true;\n  } else {\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n    offset = normal * direction * miterLength;\n  }\n  return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n    in float turnDir, in float direction) {\n  round = 0.0;\n  vec2 dirVect = a_position - nextP;\n  vec2 firstNormal = normalize(dirVect);\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n  offset = normal * length;\n  if (isRound) {\n    round = 1.0;\n  }\n}\n\nvoid main(void) {\n  bool degenerate = false;\n  float direction = float(sign(a_direction));\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  vec2 offset;\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n  v_round = 0.0;\n  v_halfWidth = u_lineWidth / 2.0;\n  v_roundVertex = projPos.xy;\n\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n    alongNormal(offset, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n    alongNormal(offset, a_lastPos, -1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n    miterUp(offset, v_round, round, direction);\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n  }\n  if (!degenerate) {\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n    gl_Position = projPos + offsets;\n  } else {\n    gl_Position = vec4(offset, 0.0, 1.0);\n  }\n}\n\n\n' :
-  'varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.linestringreplay.defaultshader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.render.webgl.linestringreplay.defaultshader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_projectionMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetScaleMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetRotateMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_lineWidth = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_lineWidth' : 'k');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_miterLimit = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_miterLimit' : 'l');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_opacity = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_opacity' : 'm');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_color = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_color' : 'n');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_size = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_size' : 'o');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_pixelRatio = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_pixelRatio' : 'p');
-
-  /**
-   * @type {number}
-   */
-  this.a_lastPos = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_lastPos' : 'd');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'e');
-
-  /**
-   * @type {number}
-   */
-  this.a_nextPos = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_nextPos' : 'f');
-
-  /**
-   * @type {number}
-   */
-  this.a_direction = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_direction' : 'g');
-};
-
-goog.provide('ol.render.webgl.LineStringReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.geom.flat.topology');
-goog.require('ol.obj');
-goog.require('ol.render.webgl');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl.linestringreplay.defaultshader');
-goog.require('ol.render.webgl.linestringreplay.defaultshader.Locations');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.render.webgl.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.LineStringReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-  /**
-   * @private
-   * @type {ol.render.webgl.linestringreplay.defaultshader.Locations}
-   */
-  this.defaultLocations_ = null;
-
-  /**
-   * @private
-   * @type {Array.<Array.<?>>}
-   */
-  this.styles_ = [];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.styleIndices_ = [];
-
-  /**
-   * @private
-   * @type {{strokeColor: (Array.<number>|null),
-   *         lineCap: (string|undefined),
-   *         lineDash: Array.<number>,
-   *         lineDashOffset: (number|undefined),
-   *         lineJoin: (string|undefined),
-   *         lineWidth: (number|undefined),
-   *         miterLimit: (number|undefined),
-   *         changed: boolean}|null}
-   */
-  this.state_ = {
-    strokeColor: null,
-    lineCap: undefined,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineJoin: undefined,
-    lineWidth: undefined,
-    miterLimit: undefined,
-    changed: false
-  };
-
-};
-ol.inherits(ol.render.webgl.LineStringReplay, ol.render.webgl.Replay);
-
-
-/**
- * Draw one segment.
- * @private
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- */
-ol.render.webgl.LineStringReplay.prototype.drawCoordinates_ = function(flatCoordinates, offset, end, stride) {
-
-  var i, ii;
-  var numVertices = this.vertices.length;
-  var numIndices = this.indices.length;
-  //To save a vertex, the direction of a point is a product of the sign (1 or -1), a prime from
-  //ol.render.webgl.LineStringReplay.Instruction_, and a rounding factor (1 or 2). If the product is even,
-  //we round it. If it is odd, we don't.
-  var lineJoin = this.state_.lineJoin === 'bevel' ? 0 :
-    this.state_.lineJoin === 'miter' ? 1 : 2;
-  var lineCap = this.state_.lineCap === 'butt' ? 0 :
-    this.state_.lineCap === 'square' ? 1 : 2;
-  var closed = ol.geom.flat.topology.lineStringIsClosed(flatCoordinates, offset, end, stride);
-  var startCoords, sign, n;
-  var lastIndex = numIndices;
-  var lastSign = 1;
-  //We need the adjacent vertices to define normals in joins. p0 = last, p1 = current, p2 = next.
-  var p0, p1, p2;
-
-  for (i = offset, ii = end; i < ii; i += stride) {
-
-    n = numVertices / 7;
-
-    p0 = p1;
-    p1 = p2 || [flatCoordinates[i], flatCoordinates[i + 1]];
-    //First vertex.
-    if (i === offset) {
-      p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];
-      if (end - offset === stride * 2 && ol.array.equals(p1, p2)) {
-        break;
-      }
-      if (closed) {
-        //A closed line! Complete the circle.
-        p0 = [flatCoordinates[end - stride * 2],
-          flatCoordinates[end - stride * 2 + 1]];
-
-        startCoords = p2;
-      } else {
-        //Add the first two/four vertices.
-
-        if (lineCap) {
-          numVertices = this.addVertices_([0, 0], p1, p2,
-              lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE_CAP * lineCap, numVertices);
-
-          numVertices = this.addVertices_([0, 0], p1, p2,
-              -lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE_CAP * lineCap, numVertices);
-
-          this.indices[numIndices++] = n + 2;
-          this.indices[numIndices++] = n;
-          this.indices[numIndices++] = n + 1;
-
-          this.indices[numIndices++] = n + 1;
-          this.indices[numIndices++] = n + 3;
-          this.indices[numIndices++] = n + 2;
-
-        }
-
-        numVertices = this.addVertices_([0, 0], p1, p2,
-            lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE * (lineCap || 1), numVertices);
-
-        numVertices = this.addVertices_([0, 0], p1, p2,
-            -lastSign * ol.render.webgl.LineStringReplay.Instruction_.BEGIN_LINE * (lineCap || 1), numVertices);
-
-        lastIndex = numVertices / 7 - 1;
-
-        continue;
-      }
-    } else if (i === end - stride) {
-      //Last vertex.
-      if (closed) {
-        //Same as the first vertex.
-        p2 = startCoords;
-        break;
-      } else {
-        p0 = p0 || [0, 0];
-
-        numVertices = this.addVertices_(p0, p1, [0, 0],
-            lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE * (lineCap || 1), numVertices);
-
-        numVertices = this.addVertices_(p0, p1, [0, 0],
-            -lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE * (lineCap || 1), numVertices);
-
-        this.indices[numIndices++] = n;
-        this.indices[numIndices++] = lastIndex - 1;
-        this.indices[numIndices++] = lastIndex;
-
-        this.indices[numIndices++] = lastIndex;
-        this.indices[numIndices++] = n + 1;
-        this.indices[numIndices++] = n;
-
-        if (lineCap) {
-          numVertices = this.addVertices_(p0, p1, [0, 0],
-              lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE_CAP * lineCap, numVertices);
-
-          numVertices = this.addVertices_(p0, p1, [0, 0],
-              -lastSign * ol.render.webgl.LineStringReplay.Instruction_.END_LINE_CAP * lineCap, numVertices);
-
-          this.indices[numIndices++] = n + 2;
-          this.indices[numIndices++] = n;
-          this.indices[numIndices++] = n + 1;
-
-          this.indices[numIndices++] = n + 1;
-          this.indices[numIndices++] = n + 3;
-          this.indices[numIndices++] = n + 2;
-
-        }
-
-        break;
-      }
-    } else {
-      p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];
-    }
-
-    // We group CW and straight lines, thus the not so inituitive CCW checking function.
-    sign = ol.render.webgl.triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1])
-      ? -1 : 1;
-
-    numVertices = this.addVertices_(p0, p1, p2,
-        sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
-
-    numVertices = this.addVertices_(p0, p1, p2,
-        sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_SECOND * (lineJoin || 1), numVertices);
-
-    numVertices = this.addVertices_(p0, p1, p2,
-        -sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_BOTTOM * (lineJoin || 1), numVertices);
-
-    if (i > offset) {
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = lastIndex - 1;
-      this.indices[numIndices++] = lastIndex;
-
-      this.indices[numIndices++] = n + 2;
-      this.indices[numIndices++] = n;
-      this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;
-    }
-
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = n + 2;
-    this.indices[numIndices++] = n + 1;
-
-    lastIndex = n + 2;
-    lastSign = sign;
-
-    //Add miter
-    if (lineJoin) {
-      numVertices = this.addVertices_(p0, p1, p2,
-          sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_TOP * lineJoin, numVertices);
-
-      this.indices[numIndices++] = n + 1;
-      this.indices[numIndices++] = n + 3;
-      this.indices[numIndices++] = n;
-    }
-  }
-
-  if (closed) {
-    n = n || numVertices / 7;
-    sign = ol.geom.flat.orient.linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2)
-      ? 1 : -1;
-
-    numVertices = this.addVertices_(p0, p1, p2,
-        sign * ol.render.webgl.LineStringReplay.Instruction_.BEVEL_FIRST * (lineJoin || 1), numVertices);
-
-    numVertices = this.addVertices_(p0, p1, p2,
-        -sign * ol.render.webgl.LineStringReplay.Instruction_.MITER_BOTTOM * (lineJoin || 1), numVertices);
-
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = lastIndex - 1;
-    this.indices[numIndices++] = lastIndex;
-
-    this.indices[numIndices++] = n + 1;
-    this.indices[numIndices++] = n;
-    this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;
-  }
-};
-
-/**
- * @param {Array.<number>} p0 Last coordinates.
- * @param {Array.<number>} p1 Current coordinates.
- * @param {Array.<number>} p2 Next coordinates.
- * @param {number} product Sign, instruction, and rounding product.
- * @param {number} numVertices Vertex counter.
- * @return {number} Vertex counter.
- * @private
- */
-ol.render.webgl.LineStringReplay.prototype.addVertices_ = function(p0, p1, p2, product, numVertices) {
-  this.vertices[numVertices++] = p0[0];
-  this.vertices[numVertices++] = p0[1];
-  this.vertices[numVertices++] = p1[0];
-  this.vertices[numVertices++] = p1[1];
-  this.vertices[numVertices++] = p2[0];
-  this.vertices[numVertices++] = p2[1];
-  this.vertices[numVertices++] = product;
-
-  return numVertices;
-};
-
-/**
- * Check if the linestring can be drawn (i. e. valid).
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- * @return {boolean} The linestring can be drawn.
- * @private
- */
-ol.render.webgl.LineStringReplay.prototype.isValid_ = function(flatCoordinates, offset, end, stride) {
-  var range = end - offset;
-  if (range < stride * 2) {
-    return false;
-  } else if (range === stride * 2) {
-    var firstP = [flatCoordinates[offset], flatCoordinates[offset + 1]];
-    var lastP = [flatCoordinates[offset + stride], flatCoordinates[offset + stride + 1]];
-    return !ol.array.equals(firstP, lastP);
-  }
-
-  return true;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.drawLineString = function(lineStringGeometry, feature) {
-  var flatCoordinates = lineStringGeometry.getFlatCoordinates();
-  var stride = lineStringGeometry.getStride();
-  if (this.isValid_(flatCoordinates, 0, flatCoordinates.length, stride)) {
-    flatCoordinates = ol.geom.flat.transform.translate(flatCoordinates, 0, flatCoordinates.length,
-        stride, -this.origin[0], -this.origin[1]);
-    if (this.state_.changed) {
-      this.styleIndices_.push(this.indices.length);
-      this.state_.changed = false;
-    }
-    this.startIndices.push(this.indices.length);
-    this.startIndicesFeature.push(feature);
-    this.drawCoordinates_(
-        flatCoordinates, 0, flatCoordinates.length, stride);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {
-  var indexCount = this.indices.length;
-  var ends = multiLineStringGeometry.getEnds();
-  ends.unshift(0);
-  var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();
-  var stride = multiLineStringGeometry.getStride();
-  var i, ii;
-  if (ends.length > 1) {
-    for (i = 1, ii = ends.length; i < ii; ++i) {
-      if (this.isValid_(flatCoordinates, ends[i - 1], ends[i], stride)) {
-        var lineString = ol.geom.flat.transform.translate(flatCoordinates, ends[i - 1], ends[i],
-            stride, -this.origin[0], -this.origin[1]);
-        this.drawCoordinates_(
-            lineString, 0, lineString.length, stride);
-      }
-    }
-  }
-  if (this.indices.length > indexCount) {
-    this.startIndices.push(indexCount);
-    this.startIndicesFeature.push(feature);
-    if (this.state_.changed) {
-      this.styleIndices_.push(indexCount);
-      this.state_.changed = false;
-    }
-  }
-};
-
-
-/**
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<Array.<number>>} holeFlatCoordinates Hole flat coordinates.
- * @param {number} stride Stride.
- */
-ol.render.webgl.LineStringReplay.prototype.drawPolygonCoordinates = function(
-    flatCoordinates, holeFlatCoordinates, stride) {
-  if (!ol.geom.flat.topology.lineStringIsClosed(flatCoordinates, 0,
-      flatCoordinates.length, stride)) {
-    flatCoordinates.push(flatCoordinates[0]);
-    flatCoordinates.push(flatCoordinates[1]);
-  }
-  this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);
-  if (holeFlatCoordinates.length) {
-    var i, ii;
-    for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {
-      if (!ol.geom.flat.topology.lineStringIsClosed(holeFlatCoordinates[i], 0,
-          holeFlatCoordinates[i].length, stride)) {
-        holeFlatCoordinates[i].push(holeFlatCoordinates[i][0]);
-        holeFlatCoordinates[i].push(holeFlatCoordinates[i][1]);
-      }
-      this.drawCoordinates_(holeFlatCoordinates[i], 0,
-          holeFlatCoordinates[i].length, stride);
-    }
-  }
-};
-
-
-/**
- * @param {ol.Feature|ol.render.Feature} feature Feature.
- * @param {number=} opt_index Index count.
- */
-ol.render.webgl.LineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
-  var index = opt_index === undefined ? this.indices.length : opt_index;
-  this.startIndices.push(index);
-  this.startIndicesFeature.push(feature);
-  if (this.state_.changed) {
-    this.styleIndices_.push(index);
-    this.state_.changed = false;
-  }
-};
-
-
-/**
- * @return {number} Current index.
- */
-ol.render.webgl.LineStringReplay.prototype.getCurrentIndex = function() {
-  return this.indices.length;
-};
-
-
-/**
- * @inheritDoc
- **/
-ol.render.webgl.LineStringReplay.prototype.finish = function(context) {
-  // create, bind, and populate the vertices buffer
-  this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-  // create, bind, and populate the indices buffer
-  this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-  this.startIndices.push(this.indices.length);
-
-  //Clean up, if there is nothing to draw
-  if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-    this.styles_ = [];
-  }
-
-  this.vertices = null;
-  this.indices = null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.getDeleteResourcesFunction = function(context) {
-  var verticesBuffer = this.verticesBuffer;
-  var indicesBuffer = this.indicesBuffer;
-  return function() {
-    context.deleteBuffer(verticesBuffer);
-    context.deleteBuffer(indicesBuffer);
-  };
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-  // get the program
-  var fragmentShader, vertexShader;
-  fragmentShader = ol.render.webgl.linestringreplay.defaultshader.fragment;
-  vertexShader = ol.render.webgl.linestringreplay.defaultshader.vertex;
-  var program = context.getProgram(fragmentShader, vertexShader);
-
-  // get the locations
-  var locations;
-  if (!this.defaultLocations_) {
-    locations = new ol.render.webgl.linestringreplay.defaultshader.Locations(gl, program);
-    this.defaultLocations_ = locations;
-  } else {
-    locations = this.defaultLocations_;
-  }
-
-  context.useProgram(program);
-
-  // enable the vertex attrib arrays
-  gl.enableVertexAttribArray(locations.a_lastPos);
-  gl.vertexAttribPointer(locations.a_lastPos, 2, ol.webgl.FLOAT,
-      false, 28, 0);
-
-  gl.enableVertexAttribArray(locations.a_position);
-  gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-      false, 28, 8);
-
-  gl.enableVertexAttribArray(locations.a_nextPos);
-  gl.vertexAttribPointer(locations.a_nextPos, 2, ol.webgl.FLOAT,
-      false, 28, 16);
-
-  gl.enableVertexAttribArray(locations.a_direction);
-  gl.vertexAttribPointer(locations.a_direction, 1, ol.webgl.FLOAT,
-      false, 28, 24);
-
-  // Enable renderer specific uniforms.
-  gl.uniform2fv(locations.u_size, size);
-  gl.uniform1f(locations.u_pixelRatio, pixelRatio);
-
-  return locations;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.shutDownProgram = function(gl, locations) {
-  gl.disableVertexAttribArray(locations.a_lastPos);
-  gl.disableVertexAttribArray(locations.a_position);
-  gl.disableVertexAttribArray(locations.a_nextPos);
-  gl.disableVertexAttribArray(locations.a_direction);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-  //Save GL parameters.
-  var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));
-  var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));
-
-  if (!hitDetection) {
-    gl.enable(gl.DEPTH_TEST);
-    gl.depthMask(true);
-    gl.depthFunc(gl.NOTEQUAL);
-  }
-
-  if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-    this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-  } else {
-    //Draw by style groups to minimize drawElements() calls.
-    var i, start, end, nextStyle;
-    end = this.startIndices[this.startIndices.length - 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      start = this.styleIndices_[i];
-      nextStyle = this.styles_[i];
-      this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-      this.drawElements(gl, context, start, end);
-      gl.clear(gl.DEPTH_BUFFER_BIT);
-      end = start;
-    }
-  }
-  if (!hitDetection) {
-    gl.disable(gl.DEPTH_TEST);
-    gl.clear(gl.DEPTH_BUFFER_BIT);
-    //Restore GL parameters.
-    gl.depthMask(tmpDepthMask);
-    gl.depthFunc(tmpDepthFunc);
-  }
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object} skippedFeaturesHash Ids of features to skip.
- */
-ol.render.webgl.LineStringReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-  featureIndex = this.startIndices.length - 2;
-  end = start = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      featureStart = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid]) {
-        if (start !== end) {
-          this.drawElements(gl, context, start, end);
-          gl.clear(gl.DEPTH_BUFFER_BIT);
-        }
-        end = featureStart;
-      }
-      featureIndex--;
-      start = featureStart;
-    }
-    if (start !== end) {
-      this.drawElements(gl, context, start, end);
-      gl.clear(gl.DEPTH_BUFFER_BIT);
-    }
-    start = end = groupStart;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-    featureCallback, opt_hitExtent) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-  featureIndex = this.startIndices.length - 2;
-  end = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      start = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid] === undefined &&
-          feature.getGeometry() &&
-          (opt_hitExtent === undefined || ol.extent.intersects(
-              /** @type {Array<number>} */ (opt_hitExtent),
-              feature.getGeometry().getExtent()))) {
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        this.drawElements(gl, context, start, end);
-
-        var result = featureCallback(feature);
-
-        if (result) {
-          return result;
-        }
-
-      }
-      featureIndex--;
-      end = start;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {Array.<number>} color Color.
- * @param {number} lineWidth Line width.
- * @param {number} miterLimit Miter limit.
- */
-ol.render.webgl.LineStringReplay.prototype.setStrokeStyle_ = function(gl, color, lineWidth, miterLimit) {
-  gl.uniform4fv(this.defaultLocations_.u_color, color);
-  gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);
-  gl.uniform1f(this.defaultLocations_.u_miterLimit, miterLimit);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.LineStringReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var strokeStyleLineCap = strokeStyle.getLineCap();
-  this.state_.lineCap = strokeStyleLineCap !== undefined ?
-    strokeStyleLineCap : ol.render.webgl.defaultLineCap;
-  var strokeStyleLineDash = strokeStyle.getLineDash();
-  this.state_.lineDash = strokeStyleLineDash ?
-    strokeStyleLineDash : ol.render.webgl.defaultLineDash;
-  var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();
-  this.state_.lineDashOffset = strokeStyleLineDashOffset ?
-    strokeStyleLineDashOffset : ol.render.webgl.defaultLineDashOffset;
-  var strokeStyleLineJoin = strokeStyle.getLineJoin();
-  this.state_.lineJoin = strokeStyleLineJoin !== undefined ?
-    strokeStyleLineJoin : ol.render.webgl.defaultLineJoin;
-  var strokeStyleColor = strokeStyle.getColor();
-  if (!(strokeStyleColor instanceof CanvasGradient) &&
-      !(strokeStyleColor instanceof CanvasPattern)) {
-    strokeStyleColor = ol.color.asArray(strokeStyleColor).map(function(c, i) {
-      return i != 3 ? c / 255 : c;
-    }) || ol.render.webgl.defaultStrokeStyle;
-  } else {
-    strokeStyleColor = ol.render.webgl.defaultStrokeStyle;
-  }
-  var strokeStyleWidth = strokeStyle.getWidth();
-  strokeStyleWidth = strokeStyleWidth !== undefined ?
-    strokeStyleWidth : ol.render.webgl.defaultLineWidth;
-  var strokeStyleMiterLimit = strokeStyle.getMiterLimit();
-  strokeStyleMiterLimit = strokeStyleMiterLimit !== undefined ?
-    strokeStyleMiterLimit : ol.render.webgl.defaultMiterLimit;
-  if (!this.state_.strokeColor || !ol.array.equals(this.state_.strokeColor, strokeStyleColor) ||
-      this.state_.lineWidth !== strokeStyleWidth || this.state_.miterLimit !== strokeStyleMiterLimit) {
-    this.state_.changed = true;
-    this.state_.strokeColor = strokeStyleColor;
-    this.state_.lineWidth = strokeStyleWidth;
-    this.state_.miterLimit = strokeStyleMiterLimit;
-    this.styles_.push([strokeStyleColor, strokeStyleWidth, strokeStyleMiterLimit]);
-  }
-};
-
-/**
- * @enum {number}
- * @private
- */
-ol.render.webgl.LineStringReplay.Instruction_ = {
-  ROUND: 2,
-  BEGIN_LINE: 3,
-  END_LINE: 5,
-  BEGIN_LINE_CAP: 7,
-  END_LINE_CAP: 11,
-  BEVEL_FIRST: 13,
-  BEVEL_SECOND: 17,
-  MITER_BOTTOM: 19,
-  MITER_TOP: 23
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.polygonreplay.defaultshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.render.webgl.polygonreplay.defaultshader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n' :
-  'precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');
-
-ol.render.webgl.polygonreplay.defaultshader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  '\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n' :
-  'attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.render.webgl.polygonreplay.defaultshader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.render.webgl.polygonreplay.defaultshader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_projectionMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetScaleMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_offsetRotateMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_color = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_color' : 'e');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_opacity = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'a');
-};
-
-goog.provide('ol.structs.LinkedList');
-
-/**
- * Creates an empty linked list structure.
- *
- * @constructor
- * @struct
- * @param {boolean=} opt_circular The last item is connected to the first one,
- * and the first item to the last one. Default is true.
- */
-ol.structs.LinkedList = function(opt_circular) {
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.first_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.last_ = undefined;
-
-  /**
-   * @private
-   * @type {ol.LinkedListItem|undefined}
-   */
-  this.head_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.circular_ = opt_circular === undefined ? true : opt_circular;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.length_ = 0;
-};
-
-/**
- * Inserts an item into the linked list right after the current one.
- *
- * @param {?} data Item data.
- */
-ol.structs.LinkedList.prototype.insertItem = function(data) {
-
-  /** @type {ol.LinkedListItem} */
-  var item = {
-    prev: undefined,
-    next: undefined,
-    data: data
-  };
-
-  var head = this.head_;
-
-  //Initialize the list.
-  if (!head) {
-    this.first_ = item;
-    this.last_ = item;
-    if (this.circular_) {
-      item.next = item;
-      item.prev = item;
-    }
-  } else {
-    //Link the new item to the adjacent ones.
-    var next = head.next;
-    item.prev = head;
-    item.next = next;
-    head.next = item;
-    if (next) {
-      next.prev = item;
-    }
-
-    if (head === this.last_) {
-      this.last_ = item;
-    }
-  }
-  this.head_ = item;
-  this.length_++;
-};
-
-/**
- * Removes the current item from the list. Sets the cursor to the next item,
- * if possible.
- */
-ol.structs.LinkedList.prototype.removeItem = function() {
-  var head = this.head_;
-  if (head) {
-    var next = head.next;
-    var prev = head.prev;
-    if (next) {
-      next.prev = prev;
-    }
-    if (prev) {
-      prev.next = next;
-    }
-    this.head_ = next || prev;
-
-    if (this.first_ === this.last_) {
-      this.head_ = undefined;
-      this.first_ = undefined;
-      this.last_ = undefined;
-    } else if (this.first_ === head) {
-      this.first_ = this.head_;
-    } else if (this.last_ === head) {
-      this.last_ = prev ? this.head_.prev : this.head_;
-    }
-    this.length_--;
-  }
-};
-
-/**
- * Sets the cursor to the first item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.firstItem = function() {
-  this.head_ = this.first_;
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
-* Sets the cursor to the last item, and returns the associated data.
-*
-* @return {?} Item data.
-*/
-ol.structs.LinkedList.prototype.lastItem = function() {
-  this.head_ = this.last_;
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the cursor to the next item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.nextItem = function() {
-  if (this.head_ && this.head_.next) {
-    this.head_ = this.head_.next;
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the next item's data without moving the cursor.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getNextItem = function() {
-  if (this.head_ && this.head_.next) {
-    return this.head_.next.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the cursor to the previous item, and returns the associated data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.prevItem = function() {
-  if (this.head_ && this.head_.prev) {
-    this.head_ = this.head_.prev;
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the previous item's data without moving the cursor.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getPrevItem = function() {
-  if (this.head_ && this.head_.prev) {
-    return this.head_.prev.data;
-  }
-  return undefined;
-};
-
-/**
- * Returns the current item's data.
- *
- * @return {?} Item data.
- */
-ol.structs.LinkedList.prototype.getCurrItem = function() {
-  if (this.head_) {
-    return this.head_.data;
-  }
-  return undefined;
-};
-
-/**
- * Sets the first item of the list. This only works for circular lists, and sets
- * the last item accordingly.
- */
-ol.structs.LinkedList.prototype.setFirstItem = function() {
-  if (this.circular_ && this.head_) {
-    this.first_ = this.head_;
-    this.last_ = this.head_.prev;
-  }
-};
-
-/**
- * Concatenates two lists.
- * @param {ol.structs.LinkedList} list List to merge into the current list.
- */
-ol.structs.LinkedList.prototype.concat = function(list) {
-  if (list.head_) {
-    if (this.head_) {
-      var end = this.head_.next;
-      this.head_.next = list.first_;
-      list.first_.prev = this.head_;
-      end.prev = list.last_;
-      list.last_.next = end;
-      this.length_ += list.length_;
-    } else {
-      this.head_ = list.head_;
-      this.first_ = list.first_;
-      this.last_ = list.last_;
-      this.length_ = list.length_;
-    }
-    list.head_ = undefined;
-    list.first_ = undefined;
-    list.last_ = undefined;
-    list.length_ = 0;
-  }
-};
-
-/**
- * Returns the current length of the list.
- *
- * @return {number} Length.
- */
-ol.structs.LinkedList.prototype.getLength = function() {
-  return this.length_;
-};
-
-goog.provide('ol.render.webgl.PolygonReplay');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.color');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.geom.flat.contains');
-goog.require('ol.geom.flat.orient');
-goog.require('ol.geom.flat.transform');
-goog.require('ol.render.webgl.polygonreplay.defaultshader');
-goog.require('ol.render.webgl.polygonreplay.defaultshader.Locations');
-goog.require('ol.render.webgl.LineStringReplay');
-goog.require('ol.render.webgl.Replay');
-goog.require('ol.render.webgl');
-goog.require('ol.style.Stroke');
-goog.require('ol.structs.LinkedList');
-goog.require('ol.structs.RBush');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.render.webgl.Replay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.PolygonReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.Replay.call(this, tolerance, maxExtent);
-
-  this.lineStringReplay = new ol.render.webgl.LineStringReplay(
-      tolerance, maxExtent);
-
-  /**
-   * @private
-   * @type {ol.render.webgl.polygonreplay.defaultshader.Locations}
-   */
-  this.defaultLocations_ = null;
-
-  /**
-   * @private
-   * @type {Array.<Array.<number>>}
-   */
-  this.styles_ = [];
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.styleIndices_ = [];
-
-  /**
-   * @private
-   * @type {{fillColor: (Array.<number>|null),
-   *         changed: boolean}|null}
-   */
-  this.state_ = {
-    fillColor: null,
-    changed: false
-  };
-
-};
-ol.inherits(ol.render.webgl.PolygonReplay, ol.render.webgl.Replay);
-
-
-/**
- * Draw one polygon.
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {Array.<Array.<number>>} holeFlatCoordinates Hole flat coordinates.
- * @param {number} stride Stride.
- * @private
- */
-ol.render.webgl.PolygonReplay.prototype.drawCoordinates_ = function(
-    flatCoordinates, holeFlatCoordinates, stride) {
-  // Triangulate the polygon
-  var outerRing = new ol.structs.LinkedList();
-  var rtree = new ol.structs.RBush();
-  // Initialize the outer ring
-  this.processFlatCoordinates_(flatCoordinates, stride, outerRing, rtree, true);
-  var maxCoords = this.getMaxCoords_(outerRing);
-
-  // Eliminate holes, if there are any
-  if (holeFlatCoordinates.length) {
-    var i, ii;
-    var holeLists = [];
-    for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {
-      var holeList = {
-        list: new ol.structs.LinkedList(),
-        maxCoords: undefined,
-        rtree: new ol.structs.RBush()
-      };
-      holeLists.push(holeList);
-      this.processFlatCoordinates_(holeFlatCoordinates[i],
-          stride, holeList.list, holeList.rtree, false);
-      this.classifyPoints_(holeList.list, holeList.rtree, true);
-      holeList.maxCoords = this.getMaxCoords_(holeList.list);
-    }
-    holeLists.sort(function(a, b) {
-      return b.maxCoords[0] === a.maxCoords[0] ?
-        a.maxCoords[1] - b.maxCoords[1] : b.maxCoords[0] - a.maxCoords[0];
-    });
-    for (i = 0; i < holeLists.length; ++i) {
-      var currList = holeLists[i].list;
-      var start = currList.firstItem();
-      var currItem = start;
-      var intersection;
-      do {
-        //TODO: Triangulate holes when they intersect the outer ring.
-        if (this.getIntersections_(currItem, rtree).length) {
-          intersection = true;
-          break;
-        }
-        currItem = currList.nextItem();
-      } while (start !== currItem);
-      if (!intersection) {
-        if (this.bridgeHole_(currList, holeLists[i].maxCoords[0], outerRing, maxCoords[0], rtree)) {
-          rtree.concat(holeLists[i].rtree);
-          this.classifyPoints_(outerRing, rtree, false);
-        }
-      }
-    }
-  } else {
-    this.classifyPoints_(outerRing, rtree, false);
-  }
-  this.triangulate_(outerRing, rtree);
-};
-
-
-/**
- * Inserts flat coordinates in a linked list and adds them to the vertex buffer.
- * @private
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} stride Stride.
- * @param {ol.structs.LinkedList} list Linked list.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean} clockwise Coordinate order should be clockwise.
- */
-ol.render.webgl.PolygonReplay.prototype.processFlatCoordinates_ = function(
-    flatCoordinates, stride, list, rtree, clockwise) {
-  var isClockwise = ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates,
-      0, flatCoordinates.length, stride);
-  var i, ii;
-  var n = this.vertices.length / 2;
-  /** @type {ol.WebglPolygonVertex} */
-  var start;
-  /** @type {ol.WebglPolygonVertex} */
-  var p0;
-  /** @type {ol.WebglPolygonVertex} */
-  var p1;
-  var extents = [];
-  var segments = [];
-  if (clockwise === isClockwise) {
-    start = this.createPoint_(flatCoordinates[0], flatCoordinates[1], n++);
-    p0 = start;
-    for (i = stride, ii = flatCoordinates.length; i < ii; i += stride) {
-      p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);
-      segments.push(this.insertItem_(p0, p1, list));
-      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-        Math.max(p0.y, p1.y)]);
-      p0 = p1;
-    }
-    segments.push(this.insertItem_(p1, start, list));
-    extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-      Math.max(p0.y, p1.y)]);
-  } else {
-    var end = flatCoordinates.length - stride;
-    start = this.createPoint_(flatCoordinates[end], flatCoordinates[end + 1], n++);
-    p0 = start;
-    for (i = end - stride, ii = 0; i >= ii; i -= stride) {
-      p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);
-      segments.push(this.insertItem_(p0, p1, list));
-      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-        Math.max(p0.y, p1.y)]);
-      p0 = p1;
-    }
-    segments.push(this.insertItem_(p1, start, list));
-    extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),
-      Math.max(p0.y, p1.y)]);
-  }
-  rtree.load(extents, segments);
-};
-
-
-/**
- * Returns the rightmost coordinates of a polygon on the X axis.
- * @private
- * @param {ol.structs.LinkedList} list Polygons ring.
- * @return {Array.<number>} Max X coordinates.
- */
-ol.render.webgl.PolygonReplay.prototype.getMaxCoords_ = function(list) {
-  var start = list.firstItem();
-  var seg = start;
-  var maxCoords = [seg.p0.x, seg.p0.y];
-
-  do {
-    seg = list.nextItem();
-    if (seg.p0.x > maxCoords[0]) {
-      maxCoords = [seg.p0.x, seg.p0.y];
-    }
-  } while (seg !== start);
-
-  return maxCoords;
-};
-
-
-/**
- * Classifies the points of a polygon list as convex, reflex. Removes collinear vertices.
- * @private
- * @param {ol.structs.LinkedList} list Polygon ring.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean} ccw The orientation of the polygon is counter-clockwise.
- * @return {boolean} There were reclassified points.
- */
-ol.render.webgl.PolygonReplay.prototype.classifyPoints_ = function(list, rtree, ccw) {
-  var start = list.firstItem();
-  var s0 = start;
-  var s1 = list.nextItem();
-  var pointsReclassified = false;
-  do {
-    var reflex = ccw ? ol.render.webgl.triangleIsCounterClockwise(s1.p1.x,
-        s1.p1.y, s0.p1.x, s0.p1.y, s0.p0.x, s0.p0.y) :
-      ol.render.webgl.triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,
-          s0.p1.y, s1.p1.x, s1.p1.y);
-    if (reflex === undefined) {
-      this.removeItem_(s0, s1, list, rtree);
-      pointsReclassified = true;
-      if (s1 === start) {
-        start = list.getNextItem();
-      }
-      s1 = s0;
-      list.prevItem();
-    } else if (s0.p1.reflex !== reflex) {
-      s0.p1.reflex = reflex;
-      pointsReclassified = true;
-    }
-    s0 = s1;
-    s1 = list.nextItem();
-  } while (s0 !== start);
-  return pointsReclassified;
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} hole Linked list of the hole.
- * @param {number} holeMaxX Maximum X value of the hole.
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {number} listMaxX Maximum X value of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @return {boolean} Bridging was successful.
- */
-ol.render.webgl.PolygonReplay.prototype.bridgeHole_ = function(hole, holeMaxX,
-    list, listMaxX, rtree) {
-  var seg = hole.firstItem();
-  while (seg.p1.x !== holeMaxX) {
-    seg = hole.nextItem();
-  }
-
-  var p1 = seg.p1;
-  /** @type {ol.WebglPolygonVertex} */
-  var p2 = {x: listMaxX, y: p1.y, i: -1};
-  var minDist = Infinity;
-  var i, ii, bestPoint;
-  /** @type {ol.WebglPolygonVertex} */
-  var p5;
-
-  var intersectingSegments = this.getIntersections_({p0: p1, p1: p2}, rtree, true);
-  for (i = 0, ii = intersectingSegments.length; i < ii; ++i) {
-    var currSeg = intersectingSegments[i];
-    var intersection = this.calculateIntersection_(p1, p2, currSeg.p0,
-        currSeg.p1, true);
-    var dist = Math.abs(p1.x - intersection[0]);
-    if (dist < minDist && ol.render.webgl.triangleIsCounterClockwise(p1.x, p1.y,
-        currSeg.p0.x, currSeg.p0.y, currSeg.p1.x, currSeg.p1.y) !== undefined) {
-      minDist = dist;
-      p5 = {x: intersection[0], y: intersection[1], i: -1};
-      seg = currSeg;
-    }
-  }
-  if (minDist === Infinity) {
-    return false;
-  }
-  bestPoint = seg.p1;
-
-  if (minDist > 0) {
-    var pointsInTriangle = this.getPointsInTriangle_(p1, p5, seg.p1, rtree);
-    if (pointsInTriangle.length) {
-      var theta = Infinity;
-      for (i = 0, ii = pointsInTriangle.length; i < ii; ++i) {
-        var currPoint = pointsInTriangle[i];
-        var currTheta = Math.atan2(p1.y - currPoint.y, p2.x - currPoint.x);
-        if (currTheta < theta || (currTheta === theta && currPoint.x < bestPoint.x)) {
-          theta = currTheta;
-          bestPoint = currPoint;
-        }
-      }
-    }
-  }
-
-  seg = list.firstItem();
-  while (seg.p1.x !== bestPoint.x || seg.p1.y !== bestPoint.y) {
-    seg = list.nextItem();
-  }
-
-  //We clone the bridge points as they can have different convexity.
-  var p0Bridge = {x: p1.x, y: p1.y, i: p1.i, reflex: undefined};
-  var p1Bridge = {x: seg.p1.x, y: seg.p1.y, i: seg.p1.i, reflex: undefined};
-
-  hole.getNextItem().p0 = p0Bridge;
-  this.insertItem_(p1, seg.p1, hole, rtree);
-  this.insertItem_(p1Bridge, p0Bridge, hole, rtree);
-  seg.p1 = p1Bridge;
-  hole.setFirstItem();
-  list.concat(hole);
-
-  return true;
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- */
-ol.render.webgl.PolygonReplay.prototype.triangulate_ = function(list, rtree) {
-  var ccw = false;
-  var simple = this.isSimple_(list, rtree);
-
-  // Start clipping ears
-  while (list.getLength() > 3) {
-    if (simple) {
-      if (!this.clipEars_(list, rtree, simple, ccw)) {
-        if (!this.classifyPoints_(list, rtree, ccw)) {
-          // Due to the behavior of OL's PIP algorithm, the ear clipping cannot
-          // introduce touching segments. However, the original data may have some.
-          if (!this.resolveSelfIntersections_(list, rtree, true)) {
-            break;
-          }
-        }
-      }
-    } else {
-      if (!this.clipEars_(list, rtree, simple, ccw)) {
-        // We ran out of ears, try to reclassify.
-        if (!this.classifyPoints_(list, rtree, ccw)) {
-          // We have a bad polygon, try to resolve local self-intersections.
-          if (!this.resolveSelfIntersections_(list, rtree)) {
-            simple = this.isSimple_(list, rtree);
-            if (!simple) {
-              // We have a really bad polygon, try more time consuming methods.
-              this.splitPolygon_(list, rtree);
-              break;
-            } else {
-              ccw = !this.isClockwise_(list);
-              this.classifyPoints_(list, rtree, ccw);
-            }
-          }
-        }
-      }
-    }
-  }
-  if (list.getLength() === 3) {
-    var numIndices = this.indices.length;
-    this.indices[numIndices++] = list.getPrevItem().p0.i;
-    this.indices[numIndices++] = list.getCurrItem().p0.i;
-    this.indices[numIndices++] = list.getNextItem().p0.i;
-  }
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean} simple The polygon is simple.
- * @param {boolean} ccw Orientation of the polygon is counter-clockwise.
- * @return {boolean} There were processed ears.
- */
-ol.render.webgl.PolygonReplay.prototype.clipEars_ = function(list, rtree, simple, ccw) {
-  var numIndices = this.indices.length;
-  var start = list.firstItem();
-  var s0 = list.getPrevItem();
-  var s1 = start;
-  var s2 = list.nextItem();
-  var s3 = list.getNextItem();
-  var p0, p1, p2;
-  var processedEars = false;
-  do {
-    p0 = s1.p0;
-    p1 = s1.p1;
-    p2 = s2.p1;
-    if (p1.reflex === false) {
-      // We might have a valid ear
-      var variableCriterion;
-      if (simple) {
-        variableCriterion = this.getPointsInTriangle_(p0, p1, p2, rtree, true).length === 0;
-      } else {
-        variableCriterion = ccw ? this.diagonalIsInside_(s3.p1, p2, p1, p0,
-            s0.p0) : this.diagonalIsInside_(s0.p0, p0, p1, p2, s3.p1);
-      }
-      if ((simple || this.getIntersections_({p0: p0, p1: p2}, rtree).length === 0) &&
-          variableCriterion) {
-        //The diagonal is completely inside the polygon
-        if (simple || p0.reflex === false || p2.reflex === false ||
-            ol.geom.flat.orient.linearRingIsClockwise([s0.p0.x, s0.p0.y, p0.x,
-              p0.y, p1.x, p1.y, p2.x, p2.y, s3.p1.x, s3.p1.y], 0, 10, 2) === !ccw) {
-          //The diagonal is persumably valid, we have an ear
-          this.indices[numIndices++] = p0.i;
-          this.indices[numIndices++] = p1.i;
-          this.indices[numIndices++] = p2.i;
-          this.removeItem_(s1, s2, list, rtree);
-          if (s2 === start) {
-            start = s3;
-          }
-          processedEars = true;
-        }
-      }
-    }
-    // Else we have a reflex point.
-    s0 = list.getPrevItem();
-    s1 = list.getCurrItem();
-    s2 = list.nextItem();
-    s3 = list.getNextItem();
-  } while (s1 !== start && list.getLength() > 3);
-
-  return processedEars;
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean=} opt_touch Resolve touching segments.
- * @return {boolean} There were resolved intersections.
-*/
-ol.render.webgl.PolygonReplay.prototype.resolveSelfIntersections_ = function(
-    list, rtree, opt_touch) {
-  var start = list.firstItem();
-  list.nextItem();
-  var s0 = start;
-  var s1 = list.nextItem();
-  var resolvedIntersections = false;
-
-  do {
-    var intersection = this.calculateIntersection_(s0.p0, s0.p1, s1.p0, s1.p1,
-        opt_touch);
-    if (intersection) {
-      var breakCond = false;
-      var numVertices = this.vertices.length;
-      var numIndices = this.indices.length;
-      var n = numVertices / 2;
-      var seg = list.prevItem();
-      list.removeItem();
-      rtree.remove(seg);
-      breakCond = (seg === start);
-      var p;
-      if (opt_touch) {
-        if (intersection[0] === s0.p0.x && intersection[1] === s0.p0.y) {
-          list.prevItem();
-          p = s0.p0;
-          s1.p0 = p;
-          rtree.remove(s0);
-          breakCond = breakCond || (s0 === start);
-        } else {
-          p = s1.p1;
-          s0.p1 = p;
-          rtree.remove(s1);
-          breakCond = breakCond || (s1 === start);
-        }
-        list.removeItem();
-      } else {
-        p = this.createPoint_(intersection[0], intersection[1], n);
-        s0.p1 = p;
-        s1.p0 = p;
-        rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),
-          Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);
-        rtree.update([Math.min(s1.p0.x, s1.p1.x), Math.min(s1.p0.y, s1.p1.y),
-          Math.max(s1.p0.x, s1.p1.x), Math.max(s1.p0.y, s1.p1.y)], s1);
-      }
-
-      this.indices[numIndices++] = seg.p0.i;
-      this.indices[numIndices++] = seg.p1.i;
-      this.indices[numIndices++] = p.i;
-
-      resolvedIntersections = true;
-      if (breakCond) {
-        break;
-      }
-    }
-
-    s0 = list.getPrevItem();
-    s1 = list.nextItem();
-  } while (s0 !== start);
-  return resolvedIntersections;
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @return {boolean} The polygon is simple.
- */
-ol.render.webgl.PolygonReplay.prototype.isSimple_ = function(list, rtree) {
-  var start = list.firstItem();
-  var seg = start;
-  do {
-    if (this.getIntersections_(seg, rtree).length) {
-      return false;
-    }
-    seg = list.nextItem();
-  } while (seg !== start);
-  return true;
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @return {boolean} Orientation is clockwise.
- */
-ol.render.webgl.PolygonReplay.prototype.isClockwise_ = function(list) {
-  var length = list.getLength() * 2;
-  var flatCoordinates = new Array(length);
-  var start = list.firstItem();
-  var seg = start;
-  var i = 0;
-  do {
-    flatCoordinates[i++] = seg.p0.x;
-    flatCoordinates[i++] = seg.p0.y;
-    seg = list.nextItem();
-  } while (seg !== start);
-  return ol.geom.flat.orient.linearRingIsClockwise(flatCoordinates, 0, length, 2);
-};
-
-
-/**
- * @private
- * @param {ol.structs.LinkedList} list Linked list of the polygon.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- */
-ol.render.webgl.PolygonReplay.prototype.splitPolygon_ = function(list, rtree) {
-  var start = list.firstItem();
-  var s0 = start;
-  do {
-    var intersections = this.getIntersections_(s0, rtree);
-    if (intersections.length) {
-      var s1 = intersections[0];
-      var n = this.vertices.length / 2;
-      var intersection = this.calculateIntersection_(s0.p0,
-          s0.p1, s1.p0, s1.p1);
-      var p = this.createPoint_(intersection[0], intersection[1], n);
-      var newPolygon = new ol.structs.LinkedList();
-      var newRtree = new ol.structs.RBush();
-      this.insertItem_(p, s0.p1, newPolygon, newRtree);
-      s0.p1 = p;
-      rtree.update([Math.min(s0.p0.x, p.x), Math.min(s0.p0.y, p.y),
-        Math.max(s0.p0.x, p.x), Math.max(s0.p0.y, p.y)], s0);
-      var currItem = list.nextItem();
-      while (currItem !== s1) {
-        this.insertItem_(currItem.p0, currItem.p1, newPolygon, newRtree);
-        rtree.remove(currItem);
-        list.removeItem();
-        currItem = list.getCurrItem();
-      }
-      this.insertItem_(s1.p0, p, newPolygon, newRtree);
-      s1.p0 = p;
-      rtree.update([Math.min(s1.p1.x, p.x), Math.min(s1.p1.y, p.y),
-        Math.max(s1.p1.x, p.x), Math.max(s1.p1.y, p.y)], s1);
-      this.classifyPoints_(list, rtree, false);
-      this.triangulate_(list, rtree);
-      this.classifyPoints_(newPolygon, newRtree, false);
-      this.triangulate_(newPolygon, newRtree);
-      break;
-    }
-    s0 = list.nextItem();
-  } while (s0 !== start);
-};
-
-
-/**
- * @private
- * @param {number} x X coordinate.
- * @param {number} y Y coordinate.
- * @param {number} i Index.
- * @return {ol.WebglPolygonVertex} List item.
- */
-ol.render.webgl.PolygonReplay.prototype.createPoint_ = function(x, y, i) {
-  var numVertices = this.vertices.length;
-  this.vertices[numVertices++] = x;
-  this.vertices[numVertices++] = y;
-  /** @type {ol.WebglPolygonVertex} */
-  var p = {
-    x: x,
-    y: y,
-    i: i,
-    reflex: undefined
-  };
-  return p;
-};
-
-
-/**
- * @private
- * @param {ol.WebglPolygonVertex} p0 First point of segment.
- * @param {ol.WebglPolygonVertex} p1 Second point of segment.
- * @param {ol.structs.LinkedList} list Polygon ring.
- * @param {ol.structs.RBush=} opt_rtree Insert the segment into the R-Tree.
- * @return {ol.WebglPolygonSegment} segment.
- */
-ol.render.webgl.PolygonReplay.prototype.insertItem_ = function(p0, p1, list, opt_rtree) {
-  var seg = {
-    p0: p0,
-    p1: p1
-  };
-  list.insertItem(seg);
-  if (opt_rtree) {
-    opt_rtree.insert([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y),
-      Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)], seg);
-  }
-  return seg;
-};
-
-
-/**
-  * @private
-  * @param {ol.WebglPolygonSegment} s0 Segment before the remove candidate.
-  * @param {ol.WebglPolygonSegment} s1 Remove candidate segment.
-  * @param {ol.structs.LinkedList} list Polygon ring.
-  * @param {ol.structs.RBush} rtree R-Tree of the polygon.
-  */
-ol.render.webgl.PolygonReplay.prototype.removeItem_ = function(s0, s1, list, rtree) {
-  if (list.getCurrItem() === s1) {
-    list.removeItem();
-    s0.p1 = s1.p1;
-    rtree.remove(s1);
-    rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),
-      Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);
-  }
-};
-
-
-/**
- * @private
- * @param {ol.WebglPolygonVertex} p0 First point.
- * @param {ol.WebglPolygonVertex} p1 Second point.
- * @param {ol.WebglPolygonVertex} p2 Third point.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean=} opt_reflex Only include reflex points.
- * @return {Array.<ol.WebglPolygonVertex>} Points in the triangle.
- */
-ol.render.webgl.PolygonReplay.prototype.getPointsInTriangle_ = function(p0, p1,
-    p2, rtree, opt_reflex) {
-  var i, ii, j, p;
-  var result = [];
-  var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x, p2.x),
-    Math.min(p0.y, p1.y, p2.y), Math.max(p0.x, p1.x, p2.x), Math.max(p0.y,
-        p1.y, p2.y)]);
-  for (i = 0, ii = segmentsInExtent.length; i < ii; ++i) {
-    for (j in segmentsInExtent[i]) {
-      p = segmentsInExtent[i][j];
-      if (typeof p === 'object' && (!opt_reflex || p.reflex)) {
-        if ((p.x !== p0.x || p.y !== p0.y) && (p.x !== p1.x || p.y !== p1.y) &&
-            (p.x !== p2.x || p.y !== p2.y) && result.indexOf(p) === -1 &&
-            ol.geom.flat.contains.linearRingContainsXY([p0.x, p0.y, p1.x, p1.y,
-              p2.x, p2.y], 0, 6, 2, p.x, p.y)) {
-          result.push(p);
-        }
-      }
-    }
-  }
-  return result;
-};
-
-
-/**
- * @private
- * @param {ol.WebglPolygonSegment} segment Segment.
- * @param {ol.structs.RBush} rtree R-Tree of the polygon.
- * @param {boolean=} opt_touch Touching segments should be considered an intersection.
- * @return {Array.<ol.WebglPolygonSegment>} Intersecting segments.
- */
-ol.render.webgl.PolygonReplay.prototype.getIntersections_ = function(segment, rtree, opt_touch) {
-  var p0 = segment.p0;
-  var p1 = segment.p1;
-  var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x),
-    Math.min(p0.y, p1.y), Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)]);
-  var result = [];
-  var i, ii;
-  for (i = 0, ii = segmentsInExtent.length; i < ii; ++i) {
-    var currSeg = segmentsInExtent[i];
-    if (segment !== currSeg && (opt_touch || currSeg.p0 !== p1 || currSeg.p1 !== p0) &&
-        this.calculateIntersection_(p0, p1, currSeg.p0, currSeg.p1, opt_touch)) {
-      result.push(currSeg);
-    }
-  }
-  return result;
-};
-
-
-/**
- * Line intersection algorithm by Paul Bourke.
- * @see http://paulbourke.net/geometry/pointlineplane/
- *
- * @private
- * @param {ol.WebglPolygonVertex} p0 First point.
- * @param {ol.WebglPolygonVertex} p1 Second point.
- * @param {ol.WebglPolygonVertex} p2 Third point.
- * @param {ol.WebglPolygonVertex} p3 Fourth point.
- * @param {boolean=} opt_touch Touching segments should be considered an intersection.
- * @return {Array.<number>|undefined} Intersection coordinates.
- */
-ol.render.webgl.PolygonReplay.prototype.calculateIntersection_ = function(p0,
-    p1, p2, p3, opt_touch) {
-  var denom = (p3.y - p2.y) * (p1.x - p0.x) - (p3.x - p2.x) * (p1.y - p0.y);
-  if (denom !== 0) {
-    var ua = ((p3.x - p2.x) * (p0.y - p2.y) - (p3.y - p2.y) * (p0.x - p2.x)) / denom;
-    var ub = ((p1.x - p0.x) * (p0.y - p2.y) - (p1.y - p0.y) * (p0.x - p2.x)) / denom;
-    if ((!opt_touch && ua > ol.render.webgl.EPSILON && ua < 1 - ol.render.webgl.EPSILON &&
-        ub > ol.render.webgl.EPSILON && ub < 1 - ol.render.webgl.EPSILON) || (opt_touch &&
-        ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1)) {
-      return [p0.x + ua * (p1.x - p0.x), p0.y + ua * (p1.y - p0.y)];
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {ol.WebglPolygonVertex} p0 Point before the start of the diagonal.
- * @param {ol.WebglPolygonVertex} p1 Start point of the diagonal.
- * @param {ol.WebglPolygonVertex} p2 Ear candidate.
- * @param {ol.WebglPolygonVertex} p3 End point of the diagonal.
- * @param {ol.WebglPolygonVertex} p4 Point after the end of the diagonal.
- * @return {boolean} Diagonal is inside the polygon.
- */
-ol.render.webgl.PolygonReplay.prototype.diagonalIsInside_ = function(p0, p1, p2, p3, p4) {
-  if (p1.reflex === undefined || p3.reflex === undefined) {
-    return false;
-  }
-  var p1IsLeftOf = (p2.x - p3.x) * (p1.y - p3.y) > (p2.y - p3.y) * (p1.x - p3.x);
-  var p1IsRightOf = (p4.x - p3.x) * (p1.y - p3.y) < (p4.y - p3.y) * (p1.x - p3.x);
-  var p3IsLeftOf = (p0.x - p1.x) * (p3.y - p1.y) > (p0.y - p1.y) * (p3.x - p1.x);
-  var p3IsRightOf = (p2.x - p1.x) * (p3.y - p1.y) < (p2.y - p1.y) * (p3.x - p1.x);
-  var p1InCone = p3.reflex ? p1IsRightOf || p1IsLeftOf : p1IsRightOf && p1IsLeftOf;
-  var p3InCone = p1.reflex ? p3IsRightOf || p3IsLeftOf : p3IsRightOf && p3IsLeftOf;
-  return p1InCone && p3InCone;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {
-  var endss = multiPolygonGeometry.getEndss();
-  var stride = multiPolygonGeometry.getStride();
-  var currIndex = this.indices.length;
-  var currLineIndex = this.lineStringReplay.getCurrentIndex();
-  var flatCoordinates = multiPolygonGeometry.getFlatCoordinates();
-  var i, ii, j, jj;
-  var start = 0;
-  for (i = 0, ii = endss.length; i < ii; ++i) {
-    var ends = endss[i];
-    if (ends.length > 0) {
-      var outerRing = ol.geom.flat.transform.translate(flatCoordinates, start, ends[0],
-          stride, -this.origin[0], -this.origin[1]);
-      if (outerRing.length) {
-        var holes = [];
-        var holeFlatCoords;
-        for (j = 1, jj = ends.length; j < jj; ++j) {
-          if (ends[j] !== ends[j - 1]) {
-            holeFlatCoords = ol.geom.flat.transform.translate(flatCoordinates, ends[j - 1],
-                ends[j], stride, -this.origin[0], -this.origin[1]);
-            holes.push(holeFlatCoords);
-          }
-        }
-        this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);
-        this.drawCoordinates_(outerRing, holes, stride);
-      }
-    }
-    start = ends[ends.length - 1];
-  }
-  if (this.indices.length > currIndex) {
-    this.startIndices.push(currIndex);
-    this.startIndicesFeature.push(feature);
-    if (this.state_.changed) {
-      this.styleIndices_.push(currIndex);
-      this.state_.changed = false;
-    }
-  }
-  if (this.lineStringReplay.getCurrentIndex() > currLineIndex) {
-    this.lineStringReplay.setPolygonStyle(feature, currLineIndex);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.drawPolygon = function(polygonGeometry, feature) {
-  var ends = polygonGeometry.getEnds();
-  var stride = polygonGeometry.getStride();
-  if (ends.length > 0) {
-    var flatCoordinates = polygonGeometry.getFlatCoordinates().map(Number);
-    var outerRing = ol.geom.flat.transform.translate(flatCoordinates, 0, ends[0],
-        stride, -this.origin[0], -this.origin[1]);
-    if (outerRing.length) {
-      var holes = [];
-      var i, ii, holeFlatCoords;
-      for (i = 1, ii = ends.length; i < ii; ++i) {
-        if (ends[i] !== ends[i - 1]) {
-          holeFlatCoords = ol.geom.flat.transform.translate(flatCoordinates, ends[i - 1],
-              ends[i], stride, -this.origin[0], -this.origin[1]);
-          holes.push(holeFlatCoords);
-        }
-      }
-
-      this.startIndices.push(this.indices.length);
-      this.startIndicesFeature.push(feature);
-      if (this.state_.changed) {
-        this.styleIndices_.push(this.indices.length);
-        this.state_.changed = false;
-      }
-      this.lineStringReplay.setPolygonStyle(feature);
-
-      this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);
-      this.drawCoordinates_(outerRing, holes, stride);
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- **/
-ol.render.webgl.PolygonReplay.prototype.finish = function(context) {
-  // create, bind, and populate the vertices buffer
-  this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-  // create, bind, and populate the indices buffer
-  this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-  this.startIndices.push(this.indices.length);
-
-  this.lineStringReplay.finish(context);
-
-  //Clean up, if there is nothing to draw
-  if (this.styleIndices_.length === 0 && this.styles_.length > 0) {
-    this.styles_ = [];
-  }
-
-  this.vertices = null;
-  this.indices = null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.getDeleteResourcesFunction = function(context) {
-  var verticesBuffer = this.verticesBuffer;
-  var indicesBuffer = this.indicesBuffer;
-  var lineDeleter = this.lineStringReplay.getDeleteResourcesFunction(context);
-  return function() {
-    context.deleteBuffer(verticesBuffer);
-    context.deleteBuffer(indicesBuffer);
-    lineDeleter();
-  };
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.setUpProgram = function(gl, context, size, pixelRatio) {
-  // get the program
-  var fragmentShader, vertexShader;
-  fragmentShader = ol.render.webgl.polygonreplay.defaultshader.fragment;
-  vertexShader = ol.render.webgl.polygonreplay.defaultshader.vertex;
-  var program = context.getProgram(fragmentShader, vertexShader);
-
-  // get the locations
-  var locations;
-  if (!this.defaultLocations_) {
-    locations = new ol.render.webgl.polygonreplay.defaultshader.Locations(gl, program);
-    this.defaultLocations_ = locations;
-  } else {
-    locations = this.defaultLocations_;
-  }
-
-  context.useProgram(program);
-
-  // enable the vertex attrib arrays
-  gl.enableVertexAttribArray(locations.a_position);
-  gl.vertexAttribPointer(locations.a_position, 2, ol.webgl.FLOAT,
-      false, 8, 0);
-
-  return locations;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.shutDownProgram = function(gl, locations) {
-  gl.disableVertexAttribArray(locations.a_position);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {
-  //Save GL parameters.
-  var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));
-  var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));
-
-  if (!hitDetection) {
-    gl.enable(gl.DEPTH_TEST);
-    gl.depthMask(true);
-    gl.depthFunc(gl.NOTEQUAL);
-  }
-
-  if (!ol.obj.isEmpty(skippedFeaturesHash)) {
-    this.drawReplaySkipping_(gl, context, skippedFeaturesHash);
-  } else {
-    //Draw by style groups to minimize drawElements() calls.
-    var i, start, end, nextStyle;
-    end = this.startIndices[this.startIndices.length - 1];
-    for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-      start = this.styleIndices_[i];
-      nextStyle = this.styles_[i];
-      this.setFillStyle_(gl, nextStyle);
-      this.drawElements(gl, context, start, end);
-      end = start;
-    }
-  }
-  if (!hitDetection) {
-    gl.disable(gl.DEPTH_TEST);
-    gl.clear(gl.DEPTH_BUFFER_BIT);
-    //Restore GL parameters.
-    gl.depthMask(tmpDepthMask);
-    gl.depthFunc(tmpDepthFunc);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, skippedFeaturesHash,
-    featureCallback, opt_hitExtent) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex;
-  featureIndex = this.startIndices.length - 2;
-  end = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setFillStyle_(gl, nextStyle);
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      start = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid] === undefined &&
-          feature.getGeometry() &&
-          (opt_hitExtent === undefined || ol.extent.intersects(
-              /** @type {Array<number>} */ (opt_hitExtent),
-              feature.getGeometry().getExtent()))) {
-        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
-        this.drawElements(gl, context, start, end);
-
-        var result = featureCallback(feature);
-
-        if (result) {
-          return result;
-        }
-
-      }
-      featureIndex--;
-      end = start;
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {ol.webgl.Context} context Context.
- * @param {Object} skippedFeaturesHash Ids of features to skip.
- */
-ol.render.webgl.PolygonReplay.prototype.drawReplaySkipping_ = function(gl, context, skippedFeaturesHash) {
-  var i, start, end, nextStyle, groupStart, feature, featureUid, featureIndex, featureStart;
-  featureIndex = this.startIndices.length - 2;
-  end = start = this.startIndices[featureIndex + 1];
-  for (i = this.styleIndices_.length - 1; i >= 0; --i) {
-    nextStyle = this.styles_[i];
-    this.setFillStyle_(gl, nextStyle);
-    groupStart = this.styleIndices_[i];
-
-    while (featureIndex >= 0 &&
-        this.startIndices[featureIndex] >= groupStart) {
-      featureStart = this.startIndices[featureIndex];
-      feature = this.startIndicesFeature[featureIndex];
-      featureUid = ol.getUid(feature).toString();
-
-      if (skippedFeaturesHash[featureUid]) {
-        if (start !== end) {
-          this.drawElements(gl, context, start, end);
-          gl.clear(gl.DEPTH_BUFFER_BIT);
-        }
-        end = featureStart;
-      }
-      featureIndex--;
-      start = featureStart;
-    }
-    if (start !== end) {
-      this.drawElements(gl, context, start, end);
-      gl.clear(gl.DEPTH_BUFFER_BIT);
-    }
-    start = end = groupStart;
-  }
-};
-
-
-/**
- * @private
- * @param {WebGLRenderingContext} gl gl.
- * @param {Array.<number>} color Color.
- */
-ol.render.webgl.PolygonReplay.prototype.setFillStyle_ = function(gl, color) {
-  gl.uniform4fv(this.defaultLocations_.u_color, color);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.PolygonReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];
-  if (!(fillStyleColor instanceof CanvasGradient) &&
-      !(fillStyleColor instanceof CanvasPattern)) {
-    fillStyleColor = ol.color.asArray(fillStyleColor).map(function(c, i) {
-      return i != 3 ? c / 255 : c;
-    }) || ol.render.webgl.defaultFillStyle;
-  } else {
-    fillStyleColor = ol.render.webgl.defaultFillStyle;
-  }
-  if (!this.state_.fillColor || !ol.array.equals(fillStyleColor, this.state_.fillColor)) {
-    this.state_.fillColor = fillStyleColor;
-    this.state_.changed = true;
-    this.styles_.push(fillStyleColor);
-  }
-  //Provide a null stroke style, if no strokeStyle is provided. Required for the draw interaction to work.
-  if (strokeStyle) {
-    this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);
-  } else {
-    var nullStrokeStyle = new ol.style.Stroke({
-      color: [0, 0, 0, 0],
-      lineWidth: 0
-    });
-    this.lineStringReplay.setFillStrokeStyle(null, nullStrokeStyle);
-  }
-};
-
-goog.provide('ol.style.Atlas');
-
-goog.require('ol.dom');
-
-
-/**
- * This class facilitates the creation of image atlases.
- *
- * Images added to an atlas will be rendered onto a single
- * atlas canvas. The distribution of images on the canvas is
- * managed with the bin packing algorithm described in:
- * http://www.blackpawn.com/texts/lightmaps/
- *
- * @constructor
- * @struct
- * @param {number} size The size in pixels of the sprite image.
- * @param {number} space The space in pixels between images.
- *    Because texture coordinates are float values, the edges of
- *    images might not be completely correct (in a way that the
- *    edges overlap when being rendered). To avoid this we add a
- *    padding around each image.
- */
-ol.style.Atlas = function(size, space) {
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.space_ = space;
-
-  /**
-   * @private
-   * @type {Array.<ol.AtlasBlock>}
-   */
-  this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];
-
-  /**
-   * @private
-   * @type {Object.<string, ol.AtlasInfo>}
-   */
-  this.entries_ = {};
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.context_ = ol.dom.createCanvasContext2D(size, size);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = this.context_.canvas;
-};
-
-
-/**
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasInfo} The atlas info.
- */
-ol.style.Atlas.prototype.get = function(id) {
-  return this.entries_[id] || null;
-};
-
-
-/**
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback`.
- * @return {?ol.AtlasInfo} The position and atlas image for the entry.
- */
-ol.style.Atlas.prototype.add = function(id, width, height, renderCallback, opt_this) {
-  var block, i, ii;
-  for (i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {
-    block = this.emptyBlocks_[i];
-    if (block.width >= width + this.space_ &&
-        block.height >= height + this.space_) {
-      // we found a block that is big enough for our entry
-      var entry = {
-        offsetX: block.x + this.space_,
-        offsetY: block.y + this.space_,
-        image: this.canvas_
-      };
-      this.entries_[id] = entry;
-
-      // render the image on the atlas image
-      renderCallback.call(opt_this, this.context_,
-          block.x + this.space_, block.y + this.space_);
-
-      // split the block after the insertion, either horizontally or vertically
-      this.split_(i, block, width + this.space_, height + this.space_);
-
-      return entry;
-    }
-  }
-
-  // there is no space for the new entry in this atlas
-  return null;
-};
-
-
-/**
- * @private
- * @param {number} index The index of the block.
- * @param {ol.AtlasBlock} block The block to split.
- * @param {number} width The width of the entry to insert.
- * @param {number} height The height of the entry to insert.
- */
-ol.style.Atlas.prototype.split_ = function(index, block, width, height) {
-  var deltaWidth = block.width - width;
-  var deltaHeight = block.height - height;
-
-  /** @type {ol.AtlasBlock} */
-  var newBlock1;
-  /** @type {ol.AtlasBlock} */
-  var newBlock2;
-
-  if (deltaWidth > deltaHeight) {
-    // split vertically
-    // block right of the inserted entry
-    newBlock1 = {
-      x: block.x + width,
-      y: block.y,
-      width: block.width - width,
-      height: block.height
-    };
-
-    // block below the inserted entry
-    newBlock2 = {
-      x: block.x,
-      y: block.y + height,
-      width: width,
-      height: block.height - height
-    };
-    this.updateBlocks_(index, newBlock1, newBlock2);
-  } else {
-    // split horizontally
-    // block right of the inserted entry
-    newBlock1 = {
-      x: block.x + width,
-      y: block.y,
-      width: block.width - width,
-      height: height
-    };
-
-    // block below the inserted entry
-    newBlock2 = {
-      x: block.x,
-      y: block.y + height,
-      width: block.width,
-      height: block.height - height
-    };
-    this.updateBlocks_(index, newBlock1, newBlock2);
-  }
-};
-
-
-/**
- * Remove the old block and insert new blocks at the same array position.
- * The new blocks are inserted at the same position, so that splitted
- * blocks (that are potentially smaller) are filled first.
- * @private
- * @param {number} index The index of the block to remove.
- * @param {ol.AtlasBlock} newBlock1 The 1st block to add.
- * @param {ol.AtlasBlock} newBlock2 The 2nd block to add.
- */
-ol.style.Atlas.prototype.updateBlocks_ = function(index, newBlock1, newBlock2) {
-  var args = [index, 1];
-  if (newBlock1.width > 0 && newBlock1.height > 0) {
-    args.push(newBlock1);
-  }
-  if (newBlock2.width > 0 && newBlock2.height > 0) {
-    args.push(newBlock2);
-  }
-  this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);
-};
-
-goog.provide('ol.style.AtlasManager');
-
-goog.require('ol');
-goog.require('ol.style.Atlas');
-
-
-/**
- * Manages the creation of image atlases.
- *
- * Images added to this manager will be inserted into an atlas, which
- * will be used for rendering.
- * The `size` given in the constructor is the size for the first
- * atlas. After that, when new atlases are created, they will have
- * twice the size as the latest atlas (until `maxSize` is reached).
- *
- * If an application uses many images or very large images, it is recommended
- * to set a higher `size` value to avoid the creation of too many atlases.
- *
- * @constructor
- * @struct
- * @api
- * @param {olx.style.AtlasManagerOptions=} opt_options Options.
- */
-ol.style.AtlasManager = function(opt_options) {
-
-  var options = opt_options || {};
-
-  /**
-   * The size in pixels of the latest atlas image.
-   * @private
-   * @type {number}
-   */
-  this.currentSize_ = options.initialSize !== undefined ?
-    options.initialSize : ol.INITIAL_ATLAS_SIZE;
-
-  /**
-   * The maximum size in pixels of atlas images.
-   * @private
-   * @type {number}
-   */
-  this.maxSize_ = options.maxSize !== undefined ?
-    options.maxSize : ol.MAX_ATLAS_SIZE != -1 ?
-      ol.MAX_ATLAS_SIZE : ol.WEBGL_MAX_TEXTURE_SIZE !== undefined ?
-        ol.WEBGL_MAX_TEXTURE_SIZE : 2048;
-
-  /**
-   * The size in pixels between images.
-   * @private
-   * @type {number}
-   */
-  this.space_ = options.space !== undefined ? options.space : 1;
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Atlas>}
-   */
-  this.atlases_ = [new ol.style.Atlas(this.currentSize_, this.space_)];
-
-  /**
-   * The size in pixels of the latest atlas image for hit-detection images.
-   * @private
-   * @type {number}
-   */
-  this.currentHitSize_ = this.currentSize_;
-
-  /**
-   * @private
-   * @type {Array.<ol.style.Atlas>}
-   */
-  this.hitAtlases_ = [new ol.style.Atlas(this.currentHitSize_, this.space_)];
-};
-
-
-/**
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasManagerInfo} The position and atlas image for the
- *    entry, or `null` if the entry is not part of the atlas manager.
- */
-ol.style.AtlasManager.prototype.getInfo = function(id) {
-  /** @type {?ol.AtlasInfo} */
-  var info = this.getInfo_(this.atlases_, id);
-
-  if (!info) {
-    return null;
-  }
-  var hitInfo = /** @type {ol.AtlasInfo} */ (this.getInfo_(this.hitAtlases_, id));
-
-  return this.mergeInfos_(info, hitInfo);
-};
-
-
-/**
- * @private
- * @param {Array.<ol.style.Atlas>} atlases The atlases to search.
- * @param {string} id The identifier of the entry to check.
- * @return {?ol.AtlasInfo} The position and atlas image for the entry,
- *    or `null` if the entry is not part of the atlases.
- */
-ol.style.AtlasManager.prototype.getInfo_ = function(atlases, id) {
-  var atlas, info, i, ii;
-  for (i = 0, ii = atlases.length; i < ii; ++i) {
-    atlas = atlases[i];
-    info = atlas.get(id);
-    if (info) {
-      return info;
-    }
-  }
-  return null;
-};
-
-
-/**
- * @private
- * @param {ol.AtlasInfo} info The info for the real image.
- * @param {ol.AtlasInfo} hitInfo The info for the hit-detection
- *    image.
- * @return {?ol.AtlasManagerInfo} The position and atlas image for the
- *    entry, or `null` if the entry is not part of the atlases.
- */
-ol.style.AtlasManager.prototype.mergeInfos_ = function(info, hitInfo) {
-  return /** @type {ol.AtlasManagerInfo} */ ({
-    offsetX: info.offsetX,
-    offsetY: info.offsetY,
-    image: info.image,
-    hitImage: hitInfo.image
-  });
-};
-
-
-/**
- * Add an image to the atlas manager.
- *
- * If an entry for the given id already exists, the entry will
- * be overridden (but the space on the atlas graphic will not be freed).
- *
- * If `renderHitCallback` is provided, the image (or the hit-detection version
- * of the image) will be rendered into a separate hit-detection atlas image.
- *
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {function(CanvasRenderingContext2D, number, number)=}
- *    opt_renderHitCallback Called to render a hit-detection image onto a hit
- *    detection atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback` and `renderHitCallback`.
- * @return {?ol.AtlasManagerInfo}  The position and atlas image for the
- *    entry, or `null` if the image is too big.
- */
-ol.style.AtlasManager.prototype.add = function(id, width, height,
-    renderCallback, opt_renderHitCallback, opt_this) {
-  if (width + this.space_ > this.maxSize_ ||
-      height + this.space_ > this.maxSize_) {
-    return null;
-  }
-
-  /** @type {?ol.AtlasInfo} */
-  var info = this.add_(false,
-      id, width, height, renderCallback, opt_this);
-  if (!info) {
-    return null;
-  }
-
-  // even if no hit-detection entry is requested, we insert a fake entry into
-  // the hit-detection atlas, to make sure that the offset is the same for
-  // the original image and the hit-detection image.
-  var renderHitCallback = opt_renderHitCallback !== undefined ?
-    opt_renderHitCallback : ol.nullFunction;
-
-  var hitInfo = /** @type {ol.AtlasInfo} */ (this.add_(true,
-      id, width, height, renderHitCallback, opt_this));
-
-  return this.mergeInfos_(info, hitInfo);
-};
-
-
-/**
- * @private
- * @param {boolean} isHitAtlas If the hit-detection atlases are used.
- * @param {string} id The identifier of the entry to add.
- * @param {number} width The width.
- * @param {number} height The height.
- * @param {function(CanvasRenderingContext2D, number, number)} renderCallback
- *    Called to render the new image onto an atlas image.
- * @param {Object=} opt_this Value to use as `this` when executing
- *    `renderCallback` and `renderHitCallback`.
- * @return {?ol.AtlasInfo}  The position and atlas image for the entry,
- *    or `null` if the image is too big.
- */
-ol.style.AtlasManager.prototype.add_ = function(isHitAtlas, id, width, height,
-    renderCallback, opt_this) {
-  var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;
-  var atlas, info, i, ii;
-  for (i = 0, ii = atlases.length; i < ii; ++i) {
-    atlas = atlases[i];
-    info = atlas.add(id, width, height, renderCallback, opt_this);
-    if (info) {
-      return info;
-    } else if (!info && i === ii - 1) {
-      // the entry could not be added to one of the existing atlases,
-      // create a new atlas that is twice as big and try to add to this one.
-      var size;
-      if (isHitAtlas) {
-        size = Math.min(this.currentHitSize_ * 2, this.maxSize_);
-        this.currentHitSize_ = size;
-      } else {
-        size = Math.min(this.currentSize_ * 2, this.maxSize_);
-        this.currentSize_ = size;
-      }
-      atlas = new ol.style.Atlas(size, this.space_);
-      atlases.push(atlas);
-      // run the loop another time
-      ++ii;
-    }
-  }
-  return null;
-};
-
-goog.provide('ol.render.webgl.TextReplay');
-
-goog.require('ol');
-goog.require('ol.colorlike');
-goog.require('ol.dom');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.has');
-goog.require('ol.render.replay');
-goog.require('ol.render.webgl');
-goog.require('ol.render.webgl.TextureReplay');
-goog.require('ol.style.AtlasManager');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.render.webgl.TextureReplay}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @struct
- */
-ol.render.webgl.TextReplay = function(tolerance, maxExtent) {
-  ol.render.webgl.TextureReplay.call(this, tolerance, maxExtent);
-
-  /**
-   * @private
-   * @type {Array.<HTMLCanvasElement>}
-   */
-  this.images_ = [];
-
-  /**
-   * @private
-   * @type {Array.<WebGLTexture>}
-   */
-  this.textures_ = [];
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.measureCanvas_ = ol.dom.createCanvasContext2D(0, 0).canvas;
-
-  /**
-   * @private
-   * @type {{strokeColor: (ol.ColorLike|null),
-   *         lineCap: (string|undefined),
-   *         lineDash: Array.<number>,
-   *         lineDashOffset: (number|undefined),
-   *         lineJoin: (string|undefined),
-   *         lineWidth: number,
-   *         miterLimit: (number|undefined),
-   *         fillColor: (ol.ColorLike|null),
-   *         font: (string|undefined),
-   *         scale: (number|undefined)}}
-   */
-  this.state_ = {
-    strokeColor: null,
-    lineCap: undefined,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineJoin: undefined,
-    lineWidth: 0,
-    miterLimit: undefined,
-    fillColor: null,
-    font: undefined,
-    scale: undefined
-  };
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = '';
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.textAlign_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.textBaseline_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.offsetX_ = undefined;
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.offsetY_ = undefined;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.WebglGlyphAtlas>}
-   */
-  this.atlases_ = {};
-
-  /**
-   * @private
-   * @type {ol.WebglGlyphAtlas|undefined}
-   */
-  this.currAtlas_ = undefined;
-
-  this.scale = 1;
-
-  this.opacity = 1;
-
-};
-ol.inherits(ol.render.webgl.TextReplay, ol.render.webgl.TextureReplay);
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextReplay.prototype.drawText = function(geometry, feature) {
-  if (this.text_) {
-    var flatCoordinates = null;
-    var offset = 0;
-    var end = 2;
-    var stride = 2;
-    switch (geometry.getType()) {
-      case ol.geom.GeometryType.POINT:
-      case ol.geom.GeometryType.MULTI_POINT:
-        flatCoordinates = geometry.getFlatCoordinates();
-        end = flatCoordinates.length;
-        stride = geometry.getStride();
-        break;
-      case ol.geom.GeometryType.CIRCLE:
-        flatCoordinates = /** @type {ol.geom.Circle} */ (geometry).getCenter();
-        break;
-      case ol.geom.GeometryType.LINE_STRING:
-        flatCoordinates = /** @type {ol.geom.LineString} */ (geometry).getFlatMidpoint();
-        break;
-      case ol.geom.GeometryType.MULTI_LINE_STRING:
-        flatCoordinates = /** @type {ol.geom.MultiLineString} */ (geometry).getFlatMidpoints();
-        end = flatCoordinates.length;
-        break;
-      case ol.geom.GeometryType.POLYGON:
-        flatCoordinates = /** @type {ol.geom.Polygon} */ (geometry).getFlatInteriorPoint();
-        break;
-      case ol.geom.GeometryType.MULTI_POLYGON:
-        flatCoordinates = /** @type {ol.geom.MultiPolygon} */ (geometry).getFlatInteriorPoints();
-        end = flatCoordinates.length;
-        break;
-      default:
-    }
-    this.startIndices.push(this.indices.length);
-    this.startIndicesFeature.push(feature);
-
-    var glyphAtlas = this.currAtlas_;
-    var lines = this.text_.split('\n');
-    var textSize = this.getTextSize_(lines);
-    var i, ii, j, jj, currX, currY, charArr, charInfo;
-    var anchorX = Math.round(textSize[0] * this.textAlign_ - this.offsetX_);
-    var anchorY = Math.round(textSize[1] * this.textBaseline_ - this.offsetY_);
-    var lineWidth = (this.state_.lineWidth / 2) * this.state_.scale;
-
-    for (i = 0, ii = lines.length; i < ii; ++i) {
-      currX = 0;
-      currY = glyphAtlas.height * i;
-      charArr = lines[i].split('');
-
-      for (j = 0, jj = charArr.length; j < jj; ++j) {
-        charInfo = glyphAtlas.atlas.getInfo(charArr[j]);
-
-        if (charInfo) {
-          var image = charInfo.image;
-
-          this.anchorX = anchorX - currX;
-          this.anchorY = anchorY - currY;
-          this.originX = j === 0 ? charInfo.offsetX - lineWidth : charInfo.offsetX;
-          this.originY = charInfo.offsetY;
-          this.height = glyphAtlas.height;
-          this.width = j === 0 || j === charArr.length - 1 ?
-            glyphAtlas.width[charArr[j]] + lineWidth : glyphAtlas.width[charArr[j]];
-          this.imageHeight = image.height;
-          this.imageWidth = image.width;
-
-          var currentImage;
-          if (this.images_.length === 0) {
-            this.images_.push(image);
-          } else {
-            currentImage = this.images_[this.images_.length - 1];
-            if (ol.getUid(currentImage) != ol.getUid(image)) {
-              this.groupIndices.push(this.indices.length);
-              this.images_.push(image);
-            }
-          }
-
-          this.drawText_(flatCoordinates, offset, end, stride);
-        }
-        currX += this.width;
-      }
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {Array.<string>} lines Label to draw split to lines.
- * @return {Array.<number>} Size of the label in pixels.
- */
-ol.render.webgl.TextReplay.prototype.getTextSize_ = function(lines) {
-  var self = this;
-  var glyphAtlas = this.currAtlas_;
-  var textHeight = lines.length * glyphAtlas.height;
-  //Split every line to an array of chars, sum up their width, and select the longest.
-  var textWidth = lines.map(function(str) {
-    var sum = 0;
-    var i, ii;
-    for (i = 0, ii = str.length; i < ii; ++i) {
-      var curr = str[i];
-      if (!glyphAtlas.width[curr]) {
-        self.addCharToAtlas_(curr);
-      }
-      sum += glyphAtlas.width[curr] ? glyphAtlas.width[curr] : 0;
-    }
-    return sum;
-  }).reduce(function(max, curr) {
-    return Math.max(max, curr);
-  });
-
-  return [textWidth, textHeight];
-};
-
-
-/**
- * @private
- * @param {Array.<number>} flatCoordinates Flat coordinates.
- * @param {number} offset Offset.
- * @param {number} end End.
- * @param {number} stride Stride.
- */
-ol.render.webgl.TextReplay.prototype.drawText_ = function(flatCoordinates, offset,
-    end, stride) {
-  var i, ii;
-  for (i = offset, ii = end; i < ii; i += stride) {
-    this.drawCoordinates(flatCoordinates, offset, end, stride);
-  }
-};
-
-
-/**
- * @private
- * @param {string} char Character.
- */
-ol.render.webgl.TextReplay.prototype.addCharToAtlas_ = function(char) {
-  if (char.length === 1) {
-    var glyphAtlas = this.currAtlas_;
-    var state = this.state_;
-    var mCtx = this.measureCanvas_.getContext('2d');
-    mCtx.font = state.font;
-    var width = Math.ceil(mCtx.measureText(char).width * state.scale);
-
-    var info = glyphAtlas.atlas.add(char, width, glyphAtlas.height,
-        function(ctx, x, y) {
-          //Parameterize the canvas
-          ctx.font = /** @type {string} */ (state.font);
-          ctx.fillStyle = state.fillColor;
-          ctx.strokeStyle = state.strokeColor;
-          ctx.lineWidth = state.lineWidth;
-          ctx.lineCap = /*** @type {string} */ (state.lineCap);
-          ctx.lineJoin = /** @type {string} */ (state.lineJoin);
-          ctx.miterLimit = /** @type {number} */ (state.miterLimit);
-          ctx.textAlign = 'left';
-          ctx.textBaseline = 'top';
-          if (ol.has.CANVAS_LINE_DASH && state.lineDash) {
-            //FIXME: use pixelRatio
-            ctx.setLineDash(state.lineDash);
-            ctx.lineDashOffset = /** @type {number} */ (state.lineDashOffset);
-          }
-          if (state.scale !== 1) {
-            //FIXME: use pixelRatio
-            ctx.setTransform(/** @type {number} */ (state.scale), 0, 0,
-                /** @type {number} */ (state.scale), 0, 0);
-          }
-
-          //Draw the character on the canvas
-          if (state.strokeColor) {
-            ctx.strokeText(char, x, y);
-          }
-          if (state.fillColor) {
-            ctx.fillText(char, x, y);
-          }
-        });
-
-    if (info) {
-      glyphAtlas.width[char] = width;
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextReplay.prototype.finish = function(context) {
-  var gl = context.getGL();
-
-  this.groupIndices.push(this.indices.length);
-  this.hitDetectionGroupIndices = this.groupIndices;
-
-  // create, bind, and populate the vertices buffer
-  this.verticesBuffer = new ol.webgl.Buffer(this.vertices);
-
-  // create, bind, and populate the indices buffer
-  this.indicesBuffer = new ol.webgl.Buffer(this.indices);
-
-  // create textures
-  /** @type {Object.<string, WebGLTexture>} */
-  var texturePerImage = {};
-
-  this.createTextures(this.textures_, this.images_, texturePerImage, gl);
-
-  this.state_ = {
-    strokeColor: null,
-    lineCap: undefined,
-    lineDash: null,
-    lineDashOffset: undefined,
-    lineJoin: undefined,
-    lineWidth: 0,
-    miterLimit: undefined,
-    fillColor: null,
-    font: undefined,
-    scale: undefined
-  };
-  this.text_ = '';
-  this.textAlign_ = undefined;
-  this.textBaseline_ = undefined;
-  this.offsetX_ = undefined;
-  this.offsetY_ = undefined;
-  this.images_ = null;
-  this.atlases_ = {};
-  this.currAtlas_ = undefined;
-  ol.render.webgl.TextureReplay.prototype.finish.call(this, context);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextReplay.prototype.setTextStyle = function(textStyle) {
-  var state = this.state_;
-  var textFillStyle = textStyle.getFill();
-  var textStrokeStyle = textStyle.getStroke();
-  if (!textStyle || !textStyle.getText() || (!textFillStyle && !textStrokeStyle)) {
-    this.text_ = '';
-  } else {
-    if (!textFillStyle) {
-      state.fillColor = null;
-    } else {
-      var textFillStyleColor = textFillStyle.getColor();
-      state.fillColor = ol.colorlike.asColorLike(textFillStyleColor ?
-        textFillStyleColor : ol.render.webgl.defaultFillStyle);
-    }
-    if (!textStrokeStyle) {
-      state.strokeColor = null;
-      state.lineWidth = 0;
-    } else {
-      var textStrokeStyleColor = textStrokeStyle.getColor();
-      state.strokeColor = ol.colorlike.asColorLike(textStrokeStyleColor ?
-        textStrokeStyleColor : ol.render.webgl.defaultStrokeStyle);
-      state.lineWidth = textStrokeStyle.getWidth() || ol.render.webgl.defaultLineWidth;
-      state.lineCap = textStrokeStyle.getLineCap() || ol.render.webgl.defaultLineCap;
-      state.lineDashOffset = textStrokeStyle.getLineDashOffset() || ol.render.webgl.defaultLineDashOffset;
-      state.lineJoin = textStrokeStyle.getLineJoin() || ol.render.webgl.defaultLineJoin;
-      state.miterLimit = textStrokeStyle.getMiterLimit() || ol.render.webgl.defaultMiterLimit;
-      var lineDash = textStrokeStyle.getLineDash();
-      state.lineDash = lineDash ? lineDash.slice() : ol.render.webgl.defaultLineDash;
-    }
-    state.font = textStyle.getFont() || ol.render.webgl.defaultFont;
-    state.scale = textStyle.getScale() || 1;
-    this.text_ = /** @type {string} */ (textStyle.getText());
-    var textAlign = ol.render.replay.TEXT_ALIGN[textStyle.getTextAlign()];
-    var textBaseline = ol.render.replay.TEXT_ALIGN[textStyle.getTextBaseline()];
-    this.textAlign_ = textAlign === undefined ?
-      ol.render.webgl.defaultTextAlign : textAlign;
-    this.textBaseline_ = textBaseline === undefined ?
-      ol.render.webgl.defaultTextBaseline : textBaseline;
-    this.offsetX_ = textStyle.getOffsetX() || 0;
-    this.offsetY_ = textStyle.getOffsetY() || 0;
-    this.rotateWithView = !!textStyle.getRotateWithView();
-    this.rotation = textStyle.getRotation() || 0;
-
-    this.currAtlas_ = this.getAtlas_(state);
-  }
-};
-
-
-/**
- * @private
- * @param {Object} state Font attributes.
- * @return {ol.WebglGlyphAtlas} Glyph atlas.
- */
-ol.render.webgl.TextReplay.prototype.getAtlas_ = function(state) {
-  var params = [];
-  var i;
-  for (i in state) {
-    if (state[i] || state[i] === 0) {
-      if (Array.isArray(state[i])) {
-        params = params.concat(state[i]);
-      } else {
-        params.push(state[i]);
-      }
-    }
-  }
-  var hash = this.calculateHash_(params);
-  if (!this.atlases_[hash]) {
-    var mCtx = this.measureCanvas_.getContext('2d');
-    mCtx.font = state.font;
-    var height = Math.ceil((mCtx.measureText('M').width * 1.5 +
-        state.lineWidth / 2) * state.scale);
-
-    this.atlases_[hash] = {
-      atlas: new ol.style.AtlasManager({
-        space: state.lineWidth + 1
-      }),
-      width: {},
-      height: height
-    };
-  }
-  return this.atlases_[hash];
-};
-
-
-/**
- * @private
- * @param {Array.<string|number>} params Array of parameters.
- * @return {string} Hash string.
- */
-ol.render.webgl.TextReplay.prototype.calculateHash_ = function(params) {
-  //TODO: Create a more performant, reliable, general hash function.
-  var i, ii;
-  var hash = '';
-  for (i = 0, ii = params.length; i < ii; ++i) {
-    hash += params[i];
-  }
-  return hash;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextReplay.prototype.getTextures = function(opt_all) {
-  return this.textures_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.TextReplay.prototype.getHitDetectionTextures = function() {
-  return this.textures_;
-};
-
-goog.provide('ol.render.webgl.ReplayGroup');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.render.replay');
-goog.require('ol.render.ReplayGroup');
-goog.require('ol.render.webgl.CircleReplay');
-goog.require('ol.render.webgl.ImageReplay');
-goog.require('ol.render.webgl.LineStringReplay');
-goog.require('ol.render.webgl.PolygonReplay');
-goog.require('ol.render.webgl.TextReplay');
-
-
-/**
- * @constructor
- * @extends {ol.render.ReplayGroup}
- * @param {number} tolerance Tolerance.
- * @param {ol.Extent} maxExtent Max extent.
- * @param {number=} opt_renderBuffer Render buffer.
- * @struct
- */
-ol.render.webgl.ReplayGroup = function(tolerance, maxExtent, opt_renderBuffer) {
-  ol.render.ReplayGroup.call(this);
-
-  /**
-   * @type {ol.Extent}
-   * @private
-   */
-  this.maxExtent_ = maxExtent;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.tolerance_ = tolerance;
-
-  /**
-   * @type {number|undefined}
-   * @private
-   */
-  this.renderBuffer_ = opt_renderBuffer;
-
-  /**
-   * @private
-   * @type {!Object.<string,
-   *        Object.<ol.render.ReplayType, ol.render.webgl.Replay>>}
-   */
-  this.replaysByZIndex_ = {};
-
-};
-ol.inherits(ol.render.webgl.ReplayGroup, ol.render.ReplayGroup);
-
-
-/**
- * @param {ol.style.Style} style Style.
- * @param {boolean} group Group with previous replay.
- */
-ol.render.webgl.ReplayGroup.prototype.addDeclutter = function(style, group) {};
-
-
-/**
- * @param {ol.webgl.Context} context WebGL context.
- * @return {function()} Delete resources function.
- */
-ol.render.webgl.ReplayGroup.prototype.getDeleteResourcesFunction = function(context) {
-  var functions = [];
-  var zKey;
-  for (zKey in this.replaysByZIndex_) {
-    var replays = this.replaysByZIndex_[zKey];
-    var replayKey;
-    for (replayKey in replays) {
-      functions.push(
-          replays[replayKey].getDeleteResourcesFunction(context));
-    }
-  }
-  return function() {
-    var length = functions.length;
-    var result;
-    for (var i = 0; i < length; i++) {
-      result = functions[i].apply(this, arguments);
-    }
-    return result;
-  };
-};
-
-
-/**
- * @param {ol.webgl.Context} context Context.
- */
-ol.render.webgl.ReplayGroup.prototype.finish = function(context) {
-  var zKey;
-  for (zKey in this.replaysByZIndex_) {
-    var replays = this.replaysByZIndex_[zKey];
-    var replayKey;
-    for (replayKey in replays) {
-      replays[replayKey].finish(context);
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
-  var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';
-  var replays = this.replaysByZIndex_[zIndexKey];
-  if (replays === undefined) {
-    replays = {};
-    this.replaysByZIndex_[zIndexKey] = replays;
-  }
-  var replay = replays[replayType];
-  if (replay === undefined) {
-    /**
-     * @type {Function}
-     */
-    var Constructor = ol.render.webgl.ReplayGroup.BATCH_CONSTRUCTORS_[replayType];
-    replay = new Constructor(this.tolerance_, this.maxExtent_);
-    replays[replayType] = replay;
-  }
-  return replay;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.ReplayGroup.prototype.isEmpty = function() {
-  return ol.obj.isEmpty(this.replaysByZIndex_);
-};
-
-
-/**
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} opacity Global opacity.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- */
-ol.render.webgl.ReplayGroup.prototype.replay = function(context,
-    center, resolution, rotation, size, pixelRatio,
-    opacity, skippedFeaturesHash) {
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(ol.array.numberSafeCompareFunction);
-
-  var i, ii, j, jj, replays, replay;
-  for (i = 0, ii = zs.length; i < ii; ++i) {
-    replays = this.replaysByZIndex_[zs[i].toString()];
-    for (j = 0, jj = ol.render.replay.ORDER.length; j < jj; ++j) {
-      replay = replays[ol.render.replay.ORDER[j]];
-      if (replay !== undefined) {
-        replay.replay(context,
-            center, resolution, rotation, size, pixelRatio,
-            opacity, skippedFeaturesHash,
-            undefined, false);
-      }
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} opacity Global opacity.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
- * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
- * @param {ol.Extent=} opt_hitExtent Hit extent: Only features intersecting
- *  this extent are checked.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.ReplayGroup.prototype.replayHitDetection_ = function(context,
-    center, resolution, rotation, size, pixelRatio, opacity,
-    skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {
-  /** @type {Array.<number>} */
-  var zs = Object.keys(this.replaysByZIndex_).map(Number);
-  zs.sort(function(a, b) {
-    return b - a;
-  });
-
-  var i, ii, j, replays, replay, result;
-  for (i = 0, ii = zs.length; i < ii; ++i) {
-    replays = this.replaysByZIndex_[zs[i].toString()];
-    for (j = ol.render.replay.ORDER.length - 1; j >= 0; --j) {
-      replay = replays[ol.render.replay.ORDER[j]];
-      if (replay !== undefined) {
-        result = replay.replay(context,
-            center, resolution, rotation, size, pixelRatio, opacity,
-            skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent);
-        if (result) {
-          return result;
-        }
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} opacity Global opacity.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @param {function((ol.Feature|ol.render.Feature)): T|undefined} callback Feature callback.
- * @return {T|undefined} Callback result.
- * @template T
- */
-ol.render.webgl.ReplayGroup.prototype.forEachFeatureAtCoordinate = function(
-    coordinate, context, center, resolution, rotation, size, pixelRatio,
-    opacity, skippedFeaturesHash,
-    callback) {
-  var gl = context.getGL();
-  gl.bindFramebuffer(
-      gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());
-
-
-  /**
-   * @type {ol.Extent}
-   */
-  var hitExtent;
-  if (this.renderBuffer_ !== undefined) {
-    // build an extent around the coordinate, so that only features that
-    // intersect this extent are checked
-    hitExtent = ol.extent.buffer(
-        ol.extent.createOrUpdateFromCoordinate(coordinate),
-        resolution * this.renderBuffer_);
-  }
-
-  return this.replayHitDetection_(context,
-      coordinate, resolution, rotation, ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_,
-      pixelRatio, opacity, skippedFeaturesHash,
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {?} Callback result.
-       */
-      function(feature) {
-        var imageData = new Uint8Array(4);
-        gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-
-        if (imageData[3] > 0) {
-          var result = callback(feature);
-          if (result) {
-            return result;
-          }
-        }
-      }, true, hitExtent);
-};
-
-
-/**
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} opacity Global opacity.
- * @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
- *  to skip.
- * @return {boolean} Is there a feature at the given coordinate?
- */
-ol.render.webgl.ReplayGroup.prototype.hasFeatureAtCoordinate = function(
-    coordinate, context, center, resolution, rotation, size, pixelRatio,
-    opacity, skippedFeaturesHash) {
-  var gl = context.getGL();
-  gl.bindFramebuffer(
-      gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());
-
-  var hasFeature = this.replayHitDetection_(context,
-      coordinate, resolution, rotation, ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_,
-      pixelRatio, opacity, skippedFeaturesHash,
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {boolean} Is there a feature?
-       */
-      function(feature) {
-        var imageData = new Uint8Array(4);
-        gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-        return imageData[3] > 0;
-      }, false);
-
-  return hasFeature !== undefined;
-};
-
-/**
- * @const
- * @private
- * @type {Array.<number>}
- */
-ol.render.webgl.ReplayGroup.HIT_DETECTION_SIZE_ = [1, 1];
-
-/**
- * @const
- * @private
- * @type {Object.<ol.render.ReplayType,
- *                function(new: ol.render.webgl.Replay, number,
- *                ol.Extent)>}
- */
-ol.render.webgl.ReplayGroup.BATCH_CONSTRUCTORS_ = {
-  'Circle': ol.render.webgl.CircleReplay,
-  'Image': ol.render.webgl.ImageReplay,
-  'LineString': ol.render.webgl.LineStringReplay,
-  'Polygon': ol.render.webgl.PolygonReplay,
-  'Text': ol.render.webgl.TextReplay
-};
-
-goog.provide('ol.render.webgl.Immediate');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.geom.GeometryType');
-goog.require('ol.render.ReplayType');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.webgl.ReplayGroup');
-
-
-/**
- * @constructor
- * @extends {ol.render.VectorContext}
- * @param {ol.webgl.Context} context Context.
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} rotation Rotation.
- * @param {ol.Size} size Size.
- * @param {ol.Extent} extent Extent.
- * @param {number} pixelRatio Pixel ratio.
- * @struct
- */
-ol.render.webgl.Immediate = function(context, center, resolution, rotation, size, extent, pixelRatio) {
-  ol.render.VectorContext.call(this);
-
-  /**
-   * @private
-   */
-  this.context_ = context;
-
-  /**
-   * @private
-   */
-  this.center_ = center;
-
-  /**
-   * @private
-   */
-  this.extent_ = extent;
-
-  /**
-   * @private
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   */
-  this.size_ = size;
-
-  /**
-   * @private
-   */
-  this.rotation_ = rotation;
-
-  /**
-   * @private
-   */
-  this.resolution_ = resolution;
-
-  /**
-   * @private
-   * @type {ol.style.Image}
-   */
-  this.imageStyle_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.Fill}
-   */
-  this.fillStyle_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.Stroke}
-   */
-  this.strokeStyle_ = null;
-
-  /**
-   * @private
-   * @type {ol.style.Text}
-   */
-  this.textStyle_ = null;
-
-};
-ol.inherits(ol.render.webgl.Immediate, ol.render.VectorContext);
-
-
-/**
- * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
- * @param {ol.geom.Geometry|ol.render.Feature} geometry Geometry.
- * @private
- */
-ol.render.webgl.Immediate.prototype.drawText_ = function(replayGroup, geometry) {
-  var context = this.context_;
-  var replay = /** @type {ol.render.webgl.TextReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.TEXT));
-  replay.setTextStyle(this.textStyle_);
-  replay.drawText(geometry, null);
-  replay.finish(context);
-  // default colors
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-};
-
-
-/**
- * Set the rendering style.  Note that since this is an immediate rendering API,
- * any `zIndex` on the provided style will be ignored.
- *
- * @param {ol.style.Style} style The rendering style.
- * @override
- * @api
- */
-ol.render.webgl.Immediate.prototype.setStyle = function(style) {
-  this.setFillStrokeStyle(style.getFill(), style.getStroke());
-  this.setImageStyle(style.getImage());
-  this.setTextStyle(style.getText());
-};
-
-
-/**
- * Render a geometry into the canvas.  Call
- * {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style.
- *
- * @param {ol.geom.Geometry|ol.render.Feature} geometry The geometry to render.
- * @override
- * @api
- */
-ol.render.webgl.Immediate.prototype.drawGeometry = function(geometry) {
-  var type = geometry.getType();
-  switch (type) {
-    case ol.geom.GeometryType.POINT:
-      this.drawPoint(/** @type {ol.geom.Point} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.LINE_STRING:
-      this.drawLineString(/** @type {ol.geom.LineString} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.POLYGON:
-      this.drawPolygon(/** @type {ol.geom.Polygon} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.MULTI_POINT:
-      this.drawMultiPoint(/** @type {ol.geom.MultiPoint} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.MULTI_LINE_STRING:
-      this.drawMultiLineString(/** @type {ol.geom.MultiLineString} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.MULTI_POLYGON:
-      this.drawMultiPolygon(/** @type {ol.geom.MultiPolygon} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.GEOMETRY_COLLECTION:
-      this.drawGeometryCollection(/** @type {ol.geom.GeometryCollection} */ (geometry), null);
-      break;
-    case ol.geom.GeometryType.CIRCLE:
-      this.drawCircle(/** @type {ol.geom.Circle} */ (geometry), null);
-      break;
-    default:
-      // pass
-  }
-};
-
-
-/**
- * @inheritDoc
- * @api
- */
-ol.render.webgl.Immediate.prototype.drawFeature = function(feature, style) {
-  var geometry = style.getGeometryFunction()(feature);
-  if (!geometry ||
-      !ol.extent.intersects(this.extent_, geometry.getExtent())) {
-    return;
-  }
-  this.setStyle(style);
-  this.drawGeometry(geometry);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawGeometryCollection = function(geometry, data) {
-  var geometries = geometry.getGeometriesArray();
-  var i, ii;
-  for (i = 0, ii = geometries.length; i < ii; ++i) {
-    this.drawGeometry(geometries[i]);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawPoint = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.ImageReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
-  replay.setImageStyle(this.imageStyle_);
-  replay.drawPoint(geometry, data);
-  replay.finish(context);
-  // default colors
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawMultiPoint = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.ImageReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.IMAGE));
-  replay.setImageStyle(this.imageStyle_);
-  replay.drawMultiPoint(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawLineString = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
-  replay.setFillStrokeStyle(null, this.strokeStyle_);
-  replay.drawLineString(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawMultiLineString = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.LineStringReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.LINE_STRING));
-  replay.setFillStrokeStyle(null, this.strokeStyle_);
-  replay.drawMultiLineString(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawPolygon = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
-  replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-  replay.drawPolygon(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawMultiPolygon = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.PolygonReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.POLYGON));
-  replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-  replay.drawMultiPolygon(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.drawCircle = function(geometry, data) {
-  var context = this.context_;
-  var replayGroup = new ol.render.webgl.ReplayGroup(1, this.extent_);
-  var replay = /** @type {ol.render.webgl.CircleReplay} */ (
-    replayGroup.getReplay(0, ol.render.ReplayType.CIRCLE));
-  replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);
-  replay.drawCircle(geometry, data);
-  replay.finish(context);
-  var opacity = 1;
-  var skippedFeatures = {};
-  var featureCallback;
-  var oneByOne = false;
-  replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,
-      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,
-      oneByOne);
-  replay.getDeleteResourcesFunction(context)();
-
-  if (this.textStyle_) {
-    this.drawText_(replayGroup, geometry);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.setImageStyle = function(imageStyle) {
-  this.imageStyle_ = imageStyle;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
-  this.fillStyle_ = fillStyle;
-  this.strokeStyle_ = strokeStyle;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.render.webgl.Immediate.prototype.setTextStyle = function(textStyle) {
-  this.textStyle_ = textStyle;
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.renderer.webgl.defaultmapshader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.renderer.webgl.defaultmapshader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_texture, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  gl_FragColor.a = texColor.a * u_opacity;\n}\n' :
-  'precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}');
-
-ol.renderer.webgl.defaultmapshader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n' :
-  'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.renderer.webgl.defaultmapshader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.renderer.webgl.defaultmapshader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_texCoordMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_projectionMatrix = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_opacity = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_opacity' : 'f');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_texture = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_texture' : 'g');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
-
-  /**
-   * @type {number}
-   */
-  this.a_texCoord = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
-};
-
-goog.provide('ol.renderer.webgl.Layer');
-
-goog.require('ol');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.renderer.Layer');
-goog.require('ol.renderer.webgl.defaultmapshader');
-goog.require('ol.renderer.webgl.defaultmapshader.Locations');
-goog.require('ol.transform');
-goog.require('ol.vec.Mat4');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-goog.require('ol.webgl.Context');
-
-
-/**
- * @constructor
- * @abstract
- * @extends {ol.renderer.Layer}
- * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
- * @param {ol.layer.Layer} layer Layer.
- */
-ol.renderer.webgl.Layer = function(mapRenderer, layer) {
-
-  ol.renderer.Layer.call(this, layer);
-
-  /**
-   * @protected
-   * @type {ol.renderer.webgl.Map}
-   */
-  this.mapRenderer = mapRenderer;
-
-  /**
-   * @private
-   * @type {ol.webgl.Buffer}
-   */
-  this.arrayBuffer_ = new ol.webgl.Buffer([
-    -1, -1, 0, 0,
-    1, -1, 1, 0,
-    -1, 1, 0, 1,
-    1, 1, 1, 1
-  ]);
-
-  /**
-   * @protected
-   * @type {WebGLTexture}
-   */
-  this.texture = null;
-
-  /**
-   * @protected
-   * @type {WebGLFramebuffer}
-   */
-  this.framebuffer = null;
-
-  /**
-   * @protected
-   * @type {number|undefined}
-   */
-  this.framebufferDimension = undefined;
-
-  /**
-   * @protected
-   * @type {ol.Transform}
-   */
-  this.texCoordMatrix = ol.transform.create();
-
-  /**
-   * @protected
-   * @type {ol.Transform}
-   */
-  this.projectionMatrix = ol.transform.create();
-
-  /**
-   * @type {Array.<number>}
-   * @private
-   */
-  this.tmpMat4_ = ol.vec.Mat4.create();
-
-  /**
-   * @private
-   * @type {ol.renderer.webgl.defaultmapshader.Locations}
-   */
-  this.defaultLocations_ = null;
-
-};
-ol.inherits(ol.renderer.webgl.Layer, ol.renderer.Layer);
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {number} framebufferDimension Framebuffer dimension.
- * @protected
- */
-ol.renderer.webgl.Layer.prototype.bindFramebuffer = function(frameState, framebufferDimension) {
-
-  var gl = this.mapRenderer.getGL();
-
-  if (this.framebufferDimension === undefined ||
-      this.framebufferDimension != framebufferDimension) {
-    /**
-     * @param {WebGLRenderingContext} gl GL.
-     * @param {WebGLFramebuffer} framebuffer Framebuffer.
-     * @param {WebGLTexture} texture Texture.
-     */
-    var postRenderFunction = function(gl, framebuffer, texture) {
-      if (!gl.isContextLost()) {
-        gl.deleteFramebuffer(framebuffer);
-        gl.deleteTexture(texture);
-      }
-    }.bind(null, gl, this.framebuffer, this.texture);
-
-    frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-    );
-
-    var texture = ol.webgl.Context.createEmptyTexture(
-        gl, framebufferDimension, framebufferDimension);
-
-    var framebuffer = gl.createFramebuffer();
-    gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, framebuffer);
-    gl.framebufferTexture2D(ol.webgl.FRAMEBUFFER,
-        ol.webgl.COLOR_ATTACHMENT0, ol.webgl.TEXTURE_2D, texture, 0);
-
-    this.texture = texture;
-    this.framebuffer = framebuffer;
-    this.framebufferDimension = framebufferDimension;
-
-  } else {
-    gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, this.framebuffer);
-  }
-
-};
-
-
-/**
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {ol.webgl.Context} context Context.
- */
-ol.renderer.webgl.Layer.prototype.composeFrame = function(frameState, layerState, context) {
-
-  this.dispatchComposeEvent_(
-      ol.render.EventType.PRECOMPOSE, context, frameState);
-
-  context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.arrayBuffer_);
-
-  var gl = context.getGL();
-
-  var fragmentShader = ol.renderer.webgl.defaultmapshader.fragment;
-  var vertexShader = ol.renderer.webgl.defaultmapshader.vertex;
-
-  var program = context.getProgram(fragmentShader, vertexShader);
-
-  var locations;
-  if (!this.defaultLocations_) {
-    locations = new ol.renderer.webgl.defaultmapshader.Locations(gl, program);
-    this.defaultLocations_ = locations;
-  } else {
-    locations = this.defaultLocations_;
-  }
-
-  if (context.useProgram(program)) {
-    gl.enableVertexAttribArray(locations.a_position);
-    gl.vertexAttribPointer(
-        locations.a_position, 2, ol.webgl.FLOAT, false, 16, 0);
-    gl.enableVertexAttribArray(locations.a_texCoord);
-    gl.vertexAttribPointer(
-        locations.a_texCoord, 2, ol.webgl.FLOAT, false, 16, 8);
-    gl.uniform1i(locations.u_texture, 0);
-  }
-
-  gl.uniformMatrix4fv(locations.u_texCoordMatrix, false,
-      ol.vec.Mat4.fromTransform(this.tmpMat4_, this.getTexCoordMatrix()));
-  gl.uniformMatrix4fv(locations.u_projectionMatrix, false,
-      ol.vec.Mat4.fromTransform(this.tmpMat4_, this.getProjectionMatrix()));
-  gl.uniform1f(locations.u_opacity, layerState.opacity);
-  gl.bindTexture(ol.webgl.TEXTURE_2D, this.getTexture());
-  gl.drawArrays(ol.webgl.TRIANGLE_STRIP, 0, 4);
-
-  this.dispatchComposeEvent_(
-      ol.render.EventType.POSTCOMPOSE, context, frameState);
-
-};
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {ol.webgl.Context} context WebGL context.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.webgl.Layer.prototype.dispatchComposeEvent_ = function(type, context, frameState) {
-  var layer = this.getLayer();
-  if (layer.hasListener(type)) {
-    var viewState = frameState.viewState;
-    var resolution = viewState.resolution;
-    var pixelRatio = frameState.pixelRatio;
-    var extent = frameState.extent;
-    var center = viewState.center;
-    var rotation = viewState.rotation;
-    var size = frameState.size;
-
-    var render = new ol.render.webgl.Immediate(
-        context, center, resolution, rotation, size, extent, pixelRatio);
-    var composeEvent = new ol.render.Event(
-        type, render, frameState, null, context);
-    layer.dispatchEvent(composeEvent);
-  }
-};
-
-
-/**
- * @return {!ol.Transform} Matrix.
- */
-ol.renderer.webgl.Layer.prototype.getTexCoordMatrix = function() {
-  return this.texCoordMatrix;
-};
-
-
-/**
- * @return {WebGLTexture} Texture.
- */
-ol.renderer.webgl.Layer.prototype.getTexture = function() {
-  return this.texture;
-};
-
-
-/**
- * @return {!ol.Transform} Matrix.
- */
-ol.renderer.webgl.Layer.prototype.getProjectionMatrix = function() {
-  return this.projectionMatrix;
-};
-
-
-/**
- * Handle webglcontextlost.
- */
-ol.renderer.webgl.Layer.prototype.handleWebGLContextLost = function() {
-  this.texture = null;
-  this.framebuffer = null;
-  this.framebufferDimension = undefined;
-};
-
-
-/**
- * @abstract
- * @param {olx.FrameState} frameState Frame state.
- * @param {ol.LayerState} layerState Layer state.
- * @param {ol.webgl.Context} context Context.
- * @return {boolean} whether composeFrame should be called.
- */
-ol.renderer.webgl.Layer.prototype.prepareFrame = function(frameState, layerState, context) {};
-
-
-/**
- * @abstract
- * @param {ol.Pixel} pixel Pixel.
- * @param {olx.FrameState} frameState FrameState.
- * @param {function(this: S, ol.layer.Layer, (Uint8ClampedArray|Uint8Array)): T} callback Layer
- *     callback.
- * @param {S} thisArg Value to use as `this` when executing `callback`.
- * @return {T|undefined} Callback result.
- * @template S,T,U
- */
-ol.renderer.webgl.Layer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {};
-
-goog.provide('ol.renderer.webgl.ImageLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.ViewHint');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.functions');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.transform');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Context');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.webgl.Layer}
- * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
- * @param {ol.layer.Image} imageLayer Tile layer.
- * @api
- */
-ol.renderer.webgl.ImageLayer = function(mapRenderer, imageLayer) {
-
-  ol.renderer.webgl.Layer.call(this, mapRenderer, imageLayer);
-
-  /**
-   * The last rendered image.
-   * @private
-   * @type {?ol.ImageBase}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.hitCanvasContext_ = null;
-
-  /**
-   * @private
-   * @type {?ol.Transform}
-   */
-  this.hitTransformationMatrix_ = null;
-
-};
-ol.inherits(ol.renderer.webgl.ImageLayer, ol.renderer.webgl.Layer);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.webgl.ImageLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.WEBGL && layer.getType() === ol.LayerType.IMAGE;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.webgl.ImageLayer} The layer renderer.
- */
-ol.renderer.webgl.ImageLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.webgl.ImageLayer(
-      /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
-      /** @type {ol.layer.Image} */ (layer)
-  );
-};
-
-
-/**
- * @param {ol.ImageBase} image Image.
- * @private
- * @return {WebGLTexture} Texture.
- */
-ol.renderer.webgl.ImageLayer.prototype.createTexture_ = function(image) {
-
-  // We meet the conditions to work with non-power of two textures.
-  // http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support
-  // http://learningwebgl.com/blog/?p=2101
-
-  var imageElement = image.getImage();
-  var gl = this.mapRenderer.getGL();
-
-  return ol.webgl.Context.createTexture(
-      gl, imageElement, ol.webgl.CLAMP_TO_EDGE, ol.webgl.CLAMP_TO_EDGE);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.ImageLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  var layer = this.getLayer();
-  var source = layer.getSource();
-  var resolution = frameState.viewState.resolution;
-  var rotation = frameState.viewState.rotation;
-  var skippedFeatureUids = frameState.skippedFeatureUids;
-  return source.forEachFeatureAtCoordinate(
-      coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
-
-      /**
-       * @param {ol.Feature|ol.render.Feature} feature Feature.
-       * @return {?} Callback result.
-       */
-      function(feature) {
-        return callback.call(thisArg, feature, layer);
-      });
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.ImageLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-  var gl = this.mapRenderer.getGL();
-
-  var pixelRatio = frameState.pixelRatio;
-  var viewState = frameState.viewState;
-  var viewCenter = viewState.center;
-  var viewResolution = viewState.resolution;
-  var viewRotation = viewState.rotation;
-
-  var image = this.image_;
-  var texture = this.texture;
-  var imageLayer = /** @type {ol.layer.Image} */ (this.getLayer());
-  var imageSource = imageLayer.getSource();
-
-  var hints = frameState.viewHints;
-
-  var renderedExtent = frameState.extent;
-  if (layerState.extent !== undefined) {
-    renderedExtent = ol.extent.getIntersection(
-        renderedExtent, layerState.extent);
-  }
-  if (!hints[ol.ViewHint.ANIMATING] && !hints[ol.ViewHint.INTERACTING] &&
-      !ol.extent.isEmpty(renderedExtent)) {
-    var projection = viewState.projection;
-    if (!ol.ENABLE_RASTER_REPROJECTION) {
-      var sourceProjection = imageSource.getProjection();
-      if (sourceProjection) {
-        projection = sourceProjection;
-      }
-    }
-    var image_ = imageSource.getImage(renderedExtent, viewResolution,
-        pixelRatio, projection);
-    if (image_) {
-      var loaded = this.loadImage(image_);
-      if (loaded) {
-        image = image_;
-        texture = this.createTexture_(image_);
-        if (this.texture) {
-          /**
-           * @param {WebGLRenderingContext} gl GL.
-           * @param {WebGLTexture} texture Texture.
-           */
-          var postRenderFunction = function(gl, texture) {
-            if (!gl.isContextLost()) {
-              gl.deleteTexture(texture);
-            }
-          }.bind(null, gl, this.texture);
-          frameState.postRenderFunctions.push(
-              /** @type {ol.PostRenderFunction} */ (postRenderFunction)
-          );
-        }
-      }
-    }
-  }
-
-  if (image) {
-    var canvas = this.mapRenderer.getContext().getCanvas();
-
-    this.updateProjectionMatrix_(canvas.width, canvas.height,
-        pixelRatio, viewCenter, viewResolution, viewRotation,
-        image.getExtent());
-    this.hitTransformationMatrix_ = null;
-
-    // Translate and scale to flip the Y coord.
-    var texCoordMatrix = this.texCoordMatrix;
-    ol.transform.reset(texCoordMatrix);
-    ol.transform.scale(texCoordMatrix, 1, -1);
-    ol.transform.translate(texCoordMatrix, 0, -1);
-
-    this.image_ = image;
-    this.texture = texture;
-
-    this.updateLogos(frameState, imageSource);
-  }
-
-  return !!image;
-};
-
-
-/**
- * @param {number} canvasWidth Canvas width.
- * @param {number} canvasHeight Canvas height.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Coordinate} viewCenter View center.
- * @param {number} viewResolution View resolution.
- * @param {number} viewRotation View rotation.
- * @param {ol.Extent} imageExtent Image extent.
- * @private
- */
-ol.renderer.webgl.ImageLayer.prototype.updateProjectionMatrix_ = function(canvasWidth, canvasHeight, pixelRatio,
-    viewCenter, viewResolution, viewRotation, imageExtent) {
-
-  var canvasExtentWidth = canvasWidth * viewResolution;
-  var canvasExtentHeight = canvasHeight * viewResolution;
-
-  var projectionMatrix = this.projectionMatrix;
-  ol.transform.reset(projectionMatrix);
-  ol.transform.scale(projectionMatrix,
-      pixelRatio * 2 / canvasExtentWidth,
-      pixelRatio * 2 / canvasExtentHeight);
-  ol.transform.rotate(projectionMatrix, -viewRotation);
-  ol.transform.translate(projectionMatrix,
-      imageExtent[0] - viewCenter[0],
-      imageExtent[1] - viewCenter[1]);
-  ol.transform.scale(projectionMatrix,
-      (imageExtent[2] - imageExtent[0]) / 2,
-      (imageExtent[3] - imageExtent[1]) / 2);
-  ol.transform.translate(projectionMatrix, 1, 1);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.ImageLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
-  var hasFeature = this.forEachFeatureAtCoordinate(
-      coordinate, frameState, 0, ol.functions.TRUE, this);
-  return hasFeature !== undefined;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.ImageLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-  if (!this.image_ || !this.image_.getImage()) {
-    return undefined;
-  }
-
-  if (this.getLayer().getSource().forEachFeatureAtCoordinate !== ol.nullFunction) {
-    // for ImageCanvas sources use the original hit-detection logic,
-    // so that for example also transparent polygons are detected
-    var coordinate = ol.transform.apply(
-        frameState.pixelToCoordinateTransform, pixel.slice());
-    var hasFeature = this.forEachFeatureAtCoordinate(
-        coordinate, frameState, 0, ol.functions.TRUE, this);
-
-    if (hasFeature) {
-      return callback.call(thisArg, this.getLayer(), null);
-    } else {
-      return undefined;
-    }
-  } else {
-    var imageSize =
-        [this.image_.getImage().width, this.image_.getImage().height];
-
-    if (!this.hitTransformationMatrix_) {
-      this.hitTransformationMatrix_ = this.getHitTransformationMatrix_(
-          frameState.size, imageSize);
-    }
-
-    var pixelOnFrameBuffer = ol.transform.apply(
-        this.hitTransformationMatrix_, pixel.slice());
-
-    if (pixelOnFrameBuffer[0] < 0 || pixelOnFrameBuffer[0] > imageSize[0] ||
-        pixelOnFrameBuffer[1] < 0 || pixelOnFrameBuffer[1] > imageSize[1]) {
-      // outside the image, no need to check
-      return undefined;
-    }
-
-    if (!this.hitCanvasContext_) {
-      this.hitCanvasContext_ = ol.dom.createCanvasContext2D(1, 1);
-    }
-
-    this.hitCanvasContext_.clearRect(0, 0, 1, 1);
-    this.hitCanvasContext_.drawImage(this.image_.getImage(),
-        pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1, 0, 0, 1, 1);
-
-    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;
-    if (imageData[3] > 0) {
-      return callback.call(thisArg, this.getLayer(),  imageData);
-    } else {
-      return undefined;
-    }
-  }
-};
-
-
-/**
- * The transformation matrix to get the pixel on the image for a
- * pixel on the map.
- * @param {ol.Size} mapSize The map size.
- * @param {ol.Size} imageSize The image size.
- * @return {ol.Transform} The transformation matrix.
- * @private
- */
-ol.renderer.webgl.ImageLayer.prototype.getHitTransformationMatrix_ = function(mapSize, imageSize) {
-  // the first matrix takes a map pixel, flips the y-axis and scales to
-  // a range between -1 ... 1
-  var mapCoordTransform = ol.transform.create();
-  ol.transform.translate(mapCoordTransform, -1, -1);
-  ol.transform.scale(mapCoordTransform, 2 / mapSize[0], 2 / mapSize[1]);
-  ol.transform.translate(mapCoordTransform, 0, mapSize[1]);
-  ol.transform.scale(mapCoordTransform, 1, -1);
-
-  // the second matrix is the inverse of the projection matrix used in the
-  // shader for drawing
-  var projectionMatrixInv = ol.transform.invert(this.projectionMatrix.slice());
-
-  // the third matrix scales to the image dimensions and flips the y-axis again
-  var transform = ol.transform.create();
-  ol.transform.translate(transform, 0, imageSize[1]);
-  ol.transform.scale(transform, 1, -1);
-  ol.transform.scale(transform, imageSize[0] / 2, imageSize[1] / 2);
-  ol.transform.translate(transform, 1, 1);
-
-  ol.transform.multiply(transform, projectionMatrixInv);
-  ol.transform.multiply(transform, mapCoordTransform);
-
-  return transform;
-};
-
-// FIXME check against gl.getParameter(webgl.MAX_TEXTURE_SIZE)
-
-goog.provide('ol.renderer.webgl.Map');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.css');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.has');
-goog.require('ol.layer.Layer');
-goog.require('ol.render.Event');
-goog.require('ol.render.EventType');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.renderer.Map');
-goog.require('ol.renderer.Type');
-goog.require('ol.source.State');
-goog.require('ol.structs.LRUCache');
-goog.require('ol.structs.PriorityQueue');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Context');
-goog.require('ol.webgl.ContextEventType');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.Map}
- * @param {Element} container Container.
- * @param {ol.PluggableMap} map Map.
- * @api
- */
-ol.renderer.webgl.Map = function(container, map) {
-  ol.renderer.Map.call(this, container, map);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = /** @type {HTMLCanvasElement} */
-    (document.createElement('CANVAS'));
-  this.canvas_.style.width = '100%';
-  this.canvas_.style.height = '100%';
-  this.canvas_.style.display = 'block';
-  this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
-  container.insertBefore(this.canvas_, container.childNodes[0] || null);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.clipTileCanvasWidth_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.clipTileCanvasHeight_ = 0;
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.clipTileContext_ = ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderedVisible_ = true;
-
-  /**
-   * @private
-   * @type {WebGLRenderingContext}
-   */
-  this.gl_ = ol.webgl.getContext(this.canvas_, {
-    antialias: true,
-    depth: true,
-    failIfMajorPerformanceCaveat: true,
-    preserveDrawingBuffer: false,
-    stencil: true
-  });
-
-  /**
-   * @private
-   * @type {ol.webgl.Context}
-   */
-  this.context_ = new ol.webgl.Context(this.canvas_, this.gl_);
-
-  ol.events.listen(this.canvas_, ol.webgl.ContextEventType.LOST,
-      this.handleWebGLContextLost, this);
-  ol.events.listen(this.canvas_, ol.webgl.ContextEventType.RESTORED,
-      this.handleWebGLContextRestored, this);
-
-  /**
-   * @private
-   * @type {ol.structs.LRUCache.<ol.WebglTextureCacheEntry|null>}
-   */
-  this.textureCache_ = new ol.structs.LRUCache();
-
-  /**
-   * @private
-   * @type {ol.Coordinate}
-   */
-  this.focus_ = null;
-
-  /**
-   * @private
-   * @type {ol.structs.PriorityQueue.<Array>}
-   */
-  this.tileTextureQueue_ = new ol.structs.PriorityQueue(
-      /**
-       * @param {Array.<*>} element Element.
-       * @return {number} Priority.
-       * @this {ol.renderer.webgl.Map}
-       */
-      (function(element) {
-        var tileCenter = /** @type {ol.Coordinate} */ (element[1]);
-        var tileResolution = /** @type {number} */ (element[2]);
-        var deltaX = tileCenter[0] - this.focus_[0];
-        var deltaY = tileCenter[1] - this.focus_[1];
-        return 65536 * Math.log(tileResolution) +
-            Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;
-      }).bind(this),
-      /**
-       * @param {Array.<*>} element Element.
-       * @return {string} Key.
-       */
-      function(element) {
-        return /** @type {ol.Tile} */ (element[0]).getKey();
-      });
-
-
-  /**
-   * @param {ol.PluggableMap} map Map.
-   * @param {?olx.FrameState} frameState Frame state.
-   * @return {boolean} false.
-   * @this {ol.renderer.webgl.Map}
-   */
-  this.loadNextTileTexture_ =
-      function(map, frameState) {
-        if (!this.tileTextureQueue_.isEmpty()) {
-          this.tileTextureQueue_.reprioritize();
-          var element = this.tileTextureQueue_.dequeue();
-          var tile = /** @type {ol.Tile} */ (element[0]);
-          var tileSize = /** @type {ol.Size} */ (element[3]);
-          var tileGutter = /** @type {number} */ (element[4]);
-          this.bindTileTexture(
-              tile, tileSize, tileGutter, ol.webgl.LINEAR, ol.webgl.LINEAR);
-        }
-        return false;
-      }.bind(this);
-
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.textureCacheFrameMarkerCount_ = 0;
-
-  this.initializeGL_();
-};
-ol.inherits(ol.renderer.webgl.Map, ol.renderer.Map);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.webgl.Map['handles'] = function(type) {
-  return ol.has.WEBGL && type === ol.renderer.Type.WEBGL;
-};
-
-
-/**
- * Create the map renderer.
- * @param {Element} container Container.
- * @param {ol.PluggableMap} map Map.
- * @return {ol.renderer.webgl.Map} The map renderer.
- */
-ol.renderer.webgl.Map['create'] = function(container, map) {
-  return new ol.renderer.webgl.Map(container, map);
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @param {ol.Size} tileSize Tile size.
- * @param {number} tileGutter Tile gutter.
- * @param {number} magFilter Mag filter.
- * @param {number} minFilter Min filter.
- */
-ol.renderer.webgl.Map.prototype.bindTileTexture = function(tile, tileSize, tileGutter, magFilter, minFilter) {
-  var gl = this.getGL();
-  var tileKey = tile.getKey();
-  if (this.textureCache_.containsKey(tileKey)) {
-    var textureCacheEntry = this.textureCache_.get(tileKey);
-    gl.bindTexture(ol.webgl.TEXTURE_2D, textureCacheEntry.texture);
-    if (textureCacheEntry.magFilter != magFilter) {
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MAG_FILTER, magFilter);
-      textureCacheEntry.magFilter = magFilter;
-    }
-    if (textureCacheEntry.minFilter != minFilter) {
-      gl.texParameteri(
-          ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MIN_FILTER, minFilter);
-      textureCacheEntry.minFilter = minFilter;
-    }
-  } else {
-    var texture = gl.createTexture();
-    gl.bindTexture(ol.webgl.TEXTURE_2D, texture);
-    if (tileGutter > 0) {
-      var clipTileCanvas = this.clipTileContext_.canvas;
-      var clipTileContext = this.clipTileContext_;
-      if (this.clipTileCanvasWidth_ !== tileSize[0] ||
-          this.clipTileCanvasHeight_ !== tileSize[1]) {
-        clipTileCanvas.width = tileSize[0];
-        clipTileCanvas.height = tileSize[1];
-        this.clipTileCanvasWidth_ = tileSize[0];
-        this.clipTileCanvasHeight_ = tileSize[1];
-      } else {
-        clipTileContext.clearRect(0, 0, tileSize[0], tileSize[1]);
-      }
-      clipTileContext.drawImage(tile.getImage(), tileGutter, tileGutter,
-          tileSize[0], tileSize[1], 0, 0, tileSize[0], tileSize[1]);
-      gl.texImage2D(ol.webgl.TEXTURE_2D, 0,
-          ol.webgl.RGBA, ol.webgl.RGBA,
-          ol.webgl.UNSIGNED_BYTE, clipTileCanvas);
-    } else {
-      gl.texImage2D(ol.webgl.TEXTURE_2D, 0,
-          ol.webgl.RGBA, ol.webgl.RGBA,
-          ol.webgl.UNSIGNED_BYTE, tile.getImage());
-    }
-    gl.texParameteri(
-        ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MAG_FILTER, magFilter);
-    gl.texParameteri(
-        ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_MIN_FILTER, minFilter);
-    gl.texParameteri(ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_S,
-        ol.webgl.CLAMP_TO_EDGE);
-    gl.texParameteri(ol.webgl.TEXTURE_2D, ol.webgl.TEXTURE_WRAP_T,
-        ol.webgl.CLAMP_TO_EDGE);
-    this.textureCache_.set(tileKey, {
-      texture: texture,
-      magFilter: magFilter,
-      minFilter: minFilter
-    });
-  }
-};
-
-
-/**
- * @param {ol.render.EventType} type Event type.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.webgl.Map.prototype.dispatchComposeEvent_ = function(type, frameState) {
-  var map = this.getMap();
-  if (map.hasListener(type)) {
-    var context = this.context_;
-
-    var extent = frameState.extent;
-    var size = frameState.size;
-    var viewState = frameState.viewState;
-    var pixelRatio = frameState.pixelRatio;
-
-    var resolution = viewState.resolution;
-    var center = viewState.center;
-    var rotation = viewState.rotation;
-
-    var vectorContext = new ol.render.webgl.Immediate(context,
-        center, resolution, rotation, size, extent, pixelRatio);
-    var composeEvent = new ol.render.Event(type, vectorContext,
-        frameState, null, context);
-    map.dispatchEvent(composeEvent);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.disposeInternal = function() {
-  var gl = this.getGL();
-  if (!gl.isContextLost()) {
-    this.textureCache_.forEach(
-        /**
-         * @param {?ol.WebglTextureCacheEntry} textureCacheEntry
-         *     Texture cache entry.
-         */
-        function(textureCacheEntry) {
-          if (textureCacheEntry) {
-            gl.deleteTexture(textureCacheEntry.texture);
-          }
-        });
-  }
-  this.context_.dispose();
-  ol.renderer.Map.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @param {ol.PluggableMap} map Map.
- * @param {olx.FrameState} frameState Frame state.
- * @private
- */
-ol.renderer.webgl.Map.prototype.expireCache_ = function(map, frameState) {
-  var gl = this.getGL();
-  var textureCacheEntry;
-  while (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
-      ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
-    textureCacheEntry = this.textureCache_.peekLast();
-    if (!textureCacheEntry) {
-      if (+this.textureCache_.peekLastKey() == frameState.index) {
-        break;
-      } else {
-        --this.textureCacheFrameMarkerCount_;
-      }
-    } else {
-      gl.deleteTexture(textureCacheEntry.texture);
-    }
-    this.textureCache_.pop();
-  }
-};
-
-
-/**
- * @return {ol.webgl.Context} The context.
- */
-ol.renderer.webgl.Map.prototype.getContext = function() {
-  return this.context_;
-};
-
-
-/**
- * @return {WebGLRenderingContext} GL.
- */
-ol.renderer.webgl.Map.prototype.getGL = function() {
-  return this.gl_;
-};
-
-
-/**
- * @return {ol.structs.PriorityQueue.<Array>} Tile texture queue.
- */
-ol.renderer.webgl.Map.prototype.getTileTextureQueue = function() {
-  return this.tileTextureQueue_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.getType = function() {
-  return ol.renderer.Type.WEBGL;
-};
-
-
-/**
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.renderer.webgl.Map.prototype.handleWebGLContextLost = function(event) {
-  event.preventDefault();
-  this.textureCache_.clear();
-  this.textureCacheFrameMarkerCount_ = 0;
-
-  var renderers = this.getLayerRenderers();
-  for (var id in renderers) {
-    var renderer = /** @type {ol.renderer.webgl.Layer} */ (renderers[id]);
-    renderer.handleWebGLContextLost();
-  }
-};
-
-
-/**
- * @protected
- */
-ol.renderer.webgl.Map.prototype.handleWebGLContextRestored = function() {
-  this.initializeGL_();
-  this.getMap().render();
-};
-
-
-/**
- * @private
- */
-ol.renderer.webgl.Map.prototype.initializeGL_ = function() {
-  var gl = this.gl_;
-  gl.activeTexture(ol.webgl.TEXTURE0);
-  gl.blendFuncSeparate(
-      ol.webgl.SRC_ALPHA, ol.webgl.ONE_MINUS_SRC_ALPHA,
-      ol.webgl.ONE, ol.webgl.ONE_MINUS_SRC_ALPHA);
-  gl.disable(ol.webgl.CULL_FACE);
-  gl.disable(ol.webgl.DEPTH_TEST);
-  gl.disable(ol.webgl.SCISSOR_TEST);
-  gl.disable(ol.webgl.STENCIL_TEST);
-};
-
-
-/**
- * @param {ol.Tile} tile Tile.
- * @return {boolean} Is tile texture loaded.
- */
-ol.renderer.webgl.Map.prototype.isTileTextureLoaded = function(tile) {
-  return this.textureCache_.containsKey(tile.getKey());
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
-
-  var context = this.getContext();
-  var gl = this.getGL();
-
-  if (gl.isContextLost()) {
-    return false;
-  }
-
-  if (!frameState) {
-    if (this.renderedVisible_) {
-      this.canvas_.style.display = 'none';
-      this.renderedVisible_ = false;
-    }
-    return false;
-  }
-
-  this.focus_ = frameState.focus;
-
-  this.textureCache_.set((-frameState.index).toString(), null);
-  ++this.textureCacheFrameMarkerCount_;
-
-  this.dispatchComposeEvent_(ol.render.EventType.PRECOMPOSE, frameState);
-
-  /** @type {Array.<ol.LayerState>} */
-  var layerStatesToDraw = [];
-  var layerStatesArray = frameState.layerStatesArray;
-  ol.array.stableSort(layerStatesArray, ol.renderer.Map.sortByZIndex);
-
-  var viewResolution = frameState.viewState.resolution;
-  var i, ii, layerRenderer, layerState;
-  for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    layerState = layerStatesArray[i];
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewResolution) &&
-        layerState.sourceState == ol.source.State.READY) {
-      layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layerState.layer));
-      if (layerRenderer.prepareFrame(frameState, layerState, context)) {
-        layerStatesToDraw.push(layerState);
-      }
-    }
-  }
-
-  var width = frameState.size[0] * frameState.pixelRatio;
-  var height = frameState.size[1] * frameState.pixelRatio;
-  if (this.canvas_.width != width || this.canvas_.height != height) {
-    this.canvas_.width = width;
-    this.canvas_.height = height;
-  }
-
-  gl.bindFramebuffer(ol.webgl.FRAMEBUFFER, null);
-
-  gl.clearColor(0, 0, 0, 0);
-  gl.clear(ol.webgl.COLOR_BUFFER_BIT);
-  gl.enable(ol.webgl.BLEND);
-  gl.viewport(0, 0, this.canvas_.width, this.canvas_.height);
-
-  for (i = 0, ii = layerStatesToDraw.length; i < ii; ++i) {
-    layerState = layerStatesToDraw[i];
-    layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layerState.layer));
-    layerRenderer.composeFrame(frameState, layerState, context);
-  }
-
-  if (!this.renderedVisible_) {
-    this.canvas_.style.display = '';
-    this.renderedVisible_ = true;
-  }
-
-  this.calculateMatrices2D(frameState);
-
-  if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >
-      ol.WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {
-    frameState.postRenderFunctions.push(
-        /** @type {ol.PostRenderFunction} */ (this.expireCache_.bind(this))
-    );
-  }
-
-  if (!this.tileTextureQueue_.isEmpty()) {
-    frameState.postRenderFunctions.push(this.loadNextTileTexture_);
-    frameState.animate = true;
-  }
-
-  this.dispatchComposeEvent_(ol.render.EventType.POSTCOMPOSE, frameState);
-
-  this.scheduleRemoveUnusedLayerRenderers(frameState);
-  this.scheduleExpireIconCache(frameState);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg,
-    layerFilter, thisArg2) {
-  var result;
-
-  if (this.getGL().isContextLost()) {
-    return false;
-  }
-
-  var viewState = frameState.viewState;
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-        layerFilter.call(thisArg2, layer)) {
-      var layerRenderer = this.getLayerRenderer(layer);
-      result = layerRenderer.forEachFeatureAtCoordinate(
-          coordinate, frameState, hitTolerance, callback, thisArg);
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.hasFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, layerFilter, thisArg) {
-  var hasFeature = false;
-
-  if (this.getGL().isContextLost()) {
-    return false;
-  }
-
-  var viewState = frameState.viewState;
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-        layerFilter.call(thisArg, layer)) {
-      var layerRenderer = this.getLayerRenderer(layer);
-      hasFeature =
-          layerRenderer.hasFeatureAtCoordinate(coordinate, frameState);
-      if (hasFeature) {
-        return true;
-      }
-    }
-  }
-  return hasFeature;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.Map.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg,
-    layerFilter, thisArg2) {
-  if (this.getGL().isContextLost()) {
-    return false;
-  }
-
-  var viewState = frameState.viewState;
-  var result;
-
-  var layerStates = frameState.layerStatesArray;
-  var numLayers = layerStates.length;
-  var i;
-  for (i = numLayers - 1; i >= 0; --i) {
-    var layerState = layerStates[i];
-    var layer = layerState.layer;
-    if (ol.layer.Layer.visibleAtResolution(layerState, viewState.resolution) &&
-        layerFilter.call(thisArg, layer)) {
-      var layerRenderer = /** @type {ol.renderer.webgl.Layer} */ (this.getLayerRenderer(layer));
-      result = layerRenderer.forEachLayerAtPixel(
-          pixel, frameState, callback, thisArg);
-      if (result) {
-        return result;
-      }
-    }
-  }
-  return undefined;
-};
-
-// This file is automatically generated, do not edit
-goog.provide('ol.renderer.webgl.tilelayershader');
-
-goog.require('ol');
-goog.require('ol.webgl.Fragment');
-goog.require('ol.webgl.Vertex');
-
-
-ol.renderer.webgl.tilelayershader.fragment = new ol.webgl.Fragment(ol.DEBUG_WEBGL ?
-  'precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n' :
-  'precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}');
-
-ol.renderer.webgl.tilelayershader.vertex = new ol.webgl.Vertex(ol.DEBUG_WEBGL ?
-  'varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n  v_texCoord = a_texCoord;\n}\n\n\n' :
-  'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}');
-
-// This file is automatically generated, do not edit
-goog.provide('ol.renderer.webgl.tilelayershader.Locations');
-
-goog.require('ol');
-
-
-/**
- * @constructor
- * @param {WebGLRenderingContext} gl GL.
- * @param {WebGLProgram} program Program.
- * @struct
- */
-ol.renderer.webgl.tilelayershader.Locations = function(gl, program) {
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_tileOffset = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_tileOffset' : 'd');
-
-  /**
-   * @type {WebGLUniformLocation}
-   */
-  this.u_texture = gl.getUniformLocation(
-      program, ol.DEBUG_WEBGL ? 'u_texture' : 'e');
-
-  /**
-   * @type {number}
-   */
-  this.a_position = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_position' : 'b');
-
-  /**
-   * @type {number}
-   */
-  this.a_texCoord = gl.getAttribLocation(
-      program, ol.DEBUG_WEBGL ? 'a_texCoord' : 'c');
-};
-
-// FIXME large resolutions lead to too large framebuffers :-(
-// FIXME animated shaders! check in redraw
-
-goog.provide('ol.renderer.webgl.TileLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.TileRange');
-goog.require('ol.TileState');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.renderer.webgl.tilelayershader');
-goog.require('ol.renderer.webgl.tilelayershader.Locations');
-goog.require('ol.size');
-goog.require('ol.transform');
-goog.require('ol.webgl');
-goog.require('ol.webgl.Buffer');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.webgl.Layer}
- * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
- * @param {ol.layer.Tile} tileLayer Tile layer.
- * @api
- */
-ol.renderer.webgl.TileLayer = function(mapRenderer, tileLayer) {
-
-  ol.renderer.webgl.Layer.call(this, mapRenderer, tileLayer);
-
-  /**
-   * @private
-   * @type {ol.webgl.Fragment}
-   */
-  this.fragmentShader_ = ol.renderer.webgl.tilelayershader.fragment;
-
-  /**
-   * @private
-   * @type {ol.webgl.Vertex}
-   */
-  this.vertexShader_ = ol.renderer.webgl.tilelayershader.vertex;
-
-  /**
-   * @private
-   * @type {ol.renderer.webgl.tilelayershader.Locations}
-   */
-  this.locations_ = null;
-
-  /**
-   * @private
-   * @type {ol.webgl.Buffer}
-   */
-  this.renderArrayBuffer_ = new ol.webgl.Buffer([
-    0, 0, 0, 1,
-    1, 0, 1, 1,
-    0, 1, 0, 0,
-    1, 1, 1, 0
-  ]);
-
-  /**
-   * @private
-   * @type {ol.TileRange}
-   */
-  this.renderedTileRange_ = null;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedFramebufferExtent_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tmpSize_ = [0, 0];
-
-};
-ol.inherits(ol.renderer.webgl.TileLayer, ol.renderer.webgl.Layer);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.webgl.TileLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.WEBGL && layer.getType() === ol.LayerType.TILE;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.webgl.TileLayer} The layer renderer.
- */
-ol.renderer.webgl.TileLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.webgl.TileLayer(
-      /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
-      /** @type {ol.layer.Tile} */ (layer)
-  );
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.TileLayer.prototype.disposeInternal = function() {
-  var context = this.mapRenderer.getContext();
-  context.deleteBuffer(this.renderArrayBuffer_);
-  ol.renderer.webgl.Layer.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.TileLayer.prototype.createLoadedTileFinder = function(source, projection, tiles) {
-  var mapRenderer = this.mapRenderer;
-
-  return (
-    /**
-     * @param {number} zoom Zoom level.
-     * @param {ol.TileRange} tileRange Tile range.
-     * @return {boolean} The tile range is fully loaded.
-     */
-    function(zoom, tileRange) {
-      function callback(tile) {
-        var loaded = mapRenderer.isTileTextureLoaded(tile);
-        if (loaded) {
-          if (!tiles[zoom]) {
-            tiles[zoom] = {};
-          }
-          tiles[zoom][tile.tileCoord.toString()] = tile;
-        }
-        return loaded;
-      }
-      return source.forEachLoadedTile(projection, zoom, tileRange, callback);
-    });
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.TileLayer.prototype.handleWebGLContextLost = function() {
-  ol.renderer.webgl.Layer.prototype.handleWebGLContextLost.call(this);
-  this.locations_ = null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-  var mapRenderer = this.mapRenderer;
-  var gl = context.getGL();
-
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-
-  var tileLayer = /** @type {ol.layer.Tile} */ (this.getLayer());
-  var tileSource = tileLayer.getSource();
-  var tileGrid = tileSource.getTileGridForProjection(projection);
-  var z = tileGrid.getZForResolution(viewState.resolution);
-  var tileResolution = tileGrid.getResolution(z);
-
-  var tilePixelSize =
-      tileSource.getTilePixelSize(z, frameState.pixelRatio, projection);
-  var pixelRatio = tilePixelSize[0] /
-      ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize_)[0];
-  var tilePixelResolution = tileResolution / pixelRatio;
-  var tileGutter = tileSource.getTilePixelRatio(pixelRatio) * tileSource.getGutter(projection);
-
-  var center = viewState.center;
-  var extent = frameState.extent;
-  var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);
-
-  var framebufferExtent;
-  if (this.renderedTileRange_ &&
-      this.renderedTileRange_.equals(tileRange) &&
-      this.renderedRevision_ == tileSource.getRevision()) {
-    framebufferExtent = this.renderedFramebufferExtent_;
-  } else {
-
-    var tileRangeSize = tileRange.getSize();
-
-    var maxDimension = Math.max(
-        tileRangeSize[0] * tilePixelSize[0],
-        tileRangeSize[1] * tilePixelSize[1]);
-    var framebufferDimension = ol.math.roundUpToPowerOfTwo(maxDimension);
-    var framebufferExtentDimension = tilePixelResolution * framebufferDimension;
-    var origin = tileGrid.getOrigin(z);
-    var minX = origin[0] +
-        tileRange.minX * tilePixelSize[0] * tilePixelResolution;
-    var minY = origin[1] +
-        tileRange.minY * tilePixelSize[1] * tilePixelResolution;
-    framebufferExtent = [
-      minX, minY,
-      minX + framebufferExtentDimension, minY + framebufferExtentDimension
-    ];
-
-    this.bindFramebuffer(frameState, framebufferDimension);
-    gl.viewport(0, 0, framebufferDimension, framebufferDimension);
-
-    gl.clearColor(0, 0, 0, 0);
-    gl.clear(ol.webgl.COLOR_BUFFER_BIT);
-    gl.disable(ol.webgl.BLEND);
-
-    var program = context.getProgram(this.fragmentShader_, this.vertexShader_);
-    context.useProgram(program);
-    if (!this.locations_) {
-      this.locations_ = new ol.renderer.webgl.tilelayershader.Locations(gl, program);
-    }
-
-    context.bindBuffer(ol.webgl.ARRAY_BUFFER, this.renderArrayBuffer_);
-    gl.enableVertexAttribArray(this.locations_.a_position);
-    gl.vertexAttribPointer(
-        this.locations_.a_position, 2, ol.webgl.FLOAT, false, 16, 0);
-    gl.enableVertexAttribArray(this.locations_.a_texCoord);
-    gl.vertexAttribPointer(
-        this.locations_.a_texCoord, 2, ol.webgl.FLOAT, false, 16, 8);
-    gl.uniform1i(this.locations_.u_texture, 0);
-
-    /**
-     * @type {Object.<number, Object.<string, ol.Tile>>}
-     */
-    var tilesToDrawByZ = {};
-    tilesToDrawByZ[z] = {};
-
-    var findLoadedTiles = this.createLoadedTileFinder(
-        tileSource, projection, tilesToDrawByZ);
-
-    var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();
-    var allTilesLoaded = true;
-    var tmpExtent = ol.extent.createEmpty();
-    var tmpTileRange = new ol.TileRange(0, 0, 0, 0);
-    var childTileRange, drawable, fullyLoaded, tile, tileState;
-    var x, y, tileExtent;
-    for (x = tileRange.minX; x <= tileRange.maxX; ++x) {
-      for (y = tileRange.minY; y <= tileRange.maxY; ++y) {
-
-        tile = tileSource.getTile(z, x, y, pixelRatio, projection);
-        if (layerState.extent !== undefined) {
-          // ignore tiles outside layer extent
-          tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);
-          if (!ol.extent.intersects(tileExtent, layerState.extent)) {
-            continue;
-          }
-        }
-        tileState = tile.getState();
-        drawable = tileState == ol.TileState.LOADED ||
-            tileState == ol.TileState.EMPTY ||
-            tileState == ol.TileState.ERROR && !useInterimTilesOnError;
-        if (!drawable) {
-          tile = tile.getInterimTile();
-        }
-        tileState = tile.getState();
-        if (tileState == ol.TileState.LOADED) {
-          if (mapRenderer.isTileTextureLoaded(tile)) {
-            tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
-            continue;
-          }
-        } else if (tileState == ol.TileState.EMPTY ||
-                   (tileState == ol.TileState.ERROR &&
-                    !useInterimTilesOnError)) {
-          continue;
-        }
-
-        allTilesLoaded = false;
-        fullyLoaded = tileGrid.forEachTileCoordParentTileRange(
-            tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);
-        if (!fullyLoaded) {
-          childTileRange = tileGrid.getTileCoordChildTileRange(
-              tile.tileCoord, tmpTileRange, tmpExtent);
-          if (childTileRange) {
-            findLoadedTiles(z + 1, childTileRange);
-          }
-        }
-
-      }
-
-    }
-
-    /** @type {Array.<number>} */
-    var zs = Object.keys(tilesToDrawByZ).map(Number);
-    zs.sort(ol.array.numberSafeCompareFunction);
-    var u_tileOffset = new Float32Array(4);
-    var i, ii, tileKey, tilesToDraw;
-    for (i = 0, ii = zs.length; i < ii; ++i) {
-      tilesToDraw = tilesToDrawByZ[zs[i]];
-      for (tileKey in tilesToDraw) {
-        tile = tilesToDraw[tileKey];
-        tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);
-        u_tileOffset[0] = 2 * (tileExtent[2] - tileExtent[0]) /
-            framebufferExtentDimension;
-        u_tileOffset[1] = 2 * (tileExtent[3] - tileExtent[1]) /
-            framebufferExtentDimension;
-        u_tileOffset[2] = 2 * (tileExtent[0] - framebufferExtent[0]) /
-            framebufferExtentDimension - 1;
-        u_tileOffset[3] = 2 * (tileExtent[1] - framebufferExtent[1]) /
-            framebufferExtentDimension - 1;
-        gl.uniform4fv(this.locations_.u_tileOffset, u_tileOffset);
-        mapRenderer.bindTileTexture(tile, tilePixelSize,
-            tileGutter * pixelRatio, ol.webgl.LINEAR, ol.webgl.LINEAR);
-        gl.drawArrays(ol.webgl.TRIANGLE_STRIP, 0, 4);
-      }
-    }
-
-    if (allTilesLoaded) {
-      this.renderedTileRange_ = tileRange;
-      this.renderedFramebufferExtent_ = framebufferExtent;
-      this.renderedRevision_ = tileSource.getRevision();
-    } else {
-      this.renderedTileRange_ = null;
-      this.renderedFramebufferExtent_ = null;
-      this.renderedRevision_ = -1;
-      frameState.animate = true;
-    }
-
-  }
-
-  this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);
-  var tileTextureQueue = mapRenderer.getTileTextureQueue();
-  this.manageTilePyramid(
-      frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,
-      tileLayer.getPreload(),
-      /**
-       * @param {ol.Tile} tile Tile.
-       */
-      function(tile) {
-        if (tile.getState() == ol.TileState.LOADED &&
-            !mapRenderer.isTileTextureLoaded(tile) &&
-            !tileTextureQueue.isKeyQueued(tile.getKey())) {
-          tileTextureQueue.enqueue([
-            tile,
-            tileGrid.getTileCoordCenter(tile.tileCoord),
-            tileGrid.getResolution(tile.tileCoord[0]),
-            tilePixelSize, tileGutter * pixelRatio
-          ]);
-        }
-      }, this);
-  this.scheduleExpireCache(frameState, tileSource);
-  this.updateLogos(frameState, tileSource);
-
-  var texCoordMatrix = this.texCoordMatrix;
-  ol.transform.reset(texCoordMatrix);
-  ol.transform.translate(texCoordMatrix,
-      (Math.round(center[0] / tileResolution) * tileResolution - framebufferExtent[0]) /
-          (framebufferExtent[2] - framebufferExtent[0]),
-      (Math.round(center[1] / tileResolution) * tileResolution - framebufferExtent[1]) /
-          (framebufferExtent[3] - framebufferExtent[1]));
-  if (viewState.rotation !== 0) {
-    ol.transform.rotate(texCoordMatrix, viewState.rotation);
-  }
-  ol.transform.scale(texCoordMatrix,
-      frameState.size[0] * viewState.resolution /
-          (framebufferExtent[2] - framebufferExtent[0]),
-      frameState.size[1] * viewState.resolution /
-          (framebufferExtent[3] - framebufferExtent[1]));
-  ol.transform.translate(texCoordMatrix, -0.5, -0.5);
-
-  return true;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.TileLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-  if (!this.framebuffer) {
-    return undefined;
-  }
-
-  var pixelOnMapScaled = [
-    pixel[0] / frameState.size[0],
-    (frameState.size[1] - pixel[1]) / frameState.size[1]];
-
-  var pixelOnFrameBufferScaled = ol.transform.apply(
-      this.texCoordMatrix, pixelOnMapScaled.slice());
-  var pixelOnFrameBuffer = [
-    pixelOnFrameBufferScaled[0] * this.framebufferDimension,
-    pixelOnFrameBufferScaled[1] * this.framebufferDimension];
-
-  var gl = this.mapRenderer.getContext().getGL();
-  gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);
-  var imageData = new Uint8Array(4);
-  gl.readPixels(pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1,
-      gl.RGBA, gl.UNSIGNED_BYTE, imageData);
-
-  if (imageData[3] > 0) {
-    return callback.call(thisArg, this.getLayer(), imageData);
-  } else {
-    return undefined;
-  }
-};
-
-goog.provide('ol.renderer.webgl.VectorLayer');
-
-goog.require('ol');
-goog.require('ol.LayerType');
-goog.require('ol.ViewHint');
-goog.require('ol.extent');
-goog.require('ol.render.webgl.ReplayGroup');
-goog.require('ol.renderer.Type');
-goog.require('ol.renderer.vector');
-goog.require('ol.renderer.webgl.Layer');
-goog.require('ol.transform');
-
-
-/**
- * @constructor
- * @extends {ol.renderer.webgl.Layer}
- * @param {ol.renderer.webgl.Map} mapRenderer Map renderer.
- * @param {ol.layer.Vector} vectorLayer Vector layer.
- * @api
- */
-ol.renderer.webgl.VectorLayer = function(mapRenderer, vectorLayer) {
-
-  ol.renderer.webgl.Layer.call(this, mapRenderer, vectorLayer);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.dirty_ = false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = -1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedResolution_ = NaN;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.renderedExtent_ = ol.extent.createEmpty();
-
-  /**
-   * @private
-   * @type {function(ol.Feature, ol.Feature): number|null}
-   */
-  this.renderedRenderOrder_ = null;
-
-  /**
-   * @private
-   * @type {ol.render.webgl.ReplayGroup}
-   */
-  this.replayGroup_ = null;
-
-  /**
-   * The last layer state.
-   * @private
-   * @type {?ol.LayerState}
-   */
-  this.layerState_ = null;
-
-};
-ol.inherits(ol.renderer.webgl.VectorLayer, ol.renderer.webgl.Layer);
-
-
-/**
- * Determine if this renderer handles the provided layer.
- * @param {ol.renderer.Type} type The renderer type.
- * @param {ol.layer.Layer} layer The candidate layer.
- * @return {boolean} The renderer can render the layer.
- */
-ol.renderer.webgl.VectorLayer['handles'] = function(type, layer) {
-  return type === ol.renderer.Type.WEBGL && layer.getType() === ol.LayerType.VECTOR;
-};
-
-
-/**
- * Create a layer renderer.
- * @param {ol.renderer.Map} mapRenderer The map renderer.
- * @param {ol.layer.Layer} layer The layer to be rendererd.
- * @return {ol.renderer.webgl.VectorLayer} The layer renderer.
- */
-ol.renderer.webgl.VectorLayer['create'] = function(mapRenderer, layer) {
-  return new ol.renderer.webgl.VectorLayer(
-      /** @type {ol.renderer.webgl.Map} */ (mapRenderer),
-      /** @type {ol.layer.Vector} */ (layer)
-  );
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.composeFrame = function(frameState, layerState, context) {
-  this.layerState_ = layerState;
-  var viewState = frameState.viewState;
-  var replayGroup = this.replayGroup_;
-  var size = frameState.size;
-  var pixelRatio = frameState.pixelRatio;
-  var gl = this.mapRenderer.getGL();
-  if (replayGroup && !replayGroup.isEmpty()) {
-    gl.enable(gl.SCISSOR_TEST);
-    gl.scissor(0, 0, size[0] * pixelRatio, size[1] * pixelRatio);
-    replayGroup.replay(context,
-        viewState.center, viewState.resolution, viewState.rotation,
-        size, pixelRatio, layerState.opacity,
-        layerState.managed ? frameState.skippedFeatureUids : {});
-    gl.disable(gl.SCISSOR_TEST);
-  }
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.disposeInternal = function() {
-  var replayGroup = this.replayGroup_;
-  if (replayGroup) {
-    var context = this.mapRenderer.getContext();
-    replayGroup.getDeleteResourcesFunction(context)();
-    this.replayGroup_ = null;
-  }
-  ol.renderer.webgl.Layer.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameState, hitTolerance, callback, thisArg) {
-  if (!this.replayGroup_ || !this.layerState_) {
-    return undefined;
-  } else {
-    var context = this.mapRenderer.getContext();
-    var viewState = frameState.viewState;
-    var layer = this.getLayer();
-    var layerState = this.layerState_;
-    /** @type {Object.<string, boolean>} */
-    var features = {};
-    return this.replayGroup_.forEachFeatureAtCoordinate(coordinate,
-        context, viewState.center, viewState.resolution, viewState.rotation,
-        frameState.size, frameState.pixelRatio, layerState.opacity,
-        {},
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var key = ol.getUid(feature).toString();
-          if (!(key in features)) {
-            features[key] = true;
-            return callback.call(thisArg, feature, layer);
-          }
-        });
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.hasFeatureAtCoordinate = function(coordinate, frameState) {
-  if (!this.replayGroup_ || !this.layerState_) {
-    return false;
-  } else {
-    var context = this.mapRenderer.getContext();
-    var viewState = frameState.viewState;
-    var layerState = this.layerState_;
-    return this.replayGroup_.hasFeatureAtCoordinate(coordinate,
-        context, viewState.center, viewState.resolution, viewState.rotation,
-        frameState.size, frameState.pixelRatio, layerState.opacity,
-        frameState.skippedFeatureUids);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.forEachLayerAtPixel = function(pixel, frameState, callback, thisArg) {
-  var coordinate = ol.transform.apply(
-      frameState.pixelToCoordinateTransform, pixel.slice());
-  var hasFeature = this.hasFeatureAtCoordinate(coordinate, frameState);
-
-  if (hasFeature) {
-    return callback.call(thisArg, this.getLayer(), null);
-  } else {
-    return undefined;
-  }
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.renderer.webgl.VectorLayer.prototype.handleStyleImageChange_ = function(event) {
-  this.renderIfReadyAndVisible();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.renderer.webgl.VectorLayer.prototype.prepareFrame = function(frameState, layerState, context) {
-
-  var vectorLayer = /** @type {ol.layer.Vector} */ (this.getLayer());
-  var vectorSource = vectorLayer.getSource();
-
-  this.updateLogos(frameState, vectorSource);
-
-  var animating = frameState.viewHints[ol.ViewHint.ANIMATING];
-  var interacting = frameState.viewHints[ol.ViewHint.INTERACTING];
-  var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();
-  var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();
-
-  if (!this.dirty_ && (!updateWhileAnimating && animating) ||
-      (!updateWhileInteracting && interacting)) {
-    return true;
-  }
-
-  var frameStateExtent = frameState.extent;
-  var viewState = frameState.viewState;
-  var projection = viewState.projection;
-  var resolution = viewState.resolution;
-  var pixelRatio = frameState.pixelRatio;
-  var vectorLayerRevision = vectorLayer.getRevision();
-  var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();
-  var vectorLayerRenderOrder = vectorLayer.getRenderOrder();
-
-  if (vectorLayerRenderOrder === undefined) {
-    vectorLayerRenderOrder = ol.renderer.vector.defaultOrder;
-  }
-
-  var extent = ol.extent.buffer(frameStateExtent,
-      vectorLayerRenderBuffer * resolution);
-
-  if (!this.dirty_ &&
-      this.renderedResolution_ == resolution &&
-      this.renderedRevision_ == vectorLayerRevision &&
-      this.renderedRenderOrder_ == vectorLayerRenderOrder &&
-      ol.extent.containsExtent(this.renderedExtent_, extent)) {
-    return true;
-  }
-
-  if (this.replayGroup_) {
-    frameState.postRenderFunctions.push(
-        this.replayGroup_.getDeleteResourcesFunction(context));
-  }
-
-  this.dirty_ = false;
-
-  var replayGroup = new ol.render.webgl.ReplayGroup(
-      ol.renderer.vector.getTolerance(resolution, pixelRatio),
-      extent, vectorLayer.getRenderBuffer());
-  vectorSource.loadFeatures(extent, resolution, projection);
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @this {ol.renderer.webgl.VectorLayer}
-   */
-  var renderFeature = function(feature) {
-    var styles;
-    var styleFunction = feature.getStyleFunction();
-    if (styleFunction) {
-      styles = styleFunction.call(feature, resolution);
-    } else {
-      styleFunction = vectorLayer.getStyleFunction();
-      if (styleFunction) {
-        styles = styleFunction(feature, resolution);
-      }
-    }
-    if (styles) {
-      var dirty = this.renderFeature(
-          feature, resolution, pixelRatio, styles, replayGroup);
-      this.dirty_ = this.dirty_ || dirty;
-    }
-  };
-  if (vectorLayerRenderOrder) {
-    /** @type {Array.<ol.Feature>} */
-    var features = [];
-    vectorSource.forEachFeatureInExtent(extent,
-        /**
-         * @param {ol.Feature} feature Feature.
-         */
-        function(feature) {
-          features.push(feature);
-        }, this);
-    features.sort(vectorLayerRenderOrder);
-    features.forEach(renderFeature, this);
-  } else {
-    vectorSource.forEachFeatureInExtent(extent, renderFeature, this);
-  }
-  replayGroup.finish(context);
-
-  this.renderedResolution_ = resolution;
-  this.renderedRevision_ = vectorLayerRevision;
-  this.renderedRenderOrder_ = vectorLayerRenderOrder;
-  this.renderedExtent_ = extent;
-  this.replayGroup_ = replayGroup;
-
-  return true;
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {(ol.style.Style|Array.<ol.style.Style>)} styles The style or array of
- *     styles.
- * @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- */
-ol.renderer.webgl.VectorLayer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
-  if (!styles) {
-    return false;
-  }
-  var loading = false;
-  if (Array.isArray(styles)) {
-    for (var i = styles.length - 1, ii = 0; i >= ii; --i) {
-      loading = ol.renderer.vector.renderFeature(
-          replayGroup, feature, styles[i],
-          ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-          this.handleStyleImageChange_, this) || loading;
-    }
-  } else {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles,
-        ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-        this.handleStyleImageChange_, this) || loading;
-  }
-  return loading;
-};
-
-goog.provide('ol.Map');
-
-goog.require('ol');
-goog.require('ol.PluggableMap');
-goog.require('ol.PluginType');
-goog.require('ol.control');
-goog.require('ol.interaction');
-goog.require('ol.obj');
-goog.require('ol.plugins');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.canvas.Map');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.canvas.VectorLayer');
-goog.require('ol.renderer.canvas.VectorTileLayer');
-goog.require('ol.renderer.webgl.ImageLayer');
-goog.require('ol.renderer.webgl.Map');
-goog.require('ol.renderer.webgl.TileLayer');
-goog.require('ol.renderer.webgl.VectorLayer');
-
-
-if (ol.ENABLE_CANVAS) {
-  ol.plugins.register(ol.PluginType.MAP_RENDERER, ol.renderer.canvas.Map);
-  ol.plugins.registerMultiple(ol.PluginType.LAYER_RENDERER, [
-    ol.renderer.canvas.ImageLayer,
-    ol.renderer.canvas.TileLayer,
-    ol.renderer.canvas.VectorLayer,
-    ol.renderer.canvas.VectorTileLayer
-  ]);
-}
-
-if (ol.ENABLE_WEBGL) {
-  ol.plugins.register(ol.PluginType.MAP_RENDERER, ol.renderer.webgl.Map);
-  ol.plugins.registerMultiple(ol.PluginType.LAYER_RENDERER, [
-    ol.renderer.webgl.ImageLayer,
-    ol.renderer.webgl.TileLayer,
-    ol.renderer.webgl.VectorLayer
-  ]);
-}
-
-
-/**
- * @classdesc
- * The map is the core component of OpenLayers. For a map to render, a view,
- * one or more layers, and a target container are needed:
- *
- *     var map = new ol.Map({
- *       view: new ol.View({
- *         center: [0, 0],
- *         zoom: 1
- *       }),
- *       layers: [
- *         new ol.layer.Tile({
- *           source: new ol.source.OSM()
- *         })
- *       ],
- *       target: 'map'
- *     });
- *
- * The above snippet creates a map using a {@link ol.layer.Tile} to display
- * {@link ol.source.OSM} OSM data and render it to a DOM element with the
- * id `map`.
- *
- * The constructor places a viewport container (with CSS class name
- * `ol-viewport`) in the target element (see `getViewport()`), and then two
- * further elements within the viewport: one with CSS class name
- * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with
- * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`
- * option of {@link ol.Overlay} for the difference). The map itself is placed in
- * a further element within the viewport.
- *
- * Layers are stored as a `ol.Collection` in layerGroups. A top-level group is
- * provided by the library. This is what is accessed by `getLayerGroup` and
- * `setLayerGroup`. Layers entered in the options are added to this group, and
- * `addLayer` and `removeLayer` change the layer collection in the group.
- * `getLayers` is a convenience function for `getLayerGroup().getLayers()`.
- * Note that `ol.layer.Group` is a subclass of `ol.layer.Base`, so layers
- * entered in the options or added with `addLayer` can be groups, which can
- * contain further groups, and so on.
- *
- * @constructor
- * @extends {ol.PluggableMap}
- * @param {olx.MapOptions} options Map options.
- * @fires ol.MapBrowserEvent
- * @fires ol.MapEvent
- * @fires ol.render.Event#postcompose
- * @fires ol.render.Event#precompose
- * @api
- */
-ol.Map = function(options) {
-  options = ol.obj.assign({}, options);
-  if (!options.controls) {
-    options.controls = ol.control.defaults();
-  }
-  if (!options.interactions) {
-    options.interactions = ol.interaction.defaults();
-  }
-
-  ol.PluggableMap.call(this, options);
-};
-ol.inherits(ol.Map, ol.PluggableMap);
-
-goog.provide('ol.net');
-
-goog.require('ol');
-
-
-/**
- * Simple JSONP helper. Supports error callbacks and a custom callback param.
- * The error callback will be called when no JSONP is executed after 10 seconds.
- *
- * @param {string} url Request url. A 'callback' query parameter will be
- *     appended.
- * @param {Function} callback Callback on success.
- * @param {function()=} opt_errback Callback on error.
- * @param {string=} opt_callbackParam Custom query parameter for the JSONP
- *     callback. Default is 'callback'.
- */
-ol.net.jsonp = function(url, callback, opt_errback, opt_callbackParam) {
-  var script = document.createElement('script');
-  var key = 'olc_' + ol.getUid(callback);
-  function cleanup() {
-    delete window[key];
-    script.parentNode.removeChild(script);
-  }
-  script.async = true;
-  script.src = url + (url.indexOf('?') == -1 ? '?' : '&') +
-      (opt_callbackParam || 'callback') + '=' + key;
-  var timer = setTimeout(function() {
-    cleanup();
-    if (opt_errback) {
-      opt_errback();
-    }
-  }, 10000);
-  window[key] = function(data) {
-    clearTimeout(timer);
-    cleanup();
-    callback(data);
-  };
-  document.getElementsByTagName('head')[0].appendChild(script);
-};
-
-goog.provide('ol.proj.common');
-
-goog.require('ol.proj');
-
-
-/**
- * Deprecated.  Transforms between EPSG:4326 and EPSG:3857 are now included by
- * default.  There is no need to call this function in application code and it
- * will be removed in a future major release.
- * @deprecated This function is no longer necessary.
- * @api
- */
-ol.proj.common.add = ol.proj.addCommon;
-
-goog.provide('ol.render');
-
-goog.require('ol.has');
-goog.require('ol.transform');
-goog.require('ol.render.canvas.Immediate');
-
-
-/**
- * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries
- * to the context's canvas.
- *
- * The units for geometry coordinates are css pixels relative to the top left
- * corner of the canvas element.
- * ```js
- * var canvas = document.createElement('canvas');
- * var render = ol.render.toContext(canvas.getContext('2d'),
- *     { size: [100, 100] });
- * render.setFillStrokeStyle(new ol.style.Fill({ color: blue }));
- * render.drawPolygon(
- *     new ol.geom.Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));
- * ```
- *
- * @param {CanvasRenderingContext2D} context Canvas context.
- * @param {olx.render.ToContextOptions=} opt_options Options.
- * @return {ol.render.canvas.Immediate} Canvas Immediate.
- * @api
- */
-ol.render.toContext = function(context, opt_options) {
-  var canvas = context.canvas;
-  var options = opt_options ? opt_options : {};
-  var pixelRatio = options.pixelRatio || ol.has.DEVICE_PIXEL_RATIO;
-  var size = options.size;
-  if (size) {
-    canvas.width = size[0] * pixelRatio;
-    canvas.height = size[1] * pixelRatio;
-    canvas.style.width = size[0] + 'px';
-    canvas.style.height = size[1] + 'px';
-  }
-  var extent = [0, 0, canvas.width, canvas.height];
-  var transform = ol.transform.scale(ol.transform.create(), pixelRatio, pixelRatio);
-  return new ol.render.canvas.Immediate(context, pixelRatio, extent, transform,
-      0);
-};
-
-goog.provide('ol.reproj');
-
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * Calculates ideal resolution to use from the source in order to achieve
- * pixel mapping as close as possible to 1:1 during reprojection.
- * The resolution is calculated regardless of what resolutions
- * are actually available in the dataset (TileGrid, Image, ...).
- *
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Coordinate} targetCenter Target center.
- * @param {number} targetResolution Target resolution.
- * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.
- */
-ol.reproj.calculateSourceResolution = function(sourceProj, targetProj,
-    targetCenter, targetResolution) {
-
-  var sourceCenter = ol.proj.transform(targetCenter, targetProj, sourceProj);
-
-  // calculate the ideal resolution of the source data
-  var sourceResolution =
-      ol.proj.getPointResolution(targetProj, targetResolution, targetCenter);
-
-  var targetMetersPerUnit = targetProj.getMetersPerUnit();
-  if (targetMetersPerUnit !== undefined) {
-    sourceResolution *= targetMetersPerUnit;
-  }
-  var sourceMetersPerUnit = sourceProj.getMetersPerUnit();
-  if (sourceMetersPerUnit !== undefined) {
-    sourceResolution /= sourceMetersPerUnit;
-  }
-
-  // Based on the projection properties, the point resolution at the specified
-  // coordinates may be slightly different. We need to reverse-compensate this
-  // in order to achieve optimal results.
-
-  var sourceExtent = sourceProj.getExtent();
-  if (!sourceExtent || ol.extent.containsCoordinate(sourceExtent, sourceCenter)) {
-    var compensationFactor =
-        ol.proj.getPointResolution(sourceProj, sourceResolution, sourceCenter) /
-        sourceResolution;
-    if (isFinite(compensationFactor) && compensationFactor > 0) {
-      sourceResolution /= compensationFactor;
-    }
-  }
-
-  return sourceResolution;
-};
-
-
-/**
- * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap
- * in order to mask gaps caused by antialiasing.
- *
- * @param {number} centroidX Centroid of the triangle (x coordinate in pixels).
- * @param {number} centroidY Centroid of the triangle (y coordinate in pixels).
- * @param {number} x X coordinate of the point (in pixels).
- * @param {number} y Y coordinate of the point (in pixels).
- * @return {ol.Coordinate} New point 1 px farther from the centroid.
- * @private
- */
-ol.reproj.enlargeClipPoint_ = function(centroidX, centroidY, x, y) {
-  var dX = x - centroidX, dY = y - centroidY;
-  var distance = Math.sqrt(dX * dX + dY * dY);
-  return [Math.round(x + dX / distance), Math.round(y + dY / distance)];
-};
-
-
-/**
- * Renders the source data into new canvas based on the triangulation.
- *
- * @param {number} width Width of the canvas.
- * @param {number} height Height of the canvas.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} sourceResolution Source resolution.
- * @param {ol.Extent} sourceExtent Extent of the data source.
- * @param {number} targetResolution Target resolution.
- * @param {ol.Extent} targetExtent Target extent.
- * @param {ol.reproj.Triangulation} triangulation Calculated triangulation.
- * @param {Array.<{extent: ol.Extent,
- *                 image: (HTMLCanvasElement|Image|HTMLVideoElement)}>} sources
- *             Array of sources.
- * @param {number} gutter Gutter of the sources.
- * @param {boolean=} opt_renderEdges Render reprojection edges.
- * @return {HTMLCanvasElement} Canvas with reprojected data.
- */
-ol.reproj.render = function(width, height, pixelRatio,
-    sourceResolution, sourceExtent, targetResolution, targetExtent,
-    triangulation, sources, gutter, opt_renderEdges) {
-
-  var context = ol.dom.createCanvasContext2D(Math.round(pixelRatio * width),
-      Math.round(pixelRatio * height));
-
-  if (sources.length === 0) {
-    return context.canvas;
-  }
-
-  context.scale(pixelRatio, pixelRatio);
-
-  var sourceDataExtent = ol.extent.createEmpty();
-  sources.forEach(function(src, i, arr) {
-    ol.extent.extend(sourceDataExtent, src.extent);
-  });
-
-  var canvasWidthInUnits = ol.extent.getWidth(sourceDataExtent);
-  var canvasHeightInUnits = ol.extent.getHeight(sourceDataExtent);
-  var stitchContext = ol.dom.createCanvasContext2D(
-      Math.round(pixelRatio * canvasWidthInUnits / sourceResolution),
-      Math.round(pixelRatio * canvasHeightInUnits / sourceResolution));
-
-  var stitchScale = pixelRatio / sourceResolution;
-
-  sources.forEach(function(src, i, arr) {
-    var xPos = src.extent[0] - sourceDataExtent[0];
-    var yPos = -(src.extent[3] - sourceDataExtent[3]);
-    var srcWidth = ol.extent.getWidth(src.extent);
-    var srcHeight = ol.extent.getHeight(src.extent);
-
-    stitchContext.drawImage(
-        src.image,
-        gutter, gutter,
-        src.image.width - 2 * gutter, src.image.height - 2 * gutter,
-        xPos * stitchScale, yPos * stitchScale,
-        srcWidth * stitchScale, srcHeight * stitchScale);
-  });
-
-  var targetTopLeft = ol.extent.getTopLeft(targetExtent);
-
-  triangulation.getTriangles().forEach(function(triangle, i, arr) {
-    /* Calculate affine transform (src -> dst)
-     * Resulting matrix can be used to transform coordinate
-     * from `sourceProjection` to destination pixels.
-     *
-     * To optimize number of context calls and increase numerical stability,
-     * we also do the following operations:
-     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)
-     * here before solving the linear system so [ui, vi] are pixel coordinates.
-     *
-     * Src points: xi, yi
-     * Dst points: ui, vi
-     * Affine coefficients: aij
-     *
-     * | x0 y0 1  0  0 0 |   |a00|   |u0|
-     * | x1 y1 1  0  0 0 |   |a01|   |u1|
-     * | x2 y2 1  0  0 0 | x |a02| = |u2|
-     * |  0  0 0 x0 y0 1 |   |a10|   |v0|
-     * |  0  0 0 x1 y1 1 |   |a11|   |v1|
-     * |  0  0 0 x2 y2 1 |   |a12|   |v2|
-     */
-    var source = triangle.source, target = triangle.target;
-    var x0 = source[0][0], y0 = source[0][1],
-        x1 = source[1][0], y1 = source[1][1],
-        x2 = source[2][0], y2 = source[2][1];
-    var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution,
-        v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;
-    var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution,
-        v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;
-    var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution,
-        v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;
-
-    // Shift all the source points to improve numerical stability
-    // of all the subsequent calculations. The [x0, y0] is used here.
-    // This is also used to simplify the linear system.
-    var sourceNumericalShiftX = x0, sourceNumericalShiftY = y0;
-    x0 = 0;
-    y0 = 0;
-    x1 -= sourceNumericalShiftX;
-    y1 -= sourceNumericalShiftY;
-    x2 -= sourceNumericalShiftX;
-    y2 -= sourceNumericalShiftY;
-
-    var augmentedMatrix = [
-      [x1, y1, 0, 0, u1 - u0],
-      [x2, y2, 0, 0, u2 - u0],
-      [0, 0, x1, y1, v1 - v0],
-      [0, 0, x2, y2, v2 - v0]
-    ];
-    var affineCoefs = ol.math.solveLinearSystem(augmentedMatrix);
-    if (!affineCoefs) {
-      return;
-    }
-
-    context.save();
-    context.beginPath();
-    var centroidX = (u0 + u1 + u2) / 3, centroidY = (v0 + v1 + v2) / 3;
-    var p0 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u0, v0);
-    var p1 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u1, v1);
-    var p2 = ol.reproj.enlargeClipPoint_(centroidX, centroidY, u2, v2);
-
-    context.moveTo(p1[0], p1[1]);
-    context.lineTo(p0[0], p0[1]);
-    context.lineTo(p2[0], p2[1]);
-    context.clip();
-
-    context.transform(
-        affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);
-
-    context.translate(sourceDataExtent[0] - sourceNumericalShiftX,
-        sourceDataExtent[3] - sourceNumericalShiftY);
-
-    context.scale(sourceResolution / pixelRatio,
-        -sourceResolution / pixelRatio);
-
-    context.drawImage(stitchContext.canvas, 0, 0);
-    context.restore();
-  });
-
-  if (opt_renderEdges) {
-    context.save();
-
-    context.strokeStyle = 'black';
-    context.lineWidth = 1;
-
-    triangulation.getTriangles().forEach(function(triangle, i, arr) {
-      var target = triangle.target;
-      var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution,
-          v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;
-      var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution,
-          v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;
-      var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution,
-          v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;
-
-      context.beginPath();
-      context.moveTo(u1, v1);
-      context.lineTo(u0, v0);
-      context.lineTo(u2, v2);
-      context.closePath();
-      context.stroke();
-    });
-
-    context.restore();
-  }
-  return context.canvas;
-};
-
-goog.provide('ol.reproj.Triangulation');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.proj');
-
-
-/**
- * @classdesc
- * Class containing triangulation of the given target extent.
- * Used for determining source data and the reprojection itself.
- *
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Extent} targetExtent Target extent to triangulate.
- * @param {ol.Extent} maxSourceExtent Maximal source extent that can be used.
- * @param {number} errorThreshold Acceptable error (in source units).
- * @constructor
- */
-ol.reproj.Triangulation = function(sourceProj, targetProj, targetExtent,
-    maxSourceExtent, errorThreshold) {
-
-  /**
-   * @type {ol.proj.Projection}
-   * @private
-   */
-  this.sourceProj_ = sourceProj;
-
-  /**
-   * @type {ol.proj.Projection}
-   * @private
-   */
-  this.targetProj_ = targetProj;
-
-  /** @type {!Object.<string, ol.Coordinate>} */
-  var transformInvCache = {};
-  var transformInv = ol.proj.getTransform(this.targetProj_, this.sourceProj_);
-
-  /**
-   * @param {ol.Coordinate} c A coordinate.
-   * @return {ol.Coordinate} Transformed coordinate.
-   * @private
-   */
-  this.transformInv_ = function(c) {
-    var key = c[0] + '/' + c[1];
-    if (!transformInvCache[key]) {
-      transformInvCache[key] = transformInv(c);
-    }
-    return transformInvCache[key];
-  };
-
-  /**
-   * @type {ol.Extent}
-   * @private
-   */
-  this.maxSourceExtent_ = maxSourceExtent;
-
-  /**
-   * @type {number}
-   * @private
-   */
-  this.errorThresholdSquared_ = errorThreshold * errorThreshold;
-
-  /**
-   * @type {Array.<ol.ReprojTriangle>}
-   * @private
-   */
-  this.triangles_ = [];
-
-  /**
-   * Indicates that the triangulation crosses edge of the source projection.
-   * @type {boolean}
-   * @private
-   */
-  this.wrapsXInSource_ = false;
-
-  /**
-   * @type {boolean}
-   * @private
-   */
-  this.canWrapXInSource_ = this.sourceProj_.canWrapX() &&
-      !!maxSourceExtent &&
-      !!this.sourceProj_.getExtent() &&
-      (ol.extent.getWidth(maxSourceExtent) ==
-       ol.extent.getWidth(this.sourceProj_.getExtent()));
-
-  /**
-   * @type {?number}
-   * @private
-   */
-  this.sourceWorldWidth_ = this.sourceProj_.getExtent() ?
-    ol.extent.getWidth(this.sourceProj_.getExtent()) : null;
-
-  /**
-   * @type {?number}
-   * @private
-   */
-  this.targetWorldWidth_ = this.targetProj_.getExtent() ?
-    ol.extent.getWidth(this.targetProj_.getExtent()) : null;
-
-  var destinationTopLeft = ol.extent.getTopLeft(targetExtent);
-  var destinationTopRight = ol.extent.getTopRight(targetExtent);
-  var destinationBottomRight = ol.extent.getBottomRight(targetExtent);
-  var destinationBottomLeft = ol.extent.getBottomLeft(targetExtent);
-  var sourceTopLeft = this.transformInv_(destinationTopLeft);
-  var sourceTopRight = this.transformInv_(destinationTopRight);
-  var sourceBottomRight = this.transformInv_(destinationBottomRight);
-  var sourceBottomLeft = this.transformInv_(destinationBottomLeft);
-
-  this.addQuad_(
-      destinationTopLeft, destinationTopRight,
-      destinationBottomRight, destinationBottomLeft,
-      sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft,
-      ol.RASTER_REPROJECTION_MAX_SUBDIVISION);
-
-  if (this.wrapsXInSource_) {
-    var leftBound = Infinity;
-    this.triangles_.forEach(function(triangle, i, arr) {
-      leftBound = Math.min(leftBound,
-          triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);
-    });
-
-    // Shift triangles to be as close to `leftBound` as possible
-    // (if the distance is more than `worldWidth / 2` it can be closer.
-    this.triangles_.forEach(function(triangle) {
-      if (Math.max(triangle.source[0][0], triangle.source[1][0],
-          triangle.source[2][0]) - leftBound > this.sourceWorldWidth_ / 2) {
-        var newTriangle = [[triangle.source[0][0], triangle.source[0][1]],
-          [triangle.source[1][0], triangle.source[1][1]],
-          [triangle.source[2][0], triangle.source[2][1]]];
-        if ((newTriangle[0][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[0][0] -= this.sourceWorldWidth_;
-        }
-        if ((newTriangle[1][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[1][0] -= this.sourceWorldWidth_;
-        }
-        if ((newTriangle[2][0] - leftBound) > this.sourceWorldWidth_ / 2) {
-          newTriangle[2][0] -= this.sourceWorldWidth_;
-        }
-
-        // Rarely (if the extent contains both the dateline and prime meridian)
-        // the shift can in turn break some triangles.
-        // Detect this here and don't shift in such cases.
-        var minX = Math.min(
-            newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);
-        var maxX = Math.max(
-            newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);
-        if ((maxX - minX) < this.sourceWorldWidth_ / 2) {
-          triangle.source = newTriangle;
-        }
-      }
-    }, this);
-  }
-
-  transformInvCache = {};
-};
-
-
-/**
- * Adds triangle to the triangulation.
- * @param {ol.Coordinate} a The target a coordinate.
- * @param {ol.Coordinate} b The target b coordinate.
- * @param {ol.Coordinate} c The target c coordinate.
- * @param {ol.Coordinate} aSrc The source a coordinate.
- * @param {ol.Coordinate} bSrc The source b coordinate.
- * @param {ol.Coordinate} cSrc The source c coordinate.
- * @private
- */
-ol.reproj.Triangulation.prototype.addTriangle_ = function(a, b, c,
-    aSrc, bSrc, cSrc) {
-  this.triangles_.push({
-    source: [aSrc, bSrc, cSrc],
-    target: [a, b, c]
-  });
-};
-
-
-/**
- * Adds quad (points in clock-wise order) to the triangulation
- * (and reprojects the vertices) if valid.
- * Performs quad subdivision if needed to increase precision.
- *
- * @param {ol.Coordinate} a The target a coordinate.
- * @param {ol.Coordinate} b The target b coordinate.
- * @param {ol.Coordinate} c The target c coordinate.
- * @param {ol.Coordinate} d The target d coordinate.
- * @param {ol.Coordinate} aSrc The source a coordinate.
- * @param {ol.Coordinate} bSrc The source b coordinate.
- * @param {ol.Coordinate} cSrc The source c coordinate.
- * @param {ol.Coordinate} dSrc The source d coordinate.
- * @param {number} maxSubdivision Maximal allowed subdivision of the quad.
- * @private
- */
-ol.reproj.Triangulation.prototype.addQuad_ = function(a, b, c, d,
-    aSrc, bSrc, cSrc, dSrc, maxSubdivision) {
-
-  var sourceQuadExtent = ol.extent.boundingExtent([aSrc, bSrc, cSrc, dSrc]);
-  var sourceCoverageX = this.sourceWorldWidth_ ?
-    ol.extent.getWidth(sourceQuadExtent) / this.sourceWorldWidth_ : null;
-  var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);
-
-  // when the quad is wrapped in the source projection
-  // it covers most of the projection extent, but not fully
-  var wrapsX = this.sourceProj_.canWrapX() &&
-               sourceCoverageX > 0.5 && sourceCoverageX < 1;
-
-  var needsSubdivision = false;
-
-  if (maxSubdivision > 0) {
-    if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {
-      var targetQuadExtent = ol.extent.boundingExtent([a, b, c, d]);
-      var targetCoverageX =
-          ol.extent.getWidth(targetQuadExtent) / this.targetWorldWidth_;
-      needsSubdivision |=
-          targetCoverageX > ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH;
-    }
-    if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {
-      needsSubdivision |=
-          sourceCoverageX > ol.RASTER_REPROJECTION_MAX_TRIANGLE_WIDTH;
-    }
-  }
-
-  if (!needsSubdivision && this.maxSourceExtent_) {
-    if (!ol.extent.intersects(sourceQuadExtent, this.maxSourceExtent_)) {
-      // whole quad outside source projection extent -> ignore
-      return;
-    }
-  }
-
-  if (!needsSubdivision) {
-    if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ||
-        !isFinite(bSrc[0]) || !isFinite(bSrc[1]) ||
-        !isFinite(cSrc[0]) || !isFinite(cSrc[1]) ||
-        !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {
-      if (maxSubdivision > 0) {
-        needsSubdivision = true;
-      } else {
-        return;
-      }
-    }
-  }
-
-  if (maxSubdivision > 0) {
-    if (!needsSubdivision) {
-      var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];
-      var centerSrc = this.transformInv_(center);
-
-      var dx;
-      if (wrapsX) {
-        var centerSrcEstimX =
-            (ol.math.modulo(aSrc[0], sourceWorldWidth) +
-             ol.math.modulo(cSrc[0], sourceWorldWidth)) / 2;
-        dx = centerSrcEstimX -
-            ol.math.modulo(centerSrc[0], sourceWorldWidth);
-      } else {
-        dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];
-      }
-      var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];
-      var centerSrcErrorSquared = dx * dx + dy * dy;
-      needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;
-    }
-    if (needsSubdivision) {
-      if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {
-        // split horizontally (top & bottom)
-        var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];
-        var bcSrc = this.transformInv_(bc);
-        var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];
-        var daSrc = this.transformInv_(da);
-
-        this.addQuad_(
-            a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);
-        this.addQuad_(
-            da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);
-      } else {
-        // split vertically (left & right)
-        var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];
-        var abSrc = this.transformInv_(ab);
-        var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];
-        var cdSrc = this.transformInv_(cd);
-
-        this.addQuad_(
-            a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);
-        this.addQuad_(
-            ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);
-      }
-      return;
-    }
-  }
-
-  if (wrapsX) {
-    if (!this.canWrapXInSource_) {
-      return;
-    }
-    this.wrapsXInSource_ = true;
-  }
-
-  this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);
-  this.addTriangle_(a, b, c, aSrc, bSrc, cSrc);
-};
-
-
-/**
- * Calculates extent of the 'source' coordinates from all the triangles.
- *
- * @return {ol.Extent} Calculated extent.
- */
-ol.reproj.Triangulation.prototype.calculateSourceExtent = function() {
-  var extent = ol.extent.createEmpty();
-
-  this.triangles_.forEach(function(triangle, i, arr) {
-    var src = triangle.source;
-    ol.extent.extendCoordinate(extent, src[0]);
-    ol.extent.extendCoordinate(extent, src[1]);
-    ol.extent.extendCoordinate(extent, src[2]);
-  });
-
-  return extent;
-};
-
-
-/**
- * @return {Array.<ol.ReprojTriangle>} Array of the calculated triangles.
- */
-ol.reproj.Triangulation.prototype.getTriangles = function() {
-  return this.triangles_;
-};
-
-goog.provide('ol.reproj.Image');
-
-goog.require('ol');
-goog.require('ol.ImageBase');
-goog.require('ol.ImageState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.reproj');
-goog.require('ol.reproj.Triangulation');
-
-
-/**
- * @classdesc
- * Class encapsulating single reprojected image.
- * See {@link ol.source.Image}.
- *
- * @constructor
- * @extends {ol.ImageBase}
- * @param {ol.proj.Projection} sourceProj Source projection (of the data).
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.Extent} targetExtent Target extent.
- * @param {number} targetResolution Target resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.ReprojImageFunctionType} getImageFunction
- *     Function returning source images (extent, resolution, pixelRatio).
- */
-ol.reproj.Image = function(sourceProj, targetProj,
-    targetExtent, targetResolution, pixelRatio, getImageFunction) {
-
-  /**
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.targetProj_ = targetProj;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.maxSourceExtent_ = sourceProj.getExtent();
-  var maxTargetExtent = targetProj.getExtent();
-
-  var limitedTargetExtent = maxTargetExtent ?
-    ol.extent.getIntersection(targetExtent, maxTargetExtent) : targetExtent;
-
-  var targetCenter = ol.extent.getCenter(limitedTargetExtent);
-  var sourceResolution = ol.reproj.calculateSourceResolution(
-      sourceProj, targetProj, targetCenter, targetResolution);
-
-  var errorThresholdInPixels = ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;
-
-  /**
-   * @private
-   * @type {!ol.reproj.Triangulation}
-   */
-  this.triangulation_ = new ol.reproj.Triangulation(
-      sourceProj, targetProj, limitedTargetExtent, this.maxSourceExtent_,
-      sourceResolution * errorThresholdInPixels);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.targetResolution_ = targetResolution;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.targetExtent_ = targetExtent;
-
-  var sourceExtent = this.triangulation_.calculateSourceExtent();
-
-  /**
-   * @private
-   * @type {ol.ImageBase}
-   */
-  this.sourceImage_ =
-      getImageFunction(sourceExtent, sourceResolution, pixelRatio);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.sourcePixelRatio_ =
-      this.sourceImage_ ? this.sourceImage_.getPixelRatio() : 1;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {?ol.EventsKey}
-   */
-  this.sourceListenerKey_ = null;
-
-
-  var state = ol.ImageState.LOADED;
-
-  if (this.sourceImage_) {
-    state = ol.ImageState.IDLE;
-  }
-
-  ol.ImageBase.call(this, targetExtent, targetResolution, this.sourcePixelRatio_, state);
-};
-ol.inherits(ol.reproj.Image, ol.ImageBase);
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.disposeInternal = function() {
-  if (this.state == ol.ImageState.LOADING) {
-    this.unlistenSource_();
-  }
-  ol.ImageBase.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.getImage = function() {
-  return this.canvas_;
-};
-
-
-/**
- * @return {ol.proj.Projection} Projection.
- */
-ol.reproj.Image.prototype.getProjection = function() {
-  return this.targetProj_;
-};
-
-
-/**
- * @private
- */
-ol.reproj.Image.prototype.reproject_ = function() {
-  var sourceState = this.sourceImage_.getState();
-  if (sourceState == ol.ImageState.LOADED) {
-    var width = ol.extent.getWidth(this.targetExtent_) / this.targetResolution_;
-    var height =
-        ol.extent.getHeight(this.targetExtent_) / this.targetResolution_;
-
-    this.canvas_ = ol.reproj.render(width, height, this.sourcePixelRatio_,
-        this.sourceImage_.getResolution(), this.maxSourceExtent_,
-        this.targetResolution_, this.targetExtent_, this.triangulation_, [{
-          extent: this.sourceImage_.getExtent(),
-          image: this.sourceImage_.getImage()
-        }], 0);
-  }
-  this.state = sourceState;
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Image.prototype.load = function() {
-  if (this.state == ol.ImageState.IDLE) {
-    this.state = ol.ImageState.LOADING;
-    this.changed();
-
-    var sourceState = this.sourceImage_.getState();
-    if (sourceState == ol.ImageState.LOADED ||
-        sourceState == ol.ImageState.ERROR) {
-      this.reproject_();
-    } else {
-      this.sourceListenerKey_ = ol.events.listen(this.sourceImage_,
-          ol.events.EventType.CHANGE, function(e) {
-            var sourceState = this.sourceImage_.getState();
-            if (sourceState == ol.ImageState.LOADED ||
-                sourceState == ol.ImageState.ERROR) {
-              this.unlistenSource_();
-              this.reproject_();
-            }
-          }, this);
-      this.sourceImage_.load();
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.reproj.Image.prototype.unlistenSource_ = function() {
-  ol.events.unlistenByKey(/** @type {!ol.EventsKey} */ (this.sourceListenerKey_));
-  this.sourceListenerKey_ = null;
-};
-
-goog.provide('ol.reproj.Tile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.reproj');
-goog.require('ol.reproj.Triangulation');
-
-
-/**
- * @classdesc
- * Class encapsulating single reprojected tile.
- * See {@link ol.source.TileImage}.
- *
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.proj.Projection} sourceProj Source projection.
- * @param {ol.tilegrid.TileGrid} sourceTileGrid Source tile grid.
- * @param {ol.proj.Projection} targetProj Target projection.
- * @param {ol.tilegrid.TileGrid} targetTileGrid Target tile grid.
- * @param {ol.TileCoord} tileCoord Coordinate of the tile.
- * @param {ol.TileCoord} wrappedTileCoord Coordinate of the tile wrapped in X.
- * @param {number} pixelRatio Pixel ratio.
- * @param {number} gutter Gutter of the source tiles.
- * @param {ol.ReprojTileFunctionType} getTileFunction
- *     Function returning source tiles (z, x, y, pixelRatio).
- * @param {number=} opt_errorThreshold Acceptable reprojection error (in px).
- * @param {boolean=} opt_renderEdges Render reprojection edges.
- */
-ol.reproj.Tile = function(sourceProj, sourceTileGrid,
-    targetProj, targetTileGrid, tileCoord, wrappedTileCoord,
-    pixelRatio, gutter, getTileFunction,
-    opt_errorThreshold, opt_renderEdges) {
-  ol.Tile.call(this, tileCoord, ol.TileState.IDLE);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.pixelRatio_ = pixelRatio;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.gutter_ = gutter;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.sourceTileGrid_ = sourceTileGrid;
-
-  /**
-   * @private
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.targetTileGrid_ = targetTileGrid;
-
-  /**
-   * @private
-   * @type {ol.TileCoord}
-   */
-  this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;
-
-  /**
-   * @private
-   * @type {!Array.<ol.Tile>}
-   */
-  this.sourceTiles_ = [];
-
-  /**
-   * @private
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.sourcesListenerKeys_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.sourceZ_ = 0;
-
-  var targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);
-  var maxTargetExtent = this.targetTileGrid_.getExtent();
-  var maxSourceExtent = this.sourceTileGrid_.getExtent();
-
-  var limitedTargetExtent = maxTargetExtent ?
-    ol.extent.getIntersection(targetExtent, maxTargetExtent) : targetExtent;
-
-  if (ol.extent.getArea(limitedTargetExtent) === 0) {
-    // Tile is completely outside range -> EMPTY
-    // TODO: is it actually correct that the source even creates the tile ?
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  var sourceProjExtent = sourceProj.getExtent();
-  if (sourceProjExtent) {
-    if (!maxSourceExtent) {
-      maxSourceExtent = sourceProjExtent;
-    } else {
-      maxSourceExtent = ol.extent.getIntersection(
-          maxSourceExtent, sourceProjExtent);
-    }
-  }
-
-  var targetResolution = targetTileGrid.getResolution(
-      this.wrappedTileCoord_[0]);
-
-  var targetCenter = ol.extent.getCenter(limitedTargetExtent);
-  var sourceResolution = ol.reproj.calculateSourceResolution(
-      sourceProj, targetProj, targetCenter, targetResolution);
-
-  if (!isFinite(sourceResolution) || sourceResolution <= 0) {
-    // invalid sourceResolution -> EMPTY
-    // probably edges of the projections when no extent is defined
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  var errorThresholdInPixels = opt_errorThreshold !== undefined ?
-    opt_errorThreshold : ol.DEFAULT_RASTER_REPROJECTION_ERROR_THRESHOLD;
-
-  /**
-   * @private
-   * @type {!ol.reproj.Triangulation}
-   */
-  this.triangulation_ = new ol.reproj.Triangulation(
-      sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,
-      sourceResolution * errorThresholdInPixels);
-
-  if (this.triangulation_.getTriangles().length === 0) {
-    // no valid triangles -> EMPTY
-    this.state = ol.TileState.EMPTY;
-    return;
-  }
-
-  this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);
-  var sourceExtent = this.triangulation_.calculateSourceExtent();
-
-  if (maxSourceExtent) {
-    if (sourceProj.canWrapX()) {
-      sourceExtent[1] = ol.math.clamp(
-          sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);
-      sourceExtent[3] = ol.math.clamp(
-          sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);
-    } else {
-      sourceExtent = ol.extent.getIntersection(sourceExtent, maxSourceExtent);
-    }
-  }
-
-  if (!ol.extent.getArea(sourceExtent)) {
-    this.state = ol.TileState.EMPTY;
-  } else {
-    var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(
-        sourceExtent, this.sourceZ_);
-
-    for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {
-      for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {
-        var tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);
-        if (tile) {
-          this.sourceTiles_.push(tile);
-        }
-      }
-    }
-
-    if (this.sourceTiles_.length === 0) {
-      this.state = ol.TileState.EMPTY;
-    }
-  }
-};
-ol.inherits(ol.reproj.Tile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Tile.prototype.disposeInternal = function() {
-  if (this.state == ol.TileState.LOADING) {
-    this.unlistenSources_();
-  }
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Get the HTML Canvas element for this tile.
- * @return {HTMLCanvasElement} Canvas.
- */
-ol.reproj.Tile.prototype.getImage = function() {
-  return this.canvas_;
-};
-
-
-/**
- * @private
- */
-ol.reproj.Tile.prototype.reproject_ = function() {
-  var sources = [];
-  this.sourceTiles_.forEach(function(tile, i, arr) {
-    if (tile && tile.getState() == ol.TileState.LOADED) {
-      sources.push({
-        extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),
-        image: tile.getImage()
-      });
-    }
-  }, this);
-  this.sourceTiles_.length = 0;
-
-  if (sources.length === 0) {
-    this.state = ol.TileState.ERROR;
-  } else {
-    var z = this.wrappedTileCoord_[0];
-    var size = this.targetTileGrid_.getTileSize(z);
-    var width = typeof size === 'number' ? size : size[0];
-    var height = typeof size === 'number' ? size : size[1];
-    var targetResolution = this.targetTileGrid_.getResolution(z);
-    var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);
-
-    var targetExtent = this.targetTileGrid_.getTileCoordExtent(
-        this.wrappedTileCoord_);
-    this.canvas_ = ol.reproj.render(width, height, this.pixelRatio_,
-        sourceResolution, this.sourceTileGrid_.getExtent(),
-        targetResolution, targetExtent, this.triangulation_, sources,
-        this.gutter_, this.renderEdges_);
-
-    this.state = ol.TileState.LOADED;
-  }
-  this.changed();
-};
-
-
-/**
- * @inheritDoc
- */
-ol.reproj.Tile.prototype.load = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.state = ol.TileState.LOADING;
-    this.changed();
-
-    var leftToLoad = 0;
-
-    this.sourcesListenerKeys_ = [];
-    this.sourceTiles_.forEach(function(tile, i, arr) {
-      var state = tile.getState();
-      if (state == ol.TileState.IDLE || state == ol.TileState.LOADING) {
-        leftToLoad++;
-
-        var sourceListenKey;
-        sourceListenKey = ol.events.listen(tile, ol.events.EventType.CHANGE,
-            function(e) {
-              var state = tile.getState();
-              if (state == ol.TileState.LOADED ||
-                  state == ol.TileState.ERROR ||
-                  state == ol.TileState.EMPTY) {
-                ol.events.unlistenByKey(sourceListenKey);
-                leftToLoad--;
-                if (leftToLoad === 0) {
-                  this.unlistenSources_();
-                  this.reproject_();
-                }
-              }
-            }, this);
-        this.sourcesListenerKeys_.push(sourceListenKey);
-      }
-    }, this);
-
-    this.sourceTiles_.forEach(function(tile, i, arr) {
-      var state = tile.getState();
-      if (state == ol.TileState.IDLE) {
-        tile.load();
-      }
-    });
-
-    if (leftToLoad === 0) {
-      setTimeout(this.reproject_.bind(this), 0);
-    }
-  }
-};
-
-
-/**
- * @private
- */
-ol.reproj.Tile.prototype.unlistenSources_ = function() {
-  this.sourcesListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.sourcesListenerKeys_ = null;
-};
-
-goog.provide('ol.TileUrlFunction');
-
-goog.require('ol.asserts');
-goog.require('ol.math');
-goog.require('ol.tilecoord');
-
-
-/**
- * @param {string} template Template.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTemplate = function(template, tileGrid) {
-  var zRegEx = /\{z\}/g;
-  var xRegEx = /\{x\}/g;
-  var yRegEx = /\{y\}/g;
-  var dashYRegEx = /\{-y\}/g;
-  return (
-    /**
-     * @param {ol.TileCoord} tileCoord Tile Coordinate.
-     * @param {number} pixelRatio Pixel ratio.
-     * @param {ol.proj.Projection} projection Projection.
-     * @return {string|undefined} Tile URL.
-     */
-    function(tileCoord, pixelRatio, projection) {
-      if (!tileCoord) {
-        return undefined;
-      } else {
-        return template.replace(zRegEx, tileCoord[0].toString())
-            .replace(xRegEx, tileCoord[1].toString())
-            .replace(yRegEx, function() {
-              var y = -tileCoord[2] - 1;
-              return y.toString();
-            })
-            .replace(dashYRegEx, function() {
-              var z = tileCoord[0];
-              var range = tileGrid.getFullTileRange(z);
-              ol.asserts.assert(range, 55); // The {-y} placeholder requires a tile grid with extent
-              var y = range.getHeight() + tileCoord[2];
-              return y.toString();
-            });
-      }
-    });
-};
-
-
-/**
- * @param {Array.<string>} templates Templates.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTemplates = function(templates, tileGrid) {
-  var len = templates.length;
-  var tileUrlFunctions = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    tileUrlFunctions[i] = ol.TileUrlFunction.createFromTemplate(
-        templates[i], tileGrid);
-  }
-  return ol.TileUrlFunction.createFromTileUrlFunctions(tileUrlFunctions);
-};
-
-
-/**
- * @param {Array.<ol.TileUrlFunctionType>} tileUrlFunctions Tile URL Functions.
- * @return {ol.TileUrlFunctionType} Tile URL function.
- */
-ol.TileUrlFunction.createFromTileUrlFunctions = function(tileUrlFunctions) {
-  if (tileUrlFunctions.length === 1) {
-    return tileUrlFunctions[0];
-  }
-  return (
-    /**
-     * @param {ol.TileCoord} tileCoord Tile Coordinate.
-     * @param {number} pixelRatio Pixel ratio.
-     * @param {ol.proj.Projection} projection Projection.
-     * @return {string|undefined} Tile URL.
-     */
-    function(tileCoord, pixelRatio, projection) {
-      if (!tileCoord) {
-        return undefined;
-      } else {
-        var h = ol.tilecoord.hash(tileCoord);
-        var index = ol.math.modulo(h, tileUrlFunctions.length);
-        return tileUrlFunctions[index](tileCoord, pixelRatio, projection);
-      }
-    });
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {string|undefined} Tile URL.
- */
-ol.TileUrlFunction.nullTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-  return undefined;
-};
-
-
-/**
- * @param {string} url URL.
- * @return {Array.<string>} Array of urls.
- */
-ol.TileUrlFunction.expandUrl = function(url) {
-  var urls = [];
-  var match = /\{([a-z])-([a-z])\}/.exec(url);
-  if (match) {
-    // char range
-    var startCharCode = match[1].charCodeAt(0);
-    var stopCharCode = match[2].charCodeAt(0);
-    var charCode;
-    for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {
-      urls.push(url.replace(match[0], String.fromCharCode(charCode)));
-    }
-    return urls;
-  }
-  match = match = /\{(\d+)-(\d+)\}/.exec(url);
-  if (match) {
-    // number range
-    var stop = parseInt(match[2], 10);
-    for (var i = parseInt(match[1], 10); i <= stop; i++) {
-      urls.push(url.replace(match[0], i.toString()));
-    }
-    return urls;
-  }
-  urls.push(url);
-  return urls;
-};
-
-goog.provide('ol.TileCache');
-
-goog.require('ol');
-goog.require('ol.structs.LRUCache');
-goog.require('ol.tilecoord');
-
-
-/**
- * @constructor
- * @extends {ol.structs.LRUCache.<ol.Tile>}
- * @param {number=} opt_highWaterMark High water mark.
- * @struct
- */
-ol.TileCache = function(opt_highWaterMark) {
-
-  ol.structs.LRUCache.call(this, opt_highWaterMark);
-
-};
-ol.inherits(ol.TileCache, ol.structs.LRUCache);
-
-
-/**
- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
- */
-ol.TileCache.prototype.expireCache = function(usedTiles) {
-  var tile, zKey;
-  while (this.canExpireCache()) {
-    tile = this.peekLast();
-    zKey = tile.tileCoord[0].toString();
-    if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {
-      break;
-    } else {
-      this.pop().dispose();
-    }
-  }
-};
-
-
-/**
- * Prune all tiles from the cache that don't have the same z as the newest tile.
- */
-ol.TileCache.prototype.pruneExceptNewestZ = function() {
-  if (this.getCount() === 0) {
-    return;
-  }
-  var key = this.peekFirstKey();
-  var tileCoord = ol.tilecoord.fromKey(key);
-  var z = tileCoord[0];
-  this.forEach(function(tile) {
-    if (tile.tileCoord[0] !== z) {
-      this.remove(ol.tilecoord.getKey(tile.tileCoord));
-      tile.dispose();
-    }
-  }, this);
-};
-
-goog.provide('ol.source.Tile');
-
-goog.require('ol');
-goog.require('ol.TileCache');
-goog.require('ol.TileState');
-goog.require('ol.events.Event');
-goog.require('ol.proj');
-goog.require('ol.size');
-goog.require('ol.source.Source');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for sources providing images divided into a tile grid.
- *
- * @constructor
- * @abstract
- * @extends {ol.source.Source}
- * @param {ol.SourceTileOptions} options Tile source options.
- * @api
- */
-ol.source.Tile = function(options) {
-
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    state: options.state,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.opaque_ = options.opaque !== undefined ? options.opaque : false;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.tilePixelRatio_ = options.tilePixelRatio !== undefined ?
-    options.tilePixelRatio : 1;
-
-  /**
-   * @protected
-   * @type {ol.tilegrid.TileGrid}
-   */
-  this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;
-
-  /**
-   * @protected
-   * @type {ol.TileCache}
-   */
-  this.tileCache = new ol.TileCache(options.cacheSize);
-
-  /**
-   * @protected
-   * @type {ol.Size}
-   */
-  this.tmpSize = [0, 0];
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.key_ = '';
-
-  /**
-   * @protected
-   * @type {olx.TileOptions}
-   */
-  this.tileOptions = {transition: options.transition};
-
-};
-ol.inherits(ol.source.Tile, ol.source.Source);
-
-
-/**
- * @return {boolean} Can expire cache.
- */
-ol.source.Tile.prototype.canExpireCache = function() {
-  return this.tileCache.canExpireCache();
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object.<string, ol.TileRange>} usedTiles Used tiles.
- */
-ol.source.Tile.prototype.expireCache = function(projection, usedTiles) {
-  var tileCache = this.getTileCacheForProjection(projection);
-  if (tileCache) {
-    tileCache.expireCache(usedTiles);
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @param {number} z Zoom level.
- * @param {ol.TileRange} tileRange Tile range.
- * @param {function(ol.Tile):(boolean|undefined)} callback Called with each
- *     loaded tile.  If the callback returns `false`, the tile will not be
- *     considered loaded.
- * @return {boolean} The tile range is fully covered with loaded tiles.
- */
-ol.source.Tile.prototype.forEachLoadedTile = function(projection, z, tileRange, callback) {
-  var tileCache = this.getTileCacheForProjection(projection);
-  if (!tileCache) {
-    return false;
-  }
-
-  var covered = true;
-  var tile, tileCoordKey, loaded;
-  for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {
-    for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {
-      tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-      loaded = false;
-      if (tileCache.containsKey(tileCoordKey)) {
-        tile = /** @type {!ol.Tile} */ (tileCache.get(tileCoordKey));
-        loaded = tile.getState() === ol.TileState.LOADED;
-        if (loaded) {
-          loaded = (callback(tile) !== false);
-        }
-      }
-      if (!loaded) {
-        covered = false;
-      }
-    }
-  }
-  return covered;
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {number} Gutter.
- */
-ol.source.Tile.prototype.getGutter = function(projection) {
-  return 0;
-};
-
-
-/**
- * Return the key to be used for all tiles in the source.
- * @return {string} The key for all tiles.
- * @protected
- */
-ol.source.Tile.prototype.getKey = function() {
-  return this.key_;
-};
-
-
-/**
- * Set the value to be used as the key for all tiles in the source.
- * @param {string} key The key for tiles.
- * @protected
- */
-ol.source.Tile.prototype.setKey = function(key) {
-  if (this.key_ !== key) {
-    this.key_ = key;
-    this.changed();
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {boolean} Opaque.
- */
-ol.source.Tile.prototype.getOpaque = function(projection) {
-  return this.opaque_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Tile.prototype.getResolutions = function() {
-  return this.tileGrid.getResolutions();
-};
-
-
-/**
- * @abstract
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.Tile} Tile.
- */
-ol.source.Tile.prototype.getTile = function(z, x, y, pixelRatio, projection) {};
-
-
-/**
- * Return the tile grid of the tile source.
- * @return {ol.tilegrid.TileGrid} Tile grid.
- * @api
- */
-ol.source.Tile.prototype.getTileGrid = function() {
-  return this.tileGrid;
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {!ol.tilegrid.TileGrid} Tile grid.
- */
-ol.source.Tile.prototype.getTileGridForProjection = function(projection) {
-  if (!this.tileGrid) {
-    return ol.tilegrid.getForProjection(projection);
-  } else {
-    return this.tileGrid;
-  }
-};
-
-
-/**
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.TileCache} Tile cache.
- * @protected
- */
-ol.source.Tile.prototype.getTileCacheForProjection = function(projection) {
-  var thisProj = this.getProjection();
-  if (thisProj && !ol.proj.equivalent(thisProj, projection)) {
-    return null;
-  } else {
-    return this.tileCache;
-  }
-};
-
-
-/**
- * Get the tile pixel ratio for this source. Subclasses may override this
- * method, which is meant to return a supported pixel ratio that matches the
- * provided `pixelRatio` as close as possible.
- * @param {number} pixelRatio Pixel ratio.
- * @return {number} Tile pixel ratio.
- */
-ol.source.Tile.prototype.getTilePixelRatio = function(pixelRatio) {
-  return this.tilePixelRatio_;
-};
-
-
-/**
- * @param {number} z Z.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.Size} Tile size.
- */
-ol.source.Tile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
-  var tileGrid = this.getTileGridForProjection(projection);
-  var tilePixelRatio = this.getTilePixelRatio(pixelRatio);
-  var tileSize = ol.size.toSize(tileGrid.getTileSize(z), this.tmpSize);
-  if (tilePixelRatio == 1) {
-    return tileSize;
-  } else {
-    return ol.size.scale(tileSize, tilePixelRatio, this.tmpSize);
-  }
-};
-
-
-/**
- * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate
- * is outside the resolution and extent range of the tile grid, `null` will be
- * returned.
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.proj.Projection=} opt_projection Projection.
- * @return {ol.TileCoord} Tile coordinate to be passed to the tileUrlFunction or
- *     null if no tile URL should be created for the passed `tileCoord`.
- */
-ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, opt_projection) {
-  var projection = opt_projection !== undefined ?
-    opt_projection : this.getProjection();
-  var tileGrid = this.getTileGridForProjection(projection);
-  if (this.getWrapX() && projection.isGlobal()) {
-    tileCoord = ol.tilegrid.wrapX(tileGrid, tileCoord, projection);
-  }
-  return ol.tilecoord.withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Tile.prototype.refresh = function() {
-  this.tileCache.clear();
-  this.changed();
-};
-
-
-/**
- * Marks a tile coord as being used, without triggering a load.
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {ol.proj.Projection} projection Projection.
- */
-ol.source.Tile.prototype.useTile = ol.nullFunction;
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Tile} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.Tile.Event}
- * @param {string} type Type.
- * @param {ol.Tile} tile The tile.
- */
-ol.source.Tile.Event = function(type, tile) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The tile related to the event.
-   * @type {ol.Tile}
-   * @api
-   */
-  this.tile = tile;
-
-};
-ol.inherits(ol.source.Tile.Event, ol.events.Event);
-
-goog.provide('ol.source.TileEventType');
-
-/**
- * @enum {string}
- */
-ol.source.TileEventType = {
-
-  /**
-   * Triggered when a tile starts loading.
-   * @event ol.source.Tile.Event#tileloadstart
-   * @api
-   */
-  TILELOADSTART: 'tileloadstart',
-
-  /**
-   * Triggered when a tile finishes loading, either when its data is loaded,
-   * or when loading was aborted because the tile is no longer needed.
-   * @event ol.source.Tile.Event#tileloadend
-   * @api
-   */
-  TILELOADEND: 'tileloadend',
-
-  /**
-   * Triggered if tile loading results in an error.
-   * @event ol.source.Tile.Event#tileloaderror
-   * @api
-   */
-  TILELOADERROR: 'tileloaderror'
-
-};
-
-goog.provide('ol.source.UrlTile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.source.Tile');
-goog.require('ol.source.TileEventType');
-goog.require('ol.tilecoord');
-
-
-/**
- * @classdesc
- * Base class for sources providing tiles divided into a tile grid over http.
- *
- * @constructor
- * @abstract
- * @fires ol.source.Tile.Event
- * @extends {ol.source.Tile}
- * @param {ol.SourceUrlTileOptions} options Image tile options.
- */
-ol.source.UrlTile = function(options) {
-
-  ol.source.Tile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    extent: options.extent,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: options.projection,
-    state: options.state,
-    tileGrid: options.tileGrid,
-    tilePixelRatio: options.tilePixelRatio,
-    wrapX: options.wrapX,
-    transition: options.transition
-  });
-
-  /**
-   * @protected
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction = options.tileLoadFunction;
-
-  /**
-   * @protected
-   * @type {ol.TileUrlFunctionType}
-   */
-  this.tileUrlFunction = this.fixedTileUrlFunction ?
-    this.fixedTileUrlFunction.bind(this) :
-    ol.TileUrlFunction.nullTileUrlFunction;
-
-  /**
-   * @protected
-   * @type {!Array.<string>|null}
-   */
-  this.urls = null;
-
-  if (options.urls) {
-    this.setUrls(options.urls);
-  } else if (options.url) {
-    this.setUrl(options.url);
-  }
-  if (options.tileUrlFunction) {
-    this.setTileUrlFunction(options.tileUrlFunction);
-  }
-
-  /**
-   * @private
-   * @type {Object.<number, boolean>}
-   */
-  this.tileLoadingKeys_ = {};
-
-};
-ol.inherits(ol.source.UrlTile, ol.source.Tile);
-
-
-/**
- * @type {ol.TileUrlFunctionType|undefined}
- * @protected
- */
-ol.source.UrlTile.prototype.fixedTileUrlFunction;
-
-/**
- * Return the tile load function of the source.
- * @return {ol.TileLoadFunctionType} TileLoadFunction
- * @api
- */
-ol.source.UrlTile.prototype.getTileLoadFunction = function() {
-  return this.tileLoadFunction;
-};
-
-
-/**
- * Return the tile URL function of the source.
- * @return {ol.TileUrlFunctionType} TileUrlFunction
- * @api
- */
-ol.source.UrlTile.prototype.getTileUrlFunction = function() {
-  return this.tileUrlFunction;
-};
-
-
-/**
- * Return the URLs used for this source.
- * When a tileUrlFunction is used instead of url or urls,
- * null will be returned.
- * @return {!Array.<string>|null} URLs.
- * @api
- */
-ol.source.UrlTile.prototype.getUrls = function() {
-  return this.urls;
-};
-
-
-/**
- * Handle tile change events.
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.source.UrlTile.prototype.handleTileChange = function(event) {
-  var tile = /** @type {ol.Tile} */ (event.target);
-  var uid = ol.getUid(tile);
-  var tileState = tile.getState();
-  var type;
-  if (tileState == ol.TileState.LOADING) {
-    this.tileLoadingKeys_[uid] = true;
-    type = ol.source.TileEventType.TILELOADSTART;
-  } else if (uid in this.tileLoadingKeys_) {
-    delete this.tileLoadingKeys_[uid];
-    type = tileState == ol.TileState.ERROR ? ol.source.TileEventType.TILELOADERROR :
-      (tileState == ol.TileState.LOADED || tileState == ol.TileState.ABORT) ?
-        ol.source.TileEventType.TILELOADEND : undefined;
-  }
-  if (type != undefined) {
-    this.dispatchEvent(new ol.source.Tile.Event(type, tile));
-  }
-};
-
-
-/**
- * Set the tile load function of the source.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @api
- */
-ol.source.UrlTile.prototype.setTileLoadFunction = function(tileLoadFunction) {
-  this.tileCache.clear();
-  this.tileLoadFunction = tileLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the tile URL function of the source.
- * @param {ol.TileUrlFunctionType} tileUrlFunction Tile URL function.
- * @param {string=} opt_key Optional new tile key for the source.
- * @api
- */
-ol.source.UrlTile.prototype.setTileUrlFunction = function(tileUrlFunction, opt_key) {
-  this.tileUrlFunction = tileUrlFunction;
-  this.tileCache.pruneExceptNewestZ();
-  if (typeof opt_key !== 'undefined') {
-    this.setKey(opt_key);
-  } else {
-    this.changed();
-  }
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string} url URL.
- * @api
- */
-ol.source.UrlTile.prototype.setUrl = function(url) {
-  var urls = this.urls = ol.TileUrlFunction.expandUrl(url);
-  this.setTileUrlFunction(this.fixedTileUrlFunction ?
-    this.fixedTileUrlFunction.bind(this) :
-    ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), url);
-};
-
-
-/**
- * Set the URLs to use for requests.
- * @param {Array.<string>} urls URLs.
- * @api
- */
-ol.source.UrlTile.prototype.setUrls = function(urls) {
-  this.urls = urls;
-  var key = urls.join('\n');
-  this.setTileUrlFunction(this.fixedTileUrlFunction ?
-    this.fixedTileUrlFunction.bind(this) :
-    ol.TileUrlFunction.createFromTemplates(urls, this.tileGrid), key);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.UrlTile.prototype.useTile = function(z, x, y) {
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    this.tileCache.get(tileCoordKey);
-  }
-};
-
-goog.provide('ol.source.TileImage');
-
-goog.require('ol');
-goog.require('ol.ImageTile');
-goog.require('ol.TileCache');
-goog.require('ol.TileState');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.proj');
-goog.require('ol.reproj.Tile');
-goog.require('ol.source.UrlTile');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Base class for sources providing images divided into a tile grid.
- *
- * @constructor
- * @fires ol.source.Tile.Event
- * @extends {ol.source.UrlTile}
- * @param {olx.source.TileImageOptions} options Image tile options.
- * @api
- */
-ol.source.TileImage = function(options) {
-
-  ol.source.UrlTile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    extent: options.extent,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: options.projection,
-    state: options.state,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction ?
-      options.tileLoadFunction : ol.source.TileImage.defaultTileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: options.tileUrlFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX,
-    transition: options.transition
-  });
-
-  /**
-   * @protected
-   * @type {?string}
-   */
-  this.crossOrigin =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @protected
-   * @type {function(new: ol.ImageTile, ol.TileCoord, ol.TileState, string,
-   *        ?string, ol.TileLoadFunctionType, olx.TileOptions=)}
-   */
-  this.tileClass = options.tileClass !== undefined ?
-    options.tileClass : ol.ImageTile;
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.TileCache>}
-   */
-  this.tileCacheForProjection = {};
-
-  /**
-   * @protected
-   * @type {Object.<string, ol.tilegrid.TileGrid>}
-   */
-  this.tileGridForProjection = {};
-
-  /**
-   * @private
-   * @type {number|undefined}
-   */
-  this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.renderReprojectionEdges_ = false;
-};
-ol.inherits(ol.source.TileImage, ol.source.UrlTile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.canExpireCache = function() {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.canExpireCache.call(this);
-  }
-  if (this.tileCache.canExpireCache()) {
-    return true;
-  } else {
-    for (var key in this.tileCacheForProjection) {
-      if (this.tileCacheForProjection[key].canExpireCache()) {
-        return true;
-      }
-    }
-  }
-  return false;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.expireCache = function(projection, usedTiles) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    ol.source.UrlTile.prototype.expireCache.call(this, projection, usedTiles);
-    return;
-  }
-  var usedTileCache = this.getTileCacheForProjection(projection);
-
-  this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});
-  for (var id in this.tileCacheForProjection) {
-    var tileCache = this.tileCacheForProjection[id];
-    tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getGutter = function(projection) {
-  if (ol.ENABLE_RASTER_REPROJECTION &&
-      this.getProjection() && projection &&
-      !ol.proj.equivalent(this.getProjection(), projection)) {
-    return 0;
-  } else {
-    return this.getGutterInternal();
-  }
-};
-
-
-/**
- * @protected
- * @return {number} Gutter.
- */
-ol.source.TileImage.prototype.getGutterInternal = function() {
-  return 0;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getOpaque = function(projection) {
-  if (ol.ENABLE_RASTER_REPROJECTION &&
-      this.getProjection() && projection &&
-      !ol.proj.equivalent(this.getProjection(), projection)) {
-    return false;
-  } else {
-    return ol.source.UrlTile.prototype.getOpaque.call(this, projection);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTileGridForProjection = function(projection) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.getTileGridForProjection.call(this, projection);
-  }
-  var thisProj = this.getProjection();
-  if (this.tileGrid &&
-      (!thisProj || ol.proj.equivalent(thisProj, projection))) {
-    return this.tileGrid;
-  } else {
-    var projKey = ol.getUid(projection).toString();
-    if (!(projKey in this.tileGridForProjection)) {
-      this.tileGridForProjection[projKey] =
-          ol.tilegrid.getForProjection(projection);
-    }
-    return /** @type {!ol.tilegrid.TileGrid} */ (this.tileGridForProjection[projKey]);
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTileCacheForProjection = function(projection) {
-  if (!ol.ENABLE_RASTER_REPROJECTION) {
-    return ol.source.UrlTile.prototype.getTileCacheForProjection.call(this, projection);
-  }
-  var thisProj = this.getProjection();
-  if (!thisProj || ol.proj.equivalent(thisProj, projection)) {
-    return this.tileCache;
-  } else {
-    var projKey = ol.getUid(projection).toString();
-    if (!(projKey in this.tileCacheForProjection)) {
-      this.tileCacheForProjection[projKey] = new ol.TileCache(this.tileCache.highWaterMark);
-    }
-    return this.tileCacheForProjection[projKey];
-  }
-};
-
-
-/**
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {string} key The key set on the tile.
- * @return {!ol.Tile} Tile.
- * @private
- */
-ol.source.TileImage.prototype.createTile_ = function(z, x, y, pixelRatio, projection, key) {
-  var tileCoord = [z, x, y];
-  var urlTileCoord = this.getTileCoordForTileUrlFunction(
-      tileCoord, projection);
-  var tileUrl = urlTileCoord ?
-    this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;
-  var tile = new this.tileClass(
-      tileCoord,
-      tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
-      tileUrl !== undefined ? tileUrl : '',
-      this.crossOrigin,
-      this.tileLoadFunction,
-      this.tileOptions);
-  tile.key = key;
-  ol.events.listen(tile, ol.events.EventType.CHANGE,
-      this.handleTileChange, this);
-  return tile;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileImage.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  var sourceProjection = /** @type {!ol.proj.Projection} */ (this.getProjection());
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      !sourceProjection || !projection ||
-      ol.proj.equivalent(sourceProjection, projection)) {
-    return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);
-  } else {
-    var cache = this.getTileCacheForProjection(projection);
-    var tileCoord = [z, x, y];
-    var tile;
-    var tileCoordKey = ol.tilecoord.getKey(tileCoord);
-    if (cache.containsKey(tileCoordKey)) {
-      tile = /** @type {!ol.Tile} */ (cache.get(tileCoordKey));
-    }
-    var key = this.getKey();
-    if (tile && tile.key == key) {
-      return tile;
-    } else {
-      var sourceTileGrid = this.getTileGridForProjection(sourceProjection);
-      var targetTileGrid = this.getTileGridForProjection(projection);
-      var wrappedTileCoord =
-          this.getTileCoordForTileUrlFunction(tileCoord, projection);
-      var newTile = new ol.reproj.Tile(
-          sourceProjection, sourceTileGrid,
-          projection, targetTileGrid,
-          tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),
-          this.getGutterInternal(),
-          function(z, x, y, pixelRatio) {
-            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);
-          }.bind(this), this.reprojectionErrorThreshold_,
-          this.renderReprojectionEdges_);
-      newTile.key = key;
-
-      if (tile) {
-        newTile.interimTile = tile;
-        newTile.refreshInterimChain();
-        cache.replace(tileCoordKey, newTile);
-      } else {
-        cache.set(tileCoordKey, newTile);
-      }
-      return newTile;
-    }
-  }
-};
-
-
-/**
- * @param {number} z Tile coordinate z.
- * @param {number} x Tile coordinate x.
- * @param {number} y Tile coordinate y.
- * @param {number} pixelRatio Pixel ratio.
- * @param {!ol.proj.Projection} projection Projection.
- * @return {!ol.Tile} Tile.
- * @protected
- */
-ol.source.TileImage.prototype.getTileInternal = function(z, x, y, pixelRatio, projection) {
-  var tile = null;
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  var key = this.getKey();
-  if (!this.tileCache.containsKey(tileCoordKey)) {
-    tile = this.createTile_(z, x, y, pixelRatio, projection, key);
-    this.tileCache.set(tileCoordKey, tile);
-  } else {
-    tile = this.tileCache.get(tileCoordKey);
-    if (tile.key != key) {
-      // The source's params changed. If the tile has an interim tile and if we
-      // can use it then we use it. Otherwise we create a new tile.  In both
-      // cases we attempt to assign an interim tile to the new tile.
-      var interimTile = tile;
-      tile = this.createTile_(z, x, y, pixelRatio, projection, key);
-
-      //make the new tile the head of the list,
-      if (interimTile.getState() == ol.TileState.IDLE) {
-        //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it
-        tile.interimTile = interimTile.interimTile;
-      } else {
-        tile.interimTile = interimTile;
-      }
-      tile.refreshInterimChain();
-      this.tileCache.replace(tileCoordKey, tile);
-    }
-  }
-  return tile;
-};
-
-
-/**
- * Sets whether to render reprojection edges or not (usually for debugging).
- * @param {boolean} render Render the edges.
- * @api
- */
-ol.source.TileImage.prototype.setRenderReprojectionEdges = function(render) {
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      this.renderReprojectionEdges_ == render) {
-    return;
-  }
-  this.renderReprojectionEdges_ = render;
-  for (var id in this.tileCacheForProjection) {
-    this.tileCacheForProjection[id].clear();
-  }
-  this.changed();
-};
-
-
-/**
- * Sets the tile grid to use when reprojecting the tiles to the given
- * projection instead of the default tile grid for the projection.
- *
- * This can be useful when the default tile grid cannot be created
- * (e.g. projection has no extent defined) or
- * for optimization reasons (custom tile size, resolutions, ...).
- *
- * @param {ol.ProjectionLike} projection Projection.
- * @param {ol.tilegrid.TileGrid} tilegrid Tile grid to use for the projection.
- * @api
- */
-ol.source.TileImage.prototype.setTileGridForProjection = function(projection, tilegrid) {
-  if (ol.ENABLE_RASTER_REPROJECTION) {
-    var proj = ol.proj.get(projection);
-    if (proj) {
-      var projKey = ol.getUid(proj).toString();
-      if (!(projKey in this.tileGridForProjection)) {
-        this.tileGridForProjection[projKey] = tilegrid;
-      }
-    }
-  }
-};
-
-
-/**
- * @param {ol.ImageTile} imageTile Image tile.
- * @param {string} src Source.
- */
-ol.source.TileImage.defaultTileLoadFunction = function(imageTile, src) {
-  imageTile.getImage().src = src;
-};
-
-goog.provide('ol.source.BingMaps');
-
-goog.require('ol');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for Bing Maps tile data.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.BingMapsOptions} options Bing Maps options.
- * @api
- */
-ol.source.BingMaps = function(options) {
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : false;
-
-  ol.source.TileImage.call(this, {
-    cacheSize: options.cacheSize,
-    crossOrigin: 'anonymous',
-    opaque: true,
-    projection: ol.proj.get('EPSG:3857'),
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    state: ol.source.State.LOADING,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: this.hidpi_ ? 2 : 1,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true,
-    transition: options.transition
-  });
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.culture_ = options.culture !== undefined ? options.culture : 'en-us';
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.apiKey_ = options.key;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.imagerySet_ = options.imagerySet;
-
-  var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +
-      this.imagerySet_ +
-      '?uriScheme=https&include=ImageryProviders&key=' + this.apiKey_ +
-      '&c=' + this.culture_;
-
-  ol.net.jsonp(url, this.handleImageryMetadataResponse.bind(this), undefined,
-      'jsonp');
-
-};
-ol.inherits(ol.source.BingMaps, ol.source.TileImage);
-
-
-/**
- * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’
- * Terms Of Use.
- * @const
- * @type {string}
- * @api
- */
-ol.source.BingMaps.TOS_ATTRIBUTION = '<a class="ol-attribution-bing-tos" ' +
-      'href="https://www.microsoft.com/maps/product/terms.html">' +
-      'Terms of Use</a>';
-
-
-/**
- * Get the api key used for this source.
- *
- * @return {string} The api key.
- * @api
- */
-ol.source.BingMaps.prototype.getApiKey = function() {
-  return this.apiKey_;
-};
-
-
-/**
- * Get the imagery set associated with this source.
- *
- * @return {string} The imagery set.
- * @api
- */
-ol.source.BingMaps.prototype.getImagerySet = function() {
-  return this.imagerySet_;
-};
-
-
-/**
- * @param {BingMapsImageryMetadataResponse} response Response.
- */
-ol.source.BingMaps.prototype.handleImageryMetadataResponse = function(response) {
-  if (response.statusCode != 200 ||
-      response.statusDescription != 'OK' ||
-      response.authenticationResultCode != 'ValidCredentials' ||
-      response.resourceSets.length != 1 ||
-      response.resourceSets[0].resources.length != 1) {
-    this.setState(ol.source.State.ERROR);
-    return;
-  }
-
-  var brandLogoUri = response.brandLogoUri;
-  if (brandLogoUri.indexOf('https') == -1) {
-    brandLogoUri = brandLogoUri.replace('http', 'https');
-  }
-  //var copyright = response.copyright;  // FIXME do we need to display this?
-  var resource = response.resourceSets[0].resources[0];
-  var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;
-
-  var sourceProjection = this.getProjection();
-  var extent = ol.tilegrid.extentFromProjection(sourceProjection);
-  var tileSize = resource.imageWidth == resource.imageHeight ?
-    resource.imageWidth : [resource.imageWidth, resource.imageHeight];
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: extent,
-    minZoom: resource.zoomMin,
-    maxZoom: maxZoom,
-    tileSize: tileSize / (this.hidpi_ ? 2 : 1)
-  });
-  this.tileGrid = tileGrid;
-
-  var culture = this.culture_;
-  var hidpi = this.hidpi_;
-  this.tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(
-      resource.imageUrlSubdomains.map(function(subdomain) {
-        var quadKeyTileCoord = [0, 0, 0];
-        var imageUrl = resource.imageUrl
-            .replace('{subdomain}', subdomain)
-            .replace('{culture}', culture);
-        return (
-          /**
-           * @param {ol.TileCoord} tileCoord Tile coordinate.
-           * @param {number} pixelRatio Pixel ratio.
-           * @param {ol.proj.Projection} projection Projection.
-           * @return {string|undefined} Tile URL.
-           */
-          function(tileCoord, pixelRatio, projection) {
-            if (!tileCoord) {
-              return undefined;
-            } else {
-              ol.tilecoord.createOrUpdate(tileCoord[0], tileCoord[1],
-                  -tileCoord[2] - 1, quadKeyTileCoord);
-              var url = imageUrl;
-              if (hidpi) {
-                url += '&dpi=d1&device=mobile';
-              }
-              return url.replace('{quadkey}', ol.tilecoord.quadKey(
-                  quadKeyTileCoord));
-            }
-          });
-      }));
-
-  if (resource.imageryProviders) {
-    var transform = ol.proj.getTransformFromProjections(
-        ol.proj.get('EPSG:4326'), this.getProjection());
-
-    this.setAttributions(function(frameState) {
-      var attributions = [];
-      var zoom = frameState.viewState.zoom;
-      resource.imageryProviders.map(function(imageryProvider) {
-        var intersects = false;
-        var coverageAreas = imageryProvider.coverageAreas;
-        for (var i = 0, ii = coverageAreas.length; i < ii; ++i) {
-          var coverageArea = coverageAreas[i];
-          if (zoom >= coverageArea.zoomMin && zoom <= coverageArea.zoomMax) {
-            var bbox = coverageArea.bbox;
-            var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];
-            var extent = ol.extent.applyTransform(epsg4326Extent, transform);
-            if (ol.extent.intersects(extent, frameState.extent)) {
-              intersects = true;
-              break;
-            }
-          }
-        }
-        if (intersects) {
-          attributions.push(imageryProvider.attribution);
-        }
-      });
-
-      attributions.push(ol.source.BingMaps.TOS_ATTRIBUTION);
-      return attributions;
-    });
-  }
-
-  this.setLogo(brandLogoUri);
-
-  this.setState(ol.source.State.READY);
-};
-
-goog.provide('ol.source.XYZ');
-
-goog.require('ol');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data with URLs in a set XYZ format that are
- * defined in a URL template. By default, this follows the widely-used
- * Google grid where `x` 0 and `y` 0 are in the top left. Grids like
- * TMS where `x` 0 and `y` 0 are in the bottom left can be used by
- * using the `{-y}` placeholder in the URL template, so long as the
- * source does not have a custom tile grid. In this case,
- * {@link ol.source.TileImage} can be used with a `tileUrlFunction`
- * such as:
- *
- *  tileUrlFunction: function(coordinate) {
- *    return 'http://mapserver.com/' + coordinate[0] + '/' +
- *        coordinate[1] + '/' + coordinate[2] + '.png';
- *    }
- *
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.XYZOptions=} opt_options XYZ options.
- * @api
- */
-ol.source.XYZ = function(opt_options) {
-  var options = opt_options || {};
-  var projection = options.projection !== undefined ?
-    options.projection : 'EPSG:3857';
-
-  var tileGrid = options.tileGrid !== undefined ? options.tileGrid :
-    ol.tilegrid.createXYZ({
-      extent: ol.tilegrid.extentFromProjection(projection),
-      maxZoom: options.maxZoom,
-      minZoom: options.minZoom,
-      tileSize: options.tileSize
-    });
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    opaque: options.opaque,
-    projection: projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileGrid: tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: options.tileUrlFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true,
-    transition: options.transition
-  });
-
-};
-ol.inherits(ol.source.XYZ, ol.source.TileImage);
-
-goog.provide('ol.source.CartoDB');
-
-goog.require('ol');
-goog.require('ol.obj');
-goog.require('ol.source.State');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the CartoDB Maps API.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.CartoDBOptions} options CartoDB options.
- * @api
- */
-ol.source.CartoDB = function(options) {
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.account_ = options.account;
-
-  /**
-   * @type {string}
-   * @private
-   */
-  this.mapId_ = options.map || '';
-
-  /**
-   * @type {!Object}
-   * @private
-   */
-  this.config_ = options.config || {};
-
-  /**
-   * @type {!Object.<string, CartoDBLayerInfo>}
-   * @private
-   */
-  this.templateCache_ = {};
-
-  ol.source.XYZ.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,
-    minZoom: options.minZoom,
-    projection: options.projection,
-    state: ol.source.State.LOADING,
-    wrapX: options.wrapX
-  });
-  this.initializeMap_();
-};
-ol.inherits(ol.source.CartoDB, ol.source.XYZ);
-
-
-/**
- * Returns the current config.
- * @return {!Object} The current configuration.
- * @api
- */
-ol.source.CartoDB.prototype.getConfig = function() {
-  return this.config_;
-};
-
-
-/**
- * Updates the carto db config.
- * @param {Object} config a key-value lookup. Values will replace current values
- *     in the config.
- * @api
- */
-ol.source.CartoDB.prototype.updateConfig = function(config) {
-  ol.obj.assign(this.config_, config);
-  this.initializeMap_();
-};
-
-
-/**
- * Sets the CartoDB config
- * @param {Object} config In the case of anonymous maps, a CartoDB configuration
- *     object.
- * If using named maps, a key-value lookup with the template parameters.
- * @api
- */
-ol.source.CartoDB.prototype.setConfig = function(config) {
-  this.config_ = config || {};
-  this.initializeMap_();
-};
-
-
-/**
- * Issue a request to initialize the CartoDB map.
- * @private
- */
-ol.source.CartoDB.prototype.initializeMap_ = function() {
-  var paramHash = JSON.stringify(this.config_);
-  if (this.templateCache_[paramHash]) {
-    this.applyTemplate_(this.templateCache_[paramHash]);
-    return;
-  }
-  var mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';
-
-  if (this.mapId_) {
-    mapUrl += '/named/' + this.mapId_;
-  }
-
-  var client = new XMLHttpRequest();
-  client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));
-  client.addEventListener('error', this.handleInitError_.bind(this));
-  client.open('POST', mapUrl);
-  client.setRequestHeader('Content-type', 'application/json');
-  client.send(JSON.stringify(this.config_));
-};
-
-
-/**
- * Handle map initialization response.
- * @param {string} paramHash a hash representing the parameter set that was used
- *     for the request
- * @param {Event} event Event.
- * @private
- */
-ol.source.CartoDB.prototype.handleInitResponse_ = function(paramHash, event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {CartoDBLayerInfo} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.setState(ol.source.State.ERROR);
-      return;
-    }
-    this.applyTemplate_(response);
-    this.templateCache_[paramHash] = response;
-    this.setState(ol.source.State.READY);
-  } else {
-    this.setState(ol.source.State.ERROR);
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event Event.
- */
-ol.source.CartoDB.prototype.handleInitError_ = function(event) {
-  this.setState(ol.source.State.ERROR);
-};
-
-
-/**
- * Apply the new tile urls returned by carto db
- * @param {CartoDBLayerInfo} data Result of carto db call.
- * @private
- */
-ol.source.CartoDB.prototype.applyTemplate_ = function(data) {
-  var tilesUrl = 'https://' + data.cdn_url.https + '/' + this.account_ +
-      '/api/v1/map/' + data.layergroupid + '/{z}/{x}/{y}.png';
-  this.setUrl(tilesUrl);
-};
-
-// FIXME keep cluster cache by resolution ?
-// FIXME distance not respected because of the centroid
-
-goog.provide('ol.source.Cluster');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.Feature');
-goog.require('ol.coordinate');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.geom.Point');
-goog.require('ol.source.Vector');
-
-
-/**
- * @classdesc
- * Layer source to cluster vector data. Works out of the box with point
- * geometries. For other geometry types, or if not all geometries should be
- * considered for clustering, a custom `geometryFunction` can be defined.
- *
- * @constructor
- * @param {olx.source.ClusterOptions} options Constructor options.
- * @extends {ol.source.Vector}
- * @api
- */
-ol.source.Cluster = function(options) {
-  ol.source.Vector.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    wrapX: options.wrapX
-  });
-
-  /**
-   * @type {number|undefined}
-   * @protected
-   */
-  this.resolution = undefined;
-
-  /**
-   * @type {number}
-   * @protected
-   */
-  this.distance = options.distance !== undefined ? options.distance : 20;
-
-  /**
-   * @type {Array.<ol.Feature>}
-   * @protected
-   */
-  this.features = [];
-
-  /**
-   * @param {ol.Feature} feature Feature.
-   * @return {ol.geom.Point} Cluster calculation point.
-   * @protected
-   */
-  this.geometryFunction = options.geometryFunction || function(feature) {
-    var geometry = /** @type {ol.geom.Point} */ (feature.getGeometry());
-    ol.asserts.assert(geometry instanceof ol.geom.Point,
-        10); // The default `geometryFunction` can only handle `ol.geom.Point` geometries
-    return geometry;
-  };
-
-  /**
-   * @type {ol.source.Vector}
-   * @protected
-   */
-  this.source = options.source;
-
-  this.source.on(ol.events.EventType.CHANGE,
-      ol.source.Cluster.prototype.refresh, this);
-};
-ol.inherits(ol.source.Cluster, ol.source.Vector);
-
-
-/**
- * Get the distance in pixels between clusters.
- * @return {number} Distance.
- * @api
- */
-ol.source.Cluster.prototype.getDistance = function() {
-  return this.distance;
-};
-
-
-/**
- * Get a reference to the wrapped source.
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.source.Cluster.prototype.getSource = function() {
-  return this.source;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Cluster.prototype.loadFeatures = function(extent, resolution,
-    projection) {
-  this.source.loadFeatures(extent, resolution, projection);
-  if (resolution !== this.resolution) {
-    this.clear();
-    this.resolution = resolution;
-    this.cluster();
-    this.addFeatures(this.features);
-  }
-};
-
-
-/**
- * Set the distance in pixels between clusters.
- * @param {number} distance The distance in pixels.
- * @api
- */
-ol.source.Cluster.prototype.setDistance = function(distance) {
-  this.distance = distance;
-  this.refresh();
-};
-
-
-/**
- * handle the source changing
- * @override
- */
-ol.source.Cluster.prototype.refresh = function() {
-  this.clear();
-  this.cluster();
-  this.addFeatures(this.features);
-  ol.source.Vector.prototype.refresh.call(this);
-};
-
-
-/**
- * @protected
- */
-ol.source.Cluster.prototype.cluster = function() {
-  if (this.resolution === undefined) {
-    return;
-  }
-  this.features.length = 0;
-  var extent = ol.extent.createEmpty();
-  var mapDistance = this.distance * this.resolution;
-  var features = this.source.getFeatures();
-
-  /**
-   * @type {!Object.<string, boolean>}
-   */
-  var clustered = {};
-
-  for (var i = 0, ii = features.length; i < ii; i++) {
-    var feature = features[i];
-    if (!(ol.getUid(feature).toString() in clustered)) {
-      var geometry = this.geometryFunction(feature);
-      if (geometry) {
-        var coordinates = geometry.getCoordinates();
-        ol.extent.createOrUpdateFromCoordinate(coordinates, extent);
-        ol.extent.buffer(extent, mapDistance, extent);
-
-        var neighbors = this.source.getFeaturesInExtent(extent);
-        neighbors = neighbors.filter(function(neighbor) {
-          var uid = ol.getUid(neighbor).toString();
-          if (!(uid in clustered)) {
-            clustered[uid] = true;
-            return true;
-          } else {
-            return false;
-          }
-        });
-        this.features.push(this.createCluster(neighbors));
-      }
-    }
-  }
-};
-
-
-/**
- * @param {Array.<ol.Feature>} features Features
- * @return {ol.Feature} The cluster feature.
- * @protected
- */
-ol.source.Cluster.prototype.createCluster = function(features) {
-  var centroid = [0, 0];
-  for (var i = features.length - 1; i >= 0; --i) {
-    var geometry = this.geometryFunction(features[i]);
-    if (geometry) {
-      ol.coordinate.add(centroid, geometry.getCoordinates());
-    } else {
-      features.splice(i, 1);
-    }
-  }
-  ol.coordinate.scale(centroid, 1 / features.length);
-
-  var cluster = new ol.Feature(new ol.geom.Point(centroid));
-  cluster.set('features', features);
-  return cluster;
-};
-
-goog.provide('ol.source.Image');
-
-goog.require('ol');
-goog.require('ol.ImageState');
-goog.require('ol.array');
-goog.require('ol.events.Event');
-goog.require('ol.extent');
-goog.require('ol.proj');
-goog.require('ol.reproj.Image');
-goog.require('ol.source.Source');
-
-
-/**
- * @classdesc
- * Abstract base class; normally only used for creating subclasses and not
- * instantiated in apps.
- * Base class for sources providing a single image.
- *
- * @constructor
- * @abstract
- * @extends {ol.source.Source}
- * @param {ol.SourceImageOptions} options Single image source options.
- * @api
- */
-ol.source.Image = function(options) {
-  ol.source.Source.call(this, {
-    attributions: options.attributions,
-    extent: options.extent,
-    logo: options.logo,
-    projection: options.projection,
-    state: options.state
-  });
-
-  /**
-   * @private
-   * @type {Array.<number>}
-   */
-  this.resolutions_ = options.resolutions !== undefined ?
-    options.resolutions : null;
-
-
-  /**
-   * @private
-   * @type {ol.reproj.Image}
-   */
-  this.reprojectedImage_ = null;
-
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.reprojectedRevision_ = 0;
-};
-ol.inherits(ol.source.Image, ol.source.Source);
-
-
-/**
- * @return {Array.<number>} Resolutions.
- * @override
- */
-ol.source.Image.prototype.getResolutions = function() {
-  return this.resolutions_;
-};
-
-
-/**
- * @protected
- * @param {number} resolution Resolution.
- * @return {number} Resolution.
- */
-ol.source.Image.prototype.findNearestResolution = function(resolution) {
-  if (this.resolutions_) {
-    var idx = ol.array.linearFindNearest(this.resolutions_, resolution, 0);
-    resolution = this.resolutions_[idx];
-  }
-  return resolution;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.ImageBase} Single image.
- */
-ol.source.Image.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
-  var sourceProjection = this.getProjection();
-  if (!ol.ENABLE_RASTER_REPROJECTION ||
-      !sourceProjection ||
-      !projection ||
-      ol.proj.equivalent(sourceProjection, projection)) {
-    if (sourceProjection) {
-      projection = sourceProjection;
-    }
-    return this.getImageInternal(extent, resolution, pixelRatio, projection);
-  } else {
-    if (this.reprojectedImage_) {
-      if (this.reprojectedRevision_ == this.getRevision() &&
-          ol.proj.equivalent(
-              this.reprojectedImage_.getProjection(), projection) &&
-          this.reprojectedImage_.getResolution() == resolution &&
-          ol.extent.equals(this.reprojectedImage_.getExtent(), extent)) {
-        return this.reprojectedImage_;
-      }
-      this.reprojectedImage_.dispose();
-      this.reprojectedImage_ = null;
-    }
-
-    this.reprojectedImage_ = new ol.reproj.Image(
-        sourceProjection, projection, extent, resolution, pixelRatio,
-        function(extent, resolution, pixelRatio) {
-          return this.getImageInternal(extent, resolution,
-              pixelRatio, sourceProjection);
-        }.bind(this));
-    this.reprojectedRevision_ = this.getRevision();
-
-    return this.reprojectedImage_;
-  }
-};
-
-
-/**
- * @abstract
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @return {ol.ImageBase} Single image.
- * @protected
- */
-ol.source.Image.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {};
-
-
-/**
- * Handle image change events.
- * @param {ol.events.Event} event Event.
- * @protected
- */
-ol.source.Image.prototype.handleImageChange = function(event) {
-  var image = /** @type {ol.Image} */ (event.target);
-  switch (image.getState()) {
-    case ol.ImageState.LOADING:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADSTART,
-              image));
-      break;
-    case ol.ImageState.LOADED:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADEND,
-              image));
-      break;
-    case ol.ImageState.ERROR:
-      this.dispatchEvent(
-          new ol.source.Image.Event(ol.source.Image.EventType_.IMAGELOADERROR,
-              image));
-      break;
-    default:
-      // pass
-  }
-};
-
-
-/**
- * Default image load function for image sources that use ol.Image image
- * instances.
- * @param {ol.Image} image Image.
- * @param {string} src Source.
- */
-ol.source.Image.defaultImageLoadFunction = function(image, src) {
-  image.getImage().src = src;
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Image} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.ImageEvent}
- * @param {string} type Type.
- * @param {ol.Image} image The image.
- */
-ol.source.Image.Event = function(type, image) {
-
-  ol.events.Event.call(this, type);
-
-  /**
-   * The image related to the event.
-   * @type {ol.Image}
-   * @api
-   */
-  this.image = image;
-
-};
-ol.inherits(ol.source.Image.Event, ol.events.Event);
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Image.EventType_ = {
-
-  /**
-   * Triggered when an image starts loading.
-   * @event ol.source.Image.Event#imageloadstart
-   * @api
-   */
-  IMAGELOADSTART: 'imageloadstart',
-
-  /**
-   * Triggered when an image finishes loading.
-   * @event ol.source.Image.Event#imageloadend
-   * @api
-   */
-  IMAGELOADEND: 'imageloadend',
-
-  /**
-   * Triggered if image loading results in an error.
-   * @event ol.source.Image.Event#imageloaderror
-   * @api
-   */
-  IMAGELOADERROR: 'imageloaderror'
-
-};
-
-goog.provide('ol.uri');
-
-
-/**
- * Appends query parameters to a URI.
- *
- * @param {string} uri The original URI, which may already have query data.
- * @param {!Object} params An object where keys are URI-encoded parameter keys,
- *     and the values are arbitrary types or arrays.
- * @return {string} The new URI.
- */
-ol.uri.appendParams = function(uri, params) {
-  var keyParams = [];
-  // Skip any null or undefined parameter values
-  Object.keys(params).forEach(function(k) {
-    if (params[k] !== null && params[k] !== undefined) {
-      keyParams.push(k + '=' + encodeURIComponent(params[k]));
-    }
-  });
-  var qs = keyParams.join('&');
-  // remove any trailing ? or &
-  uri = uri.replace(/[?&]$/, '');
-  // append ? or & depending on whether uri has existing parameters
-  uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';
-  return uri + qs;
-};
-
-goog.provide('ol.source.ImageArcGISRest');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.source.Image');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for data from ArcGIS Rest services providing single, untiled images.
- * Useful when underlying map service has labels.
- *
- * If underlying map service is not using labels,
- * take advantage of ol image caching and use
- * {@link ol.source.TileArcGISRest} data source.
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageArcGISRestOptions=} opt_options Image ArcGIS Rest Options.
- * @api
- */
-ol.source.ImageArcGISRest = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-    options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = [0, 0];
-
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageArcGISRest, ol.source.Image);
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageArcGISRest.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-
-  if (this.url_ === undefined) {
-    return null;
-  }
-
-  resolution = this.findNearestResolution(resolution);
-  pixelRatio = this.hidpi_ ? pixelRatio : 1;
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), extent)) {
-    return image;
-  }
-
-  var params = {
-    'F': 'image',
-    'FORMAT': 'PNG32',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(params, this.params_);
-
-  extent = extent.slice();
-  var centerX = (extent[0] + extent[2]) / 2;
-  var centerY = (extent[1] + extent[3]) / 2;
-  if (this.ratio_ != 1) {
-    var halfWidth = this.ratio_ * ol.extent.getWidth(extent) / 2;
-    var halfHeight = this.ratio_ * ol.extent.getHeight(extent) / 2;
-    extent[0] = centerX - halfWidth;
-    extent[1] = centerY - halfHeight;
-    extent[2] = centerX + halfWidth;
-    extent[3] = centerY + halfHeight;
-  }
-
-  var imageResolution = resolution / pixelRatio;
-
-  // Compute an integer width and height.
-  var width = Math.ceil(ol.extent.getWidth(extent) / imageResolution);
-  var height = Math.ceil(ol.extent.getHeight(extent) / imageResolution);
-
-  // Modify the extent to match the integer width and height.
-  extent[0] = centerX - imageResolution * width / 2;
-  extent[2] = centerX + imageResolution * width / 2;
-  extent[1] = centerY - imageResolution * height / 2;
-  extent[3] = centerY + imageResolution * height / 2;
-
-  this.imageSize_[0] = width;
-  this.imageSize_[1] = height;
-
-  var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio,
-      projection, params);
-
-  this.image_ = new ol.Image(extent, resolution, pixelRatio,
-      url, this.crossOrigin_, this.imageLoadFunction_);
-
-  this.renderedRevision_ = this.getRevision();
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-  return this.image_;
-
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string} Request URL.
- * @private
- */
-ol.source.ImageArcGISRest.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
-  // ArcGIS Server only wants the numeric portion of the projection ID.
-  var srid = projection.getCode().split(':').pop();
-
-  params['SIZE'] = size[0] + ',' + size[1];
-  params['BBOX'] = extent.join(',');
-  params['BBOXSR'] = srid;
-  params['IMAGESR'] = srid;
-  params['DPI'] = Math.round(90 * pixelRatio);
-
-  var url = this.url_;
-
-  var modifiedUrl = url
-      .replace(/MapServer\/?$/, 'MapServer/export')
-      .replace(/ImageServer\/?$/, 'ImageServer/exportImage');
-  if (modifiedUrl == url) {
-    ol.asserts.assert(false, 50); // `options.featureTypes` should be an Array
-  }
-  return ol.uri.appendParams(modifiedUrl, params);
-};
-
-
-/**
- * Return the URL used for this ArcGIS source.
- * @return {string|undefined} URL.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * Set the image load function of the source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.setImageLoadFunction = function(imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string|undefined} url URL.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.setUrl = function(url) {
-  if (url != this.url_) {
-    this.url_ = url;
-    this.image_ = null;
-    this.changed();
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageArcGISRest.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.image_ = null;
-  this.changed();
-};
-
-goog.provide('ol.source.ImageCanvas');
-
-goog.require('ol');
-goog.require('ol.ImageCanvas');
-goog.require('ol.extent');
-goog.require('ol.source.Image');
-
-
-/**
- * @classdesc
- * Base class for image sources where a canvas element is the image.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @param {olx.source.ImageCanvasOptions} options Constructor options.
- * @api
- */
-ol.source.ImageCanvas = function(options) {
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions,
-    state: options.state
-  });
-
-  /**
-   * @private
-   * @type {ol.CanvasFunctionType}
-   */
-  this.canvasFunction_ = options.canvasFunction;
-
-  /**
-   * @private
-   * @type {ol.ImageCanvas}
-   */
-  this.canvas_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ?
-    options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageCanvas, ol.source.Image);
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageCanvas.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  resolution = this.findNearestResolution(resolution);
-
-  var canvas = this.canvas_;
-  if (canvas &&
-      this.renderedRevision_ == this.getRevision() &&
-      canvas.getResolution() == resolution &&
-      canvas.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(canvas.getExtent(), extent)) {
-    return canvas;
-  }
-
-  extent = extent.slice();
-  ol.extent.scaleFromCenter(extent, this.ratio_);
-  var width = ol.extent.getWidth(extent) / resolution;
-  var height = ol.extent.getHeight(extent) / resolution;
-  var size = [width * pixelRatio, height * pixelRatio];
-
-  var canvasElement = this.canvasFunction_(
-      extent, resolution, pixelRatio, size, projection);
-  if (canvasElement) {
-    canvas = new ol.ImageCanvas(extent, resolution, pixelRatio, canvasElement);
-  }
-  this.canvas_ = canvas;
-  this.renderedRevision_ = this.getRevision();
-
-  return canvas;
-};
-
-goog.provide('ol.source.ImageMapGuide');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.source.Image');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for images from Mapguide servers
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageMapGuideOptions} options Options.
- * @api
- */
-ol.source.ImageMapGuide = function(options) {
-
-  ol.source.Image.call(this, {
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.displayDpi_ = options.displayDpi !== undefined ?
-    options.displayDpi : 96;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-    options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.metersPerUnit_ = options.metersPerUnit !== undefined ?
-    options.metersPerUnit : 1;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.useOverlay_ = options.useOverlay !== undefined ?
-    options.useOverlay : false;
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-};
-ol.inherits(ol.source.ImageMapGuide, ol.source.Image);
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageMapGuide.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageMapGuide.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  resolution = this.findNearestResolution(resolution);
-  pixelRatio = this.hidpi_ ? pixelRatio : 1;
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), extent)) {
-    return image;
-  }
-
-  if (this.ratio_ != 1) {
-    extent = extent.slice();
-    ol.extent.scaleFromCenter(extent, this.ratio_);
-  }
-  var width = ol.extent.getWidth(extent) / resolution;
-  var height = ol.extent.getHeight(extent) / resolution;
-  var size = [width * pixelRatio, height * pixelRatio];
-
-  if (this.url_ !== undefined) {
-    var imageUrl = this.getUrl(this.url_, this.params_, extent, size,
-        projection);
-    image = new ol.Image(extent, resolution, pixelRatio,
-        imageUrl, this.crossOrigin_,
-        this.imageLoadFunction_);
-    ol.events.listen(image, ol.events.EventType.CHANGE,
-        this.handleImageChange, this);
-  } else {
-    image = null;
-  }
-  this.image_ = image;
-  this.renderedRevision_ = this.getRevision();
-
-  return image;
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageMapGuide.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent The map extents.
- * @param {ol.Size} size The viewport size.
- * @param {number} metersPerUnit The meters-per-unit value.
- * @param {number} dpi The display resolution.
- * @return {number} The computed map scale.
- */
-ol.source.ImageMapGuide.getScale = function(extent, size, metersPerUnit, dpi) {
-  var mcsW = ol.extent.getWidth(extent);
-  var mcsH = ol.extent.getHeight(extent);
-  var devW = size[0];
-  var devH = size[1];
-  var mpp = 0.0254 / dpi;
-  if (devH * mcsW > devW * mcsH) {
-    return mcsW * metersPerUnit / (devW * mpp); // width limited
-  } else {
-    return mcsH * metersPerUnit / (devH * mpp); // height limited
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageMapGuide.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.changed();
-};
-
-
-/**
- * @param {string} baseUrl The mapagent url.
- * @param {Object.<string, string|number>} params Request parameters.
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {ol.proj.Projection} projection Projection.
- * @return {string} The mapagent map image request URL.
- */
-ol.source.ImageMapGuide.prototype.getUrl = function(baseUrl, params, extent, size, projection) {
-  var scale = ol.source.ImageMapGuide.getScale(extent, size,
-      this.metersPerUnit_, this.displayDpi_);
-  var center = ol.extent.getCenter(extent);
-  var baseParams = {
-    'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',
-    'VERSION': '2.0.0',
-    'LOCALE': 'en',
-    'CLIENTAGENT': 'ol.source.ImageMapGuide source',
-    'CLIP': '1',
-    'SETDISPLAYDPI': this.displayDpi_,
-    'SETDISPLAYWIDTH': Math.round(size[0]),
-    'SETDISPLAYHEIGHT': Math.round(size[1]),
-    'SETVIEWSCALE': scale,
-    'SETVIEWCENTERX': center[0],
-    'SETVIEWCENTERY': center[1]
-  };
-  ol.obj.assign(baseParams, params);
-  return ol.uri.appendParams(baseUrl, baseParams);
-};
-
-
-/**
- * Set the image load function of the MapGuide source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageMapGuide.prototype.setImageLoadFunction = function(
-    imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-goog.provide('ol.source.ImageStatic');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.ImageState');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.proj');
-goog.require('ol.source.Image');
-
-
-/**
- * @classdesc
- * A layer source for displaying a single, static image.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @param {olx.source.ImageStaticOptions} options Options.
- * @api
- */
-ol.source.ImageStatic = function(options) {
-  var imageExtent = options.imageExtent;
-
-  var crossOrigin = options.crossOrigin !== undefined ?
-    options.crossOrigin : null;
-
-  var /** @type {ol.ImageLoadFunctionType} */ imageLoadFunction =
-      options.imageLoadFunction !== undefined ?
-        options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: ol.proj.get(options.projection)
-  });
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = new ol.Image(imageExtent, undefined, 1, options.url, crossOrigin, imageLoadFunction);
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = options.imageSize ? options.imageSize : null;
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-};
-ol.inherits(ol.source.ImageStatic, ol.source.Image);
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageStatic.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-  if (ol.extent.intersects(extent, this.image_.getExtent())) {
-    return this.image_;
-  }
-  return null;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageStatic.prototype.handleImageChange = function(evt) {
-  if (this.image_.getState() == ol.ImageState.LOADED) {
-    var imageExtent = this.image_.getExtent();
-    var image = this.image_.getImage();
-    var imageWidth, imageHeight;
-    if (this.imageSize_) {
-      imageWidth = this.imageSize_[0];
-      imageHeight = this.imageSize_[1];
-    } else {
-      imageWidth = image.width;
-      imageHeight = image.height;
-    }
-    var resolution = ol.extent.getHeight(imageExtent) / imageHeight;
-    var targetWidth = Math.ceil(ol.extent.getWidth(imageExtent) / resolution);
-    if (targetWidth != imageWidth) {
-      var context = ol.dom.createCanvasContext2D(targetWidth, imageHeight);
-      var canvas = context.canvas;
-      context.drawImage(image, 0, 0, imageWidth, imageHeight,
-          0, 0, canvas.width, canvas.height);
-      this.image_.setImage(canvas);
-    }
-  }
-  ol.source.Image.prototype.handleImageChange.call(this, evt);
-};
-
-goog.provide('ol.source.ImageVector');
-
-goog.require('ol');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.ext.rbush');
-goog.require('ol.extent');
-goog.require('ol.render.canvas.ReplayGroup');
-goog.require('ol.renderer.vector');
-goog.require('ol.source.ImageCanvas');
-goog.require('ol.style.Style');
-goog.require('ol.transform');
-
-
-/**
- * @deprecated
- * @classdesc
- * **Deprecated**. Use an `ol.layer.Vector` with `renderMode: 'image'` and an
- * `ol.source.Vector` instead.
- *
- * An image source whose images are canvas elements into which vector features
- * read from a vector source (`ol.source.Vector`) are drawn. An
- * `ol.source.ImageVector` object is to be used as the `source` of an image
- * layer (`ol.layer.Image`). Image layers are rotated, scaled, and translated,
- * as opposed to being re-rendered, during animations and interactions. So, like
- * any other image layer, an image layer configured with an
- * `ol.source.ImageVector` will exhibit this behaviour. This is in contrast to a
- * vector layer, where vector features are re-drawn during animations and
- * interactions.
- *
- * @constructor
- * @extends {ol.source.ImageCanvas}
- * @param {olx.source.ImageVectorOptions} options Options.
- * @api
- */
-ol.source.ImageVector = function(options) {
-
-  /**
-   * @private
-   * @type {ol.source.Vector}
-   */
-  this.source_ = options.source;
-
-  /**
-   * @private
-   * @type {ol.Transform}
-   */
-  this.transform_ = ol.transform.create();
-
-  /**
-   * @private
-   * @type {CanvasRenderingContext2D}
-   */
-  this.canvasContext_ = ol.dom.createCanvasContext2D();
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.canvasSize_ = [0, 0];
-
-  /**
-   * Declutter tree.
-   * @private
-   */
-  this.declutterTree_ = ol.ext.rbush(9);
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderBuffer_ = options.renderBuffer == undefined ? 100 : options.renderBuffer;
-
-  /**
-   * @private
-   * @type {ol.render.canvas.ReplayGroup}
-   */
-  this.replayGroup_ = null;
-
-  ol.source.ImageCanvas.call(this, {
-    attributions: options.attributions,
-    canvasFunction: this.canvasFunctionInternal_.bind(this),
-    logo: options.logo,
-    projection: options.projection,
-    ratio: options.ratio,
-    resolutions: options.resolutions,
-    state: this.source_.getState()
-  });
-
-  /**
-   * User provided style.
-   * @type {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
-   * @private
-   */
-  this.style_ = null;
-
-  /**
-   * Style function for use within the library.
-   * @type {ol.StyleFunction|undefined}
-   * @private
-   */
-  this.styleFunction_ = undefined;
-
-  this.setStyle(options.style);
-
-  ol.events.listen(this.source_, ol.events.EventType.CHANGE,
-      this.handleSourceChange_, this);
-
-};
-ol.inherits(ol.source.ImageVector, ol.source.ImageCanvas);
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Size} size Size.
- * @param {ol.proj.Projection} projection Projection;
- * @return {HTMLCanvasElement} Canvas element.
- * @private
- */
-ol.source.ImageVector.prototype.canvasFunctionInternal_ = function(extent, resolution, pixelRatio, size, projection) {
-
-  var replayGroup = new ol.render.canvas.ReplayGroup(
-      ol.renderer.vector.getTolerance(resolution, pixelRatio), extent,
-      resolution, pixelRatio, this.source_.getOverlaps(), this.declutterTree_, this.renderBuffer_);
-
-  this.source_.loadFeatures(extent, resolution, projection);
-
-  var loading = false;
-  this.source_.forEachFeatureInExtent(extent,
-      /**
-       * @param {ol.Feature} feature Feature.
-       */
-      function(feature) {
-        loading = loading ||
-            this.renderFeature_(feature, resolution, pixelRatio, replayGroup);
-      }, this);
-  replayGroup.finish();
-
-  if (loading) {
-    return null;
-  }
-
-  if (this.canvasSize_[0] != size[0] || this.canvasSize_[1] != size[1]) {
-    this.canvasContext_.canvas.width = size[0];
-    this.canvasContext_.canvas.height = size[1];
-    this.canvasSize_[0] = size[0];
-    this.canvasSize_[1] = size[1];
-  } else {
-    this.canvasContext_.clearRect(0, 0, size[0], size[1]);
-  }
-
-  this.declutterTree_.clear();
-
-  var transform = this.getTransform_(ol.extent.getCenter(extent),
-      resolution, pixelRatio, size);
-  replayGroup.replay(this.canvasContext_, transform, 0, {});
-
-  this.replayGroup_ = replayGroup;
-
-  return this.canvasContext_.canvas;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
-    coordinate, resolution, rotation, hitTolerance, skippedFeatureUids, callback) {
-  if (!this.replayGroup_) {
-    return undefined;
-  } else {
-    /** @type {Object.<string, boolean>} */
-    var features = {};
-    var result = this.replayGroup_.forEachFeatureAtCoordinate(
-        coordinate, resolution, 0, hitTolerance, skippedFeatureUids,
-        /**
-         * @param {ol.Feature|ol.render.Feature} feature Feature.
-         * @return {?} Callback result.
-         */
-        function(feature) {
-          var key = ol.getUid(feature).toString();
-          if (!(key in features)) {
-            features[key] = true;
-            return callback(feature);
-          }
-        }, null);
-    return result;
-  }
-};
-
-
-/**
- * Get a reference to the wrapped source.
- * @return {ol.source.Vector} Source.
- * @api
- */
-ol.source.ImageVector.prototype.getSource = function() {
-  return this.source_;
-};
-
-
-/**
- * Get the style for features.  This returns whatever was passed to the `style`
- * option at construction or to the `setStyle` method.
- * @return {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction}
- *     Layer style.
- * @api
- */
-ol.source.ImageVector.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Get the style function.
- * @return {ol.StyleFunction|undefined} Layer style function.
- * @api
- */
-ol.source.ImageVector.prototype.getStyleFunction = function() {
-  return this.styleFunction_;
-};
-
-
-/**
- * @param {ol.Coordinate} center Center.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.Size} size Size.
- * @return {!ol.Transform} Transform.
- * @private
- */
-ol.source.ImageVector.prototype.getTransform_ = function(center, resolution, pixelRatio, size) {
-  var dx1 = size[0] / 2;
-  var dy1 = size[1] / 2;
-  var sx = pixelRatio / resolution;
-  var sy = -sx;
-  var dx2 = -center[0];
-  var dy2 = -center[1];
-
-  return ol.transform.compose(this.transform_, dx1, dy1, sx, sy, 0, dx2, dy2);
-};
-
-
-/**
- * Handle changes in image style state.
- * @param {ol.events.Event} event Image style change event.
- * @private
- */
-ol.source.ImageVector.prototype.handleImageChange_ = function(event) {
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.ImageVector.prototype.handleSourceChange_ = function() {
-  // setState will trigger a CHANGE event, so we always rely
-  // change events by calling setState.
-  this.setState(this.source_.getState());
-};
-
-
-/**
- * @param {ol.Feature} feature Feature.
- * @param {number} resolution Resolution.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
- * @return {boolean} `true` if an image is loading.
- * @private
- */
-ol.source.ImageVector.prototype.renderFeature_ = function(feature, resolution, pixelRatio, replayGroup) {
-  var styles;
-  var styleFunction = feature.getStyleFunction();
-  if (styleFunction) {
-    styles = styleFunction.call(feature, resolution);
-  } else if (this.styleFunction_) {
-    styles = this.styleFunction_(feature, resolution);
-  }
-  if (!styles) {
-    return false;
-  }
-  var i, ii, loading = false;
-  if (!Array.isArray(styles)) {
-    styles = [styles];
-  }
-  for (i = 0, ii = styles.length; i < ii; ++i) {
-    loading = ol.renderer.vector.renderFeature(
-        replayGroup, feature, styles[i],
-        ol.renderer.vector.getSquaredTolerance(resolution, pixelRatio),
-        this.handleImageChange_, this) || loading;
-  }
-  return loading;
-};
-
-
-/**
- * Set the style for features.  This can be a single style object, an array
- * of styles, or a function that takes a feature and resolution and returns
- * an array of styles. If it is `undefined` the default style is used. If
- * it is `null` the layer has no style (a `null` style), so only features
- * that have their own styles will be rendered in the layer. See
- * {@link ol.style} for information on the default style.
- * @param {ol.style.Style|Array.<ol.style.Style>|ol.StyleFunction|undefined}
- *     style Layer style.
- * @api
- */
-ol.source.ImageVector.prototype.setStyle = function(style) {
-  this.style_ = style !== undefined ? style : ol.style.Style.defaultFunction;
-  this.styleFunction_ = !style ?
-    undefined : ol.style.Style.createFunction(this.style_);
-  this.changed();
-};
-
-goog.provide('ol.source.WMSServerType');
-
-
-/**
- * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,
- *     `'qgis'`. These are servers that have vendor parameters beyond the WMS
- *     specification that OpenLayers can make use of.
- * @enum {string}
- */
-ol.source.WMSServerType = {
-  CARMENTA_SERVER: 'carmentaserver',
-  GEOSERVER: 'geoserver',
-  MAPSERVER: 'mapserver',
-  QGIS: 'qgis'
-};
-
-// FIXME cannot be shared between maps with different projections
-
-goog.provide('ol.source.ImageWMS');
-
-goog.require('ol');
-goog.require('ol.Image');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.reproj');
-goog.require('ol.source.Image');
-goog.require('ol.source.WMSServerType');
-goog.require('ol.string');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Source for WMS servers providing single, untiled images.
- *
- * @constructor
- * @fires ol.source.Image.Event
- * @extends {ol.source.Image}
- * @param {olx.source.ImageWMSOptions=} opt_options Options.
- * @api
- */
-ol.source.ImageWMS = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.Image.call(this, {
-    attributions: options.attributions,
-    logo: options.logo,
-    projection: options.projection,
-    resolutions: options.resolutions
-  });
-
-  /**
-   * @private
-   * @type {?string}
-   */
-  this.crossOrigin_ =
-      options.crossOrigin !== undefined ? options.crossOrigin : null;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.url_ = options.url;
-
-  /**
-   * @private
-   * @type {ol.ImageLoadFunctionType}
-   */
-  this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?
-    options.imageLoadFunction : ol.source.Image.defaultImageLoadFunction;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.v13_ = true;
-  this.updateV13_();
-
-  /**
-   * @private
-   * @type {ol.source.WMSServerType|undefined}
-   */
-  this.serverType_ = /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {ol.Image}
-   */
-  this.image_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.imageSize_ = [0, 0];
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.renderedRevision_ = 0;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;
-
-};
-ol.inherits(ol.source.ImageWMS, ol.source.Image);
-
-
-/**
- * @const
- * @type {ol.Size}
- * @private
- */
-ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_ = [101, 101];
-
-
-/**
- * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
- * projection. Return `undefined` if the GetFeatureInfo URL cannot be
- * constructed.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.ProjectionLike} projection Projection.
- * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
- *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
- *     in the `LAYERS` parameter will be used. `VERSION` should not be
- *     specified here.
- * @return {string|undefined} GetFeatureInfo URL.
- * @api
- */
-ol.source.ImageWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
-  if (this.url_ === undefined) {
-    return undefined;
-  }
-  var projectionObj = ol.proj.get(projection);
-  var sourceProjectionObj = this.getProjection();
-
-  if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {
-    resolution = ol.reproj.calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, resolution);
-    coordinate = ol.proj.transform(coordinate, projectionObj, sourceProjectionObj);
-  }
-
-  var extent = ol.extent.getForViewAndSize(
-      coordinate, resolution, 0,
-      ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_);
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetFeatureInfo',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true,
-    'QUERY_LAYERS': this.params_['LAYERS']
-  };
-  ol.obj.assign(baseParams, this.params_, params);
-
-  var x = Math.floor((coordinate[0] - extent[0]) / resolution);
-  var y = Math.floor((extent[3] - coordinate[1]) / resolution);
-  baseParams[this.v13_ ? 'I' : 'X'] = x;
-  baseParams[this.v13_ ? 'J' : 'Y'] = y;
-
-  return this.getRequestUrl_(
-      extent, ol.source.ImageWMS.GETFEATUREINFO_IMAGE_SIZE_,
-      1, sourceProjectionObj || projectionObj, baseParams);
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.ImageWMS.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.ImageWMS.prototype.getImageInternal = function(extent, resolution, pixelRatio, projection) {
-
-  if (this.url_ === undefined) {
-    return null;
-  }
-
-  resolution = this.findNearestResolution(resolution);
-
-  if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {
-    pixelRatio = 1;
-  }
-
-  var imageResolution = resolution / pixelRatio;
-
-  var center = ol.extent.getCenter(extent);
-  var viewWidth = Math.ceil(ol.extent.getWidth(extent) / imageResolution);
-  var viewHeight = Math.ceil(ol.extent.getHeight(extent) / imageResolution);
-  var viewExtent = ol.extent.getForViewAndSize(center, imageResolution, 0,
-      [viewWidth, viewHeight]);
-  var requestWidth = Math.ceil(this.ratio_ * ol.extent.getWidth(extent) / imageResolution);
-  var requestHeight = Math.ceil(this.ratio_ * ol.extent.getHeight(extent) / imageResolution);
-  var requestExtent = ol.extent.getForViewAndSize(center, imageResolution, 0,
-      [requestWidth, requestHeight]);
-
-  var image = this.image_;
-  if (image &&
-      this.renderedRevision_ == this.getRevision() &&
-      image.getResolution() == resolution &&
-      image.getPixelRatio() == pixelRatio &&
-      ol.extent.containsExtent(image.getExtent(), viewExtent)) {
-    return image;
-  }
-
-  var params = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetMap',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(params, this.params_);
-
-  this.imageSize_[0] = Math.round(ol.extent.getWidth(requestExtent) / imageResolution);
-  this.imageSize_[1] = Math.round(ol.extent.getHeight(requestExtent) / imageResolution);
-
-  var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio,
-      projection, params);
-
-  this.image_ = new ol.Image(requestExtent, resolution, pixelRatio,
-      url, this.crossOrigin_, this.imageLoadFunction_);
-
-  this.renderedRevision_ = this.getRevision();
-
-  ol.events.listen(this.image_, ol.events.EventType.CHANGE,
-      this.handleImageChange, this);
-
-  return this.image_;
-
-};
-
-
-/**
- * Return the image load function of the source.
- * @return {ol.ImageLoadFunctionType} The image load function.
- * @api
- */
-ol.source.ImageWMS.prototype.getImageLoadFunction = function() {
-  return this.imageLoadFunction_;
-};
-
-
-/**
- * @param {ol.Extent} extent Extent.
- * @param {ol.Size} size Size.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string} Request URL.
- * @private
- */
-ol.source.ImageWMS.prototype.getRequestUrl_ = function(extent, size, pixelRatio, projection, params) {
-
-  ol.asserts.assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`
-
-  params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
-
-  if (!('STYLES' in this.params_)) {
-    params['STYLES'] = '';
-  }
-
-  if (pixelRatio != 1) {
-    switch (this.serverType_) {
-      case ol.source.WMSServerType.GEOSERVER:
-        var dpi = (90 * pixelRatio + 0.5) | 0;
-        if ('FORMAT_OPTIONS' in params) {
-          params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
-        } else {
-          params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
-        }
-        break;
-      case ol.source.WMSServerType.MAPSERVER:
-        params['MAP_RESOLUTION'] = 90 * pixelRatio;
-        break;
-      case ol.source.WMSServerType.CARMENTA_SERVER:
-      case ol.source.WMSServerType.QGIS:
-        params['DPI'] = 90 * pixelRatio;
-        break;
-      default:
-        ol.asserts.assert(false, 8); // Unknown `serverType` configured
-        break;
-    }
-  }
-
-  params['WIDTH'] = size[0];
-  params['HEIGHT'] = size[1];
-
-  var axisOrientation = projection.getAxisOrientation();
-  var bbox;
-  if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {
-    bbox = [extent[1], extent[0], extent[3], extent[2]];
-  } else {
-    bbox = extent;
-  }
-  params['BBOX'] = bbox.join(',');
-
-  return ol.uri.appendParams(/** @type {string} */ (this.url_), params);
-};
-
-
-/**
- * Return the URL used for this WMS source.
- * @return {string|undefined} URL.
- * @api
- */
-ol.source.ImageWMS.prototype.getUrl = function() {
-  return this.url_;
-};
-
-
-/**
- * Set the image load function of the source.
- * @param {ol.ImageLoadFunctionType} imageLoadFunction Image load function.
- * @api
- */
-ol.source.ImageWMS.prototype.setImageLoadFunction = function(
-    imageLoadFunction) {
-  this.image_ = null;
-  this.imageLoadFunction_ = imageLoadFunction;
-  this.changed();
-};
-
-
-/**
- * Set the URL to use for requests.
- * @param {string|undefined} url URL.
- * @api
- */
-ol.source.ImageWMS.prototype.setUrl = function(url) {
-  if (url != this.url_) {
-    this.url_ = url;
-    this.image_ = null;
-    this.changed();
-  }
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.ImageWMS.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.updateV13_();
-  this.image_ = null;
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.ImageWMS.prototype.updateV13_ = function() {
-  var version = this.params_['VERSION'] || ol.DEFAULT_WMS_VERSION;
-  this.v13_ = ol.string.compareVersions(version, '1.3') >= 0;
-};
-
-goog.provide('ol.source.OSM');
-
-goog.require('ol');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the OpenStreetMap tile server.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.OSMOptions=} opt_options Open Street Map options.
- * @api
- */
-ol.source.OSM = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var attributions;
-  if (options.attributions !== undefined) {
-    attributions = options.attributions;
-  } else {
-    attributions = [ol.source.OSM.ATTRIBUTION];
-  }
-
-  var crossOrigin = options.crossOrigin !== undefined ?
-    options.crossOrigin : 'anonymous';
-
-  var url = options.url !== undefined ?
-    options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
-
-  ol.source.XYZ.call(this, {
-    attributions: attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: crossOrigin,
-    opaque: options.opaque !== undefined ? options.opaque : true,
-    maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileLoadFunction: options.tileLoadFunction,
-    url: url,
-    wrapX: options.wrapX
-  });
-
-};
-ol.inherits(ol.source.OSM, ol.source.XYZ);
-
-
-/**
- * The attribution containing a link to the OpenStreetMap Copyright and License
- * page.
- * @const
- * @type {string}
- * @api
- */
-ol.source.OSM.ATTRIBUTION = '&copy; ' +
-      '<a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> ' +
-      'contributors.';
-
-
-/**
- * @fileoverview
- * @suppress {accessControls, ambiguousFunctionDecl, checkDebuggerStatement, checkRegExp, checkTypes, checkVars, const, constantProperty, deprecated, duplicate, es5Strict, fileoverviewTags, missingProperties, nonStandardJsDocs, strictModuleDepCheck, suspiciousCode, undefinedNames, undefinedVars, unknownDefines, unusedLocalVariables, uselessCode, visibility}
- */
-goog.provide('ol.ext.pixelworks.Processor');
-
-/** @typedef {function(*)} */
-ol.ext.pixelworks.Processor = function() {};
-
-(function() {(function (exports) {
-'use strict';
-
-var hasImageData = true;
-try {
-  new ImageData(10, 10);
-} catch (_) {
-  hasImageData = false;
-}
-var context = document.createElement('canvas').getContext('2d');
-function newImageData$1(data, width, height) {
-  if (hasImageData) {
-    return new ImageData(data, width, height);
-  } else {
-    var imageData = context.createImageData(width, height);
-    imageData.data.set(data);
-    return imageData;
-  }
-}
-var newImageData_1 = newImageData$1;
-var util = {
-	newImageData: newImageData_1
-};
-
-var newImageData = util.newImageData;
-function createMinion(operation) {
-  var workerHasImageData = true;
-  try {
-    new ImageData(10, 10);
-  } catch (_) {
-    workerHasImageData = false;
-  }
-  function newWorkerImageData(data, width, height) {
-    if (workerHasImageData) {
-      return new ImageData(data, width, height);
-    } else {
-      return {data: data, width: width, height: height};
-    }
-  }
-  return function(data) {
-    var buffers = data['buffers'];
-    var meta = data['meta'];
-    var imageOps = data['imageOps'];
-    var width = data['width'];
-    var height = data['height'];
-    var numBuffers = buffers.length;
-    var numBytes = buffers[0].byteLength;
-    var output, b;
-    if (imageOps) {
-      var images = new Array(numBuffers);
-      for (b = 0; b < numBuffers; ++b) {
-        images[b] = newWorkerImageData(
-            new Uint8ClampedArray(buffers[b]), width, height);
-      }
-      output = operation(images, meta).data;
-    } else {
-      output = new Uint8ClampedArray(numBytes);
-      var arrays = new Array(numBuffers);
-      var pixels = new Array(numBuffers);
-      for (b = 0; b < numBuffers; ++b) {
-        arrays[b] = new Uint8ClampedArray(buffers[b]);
-        pixels[b] = [0, 0, 0, 0];
-      }
-      for (var i = 0; i < numBytes; i += 4) {
-        for (var j = 0; j < numBuffers; ++j) {
-          var array = arrays[j];
-          pixels[j][0] = array[i];
-          pixels[j][1] = array[i + 1];
-          pixels[j][2] = array[i + 2];
-          pixels[j][3] = array[i + 3];
-        }
-        var pixel = operation(pixels, meta);
-        output[i] = pixel[0];
-        output[i + 1] = pixel[1];
-        output[i + 2] = pixel[2];
-        output[i + 3] = pixel[3];
-      }
-    }
-    return output.buffer;
-  };
-}
-function createWorker(config, onMessage) {
-  var lib = Object.keys(config.lib || {}).map(function(name) {
-    return 'var ' + name + ' = ' + config.lib[name].toString() + ';';
-  });
-  var lines = lib.concat([
-    'var __minion__ = (' + createMinion.toString() + ')(', config.operation.toString(), ');',
-    'self.addEventListener("message", function(event) {',
-    '  var buffer = __minion__(event.data);',
-    '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',
-    '});'
-  ]);
-  var blob = new Blob(lines, {type: 'text/javascript'});
-  var source = URL.createObjectURL(blob);
-  var worker = new Worker(source);
-  worker.addEventListener('message', onMessage);
-  return worker;
-}
-function createFauxWorker(config, onMessage) {
-  var minion = createMinion(config.operation);
-  return {
-    postMessage: function(data) {
-      setTimeout(function() {
-        onMessage({'data': {'buffer': minion(data), 'meta': data['meta']}});
-      }, 0);
-    }
-  };
-}
-function Processor(config) {
-  this._imageOps = !!config.imageOps;
-  var threads;
-  if (config.threads === 0) {
-    threads = 0;
-  } else if (this._imageOps) {
-    threads = 1;
-  } else {
-    threads = config.threads || 1;
-  }
-  var workers = [];
-  if (threads) {
-    for (var i = 0; i < threads; ++i) {
-      workers[i] = createWorker(config, this._onWorkerMessage.bind(this, i));
-    }
-  } else {
-    workers[0] = createFauxWorker(config, this._onWorkerMessage.bind(this, 0));
-  }
-  this._workers = workers;
-  this._queue = [];
-  this._maxQueueLength = config.queue || Infinity;
-  this._running = 0;
-  this._dataLookup = {};
-  this._job = null;
-}
-Processor.prototype.process = function(inputs, meta, callback) {
-  this._enqueue({
-    inputs: inputs,
-    meta: meta,
-    callback: callback
-  });
-  this._dispatch();
-};
-Processor.prototype.destroy = function() {
-  for (var key in this) {
-    this[key] = null;
-  }
-  this._destroyed = true;
-};
-Processor.prototype._enqueue = function(job) {
-  this._queue.push(job);
-  while (this._queue.length > this._maxQueueLength) {
-    this._queue.shift().callback(null, null);
-  }
-};
-Processor.prototype._dispatch = function() {
-  if (this._running === 0 && this._queue.length > 0) {
-    var job = this._job = this._queue.shift();
-    var width = job.inputs[0].width;
-    var height = job.inputs[0].height;
-    var buffers = job.inputs.map(function(input) {
-      return input.data.buffer;
-    });
-    var threads = this._workers.length;
-    this._running = threads;
-    if (threads === 1) {
-      this._workers[0].postMessage({
-        'buffers': buffers,
-        'meta': job.meta,
-        'imageOps': this._imageOps,
-        'width': width,
-        'height': height
-      }, buffers);
-    } else {
-      var length = job.inputs[0].data.length;
-      var segmentLength = 4 * Math.ceil(length / 4 / threads);
-      for (var i = 0; i < threads; ++i) {
-        var offset = i * segmentLength;
-        var slices = [];
-        for (var j = 0, jj = buffers.length; j < jj; ++j) {
-          slices.push(buffers[i].slice(offset, offset + segmentLength));
-        }
-        this._workers[i].postMessage({
-          'buffers': slices,
-          'meta': job.meta,
-          'imageOps': this._imageOps,
-          'width': width,
-          'height': height
-        }, slices);
-      }
-    }
-  }
-};
-Processor.prototype._onWorkerMessage = function(index, event) {
-  if (this._destroyed) {
-    return;
-  }
-  this._dataLookup[index] = event.data;
-  --this._running;
-  if (this._running === 0) {
-    this._resolveJob();
-  }
-};
-Processor.prototype._resolveJob = function() {
-  var job = this._job;
-  var threads = this._workers.length;
-  var data, meta;
-  if (threads === 1) {
-    data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);
-    meta = this._dataLookup[0]['meta'];
-  } else {
-    var length = job.inputs[0].data.length;
-    data = new Uint8ClampedArray(length);
-    meta = new Array(length);
-    var segmentLength = 4 * Math.ceil(length / 4 / threads);
-    for (var i = 0; i < threads; ++i) {
-      var buffer = this._dataLookup[i]['buffer'];
-      var offset = i * segmentLength;
-      data.set(new Uint8ClampedArray(buffer), offset);
-      meta[i] = this._dataLookup[i]['meta'];
-    }
-  }
-  this._job = null;
-  this._dataLookup = {};
-  job.callback(null,
-      newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);
-  this._dispatch();
-};
-var processor = Processor;
-
-var Processor_1 = processor;
-var lib = {
-	Processor: Processor_1
-};
-
-exports['default'] = lib;
-exports.Processor = Processor_1;
-
-}((this.pixelworks = this.pixelworks || {})));}).call(ol.ext);
-
-goog.provide('ol.source.RasterOperationType');
-
-/**
- * Raster operation type. Supported values are `'pixel'` and `'image'`.
- * @enum {string}
- */
-ol.source.RasterOperationType = {
-  PIXEL: 'pixel',
-  IMAGE: 'image'
-};
-
-goog.provide('ol.source.Raster');
-
-goog.require('ol');
-goog.require('ol.ImageCanvas');
-goog.require('ol.TileQueue');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.events.Event');
-goog.require('ol.events.EventType');
-goog.require('ol.ext.pixelworks.Processor');
-goog.require('ol.extent');
-goog.require('ol.layer.Image');
-goog.require('ol.layer.Tile');
-goog.require('ol.obj');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.source.Image');
-goog.require('ol.source.RasterOperationType');
-goog.require('ol.source.State');
-goog.require('ol.source.Tile');
-goog.require('ol.transform');
-
-
-/**
- * @classdesc
- * A source that transforms data from any number of input sources using an
- * {@link ol.RasterOperation} function to transform input pixel values into
- * output pixel values.
- *
- * @constructor
- * @extends {ol.source.Image}
- * @fires ol.source.Raster.Event
- * @param {olx.source.RasterOptions} options Options.
- * @api
- */
-ol.source.Raster = function(options) {
-
-  /**
-   * @private
-   * @type {*}
-   */
-  this.worker_ = null;
-
-  /**
-   * @private
-   * @type {ol.source.RasterOperationType}
-   */
-  this.operationType_ = options.operationType !== undefined ?
-    options.operationType : ol.source.RasterOperationType.PIXEL;
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.threads_ = options.threads !== undefined ? options.threads : 1;
-
-  /**
-   * @private
-   * @type {Array.<ol.renderer.canvas.Layer>}
-   */
-  this.renderers_ = ol.source.Raster.createRenderers_(options.sources);
-
-  for (var r = 0, rr = this.renderers_.length; r < rr; ++r) {
-    ol.events.listen(this.renderers_[r], ol.events.EventType.CHANGE,
-        this.changed, this);
-  }
-
-  /**
-   * @private
-   * @type {ol.TileQueue}
-   */
-  this.tileQueue_ = new ol.TileQueue(
-      function() {
-        return 1;
-      },
-      this.changed.bind(this));
-
-  var layerStatesArray = ol.source.Raster.getLayerStatesArray_(this.renderers_);
-  var layerStates = {};
-  for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {
-    layerStates[ol.getUid(layerStatesArray[i].layer)] = layerStatesArray[i];
-  }
-
-  /**
-   * The most recently requested frame state.
-   * @type {olx.FrameState}
-   * @private
-   */
-  this.requestedFrameState_;
-
-  /**
-   * The most recently rendered image canvas.
-   * @type {ol.ImageCanvas}
-   * @private
-   */
-  this.renderedImageCanvas_ = null;
-
-  /**
-   * The most recently rendered revision.
-   * @type {number}
-   */
-  this.renderedRevision_;
-
-  /**
-   * @private
-   * @type {olx.FrameState}
-   */
-  this.frameState_ = {
-    animate: false,
-    coordinateToPixelTransform: ol.transform.create(),
-    extent: null,
-    focus: null,
-    index: 0,
-    layerStates: layerStates,
-    layerStatesArray: layerStatesArray,
-    logos: {},
-    pixelRatio: 1,
-    pixelToCoordinateTransform: ol.transform.create(),
-    postRenderFunctions: [],
-    size: [0, 0],
-    skippedFeatureUids: {},
-    tileQueue: this.tileQueue_,
-    time: Date.now(),
-    usedTiles: {},
-    viewState: /** @type {olx.ViewState} */ ({
-      rotation: 0
-    }),
-    viewHints: [],
-    wantedTiles: {}
-  };
-
-  ol.source.Image.call(this, {});
-
-  if (options.operation !== undefined) {
-    this.setOperation(options.operation, options.lib);
-  }
-
-};
-ol.inherits(ol.source.Raster, ol.source.Image);
-
-
-/**
- * Set the operation.
- * @param {ol.RasterOperation} operation New operation.
- * @param {Object=} opt_lib Functions that will be available to operations run
- *     in a worker.
- * @api
- */
-ol.source.Raster.prototype.setOperation = function(operation, opt_lib) {
-  this.worker_ = new ol.ext.pixelworks.Processor({
-    operation: operation,
-    imageOps: this.operationType_ === ol.source.RasterOperationType.IMAGE,
-    queue: 1,
-    lib: opt_lib,
-    threads: this.threads_
-  });
-  this.changed();
-};
-
-
-/**
- * Update the stored frame state.
- * @param {ol.Extent} extent The view extent (in map units).
- * @param {number} resolution The view resolution.
- * @param {ol.proj.Projection} projection The view projection.
- * @return {olx.FrameState} The updated frame state.
- * @private
- */
-ol.source.Raster.prototype.updateFrameState_ = function(extent, resolution, projection) {
-
-  var frameState = /** @type {olx.FrameState} */ (
-    ol.obj.assign({}, this.frameState_));
-
-  frameState.viewState = /** @type {olx.ViewState} */ (
-    ol.obj.assign({}, frameState.viewState));
-
-  var center = ol.extent.getCenter(extent);
-
-  frameState.extent = extent.slice();
-  frameState.focus = center;
-  frameState.size[0] = Math.round(ol.extent.getWidth(extent) / resolution);
-  frameState.size[1] = Math.round(ol.extent.getHeight(extent) / resolution);
-  frameState.time = Date.now();
-  frameState.animate = false;
-
-  var viewState = frameState.viewState;
-  viewState.center = center;
-  viewState.projection = projection;
-  viewState.resolution = resolution;
-  return frameState;
-};
-
-
-/**
- * Determine if all sources are ready.
- * @return {boolean} All sources are ready.
- * @private
- */
-ol.source.Raster.prototype.allSourcesReady_ = function() {
-  var ready = true;
-  var source;
-  for (var i = 0, ii = this.renderers_.length; i < ii; ++i) {
-    source = this.renderers_[i].getLayer().getSource();
-    if (source.getState() !== ol.source.State.READY) {
-      ready = false;
-      break;
-    }
-  }
-  return ready;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.Raster.prototype.getImage = function(extent, resolution, pixelRatio, projection) {
-  if (!this.allSourcesReady_()) {
-    return null;
-  }
-
-  var frameState = this.updateFrameState_(extent, resolution, projection);
-  this.requestedFrameState_ = frameState;
-
-  // check if we can't reuse the existing ol.ImageCanvas
-  if (this.renderedImageCanvas_) {
-    var renderedResolution = this.renderedImageCanvas_.getResolution();
-    var renderedExtent = this.renderedImageCanvas_.getExtent();
-    if (resolution !== renderedResolution || !ol.extent.equals(extent, renderedExtent)) {
-      this.renderedImageCanvas_ = null;
-    }
-  }
-
-  if (!this.renderedImageCanvas_ || this.getRevision() !== this.renderedRevision_) {
-    this.processSources_();
-  }
-
-  frameState.tileQueue.loadMoreTiles(16, 16);
-
-  if (frameState.animate) {
-    requestAnimationFrame(this.changed.bind(this));
-  }
-
-  return this.renderedImageCanvas_;
-};
-
-
-/**
- * Start processing source data.
- * @private
- */
-ol.source.Raster.prototype.processSources_ = function() {
-  var frameState = this.requestedFrameState_;
-  var len = this.renderers_.length;
-  var imageDatas = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    var imageData = ol.source.Raster.getImageData_(
-        this.renderers_[i], frameState, frameState.layerStatesArray[i]);
-    if (imageData) {
-      imageDatas[i] = imageData;
-    } else {
-      return;
-    }
-  }
-
-  var data = {};
-  this.dispatchEvent(new ol.source.Raster.Event(
-      ol.source.Raster.EventType_.BEFOREOPERATIONS, frameState, data));
-  this.worker_.process(imageDatas, data,
-      this.onWorkerComplete_.bind(this, frameState));
-};
-
-
-/**
- * Called when pixel processing is complete.
- * @param {olx.FrameState} frameState The frame state.
- * @param {Error} err Any error during processing.
- * @param {ImageData} output The output image data.
- * @param {Object} data The user data.
- * @private
- */
-ol.source.Raster.prototype.onWorkerComplete_ = function(frameState, err, output, data) {
-  if (err || !output) {
-    return;
-  }
-
-  // do nothing if extent or resolution changed
-  var extent = frameState.extent;
-  var resolution = frameState.viewState.resolution;
-  if (resolution !== this.requestedFrameState_.viewState.resolution ||
-      !ol.extent.equals(extent, this.requestedFrameState_.extent)) {
-    return;
-  }
-
-  var context;
-  if (this.renderedImageCanvas_) {
-    context = this.renderedImageCanvas_.getImage().getContext('2d');
-  } else {
-    var width = Math.round(ol.extent.getWidth(extent) / resolution);
-    var height = Math.round(ol.extent.getHeight(extent) / resolution);
-    context = ol.dom.createCanvasContext2D(width, height);
-    this.renderedImageCanvas_ = new ol.ImageCanvas(extent, resolution, 1, context.canvas);
-  }
-  context.putImageData(output, 0, 0);
-
-  this.changed();
-  this.renderedRevision_ = this.getRevision();
-
-  this.dispatchEvent(new ol.source.Raster.Event(
-      ol.source.Raster.EventType_.AFTEROPERATIONS, frameState, data));
-};
-
-
-/**
- * Get image data from a renderer.
- * @param {ol.renderer.canvas.Layer} renderer Layer renderer.
- * @param {olx.FrameState} frameState The frame state.
- * @param {ol.LayerState} layerState The layer state.
- * @return {ImageData} The image data.
- * @private
- */
-ol.source.Raster.getImageData_ = function(renderer, frameState, layerState) {
-  if (!renderer.prepareFrame(frameState, layerState)) {
-    return null;
-  }
-  var width = frameState.size[0];
-  var height = frameState.size[1];
-  if (!ol.source.Raster.context_) {
-    ol.source.Raster.context_ = ol.dom.createCanvasContext2D(width, height);
-  } else {
-    var canvas = ol.source.Raster.context_.canvas;
-    if (canvas.width !== width || canvas.height !== height) {
-      ol.source.Raster.context_ = ol.dom.createCanvasContext2D(width, height);
-    } else {
-      ol.source.Raster.context_.clearRect(0, 0, width, height);
-    }
-  }
-  renderer.composeFrame(frameState, layerState, ol.source.Raster.context_);
-  return ol.source.Raster.context_.getImageData(0, 0, width, height);
-};
-
-
-/**
- * A reusable canvas context.
- * @type {CanvasRenderingContext2D}
- * @private
- */
-ol.source.Raster.context_ = null;
-
-
-/**
- * Get a list of layer states from a list of renderers.
- * @param {Array.<ol.renderer.canvas.Layer>} renderers Layer renderers.
- * @return {Array.<ol.LayerState>} The layer states.
- * @private
- */
-ol.source.Raster.getLayerStatesArray_ = function(renderers) {
-  return renderers.map(function(renderer) {
-    return renderer.getLayer().getLayerState();
-  });
-};
-
-
-/**
- * Create renderers for all sources.
- * @param {Array.<ol.source.Source>} sources The sources.
- * @return {Array.<ol.renderer.canvas.Layer>} Array of layer renderers.
- * @private
- */
-ol.source.Raster.createRenderers_ = function(sources) {
-  var len = sources.length;
-  var renderers = new Array(len);
-  for (var i = 0; i < len; ++i) {
-    renderers[i] = ol.source.Raster.createRenderer_(sources[i]);
-  }
-  return renderers;
-};
-
-
-/**
- * Create a renderer for the provided source.
- * @param {ol.source.Source} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createRenderer_ = function(source) {
-  var renderer = null;
-  if (source instanceof ol.source.Tile) {
-    renderer = ol.source.Raster.createTileRenderer_(source);
-  } else if (source instanceof ol.source.Image) {
-    renderer = ol.source.Raster.createImageRenderer_(source);
-  }
-  return renderer;
-};
-
-
-/**
- * Create an image renderer for the provided source.
- * @param {ol.source.Image} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createImageRenderer_ = function(source) {
-  var layer = new ol.layer.Image({source: source});
-  return new ol.renderer.canvas.ImageLayer(layer);
-};
-
-
-/**
- * Create a tile renderer for the provided source.
- * @param {ol.source.Tile} source The source.
- * @return {ol.renderer.canvas.Layer} The renderer.
- * @private
- */
-ol.source.Raster.createTileRenderer_ = function(source) {
-  var layer = new ol.layer.Tile({source: source});
-  return new ol.renderer.canvas.TileLayer(layer);
-};
-
-
-/**
- * @classdesc
- * Events emitted by {@link ol.source.Raster} instances are instances of this
- * type.
- *
- * @constructor
- * @extends {ol.events.Event}
- * @implements {oli.source.RasterEvent}
- * @param {string} type Type.
- * @param {olx.FrameState} frameState The frame state.
- * @param {Object} data An object made available to operations.
- */
-ol.source.Raster.Event = function(type, frameState, data) {
-  ol.events.Event.call(this, type);
-
-  /**
-   * The raster extent.
-   * @type {ol.Extent}
-   * @api
-   */
-  this.extent = frameState.extent;
-
-  /**
-   * The pixel resolution (map units per pixel).
-   * @type {number}
-   * @api
-   */
-  this.resolution = frameState.viewState.resolution / frameState.pixelRatio;
-
-  /**
-   * An object made available to all operations.  This can be used by operations
-   * as a storage object (e.g. for calculating statistics).
-   * @type {Object}
-   * @api
-   */
-  this.data = data;
-
-};
-ol.inherits(ol.source.Raster.Event, ol.events.Event);
-
-
-/**
- * @override
- */
-ol.source.Raster.prototype.getImageInternal = function() {
-  return null; // not implemented
-};
-
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Raster.EventType_ = {
-  /**
-   * Triggered before operations are run.
-   * @event ol.source.Raster.Event#beforeoperations
-   * @api
-   */
-  BEFOREOPERATIONS: 'beforeoperations',
-
-  /**
-   * Triggered after operations are run.
-   * @event ol.source.Raster.Event#afteroperations
-   * @api
-   */
-  AFTEROPERATIONS: 'afteroperations'
-};
-
-goog.provide('ol.source.Stamen');
-
-goog.require('ol');
-goog.require('ol.source.OSM');
-goog.require('ol.source.XYZ');
-
-
-/**
- * @classdesc
- * Layer source for the Stamen tile server.
- *
- * @constructor
- * @extends {ol.source.XYZ}
- * @param {olx.source.StamenOptions} options Stamen options.
- * @api
- */
-ol.source.Stamen = function(options) {
-  var i = options.layer.indexOf('-');
-  var provider = i == -1 ? options.layer : options.layer.slice(0, i);
-  var providerConfig = ol.source.Stamen.ProviderConfig[provider];
-
-  var layerConfig = ol.source.Stamen.LayerConfig[options.layer];
-
-  var url = options.url !== undefined ? options.url :
-    'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
-      '/{z}/{x}/{y}.' + layerConfig.extension;
-
-  ol.source.XYZ.call(this, {
-    attributions: ol.source.Stamen.ATTRIBUTIONS,
-    cacheSize: options.cacheSize,
-    crossOrigin: 'anonymous',
-    maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,
-    minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,
-    opaque: layerConfig.opaque,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileLoadFunction: options.tileLoadFunction,
-    url: url,
-    wrapX: options.wrapX
-  });
-};
-ol.inherits(ol.source.Stamen, ol.source.XYZ);
-
-
-/**
- * @const
- * @type {Array.<string>}
- */
-ol.source.Stamen.ATTRIBUTIONS = [
-  'Map tiles by <a href="https://stamen.com/">Stamen Design</a>, ' +
-        'under <a href="https://creativecommons.org/licenses/by/3.0/">CC BY' +
-        ' 3.0</a>.',
-  ol.source.OSM.ATTRIBUTION
-];
-
-/**
- * @type {Object.<string, {extension: string, opaque: boolean}>}
- */
-ol.source.Stamen.LayerConfig = {
-  'terrain': {
-    extension: 'jpg',
-    opaque: true
-  },
-  'terrain-background': {
-    extension: 'jpg',
-    opaque: true
-  },
-  'terrain-labels': {
-    extension: 'png',
-    opaque: false
-  },
-  'terrain-lines': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-background': {
-    extension: 'png',
-    opaque: true
-  },
-  'toner': {
-    extension: 'png',
-    opaque: true
-  },
-  'toner-hybrid': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-labels': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-lines': {
-    extension: 'png',
-    opaque: false
-  },
-  'toner-lite': {
-    extension: 'png',
-    opaque: true
-  },
-  'watercolor': {
-    extension: 'jpg',
-    opaque: true
-  }
-};
-
-/**
- * @type {Object.<string, {minZoom: number, maxZoom: number}>}
- */
-ol.source.Stamen.ProviderConfig = {
-  'terrain': {
-    minZoom: 4,
-    maxZoom: 18
-  },
-  'toner': {
-    minZoom: 0,
-    maxZoom: 20
-  },
-  'watercolor': {
-    minZoom: 1,
-    maxZoom: 16
-  }
-};
-
-goog.provide('ol.source.TileArcGISRest');
-
-goog.require('ol');
-goog.require('ol.extent');
-goog.require('ol.math');
-goog.require('ol.obj');
-goog.require('ol.size');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilecoord');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Layer source for tile data from ArcGIS Rest services. Map and Image
- * Services are supported.
- *
- * For cached ArcGIS services, better performance is available using the
- * {@link ol.source.XYZ} data source.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileArcGISRestOptions=} opt_options Tile ArcGIS Rest
- *     options.
- * @api
- */
-ol.source.TileArcGISRest = function(opt_options) {
-
-  var options = opt_options || {};
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true,
-    transition: options.transition
-  });
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = options.params || {};
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.tmpExtent_ = ol.extent.createEmpty();
-
-  this.setKey(this.getKeyForParams_());
-};
-ol.inherits(ol.source.TileArcGISRest, ol.source.TileImage);
-
-
-/**
- * @private
- * @return {string} The key for the current params.
- */
-ol.source.TileArcGISRest.prototype.getKeyForParams_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.params_) {
-    res[i++] = key + '-' + this.params_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.TileArcGISRest.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {ol.Extent} tileExtent Tile extent.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string|undefined} Request URL.
- * @private
- */
-ol.source.TileArcGISRest.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
-    pixelRatio, projection, params) {
-
-  var urls = this.urls;
-  if (!urls) {
-    return undefined;
-  }
-
-  // ArcGIS Server only wants the numeric portion of the projection ID.
-  var srid = projection.getCode().split(':').pop();
-
-  params['SIZE'] = tileSize[0] + ',' + tileSize[1];
-  params['BBOX'] = tileExtent.join(',');
-  params['BBOXSR'] = srid;
-  params['IMAGESR'] = srid;
-  params['DPI'] = Math.round(
-      params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio
-  );
-
-  var url;
-  if (urls.length == 1) {
-    url = urls[0];
-  } else {
-    var index = ol.math.modulo(ol.tilecoord.hash(tileCoord), urls.length);
-    url = urls[index];
-  }
-
-  var modifiedUrl = url
-      .replace(/MapServer\/?$/, 'MapServer/export')
-      .replace(/ImageServer\/?$/, 'ImageServer/exportImage');
-  return ol.uri.appendParams(modifiedUrl, params);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileArcGISRest.prototype.getTilePixelRatio = function(pixelRatio) {
-  return /** @type {number} */ (pixelRatio);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileArcGISRest.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projection);
-  }
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  var tileExtent = tileGrid.getTileCoordExtent(
-      tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(
-      tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-  if (pixelRatio != 1) {
-    tileSize = ol.size.scale(tileSize, pixelRatio, this.tmpSize);
-  }
-
-  // Apply default params and override with user specified values.
-  var baseParams = {
-    'F': 'image',
-    'FORMAT': 'PNG32',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(baseParams, this.params_);
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      pixelRatio, projection, baseParams);
-};
-
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.TileArcGISRest.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.setKey(this.getKeyForParams_());
-};
-
-goog.provide('ol.source.TileDebug');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.size');
-goog.require('ol.source.Tile');
-goog.require('ol.tilecoord');
-
-
-/**
- * @classdesc
- * A pseudo tile source, which does not fetch tiles from a server, but renders
- * a grid outline for the tile grid/projection along with the coordinates for
- * each tile. See examples/canvas-tiles for an example.
- *
- * Uses Canvas context2d, so requires Canvas support.
- *
- * @constructor
- * @extends {ol.source.Tile}
- * @param {olx.source.TileDebugOptions} options Debug tile options.
- * @api
- */
-ol.source.TileDebug = function(options) {
-
-  ol.source.Tile.call(this, {
-    opaque: false,
-    projection: options.projection,
-    tileGrid: options.tileGrid,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true
-  });
-
-};
-ol.inherits(ol.source.TileDebug, ol.source.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileDebug.prototype.getTile = function(z, x, y) {
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.source.TileDebug.Tile_} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileSize = ol.size.toSize(this.tileGrid.getTileSize(z));
-    var tileCoord = [z, x, y];
-    var textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);
-    var text = !textTileCoord ? '' :
-      this.getTileCoordForTileUrlFunction(textTileCoord).toString();
-    var tile = new ol.source.TileDebug.Tile_(tileCoord, tileSize, text);
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {string} text Text.
- * @private
- */
-ol.source.TileDebug.Tile_ = function(tileCoord, tileSize, text) {
-
-  ol.Tile.call(this, tileCoord, ol.TileState.LOADED);
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tileSize_ = tileSize;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.text_ = text;
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement}
-   */
-  this.canvas_ = null;
-
-};
-ol.inherits(ol.source.TileDebug.Tile_, ol.Tile);
-
-
-/**
- * Get the image element for this tile.
- * @return {HTMLCanvasElement} Image.
- */
-ol.source.TileDebug.Tile_.prototype.getImage = function() {
-  if (this.canvas_) {
-    return this.canvas_;
-  } else {
-    var tileSize = this.tileSize_;
-    var context = ol.dom.createCanvasContext2D(tileSize[0], tileSize[1]);
-
-    context.strokeStyle = 'black';
-    context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);
-
-    context.fillStyle = 'black';
-    context.textAlign = 'center';
-    context.textBaseline = 'middle';
-    context.font = '24px sans-serif';
-    context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2);
-
-    this.canvas_ = context.canvas;
-    return context.canvas;
-  }
-};
-
-
-/**
- * @override
- */
-ol.source.TileDebug.Tile_.prototype.load = function() {};
-
-// FIXME check order of async callbacks
-
-/**
- * @see http://mapbox.com/developers/api/
- */
-
-goog.provide('ol.source.TileJSON');
-
-goog.require('ol');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data in TileJSON format.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileJSONOptions} options TileJSON options.
- * @api
- */
-ol.source.TileJSON = function(options) {
-
-  /**
-   * @type {TileJSON}
-   * @private
-   */
-  this.tileJSON_ = null;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    projection: ol.proj.get('EPSG:3857'),
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    state: ol.source.State.LOADING,
-    tileLoadFunction: options.tileLoadFunction,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true,
-    transition: options.transition
-  });
-
-  if (options.url) {
-    if (options.jsonp) {
-      ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this),
-          this.handleTileJSONError.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', options.url);
-      client.send();
-    }
-  } else if (options.tileJSON) {
-    this.handleTileJSONResponse(options.tileJSON);
-  } else {
-    ol.asserts.assert(false, 51); // Either `url` or `tileJSON` options must be provided
-  }
-
-};
-ol.inherits(ol.source.TileJSON, ol.source.TileImage);
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileJSON.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {TileJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleTileJSONError();
-      return;
-    }
-    this.handleTileJSONResponse(response);
-  } else {
-    this.handleTileJSONError();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileJSON.prototype.onXHRError_ = function(event) {
-  this.handleTileJSONError();
-};
-
-
-/**
- * @return {TileJSON} The tilejson object.
- * @api
- */
-ol.source.TileJSON.prototype.getTileJSON = function() {
-  return this.tileJSON_;
-};
-
-
-/**
- * @protected
- * @param {TileJSON} tileJSON Tile JSON.
- */
-ol.source.TileJSON.prototype.handleTileJSONResponse = function(tileJSON) {
-
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var sourceProjection = this.getProjection();
-  var extent;
-  if (tileJSON.bounds !== undefined) {
-    var transform = ol.proj.getTransformFromProjections(
-        epsg4326Projection, sourceProjection);
-    extent = ol.extent.applyTransform(tileJSON.bounds, transform);
-  }
-
-  var minZoom = tileJSON.minzoom || 0;
-  var maxZoom = tileJSON.maxzoom || 22;
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: ol.tilegrid.extentFromProjection(sourceProjection),
-    maxZoom: maxZoom,
-    minZoom: minZoom
-  });
-  this.tileGrid = tileGrid;
-
-  this.tileUrlFunction =
-      ol.TileUrlFunction.createFromTemplates(tileJSON.tiles, tileGrid);
-
-  if (tileJSON.attribution !== undefined && !this.getAttributions2()) {
-    var attributionExtent = extent !== undefined ?
-      extent : epsg4326Projection.getExtent();
-
-    this.setAttributions(function(frameState) {
-      if (ol.extent.intersects(attributionExtent, frameState.extent)) {
-        return [tileJSON.attribution];
-      }
-      return null;
-    });
-
-  }
-  this.tileJSON_ = tileJSON;
-  this.setState(ol.source.State.READY);
-
-};
-
-
-/**
- * @protected
- */
-ol.source.TileJSON.prototype.handleTileJSONError = function() {
-  this.setState(ol.source.State.ERROR);
-};
-
-goog.provide('ol.source.TileUTFGrid');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.events');
-goog.require('ol.events.EventType');
-goog.require('ol.extent');
-goog.require('ol.net');
-goog.require('ol.proj');
-goog.require('ol.source.State');
-goog.require('ol.source.Tile');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Layer source for UTFGrid interaction data loaded from TileJSON format.
- *
- * @constructor
- * @extends {ol.source.Tile}
- * @param {olx.source.TileUTFGridOptions} options Source options.
- * @api
- */
-ol.source.TileUTFGrid = function(options) {
-  ol.source.Tile.call(this, {
-    projection: ol.proj.get('EPSG:3857'),
-    state: ol.source.State.LOADING
-  });
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.preemptive_ = options.preemptive !== undefined ?
-    options.preemptive : true;
-
-  /**
-   * @private
-   * @type {!ol.TileUrlFunctionType}
-   */
-  this.tileUrlFunction_ = ol.TileUrlFunction.nullTileUrlFunction;
-
-  /**
-   * @private
-   * @type {string|undefined}
-   */
-  this.template_ = undefined;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.jsonp_ = options.jsonp || false;
-
-  if (options.url) {
-    if (this.jsonp_) {
-      ol.net.jsonp(options.url, this.handleTileJSONResponse.bind(this),
-          this.handleTileJSONError.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', options.url);
-      client.send();
-    }
-  } else if (options.tileJSON) {
-    this.handleTileJSONResponse(options.tileJSON);
-  } else {
-    ol.asserts.assert(false, 51); // Either `url` or `tileJSON` options must be provided
-  }
-};
-ol.inherits(ol.source.TileUTFGrid, ol.source.Tile);
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileUTFGrid.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {TileJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleTileJSONError();
-      return;
-    }
-    this.handleTileJSONResponse(response);
-  } else {
-    this.handleTileJSONError();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileUTFGrid.prototype.onXHRError_ = function(event) {
-  this.handleTileJSONError();
-};
-
-
-/**
- * Return the template from TileJSON.
- * @return {string|undefined} The template from TileJSON.
- * @api
- */
-ol.source.TileUTFGrid.prototype.getTemplate = function() {
-  return this.template_;
-};
-
-
-/**
- * Calls the callback (synchronously by default) with the available data
- * for given coordinate and resolution (or `null` if not yet loaded or
- * in case of an error).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {function(this: T, *)} callback Callback.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @param {boolean=} opt_request If `true` the callback is always async.
- *                               The tile data is requested if not yet loaded.
- * @template T
- * @api
- */
-ol.source.TileUTFGrid.prototype.forDataAtCoordinateAndResolution = function(
-    coordinate, resolution, callback, opt_this, opt_request) {
-  if (this.tileGrid) {
-    var tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(
-        coordinate, resolution);
-    var tile = /** @type {!ol.source.TileUTFGrid.Tile_} */(this.getTile(
-        tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));
-    tile.forDataAtCoordinate(coordinate, callback, opt_this, opt_request);
-  } else {
-    if (opt_request === true) {
-      setTimeout(function() {
-        callback.call(opt_this, null);
-      }, 0);
-    } else {
-      callback.call(opt_this, null);
-    }
-  }
-};
-
-
-/**
- * @protected
- */
-ol.source.TileUTFGrid.prototype.handleTileJSONError = function() {
-  this.setState(ol.source.State.ERROR);
-};
-
-
-/**
- * TODO: very similar to ol.source.TileJSON#handleTileJSONResponse
- * @protected
- * @param {TileJSON} tileJSON Tile JSON.
- */
-ol.source.TileUTFGrid.prototype.handleTileJSONResponse = function(tileJSON) {
-
-  var epsg4326Projection = ol.proj.get('EPSG:4326');
-
-  var sourceProjection = this.getProjection();
-  var extent;
-  if (tileJSON.bounds !== undefined) {
-    var transform = ol.proj.getTransformFromProjections(
-        epsg4326Projection, sourceProjection);
-    extent = ol.extent.applyTransform(tileJSON.bounds, transform);
-  }
-
-  var minZoom = tileJSON.minzoom || 0;
-  var maxZoom = tileJSON.maxzoom || 22;
-  var tileGrid = ol.tilegrid.createXYZ({
-    extent: ol.tilegrid.extentFromProjection(sourceProjection),
-    maxZoom: maxZoom,
-    minZoom: minZoom
-  });
-  this.tileGrid = tileGrid;
-
-  this.template_ = tileJSON.template;
-
-  var grids = tileJSON.grids;
-  if (!grids) {
-    this.setState(ol.source.State.ERROR);
-    return;
-  }
-
-  this.tileUrlFunction_ =
-      ol.TileUrlFunction.createFromTemplates(grids, tileGrid);
-
-  if (tileJSON.attribution !== undefined) {
-    var attributionExtent = extent !== undefined ?
-      extent : epsg4326Projection.getExtent();
-
-    this.setAttributions(function(frameState) {
-      if (ol.extent.intersects(attributionExtent, frameState.extent)) {
-        return [tileJSON.attribution];
-      }
-      return null;
-    });
-  }
-
-  this.setState(ol.source.State.READY);
-
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileCoord = [z, x, y];
-    var urlTileCoord =
-        this.getTileCoordForTileUrlFunction(tileCoord, projection);
-    var tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);
-    var tile = new ol.source.TileUTFGrid.Tile_(
-        tileCoord,
-        tileUrl !== undefined ? ol.TileState.IDLE : ol.TileState.EMPTY,
-        tileUrl !== undefined ? tileUrl : '',
-        this.tileGrid.getTileCoordExtent(tileCoord),
-        this.preemptive_,
-        this.jsonp_);
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.prototype.useTile = function(z, x, y) {
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    this.tileCache.get(tileCoordKey);
-  }
-};
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {ol.Extent} extent Extent of the tile.
- * @param {boolean} preemptive Load the tile when visible (before it's needed).
- * @param {boolean} jsonp Load the tile as a script.
- * @private
- */
-ol.source.TileUTFGrid.Tile_ = function(tileCoord, state, src, extent, preemptive, jsonp) {
-
-  ol.Tile.call(this, tileCoord, state);
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.src_ = src;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = extent;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.preemptive_ = preemptive;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.grid_ = null;
-
-  /**
-   * @private
-   * @type {Array.<string>}
-   */
-  this.keys_ = null;
-
-  /**
-   * @private
-   * @type {Object.<string, Object>|undefined}
-   */
-  this.data_ = null;
-
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.jsonp_ = jsonp;
-
-};
-ol.inherits(ol.source.TileUTFGrid.Tile_, ol.Tile);
-
-
-/**
- * Get the image element for this tile.
- * @return {Image} Image.
- */
-ol.source.TileUTFGrid.Tile_.prototype.getImage = function() {
-  return null;
-};
-
-
-/**
- * Synchronously returns data at given coordinate (if available).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @return {*} The data.
- */
-ol.source.TileUTFGrid.Tile_.prototype.getData = function(coordinate) {
-  if (!this.grid_ || !this.keys_) {
-    return null;
-  }
-  var xRelative = (coordinate[0] - this.extent_[0]) /
-      (this.extent_[2] - this.extent_[0]);
-  var yRelative = (coordinate[1] - this.extent_[1]) /
-      (this.extent_[3] - this.extent_[1]);
-
-  var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];
-
-  if (typeof row !== 'string') {
-    return null;
-  }
-
-  var code = row.charCodeAt(Math.floor(xRelative * row.length));
-  if (code >= 93) {
-    code--;
-  }
-  if (code >= 35) {
-    code--;
-  }
-  code -= 32;
-
-  var data = null;
-  if (code in this.keys_) {
-    var id = this.keys_[code];
-    if (this.data_ && id in this.data_) {
-      data = this.data_[id];
-    } else {
-      data = id;
-    }
-  }
-  return data;
-};
-
-
-/**
- * Calls the callback (synchronously by default) with the available data
- * for given coordinate (or `null` if not yet loaded).
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {function(this: T, *)} callback Callback.
- * @param {T=} opt_this The object to use as `this` in the callback.
- * @param {boolean=} opt_request If `true` the callback is always async.
- *                               The tile data is requested if not yet loaded.
- * @template T
- */
-ol.source.TileUTFGrid.Tile_.prototype.forDataAtCoordinate = function(coordinate, callback, opt_this, opt_request) {
-  if (this.state == ol.TileState.IDLE && opt_request === true) {
-    ol.events.listenOnce(this, ol.events.EventType.CHANGE, function(e) {
-      callback.call(opt_this, this.getData(coordinate));
-    }, this);
-    this.loadInternal_();
-  } else {
-    if (opt_request === true) {
-      setTimeout(function() {
-        callback.call(opt_this, this.getData(coordinate));
-      }.bind(this), 0);
-    } else {
-      callback.call(opt_this, this.getData(coordinate));
-    }
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileUTFGrid.Tile_.prototype.getKey = function() {
-  return this.src_;
-};
-
-
-/**
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.handleError_ = function() {
-  this.state = ol.TileState.ERROR;
-  this.changed();
-};
-
-
-/**
- * @param {!UTFGridJSON} json UTFGrid data.
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.handleLoad_ = function(json) {
-  this.grid_ = json.grid;
-  this.keys_ = json.keys;
-  this.data_ = json.data;
-
-  this.state = ol.TileState.EMPTY;
-  this.changed();
-};
-
-
-/**
- * @private
- */
-ol.source.TileUTFGrid.Tile_.prototype.loadInternal_ = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.state = ol.TileState.LOADING;
-    if (this.jsonp_) {
-      ol.net.jsonp(this.src_, this.handleLoad_.bind(this),
-          this.handleError_.bind(this));
-    } else {
-      var client = new XMLHttpRequest();
-      client.addEventListener('load', this.onXHRLoad_.bind(this));
-      client.addEventListener('error', this.onXHRError_.bind(this));
-      client.open('GET', this.src_);
-      client.send();
-    }
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The load event.
- */
-ol.source.TileUTFGrid.Tile_.prototype.onXHRLoad_ = function(event) {
-  var client = /** @type {XMLHttpRequest} */ (event.target);
-  // status will be 0 for file:// urls
-  if (!client.status || client.status >= 200 && client.status < 300) {
-    var response;
-    try {
-      response = /** @type {!UTFGridJSON} */(JSON.parse(client.responseText));
-    } catch (err) {
-      this.handleError_();
-      return;
-    }
-    this.handleLoad_(response);
-  } else {
-    this.handleError_();
-  }
-};
-
-
-/**
- * @private
- * @param {Event} event The error event.
- */
-ol.source.TileUTFGrid.Tile_.prototype.onXHRError_ = function(event) {
-  this.handleError_();
-};
-
-
-/**
- * @override
- */
-ol.source.TileUTFGrid.Tile_.prototype.load = function() {
-  if (this.preemptive_) {
-    this.loadInternal_();
-  }
-};
-
-// FIXME add minZoom support
-// FIXME add date line wrap (tile coord transform)
-// FIXME cannot be shared between maps with different projections
-
-goog.provide('ol.source.TileWMS');
-
-goog.require('ol');
-goog.require('ol.asserts');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.math');
-goog.require('ol.proj');
-goog.require('ol.reproj');
-goog.require('ol.size');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.WMSServerType');
-goog.require('ol.tilecoord');
-goog.require('ol.string');
-goog.require('ol.uri');
-
-/**
- * @classdesc
- * Layer source for tile data from WMS servers.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.TileWMSOptions=} opt_options Tile WMS options.
- * @api
- */
-ol.source.TileWMS = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var params = options.params || {};
-
-  var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    opaque: !transparent,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileClass: options.tileClass,
-    tileGrid: options.tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : true,
-    transition: options.transition
-  });
-
-  /**
-   * @private
-   * @type {number}
-   */
-  this.gutter_ = options.gutter !== undefined ? options.gutter : 0;
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.params_ = params;
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.v13_ = true;
-
-  /**
-   * @private
-   * @type {ol.source.WMSServerType|undefined}
-   */
-  this.serverType_ = /** @type {ol.source.WMSServerType|undefined} */ (options.serverType);
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.tmpExtent_ = ol.extent.createEmpty();
-
-  this.updateV13_();
-  this.setKey(this.getKeyForParams_());
-
-};
-ol.inherits(ol.source.TileWMS, ol.source.TileImage);
-
-
-/**
- * Return the GetFeatureInfo URL for the passed coordinate, resolution, and
- * projection. Return `undefined` if the GetFeatureInfo URL cannot be
- * constructed.
- * @param {ol.Coordinate} coordinate Coordinate.
- * @param {number} resolution Resolution.
- * @param {ol.ProjectionLike} projection Projection.
- * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should
- *     be provided. If `QUERY_LAYERS` is not provided then the layers specified
- *     in the `LAYERS` parameter will be used. `VERSION` should not be
- *     specified here.
- * @return {string|undefined} GetFeatureInfo URL.
- * @api
- */
-ol.source.TileWMS.prototype.getGetFeatureInfoUrl = function(coordinate, resolution, projection, params) {
-  var projectionObj = ol.proj.get(projection);
-  var sourceProjectionObj = this.getProjection();
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projectionObj);
-  }
-
-  var tileCoord = tileGrid.getTileCoordForCoordAndResolution(coordinate, resolution);
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  var tileResolution = tileGrid.getResolution(tileCoord[0]);
-  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-
-  var gutter = this.gutter_;
-  if (gutter !== 0) {
-    tileSize = ol.size.buffer(tileSize, gutter, this.tmpSize);
-    tileExtent = ol.extent.buffer(tileExtent, tileResolution * gutter, tileExtent);
-  }
-
-  if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {
-    tileResolution = ol.reproj.calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, tileResolution);
-    tileExtent = ol.proj.transformExtent(tileExtent, projectionObj, sourceProjectionObj);
-    coordinate = ol.proj.transform(coordinate, projectionObj, sourceProjectionObj);
-  }
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetFeatureInfo',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true,
-    'QUERY_LAYERS': this.params_['LAYERS']
-  };
-  ol.obj.assign(baseParams, this.params_, params);
-
-  var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);
-  var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);
-
-  baseParams[this.v13_ ? 'I' : 'X'] = x;
-  baseParams[this.v13_ ? 'J' : 'Y'] = y;
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      1, sourceProjectionObj || projectionObj, baseParams);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.getGutterInternal = function() {
-  return this.gutter_;
-};
-
-
-/**
- * Get the user-provided params, i.e. those passed to the constructor through
- * the "params" option, and possibly updated using the updateParams method.
- * @return {Object} Params.
- * @api
- */
-ol.source.TileWMS.prototype.getParams = function() {
-  return this.params_;
-};
-
-
-/**
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.Size} tileSize Tile size.
- * @param {ol.Extent} tileExtent Tile extent.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {Object} params Params.
- * @return {string|undefined} Request URL.
- * @private
- */
-ol.source.TileWMS.prototype.getRequestUrl_ = function(tileCoord, tileSize, tileExtent,
-    pixelRatio, projection, params) {
-
-  var urls = this.urls;
-  if (!urls) {
-    return undefined;
-  }
-
-  params['WIDTH'] = tileSize[0];
-  params['HEIGHT'] = tileSize[1];
-
-  params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();
-
-  if (!('STYLES' in this.params_)) {
-    params['STYLES'] = '';
-  }
-
-  if (pixelRatio != 1) {
-    switch (this.serverType_) {
-      case ol.source.WMSServerType.GEOSERVER:
-        var dpi = (90 * pixelRatio + 0.5) | 0;
-        if ('FORMAT_OPTIONS' in params) {
-          params['FORMAT_OPTIONS'] += ';dpi:' + dpi;
-        } else {
-          params['FORMAT_OPTIONS'] = 'dpi:' + dpi;
-        }
-        break;
-      case ol.source.WMSServerType.MAPSERVER:
-        params['MAP_RESOLUTION'] = 90 * pixelRatio;
-        break;
-      case ol.source.WMSServerType.CARMENTA_SERVER:
-      case ol.source.WMSServerType.QGIS:
-        params['DPI'] = 90 * pixelRatio;
-        break;
-      default:
-        ol.asserts.assert(false, 52); // Unknown `serverType` configured
-        break;
-    }
-  }
-
-  var axisOrientation = projection.getAxisOrientation();
-  var bbox = tileExtent;
-  if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {
-    var tmp;
-    tmp = tileExtent[0];
-    bbox[0] = tileExtent[1];
-    bbox[1] = tmp;
-    tmp = tileExtent[2];
-    bbox[2] = tileExtent[3];
-    bbox[3] = tmp;
-  }
-  params['BBOX'] = bbox.join(',');
-
-  var url;
-  if (urls.length == 1) {
-    url = urls[0];
-  } else {
-    var index = ol.math.modulo(ol.tilecoord.hash(tileCoord), urls.length);
-    url = urls[index];
-  }
-  return ol.uri.appendParams(url, params);
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.getTilePixelRatio = function(pixelRatio) {
-  return (!this.hidpi_ || this.serverType_ === undefined) ? 1 :
-  /** @type {number} */ (pixelRatio);
-};
-
-
-/**
- * @private
- * @return {string} The key for the current params.
- */
-ol.source.TileWMS.prototype.getKeyForParams_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.params_) {
-    res[i++] = key + '-' + this.params_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.TileWMS.prototype.fixedTileUrlFunction = function(tileCoord, pixelRatio, projection) {
-
-  var tileGrid = this.getTileGrid();
-  if (!tileGrid) {
-    tileGrid = this.getTileGridForProjection(projection);
-  }
-
-  if (tileGrid.getResolutions().length <= tileCoord[0]) {
-    return undefined;
-  }
-
-  if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {
-    pixelRatio = 1;
-  }
-
-  var tileResolution = tileGrid.getResolution(tileCoord[0]);
-  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);
-  var tileSize = ol.size.toSize(
-      tileGrid.getTileSize(tileCoord[0]), this.tmpSize);
-
-  var gutter = this.gutter_;
-  if (gutter !== 0) {
-    tileSize = ol.size.buffer(tileSize, gutter, this.tmpSize);
-    tileExtent = ol.extent.buffer(tileExtent,
-        tileResolution * gutter, tileExtent);
-  }
-
-  if (pixelRatio != 1) {
-    tileSize = ol.size.scale(tileSize, pixelRatio, this.tmpSize);
-  }
-
-  var baseParams = {
-    'SERVICE': 'WMS',
-    'VERSION': ol.DEFAULT_WMS_VERSION,
-    'REQUEST': 'GetMap',
-    'FORMAT': 'image/png',
-    'TRANSPARENT': true
-  };
-  ol.obj.assign(baseParams, this.params_);
-
-  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,
-      pixelRatio, projection, baseParams);
-};
-
-/**
- * Update the user-provided params.
- * @param {Object} params Params.
- * @api
- */
-ol.source.TileWMS.prototype.updateParams = function(params) {
-  ol.obj.assign(this.params_, params);
-  this.updateV13_();
-  this.setKey(this.getKeyForParams_());
-};
-
-
-/**
- * @private
- */
-ol.source.TileWMS.prototype.updateV13_ = function() {
-  var version = this.params_['VERSION'] || ol.DEFAULT_WMS_VERSION;
-  this.v13_ = ol.string.compareVersions(version, '1.3') >= 0;
-};
-
-goog.provide('ol.VectorImageTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-goog.require('ol.dom');
-goog.require('ol.events');
-goog.require('ol.extent');
-goog.require('ol.events.EventType');
-goog.require('ol.featureloader');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {number} sourceRevision Source revision.
- * @param {ol.format.Feature} format Feature format.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @param {ol.TileCoord} urlTileCoord Wrapped tile coordinate for source urls.
- * @param {ol.TileUrlFunctionType} tileUrlFunction Tile url function.
- * @param {ol.tilegrid.TileGrid} sourceTileGrid Tile grid of the source.
- * @param {ol.tilegrid.TileGrid} tileGrid Tile grid of the renderer.
- * @param {Object.<string,ol.VectorTile>} sourceTiles Source tiles.
- * @param {number} pixelRatio Pixel ratio.
- * @param {ol.proj.Projection} projection Projection.
- * @param {function(new: ol.VectorTile, ol.TileCoord, ol.TileState, string,
- *     ol.format.Feature, ol.TileLoadFunctionType)} tileClass Class to
- *     instantiate for source tiles.
- * @param {function(this: ol.source.VectorTile, ol.events.Event)} handleTileChange
- *     Function to call when a source tile's state changes.
- * @param {olx.TileOptions=} opt_options Tile options.
- */
-ol.VectorImageTile = function(tileCoord, state, sourceRevision, format,
-    tileLoadFunction, urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid,
-    sourceTiles, pixelRatio, projection, tileClass, handleTileChange, opt_options) {
-
-  ol.Tile.call(this, tileCoord, state, opt_options);
-
-  /**
-   * @private
-   * @type {Object.<string, CanvasRenderingContext2D>}
-   */
-  this.context_ = {};
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.TileReplayState>}
-   */
-  this.replayState_ = {};
-
-  /**
-   * @private
-   * @type {Object.<string,ol.VectorTile>}
-   */
-  this.sourceTiles_ = sourceTiles;
-
-  /**
-   * Keys of source tiles used by this tile. Use with {@link #getTile}.
-   * @type {Array.<string>}
-   */
-  this.tileKeys = [];
-
-  /**
-   * @type {number}
-   */
-  this.sourceRevision_ = sourceRevision;
-
-  /**
-   * @type {ol.TileCoord}
-   */
-  this.wrappedTileCoord = urlTileCoord;
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.loadListenerKeys_ = [];
-
-  /**
-   * @type {Array.<ol.EventsKey>}
-   */
-  this.sourceTileListenerKeys_ = [];
-
-  if (urlTileCoord) {
-    var extent = tileGrid.getTileCoordExtent(urlTileCoord);
-    var resolution = tileGrid.getResolution(tileCoord[0]);
-    var sourceZ = sourceTileGrid.getZForResolution(resolution);
-    sourceTileGrid.forEachTileCoord(extent, sourceZ, function(sourceTileCoord) {
-      var sharedExtent = ol.extent.getIntersection(extent,
-          sourceTileGrid.getTileCoordExtent(sourceTileCoord));
-      var sourceExtent = sourceTileGrid.getExtent();
-      if (sourceExtent) {
-        sharedExtent = ol.extent.getIntersection(sharedExtent, sourceExtent);
-      }
-      if (ol.extent.getWidth(sharedExtent) / resolution >= 0.5 &&
-          ol.extent.getHeight(sharedExtent) / resolution >= 0.5) {
-        // only include source tile if overlap is at least 1 pixel
-        var sourceTileKey = sourceTileCoord.toString();
-        var sourceTile = sourceTiles[sourceTileKey];
-        if (!sourceTile) {
-          var tileUrl = tileUrlFunction(sourceTileCoord, pixelRatio, projection);
-          sourceTile = sourceTiles[sourceTileKey] = new tileClass(sourceTileCoord,
-              tileUrl == undefined ? ol.TileState.EMPTY : ol.TileState.IDLE,
-              tileUrl == undefined ? '' : tileUrl,
-              format, tileLoadFunction);
-          this.sourceTileListenerKeys_.push(
-              ol.events.listen(sourceTile, ol.events.EventType.CHANGE, handleTileChange));
-        }
-        sourceTile.consumers++;
-        this.tileKeys.push(sourceTileKey);
-      }
-    }.bind(this));
-  }
-
-};
-ol.inherits(ol.VectorImageTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.disposeInternal = function() {
-  for (var i = 0, ii = this.tileKeys.length; i < ii; ++i) {
-    var sourceTileKey = this.tileKeys[i];
-    var sourceTile = this.getTile(sourceTileKey);
-    sourceTile.consumers--;
-    if (sourceTile.consumers == 0) {
-      delete this.sourceTiles_[sourceTileKey];
-      sourceTile.dispose();
-    }
-  }
-  this.tileKeys.length = 0;
-  this.sourceTiles_ = null;
-  this.loadListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.loadListenerKeys_.length = 0;
-  if (this.interimTile) {
-    this.interimTile.dispose();
-  }
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  this.sourceTileListenerKeys_.forEach(ol.events.unlistenByKey);
-  this.sourceTileListenerKeys_.length = 0;
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @return {CanvasRenderingContext2D} The rendering context.
- */
-ol.VectorImageTile.prototype.getContext = function(layer) {
-  var key = ol.getUid(layer).toString();
-  if (!(key in this.context_)) {
-    this.context_[key] = ol.dom.createCanvasContext2D();
-  }
-  return this.context_[key];
-};
-
-
-/**
- * Get the Canvas for this tile.
- * @param {ol.layer.Layer} layer Layer.
- * @return {HTMLCanvasElement} Canvas.
- */
-ol.VectorImageTile.prototype.getImage = function(layer) {
-  return this.getReplayState(layer).renderedTileRevision == -1 ?
-    null : this.getContext(layer).canvas;
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @return {ol.TileReplayState} The replay state.
- */
-ol.VectorImageTile.prototype.getReplayState = function(layer) {
-  var key = ol.getUid(layer).toString();
-  if (!(key in this.replayState_)) {
-    this.replayState_[key] = {
-      dirty: false,
-      renderedRenderOrder: null,
-      renderedRevision: -1,
-      renderedTileRevision: -1
-    };
-  }
-  return this.replayState_[key];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.getKey = function() {
-  return this.tileKeys.join('/') + '-' + this.sourceRevision_;
-};
-
-
-/**
- * @param {string} tileKey Key (tileCoord) of the source tile.
- * @return {ol.VectorTile} Source tile.
- */
-ol.VectorImageTile.prototype.getTile = function(tileKey) {
-  return this.sourceTiles_[tileKey];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorImageTile.prototype.load = function() {
-  // Source tiles with LOADED state - we just count them because once they are
-  // loaded, we're no longer listening to state changes.
-  var leftToLoad = 0;
-  // Source tiles with ERROR state - we track them because they can still have
-  // an ERROR state after another load attempt.
-  var errorSourceTiles = {};
-
-  if (this.state == ol.TileState.IDLE) {
-    this.setState(ol.TileState.LOADING);
-  }
-  if (this.state == ol.TileState.LOADING) {
-    this.tileKeys.forEach(function(sourceTileKey) {
-      var sourceTile = this.getTile(sourceTileKey);
-      if (sourceTile.state == ol.TileState.IDLE) {
-        sourceTile.setLoader(this.loader_);
-        sourceTile.load();
-      }
-      if (sourceTile.state == ol.TileState.LOADING) {
-        var key = ol.events.listen(sourceTile, ol.events.EventType.CHANGE, function(e) {
-          var state = sourceTile.getState();
-          if (state == ol.TileState.LOADED ||
-              state == ol.TileState.ERROR) {
-            var uid = ol.getUid(sourceTile);
-            if (state == ol.TileState.ERROR) {
-              errorSourceTiles[uid] = true;
-            } else {
-              --leftToLoad;
-              delete errorSourceTiles[uid];
-            }
-            if (leftToLoad - Object.keys(errorSourceTiles).length == 0) {
-              this.finishLoading_();
-            }
-          }
-        }.bind(this));
-        this.loadListenerKeys_.push(key);
-        ++leftToLoad;
-      }
-    }.bind(this));
-  }
-  if (leftToLoad - Object.keys(errorSourceTiles).length == 0) {
-    setTimeout(this.finishLoading_.bind(this), 0);
-  }
-};
-
-
-/**
- * @private
- */
-ol.VectorImageTile.prototype.finishLoading_ = function() {
-  var loaded = this.tileKeys.length;
-  var empty = 0;
-  for (var i = loaded - 1; i >= 0; --i) {
-    var state = this.getTile(this.tileKeys[i]).getState();
-    if (state != ol.TileState.LOADED) {
-      --loaded;
-    }
-    if (state == ol.TileState.EMPTY) {
-      ++empty;
-    }
-  }
-  if (loaded == this.tileKeys.length) {
-    this.loadListenerKeys_.forEach(ol.events.unlistenByKey);
-    this.loadListenerKeys_.length = 0;
-    this.setState(ol.TileState.LOADED);
-  } else {
-    this.setState(empty == this.tileKeys.length ? ol.TileState.EMPTY : ol.TileState.ERROR);
-  }
-};
-
-
-/**
- * Sets the loader for a tile.
- * @param {ol.VectorTile} tile Vector tile.
- * @param {string} url URL.
- */
-ol.VectorImageTile.defaultLoadFunction = function(tile, url) {
-  var loader = ol.featureloader.loadFeaturesXhr(
-      url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));
-
-  tile.setLoader(loader);
-};
-
-goog.provide('ol.VectorTile');
-
-goog.require('ol');
-goog.require('ol.Tile');
-goog.require('ol.TileState');
-
-
-/**
- * @constructor
- * @extends {ol.Tile}
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Data source url.
- * @param {ol.format.Feature} format Feature format.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @param {olx.TileOptions=} opt_options Tile options.
- */
-ol.VectorTile = function(tileCoord, state, src, format, tileLoadFunction, opt_options) {
-
-  ol.Tile.call(this, tileCoord, state, opt_options);
-
-  /**
-   * @type {number}
-   */
-  this.consumers = 0;
-
-  /**
-   * @private
-   * @type {ol.Extent}
-   */
-  this.extent_ = null;
-
-  /**
-   * @private
-   * @type {ol.format.Feature}
-   */
-  this.format_ = format;
-
-  /**
-   * @private
-   * @type {Array.<ol.Feature>}
-   */
-  this.features_ = null;
-
-  /**
-   * @private
-   * @type {ol.FeatureLoader}
-   */
-  this.loader_;
-
-  /**
-   * Data projection
-   * @private
-   * @type {ol.proj.Projection}
-   */
-  this.projection_;
-
-  /**
-   * @private
-   * @type {Object.<string, ol.render.ReplayGroup>}
-   */
-  this.replayGroups_ = {};
-
-  /**
-   * @private
-   * @type {ol.TileLoadFunctionType}
-   */
-  this.tileLoadFunction_ = tileLoadFunction;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.url_ = src;
-
-};
-ol.inherits(ol.VectorTile, ol.Tile);
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.disposeInternal = function() {
-  this.features_ = null;
-  this.replayGroups_ = {};
-  this.state = ol.TileState.ABORT;
-  this.changed();
-  ol.Tile.prototype.disposeInternal.call(this);
-};
-
-
-/**
- * Gets the extent of the vector tile.
- * @return {ol.Extent} The extent.
- * @api
- */
-ol.VectorTile.prototype.getExtent = function() {
-  return this.extent_ || ol.VectorTile.DEFAULT_EXTENT;
-};
-
-
-/**
- * Get the feature format assigned for reading this tile's features.
- * @return {ol.format.Feature} Feature format.
- * @api
- */
-ol.VectorTile.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * Get the features for this tile. Geometries will be in the projection returned
- * by {@link ol.VectorTile#getProjection}.
- * @return {Array.<ol.Feature|ol.render.Feature>} Features.
- * @api
- */
-ol.VectorTile.prototype.getFeatures = function() {
-  return this.features_;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.getKey = function() {
-  return this.url_;
-};
-
-
-/**
- * Get the feature projection of features returned by
- * {@link ol.VectorTile#getFeatures}.
- * @return {ol.proj.Projection} Feature projection.
- * @api
- */
-ol.VectorTile.prototype.getProjection = function() {
-  return this.projection_;
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @param {string} key Key.
- * @return {ol.render.ReplayGroup} Replay group.
- */
-ol.VectorTile.prototype.getReplayGroup = function(layer, key) {
-  return this.replayGroups_[ol.getUid(layer) + ',' + key];
-};
-
-
-/**
- * @inheritDoc
- */
-ol.VectorTile.prototype.load = function() {
-  if (this.state == ol.TileState.IDLE) {
-    this.setState(ol.TileState.LOADING);
-    this.tileLoadFunction_(this, this.url_);
-    this.loader_(null, NaN, null);
-  }
-};
-
-
-/**
- * Handler for successful tile load.
- * @param {Array.<ol.Feature>} features The loaded features.
- * @param {ol.proj.Projection} dataProjection Data projection.
- * @param {ol.Extent} extent Extent.
- */
-ol.VectorTile.prototype.onLoad = function(features, dataProjection, extent) {
-  this.setProjection(dataProjection);
-  this.setFeatures(features);
-  this.setExtent(extent);
-};
-
-
-/**
- * Handler for tile load errors.
- */
-ol.VectorTile.prototype.onError = function() {
-  this.setState(ol.TileState.ERROR);
-};
-
-
-/**
- * Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
- * Sets the extent of the vector tile. This is only required for tiles in
- * projections with `tile-pixels` as units. The extent should be set to
- * `[0, 0, tilePixelSize, tilePixelSize]`, where `tilePixelSize` is calculated
- * by multiplying the tile size with the tile pixel ratio. For sources using
- * {@link ol.format.MVT} as feature format, the
- * {@link ol.format.MVT#getLastExtent} method will return the correct extent.
- * The default is `[0, 0, 4096, 4096]`.
- * @param {ol.Extent} extent The extent.
- * @api
- */
-ol.VectorTile.prototype.setExtent = function(extent) {
-  this.extent_ = extent;
-};
-
-
-/**
- * Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
- * Sets the features for the tile.
- * @param {Array.<ol.Feature>} features Features.
- * @api
- */
-ol.VectorTile.prototype.setFeatures = function(features) {
-  this.features_ = features;
-  this.setState(ol.TileState.LOADED);
-};
-
-
-/**
- * Function for use in an {@link ol.source.VectorTile}'s `tileLoadFunction`.
- * Sets the projection of the features that were added with
- * {@link ol.VectorTile#setFeatures}.
- * @param {ol.proj.Projection} projection Feature projection.
- * @api
- */
-ol.VectorTile.prototype.setProjection = function(projection) {
-  this.projection_ = projection;
-};
-
-
-/**
- * @param {ol.layer.Layer} layer Layer.
- * @param {string} key Key.
- * @param {ol.render.ReplayGroup} replayGroup Replay group.
- */
-ol.VectorTile.prototype.setReplayGroup = function(layer, key, replayGroup) {
-  this.replayGroups_[ol.getUid(layer) + ',' + key] = replayGroup;
-};
-
-
-/**
- * Set the feature loader for reading this tile's features.
- * @param {ol.FeatureLoader} loader Feature loader.
- * @api
- */
-ol.VectorTile.prototype.setLoader = function(loader) {
-  this.loader_ = loader;
-};
-
-
-/**
- * @const
- * @type {ol.Extent}
- */
-ol.VectorTile.DEFAULT_EXTENT = [0, 0, 4096, 4096];
-
-goog.provide('ol.source.VectorTile');
-
-goog.require('ol');
-goog.require('ol.TileState');
-goog.require('ol.VectorImageTile');
-goog.require('ol.VectorTile');
-goog.require('ol.size');
-goog.require('ol.source.UrlTile');
-goog.require('ol.tilecoord');
-goog.require('ol.tilegrid');
-
-
-/**
- * @classdesc
- * Class for layer sources providing vector data divided into a tile grid, to be
- * used with {@link ol.layer.VectorTile}. Although this source receives tiles
- * with vector features from the server, it is not meant for feature editing.
- * Features are optimized for rendering, their geometries are clipped at or near
- * tile boundaries and simplified for a view resolution. See
- * {@link ol.source.Vector} for vector sources that are suitable for feature
- * editing.
- *
- * @constructor
- * @fires ol.source.Tile.Event
- * @extends {ol.source.UrlTile}
- * @param {olx.source.VectorTileOptions} options Vector tile options.
- * @api
- */
-ol.source.VectorTile = function(options) {
-  var projection = options.projection || 'EPSG:3857';
-
-  var extent = options.extent || ol.tilegrid.extentFromProjection(projection);
-
-  var tileGrid = options.tileGrid || ol.tilegrid.createXYZ({
-    extent: extent,
-    maxZoom: options.maxZoom || 22,
-    minZoom: options.minZoom,
-    tileSize: options.tileSize || 512
-  });
-
-  ol.source.UrlTile.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
-    extent: extent,
-    logo: options.logo,
-    opaque: false,
-    projection: projection,
-    state: options.state,
-    tileGrid: tileGrid,
-    tileLoadFunction: options.tileLoadFunction ?
-      options.tileLoadFunction : ol.VectorImageTile.defaultLoadFunction,
-    tileUrlFunction: options.tileUrlFunction,
-    url: options.url,
-    urls: options.urls,
-    wrapX: options.wrapX === undefined ? true : options.wrapX,
-    transition: options.transition
-  });
-
-  /**
-   * @private
-   * @type {ol.format.Feature}
-   */
-  this.format_ = options.format ? options.format : null;
-
-  /**
-   * @private
-   * @type {Object.<string,ol.VectorTile>}
-   */
-  this.sourceTiles_ = {};
-
-  /**
-   * @private
-   * @type {boolean}
-   */
-  this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;
-
-  /**
-   * @protected
-   * @type {function(new: ol.VectorTile, ol.TileCoord, ol.TileState, string,
-   *        ol.format.Feature, ol.TileLoadFunctionType)}
-   */
-  this.tileClass = options.tileClass ? options.tileClass : ol.VectorTile;
-
-  /**
-   * @private
-   * @type {Object.<string,ol.tilegrid.TileGrid>}
-   */
-  this.tileGrids_ = {};
-
-};
-ol.inherits(ol.source.VectorTile, ol.source.UrlTile);
-
-
-/**
- * @return {boolean} The source can have overlapping geometries.
- */
-ol.source.VectorTile.prototype.getOverlaps = function() {
-  return this.overlaps_;
-};
-
-/**
- * clear {@link ol.TileCache} and delete all source tiles
- * @api
- */
-ol.source.VectorTile.prototype.clear = function() {
-  this.tileCache.clear();
-  this.sourceTiles_ = {};
-};
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTile = function(z, x, y, pixelRatio, projection) {
-  var tileCoordKey = ol.tilecoord.getKeyZXY(z, x, y);
-  if (this.tileCache.containsKey(tileCoordKey)) {
-    return /** @type {!ol.Tile} */ (this.tileCache.get(tileCoordKey));
-  } else {
-    var tileCoord = [z, x, y];
-    var urlTileCoord = this.getTileCoordForTileUrlFunction(
-        tileCoord, projection);
-    var tile = new ol.VectorImageTile(
-        tileCoord,
-        urlTileCoord !== null ? ol.TileState.IDLE : ol.TileState.EMPTY,
-        this.getRevision(),
-        this.format_, this.tileLoadFunction, urlTileCoord, this.tileUrlFunction,
-        this.tileGrid, this.getTileGridForProjection(projection),
-        this.sourceTiles_, pixelRatio, projection, this.tileClass,
-        this.handleTileChange.bind(this),
-        this.tileOptions);
-
-    this.tileCache.set(tileCoordKey, tile);
-    return tile;
-  }
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTileGridForProjection = function(projection) {
-  var code = projection.getCode();
-  var tileGrid = this.tileGrids_[code];
-  if (!tileGrid) {
-    // A tile grid that matches the tile size of the source tile grid is more
-    // likely to have 1:1 relationships between source tiles and rendered tiles.
-    var sourceTileGrid = this.tileGrid;
-    tileGrid = this.tileGrids_[code] = ol.tilegrid.createForProjection(projection, undefined,
-        sourceTileGrid ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom()) : undefined);
-  }
-  return tileGrid;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTilePixelRatio = function(pixelRatio) {
-  return pixelRatio;
-};
-
-
-/**
- * @inheritDoc
- */
-ol.source.VectorTile.prototype.getTilePixelSize = function(z, pixelRatio, projection) {
-  var tileSize = ol.size.toSize(this.getTileGridForProjection(projection).getTileSize(z));
-  return [Math.round(tileSize[0] * pixelRatio), Math.round(tileSize[1] * pixelRatio)];
-};
-
-goog.provide('ol.source.WMTSRequestEncoding');
-
-/**
- * Request encoding. One of 'KVP', 'REST'.
- * @enum {string}
- */
-ol.source.WMTSRequestEncoding = {
-  KVP: 'KVP',  // see spec §8
-  REST: 'REST' // see spec §10
-};
-
-goog.provide('ol.tilegrid.WMTS');
-
-goog.require('ol');
-goog.require('ol.array');
-goog.require('ol.proj');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @classdesc
- * Set the grid pattern for sources accessing WMTS tiled-image servers.
- *
- * @constructor
- * @extends {ol.tilegrid.TileGrid}
- * @param {olx.tilegrid.WMTSOptions} options WMTS options.
- * @struct
- * @api
- */
-ol.tilegrid.WMTS = function(options) {
-  /**
-   * @private
-   * @type {!Array.<string>}
-   */
-  this.matrixIds_ = options.matrixIds;
-  // FIXME: should the matrixIds become optional?
-
-  ol.tilegrid.TileGrid.call(this, {
-    extent: options.extent,
-    origin: options.origin,
-    origins: options.origins,
-    resolutions: options.resolutions,
-    tileSize: options.tileSize,
-    tileSizes: options.tileSizes,
-    sizes: options.sizes
-  });
-};
-ol.inherits(ol.tilegrid.WMTS, ol.tilegrid.TileGrid);
-
-
-/**
- * @param {number} z Z.
- * @return {string} MatrixId..
- */
-ol.tilegrid.WMTS.prototype.getMatrixId = function(z) {
-  return this.matrixIds_[z];
-};
-
-
-/**
- * Get the list of matrix identifiers.
- * @return {Array.<string>} MatrixIds.
- * @api
- */
-ol.tilegrid.WMTS.prototype.getMatrixIds = function() {
-  return this.matrixIds_;
-};
-
-
-/**
- * Create a tile grid from a WMTS capabilities matrix set and an
- * optional TileMatrixSetLimits.
- * @param {Object} matrixSet An object representing a matrixSet in the
- *     capabilities document.
- * @param {ol.Extent=} opt_extent An optional extent to restrict the tile
- *     ranges the server provides.
- * @param {Array.<Object>=} opt_matrixLimits An optional object representing
- *     the available matrices for tileGrid.
- * @return {ol.tilegrid.WMTS} WMTS tileGrid instance.
- * @api
- */
-ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = function(matrixSet, opt_extent,
-    opt_matrixLimits) {
-
-  /** @type {!Array.<number>} */
-  var resolutions = [];
-  /** @type {!Array.<string>} */
-  var matrixIds = [];
-  /** @type {!Array.<ol.Coordinate>} */
-  var origins = [];
-  /** @type {!Array.<ol.Size>} */
-  var tileSizes = [];
-  /** @type {!Array.<ol.Size>} */
-  var sizes = [];
-
-  var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];
-
-  var supportedCRSPropName = 'SupportedCRS';
-  var matrixIdsPropName = 'TileMatrix';
-  var identifierPropName = 'Identifier';
-  var scaleDenominatorPropName = 'ScaleDenominator';
-  var topLeftCornerPropName = 'TopLeftCorner';
-  var tileWidthPropName = 'TileWidth';
-  var tileHeightPropName = 'TileHeight';
-
-  var code = matrixSet[supportedCRSPropName];
-  var projection = ol.proj.get(code.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3')) ||
-      ol.proj.get(code);
-  var metersPerUnit = projection.getMetersPerUnit();
-  // swap origin x and y coordinates if axis orientation is lat/long
-  var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';
-
-  matrixSet[matrixIdsPropName].sort(function(a, b) {
-    return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];
-  });
-
-  matrixSet[matrixIdsPropName].forEach(function(elt, index, array) {
-
-    var matrixAvailable;
-    // use of matrixLimits to filter TileMatrices from GetCapabilities
-    // TileMatrixSet from unavailable matrix levels.
-    if (matrixLimits.length > 0) {
-      matrixAvailable = ol.array.find(matrixLimits,
-          function(elt_ml, index_ml, array_ml) {
-            return elt[identifierPropName] == elt_ml[matrixIdsPropName];
-          });
-    } else {
-      matrixAvailable = true;
-    }
-
-    if (matrixAvailable) {
-      matrixIds.push(elt[identifierPropName]);
-      var resolution = elt[scaleDenominatorPropName] * 0.28E-3 / metersPerUnit;
-      var tileWidth = elt[tileWidthPropName];
-      var tileHeight = elt[tileHeightPropName];
-      if (switchOriginXY) {
-        origins.push([elt[topLeftCornerPropName][1],
-          elt[topLeftCornerPropName][0]]);
-      } else {
-        origins.push(elt[topLeftCornerPropName]);
-      }
-      resolutions.push(resolution);
-      tileSizes.push(tileWidth == tileHeight ?
-        tileWidth : [tileWidth, tileHeight]);
-      // top-left origin, so height is negative
-      sizes.push([elt['MatrixWidth'], -elt['MatrixHeight']]);
-    }
-  });
-
-  return new ol.tilegrid.WMTS({
-    extent: opt_extent,
-    origins: origins,
-    resolutions: resolutions,
-    matrixIds: matrixIds,
-    tileSizes: tileSizes,
-    sizes: sizes
-  });
-};
-
-goog.provide('ol.source.WMTS');
-
-goog.require('ol');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.array');
-goog.require('ol.extent');
-goog.require('ol.obj');
-goog.require('ol.proj');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.WMTSRequestEncoding');
-goog.require('ol.tilegrid.WMTS');
-goog.require('ol.uri');
-
-
-/**
- * @classdesc
- * Layer source for tile data from WMTS servers.
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.WMTSOptions} options WMTS options.
- * @api
- */
-ol.source.WMTS = function(options) {
-
-  // TODO: add support for TileMatrixLimits
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.version_ = options.version !== undefined ? options.version : '1.0.0';
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.format_ = options.format !== undefined ? options.format : 'image/jpeg';
-
-  /**
-   * @private
-   * @type {!Object}
-   */
-  this.dimensions_ = options.dimensions !== undefined ? options.dimensions : {};
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.layer_ = options.layer;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.matrixSet_ = options.matrixSet;
-
-  /**
-   * @private
-   * @type {string}
-   */
-  this.style_ = options.style;
-
-  var urls = options.urls;
-  if (urls === undefined && options.url !== undefined) {
-    urls = ol.TileUrlFunction.expandUrl(options.url);
-  }
-
-  // FIXME: should we guess this requestEncoding from options.url(s)
-  //        structure? that would mean KVP only if a template is not provided.
-
-  /**
-   * @private
-   * @type {ol.source.WMTSRequestEncoding}
-   */
-  this.requestEncoding_ = options.requestEncoding !== undefined ?
-    /** @type {ol.source.WMTSRequestEncoding} */ (options.requestEncoding) :
-    ol.source.WMTSRequestEncoding.KVP;
-
-  var requestEncoding = this.requestEncoding_;
-
-  // FIXME: should we create a default tileGrid?
-  // we could issue a getCapabilities xhr to retrieve missing configuration
-  var tileGrid = options.tileGrid;
-
-  // context property names are lower case to allow for a case insensitive
-  // replacement as some services use different naming conventions
-  var context = {
-    'layer': this.layer_,
-    'style': this.style_,
-    'tilematrixset': this.matrixSet_
-  };
-
-  if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
-    ol.obj.assign(context, {
-      'Service': 'WMTS',
-      'Request': 'GetTile',
-      'Version': this.version_,
-      'Format': this.format_
-    });
-  }
-
-  var dimensions = this.dimensions_;
-
-  /**
-   * @param {string} template Template.
-   * @return {ol.TileUrlFunctionType} Tile URL function.
-   * @private
-   */
-  this.createFromWMTSTemplate_ = function(template) {
-
-    // TODO: we may want to create our own appendParams function so that params
-    // order conforms to wmts spec guidance, and so that we can avoid to escape
-    // special template params
-
-    template = (requestEncoding == ol.source.WMTSRequestEncoding.KVP) ?
-      ol.uri.appendParams(template, context) :
-      template.replace(/\{(\w+?)\}/g, function(m, p) {
-        return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;
-      });
-
-    return (
-      /**
-       * @param {ol.TileCoord} tileCoord Tile coordinate.
-       * @param {number} pixelRatio Pixel ratio.
-       * @param {ol.proj.Projection} projection Projection.
-       * @return {string|undefined} Tile URL.
-       */
-      function(tileCoord, pixelRatio, projection) {
-        if (!tileCoord) {
-          return undefined;
-        } else {
-          var localContext = {
-            'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),
-            'TileCol': tileCoord[1],
-            'TileRow': -tileCoord[2] - 1
-          };
-          ol.obj.assign(localContext, dimensions);
-          var url = template;
-          if (requestEncoding == ol.source.WMTSRequestEncoding.KVP) {
-            url = ol.uri.appendParams(url, localContext);
-          } else {
-            url = url.replace(/\{(\w+?)\}/g, function(m, p) {
-              return localContext[p];
-            });
-          }
-          return url;
-        }
-      });
-  };
-
-  var tileUrlFunction = (urls && urls.length > 0) ?
-    ol.TileUrlFunction.createFromTileUrlFunctions(
-        urls.map(this.createFromWMTSTemplate_)) :
-    ol.TileUrlFunction.nullTileUrlFunction;
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileClass: options.tileClass,
-    tileGrid: tileGrid,
-    tileLoadFunction: options.tileLoadFunction,
-    tilePixelRatio: options.tilePixelRatio,
-    tileUrlFunction: tileUrlFunction,
-    urls: urls,
-    wrapX: options.wrapX !== undefined ? options.wrapX : false,
-    transition: options.transition
-  });
-
-  this.setKey(this.getKeyForDimensions_());
-
-};
-ol.inherits(ol.source.WMTS, ol.source.TileImage);
-
-/**
- * Set the URLs to use for requests.
- * URLs may contain OCG conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
- * @override
- */
-ol.source.WMTS.prototype.setUrls = function(urls) {
-  this.urls = urls;
-  var key = urls.join('\n');
-  this.setTileUrlFunction(this.fixedTileUrlFunction ?
-    this.fixedTileUrlFunction.bind(this) :
-    ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_.bind(this))), key);
-};
-
-/**
- * Get the dimensions, i.e. those passed to the constructor through the
- * "dimensions" option, and possibly updated using the updateDimensions
- * method.
- * @return {!Object} Dimensions.
- * @api
- */
-ol.source.WMTS.prototype.getDimensions = function() {
-  return this.dimensions_;
-};
-
-
-/**
- * Return the image format of the WMTS source.
- * @return {string} Format.
- * @api
- */
-ol.source.WMTS.prototype.getFormat = function() {
-  return this.format_;
-};
-
-
-/**
- * Return the layer of the WMTS source.
- * @return {string} Layer.
- * @api
- */
-ol.source.WMTS.prototype.getLayer = function() {
-  return this.layer_;
-};
-
-
-/**
- * Return the matrix set of the WMTS source.
- * @return {string} MatrixSet.
- * @api
- */
-ol.source.WMTS.prototype.getMatrixSet = function() {
-  return this.matrixSet_;
-};
-
-
-/**
- * Return the request encoding, either "KVP" or "REST".
- * @return {ol.source.WMTSRequestEncoding} Request encoding.
- * @api
- */
-ol.source.WMTS.prototype.getRequestEncoding = function() {
-  return this.requestEncoding_;
-};
-
-
-/**
- * Return the style of the WMTS source.
- * @return {string} Style.
- * @api
- */
-ol.source.WMTS.prototype.getStyle = function() {
-  return this.style_;
-};
-
-
-/**
- * Return the version of the WMTS source.
- * @return {string} Version.
- * @api
- */
-ol.source.WMTS.prototype.getVersion = function() {
-  return this.version_;
-};
-
-
-/**
- * @private
- * @return {string} The key for the current dimensions.
- */
-ol.source.WMTS.prototype.getKeyForDimensions_ = function() {
-  var i = 0;
-  var res = [];
-  for (var key in this.dimensions_) {
-    res[i++] = key + '-' + this.dimensions_[key];
-  }
-  return res.join('/');
-};
-
-
-/**
- * Update the dimensions.
- * @param {Object} dimensions Dimensions.
- * @api
- */
-ol.source.WMTS.prototype.updateDimensions = function(dimensions) {
-  ol.obj.assign(this.dimensions_, dimensions);
-  this.setKey(this.getKeyForDimensions_());
-};
-
-
-/**
- * Generate source options from a capabilities object.
- * @param {Object} wmtsCap An object representing the capabilities document.
- * @param {Object} config Configuration properties for the layer.  Defaults for
- *                  the layer will apply if not provided.
- *
- * Required config properties:
- *  - layer - {string} The layer identifier.
- *
- * Optional config properties:
- *  - matrixSet - {string} The matrix set identifier, required if there is
- *       more than one matrix set in the layer capabilities.
- *  - projection - {string} The desired CRS when no matrixSet is specified.
- *       eg: "EPSG:3857". If the desired projection is not available,
- *       an error is thrown.
- *  - requestEncoding - {string} url encoding format for the layer. Default is
- *       the first tile url format found in the GetCapabilities response.
- *  - style - {string} The name of the style
- *  - format - {string} Image format for the layer. Default is the first
- *       format returned in the GetCapabilities response.
- *  - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.
- * @return {?olx.source.WMTSOptions} WMTS source options object or `null` if the layer was not found.
- * @api
- */
-ol.source.WMTS.optionsFromCapabilities = function(wmtsCap, config) {
-  var layers = wmtsCap['Contents']['Layer'];
-  var l = ol.array.find(layers, function(elt, index, array) {
-    return elt['Identifier'] == config['layer'];
-  });
-  if (l === null) {
-    return null;
-  }
-  var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];
-  var idx, matrixSet, matrixLimits;
-  if (l['TileMatrixSetLink'].length > 1) {
-    if ('projection' in config) {
-      idx = ol.array.findIndex(l['TileMatrixSetLink'],
-          function(elt, index, array) {
-            var tileMatrixSet = ol.array.find(tileMatrixSets, function(el) {
-              return el['Identifier'] == elt['TileMatrixSet'];
-            });
-            var supportedCRS = tileMatrixSet['SupportedCRS'];
-            var proj1 = ol.proj.get(supportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3')) ||
-                ol.proj.get(supportedCRS);
-            var proj2 = ol.proj.get(config['projection']);
-            if (proj1 && proj2) {
-              return ol.proj.equivalent(proj1, proj2);
-            } else {
-              return supportedCRS == config['projection'];
-            }
-          });
-    } else {
-      idx = ol.array.findIndex(l['TileMatrixSetLink'],
-          function(elt, index, array) {
-            return elt['TileMatrixSet'] == config['matrixSet'];
-          });
-    }
-  } else {
-    idx = 0;
-  }
-  if (idx < 0) {
-    idx = 0;
-  }
-  matrixSet = /** @type {string} */
-    (l['TileMatrixSetLink'][idx]['TileMatrixSet']);
-  matrixLimits = /** @type {Array.<Object>} */
-    (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);
-
-  var format = /** @type {string} */ (l['Format'][0]);
-  if ('format' in config) {
-    format = config['format'];
-  }
-  idx = ol.array.findIndex(l['Style'], function(elt, index, array) {
-    if ('style' in config) {
-      return elt['Title'] == config['style'];
-    } else {
-      return elt['isDefault'];
-    }
-  });
-  if (idx < 0) {
-    idx = 0;
-  }
-  var style = /** @type {string} */ (l['Style'][idx]['Identifier']);
-
-  var dimensions = {};
-  if ('Dimension' in l) {
-    l['Dimension'].forEach(function(elt, index, array) {
-      var key = elt['Identifier'];
-      var value = elt['Default'];
-      if (value === undefined) {
-        value = elt['Value'][0];
-      }
-      dimensions[key] = value;
-    });
-  }
-
-  var matrixSets = wmtsCap['Contents']['TileMatrixSet'];
-  var matrixSetObj = ol.array.find(matrixSets, function(elt, index, array) {
-    return elt['Identifier'] == matrixSet;
-  });
-
-  var projection;
-  var code = matrixSetObj['SupportedCRS'];
-  if (code) {
-    projection = ol.proj.get(code.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/, '$1:$3')) ||
-        ol.proj.get(code);
-  }
-  if ('projection' in config) {
-    var projConfig = ol.proj.get(config['projection']);
-    if (projConfig) {
-      if (!projection || ol.proj.equivalent(projConfig, projection)) {
-        projection = projConfig;
-      }
-    }
-  }
-
-  var wgs84BoundingBox = l['WGS84BoundingBox'];
-  var extent, wrapX;
-  if (wgs84BoundingBox !== undefined) {
-    var wgs84ProjectionExtent = ol.proj.get('EPSG:4326').getExtent();
-    wrapX = (wgs84BoundingBox[0] == wgs84ProjectionExtent[0] &&
-        wgs84BoundingBox[2] == wgs84ProjectionExtent[2]);
-    extent = ol.proj.transformExtent(
-        wgs84BoundingBox, 'EPSG:4326', projection);
-    var projectionExtent = projection.getExtent();
-    if (projectionExtent) {
-      // If possible, do a sanity check on the extent - it should never be
-      // bigger than the validity extent of the projection of a matrix set.
-      if (!ol.extent.containsExtent(projectionExtent, extent)) {
-        extent = undefined;
-      }
-    }
-  }
-
-  var tileGrid = ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet(
-      matrixSetObj, extent, matrixLimits);
-
-  /** @type {!Array.<string>} */
-  var urls = [];
-  var requestEncoding = config['requestEncoding'];
-  requestEncoding = requestEncoding !== undefined ? requestEncoding : '';
-
-  if ('OperationsMetadata' in wmtsCap && 'GetTile' in wmtsCap['OperationsMetadata']) {
-    var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];
-
-    for (var i = 0, ii = gets.length; i < ii; ++i) {
-      if (gets[i]['Constraint']) {
-        var constraint = ol.array.find(gets[i]['Constraint'], function(element) {
-          return element['name'] == 'GetEncoding';
-        });
-        var encodings = constraint['AllowedValues']['Value'];
-
-        if (requestEncoding === '') {
-          // requestEncoding not provided, use the first encoding from the list
-          requestEncoding = encodings[0];
-        }
-        if (requestEncoding === ol.source.WMTSRequestEncoding.KVP) {
-          if (ol.array.includes(encodings, ol.source.WMTSRequestEncoding.KVP)) {
-            urls.push(/** @type {string} */ (gets[i]['href']));
-          }
-        } else {
-          break;
-        }
-      } else if (gets[i]['href']) {
-        requestEncoding = ol.source.WMTSRequestEncoding.KVP;
-        urls.push(/** @type {string} */ (gets[i]['href']));
-      }
-    }
-  }
-  if (urls.length === 0) {
-    requestEncoding = ol.source.WMTSRequestEncoding.REST;
-    l['ResourceURL'].forEach(function(element) {
-      if (element['resourceType'] === 'tile') {
-        format = element['format'];
-        urls.push(/** @type {string} */ (element['template']));
-      }
-    });
-  }
-
-  return {
-    urls: urls,
-    layer: config['layer'],
-    matrixSet: matrixSet,
-    format: format,
-    projection: projection,
-    requestEncoding: requestEncoding,
-    tileGrid: tileGrid,
-    style: style,
-    dimensions: dimensions,
-    wrapX: wrapX,
-    crossOrigin: config['crossOrigin']
-  };
-};
-
-goog.provide('ol.source.Zoomify');
-
-goog.require('ol');
-goog.require('ol.ImageTile');
-goog.require('ol.TileState');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.asserts');
-goog.require('ol.dom');
-goog.require('ol.extent');
-goog.require('ol.size');
-goog.require('ol.source.TileImage');
-goog.require('ol.tilegrid.TileGrid');
-
-
-/**
- * @classdesc
- * Layer source for tile data in Zoomify format (both Zoomify and Internet
- * Imaging Protocol are supported).
- *
- * @constructor
- * @extends {ol.source.TileImage}
- * @param {olx.source.ZoomifyOptions=} opt_options Options.
- * @api
- */
-ol.source.Zoomify = function(opt_options) {
-
-  var options = opt_options || {};
-
-  var size = options.size;
-  var tierSizeCalculation = options.tierSizeCalculation !== undefined ?
-    options.tierSizeCalculation :
-    ol.source.Zoomify.TierSizeCalculation_.DEFAULT;
-
-  var imageWidth = size[0];
-  var imageHeight = size[1];
-  var extent = options.extent || [0, -size[1], size[0], 0];
-  var tierSizeInTiles = [];
-  var tileSize = options.tileSize || ol.DEFAULT_TILE_SIZE;
-  var tileSizeForTierSizeCalculation = tileSize;
-
-  switch (tierSizeCalculation) {
-    case ol.source.Zoomify.TierSizeCalculation_.DEFAULT:
-      while (imageWidth > tileSizeForTierSizeCalculation || imageHeight > tileSizeForTierSizeCalculation) {
-        tierSizeInTiles.push([
-          Math.ceil(imageWidth / tileSizeForTierSizeCalculation),
-          Math.ceil(imageHeight / tileSizeForTierSizeCalculation)
-        ]);
-        tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;
-      }
-      break;
-    case ol.source.Zoomify.TierSizeCalculation_.TRUNCATED:
-      var width = imageWidth;
-      var height = imageHeight;
-      while (width > tileSizeForTierSizeCalculation || height > tileSizeForTierSizeCalculation) {
-        tierSizeInTiles.push([
-          Math.ceil(width / tileSizeForTierSizeCalculation),
-          Math.ceil(height / tileSizeForTierSizeCalculation)
-        ]);
-        width >>= 1;
-        height >>= 1;
-      }
-      break;
-    default:
-      ol.asserts.assert(false, 53); // Unknown `tierSizeCalculation` configured
-      break;
-  }
-
-  tierSizeInTiles.push([1, 1]);
-  tierSizeInTiles.reverse();
-
-  var resolutions = [1];
-  var tileCountUpToTier = [0];
-  var i, ii;
-  for (i = 1, ii = tierSizeInTiles.length; i < ii; i++) {
-    resolutions.push(1 << i);
-    tileCountUpToTier.push(
-        tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +
-        tileCountUpToTier[i - 1]
-    );
-  }
-  resolutions.reverse();
-
-  var tileGrid = new ol.tilegrid.TileGrid({
-    tileSize: tileSize,
-    extent: extent,
-    origin: ol.extent.getTopLeft(extent),
-    resolutions: resolutions
-  });
-
-  var url = options.url;
-  if (url && url.indexOf('{TileGroup}') == -1 && url.indexOf('{tileIndex}') == -1) {
-    url += '{TileGroup}/{z}-{x}-{y}.jpg';
-  }
-  var urls = ol.TileUrlFunction.expandUrl(url);
-
-  /**
-   * @param {string} template Template.
-   * @return {ol.TileUrlFunctionType} Tile URL function.
-   */
-  function createFromTemplate(template) {
-
-    return (
-      /**
-       * @param {ol.TileCoord} tileCoord Tile Coordinate.
-       * @param {number} pixelRatio Pixel ratio.
-       * @param {ol.proj.Projection} projection Projection.
-       * @return {string|undefined} Tile URL.
-       */
-      function(tileCoord, pixelRatio, projection) {
-        if (!tileCoord) {
-          return undefined;
-        } else {
-          var tileCoordZ = tileCoord[0];
-          var tileCoordX = tileCoord[1];
-          var tileCoordY = -tileCoord[2] - 1;
-          var tileIndex =
-              tileCoordX +
-              tileCoordY * tierSizeInTiles[tileCoordZ][0];
-          var tileSize = tileGrid.getTileSize(tileCoordZ);
-          var tileGroup = ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileSize) | 0;
-          var localContext = {
-            'z': tileCoordZ,
-            'x': tileCoordX,
-            'y': tileCoordY,
-            'tileIndex': tileIndex,
-            'TileGroup': 'TileGroup' + tileGroup
-          };
-          return template.replace(/\{(\w+?)\}/g, function(m, p) {
-            return localContext[p];
-          });
-        }
-      });
-  }
-
-  var tileUrlFunction = ol.TileUrlFunction.createFromTileUrlFunctions(urls.map(createFromTemplate));
-
-  var ZoomifyTileClass = ol.source.Zoomify.Tile_.bind(null, tileGrid);
-
-  ol.source.TileImage.call(this, {
-    attributions: options.attributions,
-    cacheSize: options.cacheSize,
-    crossOrigin: options.crossOrigin,
-    logo: options.logo,
-    projection: options.projection,
-    reprojectionErrorThreshold: options.reprojectionErrorThreshold,
-    tileClass: ZoomifyTileClass,
-    tileGrid: tileGrid,
-    tileUrlFunction: tileUrlFunction,
-    transition: options.transition
-  });
-
-};
-ol.inherits(ol.source.Zoomify, ol.source.TileImage);
-
-/**
- * @constructor
- * @extends {ol.ImageTile}
- * @param {ol.tilegrid.TileGrid} tileGrid TileGrid that the tile belongs to.
- * @param {ol.TileCoord} tileCoord Tile coordinate.
- * @param {ol.TileState} state State.
- * @param {string} src Image source URI.
- * @param {?string} crossOrigin Cross origin.
- * @param {ol.TileLoadFunctionType} tileLoadFunction Tile load function.
- * @param {olx.TileOptions=} opt_options Tile options.
- * @private
- */
-ol.source.Zoomify.Tile_ = function(
-    tileGrid, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
-
-  ol.ImageTile.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);
-
-  /**
-   * @private
-   * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}
-   */
-  this.zoomifyImage_ = null;
-
-  /**
-   * @private
-   * @type {ol.Size}
-   */
-  this.tileSize_ = ol.size.toSize(tileGrid.getTileSize(tileCoord[0]));
-};
-ol.inherits(ol.source.Zoomify.Tile_, ol.ImageTile);
-
-
-/**
- * @inheritDoc
- */
-ol.source.Zoomify.Tile_.prototype.getImage = function() {
-  if (this.zoomifyImage_) {
-    return this.zoomifyImage_;
-  }
-  var image = ol.ImageTile.prototype.getImage.call(this);
-  if (this.state == ol.TileState.LOADED) {
-    var tileSize = this.tileSize_;
-    if (image.width == tileSize[0] && image.height == tileSize[1]) {
-      this.zoomifyImage_ = image;
-      return image;
-    } else {
-      var context = ol.dom.createCanvasContext2D(tileSize[0], tileSize[1]);
-      context.drawImage(image, 0, 0);
-      this.zoomifyImage_ = context.canvas;
-      return context.canvas;
-    }
-  } else {
-    return image;
-  }
-};
-
-/**
- * @enum {string}
- * @private
- */
-ol.source.Zoomify.TierSizeCalculation_ = {
-  DEFAULT: 'default',
-  TRUNCATED: 'truncated'
-};
-
-// Copyright 2009 The Closure Library Authors.
-// All Rights Reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS-IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-// This file has been auto-generated by GenJsDeps, please do not edit.
-
-goog.addDependency(
-    'demos/editor/equationeditor.js', ['goog.demos.editor.EquationEditor'],
-    ['goog.ui.equation.EquationEditorDialog']);
-goog.addDependency(
-    'demos/editor/helloworld.js', ['goog.demos.editor.HelloWorld'],
-    ['goog.dom', 'goog.dom.TagName', 'goog.editor.Plugin']);
-goog.addDependency(
-    'demos/editor/helloworlddialog.js',
-    [
-      'goog.demos.editor.HelloWorldDialog',
-      'goog.demos.editor.HelloWorldDialog.OkEvent'
-    ],
-    [
-      'goog.dom.TagName', 'goog.events.Event', 'goog.string',
-      'goog.ui.editor.AbstractDialog', 'goog.ui.editor.AbstractDialog.Builder',
-      'goog.ui.editor.AbstractDialog.EventType'
-    ]);
-goog.addDependency(
-    'demos/editor/helloworlddialogplugin.js',
-    [
-      'goog.demos.editor.HelloWorldDialogPlugin',
-      'goog.demos.editor.HelloWorldDialogPlugin.Command'
-    ],
-    [
-      'goog.demos.editor.HelloWorldDialog', 'goog.dom.TagName',
-      'goog.editor.plugins.AbstractDialogPlugin', 'goog.editor.range',
-      'goog.functions', 'goog.ui.editor.AbstractDialog.EventType'
-    ]);
-
-/**
- * @fileoverview Custom exports file.
- * @suppress {checkVars,extraRequire}
- */
-
-goog.require('ol');
-goog.require('ol.AssertionError');
-goog.require('ol.Attribution');
-goog.require('ol.CanvasMap');
-goog.require('ol.Collection');
-goog.require('ol.DeviceOrientation');
-goog.require('ol.Feature');
-goog.require('ol.Geolocation');
-goog.require('ol.Graticule');
-goog.require('ol.Image');
-goog.require('ol.ImageTile');
-goog.require('ol.Kinetic');
-goog.require('ol.Map');
-goog.require('ol.MapBrowserEvent');
-goog.require('ol.MapEvent');
-goog.require('ol.Object');
-goog.require('ol.Observable');
-goog.require('ol.Overlay');
-goog.require('ol.PluggableMap');
-goog.require('ol.Sphere');
-goog.require('ol.Tile');
-goog.require('ol.VectorTile');
-goog.require('ol.View');
-goog.require('ol.color');
-goog.require('ol.colorlike');
-goog.require('ol.control');
-goog.require('ol.control.Attribution');
-goog.require('ol.control.Control');
-goog.require('ol.control.FullScreen');
-goog.require('ol.control.MousePosition');
-goog.require('ol.control.OverviewMap');
-goog.require('ol.control.Rotate');
-goog.require('ol.control.ScaleLine');
-goog.require('ol.control.Zoom');
-goog.require('ol.control.ZoomSlider');
-goog.require('ol.control.ZoomToExtent');
-goog.require('ol.coordinate');
-goog.require('ol.easing');
-goog.require('ol.events.Event');
-goog.require('ol.events.condition');
-goog.require('ol.extent');
-goog.require('ol.featureloader');
-goog.require('ol.format.EsriJSON');
-goog.require('ol.format.Feature');
-goog.require('ol.format.GML');
-goog.require('ol.format.GML2');
-goog.require('ol.format.GML3');
-goog.require('ol.format.GMLBase');
-goog.require('ol.format.GPX');
-goog.require('ol.format.GeoJSON');
-goog.require('ol.format.IGC');
-goog.require('ol.format.KML');
-goog.require('ol.format.MVT');
-goog.require('ol.format.OSMXML');
-goog.require('ol.format.Polyline');
-goog.require('ol.format.TopoJSON');
-goog.require('ol.format.WFS');
-goog.require('ol.format.WKT');
-goog.require('ol.format.WMSCapabilities');
-goog.require('ol.format.WMSGetFeatureInfo');
-goog.require('ol.format.WMTSCapabilities');
-goog.require('ol.format.filter');
-goog.require('ol.format.filter.And');
-goog.require('ol.format.filter.Bbox');
-goog.require('ol.format.filter.Comparison');
-goog.require('ol.format.filter.ComparisonBinary');
-goog.require('ol.format.filter.Contains');
-goog.require('ol.format.filter.During');
-goog.require('ol.format.filter.EqualTo');
-goog.require('ol.format.filter.Filter');
-goog.require('ol.format.filter.GreaterThan');
-goog.require('ol.format.filter.GreaterThanOrEqualTo');
-goog.require('ol.format.filter.Intersects');
-goog.require('ol.format.filter.IsBetween');
-goog.require('ol.format.filter.IsLike');
-goog.require('ol.format.filter.IsNull');
-goog.require('ol.format.filter.LessThan');
-goog.require('ol.format.filter.LessThanOrEqualTo');
-goog.require('ol.format.filter.Not');
-goog.require('ol.format.filter.NotEqualTo');
-goog.require('ol.format.filter.Or');
-goog.require('ol.format.filter.Spatial');
-goog.require('ol.format.filter.Within');
-goog.require('ol.geom.Circle');
-goog.require('ol.geom.Geometry');
-goog.require('ol.geom.GeometryCollection');
-goog.require('ol.geom.LineString');
-goog.require('ol.geom.LinearRing');
-goog.require('ol.geom.MultiLineString');
-goog.require('ol.geom.MultiPoint');
-goog.require('ol.geom.MultiPolygon');
-goog.require('ol.geom.Point');
-goog.require('ol.geom.Polygon');
-goog.require('ol.geom.SimpleGeometry');
-goog.require('ol.has');
-goog.require('ol.interaction');
-goog.require('ol.interaction.DoubleClickZoom');
-goog.require('ol.interaction.DragAndDrop');
-goog.require('ol.interaction.DragBox');
-goog.require('ol.interaction.DragPan');
-goog.require('ol.interaction.DragRotate');
-goog.require('ol.interaction.DragRotateAndZoom');
-goog.require('ol.interaction.DragZoom');
-goog.require('ol.interaction.Draw');
-goog.require('ol.interaction.Extent');
-goog.require('ol.interaction.Interaction');
-goog.require('ol.interaction.KeyboardPan');
-goog.require('ol.interaction.KeyboardZoom');
-goog.require('ol.interaction.Modify');
-goog.require('ol.interaction.MouseWheelZoom');
-goog.require('ol.interaction.PinchRotate');
-goog.require('ol.interaction.PinchZoom');
-goog.require('ol.interaction.Pointer');
-goog.require('ol.interaction.Select');
-goog.require('ol.interaction.Snap');
-goog.require('ol.interaction.Translate');
-goog.require('ol.layer.Base');
-goog.require('ol.layer.Group');
-goog.require('ol.layer.Heatmap');
-goog.require('ol.layer.Image');
-goog.require('ol.layer.Layer');
-goog.require('ol.layer.Tile');
-goog.require('ol.layer.Vector');
-goog.require('ol.layer.VectorTile');
-goog.require('ol.loadingstrategy');
-goog.require('ol.proj');
-goog.require('ol.proj.Projection');
-goog.require('ol.proj.Units');
-goog.require('ol.proj.common');
-goog.require('ol.render');
-goog.require('ol.render.Event');
-goog.require('ol.render.Feature');
-goog.require('ol.render.VectorContext');
-goog.require('ol.render.canvas.Immediate');
-goog.require('ol.render.webgl.Immediate');
-goog.require('ol.renderer.canvas.ImageLayer');
-goog.require('ol.renderer.canvas.Map');
-goog.require('ol.renderer.canvas.TileLayer');
-goog.require('ol.renderer.canvas.VectorLayer');
-goog.require('ol.renderer.canvas.VectorTileLayer');
-goog.require('ol.renderer.webgl.ImageLayer');
-goog.require('ol.renderer.webgl.Map');
-goog.require('ol.renderer.webgl.TileLayer');
-goog.require('ol.renderer.webgl.VectorLayer');
-goog.require('ol.size');
-goog.require('ol.source.BingMaps');
-goog.require('ol.source.CartoDB');
-goog.require('ol.source.Cluster');
-goog.require('ol.source.Image');
-goog.require('ol.source.ImageArcGISRest');
-goog.require('ol.source.ImageCanvas');
-goog.require('ol.source.ImageMapGuide');
-goog.require('ol.source.ImageStatic');
-goog.require('ol.source.ImageVector');
-goog.require('ol.source.ImageWMS');
-goog.require('ol.source.OSM');
-goog.require('ol.source.Raster');
-goog.require('ol.source.Source');
-goog.require('ol.source.Stamen');
-goog.require('ol.source.Tile');
-goog.require('ol.source.TileArcGISRest');
-goog.require('ol.source.TileDebug');
-goog.require('ol.source.TileImage');
-goog.require('ol.source.TileJSON');
-goog.require('ol.source.TileUTFGrid');
-goog.require('ol.source.TileWMS');
-goog.require('ol.source.UrlTile');
-goog.require('ol.source.Vector');
-goog.require('ol.source.VectorTile');
-goog.require('ol.source.WMTS');
-goog.require('ol.source.XYZ');
-goog.require('ol.source.Zoomify');
-goog.require('ol.style');
-goog.require('ol.style.AtlasManager');
-goog.require('ol.style.Circle');
-goog.require('ol.style.Fill');
-goog.require('ol.style.Icon');
-goog.require('ol.style.IconImageCache');
-goog.require('ol.style.Image');
-goog.require('ol.style.RegularShape');
-goog.require('ol.style.Stroke');
-goog.require('ol.style.Style');
-goog.require('ol.style.Text');
-goog.require('ol.tilegrid');
-goog.require('ol.tilegrid.TileGrid');
-goog.require('ol.tilegrid.WMTS');
-goog.require('ol.webgl.Context');
-goog.require('ol.xml');
-
-
-
-goog.exportProperty(
-    ol.AssertionError.prototype,
-    'code',
-    ol.AssertionError.prototype.code);
-
-goog.exportSymbol(
-    'ol.Attribution',
-    ol.Attribution,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Attribution.prototype,
-    'getHTML',
-    ol.Attribution.prototype.getHTML);
-
-goog.exportSymbol(
-    'ol.CanvasMap',
-    ol.CanvasMap,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Collection',
-    ol.Collection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'clear',
-    ol.Collection.prototype.clear);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'extend',
-    ol.Collection.prototype.extend);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'forEach',
-    ol.Collection.prototype.forEach);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getArray',
-    ol.Collection.prototype.getArray);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'item',
-    ol.Collection.prototype.item);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getLength',
-    ol.Collection.prototype.getLength);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'insertAt',
-    ol.Collection.prototype.insertAt);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'pop',
-    ol.Collection.prototype.pop);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'push',
-    ol.Collection.prototype.push);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'remove',
-    ol.Collection.prototype.remove);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'removeAt',
-    ol.Collection.prototype.removeAt);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'setAt',
-    ol.Collection.prototype.setAt);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'element',
-    ol.Collection.Event.prototype.element);
-
-goog.exportSymbol(
-    'ol.color.asArray',
-    ol.color.asArray,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.color.asString',
-    ol.color.asString,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.colorlike.asColorLike',
-    ol.colorlike.asColorLike,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.defaults',
-    ol.control.defaults,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.add',
-    ol.coordinate.add,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.createStringXY',
-    ol.coordinate.createStringXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.format',
-    ol.coordinate.format,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.rotate',
-    ol.coordinate.rotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.toStringHDMS',
-    ol.coordinate.toStringHDMS,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.coordinate.toStringXY',
-    ol.coordinate.toStringXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.DeviceOrientation',
-    ol.DeviceOrientation,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getAlpha',
-    ol.DeviceOrientation.prototype.getAlpha);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getBeta',
-    ol.DeviceOrientation.prototype.getBeta);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getGamma',
-    ol.DeviceOrientation.prototype.getGamma);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getHeading',
-    ol.DeviceOrientation.prototype.getHeading);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getTracking',
-    ol.DeviceOrientation.prototype.getTracking);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'setTracking',
-    ol.DeviceOrientation.prototype.setTracking);
-
-goog.exportSymbol(
-    'ol.easing.easeIn',
-    ol.easing.easeIn,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.easeOut',
-    ol.easing.easeOut,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.inAndOut',
-    ol.easing.inAndOut,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.linear',
-    ol.easing.linear,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.easing.upAndDown',
-    ol.easing.upAndDown,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.boundingExtent',
-    ol.extent.boundingExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.buffer',
-    ol.extent.buffer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsCoordinate',
-    ol.extent.containsCoordinate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsExtent',
-    ol.extent.containsExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.containsXY',
-    ol.extent.containsXY,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.createEmpty',
-    ol.extent.createEmpty,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.equals',
-    ol.extent.equals,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.extend',
-    ol.extent.extend,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getArea',
-    ol.extent.getArea,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getBottomLeft',
-    ol.extent.getBottomLeft,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getBottomRight',
-    ol.extent.getBottomRight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getCenter',
-    ol.extent.getCenter,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getHeight',
-    ol.extent.getHeight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getIntersection',
-    ol.extent.getIntersection,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getSize',
-    ol.extent.getSize,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getTopLeft',
-    ol.extent.getTopLeft,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getTopRight',
-    ol.extent.getTopRight,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.getWidth',
-    ol.extent.getWidth,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.intersects',
-    ol.extent.intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.isEmpty',
-    ol.extent.isEmpty,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.extent.applyTransform',
-    ol.extent.applyTransform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Feature',
-    ol.Feature,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'clone',
-    ol.Feature.prototype.clone);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getGeometry',
-    ol.Feature.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getId',
-    ol.Feature.prototype.getId);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getGeometryName',
-    ol.Feature.prototype.getGeometryName);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getStyle',
-    ol.Feature.prototype.getStyle);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getStyleFunction',
-    ol.Feature.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setGeometry',
-    ol.Feature.prototype.setGeometry);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setStyle',
-    ol.Feature.prototype.setStyle);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setId',
-    ol.Feature.prototype.setId);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setGeometryName',
-    ol.Feature.prototype.setGeometryName);
-
-goog.exportSymbol(
-    'ol.featureloader.xhr',
-    ol.featureloader.xhr,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Geolocation',
-    ol.Geolocation,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAccuracy',
-    ol.Geolocation.prototype.getAccuracy);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAccuracyGeometry',
-    ol.Geolocation.prototype.getAccuracyGeometry);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAltitude',
-    ol.Geolocation.prototype.getAltitude);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getAltitudeAccuracy',
-    ol.Geolocation.prototype.getAltitudeAccuracy);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getHeading',
-    ol.Geolocation.prototype.getHeading);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getPosition',
-    ol.Geolocation.prototype.getPosition);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getProjection',
-    ol.Geolocation.prototype.getProjection);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getSpeed',
-    ol.Geolocation.prototype.getSpeed);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getTracking',
-    ol.Geolocation.prototype.getTracking);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getTrackingOptions',
-    ol.Geolocation.prototype.getTrackingOptions);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setProjection',
-    ol.Geolocation.prototype.setProjection);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setTracking',
-    ol.Geolocation.prototype.setTracking);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setTrackingOptions',
-    ol.Geolocation.prototype.setTrackingOptions);
-
-goog.exportSymbol(
-    'ol.Graticule',
-    ol.Graticule,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getMap',
-    ol.Graticule.prototype.getMap);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getMeridians',
-    ol.Graticule.prototype.getMeridians);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'getParallels',
-    ol.Graticule.prototype.getParallels);
-
-goog.exportProperty(
-    ol.Graticule.prototype,
-    'setMap',
-    ol.Graticule.prototype.setMap);
-
-goog.exportSymbol(
-    'ol.has.DEVICE_PIXEL_RATIO',
-    ol.has.DEVICE_PIXEL_RATIO,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.CANVAS',
-    ol.has.CANVAS,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.DEVICE_ORIENTATION',
-    ol.has.DEVICE_ORIENTATION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.GEOLOCATION',
-    ol.has.GEOLOCATION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.TOUCH',
-    ol.has.TOUCH,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.has.WEBGL',
-    ol.has.WEBGL,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Image.prototype,
-    'getImage',
-    ol.Image.prototype.getImage);
-
-goog.exportProperty(
-    ol.Image.prototype,
-    'load',
-    ol.Image.prototype.load);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'getImage',
-    ol.ImageTile.prototype.getImage);
-
-goog.exportSymbol(
-    'ol.inherits',
-    ol.inherits,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.defaults',
-    ol.interaction.defaults,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Kinetic',
-    ol.Kinetic,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.all',
-    ol.loadingstrategy.all,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.bbox',
-    ol.loadingstrategy.bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.loadingstrategy.tile',
-    ol.loadingstrategy.tile,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Map',
-    ol.Map,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'originalEvent',
-    ol.MapBrowserEvent.prototype.originalEvent);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'pixel',
-    ol.MapBrowserEvent.prototype.pixel);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'coordinate',
-    ol.MapBrowserEvent.prototype.coordinate);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'dragging',
-    ol.MapBrowserEvent.prototype.dragging);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'map',
-    ol.MapEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'frameState',
-    ol.MapEvent.prototype.frameState);
-
-goog.exportSymbol(
-    'ol.Object',
-    ol.Object,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'get',
-    ol.Object.prototype.get);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getKeys',
-    ol.Object.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getProperties',
-    ol.Object.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'set',
-    ol.Object.prototype.set);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'setProperties',
-    ol.Object.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'unset',
-    ol.Object.prototype.unset);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'key',
-    ol.Object.Event.prototype.key);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'oldValue',
-    ol.Object.Event.prototype.oldValue);
-
-goog.exportSymbol(
-    'ol.Observable',
-    ol.Observable,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Observable.unByKey',
-    ol.Observable.unByKey,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'changed',
-    ol.Observable.prototype.changed);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'dispatchEvent',
-    ol.Observable.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'getRevision',
-    ol.Observable.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'on',
-    ol.Observable.prototype.on);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'once',
-    ol.Observable.prototype.once);
-
-goog.exportProperty(
-    ol.Observable.prototype,
-    'un',
-    ol.Observable.prototype.un);
-
-goog.exportSymbol(
-    'ol.Overlay',
-    ol.Overlay,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getElement',
-    ol.Overlay.prototype.getElement);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getId',
-    ol.Overlay.prototype.getId);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getMap',
-    ol.Overlay.prototype.getMap);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getOffset',
-    ol.Overlay.prototype.getOffset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getPosition',
-    ol.Overlay.prototype.getPosition);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getPositioning',
-    ol.Overlay.prototype.getPositioning);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setElement',
-    ol.Overlay.prototype.setElement);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setMap',
-    ol.Overlay.prototype.setMap);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setOffset',
-    ol.Overlay.prototype.setOffset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setPosition',
-    ol.Overlay.prototype.setPosition);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setPositioning',
-    ol.Overlay.prototype.setPositioning);
-
-goog.exportSymbol(
-    'ol.PluggableMap',
-    ol.PluggableMap,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'addControl',
-    ol.PluggableMap.prototype.addControl);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'addInteraction',
-    ol.PluggableMap.prototype.addInteraction);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'addLayer',
-    ol.PluggableMap.prototype.addLayer);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'addOverlay',
-    ol.PluggableMap.prototype.addOverlay);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'forEachFeatureAtPixel',
-    ol.PluggableMap.prototype.forEachFeatureAtPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getFeaturesAtPixel',
-    ol.PluggableMap.prototype.getFeaturesAtPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'forEachLayerAtPixel',
-    ol.PluggableMap.prototype.forEachLayerAtPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'hasFeatureAtPixel',
-    ol.PluggableMap.prototype.hasFeatureAtPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getEventCoordinate',
-    ol.PluggableMap.prototype.getEventCoordinate);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getEventPixel',
-    ol.PluggableMap.prototype.getEventPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getTarget',
-    ol.PluggableMap.prototype.getTarget);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getTargetElement',
-    ol.PluggableMap.prototype.getTargetElement);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getCoordinateFromPixel',
-    ol.PluggableMap.prototype.getCoordinateFromPixel);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getControls',
-    ol.PluggableMap.prototype.getControls);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getOverlays',
-    ol.PluggableMap.prototype.getOverlays);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getOverlayById',
-    ol.PluggableMap.prototype.getOverlayById);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getInteractions',
-    ol.PluggableMap.prototype.getInteractions);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getLayerGroup',
-    ol.PluggableMap.prototype.getLayerGroup);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getLayers',
-    ol.PluggableMap.prototype.getLayers);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getPixelFromCoordinate',
-    ol.PluggableMap.prototype.getPixelFromCoordinate);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getSize',
-    ol.PluggableMap.prototype.getSize);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getView',
-    ol.PluggableMap.prototype.getView);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getViewport',
-    ol.PluggableMap.prototype.getViewport);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'renderSync',
-    ol.PluggableMap.prototype.renderSync);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'render',
-    ol.PluggableMap.prototype.render);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'removeControl',
-    ol.PluggableMap.prototype.removeControl);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'removeInteraction',
-    ol.PluggableMap.prototype.removeInteraction);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'removeLayer',
-    ol.PluggableMap.prototype.removeLayer);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'removeOverlay',
-    ol.PluggableMap.prototype.removeOverlay);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'setLayerGroup',
-    ol.PluggableMap.prototype.setLayerGroup);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'setSize',
-    ol.PluggableMap.prototype.setSize);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'setTarget',
-    ol.PluggableMap.prototype.setTarget);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'setView',
-    ol.PluggableMap.prototype.setView);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'updateSize',
-    ol.PluggableMap.prototype.updateSize);
-
-goog.exportSymbol(
-    'ol.proj.METERS_PER_UNIT',
-    ol.proj.METERS_PER_UNIT,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.setProj4',
-    ol.proj.setProj4,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.getPointResolution',
-    ol.proj.getPointResolution,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addEquivalentProjections',
-    ol.proj.addEquivalentProjections,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addProjection',
-    ol.proj.addProjection,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.addCoordinateTransforms',
-    ol.proj.addCoordinateTransforms,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.fromLonLat',
-    ol.proj.fromLonLat,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.toLonLat',
-    ol.proj.toLonLat,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.get',
-    ol.proj.get,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.equivalent',
-    ol.proj.equivalent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.getTransform',
-    ol.proj.getTransform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.transform',
-    ol.proj.transform,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.transformExtent',
-    ol.proj.transformExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.render.toContext',
-    ol.render.toContext,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.size.toSize',
-    ol.size.toSize,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Sphere',
-    ol.Sphere,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Sphere.prototype,
-    'geodesicArea',
-    ol.Sphere.prototype.geodesicArea);
-
-goog.exportProperty(
-    ol.Sphere.prototype,
-    'haversineDistance',
-    ol.Sphere.prototype.haversineDistance);
-
-goog.exportSymbol(
-    'ol.Sphere.getLength',
-    ol.Sphere.getLength,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.Sphere.getArea',
-    ol.Sphere.getArea,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.style.iconImageCache',
-    ol.style.iconImageCache,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Tile.prototype,
-    'getTileCoord',
-    ol.Tile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.Tile.prototype,
-    'load',
-    ol.Tile.prototype.load);
-
-goog.exportSymbol(
-    'ol.tilegrid.createXYZ',
-    ol.tilegrid.createXYZ,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getExtent',
-    ol.VectorTile.prototype.getExtent);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getFormat',
-    ol.VectorTile.prototype.getFormat);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getFeatures',
-    ol.VectorTile.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getProjection',
-    ol.VectorTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setExtent',
-    ol.VectorTile.prototype.setExtent);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setFeatures',
-    ol.VectorTile.prototype.setFeatures);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setProjection',
-    ol.VectorTile.prototype.setProjection);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'setLoader',
-    ol.VectorTile.prototype.setLoader);
-
-goog.exportSymbol(
-    'ol.View',
-    ol.View,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'animate',
-    ol.View.prototype.animate);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getAnimating',
-    ol.View.prototype.getAnimating);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getInteracting',
-    ol.View.prototype.getInteracting);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'cancelAnimations',
-    ol.View.prototype.cancelAnimations);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainCenter',
-    ol.View.prototype.constrainCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainResolution',
-    ol.View.prototype.constrainResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'constrainRotation',
-    ol.View.prototype.constrainRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getCenter',
-    ol.View.prototype.getCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'calculateExtent',
-    ol.View.prototype.calculateExtent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMaxResolution',
-    ol.View.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMinResolution',
-    ol.View.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMaxZoom',
-    ol.View.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setMaxZoom',
-    ol.View.prototype.setMaxZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getMinZoom',
-    ol.View.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setMinZoom',
-    ol.View.prototype.setMinZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getProjection',
-    ol.View.prototype.getProjection);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolution',
-    ol.View.prototype.getResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolutions',
-    ol.View.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolutionForExtent',
-    ol.View.prototype.getResolutionForExtent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getRotation',
-    ol.View.prototype.getRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getZoom',
-    ol.View.prototype.getZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getZoomForResolution',
-    ol.View.prototype.getZoomForResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getResolutionForZoom',
-    ol.View.prototype.getResolutionForZoom);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'fit',
-    ol.View.prototype.fit);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'centerOn',
-    ol.View.prototype.centerOn);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'rotate',
-    ol.View.prototype.rotate);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setCenter',
-    ol.View.prototype.setCenter);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setResolution',
-    ol.View.prototype.setResolution);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setRotation',
-    ol.View.prototype.setRotation);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setZoom',
-    ol.View.prototype.setZoom);
-
-goog.exportSymbol(
-    'ol.xml.getAllTextContent',
-    ol.xml.getAllTextContent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.xml.parse',
-    ol.xml.parse,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.webgl.Context.prototype,
-    'getGL',
-    ol.webgl.Context.prototype.getGL);
-
-goog.exportProperty(
-    ol.webgl.Context.prototype,
-    'useProgram',
-    ol.webgl.Context.prototype.useProgram);
-
-goog.exportSymbol(
-    'ol.tilegrid.TileGrid',
-    ol.tilegrid.TileGrid,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'forEachTileCoord',
-    ol.tilegrid.TileGrid.prototype.forEachTileCoord);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getMaxZoom',
-    ol.tilegrid.TileGrid.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getMinZoom',
-    ol.tilegrid.TileGrid.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getOrigin',
-    ol.tilegrid.TileGrid.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getResolution',
-    ol.tilegrid.TileGrid.prototype.getResolution);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getResolutions',
-    ol.tilegrid.TileGrid.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordExtent',
-    ol.tilegrid.TileGrid.prototype.getTileCoordExtent);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordForCoordAndResolution',
-    ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndResolution);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileCoordForCoordAndZ',
-    ol.tilegrid.TileGrid.prototype.getTileCoordForCoordAndZ);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getTileSize',
-    ol.tilegrid.TileGrid.prototype.getTileSize);
-
-goog.exportProperty(
-    ol.tilegrid.TileGrid.prototype,
-    'getZForResolution',
-    ol.tilegrid.TileGrid.prototype.getZForResolution);
-
-goog.exportSymbol(
-    'ol.tilegrid.WMTS',
-    ol.tilegrid.WMTS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMatrixIds',
-    ol.tilegrid.WMTS.prototype.getMatrixIds);
-
-goog.exportSymbol(
-    'ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet',
-    ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.style.AtlasManager',
-    ol.style.AtlasManager,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.style.Circle',
-    ol.style.Circle,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setRadius',
-    ol.style.Circle.prototype.setRadius);
-
-goog.exportSymbol(
-    'ol.style.Fill',
-    ol.style.Fill,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'clone',
-    ol.style.Fill.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'getColor',
-    ol.style.Fill.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Fill.prototype,
-    'setColor',
-    ol.style.Fill.prototype.setColor);
-
-goog.exportSymbol(
-    'ol.style.Icon',
-    ol.style.Icon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'clone',
-    ol.style.Icon.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getAnchor',
-    ol.style.Icon.prototype.getAnchor);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getColor',
-    ol.style.Icon.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getImage',
-    ol.style.Icon.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getOrigin',
-    ol.style.Icon.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSrc',
-    ol.style.Icon.prototype.getSrc);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSize',
-    ol.style.Icon.prototype.getSize);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'load',
-    ol.style.Icon.prototype.load);
-
-goog.exportProperty(
-    ol.style.IconImageCache.prototype,
-    'setSize',
-    ol.style.IconImageCache.prototype.setSize);
-
-goog.exportSymbol(
-    'ol.style.Image',
-    ol.style.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getOpacity',
-    ol.style.Image.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getRotateWithView',
-    ol.style.Image.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getRotation',
-    ol.style.Image.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getScale',
-    ol.style.Image.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'getSnapToPixel',
-    ol.style.Image.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setOpacity',
-    ol.style.Image.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setRotation',
-    ol.style.Image.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Image.prototype,
-    'setScale',
-    ol.style.Image.prototype.setScale);
-
-goog.exportSymbol(
-    'ol.style.RegularShape',
-    ol.style.RegularShape,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'clone',
-    ol.style.RegularShape.prototype.clone);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getAnchor',
-    ol.style.RegularShape.prototype.getAnchor);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getAngle',
-    ol.style.RegularShape.prototype.getAngle);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getFill',
-    ol.style.RegularShape.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getImage',
-    ol.style.RegularShape.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getOrigin',
-    ol.style.RegularShape.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getPoints',
-    ol.style.RegularShape.prototype.getPoints);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRadius',
-    ol.style.RegularShape.prototype.getRadius);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRadius2',
-    ol.style.RegularShape.prototype.getRadius2);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getSize',
-    ol.style.RegularShape.prototype.getSize);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getStroke',
-    ol.style.RegularShape.prototype.getStroke);
-
-goog.exportSymbol(
-    'ol.style.Stroke',
-    ol.style.Stroke,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'clone',
-    ol.style.Stroke.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getColor',
-    ol.style.Stroke.prototype.getColor);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineCap',
-    ol.style.Stroke.prototype.getLineCap);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineDash',
-    ol.style.Stroke.prototype.getLineDash);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineDashOffset',
-    ol.style.Stroke.prototype.getLineDashOffset);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getLineJoin',
-    ol.style.Stroke.prototype.getLineJoin);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getMiterLimit',
-    ol.style.Stroke.prototype.getMiterLimit);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'getWidth',
-    ol.style.Stroke.prototype.getWidth);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setColor',
-    ol.style.Stroke.prototype.setColor);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineCap',
-    ol.style.Stroke.prototype.setLineCap);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineDash',
-    ol.style.Stroke.prototype.setLineDash);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineDashOffset',
-    ol.style.Stroke.prototype.setLineDashOffset);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setLineJoin',
-    ol.style.Stroke.prototype.setLineJoin);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setMiterLimit',
-    ol.style.Stroke.prototype.setMiterLimit);
-
-goog.exportProperty(
-    ol.style.Stroke.prototype,
-    'setWidth',
-    ol.style.Stroke.prototype.setWidth);
-
-goog.exportSymbol(
-    'ol.style.Style',
-    ol.style.Style,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'clone',
-    ol.style.Style.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getRenderer',
-    ol.style.Style.prototype.getRenderer);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setRenderer',
-    ol.style.Style.prototype.setRenderer);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getGeometry',
-    ol.style.Style.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getGeometryFunction',
-    ol.style.Style.prototype.getGeometryFunction);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getFill',
-    ol.style.Style.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setFill',
-    ol.style.Style.prototype.setFill);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getImage',
-    ol.style.Style.prototype.getImage);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setImage',
-    ol.style.Style.prototype.setImage);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getStroke',
-    ol.style.Style.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setStroke',
-    ol.style.Style.prototype.setStroke);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getText',
-    ol.style.Style.prototype.getText);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setText',
-    ol.style.Style.prototype.setText);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'getZIndex',
-    ol.style.Style.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setGeometry',
-    ol.style.Style.prototype.setGeometry);
-
-goog.exportProperty(
-    ol.style.Style.prototype,
-    'setZIndex',
-    ol.style.Style.prototype.setZIndex);
-
-goog.exportSymbol(
-    'ol.style.Text',
-    ol.style.Text,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'clone',
-    ol.style.Text.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getOverflow',
-    ol.style.Text.prototype.getOverflow);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getFont',
-    ol.style.Text.prototype.getFont);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getMaxAngle',
-    ol.style.Text.prototype.getMaxAngle);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getPlacement',
-    ol.style.Text.prototype.getPlacement);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getOffsetX',
-    ol.style.Text.prototype.getOffsetX);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getOffsetY',
-    ol.style.Text.prototype.getOffsetY);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getFill',
-    ol.style.Text.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getRotateWithView',
-    ol.style.Text.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getRotation',
-    ol.style.Text.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getScale',
-    ol.style.Text.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getStroke',
-    ol.style.Text.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getText',
-    ol.style.Text.prototype.getText);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getTextAlign',
-    ol.style.Text.prototype.getTextAlign);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getTextBaseline',
-    ol.style.Text.prototype.getTextBaseline);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getBackgroundFill',
-    ol.style.Text.prototype.getBackgroundFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getBackgroundStroke',
-    ol.style.Text.prototype.getBackgroundStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'getPadding',
-    ol.style.Text.prototype.getPadding);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setOverflow',
-    ol.style.Text.prototype.setOverflow);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setFont',
-    ol.style.Text.prototype.setFont);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setMaxAngle',
-    ol.style.Text.prototype.setMaxAngle);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setOffsetX',
-    ol.style.Text.prototype.setOffsetX);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setOffsetY',
-    ol.style.Text.prototype.setOffsetY);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setPlacement',
-    ol.style.Text.prototype.setPlacement);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setFill',
-    ol.style.Text.prototype.setFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setRotation',
-    ol.style.Text.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setScale',
-    ol.style.Text.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setStroke',
-    ol.style.Text.prototype.setStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setText',
-    ol.style.Text.prototype.setText);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setTextAlign',
-    ol.style.Text.prototype.setTextAlign);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setTextBaseline',
-    ol.style.Text.prototype.setTextBaseline);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setBackgroundFill',
-    ol.style.Text.prototype.setBackgroundFill);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setBackgroundStroke',
-    ol.style.Text.prototype.setBackgroundStroke);
-
-goog.exportProperty(
-    ol.style.Text.prototype,
-    'setPadding',
-    ol.style.Text.prototype.setPadding);
-
-goog.exportSymbol(
-    'ol.source.BingMaps',
-    ol.source.BingMaps,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.BingMaps.TOS_ATTRIBUTION',
-    ol.source.BingMaps.TOS_ATTRIBUTION,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getApiKey',
-    ol.source.BingMaps.prototype.getApiKey);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getImagerySet',
-    ol.source.BingMaps.prototype.getImagerySet);
-
-goog.exportSymbol(
-    'ol.source.CartoDB',
-    ol.source.CartoDB,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getConfig',
-    ol.source.CartoDB.prototype.getConfig);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'updateConfig',
-    ol.source.CartoDB.prototype.updateConfig);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setConfig',
-    ol.source.CartoDB.prototype.setConfig);
-
-goog.exportSymbol(
-    'ol.source.Cluster',
-    ol.source.Cluster,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getDistance',
-    ol.source.Cluster.prototype.getDistance);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getSource',
-    ol.source.Cluster.prototype.getSource);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setDistance',
-    ol.source.Cluster.prototype.setDistance);
-
-goog.exportSymbol(
-    'ol.source.Image',
-    ol.source.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'image',
-    ol.source.Image.Event.prototype.image);
-
-goog.exportSymbol(
-    'ol.source.ImageArcGISRest',
-    ol.source.ImageArcGISRest,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getParams',
-    ol.source.ImageArcGISRest.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageArcGISRest.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getUrl',
-    ol.source.ImageArcGISRest.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageArcGISRest.prototype.setImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setUrl',
-    ol.source.ImageArcGISRest.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'updateParams',
-    ol.source.ImageArcGISRest.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.ImageCanvas',
-    ol.source.ImageCanvas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.ImageMapGuide',
-    ol.source.ImageMapGuide,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getParams',
-    ol.source.ImageMapGuide.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageMapGuide.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'updateParams',
-    ol.source.ImageMapGuide.prototype.updateParams);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageMapGuide.prototype.setImageLoadFunction);
-
-goog.exportSymbol(
-    'ol.source.ImageStatic',
-    ol.source.ImageStatic,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.ImageVector',
-    ol.source.ImageVector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getSource',
-    ol.source.ImageVector.prototype.getSource);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getStyle',
-    ol.source.ImageVector.prototype.getStyle);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getStyleFunction',
-    ol.source.ImageVector.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setStyle',
-    ol.source.ImageVector.prototype.setStyle);
-
-goog.exportSymbol(
-    'ol.source.ImageWMS',
-    ol.source.ImageWMS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getGetFeatureInfoUrl',
-    ol.source.ImageWMS.prototype.getGetFeatureInfoUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getParams',
-    ol.source.ImageWMS.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getImageLoadFunction',
-    ol.source.ImageWMS.prototype.getImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getUrl',
-    ol.source.ImageWMS.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setImageLoadFunction',
-    ol.source.ImageWMS.prototype.setImageLoadFunction);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setUrl',
-    ol.source.ImageWMS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'updateParams',
-    ol.source.ImageWMS.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.OSM',
-    ol.source.OSM,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.OSM.ATTRIBUTION',
-    ol.source.OSM.ATTRIBUTION,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Raster',
-    ol.source.Raster,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setOperation',
-    ol.source.Raster.prototype.setOperation);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'extent',
-    ol.source.Raster.Event.prototype.extent);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'resolution',
-    ol.source.Raster.Event.prototype.resolution);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'data',
-    ol.source.Raster.Event.prototype.data);
-
-goog.exportSymbol(
-    'ol.source.Source',
-    ol.source.Source,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getAttributions',
-    ol.source.Source.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getLogo',
-    ol.source.Source.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getProjection',
-    ol.source.Source.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getState',
-    ol.source.Source.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'refresh',
-    ol.source.Source.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'setAttributions',
-    ol.source.Source.prototype.setAttributions);
-
-goog.exportSymbol(
-    'ol.source.Stamen',
-    ol.source.Stamen,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Tile',
-    ol.source.Tile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getTileGrid',
-    ol.source.Tile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'tile',
-    ol.source.Tile.Event.prototype.tile);
-
-goog.exportSymbol(
-    'ol.source.TileArcGISRest',
-    ol.source.TileArcGISRest,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getParams',
-    ol.source.TileArcGISRest.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'updateParams',
-    ol.source.TileArcGISRest.prototype.updateParams);
-
-goog.exportSymbol(
-    'ol.source.TileDebug',
-    ol.source.TileDebug,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.TileImage',
-    ol.source.TileImage,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileImage.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileGridForProjection',
-    ol.source.TileImage.prototype.setTileGridForProjection);
-
-goog.exportSymbol(
-    'ol.source.TileJSON',
-    ol.source.TileJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileJSON',
-    ol.source.TileJSON.prototype.getTileJSON);
-
-goog.exportSymbol(
-    'ol.source.TileUTFGrid',
-    ol.source.TileUTFGrid,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getTemplate',
-    ol.source.TileUTFGrid.prototype.getTemplate);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'forDataAtCoordinateAndResolution',
-    ol.source.TileUTFGrid.prototype.forDataAtCoordinateAndResolution);
-
-goog.exportSymbol(
-    'ol.source.TileWMS',
-    ol.source.TileWMS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getGetFeatureInfoUrl',
-    ol.source.TileWMS.prototype.getGetFeatureInfoUrl);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getParams',
-    ol.source.TileWMS.prototype.getParams);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'updateParams',
-    ol.source.TileWMS.prototype.updateParams);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileLoadFunction',
-    ol.source.UrlTile.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileUrlFunction',
-    ol.source.UrlTile.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getUrls',
-    ol.source.UrlTile.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setTileLoadFunction',
-    ol.source.UrlTile.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setTileUrlFunction',
-    ol.source.UrlTile.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setUrl',
-    ol.source.UrlTile.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setUrls',
-    ol.source.UrlTile.prototype.setUrls);
-
-goog.exportSymbol(
-    'ol.source.Vector',
-    ol.source.Vector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'addFeature',
-    ol.source.Vector.prototype.addFeature);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'addFeatures',
-    ol.source.Vector.prototype.addFeatures);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'clear',
-    ol.source.Vector.prototype.clear);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeature',
-    ol.source.Vector.prototype.forEachFeature);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeatureInExtent',
-    ol.source.Vector.prototype.forEachFeatureInExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'forEachFeatureIntersectingExtent',
-    ol.source.Vector.prototype.forEachFeatureIntersectingExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesCollection',
-    ol.source.Vector.prototype.getFeaturesCollection);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeatures',
-    ol.source.Vector.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesAtCoordinate',
-    ol.source.Vector.prototype.getFeaturesAtCoordinate);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeaturesInExtent',
-    ol.source.Vector.prototype.getFeaturesInExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getClosestFeatureToCoordinate',
-    ol.source.Vector.prototype.getClosestFeatureToCoordinate);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getExtent',
-    ol.source.Vector.prototype.getExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFeatureById',
-    ol.source.Vector.prototype.getFeatureById);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getFormat',
-    ol.source.Vector.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getUrl',
-    ol.source.Vector.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'removeLoadedExtent',
-    ol.source.Vector.prototype.removeLoadedExtent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'removeFeature',
-    ol.source.Vector.prototype.removeFeature);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'setLoader',
-    ol.source.Vector.prototype.setLoader);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'feature',
-    ol.source.Vector.Event.prototype.feature);
-
-goog.exportSymbol(
-    'ol.source.VectorTile',
-    ol.source.VectorTile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'clear',
-    ol.source.VectorTile.prototype.clear);
-
-goog.exportSymbol(
-    'ol.source.WMTS',
-    ol.source.WMTS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getDimensions',
-    ol.source.WMTS.prototype.getDimensions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getFormat',
-    ol.source.WMTS.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getLayer',
-    ol.source.WMTS.prototype.getLayer);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getMatrixSet',
-    ol.source.WMTS.prototype.getMatrixSet);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getRequestEncoding',
-    ol.source.WMTS.prototype.getRequestEncoding);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getStyle',
-    ol.source.WMTS.prototype.getStyle);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getVersion',
-    ol.source.WMTS.prototype.getVersion);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'updateDimensions',
-    ol.source.WMTS.prototype.updateDimensions);
-
-goog.exportSymbol(
-    'ol.source.WMTS.optionsFromCapabilities',
-    ol.source.WMTS.optionsFromCapabilities,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.XYZ',
-    ol.source.XYZ,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.source.Zoomify',
-    ol.source.Zoomify,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.webgl.ImageLayer',
-    ol.renderer.webgl.ImageLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.webgl.Map',
-    ol.renderer.webgl.Map,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.webgl.TileLayer',
-    ol.renderer.webgl.TileLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.webgl.VectorLayer',
-    ol.renderer.webgl.VectorLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.canvas.ImageLayer',
-    ol.renderer.canvas.ImageLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.canvas.Map',
-    ol.renderer.canvas.Map,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.canvas.TileLayer',
-    ol.renderer.canvas.TileLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.canvas.VectorLayer',
-    ol.renderer.canvas.VectorLayer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.renderer.canvas.VectorTileLayer',
-    ol.renderer.canvas.VectorTileLayer,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'vectorContext',
-    ol.render.Event.prototype.vectorContext);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'frameState',
-    ol.render.Event.prototype.frameState);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'context',
-    ol.render.Event.prototype.context);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'glContext',
-    ol.render.Event.prototype.glContext);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'get',
-    ol.render.Feature.prototype.get);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getExtent',
-    ol.render.Feature.prototype.getExtent);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getId',
-    ol.render.Feature.prototype.getId);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getGeometry',
-    ol.render.Feature.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getProperties',
-    ol.render.Feature.prototype.getProperties);
-
-goog.exportProperty(
-    ol.render.Feature.prototype,
-    'getType',
-    ol.render.Feature.prototype.getType);
-
-goog.exportSymbol(
-    'ol.render.VectorContext',
-    ol.render.VectorContext,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'setStyle',
-    ol.render.webgl.Immediate.prototype.setStyle);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'drawGeometry',
-    ol.render.webgl.Immediate.prototype.drawGeometry);
-
-goog.exportProperty(
-    ol.render.webgl.Immediate.prototype,
-    'drawFeature',
-    ol.render.webgl.Immediate.prototype.drawFeature);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawCircle',
-    ol.render.canvas.Immediate.prototype.drawCircle);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'setStyle',
-    ol.render.canvas.Immediate.prototype.setStyle);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawGeometry',
-    ol.render.canvas.Immediate.prototype.drawGeometry);
-
-goog.exportProperty(
-    ol.render.canvas.Immediate.prototype,
-    'drawFeature',
-    ol.render.canvas.Immediate.prototype.drawFeature);
-
-goog.exportSymbol(
-    'ol.proj.common.add',
-    ol.proj.common.add,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.proj.Projection',
-    ol.proj.Projection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getCode',
-    ol.proj.Projection.prototype.getCode);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getExtent',
-    ol.proj.Projection.prototype.getExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getUnits',
-    ol.proj.Projection.prototype.getUnits);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getMetersPerUnit',
-    ol.proj.Projection.prototype.getMetersPerUnit);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getWorldExtent',
-    ol.proj.Projection.prototype.getWorldExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'getAxisOrientation',
-    ol.proj.Projection.prototype.getAxisOrientation);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'isGlobal',
-    ol.proj.Projection.prototype.isGlobal);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setGlobal',
-    ol.proj.Projection.prototype.setGlobal);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setExtent',
-    ol.proj.Projection.prototype.setExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setWorldExtent',
-    ol.proj.Projection.prototype.setWorldExtent);
-
-goog.exportProperty(
-    ol.proj.Projection.prototype,
-    'setGetPointResolution',
-    ol.proj.Projection.prototype.setGetPointResolution);
-
-goog.exportSymbol(
-    'ol.proj.Units.METERS_PER_UNIT',
-    ol.proj.Units.METERS_PER_UNIT,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.layer.Base',
-    ol.layer.Base,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getExtent',
-    ol.layer.Base.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getMaxResolution',
-    ol.layer.Base.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getMinResolution',
-    ol.layer.Base.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getOpacity',
-    ol.layer.Base.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getVisible',
-    ol.layer.Base.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getZIndex',
-    ol.layer.Base.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setExtent',
-    ol.layer.Base.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setMaxResolution',
-    ol.layer.Base.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setMinResolution',
-    ol.layer.Base.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setOpacity',
-    ol.layer.Base.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setVisible',
-    ol.layer.Base.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setZIndex',
-    ol.layer.Base.prototype.setZIndex);
-
-goog.exportSymbol(
-    'ol.layer.Group',
-    ol.layer.Group,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getLayers',
-    ol.layer.Group.prototype.getLayers);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setLayers',
-    ol.layer.Group.prototype.setLayers);
-
-goog.exportSymbol(
-    'ol.layer.Heatmap',
-    ol.layer.Heatmap,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getBlur',
-    ol.layer.Heatmap.prototype.getBlur);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getGradient',
-    ol.layer.Heatmap.prototype.getGradient);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getRadius',
-    ol.layer.Heatmap.prototype.getRadius);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setBlur',
-    ol.layer.Heatmap.prototype.setBlur);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setGradient',
-    ol.layer.Heatmap.prototype.setGradient);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setRadius',
-    ol.layer.Heatmap.prototype.setRadius);
-
-goog.exportSymbol(
-    'ol.layer.Image',
-    ol.layer.Image,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getSource',
-    ol.layer.Image.prototype.getSource);
-
-goog.exportSymbol(
-    'ol.layer.Layer',
-    ol.layer.Layer,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getSource',
-    ol.layer.Layer.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMap',
-    ol.layer.Layer.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setSource',
-    ol.layer.Layer.prototype.setSource);
-
-goog.exportSymbol(
-    'ol.layer.Tile',
-    ol.layer.Tile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getPreload',
-    ol.layer.Tile.prototype.getPreload);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getSource',
-    ol.layer.Tile.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setPreload',
-    ol.layer.Tile.prototype.setPreload);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getUseInterimTilesOnError',
-    ol.layer.Tile.prototype.getUseInterimTilesOnError);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setUseInterimTilesOnError',
-    ol.layer.Tile.prototype.setUseInterimTilesOnError);
-
-goog.exportSymbol(
-    'ol.layer.Vector',
-    ol.layer.Vector,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getSource',
-    ol.layer.Vector.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getStyle',
-    ol.layer.Vector.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getStyleFunction',
-    ol.layer.Vector.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setStyle',
-    ol.layer.Vector.prototype.setStyle);
-
-goog.exportSymbol(
-    'ol.layer.VectorTile',
-    ol.layer.VectorTile,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getPreload',
-    ol.layer.VectorTile.prototype.getPreload);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getUseInterimTilesOnError',
-    ol.layer.VectorTile.prototype.getUseInterimTilesOnError);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setPreload',
-    ol.layer.VectorTile.prototype.setPreload);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setUseInterimTilesOnError',
-    ol.layer.VectorTile.prototype.setUseInterimTilesOnError);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getSource',
-    ol.layer.VectorTile.prototype.getSource);
-
-goog.exportSymbol(
-    'ol.interaction.DoubleClickZoom',
-    ol.interaction.DoubleClickZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DoubleClickZoom.handleEvent',
-    ol.interaction.DoubleClickZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragAndDrop',
-    ol.interaction.DragAndDrop,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragAndDrop.handleEvent',
-    ol.interaction.DragAndDrop.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'features',
-    ol.interaction.DragAndDrop.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'file',
-    ol.interaction.DragAndDrop.Event.prototype.file);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'projection',
-    ol.interaction.DragAndDrop.Event.prototype.projection);
-
-goog.exportSymbol(
-    'ol.interaction.DragBox',
-    ol.interaction.DragBox,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getGeometry',
-    ol.interaction.DragBox.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'coordinate',
-    ol.interaction.DragBox.Event.prototype.coordinate);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.DragBox.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.DragPan',
-    ol.interaction.DragPan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragRotate',
-    ol.interaction.DragRotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragRotateAndZoom',
-    ol.interaction.DragRotateAndZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.DragZoom',
-    ol.interaction.DragZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw',
-    ol.interaction.Draw,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.handleEvent',
-    ol.interaction.Draw.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'removeLastPoint',
-    ol.interaction.Draw.prototype.removeLastPoint);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'finishDrawing',
-    ol.interaction.Draw.prototype.finishDrawing);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'extend',
-    ol.interaction.Draw.prototype.extend);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.createRegularPolygon',
-    ol.interaction.Draw.createRegularPolygon,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Draw.createBox',
-    ol.interaction.Draw.createBox,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'feature',
-    ol.interaction.Draw.Event.prototype.feature);
-
-goog.exportSymbol(
-    'ol.interaction.Extent',
-    ol.interaction.Extent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getExtent',
-    ol.interaction.Extent.prototype.getExtent);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setExtent',
-    ol.interaction.Extent.prototype.setExtent);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'extent',
-    ol.interaction.Extent.Event.prototype.extent);
-
-goog.exportSymbol(
-    'ol.interaction.Interaction',
-    ol.interaction.Interaction,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getActive',
-    ol.interaction.Interaction.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getMap',
-    ol.interaction.Interaction.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'setActive',
-    ol.interaction.Interaction.prototype.setActive);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardPan',
-    ol.interaction.KeyboardPan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardPan.handleEvent',
-    ol.interaction.KeyboardPan.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardZoom',
-    ol.interaction.KeyboardZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.KeyboardZoom.handleEvent',
-    ol.interaction.KeyboardZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Modify',
-    ol.interaction.Modify,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Modify.handleEvent',
-    ol.interaction.Modify.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'removePoint',
-    ol.interaction.Modify.prototype.removePoint);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'features',
-    ol.interaction.Modify.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.Modify.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.MouseWheelZoom',
-    ol.interaction.MouseWheelZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.MouseWheelZoom.handleEvent',
-    ol.interaction.MouseWheelZoom.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setMouseAnchor',
-    ol.interaction.MouseWheelZoom.prototype.setMouseAnchor);
-
-goog.exportSymbol(
-    'ol.interaction.PinchRotate',
-    ol.interaction.PinchRotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.PinchZoom',
-    ol.interaction.PinchZoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Pointer',
-    ol.interaction.Pointer,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Pointer.handleEvent',
-    ol.interaction.Pointer.handleEvent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.interaction.Select',
-    ol.interaction.Select,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getFeatures',
-    ol.interaction.Select.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getHitTolerance',
-    ol.interaction.Select.prototype.getHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getLayer',
-    ol.interaction.Select.prototype.getLayer);
-
-goog.exportSymbol(
-    'ol.interaction.Select.handleEvent',
-    ol.interaction.Select.handleEvent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setHitTolerance',
-    ol.interaction.Select.prototype.setHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setMap',
-    ol.interaction.Select.prototype.setMap);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'selected',
-    ol.interaction.Select.Event.prototype.selected);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'deselected',
-    ol.interaction.Select.Event.prototype.deselected);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'mapBrowserEvent',
-    ol.interaction.Select.Event.prototype.mapBrowserEvent);
-
-goog.exportSymbol(
-    'ol.interaction.Snap',
-    ol.interaction.Snap,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'addFeature',
-    ol.interaction.Snap.prototype.addFeature);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'removeFeature',
-    ol.interaction.Snap.prototype.removeFeature);
-
-goog.exportSymbol(
-    'ol.interaction.Translate',
-    ol.interaction.Translate,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getHitTolerance',
-    ol.interaction.Translate.prototype.getHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setHitTolerance',
-    ol.interaction.Translate.prototype.setHitTolerance);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'features',
-    ol.interaction.Translate.Event.prototype.features);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'coordinate',
-    ol.interaction.Translate.Event.prototype.coordinate);
-
-goog.exportSymbol(
-    'ol.geom.Circle',
-    ol.geom.Circle,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'clone',
-    ol.geom.Circle.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getCenter',
-    ol.geom.Circle.prototype.getCenter);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getRadius',
-    ol.geom.Circle.prototype.getRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getType',
-    ol.geom.Circle.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'intersectsExtent',
-    ol.geom.Circle.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setCenter',
-    ol.geom.Circle.prototype.setCenter);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setCenterAndRadius',
-    ol.geom.Circle.prototype.setCenterAndRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setRadius',
-    ol.geom.Circle.prototype.setRadius);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'transform',
-    ol.geom.Circle.prototype.transform);
-
-goog.exportSymbol(
-    'ol.geom.Geometry',
-    ol.geom.Geometry,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getClosestPoint',
-    ol.geom.Geometry.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'intersectsCoordinate',
-    ol.geom.Geometry.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getExtent',
-    ol.geom.Geometry.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'rotate',
-    ol.geom.Geometry.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'scale',
-    ol.geom.Geometry.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'simplify',
-    ol.geom.Geometry.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'transform',
-    ol.geom.Geometry.prototype.transform);
-
-goog.exportSymbol(
-    'ol.geom.GeometryCollection',
-    ol.geom.GeometryCollection,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'clone',
-    ol.geom.GeometryCollection.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getGeometries',
-    ol.geom.GeometryCollection.prototype.getGeometries);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getType',
-    ol.geom.GeometryCollection.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'intersectsExtent',
-    ol.geom.GeometryCollection.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'setGeometries',
-    ol.geom.GeometryCollection.prototype.setGeometries);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'applyTransform',
-    ol.geom.GeometryCollection.prototype.applyTransform);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'translate',
-    ol.geom.GeometryCollection.prototype.translate);
-
-goog.exportSymbol(
-    'ol.geom.LinearRing',
-    ol.geom.LinearRing,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'clone',
-    ol.geom.LinearRing.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getArea',
-    ol.geom.LinearRing.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getCoordinates',
-    ol.geom.LinearRing.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getType',
-    ol.geom.LinearRing.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'setCoordinates',
-    ol.geom.LinearRing.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.LineString',
-    ol.geom.LineString,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'appendCoordinate',
-    ol.geom.LineString.prototype.appendCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'clone',
-    ol.geom.LineString.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'forEachSegment',
-    ol.geom.LineString.prototype.forEachSegment);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinateAtM',
-    ol.geom.LineString.prototype.getCoordinateAtM);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinates',
-    ol.geom.LineString.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getCoordinateAt',
-    ol.geom.LineString.prototype.getCoordinateAt);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLength',
-    ol.geom.LineString.prototype.getLength);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getType',
-    ol.geom.LineString.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'intersectsExtent',
-    ol.geom.LineString.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'setCoordinates',
-    ol.geom.LineString.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiLineString',
-    ol.geom.MultiLineString,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'appendLineString',
-    ol.geom.MultiLineString.prototype.appendLineString);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'clone',
-    ol.geom.MultiLineString.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getCoordinateAtM',
-    ol.geom.MultiLineString.prototype.getCoordinateAtM);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getCoordinates',
-    ol.geom.MultiLineString.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLineString',
-    ol.geom.MultiLineString.prototype.getLineString);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLineStrings',
-    ol.geom.MultiLineString.prototype.getLineStrings);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getType',
-    ol.geom.MultiLineString.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'intersectsExtent',
-    ol.geom.MultiLineString.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'setCoordinates',
-    ol.geom.MultiLineString.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiPoint',
-    ol.geom.MultiPoint,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'appendPoint',
-    ol.geom.MultiPoint.prototype.appendPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'clone',
-    ol.geom.MultiPoint.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getCoordinates',
-    ol.geom.MultiPoint.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getPoint',
-    ol.geom.MultiPoint.prototype.getPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getPoints',
-    ol.geom.MultiPoint.prototype.getPoints);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getType',
-    ol.geom.MultiPoint.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'intersectsExtent',
-    ol.geom.MultiPoint.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'setCoordinates',
-    ol.geom.MultiPoint.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.MultiPolygon',
-    ol.geom.MultiPolygon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'appendPolygon',
-    ol.geom.MultiPolygon.prototype.appendPolygon);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'clone',
-    ol.geom.MultiPolygon.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getArea',
-    ol.geom.MultiPolygon.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getCoordinates',
-    ol.geom.MultiPolygon.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getInteriorPoints',
-    ol.geom.MultiPolygon.prototype.getInteriorPoints);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getPolygon',
-    ol.geom.MultiPolygon.prototype.getPolygon);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getPolygons',
-    ol.geom.MultiPolygon.prototype.getPolygons);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getType',
-    ol.geom.MultiPolygon.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'intersectsExtent',
-    ol.geom.MultiPolygon.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'setCoordinates',
-    ol.geom.MultiPolygon.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Point',
-    ol.geom.Point,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'clone',
-    ol.geom.Point.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getCoordinates',
-    ol.geom.Point.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getType',
-    ol.geom.Point.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'intersectsExtent',
-    ol.geom.Point.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'setCoordinates',
-    ol.geom.Point.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Polygon',
-    ol.geom.Polygon,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'appendLinearRing',
-    ol.geom.Polygon.prototype.appendLinearRing);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'clone',
-    ol.geom.Polygon.prototype.clone);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getArea',
-    ol.geom.Polygon.prototype.getArea);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getCoordinates',
-    ol.geom.Polygon.prototype.getCoordinates);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getInteriorPoint',
-    ol.geom.Polygon.prototype.getInteriorPoint);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRingCount',
-    ol.geom.Polygon.prototype.getLinearRingCount);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRing',
-    ol.geom.Polygon.prototype.getLinearRing);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLinearRings',
-    ol.geom.Polygon.prototype.getLinearRings);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getType',
-    ol.geom.Polygon.prototype.getType);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'intersectsExtent',
-    ol.geom.Polygon.prototype.intersectsExtent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'setCoordinates',
-    ol.geom.Polygon.prototype.setCoordinates);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.circular',
-    ol.geom.Polygon.circular,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.fromExtent',
-    ol.geom.Polygon.fromExtent,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.Polygon.fromCircle',
-    ol.geom.Polygon.fromCircle,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.geom.SimpleGeometry',
-    ol.geom.SimpleGeometry,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getFirstCoordinate',
-    ol.geom.SimpleGeometry.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getLastCoordinate',
-    ol.geom.SimpleGeometry.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getLayout',
-    ol.geom.SimpleGeometry.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'applyTransform',
-    ol.geom.SimpleGeometry.prototype.applyTransform);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'translate',
-    ol.geom.SimpleGeometry.prototype.translate);
-
-goog.exportSymbol(
-    'ol.format.EsriJSON',
-    ol.format.EsriJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readFeature',
-    ol.format.EsriJSON.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readFeatures',
-    ol.format.EsriJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readGeometry',
-    ol.format.EsriJSON.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'readProjection',
-    ol.format.EsriJSON.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeGeometry',
-    ol.format.EsriJSON.prototype.writeGeometry);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeGeometryObject',
-    ol.format.EsriJSON.prototype.writeGeometryObject);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeature',
-    ol.format.EsriJSON.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeatureObject',
-    ol.format.EsriJSON.prototype.writeFeatureObject);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeatures',
-    ol.format.EsriJSON.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.EsriJSON.prototype,
-    'writeFeaturesObject',
-    ol.format.EsriJSON.prototype.writeFeaturesObject);
-
-goog.exportSymbol(
-    'ol.format.Feature',
-    ol.format.Feature,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.and',
-    ol.format.filter.and,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.or',
-    ol.format.filter.or,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.not',
-    ol.format.filter.not,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.bbox',
-    ol.format.filter.bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.contains',
-    ol.format.filter.contains,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.intersects',
-    ol.format.filter.intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.within',
-    ol.format.filter.within,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.equalTo',
-    ol.format.filter.equalTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.notEqualTo',
-    ol.format.filter.notEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.lessThan',
-    ol.format.filter.lessThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.lessThanOrEqualTo',
-    ol.format.filter.lessThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.greaterThan',
-    ol.format.filter.greaterThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.greaterThanOrEqualTo',
-    ol.format.filter.greaterThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.isNull',
-    ol.format.filter.isNull,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.between',
-    ol.format.filter.between,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.like',
-    ol.format.filter.like,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.during',
-    ol.format.filter.during,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.GeoJSON',
-    ol.format.GeoJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readFeature',
-    ol.format.GeoJSON.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readFeatures',
-    ol.format.GeoJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readGeometry',
-    ol.format.GeoJSON.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'readProjection',
-    ol.format.GeoJSON.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeature',
-    ol.format.GeoJSON.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeatureObject',
-    ol.format.GeoJSON.prototype.writeFeatureObject);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeatures',
-    ol.format.GeoJSON.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeFeaturesObject',
-    ol.format.GeoJSON.prototype.writeFeaturesObject);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeGeometry',
-    ol.format.GeoJSON.prototype.writeGeometry);
-
-goog.exportProperty(
-    ol.format.GeoJSON.prototype,
-    'writeGeometryObject',
-    ol.format.GeoJSON.prototype.writeGeometryObject);
-
-goog.exportSymbol(
-    'ol.format.GML',
-    ol.format.GML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'writeFeatures',
-    ol.format.GML.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'writeFeaturesNode',
-    ol.format.GML.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.GML2',
-    ol.format.GML2,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.GML3',
-    ol.format.GML3,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeGeometryNode',
-    ol.format.GML3.prototype.writeGeometryNode);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeFeatures',
-    ol.format.GML3.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'writeFeaturesNode',
-    ol.format.GML3.prototype.writeFeaturesNode);
-
-goog.exportProperty(
-    ol.format.GMLBase.prototype,
-    'readFeatures',
-    ol.format.GMLBase.prototype.readFeatures);
-
-goog.exportSymbol(
-    'ol.format.GPX',
-    ol.format.GPX,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readFeature',
-    ol.format.GPX.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readFeatures',
-    ol.format.GPX.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'readProjection',
-    ol.format.GPX.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'writeFeatures',
-    ol.format.GPX.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.GPX.prototype,
-    'writeFeaturesNode',
-    ol.format.GPX.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.IGC',
-    ol.format.IGC,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readFeature',
-    ol.format.IGC.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readFeatures',
-    ol.format.IGC.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.IGC.prototype,
-    'readProjection',
-    ol.format.IGC.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.KML',
-    ol.format.KML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readFeature',
-    ol.format.KML.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readFeatures',
-    ol.format.KML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readName',
-    ol.format.KML.prototype.readName);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readNetworkLinks',
-    ol.format.KML.prototype.readNetworkLinks);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readRegion',
-    ol.format.KML.prototype.readRegion);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readRegionFromNode',
-    ol.format.KML.prototype.readRegionFromNode);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'readProjection',
-    ol.format.KML.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'writeFeatures',
-    ol.format.KML.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.KML.prototype,
-    'writeFeaturesNode',
-    ol.format.KML.prototype.writeFeaturesNode);
-
-goog.exportSymbol(
-    'ol.format.MVT',
-    ol.format.MVT,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'getLastExtent',
-    ol.format.MVT.prototype.getLastExtent);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'readFeatures',
-    ol.format.MVT.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'readProjection',
-    ol.format.MVT.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.MVT.prototype,
-    'setLayers',
-    ol.format.MVT.prototype.setLayers);
-
-goog.exportSymbol(
-    'ol.format.OSMXML',
-    ol.format.OSMXML,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.OSMXML.prototype,
-    'readFeatures',
-    ol.format.OSMXML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.OSMXML.prototype,
-    'readProjection',
-    ol.format.OSMXML.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.Polyline',
-    ol.format.Polyline,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.encodeDeltas',
-    ol.format.Polyline.encodeDeltas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.decodeDeltas',
-    ol.format.Polyline.decodeDeltas,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.encodeFloats',
-    ol.format.Polyline.encodeFloats,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.Polyline.decodeFloats',
-    ol.format.Polyline.decodeFloats,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readFeature',
-    ol.format.Polyline.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readFeatures',
-    ol.format.Polyline.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readGeometry',
-    ol.format.Polyline.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'readProjection',
-    ol.format.Polyline.prototype.readProjection);
-
-goog.exportProperty(
-    ol.format.Polyline.prototype,
-    'writeGeometry',
-    ol.format.Polyline.prototype.writeGeometry);
-
-goog.exportSymbol(
-    'ol.format.TopoJSON',
-    ol.format.TopoJSON,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.TopoJSON.prototype,
-    'readFeatures',
-    ol.format.TopoJSON.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.TopoJSON.prototype,
-    'readProjection',
-    ol.format.TopoJSON.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.WFS',
-    ol.format.WFS,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readFeatures',
-    ol.format.WFS.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readTransactionResponse',
-    ol.format.WFS.prototype.readTransactionResponse);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readFeatureCollectionMetadata',
-    ol.format.WFS.prototype.readFeatureCollectionMetadata);
-
-goog.exportSymbol(
-    'ol.format.WFS.writeFilter',
-    ol.format.WFS.writeFilter,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'writeGetFeature',
-    ol.format.WFS.prototype.writeGetFeature);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'writeTransaction',
-    ol.format.WFS.prototype.writeTransaction);
-
-goog.exportProperty(
-    ol.format.WFS.prototype,
-    'readProjection',
-    ol.format.WFS.prototype.readProjection);
-
-goog.exportSymbol(
-    'ol.format.WKT',
-    ol.format.WKT,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readFeature',
-    ol.format.WKT.prototype.readFeature);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readFeatures',
-    ol.format.WKT.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'readGeometry',
-    ol.format.WKT.prototype.readGeometry);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeFeature',
-    ol.format.WKT.prototype.writeFeature);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeFeatures',
-    ol.format.WKT.prototype.writeFeatures);
-
-goog.exportProperty(
-    ol.format.WKT.prototype,
-    'writeGeometry',
-    ol.format.WKT.prototype.writeGeometry);
-
-goog.exportSymbol(
-    'ol.format.WMSCapabilities',
-    ol.format.WMSCapabilities,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMSCapabilities.prototype,
-    'read',
-    ol.format.WMSCapabilities.prototype.read);
-
-goog.exportSymbol(
-    'ol.format.WMSGetFeatureInfo',
-    ol.format.WMSGetFeatureInfo,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMSGetFeatureInfo.prototype,
-    'readFeatures',
-    ol.format.WMSGetFeatureInfo.prototype.readFeatures);
-
-goog.exportSymbol(
-    'ol.format.WMTSCapabilities',
-    ol.format.WMTSCapabilities,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.format.WMTSCapabilities.prototype,
-    'read',
-    ol.format.WMTSCapabilities.prototype.read);
-
-goog.exportSymbol(
-    'ol.format.filter.And',
-    ol.format.filter.And,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Bbox',
-    ol.format.filter.Bbox,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Comparison',
-    ol.format.filter.Comparison,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.ComparisonBinary',
-    ol.format.filter.ComparisonBinary,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Contains',
-    ol.format.filter.Contains,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.During',
-    ol.format.filter.During,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.EqualTo',
-    ol.format.filter.EqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Filter',
-    ol.format.filter.Filter,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.GreaterThan',
-    ol.format.filter.GreaterThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.GreaterThanOrEqualTo',
-    ol.format.filter.GreaterThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Intersects',
-    ol.format.filter.Intersects,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsBetween',
-    ol.format.filter.IsBetween,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsLike',
-    ol.format.filter.IsLike,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.IsNull',
-    ol.format.filter.IsNull,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.LessThan',
-    ol.format.filter.LessThan,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.LessThanOrEqualTo',
-    ol.format.filter.LessThanOrEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Not',
-    ol.format.filter.Not,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.NotEqualTo',
-    ol.format.filter.NotEqualTo,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Or',
-    ol.format.filter.Or,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Spatial',
-    ol.format.filter.Spatial,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.format.filter.Within',
-    ol.format.filter.Within,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.altKeyOnly',
-    ol.events.condition.altKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.altShiftKeysOnly',
-    ol.events.condition.altShiftKeysOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.always',
-    ol.events.condition.always,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.click',
-    ol.events.condition.click,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.never',
-    ol.events.condition.never,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.pointerMove',
-    ol.events.condition.pointerMove,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.singleClick',
-    ol.events.condition.singleClick,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.doubleClick',
-    ol.events.condition.doubleClick,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.noModifierKeys',
-    ol.events.condition.noModifierKeys,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.platformModifierKeyOnly',
-    ol.events.condition.platformModifierKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.shiftKeyOnly',
-    ol.events.condition.shiftKeyOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.targetNotEditable',
-    ol.events.condition.targetNotEditable,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.mouseOnly',
-    ol.events.condition.mouseOnly,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.events.condition.primaryAction',
-    ol.events.condition.primaryAction,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'type',
-    ol.events.Event.prototype.type);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'target',
-    ol.events.Event.prototype.target);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'preventDefault',
-    ol.events.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.events.Event.prototype,
-    'stopPropagation',
-    ol.events.Event.prototype.stopPropagation);
-
-goog.exportSymbol(
-    'ol.control.Attribution',
-    ol.control.Attribution,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.Attribution.render',
-    ol.control.Attribution.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getCollapsible',
-    ol.control.Attribution.prototype.getCollapsible);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setCollapsible',
-    ol.control.Attribution.prototype.setCollapsible);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setCollapsed',
-    ol.control.Attribution.prototype.setCollapsed);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getCollapsed',
-    ol.control.Attribution.prototype.getCollapsed);
-
-goog.exportSymbol(
-    'ol.control.Control',
-    ol.control.Control,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getMap',
-    ol.control.Control.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setMap',
-    ol.control.Control.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setTarget',
-    ol.control.Control.prototype.setTarget);
-
-goog.exportSymbol(
-    'ol.control.FullScreen',
-    ol.control.FullScreen,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.MousePosition',
-    ol.control.MousePosition,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.MousePosition.render',
-    ol.control.MousePosition.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getCoordinateFormat',
-    ol.control.MousePosition.prototype.getCoordinateFormat);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getProjection',
-    ol.control.MousePosition.prototype.getProjection);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setCoordinateFormat',
-    ol.control.MousePosition.prototype.setCoordinateFormat);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setProjection',
-    ol.control.MousePosition.prototype.setProjection);
-
-goog.exportSymbol(
-    'ol.control.OverviewMap',
-    ol.control.OverviewMap,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.OverviewMap.render',
-    ol.control.OverviewMap.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getCollapsible',
-    ol.control.OverviewMap.prototype.getCollapsible);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setCollapsible',
-    ol.control.OverviewMap.prototype.setCollapsible);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setCollapsed',
-    ol.control.OverviewMap.prototype.setCollapsed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getCollapsed',
-    ol.control.OverviewMap.prototype.getCollapsed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getOverviewMap',
-    ol.control.OverviewMap.prototype.getOverviewMap);
-
-goog.exportSymbol(
-    'ol.control.Rotate',
-    ol.control.Rotate,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.Rotate.render',
-    ol.control.Rotate.render,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ScaleLine',
-    ol.control.ScaleLine,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getUnits',
-    ol.control.ScaleLine.prototype.getUnits);
-
-goog.exportSymbol(
-    'ol.control.ScaleLine.render',
-    ol.control.ScaleLine.render,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setUnits',
-    ol.control.ScaleLine.prototype.setUnits);
-
-goog.exportSymbol(
-    'ol.control.Zoom',
-    ol.control.Zoom,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomSlider',
-    ol.control.ZoomSlider,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomSlider.render',
-    ol.control.ZoomSlider.render,
-    OPENLAYERS);
-
-goog.exportSymbol(
-    'ol.control.ZoomToExtent',
-    ol.control.ZoomToExtent,
-    OPENLAYERS);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'changed',
-    ol.Object.prototype.changed);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'dispatchEvent',
-    ol.Object.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'getRevision',
-    ol.Object.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'on',
-    ol.Object.prototype.on);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'once',
-    ol.Object.prototype.once);
-
-goog.exportProperty(
-    ol.Object.prototype,
-    'un',
-    ol.Object.prototype.un);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'get',
-    ol.PluggableMap.prototype.get);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getKeys',
-    ol.PluggableMap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getProperties',
-    ol.PluggableMap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'set',
-    ol.PluggableMap.prototype.set);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'setProperties',
-    ol.PluggableMap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'unset',
-    ol.PluggableMap.prototype.unset);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'changed',
-    ol.PluggableMap.prototype.changed);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'dispatchEvent',
-    ol.PluggableMap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'getRevision',
-    ol.PluggableMap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'on',
-    ol.PluggableMap.prototype.on);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'once',
-    ol.PluggableMap.prototype.once);
-
-goog.exportProperty(
-    ol.PluggableMap.prototype,
-    'un',
-    ol.PluggableMap.prototype.un);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'addControl',
-    ol.CanvasMap.prototype.addControl);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'addInteraction',
-    ol.CanvasMap.prototype.addInteraction);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'addLayer',
-    ol.CanvasMap.prototype.addLayer);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'addOverlay',
-    ol.CanvasMap.prototype.addOverlay);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'forEachFeatureAtPixel',
-    ol.CanvasMap.prototype.forEachFeatureAtPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getFeaturesAtPixel',
-    ol.CanvasMap.prototype.getFeaturesAtPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'forEachLayerAtPixel',
-    ol.CanvasMap.prototype.forEachLayerAtPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'hasFeatureAtPixel',
-    ol.CanvasMap.prototype.hasFeatureAtPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getEventCoordinate',
-    ol.CanvasMap.prototype.getEventCoordinate);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getEventPixel',
-    ol.CanvasMap.prototype.getEventPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getTarget',
-    ol.CanvasMap.prototype.getTarget);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getTargetElement',
-    ol.CanvasMap.prototype.getTargetElement);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getCoordinateFromPixel',
-    ol.CanvasMap.prototype.getCoordinateFromPixel);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getControls',
-    ol.CanvasMap.prototype.getControls);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getOverlays',
-    ol.CanvasMap.prototype.getOverlays);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getOverlayById',
-    ol.CanvasMap.prototype.getOverlayById);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getInteractions',
-    ol.CanvasMap.prototype.getInteractions);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getLayerGroup',
-    ol.CanvasMap.prototype.getLayerGroup);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getLayers',
-    ol.CanvasMap.prototype.getLayers);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getPixelFromCoordinate',
-    ol.CanvasMap.prototype.getPixelFromCoordinate);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getSize',
-    ol.CanvasMap.prototype.getSize);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getView',
-    ol.CanvasMap.prototype.getView);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getViewport',
-    ol.CanvasMap.prototype.getViewport);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'renderSync',
-    ol.CanvasMap.prototype.renderSync);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'render',
-    ol.CanvasMap.prototype.render);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'removeControl',
-    ol.CanvasMap.prototype.removeControl);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'removeInteraction',
-    ol.CanvasMap.prototype.removeInteraction);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'removeLayer',
-    ol.CanvasMap.prototype.removeLayer);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'removeOverlay',
-    ol.CanvasMap.prototype.removeOverlay);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'setLayerGroup',
-    ol.CanvasMap.prototype.setLayerGroup);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'setSize',
-    ol.CanvasMap.prototype.setSize);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'setTarget',
-    ol.CanvasMap.prototype.setTarget);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'setView',
-    ol.CanvasMap.prototype.setView);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'updateSize',
-    ol.CanvasMap.prototype.updateSize);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'get',
-    ol.CanvasMap.prototype.get);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getKeys',
-    ol.CanvasMap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getProperties',
-    ol.CanvasMap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'set',
-    ol.CanvasMap.prototype.set);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'setProperties',
-    ol.CanvasMap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'unset',
-    ol.CanvasMap.prototype.unset);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'changed',
-    ol.CanvasMap.prototype.changed);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'dispatchEvent',
-    ol.CanvasMap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'getRevision',
-    ol.CanvasMap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'on',
-    ol.CanvasMap.prototype.on);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'once',
-    ol.CanvasMap.prototype.once);
-
-goog.exportProperty(
-    ol.CanvasMap.prototype,
-    'un',
-    ol.CanvasMap.prototype.un);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'get',
-    ol.Collection.prototype.get);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getKeys',
-    ol.Collection.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getProperties',
-    ol.Collection.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'set',
-    ol.Collection.prototype.set);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'setProperties',
-    ol.Collection.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'unset',
-    ol.Collection.prototype.unset);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'changed',
-    ol.Collection.prototype.changed);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'dispatchEvent',
-    ol.Collection.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'getRevision',
-    ol.Collection.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'on',
-    ol.Collection.prototype.on);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'once',
-    ol.Collection.prototype.once);
-
-goog.exportProperty(
-    ol.Collection.prototype,
-    'un',
-    ol.Collection.prototype.un);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'type',
-    ol.Collection.Event.prototype.type);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'target',
-    ol.Collection.Event.prototype.target);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'preventDefault',
-    ol.Collection.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.Collection.Event.prototype,
-    'stopPropagation',
-    ol.Collection.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'get',
-    ol.DeviceOrientation.prototype.get);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getKeys',
-    ol.DeviceOrientation.prototype.getKeys);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getProperties',
-    ol.DeviceOrientation.prototype.getProperties);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'set',
-    ol.DeviceOrientation.prototype.set);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'setProperties',
-    ol.DeviceOrientation.prototype.setProperties);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'unset',
-    ol.DeviceOrientation.prototype.unset);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'changed',
-    ol.DeviceOrientation.prototype.changed);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'dispatchEvent',
-    ol.DeviceOrientation.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'getRevision',
-    ol.DeviceOrientation.prototype.getRevision);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'on',
-    ol.DeviceOrientation.prototype.on);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'once',
-    ol.DeviceOrientation.prototype.once);
-
-goog.exportProperty(
-    ol.DeviceOrientation.prototype,
-    'un',
-    ol.DeviceOrientation.prototype.un);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'get',
-    ol.Feature.prototype.get);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getKeys',
-    ol.Feature.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getProperties',
-    ol.Feature.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'set',
-    ol.Feature.prototype.set);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'setProperties',
-    ol.Feature.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'unset',
-    ol.Feature.prototype.unset);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'changed',
-    ol.Feature.prototype.changed);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'dispatchEvent',
-    ol.Feature.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'getRevision',
-    ol.Feature.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'on',
-    ol.Feature.prototype.on);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'once',
-    ol.Feature.prototype.once);
-
-goog.exportProperty(
-    ol.Feature.prototype,
-    'un',
-    ol.Feature.prototype.un);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'get',
-    ol.Geolocation.prototype.get);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getKeys',
-    ol.Geolocation.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getProperties',
-    ol.Geolocation.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'set',
-    ol.Geolocation.prototype.set);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'setProperties',
-    ol.Geolocation.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'unset',
-    ol.Geolocation.prototype.unset);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'changed',
-    ol.Geolocation.prototype.changed);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'dispatchEvent',
-    ol.Geolocation.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'getRevision',
-    ol.Geolocation.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'on',
-    ol.Geolocation.prototype.on);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'once',
-    ol.Geolocation.prototype.once);
-
-goog.exportProperty(
-    ol.Geolocation.prototype,
-    'un',
-    ol.Geolocation.prototype.un);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'getTileCoord',
-    ol.ImageTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.ImageTile.prototype,
-    'load',
-    ol.ImageTile.prototype.load);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addControl',
-    ol.Map.prototype.addControl);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addInteraction',
-    ol.Map.prototype.addInteraction);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addLayer',
-    ol.Map.prototype.addLayer);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'addOverlay',
-    ol.Map.prototype.addOverlay);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'forEachFeatureAtPixel',
-    ol.Map.prototype.forEachFeatureAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getFeaturesAtPixel',
-    ol.Map.prototype.getFeaturesAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'forEachLayerAtPixel',
-    ol.Map.prototype.forEachLayerAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'hasFeatureAtPixel',
-    ol.Map.prototype.hasFeatureAtPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getEventCoordinate',
-    ol.Map.prototype.getEventCoordinate);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getEventPixel',
-    ol.Map.prototype.getEventPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getTarget',
-    ol.Map.prototype.getTarget);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getTargetElement',
-    ol.Map.prototype.getTargetElement);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getCoordinateFromPixel',
-    ol.Map.prototype.getCoordinateFromPixel);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getControls',
-    ol.Map.prototype.getControls);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getOverlays',
-    ol.Map.prototype.getOverlays);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getOverlayById',
-    ol.Map.prototype.getOverlayById);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getInteractions',
-    ol.Map.prototype.getInteractions);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getLayerGroup',
-    ol.Map.prototype.getLayerGroup);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getLayers',
-    ol.Map.prototype.getLayers);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getPixelFromCoordinate',
-    ol.Map.prototype.getPixelFromCoordinate);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getSize',
-    ol.Map.prototype.getSize);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getView',
-    ol.Map.prototype.getView);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getViewport',
-    ol.Map.prototype.getViewport);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'renderSync',
-    ol.Map.prototype.renderSync);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'render',
-    ol.Map.prototype.render);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeControl',
-    ol.Map.prototype.removeControl);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeInteraction',
-    ol.Map.prototype.removeInteraction);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeLayer',
-    ol.Map.prototype.removeLayer);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'removeOverlay',
-    ol.Map.prototype.removeOverlay);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setLayerGroup',
-    ol.Map.prototype.setLayerGroup);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setSize',
-    ol.Map.prototype.setSize);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setTarget',
-    ol.Map.prototype.setTarget);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setView',
-    ol.Map.prototype.setView);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'updateSize',
-    ol.Map.prototype.updateSize);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'get',
-    ol.Map.prototype.get);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getKeys',
-    ol.Map.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getProperties',
-    ol.Map.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'set',
-    ol.Map.prototype.set);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'setProperties',
-    ol.Map.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'unset',
-    ol.Map.prototype.unset);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'changed',
-    ol.Map.prototype.changed);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'dispatchEvent',
-    ol.Map.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'getRevision',
-    ol.Map.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'on',
-    ol.Map.prototype.on);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'once',
-    ol.Map.prototype.once);
-
-goog.exportProperty(
-    ol.Map.prototype,
-    'un',
-    ol.Map.prototype.un);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'type',
-    ol.MapEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'target',
-    ol.MapEvent.prototype.target);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'preventDefault',
-    ol.MapEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapEvent.prototype,
-    'stopPropagation',
-    ol.MapEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'map',
-    ol.MapBrowserEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'frameState',
-    ol.MapBrowserEvent.prototype.frameState);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'type',
-    ol.MapBrowserEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'target',
-    ol.MapBrowserEvent.prototype.target);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'preventDefault',
-    ol.MapBrowserEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapBrowserEvent.prototype,
-    'stopPropagation',
-    ol.MapBrowserEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'originalEvent',
-    ol.MapBrowserPointerEvent.prototype.originalEvent);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'pixel',
-    ol.MapBrowserPointerEvent.prototype.pixel);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'coordinate',
-    ol.MapBrowserPointerEvent.prototype.coordinate);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'dragging',
-    ol.MapBrowserPointerEvent.prototype.dragging);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'preventDefault',
-    ol.MapBrowserPointerEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'stopPropagation',
-    ol.MapBrowserPointerEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'map',
-    ol.MapBrowserPointerEvent.prototype.map);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'frameState',
-    ol.MapBrowserPointerEvent.prototype.frameState);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'type',
-    ol.MapBrowserPointerEvent.prototype.type);
-
-goog.exportProperty(
-    ol.MapBrowserPointerEvent.prototype,
-    'target',
-    ol.MapBrowserPointerEvent.prototype.target);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'type',
-    ol.Object.Event.prototype.type);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'target',
-    ol.Object.Event.prototype.target);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'preventDefault',
-    ol.Object.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.Object.Event.prototype,
-    'stopPropagation',
-    ol.Object.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'get',
-    ol.Overlay.prototype.get);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getKeys',
-    ol.Overlay.prototype.getKeys);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getProperties',
-    ol.Overlay.prototype.getProperties);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'set',
-    ol.Overlay.prototype.set);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'setProperties',
-    ol.Overlay.prototype.setProperties);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'unset',
-    ol.Overlay.prototype.unset);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'changed',
-    ol.Overlay.prototype.changed);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'dispatchEvent',
-    ol.Overlay.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'getRevision',
-    ol.Overlay.prototype.getRevision);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'on',
-    ol.Overlay.prototype.on);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'once',
-    ol.Overlay.prototype.once);
-
-goog.exportProperty(
-    ol.Overlay.prototype,
-    'un',
-    ol.Overlay.prototype.un);
-
-goog.exportProperty(
-    ol.VectorImageTile.prototype,
-    'getTileCoord',
-    ol.VectorImageTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.VectorImageTile.prototype,
-    'load',
-    ol.VectorImageTile.prototype.load);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'getTileCoord',
-    ol.VectorTile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.VectorTile.prototype,
-    'load',
-    ol.VectorTile.prototype.load);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'get',
-    ol.View.prototype.get);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getKeys',
-    ol.View.prototype.getKeys);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getProperties',
-    ol.View.prototype.getProperties);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'set',
-    ol.View.prototype.set);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'setProperties',
-    ol.View.prototype.setProperties);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'unset',
-    ol.View.prototype.unset);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'changed',
-    ol.View.prototype.changed);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'dispatchEvent',
-    ol.View.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'getRevision',
-    ol.View.prototype.getRevision);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'on',
-    ol.View.prototype.on);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'once',
-    ol.View.prototype.once);
-
-goog.exportProperty(
-    ol.View.prototype,
-    'un',
-    ol.View.prototype.un);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'forEachTileCoord',
-    ol.tilegrid.WMTS.prototype.forEachTileCoord);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMaxZoom',
-    ol.tilegrid.WMTS.prototype.getMaxZoom);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getMinZoom',
-    ol.tilegrid.WMTS.prototype.getMinZoom);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getOrigin',
-    ol.tilegrid.WMTS.prototype.getOrigin);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getResolution',
-    ol.tilegrid.WMTS.prototype.getResolution);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getResolutions',
-    ol.tilegrid.WMTS.prototype.getResolutions);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordExtent',
-    ol.tilegrid.WMTS.prototype.getTileCoordExtent);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordForCoordAndResolution',
-    ol.tilegrid.WMTS.prototype.getTileCoordForCoordAndResolution);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileCoordForCoordAndZ',
-    ol.tilegrid.WMTS.prototype.getTileCoordForCoordAndZ);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getTileSize',
-    ol.tilegrid.WMTS.prototype.getTileSize);
-
-goog.exportProperty(
-    ol.tilegrid.WMTS.prototype,
-    'getZForResolution',
-    ol.tilegrid.WMTS.prototype.getZForResolution);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getOpacity',
-    ol.style.RegularShape.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRotateWithView',
-    ol.style.RegularShape.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getRotation',
-    ol.style.RegularShape.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getScale',
-    ol.style.RegularShape.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'getSnapToPixel',
-    ol.style.RegularShape.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setOpacity',
-    ol.style.RegularShape.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setRotation',
-    ol.style.RegularShape.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.RegularShape.prototype,
-    'setScale',
-    ol.style.RegularShape.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'clone',
-    ol.style.Circle.prototype.clone);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getAngle',
-    ol.style.Circle.prototype.getAngle);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getFill',
-    ol.style.Circle.prototype.getFill);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getPoints',
-    ol.style.Circle.prototype.getPoints);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRadius',
-    ol.style.Circle.prototype.getRadius);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRadius2',
-    ol.style.Circle.prototype.getRadius2);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getStroke',
-    ol.style.Circle.prototype.getStroke);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getOpacity',
-    ol.style.Circle.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRotateWithView',
-    ol.style.Circle.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getRotation',
-    ol.style.Circle.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getScale',
-    ol.style.Circle.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'getSnapToPixel',
-    ol.style.Circle.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setOpacity',
-    ol.style.Circle.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setRotation',
-    ol.style.Circle.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Circle.prototype,
-    'setScale',
-    ol.style.Circle.prototype.setScale);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getOpacity',
-    ol.style.Icon.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getRotateWithView',
-    ol.style.Icon.prototype.getRotateWithView);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getRotation',
-    ol.style.Icon.prototype.getRotation);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getScale',
-    ol.style.Icon.prototype.getScale);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'getSnapToPixel',
-    ol.style.Icon.prototype.getSnapToPixel);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setOpacity',
-    ol.style.Icon.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setRotation',
-    ol.style.Icon.prototype.setRotation);
-
-goog.exportProperty(
-    ol.style.Icon.prototype,
-    'setScale',
-    ol.style.Icon.prototype.setScale);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'get',
-    ol.source.Source.prototype.get);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getKeys',
-    ol.source.Source.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getProperties',
-    ol.source.Source.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'set',
-    ol.source.Source.prototype.set);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'setProperties',
-    ol.source.Source.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'unset',
-    ol.source.Source.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'changed',
-    ol.source.Source.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'dispatchEvent',
-    ol.source.Source.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'getRevision',
-    ol.source.Source.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'on',
-    ol.source.Source.prototype.on);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'once',
-    ol.source.Source.prototype.once);
-
-goog.exportProperty(
-    ol.source.Source.prototype,
-    'un',
-    ol.source.Source.prototype.un);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getAttributions',
-    ol.source.Tile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getLogo',
-    ol.source.Tile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getProjection',
-    ol.source.Tile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getState',
-    ol.source.Tile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'refresh',
-    ol.source.Tile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'setAttributions',
-    ol.source.Tile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'get',
-    ol.source.Tile.prototype.get);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getKeys',
-    ol.source.Tile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getProperties',
-    ol.source.Tile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'set',
-    ol.source.Tile.prototype.set);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'setProperties',
-    ol.source.Tile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'unset',
-    ol.source.Tile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'changed',
-    ol.source.Tile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'dispatchEvent',
-    ol.source.Tile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'getRevision',
-    ol.source.Tile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'on',
-    ol.source.Tile.prototype.on);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'once',
-    ol.source.Tile.prototype.once);
-
-goog.exportProperty(
-    ol.source.Tile.prototype,
-    'un',
-    ol.source.Tile.prototype.un);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getTileGrid',
-    ol.source.UrlTile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'refresh',
-    ol.source.UrlTile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getAttributions',
-    ol.source.UrlTile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getLogo',
-    ol.source.UrlTile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getProjection',
-    ol.source.UrlTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getState',
-    ol.source.UrlTile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setAttributions',
-    ol.source.UrlTile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'get',
-    ol.source.UrlTile.prototype.get);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getKeys',
-    ol.source.UrlTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getProperties',
-    ol.source.UrlTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'set',
-    ol.source.UrlTile.prototype.set);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'setProperties',
-    ol.source.UrlTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'unset',
-    ol.source.UrlTile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'changed',
-    ol.source.UrlTile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'dispatchEvent',
-    ol.source.UrlTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'getRevision',
-    ol.source.UrlTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'on',
-    ol.source.UrlTile.prototype.on);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'once',
-    ol.source.UrlTile.prototype.once);
-
-goog.exportProperty(
-    ol.source.UrlTile.prototype,
-    'un',
-    ol.source.UrlTile.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileLoadFunction',
-    ol.source.TileImage.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileUrlFunction',
-    ol.source.TileImage.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getUrls',
-    ol.source.TileImage.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileLoadFunction',
-    ol.source.TileImage.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setTileUrlFunction',
-    ol.source.TileImage.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setUrl',
-    ol.source.TileImage.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setUrls',
-    ol.source.TileImage.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getTileGrid',
-    ol.source.TileImage.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'refresh',
-    ol.source.TileImage.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getAttributions',
-    ol.source.TileImage.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getLogo',
-    ol.source.TileImage.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getProjection',
-    ol.source.TileImage.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getState',
-    ol.source.TileImage.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setAttributions',
-    ol.source.TileImage.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'get',
-    ol.source.TileImage.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getKeys',
-    ol.source.TileImage.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getProperties',
-    ol.source.TileImage.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'set',
-    ol.source.TileImage.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'setProperties',
-    ol.source.TileImage.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'unset',
-    ol.source.TileImage.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'changed',
-    ol.source.TileImage.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'dispatchEvent',
-    ol.source.TileImage.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'getRevision',
-    ol.source.TileImage.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'on',
-    ol.source.TileImage.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'once',
-    ol.source.TileImage.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileImage.prototype,
-    'un',
-    ol.source.TileImage.prototype.un);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.BingMaps.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileGridForProjection',
-    ol.source.BingMaps.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileLoadFunction',
-    ol.source.BingMaps.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileUrlFunction',
-    ol.source.BingMaps.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getUrls',
-    ol.source.BingMaps.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileLoadFunction',
-    ol.source.BingMaps.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setTileUrlFunction',
-    ol.source.BingMaps.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setUrl',
-    ol.source.BingMaps.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setUrls',
-    ol.source.BingMaps.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getTileGrid',
-    ol.source.BingMaps.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'refresh',
-    ol.source.BingMaps.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getAttributions',
-    ol.source.BingMaps.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getLogo',
-    ol.source.BingMaps.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getProjection',
-    ol.source.BingMaps.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getState',
-    ol.source.BingMaps.prototype.getState);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setAttributions',
-    ol.source.BingMaps.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'get',
-    ol.source.BingMaps.prototype.get);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getKeys',
-    ol.source.BingMaps.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getProperties',
-    ol.source.BingMaps.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'set',
-    ol.source.BingMaps.prototype.set);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'setProperties',
-    ol.source.BingMaps.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'unset',
-    ol.source.BingMaps.prototype.unset);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'changed',
-    ol.source.BingMaps.prototype.changed);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'dispatchEvent',
-    ol.source.BingMaps.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'getRevision',
-    ol.source.BingMaps.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'on',
-    ol.source.BingMaps.prototype.on);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'once',
-    ol.source.BingMaps.prototype.once);
-
-goog.exportProperty(
-    ol.source.BingMaps.prototype,
-    'un',
-    ol.source.BingMaps.prototype.un);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.XYZ.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileGridForProjection',
-    ol.source.XYZ.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileLoadFunction',
-    ol.source.XYZ.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileUrlFunction',
-    ol.source.XYZ.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getUrls',
-    ol.source.XYZ.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileLoadFunction',
-    ol.source.XYZ.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setTileUrlFunction',
-    ol.source.XYZ.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setUrl',
-    ol.source.XYZ.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setUrls',
-    ol.source.XYZ.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getTileGrid',
-    ol.source.XYZ.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'refresh',
-    ol.source.XYZ.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getAttributions',
-    ol.source.XYZ.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getLogo',
-    ol.source.XYZ.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getProjection',
-    ol.source.XYZ.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getState',
-    ol.source.XYZ.prototype.getState);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setAttributions',
-    ol.source.XYZ.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'get',
-    ol.source.XYZ.prototype.get);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getKeys',
-    ol.source.XYZ.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getProperties',
-    ol.source.XYZ.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'set',
-    ol.source.XYZ.prototype.set);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'setProperties',
-    ol.source.XYZ.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'unset',
-    ol.source.XYZ.prototype.unset);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'changed',
-    ol.source.XYZ.prototype.changed);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'dispatchEvent',
-    ol.source.XYZ.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'getRevision',
-    ol.source.XYZ.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'on',
-    ol.source.XYZ.prototype.on);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'once',
-    ol.source.XYZ.prototype.once);
-
-goog.exportProperty(
-    ol.source.XYZ.prototype,
-    'un',
-    ol.source.XYZ.prototype.un);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.CartoDB.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileGridForProjection',
-    ol.source.CartoDB.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileLoadFunction',
-    ol.source.CartoDB.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileUrlFunction',
-    ol.source.CartoDB.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getUrls',
-    ol.source.CartoDB.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileLoadFunction',
-    ol.source.CartoDB.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setTileUrlFunction',
-    ol.source.CartoDB.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setUrl',
-    ol.source.CartoDB.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setUrls',
-    ol.source.CartoDB.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getTileGrid',
-    ol.source.CartoDB.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'refresh',
-    ol.source.CartoDB.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getAttributions',
-    ol.source.CartoDB.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getLogo',
-    ol.source.CartoDB.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getProjection',
-    ol.source.CartoDB.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getState',
-    ol.source.CartoDB.prototype.getState);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setAttributions',
-    ol.source.CartoDB.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'get',
-    ol.source.CartoDB.prototype.get);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getKeys',
-    ol.source.CartoDB.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getProperties',
-    ol.source.CartoDB.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'set',
-    ol.source.CartoDB.prototype.set);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'setProperties',
-    ol.source.CartoDB.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'unset',
-    ol.source.CartoDB.prototype.unset);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'changed',
-    ol.source.CartoDB.prototype.changed);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'dispatchEvent',
-    ol.source.CartoDB.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'getRevision',
-    ol.source.CartoDB.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'on',
-    ol.source.CartoDB.prototype.on);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'once',
-    ol.source.CartoDB.prototype.once);
-
-goog.exportProperty(
-    ol.source.CartoDB.prototype,
-    'un',
-    ol.source.CartoDB.prototype.un);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getAttributions',
-    ol.source.Vector.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getLogo',
-    ol.source.Vector.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getProjection',
-    ol.source.Vector.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getState',
-    ol.source.Vector.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'refresh',
-    ol.source.Vector.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'setAttributions',
-    ol.source.Vector.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'get',
-    ol.source.Vector.prototype.get);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getKeys',
-    ol.source.Vector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getProperties',
-    ol.source.Vector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'set',
-    ol.source.Vector.prototype.set);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'setProperties',
-    ol.source.Vector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'unset',
-    ol.source.Vector.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'changed',
-    ol.source.Vector.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'dispatchEvent',
-    ol.source.Vector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'getRevision',
-    ol.source.Vector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'on',
-    ol.source.Vector.prototype.on);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'once',
-    ol.source.Vector.prototype.once);
-
-goog.exportProperty(
-    ol.source.Vector.prototype,
-    'un',
-    ol.source.Vector.prototype.un);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'addFeature',
-    ol.source.Cluster.prototype.addFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'addFeatures',
-    ol.source.Cluster.prototype.addFeatures);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'clear',
-    ol.source.Cluster.prototype.clear);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeature',
-    ol.source.Cluster.prototype.forEachFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeatureInExtent',
-    ol.source.Cluster.prototype.forEachFeatureInExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'forEachFeatureIntersectingExtent',
-    ol.source.Cluster.prototype.forEachFeatureIntersectingExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesCollection',
-    ol.source.Cluster.prototype.getFeaturesCollection);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeatures',
-    ol.source.Cluster.prototype.getFeatures);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesAtCoordinate',
-    ol.source.Cluster.prototype.getFeaturesAtCoordinate);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeaturesInExtent',
-    ol.source.Cluster.prototype.getFeaturesInExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getClosestFeatureToCoordinate',
-    ol.source.Cluster.prototype.getClosestFeatureToCoordinate);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getExtent',
-    ol.source.Cluster.prototype.getExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFeatureById',
-    ol.source.Cluster.prototype.getFeatureById);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getFormat',
-    ol.source.Cluster.prototype.getFormat);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getUrl',
-    ol.source.Cluster.prototype.getUrl);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'removeLoadedExtent',
-    ol.source.Cluster.prototype.removeLoadedExtent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'removeFeature',
-    ol.source.Cluster.prototype.removeFeature);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setLoader',
-    ol.source.Cluster.prototype.setLoader);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getAttributions',
-    ol.source.Cluster.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getLogo',
-    ol.source.Cluster.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getProjection',
-    ol.source.Cluster.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getState',
-    ol.source.Cluster.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'refresh',
-    ol.source.Cluster.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setAttributions',
-    ol.source.Cluster.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'get',
-    ol.source.Cluster.prototype.get);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getKeys',
-    ol.source.Cluster.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getProperties',
-    ol.source.Cluster.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'set',
-    ol.source.Cluster.prototype.set);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'setProperties',
-    ol.source.Cluster.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'unset',
-    ol.source.Cluster.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'changed',
-    ol.source.Cluster.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'dispatchEvent',
-    ol.source.Cluster.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'getRevision',
-    ol.source.Cluster.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'on',
-    ol.source.Cluster.prototype.on);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'once',
-    ol.source.Cluster.prototype.once);
-
-goog.exportProperty(
-    ol.source.Cluster.prototype,
-    'un',
-    ol.source.Cluster.prototype.un);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getAttributions',
-    ol.source.Image.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getLogo',
-    ol.source.Image.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getProjection',
-    ol.source.Image.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getState',
-    ol.source.Image.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'refresh',
-    ol.source.Image.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'setAttributions',
-    ol.source.Image.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'get',
-    ol.source.Image.prototype.get);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getKeys',
-    ol.source.Image.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getProperties',
-    ol.source.Image.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'set',
-    ol.source.Image.prototype.set);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'setProperties',
-    ol.source.Image.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'unset',
-    ol.source.Image.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'changed',
-    ol.source.Image.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'dispatchEvent',
-    ol.source.Image.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'getRevision',
-    ol.source.Image.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'on',
-    ol.source.Image.prototype.on);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'once',
-    ol.source.Image.prototype.once);
-
-goog.exportProperty(
-    ol.source.Image.prototype,
-    'un',
-    ol.source.Image.prototype.un);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'type',
-    ol.source.Image.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'target',
-    ol.source.Image.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'preventDefault',
-    ol.source.Image.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Image.Event.prototype,
-    'stopPropagation',
-    ol.source.Image.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getAttributions',
-    ol.source.ImageArcGISRest.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getLogo',
-    ol.source.ImageArcGISRest.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getProjection',
-    ol.source.ImageArcGISRest.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getState',
-    ol.source.ImageArcGISRest.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'refresh',
-    ol.source.ImageArcGISRest.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setAttributions',
-    ol.source.ImageArcGISRest.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'get',
-    ol.source.ImageArcGISRest.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getKeys',
-    ol.source.ImageArcGISRest.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getProperties',
-    ol.source.ImageArcGISRest.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'set',
-    ol.source.ImageArcGISRest.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'setProperties',
-    ol.source.ImageArcGISRest.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'unset',
-    ol.source.ImageArcGISRest.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'changed',
-    ol.source.ImageArcGISRest.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'dispatchEvent',
-    ol.source.ImageArcGISRest.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'getRevision',
-    ol.source.ImageArcGISRest.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'on',
-    ol.source.ImageArcGISRest.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'once',
-    ol.source.ImageArcGISRest.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageArcGISRest.prototype,
-    'un',
-    ol.source.ImageArcGISRest.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getAttributions',
-    ol.source.ImageCanvas.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getLogo',
-    ol.source.ImageCanvas.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getProjection',
-    ol.source.ImageCanvas.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getState',
-    ol.source.ImageCanvas.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'refresh',
-    ol.source.ImageCanvas.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'setAttributions',
-    ol.source.ImageCanvas.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'get',
-    ol.source.ImageCanvas.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getKeys',
-    ol.source.ImageCanvas.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getProperties',
-    ol.source.ImageCanvas.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'set',
-    ol.source.ImageCanvas.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'setProperties',
-    ol.source.ImageCanvas.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'unset',
-    ol.source.ImageCanvas.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'changed',
-    ol.source.ImageCanvas.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'dispatchEvent',
-    ol.source.ImageCanvas.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'getRevision',
-    ol.source.ImageCanvas.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'on',
-    ol.source.ImageCanvas.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'once',
-    ol.source.ImageCanvas.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageCanvas.prototype,
-    'un',
-    ol.source.ImageCanvas.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getAttributions',
-    ol.source.ImageMapGuide.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getLogo',
-    ol.source.ImageMapGuide.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getProjection',
-    ol.source.ImageMapGuide.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getState',
-    ol.source.ImageMapGuide.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'refresh',
-    ol.source.ImageMapGuide.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setAttributions',
-    ol.source.ImageMapGuide.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'get',
-    ol.source.ImageMapGuide.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getKeys',
-    ol.source.ImageMapGuide.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getProperties',
-    ol.source.ImageMapGuide.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'set',
-    ol.source.ImageMapGuide.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'setProperties',
-    ol.source.ImageMapGuide.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'unset',
-    ol.source.ImageMapGuide.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'changed',
-    ol.source.ImageMapGuide.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'dispatchEvent',
-    ol.source.ImageMapGuide.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'getRevision',
-    ol.source.ImageMapGuide.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'on',
-    ol.source.ImageMapGuide.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'once',
-    ol.source.ImageMapGuide.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageMapGuide.prototype,
-    'un',
-    ol.source.ImageMapGuide.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getAttributions',
-    ol.source.ImageStatic.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getLogo',
-    ol.source.ImageStatic.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getProjection',
-    ol.source.ImageStatic.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getState',
-    ol.source.ImageStatic.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'refresh',
-    ol.source.ImageStatic.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'setAttributions',
-    ol.source.ImageStatic.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'get',
-    ol.source.ImageStatic.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getKeys',
-    ol.source.ImageStatic.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getProperties',
-    ol.source.ImageStatic.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'set',
-    ol.source.ImageStatic.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'setProperties',
-    ol.source.ImageStatic.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'unset',
-    ol.source.ImageStatic.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'changed',
-    ol.source.ImageStatic.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'dispatchEvent',
-    ol.source.ImageStatic.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'getRevision',
-    ol.source.ImageStatic.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'on',
-    ol.source.ImageStatic.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'once',
-    ol.source.ImageStatic.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageStatic.prototype,
-    'un',
-    ol.source.ImageStatic.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getAttributions',
-    ol.source.ImageVector.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getLogo',
-    ol.source.ImageVector.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getProjection',
-    ol.source.ImageVector.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getState',
-    ol.source.ImageVector.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'refresh',
-    ol.source.ImageVector.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setAttributions',
-    ol.source.ImageVector.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'get',
-    ol.source.ImageVector.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getKeys',
-    ol.source.ImageVector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getProperties',
-    ol.source.ImageVector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'set',
-    ol.source.ImageVector.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'setProperties',
-    ol.source.ImageVector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'unset',
-    ol.source.ImageVector.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'changed',
-    ol.source.ImageVector.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'dispatchEvent',
-    ol.source.ImageVector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'getRevision',
-    ol.source.ImageVector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'on',
-    ol.source.ImageVector.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'once',
-    ol.source.ImageVector.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageVector.prototype,
-    'un',
-    ol.source.ImageVector.prototype.un);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getAttributions',
-    ol.source.ImageWMS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getLogo',
-    ol.source.ImageWMS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getProjection',
-    ol.source.ImageWMS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getState',
-    ol.source.ImageWMS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'refresh',
-    ol.source.ImageWMS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setAttributions',
-    ol.source.ImageWMS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'get',
-    ol.source.ImageWMS.prototype.get);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getKeys',
-    ol.source.ImageWMS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getProperties',
-    ol.source.ImageWMS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'set',
-    ol.source.ImageWMS.prototype.set);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'setProperties',
-    ol.source.ImageWMS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'unset',
-    ol.source.ImageWMS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'changed',
-    ol.source.ImageWMS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'dispatchEvent',
-    ol.source.ImageWMS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'getRevision',
-    ol.source.ImageWMS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'on',
-    ol.source.ImageWMS.prototype.on);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'once',
-    ol.source.ImageWMS.prototype.once);
-
-goog.exportProperty(
-    ol.source.ImageWMS.prototype,
-    'un',
-    ol.source.ImageWMS.prototype.un);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.OSM.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileGridForProjection',
-    ol.source.OSM.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileLoadFunction',
-    ol.source.OSM.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileUrlFunction',
-    ol.source.OSM.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getUrls',
-    ol.source.OSM.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileLoadFunction',
-    ol.source.OSM.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setTileUrlFunction',
-    ol.source.OSM.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setUrl',
-    ol.source.OSM.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setUrls',
-    ol.source.OSM.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getTileGrid',
-    ol.source.OSM.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'refresh',
-    ol.source.OSM.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getAttributions',
-    ol.source.OSM.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getLogo',
-    ol.source.OSM.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getProjection',
-    ol.source.OSM.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getState',
-    ol.source.OSM.prototype.getState);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setAttributions',
-    ol.source.OSM.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'get',
-    ol.source.OSM.prototype.get);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getKeys',
-    ol.source.OSM.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getProperties',
-    ol.source.OSM.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'set',
-    ol.source.OSM.prototype.set);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'setProperties',
-    ol.source.OSM.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'unset',
-    ol.source.OSM.prototype.unset);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'changed',
-    ol.source.OSM.prototype.changed);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'dispatchEvent',
-    ol.source.OSM.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'getRevision',
-    ol.source.OSM.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'on',
-    ol.source.OSM.prototype.on);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'once',
-    ol.source.OSM.prototype.once);
-
-goog.exportProperty(
-    ol.source.OSM.prototype,
-    'un',
-    ol.source.OSM.prototype.un);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getAttributions',
-    ol.source.Raster.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getLogo',
-    ol.source.Raster.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getProjection',
-    ol.source.Raster.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getState',
-    ol.source.Raster.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'refresh',
-    ol.source.Raster.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setAttributions',
-    ol.source.Raster.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'get',
-    ol.source.Raster.prototype.get);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getKeys',
-    ol.source.Raster.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getProperties',
-    ol.source.Raster.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'set',
-    ol.source.Raster.prototype.set);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'setProperties',
-    ol.source.Raster.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'unset',
-    ol.source.Raster.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'changed',
-    ol.source.Raster.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'dispatchEvent',
-    ol.source.Raster.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'getRevision',
-    ol.source.Raster.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'on',
-    ol.source.Raster.prototype.on);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'once',
-    ol.source.Raster.prototype.once);
-
-goog.exportProperty(
-    ol.source.Raster.prototype,
-    'un',
-    ol.source.Raster.prototype.un);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'type',
-    ol.source.Raster.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'target',
-    ol.source.Raster.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'preventDefault',
-    ol.source.Raster.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Raster.Event.prototype,
-    'stopPropagation',
-    ol.source.Raster.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.Stamen.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileGridForProjection',
-    ol.source.Stamen.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileLoadFunction',
-    ol.source.Stamen.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileUrlFunction',
-    ol.source.Stamen.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getUrls',
-    ol.source.Stamen.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileLoadFunction',
-    ol.source.Stamen.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setTileUrlFunction',
-    ol.source.Stamen.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setUrl',
-    ol.source.Stamen.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setUrls',
-    ol.source.Stamen.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getTileGrid',
-    ol.source.Stamen.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'refresh',
-    ol.source.Stamen.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getAttributions',
-    ol.source.Stamen.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getLogo',
-    ol.source.Stamen.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getProjection',
-    ol.source.Stamen.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getState',
-    ol.source.Stamen.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setAttributions',
-    ol.source.Stamen.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'get',
-    ol.source.Stamen.prototype.get);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getKeys',
-    ol.source.Stamen.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getProperties',
-    ol.source.Stamen.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'set',
-    ol.source.Stamen.prototype.set);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'setProperties',
-    ol.source.Stamen.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'unset',
-    ol.source.Stamen.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'changed',
-    ol.source.Stamen.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'dispatchEvent',
-    ol.source.Stamen.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'getRevision',
-    ol.source.Stamen.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'on',
-    ol.source.Stamen.prototype.on);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'once',
-    ol.source.Stamen.prototype.once);
-
-goog.exportProperty(
-    ol.source.Stamen.prototype,
-    'un',
-    ol.source.Stamen.prototype.un);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'type',
-    ol.source.Tile.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'target',
-    ol.source.Tile.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'preventDefault',
-    ol.source.Tile.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Tile.Event.prototype,
-    'stopPropagation',
-    ol.source.Tile.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileArcGISRest.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileGridForProjection',
-    ol.source.TileArcGISRest.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileLoadFunction',
-    ol.source.TileArcGISRest.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileUrlFunction',
-    ol.source.TileArcGISRest.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getUrls',
-    ol.source.TileArcGISRest.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileLoadFunction',
-    ol.source.TileArcGISRest.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setTileUrlFunction',
-    ol.source.TileArcGISRest.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setUrl',
-    ol.source.TileArcGISRest.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setUrls',
-    ol.source.TileArcGISRest.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getTileGrid',
-    ol.source.TileArcGISRest.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'refresh',
-    ol.source.TileArcGISRest.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getAttributions',
-    ol.source.TileArcGISRest.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getLogo',
-    ol.source.TileArcGISRest.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getProjection',
-    ol.source.TileArcGISRest.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getState',
-    ol.source.TileArcGISRest.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setAttributions',
-    ol.source.TileArcGISRest.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'get',
-    ol.source.TileArcGISRest.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getKeys',
-    ol.source.TileArcGISRest.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getProperties',
-    ol.source.TileArcGISRest.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'set',
-    ol.source.TileArcGISRest.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'setProperties',
-    ol.source.TileArcGISRest.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'unset',
-    ol.source.TileArcGISRest.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'changed',
-    ol.source.TileArcGISRest.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'dispatchEvent',
-    ol.source.TileArcGISRest.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'getRevision',
-    ol.source.TileArcGISRest.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'on',
-    ol.source.TileArcGISRest.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'once',
-    ol.source.TileArcGISRest.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileArcGISRest.prototype,
-    'un',
-    ol.source.TileArcGISRest.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getTileGrid',
-    ol.source.TileDebug.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'refresh',
-    ol.source.TileDebug.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getAttributions',
-    ol.source.TileDebug.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getLogo',
-    ol.source.TileDebug.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getProjection',
-    ol.source.TileDebug.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getState',
-    ol.source.TileDebug.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'setAttributions',
-    ol.source.TileDebug.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'get',
-    ol.source.TileDebug.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getKeys',
-    ol.source.TileDebug.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getProperties',
-    ol.source.TileDebug.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'set',
-    ol.source.TileDebug.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'setProperties',
-    ol.source.TileDebug.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'unset',
-    ol.source.TileDebug.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'changed',
-    ol.source.TileDebug.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'dispatchEvent',
-    ol.source.TileDebug.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'getRevision',
-    ol.source.TileDebug.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'on',
-    ol.source.TileDebug.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'once',
-    ol.source.TileDebug.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileDebug.prototype,
-    'un',
-    ol.source.TileDebug.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileJSON.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileGridForProjection',
-    ol.source.TileJSON.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileLoadFunction',
-    ol.source.TileJSON.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileUrlFunction',
-    ol.source.TileJSON.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getUrls',
-    ol.source.TileJSON.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileLoadFunction',
-    ol.source.TileJSON.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setTileUrlFunction',
-    ol.source.TileJSON.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setUrl',
-    ol.source.TileJSON.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setUrls',
-    ol.source.TileJSON.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getTileGrid',
-    ol.source.TileJSON.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'refresh',
-    ol.source.TileJSON.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getAttributions',
-    ol.source.TileJSON.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getLogo',
-    ol.source.TileJSON.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getProjection',
-    ol.source.TileJSON.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getState',
-    ol.source.TileJSON.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setAttributions',
-    ol.source.TileJSON.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'get',
-    ol.source.TileJSON.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getKeys',
-    ol.source.TileJSON.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getProperties',
-    ol.source.TileJSON.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'set',
-    ol.source.TileJSON.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'setProperties',
-    ol.source.TileJSON.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'unset',
-    ol.source.TileJSON.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'changed',
-    ol.source.TileJSON.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'dispatchEvent',
-    ol.source.TileJSON.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'getRevision',
-    ol.source.TileJSON.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'on',
-    ol.source.TileJSON.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'once',
-    ol.source.TileJSON.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileJSON.prototype,
-    'un',
-    ol.source.TileJSON.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getTileGrid',
-    ol.source.TileUTFGrid.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'refresh',
-    ol.source.TileUTFGrid.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getAttributions',
-    ol.source.TileUTFGrid.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getLogo',
-    ol.source.TileUTFGrid.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getProjection',
-    ol.source.TileUTFGrid.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getState',
-    ol.source.TileUTFGrid.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'setAttributions',
-    ol.source.TileUTFGrid.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'get',
-    ol.source.TileUTFGrid.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getKeys',
-    ol.source.TileUTFGrid.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getProperties',
-    ol.source.TileUTFGrid.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'set',
-    ol.source.TileUTFGrid.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'setProperties',
-    ol.source.TileUTFGrid.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'unset',
-    ol.source.TileUTFGrid.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'changed',
-    ol.source.TileUTFGrid.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'dispatchEvent',
-    ol.source.TileUTFGrid.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'getRevision',
-    ol.source.TileUTFGrid.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'on',
-    ol.source.TileUTFGrid.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'once',
-    ol.source.TileUTFGrid.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileUTFGrid.prototype,
-    'un',
-    ol.source.TileUTFGrid.prototype.un);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.TileWMS.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileGridForProjection',
-    ol.source.TileWMS.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileLoadFunction',
-    ol.source.TileWMS.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileUrlFunction',
-    ol.source.TileWMS.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getUrls',
-    ol.source.TileWMS.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileLoadFunction',
-    ol.source.TileWMS.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setTileUrlFunction',
-    ol.source.TileWMS.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setUrl',
-    ol.source.TileWMS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setUrls',
-    ol.source.TileWMS.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getTileGrid',
-    ol.source.TileWMS.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'refresh',
-    ol.source.TileWMS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getAttributions',
-    ol.source.TileWMS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getLogo',
-    ol.source.TileWMS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getProjection',
-    ol.source.TileWMS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getState',
-    ol.source.TileWMS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setAttributions',
-    ol.source.TileWMS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'get',
-    ol.source.TileWMS.prototype.get);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getKeys',
-    ol.source.TileWMS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getProperties',
-    ol.source.TileWMS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'set',
-    ol.source.TileWMS.prototype.set);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'setProperties',
-    ol.source.TileWMS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'unset',
-    ol.source.TileWMS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'changed',
-    ol.source.TileWMS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'dispatchEvent',
-    ol.source.TileWMS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'getRevision',
-    ol.source.TileWMS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'on',
-    ol.source.TileWMS.prototype.on);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'once',
-    ol.source.TileWMS.prototype.once);
-
-goog.exportProperty(
-    ol.source.TileWMS.prototype,
-    'un',
-    ol.source.TileWMS.prototype.un);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'type',
-    ol.source.Vector.Event.prototype.type);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'target',
-    ol.source.Vector.Event.prototype.target);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'preventDefault',
-    ol.source.Vector.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.source.Vector.Event.prototype,
-    'stopPropagation',
-    ol.source.Vector.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileLoadFunction',
-    ol.source.VectorTile.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileUrlFunction',
-    ol.source.VectorTile.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getUrls',
-    ol.source.VectorTile.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setTileLoadFunction',
-    ol.source.VectorTile.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setTileUrlFunction',
-    ol.source.VectorTile.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setUrl',
-    ol.source.VectorTile.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setUrls',
-    ol.source.VectorTile.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getTileGrid',
-    ol.source.VectorTile.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'refresh',
-    ol.source.VectorTile.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getAttributions',
-    ol.source.VectorTile.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getLogo',
-    ol.source.VectorTile.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getProjection',
-    ol.source.VectorTile.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getState',
-    ol.source.VectorTile.prototype.getState);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setAttributions',
-    ol.source.VectorTile.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'get',
-    ol.source.VectorTile.prototype.get);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getKeys',
-    ol.source.VectorTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getProperties',
-    ol.source.VectorTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'set',
-    ol.source.VectorTile.prototype.set);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'setProperties',
-    ol.source.VectorTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'unset',
-    ol.source.VectorTile.prototype.unset);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'changed',
-    ol.source.VectorTile.prototype.changed);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'dispatchEvent',
-    ol.source.VectorTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'getRevision',
-    ol.source.VectorTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'on',
-    ol.source.VectorTile.prototype.on);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'once',
-    ol.source.VectorTile.prototype.once);
-
-goog.exportProperty(
-    ol.source.VectorTile.prototype,
-    'un',
-    ol.source.VectorTile.prototype.un);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.WMTS.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileGridForProjection',
-    ol.source.WMTS.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileLoadFunction',
-    ol.source.WMTS.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileUrlFunction',
-    ol.source.WMTS.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getUrls',
-    ol.source.WMTS.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileLoadFunction',
-    ol.source.WMTS.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setTileUrlFunction',
-    ol.source.WMTS.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setUrl',
-    ol.source.WMTS.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setUrls',
-    ol.source.WMTS.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getTileGrid',
-    ol.source.WMTS.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'refresh',
-    ol.source.WMTS.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getAttributions',
-    ol.source.WMTS.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getLogo',
-    ol.source.WMTS.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getProjection',
-    ol.source.WMTS.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getState',
-    ol.source.WMTS.prototype.getState);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setAttributions',
-    ol.source.WMTS.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'get',
-    ol.source.WMTS.prototype.get);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getKeys',
-    ol.source.WMTS.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getProperties',
-    ol.source.WMTS.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'set',
-    ol.source.WMTS.prototype.set);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'setProperties',
-    ol.source.WMTS.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'unset',
-    ol.source.WMTS.prototype.unset);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'changed',
-    ol.source.WMTS.prototype.changed);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'dispatchEvent',
-    ol.source.WMTS.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'getRevision',
-    ol.source.WMTS.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'on',
-    ol.source.WMTS.prototype.on);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'once',
-    ol.source.WMTS.prototype.once);
-
-goog.exportProperty(
-    ol.source.WMTS.prototype,
-    'un',
-    ol.source.WMTS.prototype.un);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setRenderReprojectionEdges',
-    ol.source.Zoomify.prototype.setRenderReprojectionEdges);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileGridForProjection',
-    ol.source.Zoomify.prototype.setTileGridForProjection);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileLoadFunction',
-    ol.source.Zoomify.prototype.getTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileUrlFunction',
-    ol.source.Zoomify.prototype.getTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getUrls',
-    ol.source.Zoomify.prototype.getUrls);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileLoadFunction',
-    ol.source.Zoomify.prototype.setTileLoadFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setTileUrlFunction',
-    ol.source.Zoomify.prototype.setTileUrlFunction);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setUrl',
-    ol.source.Zoomify.prototype.setUrl);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setUrls',
-    ol.source.Zoomify.prototype.setUrls);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getTileGrid',
-    ol.source.Zoomify.prototype.getTileGrid);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'refresh',
-    ol.source.Zoomify.prototype.refresh);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getAttributions',
-    ol.source.Zoomify.prototype.getAttributions);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getLogo',
-    ol.source.Zoomify.prototype.getLogo);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getProjection',
-    ol.source.Zoomify.prototype.getProjection);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getState',
-    ol.source.Zoomify.prototype.getState);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setAttributions',
-    ol.source.Zoomify.prototype.setAttributions);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'get',
-    ol.source.Zoomify.prototype.get);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getKeys',
-    ol.source.Zoomify.prototype.getKeys);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getProperties',
-    ol.source.Zoomify.prototype.getProperties);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'set',
-    ol.source.Zoomify.prototype.set);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'setProperties',
-    ol.source.Zoomify.prototype.setProperties);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'unset',
-    ol.source.Zoomify.prototype.unset);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'changed',
-    ol.source.Zoomify.prototype.changed);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'dispatchEvent',
-    ol.source.Zoomify.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'getRevision',
-    ol.source.Zoomify.prototype.getRevision);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'on',
-    ol.source.Zoomify.prototype.on);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'once',
-    ol.source.Zoomify.prototype.once);
-
-goog.exportProperty(
-    ol.source.Zoomify.prototype,
-    'un',
-    ol.source.Zoomify.prototype.un);
-
-goog.exportProperty(
-    ol.reproj.Tile.prototype,
-    'getTileCoord',
-    ol.reproj.Tile.prototype.getTileCoord);
-
-goog.exportProperty(
-    ol.reproj.Tile.prototype,
-    'load',
-    ol.reproj.Tile.prototype.load);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'changed',
-    ol.renderer.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'getRevision',
-    ol.renderer.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'on',
-    ol.renderer.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'once',
-    ol.renderer.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.Layer.prototype,
-    'un',
-    ol.renderer.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'changed',
-    ol.renderer.webgl.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'getRevision',
-    ol.renderer.webgl.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'on',
-    ol.renderer.webgl.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'once',
-    ol.renderer.webgl.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.Layer.prototype,
-    'un',
-    ol.renderer.webgl.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'changed',
-    ol.renderer.webgl.ImageLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.ImageLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.ImageLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'on',
-    ol.renderer.webgl.ImageLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'once',
-    ol.renderer.webgl.ImageLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.ImageLayer.prototype,
-    'un',
-    ol.renderer.webgl.ImageLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'changed',
-    ol.renderer.webgl.TileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.TileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.TileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'on',
-    ol.renderer.webgl.TileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'once',
-    ol.renderer.webgl.TileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.TileLayer.prototype,
-    'un',
-    ol.renderer.webgl.TileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'changed',
-    ol.renderer.webgl.VectorLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.webgl.VectorLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'getRevision',
-    ol.renderer.webgl.VectorLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'on',
-    ol.renderer.webgl.VectorLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'once',
-    ol.renderer.webgl.VectorLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.webgl.VectorLayer.prototype,
-    'un',
-    ol.renderer.webgl.VectorLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'changed',
-    ol.renderer.canvas.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'getRevision',
-    ol.renderer.canvas.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'on',
-    ol.renderer.canvas.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'once',
-    ol.renderer.canvas.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.Layer.prototype,
-    'un',
-    ol.renderer.canvas.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'changed',
-    ol.renderer.canvas.IntermediateCanvas.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.IntermediateCanvas.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'getRevision',
-    ol.renderer.canvas.IntermediateCanvas.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'on',
-    ol.renderer.canvas.IntermediateCanvas.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'once',
-    ol.renderer.canvas.IntermediateCanvas.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.IntermediateCanvas.prototype,
-    'un',
-    ol.renderer.canvas.IntermediateCanvas.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'changed',
-    ol.renderer.canvas.ImageLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.ImageLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.ImageLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'on',
-    ol.renderer.canvas.ImageLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'once',
-    ol.renderer.canvas.ImageLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.ImageLayer.prototype,
-    'un',
-    ol.renderer.canvas.ImageLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'changed',
-    ol.renderer.canvas.TileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.TileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.TileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'on',
-    ol.renderer.canvas.TileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'once',
-    ol.renderer.canvas.TileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.TileLayer.prototype,
-    'un',
-    ol.renderer.canvas.TileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'changed',
-    ol.renderer.canvas.VectorLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.VectorLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.VectorLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'on',
-    ol.renderer.canvas.VectorLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'once',
-    ol.renderer.canvas.VectorLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorLayer.prototype,
-    'un',
-    ol.renderer.canvas.VectorLayer.prototype.un);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'changed',
-    ol.renderer.canvas.VectorTileLayer.prototype.changed);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'dispatchEvent',
-    ol.renderer.canvas.VectorTileLayer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'getRevision',
-    ol.renderer.canvas.VectorTileLayer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'on',
-    ol.renderer.canvas.VectorTileLayer.prototype.on);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'once',
-    ol.renderer.canvas.VectorTileLayer.prototype.once);
-
-goog.exportProperty(
-    ol.renderer.canvas.VectorTileLayer.prototype,
-    'un',
-    ol.renderer.canvas.VectorTileLayer.prototype.un);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'type',
-    ol.render.Event.prototype.type);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'target',
-    ol.render.Event.prototype.target);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'preventDefault',
-    ol.render.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.render.Event.prototype,
-    'stopPropagation',
-    ol.render.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'type',
-    ol.pointer.PointerEvent.prototype.type);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'target',
-    ol.pointer.PointerEvent.prototype.target);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'preventDefault',
-    ol.pointer.PointerEvent.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.pointer.PointerEvent.prototype,
-    'stopPropagation',
-    ol.pointer.PointerEvent.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'get',
-    ol.layer.Base.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getKeys',
-    ol.layer.Base.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getProperties',
-    ol.layer.Base.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'set',
-    ol.layer.Base.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'setProperties',
-    ol.layer.Base.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'unset',
-    ol.layer.Base.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'changed',
-    ol.layer.Base.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'dispatchEvent',
-    ol.layer.Base.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'getRevision',
-    ol.layer.Base.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'on',
-    ol.layer.Base.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'once',
-    ol.layer.Base.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Base.prototype,
-    'un',
-    ol.layer.Base.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getExtent',
-    ol.layer.Group.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getMaxResolution',
-    ol.layer.Group.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getMinResolution',
-    ol.layer.Group.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getOpacity',
-    ol.layer.Group.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getVisible',
-    ol.layer.Group.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getZIndex',
-    ol.layer.Group.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setExtent',
-    ol.layer.Group.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setMaxResolution',
-    ol.layer.Group.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setMinResolution',
-    ol.layer.Group.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setOpacity',
-    ol.layer.Group.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setVisible',
-    ol.layer.Group.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setZIndex',
-    ol.layer.Group.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'get',
-    ol.layer.Group.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getKeys',
-    ol.layer.Group.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getProperties',
-    ol.layer.Group.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'set',
-    ol.layer.Group.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'setProperties',
-    ol.layer.Group.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'unset',
-    ol.layer.Group.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'changed',
-    ol.layer.Group.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'dispatchEvent',
-    ol.layer.Group.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'getRevision',
-    ol.layer.Group.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'on',
-    ol.layer.Group.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'once',
-    ol.layer.Group.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Group.prototype,
-    'un',
-    ol.layer.Group.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getExtent',
-    ol.layer.Layer.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getMaxResolution',
-    ol.layer.Layer.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getMinResolution',
-    ol.layer.Layer.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getOpacity',
-    ol.layer.Layer.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getVisible',
-    ol.layer.Layer.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getZIndex',
-    ol.layer.Layer.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setExtent',
-    ol.layer.Layer.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMaxResolution',
-    ol.layer.Layer.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setMinResolution',
-    ol.layer.Layer.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setOpacity',
-    ol.layer.Layer.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setVisible',
-    ol.layer.Layer.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setZIndex',
-    ol.layer.Layer.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'get',
-    ol.layer.Layer.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getKeys',
-    ol.layer.Layer.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getProperties',
-    ol.layer.Layer.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'set',
-    ol.layer.Layer.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'setProperties',
-    ol.layer.Layer.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'unset',
-    ol.layer.Layer.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'changed',
-    ol.layer.Layer.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'dispatchEvent',
-    ol.layer.Layer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'getRevision',
-    ol.layer.Layer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'on',
-    ol.layer.Layer.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'once',
-    ol.layer.Layer.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Layer.prototype,
-    'un',
-    ol.layer.Layer.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMap',
-    ol.layer.Vector.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setSource',
-    ol.layer.Vector.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getExtent',
-    ol.layer.Vector.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getMaxResolution',
-    ol.layer.Vector.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getMinResolution',
-    ol.layer.Vector.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getOpacity',
-    ol.layer.Vector.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getVisible',
-    ol.layer.Vector.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getZIndex',
-    ol.layer.Vector.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setExtent',
-    ol.layer.Vector.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMaxResolution',
-    ol.layer.Vector.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setMinResolution',
-    ol.layer.Vector.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setOpacity',
-    ol.layer.Vector.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setVisible',
-    ol.layer.Vector.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setZIndex',
-    ol.layer.Vector.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'get',
-    ol.layer.Vector.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getKeys',
-    ol.layer.Vector.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getProperties',
-    ol.layer.Vector.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'set',
-    ol.layer.Vector.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'setProperties',
-    ol.layer.Vector.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'unset',
-    ol.layer.Vector.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'changed',
-    ol.layer.Vector.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'dispatchEvent',
-    ol.layer.Vector.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'getRevision',
-    ol.layer.Vector.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'on',
-    ol.layer.Vector.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'once',
-    ol.layer.Vector.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Vector.prototype,
-    'un',
-    ol.layer.Vector.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getSource',
-    ol.layer.Heatmap.prototype.getSource);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getStyle',
-    ol.layer.Heatmap.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getStyleFunction',
-    ol.layer.Heatmap.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setStyle',
-    ol.layer.Heatmap.prototype.setStyle);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMap',
-    ol.layer.Heatmap.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setSource',
-    ol.layer.Heatmap.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getExtent',
-    ol.layer.Heatmap.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getMaxResolution',
-    ol.layer.Heatmap.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getMinResolution',
-    ol.layer.Heatmap.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getOpacity',
-    ol.layer.Heatmap.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getVisible',
-    ol.layer.Heatmap.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getZIndex',
-    ol.layer.Heatmap.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setExtent',
-    ol.layer.Heatmap.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMaxResolution',
-    ol.layer.Heatmap.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setMinResolution',
-    ol.layer.Heatmap.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setOpacity',
-    ol.layer.Heatmap.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setVisible',
-    ol.layer.Heatmap.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setZIndex',
-    ol.layer.Heatmap.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'get',
-    ol.layer.Heatmap.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getKeys',
-    ol.layer.Heatmap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getProperties',
-    ol.layer.Heatmap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'set',
-    ol.layer.Heatmap.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'setProperties',
-    ol.layer.Heatmap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'unset',
-    ol.layer.Heatmap.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'changed',
-    ol.layer.Heatmap.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'dispatchEvent',
-    ol.layer.Heatmap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'getRevision',
-    ol.layer.Heatmap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'on',
-    ol.layer.Heatmap.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'once',
-    ol.layer.Heatmap.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Heatmap.prototype,
-    'un',
-    ol.layer.Heatmap.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMap',
-    ol.layer.Image.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setSource',
-    ol.layer.Image.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getExtent',
-    ol.layer.Image.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getMaxResolution',
-    ol.layer.Image.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getMinResolution',
-    ol.layer.Image.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getOpacity',
-    ol.layer.Image.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getVisible',
-    ol.layer.Image.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getZIndex',
-    ol.layer.Image.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setExtent',
-    ol.layer.Image.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMaxResolution',
-    ol.layer.Image.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setMinResolution',
-    ol.layer.Image.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setOpacity',
-    ol.layer.Image.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setVisible',
-    ol.layer.Image.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setZIndex',
-    ol.layer.Image.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'get',
-    ol.layer.Image.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getKeys',
-    ol.layer.Image.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getProperties',
-    ol.layer.Image.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'set',
-    ol.layer.Image.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'setProperties',
-    ol.layer.Image.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'unset',
-    ol.layer.Image.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'changed',
-    ol.layer.Image.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'dispatchEvent',
-    ol.layer.Image.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'getRevision',
-    ol.layer.Image.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'on',
-    ol.layer.Image.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'once',
-    ol.layer.Image.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Image.prototype,
-    'un',
-    ol.layer.Image.prototype.un);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMap',
-    ol.layer.Tile.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setSource',
-    ol.layer.Tile.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getExtent',
-    ol.layer.Tile.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getMaxResolution',
-    ol.layer.Tile.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getMinResolution',
-    ol.layer.Tile.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getOpacity',
-    ol.layer.Tile.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getVisible',
-    ol.layer.Tile.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getZIndex',
-    ol.layer.Tile.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setExtent',
-    ol.layer.Tile.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMaxResolution',
-    ol.layer.Tile.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setMinResolution',
-    ol.layer.Tile.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setOpacity',
-    ol.layer.Tile.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setVisible',
-    ol.layer.Tile.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setZIndex',
-    ol.layer.Tile.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'get',
-    ol.layer.Tile.prototype.get);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getKeys',
-    ol.layer.Tile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getProperties',
-    ol.layer.Tile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'set',
-    ol.layer.Tile.prototype.set);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'setProperties',
-    ol.layer.Tile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'unset',
-    ol.layer.Tile.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'changed',
-    ol.layer.Tile.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'dispatchEvent',
-    ol.layer.Tile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'getRevision',
-    ol.layer.Tile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'on',
-    ol.layer.Tile.prototype.on);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'once',
-    ol.layer.Tile.prototype.once);
-
-goog.exportProperty(
-    ol.layer.Tile.prototype,
-    'un',
-    ol.layer.Tile.prototype.un);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getStyle',
-    ol.layer.VectorTile.prototype.getStyle);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getStyleFunction',
-    ol.layer.VectorTile.prototype.getStyleFunction);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setStyle',
-    ol.layer.VectorTile.prototype.setStyle);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMap',
-    ol.layer.VectorTile.prototype.setMap);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setSource',
-    ol.layer.VectorTile.prototype.setSource);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getExtent',
-    ol.layer.VectorTile.prototype.getExtent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getMaxResolution',
-    ol.layer.VectorTile.prototype.getMaxResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getMinResolution',
-    ol.layer.VectorTile.prototype.getMinResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getOpacity',
-    ol.layer.VectorTile.prototype.getOpacity);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getVisible',
-    ol.layer.VectorTile.prototype.getVisible);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getZIndex',
-    ol.layer.VectorTile.prototype.getZIndex);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setExtent',
-    ol.layer.VectorTile.prototype.setExtent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMaxResolution',
-    ol.layer.VectorTile.prototype.setMaxResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setMinResolution',
-    ol.layer.VectorTile.prototype.setMinResolution);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setOpacity',
-    ol.layer.VectorTile.prototype.setOpacity);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setVisible',
-    ol.layer.VectorTile.prototype.setVisible);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setZIndex',
-    ol.layer.VectorTile.prototype.setZIndex);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'get',
-    ol.layer.VectorTile.prototype.get);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getKeys',
-    ol.layer.VectorTile.prototype.getKeys);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getProperties',
-    ol.layer.VectorTile.prototype.getProperties);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'set',
-    ol.layer.VectorTile.prototype.set);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'setProperties',
-    ol.layer.VectorTile.prototype.setProperties);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'unset',
-    ol.layer.VectorTile.prototype.unset);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'changed',
-    ol.layer.VectorTile.prototype.changed);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'dispatchEvent',
-    ol.layer.VectorTile.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'getRevision',
-    ol.layer.VectorTile.prototype.getRevision);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'on',
-    ol.layer.VectorTile.prototype.on);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'once',
-    ol.layer.VectorTile.prototype.once);
-
-goog.exportProperty(
-    ol.layer.VectorTile.prototype,
-    'un',
-    ol.layer.VectorTile.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'get',
-    ol.interaction.Interaction.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getKeys',
-    ol.interaction.Interaction.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getProperties',
-    ol.interaction.Interaction.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'set',
-    ol.interaction.Interaction.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'setProperties',
-    ol.interaction.Interaction.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'unset',
-    ol.interaction.Interaction.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'changed',
-    ol.interaction.Interaction.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'dispatchEvent',
-    ol.interaction.Interaction.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'getRevision',
-    ol.interaction.Interaction.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'on',
-    ol.interaction.Interaction.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'once',
-    ol.interaction.Interaction.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Interaction.prototype,
-    'un',
-    ol.interaction.Interaction.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getActive',
-    ol.interaction.DoubleClickZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getMap',
-    ol.interaction.DoubleClickZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'setActive',
-    ol.interaction.DoubleClickZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'get',
-    ol.interaction.DoubleClickZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getKeys',
-    ol.interaction.DoubleClickZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getProperties',
-    ol.interaction.DoubleClickZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'set',
-    ol.interaction.DoubleClickZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'setProperties',
-    ol.interaction.DoubleClickZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'unset',
-    ol.interaction.DoubleClickZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'changed',
-    ol.interaction.DoubleClickZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DoubleClickZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'getRevision',
-    ol.interaction.DoubleClickZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'on',
-    ol.interaction.DoubleClickZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'once',
-    ol.interaction.DoubleClickZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DoubleClickZoom.prototype,
-    'un',
-    ol.interaction.DoubleClickZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getActive',
-    ol.interaction.DragAndDrop.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getMap',
-    ol.interaction.DragAndDrop.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'setActive',
-    ol.interaction.DragAndDrop.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'get',
-    ol.interaction.DragAndDrop.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getKeys',
-    ol.interaction.DragAndDrop.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getProperties',
-    ol.interaction.DragAndDrop.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'set',
-    ol.interaction.DragAndDrop.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'setProperties',
-    ol.interaction.DragAndDrop.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'unset',
-    ol.interaction.DragAndDrop.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'changed',
-    ol.interaction.DragAndDrop.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'dispatchEvent',
-    ol.interaction.DragAndDrop.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'getRevision',
-    ol.interaction.DragAndDrop.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'on',
-    ol.interaction.DragAndDrop.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'once',
-    ol.interaction.DragAndDrop.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.prototype,
-    'un',
-    ol.interaction.DragAndDrop.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'type',
-    ol.interaction.DragAndDrop.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'target',
-    ol.interaction.DragAndDrop.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'preventDefault',
-    ol.interaction.DragAndDrop.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.DragAndDrop.Event.prototype,
-    'stopPropagation',
-    ol.interaction.DragAndDrop.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getActive',
-    ol.interaction.Pointer.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getMap',
-    ol.interaction.Pointer.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'setActive',
-    ol.interaction.Pointer.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'get',
-    ol.interaction.Pointer.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getKeys',
-    ol.interaction.Pointer.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getProperties',
-    ol.interaction.Pointer.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'set',
-    ol.interaction.Pointer.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'setProperties',
-    ol.interaction.Pointer.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'unset',
-    ol.interaction.Pointer.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'changed',
-    ol.interaction.Pointer.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'dispatchEvent',
-    ol.interaction.Pointer.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'getRevision',
-    ol.interaction.Pointer.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'on',
-    ol.interaction.Pointer.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'once',
-    ol.interaction.Pointer.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Pointer.prototype,
-    'un',
-    ol.interaction.Pointer.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getActive',
-    ol.interaction.DragBox.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getMap',
-    ol.interaction.DragBox.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'setActive',
-    ol.interaction.DragBox.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'get',
-    ol.interaction.DragBox.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getKeys',
-    ol.interaction.DragBox.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getProperties',
-    ol.interaction.DragBox.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'set',
-    ol.interaction.DragBox.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'setProperties',
-    ol.interaction.DragBox.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'unset',
-    ol.interaction.DragBox.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'changed',
-    ol.interaction.DragBox.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'dispatchEvent',
-    ol.interaction.DragBox.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'getRevision',
-    ol.interaction.DragBox.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'on',
-    ol.interaction.DragBox.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'once',
-    ol.interaction.DragBox.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragBox.prototype,
-    'un',
-    ol.interaction.DragBox.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'type',
-    ol.interaction.DragBox.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'target',
-    ol.interaction.DragBox.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'preventDefault',
-    ol.interaction.DragBox.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.DragBox.Event.prototype,
-    'stopPropagation',
-    ol.interaction.DragBox.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getActive',
-    ol.interaction.DragPan.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getMap',
-    ol.interaction.DragPan.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'setActive',
-    ol.interaction.DragPan.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'get',
-    ol.interaction.DragPan.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getKeys',
-    ol.interaction.DragPan.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getProperties',
-    ol.interaction.DragPan.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'set',
-    ol.interaction.DragPan.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'setProperties',
-    ol.interaction.DragPan.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'unset',
-    ol.interaction.DragPan.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'changed',
-    ol.interaction.DragPan.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'dispatchEvent',
-    ol.interaction.DragPan.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'getRevision',
-    ol.interaction.DragPan.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'on',
-    ol.interaction.DragPan.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'once',
-    ol.interaction.DragPan.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragPan.prototype,
-    'un',
-    ol.interaction.DragPan.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getActive',
-    ol.interaction.DragRotate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getMap',
-    ol.interaction.DragRotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'setActive',
-    ol.interaction.DragRotate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'get',
-    ol.interaction.DragRotate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getKeys',
-    ol.interaction.DragRotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getProperties',
-    ol.interaction.DragRotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'set',
-    ol.interaction.DragRotate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'setProperties',
-    ol.interaction.DragRotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'unset',
-    ol.interaction.DragRotate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'changed',
-    ol.interaction.DragRotate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'dispatchEvent',
-    ol.interaction.DragRotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'getRevision',
-    ol.interaction.DragRotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'on',
-    ol.interaction.DragRotate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'once',
-    ol.interaction.DragRotate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragRotate.prototype,
-    'un',
-    ol.interaction.DragRotate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getActive',
-    ol.interaction.DragRotateAndZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getMap',
-    ol.interaction.DragRotateAndZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'setActive',
-    ol.interaction.DragRotateAndZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'get',
-    ol.interaction.DragRotateAndZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getKeys',
-    ol.interaction.DragRotateAndZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getProperties',
-    ol.interaction.DragRotateAndZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'set',
-    ol.interaction.DragRotateAndZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'setProperties',
-    ol.interaction.DragRotateAndZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'unset',
-    ol.interaction.DragRotateAndZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'changed',
-    ol.interaction.DragRotateAndZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DragRotateAndZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'getRevision',
-    ol.interaction.DragRotateAndZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'on',
-    ol.interaction.DragRotateAndZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'once',
-    ol.interaction.DragRotateAndZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragRotateAndZoom.prototype,
-    'un',
-    ol.interaction.DragRotateAndZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getGeometry',
-    ol.interaction.DragZoom.prototype.getGeometry);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getActive',
-    ol.interaction.DragZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getMap',
-    ol.interaction.DragZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'setActive',
-    ol.interaction.DragZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'get',
-    ol.interaction.DragZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getKeys',
-    ol.interaction.DragZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getProperties',
-    ol.interaction.DragZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'set',
-    ol.interaction.DragZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'setProperties',
-    ol.interaction.DragZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'unset',
-    ol.interaction.DragZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'changed',
-    ol.interaction.DragZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.DragZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'getRevision',
-    ol.interaction.DragZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'on',
-    ol.interaction.DragZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'once',
-    ol.interaction.DragZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.DragZoom.prototype,
-    'un',
-    ol.interaction.DragZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getActive',
-    ol.interaction.Draw.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getMap',
-    ol.interaction.Draw.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'setActive',
-    ol.interaction.Draw.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'get',
-    ol.interaction.Draw.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getKeys',
-    ol.interaction.Draw.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getProperties',
-    ol.interaction.Draw.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'set',
-    ol.interaction.Draw.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'setProperties',
-    ol.interaction.Draw.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'unset',
-    ol.interaction.Draw.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'changed',
-    ol.interaction.Draw.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'dispatchEvent',
-    ol.interaction.Draw.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'getRevision',
-    ol.interaction.Draw.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'on',
-    ol.interaction.Draw.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'once',
-    ol.interaction.Draw.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Draw.prototype,
-    'un',
-    ol.interaction.Draw.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'type',
-    ol.interaction.Draw.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'target',
-    ol.interaction.Draw.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'preventDefault',
-    ol.interaction.Draw.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Draw.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Draw.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getActive',
-    ol.interaction.Extent.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getMap',
-    ol.interaction.Extent.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setActive',
-    ol.interaction.Extent.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'get',
-    ol.interaction.Extent.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getKeys',
-    ol.interaction.Extent.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getProperties',
-    ol.interaction.Extent.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'set',
-    ol.interaction.Extent.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'setProperties',
-    ol.interaction.Extent.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'unset',
-    ol.interaction.Extent.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'changed',
-    ol.interaction.Extent.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'dispatchEvent',
-    ol.interaction.Extent.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'getRevision',
-    ol.interaction.Extent.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'on',
-    ol.interaction.Extent.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'once',
-    ol.interaction.Extent.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Extent.prototype,
-    'un',
-    ol.interaction.Extent.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'type',
-    ol.interaction.Extent.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'target',
-    ol.interaction.Extent.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'preventDefault',
-    ol.interaction.Extent.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Extent.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Extent.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getActive',
-    ol.interaction.KeyboardPan.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getMap',
-    ol.interaction.KeyboardPan.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'setActive',
-    ol.interaction.KeyboardPan.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'get',
-    ol.interaction.KeyboardPan.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getKeys',
-    ol.interaction.KeyboardPan.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getProperties',
-    ol.interaction.KeyboardPan.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'set',
-    ol.interaction.KeyboardPan.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'setProperties',
-    ol.interaction.KeyboardPan.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'unset',
-    ol.interaction.KeyboardPan.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'changed',
-    ol.interaction.KeyboardPan.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'dispatchEvent',
-    ol.interaction.KeyboardPan.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'getRevision',
-    ol.interaction.KeyboardPan.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'on',
-    ol.interaction.KeyboardPan.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'once',
-    ol.interaction.KeyboardPan.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.KeyboardPan.prototype,
-    'un',
-    ol.interaction.KeyboardPan.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getActive',
-    ol.interaction.KeyboardZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getMap',
-    ol.interaction.KeyboardZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'setActive',
-    ol.interaction.KeyboardZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'get',
-    ol.interaction.KeyboardZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getKeys',
-    ol.interaction.KeyboardZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getProperties',
-    ol.interaction.KeyboardZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'set',
-    ol.interaction.KeyboardZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'setProperties',
-    ol.interaction.KeyboardZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'unset',
-    ol.interaction.KeyboardZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'changed',
-    ol.interaction.KeyboardZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.KeyboardZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'getRevision',
-    ol.interaction.KeyboardZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'on',
-    ol.interaction.KeyboardZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'once',
-    ol.interaction.KeyboardZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.KeyboardZoom.prototype,
-    'un',
-    ol.interaction.KeyboardZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getActive',
-    ol.interaction.Modify.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getMap',
-    ol.interaction.Modify.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'setActive',
-    ol.interaction.Modify.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'get',
-    ol.interaction.Modify.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getKeys',
-    ol.interaction.Modify.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getProperties',
-    ol.interaction.Modify.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'set',
-    ol.interaction.Modify.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'setProperties',
-    ol.interaction.Modify.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'unset',
-    ol.interaction.Modify.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'changed',
-    ol.interaction.Modify.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'dispatchEvent',
-    ol.interaction.Modify.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'getRevision',
-    ol.interaction.Modify.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'on',
-    ol.interaction.Modify.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'once',
-    ol.interaction.Modify.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Modify.prototype,
-    'un',
-    ol.interaction.Modify.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'type',
-    ol.interaction.Modify.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'target',
-    ol.interaction.Modify.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'preventDefault',
-    ol.interaction.Modify.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Modify.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Modify.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getActive',
-    ol.interaction.MouseWheelZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getMap',
-    ol.interaction.MouseWheelZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setActive',
-    ol.interaction.MouseWheelZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'get',
-    ol.interaction.MouseWheelZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getKeys',
-    ol.interaction.MouseWheelZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getProperties',
-    ol.interaction.MouseWheelZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'set',
-    ol.interaction.MouseWheelZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'setProperties',
-    ol.interaction.MouseWheelZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'unset',
-    ol.interaction.MouseWheelZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'changed',
-    ol.interaction.MouseWheelZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.MouseWheelZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'getRevision',
-    ol.interaction.MouseWheelZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'on',
-    ol.interaction.MouseWheelZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'once',
-    ol.interaction.MouseWheelZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.MouseWheelZoom.prototype,
-    'un',
-    ol.interaction.MouseWheelZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getActive',
-    ol.interaction.PinchRotate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getMap',
-    ol.interaction.PinchRotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'setActive',
-    ol.interaction.PinchRotate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'get',
-    ol.interaction.PinchRotate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getKeys',
-    ol.interaction.PinchRotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getProperties',
-    ol.interaction.PinchRotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'set',
-    ol.interaction.PinchRotate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'setProperties',
-    ol.interaction.PinchRotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'unset',
-    ol.interaction.PinchRotate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'changed',
-    ol.interaction.PinchRotate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'dispatchEvent',
-    ol.interaction.PinchRotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'getRevision',
-    ol.interaction.PinchRotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'on',
-    ol.interaction.PinchRotate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'once',
-    ol.interaction.PinchRotate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.PinchRotate.prototype,
-    'un',
-    ol.interaction.PinchRotate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getActive',
-    ol.interaction.PinchZoom.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getMap',
-    ol.interaction.PinchZoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'setActive',
-    ol.interaction.PinchZoom.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'get',
-    ol.interaction.PinchZoom.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getKeys',
-    ol.interaction.PinchZoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getProperties',
-    ol.interaction.PinchZoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'set',
-    ol.interaction.PinchZoom.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'setProperties',
-    ol.interaction.PinchZoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'unset',
-    ol.interaction.PinchZoom.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'changed',
-    ol.interaction.PinchZoom.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'dispatchEvent',
-    ol.interaction.PinchZoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'getRevision',
-    ol.interaction.PinchZoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'on',
-    ol.interaction.PinchZoom.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'once',
-    ol.interaction.PinchZoom.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.PinchZoom.prototype,
-    'un',
-    ol.interaction.PinchZoom.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getActive',
-    ol.interaction.Select.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getMap',
-    ol.interaction.Select.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setActive',
-    ol.interaction.Select.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'get',
-    ol.interaction.Select.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getKeys',
-    ol.interaction.Select.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getProperties',
-    ol.interaction.Select.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'set',
-    ol.interaction.Select.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'setProperties',
-    ol.interaction.Select.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'unset',
-    ol.interaction.Select.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'changed',
-    ol.interaction.Select.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'dispatchEvent',
-    ol.interaction.Select.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'getRevision',
-    ol.interaction.Select.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'on',
-    ol.interaction.Select.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'once',
-    ol.interaction.Select.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Select.prototype,
-    'un',
-    ol.interaction.Select.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'type',
-    ol.interaction.Select.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'target',
-    ol.interaction.Select.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'preventDefault',
-    ol.interaction.Select.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Select.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Select.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getActive',
-    ol.interaction.Snap.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getMap',
-    ol.interaction.Snap.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'setActive',
-    ol.interaction.Snap.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'get',
-    ol.interaction.Snap.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getKeys',
-    ol.interaction.Snap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getProperties',
-    ol.interaction.Snap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'set',
-    ol.interaction.Snap.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'setProperties',
-    ol.interaction.Snap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'unset',
-    ol.interaction.Snap.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'changed',
-    ol.interaction.Snap.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'dispatchEvent',
-    ol.interaction.Snap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'getRevision',
-    ol.interaction.Snap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'on',
-    ol.interaction.Snap.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'once',
-    ol.interaction.Snap.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Snap.prototype,
-    'un',
-    ol.interaction.Snap.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getActive',
-    ol.interaction.Translate.prototype.getActive);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getMap',
-    ol.interaction.Translate.prototype.getMap);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setActive',
-    ol.interaction.Translate.prototype.setActive);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'get',
-    ol.interaction.Translate.prototype.get);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getKeys',
-    ol.interaction.Translate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getProperties',
-    ol.interaction.Translate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'set',
-    ol.interaction.Translate.prototype.set);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'setProperties',
-    ol.interaction.Translate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'unset',
-    ol.interaction.Translate.prototype.unset);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'changed',
-    ol.interaction.Translate.prototype.changed);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'dispatchEvent',
-    ol.interaction.Translate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'getRevision',
-    ol.interaction.Translate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'on',
-    ol.interaction.Translate.prototype.on);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'once',
-    ol.interaction.Translate.prototype.once);
-
-goog.exportProperty(
-    ol.interaction.Translate.prototype,
-    'un',
-    ol.interaction.Translate.prototype.un);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'type',
-    ol.interaction.Translate.Event.prototype.type);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'target',
-    ol.interaction.Translate.Event.prototype.target);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'preventDefault',
-    ol.interaction.Translate.Event.prototype.preventDefault);
-
-goog.exportProperty(
-    ol.interaction.Translate.Event.prototype,
-    'stopPropagation',
-    ol.interaction.Translate.Event.prototype.stopPropagation);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'get',
-    ol.geom.Geometry.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getKeys',
-    ol.geom.Geometry.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getProperties',
-    ol.geom.Geometry.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'set',
-    ol.geom.Geometry.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'setProperties',
-    ol.geom.Geometry.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'unset',
-    ol.geom.Geometry.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'changed',
-    ol.geom.Geometry.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'dispatchEvent',
-    ol.geom.Geometry.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'getRevision',
-    ol.geom.Geometry.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'on',
-    ol.geom.Geometry.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'once',
-    ol.geom.Geometry.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Geometry.prototype,
-    'un',
-    ol.geom.Geometry.prototype.un);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getClosestPoint',
-    ol.geom.SimpleGeometry.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'intersectsCoordinate',
-    ol.geom.SimpleGeometry.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getExtent',
-    ol.geom.SimpleGeometry.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'rotate',
-    ol.geom.SimpleGeometry.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'scale',
-    ol.geom.SimpleGeometry.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'simplify',
-    ol.geom.SimpleGeometry.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'transform',
-    ol.geom.SimpleGeometry.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'get',
-    ol.geom.SimpleGeometry.prototype.get);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getKeys',
-    ol.geom.SimpleGeometry.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getProperties',
-    ol.geom.SimpleGeometry.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'set',
-    ol.geom.SimpleGeometry.prototype.set);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'setProperties',
-    ol.geom.SimpleGeometry.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'unset',
-    ol.geom.SimpleGeometry.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'changed',
-    ol.geom.SimpleGeometry.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'dispatchEvent',
-    ol.geom.SimpleGeometry.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'getRevision',
-    ol.geom.SimpleGeometry.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'on',
-    ol.geom.SimpleGeometry.prototype.on);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'once',
-    ol.geom.SimpleGeometry.prototype.once);
-
-goog.exportProperty(
-    ol.geom.SimpleGeometry.prototype,
-    'un',
-    ol.geom.SimpleGeometry.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getFirstCoordinate',
-    ol.geom.Circle.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getLastCoordinate',
-    ol.geom.Circle.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getLayout',
-    ol.geom.Circle.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'rotate',
-    ol.geom.Circle.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'scale',
-    ol.geom.Circle.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getClosestPoint',
-    ol.geom.Circle.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'intersectsCoordinate',
-    ol.geom.Circle.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getExtent',
-    ol.geom.Circle.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'simplify',
-    ol.geom.Circle.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'get',
-    ol.geom.Circle.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getKeys',
-    ol.geom.Circle.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getProperties',
-    ol.geom.Circle.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'set',
-    ol.geom.Circle.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'setProperties',
-    ol.geom.Circle.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'unset',
-    ol.geom.Circle.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'changed',
-    ol.geom.Circle.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'dispatchEvent',
-    ol.geom.Circle.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'getRevision',
-    ol.geom.Circle.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'on',
-    ol.geom.Circle.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'once',
-    ol.geom.Circle.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Circle.prototype,
-    'un',
-    ol.geom.Circle.prototype.un);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getClosestPoint',
-    ol.geom.GeometryCollection.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'intersectsCoordinate',
-    ol.geom.GeometryCollection.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getExtent',
-    ol.geom.GeometryCollection.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'rotate',
-    ol.geom.GeometryCollection.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'scale',
-    ol.geom.GeometryCollection.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'simplify',
-    ol.geom.GeometryCollection.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'transform',
-    ol.geom.GeometryCollection.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'get',
-    ol.geom.GeometryCollection.prototype.get);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getKeys',
-    ol.geom.GeometryCollection.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getProperties',
-    ol.geom.GeometryCollection.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'set',
-    ol.geom.GeometryCollection.prototype.set);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'setProperties',
-    ol.geom.GeometryCollection.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'unset',
-    ol.geom.GeometryCollection.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'changed',
-    ol.geom.GeometryCollection.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'dispatchEvent',
-    ol.geom.GeometryCollection.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'getRevision',
-    ol.geom.GeometryCollection.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'on',
-    ol.geom.GeometryCollection.prototype.on);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'once',
-    ol.geom.GeometryCollection.prototype.once);
-
-goog.exportProperty(
-    ol.geom.GeometryCollection.prototype,
-    'un',
-    ol.geom.GeometryCollection.prototype.un);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getFirstCoordinate',
-    ol.geom.LinearRing.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getLastCoordinate',
-    ol.geom.LinearRing.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getLayout',
-    ol.geom.LinearRing.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'rotate',
-    ol.geom.LinearRing.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'scale',
-    ol.geom.LinearRing.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getClosestPoint',
-    ol.geom.LinearRing.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'intersectsCoordinate',
-    ol.geom.LinearRing.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getExtent',
-    ol.geom.LinearRing.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'simplify',
-    ol.geom.LinearRing.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'transform',
-    ol.geom.LinearRing.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'get',
-    ol.geom.LinearRing.prototype.get);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getKeys',
-    ol.geom.LinearRing.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getProperties',
-    ol.geom.LinearRing.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'set',
-    ol.geom.LinearRing.prototype.set);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'setProperties',
-    ol.geom.LinearRing.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'unset',
-    ol.geom.LinearRing.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'changed',
-    ol.geom.LinearRing.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'dispatchEvent',
-    ol.geom.LinearRing.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'getRevision',
-    ol.geom.LinearRing.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'on',
-    ol.geom.LinearRing.prototype.on);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'once',
-    ol.geom.LinearRing.prototype.once);
-
-goog.exportProperty(
-    ol.geom.LinearRing.prototype,
-    'un',
-    ol.geom.LinearRing.prototype.un);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getFirstCoordinate',
-    ol.geom.LineString.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLastCoordinate',
-    ol.geom.LineString.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getLayout',
-    ol.geom.LineString.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'rotate',
-    ol.geom.LineString.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'scale',
-    ol.geom.LineString.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getClosestPoint',
-    ol.geom.LineString.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'intersectsCoordinate',
-    ol.geom.LineString.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getExtent',
-    ol.geom.LineString.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'simplify',
-    ol.geom.LineString.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'transform',
-    ol.geom.LineString.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'get',
-    ol.geom.LineString.prototype.get);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getKeys',
-    ol.geom.LineString.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getProperties',
-    ol.geom.LineString.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'set',
-    ol.geom.LineString.prototype.set);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'setProperties',
-    ol.geom.LineString.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'unset',
-    ol.geom.LineString.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'changed',
-    ol.geom.LineString.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'dispatchEvent',
-    ol.geom.LineString.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'getRevision',
-    ol.geom.LineString.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'on',
-    ol.geom.LineString.prototype.on);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'once',
-    ol.geom.LineString.prototype.once);
-
-goog.exportProperty(
-    ol.geom.LineString.prototype,
-    'un',
-    ol.geom.LineString.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiLineString.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiLineString.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getLayout',
-    ol.geom.MultiLineString.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'rotate',
-    ol.geom.MultiLineString.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'scale',
-    ol.geom.MultiLineString.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getClosestPoint',
-    ol.geom.MultiLineString.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiLineString.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getExtent',
-    ol.geom.MultiLineString.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'simplify',
-    ol.geom.MultiLineString.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'transform',
-    ol.geom.MultiLineString.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'get',
-    ol.geom.MultiLineString.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getKeys',
-    ol.geom.MultiLineString.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getProperties',
-    ol.geom.MultiLineString.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'set',
-    ol.geom.MultiLineString.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'setProperties',
-    ol.geom.MultiLineString.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'unset',
-    ol.geom.MultiLineString.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'changed',
-    ol.geom.MultiLineString.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'dispatchEvent',
-    ol.geom.MultiLineString.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'getRevision',
-    ol.geom.MultiLineString.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'on',
-    ol.geom.MultiLineString.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'once',
-    ol.geom.MultiLineString.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiLineString.prototype,
-    'un',
-    ol.geom.MultiLineString.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiPoint.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiPoint.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getLayout',
-    ol.geom.MultiPoint.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'rotate',
-    ol.geom.MultiPoint.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'scale',
-    ol.geom.MultiPoint.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getClosestPoint',
-    ol.geom.MultiPoint.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiPoint.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getExtent',
-    ol.geom.MultiPoint.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'simplify',
-    ol.geom.MultiPoint.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'transform',
-    ol.geom.MultiPoint.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'get',
-    ol.geom.MultiPoint.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getKeys',
-    ol.geom.MultiPoint.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getProperties',
-    ol.geom.MultiPoint.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'set',
-    ol.geom.MultiPoint.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'setProperties',
-    ol.geom.MultiPoint.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'unset',
-    ol.geom.MultiPoint.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'changed',
-    ol.geom.MultiPoint.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'dispatchEvent',
-    ol.geom.MultiPoint.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'getRevision',
-    ol.geom.MultiPoint.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'on',
-    ol.geom.MultiPoint.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'once',
-    ol.geom.MultiPoint.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiPoint.prototype,
-    'un',
-    ol.geom.MultiPoint.prototype.un);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getFirstCoordinate',
-    ol.geom.MultiPolygon.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getLastCoordinate',
-    ol.geom.MultiPolygon.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getLayout',
-    ol.geom.MultiPolygon.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'rotate',
-    ol.geom.MultiPolygon.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'scale',
-    ol.geom.MultiPolygon.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getClosestPoint',
-    ol.geom.MultiPolygon.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'intersectsCoordinate',
-    ol.geom.MultiPolygon.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getExtent',
-    ol.geom.MultiPolygon.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'simplify',
-    ol.geom.MultiPolygon.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'transform',
-    ol.geom.MultiPolygon.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'get',
-    ol.geom.MultiPolygon.prototype.get);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getKeys',
-    ol.geom.MultiPolygon.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getProperties',
-    ol.geom.MultiPolygon.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'set',
-    ol.geom.MultiPolygon.prototype.set);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'setProperties',
-    ol.geom.MultiPolygon.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'unset',
-    ol.geom.MultiPolygon.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'changed',
-    ol.geom.MultiPolygon.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'dispatchEvent',
-    ol.geom.MultiPolygon.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'getRevision',
-    ol.geom.MultiPolygon.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'on',
-    ol.geom.MultiPolygon.prototype.on);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'once',
-    ol.geom.MultiPolygon.prototype.once);
-
-goog.exportProperty(
-    ol.geom.MultiPolygon.prototype,
-    'un',
-    ol.geom.MultiPolygon.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getFirstCoordinate',
-    ol.geom.Point.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getLastCoordinate',
-    ol.geom.Point.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getLayout',
-    ol.geom.Point.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'rotate',
-    ol.geom.Point.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'scale',
-    ol.geom.Point.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getClosestPoint',
-    ol.geom.Point.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'intersectsCoordinate',
-    ol.geom.Point.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getExtent',
-    ol.geom.Point.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'simplify',
-    ol.geom.Point.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'transform',
-    ol.geom.Point.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'get',
-    ol.geom.Point.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getKeys',
-    ol.geom.Point.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getProperties',
-    ol.geom.Point.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'set',
-    ol.geom.Point.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'setProperties',
-    ol.geom.Point.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'unset',
-    ol.geom.Point.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'changed',
-    ol.geom.Point.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'dispatchEvent',
-    ol.geom.Point.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'getRevision',
-    ol.geom.Point.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'on',
-    ol.geom.Point.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'once',
-    ol.geom.Point.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Point.prototype,
-    'un',
-    ol.geom.Point.prototype.un);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getFirstCoordinate',
-    ol.geom.Polygon.prototype.getFirstCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLastCoordinate',
-    ol.geom.Polygon.prototype.getLastCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getLayout',
-    ol.geom.Polygon.prototype.getLayout);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'rotate',
-    ol.geom.Polygon.prototype.rotate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'scale',
-    ol.geom.Polygon.prototype.scale);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getClosestPoint',
-    ol.geom.Polygon.prototype.getClosestPoint);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'intersectsCoordinate',
-    ol.geom.Polygon.prototype.intersectsCoordinate);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getExtent',
-    ol.geom.Polygon.prototype.getExtent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'simplify',
-    ol.geom.Polygon.prototype.simplify);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'transform',
-    ol.geom.Polygon.prototype.transform);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'get',
-    ol.geom.Polygon.prototype.get);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getKeys',
-    ol.geom.Polygon.prototype.getKeys);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getProperties',
-    ol.geom.Polygon.prototype.getProperties);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'set',
-    ol.geom.Polygon.prototype.set);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'setProperties',
-    ol.geom.Polygon.prototype.setProperties);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'unset',
-    ol.geom.Polygon.prototype.unset);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'changed',
-    ol.geom.Polygon.prototype.changed);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'dispatchEvent',
-    ol.geom.Polygon.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'getRevision',
-    ol.geom.Polygon.prototype.getRevision);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'on',
-    ol.geom.Polygon.prototype.on);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'once',
-    ol.geom.Polygon.prototype.once);
-
-goog.exportProperty(
-    ol.geom.Polygon.prototype,
-    'un',
-    ol.geom.Polygon.prototype.un);
-
-goog.exportProperty(
-    ol.format.GML.prototype,
-    'readFeatures',
-    ol.format.GML.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GML2.prototype,
-    'readFeatures',
-    ol.format.GML2.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.format.GML3.prototype,
-    'readFeatures',
-    ol.format.GML3.prototype.readFeatures);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'get',
-    ol.control.Control.prototype.get);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getKeys',
-    ol.control.Control.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getProperties',
-    ol.control.Control.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'set',
-    ol.control.Control.prototype.set);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'setProperties',
-    ol.control.Control.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'unset',
-    ol.control.Control.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'changed',
-    ol.control.Control.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'dispatchEvent',
-    ol.control.Control.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'getRevision',
-    ol.control.Control.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'on',
-    ol.control.Control.prototype.on);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'once',
-    ol.control.Control.prototype.once);
-
-goog.exportProperty(
-    ol.control.Control.prototype,
-    'un',
-    ol.control.Control.prototype.un);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getMap',
-    ol.control.Attribution.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setMap',
-    ol.control.Attribution.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setTarget',
-    ol.control.Attribution.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'get',
-    ol.control.Attribution.prototype.get);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getKeys',
-    ol.control.Attribution.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getProperties',
-    ol.control.Attribution.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'set',
-    ol.control.Attribution.prototype.set);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'setProperties',
-    ol.control.Attribution.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'unset',
-    ol.control.Attribution.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'changed',
-    ol.control.Attribution.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'dispatchEvent',
-    ol.control.Attribution.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'getRevision',
-    ol.control.Attribution.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'on',
-    ol.control.Attribution.prototype.on);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'once',
-    ol.control.Attribution.prototype.once);
-
-goog.exportProperty(
-    ol.control.Attribution.prototype,
-    'un',
-    ol.control.Attribution.prototype.un);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getMap',
-    ol.control.FullScreen.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setMap',
-    ol.control.FullScreen.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setTarget',
-    ol.control.FullScreen.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'get',
-    ol.control.FullScreen.prototype.get);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getKeys',
-    ol.control.FullScreen.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getProperties',
-    ol.control.FullScreen.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'set',
-    ol.control.FullScreen.prototype.set);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'setProperties',
-    ol.control.FullScreen.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'unset',
-    ol.control.FullScreen.prototype.unset);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'changed',
-    ol.control.FullScreen.prototype.changed);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'dispatchEvent',
-    ol.control.FullScreen.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'getRevision',
-    ol.control.FullScreen.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'on',
-    ol.control.FullScreen.prototype.on);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'once',
-    ol.control.FullScreen.prototype.once);
-
-goog.exportProperty(
-    ol.control.FullScreen.prototype,
-    'un',
-    ol.control.FullScreen.prototype.un);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getMap',
-    ol.control.MousePosition.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setMap',
-    ol.control.MousePosition.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setTarget',
-    ol.control.MousePosition.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'get',
-    ol.control.MousePosition.prototype.get);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getKeys',
-    ol.control.MousePosition.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getProperties',
-    ol.control.MousePosition.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'set',
-    ol.control.MousePosition.prototype.set);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'setProperties',
-    ol.control.MousePosition.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'unset',
-    ol.control.MousePosition.prototype.unset);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'changed',
-    ol.control.MousePosition.prototype.changed);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'dispatchEvent',
-    ol.control.MousePosition.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'getRevision',
-    ol.control.MousePosition.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'on',
-    ol.control.MousePosition.prototype.on);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'once',
-    ol.control.MousePosition.prototype.once);
-
-goog.exportProperty(
-    ol.control.MousePosition.prototype,
-    'un',
-    ol.control.MousePosition.prototype.un);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getMap',
-    ol.control.OverviewMap.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setMap',
-    ol.control.OverviewMap.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setTarget',
-    ol.control.OverviewMap.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'get',
-    ol.control.OverviewMap.prototype.get);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getKeys',
-    ol.control.OverviewMap.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getProperties',
-    ol.control.OverviewMap.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'set',
-    ol.control.OverviewMap.prototype.set);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'setProperties',
-    ol.control.OverviewMap.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'unset',
-    ol.control.OverviewMap.prototype.unset);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'changed',
-    ol.control.OverviewMap.prototype.changed);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'dispatchEvent',
-    ol.control.OverviewMap.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'getRevision',
-    ol.control.OverviewMap.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'on',
-    ol.control.OverviewMap.prototype.on);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'once',
-    ol.control.OverviewMap.prototype.once);
-
-goog.exportProperty(
-    ol.control.OverviewMap.prototype,
-    'un',
-    ol.control.OverviewMap.prototype.un);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getMap',
-    ol.control.Rotate.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setMap',
-    ol.control.Rotate.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setTarget',
-    ol.control.Rotate.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'get',
-    ol.control.Rotate.prototype.get);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getKeys',
-    ol.control.Rotate.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getProperties',
-    ol.control.Rotate.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'set',
-    ol.control.Rotate.prototype.set);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'setProperties',
-    ol.control.Rotate.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'unset',
-    ol.control.Rotate.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'changed',
-    ol.control.Rotate.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'dispatchEvent',
-    ol.control.Rotate.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'getRevision',
-    ol.control.Rotate.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'on',
-    ol.control.Rotate.prototype.on);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'once',
-    ol.control.Rotate.prototype.once);
-
-goog.exportProperty(
-    ol.control.Rotate.prototype,
-    'un',
-    ol.control.Rotate.prototype.un);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getMap',
-    ol.control.ScaleLine.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setMap',
-    ol.control.ScaleLine.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setTarget',
-    ol.control.ScaleLine.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'get',
-    ol.control.ScaleLine.prototype.get);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getKeys',
-    ol.control.ScaleLine.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getProperties',
-    ol.control.ScaleLine.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'set',
-    ol.control.ScaleLine.prototype.set);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'setProperties',
-    ol.control.ScaleLine.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'unset',
-    ol.control.ScaleLine.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'changed',
-    ol.control.ScaleLine.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'dispatchEvent',
-    ol.control.ScaleLine.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'getRevision',
-    ol.control.ScaleLine.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'on',
-    ol.control.ScaleLine.prototype.on);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'once',
-    ol.control.ScaleLine.prototype.once);
-
-goog.exportProperty(
-    ol.control.ScaleLine.prototype,
-    'un',
-    ol.control.ScaleLine.prototype.un);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getMap',
-    ol.control.Zoom.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setMap',
-    ol.control.Zoom.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setTarget',
-    ol.control.Zoom.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'get',
-    ol.control.Zoom.prototype.get);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getKeys',
-    ol.control.Zoom.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getProperties',
-    ol.control.Zoom.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'set',
-    ol.control.Zoom.prototype.set);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'setProperties',
-    ol.control.Zoom.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'unset',
-    ol.control.Zoom.prototype.unset);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'changed',
-    ol.control.Zoom.prototype.changed);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'dispatchEvent',
-    ol.control.Zoom.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'getRevision',
-    ol.control.Zoom.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'on',
-    ol.control.Zoom.prototype.on);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'once',
-    ol.control.Zoom.prototype.once);
-
-goog.exportProperty(
-    ol.control.Zoom.prototype,
-    'un',
-    ol.control.Zoom.prototype.un);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getMap',
-    ol.control.ZoomSlider.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setMap',
-    ol.control.ZoomSlider.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setTarget',
-    ol.control.ZoomSlider.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'get',
-    ol.control.ZoomSlider.prototype.get);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getKeys',
-    ol.control.ZoomSlider.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getProperties',
-    ol.control.ZoomSlider.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'set',
-    ol.control.ZoomSlider.prototype.set);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'setProperties',
-    ol.control.ZoomSlider.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'unset',
-    ol.control.ZoomSlider.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'changed',
-    ol.control.ZoomSlider.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'dispatchEvent',
-    ol.control.ZoomSlider.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'getRevision',
-    ol.control.ZoomSlider.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'on',
-    ol.control.ZoomSlider.prototype.on);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'once',
-    ol.control.ZoomSlider.prototype.once);
-
-goog.exportProperty(
-    ol.control.ZoomSlider.prototype,
-    'un',
-    ol.control.ZoomSlider.prototype.un);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getMap',
-    ol.control.ZoomToExtent.prototype.getMap);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setMap',
-    ol.control.ZoomToExtent.prototype.setMap);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setTarget',
-    ol.control.ZoomToExtent.prototype.setTarget);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'get',
-    ol.control.ZoomToExtent.prototype.get);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getKeys',
-    ol.control.ZoomToExtent.prototype.getKeys);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getProperties',
-    ol.control.ZoomToExtent.prototype.getProperties);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'set',
-    ol.control.ZoomToExtent.prototype.set);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'setProperties',
-    ol.control.ZoomToExtent.prototype.setProperties);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'unset',
-    ol.control.ZoomToExtent.prototype.unset);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'changed',
-    ol.control.ZoomToExtent.prototype.changed);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'dispatchEvent',
-    ol.control.ZoomToExtent.prototype.dispatchEvent);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'getRevision',
-    ol.control.ZoomToExtent.prototype.getRevision);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'on',
-    ol.control.ZoomToExtent.prototype.on);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'once',
-    ol.control.ZoomToExtent.prototype.once);
-
-goog.exportProperty(
-    ol.control.ZoomToExtent.prototype,
-    'un',
-    ol.control.ZoomToExtent.prototype.un);
-ol.VERSION = 'v4.6.5';
-OPENLAYERS.ol = ol;
-
-  return OPENLAYERS.ol;
-}));
diff --git a/VIPSWeb/static/js/3rdparty/ol.js b/VIPSWeb/static/js/3rdparty/ol.js
index 90c3d055..8a358d33 100644
--- a/VIPSWeb/static/js/3rdparty/ol.js
+++ b/VIPSWeb/static/js/3rdparty/ol.js
@@ -1,1073 +1,8 @@
-// OpenLayers. See https://openlayers.org/
-// License: https://raw.githubusercontent.com/openlayers/openlayers/master/LICENSE.md
-// Version: v4.6.5
-;(function (root, factory) {
-  if (typeof exports === "object") {
-    module.exports = factory();
-  } else if (typeof define === "function" && define.amd) {
-    define([], factory);
-  } else {
-    root.ol = factory();
-  }
-}(this, function () {
-  var OPENLAYERS = {};
-  var k,aa=this;function t(a,b){var c=OPENLAYERS;a=a.split(".");c=c||aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};var ba,da;function w(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a}function ea(){}function x(a){return a.xp||(a.xp=++fa)}var fa=0;function ha(a){this.message="Assertion failed. See https://openlayers.org/en/v4.6.5/doc/errors/#"+a+" for details.";this.code=a;this.name="AssertionError"}w(ha,Error);function ja(a,b,c,d){this.fa=a;this.la=b;this.ea=c;this.ka=d}function ka(a,b,c,d,e){return void 0!==e?(e.fa=a,e.la=b,e.ea=c,e.ka=d,e):new ja(a,b,c,d)}function ma(a,b,c){return a.fa<=b&&b<=a.la&&a.ea<=c&&c<=a.ka}function na(a,b){return a.fa==b.fa&&a.ea==b.ea&&a.la==b.la&&a.ka==b.ka};function oa(a,b){if(!a)throw new ha(b);};function pa(a,b,c){return Math.min(Math.max(a,b),c)}var qa=function(){var a;"cosh"in Math?a=Math.cosh:a=function(a){a=Math.exp(a);return(a+1/a)/2};return a}();function ra(a){oa(0<a,29);return Math.pow(2,Math.ceil(Math.log(a)/Math.LN2))}function sa(a,b,c,d,e,f){var g=e-c,h=f-d;if(0!==g||0!==h){var l=((a-c)*g+(b-d)*h)/(g*g+h*h);1<l?(c=e,d=f):0<l&&(c+=g*l,d+=h*l)}return ua(a,b,c,d)}function ua(a,b,c,d){a=c-a;b=d-b;return a*a+b*b}function va(a){return a*Math.PI/180}
-function wa(a,b){a%=b;return 0>a*b?a+b:a}function ya(a,b,c){return a+c*(b-a)};function za(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]+2*b;c[1]=a[1]+2*b;return c}function Aa(a,b,c){void 0===c&&(c=[0,0]);c[0]=a[0]*b+.5|0;c[1]=a[1]*b+.5|0;return c}function Ba(a,b){if(Array.isArray(a))return a;void 0===b?b=[a,a]:b[0]=b[1]=a;return b};function Ca(a){for(var b=Da(),c=0,d=a.length;c<d;++c)Ea(b,a[c]);return b}function Fa(a,b,c){return c?(c[0]=a[0]-b,c[1]=a[1]-b,c[2]=a[2]+b,c[3]=a[3]+b,c):[a[0]-b,a[1]-b,a[2]+b,a[3]+b]}function Ga(a,b){return b?(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b):a.slice()}function Ha(a,b,c){b=b<a[0]?a[0]-b:a[2]<b?b-a[2]:0;a=c<a[1]?a[1]-c:a[3]<c?c-a[3]:0;return b*b+a*a}function Ja(a,b){return Ka(a,b[0],b[1])}function La(a,b){return a[0]<=b[0]&&b[2]<=a[2]&&a[1]<=b[1]&&b[3]<=a[3]}
-function Ka(a,b,c){return a[0]<=b&&b<=a[2]&&a[1]<=c&&c<=a[3]}function Ma(a,b){var c=a[1],d=a[2],e=a[3],f=b[0];b=b[1];var g=0;f<a[0]?g|=16:f>d&&(g|=4);b<c?g|=8:b>e&&(g|=2);0===g&&(g=1);return g}function Da(){return[Infinity,Infinity,-Infinity,-Infinity]}function Na(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function Oa(a){return Na(Infinity,Infinity,-Infinity,-Infinity,a)}function Pa(a,b){var c=a[0];a=a[1];return Na(c,a,c,a,b)}
-function Qa(a,b,c,d,e){e=Oa(e);return Ra(e,a,b,c,d)}function Sa(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function Ta(a,b){b[0]<a[0]&&(a[0]=b[0]);b[2]>a[2]&&(a[2]=b[2]);b[1]<a[1]&&(a[1]=b[1]);b[3]>a[3]&&(a[3]=b[3]);return a}function Ea(a,b){b[0]<a[0]&&(a[0]=b[0]);b[0]>a[2]&&(a[2]=b[0]);b[1]<a[1]&&(a[1]=b[1]);b[1]>a[3]&&(a[3]=b[1])}
-function Ra(a,b,c,d,e){for(;c<d;c+=e){var f=a,g=b[c],h=b[c+1];f[0]=Math.min(f[0],g);f[1]=Math.min(f[1],h);f[2]=Math.max(f[2],g);f[3]=Math.max(f[3],h)}return a}function Ua(a,b,c){var d;return(d=b.call(c,Wa(a)))||(d=b.call(c,Ya(a)))||(d=b.call(c,Za(a)))?d:(d=b.call(c,$a(a)))?d:!1}function ab(a){var b=0;bb(a)||(b=cb(a)*db(a));return b}function Wa(a){return[a[0],a[1]]}function Ya(a){return[a[2],a[1]]}function eb(a){return[(a[0]+a[2])/2,(a[1]+a[3])/2]}
-function fb(a,b,c,d,e){var f=b*d[0]/2;d=b*d[1]/2;b=Math.cos(c);var g=Math.sin(c);c=f*b;f*=g;b*=d;var h=d*g,l=a[0],m=a[1];a=l-c+h;d=l-c-h;g=l+c-h;c=l+c+h;h=m-f-b;l=m-f+b;var n=m+f+b;f=m+f-b;return Na(Math.min(a,d,g,c),Math.min(h,l,n,f),Math.max(a,d,g,c),Math.max(h,l,n,f),e)}function db(a){return a[3]-a[1]}function gb(a,b,c){c=c?c:Da();hb(a,b)&&(c[0]=a[0]>b[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]<b[2]?a[2]:b[2],c[3]=a[3]<b[3]?a[3]:b[3]);return c}function $a(a){return[a[0],a[3]]}
-function Za(a){return[a[2],a[3]]}function cb(a){return a[2]-a[0]}function hb(a,b){return a[0]<=b[2]&&a[2]>=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function bb(a){return a[2]<a[0]||a[3]<a[1]}function ib(a,b){var c=(a[2]-a[0])/2*(b-1);b=(a[3]-a[1])/2*(b-1);a[0]-=c;a[2]+=c;a[1]-=b;a[3]+=b}
-function jb(a,b,c){a=[a[0],a[1],a[0],a[3],a[2],a[1],a[2],a[3]];b(a,a,2);var d=[a[0],a[2],a[4],a[6]],e=[a[1],a[3],a[5],a[7]];b=Math.min.apply(null,d);a=Math.min.apply(null,e);d=Math.max.apply(null,d);e=Math.max.apply(null,e);return Na(b,a,d,e,c)};var kb="function"===typeof Object.assign?Object.assign:function(a,b){if(void 0===a||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1,e=arguments.length;d<e;++d){var f=arguments[d];if(void 0!==f&&null!==f)for(var g in f)f.hasOwnProperty(g)&&(c[g]=f[g])}return c};function lb(a){for(var b in a)delete a[b]}function mb(a){var b=[],c;for(c in a)b.push(a[c]);return b}function nb(a){for(var b in a)return!1;return!b};/*
-
- Latitude/longitude spherical geodesy formulae taken from
- http://www.movable-type.co.uk/scripts/latlong.html
- Licensed under CC-BY-3.0.
-*/
-function ob(a){this.radius=a}ob.prototype.a=function(a){return pb(a,this.radius)};ob.prototype.b=function(a,b){return qb(a,b,this.radius)};ob.prototype.offset=function(a,b,c){var d=va(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(va(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]};
-function rb(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().mb(c,"EPSG:4326");var e=a.S();c=0;var f;switch(e){case "Point":case "MultiPoint":break;case "LineString":case "LinearRing":b=a.W();c=sb(b,d);break;case "MultiLineString":case "Polygon":b=a.W();a=0;for(e=b.length;a<e;++a)c+=sb(b[a],d);break;case "MultiPolygon":b=a.W();a=0;for(e=b.length;a<e;++a){var g=b[a];var h=0;for(f=g.length;h<f;++h)c+=sb(g[h],d)}break;case "GeometryCollection":d=a.vd();a=0;for(e=d.length;a<
-e;++a)c+=rb(d[a],b);break;default:throw Error("Unsupported geometry type: "+e);}return c}function sb(a,b){for(var c=0,d=0,e=a.length;d<e-1;++d)c+=qb(a[d],a[d+1],b);return c}function qb(a,b,c){var d=va(a[1]),e=va(b[1]),f=(e-d)/2;a=va(b[0]-a[0])/2;d=Math.sin(f)*Math.sin(f)+Math.sin(a)*Math.sin(a)*Math.cos(d)*Math.cos(e);return 2*c*Math.atan2(Math.sqrt(d),Math.sqrt(1-d))}
-function tb(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().mb(c,"EPSG:4326");var e=a.S();c=0;var f;switch(e){case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "LinearRing":break;case "Polygon":b=a.W();c=Math.abs(pb(b[0],d));a=1;for(e=b.length;a<e;++a)c-=Math.abs(pb(b[a],d));break;case "MultiPolygon":b=a.W();a=0;for(e=b.length;a<e;++a){var g=b[a];c+=Math.abs(pb(g[0],d));var h=1;for(f=g.length;h<f;++h)c-=Math.abs(pb(g[h],d))}break;case "GeometryCollection":d=
-a.vd();a=0;for(e=d.length;a<e;++a)c+=tb(d[a],b);break;default:throw Error("Unsupported geometry type: "+e);}return c}function pb(a,b){for(var c=0,d=a.length,e=a[d-1][0],f=a[d-1][1],g=0;g<d;g++){var h=a[g][0],l=a[g][1];c+=va(h-e)*(2+Math.sin(va(f))+Math.sin(va(l)));e=h;f=l}return c*b*b/2};var ub={};ub.degrees=12741994*Math.PI/360;ub.ft=.3048;ub.m=1;ub["us-ft"]=1200/3937;var vb=null;function wb(a){this.wb=a.code;this.a=a.units;this.i=void 0!==a.extent?a.extent:null;this.oe=void 0!==a.worldExtent?a.worldExtent:null;this.b=void 0!==a.axisOrientation?a.axisOrientation:"enu";this.c=void 0!==a.global?a.global:!1;this.g=!(!this.c||!this.i);this.j=a.getPointResolution;this.f=null;this.l=a.metersPerUnit;var b=a.code,c=vb||window.proj4;"function"==typeof c&&(b=c.defs(b),void 0!==b&&(void 0!==b.axis&&void 0===a.axisOrientation&&(this.b=b.axis),void 0===a.metersPerUnit&&(this.l=b.to_meter),
-void 0===a.units&&(this.a=b.units)))}k=wb.prototype;k.ml=function(){return this.wb};k.G=function(){return this.i};k.zo=function(){return this.a};k.Bc=function(){return this.l||ub[this.a]};k.Vl=function(){return this.oe};k.il=function(){return this.b};k.Gm=function(){return this.c};k.xq=function(a){this.c=a;this.g=!(!a||!this.i)};k.Si=function(a){this.i=a;this.g=!(!this.c||!a)};k.Sj=function(a){this.oe=a};k.wq=function(a){this.j=a};function xb(a){wb.call(this,{code:a,units:"m",extent:yb,global:!0,worldExtent:zb,getPointResolution:function(a,c){return a/qa(c[1]/6378137)}})}w(xb,wb);var Ab=6378137*Math.PI,yb=[-Ab,-Ab,Ab,Ab],zb=[-180,-85,180,85],Bb=[new xb("EPSG:3857"),new xb("EPSG:102100"),new xb("EPSG:102113"),new xb("EPSG:900913"),new xb("urn:ogc:def:crs:EPSG:6.18:3:3857"),new xb("urn:ogc:def:crs:EPSG::3857"),new xb("http://www.opengis.net/gml/srs/epsg.xml#3857")];
-function Cb(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c){b[e]=Ab*a[e]/180;var f=6378137*Math.log(Math.tan(Math.PI*(a[e+1]+90)/360));f>Ab?f=Ab:f<-Ab&&(f=-Ab);b[e+1]=f}return b}function Db(a,b,c){var d=a.length;c=1<c?c:2;void 0===b&&(2<c?b=a.slice():b=Array(d));for(var e=0;e<d;e+=c)b[e]=180*a[e]/Ab,b[e+1]=360*Math.atan(Math.exp(a[e+1]/6378137))/Math.PI-90;return b};function Eb(a,b){wb.call(this,{code:a,units:"degrees",extent:Fb,axisOrientation:b,global:!0,metersPerUnit:Gb,worldExtent:Fb})}w(Eb,wb);var Fb=[-180,-90,180,90],Gb=6378137*Math.PI/180,Hb=[new Eb("CRS:84"),new Eb("EPSG:4326","neu"),new Eb("urn:ogc:def:crs:EPSG::4326","neu"),new Eb("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new Eb("urn:ogc:def:crs:OGC:1.3:CRS84"),new Eb("urn:ogc:def:crs:OGC:2:84"),new Eb("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Eb("urn:x-ogc:def:crs:EPSG:4326","neu")];var Ib={};var Jb={};function Kb(a,b,c){a=a.wb;b=b.wb;a in Jb||(Jb[a]={});Jb[a][b]=c}function Lb(a,b){var c;a in Jb&&b in Jb[a]&&(c=Jb[a][b]);return c};var Mb=new ob(6371008.8);function Nb(a,b,c,d){a=Ob(a);var e=a.j;e?b=e(b,c):"degrees"==a.a&&!d||"degrees"==d||(e=Pb(a,Ob("EPSG:4326")),b=[c[0]-b/2,c[1],c[0]+b/2,c[1],c[0],c[1]-b/2,c[0],c[1]+b/2],b=e(b,b,2),b=(Mb.b(b.slice(0,2),b.slice(2,4))+Mb.b(b.slice(4,6),b.slice(6,8)))/2,a=d?ub[d]:a.Bc(),void 0!==a&&(b/=a));return b}function Qb(a){a.forEach(Rb);a.forEach(function(b){a.forEach(function(a){b!==a&&Kb(b,a,Sb)})})}
-function Tb(){Hb.forEach(function(a){Bb.forEach(function(b){Kb(a,b,Cb);Kb(b,a,Db)})})}function Rb(a){Ib[a.wb]=a;Kb(a,a,Sb)}function Ub(a){return a?"string"===typeof a?Ob(a):a:Ob("EPSG:3857")}function Vb(a,b,c,d){a=Ob(a);b=Ob(b);Kb(a,b,Wb(c));Kb(b,a,Wb(d))}function Wb(a){return function(b,c,d){var e=b.length;d=void 0!==d?d:2;c=void 0!==c?c:Array(e);var f;for(f=0;f<e;f+=d){var g=a([b[f],b[f+1]]);c[f]=g[0];c[f+1]=g[1];for(g=d-1;2<=g;--g)c[f+g]=b[f+g]}return c}}
-function Ob(a){var b=null;if(a instanceof wb)b=a;else if("string"===typeof a&&(b=Ib[a]||null,!b)){var c=vb||window.proj4;"function"==typeof c&&void 0!==c.defs(a)&&(b=new wb({code:a}),Rb(b))}return b}function Xb(a,b){if(a===b)return!0;var c=a.a===b.a;return a.wb===b.wb?c:Pb(a,b)===Sb&&c}function Yb(a,b){a=Ob(a);b=Ob(b);return Pb(a,b)}
-function Pb(a,b){var c=a.wb,d=b.wb,e=Lb(c,d);if(!e){var f=vb||window.proj4;if("function"==typeof f){var g=f.defs(c),h=f.defs(d);void 0!==g&&void 0!==h&&(g===h?Qb([b,a]):(e=f(d,c),Vb(b,a,e.forward,e.inverse)),e=Lb(c,d))}}e||(e=$b);return e}function $b(a,b){if(void 0!==b&&a!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}return a}function Sb(a,b){if(void 0!==b){for(var c=0,d=a.length;c<d;++c)b[c]=a[c];a=b}else a=a.slice();return a}function ac(a,b,c){return Yb(b,c)(a,void 0,a.length)}
-function bc(a,b,c){b=Yb(b,c);return jb(a,b)}function cc(){Qb(Bb);Qb(Hb);Tb()}cc();function dc(a,b){return a>b?1:a<b?-1:0}function ec(a,b){return 0<=a.indexOf(b)}function fc(a,b,c){var d=a.length;if(a[0]<=b)return 0;if(!(b<=a[d-1]))if(0<c)for(c=1;c<d;++c){if(a[c]<b)return c-1}else if(0>c)for(c=1;c<d;++c){if(a[c]<=b)return c}else for(c=1;c<d;++c){if(a[c]==b)return c;if(a[c]<b)return a[c-1]-b<b-a[c]?c-1:c}return d-1}function gc(a,b){var c=Array.isArray(b)?b:[b],d=c.length;for(b=0;b<d;b++)a[a.length]=c[b]}
-function hc(a,b){for(var c=a.length>>>0,d,e=0;e<c;e++)if(d=a[e],b(d,e,a))return d;return null}function jc(a,b){var c=a.length;if(c!==b.length)return!1;for(var d=0;d<c;d++)if(a[d]!==b[d])return!1;return!0}function kc(a){var b=lc,c=a.length,d=Array(a.length),e;for(e=0;e<c;e++)d[e]={index:e,value:a[e]};d.sort(function(a,c){return b(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value}function mc(a,b){var c;return a.every(function(d,e){c=e;return!b(d,e,a)})?-1:c}
-function nc(a,b){var c=b||dc;return a.every(function(b,e){if(0===e)return!0;b=c(a[e-1],b);return!(0<b||0===b)})};function oc(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function pc(a){var b=a[0],c=Array(b),d=1<<b-1,e;for(e=0;e<b;++e){var f=48;a[1]&d&&(f+=1);a[2]&d&&(f+=2);c[e]=String.fromCharCode(f);d>>=1}return c.join("")};function qc(a){this.minZoom=void 0!==a.minZoom?a.minZoom:0;this.b=a.resolutions;oa(nc(this.b,function(a,b){return b-a}),17);if(!a.origins)for(var b=0,c=this.b.length-1;b<c;++b)if(!d)var d=this.b[b]/this.b[b+1];else if(this.b[b]/this.b[b+1]!==d){d=void 0;break}this.l=d;this.maxZoom=this.b.length-1;this.g=void 0!==a.origin?a.origin:null;this.c=null;void 0!==a.origins&&(this.c=a.origins,oa(this.c.length==this.b.length,20));d=a.extent;void 0===d||this.g||this.c||(this.g=$a(d));oa(!this.g&&this.c||this.g&&
-!this.c,18);this.i=null;void 0!==a.tileSizes&&(this.i=a.tileSizes,oa(this.i.length==this.b.length,19));this.j=void 0!==a.tileSize?a.tileSize:this.i?null:256;oa(!this.j&&this.i||this.j&&!this.i,22);this.o=void 0!==d?d:null;this.a=null;this.f=[0,0];void 0!==a.sizes?this.a=a.sizes.map(function(a){return new ja(Math.min(0,a[0]),Math.max(a[0]-1,-1),Math.min(0,a[1]),Math.max(a[1]-1,-1))},this):d&&rc(this,d)}var sc=[0,0,0];k=qc.prototype;
-k.Vf=function(a,b,c){a=tc(this,a,b);for(var d=a.fa,e=a.la;d<=e;++d)for(var f=a.ea,g=a.ka;f<=g;++f)c([b,d,f])};function uc(a,b,c,d,e){var f=null,g=b[0]-1;if(2===a.l){var h=b[1];var l=b[2]}else f=a.Ma(b,e);for(;g>=a.minZoom;){2===a.l?(h=Math.floor(h/2),l=Math.floor(l/2),b=ka(h,h,l,l,d)):b=tc(a,f,g,d);if(c.call(null,g,b))return!0;--g}return!1}k.G=function(){return this.o};k.mj=function(){return this.maxZoom};k.nj=function(){return this.minZoom};k.Ic=function(a){return this.g?this.g:this.c[a]};k.Ta=function(a){return this.b[a]};
-k.oj=function(){return this.b};function vc(a,b,c,d){if(b[0]<a.maxZoom){if(2===a.l)return a=2*b[1],b=2*b[2],ka(a,a+1,b,b+1,c);d=a.Ma(b,d);return tc(a,d,b[0]+1,c)}return null}function wc(a,b,c){var d=a.Ic(b),e=a.Ta(b);a=Ba(a.Za(b),a.f);return Na(d[0]+c.fa*a[0]*e,d[1]+c.ea*a[1]*e,d[0]+(c.la+1)*a[0]*e,d[1]+(c.ka+1)*a[1]*e,void 0)}function tc(a,b,c,d){xc(a,b[0],b[1],c,!1,sc);var e=sc[1],f=sc[2];xc(a,b[2],b[3],c,!0,sc);return ka(e,sc[1],f,sc[2],d)}
-function yc(a,b){var c=a.Ic(b[0]),d=a.Ta(b[0]);a=Ba(a.Za(b[0]),a.f);return[c[0]+(b[1]+.5)*a[0]*d,c[1]+(b[2]+.5)*a[1]*d]}k.Ma=function(a,b){var c=this.Ic(a[0]),d=this.Ta(a[0]),e=Ba(this.Za(a[0]),this.f),f=c[0]+a[1]*e[0]*d;a=c[1]+a[2]*e[1]*d;return Na(f,a,f+e[0]*d,a+e[1]*d,b)};
-k.Le=function(a,b,c){var d=a[0],e=a[1];a=this.Dc(b);var f=b/this.Ta(a),g=this.Ic(a),h=Ba(this.Za(a),this.f);d=f*Math.floor((d-g[0])/b+0)/h[0];b=f*Math.floor((e-g[1])/b+.5)/h[1];d=Math.floor(d);b=Math.floor(b);return oc(a,d,b,c)};function xc(a,b,c,d,e,f){var g=a.Ic(d),h=a.Ta(d);a=Ba(a.Za(d),a.f);b=Math.floor((b-g[0])/h+(e?.5:0))/a[0];c=Math.floor((c-g[1])/h+(e?0:.5))/a[1];e?(b=Math.ceil(b)-1,c=Math.ceil(c)-1):(b=Math.floor(b),c=Math.floor(c));return oc(d,b,c,f)}
-k.jg=function(a,b,c){return xc(this,a[0],a[1],b,!1,c)};k.Za=function(a){return this.j?this.j:this.i[a]};k.Dc=function(a,b){return pa(fc(this.b,a,b||0),this.minZoom,this.maxZoom)};function rc(a,b){for(var c=a.b.length,d=Array(c),e=a.minZoom;e<c;++e)d[e]=tc(a,b,e);a.a=d};function zc(a){var b=a.f;b||(b=Ac(a),a.f=b);return b}function Bc(a){var b={};kb(b,void 0!==a?a:{});void 0===b.extent&&(b.extent=Ob("EPSG:3857").G());b.resolutions=Cc(b.extent,b.maxZoom,b.tileSize);delete b.maxZoom;return new qc(b)}function Cc(a,b,c){b=void 0!==b?b:42;var d=db(a);a=cb(a);c=Ba(void 0!==c?c:256);c=Math.max(a/c[0],d/c[1]);b+=1;d=Array(b);for(a=0;a<b;++a)d[a]=c/Math.pow(2,a);return d}
-function Ac(a,b,c){a=Dc(a);b=Cc(a,b,c);return new qc({extent:a,origin:$a(a),resolutions:b,tileSize:c})}function Dc(a){a=Ob(a);var b=a.G();b||(a=180*ub.degrees/a.Bc(),b=Na(-a,-a,a,a));return b};function Ec(a){this.og=a.html}Ec.prototype.b=function(){return this.og};function Fc(a){function b(b){var c=a.listener,e=a.Ch||a.target;a.Eh&&Gc(a);return c.call(e,b)}return a.Dh=b}function Hc(a,b,c,d){for(var e,f=0,g=a.length;f<g;++f)if(e=a[f],e.listener===b&&e.Ch===c)return d&&(e.deleteIndex=f),e}function Ic(a,b){return(a=a.ab)?a[b]:void 0}function Jc(a){var b=a.ab;b||(b=a.ab={});return b}
-function Kc(a,b){var c=Ic(a,b);if(c){for(var d=0,e=c.length;d<e;++d)a.removeEventListener(b,c[d].Dh),lb(c[d]);c.length=0;if(c=a.ab)delete c[b],0===Object.keys(c).length&&delete a.ab}}function y(a,b,c,d,e){var f=Jc(a),g=f[b];g||(g=f[b]=[]);(f=Hc(g,c,d,!1))?e||(f.Eh=!1):(f={Ch:d,Eh:!!e,listener:c,target:a,type:b},a.addEventListener(b,Fc(f)),g.push(f));return f}function Lc(a,b,c,d){return y(a,b,c,d,!0)}function Mc(a,b,c,d){(a=Ic(a,b))&&(c=Hc(a,c,d,!0))&&Gc(c)}
-function Gc(a){if(a&&a.target){a.target.removeEventListener(a.type,a.Dh);var b=Ic(a.target,a.type);if(b){var c="deleteIndex"in a?a.deleteIndex:b.indexOf(a);-1!==c&&b.splice(c,1);0===b.length&&Kc(a.target,a.type)}lb(a)}}function Nc(a){var b=Jc(a),c;for(c in b)Kc(a,c)};function Oc(){}Oc.prototype.Ub=!1;function Pc(a){a.Ub||(a.Ub=!0,a.ia())}Oc.prototype.ia=ea;function Qc(a){this.type=a;this.target=null}Qc.prototype.preventDefault=Qc.prototype.stopPropagation=function(){this.sj=!0};function Rc(a){a.stopPropagation()};function Sc(){this.Wa={};this.qa={};this.oa={}}w(Sc,Oc);Sc.prototype.addEventListener=function(a,b){var c=this.oa[a];c||(c=this.oa[a]=[]);-1===c.indexOf(b)&&c.push(b)};
-Sc.prototype.b=function(a){var b="string"===typeof a?new Qc(a):a;a=b.type;b.target=this;var c=this.oa[a];if(c){a in this.qa||(this.qa[a]=0,this.Wa[a]=0);++this.qa[a];for(var d=0,e=c.length;d<e;++d)if(!1===c[d].call(this,b)||b.sj){var f=!1;break}--this.qa[a];if(0===this.qa[a]){b=this.Wa[a];for(delete this.Wa[a];b--;)this.removeEventListener(a,ea);delete this.qa[a]}return f}};Sc.prototype.ia=function(){Nc(this)};function Tc(a,b){return b?b in a.oa:0<Object.keys(a.oa).length}
-Sc.prototype.removeEventListener=function(a,b){var c=this.oa[a];c&&(b=c.indexOf(b),a in this.Wa?(c[b]=ea,++this.Wa[a]):(c.splice(b,1),0===c.length&&delete this.oa[a]))};function Uc(){Sc.call(this);this.g=0}w(Uc,Sc);k=Uc.prototype;k.u=function(){++this.g;this.b("change")};k.K=function(){return this.g};k.I=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=y(this,a[f],b,c);return e}return y(this,a,b,c)};k.once=function(a,b,c){if(Array.isArray(a)){for(var d=a.length,e=Array(d),f=0;f<d;++f)e[f]=Lc(this,a[f],b,c);return e}return Lc(this,a,b,c)};
-k.J=function(a,b,c){if(Array.isArray(a))for(var d=0,e=a.length;d<e;++d)Mc(this,a[d],b,c);else Mc(this,a,b,c)};function Vc(a){Uc.call(this);x(this);this.N={};void 0!==a&&this.H(a)}w(Vc,Uc);var Wc={};function Xc(a){return Wc.hasOwnProperty(a)?Wc[a]:Wc[a]="change:"+a}k=Vc.prototype;k.get=function(a){var b;this.N.hasOwnProperty(a)&&(b=this.N[a]);return b};k.P=function(){return Object.keys(this.N)};k.L=function(){return kb({},this.N)};function Yc(a,b,c){var d=Xc(b);a.b(new Zc(d,b,c));a.b(new Zc("propertychange",b,c))}k.set=function(a,b,c){c?this.N[a]=b:(c=this.N[a],this.N[a]=b,c!==b&&Yc(this,a,c))};
-k.H=function(a,b){for(var c in a)this.set(c,a[c],b)};k.R=function(a,b){if(a in this.N){var c=this.N[a];delete this.N[a];b||Yc(this,a,c)}};function Zc(a,b,c){Qc.call(this,a);this.key=b;this.oldValue=c}w(Zc,Qc);function B(a,b){Vc.call(this);this.c=!!(b||{}).unique;this.a=a?a:[];if(this.c)for(a=0,b=this.a.length;a<b;++a)$c(this,this.a[a],a);ad(this)}w(B,Vc);k=B.prototype;k.clear=function(){for(;0<this.kc();)this.pop()};k.qg=function(a){var b;var c=0;for(b=a.length;c<b;++c)this.push(a[c]);return this};k.forEach=function(a,b){a=b?a.bind(b):a;b=this.a;for(var c=0,d=b.length;c<d;++c)a(b[c],c,b)};k.Xm=function(){return this.a};k.item=function(a){return this.a[a]};k.kc=function(){return this.get(bd)};
-k.Re=function(a,b){this.c&&$c(this,b);this.a.splice(a,0,b);ad(this);this.b(new cd("add",b))};k.pop=function(){return this.Wg(this.kc()-1)};k.push=function(a){this.c&&$c(this,a);var b=this.kc();this.Re(b,a);return this.kc()};k.remove=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d]===a)return this.Wg(d)};k.Wg=function(a){var b=this.a[a];this.a.splice(a,1);ad(this);this.b(new cd("remove",b));return b};
-k.rq=function(a,b){var c=this.kc();if(a<c)this.c&&$c(this,b,a),c=this.a[a],this.a[a]=b,this.b(new cd("remove",c)),this.b(new cd("add",b));else{for(;c<a;++c)this.Re(c,void 0);this.Re(a,b)}};function ad(a){a.set(bd,a.a.length)}function $c(a,b,c){for(var d=0,e=a.a.length;d<e;++d)if(a.a[d]===b&&d!==c)throw new ha(58);}var bd="length";function cd(a,b){Qc.call(this,a);this.element=b}w(cd,Qc);function dd(a,b,c){Qc.call(this,a);this.map=b;this.frameState=void 0!==c?c:null}w(dd,Qc);function ed(a,b,c,d,e){dd.call(this,a,b,e);this.originalEvent=c;this.pixel=b.ud(c);this.coordinate=b.Ra(this.pixel);this.dragging=void 0!==d?d:!1}w(ed,dd);ed.prototype.preventDefault=function(){dd.prototype.preventDefault.call(this);this.originalEvent.preventDefault()};ed.prototype.stopPropagation=function(){dd.prototype.stopPropagation.call(this);this.originalEvent.stopPropagation()};var fd=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function gd(a,b){var c,d,e=fd.length;for(d=0;d<e;++d)try{if(c=a.getContext(fd[d],b))return c}catch(f){}return null};var hd,id="undefined"!==typeof navigator?navigator.userAgent.toLowerCase():"",jd=-1!==id.indexOf("firefox"),kd=-1!==id.indexOf("safari")&&-1==id.indexOf("chrom"),ld=-1!==id.indexOf("webkit")&&-1==id.indexOf("edge"),md=-1!==id.indexOf("macintosh"),nd=window.devicePixelRatio||1,od=!1,pd=function(){if(!("HTMLCanvasElement"in window))return!1;try{var a=document.createElement("CANVAS").getContext("2d");return a?(void 0!==a.setLineDash&&(od=!0),!0):!1}catch(b){return!1}}(),qd="DeviceOrientationEvent"in
-window,rd="geolocation"in navigator,sd="ontouchstart"in window,td="PointerEvent"in window,ud=!!navigator.msPointerEnabled,vd=!1,wd,xd=[];if("WebGLRenderingContext"in window)try{var yd=gd(document.createElement("CANVAS"),{failIfMajorPerformanceCaveat:!0});yd&&(vd=!0,wd=yd.getParameter(yd.MAX_TEXTURE_SIZE),xd=yd.getSupportedExtensions())}catch(a){}hd=vd;da=xd;ba=wd;var zd={gr:"singleclick",Wq:"click",Xq:"dblclick",$q:"pointerdrag",cr:"pointermove",Zq:"pointerdown",fr:"pointerup",er:"pointerover",dr:"pointerout",ar:"pointerenter",br:"pointerleave",Yq:"pointercancel"};function Ad(a,b,c,d,e){ed.call(this,a,b,c.b,d,e);this.b=c}w(Ad,ed);function Bd(a,b){this.b=a;this.i=b};function Cd(a){Bd.call(this,a,{mousedown:this.Jm,mousemove:this.Km,mouseup:this.Nm,mouseover:this.Mm,mouseout:this.Lm});this.a=a.g;this.g=[]}w(Cd,Bd);function Dd(a,b){a=a.g;var c=b.clientX;b=b.clientY;for(var d=0,e=a.length,f;d<e&&(f=a[d]);d++){var g=Math.abs(b-f[1]);if(25>=Math.abs(c-f[0])&&25>=g)return!0}return!1}function Ed(a){var b=Fd(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=Cd.prototype;
-k.Jm=function(a){if(!Dd(this,a)){(1).toString()in this.a&&this.cancel(a);var b=Ed(a);this.a[(1).toString()]=a;Gd(this.b,"pointerdown",b,a)}};k.Km=function(a){if(!Dd(this,a)){var b=Ed(a);Gd(this.b,"pointermove",b,a)}};k.Nm=function(a){if(!Dd(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=Ed(a),Gd(this.b,"pointerup",b,a),delete this.a[(1).toString()])}};k.Mm=function(a){if(!Dd(this,a)){var b=Ed(a);Hd(this.b,b,a)}};k.Lm=function(a){if(!Dd(this,a)){var b=Ed(a);Jd(this.b,b,a)}};
-k.cancel=function(a){var b=Ed(a);this.b.cancel(b,a);delete this.a[(1).toString()]};function Kd(a){Bd.call(this,a,{MSPointerDown:this.Sm,MSPointerMove:this.Tm,MSPointerUp:this.Wm,MSPointerOut:this.Um,MSPointerOver:this.Vm,MSPointerCancel:this.Rm,MSGotPointerCapture:this.Pm,MSLostPointerCapture:this.Qm});this.a=a.g;this.g=["","unavailable","touch","pen","mouse"]}w(Kd,Bd);function Ld(a,b){var c=b;"number"===typeof b.pointerType&&(c=Fd(b,b),c.pointerType=a.g[b.pointerType]);return c}k=Kd.prototype;
-k.Sm=function(a){this.a[a.pointerId.toString()]=a;var b=Ld(this,a);Gd(this.b,"pointerdown",b,a)};k.Tm=function(a){var b=Ld(this,a);Gd(this.b,"pointermove",b,a)};k.Wm=function(a){var b=Ld(this,a);Gd(this.b,"pointerup",b,a);delete this.a[a.pointerId.toString()]};k.Um=function(a){var b=Ld(this,a);Jd(this.b,b,a)};k.Vm=function(a){var b=Ld(this,a);Hd(this.b,b,a)};k.Rm=function(a){var b=Ld(this,a);this.b.cancel(b,a);delete this.a[a.pointerId.toString()]};
-k.Qm=function(a){this.b.b(new Md("lostpointercapture",a,a))};k.Pm=function(a){this.b.b(new Md("gotpointercapture",a,a))};function Nd(a){Bd.call(this,a,{pointerdown:this.Kp,pointermove:this.Lp,pointerup:this.Op,pointerout:this.Mp,pointerover:this.Np,pointercancel:this.Jp,gotpointercapture:this.Wl,lostpointercapture:this.Hm})}w(Nd,Bd);k=Nd.prototype;k.Kp=function(a){Od(this.b,a)};k.Lp=function(a){Od(this.b,a)};k.Op=function(a){Od(this.b,a)};k.Mp=function(a){Od(this.b,a)};k.Np=function(a){Od(this.b,a)};k.Jp=function(a){Od(this.b,a)};k.Hm=function(a){Od(this.b,a)};k.Wl=function(a){Od(this.b,a)};function Md(a,b,c){Qc.call(this,a);this.b=b;a=c?c:{};this.buttons=Pd(a);this.pressure=Qd(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey=
-"shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})}
-w(Md,Qc);function Pd(a){if(a.buttons||Rd)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function Qd(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var Rd=!1;try{Rd=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function Sd(a,b){Bd.call(this,a,{touchstart:this.Qq,touchmove:this.Pq,touchend:this.Oq,touchcancel:this.Nq});this.a=a.g;this.j=b;this.g=void 0;this.f=0;this.c=void 0}w(Sd,Bd);k=Sd.prototype;k.Ej=function(){this.f=0;this.c=void 0};
-function Td(a,b,c){b=Fd(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.f;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.g===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b}
-function Ud(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g<f;++g){var h=Td(a,b,e[g]);h.preventDefault=d;c.call(a,b,h)}}
-k.Qq=function(a){var b=a.touches,c=Object.keys(this.a),d=c.length;if(d>=b.length){var e=[],f;for(f=0;f<d;++f){var g=c[f];var h=this.a[g];var l;if(!(l=1==g))a:{for(var m=b.length,n=0;n<m;n++)if(l=b[n],l.identifier===g-2){l=!0;break a}l=!1}l||e.push(h.out)}for(f=0;f<e.length;++f)this.Of(a,e[f])}b=a.changedTouches[0];c=Object.keys(this.a).length;if(0===c||1===c&&(1).toString()in this.a)this.g=b.identifier,void 0!==this.c&&clearTimeout(this.c);Vd(this,a);this.f++;Ud(this,a,this.Fp)};
-k.Fp=function(a,b){this.a[b.pointerId]={target:b.target,out:b,pj:b.target};var c=this.b;b.bubbles=!0;Gd(c,"pointerover",b,a);c=this.b;b.bubbles=!1;Gd(c,"pointerenter",b,a);Gd(this.b,"pointerdown",b,a)};k.Pq=function(a){a.preventDefault();Ud(this,a,this.Om)};
-k.Om=function(a,b){var c=this.a[b.pointerId];if(c){var d=c.out,e=c.pj;Gd(this.b,"pointermove",b,a);d&&e!==b.target&&(d.relatedTarget=b.target,b.relatedTarget=e,d.target=e,b.target?(Jd(this.b,d,a),Hd(this.b,b,a)):(b.target=e,b.relatedTarget=null,this.Of(a,b)));c.out=b;c.pj=b.target}};k.Oq=function(a){Vd(this,a);Ud(this,a,this.Rq)};
-k.Rq=function(a,b){Gd(this.b,"pointerup",b,a);this.b.out(b,a);Wd(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.g=void 0,this.c=setTimeout(this.Ej.bind(this),200))};k.Nq=function(a){Ud(this,a,this.Of)};k.Of=function(a,b){this.b.cancel(b,a);this.b.out(b,a);Wd(this.b,b,a);delete this.a[b.pointerId];b.isPrimary&&(this.g=void 0,this.c=setTimeout(this.Ej.bind(this),200))};
-function Vd(a,b){var c=a.j.g;b=b.changedTouches[0];if(a.g===b.identifier){var d=[b.clientX,b.clientY];c.push(d);setTimeout(function(){var a=c.indexOf(d);-1<a&&c.splice(a,1)},2500)}};function Xd(a){Sc.call(this);this.f=a;this.g={};this.i={};this.a=[];td?Yd(this,new Nd(this)):ud?Yd(this,new Kd(this)):(a=new Cd(this),Yd(this,a),sd&&Yd(this,new Sd(this,a)));a=this.a.length;for(var b,c=0;c<a;c++)b=this.a[c],Zd(this,Object.keys(b.i))}w(Xd,Sc);function Yd(a,b){var c=Object.keys(b.i);c&&(c.forEach(function(a){var c=b.i[a];c&&(this.i[a]=c.bind(b))},a),a.a.push(b))}Xd.prototype.c=function(a){var b=this.i[a.type];b&&b(a)};
-function Zd(a,b){b.forEach(function(a){y(this.f,a,this.c,this)},a)}function $d(a,b){b.forEach(function(a){Mc(this.f,a,this.c,this)},a)}function Fd(a,b){for(var c={},d,e=0,f=ae.length;e<f;e++)d=ae[e][0],c[d]=a[d]||b[d]||ae[e][1];return c}function Wd(a,b,c){b.bubbles=!1;Gd(a,"pointerleave",b,c)}Xd.prototype.out=function(a,b){a.bubbles=!0;Gd(this,"pointerout",a,b)};Xd.prototype.cancel=function(a,b){Gd(this,"pointercancel",a,b)};
-function Jd(a,b,c){a.out(b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||Wd(a,b,c)}function Hd(a,b,c){b.bubbles=!0;Gd(a,"pointerover",b,c);var d=b.target,e=b.relatedTarget;d&&e&&d.contains(e)||(b.bubbles=!1,Gd(a,"pointerenter",b,c))}function Gd(a,b,c,d){a.b(new Md(b,d,c))}function Od(a,b){a.b(new Md(b.type,b,b))}Xd.prototype.ia=function(){for(var a=this.a.length,b,c=0;c<a;c++)b=this.a[c],$d(this,Object.keys(b.i));Sc.prototype.ia.call(this)};
-var ae=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]];function be(a,b){Sc.call(this);this.g=a;this.j=0;this.l=!1;this.i=[];this.D=b?b*nd:nd;this.c=null;a=this.g.a;this.N=0;this.o={};this.f=new Xd(a);this.a=null;this.s=y(this.f,"pointerdown",this.pm,this);this.v=y(this.f,"pointermove",this.mq,this)}w(be,Sc);function ce(a,b){var c=new Ad("click",a.g,b);a.b(c);0!==a.j?(clearTimeout(a.j),a.j=0,c=new Ad("dblclick",a.g,b),a.b(c)):a.j=setTimeout(function(){this.j=0;var a=new Ad("singleclick",this.g,b);this.b(a)}.bind(a),250)}
-function de(a,b){"pointerup"==b.type||"pointercancel"==b.type?delete a.o[b.pointerId]:"pointerdown"==b.type&&(a.o[b.pointerId]=!0);a.N=Object.keys(a.o).length}k=be.prototype;k.ci=function(a){de(this,a);var b=new Ad("pointerup",this.g,a);this.b(b);b.sj||this.l||0!==a.button||ce(this,this.c);0===this.N&&(this.i.forEach(Gc),this.i.length=0,this.l=!1,this.c=null,Pc(this.a),this.a=null)};
-k.pm=function(a){de(this,a);var b=new Ad("pointerdown",this.g,a);this.b(b);this.c=a;0===this.i.length&&(this.a=new Xd(document),this.i.push(y(this.a,"pointermove",this.mn,this),y(this.a,"pointerup",this.ci,this),y(this.f,"pointercancel",this.ci,this)))};k.mn=function(a){if(fe(this,a)){this.l=!0;var b=new Ad("pointerdrag",this.g,a,this.l);this.b(b)}a.preventDefault()};k.mq=function(a){this.b(new Ad(a.type,this.g,a,!(!this.c||!fe(this,a))))};
-function fe(a,b){return Math.abs(b.clientX-a.c.clientX)>a.D||Math.abs(b.clientY-a.c.clientY)>a.D}k.ia=function(){this.v&&(Gc(this.v),this.v=null);this.s&&(Gc(this.s),this.s=null);this.i.forEach(Gc);this.i.length=0;this.a&&(Pc(this.a),this.a=null);this.f&&(Pc(this.f),this.f=null);Sc.prototype.ia.call(this)};function ge(a,b){this.s=a;this.c=b;this.b=[];this.g=[];this.a={}}ge.prototype.clear=function(){this.b.length=0;this.g.length=0;lb(this.a)};function he(a){var b=a.b,c=a.g,d=b[0];1==b.length?(b.length=0,c.length=0):(b[0]=b.pop(),c[0]=c.pop(),ie(a,0));b=a.c(d);delete a.a[b];return d}ge.prototype.i=function(a){oa(!(this.c(a)in this.a),31);var b=this.s(a);return Infinity!=b?(this.b.push(a),this.g.push(b),this.a[this.c(a)]=!0,je(this,0,this.b.length-1),!0):!1};
-function ie(a,b){for(var c=a.b,d=a.g,e=c.length,f=c[b],g=d[b],h=b;b<e>>1;){var l=2*b+1,m=2*b+2;l=m<e&&d[m]<d[l]?m:l;c[b]=c[l];d[b]=d[l];b=l}c[b]=f;d[b]=g;je(a,h,b)}function je(a,b,c){var d=a.b;a=a.g;for(var e=d[c],f=a[c];c>b;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f}
-function ke(a){var b=a.s,c=a.b,d=a.g,e=0,f=c.length,g;for(g=0;g<f;++g){var h=c[g];var l=b(h);Infinity==l?delete a.a[a.c(h)]:(d[e]=l,c[e++]=h)}c.length=e;d.length=e;for(b=(a.b.length>>1)-1;0<=b;b--)ie(a,b)};function le(a,b){ge.call(this,function(b){return a.apply(null,b)},function(a){return a[0].lb()});this.v=b;this.j=0;this.f={}}w(le,ge);le.prototype.i=function(a){var b=ge.prototype.i.call(this,a);b&&y(a[0],"change",this.l,this);return b};le.prototype.l=function(a){a=a.target;var b=a.getState();if(2===b||3===b||4===b||5===b)Mc(a,"change",this.l,this),a=a.lb(),a in this.f&&(delete this.f[a],--this.j),this.v()};
-function me(a,b,c){for(var d=0,e=!1,f,g,h;a.j<b&&d<c&&0<a.b.length;)g=he(a)[0],h=g.lb(),f=g.getState(),5===f?e=!0:0!==f||h in a.f||(a.f[h]=!0,++a.j,++d,g.load());0===d&&e&&a.v()};function ne(a){return function(b){if(b)return[pa(b[0],a[0],a[2]),pa(b[1],a[1],a[3])]}}function oe(a){return a};function pe(a){return function(b,c,d){if(void 0!==b)return b=fc(a,b,d),b=pa(b+c,0,a.length-1),c=Math.floor(b),b!=c&&c<a.length-1?a[c]/Math.pow(a[c]/a[c+1],b-c):a[c]}}function qe(a,b,c){return function(d,e,f){if(void 0!==d)return d=Math.max(Math.floor(Math.log(b/d)/Math.log(a)+(-f/2+.5))+e,0),void 0!==c&&(d=Math.min(d,c)),b/Math.pow(a,d)}};function re(a){if(void 0!==a)return 0}function se(a,b){if(void 0!==a)return a+b}function ue(a){var b=2*Math.PI/a;return function(a,d){if(void 0!==a)return a=Math.floor((a+d)/b+.5)*b}}function we(){var a=va(5);return function(b,c){if(void 0!==b)return Math.abs(b+c)<=a?0:b+c}};function xe(a,b){a=void 0!==b?a.toFixed(b):""+a;b=a.indexOf(".");b=-1===b?a.length:b;return 2<b?a:Array(3-b).join("0")+a}function ye(a){a=(""+a).split(".");for(var b=["1","3"],c=0;c<Math.max(a.length,b.length);c++){var d=parseInt(a[c]||"0",10),e=parseInt(b[c]||"0",10);if(d>e)return 1;if(e>d)return-1}return 0};function ze(a,b){a[0]+=b[0];a[1]+=b[1];return a}function Ae(a,b){var c=b.Bd(),d=b.xa();b=d[0];d=d[1];var e=a[0]-b;a=a[1]-d;0===e&&0===a&&(e=1);var f=Math.sqrt(e*e+a*a);return[b+c*e/f,d+c*a/f]}function Be(a,b){var c=a[0];a=a[1];var d=b[0],e=b[1];b=d[0];d=d[1];var f=e[0];e=e[1];var g=f-b,h=e-d;c=0===g&&0===h?0:(g*(c-b)+h*(a-d))/(g*g+h*h||0);0>=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]}
-function Ce(a,b,c){b=wa(b+180,360)-180;var d=Math.abs(3600*b);c=c||0;var e=Math.pow(10,c),f=Math.floor(d/3600),g=Math.floor((d-3600*f)/60);d=Math.ceil((d-3600*f-60*g)*e)/e;60<=d&&(d=0,g+=1);60<=g&&(g=0,f+=1);return f+"\u00b0 "+xe(g)+"\u2032 "+xe(d,c)+"\u2033"+(0==b?"":" "+a.charAt(0>b?1:0))}function De(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function Ee(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c}
-function Fe(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d;return a}function Ge(a,b){a[0]*=b;a[1]*=b}function He(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function Ie(a,b){return Math.sqrt(He(a,b))}function Je(a,b){return He(a,Be(a,b))}function Ke(a,b){return De(a,"{x}, {y}",b)};function Me(a){return Math.pow(a,3)}function Oe(a){return 1-Me(1-a)}function Pe(a){return 3*a*a-2*a*a*a}function Qe(a){return a};function Re(){return!0}function Se(){return!1};function Te(a,b,c,d,e,f){for(var g=f?f:[],h=0;b<c;b+=d){var l=a[b],m=a[b+1];g[h++]=e[0]*l+e[2]*m+e[4];g[h++]=e[1]*l+e[3]*m+e[5]}f&&g.length!=h&&(g.length=h);return g}function Ue(a,b,c,d,e,f,g){for(var h=g?g:[],l=0,m;b<c;b+=d)for(h[l++]=a[b]+e,h[l++]=a[b+1]+f,m=b+2;m<b+d;++m)h[l++]=a[m];g&&h.length!=l&&(h.length=l);return h};var Ve=Array(6);function We(){return[1,0,0,1,0,0]}function Xe(a){return Ye(a,1,0,0,1,0,0)}function Ze(a,b){var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],l=b[0],m=b[1],n=b[2],p=b[3],q=b[4];b=b[5];a[0]=c*l+e*m;a[1]=d*l+f*m;a[2]=c*n+e*p;a[3]=d*n+f*p;a[4]=c*q+e*b+g;a[5]=d*q+f*b+h;return a}function Ye(a,b,c,d,e,f,g){a[0]=b;a[1]=c;a[2]=d;a[3]=e;a[4]=f;a[5]=g;return a}function $e(a,b){a[0]=b[0];a[1]=b[1];a[2]=b[2];a[3]=b[3];a[4]=b[4];a[5]=b[5];return a}
-function af(a,b){var c=b[0],d=b[1];b[0]=a[0]*c+a[2]*d+a[4];b[1]=a[1]*c+a[3]*d+a[5];return b}function bf(a,b){var c=Math.cos(b);b=Math.sin(b);Ze(a,Ye(Ve,c,b,-b,c,0,0))}function cf(a,b,c){return Ze(a,Ye(Ve,b,0,0,c,0,0))}function df(a,b,c){Ze(a,Ye(Ve,1,0,0,1,b,c))}function ef(a,b,c,d,e,f,g,h){var l=Math.sin(f);f=Math.cos(f);a[0]=d*f;a[1]=e*l;a[2]=-d*l;a[3]=e*f;a[4]=g*d*f-h*d*l+b;a[5]=g*e*l+h*e*f+c;return a}
-function ff(a){var b=a[0]*a[3]-a[1]*a[2];oa(0!==b,32);var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5];a[0]=f/b;a[1]=-d/b;a[2]=-e/b;a[3]=c/b;a[4]=(e*h-f*g)/b;a[5]=-(c*h-d*g)/b;return a};function gf(){Vc.call(this);this.s=Da();this.v=-1;this.i={};this.l=this.f=0;this.O=We()}w(gf,Vc);k=gf.prototype;k.Ib=function(a,b){b=b?b:[NaN,NaN];this.Nb(a[0],a[1],b,Infinity);return b};k.Bb=function(a){return this.Zc(a[0],a[1])};k.Zc=Se;k.G=function(a){this.v!=this.g&&(this.s=this.Ae(this.s),this.v=this.g);var b=this.s;a?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};k.Sb=function(a){return this.Wd(a*a)};
-k.mb=function(a,b){var c=this.O;a=Ob(a);var d="tile-pixels"==a.a?function(d,f,g){var e=a.G(),l=a.oe;e=db(l)/db(e);ef(c,l[0],l[3],e,-e,0,0,0);Te(d,0,d.length,g,c,f);return Yb(a,b)(d,f,g)}:Yb(a,b);this.Rc(d);return this};function hf(){gf.call(this);this.ja="XY";this.a=2;this.A=null}w(hf,gf);function jf(a){var b;"XY"==a?b=2:"XYZ"==a||"XYM"==a?b=3:"XYZM"==a&&(b=4);return b}k=hf.prototype;k.Zc=Se;k.Ae=function(a){return Qa(this.A,0,this.A.length,this.a,a)};k.fc=function(){return this.A.slice(0,this.a)};k.da=function(){return this.A};k.gc=function(){return this.A.slice(this.A.length-this.a)};k.ic=function(){return this.ja};
-k.Wd=function(a){this.l!=this.g&&(lb(this.i),this.f=0,this.l=this.g);if(0>a||0!==this.f&&a<=this.f)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=this.xd(a);if(c.da().length<this.A.length)return this.i[b]=c;this.f=a;return this};k.xd=function(){return this};k.pa=function(){return this.a};function kf(a,b,c){a.a=jf(b);a.ja=b;a.A=c}
-function lf(a,b,c,d){if(b)c=jf(b);else{for(b=0;b<d;++b){if(0===c.length){a.ja="XY";a.a=2;return}c=c[0]}c=c.length;var e;2==c?e="XY":3==c?e="XYZ":4==c&&(e="XYZM");b=e}a.ja=b;a.a=c}k.Rc=function(a){this.A&&(a(this.A,this.A,this.a),this.u())};
-k.rotate=function(a,b){var c=this.da();if(c){var d=c.length,e=this.pa(),f=c?c:[],g=Math.cos(a);a=Math.sin(a);var h=b[0];b=b[1];for(var l=0,m=0;m<d;m+=e){var n=c[m]-h,p=c[m+1]-b;f[l++]=h+n*g-p*a;f[l++]=b+n*a+p*g;for(n=m+2;n<m+e;++n)f[l++]=c[n]}c&&f.length!=l&&(f.length=l);this.u()}};
-k.scale=function(a,b,c){var d=b;void 0===d&&(d=a);var e=c;e||(e=eb(this.G()));if(c=this.da()){b=c.length;var f=this.pa(),g=c?c:[],h=e[0];e=e[1];for(var l=0,m=0;m<b;m+=f){var n=c[m]-h,p=c[m+1]-e;g[l++]=h+a*n;g[l++]=e+d*p;for(n=m+2;n<m+f;++n)g[l++]=c[n]}c&&g.length!=l&&(g.length=l);this.u()}};k.translate=function(a,b){var c=this.da();c&&(Ue(c,0,c.length,this.pa(),a,b,c),this.u())};function mf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d){var h=a[b],l=a[b+1];e+=g*h-f*l;f=h;g=l}return e/2}function nf(a,b,c,d){var e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e+=mf(a,b,h,d);b=h}return e};function of(a,b,c,d,e,f,g){var h=a[b],l=a[b+1],m=a[c]-h,n=a[c+1]-l;if(0!==m||0!==n)if(f=((e-h)*m+(f-l)*n)/(m*m+n*n),1<f)b=c;else if(0<f){for(e=0;e<d;++e)g[e]=ya(a[b+e],a[c+e],f);g.length=d;return}for(e=0;e<d;++e)g[e]=a[b+e];g.length=d}function pf(a,b,c,d,e){var f=a[b],g=a[b+1];for(b+=d;b<c;b+=d){var h=a[b],l=a[b+1];f=ua(f,g,h,l);f>e&&(e=f);f=h;g=l}return e}function qf(a,b,c,d,e){var f;var g=0;for(f=c.length;g<f;++g){var h=c[g];e=pf(a,b,h,d,e);b=h}return e}
-function tf(a,b,c,d,e,f,g,h,l,m,n){if(b==c)return m;if(0===e){var p=ua(g,h,a[b],a[b+1]);if(p<m){for(n=0;n<d;++n)l[n]=a[b+n];l.length=d;return p}return m}for(var q=n?n:[NaN,NaN],r=b+d;r<c;)if(of(a,r-d,r,d,g,h,q),p=ua(g,h,q[0],q[1]),p<m){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d;r+=d}else r+=d*Math.max((Math.sqrt(p)-Math.sqrt(m))/e|0,1);if(f&&(of(a,c-d,b,d,g,h,q),p=ua(g,h,q[0],q[1]),p<m)){m=p;for(n=0;n<d;++n)l[n]=q[n];l.length=d}return m}
-function uf(a,b,c,d,e,f,g,h,l,m,n){n=n?n:[NaN,NaN];var p;var q=0;for(p=c.length;q<p;++q){var r=c[q];m=tf(a,b,r,d,e,f,g,h,l,m,n);b=r}return m};function vf(a,b){var c=0,d;var e=0;for(d=b.length;e<d;++e)a[c++]=b[e];return c}function wf(a,b,c,d){var e;var f=0;for(e=c.length;f<e;++f){var g=c[f],h;for(h=0;h<d;++h)a[b++]=g[h]}return b}function xf(a,b,c,d,e){e=e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h)b=wf(a,b,c[h],d),e[f++]=b;e.length=f;return e};function yf(a,b,c,d,e){e=void 0!==e?e:[];for(var f=0;b<c;b+=d)e[f++]=a.slice(b,b+d);e.length=f;return e}function zf(a,b,c,d,e){e=void 0!==e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e[f++]=yf(a,b,l,d,e[f]);b=l}e.length=f;return e}function Af(a,b,c,d,e){e=void 0!==e?e:[];var f=0,g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e[f++]=zf(a,b,l,d,e[f]);b=l[l.length-1]}e.length=f;return e};function Bf(a,b,c,d,e,f,g){var h=(c-b)/d;if(3>h){for(;b<c;b+=d)f[g++]=a[b],f[g++]=a[b+1];return g}var l=Array(h);l[0]=1;l[h-1]=1;c=[b,c-d];for(var m=0,n;0<c.length;){var p=c.pop(),q=c.pop(),r=0,u=a[q],v=a[q+1],z=a[p],A=a[p+1];for(n=q+d;n<p;n+=d){var E=sa(a[n],a[n+1],u,v,z,A);E>r&&(m=n,r=E)}r>e&&(l[(m-b)/d]=1,q+d<m&&c.push(q,m),m+d<p&&c.push(m,p))}for(n=0;n<h;++n)l[n]&&(f[g++]=a[b+n*d],f[g++]=a[b+n*d+1]);return g}
-function Cf(a,b,c,d,e,f,g,h){var l;var m=0;for(l=c.length;m<l;++m){var n=c[m];a:{var p=a,q=n,r=d,u=e,v=f,z=g;if(b!=q){var A=u*Math.round(p[b]/u),E=u*Math.round(p[b+1]/u);b+=r;v[z++]=A;v[z++]=E;do{var S=u*Math.round(p[b]/u);g=u*Math.round(p[b+1]/u);b+=r;if(b==q){v[z++]=S;v[z++]=g;g=z;break a}}while(S==A&&g==E);for(;b<q;){var Ia=u*Math.round(p[b]/u);var ta=u*Math.round(p[b+1]/u);b+=r;if(Ia!=S||ta!=g){var la=S-A,ca=g-E,ia=Ia-A,xa=ta-E;la*xa==ca*ia&&(0>la&&ia<la||la==ia||0<la&&ia>la)&&(0>ca&&xa<ca||ca==
-xa||0<ca&&xa>ca)||(v[z++]=S,v[z++]=g,A=S,E=g);S=Ia;g=ta}}v[z++]=S;v[z++]=g}g=z}h.push(g);b=n}return g};function Df(a,b){hf.call(this);this.c=this.j=-1;this.na(a,b)}w(Df,hf);k=Df.prototype;k.clone=function(){var a=new Df(null);Ef(a,this.ja,this.A.slice());return a};k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;this.c!=this.g&&(this.j=Math.sqrt(pf(this.A,0,this.A.length,this.a,0)),this.c=this.g);return tf(this.A,0,this.A.length,this.a,this.j,!0,a,b,c,d)};k.Vn=function(){return mf(this.A,0,this.A.length,this.a)};k.W=function(){return yf(this.A,0,this.A.length,this.a)};
-k.xd=function(a){var b=[];b.length=Bf(this.A,0,this.A.length,this.a,a,b,0);a=new Df(null);Ef(a,"XY",b);return a};k.S=function(){return"LinearRing"};k.$a=function(){};k.na=function(a,b){a?(lf(this,b,a,1),this.A||(this.A=[]),this.A.length=wf(this.A,0,a,this.a),this.u()):Ef(this,"XY",null)};function Ef(a,b,c){kf(a,b,c);a.u()};function C(a,b){hf.call(this);this.na(a,b)}w(C,hf);k=C.prototype;k.clone=function(){var a=new C(null);a.ba(this.ja,this.A.slice());return a};k.Nb=function(a,b,c,d){var e=this.A;a=ua(a,b,e[0],e[1]);if(a<d){d=this.a;for(b=0;b<d;++b)c[b]=e[b];c.length=d;return a}return d};k.W=function(){return this.A?this.A.slice():[]};k.Ae=function(a){return Pa(this.A,a)};k.S=function(){return"Point"};k.$a=function(a){return Ka(a,this.A[0],this.A[1])};
-k.na=function(a,b){a?(lf(this,b,a,0),this.A||(this.A=[]),this.A.length=vf(this.A,a),this.u()):this.ba("XY",null)};k.ba=function(a,b){kf(this,a,b);this.u()};function Ff(a,b,c,d,e){return!Ua(e,function(e){return!Gf(a,b,c,d,e[0],e[1])})}function Gf(a,b,c,d,e,f){for(var g=0,h=a[c-d],l=a[c-d+1];b<c;b+=d){var m=a[b],n=a[b+1];l<=f?n>f&&0<(m-h)*(f-l)-(e-h)*(n-l)&&g++:n<=f&&0>(m-h)*(f-l)-(e-h)*(n-l)&&g--;h=m;l=n}return 0!==g}function Hf(a,b,c,d,e,f){if(0===c.length||!Gf(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;b<g;++b)if(Gf(a,c[b-1],c[b],d,e,f))return!1;return!0};function If(a,b,c,d,e,f,g){for(var h,l,m,n,p,q=e[f+1],r=[],u=0,v=c.length;u<v;++u){var z=c[u];m=a[z-d];p=a[z-d+1];for(h=b;h<z;h+=d){n=a[h];l=a[h+1];if(q<=p&&l<=q||p<=q&&q<=l)m=(q-p)/(l-p)*(n-m)+m,r.push(m);m=n;p=l}}u=NaN;v=-Infinity;r.sort(dc);m=r[0];h=1;for(l=r.length;h<l;++h)n=r[h],z=Math.abs(n-m),z>v&&(m=(m+n)/2,Hf(a,b,c,d,m,q)&&(u=m,v=z)),m=n;isNaN(u)&&(u=e[f]);return g?(g.push(u,q,v),g):[u,q,v]};function Jf(a,b,c,d,e,f){for(var g=[a[b],a[b+1]],h=[],l;b+d<c;b+=d){h[0]=a[b+d];h[1]=a[b+d+1];if(l=e.call(f,g,h))return l;g[0]=h[0];g[1]=h[1]}return!1};function Kf(a,b,c,d,e){var f=Ra(Da(),a,b,c,d);return hb(e,f)?La(e,f)||f[0]>=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:Jf(a,b,c,d,function(a,b){var c=!1,d=Ma(e,a),f=Ma(e,b);if(1===d||1===f)c=!0;else{var g=e[0],h=e[1],r=e[2],u=e[3],v=b[0];b=b[1];a=(b-a[1])/(v-a[0]);f&2&&!(d&2)&&(c=v-(b-u)/a,c=c>=g&&c<=r);c||!(f&4)||d&4||(c=b-(v-r)*a,c=c>=h&&c<=u);c||!(f&8)||d&8||(c=v-(b-h)/a,c=c>=g&&c<=r);c||!(f&16)||d&16||(c=b-(v-g)*a,c=c>=h&&c<=u)}return c}):!1}
-function Lf(a,b,c,d,e){var f=c[0];if(!(Kf(a,b,f,d,e)||Gf(a,b,f,d,e[0],e[1])||Gf(a,b,f,d,e[0],e[3])||Gf(a,b,f,d,e[2],e[1])||Gf(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;b<f;++b)if(Ff(a,c[b-1],c[b],d,e))return!1;return!0};function Mf(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];b<c;b+=d){var h=a[b],l=a[b+1];e+=(h-f)*(l+g);f=h;g=l}return 0<e}function Nf(a,b,c,d){var e=0;d=void 0!==d?d:!1;var f;var g=0;for(f=b.length;g<f;++g){var h=b[g];e=Mf(a,e,h,c);if(0===g){if(d&&e||!d&&!e)return!1}else if(d&&!e||!d&&e)return!1;e=h}return!0}
-function Of(a,b,c,d,e){e=void 0!==e?e:!1;var f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=Mf(a,b,h,d);if(0===g?e&&l||!e&&!l:e&&!l||!e&&l){l=a;for(var m=h,n=d;b<m-n;){var p;for(p=0;p<n;++p){var q=l[b+p];l[b+p]=l[m-n+p];l[m-n+p]=q}b+=n;m-=n}}b=h}return b}function Pf(a,b,c,d){var e=0,f;var g=0;for(f=b.length;g<f;++g)e=Of(a,e,b[g],c,d);return e};function D(a,b){hf.call(this);this.c=[];this.o=-1;this.D=null;this.T=this.C=this.B=-1;this.j=null;this.na(a,b)}w(D,hf);k=D.prototype;k.Hk=function(a){this.A?gc(this.A,a.da()):this.A=a.da().slice();this.c.push(this.A.length);this.u()};k.clone=function(){var a=new D(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};
-k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;this.C!=this.g&&(this.B=Math.sqrt(qf(this.A,0,this.c,this.a,0)),this.C=this.g);return uf(this.A,0,this.c,this.a,this.B,!0,a,b,c,d)};k.Zc=function(a,b){return Hf(this.Xb(),0,this.c,this.a,a,b)};k.Yn=function(){return nf(this.Xb(),0,this.c,this.a)};k.W=function(a){if(void 0!==a){var b=this.Xb().slice();Of(b,0,this.c,this.a,a)}else b=this.A;return zf(b,0,this.c,this.a)};k.pb=function(){return this.c};
-k.Td=function(){if(this.o!=this.g){var a=eb(this.G());this.D=If(this.Xb(),0,this.c,this.a,a,0);this.o=this.g}return this.D};k.tl=function(){return new C(this.Td(),"XYM")};k.zl=function(){return this.c.length};k.Wh=function(a){if(0>a||this.c.length<=a)return null;var b=new Df(null);Ef(b,this.ja,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b};k.Ud=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g],l=new Df(null);Ef(l,a,b.slice(e,h));d.push(l);e=h}return d};
-k.Xb=function(){if(this.T!=this.g){var a=this.A;Nf(a,this.c,this.a)?this.j=a:(this.j=a.slice(),this.j.length=Of(this.j,0,this.c,this.a));this.T=this.g}return this.j};k.xd=function(a){var b=[],c=[];b.length=Cf(this.A,0,this.c,this.a,Math.sqrt(a),b,0,c);a=new D(null);a.ba("XY",b,c);return a};k.S=function(){return"Polygon"};k.$a=function(a){return Lf(this.Xb(),0,this.c,this.a,a)};
-k.na=function(a,b){a?(lf(this,b,a,2),this.A||(this.A=[]),a=xf(this.A,0,a,this.a,this.c),this.A.length=0===a.length?0:a[a.length-1],this.u()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){kf(this,a,b);this.c=c;this.u()};function Qf(a,b,c,d){var e=d?d:32;d=[];var f;for(f=0;f<e;++f)gc(d,a.offset(b,c,2*Math.PI*f/e));d.push(d[0],d[1]);a=new D(null);a.ba("XY",d,[d.length]);return a}function Rf(a){var b=a[0],c=a[1],d=a[2];a=a[3];b=[b,c,b,a,d,a,d,c,b,c];c=new D(null);c.ba("XY",b,[b.length]);return c}
-function Sf(a,b,c){var d=b?b:32,e=a.pa();b=a.ja;var f=new D(null,b);d=e*(d+1);e=Array(d);for(var g=0;g<d;g++)e[g]=0;f.ba(b,e,[e.length]);Tf(f,a.xa(),a.Bd(),c);return f}function Tf(a,b,c,d){var e=a.da(),f=a.ja,g=a.pa(),h=a.pb(),l=e.length/g-1;d=d?d:0;for(var m,n,p=0;p<=l;++p)n=p*g,m=d+2*wa(p,l)*Math.PI/l,e[n]=b[0]+c*Math.cos(m),e[n+1]=b[1]+c*Math.sin(m);a.ba(f,e,h)};function F(a){Vc.call(this);a=kb({},a);this.f=[0,0];this.c=[];this.Ff=this.Ff.bind(this);this.v=Ub(a.projection);Vf(this,a)}w(F,Vc);
-function Vf(a,b){var c={};c.center=void 0!==b.center?b.center:null;var d=void 0!==b.minZoom?b.minZoom:0;var e=void 0!==b.maxZoom?b.maxZoom:28;var f=void 0!==b.zoomFactor?b.zoomFactor:2;if(void 0!==b.resolutions){var g=b.resolutions;var h=g[d];var l=void 0!==g[e]?g[e]:g[g.length-1];e=pe(g)}else{h=Ub(b.projection);l=h.G();g=(l?Math.max(cb(l),db(l)):360*ub.degrees/h.Bc())/256/Math.pow(2,0);var m=g/Math.pow(2,28);h=b.maxResolution;void 0!==h?d=0:h=g/Math.pow(f,d);l=b.minResolution;void 0===l&&(l=void 0!==
-b.maxZoom?void 0!==b.maxResolution?h/Math.pow(f,e):g/Math.pow(f,e):m);e=d+Math.floor(Math.log(h/l)/Math.log(f));l=h/Math.pow(f,e-d);e=qe(f,h,e-d)}a.a=h;a.i=l;a.D=f;a.j=b.resolutions;a.s=d;(void 0!==b.enableRotation?b.enableRotation:1)?(d=b.constrainRotation,d=void 0===d||!0===d?we():!1===d?se:"number"===typeof d?ue(d):se):d=re;a.l={center:void 0!==b.extent?ne(b.extent):oe,resolution:e,rotation:d};void 0!==b.resolution?c.resolution=b.resolution:void 0!==b.zoom&&(c.resolution=a.constrainResolution(a.a,
-b.zoom-a.s),a.j&&(c.resolution=pa(Number(a.Pa()||c.resolution),a.i,a.a)));c.rotation=void 0!==b.rotation?b.rotation:0;a.H(c);a.C=b}function $f(a,b){var c=kb({},a.C);void 0!==c.resolution?c.resolution=a.Pa():c.zoom=a.lg();c.center=a.xa();c.rotation=a.Sa();return kb({},c,b)}k=F.prototype;
-k.animate=function(a){var b=arguments.length;if(1<b&&"function"===typeof arguments[b-1]){var c=arguments[b-1];--b}if(ag(this)){for(var d=Date.now(),e=this.xa().slice(),f=this.Pa(),g=this.Sa(),h=[],l=0;l<b;++l){var m=arguments[l],n={start:d,complete:!1,anchor:m.anchor,duration:void 0!==m.duration?m.duration:1E3,easing:m.easing||Pe};m.center&&(n.ie=e,n.me=m.center,e=n.me);void 0!==m.zoom?(n.ke=f,n.kd=this.constrainResolution(this.a,m.zoom-this.s,0),f=n.kd):m.resolution&&(n.ke=f,n.kd=m.resolution,f=
-n.kd);void 0!==m.rotation&&(n.Df=g,n.ne=g+(wa(m.rotation-g+Math.PI,2*Math.PI)-Math.PI),g=n.ne);n.callback=c;n.ie&&n.me&&!Ee(n.ie,n.me)||n.ke!==n.kd||n.Df!==n.ne?d+=n.duration:n.complete=!0;h.push(n)}this.c.push(h);bg(this,0,1);this.Ff()}else b=arguments[b-1],b.center&&this.ub(b.center),void 0!==b.zoom&&this.Tj(b.zoom),void 0!==b.rotation&&this.ce(b.rotation),c&&c(!0)};k.Ac=function(){return 0<this.f[0]};k.Vh=function(){return 0<this.f[1]};
-k.rd=function(){bg(this,0,-this.f[0]);for(var a=0,b=this.c.length;a<b;++a){var c=this.c[a];c[0].callback&&c[0].callback(!1)}this.c.length=0};
-k.Ff=function(){void 0!==this.o&&(cancelAnimationFrame(this.o),this.o=void 0);if(this.Ac()){for(var a=Date.now(),b=!1,c=this.c.length-1;0<=c;--c){for(var d=this.c[c],e=!0,f=0,g=d.length;f<g;++f){var h=d[f];if(!h.complete){b=a-h.start;b=0<h.duration?b/h.duration:1;1<=b?(h.complete=!0,b=1):e=!1;b=h.easing(b);if(h.ie){var l=h.ie[0],m=h.ie[1];this.set("center",[l+b*(h.me[0]-l),m+b*(h.me[1]-m)])}h.ke&&h.kd&&(l=1===b?h.kd:h.ke+b*(h.kd-h.ke),h.anchor&&this.set("center",cg(this,l,h.anchor)),this.set("resolution",
-l));void 0!==h.Df&&void 0!==h.ne&&(b=1===b?wa(h.ne+Math.PI,2*Math.PI)-Math.PI:h.Df+b*(h.ne-h.Df),h.anchor&&this.set("center",dg(this,b,h.anchor)),this.set("rotation",b));b=!0;if(!h.complete)break}}e&&(this.c[c]=null,bg(this,0,-1),(d=d[0].callback)&&d(!0))}this.c=this.c.filter(Boolean);b&&void 0===this.o&&(this.o=requestAnimationFrame(this.Ff))}};function dg(a,b,c){var d=a.xa();if(void 0!==d){var e=[d[0]-c[0],d[1]-c[1]];Fe(e,b-a.Sa());ze(e,c)}return e}
-function cg(a,b,c){var d,e=a.xa();a=a.Pa();void 0!==e&&void 0!==a&&(d=[c[0]-b*(c[0]-e[0])/a,c[1]-b*(c[1]-e[1])/a]);return d}function eg(a){var b=[100,100];a='.ol-viewport[data-view="'+x(a)+'"]';if(a=document.querySelector(a))a=getComputedStyle(a),b[0]=parseInt(a.width,10),b[1]=parseInt(a.height,10);return b}k.Sc=function(a){return this.l.center(a)};k.constrainResolution=function(a,b,c){return this.l.resolution(a,b||0,c||0)};k.constrainRotation=function(a,b){return this.l.rotation(a,b||0)};k.xa=function(){return this.get("center")};
-k.qd=function(a){a=a||eg(this);var b=this.xa();oa(b,1);var c=this.Pa();oa(void 0!==c,2);var d=this.Sa();oa(void 0!==d,3);return fb(b,c,d,a)};k.sn=function(){return this.a};k.vn=function(){return this.i};k.tn=function(){return this.Me(this.i)};k.Cq=function(a){Vf(this,$f(this,{maxZoom:a}))};k.wn=function(){return this.Me(this.a)};k.Dq=function(a){Vf(this,$f(this,{minZoom:a}))};k.xn=function(){return this.v};k.Pa=function(){return this.get("resolution")};k.yn=function(){return this.j};
-k.Je=function(a,b){b=b||eg(this);return Math.max(cb(a)/b[0],db(a)/b[1])};function fg(a){var b=a.a,c=Math.log(b/a.i)/Math.log(2);return function(a){return b/Math.pow(2,a*c)}}k.Sa=function(){return this.get("rotation")};function gg(a){var b=a.a,c=Math.log(b/a.i)/Math.log(2);return function(a){return Math.log(b/a)/Math.log(2)/c}}k.getState=function(){var a=this.xa(),b=this.v,c=this.Pa(),d=this.Sa();return{center:a.slice(),projection:void 0!==b?b:null,resolution:c,rotation:d,zoom:this.lg()}};
-k.lg=function(){var a,b=this.Pa();void 0!==b&&(a=this.Me(b));return a};k.Me=function(a){var b=this.s||0,c;if(this.j){b=c=fc(this.j,a,1);var d=this.j[c];c=c==this.j.length-1?2:d/this.j[c+1]}else d=this.a,c=this.D;return b+Math.log(d/a)/Math.log(c)};k.$h=function(a){return this.constrainResolution(this.a,a-this.s,0)};
-k.Uf=function(a,b){b=b||{};var c=b.size;c||(c=eg(this));if(a instanceof hf)if("Circle"===a.S()){a=a.G();var d=Rf(a);d.rotate(this.Sa(),eb(a))}else d=a;else oa(Array.isArray(a),24),oa(!bb(a),25),d=Rf(a);var e=void 0!==b.padding?b.padding:[0,0,0,0],f=void 0!==b.constrainResolution?b.constrainResolution:!0,g=void 0!==b.nearest?b.nearest:!1,h;void 0!==b.minResolution?h=b.minResolution:void 0!==b.maxZoom?h=this.constrainResolution(this.a,b.maxZoom-this.s,0):h=0;var l=d.da(),m=this.Sa();a=Math.cos(-m);
-m=Math.sin(-m);var n=Infinity,p=Infinity,q=-Infinity,r=-Infinity;d=d.pa();for(var u=0,v=l.length;u<v;u+=d){var z=l[u]*a-l[u+1]*m,A=l[u]*m+l[u+1]*a;n=Math.min(n,z);p=Math.min(p,A);q=Math.max(q,z);r=Math.max(r,A)}c=this.Je([n,p,q,r],[c[0]-e[1]-e[3],c[1]-e[0]-e[2]]);c=isNaN(c)?h:Math.max(c,h);f&&(h=this.constrainResolution(c,0,0),!g&&h<c&&(h=this.constrainResolution(h,-1,0)),c=h);m=-m;h=(n+q)/2+(e[1]-e[3])/2*c;e=(p+r)/2+(e[0]-e[2])/2*c;a=[h*a-e*m,e*a+h*m];e=b.callback?b.callback:ea;void 0!==b.duration?
-this.animate({resolution:c,center:a,duration:b.duration,easing:b.easing},e):(this.gd(c),this.ub(a),setTimeout(e.bind(void 0,!0),0))};k.Nk=function(a,b,c){var d=this.Sa(),e=Math.cos(-d);d=Math.sin(-d);var f=a[0]*e-a[1]*d;a=a[1]*e+a[0]*d;var g=this.Pa();f+=(b[0]/2-c[0])*g;a+=(c[1]-b[1]/2)*g;d=-d;this.ub([f*e-a*d,a*e+f*d])};function ag(a){return!!a.xa()&&void 0!==a.Pa()}k.rotate=function(a,b){void 0!==b&&(b=dg(this,a,b),this.ub(b));this.ce(a)};k.ub=function(a){this.set("center",a);this.Ac()&&this.rd()};
-function bg(a,b,c){a.f[b]+=c;a.u()}k.gd=function(a){this.set("resolution",a);this.Ac()&&this.rd()};k.ce=function(a){this.set("rotation",a);this.Ac()&&this.rd()};k.Tj=function(a){this.gd(this.$h(a))};function hg(a,b){var c=document.createElement("CANVAS");a&&(c.width=a);b&&(c.height=b);return c.getContext("2d")}function ig(a,b){var c=b.parentNode;c&&c.replaceChild(a,b)}function jg(a){a&&a.parentNode&&a.parentNode.removeChild(a)};function kg(a){Vc.call(this);var b=kb({},a);b.opacity=void 0!==a.opacity?a.opacity:1;b.visible=void 0!==a.visible?a.visible:!0;b.zIndex=void 0!==a.zIndex?a.zIndex:0;b.maxResolution=void 0!==a.maxResolution?a.maxResolution:Infinity;b.minResolution=void 0!==a.minResolution?a.minResolution:0;this.H(b);this.a={layer:this,Te:!0}}w(kg,Vc);k=kg.prototype;k.S=function(){return this.type};
-function lg(a){a.a.opacity=pa(a.nc(),0,1);a.a.Vj=a.hg();a.a.visible=a.Jb();a.a.extent=a.G();a.a.zIndex=a.Ba();a.a.maxResolution=a.lc();a.a.minResolution=Math.max(a.mc(),0);return a.a}k.G=function(){return this.get("extent")};k.lc=function(){return this.get("maxResolution")};k.mc=function(){return this.get("minResolution")};k.nc=function(){return this.get("opacity")};k.Jb=function(){return this.get("visible")};k.Ba=function(){return this.get("zIndex")};k.Fc=function(a){this.set("extent",a)};
-k.Mc=function(a){this.set("maxResolution",a)};k.Nc=function(a){this.set("minResolution",a)};k.Gc=function(a){this.set("opacity",a)};k.Hc=function(a){this.set("visible",a)};k.$b=function(a){this.set("zIndex",a)};function mg(a){var b=a||{};a=kb({},b);delete a.layers;b=b.layers;kg.call(this,a);this.i=[];this.c={};y(this,Xc(ng),this.im,this);b?Array.isArray(b)?b=new B(b.slice(),{unique:!0}):oa(b instanceof B,43):b=new B(void 0,{unique:!0});this.Qi(b)}w(mg,kg);k=mg.prototype;k.Pe=function(){this.u()};
-k.im=function(){this.i.forEach(Gc);this.i.length=0;var a=this.Cd();this.i.push(y(a,"add",this.hm,this),y(a,"remove",this.jm,this));for(var b in this.c)this.c[b].forEach(Gc);lb(this.c);a=a.a;var c;b=0;for(c=a.length;b<c;b++){var d=a[b];this.c[x(d).toString()]=[y(d,"propertychange",this.Pe,this),y(d,"change",this.Pe,this)]}this.u()};k.hm=function(a){a=a.element;var b=x(a).toString();this.c[b]=[y(a,"propertychange",this.Pe,this),y(a,"change",this.Pe,this)];this.u()};
-k.jm=function(a){a=x(a.element).toString();this.c[a].forEach(Gc);delete this.c[a];this.u()};k.Cd=function(){return this.get(ng)};k.Qi=function(a){this.set(ng,a)};
-k.dg=function(a){var b=void 0!==a?a:[],c=b.length;this.Cd().forEach(function(a){a.dg(b)});a=lg(this);var d;for(d=b.length;c<d;c++){var e=b[c];e.opacity*=a.opacity;e.visible=e.visible&&a.visible;e.maxResolution=Math.min(e.maxResolution,a.maxResolution);e.minResolution=Math.max(e.minResolution,a.minResolution);void 0!==a.extent&&(e.extent=void 0!==e.extent?gb(e.extent,a.extent):a.extent)}return b};k.hg=function(){return"ready"};var ng="layers";var og=[],pg=[];function qg(a,b){switch(a){case "MAP_RENDERER":a=og;a.push(b);break;case "LAYER_RENDERER":a=pg;a.push(b);break;default:throw Error("Unsupported plugin type: "+a);}}function rg(a){for(var b=0,c=a.length;b<c;++b)qg("LAYER_RENDERER",a[b])};function G(a){Vc.call(this);var b=sg(a);this.ob=void 0!==a.loadTilesWhileAnimating?a.loadTilesWhileAnimating:!1;this.sc=void 0!==a.loadTilesWhileInteracting?a.loadTilesWhileInteracting:!1;this.ra=void 0!==a.pixelRatio?a.pixelRatio:nd;this.Md=b.logos;this.V=function(){this.j=void 0;this.pq.call(this)}.bind(this);this.La=We();this.If=We();this.bb=0;this.D=this.C=this.B=this.f=this.c=null;this.a=document.createElement("DIV");this.a.className="ol-viewport"+(sd?" ol-touch":"");this.a.style.position="relative";
-this.a.style.overflow="hidden";this.a.style.width="100%";this.a.style.height="100%";this.a.style.msTouchAction="none";this.a.style.touchAction="none";this.o=document.createElement("DIV");this.o.className="ol-overlaycontainer";this.a.appendChild(this.o);this.v=document.createElement("DIV");this.v.className="ol-overlaycontainer-stopevent";for(var c="click dblclick mousedown touchstart MSPointerDown pointerdown mousewheel wheel".split(" "),d=0,e=c.length;d<e;++d)y(this.v,c[d],Rc);this.a.appendChild(this.v);
-this.ca=new be(this,a.moveTolerance);for(var f in zd)y(this.ca,zd[f],this.bi,this);this.$=b.keyboardEventTarget;this.s=null;y(this.a,"wheel",this.yd,this);y(this.a,"mousewheel",this.yd,this);this.controls=b.controls||new B;this.interactions=b.interactions||new B;this.l=b.overlays;this.Fg={};this.pc=b.Im.create(this.a,this);this.T=null;this.Ea=[];this.ua=new le(this.Tl.bind(this),this.zm.bind(this));this.O={};y(this,Xc("layergroup"),this.fm,this);y(this,Xc("view"),this.Am,this);y(this,Xc("size"),this.um,
-this);y(this,Xc("target"),this.ym,this);this.H(b.values);this.controls.forEach(function(a){a.setMap(this)},this);y(this.controls,"add",function(a){a.element.setMap(this)},this);y(this.controls,"remove",function(a){a.element.setMap(null)},this);this.interactions.forEach(function(a){a.setMap(this)},this);y(this.interactions,"add",function(a){a.element.setMap(this)},this);y(this.interactions,"remove",function(a){a.element.setMap(null)},this);this.l.forEach(this.zh,this);y(this.l,"add",function(a){this.zh(a.element)},
-this);y(this.l,"remove",function(a){var b=a.element.id;void 0!==b&&delete this.Fg[b.toString()];a.element.setMap(null)},this)}w(G,Vc);k=G.prototype;k.Mf=function(a){this.controls.push(a)};k.Nf=function(a){this.interactions.push(a)};k.xe=function(a){this.hc().Cd().push(a)};k.ye=function(a){this.l.push(a)};k.zh=function(a){var b=a.id;void 0!==b&&(this.Fg[b.toString()]=a);a.setMap(this)};
-k.ia=function(){Pc(this.ca);Mc(this.a,"wheel",this.yd,this);Mc(this.a,"mousewheel",this.yd,this);void 0!==this.i&&(window.removeEventListener("resize",this.i,!1),this.i=void 0);this.j&&(cancelAnimationFrame(this.j),this.j=void 0);this.Ad(null);Vc.prototype.ia.call(this)};k.Tc=function(a,b,c){if(this.c)return a=this.Ra(a),c=void 0!==c?c:{},this.pc.wa(a,this.c,void 0!==c.hitTolerance?c.hitTolerance*this.c.pixelRatio:0,b,null,void 0!==c.layerFilter?c.layerFilter:Re,null)};
-k.Xf=function(a,b){var c=null;this.Tc(a,function(a){c||(c=[]);c.push(a)},b);return c};k.tg=function(a,b,c,d,e){if(this.c)return this.pc.Ti(a,this.c,b,void 0!==c?c:null,void 0!==d?d:Re,void 0!==e?e:null)};k.ng=function(a,b){if(!this.c)return!1;a=this.Ra(a);b=void 0!==b?b:{};return this.pc.Ui(a,this.c,void 0!==b.hitTolerance?b.hitTolerance*this.c.pixelRatio:0,void 0!==b.layerFilter?b.layerFilter:Re,null)};k.Sd=function(a){return this.Ra(this.ud(a))};
-k.ud=function(a){var b=this.a.getBoundingClientRect();a=a.changedTouches?a.changedTouches[0]:a;return[a.clientX-b.left,a.clientY-b.top]};k.Xd=function(){return this.get("target")};k.Cc=function(){var a=this.Xd();return void 0!==a?"string"===typeof a?document.getElementById(a):a:null};k.Ra=function(a){var b=this.c;return b?af(b.pixelToCoordinateTransform,a.slice()):null};k.Wf=function(){return this.controls};k.gg=function(){return this.l};
-k.fg=function(a){a=this.Fg[a.toString()];return void 0!==a?a:null};k.bg=function(){return this.interactions};k.hc=function(){return this.get("layergroup")};k.Xe=function(){return this.hc().Cd()};k.Ia=function(a){var b=this.c;return b?af(b.coordinateToPixelTransform,a.slice(0,2)):null};k.Ie=function(){return this.pc};k.Cb=function(){return this.get("size")};k.aa=function(){return this.get("view")};k.kg=function(){return this.a};
-k.Tl=function(a,b,c,d){var e=this.c;if(!(e&&b in e.wantedTiles&&e.wantedTiles[b][a.lb()]))return Infinity;a=c[0]-e.focus[0];c=c[1]-e.focus[1];return 65536*Math.log(d)+Math.sqrt(a*a+c*c)/d};k.yd=function(a,b){a=new ed(b||a.type,this,a);this.bi(a)};k.bi=function(a){if(this.c){this.T=a.coordinate;a.frameState=this.c;var b=this.interactions.a,c;if(!1!==this.b(a))for(c=b.length-1;0<=c;c--){var d=b[c];if(d.c()&&!d.handleEvent(a))break}}};
-k.sm=function(){var a=this.c,b=this.ua;if(0!==b.b.length){var c=16,d=c;if(a){var e=a.viewHints;e[0]&&(c=this.ob?8:0,d=2);e[1]&&(c=this.sc?8:0,d=2)}b.j<c&&(ke(b),me(b,c,d))}b=this.Ea;c=0;for(d=b.length;c<d;++c)b[c](this,a);b.length=0};k.um=function(){this.render()};
-k.ym=function(){var a;this.Xd()&&(a=this.Cc());if(this.s){for(var b=0,c=this.s.length;b<c;++b)Gc(this.s[b]);this.s=null}if(a){a.appendChild(this.a);var d=this.$?this.$:a;this.s=[y(d,"keydown",this.yd,this),y(d,"keypress",this.yd,this)];this.i||(this.i=this.Oc.bind(this),window.addEventListener("resize",this.i,!1))}else{a=this.pc;for(d in a.c)Pc(tg(a,d));jg(this.a);void 0!==this.i&&(window.removeEventListener("resize",this.i,!1),this.i=void 0)}this.Oc()};k.zm=function(){this.render()};k.ei=function(){this.render()};
-k.Am=function(){this.B&&(Gc(this.B),this.B=null);this.C&&(Gc(this.C),this.C=null);var a=this.aa();a&&(this.a.setAttribute("data-view",x(a)),this.B=y(a,"propertychange",this.ei,this),this.C=y(a,"change",this.ei,this));this.render()};k.fm=function(){this.D&&(this.D.forEach(Gc),this.D=null);var a=this.hc();a&&(this.D=[y(a,"propertychange",this.render,this),y(a,"change",this.render,this)]);this.render()};k.dh=function(){this.j&&cancelAnimationFrame(this.j);this.V()};
-k.render=function(){void 0===this.j&&(this.j=requestAnimationFrame(this.V))};k.Xg=function(a){return this.controls.remove(a)};k.Zg=function(a){return this.interactions.remove(a)};k.$g=function(a){return this.hc().Cd().remove(a)};k.ah=function(a){return this.l.remove(a)};
-k.pq=function(){var a=Date.now(),b,c=this.Cb(),d=this.aa(),e=Da(),f=this.c,g=null;if(void 0!==c&&0<c[0]&&0<c[1]&&d&&ag(d)){g=this.c?this.c.viewHints:void 0;void 0!==g?(g[0]=d.f[0],g[1]=d.f[1]):g=d.f.slice();var h=this.hc().dg(),l={};var m=0;for(b=h.length;m<b;++m)l[x(h[m].layer)]=h[m];m=d.getState();d=m.center;b=m.resolution/this.ra;d[0]=Math.round(d[0]/b)*b;d[1]=Math.round(d[1]/b)*b;g={animate:!1,coordinateToPixelTransform:this.La,extent:e,focus:this.T?this.T:d,index:this.bb++,layerStates:l,layerStatesArray:h,
-logos:kb({},this.Md),pixelRatio:this.ra,pixelToCoordinateTransform:this.If,postRenderFunctions:[],size:c,skippedFeatureUids:this.O,tileQueue:this.ua,time:a,usedTiles:{},viewState:m,viewHints:g,wantedTiles:{}}}g&&(g.extent=fb(m.center,m.resolution,m.rotation,g.size,e));this.c=g;this.pc.bh(g);g&&(g.animate&&this.render(),Array.prototype.push.apply(this.Ea,g.postRenderFunctions),!f||this.f&&(bb(this.f)||Sa(g.extent,this.f))||(this.b(new dd("movestart",this,f)),this.f=Oa(this.f)),!this.f||g.viewHints[0]||
-g.viewHints[1]||Sa(g.extent,this.f)||(this.b(new dd("moveend",this,g)),Ga(g.extent,this.f)));this.b(new dd("postrender",this,g));setTimeout(this.sm.bind(this),0)};k.zf=function(a){this.set("layergroup",a)};k.be=function(a){this.set("size",a)};k.Ad=function(a){this.set("target",a)};k.jh=function(a){this.set("view",a)};k.Uj=function(a){a=x(a).toString();this.O[a]=!0;this.render()};
-k.Oc=function(){var a=this.Cc();if(a){var b=getComputedStyle(a);this.be([a.offsetWidth-parseFloat(b.borderLeftWidth)-parseFloat(b.paddingLeft)-parseFloat(b.paddingRight)-parseFloat(b.borderRightWidth),a.offsetHeight-parseFloat(b.borderTopWidth)-parseFloat(b.paddingTop)-parseFloat(b.paddingBottom)-parseFloat(b.borderBottomWidth)])}else this.be(void 0)};k.Zj=function(a){a=x(a).toString();delete this.O[a];this.render()};var ug=["canvas","webgl"];
-function sg(a){var b=null;void 0!==a.keyboardEventTarget&&(b="string"===typeof a.keyboardEventTarget?document.getElementById(a.keyboardEventTarget):a.keyboardEventTarget);var c={},d={};if(void 0===a.logo||"boolean"===typeof a.logo&&a.logo)d["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAHGAAABxgEXwfpGAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAhNQTFRF////AP//AICAgP//AFVVQECA////K1VVSbbbYL/fJ05idsTYJFtbbcjbJllmZszWWMTOIFhoHlNiZszTa9DdUcHNHlNlV8XRIVdiasrUHlZjIVZjaMnVH1RlIFRkH1RkH1ZlasvYasvXVsPQH1VkacnVa8vWIVZjIFRjVMPQa8rXIVVkXsXRsNveIFVkIFZlIVVj3eDeh6GmbMvXH1ZkIFRka8rWbMvXIFVkIFVjIFVkbMvWH1VjbMvWIFVlbcvWIFVla8vVIFVkbMvWbMvVH1VkbMvWIFVlbcvWIFVkbcvVbMvWjNPbIFVkU8LPwMzNIFVkbczWIFVkbsvWbMvXIFVkRnB8bcvW2+TkW8XRIFVkIlZlJVloJlpoKlxrLl9tMmJwOWd0Omh1RXF8TneCT3iDUHiDU8LPVMLPVcLPVcPQVsPPVsPQV8PQWMTQWsTQW8TQXMXSXsXRX4SNX8bSYMfTYcfTYsfTY8jUZcfSZsnUaIqTacrVasrVa8jTa8rWbI2VbMvWbcvWdJObdcvUdszUd8vVeJaee87Yfc3WgJyjhqGnitDYjaarldPZnrK2oNbborW5o9bbo9fbpLa6q9ndrL3ArtndscDDutzfu8fJwN7gwt7gxc/QyuHhy+HizeHi0NfX0+Pj19zb1+Tj2uXk29/e3uLg3+Lh3+bl4uXj4ufl4+fl5Ofl5ufl5ujm5+jmySDnBAAAAFp0Uk5TAAECAgMEBAYHCA0NDg4UGRogIiMmKSssLzU7PkJJT1JTVFliY2hrdHZ3foSFhYeJjY2QkpugqbG1tre5w8zQ09XY3uXn6+zx8vT09vf4+Pj5+fr6/P39/f3+gz7SsAAAAVVJREFUOMtjYKA7EBDnwCPLrObS1BRiLoJLnte6CQy8FLHLCzs2QUG4FjZ5GbcmBDDjxJBXDWxCBrb8aM4zbkIDzpLYnAcE9VXlJSWlZRU13koIeW57mGx5XjoMZEUqwxWYQaQbSzLSkYGfKFSe0QMsX5WbjgY0YS4MBplemI4BdGBW+DQ11eZiymfqQuXZIjqwyadPNoSZ4L+0FVM6e+oGI6g8a9iKNT3o8kVzNkzRg5lgl7p4wyRUL9Yt2jAxVh6mQCogae6GmflI8p0r13VFWTHBQ0rWPW7ahgWVcPm+9cuLoyy4kCJDzCm6d8PSFoh0zvQNC5OjDJhQopPPJqph1doJBUD5tnkbZiUEqaCnB3bTqLTFG1bPn71kw4b+GFdpLElKIzRxxgYgWNYc5SCENVHKeUaltHdXx0dZ8uBI1hJ2UUDgq82CM2MwKeibqAvSO7MCABq0wXEPiqWEAAAAAElFTkSuQmCC"]=
-"https://openlayers.org/";else{var e=a.logo;"string"===typeof e?d[e]="":e instanceof HTMLElement?d[x(e).toString()]=e:e&&(oa("string"==typeof e.href,44),oa("string"==typeof e.src,45),d[e.src]=e.href)}e=a.layers instanceof mg?a.layers:new mg({layers:a.layers});c.layergroup=e;c.target=a.target;c.view=void 0!==a.view?a.view:new F;var f;void 0!==a.renderer?(Array.isArray(a.renderer)?f=a.renderer:"string"===typeof a.renderer?f=[a.renderer]:oa(!1,46),0<=f.indexOf("dom")&&(f=f.concat(ug))):f=ug;e=0;var g=
-f.length;a:for(;e<g;++e)for(var h=f[e],l=0,m=og.length;l<m;++l){var n=og[l];if(n.handles(h)){var p=n;break a}}if(!p)throw Error("Unable to create a map renderer for types: "+f.join(", "));if(void 0!==a.controls)if(Array.isArray(a.controls))var q=new B(a.controls.slice());else oa(a.controls instanceof B,47),q=a.controls;if(void 0!==a.interactions)if(Array.isArray(a.interactions))var r=new B(a.interactions.slice());else oa(a.interactions instanceof B,48),r=a.interactions;void 0!==a.overlays?Array.isArray(a.overlays)?
-a=new B(a.overlays.slice()):(oa(a.overlays instanceof B,49),a=a.overlays):a=new B;return{controls:q,interactions:r,keyboardEventTarget:b,logos:d,overlays:a,Im:p,values:c}};function vg(a){Vc.call(this);this.element=a.element?a.element:null;this.a=this.T=null;this.s=[];this.render=a.render?a.render:ea;a.target&&this.i(a.target)}w(vg,Vc);vg.prototype.ia=function(){jg(this.element);Vc.prototype.ia.call(this)};vg.prototype.f=function(){return this.a};
-vg.prototype.setMap=function(a){this.a&&jg(this.element);for(var b=0,c=this.s.length;b<c;++b)Gc(this.s[b]);this.s.length=0;if(this.a=a)(this.T?this.T:a.v).appendChild(this.element),this.render!==ea&&this.s.push(y(a,"postrender",this.render,this)),a.render()};vg.prototype.i=function(a){this.T="string"===typeof a?document.getElementById(a):a};var wg=function(){var a,b={};return function(c){a||(a=document.createElement("div").style);if(!(c in b)){a.font=c;var d=a.fontFamily;a.font="";if(!d)return null;b[c]=d.split(/,\s?/)}return b[c]}}();function xg(a){var b=kb({},a);delete b.source;kg.call(this,b);this.o=this.v=this.s=null;a.map&&this.setMap(a.map);y(this,Xc("source"),this.wm,this);this.hd(a.source?a.source:null)}w(xg,kg);function yg(a,b){return a.visible&&b>=a.minResolution&&b<a.maxResolution}k=xg.prototype;k.dg=function(a){a=a?a:[];a.push(lg(this));return a};k.ha=function(){return this.get("source")||null};k.hg=function(){var a=this.ha();return a?a.getState():"undefined"};k.yo=function(){this.u()};
-k.wm=function(){this.o&&(Gc(this.o),this.o=null);var a=this.ha();a&&(this.o=y(a,"change",this.yo,this));this.u()};k.setMap=function(a){this.s&&(Gc(this.s),this.s=null);a||this.u();this.v&&(Gc(this.v),this.v=null);a&&(this.s=y(a,"precompose",function(a){var b=lg(this);b.Te=!1;b.zIndex=Infinity;a.frameState.layerStatesArray.push(b);a.frameState.layerStates[x(this)]=b},this),this.v=y(this,"change",a.render,a),this.u())};k.hd=function(a){this.set("source",a)};function zg(a){a=a?a:{};this.v=document.createElement("UL");this.l=document.createElement("LI");this.v.appendChild(this.l);this.l.style.display="none";this.c=void 0!==a.collapsed?a.collapsed:!0;this.j=void 0!==a.collapsible?a.collapsible:!0;this.j||(this.c=!1);var b=void 0!==a.className?a.className:"ol-attribution",c=void 0!==a.tipLabel?a.tipLabel:"Attributions",d=void 0!==a.collapseLabel?a.collapseLabel:"\u00bb";"string"===typeof d?(this.o=document.createElement("span"),this.o.textContent=d):this.o=
-d;d=void 0!==a.label?a.label:"i";"string"===typeof d?(this.D=document.createElement("span"),this.D.textContent=d):this.D=d;var e=this.j&&!this.c?this.o:this.D;d=document.createElement("button");d.setAttribute("type","button");d.title=c;d.appendChild(e);y(d,"click",this.Bn,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control"+(this.c&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible");c.appendChild(this.v);c.appendChild(d);vg.call(this,{element:c,render:a.render?
-a.render:Ag,target:a.target});this.B=[];this.C=!0;this.O={}}w(zg,vg);
-function Ag(a){if(a=a.frameState){for(var b={},c=[],d=a.layerStatesArray,e=a.viewState.resolution,f=0,g=d.length;f<g;++f){var h=d[f];if(yg(h,e)&&(h=h.layer.ha())&&(h=h.C)&&(h=h(a)))if(Array.isArray(h))for(var l=0,m=h.length;l<m;++l)h[l]in b||(c.push(h[l]),b[h[l]]=!0);else h in b||(c.push(h),b[h]=!0)}if(!jc(c,this.B)){for(;this.v.lastChild!==this.l;)this.v.removeChild(this.v.lastChild);b=0;for(d=c.length;b<d;++b)e=document.createElement("LI"),e.innerHTML=c[b],this.v.appendChild(e);0===c.length&&0<
-this.B.length?this.element.classList.add("ol-logo-only"):0===this.B.length&&0<c.length&&this.element.classList.remove("ol-logo-only");b=0<c.length||!nb(a.logos);this.C!=b&&(this.element.style.display=b?"":"none",this.C=b);this.B=c;a=a.logos;c=this.O;for(p in c)p in a||(jg(c[p]),delete c[p]);for(var n in a)if(d=a[n],d instanceof HTMLElement&&(this.l.appendChild(d),c[n]=d),!(n in c)){var p=new Image;p.src=n;""===d?b=p:(b=document.createElement("a"),b.href=d,b.appendChild(p));this.l.appendChild(b);c[n]=
-b}this.l.style.display=nb(a)?"none":""}}else this.C&&(this.element.style.display="none",this.C=!1)}k=zg.prototype;k.Bn=function(a){a.preventDefault();Bg(this)};function Bg(a){a.element.classList.toggle("ol-collapsed");a.c?ig(a.o,a.D):ig(a.D,a.o);a.c=!a.c}k.An=function(){return this.j};k.Dn=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.c&&Bg(this))};k.Cn=function(a){this.j&&this.c!==a&&Bg(this)};k.zn=function(){return this.c};function Cg(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.c=null;"string"===typeof c?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=c):(this.c=c,this.c.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation";c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.c);y(c,"click",Cg.prototype.D,this);d=document.createElement("div");
-d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:Dg;this.l=a.resetNorth?a.resetNorth:void 0;vg.call(this,{element:d,render:b,target:a.target});this.v=void 0!==a.duration?a.duration:250;this.j=void 0!==a.autoHide?a.autoHide:!0;this.o=void 0;this.j&&this.element.classList.add("ol-hidden")}w(Cg,vg);Cg.prototype.D=function(a){a.preventDefault();void 0!==this.l?this.l():(a=this.a.aa())&&void 0!==a.Sa()&&(0<this.v?a.animate({rotation:0,duration:this.v,easing:Oe}):a.ce(0))};
-function Dg(a){if(a=a.frameState){a=a.viewState.rotation;if(a!=this.o){var b="rotate("+a+"rad)";if(this.j){var c=this.element.classList.contains("ol-hidden");c||0!==a?c&&0!==a&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.c.style.msTransform=b;this.c.style.webkitTransform=b;this.c.style.transform=b}this.o=a}};function Eg(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-zoom",c=void 0!==a.delta?a.delta:1,d=void 0!==a.zoomInLabel?a.zoomInLabel:"+",e=void 0!==a.zoomOutLabel?a.zoomOutLabel:"\u2212",f=void 0!==a.zoomInTipLabel?a.zoomInTipLabel:"Zoom in",g=void 0!==a.zoomOutTipLabel?a.zoomOutTipLabel:"Zoom out",h=document.createElement("button");h.className=b+"-in";h.setAttribute("type","button");h.title=f;h.appendChild("string"===typeof d?document.createTextNode(d):d);y(h,"click",Eg.prototype.j.bind(this,
-c));d=document.createElement("button");d.className=b+"-out";d.setAttribute("type","button");d.title=g;d.appendChild("string"===typeof e?document.createTextNode(e):e);y(d,"click",Eg.prototype.j.bind(this,-c));c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(h);c.appendChild(d);vg.call(this,{element:c,target:a.target});this.c=void 0!==a.duration?a.duration:250}w(Eg,vg);
-Eg.prototype.j=function(a,b){b.preventDefault();if(b=this.a.aa()){var c=b.Pa();c&&(a=b.constrainResolution(c,a),0<this.c?(b.Ac()&&b.rd(),b.animate({resolution:a,duration:this.c,easing:Oe})):b.gd(a))}};function Fg(a){a=a?a:{};var b=new B;(void 0!==a.zoom?a.zoom:1)&&b.push(new Eg(a.zoomOptions));(void 0!==a.rotate?a.rotate:1)&&b.push(new Cg(a.rotateOptions));(void 0!==a.attribution?a.attribution:1)&&b.push(new zg(a.attributionOptions));return b};function Gg(a,b,c){this.i=a;this.c=b;this.f=c;this.b=[];this.a=this.g=0}function Hg(a){a.b.length=0;a.g=0;a.a=0}function Ig(a){if(6>a.b.length)return!1;var b=Date.now()-a.f,c=a.b.length-3;if(a.b[c+2]<b)return!1;for(var d=c-3;0<d&&a.b[d+2]>b;)d-=3;b=a.b[c+2]-a.b[d+2];if(b<1E3/60)return!1;var e=a.b[c]-a.b[d];c=a.b[c+1]-a.b[d+1];a.g=Math.atan2(c,e);a.a=Math.sqrt(e*e+c*c)/b;return a.a>a.c};function Jg(a){Vc.call(this);this.v=null;this.Ha(!0);this.handleEvent=a.handleEvent}w(Jg,Vc);Jg.prototype.c=function(){return this.get("active")};Jg.prototype.i=function(){return this.v};Jg.prototype.Ha=function(a){this.set("active",a)};Jg.prototype.setMap=function(a){this.v=a};function Kg(a,b,c,d){if(void 0!==b){var e=a.Sa(),f=a.xa();void 0!==e&&f&&0<d?a.animate({rotation:b,anchor:c,duration:d,easing:Oe}):a.rotate(b,c)}}
-function Lg(a,b,c,d){var e=a.Pa();b=a.constrainResolution(e,b,0);if(void 0!==b){var f=a.j;b=pa(b,a.i||f[f.length-1],a.a||f[0])}c&&void 0!==b&&b!==e&&(f=a.xa(),c=cg(a,b,c),c=a.Sc(c),c=[(b*f[0]-e*c[0])/(b-e),(b*f[1]-e*c[1])/(b-e)]);Tg(a,b,c,d)}function Tg(a,b,c,d){if(b){var e=a.Pa(),f=a.xa();void 0!==e&&f&&b!==e&&d?a.animate({resolution:b,anchor:c,duration:d,easing:Oe}):(c&&(c=cg(a,b,c),a.ub(c)),a.gd(b))}};function Ug(a){a=a?a:{};this.a=a.delta?a.delta:1;Jg.call(this,{handleEvent:Vg});this.f=void 0!==a.duration?a.duration:250}w(Ug,Jg);function Vg(a){var b=!1,c=a.originalEvent;if("dblclick"==a.type){b=a.coordinate;c=c.shiftKey?-this.a:this.a;var d=a.map.aa();Lg(d,c,b,this.f);a.preventDefault();b=!0}return!b};function Wg(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey}function Xg(a){a=a.originalEvent;return a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}function Yg(a){a=a.originalEvent;return 0==a.button&&!(ld&&md&&a.ctrlKey)}function Zg(a){return"pointermove"==a.type}function $g(a){return"singleclick"==a.type}function ah(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&!a.shiftKey}
-function bh(a){a=a.originalEvent;return!a.altKey&&!(a.metaKey||a.ctrlKey)&&a.shiftKey}function ch(a){a=a.originalEvent.target.tagName;return"INPUT"!==a&&"SELECT"!==a&&"TEXTAREA"!==a}function dh(a){oa(a.b,56);return"mouse"==a.b.pointerType}function eh(a){a=a.b;return a.isPrimary&&0===a.button};function fh(a){a=a?a:{};Jg.call(this,{handleEvent:a.handleEvent?a.handleEvent:gh});this.ck=a.handleDownEvent?a.handleDownEvent:Se;this.Ek=a.handleDragEvent?a.handleDragEvent:ea;this.Kk=a.handleMoveEvent?a.handleMoveEvent:ea;this.Lk=a.handleUpEvent?a.handleUpEvent:Se;this.D=!1;this.$={};this.l=[]}w(fh,Jg);function hh(a){for(var b=a.length,c=0,d=0,e=0;e<b;e++)c+=a[e].clientX,d+=a[e].clientY;return[c/b,d/b]}
-function gh(a){if(!(a instanceof Ad))return!0;var b=!1,c=a.type;if("pointerdown"===c||"pointerdrag"===c||"pointerup"===c){c=a.b;var d=c.pointerId.toString();"pointerup"==a.type?delete this.$[d]:"pointerdown"==a.type?this.$[d]=c:d in this.$&&(this.$[d]=c);this.l=mb(this.$)}this.D?"pointerdrag"==a.type?this.Ek(a):"pointerup"==a.type&&(this.D=this.Lk(a)&&0<this.l.length):"pointerdown"==a.type?(this.D=a=this.ck(a),b=this.jd(a)):"pointermove"==a.type&&this.Kk(a);return!b}fh.prototype.jd=function(a){return a};function ih(a){fh.call(this,{handleDownEvent:jh,handleDragEvent:kh,handleUpEvent:lh});a=a?a:{};this.a=a.kinetic;this.f=null;this.o=a.condition?a.condition:ah;this.j=!1}w(ih,fh);function kh(a){var b=this.l,c=hh(b);if(b.length==this.s){if(this.a&&this.a.b.push(c[0],c[1],Date.now()),this.f){var d=this.f[0]-c[0],e=c[1]-this.f[1];a=a.map.aa();var f=a.getState();d=[d,e];Ge(d,f.resolution);Fe(d,f.rotation);ze(d,f.center);d=a.Sc(d);a.ub(d)}}else this.a&&Hg(this.a);this.f=c;this.s=b.length}
-function lh(a){var b=a.map;a=b.aa();if(0===this.l.length){if(!this.j&&this.a&&Ig(this.a)){var c=this.a;c=(c.c-c.a)/c.i;var d=this.a.g,e=a.xa();e=b.Ia(e);b=b.Ra([e[0]-c*Math.cos(d),e[1]-c*Math.sin(d)]);a.animate({center:a.Sc(b),duration:500,easing:Oe})}bg(a,1,-1);return!1}this.a&&Hg(this.a);this.f=null;return!0}
-function jh(a){if(0<this.l.length&&this.o(a)){var b=a.map.aa();this.f=null;this.D||bg(b,1,1);b.Ac()&&b.ub(a.frameState.viewState.center);this.a&&Hg(this.a);this.j=1<this.l.length;return!0}return!1}ih.prototype.jd=Se;function mh(a){a=a?a:{};fh.call(this,{handleDownEvent:nh,handleDragEvent:oh,handleUpEvent:ph});this.f=a.condition?a.condition:Xg;this.a=void 0;this.j=void 0!==a.duration?a.duration:250}w(mh,fh);function oh(a){if(dh(a)){var b=a.map,c=b.aa();if(c.l.rotation!==re){b=b.Cb();a=a.pixel;a=Math.atan2(b[1]/2-a[1],a[0]-b[0]/2);if(void 0!==this.a){b=a-this.a;var d=c.Sa();Kg(c,d-b)}this.a=a}}}
-function ph(a){if(!dh(a))return!0;a=a.map.aa();bg(a,1,-1);var b=a.Sa(),c=this.j;b=a.constrainRotation(b,0);Kg(a,b,void 0,c);return!1}function nh(a){return dh(a)&&Yg(a)&&this.f(a)?(bg(a.map.aa(),1,1),this.a=void 0,!0):!1}mh.prototype.jd=Se;function qh(a){this.Uc=null;this.a=document.createElement("div");this.a.style.position="absolute";this.a.className="ol-box "+a;this.g=this.c=this.b=null}w(qh,Oc);qh.prototype.ia=function(){this.setMap(null)};function rh(a){var b=a.c,c=a.g;a=a.a.style;a.left=Math.min(b[0],c[0])+"px";a.top=Math.min(b[1],c[1])+"px";a.width=Math.abs(c[0]-b[0])+"px";a.height=Math.abs(c[1]-b[1])+"px"}
-qh.prototype.setMap=function(a){if(this.b){this.b.o.removeChild(this.a);var b=this.a.style;b.left=b.top=b.width=b.height="inherit"}(this.b=a)&&this.b.o.appendChild(this.a)};function sh(a){var b=a.c,c=a.g;b=[b,[b[0],c[1]],c,[c[0],b[1]]].map(a.b.Ra,a.b);b[4]=b[0].slice();a.Uc?a.Uc.na([b]):a.Uc=new D([b])}qh.prototype.U=function(){return this.Uc};function th(a){fh.call(this,{handleDownEvent:uh,handleDragEvent:vh,handleUpEvent:wh});a=a?a:{};this.a=new qh(a.className||"ol-dragbox");this.o=void 0!==a.minArea?a.minArea:64;this.f=null;this.C=a.condition?a.condition:Re;this.s=a.boxEndCondition?a.boxEndCondition:xh}w(th,fh);function xh(a,b,c){a=c[0]-b[0];b=c[1]-b[1];return a*a+b*b>=this.o}function vh(a){if(dh(a)){var b=this.a,c=a.pixel;b.c=this.f;b.g=c;sh(b);rh(b);this.b(new yh(zh,a.coordinate,a))}}th.prototype.U=function(){return this.a.U()};
-th.prototype.j=ea;function wh(a){if(!dh(a))return!0;this.a.setMap(null);this.s(a,this.f,a.pixel)&&(this.j(a),this.b(new yh(Ah,a.coordinate,a)));return!1}function uh(a){if(dh(a)&&Yg(a)&&this.C(a)){this.f=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.f;b.c=this.f;b.g=c;sh(b);rh(b);this.b(new yh(Bh,a.coordinate,a));return!0}return!1}var Bh="boxstart",zh="boxdrag",Ah="boxend";function yh(a,b,c){Qc.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}w(yh,Qc);function Ch(a){a=a?a:{};var b=a.condition?a.condition:bh;this.B=void 0!==a.duration?a.duration:200;this.T=void 0!==a.out?a.out:!1;th.call(this,{condition:b,className:a.className||"ol-dragzoom"})}w(Ch,th);
-Ch.prototype.j=function(){var a=this.v,b=a.aa(),c=a.Cb(),d=this.U().G();if(this.T){var e=b.qd(c);d=[a.Ia(Wa(d)),a.Ia(Za(d))];a=Oa(void 0);var f;var g=0;for(f=d.length;g<f;++g)Ea(a,d[g]);d=b.Je(a,c);ib(e,1/d);d=e}c=b.constrainResolution(b.Je(d,c));e=eb(d);e=b.Sc(e);b.animate({resolution:c,center:e,duration:this.B,easing:Oe})};function Dh(a){Jg.call(this,{handleEvent:Eh});a=a||{};this.a=function(a){return ah(a)&&ch(a)};this.f=void 0!==a.condition?a.condition:this.a;this.j=void 0!==a.duration?a.duration:100;this.l=void 0!==a.pixelDelta?a.pixelDelta:128}w(Dh,Jg);
-function Eh(a){var b=!1;if("keydown"==a.type){var c=a.originalEvent.keyCode;if(this.f(a)&&(40==c||37==c||39==c||38==c)){b=a.map.aa();var d=b.Pa()*this.l,e=0,f=0;40==c?f=-d:37==c?e=-d:39==c?e=d:f=d;d=[e,f];Fe(d,b.Sa());c=this.j;if(e=b.xa())d=b.Sc([e[0]+d[0],e[1]+d[1]]),c?b.animate({duration:c,easing:Qe,center:d}):b.ub(d);a.preventDefault();b=!0}}return!b};function Fh(a){Jg.call(this,{handleEvent:Gh});a=a?a:{};this.f=a.condition?a.condition:ch;this.a=a.delta?a.delta:1;this.j=void 0!==a.duration?a.duration:100}w(Fh,Jg);function Gh(a){var b=!1;if("keydown"==a.type||"keypress"==a.type){var c=a.originalEvent.charCode;!this.f(a)||43!=c&&45!=c||(b=43==c?this.a:-this.a,c=a.map.aa(),Lg(c,b,void 0,this.j),a.preventDefault(),b=!0)}return!b};function Hh(a){Jg.call(this,{handleEvent:Ih});a=a||{};this.j=0;this.D=void 0!==a.duration?a.duration:250;this.$=void 0!==a.timeout?a.timeout:80;this.C=void 0!==a.useAnchor?a.useAnchor:!0;this.O=a.constrainResolution||!1;this.a=null;this.s=this.l=this.o=this.f=void 0}w(Hh,Jg);
-function Ih(a){var b=a.type;if("wheel"!==b&&"mousewheel"!==b)return!0;a.preventDefault();b=a.map;var c=a.originalEvent;this.C&&(this.a=a.coordinate);if("wheel"==a.type){var d=c.deltaY;jd&&c.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(d/=nd);c.deltaMode===WheelEvent.DOM_DELTA_LINE&&(d*=40)}else"mousewheel"==a.type&&(d=-c.wheelDeltaY,kd&&(d/=3));if(0===d)return!1;a=Date.now();void 0===this.f&&(this.f=a);if(!this.l||400<a-this.f)this.l=4>Math.abs(d)?Ph:Qh;if(this.l===Ph){b=b.aa();this.s?clearTimeout(this.s):
-bg(b,1,1);this.s=setTimeout(this.B.bind(this),400);c=b.Pa()*Math.pow(2,d/300);var e=b.i,f=b.a,g=0;c<e?(c=Math.max(c,e/1.5),g=1):c>f&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=cg(b,c,this.a);b.ub(b.Sc(h))}b.gd(c);0===g&&this.O&&b.animate({resolution:b.constrainResolution(c,0<d?-1:1),easing:Oe,anchor:this.a,duration:this.D});0<g?b.animate({resolution:e,easing:Oe,anchor:this.a,duration:500}):0>g&&b.animate({resolution:f,easing:Oe,anchor:this.a,duration:500});this.f=a;return!1}this.j+=d;d=Math.max(this.$-
-(a-this.f),0);clearTimeout(this.o);this.o=setTimeout(this.T.bind(this,b),d);return!1}Hh.prototype.B=function(){this.s=void 0;bg(this.v.aa(),1,-1)};Hh.prototype.T=function(a){a=a.aa();a.Ac()&&a.rd();Lg(a,-pa(this.j,-1,1),this.a,this.D);this.l=void 0;this.j=0;this.a=null;this.o=this.f=void 0};Hh.prototype.V=function(a){this.C=a;a||(this.a=null)};var Ph="trackpad",Qh="wheel";function Rh(a){fh.call(this,{handleDownEvent:Sh,handleDragEvent:Th,handleUpEvent:Uh});a=a||{};this.f=null;this.j=void 0;this.a=!1;this.s=0;this.C=void 0!==a.threshold?a.threshold:.3;this.o=void 0!==a.duration?a.duration:250}w(Rh,fh);
-function Th(a){var b=0,c=this.l[0],d=this.l[1];c=Math.atan2(d.clientY-c.clientY,d.clientX-c.clientX);void 0!==this.j&&(b=c-this.j,this.s+=b,!this.a&&Math.abs(this.s)>this.C&&(this.a=!0));this.j=c;a=a.map;c=a.aa();if(c.l.rotation!==re){d=a.a.getBoundingClientRect();var e=hh(this.l);e[0]-=d.left;e[1]-=d.top;this.f=a.Ra(e);this.a&&(d=c.Sa(),a.render(),Kg(c,d+b,this.f))}}
-function Uh(a){if(2>this.l.length){a=a.map.aa();bg(a,1,-1);if(this.a){var b=a.Sa(),c=this.f,d=this.o;b=a.constrainRotation(b,0);Kg(a,b,c,d)}return!1}return!0}function Sh(a){return 2<=this.l.length?(a=a.map,this.f=null,this.j=void 0,this.a=!1,this.s=0,this.D||bg(a.aa(),1,1),!0):!1}Rh.prototype.jd=Se;function Vh(a){fh.call(this,{handleDownEvent:Wh,handleDragEvent:Xh,handleUpEvent:Yh});a=a?a:{};this.s=a.constrainResolution||!1;this.f=null;this.o=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}w(Vh,fh);
-function Xh(a){var b=1,c=this.l[0],d=this.l[1],e=c.clientX-d.clientX;c=c.clientY-d.clientY;e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;e=a.aa();d=e.Pa();var f=e.a,g=e.i;c=d*b;c>f?(b=f/d,c=f):c<g&&(b=g/d,c=g);1!=b&&(this.j=b);b=a.a.getBoundingClientRect();d=hh(this.l);d[0]-=b.left;d[1]-=b.top;this.f=a.Ra(d);a.render();Tg(e,c,this.f)}
-function Yh(a){if(2>this.l.length){a=a.map.aa();bg(a,1,-1);var b=a.Pa();if(this.s||b<a.i||b>a.a){var c=this.f,d=this.o;b=a.constrainResolution(b,0,this.j-1);Tg(a,b,c,d)}return!1}return!0}function Wh(a){return 2<=this.l.length?(a=a.map,this.f=null,this.a=void 0,this.j=1,this.D||bg(a.aa(),1,1),!0):!1}Vh.prototype.jd=Se;function Zh(a){a=a?a:{};var b=new B,c=new Gg(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new mh);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new Ug({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new ih({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new Rh);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new Vh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));if(void 0!==a.keyboard?
-a.keyboard:1)b.push(new Dh),b.push(new Fh({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new Hh({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new Ch({duration:a.zoomDuration}));return b};function $h(a,b,c,d){Sc.call(this);this.extent=a;this.a=c;this.resolution=b;this.state=d}w($h,Sc);$h.prototype.u=function(){this.b("change")};$h.prototype.G=function(){return this.extent};$h.prototype.getState=function(){return this.state};function ai(a,b,c,d,e){this.c=void 0!==e?e:null;$h.call(this,a,b,c,void 0!==e?0:2);this.g=d}w(ai,$h);ai.prototype.i=function(a){this.state=a?3:2;this.u()};ai.prototype.load=function(){0==this.state&&(this.state=1,this.u(),this.c(this.i.bind(this)))};ai.prototype.Y=function(){return this.g};function bi(a,b,c,d,e){Qc.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}w(bi,Qc);function ci(a){Sc.call(this);this.highWaterMark=void 0!==a?a:2048;this.i=0;this.a={};this.c=this.g=null}w(ci,Sc);function di(a){return a.i>a.highWaterMark}k=ci.prototype;k.clear=function(){this.i=0;this.a={};this.c=this.g=null;this.b("clear")};k.forEach=function(a,b){for(var c=this.g;c;)a.call(b,c.Pc,c.jc,this),c=c.kb};
-k.get=function(a){a=this.a[a];oa(void 0!==a,15);if(a===this.c)return a.Pc;a===this.g?(this.g=this.g.kb,this.g.Pb=null):(a.kb.Pb=a.Pb,a.Pb.kb=a.kb);a.kb=null;a.Pb=this.c;this.c=this.c.kb=a;return a.Pc};k.remove=function(a){var b=this.a[a];oa(void 0!==b,15);if(b===this.c){if(this.c=b.Pb)this.c.kb=null}else if(b===this.g){if(this.g=b.kb)this.g.Pb=null}else b.kb.Pb=b.Pb,b.Pb.kb=b.kb;delete this.a[a];--this.i;return b.Pc};
-k.pop=function(){var a=this.g;delete this.a[a.jc];a.kb&&(a.kb.Pb=null);this.g=a.kb;this.g||(this.c=null);--this.i;return a.Pc};k.replace=function(a,b){this.get(a);this.a[a].Pc=b};k.set=function(a,b){oa(!(a in this.a),16);b={jc:a,kb:null,Pb:this.c,Pc:b};this.c?this.c.kb=b:this.g=b;this.c=b;this.a[a]=b;++this.i};var ei=[0,0,0,1],fi=[],gi=[0,0,0,1],hi=[0,0,0,0],ii=new ci,ji={},ki=null,li={},ni=function(){function a(a){var b=mi();b.font="32px monospace";f=b.measureText("wmytzilWMYTZIL@#/&?$%10").width;var c=!0;"monospace"!=a&&(b.font="32px "+a+",monospace",c=b.measureText("wmytzilWMYTZIL@#/&?$%10").width!=f);return c}function b(){var b=!0,f;for(f in c)60>c[f]&&(a(f)?(c[f]=60,lb(li),ki=null,d.clear()):(++c[f],b=!1));b&&(window.clearInterval(e),e=void 0)}var c=ji,d=ii,e,f;return function(d){if(d=wg(d))for(var f=
-0,g=d.length;f<g;++f){var m=d[f];m in c||(c[m]=60,a(m)||(c[m]=0,void 0===e&&(e=window.setInterval(b,32))))}}}();function mi(){var a=ki;a||(a=ki=hg(1,1));return a}
-var oi=function(){var a;return function(b){var c=li[b];void 0==c&&(a||(a=document.createElement("span"),a.textContent="M",a.style.margin=a.style.padding="0 !important",a.style.position="absolute !important",a.style.left="-99999px !important"),a.style.font=b,document.body.appendChild(a),c=li[b]=a.offsetHeight,document.body.removeChild(a));return c}}();function pi(a,b){var c=mi();a!=c.font&&(c.font=a);return c.measureText(b).width}
-function qi(a,b,c,d){0!==b&&(a.translate(c,d),a.rotate(b),a.translate(-c,-d))}var ri=We();function si(a,b,c,d,e,f,g,h,l,m,n){if(1!=c){var p=a.globalAlpha;a.globalAlpha=p*c}b&&a.setTransform.apply(a,b);a.drawImage(d,e,f,g,h,l,m,g*n,h*n);p&&(a.globalAlpha=p);b&&a.setTransform.apply(a,ri)};var ti=/^#(?:[0-9a-f]{3,4}){1,2}$/i,ui=/^([a-z]*)$/i;function vi(a){return Array.isArray(a)?a:wi(a)}function xi(a){if("string"!==typeof a){var b=a[0];b!=(b|0)&&(b=b+.5|0);var c=a[1];c!=(c|0)&&(c=c+.5|0);var d=a[2];d!=(d|0)&&(d=d+.5|0);a="rgba("+b+","+c+","+d+","+(void 0===a[3]?1:a[3])+")"}return a}
-var wi=function(){var a={},b=0;return function(c){if(a.hasOwnProperty(c))var d=a[c];else{if(1024<=b){d=0;for(var e in a)0===(d++&3)&&(delete a[e],--b)}d=c;ui.exec(d)&&(e=document.createElement("div"),e.style.color=d,document.body.appendChild(e),d=getComputedStyle(e).color,document.body.removeChild(e));if(ti.exec(d)){e=d.length-1;var f=4>=e?1:2;var g=4===e||8===e;e=parseInt(d.substr(1+0*f,f),16);var h=parseInt(d.substr(1+1*f,f),16);var l=parseInt(d.substr(1+2*f,f),16);d=g?parseInt(d.substr(1+3*f,f),
-16):255;1==f&&(e=(e<<4)+e,h=(h<<4)+h,l=(l<<4)+l,g&&(d=(d<<4)+d));f=[e,h,l,d/255]}else 0==d.indexOf("rgba(")?(d=d.slice(5,-1).split(",").map(Number),f=yi(d)):0==d.indexOf("rgb(")?(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=yi(d)):oa(!1,14);d=f;a[c]=d;++b}return d}}();function yi(a){var b=[];b[0]=pa(a[0]+.5|0,0,255);b[1]=pa(a[1]+.5|0,0,255);b[2]=pa(a[2]+.5|0,0,255);b[3]=pa(a[3],0,1);return b};function zi(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:xi(a)};function Ai(){}k=Ai.prototype;k.Hh=function(){};k.Hb=function(){};k.Dd=function(){};k.cc=function(){};k.Ce=function(){};k.De=function(){};k.uc=function(){};k.vc=function(){};k.wc=function(){};k.xc=function(){};k.yc=function(){};k.zc=function(){};k.Wb=function(){};k.Oa=function(){};k.Zb=function(){};k.nb=function(){};function Bi(a,b,c,d,e){this.g=a;this.f=b;this.c=c;this.N=d;this.ob=e;this.M=this.b=this.a=this.Wa=this.O=this.T=null;this.$=this.V=this.v=this.B=this.C=this.D=0;this.ca=!1;this.i=this.ab=0;this.ra=!1;this.oa=0;this.ta="";this.Ub=this.ua=0;this.Ea=!1;this.s=this.La=0;this.qa=this.l=this.j=null;this.o=[];this.bb=We()}w(Bi,Ai);
-function Ci(a,b,c){if(a.M){b=Te(b,0,c,2,a.N,a.o);c=a.g;var d=a.bb,e=c.globalAlpha;1!=a.v&&(c.globalAlpha=e*a.v);var f=a.ab;a.ca&&(f+=a.ob);var g;var h=0;for(g=b.length;h<g;h+=2){var l=b[h]-a.D,m=b[h+1]-a.C;a.ra&&(l=Math.round(l),m=Math.round(m));if(0!==f||1!=a.i){var n=l+a.D,p=m+a.C;ef(d,n,p,a.i,a.i,f,-n,-p);c.setTransform.apply(c,d)}c.drawImage(a.M,a.V,a.$,a.oa,a.B,l,m,a.oa,a.B)}0===f&&1==a.i||c.setTransform(1,0,0,1,0,0);1!=a.v&&(c.globalAlpha=e)}}
-function Di(a,b,c,d){var e=0;if(a.qa&&""!==a.ta){a.j&&Ei(a,a.j);a.l&&Fi(a,a.l);var f=a.qa,g=a.g,h=a.Wa,l=f.textAlign?f.textAlign:"center";h?(h.font!=f.font&&(h.font=g.font=f.font),h.textAlign!=l&&(h.textAlign=l),h.textBaseline!=f.textBaseline&&(h.textBaseline=g.textBaseline=f.textBaseline)):(g.font=f.font,g.textAlign=l,g.textBaseline=f.textBaseline,a.Wa={font:f.font,textAlign:l,textBaseline:f.textBaseline});b=Te(b,e,c,d,a.N,a.o);f=a.g;g=a.La;for(a.Ea&&(g+=a.ob);e<c;e+=d){h=b[e]+a.ua;l=b[e+1]+a.Ub;
-if(0!==g||1!=a.s){var m=ef(a.bb,h,l,a.s,a.s,g,-h,-l);f.setTransform.apply(f,m)}a.l&&f.strokeText(a.ta,h,l);a.j&&f.fillText(a.ta,h,l)}0===g&&1==a.s||f.setTransform(1,0,0,1,0,0)}}function Gi(a,b,c,d,e,f){var g=a.g;a=Te(b,c,d,e,a.N,a.o);g.moveTo(a[0],a[1]);b=a.length;f&&(b-=2);for(c=2;c<b;c+=2)g.lineTo(a[c],a[c+1]);f&&g.closePath();return d}function Hi(a,b,c,d,e){var f;var g=0;for(f=d.length;g<f;++g)c=Gi(a,b,c,d[g],e,!0);return c}k=Bi.prototype;
-k.cc=function(a){if(hb(this.c,a.G())){if(this.a||this.b){this.a&&Ei(this,this.a);this.b&&Fi(this,this.b);var b=this.N;var c=this.o,d=a.da();b=d?Te(d,0,d.length,a.pa(),b,c):null;c=b[2]-b[0];d=b[3]-b[1];c=Math.sqrt(c*c+d*d);d=this.g;d.beginPath();d.arc(b[0],b[1],c,0,2*Math.PI);this.a&&d.fill();this.b&&d.stroke()}""!==this.ta&&Di(this,a.xa(),2,2)}};k.Dd=function(a){this.Oa(a.Fa(),a.Ga());this.Zb(a.Y());this.nb(a.Ka())};
-k.Hb=function(a){switch(a.S()){case "Point":this.yc(a);break;case "LineString":this.uc(a);break;case "Polygon":this.zc(a);break;case "MultiPoint":this.wc(a);break;case "MultiLineString":this.vc(a);break;case "MultiPolygon":this.xc(a);break;case "GeometryCollection":this.De(a);break;case "Circle":this.cc(a)}};k.Ce=function(a,b){(a=(0,b.cb)(a))&&hb(this.c,a.G())&&(this.Dd(b),this.Hb(a))};k.De=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.Hb(a[c])};
-k.yc=function(a){var b=a.da();a=a.pa();this.M&&Ci(this,b,b.length);""!==this.ta&&Di(this,b,b.length,a)};k.wc=function(a){var b=a.da();a=a.pa();this.M&&Ci(this,b,b.length);""!==this.ta&&Di(this,b,b.length,a)};k.uc=function(a){if(hb(this.c,a.G())){if(this.b){Fi(this,this.b);var b=this.g,c=a.da();b.beginPath();Gi(this,c,0,c.length,a.pa(),!1);b.stroke()}""!==this.ta&&(a=a.Fe(),Di(this,a,2,2))}};
-k.vc=function(a){var b=a.G();if(hb(this.c,b)){if(this.b){Fi(this,this.b);b=this.g;var c=a.da(),d=0,e=a.pb(),f=a.pa();b.beginPath();var g;var h=0;for(g=e.length;h<g;++h)d=Gi(this,c,d,e[h],f,!1);b.stroke()}""!==this.ta&&(a=a.Ge(),Di(this,a,a.length,2))}};k.zc=function(a){if(hb(this.c,a.G())){if(this.b||this.a){this.a&&Ei(this,this.a);this.b&&Fi(this,this.b);var b=this.g;b.beginPath();Hi(this,a.Xb(),0,a.pb(),a.pa());this.a&&b.fill();this.b&&b.stroke()}""!==this.ta&&(a=a.Td(),Di(this,a,2,2))}};
-k.xc=function(a){if(hb(this.c,a.G())){if(this.b||this.a){this.a&&Ei(this,this.a);this.b&&Fi(this,this.b);var b=this.g,c=Ii(a),d=0,e=a.td(),f=a.pa(),g;b.beginPath();var h=0;for(g=e.length;h<g;++h)d=Hi(this,c,d,e[h],f);this.a&&b.fill();this.b&&b.stroke()}""!==this.ta&&(a=Ji(a),Di(this,a,a.length,2))}};function Ei(a,b){var c=a.g,d=a.T;d?d.fillStyle!=b.fillStyle&&(d.fillStyle=c.fillStyle=b.fillStyle):(c.fillStyle=b.fillStyle,a.T={fillStyle:b.fillStyle})}
-function Fi(a,b){var c=a.g,d=a.O;d?(d.lineCap!=b.lineCap&&(d.lineCap=c.lineCap=b.lineCap),od&&(jc(d.lineDash,b.lineDash)||c.setLineDash(d.lineDash=b.lineDash),d.lineDashOffset!=b.lineDashOffset&&(d.lineDashOffset=c.lineDashOffset=b.lineDashOffset)),d.lineJoin!=b.lineJoin&&(d.lineJoin=c.lineJoin=b.lineJoin),d.lineWidth!=b.lineWidth&&(d.lineWidth=c.lineWidth=b.lineWidth),d.miterLimit!=b.miterLimit&&(d.miterLimit=c.miterLimit=b.miterLimit),d.strokeStyle!=b.strokeStyle&&(d.strokeStyle=c.strokeStyle=b.strokeStyle)):
-(c.lineCap=b.lineCap,od&&(c.setLineDash(b.lineDash),c.lineDashOffset=b.lineDashOffset),c.lineJoin=b.lineJoin,c.lineWidth=b.lineWidth,c.miterLimit=b.miterLimit,c.strokeStyle=b.strokeStyle,a.O={lineCap:b.lineCap,lineDash:b.lineDash,lineDashOffset:b.lineDashOffset,lineJoin:b.lineJoin,lineWidth:b.lineWidth,miterLimit:b.miterLimit,strokeStyle:b.strokeStyle})}
-k.Oa=function(a,b){a?(a=a.b,this.a={fillStyle:zi(a?a:ei)}):this.a=null;if(b){a=b.a;var c=b.f,d=b.g,e=b.i,f=b.j,g=b.c;b=b.l;this.b={lineCap:void 0!==c?c:"round",lineDash:d?d:fi,lineDashOffset:e?e:0,lineJoin:void 0!==f?f:"round",lineWidth:this.f*(void 0!==g?g:1),miterLimit:void 0!==b?b:10,strokeStyle:zi(a?a:gi)}}else this.b=null};
-k.Zb=function(a){if(a){var b=a.Vc(),c=a.Y(1),d=a.bd(),e=a.oc();this.D=b[0];this.C=b[1];this.B=e[1];this.M=c;this.v=a.i;this.V=d[0];this.$=d[1];this.ca=a.s;this.ab=a.f;this.i=a.a*this.f;this.ra=a.v;this.oa=e[0]}else this.M=null};
-k.nb=function(a){if(a){var b=a.Fa();b?(b=b.b,this.j={fillStyle:zi(b?b:ei)}):this.j=null;var c=a.Ga();if(c){b=c.a;var d=c.f,e=c.g,f=c.i,g=c.j,h=c.c;c=c.l;this.l={lineCap:void 0!==d?d:"round",lineDash:e?e:fi,lineDashOffset:f?f:0,lineJoin:void 0!==g?g:"round",lineWidth:void 0!==h?h:1,miterLimit:void 0!==c?c:10,strokeStyle:zi(b?b:gi)}}else this.l=null;b=a.a;d=a.g;e=a.c;f=a.l;g=a.i;h=a.b;c=a.Ka();var l=a.f;a=a.j;this.qa={font:void 0!==b?b:"10px sans-serif",textAlign:void 0!==l?l:"center",textBaseline:void 0!==
-a?a:"middle"};this.ta=void 0!==c?c:"";this.ua=void 0!==d?this.f*d:0;this.Ub=void 0!==e?this.f*e:0;this.Ea=void 0!==f?f:!1;this.La=void 0!==g?g:0;this.s=this.f*(void 0!==h?h:1)}else this.ta=""};function Ki(a){Uc.call(this);this.a=a}w(Ki,Uc);Ki.prototype.wa=ea;Ki.prototype.cf=Se;Ki.prototype.Rf=function(a,b,c){return function(d,e){return Li(a,b,d,e,function(a){c[d]||(c[d]={});c[d][a.ya.toString()]=a})}};Ki.prototype.$=function(a){2===a.target.getState()&&Mi(this)};function Si(a,b){var c=b.getState();2!=c&&3!=c&&y(b,"change",a.$,a);0==c&&(b.load(),c=b.getState());return 2==c}function Mi(a){var b=a.a;b.Jb()&&"ready"==b.hg()&&a.u()}
-function Ti(a,b){b.cj()&&a.postRenderFunctions.push(function(a,b,e){b=x(a).toString();b in e.usedTiles&&a.sd(e.viewState.projection,e.usedTiles[b])}.bind(null,b))}function Ui(a,b){b=b.T;void 0!==b&&("string"===typeof b?a.logos[b]="":b&&(oa("string"==typeof b.href,44),oa("string"==typeof b.src,45),a.logos[b.src]=b.href))}
-function Vi(a,b,c,d){b=x(b).toString();c=c.toString();b in a?c in a[b]?(a=a[b][c],d.fa<a.fa&&(a.fa=d.fa),d.la>a.la&&(a.la=d.la),d.ea<a.ea&&(a.ea=d.ea),d.ka>a.ka&&(a.ka=d.ka)):a[b][c]=d:(a[b]={},a[b][c]=d)}
-function Wi(a,b,c,d,e,f,g,h,l,m){var n=x(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q,r,u;for(u=c.minZoom;u<=g;++u){var v=tc(c,f,u,v);var z=c.Ta(u);for(q=v.fa;q<=v.la;++q)for(r=v.ea;r<=v.ka;++r)if(g-u<=h){var A=b.ad(u,q,r,d,e);0==A.getState()&&(p[A.lb()]=!0,A.lb()in a.a||a.i([A,n,yc(c,A.ya),z]));void 0!==l&&l.call(m,A)}else b.kh(u,q,r,e)}};function Xi(a){Ki.call(this,a);this.V=We()}w(Xi,Ki);function Yi(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=$a(c),l=Za(c),m=Ya(c);c=Wa(c);af(b.coordinateToPixelTransform,h);af(b.coordinateToPixelTransform,l);af(b.coordinateToPixelTransform,m);af(b.coordinateToPixelTransform,c);a.save();qi(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();qi(a,g,e/2,f/2)}
-function Zi(a,b,c,d,e){var f=a.a;if(Tc(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;qi(c,-l,g/2,h/2);a=void 0!==e?e:$i(a,d,0);f.b(new bi(b,new Bi(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));qi(c,l,g/2,h/2)}}Xi.prototype.s=function(a,b,c,d){if(this.wa(a,b,0,Re,this))return c.call(d,this.a,null)};Xi.prototype.pf=function(a,b,c,d){Zi(this,"postcompose",a,b,d)};
-function $i(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return ef(a.V,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function aj(a){Xi.call(this,a);this.l=We();this.j=null}w(aj,Xi);aj.prototype.df=function(a,b,c){Zi(this,"precompose",c,a,void 0);var d=this.Y();if(d){var e=b.extent,f=void 0!==e&&!La(e,a.extent)&&hb(e,a.extent);f&&Yi(c,a,e);e=this.v();var g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.pf(c,a,b)};
-aj.prototype.wa=function(a,b,c,d,e){var f=this.a;return f.ha().wa(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
-aj.prototype.s=function(a,b,c,d){if(this.Y()){if(this.a.ha().wa!==ea)return Xi.prototype.s.apply(this,arguments);var e=af(this.l,a.slice());Ge(e,b.viewState.resolution/this.i);this.j||(this.j=hg(1,1));this.j.clearRect(0,0,1,1);this.j.drawImage(this.Y(),e[0],e[1],1,1,0,0,1,1);e=this.j.getImageData(0,0,1,1).data;if(0<e[3])return c.call(d,this.a,e)}};function bj(a){aj.call(this,a);this.M=null;this.f=We();this.o=[];this.c=null}w(bj,aj);bj.handles=function(a,b){return"canvas"===a&&("IMAGE"===b.S()||"VECTOR"===b.S()&&"image"===b.l)};bj.create=function(a,b){var c=new bj(b);if("VECTOR"===b.S())for(var d=0,e=pg.length;d<e;++d){var f=pg[d];f!==bj&&f.handles("canvas",b)&&(f=f.create(a,b),c.c=f)}return c};bj.prototype.Y=function(){return this.M?this.M.Y():null};bj.prototype.v=function(){return this.f};
-bj.prototype.$c=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.center,g=e.resolution,h=this.a.ha(),l=a.viewHints,m=a.extent;void 0!==b.extent&&(m=gb(m,b.extent));if(!l[0]&&!l[1]&&!bb(m))if(l=e.projection,e=this.c){l=e.context;var n=kb({},a,{size:[cb(m)/g,db(m)/g],viewState:kb({},a.viewState,{rotation:0})}),p=Object.keys(n.skippedFeatureUids).sort();!e.$c(n,b)||!e.j&&jc(p,this.o)||(l.canvas.width=n.size[0]*c,l.canvas.height=n.size[1]*c,e.df(n,b,l),this.M=new ai(m,g,c,l.canvas),this.o=
-p)}else(e=h.Y(m,g,c,l))&&Si(this,e)&&(this.M=e);this.M&&(e=this.M,m=e.G(),b=e.resolution,e=e.a,l=c*b/(g*e),m=ef(this.f,c*d[0]/2,c*d[1]/2,l,l,0,e*(m[0]-f[0])/b,e*(f[1]-m[3])/b),ef(this.l,c*d[0]/2-m[4],c*d[1]/2-m[5],c/g,-c/g,0,-f[0],-f[1]),Ui(a,h),this.i=b*c/e);return!!this.M};bj.prototype.wa=function(a,b,c,d,e){return this.c?this.c.wa(a,b,c,d,e):aj.prototype.wa.call(this,a,b,c,d,e)};function cj(){this.b={};this.a=0;this.g=32}cj.prototype.clear=function(){this.b={};this.a=0};function dj(a){if(a.a>a.g){var b=0,c;for(c in a.b){var d=a.b[c];0!==(b++&3)||Tc(d)||(delete a.b[c],--a.a)}}}cj.prototype.get=function(a,b,c){a=b+":"+a+":"+(c?xi(c):"null");return a in this.b?this.b[a]:null};cj.prototype.set=function(a,b,c,d){this.b[b+":"+a+":"+(c?xi(c):"null")]=d;++this.a};cj.prototype.c=function(a){this.g=a;dj(this)};var ej=new cj;function fj(a,b){this.l=b;this.c={};this.v={}}w(fj,Oc);function gj(a){var b=a.viewState,c=a.coordinateToPixelTransform,d=a.pixelToCoordinateTransform;ef(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);ff($e(d,c))}function hj(){dj(ej)}k=fj.prototype;
-k.wa=function(a,b,c,d,e,f,g){function h(a,c){var f=x(a).toString(),g=b.layerStates[x(c)].Te;if(!(f in b.skippedFeatureUids)||g)return d.call(e,a,g?c:null)}var l,m=b.viewState,n=m.resolution,p=m.projection;m=a;if(p.g){p=p.G();var q=cb(p),r=a[0];if(r<p[0]||r>p[2])m=[r+q*Math.ceil((p[0]-r)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q];r=u.layer;if(yg(u,n)&&f.call(g,r)&&(u=ij(this,r),r.ha()&&(l=u.wa(r.ha().D?m:a,b,c,h,e)),l))return l}};
-k.Ui=function(a,b,c,d,e){return void 0!==this.wa(a,b,c,Re,this,d,e)};function ij(a,b){var c=x(b).toString();if(c in a.c)return a.c[c];for(var d,e=a.S(),f=0,g=pg.length;f<g;++f){var h=pg[f];if(h.handles(e,b)){d=h.create(a,b);break}}if(d)a.c[c]=d,a.v[c]=y(d,"change",a.gm,a);else throw Error("Unable to create renderer for layer: "+b.S());return d}k.gm=function(){this.l.render()};function tg(a,b){var c=a.c[b];delete a.c[b];Gc(a.v[b]);delete a.v[b];return c}k.bh=ea;
-k.oq=function(a,b){for(var c in this.c)b&&c in b.layerStates||Pc(tg(this,c))};function jj(a,b){for(var c in a.c)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.oq.bind(a));break}}function lc(a,b){return a.zIndex-b.zIndex};function kj(a,b){fj.call(this,a,b);this.g=hg();this.b=this.g.canvas;this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.a=!0;this.i=We()}w(kj,fj);kj.handles=function(a){return"canvas"===a};kj.create=function(a,b){return new kj(a,b)};
-function lj(a,b,c){var d=a.l,e=a.g;if(Tc(d,b)){var f=c.extent,g=c.pixelRatio,h=c.viewState.rotation,l=c.viewState,m=c.pixelRatio/l.resolution;a=ef(a.i,a.b.width/2,a.b.height/2,m,-m,-l.rotation,-l.center[0],-l.center[1]);d.b(new bi(b,new Bi(e,g,f,a,h),c,e,null))}}kj.prototype.S=function(){return"canvas"};
-kj.prototype.bh=function(a){if(a){var b=this.g,c=a.pixelRatio,d=Math.round(a.size[0]*c),e=Math.round(a.size[1]*c);this.b.width!=d||this.b.height!=e?(this.b.width=d,this.b.height=e):b.clearRect(0,0,d,e);c=a.viewState.rotation;gj(a);lj(this,"precompose",a);var f=a.layerStatesArray;kc(f);c&&(b.save(),qi(b,c,d/2,e/2));d=a.viewState.resolution;var g;e=0;for(g=f.length;e<g;++e){var h=f[e];var l=h.layer;l=ij(this,l);yg(h,d)&&"ready"==h.Vj&&l.$c(a,h)&&l.df(a,h,b)}c&&b.restore();lj(this,"postcompose",a);this.a||
-(this.b.style.display="",this.a=!0);jj(this,a);a.postRenderFunctions.push(hj)}else this.a&&(this.b.style.display="none",this.a=!1)};kj.prototype.Ti=function(a,b,c,d,e,f){var g=b.viewState.resolution,h=b.layerStatesArray,l=h.length;a=af(b.pixelToCoordinateTransform,a.slice());for(--l;0<=l;--l){var m=h[l];var n=m.layer;if(yg(m,g)&&e.call(f,n)&&(m=ij(this,n).s(a,b,c,d)))return m}};function mj(a){aj.call(this,a);this.context=null===this.context?null:hg();this.c=null;this.f=[];this.T=Da();this.ra=new ja(0,0,0,0);this.o=We();this.O=0}w(mj,aj);mj.handles=function(a,b){return"canvas"===a&&"TILE"===b.S()};mj.create=function(a,b){return new mj(b)};function nj(a,b){b=b.getState();a=a.a.i();return 2==b||4==b||3==b&&!a}
-mj.prototype.$c=function(a,b){var c=a.pixelRatio,d=a.size,e=a.viewState,f=e.projection,g=e.resolution;e=e.center;var h=this.a,l=h.ha(),m=l.g,n=l.eb(f),p=n.Dc(g,this.O),q=n.Ta(p),r=Math.round(g/q)||1,u=a.extent;void 0!==b.extent&&(u=gb(u,b.extent));if(bb(u))return!1;var v=tc(n,u,p),z=wc(n,p,v),A=l.Xc(c),E={};E[p]={};var S=this.Rf(l,f,E),Ia=this.T,ta=this.ra,la=!1,ca,ia;for(ca=v.fa;ca<=v.la;++ca)for(ia=v.ea;ia<=v.ka;++ia){var xa=l.ad(p,ca,ia,c,f);3==xa.getState()&&(h.i()?0<h.c()&&(la=!0):oj(xa,2));
-nj(this,xa)||(xa=pj(xa));if(nj(this,xa)){var Va=x(this);if(2==xa.getState()){E[p][xa.ya.toString()]=xa;var ic=xa.j?-1!==xa.s[Va]:!1;la||!ic&&-1!==this.f.indexOf(xa)||(la=!0)}if(1===qj(xa,Va,a.time))continue}Va=vc(n,xa.ya,ta,Ia);ic=!1;Va&&(ic=S(p+1,Va));ic||uc(n,xa.ya,S,ta,Ia)}xa=a.viewHints;xa=xa[0]||xa[1];if(!(this.i&&16<Date.now()-a.time&&xa||!la&&this.c&&La(this.c,u)&&this.wf==m&&r==this.C&&(xa||q*c/A*r==this.i))){if(xa=this.context)ia=l.Zd(p,c,f),ca=Math.round((v.la-v.fa+1)*ia[0]/r),ia=Math.round((v.ka-
-v.ea+1)*ia[1]/r),la=xa.canvas,la.width!=ca||la.height!=ia?(this.C=r,la.width=ca,la.height=ia):(this.c&&!Sa(z,this.c)&&xa.clearRect(0,0,ca,ia),r=this.C);this.f.length=0;la=Object.keys(E).map(Number);la.sort(function(a,b){return a===p?1:b===p?-1:a>b?1:a<b?-1:0});Va=0;for(ic=la.length;Va<ic;++Va){ta=la[Va];S=l.Zd(ta,c,f);xa=n.Ta(ta);var Xa=xa/q;var Z=A*l.Zf(f);var Zb=E[ta];for(var Le in Zb){xa=Zb[Le];ia=n.Ma(xa.ya,Ia);ca=(ia[0]-z[0])/q*A/r;ia=(z[3]-ia[3])/q*A/r;var Uf=S[0]*Xa/r;var Id=S[1]*Xa/r;this.Sf(xa,
-a,b,ca,ia,Uf,Id,Z,p===ta);this.f.push(xa)}}this.wf=m;this.i=q*c/A*r;this.c=z}b=this.i/g;b=ef(this.o,c*d[0]/2,c*d[1]/2,b,b,0,(this.c[0]-e[0])/this.i*c,(e[1]-this.c[3])/this.i*c);ef(this.l,c*d[0]/2-b[4],c*d[1]/2-b[5],c/g,-c/g,0,-e[0],-e[1]);Vi(a.usedTiles,l,p,v);Wi(a,l,n,c,f,u,p,h.c());Ti(a,l);Ui(a,l);return 0<this.f.length};
-mj.prototype.Sf=function(a,b,c,d,e,f,g,h,l){if(c=a.Y(this.a)){var m=x(this),n=l?qj(a,m,b.time):1;1!==n||this.a.ha().eg(b.viewState.projection)||this.context.clearRect(d,e,f,g);var p=n!==this.context.globalAlpha;p&&(this.context.save(),this.context.globalAlpha=n);this.context.drawImage(c,h,h,c.width-2*h,c.height-2*h,d,e,f,g);p&&this.context.restore();1!==n?b.animate=!0:l&&a.j&&(a.s[m]=-1)}};mj.prototype.Y=function(){var a=this.context;return a?a.canvas:null};mj.prototype.v=function(){return this.o};var rj={Jc:function(){}};
-(function(a){function b(a,b,d,f,g){c(a,b,d||0,f||a.length-1,g||e)}function c(a,b,e,f,g){for(;f>e;){if(600<f-e){var h=f-e+1,l=b-e+1,m=Math.log(h),n=.5*Math.exp(2*m/3);m=.5*Math.sqrt(m*n*(h-n)/h)*(0>l-h/2?-1:1);c(a,b,Math.max(e,Math.floor(b-l*n/h+m)),Math.min(f,Math.floor(b+(h-l)*n/h+m)),g)}h=a[b];l=e;n=f;d(a,e,b);for(0<g(a[f],h)&&d(a,e,f);l<n;){d(a,l,n);l++;for(n--;0>g(a[l],h);)l++;for(;0<g(a[n],h);)n--}0===g(a[e],h)?d(a,e,n):(n++,d(a,n,f));n<=b&&(e=n+1);b<=n&&(f=n-1)}}function d(a,b,c){var d=a[b];
-a[b]=a[c];a[c]=d}function e(a,b){return a<b?-1:a>b?1:0}function f(a,b){if(!(this instanceof f))return new f(a,b);this.Lf=Math.max(4,a||9);this.wh=Math.max(2,Math.ceil(.4*this.Lf));b&&this.Ak(b);this.clear()}function g(a,b){h(a,0,a.children.length,b,a)}function h(a,b,c,d,e){e||(e=v(null));e.fa=Infinity;e.ea=Infinity;e.la=-Infinity;e.ka=-Infinity;for(var f;b<c;b++)f=a.children[b],l(e,a.fb?d(f):f);return e}function l(a,b){a.fa=Math.min(a.fa,b.fa);a.ea=Math.min(a.ea,b.ea);a.la=Math.max(a.la,b.la);a.ka=
-Math.max(a.ka,b.ka);return a}function m(a,b){return a.fa-b.fa}function n(a,b){return a.ea-b.ea}function p(a){return(a.la-a.fa)*(a.ka-a.ea)}function q(a){return a.la-a.fa+(a.ka-a.ea)}function r(a,b){return a.fa<=b.fa&&a.ea<=b.ea&&b.la<=a.la&&b.ka<=a.ka}function u(a,b){return b.fa<=a.la&&b.ea<=a.ka&&b.la>=a.fa&&b.ka>=a.ea}function v(a){return{children:a,height:1,fb:!0,fa:Infinity,ea:Infinity,la:-Infinity,ka:-Infinity}}function z(a,b,c,d,e){for(var f=[b,c],g;f.length;)c=f.pop(),b=f.pop(),c-b<=d||(g=
-b+Math.ceil((c-b)/d/2)*d,A(a,g,b,c,e),f.push(b,g,g,c))}var A=b;A.default=b;f.prototype={all:function(){return this.rh(this.data,[])},search:function(a){var b=this.data,c=[],d=this.xb;if(!u(a,b))return c;for(var e=[],f,g,h,l;b;){f=0;for(g=b.children.length;f<g;f++)h=b.children[f],l=b.fb?d(h):h,u(a,l)&&(b.fb?c.push(h):r(a,l)?this.rh(h,c):e.push(h));b=e.pop()}return c},Ok:function(a){var b=this.data,c=this.xb;if(!u(a,b))return!1;for(var d=[],e,f,g,h;b;){e=0;for(f=b.children.length;e<f;e++)if(g=b.children[e],
-h=b.fb?c(g):g,u(a,h)){if(b.fb||r(a,h))return!0;d.push(g)}b=d.pop()}return!1},load:function(a){if(!a||!a.length)return this;if(a.length<this.wh){for(var b=0,c=a.length;b<c;b++)this.Ca(a[b]);return this}a=this.th(a.slice(),0,a.length-1,0);this.data.children.length?this.data.height===a.height?this.yh(this.data,a):(this.data.height<a.height&&(b=this.data,this.data=a,a=b),this.vh(a,this.data.height-a.height-1,!0)):this.data=a;return this},Ca:function(a){a&&this.vh(a,this.data.height-1);return this},clear:function(){this.data=
-v([]);return this},remove:function(a,b){if(!a)return this;for(var c=this.data,d=this.xb(a),e=[],f=[],g,h,l,m;c||e.length;){c||(c=e.pop(),h=e[e.length-1],g=f.pop(),m=!0);if(c.fb){a:{l=a;var n=c.children,p=b;if(p){for(var q=0;q<n.length;q++)if(p(l,n[q])){l=q;break a}l=-1}else l=n.indexOf(l)}if(-1!==l){c.children.splice(l,1);e.push(c);this.yk(e);break}}m||c.fb||!r(c,d)?h?(g++,c=h.children[g],m=!1):c=null:(e.push(c),f.push(g),g=0,h=c,c=c.children[0])}return this},xb:function(a){return a},Pf:m,Qf:n,toJSON:function(){return this.data},
-rh:function(a,b){for(var c=[];a;)a.fb?b.push.apply(b,a.children):c.push.apply(c,a.children),a=c.pop();return b},th:function(a,b,c,d){var e=c-b+1,f=this.Lf;if(e<=f){var h=v(a.slice(b,c+1));g(h,this.xb);return h}d||(d=Math.ceil(Math.log(e)/Math.log(f)),f=Math.ceil(e/Math.pow(f,d-1)));h=v([]);h.fb=!1;h.height=d;e=Math.ceil(e/f);f=e*Math.ceil(Math.sqrt(f));var l;for(z(a,b,c,f,this.Pf);b<=c;b+=f){var m=Math.min(b+f-1,c);z(a,b,m,e,this.Qf);for(l=b;l<=m;l+=e){var n=Math.min(l+e-1,m);h.children.push(this.th(a,
-l,n,d-1))}}g(h,this.xb);return h},xk:function(a,b,c,d){for(var e,f,g,h,l,m,n,q;;){d.push(b);if(b.fb||d.length-1===c)break;n=q=Infinity;e=0;for(f=b.children.length;e<f;e++)g=b.children[e],l=p(g),m=(Math.max(g.la,a.la)-Math.min(g.fa,a.fa))*(Math.max(g.ka,a.ka)-Math.min(g.ea,a.ea))-l,m<q?(q=m,n=l<n?l:n,h=g):m===q&&l<n&&(n=l,h=g);b=h||b.children[0]}return b},vh:function(a,b,c){var d=this.xb;c=c?a:d(a);d=[];var e=this.xk(c,this.data,b,d);e.children.push(a);for(l(e,c);0<=b;)if(d[b].children.length>this.Lf)this.Dk(d,
-b),b--;else break;this.uk(c,d,b)},Dk:function(a,b){var c=a[b],d=c.children.length,e=this.wh;this.vk(c,e,d);d=this.wk(c,e,d);d=v(c.children.splice(d,c.children.length-d));d.height=c.height;d.fb=c.fb;g(c,this.xb);g(d,this.xb);b?a[b-1].children.push(d):this.yh(c,d)},yh:function(a,b){this.data=v([a,b]);this.data.height=a.height+1;this.data.fb=!1;g(this.data,this.xb)},wk:function(a,b,c){var d,e;var f=e=Infinity;for(d=b;d<=c-b;d++){var g=h(a,0,d,this.xb);var l=h(a,d,c,this.xb);var m=Math.max(0,Math.min(g.la,
-l.la)-Math.max(g.fa,l.fa))*Math.max(0,Math.min(g.ka,l.ka)-Math.max(g.ea,l.ea));g=p(g)+p(l);if(m<f){f=m;var n=d;e=g<e?g:e}else m===f&&g<e&&(e=g,n=d)}return n},vk:function(a,b,c){var d=a.fb?this.Pf:m,e=a.fb?this.Qf:n,f=this.sh(a,b,c,d);b=this.sh(a,b,c,e);f<b&&a.children.sort(d)},sh:function(a,b,c,d){a.children.sort(d);d=this.xb;var e=h(a,0,b,d),f=h(a,c-b,c,d),g=q(e)+q(f),m;for(m=b;m<c-b;m++){var n=a.children[m];l(e,a.fb?d(n):n);g+=q(e)}for(m=c-b-1;m>=b;m--)n=a.children[m],l(f,a.fb?d(n):n),g+=q(f);return g},
-uk:function(a,b,c){for(;0<=c;c--)l(b[c],a)},yk:function(a){for(var b=a.length-1,c;0<=b;b--)0===a[b].children.length?0<b?(c=a[b-1].children,c.splice(c.indexOf(a[b]),1)):this.clear():g(a[b],this.xb)},Ak:function(a){var b=["return a"," - b",";"];this.Pf=new Function("a","b",b.join(a[0]));this.Qf=new Function("a","b",b.join(a[1]));this.xb=new Function("a","return {minX: a"+a[0]+", minY: a"+a[1]+", maxX: a"+a[2]+", maxY: a"+a[3]+"};")}};a["default"]=f})(rj.Jc=rj.Jc||{});rj.Jc=rj.Jc.default;function sj(){};function tj(a,b,c,d){var e=a[b],f=a[b+1],g=0;for(b+=d;b<c;b+=d){var h=a[b],l=a[b+1];g+=Math.sqrt((h-e)*(h-e)+(l-f)*(l-f));e=h;f=l}return g};var uj="Polygon Circle LineString Image Text Default".split(" "),vj={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};function wj(a,b,c,d,e,f){this.ra=f;this.La=Da();this.ob=a;this.Ea=b;this.overlaps=e;this.pixelRatio=d;this.Wa=0;this.resolution=c;this.i=this.T=this.qa=null;this.a=[];this.coordinates=[];this.Ub={};this.ca=We();this.b=[];this.oa=null;this.state={};this.$=0;this.bb=We()}w(wj,Ai);function xj(a,b,c,d,e,f,g,h){b.beginPath();b.moveTo.apply(b,c);b.lineTo.apply(b,d);b.lineTo.apply(b,e);b.lineTo.apply(b,f);b.lineTo.apply(b,c);g&&(a.O=g[2],a.Xa(b));h&&(yj(b,h),b.stroke())}
-function zj(a,b,c,d,e,f,g,h,l,m,n,p,q,r,u,v,z,A,E){var S=A||E,Ia=a.bb;f*=r;g*=r;c-=f;d-=g;u&&(c=Math.round(c),d=Math.round(d));u=v+n>e.width?e.width-n:v;l=l+p>e.height?e.height-p:l;v=a.La;var ta=z[3]+u*r+z[1],la=z[0]+l*r+z[2],ca=c-z[3],ia=d-z[0];if(S||0!==q){var xa=[ca,ia];var Va=[ca+ta,ia];var ic=[ca+ta,ia+la];var Xa=[ca,ia+la]}z=null;0!==q?(f=c+f,g=d+g,z=ef(Ia,f,g,1,1,q,-f,-g),Oa(v),Ea(v,af(Ia,xa)),Ea(v,af(Ia,Va)),Ea(v,af(Ia,ic)),Ea(v,af(Ia,Xa))):Na(ca,ia,ca+ta,ia+la,v);q=b.canvas;q=v[0]<=q.width&&
-0<=v[2]&&v[1]<=q.height&&0<=v[3];if(h){if(q||1!=h[4])Ta(h,v),(a=q?[b,z?z.slice(0):null,m,e,n,p,u,l,c,d,r]:null)&&S&&a.push(A,E,xa,Va,ic,Xa),h.push(a)}else q&&(S&&xj(a,b,xa,Va,ic,Xa,A,E),si(b,z,m,e,n,p,u,l,c,d,r))}function Aj(a,b){var c=a.pixelRatio;return 1==c?b:b.map(function(a){return a*c})}
-function Bj(a,b,c,d,e,f,g){var h=a.coordinates.length,l=Cj(a);g&&(c+=e);g=[b[c],b[c+1]];var m=[NaN,NaN],n=!0,p;for(p=c+e;p<d;p+=e){m[0]=b[p];m[1]=b[p+1];var q=Ma(l,m);q!==r?(n&&(a.coordinates[h++]=g[0],a.coordinates[h++]=g[1]),a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):1===q?(a.coordinates[h++]=m[0],a.coordinates[h++]=m[1],n=!1):n=!0;g[0]=m[0];g[1]=m[1];var r=q}if(f&&n||p===c+e)a.coordinates[h++]=g[0],a.coordinates[h++]=g[1];return h}
-function Dj(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;++g){var l=d[g];c=Bj(a,b,c,l,e,!1,!1);f.push(c);c=l}return c}k=wj.prototype;
-k.Hh=function(a,b,c){Ej(this,b);var d=a.S(),e=a.pa(),f=this.coordinates.length,g;if("MultiPolygon"==d){d=Ii(a);var h=[];for(var l=a.td(),m=g=0,n=l.length;m<n;++m){var p=[];g=Dj(this,d,g,l[m],e,p);h.push(p)}this.a.push([4,f,h,a,c,Af])}else"Polygon"==d||"MultiLineString"==d?(h=[],d="Polygon"==d?a.Xb():a.da(),Dj(this,d,0,a.pb(),e,h),this.a.push([4,f,h,a,c,zf])):"LineString"==d||"MultiPoint"==d?(d=a.da(),e=Bj(this,d,0,d.length,e,!1,!1),this.a.push([4,f,e,a,c,yf])):"Point"==d&&(d=a.da(),this.coordinates.push(d[0],
-d[1]),e=this.coordinates.length,this.a.push([4,f,e,a,c]));Fj(this,b)};function Ej(a,b){a.qa=[0,b,0];a.a.push(a.qa);a.T=[0,b,0];a.b.push(a.T)}k.Xa=function(a){if(this.O){var b=af(this.ca,this.O.slice());a.translate(b[0],b[1]);a.rotate(this.$)}a.fill();this.O&&a.setTransform.apply(a,ri)};function yj(a,b){a.strokeStyle=b[1];a.lineWidth=b[2];a.lineCap=b[3];a.lineJoin=b[4];a.miterLimit=b[5];od&&(a.lineDashOffset=b[7],a.setLineDash(b[6]))}
-function Gj(a,b,c){if(b&&5<b.length){var d=b[4];if(1==d||d==b.length-5){c={fa:b[0],ea:b[1],la:b[2],ka:b[3],value:c};if(!a.ra.Ok(c))for(a.ra.Ca(c),c=5,d=b.length;c<d;++c){var e=b[c];e&&(11<e.length&&xj(a,e[0],e[13],e[14],e[15],e[16],e[11],e[12]),si.apply(void 0,e))}b.length=5;Oa(b)}}}
-function Hj(a,b,c,d,e,f,g){if(a.oa&&jc(c,a.ca))var h=a.oa;else a.oa||(a.oa=[]),h=Te(a.coordinates,0,a.coordinates.length,2,c,a.oa),$e(a.ca,c);for(var l=!nb(d),m=0,n=e.length,p=0,q,r,u,v,z,A,E,S,Ia,ta=0,la=0,ca=null,ia=null,xa=a.Ub,Va=a.$,ic={context:b,pixelRatio:a.pixelRatio,resolution:a.resolution,rotation:Va},Xa=a.a!=e||a.overlaps?0:200;m<n;){var Z=e[m];switch(Z[0]){case 0:var Zb=Z[1];l&&d[x(Zb).toString()]||!Zb.U()?m=Z[2]:void 0===g||hb(g,Zb.U().G())?++m:m=Z[2]+1;break;case 1:ta>Xa&&(a.Xa(b),ta=
-0);la>Xa&&(b.stroke(),la=0);ta||la||(b.beginPath(),v=z=NaN);++m;break;case 2:p=Z[1];var Le=h[p],Uf=h[p+1],Id=h[p+2]-Le,te=h[p+3]-Uf,Jh=Math.sqrt(Id*Id+te*te);b.moveTo(Le+Jh,Uf);b.arc(Le,Uf,Jh,0,2*Math.PI,!0);++m;break;case 3:b.closePath();++m;break;case 4:p=Z[1];q=Z[2];var Mg=Z[4],Ng=6==Z.length?Z[5]:void 0;ic.geometry=Z[3];ic.feature=Zb;m in xa||(xa[m]=[]);var Wf=xa[m];Ng?Ng(h,p,q,2,Wf):(Wf[0]=h[p],Wf[1]=h[p+1],Wf.length=2);Mg(Wf,ic);++m;break;case 6:p=Z[1];q=Z[2];Ia=Z[3];r=Z[4];u=Z[5];S=f?null:
-Z[6];var rf=Z[7],yu=Z[8],zu=Z[9],Au=Z[10],Bu=Z[11],jp=Z[12],Cu=Z[13],Du=Z[14],Eu=Z[15];if(16<Z.length){var kp=Z[16];var lp=Z[17];var mp=Z[18]}else kp=hi,lp=mp=!1;for(Bu&&(jp+=Va);p<q;p+=2)zj(a,b,h[p],h[p+1],Ia,r,u,S,rf,yu,zu,Au,jp,Cu,Du,Eu,kp,lp?ca:null,mp?ia:null);Gj(a,S,Zb);++m;break;case 5:var np=Z[1],op=Z[2],Lk=Z[3];S=f?null:Z[4];var Fu=Z[5],pp=Z[6],Gu=Z[7],qp=Z[8],rp=Z[9],sp=Z[10],tp=Z[11],up=Z[12],Mk=Z[13],vp=Z[14],wp=tj(h,np,op,2),xp=qp(up);if(Fu||xp<=wp){a:{var Ni=void 0,yp=void 0,Xf=void 0,
-sf=h,ve=np,zp=op,Ap=up,Hu=qp,Bp=(wp-xp)*vj[a.s[Mk].textAlign],Iu=Gu,Nk=[],Kh=sf[ve]>sf[zp-2],Cp=Ap.length,Lh=sf[ve],Mh=sf[ve+1];ve+=2;for(var Og=sf[ve],Pg=sf[ve+1],Ok=0,Oi=Math.sqrt(Math.pow(Og-Lh,2)+Math.pow(Pg-Mh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){Zb=Z[1];var Hp=f(Zb);if(Hp)return Hp}++m;break;case 8:Xa?ta++:a.Xa(b);++m;break;case 9:p=Z[1];q=Z[2];var Nh=h[p];var Oh=h[p+1];A=Nh+.5|0;E=Oh+.5|0;if(A!==v||E!==z)b.moveTo(Nh,Oh),v=A,z=E;for(p+=2;p<q;p+=2)if(Nh=h[p],
-Oh=h[p+1],A=Nh+.5|0,E=Oh+.5|0,p==q-2||A!==v||E!==z)b.lineTo(Nh,Oh),v=A,z=E;++m;break;case 10:ca=Z;a.O=Z[2];ta&&(a.Xa(b),ta=0,la&&(b.stroke(),la=0));b.fillStyle=Z[1];++m;break;case 11:ia=Z;la&&(b.stroke(),la=0);yj(b,Z);++m;break;case 12:Xa?la++:b.stroke();++m;break;default:++m}}ta&&a.Xa(b);la&&b.stroke()}k.Na=function(a,b,c,d){this.$=c;Hj(this,a,b,d,this.a,void 0,void 0)};function Ij(a,b,c,d,e,f,g){a.$=d;return Hj(a,b,c,e,a.b,f,g)}
-function Jj(a){var b=a.b;b.reverse();var c,d=b.length,e=-1;for(c=0;c<d;++c){var f=b[c];var g=f[0];if(7==g)e=c;else if(0==g){f[2]=c;f=a.b;for(g=c;e<g;){var h=f[e];f[e]=f[g];f[g]=h;++e;--g}e=-1}}}
-k.Oa=function(a,b){var c=this.state;a?(a=a.b,c.fillStyle=zi(a?a:ei)):c.fillStyle=void 0;b?(a=b.a,c.strokeStyle=zi(a?a:gi),a=b.f,c.lineCap=void 0!==a?a:"round",a=b.g,c.lineDash=a?a.slice():fi,a=b.i,c.lineDashOffset=a?a:0,a=b.j,c.lineJoin=void 0!==a?a:"round",a=b.c,c.lineWidth=void 0!==a?a:1,b=b.l,c.miterLimit=void 0!==b?b:10,c.lineWidth>this.Wa&&(this.Wa=c.lineWidth,this.i=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit=
-void 0)};k.Ah=function(a,b){var c=a.fillStyle;a=[10,c];"string"!==typeof c&&(b=b.G(),a.push([b[0],b[3]]));this.a.push(a)};k.pd=function(a){this.a.push([11,a.strokeStyle,a.lineWidth*this.pixelRatio,a.lineCap,a.lineJoin,a.miterLimit,Aj(this,a.lineDash),a.lineDashOffset*this.pixelRatio])};function Kj(a,b,c,d){var e=b.fillStyle;if("string"!==typeof e||b.Pk!=e)c.call(a,b,d),b.Pk=e}
-function Lj(a,b,c){var d=b.strokeStyle,e=b.lineCap,f=b.lineDash,g=b.lineDashOffset,h=b.lineJoin,l=b.lineWidth,m=b.miterLimit;if(b.Vk!=d||b.Qk!=e||f!=b.Fh&&!jc(b.Fh,f)||b.Rk!=g||b.Sk!=h||b.Tk!=l||b.Uk!=m)c.call(a,b),b.Vk=d,b.Qk=e,b.Fh=f,b.Rk=g,b.Sk=h,b.Tk=l,b.Uk=m}function Fj(a,b){a.qa[2]=a.a.length;a.qa=null;a.T[2]=a.b.length;a.T=null;b=[7,b];a.a.push(b);a.b.push(b)}k.bf=ea;function Cj(a){a.i||(a.i=Ga(a.Ea),0<a.Wa&&Fa(a.i,a.resolution*(a.Wa+1)/2,a.i));return a.i};function Mj(a,b,c,d,e,f){wj.call(this,a,b,c,d,e,f);this.M=this.V=this.B=null;this.N=this.o=this.v=this.s=this.l=this.C=this.D=this.j=this.f=this.c=this.g=void 0}w(Mj,wj);
-Mj.prototype.yc=function(a,b){if(this.M){Ej(this,b);var c=a.da(),d=this.coordinates.length;a=Bj(this,c,0,c.length,a.pa(),!1,!1);this.a.push([6,d,a,this.M,this.g,this.c,this.B,this.f,this.j,this.D,this.C,this.l,this.s,this.v*this.pixelRatio,this.o,this.N]);this.b.push([6,d,a,this.V,this.g,this.c,this.B,this.f,this.j,this.D,this.C,this.l,this.s,this.v,this.o,this.N]);Fj(this,b)}};
-Mj.prototype.wc=function(a,b){if(this.M){Ej(this,b);var c=a.da(),d=this.coordinates.length;a=Bj(this,c,0,c.length,a.pa(),!1,!1);this.a.push([6,d,a,this.M,this.g,this.c,this.B,this.f,this.j,this.D,this.C,this.l,this.s,this.v*this.pixelRatio,this.o,this.N]);this.b.push([6,d,a,this.V,this.g,this.c,this.B,this.f,this.j,this.D,this.C,this.l,this.s,this.v,this.o,this.N]);Fj(this,b)}};
-Mj.prototype.bf=function(){Jj(this);this.c=this.g=void 0;this.M=this.V=null;this.N=this.o=this.s=this.l=this.C=this.D=this.j=this.v=this.f=void 0};Mj.prototype.Zb=function(a,b){var c=a.Vc(),d=a.oc(),e=a.Eg(),f=a.Y(1),g=a.bd();this.g=c[0];this.c=c[1];this.B=b;this.V=e;this.M=f;this.f=d[1];this.j=a.i;this.D=g[0];this.C=g[1];this.l=a.s;this.s=a.f;this.v=a.a;this.o=a.v;this.N=d[0]};function Nj(a,b,c,d,e,f){wj.call(this,a,b,c,d,e,f)}w(Nj,wj);function Oj(a,b,c,d,e){var f=a.coordinates.length;b=Bj(a,b,c,d,e,!1,!1);f=[9,f,b];a.a.push(f);a.b.push(f);return d}Nj.prototype.uc=function(a,b){var c=this.state,d=c.lineWidth;void 0!==c.strokeStyle&&void 0!==d&&(Lj(this,c,this.pd),Ej(this,b),this.b.push([11,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset],[1]),c=a.da(),Oj(this,c,0,c.length,a.pa()),this.b.push([12]),Fj(this,b))};
-Nj.prototype.vc=function(a,b){var c=this.state,d=c.lineWidth;if(void 0!==c.strokeStyle&&void 0!==d){Lj(this,c,this.pd);Ej(this,b);this.b.push([11,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset],[1]);c=a.pb();d=a.da();a=a.pa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=Oj(this,d,e,c[g],a);this.b.push([12]);Fj(this,b)}};Nj.prototype.bf=function(){var a=this.state;void 0!=a.$d&&a.$d!=this.coordinates.length&&this.a.push([12]);Jj(this);this.state=null};
-Nj.prototype.pd=function(a){void 0!=a.$d&&a.$d!=this.coordinates.length&&(this.a.push([12]),a.$d=this.coordinates.length);a.$d=0;wj.prototype.pd.call(this,a);this.a.push([1])};function Pj(a,b,c,d,e,f){wj.call(this,a,b,c,d,e,f)}w(Pj,wj);function Qj(a,b,c,d,e){var f=a.state,g=void 0!==f.fillStyle;f=void 0!=f.strokeStyle;var h=d.length,l=[1];a.a.push(l);a.b.push(l);for(l=0;l<h;++l){var m=d[l],n=a.coordinates.length;c=Bj(a,b,c,m,e,!0,!f);c=[9,n,c];a.a.push(c);a.b.push(c);f&&(c=[3],a.a.push(c),a.b.push(c));c=m}b=[8];a.b.push(b);g&&a.a.push(b);f&&(g=[12],a.a.push(g),a.b.push(g));return c}
-Pj.prototype.cc=function(a,b){var c=this.state,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){Rj(this,a);Ej(this,b);this.b.push([10,xi(ei)]);void 0!==c.strokeStyle&&this.b.push([11,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset]);var e=a.da();d=this.coordinates.length;Bj(this,e,0,e.length,a.pa(),!1,!1);a=[1];d=[2,d];this.a.push(a,d);this.b.push(a,d);a=[8];this.b.push(a);void 0!==c.fillStyle&&this.a.push(a);void 0!==c.strokeStyle&&(c=[12],this.a.push(c),
-this.b.push(c));Fj(this,b)}};Pj.prototype.zc=function(a,b){var c=this.state;Rj(this,a);Ej(this,b);this.b.push([10,xi(ei)]);void 0!==c.strokeStyle&&this.b.push([11,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset]);c=a.pb();var d=a.Xb();Qj(this,d,0,c,a.pa());Fj(this,b)};
-Pj.prototype.xc=function(a,b){var c=this.state,d=c.strokeStyle;if(void 0!==c.fillStyle||void 0!==d){Rj(this,a);Ej(this,b);this.b.push([10,xi(ei)]);void 0!==c.strokeStyle&&this.b.push([11,c.strokeStyle,c.lineWidth,c.lineCap,c.lineJoin,c.miterLimit,c.lineDash,c.lineDashOffset]);c=a.td();d=Ii(a);a=a.pa();var e=0,f;var g=0;for(f=c.length;g<f;++g)e=Qj(this,d,e,c[g],a);Fj(this,b)}};
-Pj.prototype.bf=function(){Jj(this);this.state=null;var a=this.ob;if(0!==a){var b=this.coordinates,c;var d=0;for(c=b.length;d<c;++d)b[d]=a*Math.round(b[d]/a)}};function Rj(a,b){var c=a.state;void 0!==c.fillStyle&&Kj(a,c,a.Ah,b);void 0!==c.strokeStyle&&Lj(a,c,a.pd)};function Sj(a,b,c,d,e,f){wj.call(this,a,b,c,d,e,f);this.ta="";this.l=this.D=0;this.C=void 0;this.B=0;this.c=null;this.o={};this.g=null;this.ab={};this.f={};this.s={};this.V=this.v=this.j="";for(this.ua={};di(ii);)ii.pop()}w(Sj,wj);
-Sj.prototype.Wb=function(a,b){var c=this.c,d=this.g,e=this.f;if(""!==this.ta&&e&&(c||d)){c=this.coordinates.length;var f=a.S();d=null;var g=2,h=2;if("line"===e.placement){if(!hb(Cj(this),a.G()))return;d=a.da();h=a.pa();if("LineString"==f)var l=[d.length];else if("MultiLineString"==f)l=a.pb();else if("Polygon"==f)l=a.pb().slice(0,1);else if("MultiPolygon"==f)for(a=a.td(),l=[],g=0,f=a.length;g<f;++g)l.push(a[g][0]);Ej(this,b);a=e.textAlign;var m=0,n;f=0;for(var p=l.length;f<p;++f){if(void 0==a){for(var q,
-r,u=void 0,v=void 0,z=g=r=q=void 0,A=n=m,E=0,S=0,Ia=m;m<l[f];m+=h){var ta=d[m],la=d[m+1];void 0!==r&&(r=ta-r,q=la-q,g=Math.sqrt(r*r+q*q),void 0!==v&&(S+=z,u=Math.acos((v*r+u*q)/(z*g)),u>e.maxAngle&&(S>E&&(E=S,n=Ia,A=m),S=0,Ia=m-h)),z=g,v=r,u=q);r=ta;q=la}g=S+g>E?[Ia,m]:[n,A];m=g[0];n=g[1]}else n=l[f];for(g=m;g<n;g+=h)this.coordinates.push(d[g],d[g+1]);g=this.coordinates.length;m=l[f];Tj(this,c,g,this.N);c=g}}else{l=this.Y(this.ta,this.j,this.v,this.V);p=l.width/this.pixelRatio;switch(f){case "Point":case "MultiPoint":d=
-a.da();g=d.length;break;case "LineString":d=a.Fe();break;case "Circle":d=a.xa();break;case "MultiLineString":d=a.Ge();g=d.length;break;case "Polygon":d=a.Td();if(!e.overflow&&d[2]/this.resolution<p)return;h=3;break;case "MultiPolygon":n=Ji(a);d=[];g=0;for(f=n.length;g<f;g+=3)(e.overflow||n[g+2]/this.resolution>=p)&&d.push(n[g],n[g+1]);g=d.length;if(0==g)return}g=Bj(this,d,0,g,h,!1,!1);Ej(this,b);if(e.backgroundFill||e.backgroundStroke)this.Oa(e.backgroundFill,e.backgroundStroke),Kj(this,this.state,
-this.Ah,a),Lj(this,this.state,this.pd);Uj(this,l,c,g)}Fj(this,b)}};
-Sj.prototype.Y=function(a,b,c,d){var e=d+b+a+c+this.pixelRatio;if(!ii.a.hasOwnProperty(e)){var f=d?this.ab[d]||this.g:null,g=c?this.o[c]||this.c:null,h=this.s[b]||this.f,l=h.scale*this.pixelRatio,m=vj[h.textAlign||"center"];b=d&&f.lineWidth?f.lineWidth:0;a=a.split("\n");var n=a.length,p=[],q=h.font;var r=a.length;var u=0;var v;for(v=0;v<r;++v){var z=pi(q,a[v]);u=Math.max(u,z);p.push(z)}r=u;q=oi(h.font);r=hg(Math.ceil((r+b)*l),Math.ceil((q*n+b)*l));u=r.canvas;ii.set(e,u);1!=l&&r.scale(l,l);r.font=
-h.font;d&&(r.strokeStyle=f.strokeStyle,r.lineWidth=b*(kd?l:1),r.lineCap=f.lineCap,r.lineJoin=f.lineJoin,r.miterLimit=f.miterLimit,od&&f.lineDash.length&&(r.setLineDash(f.lineDash),r.lineDashOffset=f.lineDashOffset));c&&(r.fillStyle=g.fillStyle);r.textBaseline="middle";r.textAlign="center";f=.5-m;g=m*u.width/l+f*b;if(d)for(d=0;d<n;++d)r.strokeText(a[d],g+f*p[d],.5*(b+q)+d*q);if(c)for(d=0;d<n;++d)r.fillText(a[d],g+f*p[d],.5*(b+q)+d*q)}return ii.get(e)};
-function Uj(a,b,c,d){var e=a.f,f=a.g,g=a.pixelRatio,h=vj[e.textAlign||"center"],l=vj[e.textBaseline];f=f&&f.lineWidth?f.lineWidth:0;h=h*b.width/g+2*(.5-h)*f;l=l*b.height/g+2*(.5-l)*f;a.a.push([6,c,d,b,(h-a.D)*g,(l-a.l)*g,a.N,b.height,1,0,0,a.C,a.B,1,!0,b.width,e.padding==hi?hi:e.padding.map(function(a){return a*g}),!!e.backgroundFill,!!e.backgroundStroke]);a.b.push([6,c,d,b,(h-a.D)*g,(l-a.l)*g,a.N,b.height,1,0,0,a.C,a.B,1/g,!0,b.width,e.padding,!!e.backgroundFill,!!e.backgroundStroke])}
-function Tj(a,b,c,d){var e=a.g,f=a.f,g=a.c,h=a.V;e&&(h in a.ab||(a.ab[h]={strokeStyle:e.strokeStyle,lineCap:e.lineCap,lineDashOffset:e.lineDashOffset,lineWidth:e.lineWidth,lineJoin:e.lineJoin,miterLimit:e.miterLimit,lineDash:e.lineDash}));var l=a.j;a.j in a.s||(a.s[a.j]={font:f.font,textAlign:f.textAlign||"center",scale:f.scale});var m=a.v;g&&(m in a.o||(a.o[m]={fillStyle:g.fillStyle}));var n=a.pixelRatio;g=vj[f.textBaseline];var p=a.l*n,q=a.ta,r=f.font,u=f.scale;e=e?e.lineWidth*u/2:0;var v=a.ua[r];
-v||(a.ua[r]=v={});a.a.push([5,b,c,g,d,f.overflow,m,f.maxAngle,function(a){var b=v[a];b||(b=v[a]=pi(r,a));return b*u*n},p,h,e*n,q,l,1]);a.b.push([5,b,c,g,d,f.overflow,m,f.maxAngle,function(a){var b=v[a];b||(b=v[a]=pi(r,a));return b*u},p,h,e,q,l,1/n])}
-Sj.prototype.nb=function(a,b){var c,d;if(a){this.N=b;(d=a.Fa())?(b=this.c,b||(b=this.c={}),b.fillStyle=zi(d.b||ei)):b=this.c=null;if(c=a.Ga()){d=this.g;d||(d=this.g={});var e=c.g,f=c.i,g=c.c,h=c.l;d.lineCap=c.f||"round";d.lineDash=e?e.slice():fi;d.lineDashOffset=void 0===f?0:f;d.lineJoin=c.j||"round";d.lineWidth=void 0===g?1:g;d.miterLimit=void 0===h?10:h;d.strokeStyle=zi(c.a||gi)}else d=this.g=null;c=this.f;e=a.a||"10px sans-serif";ni(e);f=a.b;c.overflow=a.v;c.font=e;c.maxAngle=a.s;c.placement=a.o;
-c.textAlign=a.f;c.textBaseline=a.j||"middle";c.backgroundFill=a.N;c.backgroundStroke=a.D;c.padding=a.C||hi;c.scale=void 0===f?1:f;e=a.g;f=a.c;g=a.l;h=a.i;this.ta=a.Ka()||"";this.D=void 0===e?0:e;this.l=void 0===f?0:f;this.C=void 0===g?!1:g;this.B=void 0===h?0:h;this.V=d?("string"==typeof d.strokeStyle?d.strokeStyle:x(d.strokeStyle))+d.lineCap+d.lineDashOffset+"|"+d.lineWidth+d.lineJoin+d.miterLimit+"["+d.lineDash.join()+"]":"";this.j=c.font+c.scale+(c.textAlign||"?");this.v=b?"string"==typeof b.fillStyle?
-b.fillStyle:"|"+x(b.fillStyle):""}else this.ta=""};function Vj(a,b,c,d,e,f,g){this.a=f;this.g=null;this.o=a;this.c=b;this.l=e;this.s=d;this.v=c;this.i=g;this.b={};this.f=hg(1,1);this.j=We()}w(Vj,sj);var Wj={0:[[!0]]};function Xj(a,b,c){var d,e=Math.floor(a.length/2);if(b>=e)for(d=e;d<b;d++)a[d][c]=!0;else if(b<e)for(d=b+1;d<e;d++)a[d][c]=!0}
-function Yj(a){if(void 0!==Wj[a])return Wj[a];for(var b=2*a+1,c=Array(b),d=0;d<b;d++)c[d]=Array(b);b=a;for(var e=d=0;b>=d;)Xj(c,a+b,a+d),Xj(c,a+d,a+b),Xj(c,a-d,a+b),Xj(c,a-b,a+d),Xj(c,a-b,a-d),Xj(c,a-d,a-b),Xj(c,a+d,a-b),Xj(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return Wj[a]=c}k=Vj.prototype;k.Vb=function(a){var b=null;this.a&&(a?(b=this.g,b[4]++):(b=this.g=Da(),b.push(1)));return b};function Zj(a){for(var b in a.b){var c=a.b[b],d;for(d in c)c[d].bf()}}
-k.wa=function(a,b,c,d,e,f,g){function h(a){for(var b=n.getImageData(0,0,l,l).data,c=0;c<l;c++)for(var d=0;d<l;d++)if(q[c][d]&&0<b[4*(d*l+c)+3]){if(!r||"Image"!=z&&"Text"!=z||-1!==r.indexOf(a))var e=f(a);if(e)return e;n.clearRect(0,0,l,l);return}}d=Math.round(d);var l=2*d+1,m=ef(this.j,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),n=this.f;n.canvas.width!==l||n.canvas.height!==l?(n.canvas.width=l,n.canvas.height=l):n.clearRect(0,0,l,l);if(void 0!==this.i){var p=Da();Ea(p,a);Fa(p,b*(this.i+d),p)}var q=Yj(d),r;
-this.a&&(r=this.a.all().map(function(a){return a.value}));a=Object.keys(this.b).map(Number);a.sort(dc);for(b=a.length-1;0<=b;--b){var u=a[b].toString();var v=this.b[u];for(d=uj.length-1;0<=d;--d){var z=uj[d];var A=v[z];if(void 0!==A)if(!g||"Image"!=z&&"Text"!=z){if(A=Ij(A,n,m,c,e,h,p))return A}else{var E=g[u];E?E.push(A,m.slice(0)):g[u]=[A,m.slice(0)]}}}};function ak(a,b){var c=a.c;a=c[0];var d=c[1],e=c[2];c=c[3];a=[a,d,a,c,e,c,e,d];Te(a,0,8,2,b,a);return a}
-k.Ja=function(a,b){var c=void 0!==a?a.toString():"0";a=this.b[c];void 0===a&&(a={},this.b[c]=a);c=a[b];void 0===c&&(c=new bk[b](this.o,this.c,this.v,this.s,this.l,this.a),a[b]=c);return c};k.yg=function(){return nb(this.b)};
-k.Na=function(a,b,c,d,e,f){var g=Object.keys(this.b).map(Number);g.sort(dc);a.save();var h=ak(this,b);a.beginPath();a.moveTo(h[0],h[1]);a.lineTo(h[2],h[3]);a.lineTo(h[4],h[5]);a.lineTo(h[6],h[7]);a.clip();e=e?e:uj;var l,m;h=0;for(l=g.length;h<l;++h){var n=g[h].toString();var p=this.b[n];var q=0;for(m=e.length;q<m;++q){var r=e[q];var u=p[r];void 0!==u&&(!f||"Image"!=r&&"Text"!=r?u.Na(a,b,c,d):(r=f[n])?r.push(u,b.slice(0)):f[n]=[u,b.slice(0)])}}a.restore()};
-var bk={Circle:Pj,Default:wj,Image:Mj,LineString:Nj,Polygon:Pj,Text:Sj};function ck(a,b){return x(a)-x(b)}function dk(a,b){a=.5*a/b;return a*a}function ek(a,b,c,d,e,f){var g=!1,h;if(h=c.Y()){var l=h.gf();2==l||3==l?h.Yj(e,f):(0==l&&h.load(),h.gi(e,f),g=!0)}if(e=(0,c.cb)(b))if(d=e.Wd(d),c.Ie())fk(a,d,c,b);else(0,gk[d.S()])(a,d,c,b);return g}function fk(a,b,c,d){if("GeometryCollection"==b.S()){b=b.vd();for(var e=0,f=b.length;e<f;++e)fk(a,b[e],c,d)}else a.Ja(c.Ba(),"Default").Hh(b,d,c.Ie())}
-var gk={Point:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.gf())return;var f=a.Ja(c.Ba(),"Image");f.Zb(e,a.Vb(!1));f.yc(b,d)}if(f=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(f,a.Vb(!!e)),c.Wb(b,d)},LineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.Ja(c.Ba(),"LineString");f.Oa(null,e);f.uc(b,d)}if(e=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(e,a.Vb(!1)),c.Wb(b,d)},Polygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.Ja(c.Ba(),"Polygon");g.Oa(e,f);g.zc(b,d)}if(e=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(e,a.Vb(!1)),
-c.Wb(b,d)},MultiPoint:function(a,b,c,d){var e=c.Y();if(e){if(2!=e.gf())return;var f=a.Ja(c.Ba(),"Image");f.Zb(e,a.Vb(!1));f.wc(b,d)}if(f=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(f,a.Vb(!!e)),c.Wb(b,d)},MultiLineString:function(a,b,c,d){var e=c.Ga();if(e){var f=a.Ja(c.Ba(),"LineString");f.Oa(null,e);f.vc(b,d)}if(e=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(e,a.Vb(!1)),c.Wb(b,d)},MultiPolygon:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(f||e){var g=a.Ja(c.Ba(),"Polygon");g.Oa(e,f);g.xc(b,d)}if(e=c.Ka())c=a.Ja(c.Ba(),
-"Text"),c.nb(e,a.Vb(!1)),c.Wb(b,d)},GeometryCollection:function(a,b,c,d){b=b.a;var e;var f=0;for(e=b.length;f<e;++f)(0,gk[b[f].S()])(a,b[f],c,d)},Circle:function(a,b,c,d){var e=c.Fa(),f=c.Ga();if(e||f){var g=a.Ja(c.Ba(),"Circle");g.Oa(e,f);g.cc(b,d)}if(e=c.Ka())c=a.Ja(c.Ba(),"Text"),c.nb(e,a.Vb(!1)),c.Wb(b,d)}};function hk(a){Xi.call(this,a);this.f=a.D?rj.Jc(9):null;this.i=!1;this.N=-1;this.o=NaN;this.l=Da();this.c=this.v=null;this.j=!0;this.context=hg();y(ii,"clear",this.Vi,this)}w(hk,Xi);hk.handles=function(a,b){return"canvas"===a&&"VECTOR"===b.S()};hk.create=function(a,b){return new hk(b)};k=hk.prototype;k.ia=function(){Mc(ii,"clear",this.Vi,this);Xi.prototype.ia.call(this)};
-k.df=function(a,b,c){var d=a.extent,e=a.pixelRatio,f=b.Te?a.skippedFeatureUids:{},g=a.viewState,h=g.projection,l=g.rotation,m=h.G(),n=this.a.ha(),p=$i(this,a,0);Zi(this,"precompose",c,a,p);var q=b.extent;(g=void 0!==q)&&Yi(c,a,q);var r=this.c;if(r&&!r.yg()){this.f&&this.f.clear();var u=q=0,v=1!==b.opacity,z=Tc(this.a,"render");if(v||z){var A=c.canvas.width;var E=c.canvas.height;if(l){var S=Math.round(Math.sqrt(A*A+E*E));q=(S-A)/2;u=(S-E)/2;A=E=S}this.context.canvas.width=A;this.context.canvas.height=
-E;A=this.context}else A=c;E=A.globalAlpha;v||(A.globalAlpha=b.opacity);A!=c&&A.translate(q,u);S=a.size[0]*e;e*=a.size[1];qi(A,-l,S/2,e/2);r.Na(A,p,l,f);if(n.D&&h.g&&!La(m,d)){h=d[0];n=cb(m);for(var Ia=0;h<m[0];)--Ia,p=n*Ia,p=$i(this,a,p),r.Na(A,p,l,f),h+=n;Ia=0;for(h=d[2];h>m[2];)++Ia,p=n*Ia,p=$i(this,a,p),r.Na(A,p,l,f),h-=n;p=$i(this,a,0)}qi(A,l,S/2,e/2);A!=c&&(z&&Zi(this,"render",A,a,p),v?(d=c.globalAlpha,c.globalAlpha=b.opacity,c.drawImage(A.canvas,-q,-u),c.globalAlpha=d):c.drawImage(A.canvas,
--q,-u),A.translate(-q,-u));v||(A.globalAlpha=E)}g&&c.restore();this.pf(c,a,b,p)};k.wa=function(a,b,c,d,e){if(this.c){var f=this.a,g={};return this.c.wa(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)},null)}};k.Vi=function(){var a=this.a;a.Jb()&&this.c&&a.u()};k.Wi=function(){Mi(this)};
-k.$c=function(a){var b=this.a,c=b.ha();Ui(a,c);var d=a.viewHints[0],e=a.viewHints[1],f=b.ca,g=b.ra;if(!this.i&&!f&&d||!g&&e)return!0;f=a.extent;var h=a.viewState;g=h.projection;var l=h.resolution,m=a.pixelRatio;d=b.g;var n=b.f;e=b.get(ik);void 0===e&&(e=ck);f=Fa(f,n*l);n=h.projection.G();c.D&&h.projection.g&&!La(n,a.extent)&&(a=Math.max(cb(f)/2,cb(n)),f[0]=n[0]-a,f[2]=n[2]+a);if(!this.i&&this.o==l&&this.N==d&&this.v==e&&La(this.l,f))return this.j=!1,!0;this.c=null;this.i=!1;var p=new Vj(.5*l/m,f,
-l,m,c.$,this.f,b.f);c.ae(f,l,g);a=function(a){var c=a.ib();if(c)var d=c.call(a,l);else(c=b.ib())&&(d=c(a,l));if(d){if(d){c=!1;if(Array.isArray(d))for(var e=0,f=d.length;e<f;++e)c=ek(p,a,d[e],dk(l,m),this.Wi,this)||c;else c=ek(p,a,d,dk(l,m),this.Wi,this);a=c}else a=!1;this.i=this.i||a}}.bind(this);if(e){var q=[];c.ec(f,function(a){q.push(a)},this);q.sort(e);c=0;for(g=q.length;c<g;++c)a(q[c])}else c.ec(f,a,this);Zj(p);this.o=l;this.N=d;this.v=e;this.l=f;this.c=p;return this.j=!0};function jk(a){this.context=null;mj.call(this,a);this.N=a.D?rj.Jc(9):null;this.D=!1;this.ca=We();this.O="vector"==a.l?1:0;y(ii,"clear",this.Xi,this)}w(jk,mj);jk.handles=function(a,b){return"canvas"===a&&"VECTOR_TILE"===b.S()};jk.create=function(a,b){return new jk(b)};var kk={image:["Polygon","Circle","LineString","Image","Text"],hybrid:["Polygon","LineString"]},lk={image:["Default"],hybrid:["Image","Text","Default"],vector:uj};k=jk.prototype;k.ia=function(){Mc(ii,"clear",this.Xi,this);mj.prototype.ia.call(this)};
-k.$c=function(a,b){var c=this.a,d=c.g;this.B!=d&&(this.f.length=0,c=c.l,this.context||"vector"==c||(this.context=hg()),this.context&&"vector"==c&&(this.context=null));this.B=d;return mj.prototype.$c.apply(this,arguments)};
-k.Sf=function(a,b,c,d,e,f,g,h,l){var m=a,n=this.a,p=b.pixelRatio,q=b.viewState.projection,r=n.g,u=n.get(ik)||null,v=mk(m,n);if(v.Be||v.wf!=r||v.eh!=u){var z=n.ha(),A=z.tileGrid,E=z.eb(q),S=E.Ta(m.ya[0]);E=E.Ma(m.l);for(var Ia=0,ta=m.a.length;Ia<ta;++Ia){var la=m.c[m.a[Ia]];if(3!=la.getState()){var ca=A.Ma(la.ya),ia=gb(E,ca),xa=Sa(ca,ia)?null:Fa(ia,n.f*S),Va=la.o,ic=!1;Xb(q,Va)||(ic=!0,la.vg(q));v.Be=!1;ia=new Vj(0,ia,S,p,z.s,this.N,n.f);var Xa=dk(S,p),Z=la.a;u&&u!==v.eh&&Z.sort(u);for(var Zb,Le=0,
-Uf=Z.length;Le<Uf;++Le)if(Zb=Z[Le],ic&&("tile-pixels"==Va.a&&(Va.Sj(ca),Va.Si(la.G())),Zb.U().mb(Va,q)),!xa||hb(xa,Zb.U().G())){var Id=void 0,te=Zb.ib();te?Id=te.call(Zb,S):(te=n.ib())&&(Id=te(Zb,S));if(Id){te=Xa;var Jh=ia;if(Id){var Mg=!1;if(Array.isArray(Id))for(var Ng=0,Wf=Id.length;Ng<Wf;++Ng)Mg=ek(Jh,Zb,Id[Ng],te,this.Yi,this)||Mg;else Mg=ek(Jh,Zb,Id,te,this.Yi,this);Zb=Mg}else Zb=!1;this.D=this.D||Zb;v.Be=v.Be||Zb}}Zj(ia);for(var rf in ia.b);ca=m.ya.toString();xa=ia;la.f[x(n)+","+ca]=xa}}v.wf=
-r;v.eh=u}if(this.context){v=b;n=this.a;q=mk(m,n);r=n.g;if((p=kk[n.l])&&q.fh!==r)for(q.fh=r,z=m.l,S=z[0],q=v.pixelRatio,rf=n.ha(),A=rf.eb(v.viewState.projection),r=A.Ta(S),u=nk(m,n),v=rf.Zd(S,q,v.viewState.projection),u.canvas.width=v[0],u.canvas.height=v[1],v=A.Ma(z),z=0,A=m.a.length;z<A;++z)S=m.c[m.a[z]],3!=S.getState()&&(rf=q/r,E=Xe(this.ca),cf(E,rf,-rf),df(E,-v[0],-v[3]),ok(S,n,m.ya.toString()).Na(u,E,0,{},p));mj.prototype.Sf.apply(this,arguments)}};
-k.wa=function(a,b,c,d,e){var f=b.viewState.resolution,g=b.viewState.rotation;c=void 0==c?0:c;var h=this.a,l={},m=this.f;b=h.ha().eb(b.viewState.projection);var n;var p=0;for(n=m.length;p<n;++p){var q=m[p];var r=q.l;r=b.Ma(r,this.T);var u=Fa(r,c*f,u);if(Ja(u,a)){r=0;for(var v=q.a.length;r<v;++r){var z=q.c[q.a[r]];if(3!=z.getState()){z=ok(z,h,q.ya.toString());var A=A||z.wa(a,f,g,c,{},function(a){var b=x(a).toString();if(!(b in l))return l[b]=!0,d.call(e,a,h)},null)}}}}return A};
-k.Xi=function(){var a=this.a;a.Jb()&&void 0!==this.B&&a.u()};k.Yi=function(){Mi(this)};
-k.pf=function(a,b,c){var d=this.a,e=d.D?{}:null,f=d.ha(),g=d.l,h=lk[g],l=b.pixelRatio,m=b.viewState.rotation,n=b.size;if(m){var p=Math.round(l*n[0]/2);var q=Math.round(l*n[1]/2);qi(a,-m,p,q)}e&&this.N.clear();l=this.f;f=f.eb(b.viewState.projection);n=[];for(var r=[],u=l.length-1;0<=u;--u){var v=l[u];if(5!=v.getState())for(var z=v.ya,A=f.Ma(z)[0]-f.Ma(v.l)[0],E=void 0,S=0,Ia=v.a.length;S<Ia;++S){var ta=v.c[v.a[S]];if(3!=ta.getState()){var la=ok(ta,d,z.toString()),ca;if(!(ca="vector"==g))a:{ca=void 0;
-for(ca in la.b)for(var ia=la.b[ca],xa=0,Va=h.length;xa<Va;++xa)if(h[xa]in ia){ca=!0;break a}ca=!1}if(ca){E||(E=$i(this,b,A));ta=ta.ya[0];ca=ak(la,E);a.save();a.globalAlpha=c.opacity;ia=0;for(xa=n.length;ia<xa;++ia)Va=n[ia],ta<r[ia]&&(a.beginPath(),a.moveTo(ca[0],ca[1]),a.lineTo(ca[2],ca[3]),a.lineTo(ca[4],ca[5]),a.lineTo(ca[6],ca[7]),a.moveTo(Va[6],Va[7]),a.lineTo(Va[4],Va[5]),a.lineTo(Va[2],Va[3]),a.lineTo(Va[0],Va[1]),a.clip());la.Na(a,E,m,{},h,e);a.restore();n.push(ca);r.push(ta)}}}}if(e)for(d=
-a,g=Object.keys(e).map(Number).sort(dc),h={},l=0,f=g.length;l<f;++l)for(n=e[g[l].toString()],r=0,u=n.length;r<u;)v=n[r++],z=n[r++],v.Na(d,z,m,h);m&&qi(a,m,p,q);mj.prototype.pf.apply(this,arguments)};qg("MAP_RENDERER",kj);rg([bj,mj,hk,jk]);function H(a){a=kb({},a);delete a.renderer;a.controls||(a.controls=Fg());a.interactions||(a.interactions=Zh());G.call(this,a)}w(H,G);function pk(a){Vc.call(this);a=a?a:{};this.a=null;y(this,Xc(qk),this.$m,this);this.rg(void 0!==a.tracking?a.tracking:!1)}w(pk,Vc);k=pk.prototype;k.ia=function(){this.rg(!1);Vc.prototype.ia.call(this)};
-k.Dp=function(a){if(null!==a.alpha){var b=va(a.alpha);this.set(rk,b);"boolean"===typeof a.absolute&&a.absolute?this.set(sk,b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set(sk,va(a.webkitCompassHeading))}null!==a.beta&&this.set(tk,va(a.beta));null!==a.gamma&&this.set(uk,va(a.gamma));this.u()};k.Ym=function(){return this.get(rk)};k.ll=function(){return this.get(tk)};k.ql=function(){return this.get(uk)};k.Zm=function(){return this.get(sk)};k.li=function(){return this.get(qk)};
-k.$m=function(){if(qd){var a=this.li();a&&!this.a?this.a=y(window,"deviceorientation",this.Dp,this):a||null===this.a||(Gc(this.a),this.a=null)}};k.rg=function(a){this.set(qk,a)};var rk="alpha",tk="beta",uk="gamma",sk="heading",qk="tracking";function vk(a){this.i=a.opacity;this.s=a.rotateWithView;this.f=a.rotation;this.a=a.scale;this.v=a.snapToPixel}k=vk.prototype;k.hf=function(){return this.i};k.jf=function(){return this.s};k.kf=function(){return this.f};k.lf=function(){return this.a};k.Ke=function(){return this.v};k.Ed=function(a){this.i=a};k.mf=function(a){this.f=a};k.Fd=function(a){this.a=a};function wk(a){this.D=this.o=this.c=null;this.Xa=void 0!==a.fill?a.fill:null;this.oa=[0,0];this.l=a.points;this.b=void 0!==a.radius?a.radius:a.radius1;this.g=a.radius2;this.j=void 0!==a.angle?a.angle:0;this.Ya=void 0!==a.stroke?a.stroke:null;this.B=this.qa=this.C=null;this.N=a.atlasManager;xk(this,this.N);vk.call(this,{opacity:1,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1,rotation:void 0!==a.rotation?a.rotation:0,scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0})}
-w(wk,vk);k=wk.prototype;k.clone=function(){var a=new wk({fill:this.Fa()?this.Fa().clone():void 0,points:this.l,radius:this.b,radius2:this.g,angle:this.j,snapToPixel:this.v,stroke:this.Ga()?this.Ga().clone():void 0,rotation:this.f,rotateWithView:this.s,atlasManager:this.N});a.Ed(this.i);a.Fd(this.a);return a};k.Vc=function(){return this.C};k.ij=function(){return this.j};k.Fa=function(){return this.Xa};k.Eg=function(){return this.D};k.Y=function(){return this.o};k.He=function(){return this.B};
-k.gf=function(){return 2};k.bd=function(){return this.oa};k.jj=function(){return this.l};k.kj=function(){return this.b};k.Zh=function(){return this.g};k.oc=function(){return this.qa};k.Ga=function(){return this.Ya};k.gi=function(){};k.load=function(){};k.Yj=function(){};
-function xk(a,b){var c="",d="",e=0,f=null,g=0,h=0;if(a.Ya){var l=a.Ya.a;null===l&&(l=gi);l=zi(l);h=a.Ya.c;void 0===h&&(h=1);f=a.Ya.g;g=a.Ya.i;od||(f=null,g=0);d=a.Ya.j;void 0===d&&(d="round");c=a.Ya.f;void 0===c&&(c="round");e=a.Ya.l;void 0===e&&(e=10)}var m=2*(a.b+h)+1;c={strokeStyle:l,Wj:h,size:m,lineCap:c,lineDash:f,lineDashOffset:g,lineJoin:d,miterLimit:e};if(void 0===b){var n=hg(m,m);a.o=n.canvas;b=m=a.o.width;a.Jh(c,n,0,0);a.Xa?a.D=a.o:(n=hg(c.size,c.size),a.D=n.canvas,a.Ih(c,n,0,0))}else m=
-Math.round(m),(d=!a.Xa)&&(n=a.Ih.bind(a,c)),a.Ya?(e=a.Ya,void 0===e.b&&(e.b="s",e.b=e.a?"string"===typeof e.a?e.b+e.a:e.b+x(e.a).toString():e.b+"-",e.b+=","+(void 0!==e.f?e.f.toString():"-")+","+(e.g?e.g.toString():"-")+","+(void 0!==e.i?e.i:"-")+","+(void 0!==e.j?e.j:"-")+","+(void 0!==e.l?e.l.toString():"-")+","+(void 0!==e.c?e.c.toString():"-")),e=e.b):e="-",a.Xa?(f=a.Xa,void 0===f.a&&(f.a=f.b instanceof CanvasPattern||f.b instanceof CanvasGradient?x(f.b).toString():"f"+(f.b?xi(f.b):"-")),f=f.a):
-f="-",a.c&&e==a.c[1]&&f==a.c[2]&&a.b==a.c[3]&&a.g==a.c[4]&&a.j==a.c[5]&&a.l==a.c[6]||(a.c=["r"+e+f+(void 0!==a.b?a.b.toString():"-")+(void 0!==a.g?a.g.toString():"-")+(void 0!==a.j?a.j.toString():"-")+(void 0!==a.l?a.l.toString():"-"),e,f,a.b,a.g,a.j,a.l]),n=b.add(a.c[0],m,m,a.Jh.bind(a,c),n),a.o=n.image,a.oa=[n.offsetX,n.offsetY],b=n.image.width,a.D=d?n.Bm:a.o;a.C=[m/2,m/2];a.qa=[m,m];a.B=[b,b]}
-k.Jh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();var e=this.l;if(Infinity===e)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{var f=void 0!==this.g?this.g:this.b;f!==this.b&&(e*=2);for(c=0;c<=e;c++){d=2*c*Math.PI/e-Math.PI/2+this.j;var g=0===c%2?this.b:f;b.lineTo(a.size/2+g*Math.cos(d),a.size/2+g*Math.sin(d))}}this.Xa&&(c=this.Xa.b,null===c&&(c=ei),b.fillStyle=zi(c),b.fill());this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Wj,a.lineDash&&(b.setLineDash(a.lineDash),
-b.lineDashOffset=a.lineDashOffset),b.lineCap=a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()};
-k.Ih=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();c=this.l;if(Infinity===c)b.arc(a.size/2,a.size/2,this.b,0,2*Math.PI,!0);else{d=void 0!==this.g?this.g:this.b;d!==this.b&&(c*=2);var e;for(e=0;e<=c;e++){var f=2*e*Math.PI/c-Math.PI/2+this.j;var g=0===e%2?this.b:d;b.lineTo(a.size/2+g*Math.cos(f),a.size/2+g*Math.sin(f))}}b.fillStyle=ei;b.fill();this.Ya&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.Wj,a.lineDash&&(b.setLineDash(a.lineDash),b.lineDashOffset=a.lineDashOffset),
-b.stroke());b.closePath()};function yk(a){a=a||{};wk.call(this,{points:Infinity,fill:a.fill,radius:a.radius,snapToPixel:a.snapToPixel,stroke:a.stroke,atlasManager:a.atlasManager})}w(yk,wk);yk.prototype.clone=function(){var a=new yk({fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,radius:this.b,snapToPixel:this.v,atlasManager:this.N});a.Ed(this.i);a.Fd(this.a);return a};yk.prototype.fd=function(a){this.b=a;xk(this,this.N)};function zk(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.a=void 0}zk.prototype.clone=function(){var a=this.b;return new zk({color:a&&a.slice?a.slice():a||void 0})};zk.prototype.g=function(){return this.b};zk.prototype.c=function(a){this.b=a;this.a=void 0};function Ak(a){a=a||{};this.a=void 0!==a.color?a.color:null;this.f=a.lineCap;this.g=void 0!==a.lineDash?a.lineDash:null;this.i=a.lineDashOffset;this.j=a.lineJoin;this.l=a.miterLimit;this.c=a.width;this.b=void 0}k=Ak.prototype;k.clone=function(){var a=this.a;return new Ak({color:a&&a.slice?a.slice():a||void 0,lineCap:this.f,lineDash:this.g?this.g.slice():void 0,lineDashOffset:this.i,lineJoin:this.j,miterLimit:this.l,width:this.c})};k.pp=function(){return this.a};k.vl=function(){return this.f};
-k.qp=function(){return this.g};k.wl=function(){return this.i};k.xl=function(){return this.j};k.Dl=function(){return this.l};k.rp=function(){return this.c};k.sp=function(a){this.a=a;this.b=void 0};k.yq=function(a){this.f=a;this.b=void 0};k.setLineDash=function(a){this.g=a;this.b=void 0};k.zq=function(a){this.i=a;this.b=void 0};k.Aq=function(a){this.j=a;this.b=void 0};k.Eq=function(a){this.l=a;this.b=void 0};k.Kq=function(a){this.c=a;this.b=void 0};function Bk(a){a=a||{};this.Uc=null;this.cb=Ck;void 0!==a.geometry&&this.Va(a.geometry);this.Xa=void 0!==a.fill?a.fill:null;this.M=void 0!==a.image?a.image:null;this.pc=void 0!==a.renderer?a.renderer:null;this.Ya=void 0!==a.stroke?a.stroke:null;this.ta=void 0!==a.text?a.text:null;this.bk=a.zIndex}k=Bk.prototype;
-k.clone=function(){var a=this.U();a&&a.clone&&(a=a.clone());return new Bk({geometry:a,fill:this.Fa()?this.Fa().clone():void 0,image:this.Y()?this.Y().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,text:this.Ka()?this.Ka().clone():void 0,zIndex:this.Ba()})};k.Ie=function(){return this.pc};k.Iq=function(a){this.pc=a};k.U=function(){return this.Uc};k.rl=function(){return this.cb};k.Fa=function(){return this.Xa};k.yf=function(a){this.Xa=a};k.Y=function(){return this.M};
-k.ih=function(a){this.M=a};k.Ga=function(){return this.Ya};k.Af=function(a){this.Ya=a};k.Ka=function(){return this.ta};k.Hd=function(a){this.ta=a};k.Ba=function(){return this.bk};k.Va=function(a){"function"===typeof a?this.cb=a:"string"===typeof a?this.cb=function(b){return b.get(a)}:a?void 0!==a&&(this.cb=function(){return a}):this.cb=Ck;this.Uc=a};k.$b=function(a){this.bk=a};
-function Dk(a){if("function"!==typeof a){if(Array.isArray(a))var b=a;else oa(a instanceof Bk,41),b=[a];a=function(){return b}}return a}var Ek=null;function Fk(){if(!Ek){var a=new zk({color:"rgba(255,255,255,0.4)"}),b=new Ak({color:"#3399CC",width:1.25});Ek=[new Bk({image:new yk({fill:a,stroke:b,radius:5}),fill:a,stroke:b})]}return Ek}
-function Gk(){var a={},b=[255,255,255,1],c=[0,153,255,1];a.Polygon=[new Bk({fill:new zk({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new Bk({stroke:new Ak({color:b,width:5})}),new Bk({stroke:new Ak({color:c,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new Bk({image:new yk({radius:6,fill:new zk({color:c}),stroke:new Ak({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.LineString,
-a.Point);return a}function Ck(a){return a.U()};function Hk(a){Vc.call(this);this.c=void 0;this.a="geometry";this.f=null;this.j=void 0;this.i=null;y(this,Xc(this.a),this.Oe,this);void 0!==a&&(a instanceof gf||!a?this.Va(a):this.H(a))}w(Hk,Vc);k=Hk.prototype;k.clone=function(){var a=new Hk(this.L());a.Lc(this.a);var b=this.U();b&&a.Va(b.clone());(b=this.f)&&a.sg(b);return a};k.U=function(){return this.get(this.a)};k.an=function(){return this.c};k.sl=function(){return this.a};k.bn=function(){return this.f};k.ib=function(){return this.j};k.bm=function(){this.u()};
-k.Oe=function(){this.i&&(Gc(this.i),this.i=null);var a=this.U();a&&(this.i=y(a,"change",this.bm,this));this.u()};k.Va=function(a){this.set(this.a,a)};k.sg=function(a){this.j=(this.f=a)?Ik(a):void 0;this.u()};k.qc=function(a){this.c=a;this.u()};k.Lc=function(a){Mc(this,Xc(this.a),this.Oe,this);this.a=a;y(this,Xc(this.a),this.Oe,this);this.Oe()};
-function Ik(a){var b;if("function"===typeof a)2==a.length?b=function(b){return a(this,b)}:b=a;else{if(Array.isArray(a))var c=a;else oa(a instanceof Bk,41),c=[a];b=function(){return c}}return b};function Jk(a){Vc.call(this);a=a||{};this.a=null;this.i=$b;this.f=new ob(6378137);this.c=void 0;y(this,Xc("projection"),this.en,this);y(this,Xc("tracking"),this.fn,this);void 0!==a.projection&&this.oi(a.projection);void 0!==a.trackingOptions&&this.Rj(a.trackingOptions);this.Ue(void 0!==a.tracking?a.tracking:!1)}w(Jk,Vc);k=Jk.prototype;k.ia=function(){this.Ue(!1);Vc.prototype.ia.call(this)};k.en=function(){var a=this.mi();a&&(this.i=Pb(Ob("EPSG:4326"),a),this.a&&this.set("position",this.i(this.a)))};
-k.fn=function(){if(rd){var a=this.ni();a&&void 0===this.c?this.c=navigator.geolocation.watchPosition(this.Pp.bind(this),this.Qp.bind(this),this.ai()):a||void 0===this.c||(navigator.geolocation.clearWatch(this.c),this.c=void 0)}};
-k.Pp=function(a){a=a.coords;this.set("accuracy",a.accuracy);this.set("altitude",null===a.altitude?void 0:a.altitude);this.set("altitudeAccuracy",null===a.altitudeAccuracy?void 0:a.altitudeAccuracy);this.set("heading",null===a.heading?void 0:va(a.heading));this.a?(this.a[0]=a.longitude,this.a[1]=a.latitude):this.a=[a.longitude,a.latitude];var b=this.i(this.a);this.set("position",b);this.set("speed",null===a.speed?void 0:a.speed);a=Qf(this.f,this.a,a.accuracy);a.Rc(this.i);this.set("accuracyGeometry",
-a);this.u()};k.Qp=function(a){a.type="error";this.Ue(!1);this.b(a)};k.el=function(){return this.get("accuracy")};k.fl=function(){return this.get("accuracyGeometry")||null};k.gl=function(){return this.get("altitude")};k.hl=function(){return this.get("altitudeAccuracy")};k.cn=function(){return this.get("heading")};k.dn=function(){return this.get("position")};k.mi=function(){return this.get("projection")};k.Ol=function(){return this.get("speed")};k.ni=function(){return this.get("tracking")};k.ai=function(){return this.get("trackingOptions")};
-k.oi=function(a){this.set("projection",Ob(a))};k.Ue=function(a){this.set("tracking",a)};k.Rj=function(a){this.set("trackingOptions",a)};function Kk(a,b,c,d,e,f){var g=NaN,h=NaN,l=(c-b)/d;if(1===l)g=a[b],h=a[b+1];else if(2==l)g=(1-e)*a[b]+e*a[b+d],h=(1-e)*a[b+1]+e*a[b+d+1];else if(0!==l){h=a[b];l=a[b+1];var m=0;g=[0];var n;for(n=b+d;n<c;n+=d){var p=a[n],q=a[n+1];m+=Math.sqrt((p-h)*(p-h)+(q-l)*(q-l));g.push(m);h=p;l=q}c=e*m;l=0;m=g.length;for(n=!1;l<m;)e=l+(m-l>>1),h=+dc(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=ya(a[b],a[b+d],c),h=ya(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f?
-(f[0]=g,f[1]=h,f):[g,h]}function Sk(a,b,c,d,e,f){if(c==b)return null;if(e<a[b+d-1])return f?(c=a.slice(b,b+d),c[d-1]=e,c):null;if(a[c-1]<e)return f?(c=a.slice(c-d,c),c[d-1]=e,c):null;if(e==a[b+d-1])return a.slice(b,b+d);b/=d;for(c/=d;b<c;)f=b+c>>1,e<a[(f+1)*d-1]?c=f:b=f+1;c=a[b*d-1];if(e==c)return a.slice((b-1)*d,(b-1)*d+d);f=(e-c)/(a[(b+1)*d-1]-c);c=[];var g;for(g=0;g<d-1;++g)c.push(ya(a[(b-1)*d+g],a[b*d+g],f));c.push(e);return c}
-function Tk(a,b,c,d,e,f){var g=0;if(f)return Sk(a,g,b[b.length-1],c,d,e);if(d<a[c-1])return e?(a=a.slice(0,c),a[c-1]=d,a):null;if(a[a.length-1]<d)return e?(a=a.slice(a.length-c),a[c-1]=d,a):null;e=0;for(f=b.length;e<f;++e){var h=b[e];if(g!=h){if(d<a[g+c-1])break;else if(d<=a[h-1])return Sk(a,g,h,c,d,!1);g=h}}return null};function I(a,b){hf.call(this);this.c=null;this.o=this.D=this.j=-1;this.na(a,b)}w(I,hf);k=I.prototype;k.Fk=function(a){this.A?gc(this.A,a):this.A=a.slice();this.u()};k.clone=function(){var a=new I(null);a.ba(this.ja,this.A.slice());return a};k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;this.o!=this.g&&(this.D=Math.sqrt(pf(this.A,0,this.A.length,this.a,0)),this.o=this.g);return tf(this.A,0,this.A.length,this.a,this.D,!1,a,b,c,d)};
-k.dl=function(a,b){return Jf(this.A,0,this.A.length,this.a,a,b)};k.Tn=function(a,b){return"XYM"!=this.ja&&"XYZM"!=this.ja?null:Sk(this.A,0,this.A.length,this.a,a,void 0!==b?b:!1)};k.W=function(){return yf(this.A,0,this.A.length,this.a)};k.Ph=function(a,b){return Kk(this.A,0,this.A.length,this.a,a,b)};k.Un=function(){return tj(this.A,0,this.A.length,this.a)};k.Fe=function(){this.j!=this.g&&(this.c=this.Ph(.5,this.c),this.j=this.g);return this.c};
-k.xd=function(a){var b=[];b.length=Bf(this.A,0,this.A.length,this.a,a,b,0);a=new I(null);a.ba("XY",b);return a};k.S=function(){return"LineString"};k.$a=function(a){return Kf(this.A,0,this.A.length,this.a,a)};k.na=function(a,b){a?(lf(this,b,a,1),this.A||(this.A=[]),this.A.length=wf(this.A,0,a,this.a),this.u()):this.ba("XY",null)};k.ba=function(a,b){kf(this,a,b);this.u()};function Uk(a,b,c){for(var d=[],e=a(0),f=a(1),g=b(e),h=b(f),l=[f,e],m=[h,g],n=[1,0],p={},q=1E5,r,u,v,z,A;0<--q&&0<n.length;)v=n.pop(),e=l.pop(),g=m.pop(),f=v.toString(),f in p||(d.push(g[0],g[1]),p[f]=!0),z=n.pop(),f=l.pop(),h=m.pop(),A=(v+z)/2,r=a(A),u=b(r),sa(u[0],u[1],g[0],g[1],h[0],h[1])<c?(d.push(h[0],h[1]),f=z.toString(),p[f]=!0):(n.push(z,A,A,v),m.push(h,u,u,g),l.push(f,r,r,e));return d}function Vk(a,b,c,d,e){var f=Ob("EPSG:4326");return Uk(function(d){return[a,b+(c-b)*d]},Yb(f,d),e)}
-function Wk(a,b,c,d,e){var f=Ob("EPSG:4326");return Uk(function(d){return[b+(c-b)*d,a]},Yb(f,d),e)};function J(a){a=a||{};this.a=a.font;this.i=a.rotation;this.l=a.rotateWithView;this.b=a.scale;this.ta=a.text;this.f=a.textAlign;this.j=a.textBaseline;this.Xa=void 0!==a.fill?a.fill:new zk({color:"#333"});this.s=void 0!==a.maxAngle?a.maxAngle:Math.PI/4;this.o=void 0!==a.placement?a.placement:"point";var b=void 0===a.overflow?a.exceedLength:a.overflow;this.v=void 0!==b?b:!1;this.Ya=void 0!==a.stroke?a.stroke:null;this.g=void 0!==a.offsetX?a.offsetX:0;this.c=void 0!==a.offsetY?a.offsetY:0;this.N=a.backgroundFill?
-a.backgroundFill:null;this.D=a.backgroundStroke?a.backgroundStroke:null;this.C=void 0===a.padding?null:a.padding}k=J.prototype;k.clone=function(){return new J({font:this.a,placement:this.o,maxAngle:this.s,overflow:this.v,rotation:this.i,rotateWithView:this.l,scale:this.b,text:this.Ka(),textAlign:this.f,textBaseline:this.j,fill:this.Fa()?this.Fa().clone():void 0,stroke:this.Ga()?this.Ga().clone():void 0,offsetX:this.g,offsetY:this.c})};k.Gl=function(){return this.v};k.pl=function(){return this.a};
-k.Bl=function(){return this.s};k.Kl=function(){return this.o};k.El=function(){return this.g};k.Fl=function(){return this.c};k.Fa=function(){return this.Xa};k.tp=function(){return this.l};k.up=function(){return this.i};k.vp=function(){return this.b};k.Ga=function(){return this.Ya};k.Ka=function(){return this.ta};k.Ql=function(){return this.f};k.Rl=function(){return this.j};k.jl=function(){return this.N};k.kl=function(){return this.D};k.Il=function(){return this.C};k.Fq=function(a){this.v=a};
-k.Jj=function(a){this.a=a};k.Bq=function(a){this.s=a};k.Nj=function(a){this.g=a};k.Oj=function(a){this.c=a};k.Hq=function(a){this.o=a};k.yf=function(a){this.Xa=a};k.wp=function(a){this.i=a};k.lj=function(a){this.b=a};k.Af=function(a){this.Ya=a};k.Hd=function(a){this.ta=a};k.Qj=function(a){this.f=a};k.Jq=function(a){this.j=a};k.sq=function(a){this.N=a};k.tq=function(a){this.D=a};k.Gq=function(a){this.C=a};function Xk(a){a=a||{};this.i=this.v=null;this.j=this.f=Infinity;this.s=this.l=-Infinity;this.qa=this.oa=Infinity;this.O=this.T=-Infinity;this.ua=void 0!==a.targetSize?a.targetSize:100;this.ab=void 0!==a.maxLines?a.maxLines:100;this.g=[];this.c=[];this.ra=void 0!==a.strokeStyle?a.strokeStyle:Yk;this.D=this.o=void 0;this.a=this.b=this.N=null;1==a.showLabels&&(this.$=void 0==a.lonLabelFormatter?Ce.bind(this,"EW"):a.lonLabelFormatter,this.Wa=void 0==a.latLabelFormatter?Ce.bind(this,"NS"):a.latLabelFormatter,
-this.ca=void 0==a.lonLabelPosition?0:a.lonLabelPosition,this.V=void 0==a.latLabelPosition?1:a.latLabelPosition,this.B=void 0!==a.lonLabelStyle?a.lonLabelStyle:new J({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new zk({color:"rgba(0,0,0,1)"}),stroke:new Ak({color:"rgba(255,255,255,1)",width:3})}),this.C=void 0!==a.latLabelStyle?a.latLabelStyle:new J({font:"12px Calibri,sans-serif",textAlign:"end",fill:new zk({color:"rgba(0,0,0,1)"}),stroke:new Ak({color:"rgba(255,255,255,1)",width:3})}),
-this.b=[],this.a=[]);this.setMap(void 0!==a.map?a.map:null)}var Yk=new Ak({color:"rgba(0,0,0,0.2)"}),Zk=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001];function $k(a,b,c,d,e,f,g){var h=g;c=Vk(b,c,d,a.i,e);h=void 0!==a.g[h]?a.g[h]:new I(null);h.ba("XY",c);hb(h.G(),f)&&(a.b&&(c=g,d=h.da(),f=[d[0],pa(f[1]+Math.abs(f[1]-f[3])*a.ca,Math.max(f[1],d[1]),Math.min(f[3],d[d.length-1]))],c=void 0!==a.b[c]?a.b[c].Qd:new C(null),c.na(f),a.b[g]={Qd:c,text:a.$(b)}),a.g[g++]=h);return g}
-function al(a,b,c,d,e,f,g){var h=g;c=Wk(b,c,d,a.i,e);h=void 0!==a.c[h]?a.c[h]:new I(null);h.ba("XY",c);hb(h.G(),f)&&(a.a&&(c=g,d=h.da(),f=[pa(f[0]+Math.abs(f[0]-f[2])*a.V,Math.max(f[0],d[0]),Math.min(f[2],d[d.length-2])),d[1]],c=void 0!==a.a[c]?a.a[c].Qd:new C(null),c.na(f),a.a[g]={Qd:c,text:a.Wa(b)}),a.c[g++]=h);return g}k=Xk.prototype;k.gn=function(){return this.v};k.Cl=function(){return this.g};k.Jl=function(){return this.c};
-k.di=function(a){var b=a.vectorContext,c=a.frameState;a=c.extent;var d=c.viewState,e=d.center,f=d.projection;d=d.resolution;c=c.pixelRatio;c=d*d/(4*c*c);if(!this.i||!Xb(this.i,f)){var g=Ob("EPSG:4326"),h=f.G(),l=f.oe,m=bc(l,g,f),n=l[2],p=l[1],q=l[0],r=m[3],u=m[2],v=m[1];m=m[0];this.f=l[3];this.j=n;this.l=p;this.s=q;this.oa=r;this.qa=u;this.T=v;this.O=m;this.o=Yb(g,f);this.D=Yb(f,g);this.N=this.D(eb(h));this.i=f}f=this.N[0];g=this.N[1];h=-1;n=Math.pow(this.ua*d,2);p=[];q=[];d=0;for(l=Zk.length;d<l;++d){r=
-Zk[d]/2;p[0]=f-r;p[1]=g-r;q[0]=f+r;q[1]=g+r;this.o(p,p);this.o(q,q);r=Math.pow(q[0]-p[0],2)+Math.pow(q[1]-p[1],2);if(r<=n)break;h=Zk[d]}d=h;if(-1==d)this.g.length=this.c.length=0,this.b&&(this.b.length=0),this.a&&(this.a.length=0);else{f=this.D(e);e=f[0];f=f[1];g=this.ab;l=[Math.max(a[0],this.O),Math.max(a[1],this.T),Math.min(a[2],this.qa),Math.min(a[3],this.oa)];l=bc(l,this.i,"EPSG:4326");p=l[3];h=l[2];q=l[1];r=l[0];e=Math.floor(e/d)*d;u=pa(e,this.s,this.j);n=$k(this,u,q,p,c,a,0);for(l=0;u!=this.s&&
-l++<g;)u=Math.max(u-d,this.s),n=$k(this,u,q,p,c,a,n);u=pa(e,this.s,this.j);for(l=0;u!=this.j&&l++<g;)u=Math.min(u+d,this.j),n=$k(this,u,q,p,c,a,n);this.g.length=n;this.b&&(this.b.length=n);f=Math.floor(f/d)*d;e=pa(f,this.l,this.f);n=al(this,e,r,h,c,a,0);for(l=0;e!=this.l&&l++<g;)e=Math.max(e-d,this.l),n=al(this,e,r,h,c,a,n);e=pa(f,this.l,this.f);for(l=0;e!=this.f&&l++<g;)e=Math.min(e+d,this.f),n=al(this,e,r,h,c,a,n);this.c.length=n;this.a&&(this.a.length=n)}b.Oa(null,this.ra);a=0;for(c=this.g.length;a<
-c;++a)e=this.g[a],b.Hb(e);a=0;for(c=this.c.length;a<c;++a)e=this.c[a],b.Hb(e);if(this.b)for(a=0,c=this.b.length;a<c;++a)e=this.b[a],this.B.Hd(e.text),b.nb(this.B),b.Hb(e.Qd);if(this.a)for(a=0,c=this.a.length;a<c;++a)e=this.a[a],this.C.Hd(e.text),b.nb(this.C),b.Hb(e.Qd)};k.setMap=function(a){this.v&&(this.v.J("postcompose",this.di,this),this.v.render());a&&(a.I("postcompose",this.di,this),a.render());this.v=a};function bl(a,b,c,d,e,f){$h.call(this,a,b,c,0);this.i=d;this.M=new Image;null!==e&&(this.M.crossOrigin=e);this.g=null;this.state=0;this.c=f}w(bl,$h);k=bl.prototype;k.Y=function(){return this.M};k.kn=function(){this.state=3;this.g.forEach(Gc);this.g=null;this.u()};k.ln=function(){void 0===this.resolution&&(this.resolution=db(this.extent)/this.M.height);this.state=2;this.g.forEach(Gc);this.g=null;this.u()};
-k.load=function(){if(0==this.state||3==this.state)this.state=1,this.u(),this.g=[Lc(this.M,"error",this.kn,this),Lc(this.M,"load",this.ln,this)],this.c(this,this.i)};k.ih=function(a){this.M=a};function cl(a,b,c){Sc.call(this);c=c?c:{};this.ya=a;this.state=b;this.g=null;this.key="";this.j=void 0===c.transition?250:c.transition;this.s={}}w(cl,Sc);cl.prototype.u=function(){this.b("change")};cl.prototype.lb=function(){return this.key+"/"+this.ya};function pj(a){if(!a.g)return a;var b=a.g;do{if(2==b.getState())return b;b=b.g}while(b);return a}function dl(a){if(a.g){var b=a.g;do{if(2==b.getState()){b.g=null;break}else 1==b.getState()?a=b:0==b.getState()?a.g=b.g:a=b;b=a.g}while(b)}}
-cl.prototype.i=function(){return this.ya};cl.prototype.getState=function(){return this.state};function oj(a,b){a.state=b;a.u()}function qj(a,b,c){if(!a.j)return 1;var d=a.s[b];if(!d)d=c,a.s[b]=d;else if(-1===d)return 1;b=c-d+1E3/60;return b>=a.j?1:Me(b/a.j)};function el(a,b,c,d,e,f){cl.call(this,a,b,f);this.f=d;this.l=c;this.M=new Image;null!==d&&(this.M.crossOrigin=d);this.c=null;this.v=e}w(el,cl);k=el.prototype;k.ia=function(){1==this.state&&(fl(this),this.M=gl());this.g&&Pc(this.g);this.state=5;this.u();cl.prototype.ia.call(this)};k.Y=function(){return this.M};k.lb=function(){return this.l};k.hn=function(){this.state=3;fl(this);this.M=gl();this.u()};k.jn=function(){this.state=this.M.naturalWidth&&this.M.naturalHeight?2:4;fl(this);this.u()};
-k.load=function(){3==this.state&&(this.state=0,this.M=new Image,null!==this.f&&(this.M.crossOrigin=this.f));0==this.state&&(this.state=1,this.u(),this.c=[Lc(this.M,"error",this.hn,this),Lc(this.M,"load",this.jn,this)],this.v(this,this.l))};function fl(a){a.c.forEach(Gc);a.c=null}function gl(){var a=hg(1,1);a.fillStyle="rgba(0,0,0,0)";a.fillRect(0,0,1,1);return a.canvas};function hl(a){this.b=a};function il(a){this.b=a}w(il,hl);il.prototype.S=function(){return 35632};function jl(a){this.b=a}w(jl,hl);jl.prototype.S=function(){return 35633};var kl=new il("precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}"),
-ll=new jl("varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;//Until we get gl_VertexID in WebGL,we store an instruction.if(f==0.0){//Offsetting the edges of the triangle by lineWidth/2 is necessary,however//we should also leave some space for the antialiasing,thus we offset by lineWidth.offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}");function ml(a,b){this.g=a.getUniformLocation(b,"h");this.i=a.getUniformLocation(b,"i");this.c=a.getUniformLocation(b,"j");this.oa=a.getUniformLocation(b,"k");this.qa=a.getUniformLocation(b,"l");this.a=a.getUniformLocation(b,"m");this.C=a.getUniformLocation(b,"n");this.O=a.getUniformLocation(b,"o");this.T=a.getUniformLocation(b,"p");this.b=a.getAttribLocation(b,"e");this.j=a.getAttribLocation(b,"f");this.N=a.getAttribLocation(b,"g")};function nl(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function pl(a,b){a[0]=b[0];a[1]=b[1];a[4]=b[2];a[5]=b[3];a[12]=b[4];a[13]=b[5];return a};function ql(a,b){this.origin=eb(b);this.bb=We();this.Ea=We();this.La=We();this.V=nl();this.b=[];this.j=null;this.g=[];this.i=[];this.a=[];this.s=null;this.f=void 0}w(ql,Ai);
-ql.prototype.Na=function(a,b,c,d,e,f,g,h,l,m,n){var p=a.b;if(this.f){var q=p.isEnabled(p.STENCIL_TEST);var r=p.getParameter(p.STENCIL_FUNC);var u=p.getParameter(p.STENCIL_VALUE_MASK);var v=p.getParameter(p.STENCIL_REF);var z=p.getParameter(p.STENCIL_WRITEMASK);var A=p.getParameter(p.STENCIL_FAIL);var E=p.getParameter(p.STENCIL_PASS_DEPTH_PASS);var S=p.getParameter(p.STENCIL_PASS_DEPTH_FAIL);p.enable(p.STENCIL_TEST);p.clear(p.STENCIL_BUFFER_BIT);p.stencilMask(255);p.stencilFunc(p.ALWAYS,1,255);p.stencilOp(p.KEEP,
-p.KEEP,p.REPLACE);this.f.Na(a,b,c,d,e,f,g,h,l,m,n);p.stencilMask(0);p.stencilFunc(p.NOTEQUAL,1,255)}rl(a,34962,this.s);rl(a,34963,this.j);f=this.Bf(p,a,e,f);var Ia=Xe(this.bb);cf(Ia,2/(c*e[0]),2/(c*e[1]));bf(Ia,-d);df(Ia,-(b[0]-this.origin[0]),-(b[1]-this.origin[1]));b=Xe(this.La);cf(b,2/e[0],2/e[1]);e=Xe(this.Ea);0!==d&&bf(e,-d);p.uniformMatrix4fv(f.g,!1,pl(this.V,Ia));p.uniformMatrix4fv(f.i,!1,pl(this.V,b));p.uniformMatrix4fv(f.c,!1,pl(this.V,e));p.uniform1f(f.a,g);if(void 0===l)this.Od(p,a,h,!1);
-else{m?a=this.Ee(p,a,h,l,n):(p.clear(p.COLOR_BUFFER_BIT|p.DEPTH_BUFFER_BIT),this.Od(p,a,h,!0),a=(a=l(null))?a:void 0);var ta=a}this.Cf(p,f);this.f&&(q||p.disable(p.STENCIL_TEST),p.clear(p.STENCIL_BUFFER_BIT),p.stencilFunc(r,v,u),p.stencilMask(z),p.stencilOp(A,S,E));return ta};function sl(a,b,c,d){a.drawElements(4,d-c,b.f?5125:5123,c*(b.f?4:2))};var tl=[0,0,0,1],ul=[],vl=[0,0,0,1];function wl(a,b,c,d,e,f){a=(c-a)*(f-b)-(e-a)*(d-b);return a<=xl&&a>=-xl?void 0:0<a}var xl=Number.EPSILON||2.220446049250313E-16;function yl(a){this.b=void 0!==a?a:[];this.a=zl}var zl=35044;function Al(a,b){ql.call(this,a,b);this.v=null;this.l=[];this.o=[];this.N=0;this.c={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,u:!1}}w(Al,ql);k=Al.prototype;
-k.cc=function(a,b){var c=a.Bd(),d=a.pa();if(c){this.g.push(this.b.length);this.i.push(b);this.c.u&&(this.o.push(this.b.length),this.c.u=!1);this.N=c;a=a.da();a=Ue(a,0,2,d,-this.origin[0],-this.origin[1]);b=this.a.length;c=this.b.length;var e=b/4,f;for(f=0;2>f;f+=d)this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=0,this.a[b++]=this.N,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=1,this.a[b++]=this.N,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=2,this.a[b++]=this.N,this.a[b++]=a[f],this.a[b++]=
-a[f+1],this.a[b++]=3,this.a[b++]=this.N,this.b[c++]=e,this.b[c++]=e+1,this.b[c++]=e+2,this.b[c++]=e+2,this.b[c++]=e+3,this.b[c++]=e,e+=4}else this.c.u&&(this.l.pop(),this.l.length&&(d=this.l[this.l.length-1],this.c.fillColor=d[0],this.c.strokeColor=d[1],this.c.lineWidth=d[2],this.c.u=!1))};k.gb=function(){this.s=new yl(this.a);this.j=new yl(this.b);this.g.push(this.b.length);0===this.o.length&&0<this.l.length&&(this.l=[]);this.b=this.a=null};
-k.Db=function(a){var b=this.s,c=this.j;return function(){Bl(a,b);Bl(a,c)}};k.Bf=function(a,b,c,d){var e=Cl(b,kl,ll);if(this.v)var f=this.v;else this.v=f=new ml(a,e);b.cd(e);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,16,0);a.enableVertexAttribArray(f.j);a.vertexAttribPointer(f.j,1,5126,!1,16,8);a.enableVertexAttribArray(f.N);a.vertexAttribPointer(f.N,1,5126,!1,16,12);a.uniform2fv(f.T,c);a.uniform1f(f.qa,d);return f};
-k.Cf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.j);a.disableVertexAttribArray(b.N)};
-k.Od=function(a,b,c){if(nb(c)){var d=this.g[this.g.length-1];for(c=this.o.length-1;0<=c;--c){var e=this.o[c];var f=this.l[c];a.uniform4fv(this.v.C,f[0]);Dl(this,a,f[1],f[2]);sl(a,b,e,d);d=e}}else{var g=this.g.length-2;f=d=this.g[g+1];for(e=this.o.length-1;0<=e;--e){var h=this.l[e];a.uniform4fv(this.v.C,h[0]);Dl(this,a,h[1],h[2]);for(h=this.o[e];0<=g&&this.g[g]>=h;){var l=this.g[g];var m=this.i[g];m=x(m).toString();c[m]&&(d!==f&&sl(a,b,d,f),f=l);g--;d=l}d!==f&&sl(a,b,d,f);d=f=h}}};
-k.Ee=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.o.length-1;0<=f;--f){var m=this.l[f];a.uniform4fv(this.v.C,m[0]);Dl(this,a,m[1],m[2]);for(g=this.o[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.i[h];var p=x(n).toString();if(void 0===c[p]&&n.U()&&(void 0===e||hb(e,n.U().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),sl(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Dl(a,b,c,d){b.uniform4fv(a.v.O,c);b.uniform1f(a.v.oa,d)}
-k.Oa=function(a,b){if(b){var c=b.g;this.c.lineDash=c?c:ul;c=b.i;this.c.lineDashOffset=c?c:0;c=b.a;c instanceof CanvasGradient||c instanceof CanvasPattern?c=vl:c=vi(c).map(function(a,b){return 3!=b?a/255:a})||vl;b=b.c;b=void 0!==b?b:1}else c=[0,0,0,0],b=0;a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=tl:a=vi(a).map(function(a,b){return 3!=b?a/255:a})||tl;this.c.strokeColor&&jc(this.c.strokeColor,c)&&this.c.fillColor&&jc(this.c.fillColor,a)&&this.c.lineWidth===b||(this.c.u=
-!0,this.c.fillColor=a,this.c.strokeColor=c,this.c.lineWidth=b,this.l.push([a,c,b]))};var El=new il("precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),Fl=new jl("varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}");function Gl(a,b){this.g=a.getUniformLocation(b,"h");this.i=a.getUniformLocation(b,"i");this.c=a.getUniformLocation(b,"j");this.a=a.getUniformLocation(b,"k");this.b=a.getAttribLocation(b,"c");this.B=a.getAttribLocation(b,"d");this.v=a.getAttribLocation(b,"e");this.o=a.getAttribLocation(b,"f");this.D=a.getAttribLocation(b,"g")};function Hl(a,b){this.j=a;this.b=b;this.a={};this.c={};this.g={};this.s=this.v=this.i=this.l=null;(this.f=ec(da,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");y(this.j,"webglcontextlost",this.zp,this);y(this.j,"webglcontextrestored",this.Ap,this)}w(Hl,Oc);
-function rl(a,b,c){var d=a.b,e=c.b,f=String(x(c));if(f in a.a)d.bindBuffer(b,a.a[f].buffer);else{var g=d.createBuffer();d.bindBuffer(b,g);var h;34962==b?h=new Float32Array(e):34963==b&&(h=a.f?new Uint32Array(e):new Uint16Array(e));d.bufferData(b,h,c.a);a.a[f]={tc:c,buffer:g}}}function Bl(a,b){var c=a.b;b=String(x(b));var d=a.a[b];c.isContextLost()||c.deleteBuffer(d.buffer);delete a.a[b]}k=Hl.prototype;
-k.ia=function(){Nc(this.j);var a=this.b;if(!a.isContextLost()){for(var b in this.a)a.deleteBuffer(this.a[b].buffer);for(b in this.g)a.deleteProgram(this.g[b]);for(b in this.c)a.deleteShader(this.c[b]);a.deleteFramebuffer(this.i);a.deleteRenderbuffer(this.s);a.deleteTexture(this.v)}};k.yp=function(){return this.b};
-function Il(a){if(!a.i){var b=a.b,c=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,c);var d=Jl(b,1,1),e=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,e);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,1,1);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,d,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,e);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);a.i=c;
-a.v=d;a.s=e}return a.i}function Kl(a,b){var c=String(x(b));if(c in a.c)return a.c[c];var d=a.b,e=d.createShader(b.S());d.shaderSource(e,b.b);d.compileShader(e);return a.c[c]=e}function Cl(a,b,c){var d=x(b)+"/"+x(c);if(d in a.g)return a.g[d];var e=a.b,f=e.createProgram();e.attachShader(f,Kl(a,b));e.attachShader(f,Kl(a,c));e.linkProgram(f);return a.g[d]=f}k.zp=function(){lb(this.a);lb(this.c);lb(this.g);this.s=this.v=this.i=this.l=null};k.Ap=function(){};
-k.cd=function(a){if(a==this.l)return!1;this.b.useProgram(a);this.l=a;return!0};function Ll(a,b,c){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);void 0!==b&&a.texParameteri(3553,10242,b);void 0!==c&&a.texParameteri(3553,10243,c);return d}function Jl(a,b,c){var d=Ll(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,c,0,a.RGBA,a.UNSIGNED_BYTE,null);return d}
-function Ml(a,b){var c=Ll(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return c};function Nl(a,b){ql.call(this,a,b);this.C=this.D=void 0;this.v=[];this.o=[];this.qa=this.oa=this.height=void 0;this.Wa=null;this.width=this.scale=this.rotation=this.rotateWithView=this.O=this.T=this.opacity=void 0}w(Nl,ql);k=Nl.prototype;k.Db=function(a){var b=this.s,c=this.j,d=this.ig(!0),e=a.b;return function(){if(!e.isContextLost()){var f;var g=0;for(f=d.length;g<f;++g)e.deleteTexture(d[g])}Bl(a,b);Bl(a,c)}};
-function Ol(a,b,c,d){var e=a.D,f=a.C,g=a.height,h=a.oa,l=a.qa,m=a.opacity,n=a.T,p=a.O,q=a.rotateWithView?1:0,r=-a.rotation,u=a.scale,v=a.width,z=Math.cos(r);r=Math.sin(r);var A=a.b.length,E=a.a.length,S;for(S=0;S<c;S+=d){var Ia=b[S]-a.origin[0];var ta=b[S+1]-a.origin[1];var la=E/8;var ca=-u*e;var ia=-u*(g-f);a.a[E++]=Ia;a.a[E++]=ta;a.a[E++]=ca*z-ia*r;a.a[E++]=ca*r+ia*z;a.a[E++]=n/l;a.a[E++]=(p+g)/h;a.a[E++]=m;a.a[E++]=q;ca=u*(v-e);ia=-u*(g-f);a.a[E++]=Ia;a.a[E++]=ta;a.a[E++]=ca*z-ia*r;a.a[E++]=ca*
-r+ia*z;a.a[E++]=(n+v)/l;a.a[E++]=(p+g)/h;a.a[E++]=m;a.a[E++]=q;ca=u*(v-e);ia=u*f;a.a[E++]=Ia;a.a[E++]=ta;a.a[E++]=ca*z-ia*r;a.a[E++]=ca*r+ia*z;a.a[E++]=(n+v)/l;a.a[E++]=p/h;a.a[E++]=m;a.a[E++]=q;ca=-u*e;ia=u*f;a.a[E++]=Ia;a.a[E++]=ta;a.a[E++]=ca*z-ia*r;a.a[E++]=ca*r+ia*z;a.a[E++]=n/l;a.a[E++]=p/h;a.a[E++]=m;a.a[E++]=q;a.b[A++]=la;a.b[A++]=la+1;a.b[A++]=la+2;a.b[A++]=la;a.b[A++]=la+2;a.b[A++]=la+3}}
-function Pl(a,b,c,d){var e,f=b.length;for(e=0;e<f;++e){var g=b[e];var h=x(g).toString();h in c?g=c[h]:(g=Ml(d,g),c[h]=g);a[e]=g}}
-k.Bf=function(a,b){var c=Cl(b,El,Fl);if(this.Wa)var d=this.Wa;else this.Wa=d=new Gl(a,c);b.cd(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,32,0);a.enableVertexAttribArray(d.v);a.vertexAttribPointer(d.v,2,5126,!1,32,8);a.enableVertexAttribArray(d.B);a.vertexAttribPointer(d.B,2,5126,!1,32,16);a.enableVertexAttribArray(d.o);a.vertexAttribPointer(d.o,1,5126,!1,32,24);a.enableVertexAttribArray(d.D);a.vertexAttribPointer(d.D,1,5126,!1,32,28);return d};
-k.Cf=function(a,b){a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.v);a.disableVertexAttribArray(b.B);a.disableVertexAttribArray(b.o);a.disableVertexAttribArray(b.D)};
-k.Od=function(a,b,c,d){var e=d?this.ag():this.ig();d=d?this.o:this.v;if(nb(c)){var f;c=0;var g=e.length;for(f=0;c<g;++c){a.bindTexture(3553,e[c]);var h=d[c];sl(a,b,f,h);f=h}}else for(f=g=0,h=e.length;f<h;++f){a.bindTexture(3553,e[f]);for(var l=0<f?d[f-1]:0,m=d[f],n=l;g<this.g.length&&this.g[g]<=m;){var p=x(this.i[g]).toString();void 0!==c[p]?(n!==l&&sl(a,b,n,l),l=n=g===this.g.length-1?m:this.g[g+1]):l=g===this.g.length-1?m:this.g[g+1];g++}n!==l&&sl(a,b,n,l)}};
-k.Ee=function(a,b,c,d,e){var f,g,h=this.g.length-1,l=this.ag();for(f=l.length-1;0<=f;--f){a.bindTexture(3553,l[f]);var m=0<f?this.o[f-1]:0;for(g=this.o[f];0<=h&&this.g[h]>=m;){var n=this.g[h];var p=this.i[h];var q=x(p).toString();if(void 0===c[q]&&p.U()&&(void 0===e||hb(e,p.U().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),sl(a,b,n,g),g=d(p)))return g;g=n;h--}}};
-k.gb=function(){this.qa=this.oa=this.height=this.C=this.D=void 0;this.b=null;this.scale=this.rotation=this.rotateWithView=this.O=this.T=this.opacity=void 0;this.a=null;this.width=void 0};function Ql(a,b){Nl.call(this,a,b);this.l=[];this.c=[];this.B=[];this.N=[]}w(Ql,Nl);k=Ql.prototype;k.wc=function(a,b){this.g.push(this.b.length);this.i.push(b);b=a.da();Ol(this,b,b.length,a.pa())};k.yc=function(a,b){this.g.push(this.b.length);this.i.push(b);b=a.da();Ol(this,b,b.length,a.pa())};
-k.gb=function(a){var b=a.b;this.v.push(this.b.length);this.o.push(this.b.length);this.s=new yl(this.a);this.j=new yl(this.b);var c={};Pl(this.B,this.l,c,b);Pl(this.N,this.c,c,b);this.c=this.l=null;Nl.prototype.gb.call(this,a)};
-k.Zb=function(a){var b=a.Vc(),c=a.Y(1),d=a.He(),e=a.Eg(),f=a.i,g=a.bd(),h=a.s,l=a.f,m=a.oc();a=a.a;if(0===this.l.length)this.l.push(c);else{var n=this.l[this.l.length-1];x(n)!=x(c)&&(this.v.push(this.b.length),this.l.push(c))}0===this.c.length?this.c.push(e):(n=this.c[this.c.length-1],x(n)!=x(e)&&(this.o.push(this.b.length),this.c.push(e)));this.D=b[0];this.C=b[1];this.height=m[1];this.oa=d[1];this.qa=d[0];this.opacity=f;this.T=g[0];this.O=g[1];this.rotation=l;this.rotateWithView=h;this.scale=a;this.width=
-m[0]};k.ig=function(a){return a?this.B.concat(this.N):this.B};k.ag=function(){return this.N};function Rl(a,b,c){var d=b-c;return a[0]===a[d]&&a[1]===a[d+1]&&3<(b-0)/c?!!mf(a,0,b,c):!1};var Sl=new il("precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),Tl=new jl("varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}");function Ul(a,b){this.g=a.getUniformLocation(b,"h");this.i=a.getUniformLocation(b,"i");this.c=a.getUniformLocation(b,"j");this.oa=a.getUniformLocation(b,"k");this.O=a.getUniformLocation(b,"l");this.a=a.getUniformLocation(b,"m");this.C=a.getUniformLocation(b,"n");this.T=a.getUniformLocation(b,"o");this.qa=a.getUniformLocation(b,"p");this.l=a.getAttribLocation(b,"d");this.b=a.getAttribLocation(b,"e");this.s=a.getAttribLocation(b,"f");this.f=a.getAttribLocation(b,"g")};function Vl(a,b){ql.call(this,a,b);this.v=null;this.o=[];this.l=[];this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,u:!1}}w(Vl,ql);
-function Wl(a,b,c,d){var e,f=a.a.length,g=a.b.length,h="bevel"===a.c.lineJoin?0:"miter"===a.c.lineJoin?1:2,l="butt"===a.c.lineCap?0:"square"===a.c.lineCap?1:2,m=Rl(b,c,d),n=g,p=1;for(e=0;e<c;e+=d){var q=f/7;var r=u;var u=v||[b[e],b[e+1]];if(0===e){var v=[b[e+d],b[e+d+1]];if(c-0===2*d&&jc(u,v))break;if(m){r=[b[c-2*d],b[c-2*d+1]];var z=v}else{l&&(f=Xl(a,[0,0],u,v,p*Yl*l,f),f=Xl(a,[0,0],u,v,-p*Yl*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2);f=Xl(a,[0,0],u,v,p*Zl*
-(l||1),f);f=Xl(a,[0,0],u,v,-p*Zl*(l||1),f);n=f/7-1;continue}}else if(e===c-d){m?v=z:(r=r||[0,0],f=Xl(a,r,u,[0,0],p*$l*(l||1),f),f=Xl(a,r,u,[0,0],-p*$l*(l||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,l&&(f=Xl(a,r,u,[0,0],p*am*l,f),f=Xl(a,r,u,[0,0],-p*am*l,f),a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=q+1,a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q+2));break}else v=[b[e+d],b[e+d+1]];var A=wl(r[0],r[1],u[0],u[1],v[0],v[1])?-1:1;f=Xl(a,r,u,v,A*bm*(h||1),f);f=Xl(a,r,u,v,A*cm*(h||1),f);f=
-Xl(a,r,u,v,-A*dm*(h||1),f);0<e&&(a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+2,a.b[g++]=q,a.b[g++]=0<p*A?n:n-1);a.b[g++]=q;a.b[g++]=q+2;a.b[g++]=q+1;n=q+2;p=A;h&&(f=Xl(a,r,u,v,A*em*h,f),a.b[g++]=q+1,a.b[g++]=q+3,a.b[g++]=q)}m&&(q=q||f/7,A=Mf([r[0],r[1],u[0],u[1],v[0],v[1]],0,6,2)?1:-1,f=Xl(a,r,u,v,A*bm*(h||1),f),Xl(a,r,u,v,-A*dm*(h||1),f),a.b[g++]=q,a.b[g++]=n-1,a.b[g++]=n,a.b[g++]=q+1,a.b[g++]=q,a.b[g++]=0<p*A?n:n-1)}
-function Xl(a,b,c,d,e,f){a.a[f++]=b[0];a.a[f++]=b[1];a.a[f++]=c[0];a.a[f++]=c[1];a.a[f++]=d[0];a.a[f++]=d[1];a.a[f++]=e;return f}function fm(a,b,c,d){c-=b;return c<2*d?!1:c===2*d?!jc([a[b],a[b+1]],[a[b+d],a[b+d+1]]):!0}k=Vl.prototype;k.uc=function(a,b){var c=a.da();a=a.pa();fm(c,0,c.length,a)&&(c=Ue(c,0,c.length,a,-this.origin[0],-this.origin[1]),this.c.u&&(this.l.push(this.b.length),this.c.u=!1),this.g.push(this.b.length),this.i.push(b),Wl(this,c,c.length,a))};
-k.vc=function(a,b){var c=this.b.length,d=a.pb();d.unshift(0);var e=a.da();a=a.pa();var f;if(1<d.length){var g=1;for(f=d.length;g<f;++g)if(fm(e,d[g-1],d[g],a)){var h=Ue(e,d[g-1],d[g],a,-this.origin[0],-this.origin[1]);Wl(this,h,h.length,a)}}this.b.length>c&&(this.g.push(c),this.i.push(b),this.c.u&&(this.l.push(c),this.c.u=!1))};
-function gm(a,b,c,d){Rl(b,b.length,d)||(b.push(b[0]),b.push(b[1]));Wl(a,b,b.length,d);if(c.length){var e;b=0;for(e=c.length;b<e;++b)Rl(c[b],c[b].length,d)||(c[b].push(c[b][0]),c[b].push(c[b][1])),Wl(a,c[b],c[b].length,d)}}function hm(a,b,c){c=void 0===c?a.b.length:c;a.g.push(c);a.i.push(b);a.c.u&&(a.l.push(c),a.c.u=!1)}k.gb=function(){this.s=new yl(this.a);this.j=new yl(this.b);this.g.push(this.b.length);0===this.l.length&&0<this.o.length&&(this.o=[]);this.b=this.a=null};
-k.Db=function(a){var b=this.s,c=this.j;return function(){Bl(a,b);Bl(a,c)}};
-k.Bf=function(a,b,c,d){var e=Cl(b,Sl,Tl);if(this.v)var f=this.v;else this.v=f=new Ul(a,e);b.cd(e);a.enableVertexAttribArray(f.l);a.vertexAttribPointer(f.l,2,5126,!1,28,0);a.enableVertexAttribArray(f.b);a.vertexAttribPointer(f.b,2,5126,!1,28,8);a.enableVertexAttribArray(f.s);a.vertexAttribPointer(f.s,2,5126,!1,28,16);a.enableVertexAttribArray(f.f);a.vertexAttribPointer(f.f,1,5126,!1,28,24);a.uniform2fv(f.T,c);a.uniform1f(f.qa,d);return f};
-k.Cf=function(a,b){a.disableVertexAttribArray(b.l);a.disableVertexAttribArray(b.b);a.disableVertexAttribArray(b.s);a.disableVertexAttribArray(b.f)};
-k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(nb(c)){var g=this.g[this.g.length-1];for(c=this.l.length-1;0<=c;--c){var h=this.l[c];var l=this.o[c];im(this,a,l[0],l[1],l[2]);sl(a,b,h,g);a.clear(a.DEPTH_BUFFER_BIT);g=h}}else{var m=this.g.length-2;l=g=this.g[m+1];for(h=this.l.length-1;0<=h;--h){var n=this.o[h];im(this,a,n[0],n[1],n[2]);for(n=this.l[h];0<=m&&this.g[m]>=n;){var p=this.g[m];
-var q=this.i[m];q=x(q).toString();c[q]&&(g!==l&&(sl(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(sl(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
-k.Ee=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.l.length-1;0<=f;--f){var m=this.o[f];im(this,a,m[0],m[1],m[2]);for(g=this.l[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.i[h];var p=x(n).toString();if(void 0===c[p]&&n.U()&&(void 0===e||hb(e,n.U().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),sl(a,b,m,l),l=d(n)))return l;h--;l=m}}};function im(a,b,c,d,e){b.uniform4fv(a.v.C,c);b.uniform1f(a.v.oa,d);b.uniform1f(a.v.O,e)}
-k.Oa=function(a,b){a=b.f;this.c.lineCap=void 0!==a?a:"round";a=b.g;this.c.lineDash=a?a:ul;a=b.i;this.c.lineDashOffset=a?a:0;a=b.j;this.c.lineJoin=void 0!==a?a:"round";a=b.a;a instanceof CanvasGradient||a instanceof CanvasPattern?a=vl:a=vi(a).map(function(a,b){return 3!=b?a/255:a})||vl;var c=b.c;c=void 0!==c?c:1;b=b.l;b=void 0!==b?b:10;this.c.strokeColor&&jc(this.c.strokeColor,a)&&this.c.lineWidth===c&&this.c.miterLimit===b||(this.c.u=!0,this.c.strokeColor=a,this.c.lineWidth=c,this.c.miterLimit=b,
-this.o.push([a,c,b]))};var Zl=3,$l=5,Yl=7,am=11,bm=13,cm=17,dm=19,em=23;var jm=new il("precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"),km=new jl("attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}");function lm(a,b){this.g=a.getUniformLocation(b,"b");this.i=a.getUniformLocation(b,"c");this.c=a.getUniformLocation(b,"d");this.C=a.getUniformLocation(b,"e");this.a=a.getUniformLocation(b,"f");this.b=a.getAttribLocation(b,"a")};function mm(){this.b=this.a=this.g=void 0;this.c=0}function nm(a){var b=a.b;if(b){var c=b.next,d=b.Eb;c&&(c.Eb=d);d&&(d.next=c);a.b=c||d;a.g===a.a?(a.b=void 0,a.g=void 0,a.a=void 0):a.g===b?a.g=a.b:a.a===b&&(a.a=d?a.b.Eb:a.b);a.c--}}function om(a){a.b=a.g;if(a.b)return a.b.data}function pm(a){if(a.b&&a.b.next)return a.b=a.b.next,a.b.data}function qm(a){if(a.b&&a.b.next)return a.b.next.data}function rm(a){if(a.b&&a.b.Eb)return a.b=a.b.Eb,a.b.data}function sm(a){if(a.b&&a.b.Eb)return a.b.Eb.data}
-function tm(a){if(a.b)return a.b.data}mm.prototype.concat=function(a){if(a.b){if(this.b){var b=this.b.next;this.b.next=a.g;a.g.Eb=this.b;b.Eb=a.a;a.a.next=b;this.c+=a.c}else this.b=a.b,this.g=a.g,this.a=a.a,this.c=a.c;a.b=void 0;a.g=void 0;a.a=void 0;a.c=0}};function um(){this.a=rj.Jc(void 0);this.b={}}k=um.prototype;k.Ca=function(a,b){a={fa:a[0],ea:a[1],la:a[2],ka:a[3],value:b};this.a.Ca(a);this.b[x(b)]=a};k.load=function(a,b){for(var c=Array(b.length),d=0,e=b.length;d<e;d++){var f=a[d],g=b[d];f={fa:f[0],ea:f[1],la:f[2],ka:f[3],value:g};c[d]=f;this.b[x(g)]=f}this.a.load(c)};k.remove=function(a){a=x(a);var b=this.b[a];delete this.b[a];return null!==this.a.remove(b)};
-function vm(a,b,c){var d=a.b[x(c)];Sa([d.fa,d.ea,d.la,d.ka],b)||(a.remove(c),a.Ca(b,c))}function wm(a){return a.a.all().map(function(a){return a.value})}function xm(a,b){return a.a.search({fa:b[0],ea:b[1],la:b[2],ka:b[3]}).map(function(a){return a.value})}k.forEach=function(a,b){return ym(wm(this),a,b)};function zm(a,b,c,d){return ym(xm(a,b),c,d)}function ym(a,b,c){for(var d,e=0,f=a.length;e<f&&!(d=b.call(c,a[e]));e++);return d}k.clear=function(){this.a.clear();this.b={}};
-k.G=function(a){var b=this.a.data;return Na(b.fa,b.ea,b.la,b.ka,a)};k.concat=function(a){this.a.load(a.a.all());for(var b in a.b)this.b[b|0]=a.b[b|0]};function Am(a,b){ql.call(this,a,b);this.f=new Vl(a,b);this.v=null;this.o=[];this.c=[];this.l={fillColor:null,u:!1}}w(Am,ql);
-function Bm(a,b,c,d){var e=new mm,f=new um;Cm(a,b,d,e,f,!0);b=Dm(e);if(c.length){var g,h=[];var l=0;for(g=c.length;l<g;++l){var m={list:new mm,Ec:void 0,gh:new um};h.push(m);Cm(a,c[l],d,m.list,m.gh,!1);Em(m.list,m.gh,!0);m.Ec=Dm(m.list)}h.sort(function(a,b){return b.Ec[0]===a.Ec[0]?a.Ec[1]-b.Ec[1]:b.Ec[0]-a.Ec[0]});for(l=0;l<h.length;++l){c=h[l].list;g=d=om(c);do{if(Fm(g,f).length){var n=!0;break}g=pm(c)}while(d!==g);!n&&Gm(c,h[l].Ec[0],e,b[0],f)&&(f.concat(h[l].gh),Em(e,f,!1))}}else Em(e,f,!1);Hm(a,
-e,f)}
-function Cm(a,b,c,d,e,f){var g,h=a.a.length/2,l=[],m=[];if(f===Mf(b,0,b.length,c)){var n=f=Im(a,b[0],b[1],h++);var p=c;for(g=b.length;p<g;p+=c){var q=Im(a,b[p],b[p+1],h++);m.push(Jm(n,q,d));l.push([Math.min(n.x,q.x),Math.min(n.y,q.y),Math.max(n.x,q.x),Math.max(n.y,q.y)]);n=q}}else for(p=b.length-c,n=f=Im(a,b[p],b[p+1],h++),p-=c,g=0;p>=g;p-=c)q=Im(a,b[p],b[p+1],h++),m.push(Jm(n,q,d)),l.push([Math.min(n.x,q.x),Math.min(n.y,q.y),Math.max(n.x,q.x),Math.max(n.y,q.y)]),n=q;m.push(Jm(q,f,d));l.push([Math.min(n.x,q.x),
-Math.min(n.y,q.y),Math.max(n.x,q.x),Math.max(n.y,q.y)]);e.load(l,m)}function Dm(a){var b=om(a),c=b,d=[c.Z.x,c.Z.y];do c=pm(a),c.Z.x>d[0]&&(d=[c.Z.x,c.Z.y]);while(c!==b);return d}function Em(a,b,c){var d=om(a),e=d,f=pm(a),g=!1;do{var h=c?wl(f.X.x,f.X.y,e.X.x,e.X.y,e.Z.x,e.Z.y):wl(e.Z.x,e.Z.y,e.X.x,e.X.y,f.X.x,f.X.y);void 0===h?(Km(e,f,a,b),g=!0,f===d&&(d=qm(a)),f=e,rm(a)):e.X.Kb!==h&&(e.X.Kb=h,g=!0);e=f;f=pm(a)}while(e!==d);return g}
-function Gm(a,b,c,d,e){for(var f=om(a);f.X.x!==b;)f=pm(a);b=f.X;d={x:d,y:b.y,qb:-1};var g=Infinity,h;var l=Fm({Z:b,X:d},e,!0);var m=0;for(h=l.length;m<h;++m){var n=l[m],p=Lm(b,d,n.Z,n.X,!0),q=Math.abs(b.x-p[0]);if(q<g&&void 0!==wl(b.x,b.y,n.Z.x,n.Z.y,n.X.x,n.X.y)){g=q;var r={x:p[0],y:p[1],qb:-1};f=n}}if(Infinity===g)return!1;l=f.X;if(0<g&&(f=Mm(b,r,f.X,e),f.length))for(r=Infinity,m=0,h=f.length;m<h;++m)if(g=f[m],n=Math.atan2(b.y-g.y,d.x-g.x),n<r||n===r&&g.x<l.x)r=n,l=g;for(f=om(c);f.X.x!==l.x||f.X.y!==
-l.y;)f=pm(c);d={x:b.x,y:b.y,qb:b.qb,Kb:void 0};m={x:f.X.x,y:f.X.y,qb:f.X.qb,Kb:void 0};qm(a).Z=d;Jm(b,f.X,a,e);Jm(m,d,a,e);f.X=m;a.b&&(a.g=a.b,a.a=a.b.Eb);c.concat(a);return!0}
-function Hm(a,b,c){for(var d=!1,e=Nm(b,c);3<b.c;)if(e){if(!Om(a,b,c,e,d)&&!Em(b,c,d)&&!Pm(a,b,c,!0))break}else if(!Om(a,b,c,e,d)&&!Em(b,c,d)&&!Pm(a,b,c))if(e=Nm(b,c)){d=b;var f=2*d.c,g=Array(f),h=om(d),l=h,m=0;do g[m++]=l.Z.x,g[m++]=l.Z.y,l=pm(d);while(l!==h);d=!Mf(g,0,f,2);Em(b,c,d)}else{e=a;d=b;f=g=om(d);do{h=Fm(f,c);if(h.length){g=h[0];h=Lm(f.Z,f.X,g.Z,g.X);h=Im(e,h[0],h[1],e.a.length/2);l=new mm;m=new um;Jm(h,f.X,l,m);f.X=h;vm(c,[Math.min(f.Z.x,h.x),Math.min(f.Z.y,h.y),Math.max(f.Z.x,h.x),Math.max(f.Z.y,
-h.y)],f);for(f=pm(d);f!==g;)Jm(f.Z,f.X,l,m),c.remove(f),nm(d),f=tm(d);Jm(g.Z,h,l,m);g.Z=h;vm(c,[Math.min(g.X.x,h.x),Math.min(g.X.y,h.y),Math.max(g.X.x,h.x),Math.max(g.X.y,h.y)],g);Em(d,c,!1);Hm(e,d,c);Em(l,m,!1);Hm(e,l,m);break}f=pm(d)}while(f!==g);break}3===b.c&&(e=a.b.length,a.b[e++]=sm(b).Z.qb,a.b[e++]=tm(b).Z.qb,a.b[e++]=qm(b).Z.qb)}
-function Om(a,b,c,d,e){var f=a.b.length,g=om(b),h=sm(b),l=g,m=pm(b),n=qm(b),p=!1;do{var q=l.Z;var r=l.X;var u=m.X;if(!1===r.Kb){var v=d?0===Mm(q,r,u,c,!0).length:e?Qm(n.X,u,r,q,h.Z):Qm(h.Z,q,r,u,n.X);!d&&0!==Fm({Z:q,X:u},c).length||!v||!d&&!1!==q.Kb&&!1!==u.Kb&&Mf([h.Z.x,h.Z.y,q.x,q.y,r.x,r.y,u.x,u.y,n.X.x,n.X.y],0,10,2)!==!e||(a.b[f++]=q.qb,a.b[f++]=r.qb,a.b[f++]=u.qb,Km(l,m,b,c),m===g&&(g=n),p=!0)}h=sm(b);l=tm(b);m=pm(b);n=qm(b)}while(l!==g&&3<b.c);return p}
-function Pm(a,b,c,d){var e=om(b);pm(b);var f=e,g=pm(b),h=!1;do{var l=Lm(f.Z,f.X,g.Z,g.X,d);if(l){h=a.b.length;var m=a.a.length/2,n=rm(b);nm(b);c.remove(n);var p=n===e;d?(l[0]===f.Z.x&&l[1]===f.Z.y?(rm(b),l=f.Z,g.Z=l,c.remove(f),p=p||f===e):(l=g.X,f.X=l,c.remove(g),p=p||g===e),nm(b)):(l=Im(a,l[0],l[1],m),f.X=l,g.Z=l,vm(c,[Math.min(f.Z.x,f.X.x),Math.min(f.Z.y,f.X.y),Math.max(f.Z.x,f.X.x),Math.max(f.Z.y,f.X.y)],f),vm(c,[Math.min(g.Z.x,g.X.x),Math.min(g.Z.y,g.X.y),Math.max(g.Z.x,g.X.x),Math.max(g.Z.y,
-g.X.y)],g));a.b[h++]=n.Z.qb;a.b[h++]=n.X.qb;a.b[h++]=l.qb;h=!0;if(p)break}f=sm(b);g=pm(b)}while(f!==e);return h}function Nm(a,b){var c=om(a),d=c;do{if(Fm(d,b).length)return!1;d=pm(a)}while(d!==c);return!0}function Im(a,b,c,d){var e=a.a.length;a.a[e++]=b;a.a[e++]=c;return{x:b,y:c,qb:d,Kb:void 0}}
-function Jm(a,b,c,d){var e={Z:a,X:b},f={Eb:void 0,next:void 0,data:e},g=c.b;if(g){var h=g.next;f.Eb=g;f.next=h;g.next=f;h&&(h.Eb=f);g===c.a&&(c.a=f)}else c.g=f,c.a=f,f.next=f,f.Eb=f;c.b=f;c.c++;d&&d.Ca([Math.min(a.x,b.x),Math.min(a.y,b.y),Math.max(a.x,b.x),Math.max(a.y,b.y)],e);return e}function Km(a,b,c,d){tm(c)===b&&(nm(c),a.X=b.X,d.remove(b),vm(d,[Math.min(a.Z.x,a.X.x),Math.min(a.Z.y,a.X.y),Math.max(a.Z.x,a.X.x),Math.max(a.Z.y,a.X.y)],a))}
-function Mm(a,b,c,d,e){var f,g,h=[],l=xm(d,[Math.min(a.x,b.x,c.x),Math.min(a.y,b.y,c.y),Math.max(a.x,b.x,c.x),Math.max(a.y,b.y,c.y)]);d=0;for(f=l.length;d<f;++d)for(g in l[d]){var m=l[d][g];"object"!==typeof m||e&&!m.Kb||m.x===a.x&&m.y===a.y||m.x===b.x&&m.y===b.y||m.x===c.x&&m.y===c.y||-1!==h.indexOf(m)||!Gf([a.x,a.y,b.x,b.y,c.x,c.y],0,6,2,m.x,m.y)||h.push(m)}return h}
-function Fm(a,b,c){var d=a.Z,e=a.X;b=xm(b,[Math.min(d.x,e.x),Math.min(d.y,e.y),Math.max(d.x,e.x),Math.max(d.y,e.y)]);var f=[],g;var h=0;for(g=b.length;h<g;++h){var l=b[h];a!==l&&(c||l.Z!==e||l.X!==d)&&Lm(d,e,l.Z,l.X,c)&&f.push(l)}return f}
-function Lm(a,b,c,d,e){var f=(d.y-c.y)*(b.x-a.x)-(d.x-c.x)*(b.y-a.y);if(0!==f&&(d=((d.x-c.x)*(a.y-c.y)-(d.y-c.y)*(a.x-c.x))/f,c=((b.x-a.x)*(a.y-c.y)-(b.y-a.y)*(a.x-c.x))/f,!e&&d>xl&&d<1-xl&&c>xl&&c<1-xl||e&&0<=d&&1>=d&&0<=c&&1>=c))return[a.x+d*(b.x-a.x),a.y+d*(b.y-a.y)]}
-function Qm(a,b,c,d,e){if(void 0===b.Kb||void 0===d.Kb)return!1;var f=(c.x-d.x)*(b.y-d.y)>(c.y-d.y)*(b.x-d.x);e=(e.x-d.x)*(b.y-d.y)<(e.y-d.y)*(b.x-d.x);a=(a.x-b.x)*(d.y-b.y)>(a.y-b.y)*(d.x-b.x);c=(c.x-b.x)*(d.y-b.y)<(c.y-b.y)*(d.x-b.x);b=b.Kb?c||a:c&&a;return(d.Kb?e||f:e&&f)&&b}k=Am.prototype;
-k.xc=function(a,b){var c=a.td(),d=a.pa(),e=this.b.length,f=this.f.b.length;a=a.da();var g,h,l;var m=h=0;for(g=c.length;m<g;++m){var n=c[m];if(0<n.length){var p=Ue(a,h,n[0],d,-this.origin[0],-this.origin[1]);if(p.length){var q=[];h=1;for(l=n.length;h<l;++h)if(n[h]!==n[h-1]){var r=Ue(a,n[h-1],n[h],d,-this.origin[0],-this.origin[1]);q.push(r)}gm(this.f,p,q,d);Bm(this,p,q,d)}}h=n[n.length-1]}this.b.length>e&&(this.g.push(e),this.i.push(b),this.l.u&&(this.c.push(e),this.l.u=!1));this.f.b.length>f&&hm(this.f,
-b,f)};k.zc=function(a,b){var c=a.pb(),d=a.pa();if(0<c.length){a=a.da().map(Number);var e=Ue(a,0,c[0],d,-this.origin[0],-this.origin[1]);if(e.length){var f=[],g;var h=1;for(g=c.length;h<g;++h)if(c[h]!==c[h-1]){var l=Ue(a,c[h-1],c[h],d,-this.origin[0],-this.origin[1]);f.push(l)}this.g.push(this.b.length);this.i.push(b);this.l.u&&(this.c.push(this.b.length),this.l.u=!1);hm(this.f,b);gm(this.f,e,f,d);Bm(this,e,f,d)}}};
-k.gb=function(a){this.s=new yl(this.a);this.j=new yl(this.b);this.g.push(this.b.length);this.f.gb(a);0===this.c.length&&0<this.o.length&&(this.o=[]);this.b=this.a=null};k.Db=function(a){var b=this.s,c=this.j,d=this.f.Db(a);return function(){Bl(a,b);Bl(a,c);d()}};k.Bf=function(a,b){var c=Cl(b,jm,km);if(this.v)var d=this.v;else this.v=d=new lm(a,c);b.cd(c);a.enableVertexAttribArray(d.b);a.vertexAttribPointer(d.b,2,5126,!1,8,0);return d};k.Cf=function(a,b){a.disableVertexAttribArray(b.b)};
-k.Od=function(a,b,c,d){var e=a.getParameter(a.DEPTH_FUNC),f=a.getParameter(a.DEPTH_WRITEMASK);d||(a.enable(a.DEPTH_TEST),a.depthMask(!0),a.depthFunc(a.NOTEQUAL));if(nb(c)){var g=this.g[this.g.length-1];for(c=this.c.length-1;0<=c;--c){var h=this.c[c];var l=this.o[c];a.uniform4fv(this.v.C,l);sl(a,b,h,g);g=h}}else{var m=this.g.length-2;l=g=this.g[m+1];for(h=this.c.length-1;0<=h;--h){var n=this.o[h];a.uniform4fv(this.v.C,n);for(n=this.c[h];0<=m&&this.g[m]>=n;){var p=this.g[m];var q=this.i[m];q=x(q).toString();
-c[q]&&(g!==l&&(sl(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(sl(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))};
-k.Ee=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.c.length-1;0<=f;--f){var m=this.o[f];a.uniform4fv(this.v.C,m);for(g=this.c[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.i[h];var p=x(n).toString();if(void 0===c[p]&&n.U()&&(void 0===e||hb(e,n.U().G()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),sl(a,b,m,l),l=d(n)))return l;h--;l=m}}};
-k.Oa=function(a,b){a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=tl:a=vi(a).map(function(a,b){return 3!=b?a/255:a})||tl;this.l.fillColor&&jc(a,this.l.fillColor)||(this.l.fillColor=a,this.l.u=!0,this.o.push(a));b?this.f.Oa(null,b):this.f.Oa(null,new Ak({color:[0,0,0,0],lineWidth:0}))};function Rm(a,b){this.b=b;this.a=[{x:0,y:0,width:a,height:a}];this.c={};this.g=hg(a,a);this.i=this.g.canvas}Rm.prototype.get=function(a){return this.c[a]||null};
-Rm.prototype.add=function(a,b,c,d,e){var f;var g=0;for(f=this.a.length;g<f;++g){var h=this.a[g];if(h.width>=b+this.b&&h.height>=c+this.b)return f={offsetX:h.x+this.b,offsetY:h.y+this.b,image:this.i},this.c[a]=f,d.call(e,this.g,h.x+this.b,h.y+this.b),a=g,b+=this.b,d=c+this.b,h.width-b>h.height-d?(c={x:h.x+b,y:h.y,width:h.width-b,height:h.height},b={x:h.x,y:h.y+d,width:b,height:h.height-d},Sm(this,a,c,b)):(c={x:h.x+b,y:h.y,width:h.width-b,height:d},b={x:h.x,y:h.y+d,width:h.width,height:h.height-d},
-Sm(this,a,c,b)),f}return null};function Sm(a,b,c,d){b=[b,1];0<c.width&&0<c.height&&b.push(c);0<d.width&&0<d.height&&b.push(d);a.a.splice.apply(a.a,b)};function Tm(a){a=a||{};this.a=void 0!==a.initialSize?a.initialSize:256;this.g=void 0!==a.maxSize?a.maxSize:void 0!==ba?ba:2048;this.b=void 0!==a.space?a.space:1;this.f=[new Rm(this.a,this.b)];this.c=this.a;this.i=[new Rm(this.c,this.b)]}function Um(a,b){var c;var d=0;for(c=a.length;d<c;++d){var e=a[d];if(e=e.get(b))return e}return null}function Vm(a,b){return{offsetX:a.offsetX,offsetY:a.offsetY,image:a.image,Bm:b.image}}
-Tm.prototype.add=function(a,b,c,d,e,f){if(b+this.b>this.g||c+this.b>this.g)return null;d=Wm(this,!1,a,b,c,d,f);if(!d)return null;a=Wm(this,!0,a,b,c,void 0!==e?e:ea,f);return Vm(d,a)};function Wm(a,b,c,d,e,f,g){var h=b?a.i:a.f,l;var m=0;for(l=h.length;m<l;++m){var n=h[m];if(n=n.add(c,d,e,f,g))return n;n||m!==l-1||(b?(n=Math.min(2*a.c,a.g),a.c=n):(n=Math.min(2*a.a,a.g),a.a=n),n=new Rm(n,a.b),h.push(n),++l)}return null};function Xm(a,b){Nl.call(this,a,b);this.c=[];this.ua=[];this.Ub=hg(0,0).canvas;this.N={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0};this.ta="";this.ca=this.$=this.ra=this.ab=void 0;this.B={};this.l=void 0;this.opacity=this.scale=1}w(Xm,Nl);k=Xm.prototype;
-k.Wb=function(a,b){if(this.ta){var c=null,d=2,e=2;switch(a.S()){case "Point":case "MultiPoint":c=a.da();d=c.length;e=a.pa();break;case "Circle":c=a.xa();break;case "LineString":c=a.Fe();break;case "MultiLineString":c=a.Ge();d=c.length;break;case "Polygon":c=a.Td();break;case "MultiPolygon":c=Ji(a),d=c.length}this.g.push(this.b.length);this.i.push(b);a=this.l;b=this.ta.split("\n");var f=Ym(this,b),g,h,l=Math.round(f[0]*this.ab-this.$),m=Math.round(f[1]*this.ra-this.ca),n=this.N.lineWidth/2*this.N.scale;
-f=0;for(g=b.length;f<g;++f){var p=0;var q=a.height*f;var r=b[f].split("");var u=0;for(h=r.length;u<h;++u){var v=a.Bh;var z=r[u],A=Um(v.f,z);A?(v=Um(v.i,z),v=Vm(A,v)):v=null;if(v){A=v.image;this.D=l-p;this.C=m-q;this.T=0===u?v.offsetX-n:v.offsetX;this.O=v.offsetY;this.height=a.height;this.width=0===u||u===r.length-1?a.width[r[u]]+n:a.width[r[u]];this.oa=A.height;this.qa=A.width;0===this.c.length?this.c.push(A):(v=this.c[this.c.length-1],x(v)!=x(A)&&(this.v.push(this.b.length),this.c.push(A)));v=c;
-z=d;var E=e;for(A=0;A<z;A+=E)Ol(this,v,z,E)}p+=this.width}}}};function Ym(a,b){var c=a.l,d=b.length*c.height;return[b.map(function(b){var d=0,e;var h=0;for(e=b.length;h<e;++h){var l=b[h];c.width[l]||Zm(a,l);d+=c.width[l]?c.width[l]:0}return d}).reduce(function(a,b){return Math.max(a,b)}),d]}
-function Zm(a,b){if(1===b.length){var c=a.l,d=a.N;a=a.Ub.getContext("2d");a.font=d.font;a=Math.ceil(a.measureText(b).width*d.scale);c.Bh.add(b,a,c.height,function(a,c,g){a.font=d.font;a.fillStyle=d.fillColor;a.strokeStyle=d.strokeColor;a.lineWidth=d.lineWidth;a.lineCap=d.lineCap;a.lineJoin=d.lineJoin;a.miterLimit=d.miterLimit;a.textAlign="left";a.textBaseline="top";od&&d.lineDash&&(a.setLineDash(d.lineDash),a.lineDashOffset=d.lineDashOffset);1!==d.scale&&a.setTransform(d.scale,0,0,d.scale,0,0);d.strokeColor&&
-a.strokeText(b,c,g);d.fillColor&&a.fillText(b,c,g)})&&(c.width[b]=a)}}k.gb=function(a){var b=a.b;this.v.push(this.b.length);this.o=this.v;this.s=new yl(this.a);this.j=new yl(this.b);Pl(this.ua,this.c,{},b);this.N={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0};this.ta="";this.ca=this.$=this.ra=this.ab=void 0;this.c=null;this.B={};this.l=void 0;Nl.prototype.gb.call(this,a)};
-k.nb=function(a){var b=this.N,c=a.Fa(),d=a.Ga();if(a&&a.Ka()&&(c||d)){c?(c=c.b,b.fillColor=zi(c?c:tl)):b.fillColor=null;d?(c=d.a,b.strokeColor=zi(c?c:vl),b.lineWidth=d.c||1,b.lineCap=d.f||"round",b.lineDashOffset=d.i||0,b.lineJoin=d.j||"round",b.miterLimit=d.l||10,d=d.g,b.lineDash=d?d.slice():ul):(b.strokeColor=null,b.lineWidth=0);b.font=a.a||"10px sans-serif";b.scale=a.b||1;this.ta=a.Ka();d=vj[a.f];c=vj[a.j];this.ab=void 0===d?.5:d;this.ra=void 0===c?.5:c;this.$=a.g||0;this.ca=a.c||0;this.rotateWithView=
-!!a.l;this.rotation=a.i||0;a=[];for(var e in b)if(b[e]||0===b[e])Array.isArray(b[e])?a=a.concat(b[e]):a.push(b[e]);c="";e=0;for(d=a.length;e<d;++e)c+=a[e];e=c;this.B[e]||(a=this.Ub.getContext("2d"),a.font=b.font,a=Math.ceil((1.5*a.measureText("M").width+b.lineWidth/2)*b.scale),this.B[e]={Bh:new Tm({space:b.lineWidth+1}),width:{},height:a});this.l=this.B[e]}else this.ta=""};k.ig=function(){return this.ua};k.ag=function(){return this.ua};function $m(a,b,c){this.c=b;this.i=a;this.g=c;this.a={}}w($m,sj);k=$m.prototype;k.Vb=function(){};function an(a,b){var c=[],d;for(d in a.a){var e=a.a[d],f;for(f in e)c.push(e[f].Db(b))}return function(){for(var a=c.length,b,d=0;d<a;d++)b=c[d].apply(this,arguments);return b}}function bn(a,b){for(var c in a.a){var d=a.a[c],e;for(e in d)d[e].gb(b)}}k.Ja=function(a,b){var c=void 0!==a?a.toString():"0";a=this.a[c];void 0===a&&(a={},this.a[c]=a);c=a[b];void 0===c&&(c=new cn[b](this.i,this.c),a[b]=c);return c};
-k.yg=function(){return nb(this.a)};k.Na=function(a,b,c,d,e,f,g,h){var l=Object.keys(this.a).map(Number);l.sort(dc);var m,n;var p=0;for(m=l.length;p<m;++p){var q=this.a[l[p].toString()];var r=0;for(n=uj.length;r<n;++r){var u=q[uj[r]];void 0!==u&&u.Na(a,b,c,d,e,f,g,h,void 0,!1)}}};
-function dn(a,b,c,d,e,f,g,h,l,m,n){var p=en,q=Object.keys(a.a).map(Number);q.sort(function(a,b){return b-a});var r,u;var v=0;for(r=q.length;v<r;++v){var z=a.a[q[v].toString()];for(u=uj.length-1;0<=u;--u){var A=z[uj[u]];if(void 0!==A&&(A=A.Na(b,c,d,e,p,f,g,h,l,m,n)))return A}}}
-k.wa=function(a,b,c,d,e,f,g,h,l,m){var n=b.b;n.bindFramebuffer(n.FRAMEBUFFER,Il(b));var p;void 0!==this.g&&(p=Fa(Pa(a),d*this.g));return dn(this,b,a,d,e,g,h,l,function(a){var b=new Uint8Array(4);n.readPixels(0,0,1,1,n.RGBA,n.UNSIGNED_BYTE,b);if(0<b[3]&&(a=m(a)))return a},!0,p)};function fn(a,b,c,d,e,f,g,h){var l=c.b;l.bindFramebuffer(l.FRAMEBUFFER,Il(c));return void 0!==dn(a,c,b,d,e,f,g,h,function(){var a=new Uint8Array(4);l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,a);return 0<a[3]},!1)}
-var en=[1,1],cn={Circle:Al,Image:Ql,LineString:Vl,Polygon:Am,Text:Xm};function gn(a,b,c,d,e,f,g){this.b=a;this.g=b;this.c=f;this.i=g;this.l=e;this.j=d;this.f=c;this.a=this.s=this.v=this.o=null}w(gn,Ai);function hn(a,b,c){var d=a.b;b=b.Ja(0,"Text");b.nb(a.a);b.Wb(c,null);b.gb(d);b.Na(a.b,a.g,a.f,a.j,a.l,a.i,1,{},void 0,!1);b.Db(d)()}k=gn.prototype;k.Dd=function(a){this.Oa(a.Fa(),a.Ga());this.Zb(a.Y());this.nb(a.Ka())};
-k.Hb=function(a){switch(a.S()){case "Point":this.yc(a,null);break;case "LineString":this.uc(a,null);break;case "Polygon":this.zc(a,null);break;case "MultiPoint":this.wc(a,null);break;case "MultiLineString":this.vc(a,null);break;case "MultiPolygon":this.xc(a,null);break;case "GeometryCollection":this.De(a);break;case "Circle":this.cc(a,null)}};k.Ce=function(a,b){(a=(0,b.cb)(a))&&hb(this.c,a.G())&&(this.Dd(b),this.Hb(a))};k.De=function(a){a=a.a;var b;var c=0;for(b=a.length;c<b;++c)this.Hb(a[c])};
-k.yc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"Image");e.Zb(this.o);e.yc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};k.wc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"Image");e.Zb(this.o);e.wc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};
-k.uc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"LineString");e.Oa(null,this.s);e.uc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};k.vc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"LineString");e.Oa(null,this.s);e.vc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};
-k.zc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"Polygon");e.Oa(this.v,this.s);e.zc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};k.xc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"Polygon");e.Oa(this.v,this.s);e.xc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};
-k.cc=function(a,b){var c=this.b,d=new $m(1,this.c),e=d.Ja(0,"Circle");e.Oa(this.v,this.s);e.cc(a,b);e.gb(c);e.Na(this.b,this.g,this.f,this.j,this.l,this.i,1,{},void 0,!1);e.Db(c)();this.a&&hn(this,d,a)};k.Zb=function(a){this.o=a};k.Oa=function(a,b){this.v=a;this.s=b};k.nb=function(a){this.a=a};var jn=new il("precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}"),kn=new jl("varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}");function ln(a,b){this.f=a.getUniformLocation(b,"d");this.c=a.getUniformLocation(b,"e");this.g=a.getUniformLocation(b,"f");this.i=a.getUniformLocation(b,"g");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function mn(a,b){Ki.call(this,b);this.c=a;this.V=new yl([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]);this.f=this.Mb=null;this.j=void 0;this.v=We();this.N=We();this.C=nl();this.o=null}w(mn,Ki);
-function nn(a,b,c){var d=a.c.g;if(void 0===a.j||a.j!=c){b.postRenderFunctions.push(function(a,b,c){a.isContextLost()||(a.deleteFramebuffer(b),a.deleteTexture(c))}.bind(null,d,a.f,a.Mb));b=Jl(d,c,c);var e=d.createFramebuffer();d.bindFramebuffer(36160,e);d.framebufferTexture2D(36160,36064,3553,b,0);a.Mb=b;a.f=e;a.j=c}else d.bindFramebuffer(36160,a.f)}
-mn.prototype.Zi=function(a,b,c){on(this,"precompose",c,a);rl(c,34962,this.V);var d=c.b,e=Cl(c,jn,kn);if(this.o)var f=this.o;else this.o=f=new ln(d,e);c.cd(e)&&(d.enableVertexAttribArray(f.b),d.vertexAttribPointer(f.b,2,5126,!1,16,0),d.enableVertexAttribArray(f.a),d.vertexAttribPointer(f.a,2,5126,!1,16,8),d.uniform1i(f.i,0));d.uniformMatrix4fv(f.f,!1,pl(this.C,this.v));d.uniformMatrix4fv(f.c,!1,pl(this.C,this.N));d.uniform1f(f.g,b.opacity);d.bindTexture(3553,this.Mb);d.drawArrays(5,0,4);on(this,"postcompose",
-c,a)};function on(a,b,c,d){a=a.a;if(Tc(a,b)){var e=d.viewState;a.b(new bi(b,new gn(c,e.center,e.resolution,e.rotation,d.size,d.extent,d.pixelRatio),d,null,c))}}mn.prototype.Ag=function(){this.f=this.Mb=null;this.j=void 0};function pn(a,b){mn.call(this,a,b);this.l=this.i=this.M=null}w(pn,mn);pn.handles=function(a,b){return"webgl"===a&&"IMAGE"===b.S()};pn.create=function(a,b){return new pn(a,b)};function qn(a,b){b=b.Y();return Ml(a.c.g,b)}pn.prototype.wa=function(a,b,c,d,e){var f=this.a;return f.ha().wa(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})};
-pn.prototype.Bg=function(a,b){var c=this.c.g,d=a.pixelRatio,e=a.viewState,f=e.center,g=e.resolution,h=e.rotation,l=this.M,m=this.Mb,n=this.a.ha(),p=a.viewHints,q=a.extent;void 0!==b.extent&&(q=gb(q,b.extent));p[0]||p[1]||bb(q)||(b=n.Y(q,g,d,e.projection))&&Si(this,b)&&(l=b,m=qn(this,b),this.Mb&&a.postRenderFunctions.push(function(a,b){a.isContextLost()||a.deleteTexture(b)}.bind(null,c,this.Mb)));l&&(c=this.c.i.j,rn(this,c.width,c.height,d,f,g,h,l.G()),this.l=null,d=this.v,Xe(d),cf(d,1,-1),df(d,0,
--1),this.M=l,this.Mb=m,Ui(a,n));return!!l};function rn(a,b,c,d,e,f,g,h){b*=f;c*=f;a=a.N;Xe(a);cf(a,2*d/b,2*d/c);bf(a,-g);df(a,h[0]-e[0],h[1]-e[1]);cf(a,(h[2]-h[0])/2,(h[3]-h[1])/2);df(a,1,1)}pn.prototype.cf=function(a,b){return void 0!==this.wa(a,b,0,Re,this)};
-pn.prototype.zg=function(a,b,c,d){if(this.M&&this.M.Y())if(this.a.ha().wa!==ea){var e=af(b.pixelToCoordinateTransform,a.slice());if(this.wa(e,b,0,Re,this))return c.call(d,this.a,null)}else{e=[this.M.Y().width,this.M.Y().height];if(!this.l){var f=b.size;b=We();df(b,-1,-1);cf(b,2/f[0],2/f[1]);df(b,0,f[1]);cf(b,1,-1);f=ff(this.N.slice());var g=We();df(g,0,e[1]);cf(g,1,-1);cf(g,e[0]/2,e[1]/2);df(g,1,1);Ze(g,f);Ze(g,b);this.l=g}a=af(this.l,a.slice());if(!(0>a[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.i||
-(this.i=hg(1,1)),this.i.clearRect(0,0,1,1),this.i.drawImage(this.M.Y(),a[0],a[1],1,1,0,0,1,1),e=this.i.getImageData(0,0,1,1).data,0<e[3]))return c.call(d,this.a,e)}};function sn(a,b){fj.call(this,a,b);this.b=document.createElement("CANVAS");this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.N=this.D=0;this.C=hg();this.s=!0;this.g=gd(this.b,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0});this.i=new Hl(this.b,this.g);y(this.b,"webglcontextlost",this.Co,this);y(this.b,"webglcontextrestored",this.Do,this);
-this.a=new ci;this.o=null;this.j=new ge(function(a){var b=a[1];a=a[2];var c=b[0]-this.o[0];b=b[1]-this.o[1];return 65536*Math.log(a)+Math.sqrt(c*c+b*b)/a}.bind(this),function(a){return a[0].lb()});this.B=function(){if(0!==this.j.b.length){ke(this.j);var a=he(this.j);tn(this,a[0],a[3],a[4])}return!1}.bind(this);this.f=0;un(this)}w(sn,fj);sn.handles=function(a){return hd&&"webgl"===a};sn.create=function(a,b){return new sn(a,b)};
-function tn(a,b,c,d){var e=a.g,f=b.lb();if(a.a.a.hasOwnProperty(f))a=a.a.get(f),e.bindTexture(3553,a.Mb),9729!=a.hi&&(e.texParameteri(3553,10240,9729),a.hi=9729),9729!=a.ji&&(e.texParameteri(3553,10241,9729),a.ji=9729);else{var g=e.createTexture();e.bindTexture(3553,g);if(0<d){var h=a.C.canvas,l=a.C;a.D!==c[0]||a.N!==c[1]?(h.width=c[0],h.height=c[1],a.D=c[0],a.N=c[1]):l.clearRect(0,0,c[0],c[1]);l.drawImage(b.Y(),d,d,c[0],c[1],0,0,c[0],c[1]);e.texImage2D(3553,0,6408,6408,5121,h)}else e.texImage2D(3553,
-0,6408,6408,5121,b.Y());e.texParameteri(3553,10240,9729);e.texParameteri(3553,10241,9729);e.texParameteri(3553,10242,33071);e.texParameteri(3553,10243,33071);a.a.set(f,{Mb:g,hi:9729,ji:9729})}}function vn(a,b,c){var d=a.l;if(Tc(d,b)){a=a.i;var e=c.viewState;d.b(new bi(b,new gn(a,e.center,e.resolution,e.rotation,c.size,c.extent,c.pixelRatio),c,null,a))}}k=sn.prototype;k.ia=function(){var a=this.g;a.isContextLost()||this.a.forEach(function(b){b&&a.deleteTexture(b.Mb)});Pc(this.i);fj.prototype.ia.call(this)};
-k.Yk=function(a,b){a=this.g;for(var c;1024<this.a.i-this.f;){if(c=this.a.g.Pc)a.deleteTexture(c.Mb);else if(+this.a.g.jc==b.index)break;else--this.f;this.a.pop()}};k.S=function(){return"webgl"};k.Co=function(a){a.preventDefault();this.a.clear();this.f=0;a=this.c;for(var b in a)a[b].Ag()};k.Do=function(){un(this);this.l.render()};function un(a){a=a.g;a.activeTexture(33984);a.blendFuncSeparate(770,771,1,771);a.disable(2884);a.disable(2929);a.disable(3089);a.disable(2960)}
-k.bh=function(a){var b=this.i,c=this.g;if(c.isContextLost())return!1;if(!a)return this.s&&(this.b.style.display="none",this.s=!1),!1;this.o=a.focus;this.a.set((-a.index).toString(),null);++this.f;vn(this,"precompose",a);var d=[],e=a.layerStatesArray;kc(e);var f=a.viewState.resolution,g;var h=0;for(g=e.length;h<g;++h){var l=e[h];if(yg(l,f)&&"ready"==l.Vj){var m=ij(this,l.layer);m.Bg(a,l,b)&&d.push(l)}}e=a.size[0]*a.pixelRatio;f=a.size[1]*a.pixelRatio;if(this.b.width!=e||this.b.height!=f)this.b.width=
-e,this.b.height=f;c.bindFramebuffer(36160,null);c.clearColor(0,0,0,0);c.clear(16384);c.enable(3042);c.viewport(0,0,this.b.width,this.b.height);h=0;for(g=d.length;h<g;++h)l=d[h],m=ij(this,l.layer),m.Zi(a,l,b);this.s||(this.b.style.display="",this.s=!0);gj(a);1024<this.a.i-this.f&&a.postRenderFunctions.push(this.Yk.bind(this));0!==this.j.b.length&&(a.postRenderFunctions.push(this.B),a.animate=!0);vn(this,"postcompose",a);jj(this,a);a.postRenderFunctions.push(hj)};
-k.wa=function(a,b,c,d,e,f,g){if(this.g.isContextLost())return!1;var h=b.viewState,l=b.layerStatesArray,m;for(m=l.length-1;0<=m;--m){var n=l[m];var p=n.layer;if(yg(n,h.resolution)&&f.call(g,p)&&(n=ij(this,p).wa(a,b,c,d,e)))return n}};k.Ui=function(a,b,c,d,e){c=!1;if(this.g.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h],m=l.layer;if(yg(l,f.resolution)&&d.call(e,m)&&(c=ij(this,m).cf(a,b)))return!0}return c};
-k.Ti=function(a,b,c,d,e){if(this.g.isContextLost())return!1;var f=b.viewState,g=b.layerStatesArray,h;for(h=g.length-1;0<=h;--h){var l=g[h];var m=l.layer;if(yg(l,f.resolution)&&e.call(d,m)&&(l=ij(this,m).zg(a,b,c,d)))return l}};var wn=new il("precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}"),xn=new jl("varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}");function yn(a,b){this.c=a.getUniformLocation(b,"d");this.g=a.getUniformLocation(b,"e");this.b=a.getAttribLocation(b,"b");this.a=a.getAttribLocation(b,"c")};function zn(a,b){mn.call(this,a,b);this.T=wn;this.ca=xn;this.i=null;this.B=new yl([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]);this.D=this.l=null;this.s=-1;this.O=[0,0]}w(zn,mn);zn.handles=function(a,b){return"webgl"===a&&"TILE"===b.S()};zn.create=function(a,b){return new zn(a,b)};k=zn.prototype;k.ia=function(){Bl(this.c.i,this.B);mn.prototype.ia.call(this)};
-k.Rf=function(a,b,c){var d=this.c;return function(e,f){return Li(a,b,e,f,function(a){var b=d.a.a.hasOwnProperty(a.lb());b&&(c[e]||(c[e]={}),c[e][a.ya.toString()]=a);return b})}};k.Ag=function(){mn.prototype.Ag.call(this);this.i=null};
-k.Bg=function(a,b,c){var d=this.c,e=c.b,f=a.viewState,g=f.projection,h=this.a,l=h.ha(),m=l.eb(g),n=m.Dc(f.resolution),p=m.Ta(n),q=l.Zd(n,a.pixelRatio,g),r=q[0]/Ba(m.Za(n),this.O)[0],u=p/r,v=l.Xc(r)*l.Zf(g),z=f.center,A=a.extent,E=tc(m,A,n);if(this.l&&na(this.l,E)&&this.s==l.g)u=this.D;else{var S=[E.la-E.fa+1,E.ka-E.ea+1],Ia=ra(Math.max(S[0]*q[0],S[1]*q[1]));S=u*Ia;var ta=m.Ic(n),la=ta[0]+E.fa*q[0]*u;u=ta[1]+E.ea*q[1]*u;u=[la,u,la+S,u+S];nn(this,a,Ia);e.viewport(0,0,Ia,Ia);e.clearColor(0,0,0,0);e.clear(16384);
-e.disable(3042);Ia=Cl(c,this.T,this.ca);c.cd(Ia);this.i||(this.i=new yn(e,Ia));rl(c,34962,this.B);e.enableVertexAttribArray(this.i.b);e.vertexAttribPointer(this.i.b,2,5126,!1,16,0);e.enableVertexAttribArray(this.i.a);e.vertexAttribPointer(this.i.a,2,5126,!1,16,8);e.uniform1i(this.i.g,0);c={};c[n]={};var ca=this.Rf(l,g,c),ia=h.i();Ia=!0;la=Da();var xa=new ja(0,0,0,0),Va,ic;for(Va=E.fa;Va<=E.la;++Va)for(ic=E.ea;ic<=E.ka;++ic){ta=l.ad(n,Va,ic,r,g);if(void 0!==b.extent){var Xa=m.Ma(ta.ya,la);if(!hb(Xa,
-b.extent))continue}Xa=ta.getState();(Xa=2==Xa||4==Xa||3==Xa&&!ia)||(ta=pj(ta));Xa=ta.getState();if(2==Xa){if(d.a.a.hasOwnProperty(ta.lb())){c[n][ta.ya.toString()]=ta;continue}}else if(4==Xa||3==Xa&&!ia)continue;Ia=!1;Xa=uc(m,ta.ya,ca,xa,la);Xa||(ta=vc(m,ta.ya,xa,la))&&ca(n+1,ta)}b=Object.keys(c).map(Number);b.sort(dc);ca=new Float32Array(4);var Z;ia=0;for(xa=b.length;ia<xa;++ia)for(Z in Va=c[b[ia]],Va)ta=Va[Z],Xa=m.Ma(ta.ya,la),ca[0]=2*(Xa[2]-Xa[0])/S,ca[1]=2*(Xa[3]-Xa[1])/S,ca[2]=2*(Xa[0]-u[0])/
-S-1,ca[3]=2*(Xa[1]-u[1])/S-1,e.uniform4fv(this.i.c,ca),tn(d,ta,q,v*r),e.drawArrays(5,0,4);Ia?(this.l=E,this.D=u,this.s=l.g):(this.D=this.l=null,this.s=-1,a.animate=!0)}Vi(a.usedTiles,l,n,E);var Zb=d.j;Wi(a,l,m,r,g,A,n,h.c(),function(a){2!=a.getState()||d.a.a.hasOwnProperty(a.lb())||a.lb()in Zb.a||Zb.i([a,yc(m,a.ya),m.Ta(a.ya[0]),q,v*r])},this);Ti(a,l);Ui(a,l);e=this.v;Xe(e);df(e,(Math.round(z[0]/p)*p-u[0])/(u[2]-u[0]),(Math.round(z[1]/p)*p-u[1])/(u[3]-u[1]));0!==f.rotation&&bf(e,f.rotation);cf(e,
-a.size[0]*f.resolution/(u[2]-u[0]),a.size[1]*f.resolution/(u[3]-u[1]));df(e,-.5,-.5);return!0};k.zg=function(a,b,c,d){if(this.f){a=af(this.v,[a[0]/b.size[0],(b.size[1]-a[1])/b.size[1]].slice());a=[a[0]*this.j,a[1]*this.j];b=this.c.i.b;b.bindFramebuffer(b.FRAMEBUFFER,this.f);var e=new Uint8Array(4);b.readPixels(a[0],a[1],1,1,b.RGBA,b.UNSIGNED_BYTE,e);if(0<e[3])return c.call(d,this.a,e)}};function An(a,b){mn.call(this,a,b);this.s=!1;this.O=-1;this.T=NaN;this.D=Da();this.l=this.i=this.B=null}w(An,mn);An.handles=function(a,b){return"webgl"===a&&"VECTOR"===b.S()};An.create=function(a,b){return new An(a,b)};k=An.prototype;k.Zi=function(a,b,c){this.l=b;var d=a.viewState,e=this.i,f=a.size,g=a.pixelRatio,h=this.c.g;e&&!e.yg()&&(h.enable(h.SCISSOR_TEST),h.scissor(0,0,f[0]*g,f[1]*g),e.Na(c,d.center,d.resolution,d.rotation,f,g,b.opacity,b.Te?a.skippedFeatureUids:{}),h.disable(h.SCISSOR_TEST))};
-k.ia=function(){var a=this.i;a&&(an(a,this.c.i)(),this.i=null);mn.prototype.ia.call(this)};k.wa=function(a,b,c,d,e){if(this.i&&this.l){c=b.viewState;var f=this.a,g={};return this.i.wa(a,this.c.i,c.center,c.resolution,c.rotation,b.size,b.pixelRatio,this.l.opacity,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};k.cf=function(a,b){if(this.i&&this.l){var c=b.viewState;return fn(this.i,a,this.c.i,c.resolution,c.rotation,b.pixelRatio,this.l.opacity,b.skippedFeatureUids)}return!1};
-k.zg=function(a,b,c,d){a=af(b.pixelToCoordinateTransform,a.slice());if(this.cf(a,b))return c.call(d,this.a,null)};k.$i=function(){Mi(this)};
-k.Bg=function(a,b,c){function d(a){var b=a.ib();if(b)var c=b.call(a,m);else(b=e.ib())&&(c=b(a,m));if(c){if(c){b=!1;if(Array.isArray(c))for(var d=c.length-1;0<=d;--d)b=ek(q,a,c[d],dk(m,n),this.$i,this)||b;else b=ek(q,a,c,dk(m,n),this.$i,this)||b;a=b}else a=!1;this.s=this.s||a}}var e=this.a;b=e.ha();Ui(a,b);var f=a.viewHints[0],g=a.viewHints[1],h=e.ca,l=e.ra;if(!this.s&&!h&&f||!l&&g)return!0;g=a.extent;h=a.viewState;f=h.projection;var m=h.resolution,n=a.pixelRatio;h=e.g;var p=e.f;l=e.get(ik);void 0===
-l&&(l=ck);g=Fa(g,p*m);if(!this.s&&this.T==m&&this.O==h&&this.B==l&&La(this.D,g))return!0;this.i&&a.postRenderFunctions.push(an(this.i,c));this.s=!1;var q=new $m(.5*m/n,g,e.f);b.ae(g,m,f);if(l){var r=[];b.ec(g,function(a){r.push(a)},this);r.sort(l);r.forEach(d,this)}else b.ec(g,d,this);bn(q,c);this.T=m;this.O=h;this.B=l;this.D=g;this.i=q;return!0};qg("MAP_RENDERER",kj);rg([bj,mj,hk,jk]);qg("MAP_RENDERER",sn);rg([pn,zn,An]);function K(a){a=kb({},a);a.controls||(a.controls=Fg());a.interactions||(a.interactions=Zh());G.call(this,a)}w(K,G);function Bn(a){Vc.call(this);this.id=a.id;this.insertFirst=void 0!==a.insertFirst?a.insertFirst:!0;this.stopEvent=void 0!==a.stopEvent?a.stopEvent:!0;this.element=document.createElement("DIV");this.element.className=void 0!==a.className?a.className:"ol-overlay-container ol-selectable";this.element.style.position="absolute";this.autoPan=void 0!==a.autoPan?a.autoPan:!1;this.autoPanAnimation=a.autoPanAnimation||{};this.autoPanMargin=void 0!==a.autoPanMargin?a.autoPanMargin:20;this.a={ze:"",Se:"",xf:"",
-Ef:"",visible:!0};this.c=null;y(this,Xc(Cn),this.am,this);y(this,Xc(Dn),this.km,this);y(this,Xc(En),this.om,this);y(this,Xc(Fn),this.qm,this);y(this,Xc(Gn),this.rm,this);void 0!==a.element&&this.Hj(a.element);this.Mj(void 0!==a.offset?a.offset:[0,0]);this.Pj(void 0!==a.positioning?a.positioning:"top-left");void 0!==a.position&&this.We(a.position)}w(Bn,Vc);k=Bn.prototype;k.Rd=function(){return this.get(Cn)};k.nn=function(){return this.id};k.Ve=function(){return this.get(Dn)};k.Xh=function(){return this.get(En)};
-k.pi=function(){return this.get(Fn)};k.Yh=function(){return this.get(Gn)};k.am=function(){for(var a=this.element;a.lastChild;)a.removeChild(a.lastChild);(a=this.Rd())&&this.element.appendChild(a)};k.km=function(){this.c&&(jg(this.element),Gc(this.c),this.c=null);var a=this.Ve();a&&(this.c=y(a,"postrender",this.render,this),Hn(this),a=this.stopEvent?a.v:a.o,this.insertFirst?a.insertBefore(this.element,a.childNodes[0]||null):a.appendChild(this.element))};k.render=function(){Hn(this)};k.om=function(){Hn(this)};
-k.qm=function(){Hn(this);if(this.get(Fn)&&this.autoPan){var a=this.Ve();if(a&&a.Cc()){var b=In(a.Cc(),a.Cb()),c=this.Rd(),d=c.offsetWidth,e=getComputedStyle(c);d+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10);e=c.offsetHeight;var f=getComputedStyle(c);e+=parseInt(f.marginTop,10)+parseInt(f.marginBottom,10);var g=In(c,[d,e]);c=this.autoPanMargin;La(b,g)||(d=g[0]-b[0],e=b[2]-g[2],f=g[1]-b[1],g=b[3]-g[3],b=[0,0],0>d?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===
-b[0]&&0===b[1])||(c=a.aa().xa(),c=a.Ia(c),b=[c[0]+b[0],c[1]+b[1]],a.aa().animate({center:a.Ra(b),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing}))}}};k.rm=function(){Hn(this)};k.Hj=function(a){this.set(Cn,a)};k.setMap=function(a){this.set(Dn,a)};k.Mj=function(a){this.set(En,a)};k.We=function(a){this.set(Fn,a)};function In(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]}k.Pj=function(a){this.set(Gn,a)};
-function Jn(a,b){a.a.visible!==b&&(a.element.style.display=b?"":"none",a.a.visible=b)}
-function Hn(a){var b=a.Ve(),c=a.pi();if(b&&b.c&&c){c=b.Ia(c);var d=b.Cb();b=a.element.style;var e=a.Xh(),f=a.Yh();Jn(a,!0);var g=e[0];e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.Se&&(a.a.Se=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.xf!=g&&(a.a.xf=b.right=g);else{""!==a.a.xf&&(a.a.xf=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.element.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.Se!=g&&(a.a.Se=b.left=g)}if("bottom-left"==f||"bottom-center"==
-f||"bottom-right"==f)""!==a.a.Ef&&(a.a.Ef=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.ze!=c&&(a.a.ze=b.bottom=c);else{""!==a.a.ze&&(a.a.ze=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.element.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.Ef!=c&&(a.a.Ef=b.top=c)}}else Jn(a,!1)}var Cn="element",Dn="map",En="offset",Fn="position",Gn="positioning";function Kn(a,b,c,d,e,f){cl.call(this,a,b,f);this.c=0;this.l=null;this.v=d;this.a=null;this.f={};this.C=e;this.N=c}w(Kn,cl);k=Kn.prototype;k.ia=function(){this.a=null;this.f={};this.state=5;this.u();cl.prototype.ia.call(this)};k.G=function(){return this.l||Ln};k.qn=function(){return this.v};k.pn=function(){return this.a};k.lb=function(){return this.N};k.rn=function(){return this.o};function ok(a,b,c){return a.f[x(b)+","+c]}
-k.load=function(){0==this.state&&(oj(this,1),this.C(this,this.N),this.D(null,NaN,null))};k.Cp=function(a,b,c){this.vg(b);this.Ij(a);this.ri(c)};k.Bp=function(){oj(this,3)};k.ri=function(a){this.l=a};k.Ij=function(a){this.a=a;oj(this,2)};k.vg=function(a){this.o=a};k.ug=function(a){this.D=a};var Ln=[0,0,4096,4096];function Mn(a){a=a?a:{};this.c=void 0!==a.className?a.className:"ol-full-screen";var b=void 0!==a.label?a.label:"\u2922";this.l="string"===typeof b?document.createTextNode(b):b;b=void 0!==a.labelActive?a.labelActive:"\u00d7";this.v="string"===typeof b?document.createTextNode(b):b;var c=a.tipLabel?a.tipLabel:"Toggle full-screen";b=document.createElement("button");b.className=this.c+"-"+Nn();b.setAttribute("type","button");b.title=c;b.appendChild(this.l);y(b,"click",this.C,this);c=document.createElement("div");
-c.className=this.c+" ol-unselectable ol-control "+(On()?"":"ol-unsupported");c.appendChild(b);vg.call(this,{element:c,target:a.target});this.D=void 0!==a.keys?a.keys:!1;this.j=a.source}w(Mn,vg);
-Mn.prototype.C=function(a){a.preventDefault();On()&&(a=this.a)&&(Nn()?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(a=this.j?"string"===typeof this.j?document.getElementById(this.j):this.j:a.Cc(),this.D?a.mozRequestFullScreenWithKeys?a.mozRequestFullScreenWithKeys():a.webkitRequestFullscreen?a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):
-Pn(a):Pn(a)))};Mn.prototype.o=function(){var a=this.element.firstElementChild,b=this.a;Nn()?(a.className=this.c+"-true",ig(this.v,this.l)):(a.className=this.c+"-false",ig(this.l,this.v));b&&b.Oc()};Mn.prototype.setMap=function(a){vg.prototype.setMap.call(this,a);a&&this.s.push(y(document,Qn(),this.o,this))};
-function On(){var a=document.body;return!!(a.webkitRequestFullscreen||a.mozRequestFullScreen&&document.mozFullScreenEnabled||a.msRequestFullscreen&&document.msFullscreenEnabled||a.requestFullscreen&&document.fullscreenEnabled)}function Nn(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}
-function Pn(a){a.requestFullscreen?a.requestFullscreen():a.msRequestFullscreen?a.msRequestFullscreen():a.mozRequestFullScreen?a.mozRequestFullScreen():a.webkitRequestFullscreen&&a.webkitRequestFullscreen()}var Qn=function(){var a;return function(){if(!a){var b=document.body;b.webkitRequestFullscreen?a="webkitfullscreenchange":b.mozRequestFullScreen?a="mozfullscreenchange":b.msRequestFullscreen?a="MSFullscreenChange":b.requestFullscreen&&(a="fullscreenchange")}return a}}();function Rn(a){a=a?a:{};var b=document.createElement("DIV");b.className=void 0!==a.className?a.className:"ol-mouse-position";vg.call(this,{element:b,render:a.render?a.render:Sn,target:a.target});y(this,Xc(Tn),this.En,this);a.coordinateFormat&&this.Gj(a.coordinateFormat);a.projection&&this.ti(a.projection);this.o=void 0!==a.undefinedHTML?a.undefinedHTML:"";this.v=b.innerHTML;this.l=this.j=this.c=null}w(Rn,vg);
-function Sn(a){a=a.frameState;a?this.c!=a.viewState.projection&&(this.c=a.viewState.projection,this.j=null):this.c=null;Un(this,this.l)}k=Rn.prototype;k.En=function(){this.j=null};k.Qh=function(){return this.get(Vn)};k.si=function(){return this.get(Tn)};k.mm=function(a){this.l=this.a.ud(a);Un(this,this.l)};k.nm=function(){Un(this,null);this.l=null};k.setMap=function(a){vg.prototype.setMap.call(this,a);a&&(a=a.a,this.s.push(y(a,"mousemove",this.mm,this),y(a,"mouseout",this.nm,this)))};
-k.Gj=function(a){this.set(Vn,a)};k.ti=function(a){this.set(Tn,Ob(a))};function Un(a,b){var c=a.o;if(b&&a.c){if(!a.j){var d=a.si();a.j=d?Pb(a.c,d):$b}if(b=a.a.Ra(b))a.j(b,b),c=(c=a.Qh())?c(b):b.toString()}a.v&&c==a.v||(a.element.innerHTML=c,a.v=c)}var Tn="projection",Vn="coordinateFormat";function Wn(a){function b(a){a=h.Sd(a);l.a.aa().ub(a);window.removeEventListener("mousemove",c);window.removeEventListener("mouseup",b)}function c(a){a=h.Sd({clientX:a.clientX-n.offsetWidth/2,clientY:a.clientY+n.offsetHeight/2});m.We(a)}a=a?a:{};this.j=void 0!==a.collapsed?a.collapsed:!0;this.l=void 0!==a.collapsible?a.collapsible:!0;this.l||(this.j=!1);var d=void 0!==a.className?a.className:"ol-overviewmap",e=void 0!==a.tipLabel?a.tipLabel:"Overview map",f=void 0!==a.collapseLabel?a.collapseLabel:
-"\u00ab";"string"===typeof f?(this.o=document.createElement("span"),this.o.textContent=f):this.o=f;f=void 0!==a.label?a.label:"\u00bb";"string"===typeof f?(this.D=document.createElement("span"),this.D.textContent=f):this.D=f;var g=this.l&&!this.j?this.o:this.D;f=document.createElement("button");f.setAttribute("type","button");f.title=e;f.appendChild(g);y(f,"click",this.Hn,this);this.C=document.createElement("DIV");this.C.className="ol-overviewmap-map";var h=this.c=new G({controls:new B,interactions:new B,
-view:a.view});a.layers&&a.layers.forEach(function(a){h.xe(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.v=new Bn({position:[0,0],positioning:"bottom-left",element:e});this.c.ye(this.v);e=document.createElement("div");e.className=d+" ol-unselectable ol-control"+(this.j&&this.l?" ol-collapsed":"")+(this.l?"":" ol-uncollapsible");e.appendChild(this.C);e.appendChild(f);vg.call(this,{element:e,render:a.render?a.render:Xn,target:a.target});
-var l=this,m=this.v,n=this.v.Rd();n.addEventListener("mousedown",function(){window.addEventListener("mousemove",c);window.addEventListener("mouseup",b)})}w(Wn,vg);k=Wn.prototype;k.setMap=function(a){var b=this.a;a!==b&&(b&&((b=b.aa())&&Mc(b,Xc("rotation"),this.Qe,this),this.c.Ad(null)),vg.prototype.setMap.call(this,a),a&&(this.c.Ad(this.C),this.s.push(y(a,"propertychange",this.lm,this)),0===this.c.Xe().kc()&&this.c.zf(a.hc()),a=a.aa()))&&(y(a,Xc("rotation"),this.Qe,this),ag(a)&&(this.c.Oc(),Yn(this)))};
-k.lm=function(a){"view"===a.key&&((a=a.oldValue)&&Mc(a,Xc("rotation"),this.Qe,this),a=this.a.aa(),y(a,Xc("rotation"),this.Qe,this))};k.Qe=function(){this.c.aa().ce(this.a.aa().Sa())};function Xn(){var a=this.a,b=this.c;if(a.c&&b.c){var c=a.Cb();a=a.aa().qd(c);var d=b.Cb();c=b.aa().qd(d);var e=b.Ia($a(a)),f=b.Ia(Ya(a));b=Math.abs(e[0]-f[0]);e=Math.abs(e[1]-f[1]);f=d[0];d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?Yn(this):La(c,a)||(a=this.c,c=this.a.aa(),a.aa().ub(c.xa()))}Zn(this)}
-function Yn(a){var b=a.a;a=a.c;var c=b.Cb();b=b.aa().qd(c);a=a.aa();ib(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.Uf(b)}function Zn(a){var b=a.a,c=a.c;if(b.c&&c.c){var d=b.Cb(),e=b.aa(),f=c.aa();c=e.Sa();b=a.v;var g=a.v.Rd(),h=e.qd(d);d=f.Pa();e=Wa(h);f=Za(h);if(a=a.a.aa().xa()){var l=[e[0]-a[0],e[1]-a[1]];Fe(l,c);ze(l,a)}b.We(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.Hn=function(a){a.preventDefault();$n(this)};
-function $n(a){a.element.classList.toggle("ol-collapsed");a.j?ig(a.o,a.D):ig(a.D,a.o);a.j=!a.j;var b=a.c;a.j||b.c||(b.Oc(),Yn(a),Lc(b,"postrender",function(){Zn(this)},a))}k.Gn=function(){return this.l};k.Jn=function(a){this.l!==a&&(this.l=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.j&&$n(this))};k.In=function(a){this.l&&this.j!==a&&$n(this)};k.Fn=function(){return this.j};k.Hl=function(){return this.c};function ao(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.l=document.createElement("DIV");this.l.className=b+"-inner";this.c=document.createElement("DIV");this.c.className=b+" ol-unselectable";this.c.appendChild(this.l);this.o=null;this.v=void 0!==a.minWidth?a.minWidth:64;this.j=!1;this.B=void 0;this.D="";vg.call(this,{element:this.c,render:a.render?a.render:bo,target:a.target});y(this,Xc(co),this.V,this);this.O(a.units||"metric")}w(ao,vg);var eo=[1,2,5];ao.prototype.C=function(){return this.get(co)};
-function bo(a){(a=a.frameState)?this.o=a.viewState:this.o=null;fo(this)}ao.prototype.V=function(){fo(this)};ao.prototype.O=function(a){this.set(co,a)};
-function fo(a){var b=a.o;if(b){var c=b.center,d=b.projection,e=a.C();b=Nb(d,b.resolution,c,"degrees"==e?"degrees":"m");"degrees"!=e&&(b*=d.Bc());var f=a.v*b;c="";"degrees"==e?(c=ub.degrees,"degrees"==d.a?f*=c:b/=c,f<c/60?(c="\u2033",b*=3600):f<c?(c="\u2032",b*=60):c="\u00b0"):"imperial"==e?.9144>f?(c="in",b/=.0254):1609.344>f?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>f?(c="\u03bcm",b*=1E6):1>f?(c="mm",b*=1E3):1E3>f?c="m":(c="km",b/=1E3):"us"==e?.9144>f?
-(c="in",b*=39.37):1609.344>f?(c="ft",b/=.30480061):(c="mi",b/=1609.3472):oa(!1,33);for(e=3*Math.floor(Math.log(a.v*b)/Math.log(10));;){f=eo[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.c.style.display="none";a.j=!1;return}if(d>=a.v)break;++e}b=f+" "+c;a.D!=b&&(a.l.innerHTML=b,a.D=b);a.B!=d&&(a.l.style.width=d+"px",a.B=d);a.j||(a.c.style.display="",a.j=!0)}else a.j&&(a.c.style.display="none",a.j=!1)}var co="units";function go(a){a=a?a:{};this.c=void 0;this.j=ho;this.D=this.v=0;this.O=null;this.$=!1;this.V=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.l=new Xd(d);y(this.l,"pointerdown",this.$l,this);y(this.l,"pointermove",this.Yl,this);y(this.l,"pointerup",this.Zl,
-this);y(d,"click",this.Xl,this);y(c,"click",Rc);vg.call(this,{element:d,render:a.render?a.render:io})}w(go,vg);go.prototype.ia=function(){Pc(this.l);vg.prototype.ia.call(this)};var ho=0;k=go.prototype;k.setMap=function(a){vg.prototype.setMap.call(this,a);a&&a.render()};
-function io(a){if(a.frameState){if(!this.$){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=getComputedStyle(e);b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft);e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.O=[b,e];c>d?(this.j=1,this.D=c-b):(this.j=ho,this.v=d-e);this.$=!0}a=a.frameState.viewState.resolution;a!==this.c&&(this.c=a,jo(this,a))}}
-k.Xl=function(a){var b=this.a.aa();a=ko(this,pa(1===this.j?(a.offsetX-this.O[0]/2)/this.D:(a.offsetY-this.O[1]/2)/this.v,0,1));b.animate({resolution:b.constrainResolution(a),duration:this.V,easing:Oe})};k.$l=function(a){this.o||a.b.target!==this.element.firstElementChild||(bg(this.a.aa(),1,1),this.C=a.clientX,this.B=a.clientY,this.o=!0)};
-k.Yl=function(a){if(this.o){var b=this.element.firstElementChild;this.c=ko(this,pa(1===this.j?(a.clientX-this.C+parseInt(b.style.left,10))/this.D:(a.clientY-this.B+parseInt(b.style.top,10))/this.v,0,1));this.a.aa().gd(this.c);jo(this,this.c);this.C=a.clientX;this.B=a.clientY}};k.Zl=function(){if(this.o){var a=this.a.aa();bg(a,1,-1);a.animate({resolution:a.constrainResolution(this.c),duration:this.V,easing:Oe});this.o=!1;this.B=this.C=void 0}};
-function jo(a,b){b=1-gg(a.a.aa())(b);var c=a.element.firstElementChild;1==a.j?c.style.left=a.D*b+"px":c.style.top=a.v*b+"px"}function ko(a,b){return fg(a.a.aa())(1-b)};function lo(a){a=a?a:{};this.extent=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);y(e,"click",this.c,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);vg.call(this,{element:c,target:a.target})}
-w(lo,vg);lo.prototype.c=function(a){a.preventDefault();a=this.a.aa();var b=this.extent?this.extent:a.v.G();a.Uf(b)};var mo=document.implementation.createDocument("","",null);function no(a,b){return mo.createElementNS(a,b)}function oo(a,b){return po(a,b,[]).join("")}function po(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)po(a,b,c);return c}function qo(a){return a instanceof Document}function ro(a){return a instanceof Node}
-function so(a){return(new DOMParser).parseFromString(a,"application/xml")}function to(a,b){return function(c,d){c=a.call(b,c,d);void 0!==c&&gc(d[d.length-1],c)}}function uo(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&d[d.length-1].push(c)}}function vo(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&(d[d.length-1]=c)}}
-function wo(a){return function(b,c){var d=a.call(this,b,c);if(void 0!==d){c=c[c.length-1];b=b.localName;var e;b in c?e=c[b]:e=c[b]=[];e.push(d)}}}function L(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function M(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}}
-function xo(a){var b,c;return function(d,e,f){if(void 0===b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=yo(d.localName)}zo(b,c,e,f)}}function yo(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return no(e,d)}}var Ao=yo();function Bo(a,b){for(var c=b.length,d=Array(c),e=0;e<c;++e)d[e]=a[b[e]];return d}function N(a,b,c){c=void 0!==c?c:{};var d;var e=0;for(d=a.length;e<d;++e)c[a[e]]=b;return c}
-function Co(a,b,c,d){for(b=b.firstElementChild;b;b=b.nextElementSibling){var e=a[b.namespaceURI];void 0!==e&&(e=e[b.localName],void 0!==e&&e.call(d,b,c))}}function O(a,b,c,d,e){d.push(a);Co(b,c,d,e);return d.pop()}function zo(a,b,c,d,e,f){for(var g=(void 0!==e?e:c).length,h,l,m=0;m<g;++m)h=c[m],void 0!==h&&(l=b.call(f,h,d,void 0!==e?e[m]:void 0),void 0!==l&&a[l.namespaceURI][l.localName].call(f,l,h,d))}function Do(a,b,c,d,e,f,g){e.push(a);zo(b,c,d,e,f,g);e.pop()};function Eo(a,b,c,d){return function(e,f,g){var h=new XMLHttpRequest;h.open("GET","function"===typeof a?a(e,f,g):a,!0);"arraybuffer"==b.S()&&(h.responseType="arraybuffer");h.onload=function(){if(!h.status||200<=h.status&&300>h.status){var a=b.S();if("json"==a||"text"==a)var e=h.responseText;else"xml"==a?(e=h.responseXML)||(e=so(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Qa(e,{featureProjection:g}),b.sb(e),b.cg()):d.call(this)}else d.call(this)}.bind(this);h.onerror=function(){d.call(this)}.bind(this);
-h.send()}}function Fo(a,b){return Eo(a,b,function(a){this.Qc(a)},ea)};function Go(){this.i=this.defaultDataProjection=null}function Ho(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.sb(b),featureProjection:c.featureProjection});return Io(a,d)}function Io(a,b){return kb({dataProjection:a.defaultDataProjection,featureProjection:a.i},b)}Go.prototype.cg=function(){return null};
-function Jo(a,b,c){var d=c?Ob(c.featureProjection):null,e=c?Ob(c.dataProjection):null,f;d&&e&&!Xb(d,e)?a instanceof gf?f=(b?a.clone():a).mb(b?d:e,b?e:d):f=bc(a,e,d):f=a;if(b&&c&&void 0!==c.decimals){var g=Math.pow(10,c.decimals);f===a&&(f=f.clone());f.Rc(function(a){for(var b=0,c=a.length;b<c;++b)a[b]=Math.round(a[b]*g)/g;return a})}return f};function Ko(){Go.call(this)}w(Ko,Go);function Lo(a){return"string"===typeof a?(a=JSON.parse(a))?a:null:null!==a?a:null}k=Ko.prototype;k.S=function(){return"json"};k.Yb=function(a,b){return this.dd(Lo(a),Ho(this,a,b))};k.Qa=function(a,b){return this.Mg(Lo(a),Ho(this,a,b))};k.ed=function(a,b){return this.Qg(Lo(a),Ho(this,a,b))};k.sb=function(a){return this.Tg(Lo(a))};k.Jd=function(a,b){return JSON.stringify(this.ld(a,b))};k.ac=function(a,b){return JSON.stringify(this.qe(a,b))};
-k.md=function(a,b){return JSON.stringify(this.se(a,b))};function P(a,b){hf.call(this);this.c=[];this.j=this.o=-1;this.na(a,b)}w(P,hf);k=P.prototype;k.Gk=function(a){this.A?gc(this.A,a.da().slice()):this.A=a.da().slice();this.c.push(this.A.length);this.u()};k.clone=function(){var a=new P(null);a.ba(this.ja,this.A.slice(),this.c.slice());return a};k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;this.j!=this.g&&(this.o=Math.sqrt(qf(this.A,0,this.c,this.a,0)),this.j=this.g);return uf(this.A,0,this.c,this.a,this.o,!1,a,b,c,d)};
-k.Wn=function(a,b,c){return"XYM"!=this.ja&&"XYZM"!=this.ja||0===this.A.length?null:Tk(this.A,this.c,this.a,a,void 0!==b?b:!1,void 0!==c?c:!1)};k.W=function(){return zf(this.A,0,this.c,this.a)};k.pb=function(){return this.c};k.yl=function(a){if(0>a||this.c.length<=a)return null;var b=new I(null);b.ba(this.ja,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b};
-k.wd=function(){var a=this.A,b=this.c,c=this.ja,d=[],e=0,f;var g=0;for(f=b.length;g<f;++g){var h=b[g],l=new I(null);l.ba(c,a.slice(e,h));d.push(l);e=h}return d};k.Ge=function(){var a=[],b=this.A,c=0,d=this.c,e=this.a,f;var g=0;for(f=d.length;g<f;++g){var h=d[g];c=Kk(b,c,h,e,.5);gc(a,c);c=h}return a};k.xd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a,g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m];h=Bf(d,g,n,f,a,b,h);c.push(h);g=n}b.length=h;a=new P(null);a.ba("XY",b,c);return a};k.S=function(){return"MultiLineString"};
-k.$a=function(a){a:{var b=this.A,c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){if(Kf(b,e,c[g],d,a)){a=!0;break a}e=c[g]}a=!1}return a};k.na=function(a,b){a?(lf(this,b,a,2),this.A||(this.A=[]),a=xf(this.A,0,a,this.a,this.c),this.A.length=0===a.length?0:a[a.length-1],this.u()):this.ba("XY",null,this.c)};k.ba=function(a,b,c){kf(this,a,b);this.c=c;this.u()};
-function Mo(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];0===g&&(c=h.ja);gc(d,h.da());e.push(d.length)}a.ba(c,d,e)};function No(a,b){hf.call(this);this.na(a,b)}w(No,hf);k=No.prototype;k.Ik=function(a){this.A?gc(this.A,a.da()):this.A=a.da().slice();this.u()};k.clone=function(){var a=new No(null);a.ba(this.ja,this.A.slice());return a};k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;var e=this.A,f=this.a,g;var h=0;for(g=e.length;h<g;h+=f){var l=ua(a,b,e[h],e[h+1]);if(l<d){d=l;for(l=0;l<f;++l)c[l]=e[h+l];c.length=f}}return d};k.W=function(){return yf(this.A,0,this.A.length,this.a)};
-k.Ll=function(a){var b=this.A?this.A.length/this.a:0;if(0>a||b<=a)return null;b=new C(null);b.ba(this.ja,this.A.slice(a*this.a,(a+1)*this.a));return b};k.de=function(){var a=this.A,b=this.ja,c=this.a,d=[],e;var f=0;for(e=a.length;f<e;f+=c){var g=new C(null);g.ba(b,a.slice(f,f+c));d.push(g)}return d};k.S=function(){return"MultiPoint"};k.$a=function(a){var b=this.A,c=this.a,d;var e=0;for(d=b.length;e<d;e+=c){var f=b[e];var g=b[e+1];if(Ka(a,f,g))return!0}return!1};
-k.na=function(a,b){a?(lf(this,b,a,1),this.A||(this.A=[]),this.A.length=wf(this.A,0,a,this.a),this.u()):this.ba("XY",null)};k.ba=function(a,b){kf(this,a,b);this.u()};function Q(a,b){hf.call(this);this.c=[];this.o=-1;this.D=null;this.T=this.C=this.B=-1;this.j=null;this.na(a,b)}w(Q,hf);k=Q.prototype;k.Jk=function(a){if(this.A){var b=this.A.length;gc(this.A,a.da());a=a.pb().slice();var c;var d=0;for(c=a.length;d<c;++d)a[d]+=b}else this.A=a.da().slice(),a=a.pb().slice(),this.c.push();this.c.push(a);this.u()};k.clone=function(){for(var a=new Q(null),b=this.c.length,c=Array(b),d=0;d<b;++d)c[d]=this.c[d].slice();a.ba(this.ja,this.A.slice(),c);return a};
-k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;if(this.C!=this.g){var e=this.c,f=0,g=0,h;var l=0;for(h=e.length;l<h;++l){var m=e[l];g=qf(this.A,f,m,this.a,g);f=m[m.length-1]}this.B=Math.sqrt(g);this.C=this.g}e=Ii(this);f=this.c;g=this.a;l=this.B;h=0;m=[NaN,NaN];var n;var p=0;for(n=f.length;p<n;++p){var q=f[p];d=uf(e,h,q,g,l,!0,a,b,c,d,m);h=q[q.length-1]}return d};
-k.Zc=function(a,b){a:{var c=Ii(this),d=this.c,e=0;if(0!==d.length){var f;var g=0;for(f=d.length;g<f;++g){var h=d[g];if(Hf(c,e,h,this.a,a,b)){a=!0;break a}e=h[h.length-1]}}a=!1}return a};k.Xn=function(){var a=Ii(this),b=this.c,c=0,d=0,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];d+=nf(a,c,g,this.a);c=g[g.length-1]}return d};k.W=function(a){if(void 0!==a){var b=Ii(this).slice();Pf(b,this.c,this.a,a)}else b=this.A;return Af(b,0,this.c,this.a)};k.td=function(){return this.c};
-function Ji(a){if(a.o!=a.g){var b=a.A,c=a.c,d=a.a,e=0,f=[],g;var h=0;for(g=c.length;h<g;++h){var l=c[h];e=Qa(b,e,l[0],d);f.push((e[0]+e[2])/2,(e[1]+e[3])/2);e=l[l.length-1]}b=Ii(a);c=a.c;d=a.a;h=0;g=[];l=0;for(e=c.length;l<e;++l){var m=c[l];g=If(b,h,m,d,f,2*l,g);h=m[m.length-1]}a.D=g;a.o=a.g}return a.D}k.ul=function(){var a=new No(null);a.ba("XYM",Ji(this).slice());return a};
-function Ii(a){if(a.T!=a.g){var b=a.A;a:{var c=a.c;var d;var e=0;for(d=c.length;e<d;++e)if(!Nf(b,c[e],a.a,void 0)){c=!1;break a}c=!0}c?a.j=b:(a.j=b.slice(),a.j.length=Pf(a.j,a.c,a.a));a.T=a.g}return a.j}k.xd=function(a){var b=[],c=[],d=this.A,e=this.c,f=this.a;a=Math.sqrt(a);var g=0,h=0,l;var m=0;for(l=e.length;m<l;++m){var n=e[m],p=[];h=Cf(d,g,n,f,a,b,h,p);c.push(p);g=n[n.length-1]}b.length=h;d=new Q(null);d.ba("XY",b,c);return d};
-k.Ml=function(a){if(0>a||this.c.length<=a)return null;if(0===a)var b=0;else b=this.c[a-1],b=b[b.length-1];a=this.c[a].slice();var c=a[a.length-1];if(0!==b){var d;var e=0;for(d=a.length;e<d;++e)a[e]-=b}e=new D(null);e.ba(this.ja,this.A.slice(b,c),a);return e};k.Vd=function(){var a=this.ja,b=this.A,c=this.c,d=[],e=0,f,g;var h=0;for(f=c.length;h<f;++h){var l=c[h].slice(),m=l[l.length-1];if(0!==e){var n=0;for(g=l.length;n<g;++n)l[n]-=e}n=new D(null);n.ba(a,b.slice(e,m),l);d.push(n);e=m}return d};
-k.S=function(){return"MultiPolygon"};k.$a=function(a){a:{var b=Ii(this),c=this.c,d=this.a,e=0,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];if(Lf(b,e,h,d,a)){a=!0;break a}e=h[h.length-1]}a=!1}return a};
-k.na=function(a,b){if(a){lf(this,b,a,3);this.A||(this.A=[]);b=this.A;var c=this.a,d=this.c,e=0;d=d?d:[];var f=0,g;var h=0;for(g=a.length;h<g;++h)e=xf(b,e,a[h],c,d[f]),d[f++]=e,e=e[e.length-1];d.length=f;0===d.length?this.A.length=0:(a=d[d.length-1],this.A.length=0===a.length?0:a[a.length-1]);this.u()}else this.ba("XY",null,this.c)};k.ba=function(a,b,c){kf(this,a,b);this.c=c;this.u()};
-function Oo(a,b){var c=a.ja,d=[],e=[],f;var g=0;for(f=b.length;g<f;++g){var h=b[g];0===g&&(c=h.ja);var l=d.length;var m=h.pb();var n;var p=0;for(n=m.length;p<n;++p)m[p]+=l;gc(d,h.da());e.push(m)}a.ba(c,d,e)};function Po(a){a=a?a:{};Go.call(this);this.b=a.geometryName}w(Po,Ko);
-function Qo(a,b){if(!a)return null;if("number"===typeof a.x&&"number"===typeof a.y)var c="Point";else if(a.points)c="MultiPoint";else if(a.paths)c=1===a.paths.length?"LineString":"MultiLineString";else if(a.rings){var d=a.rings,e=Ro(a),f=[],g=[];c=[];var h;var l=0;for(h=d.length;l<h;++l)f.length=0,wf(f,0,d[l],e.length),Mf(f,0,f.length,e.length)?g.push([d[l]]):c.push(d[l]);for(;c.length;){d=c.shift();e=!1;for(l=g.length-1;0<=l;l--)if(La((new Df(g[l][0])).G(),(new Df(d)).G())){g[l].push(d);e=!0;break}e||
-g.push([d.reverse()])}a=kb({},a);1===g.length?(c="Polygon",a.rings=g[0]):(c="MultiPolygon",a.rings=g)}return Jo((0,So[c])(a),!1,b)}function Ro(a){var b="XY";!0===a.hasZ&&!0===a.hasM?b="XYZM":!0===a.hasZ?b="XYZ":!0===a.hasM&&(b="XYM");return b}function To(a){a=a.ja;return{hasZ:"XYZ"===a||"XYZM"===a,hasM:"XYM"===a||"XYZM"===a}}
-var So={Point:function(a){return void 0!==a.m&&void 0!==a.z?new C([a.x,a.y,a.z,a.m],"XYZM"):void 0!==a.z?new C([a.x,a.y,a.z],"XYZ"):void 0!==a.m?new C([a.x,a.y,a.m],"XYM"):new C([a.x,a.y])},LineString:function(a){return new I(a.paths[0],Ro(a))},Polygon:function(a){return new D(a.rings,Ro(a))},MultiPoint:function(a){return new No(a.points,Ro(a))},MultiLineString:function(a){return new P(a.paths,Ro(a))},MultiPolygon:function(a){return new Q(a.rings,Ro(a))}},Uo={Point:function(a){var b=a.W(),c;a=a.ja;
-"XYZ"===a?c={x:b[0],y:b[1],z:b[2]}:"XYM"===a?c={x:b[0],y:b[1],m:b[2]}:"XYZM"===a?c={x:b[0],y:b[1],z:b[2],m:b[3]}:"XY"===a?c={x:b[0],y:b[1]}:oa(!1,34);return c},LineString:function(a){var b=To(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:[a.W()]}},Polygon:function(a){var b=To(a);return{hasZ:b.hasZ,hasM:b.hasM,rings:a.W(!1)}},MultiPoint:function(a){var b=To(a);return{hasZ:b.hasZ,hasM:b.hasM,points:a.W()}},MultiLineString:function(a){var b=To(a);return{hasZ:b.hasZ,hasM:b.hasM,paths:a.W()}},MultiPolygon:function(a){var b=
-To(a);a=a.W(!1);for(var c=[],d=0;d<a.length;d++)for(var e=a[d].length-1;0<=e;e--)c.push(a[d][e]);return{hasZ:b.hasZ,hasM:b.hasM,rings:c}}};k=Po.prototype;k.dd=function(a,b){var c=Qo(a.geometry,b),d=new Hk;this.b&&d.Lc(this.b);d.Va(c);b&&b.pg&&a.attributes[b.pg]&&d.qc(a.attributes[b.pg]);a.attributes&&d.H(a.attributes);return d};k.Mg=function(a,b){b=b?b:{};if(a.features){var c=[],d=a.features,e;b.pg=a.objectIdFieldName;a=0;for(e=d.length;a<e;++a)c.push(this.dd(d[a],b));return c}return[this.dd(a,b)]};
-k.Qg=function(a,b){return Qo(a,b)};k.Tg=function(a){return a.spatialReference&&a.spatialReference.wkid?Ob("EPSG:"+a.spatialReference.wkid):null};function Vo(a,b){return(0,Uo[a.S()])(Jo(a,!0,b),b)}k.se=function(a,b){return Vo(a,Io(this,b))};k.ld=function(a,b){b=Io(this,b);var c={},d=a.U();d&&(c.geometry=Vo(d,b),b&&b.featureProjection&&(c.geometry.spatialReference={wkid:Ob(b.featureProjection).wb.split(":").pop()}));b=a.L();delete b[a.a];c.attributes=nb(b)?{}:b;return c};
-k.qe=function(a,b){b=Io(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.ld(a[e],b));return{features:c}};function Wo(){this.g=new XMLSerializer;Go.call(this)}w(Wo,Go);k=Wo.prototype;k.S=function(){return"xml"};k.Yb=function(a,b){return qo(a)?Xo(this,a,b):ro(a)?this.Lg(a,b):"string"===typeof a?(a=so(a),Xo(this,a,b)):null};function Xo(a,b,c){a=Yo(a,b,c);return 0<a.length?a[0]:null}k.Lg=function(){return null};k.Qa=function(a,b){return qo(a)?Yo(this,a,b):ro(a)?this.Kc(a,b):"string"===typeof a?(a=so(a),Yo(this,a,b)):[]};
-function Yo(a,b,c){var d=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&gc(d,a.Kc(b,c));return d}k.ed=function(a,b){if(qo(a))return null;if(ro(a))return this.vj(a,b);"string"===typeof a&&so(a);return null};k.vj=function(){return null};k.sb=function(a){return qo(a)?this.Sg(a):ro(a)?this.uf(a):"string"===typeof a?(a=so(a),this.Sg(a)):null};k.Sg=function(){return this.defaultDataProjection};k.uf=function(){return this.defaultDataProjection};k.Jd=function(){return this.g.serializeToString(this.mh())};
-k.mh=function(){return null};k.ac=function(a,b){a=this.bc(a,b);return this.g.serializeToString(a)};k.bc=function(){return null};k.md=function(a,b){a=this.re(a,b);return this.g.serializeToString(a)};k.re=function(){return null};function Zo(a){a=a?a:{};this.featureType=a.featureType;this.featureNS=a.featureNS;this.srsName=a.srsName;this.schemaLocation="";this.b={};this.b["http://www.opengis.net/gml"]={featureMember:vo(Zo.prototype.ge),featureMembers:vo(Zo.prototype.ge)};Wo.call(this)}w(Zo,Wo);var $o=/^[\s\xa0]*$/;k=Zo.prototype;
-k.ge=function(a,b){var c=a.localName,d=null;if("FeatureCollection"==c)"http://www.opengis.net/wfs"===a.namespaceURI?d=O([],this.b,a,b,this):d=O(null,this.b,a,b,this);else if("featureMembers"==c||"featureMember"==c){var e=b[0],f=e.featureType,g=e.featureNS,h;if(!f&&a.childNodes){f=[];g={};var l=0;for(h=a.childNodes.length;l<h;++l){var m=a.childNodes[l];if(1===m.nodeType){var n=m.nodeName.split(":").pop();if(-1===f.indexOf(n)){var p="",q=0;m=m.namespaceURI;for(var r in g){if(g[r]===m){p=r;break}++q}p||
-(p="p"+q,g[p]=m);f.push(p+":"+n)}}}"featureMember"!=c&&(e.featureType=f,e.featureNS=g)}"string"===typeof g&&(l=g,g={},g.p0=l);e={};f=Array.isArray(f)?f:[f];for(var u in g){n={};l=0;for(h=f.length;l<h;++l)(-1===f[l].indexOf(":")?"p0":f[l].split(":")[0])===u&&(n[f[l].split(":").pop()]="featureMembers"==c?uo(this.Kg,this):vo(this.Kg,this));e[g[u]]=n}"featureMember"==c?d=O(void 0,e,a,b):d=O([],e,a,b)}null===d&&(d=[]);return d};
-k.rf=function(a,b){var c=b[0];c.srsName=a.firstElementChild.getAttribute("srsName");c.srsDimension=a.firstElementChild.getAttribute("srsDimension");if(a=O(null,this.qh,a,b,this))return Jo(a,!1,c)};
-k.Kg=function(a,b){var c;(c=a.getAttribute("fid"))||(c=a.getAttributeNS("http://www.opengis.net/gml","id")||"");var d={},e;for(a=a.firstElementChild;a;a=a.nextElementSibling){var f=a.localName;if(0===a.childNodes.length||1===a.childNodes.length&&(3===a.firstChild.nodeType||4===a.firstChild.nodeType)){var g=oo(a,!1);$o.test(g)&&(g=void 0);d[f]=g}else"boundedBy"!==f&&(e=f),d[f]=this.rf(a,b)}b=new Hk(d);e&&b.Lc(e);c&&b.qc(c);return b};
-k.Aj=function(a,b){if(a=this.qf(a,b))return b=new C(null),b.ba("XYZ",a),b};k.yj=function(a,b){if(a=O([],this.kk,a,b,this))return new No(a)};k.xj=function(a,b){if(a=O([],this.jk,a,b,this))return b=new P(null),Mo(b,a),b};k.zj=function(a,b){if(a=O([],this.lk,a,b,this))return b=new Q(null),Oo(b,a),b};k.qj=function(a,b){Co(this.pk,a,b,this)};k.fi=function(a,b){Co(this.hk,a,b,this)};k.rj=function(a,b){Co(this.qk,a,b,this)};k.sf=function(a,b){if(a=this.qf(a,b))return b=new I(null),b.ba("XYZ",a),b};
-k.Xp=function(a,b){if(a=O(null,this.te,a,b,this))return a};k.wj=function(a,b){if(a=this.qf(a,b))return b=new Df(null),Ef(b,"XYZ",a),b};k.tf=function(a,b){if((a=O([null],this.Gf,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)gc(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.qf=function(a,b){return O(null,this.te,a,b,this)};k.kk={"http://www.opengis.net/gml":{pointMember:uo(Zo.prototype.qj),pointMembers:uo(Zo.prototype.qj)}};
-k.jk={"http://www.opengis.net/gml":{lineStringMember:uo(Zo.prototype.fi),lineStringMembers:uo(Zo.prototype.fi)}};k.lk={"http://www.opengis.net/gml":{polygonMember:uo(Zo.prototype.rj),polygonMembers:uo(Zo.prototype.rj)}};k.pk={"http://www.opengis.net/gml":{Point:uo(Zo.prototype.qf)}};k.hk={"http://www.opengis.net/gml":{LineString:uo(Zo.prototype.sf)}};k.qk={"http://www.opengis.net/gml":{Polygon:uo(Zo.prototype.tf)}};k.ue={"http://www.opengis.net/gml":{LinearRing:vo(Zo.prototype.Xp)}};
-k.vj=function(a,b){return(a=this.rf(a,[Ho(this,a,b?b:{})]))?a:null};k.Kc=function(a,b){var c={featureType:this.featureType,featureNS:this.featureNS};b&&kb(c,Ho(this,a,b));return this.ge(a,[c])||[]};k.uf=function(a){return Ob(this.srsName?this.srsName:a.firstElementChild.getAttribute("srsName"))};function ap(a){a=oo(a,!1);return bp(a)}function bp(a){if(a=/^\s*(true|1)|(false|0)\s*$/.exec(a))return void 0!==a[1]||!1}function cp(a){a=oo(a,!1);a=Date.parse(a);return isNaN(a)?void 0:a/1E3}function dp(a){a=oo(a,!1);return ep(a)}function ep(a){if(a=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(a))return parseFloat(a[1])}function fp(a){a=oo(a,!1);return gp(a)}function gp(a){if(a=/^\s*(\d+)\s*$/.exec(a))return parseInt(a[1],10)}function R(a){return oo(a,!1).trim()}
-function hp(a,b){ip(a,b?"1":"0")}function Ip(a,b){a.appendChild(mo.createTextNode(b.toPrecision()))}function Jp(a,b){a.appendChild(mo.createTextNode(b.toString()))}function ip(a,b){a.appendChild(mo.createTextNode(b))};function Kp(a){a=a?a:{};Zo.call(this,a);this.s=void 0!==a.surface?a.surface:!1;this.c=void 0!==a.curve?a.curve:!1;this.f=void 0!==a.multiCurve?a.multiCurve:!0;this.j=void 0!==a.multiSurface?a.multiSurface:!0;this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd";this.hasZ=void 0!==a.hasZ?a.hasZ:!1}w(Kp,Zo);k=Kp.prototype;
-k.aq=function(a,b){if(a=O([],this.ik,a,b,this))return b=new P(null),Mo(b,a),b};k.bq=function(a,b){if(a=O([],this.mk,a,b,this))return b=new Q(null),Oo(b,a),b};k.Gh=function(a,b){Co(this.ek,a,b,this)};k.Xj=function(a,b){Co(this.sk,a,b,this)};k.fq=function(a,b){return O([null],this.nk,a,b,this)};k.iq=function(a,b){return O([null],this.rk,a,b,this)};k.gq=function(a,b){return O([null],this.Gf,a,b,this)};k.$p=function(a,b){return O([null],this.te,a,b,this)};
-k.Fm=function(a,b){(a=O(void 0,this.ue,a,b,this))&&b[b.length-1].push(a)};k.Zk=function(a,b){(a=O(void 0,this.ue,a,b,this))&&(b[b.length-1][0]=a)};k.Bj=function(a,b){if((a=O([null],this.tk,a,b,this))&&a[0]){b=new D(null);var c=a[0],d=[c.length],e;var f=1;for(e=a.length;f<e;++f)gc(c,a[f]),d.push(c.length);b.ba("XYZ",c,d);return b}};k.tj=function(a,b){if(a=O([null],this.fk,a,b,this))return b=new I(null),b.ba("XYZ",a),b};
-k.Wp=function(a,b){a=O([null],this.gk,a,b,this);return Na(a[1][0],a[1][1],a[2][0],a[2][1])};k.Yp=function(a,b){var c=oo(a,!1),d=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/;a=[];for(var e;e=d.exec(c);)a.push(parseFloat(e[1])),c=c.substr(e[0].length);if(""===c){b=b[0].srsName;c="enu";b&&(c=Ob(b).b);if("neu"===c)for(b=0,c=a.length;b<c;b+=3)d=a[b],a[b]=a[b+1],a[b+1]=d;b=a.length;2==b&&a.push(0);if(0!==b)return a}};
-k.Pg=function(a,b){var c=oo(a,!1).replace(/^\s*|\s*$/g,"");b=b[0];var d=b.srsName,e=b.srsDimension;b="enu";d&&(b=Ob(d).b);c=c.split(/\s+/);d=2;a.getAttribute("srsDimension")?d=gp(a.getAttribute("srsDimension")):a.getAttribute("dimension")?d=gp(a.getAttribute("dimension")):a.parentNode.getAttribute("srsDimension")?d=gp(a.parentNode.getAttribute("srsDimension")):e&&(d=gp(e));for(var f,g=[],h=0,l=c.length;h<l;h+=d)a=parseFloat(c[h]),e=parseFloat(c[h+1]),f=3===d?parseFloat(c[h+2]):0,"en"===b.substr(0,
-2)?g.push(a,e,f):g.push(e,a,f);return g};k.te={"http://www.opengis.net/gml":{pos:vo(Kp.prototype.Yp),posList:vo(Kp.prototype.Pg)}};k.Gf={"http://www.opengis.net/gml":{interior:Kp.prototype.Fm,exterior:Kp.prototype.Zk}};
-k.qh={"http://www.opengis.net/gml":{Point:vo(Zo.prototype.Aj),MultiPoint:vo(Zo.prototype.yj),LineString:vo(Zo.prototype.sf),MultiLineString:vo(Zo.prototype.xj),LinearRing:vo(Zo.prototype.wj),Polygon:vo(Zo.prototype.tf),MultiPolygon:vo(Zo.prototype.zj),Surface:vo(Kp.prototype.Bj),MultiSurface:vo(Kp.prototype.bq),Curve:vo(Kp.prototype.tj),MultiCurve:vo(Kp.prototype.aq),Envelope:vo(Kp.prototype.Wp)}};k.ik={"http://www.opengis.net/gml":{curveMember:uo(Kp.prototype.Gh),curveMembers:uo(Kp.prototype.Gh)}};
-k.mk={"http://www.opengis.net/gml":{surfaceMember:uo(Kp.prototype.Xj),surfaceMembers:uo(Kp.prototype.Xj)}};k.ek={"http://www.opengis.net/gml":{LineString:uo(Zo.prototype.sf),Curve:uo(Kp.prototype.tj)}};k.sk={"http://www.opengis.net/gml":{Polygon:uo(Zo.prototype.tf),Surface:uo(Kp.prototype.Bj)}};k.tk={"http://www.opengis.net/gml":{patches:vo(Kp.prototype.fq)}};k.fk={"http://www.opengis.net/gml":{segments:vo(Kp.prototype.iq)}};k.gk={"http://www.opengis.net/gml":{lowerCorner:uo(Kp.prototype.Pg),upperCorner:uo(Kp.prototype.Pg)}};
-k.nk={"http://www.opengis.net/gml":{PolygonPatch:vo(Kp.prototype.gq)}};k.rk={"http://www.opengis.net/gml":{LineStringSegment:vo(Kp.prototype.$p)}};function Lp(a,b,c){var d=c[c.length-1];c=d.hasZ;a.setAttribute("srsDimension",c?3:2);d=d.srsName;b=b.W();for(var e=b.length,f=Array(e),g,h=0;h<e;++h){g=b[h];var l=h,m=c,n="enu";d&&(n=Ob(d).b);n="en"===n.substr(0,2)?g[0]+" "+g[1]:g[1]+" "+g[0];m&&(n+=" "+(g[2]||0));f[l]=n}ip(a,f.join(" "))}
-k.Hi=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=no(a.namespaceURI,"pos");a.appendChild(d);c=c[c.length-1];a=c.hasZ;d.setAttribute("srsDimension",a?3:2);var e=c.srsName;c="enu";e&&(c=Ob(e).b);b=b.W();c="en"===c.substr(0,2)?b[0]+" "+b[1]:b[1]+" "+b[0];a&&(c+=" "+(b[2]||0));ip(d,c)};var Mp={"http://www.opengis.net/gml":{lowerCorner:M(ip),upperCorner:M(ip)}};k=Kp.prototype;
-k.Pn=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Do({node:a},Mp,Ao,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};k.Ei=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=no(a.namespaceURI,"posList");a.appendChild(d);Lp(d,b,c)};k.On=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return no(b.namespaceURI,void 0!==c?"interior":"exterior")};
-k.af=function(a,b,c){var d=c[c.length-1],e=d.hasZ;d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Ud(),Do({node:a,hasZ:e,srsName:d},Np,this.On,b,c,void 0,this)):"Surface"===a.nodeName&&(e=no(a.namespaceURI,"patches"),a.appendChild(e),a=no(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.af(a,b,c))};
-k.$e=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=no(a.namespaceURI,"posList"),a.appendChild(d),Lp(d,b,c)):"Curve"===a.nodeName&&(d=no(a.namespaceURI,"segments"),a.appendChild(d),a=no(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.$e(a,b,c))};
-k.Gi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName;d=d.surface;f&&a.setAttribute("srsName",f);b=b.Vd();Do({node:a,hasZ:e,srsName:f,surface:d},Op,this.l,b,c,void 0,this)};k.Qn=function(a,b,c){var d=c[c.length-1],e=d.srsName;d=d.hasZ;e&&a.setAttribute("srsName",e);b=b.de();Do({node:a,hasZ:d,srsName:e},Pp,yo("pointMember"),b,c,void 0,this)};
-k.Fi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName;d=d.curve;f&&a.setAttribute("srsName",f);b=b.wd();Do({node:a,hasZ:e,srsName:f,curve:d},Qp,this.l,b,c,void 0,this)};k.Ii=function(a,b,c){var d=no(a.namespaceURI,"LinearRing");a.appendChild(d);this.Ei(d,b,c)};k.Ji=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.af(d,b,c))};k.Rn=function(a,b,c){var d=no(a.namespaceURI,"Point");a.appendChild(d);this.Hi(d,b,c)};
-k.Di=function(a,b,c){var d=this.a(b,c);d&&(a.appendChild(d),this.$e(d,b,c))};k.Yc=function(a,b,c){var d=c[c.length-1],e=kb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=bc(b,d.featureProjection,d.dataProjection):f=b:f=Jo(b,!0,d);Do(e,Rp,this.a,[f],c,void 0,this)};
-k.Ci=function(a,b,c){var d=b.c;d&&a.setAttribute("fid",d);d=c[c.length-1];var e=d.featureNS,f=b.a;d.tb||(d.tb={},d.tb[e]={});var g=b.L();b=[];var h=[];for(m in g){var l=g[m];null!==l&&(b.push(m),h.push(l),m==f||l instanceof gf?m in d.tb[e]||(d.tb[e][m]=M(this.Yc,this)):m in d.tb[e]||(d.tb[e][m]=M(ip)))}var m=kb({},d);m.node=a;Do(m,d.tb,yo(void 0,e),h,c,b)};
-var Op={"http://www.opengis.net/gml":{surfaceMember:M(Kp.prototype.Ji),polygonMember:M(Kp.prototype.Ji)}},Pp={"http://www.opengis.net/gml":{pointMember:M(Kp.prototype.Rn)}},Qp={"http://www.opengis.net/gml":{lineStringMember:M(Kp.prototype.Di),curveMember:M(Kp.prototype.Di)}},Np={"http://www.opengis.net/gml":{exterior:M(Kp.prototype.Ii),interior:M(Kp.prototype.Ii)}},Rp={"http://www.opengis.net/gml":{Curve:M(Kp.prototype.$e),MultiCurve:M(Kp.prototype.Fi),Point:M(Kp.prototype.Hi),MultiPoint:M(Kp.prototype.Qn),
-LineString:M(Kp.prototype.$e),MultiLineString:M(Kp.prototype.Fi),LinearRing:M(Kp.prototype.Ei),Polygon:M(Kp.prototype.af),MultiPolygon:M(Kp.prototype.Gi),Surface:M(Kp.prototype.af),MultiSurface:M(Kp.prototype.Gi),Envelope:M(Kp.prototype.Pn)}},Sp={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"};Kp.prototype.l=function(a,b){return no("http://www.opengis.net/gml",Sp[b[b.length-1].node.nodeName])};
-Kp.prototype.a=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface,e=c.curve;c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.S(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"LineString"===a&&!0===e?a="Curve":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return no("http://www.opengis.net/gml",a)};
-Kp.prototype.re=function(a,b){b=Io(this,b);var c=no("http://www.opengis.net/gml","geom"),d={node:c,hasZ:this.hasZ,srsName:this.srsName,curve:this.c,surface:this.s,multiSurface:this.j,multiCurve:this.f};b&&kb(d,b);this.Yc(c,a,[d]);return c};
-Kp.prototype.bc=function(a,b){b=Io(this,b);var c=no("http://www.opengis.net/gml","featureMembers");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.schemaLocation);var d={srsName:this.srsName,hasZ:this.hasZ,curve:this.c,surface:this.s,multiSurface:this.j,multiCurve:this.f,featureNS:this.featureNS,featureType:this.featureType};b&&kb(d,b);b=[d];var e=b[b.length-1];d=e.featureType;var f=e.featureNS,g={};g[f]={};g[f][d]=M(this.Ci,this);e=kb({},e);e.node=c;Do(e,g,
-yo(d,f),a,b);return c};function Tp(a){a=a?a:{};Zo.call(this,a);this.b["http://www.opengis.net/gml"].featureMember=uo(Zo.prototype.ge);this.schemaLocation=a.schemaLocation?a.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd"}w(Tp,Zo);k=Tp.prototype;
-k.uj=function(a,b){a=oo(a,!1).replace(/^\s*|\s*$/g,"");var c=b[0].srsName;b="enu";c&&(c=Ob(c))&&(b=c.b);a=a.trim().split(/\s+/);for(var d,e,f=[],g=0,h=a.length;g<h;g++)e=a[g].split(/,+/),c=parseFloat(e[0]),d=parseFloat(e[1]),e=3===e.length?parseFloat(e[2]):0,"en"===b.substr(0,2)?f.push(c,d,e):f.push(d,c,e);return f};k.Up=function(a,b){a=O([null],this.dk,a,b,this);return Na(a[1][0],a[1][1],a[1][3],a[1][4])};k.Dm=function(a,b){(a=O(void 0,this.ue,a,b,this))&&b[b.length-1].push(a)};
-k.Ep=function(a,b){(a=O(void 0,this.ue,a,b,this))&&(b[b.length-1][0]=a)};k.te={"http://www.opengis.net/gml":{coordinates:vo(Tp.prototype.uj)}};k.Gf={"http://www.opengis.net/gml":{innerBoundaryIs:Tp.prototype.Dm,outerBoundaryIs:Tp.prototype.Ep}};k.dk={"http://www.opengis.net/gml":{coordinates:uo(Tp.prototype.uj)}};
-k.qh={"http://www.opengis.net/gml":{Point:vo(Zo.prototype.Aj),MultiPoint:vo(Zo.prototype.yj),LineString:vo(Zo.prototype.sf),MultiLineString:vo(Zo.prototype.xj),LinearRing:vo(Zo.prototype.wj),Polygon:vo(Zo.prototype.tf),MultiPolygon:vo(Zo.prototype.zj),Box:vo(Tp.prototype.Up)}};
-k.wg=function(a,b){var c=b[b.length-1];b=c.multiSurface;var d=c.surface;c=c.multiCurve;Array.isArray(a)?a="Envelope":(a=a.S(),"MultiPolygon"===a&&!0===b?a="MultiSurface":"Polygon"===a&&!0===d?a="Surface":"MultiLineString"===a&&!0===c&&(a="MultiCurve"));return no("http://www.opengis.net/gml",a)};k.ui=function(a,b,c){var d=c[c.length-1],e=kb({},d);e.node=a;var f;Array.isArray(b)?d.dataProjection?f=bc(b,d.featureProjection,d.dataProjection):f=b:f=Jo(b,!0,d);Do(e,Up,this.wg,[f],c,void 0,this)};
-k.Ye=function(a,b,c){var d=c[c.length-1].srsName;"LineStringSegment"!==a.nodeName&&d&&a.setAttribute("srsName",d);"LineString"===a.nodeName||"LineStringSegment"===a.nodeName?(d=Vp(a.namespaceURI),a.appendChild(d),Wp(d,b,c)):"Curve"===a.nodeName&&(d=no(a.namespaceURI,"segments"),a.appendChild(d),a=no(d.namespaceURI,"LineStringSegment"),d.appendChild(a),this.Ye(a,b,c))};function Vp(a){a=no(a,"coordinates");a.setAttribute("decimal",".");a.setAttribute("cs",",");a.setAttribute("ts"," ");return a}
-function Wp(a,b,c){var d=c[c.length-1];c=d.hasZ;d=d.srsName;b=b.W();for(var e=b.length,f=Array(e),g,h=0;h<e;++h)g=b[h],f[h]=Xp(g,d,c);ip(a,f.join(" "))}
-k.Ze=function(a,b,c){var d=c[c.length-1],e=d.hasZ;d=d.srsName;"PolygonPatch"!==a.nodeName&&d&&a.setAttribute("srsName",d);"Polygon"===a.nodeName||"PolygonPatch"===a.nodeName?(b=b.Ud(),Do({node:a,hasZ:e,srsName:d},Yp,this.Kn,b,c,void 0,this)):"Surface"===a.nodeName&&(e=no(a.namespaceURI,"patches"),a.appendChild(e),a=no(e.namespaceURI,"PolygonPatch"),e.appendChild(a),this.Ze(a,b,c))};
-k.Kn=function(a,b){a=b[b.length-1];b=a.node;var c=a.exteriorWritten;void 0===c&&(a.exteriorWritten=!0);return no(b.namespaceURI,void 0!==c?"innerBoundaryIs":"outerBoundaryIs")};k.Ai=function(a,b,c){var d=no(a.namespaceURI,"LinearRing");a.appendChild(d);this.wi(d,b,c)};function Xp(a,b,c){var d="enu";b&&(d=Ob(b).b);b="en"===d.substr(0,2)?a[0]+","+a[1]:a[1]+","+a[0];c&&(b+=","+(a[2]||0));return b}
-k.xi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName;d=d.curve;f&&a.setAttribute("srsName",f);b=b.wd();Do({node:a,hasZ:e,srsName:f,curve:d},Zp,this.a,b,c,void 0,this)};k.zi=function(a,b,c){var d=c[c.length-1];c=d.hasZ;var e=d.srsName;e&&a.setAttribute("srsName",e);d=Vp(a.namespaceURI);a.appendChild(d);a=b.W();a=Xp(a,e,c);ip(d,a)};
-k.Mn=function(a,b,c){var d=c[c.length-1],e=d.hasZ;(d=d.srsName)&&a.setAttribute("srsName",d);b=b.de();Do({node:a,hasZ:e,srsName:d},$p,yo("pointMember"),b,c,void 0,this)};k.Nn=function(a,b,c){var d=no(a.namespaceURI,"Point");a.appendChild(d);this.zi(d,b,c)};k.vi=function(a,b,c){var d=this.wg(b,c);d&&(a.appendChild(d),this.Ye(d,b,c))};k.wi=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);d=Vp(a.namespaceURI);a.appendChild(d);Wp(d,b,c)};
-k.yi=function(a,b,c){var d=c[c.length-1],e=d.hasZ,f=d.srsName;d=d.surface;f&&a.setAttribute("srsName",f);b=b.Vd();Do({node:a,hasZ:e,srsName:f,surface:d},aq,this.a,b,c,void 0,this)};k.Bi=function(a,b,c){var d=this.wg(b,c);d&&(a.appendChild(d),this.Ze(d,b,c))};k.Ln=function(a,b,c){var d=c[c.length-1].srsName;d&&a.setAttribute("srsName",d);Do({node:a},bq,Ao,[b[0]+" "+b[1],b[2]+" "+b[3]],c,["lowerCorner","upperCorner"],this)};
-var Up={"http://www.opengis.net/gml":{Curve:M(Tp.prototype.Ye),MultiCurve:M(Tp.prototype.xi),Point:M(Tp.prototype.zi),MultiPoint:M(Tp.prototype.Mn),LineString:M(Tp.prototype.Ye),MultiLineString:M(Tp.prototype.xi),LinearRing:M(Tp.prototype.wi),Polygon:M(Tp.prototype.Ze),MultiPolygon:M(Tp.prototype.yi),Surface:M(Tp.prototype.Ze),MultiSurface:M(Tp.prototype.yi),Envelope:M(Tp.prototype.Ln)}},Yp={"http://www.opengis.net/gml":{outerBoundaryIs:M(Tp.prototype.Ai),innerBoundaryIs:M(Tp.prototype.Ai)}},$p={"http://www.opengis.net/gml":{pointMember:M(Tp.prototype.Nn)}},
-Zp={"http://www.opengis.net/gml":{lineStringMember:M(Tp.prototype.vi),curveMember:M(Tp.prototype.vi)}};Tp.prototype.a=function(a,b){return no("http://www.opengis.net/gml",cq[b[b.length-1].node.nodeName])};var cq={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},aq={"http://www.opengis.net/gml":{surfaceMember:M(Tp.prototype.Bi),polygonMember:M(Tp.prototype.Bi)}},bq={"http://www.opengis.net/gml":{lowerCorner:M(ip),upperCorner:M(ip)}};function dq(a){a=a?a:{};Wo.call(this);this.defaultDataProjection=Ob("EPSG:4326");this.b=a.readExtensions}w(dq,Wo);var eq=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"];function fq(a,b,c,d){a.push(parseFloat(c.getAttribute("lon")),parseFloat(c.getAttribute("lat")));"ele"in d?(a.push(d.ele),delete d.ele,b.hasZ=!0):a.push(0);"time"in d?(a.push(d.time),delete d.time,b.hasM=!0):a.push(0);return a}
-function gq(a,b,c){var d="XY",e=2;a.hasZ&&a.hasM?(d="XYZM",e=4):a.hasZ?(d="XYZ",e=3):a.hasM&&(d="XYM",e=3);if(4!==e){var f;var g=0;for(f=b.length/4;g<f;g++)b[g*e]=b[4*g],b[g*e+1]=b[4*g+1],a.hasZ&&(b[g*e+2]=b[4*g+2]),a.hasM&&(b[g*e+2]=b[4*g+3]);b.length=b.length/4*e;if(c)for(g=0,f=c.length;g<f;g++)c[g]=c[g]/4*e}return d}function hq(a,b){var c=b[b.length-1],d=a.getAttribute("href");null!==d&&(c.link=d);Co(iq,a,b)}function jq(a,b){b[b.length-1].extensionsNode_=a}
-function kq(a,b){var c=b[0];if(a=O({flatCoordinates:[],layoutOptions:{}},lq,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.layoutOptions;delete a.layoutOptions;d=gq(d,b);var e=new I(null);e.ba(d,b);Jo(e,!1,c);c=new Hk(e);c.H(a);return c}}
-function mq(a,b){var c=b[0];if(a=O({flatCoordinates:[],ends:[],layoutOptions:{}},nq,a,b)){b=a.flatCoordinates;delete a.flatCoordinates;var d=a.ends;delete a.ends;var e=a.layoutOptions;delete a.layoutOptions;e=gq(e,b,d);var f=new P(null);f.ba(e,b,d);Jo(f,!1,c);c=new Hk(f);c.H(a);return c}}function oq(a,b){var c=b[0];if(b=O({},pq,a,b)){var d={};a=fq([],d,a,b);d=gq(d,a);a=new C(a,d);Jo(a,!1,c);c=new Hk(a);c.H(b);return c}}
-var qq={rte:kq,trk:mq,wpt:oq},rq=N(eq,{rte:uo(kq),trk:uo(mq),wpt:uo(oq)}),iq=N(eq,{text:L(R,"linkText"),type:L(R,"linkType")}),lq=N(eq,{name:L(R),cmt:L(R),desc:L(R),src:L(R),link:hq,number:L(fp),extensions:jq,type:L(R),rtept:function(a,b){var c=O({},sq,a,b);c&&(b=b[b.length-1],fq(b.flatCoordinates,b.layoutOptions,a,c))}}),sq=N(eq,{ele:L(dp),time:L(cp)}),nq=N(eq,{name:L(R),cmt:L(R),desc:L(R),src:L(R),link:hq,number:L(fp),type:L(R),extensions:jq,trkseg:function(a,b){var c=b[b.length-1];Co(tq,a,b);c.ends.push(c.flatCoordinates.length)}}),
-tq=N(eq,{trkpt:function(a,b){var c=O({},uq,a,b);c&&(b=b[b.length-1],fq(b.flatCoordinates,b.layoutOptions,a,c))}}),uq=N(eq,{ele:L(dp),time:L(cp)}),pq=N(eq,{ele:L(dp),time:L(cp),magvar:L(dp),geoidheight:L(dp),name:L(R),cmt:L(R),desc:L(R),src:L(R),link:hq,sym:L(R),type:L(R),fix:L(R),sat:L(fp),hdop:L(dp),vdop:L(dp),pdop:L(dp),ageofdgpsdata:L(dp),dgpsid:L(fp),extensions:jq});
-function vq(a,b){b||(b=[]);for(var c=0,d=b.length;c<d;++c){var e=b[c];if(a.b){var f=e.get("extensionsNode_")||null;a.b(e,f)}e.set("extensionsNode_",void 0)}}dq.prototype.Lg=function(a,b){if(!ec(eq,a.namespaceURI))return null;var c=qq[a.localName];if(!c)return null;a=c(a,[Ho(this,a,b)]);if(!a)return null;vq(this,[a]);return a};dq.prototype.Kc=function(a,b){return ec(eq,a.namespaceURI)?"gpx"==a.localName&&(a=O([],rq,a,[Ho(this,a,b)]))?(vq(this,a),a):[]:[]};
-function wq(a,b,c){a.setAttribute("href",b);b=c[c.length-1].properties;Do({node:a},xq,Ao,[b.linkText,b.linkType],c,yq)}function zq(a,b,c){var d=c[c.length-1],e=d.node.namespaceURI,f=d.properties;a.setAttributeNS(null,"lat",b[1]);a.setAttributeNS(null,"lon",b[0]);switch(d.geometryLayout){case "XYZM":0!==b[3]&&(f.time=b[3]);case "XYZ":0!==b[2]&&(f.ele=b[2]);break;case "XYM":0!==b[2]&&(f.time=b[2])}b="rtept"==a.nodeName?Aq[e]:Bq[e];d=Bo(f,b);Do({node:a,properties:f},Cq,Ao,d,c,b)}
-var yq=["text","type"],xq=N(eq,{text:M(ip),type:M(ip)}),Dq=N(eq,"name cmt desc src link number type rtept".split(" ")),Eq=N(eq,{name:M(ip),cmt:M(ip),desc:M(ip),src:M(ip),link:M(wq),number:M(Jp),type:M(ip),rtept:xo(M(zq))}),Aq=N(eq,["ele","time"]),Fq=N(eq,"name cmt desc src link number type trkseg".split(" ")),Iq=N(eq,{name:M(ip),cmt:M(ip),desc:M(ip),src:M(ip),link:M(wq),number:M(Jp),type:M(ip),trkseg:xo(M(function(a,b,c){Do({node:a,geometryLayout:b.ja,properties:{}},Gq,Hq,b.W(),c)}))}),Hq=yo("trkpt"),
-Gq=N(eq,{trkpt:M(zq)}),Bq=N(eq,"ele time magvar geoidheight name cmt desc src link sym type fix sat hdop vdop pdop ageofdgpsdata dgpsid".split(" ")),Cq=N(eq,{ele:M(Ip),time:M(function(a,b){b=new Date(1E3*b);a.appendChild(mo.createTextNode(b.getUTCFullYear()+"-"+xe(b.getUTCMonth()+1)+"-"+xe(b.getUTCDate())+"T"+xe(b.getUTCHours())+":"+xe(b.getUTCMinutes())+":"+xe(b.getUTCSeconds())+"Z"))}),magvar:M(Ip),geoidheight:M(Ip),name:M(ip),cmt:M(ip),desc:M(ip),src:M(ip),link:M(wq),sym:M(ip),type:M(ip),fix:M(ip),
-sat:M(Jp),hdop:M(Ip),vdop:M(Ip),pdop:M(Ip),ageofdgpsdata:M(Ip),dgpsid:M(Jp)}),Jq={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Kq(a,b){if(a=a.U())if(a=Jq[a.S()])return no(b[b.length-1].node.namespaceURI,a)}
-var Lq=N(eq,{rte:M(function(a,b,c){var d=c[0],e=b.L();a={node:a,properties:e};if(b=b.U())b=Jo(b,!0,d),a.geometryLayout=b.ja,e.rtept=b.W();d=Dq[c[c.length-1].node.namespaceURI];e=Bo(e,d);Do(a,Eq,Ao,e,c,d)}),trk:M(function(a,b,c){var d=c[0],e=b.L();a={node:a,properties:e};if(b=b.U())b=Jo(b,!0,d),e.trkseg=b.wd();d=Fq[c[c.length-1].node.namespaceURI];e=Bo(e,d);Do(a,Iq,Ao,e,c,d)}),wpt:M(function(a,b,c){var d=c[0],e=c[c.length-1];e.properties=b.L();if(b=b.U())b=Jo(b,!0,d),e.geometryLayout=b.ja,zq(a,b.W(),
-c)})});dq.prototype.bc=function(a,b){b=Io(this,b);var c=no("http://www.topografix.com/GPX/1/1","gpx");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd");c.setAttribute("version","1.1");c.setAttribute("creator","OpenLayers");Do({node:c},Lq,Kq,a,[b]);return c};function Mq(a){gf.call(this);this.a=a?a:null;Nq(this)}w(Mq,gf);function Oq(a){var b=[],c;var d=0;for(c=a.length;d<c;++d)b.push(a[d].clone());return b}function Pq(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)Mc(a.a[c],"change",a.u,a)}}function Nq(a){var b;if(a.a){var c=0;for(b=a.a.length;c<b;++c)y(a.a[c],"change",a.u,a)}}k=Mq.prototype;k.clone=function(){var a=new Mq(null);a.Kj(this.a);return a};
-k.Nb=function(a,b,c,d){if(d<Ha(this.G(),a,b))return d;var e=this.a,f;var g=0;for(f=e.length;g<f;++g)d=e[g].Nb(a,b,c,d);return d};k.Zc=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)if(c[e].Zc(a,b))return!0;return!1};k.Ae=function(a){Oa(a);for(var b=this.a,c=0,d=b.length;c<d;++c)Ta(a,b[c].G());return a};k.vd=function(){return Oq(this.a)};
-k.Wd=function(a){this.l!=this.g&&(lb(this.i),this.f=0,this.l=this.g);if(0>a||0!==this.f&&a<this.f)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=[],d=this.a,e=!1,f;var g=0;for(f=d.length;g<f;++g){var h=d[g],l=h.Wd(a);c.push(l);l!==h&&(e=!0)}if(e)return a=new Mq(null),Pq(a),a.a=c,Nq(a),a.u(),this.i[b]=a;this.f=a;return this};k.S=function(){return"GeometryCollection"};k.$a=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)if(b[d].$a(a))return!0;return!1};
-k.rotate=function(a,b){for(var c=this.a,d=0,e=c.length;d<e;++d)c[d].rotate(a,b);this.u()};k.scale=function(a,b,c){c||(c=eb(this.G()));for(var d=this.a,e=0,f=d.length;e<f;++e)d[e].scale(a,b,c);this.u()};k.Kj=function(a){a=Oq(a);Pq(this);this.a=a;Nq(this);this.u()};k.Rc=function(a){var b=this.a,c;var d=0;for(c=b.length;d<c;++d)b[d].Rc(a);this.u()};k.translate=function(a,b){var c=this.a,d;var e=0;for(d=c.length;e<d;++e)c[e].translate(a,b);this.u()};k.ia=function(){Pq(this);gf.prototype.ia.call(this)};function Qq(a){a=a?a:{};Go.call(this);this.defaultDataProjection=Ob(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326");a.featureProjection&&(this.i=Ob(a.featureProjection));this.b=a.geometryName;this.a=a.extractGeometryName}w(Qq,Ko);function Rq(a,b){return a?Jo((0,Sq[a.type])(a),!1,b):null}function Tq(a,b){return(0,Uq[a.S()])(Jo(a,!0,b),b)}
-var Sq={Point:function(a){return new C(a.coordinates)},LineString:function(a){return new I(a.coordinates)},Polygon:function(a){return new D(a.coordinates)},MultiPoint:function(a){return new No(a.coordinates)},MultiLineString:function(a){return new P(a.coordinates)},MultiPolygon:function(a){return new Q(a.coordinates)},GeometryCollection:function(a,b){a=a.geometries.map(function(a){return Rq(a,b)});return new Mq(a)}},Uq={Point:function(a){return{type:"Point",coordinates:a.W()}},LineString:function(a){return{type:"LineString",
-coordinates:a.W()}},Polygon:function(a,b){if(b)var c=b.rightHanded;return{type:"Polygon",coordinates:a.W(c)}},MultiPoint:function(a){return{type:"MultiPoint",coordinates:a.W()}},MultiLineString:function(a){return{type:"MultiLineString",coordinates:a.W()}},MultiPolygon:function(a,b){if(b)var c=b.rightHanded;return{type:"MultiPolygon",coordinates:a.W(c)}},GeometryCollection:function(a,b){return{type:"GeometryCollection",geometries:a.a.map(function(a){var c=kb({},b);delete c.featureProjection;return Tq(a,
-c)})}},Circle:function(){return{type:"GeometryCollection",geometries:[]}}};k=Qq.prototype;k.dd=function(a,b){a="Feature"===a.type?a:{type:"Feature",geometry:a};b=Rq(a.geometry,b);var c=new Hk;this.b?c.Lc(this.b):this.a&&void 0!==a.geometry_name&&c.Lc(a.geometry_name);c.Va(b);void 0!==a.id&&c.qc(a.id);a.properties&&c.H(a.properties);return c};
-k.Mg=function(a,b){if("FeatureCollection"===a.type){var c=[];a=a.features;var d;var e=0;for(d=a.length;e<d;++e)c.push(this.dd(a[e],b))}else c=[this.dd(a,b)];return c};k.Qg=function(a,b){return Rq(a,b)};k.Tg=function(a){a=a.crs;var b;a?"name"==a.type?b=Ob(a.properties.name):oa(!1,36):b=this.defaultDataProjection;return b};
-k.ld=function(a,b){b=Io(this,b);var c={type:"Feature"},d=a.c;void 0!==d&&(c.id=d);(d=a.U())?c.geometry=Tq(d,b):c.geometry=null;b=a.L();delete b[a.a];nb(b)?c.properties=null:c.properties=b;return c};k.qe=function(a,b){b=Io(this,b);var c=[],d;var e=0;for(d=a.length;e<d;++e)c.push(this.ld(a[e],b));return{type:"FeatureCollection",features:c}};k.se=function(a,b){return Tq(a,Io(this,b))};function Vq(){Go.call(this)}w(Vq,Go);function Wq(a){return"string"===typeof a?a:""}k=Vq.prototype;k.S=function(){return"text"};k.Yb=function(a,b){return this.fe(Wq(a),Io(this,b))};k.Qa=function(a,b){return this.Ng(Wq(a),Io(this,b))};k.ed=function(a,b){return this.Gd(Wq(a),Io(this,b))};k.sb=function(){return this.defaultDataProjection};k.Jd=function(a,b){return this.pe(a,Io(this,b))};k.ac=function(a,b){return this.nh(a,Io(this,b))};k.md=function(a,b){return this.Kd(a,Io(this,b))};function Xq(a){a=a?a:{};Go.call(this);this.defaultDataProjection=Ob("EPSG:4326");this.b=a.altitudeMode?a.altitudeMode:"none"}w(Xq,Vq);var Yq=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Zq=/^H.([A-Z]{3}).*?:(.*)/,$q=/^HFDTE(\d{2})(\d{2})(\d{2})/,ar=/\r\n|\r|\n/;k=Xq.prototype;
-k.fe=function(a,b){var c=this.b,d=a.split(ar);a={};var e=[],f=2E3,g=0,h=1,l=-1,m;var n=0;for(m=d.length;n<m;++n){var p=d[n],q;if("B"==p.charAt(0)){if(q=Yq.exec(p)){p=parseInt(q[1],10);var r=parseInt(q[2],10),u=parseInt(q[3],10),v=parseInt(q[4],10)+parseInt(q[5],10)/6E4;"S"==q[6]&&(v=-v);var z=parseInt(q[7],10)+parseInt(q[8],10)/6E4;"W"==q[9]&&(z=-z);e.push(z,v);"none"!=c&&e.push("gps"==c?parseInt(q[11],10):"barometric"==c?parseInt(q[12],10):0);q=Date.UTC(f,g,h,p,r,u);q<l&&(q=Date.UTC(f,g,h+1,p,r,
-u));e.push(q/1E3);l=q}}else"H"==p.charAt(0)&&((q=$q.exec(p))?(h=parseInt(q[1],10),g=parseInt(q[2],10)-1,f=2E3+parseInt(q[3],10)):(q=Zq.exec(p))&&(a[q[1]]=q[2].trim()))}if(0===e.length)return null;d=new I(null);d.ba("none"==c?"XYM":"XYZM",e);b=new Hk(Jo(d,!1,b));b.H(a);return b};k.Ng=function(a,b){return(a=this.fe(a,b))?[a]:[]};k.pe=function(){};k.nh=function(){};k.Kd=function(){};k.Gd=function(){};function br(a,b,c,d,e,f){Sc.call(this);this.j=null;this.M=a?a:new Image;null!==d&&(this.M.crossOrigin=d);this.c=f?document.createElement("CANVAS"):null;this.f=f;this.i=null;this.g=e;this.a=c;this.l=b;this.s=!1;2==this.g&&cr(this)}w(br,Sc);function cr(a){var b=hg(1,1);try{b.drawImage(a.M,0,0),b.getImageData(0,0,1,1)}catch(c){a.s=!0}}br.prototype.v=function(){this.g=3;this.i.forEach(Gc);this.i=null;this.b("change")};
-br.prototype.o=function(){this.g=2;this.a&&(this.M.width=this.a[0],this.M.height=this.a[1]);this.a=[this.M.width,this.M.height];this.i.forEach(Gc);this.i=null;cr(this);if(!this.s&&null!==this.f){this.c.width=this.M.width;this.c.height=this.M.height;var a=this.c.getContext("2d");a.drawImage(this.M,0,0);for(var b=a.getImageData(0,0,this.M.width,this.M.height),c=b.data,d=this.f[0]/255,e=this.f[1]/255,f=this.f[2]/255,g=0,h=c.length;g<h;g+=4)c[g]*=d,c[g+1]*=e,c[g+2]*=f;a.putImageData(b,0,0)}this.b("change")};
-br.prototype.Y=function(){return this.c?this.c:this.M};br.prototype.load=function(){if(0==this.g){this.g=1;this.i=[Lc(this.M,"error",this.v,this),Lc(this.M,"load",this.o,this)];try{this.M.src=this.l}catch(a){this.v()}}};function dr(a){a=a||{};this.l=void 0!==a.anchor?a.anchor:[.5,.5];this.o=null;this.g=void 0!==a.anchorOrigin?a.anchorOrigin:"top-left";this.C=void 0!==a.anchorXUnits?a.anchorXUnits:"fraction";this.B=void 0!==a.anchorYUnits?a.anchorYUnits:"fraction";this.qa=void 0!==a.crossOrigin?a.crossOrigin:null;var b=void 0!==a.img?a.img:null,c=void 0!==a.imgSize?a.imgSize:null,d=a.src;oa(!(void 0!==d&&b),4);oa(!b||b&&c,5);void 0!==d&&0!==d.length||!b||(d=b.src||x(b).toString());oa(void 0!==d&&0<d.length,6);var e=
-void 0!==a.src?0:2;this.j=void 0!==a.color?vi(a.color):null;var f=this.qa,g=this.j,h=ej.get(d,f,g);h||(h=new br(b,d,c,f,e,g),ej.set(d,f,g,h));this.b=h;this.oa=void 0!==a.offset?a.offset:[0,0];this.c=void 0!==a.offsetOrigin?a.offsetOrigin:"top-left";this.N=null;this.D=void 0!==a.size?a.size:null;vk.call(this,{opacity:void 0!==a.opacity?a.opacity:1,rotation:void 0!==a.rotation?a.rotation:0,scale:void 0!==a.scale?a.scale:1,snapToPixel:void 0!==a.snapToPixel?a.snapToPixel:!0,rotateWithView:void 0!==a.rotateWithView?
-a.rotateWithView:!1})}w(dr,vk);k=dr.prototype;k.clone=function(){return new dr({anchor:this.l.slice(),anchorOrigin:this.g,anchorXUnits:this.C,anchorYUnits:this.B,crossOrigin:this.qa,color:this.j&&this.j.slice?this.j.slice():this.j||void 0,src:this.b.l,offset:this.oa.slice(),offsetOrigin:this.c,size:null!==this.D?this.D.slice():void 0,opacity:this.i,scale:this.a,snapToPixel:this.v,rotation:this.f,rotateWithView:this.s})};
-k.Vc=function(){if(this.o)return this.o;var a=this.l,b=this.oc();if("fraction"==this.C||"fraction"==this.B){if(!b)return null;a=this.l.slice();"fraction"==this.C&&(a[0]*=b[0]);"fraction"==this.B&&(a[1]*=b[1])}if("top-left"!=this.g){if(!b)return null;a===this.l&&(a=this.l.slice());if("top-right"==this.g||"bottom-right"==this.g)a[0]=-a[0]+b[0];if("bottom-left"==this.g||"bottom-right"==this.g)a[1]=-a[1]+b[1]}return this.o=a};k.np=function(){return this.j};k.Y=function(a){return this.b.Y(a)};k.He=function(){return this.b.a};
-k.gf=function(){return this.b.g};k.Eg=function(){var a=this.b;if(!a.j)if(a.s){var b=a.a[0],c=a.a[1],d=hg(b,c);d.fillRect(0,0,b,c);a.j=d.canvas}else a.j=a.M;return a.j};k.bd=function(){if(this.N)return this.N;var a=this.oa;if("top-left"!=this.c){var b=this.oc(),c=this.b.a;if(!b||!c)return null;a=a.slice();if("top-right"==this.c||"bottom-right"==this.c)a[0]=c[0]-b[0]-a[0];if("bottom-left"==this.c||"bottom-right"==this.c)a[1]=c[1]-b[1]-a[1]}return this.N=a};k.op=function(){return this.b.l};
-k.oc=function(){return this.D?this.D:this.b.a};k.gi=function(a,b){y(this.b,"change",a,b)};k.load=function(){this.b.load()};k.Yj=function(a,b){Mc(this.b,"change",a,b)};function er(a){a=a?a:{};Wo.call(this);fr||(gr=[255,255,255,1],hr=new zk({color:gr}),ir=[20,2],jr=kr="pixels",lr=[64,64],mr="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",nr=.5,or=new dr({anchor:ir,anchorOrigin:"bottom-left",anchorXUnits:kr,anchorYUnits:jr,crossOrigin:"anonymous",rotation:0,scale:nr,size:lr,src:mr}),pr="NO_IMAGE",qr=new Ak({color:gr,width:1}),rr=new Ak({color:[51,51,51,1],width:2}),sr=new J({font:"bold 16px Helvetica",fill:hr,stroke:rr,scale:.8}),tr=new Bk({fill:hr,
-image:or,text:sr,stroke:qr,zIndex:0}),fr=[tr]);this.defaultDataProjection=Ob("EPSG:4326");this.a=a.defaultStyle?a.defaultStyle:fr;this.c=void 0!==a.extractStyles?a.extractStyles:!0;this.j=void 0!==a.writeStyles?a.writeStyles:!0;this.b={};this.f=void 0!==a.showPointNames?a.showPointNames:!0}var fr,gr,hr,ir,kr,jr,lr,mr,nr,or,pr,qr,rr,sr,tr;w(er,Wo);
-var ur=["http://www.google.com/kml/ext/2.2"],vr=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],wr={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"};
-function xr(a,b){var c=[0,0],d="start";if(a.Y()){var e=a.Y().He();null===e&&(e=lr);2==e.length&&(d=a.Y().a,c[0]=d*e[0]/2,c[1]=-d*e[1]/2,d="left")}null!==a.Ka()?(e=a.Ka(),a=e.clone(),a.Jj(e.a||sr.a),a.lj(e.b||sr.b),a.yf(e.Fa()||sr.Fa()),a.Af(e.Ga()||rr)):a=sr.clone();a.Hd(b);a.Nj(c[0]);a.Oj(c[1]);a.Qj(d);return new Bk({text:a})}
-function yr(a,b,c,d,e){return function(){var f=e,g="";f&&this.U()&&(f="Point"===this.U().S());f&&(g=this.get("name"),f=f&&g);if(a)return f?(f=xr(a[0],g),a.concat(f)):a;if(b){var h=zr(b,c,d);return f?(f=xr(h[0],g),h.concat(f)):h}return f?(f=xr(c[0],g),c.concat(f)):c}}function zr(a,b,c){return Array.isArray(a)?a:"string"===typeof a?(!(a in c)&&"#"+a in c&&(a="#"+a),zr(c[a],b,c)):b}
-function Ar(a){a=oo(a,!1);if(a=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(a))return a=a[1],[parseInt(a.substr(6,2),16),parseInt(a.substr(4,2),16),parseInt(a.substr(2,2),16),parseInt(a.substr(0,2),16)/255]}function Br(a){a=oo(a,!1);for(var b=[],c=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i,d;d=c.exec(a);)b.push(parseFloat(d[1]),parseFloat(d[2]),d[3]?parseFloat(d[3]):0),a=a.substr(d[0].length);if(""===a)return b}
-function Cr(a){var b=oo(a,!1).trim();a=a.baseURI;a&&"about:blank"!=a||(a=window.location.href);return a?(new URL(b,a)).href:b}function Dr(a){return dp(a)}function Er(a,b){return O(null,Fr,a,b)}function Gr(a,b){if(b=O({A:[],ak:[]},Hr,a,b)){a=b.A;b=b.ak;var c;var d=0;for(c=Math.min(a.length,b.length);d<c;++d)a[4*d+3]=b[d];b=new I(null);b.ba("XYZM",a);return b}}function Ir(a,b){var c=O({},Jr,a,b);if(a=O(null,Kr,a,b))return b=new I(null),b.ba("XYZ",a),b.H(c),b}
-function Lr(a,b){var c=O({},Jr,a,b);if(a=O(null,Kr,a,b))return b=new D(null),b.ba("XYZ",a,[a.length]),b.H(c),b}
-function Mr(a,b){a=O([],Nr,a,b);if(!a)return null;if(0===a.length)return new Mq(a);var c=!0,d=a[0].S(),e;var f=1;for(e=a.length;f<e;++f)if(b=a[f],b.S()!=d){c=!1;break}if(c)if("Point"==d){var g=a[0];c=g.ja;d=g.da();f=1;for(e=a.length;f<e;++f)b=a[f],gc(d,b.da());g=new No(null);g.ba(c,d);Or(g,a)}else"LineString"==d?(g=new P(null),Mo(g,a),Or(g,a)):"Polygon"==d?(g=new Q(null),Oo(g,a),Or(g,a)):"GeometryCollection"==d?g=new Mq(a):oa(!1,37);else g=new Mq(a);return g}
-function Pr(a,b){var c=O({},Jr,a,b);if(a=O(null,Kr,a,b))return b=new C(null),b.ba("XYZ",a),b.H(c),b}function Qr(a,b){var c=O({},Jr,a,b);if((a=O([null],Rr,a,b))&&a[0]){b=new D(null);var d=a[0],e=[d.length],f;var g=1;for(f=a.length;g<f;++g)gc(d,a[g]),e.push(d.length);b.ba("XYZ",d,e);b.H(c);return b}}
-function Sr(a,b){b=O({},Tr,a,b);if(!b)return null;a="fillStyle"in b?b.fillStyle:hr;var c=b.fill;void 0===c||c||(a=null);c="imageStyle"in b?b.imageStyle:or;c==pr&&(c=void 0);var d="textStyle"in b?b.textStyle:sr,e="strokeStyle"in b?b.strokeStyle:qr;b=b.outline;void 0===b||b||(e=null);return[new Bk({fill:a,image:c,stroke:e,text:d,zIndex:void 0})]}
-function Or(a,b){var c=b.length,d=Array(b.length),e=Array(b.length),f=Array(b.length),g,h,l;var m=h=l=!1;for(g=0;g<c;++g){var n=b[g];d[g]=n.get("extrude");e[g]=n.get("tessellate");f[g]=n.get("altitudeMode");m=m||void 0!==d[g];h=h||void 0!==e[g];l=l||f[g]}m&&a.set("extrude",d);h&&a.set("tessellate",e);l&&a.set("altitudeMode",f)}function Ur(a,b){Co(Vr,a,b)}function Wr(a,b){Co(Xr,a,b)}
-var Yr=N(vr,{displayName:L(R),value:L(R)}),Vr=N(vr,{Data:function(a,b){var c=a.getAttribute("name");Co(Yr,a,b);a=b[b.length-1];null!==c?a[c]=a.value:null!==a.displayName&&(a[a.displayName]=a.value);delete a.value},SchemaData:function(a,b){Co(Zr,a,b)}}),Xr=N(vr,{LatLonAltBox:function(a,b){if(a=O({},$r,a,b))b=b[b.length-1],b.extent=[parseFloat(a.west),parseFloat(a.south),parseFloat(a.east),parseFloat(a.north)],b.altitudeMode=a.altitudeMode,b.minAltitude=parseFloat(a.minAltitude),b.maxAltitude=parseFloat(a.maxAltitude)},
-Lod:function(a,b){if(a=O({},as,a,b))b=b[b.length-1],b.minLodPixels=parseFloat(a.minLodPixels),b.maxLodPixels=parseFloat(a.maxLodPixels),b.minFadeExtent=parseFloat(a.minFadeExtent),b.maxFadeExtent=parseFloat(a.maxFadeExtent)}}),$r=N(vr,{altitudeMode:L(R),minAltitude:L(dp),maxAltitude:L(dp),north:L(dp),south:L(dp),east:L(dp),west:L(dp)}),as=N(vr,{minLodPixels:L(dp),maxLodPixels:L(dp),minFadeExtent:L(dp),maxFadeExtent:L(dp)}),Jr=N(vr,{extrude:L(ap),tessellate:L(ap),altitudeMode:L(R)}),Fr=N(vr,{coordinates:vo(Br)}),
-Rr=N(vr,{innerBoundaryIs:function(a,b){(a=O(void 0,bs,a,b))&&b[b.length-1].push(a)},outerBoundaryIs:function(a,b){(a=O(void 0,cs,a,b))&&(b[b.length-1][0]=a)}}),Hr=N(vr,{when:function(a,b){b=b[b.length-1].ak;a=oo(a,!1);a=Date.parse(a);b.push(isNaN(a)?0:a)}},N(ur,{coord:function(a,b){b=b[b.length-1].A;a=oo(a,!1);(a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(a))?b.push(parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3]),
-0):b.push(0,0,0,0)}})),Kr=N(vr,{coordinates:vo(Br)}),ds=N(vr,{href:L(Cr)},N(ur,{x:L(dp),y:L(dp),w:L(dp),h:L(dp)})),es=N(vr,{Icon:L(function(a,b){return(a=O({},ds,a,b))?a:null}),heading:L(dp),hotSpot:L(function(a){var b=a.getAttribute("xunits"),c=a.getAttribute("yunits");var d="insetPixels"!==b?"insetPixels"!==c?"bottom-left":"top-left":"insetPixels"!==c?"bottom-right":"top-right";return{x:parseFloat(a.getAttribute("x")),oh:wr[b],y:parseFloat(a.getAttribute("y")),ph:wr[c],origin:d}}),scale:L(Dr)}),
-bs=N(vr,{LinearRing:vo(Er)}),fs=N(vr,{color:L(Ar),scale:L(Dr)}),gs=N(vr,{color:L(Ar),width:L(dp)}),Nr=N(vr,{LineString:uo(Ir),LinearRing:uo(Lr),MultiGeometry:uo(Mr),Point:uo(Pr),Polygon:uo(Qr)}),hs=N(ur,{Track:uo(Gr)}),js=N(vr,{ExtendedData:Ur,Region:Wr,Link:function(a,b){Co(is,a,b)},address:L(R),description:L(R),name:L(R),open:L(ap),phoneNumber:L(R),visibility:L(ap)}),is=N(vr,{href:L(Cr)}),cs=N(vr,{LinearRing:vo(Er)}),ks=N(vr,{Style:L(Sr),key:L(R),styleUrl:L(Cr)}),ms=N(vr,{ExtendedData:Ur,Region:Wr,
-MultiGeometry:L(Mr,"geometry"),LineString:L(Ir,"geometry"),LinearRing:L(Lr,"geometry"),Point:L(Pr,"geometry"),Polygon:L(Qr,"geometry"),Style:L(Sr),StyleMap:function(a,b){if(a=O(void 0,ls,a,b))b=b[b.length-1],Array.isArray(a)?b.Style=a:"string"===typeof a?b.styleUrl=a:oa(!1,38)},address:L(R),description:L(R),name:L(R),open:L(ap),phoneNumber:L(R),styleUrl:L(Cr),visibility:L(ap)},N(ur,{MultiTrack:L(function(a,b){if(a=O([],hs,a,b))return b=new P(null),Mo(b,a),b},"geometry"),Track:L(Gr,"geometry")})),
-ns=N(vr,{color:L(Ar),fill:L(ap),outline:L(ap)}),Zr=N(vr,{SimpleData:function(a,b){var c=a.getAttribute("name");null!==c&&(a=R(a),b[b.length-1][c]=a)}}),Tr=N(vr,{IconStyle:function(a,b){if(a=O({},es,a,b)){b=b[b.length-1];var c="Icon"in a?a.Icon:{},d=!("Icon"in a)||0<Object.keys(c).length,e,f=c.href;f?e=f:d&&(e=mr);f="bottom-left";var g=a.hotSpot;if(g){var h=[g.x,g.y];var l=g.oh;var m=g.ph;f=g.origin}else e===mr?(h=ir,l=kr,m=jr):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(e)&&(h=[.5,0],m=l="fraction");
-var n;g=c.x;var p=c.y;void 0!==g&&void 0!==p&&(n=[g,p]);var q;g=c.w;c=c.h;void 0!==g&&void 0!==c&&(q=[g,c]);var r;c=a.heading;void 0!==c&&(r=va(c));a=a.scale;d?(e==mr&&(q=lr,void 0===a&&(a=nr)),e=new dr({anchor:h,anchorOrigin:f,anchorXUnits:l,anchorYUnits:m,crossOrigin:"anonymous",offset:n,offsetOrigin:"bottom-left",rotation:r,scale:a,size:q,src:e}),b.imageStyle=e):b.imageStyle=pr}},LabelStyle:function(a,b){(a=O({},fs,a,b))&&(b[b.length-1].textStyle=new J({fill:new zk({color:"color"in a?a.color:gr}),
-scale:a.scale}))},LineStyle:function(a,b){(a=O({},gs,a,b))&&(b[b.length-1].strokeStyle=new Ak({color:"color"in a?a.color:gr,width:"width"in a?a.width:1}))},PolyStyle:function(a,b){if(a=O({},ns,a,b)){b=b[b.length-1];b.fillStyle=new zk({color:"color"in a?a.color:gr});var c=a.fill;void 0!==c&&(b.fill=c);a=a.outline;void 0!==a&&(b.outline=a)}}}),ls=N(vr,{Pair:function(a,b){if(a=O({},ks,a,b)){var c=a.key;c&&"normal"==c&&((c=a.styleUrl)&&(b[b.length-1]=c),(a=a.Style)&&(b[b.length-1]=a))}}});k=er.prototype;
-k.Jg=function(a,b){var c=N(vr,{Document:to(this.Jg,this),Folder:to(this.Jg,this),Placemark:uo(this.Rg,this),Style:this.kq.bind(this),StyleMap:this.jq.bind(this)});if(a=O([],c,a,b,this))return a};k.Rg=function(a,b){var c=O({geometry:null},ms,a,b);if(c){var d=new Hk;a=a.getAttribute("id");null!==a&&d.qc(a);b=b[0];(a=c.geometry)&&Jo(a,!1,b);d.Va(a);delete c.geometry;this.c&&d.sg(yr(c.Style,c.styleUrl,this.a,this.b,this.f));delete c.Style;d.H(c);return d}};
-k.kq=function(a,b){var c=a.getAttribute("id");null!==c&&(b=Sr(a,b))&&(a=a.baseURI,a&&"about:blank"!=a||(a=window.location.href),c=a?(new URL("#"+c,a)).href:"#"+c,this.b[c]=b)};k.jq=function(a,b){var c=a.getAttribute("id");null!==c&&(b=O(void 0,ls,a,b))&&(a=a.baseURI,a&&"about:blank"!=a||(a=window.location.href),c=a?(new URL("#"+c,a)).href:"#"+c,this.b[c]=b)};k.Lg=function(a,b){return ec(vr,a.namespaceURI)?(a=this.Rg(a,[Ho(this,a,b)]))?a:null:null};
-k.Kc=function(a,b){if(!ec(vr,a.namespaceURI))return[];var c=a.localName;if("Document"==c||"Folder"==c)return(c=this.Jg(a,[Ho(this,a,b)]))?c:[];if("Placemark"==c)return(b=this.Rg(a,[Ho(this,a,b)]))?[b]:[];if("kml"==c){c=[];for(a=a.firstElementChild;a;a=a.nextElementSibling){var d=this.Kc(a,b);d&&gc(c,d)}return c}return[]};k.cq=function(a){if(qo(a))return os(this,a);if(ro(a))return ps(this,a);if("string"===typeof a)return a=so(a),os(this,a)};
-function os(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE){var c=ps(a,b);if(c)return c}}function ps(a,b){var c;for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ec(vr,c.namespaceURI)&&"name"==c.localName)return R(c);for(c=b.firstElementChild;c;c=c.nextElementSibling)if(b=c.localName,ec(vr,c.namespaceURI)&&("Document"==b||"Folder"==b||"Placemark"==b||"kml"==b)&&(b=ps(a,c)))return b}
-k.eq=function(a){var b=[];qo(a)?gc(b,qs(this,a)):ro(a)?gc(b,rs(this,a)):"string"===typeof a&&(a=so(a),gc(b,qs(this,a)));return b};function qs(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&gc(c,rs(a,b));return c}
-function rs(a,b){var c,d=[];for(c=b.firstElementChild;c;c=c.nextElementSibling)if(ec(vr,c.namespaceURI)&&"NetworkLink"==c.localName){var e=O({},js,c,[]);d.push(e)}for(c=b.firstElementChild;c;c=c.nextElementSibling)b=c.localName,!ec(vr,c.namespaceURI)||"Document"!=b&&"Folder"!=b&&"kml"!=b||gc(d,rs(a,c));return d}k.hq=function(a){var b=[];qo(a)?gc(b,ss(this,a)):ro(a)?gc(b,this.vf(a)):"string"===typeof a&&(a=so(a),gc(b,ss(this,a)));return b};
-function ss(a,b){var c=[];for(b=b.firstChild;b;b=b.nextSibling)b.nodeType==Node.ELEMENT_NODE&&gc(c,a.vf(b));return c}k.vf=function(a){var b,c=[];for(b=a.firstElementChild;b;b=b.nextElementSibling)if(ec(vr,b.namespaceURI)&&"Region"==b.localName){var d=O({},Xr,b,[]);c.push(d)}for(b=a.firstElementChild;b;b=b.nextElementSibling)a=b.localName,!ec(vr,b.namespaceURI)||"Document"!=a&&"Folder"!=a&&"kml"!=a||gc(c,this.vf(b));return c};
-function ts(a,b){b=vi(b);b=[255*(4==b.length?b[3]:1),b[2],b[1],b[0]];var c;for(c=0;4>c;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}ip(a,b.join(""))}function us(a,b,c){a={node:a};var d=b.S();if("GeometryCollection"==d){var e=b.vd();var f=vs}else"MultiPoint"==d?(e=b.de(),f=ws):"MultiLineString"==d?(e=b.wd(),f=xs):"MultiPolygon"==d?(e=b.Vd(),f=ys):oa(!1,39);Do(a,zs,f,e,c)}function As(a,b,c){Do({node:a},Bs,Cs,[b],c)}
-function Ds(a,b,c){var d={node:a};b.c&&a.setAttribute("id",b.c);a=b.L();var e={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};e[b.a]=1;var f=Object.keys(a||{}).sort().filter(function(a){return!e[a]});if(0<f.length){var g=Bo(a,f);Do(d,Es,Fs,[{names:f,values:g}],c)}if(f=b.ib())if(f=f.call(b,0))f=Array.isArray(f)?f[0]:f,this.j&&(a.Style=f),(f=f.Ka())&&(a.name=f.Ka());f=Gs[c[c.length-1].node.namespaceURI];a=Bo(a,f);Do(d,Es,Ao,a,c,f);a=c[0];(b=b.U())&&(b=Jo(b,!0,a));Do(d,
-Es,vs,[b],c)}function Hs(a,b,c){var d=b.da();a={node:a};a.layout=b.ja;a.stride=b.pa();b=b.L();b.coordinates=d;d=Is[c[c.length-1].node.namespaceURI];b=Bo(b,d);Do(a,Js,Ao,b,c,d)}function Ks(a,b,c){b=b.Ud();var d=b.shift();a={node:a};Do(a,Ls,Ms,b,c);Do(a,Ls,Ns,[d],c)}function Os(a,b){Ip(a,Math.round(1E6*b)/1E6)}
-var Ps=N(vr,["Document","Placemark"]),Ss=N(vr,{Document:M(function(a,b,c){Do({node:a},Qs,Rs,b,c,void 0,this)}),Placemark:M(Ds)}),Qs=N(vr,{Placemark:M(Ds)}),Ts=N(vr,{Data:M(function(a,b,c){a.setAttribute("name",b.name);a={node:a};b=b.value;"object"==typeof b?(null!==b&&b.displayName&&Do(a,Ts,Ao,[b.displayName],c,["displayName"]),null!==b&&b.value&&Do(a,Ts,Ao,[b.value],c,["value"])):Do(a,Ts,Ao,[b],c,["value"])}),value:M(function(a,b){ip(a,b)}),displayName:M(function(a,b){a.appendChild(mo.createCDATASection(b))})}),
-Us={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},Vs=N(vr,["href"],N(ur,["x","y","w","h"])),Ws=N(vr,{href:M(ip)},N(ur,{x:M(Ip),y:M(Ip),w:M(Ip),h:M(Ip)})),Xs=N(vr,["scale","heading","Icon","hotSpot"]),Zs=N(vr,{Icon:M(function(a,b,c){a={node:a};var d=Vs[c[c.length-1].node.namespaceURI],e=Bo(b,d);Do(a,Ws,Ao,e,c,d);d=Vs[ur[0]];e=Bo(b,d);Do(a,Ws,
-Ys,e,c,d)}),heading:M(Ip),hotSpot:M(function(a,b){a.setAttribute("x",b.x);a.setAttribute("y",b.y);a.setAttribute("xunits",b.oh);a.setAttribute("yunits",b.ph)}),scale:M(Os)}),$s=N(vr,["color","scale"]),at=N(vr,{color:M(ts),scale:M(Os)}),bt=N(vr,["color","width"]),ct=N(vr,{color:M(ts),width:M(Ip)}),Bs=N(vr,{LinearRing:M(Hs)}),zs=N(vr,{LineString:M(Hs),Point:M(Hs),Polygon:M(Ks),GeometryCollection:M(us)}),Gs=N(vr,"name open visibility address phoneNumber description styleUrl Style".split(" ")),Es=N(vr,
-{ExtendedData:M(function(a,b,c){a={node:a};var d=b.names;b=b.values;for(var e=d.length,f=0;f<e;f++)Do(a,Ts,dt,[{name:d[f],value:b[f]}],c)}),MultiGeometry:M(us),LineString:M(Hs),LinearRing:M(Hs),Point:M(Hs),Polygon:M(Ks),Style:M(function(a,b,c){a={node:a};var d={},e=b.Fa(),f=b.Ga(),g=b.Y();b=b.Ka();g instanceof dr&&(d.IconStyle=g);b&&(d.LabelStyle=b);f&&(d.LineStyle=f);e&&(d.PolyStyle=e);b=et[c[c.length-1].node.namespaceURI];d=Bo(d,b);Do(a,ft,Ao,d,c,b)}),address:M(ip),description:M(ip),name:M(ip),
-open:M(hp),phoneNumber:M(ip),styleUrl:M(ip),visibility:M(hp)}),Is=N(vr,["extrude","tessellate","altitudeMode","coordinates"]),Js=N(vr,{extrude:M(hp),tessellate:M(hp),altitudeMode:M(ip),coordinates:M(function(a,b,c){c=c[c.length-1];var d=c.layout;c=c.stride;var e;"XY"==d||"XYM"==d?e=2:"XYZ"==d||"XYZM"==d?e=3:oa(!1,34);var f,g=b.length,h="";if(0<g){h+=b[0];for(d=1;d<e;++d)h+=","+b[d];for(f=c;f<g;f+=c)for(h+=" "+b[f],d=1;d<e;++d)h+=","+b[f+d]}ip(a,h)})}),Ls=N(vr,{outerBoundaryIs:M(As),innerBoundaryIs:M(As)}),
-gt=N(vr,{color:M(ts)}),et=N(vr,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),ft=N(vr,{IconStyle:M(function(a,b,c){a={node:a};var d={},e=b.oc(),f=b.He(),g={href:b.b.l};if(e){g.w=e[0];g.h=e[1];var h=b.Vc(),l=b.bd();l&&f&&0!==l[0]&&l[1]!==e[1]&&(g.x=l[0],g.y=f[1]-(l[1]+e[1]));!h||h[0]===e[0]/2&&h[1]===e[1]/2||(d.hotSpot={x:h[0],oh:"pixels",y:e[1]-h[1],ph:"pixels"})}d.Icon=g;e=b.a;1!==e&&(d.scale=e);b=b.f;0!==b&&(d.heading=b);b=Xs[c[c.length-1].node.namespaceURI];d=Bo(d,b);Do(a,Zs,Ao,d,c,b)}),LabelStyle:M(function(a,
-b,c){a={node:a};var d={},e=b.Fa();e&&(d.color=e.b);(b=b.b)&&1!==b&&(d.scale=b);b=$s[c[c.length-1].node.namespaceURI];d=Bo(d,b);Do(a,at,Ao,d,c,b)}),LineStyle:M(function(a,b,c){a={node:a};var d=bt[c[c.length-1].node.namespaceURI];b=Bo({color:b.a,width:b.c},d);Do(a,ct,Ao,b,c,d)}),PolyStyle:M(function(a,b,c){Do({node:a},gt,ht,[b.b],c)})});function Ys(a,b,c){return no(ur[0],"gx:"+c)}function Rs(a,b){return no(b[b.length-1].node.namespaceURI,"Placemark")}
-function vs(a,b){if(a)return no(b[b.length-1].node.namespaceURI,Us[a.S()])}var ht=yo("color"),dt=yo("Data"),Fs=yo("ExtendedData"),Ms=yo("innerBoundaryIs"),ws=yo("Point"),xs=yo("LineString"),Cs=yo("LinearRing"),ys=yo("Polygon"),Ns=yo("outerBoundaryIs");
-er.prototype.bc=function(a,b){b=Io(this,b);var c=no(vr[4],"kml");c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:gx",ur[0]);c.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance");c.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var d={node:c},e={};1<a.length?e.Document=a:1==a.length&&(e.Placemark=a[0]);a=Ps[c.namespaceURI];
-e=Bo(e,a);Do(d,Ss,Ao,e,[b],a,this);return c};rj.Ld=function(){};
-(function(a){function b(a){this.tc=ArrayBuffer.isView&&ArrayBuffer.isView(a)?a:new Uint8Array(a||0);this.type=this.ga=0;this.length=this.tc.length}function c(a,b,c){var e=c.tc;var f=e[c.ga++];var g=(f&112)>>4;if(128>f)return d(a,g,b);f=e[c.ga++];g|=(f&127)<<3;if(128>f)return d(a,g,b);f=e[c.ga++];g|=(f&127)<<10;if(128>f)return d(a,g,b);f=e[c.ga++];g|=(f&127)<<17;if(128>f)return d(a,g,b);f=e[c.ga++];g|=(f&127)<<24;if(128>f)return d(a,g,b);f=e[c.ga++];if(128>f)return d(a,g|(f&1)<<31,b);throw Error("Expected varint not more than 10 bytes");
-}function d(a,b,c){return c?4294967296*b+(a>>>0):4294967296*(b>>>0)+(a>>>0)}var e={read:function(a,b,c,d,e){var f=8*e-d-1;var g=(1<<f)-1,h=g>>1,l=-7;e=c?e-1:0;var m=c?-1:1,v=a[b+e];e+=m;c=v&(1<<-l)-1;v>>=-l;for(l+=f;0<l;c=256*c+a[b+e],e+=m,l-=8);f=c&(1<<-l)-1;c>>=-l;for(l+=d;0<l;f=256*f+a[b+e],e+=m,l-=8);if(0===c)c=1-h;else{if(c===g)return f?NaN:Infinity*(v?-1:1);f+=Math.pow(2,d);c-=h}return(v?-1:1)*f*Math.pow(2,c-d)},write:function(a,b,c,d,e,n){var f,g=8*n-e-1,h=(1<<g)-1,l=h>>1,m=23===e?Math.pow(2,
--24)-Math.pow(2,-77):0;n=d?0:n-1;var z=d?1:-1,A=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,d=h):(d=Math.floor(Math.log(b)/Math.LN2),1>b*(f=Math.pow(2,-d))&&(d--,f*=2),b=1<=d+l?b+m/f:b+m*Math.pow(2,1-l),2<=b*f&&(d++,f/=2),d+l>=h?(b=0,d=h):1<=d+l?(b=(b*f-1)*Math.pow(2,e),d+=l):(b=b*Math.pow(2,l-1)*Math.pow(2,e),d=0));for(;8<=e;a[c+n]=b&255,n+=z,b/=256,e-=8);d=d<<e|b;for(g+=e;0<g;a[c+n]=d&255,n+=z,d/=256,g-=8);a[c+n-z]|=128*A}};b.c=0;b.g=1;b.b=2;b.a=5;b.prototype={Og:function(a,
-b,c){for(c=c||this.length;this.ga<c;){var d=this.Ua(),e=d>>3,f=this.ga;this.type=d&7;a(e,b,this);this.ga===f&&this.Lq(d)}return b},Zp:function(){var a=e.read(this.tc,this.ga,!0,23,4);this.ga+=4;return a},Vp:function(){var a=e.read(this.tc,this.ga,!0,52,8);this.ga+=8;return a},Ua:function(a){var b=this.tc;var d=b[this.ga++];var e=d&127;if(128>d)return e;d=b[this.ga++];e|=(d&127)<<7;if(128>d)return e;d=b[this.ga++];e|=(d&127)<<14;if(128>d)return e;d=b[this.ga++];e|=(d&127)<<21;if(128>d)return e;d=b[this.ga];
-return c(e|(d&15)<<28,a,this)},lq:function(){return this.Ua(!0)},Ug:function(){var a=this.Ua();return 1===a%2?(a+1)/-2:a/2},Tp:function(){return!!this.Ua()},Vg:function(){for(var a=this.Ua()+this.ga,b=this.tc,c="",d=this.ga;d<a;){var e=b[d],n=null,p=239<e?4:223<e?3:191<e?2:1;if(d+p>a)break;if(1===p)128>e&&(n=e);else if(2===p){var q=b[d+1];128===(q&192)&&(n=(e&31)<<6|q&63,127>=n&&(n=null))}else if(3===p){q=b[d+1];var r=b[d+2];128===(q&192)&&128===(r&192)&&(n=(e&15)<<12|(q&63)<<6|r&63,2047>=n||55296<=
-n&&57343>=n)&&(n=null)}else if(4===p){q=b[d+1];r=b[d+2];var u=b[d+3];128===(q&192)&&128===(r&192)&&128===(u&192)&&(n=(e&15)<<18|(q&63)<<12|(r&63)<<6|u&63,65535>=n||1114112<=n)&&(n=null)}null===n?(n=65533,p=1):65535<n&&(n-=65536,c+=String.fromCharCode(n>>>10&1023|55296),n=56320|n&1023);c+=String.fromCharCode(n);d+=p}this.ga=a;return c},Lq:function(a){a&=7;if(a===b.c)for(;127<this.tc[this.ga++];);else if(a===b.b)this.ga=this.Ua()+this.ga;else if(a===b.a)this.ga+=4;else if(a===b.g)this.ga+=8;else throw Error("Unimplemented type: "+
-a);}};a["default"]=b})(rj.Ld=rj.Ld||{});rj.Ld=rj.Ld.default;function it(a,b,c,d,e){this.l=e;this.f=a;this.b=b;this.a=this.c=null;this.g=c;this.j=d;this.s=We()}k=it.prototype;k.get=function(a){return this.j[a]};k.pb=it.prototype.td=function(){return this.g};k.G=function(){this.i||(this.i="Point"===this.f?Pa(this.b):Qa(this.b,0,this.b.length,2));return this.i};k.Td=function(){if(!this.c){var a=eb(this.G());this.c=If(this.b,0,this.g,2,a,0)}return this.c};k.Fe=function(){this.a||(this.a=Kk(this.b,0,this.b.length,2,.5));return this.a};
-k.Ge=function(){if(!this.a){this.a=[];for(var a=this.b,b=0,c=this.g,d=0,e=c.length;d<e;++d){var f=c[d];b=Kk(a,b,f,2,.5);gc(this.a,b);b=f}}return this.a};k.Ao=function(){return this.l};k.Xb=function(){return this.b};k.da=it.prototype.Xb;k.U=function(){return this};k.Bo=function(){return this.j};k.Wd=it.prototype.U;k.pa=function(){return 2};k.ib=ea;k.S=function(){return this.f};k.mb=function(a){var b=a.G();a=a.oe;b=db(a)/db(b);var c=this.s;ef(c,a[0],a[3],b,-b,0,0,0);Te(this.b,0,this.b.length,2,c,this.b)};function jt(a){Go.call(this);a=a?a:{};this.defaultDataProjection=new wb({code:"EPSG:3857",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:it;this.g=a.geometryName;this.f=a.layerName?a.layerName:"layer";this.c=a.layers?a.layers:null;this.a=null}w(jt,Go);function kt(a,b,c){if(3===a){a={keys:[],values:[],features:[]};var d=c.Ua()+c.ga;c.Og(lt,a,d);a.length=a.features.length;a.length&&(b[a.name]=a)}}
-function lt(a,b,c){if(15===a)b.version=c.Ua();else if(1===a)b.name=c.Vg();else if(5===a)b.extent=c.Ua();else if(2===a)b.features.push(c.ga);else if(3===a)b.keys.push(c.Vg());else if(4===a){a=null;for(var d=c.Ua()+c.ga;c.ga<d;)a=c.Ua()>>3,a=1===a?c.Vg():2===a?c.Zp():3===a?c.Vp():4===a?c.lq():5===a?c.Ua():6===a?c.Ug():7===a?c.Tp():null;b.values.push(a)}}
-function mt(a,b,c){if(1==a)b.id=c.Ua();else if(2==a)for(a=c.Ua()+c.ga;c.ga<a;){var d=b.layer.keys[c.Ua()],e=b.layer.values[c.Ua()];b.properties[d]=e}else 3==a?b.type=c.Ua():4==a&&(b.geometry=c.ga)}
-function nt(a,b,c){var d=c.type;if(0===d)return null;var e=c.id,f=c.properties;f[a.f]=c.layer.name;var g=[];var h=[],l=h;b.ga=c.geometry;c=b.Ua()+b.ga;for(var m=1,n=0,p=0,q=0,r=0,u=0;b.ga<c;)n||(n=b.Ua(),m=n&7,n>>=3),n--,1===m||2===m?(p+=b.Ug(),q+=b.Ug(),1===m&&r>u&&(l.push(r),u=r),g.push(p,q),r+=2):7===m?r>u&&(g.push(g[u],g[u+1]),r+=2):oa(!1,59);r>u&&l.push(r);b=h.length;var v;1===d?v=1===b?"Point":"MultiPoint":2===d?v=1===b?"LineString":"MultiLineString":3===d&&(v="Polygon");d=v;if(a.b===it)g=new a.b(d,
-g,h,f,e);else{if("Polygon"==d){d=[];l=b=v=0;for(c=h.length;l<c;++l)m=h[l],Mf(g,v,m,2)||(d.push(h.slice(b,l)),b=l),v=m;1<d.length?(h=d,d=new Q(null)):d=new D(null)}else d="Point"===d?new C(null):"LineString"===d?new I(null):"Polygon"===d?new D(null):"MultiPoint"===d?new No(null):"MultiLineString"===d?new P(null):null;d.ba("XY",g,h);g=new a.b;a.g&&g.Lc(a.g);a=Jo(d,!1,Io(a,void 0));g.Va(a);g.qc(e);g.H(f)}return g}k=jt.prototype;k.cg=function(){return this.a};k.S=function(){return"arraybuffer"};
-k.Qa=function(a){var b=this.c;a=new rj.Ld(a);var c=a.Og(kt,{}),d=[],e;for(e in c)if(!b||-1!=b.indexOf(e)){var f=c[e];for(var g,h=0,l=f.length;h<l;++h){g=a;var m=f;g.ga=m.features[h];var n=g.Ua()+g.ga;m={layer:m,type:0,properties:{}};g.Og(mt,m,n);g=m;d.push(nt(this,a,g))}this.a=f?[0,0,f.extent,f.extent]:null}return d};k.sb=function(){return this.defaultDataProjection};k.Sn=function(a){this.c=a};k.Yb=function(){};k.ed=function(){};k.Jd=function(){};k.md=function(){};k.ac=function(){};function ot(){Wo.call(this);this.defaultDataProjection=Ob("EPSG:4326")}w(ot,Wo);function pt(a,b){b[b.length-1].le[a.getAttribute("k")]=a.getAttribute("v")}
-var qt=[null],rt=N(qt,{nd:function(a,b){b[b.length-1].zd.push(a.getAttribute("ref"))},tag:pt}),tt=N(qt,{node:function(a,b){var c=b[0],d=b[b.length-1],e=a.getAttribute("id"),f=[parseFloat(a.getAttribute("lon")),parseFloat(a.getAttribute("lat"))];d.ki[e]=f;a=O({le:{}},st,a,b);nb(a.le)||(f=new C(f),Jo(f,!1,c),c=new Hk(f),c.qc(e),c.H(a.le),d.features.push(c))},way:function(a,b){var c=a.getAttribute("id");a=O({id:c,zd:[],le:{}},rt,a,b);b[b.length-1].lh.push(a)}}),st=N(qt,{tag:pt});
-ot.prototype.Kc=function(a,b){b=Ho(this,a,b);if("osm"==a.localName){a=O({ki:{},lh:[],features:[]},tt,a,[b]);for(var c=0;c<a.lh.length;c++){for(var d=a.lh[c],e=[],f=0,g=d.zd.length;f<g;f++)gc(e,a.ki[d.zd[f]]);d.zd[0]==d.zd[d.zd.length-1]?(f=new D(null),f.ba("XY",e,[e.length])):(f=new I(null),f.ba("XY",e));Jo(f,!1,b);e=new Hk(f);e.qc(d.id);e.H(d.le);a.features.push(e)}if(a.features)return a.features}return[]};ot.prototype.mh=function(){};ot.prototype.bc=function(){};ot.prototype.re=function(){};function ut(a,b,c,d){var e;void 0!==d?e=d:e=[];for(var f=d=0;f<b;){var g=a[f++];e[d++]=a[f++];e[d++]=g;for(g=2;g<c;++g)e[d++]=a[f++]}e.length=d};function vt(a){a=a?a:{};Go.call(this);this.defaultDataProjection=Ob("EPSG:4326");this.b=a.factor?a.factor:1E5;this.a=a.geometryLayout?a.geometryLayout:"XY"}w(vt,Vq);function wt(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;var f;var g=0;for(f=a.length;g<f;)for(d=0;d<b;++d,++g){var h=a[g],l=h-e[d];e[d]=h;a[g]=l}return xt(a,c?c:1E5)}function yt(a,b,c){var d,e=Array(b);for(d=0;d<b;++d)e[d]=0;a=zt(a,c?c:1E5);var f;c=0;for(f=a.length;c<f;)for(d=0;d<b;++d,++c)e[d]+=a[c],a[c]=e[d];return a}
-function xt(a,b){b=b?b:1E5;var c;var d=0;for(c=a.length;d<c;++d)a[d]=Math.round(a[d]*b);b=0;for(d=a.length;b<d;++b)c=a[b],a[b]=0>c?~(c<<1):c<<1;b="";d=0;for(c=a.length;d<c;++d){for(var e,f=a[d],g="";32<=f;)e=(32|f&31)+63,g+=String.fromCharCode(e),f>>=5;g+=String.fromCharCode(f+63);b+=g}return b}
-function zt(a,b){b=b?b:1E5;var c=[],d=0,e=0,f;var g=0;for(f=a.length;g<f;++g){var h=a.charCodeAt(g)-63;d|=(h&31)<<e;32>h?(c.push(d),e=d=0):e+=5}a=0;for(d=c.length;a<d;++a)e=c[a],c[a]=e&1?~(e>>1):e>>1;a=0;for(d=c.length;a<d;++a)c[a]/=b;return c}k=vt.prototype;k.fe=function(a,b){a=this.Gd(a,b);return new Hk(a)};k.Ng=function(a,b){return[this.fe(a,b)]};k.Gd=function(a,b){var c=jf(this.a);a=yt(a,c,this.b);ut(a,a.length,c,a);c=yf(a,0,a.length,c);return Jo(new I(c,this.a),!1,Io(this,b))};
-k.pe=function(a,b){if(a=a.U())return this.Kd(a,b);oa(!1,40);return""};k.nh=function(a,b){return this.pe(a[0],b)};k.Kd=function(a,b){a=Jo(a,!0,Io(this,b));b=a.da();a=a.pa();ut(b,b.length,a,b);return wt(b,a,this.b)};function At(a){a=a?a:{};Go.call(this);this.a=a.layerName;this.b=a.layers?a.layers:null;this.defaultDataProjection=Ob(a.defaultDataProjection?a.defaultDataProjection:"EPSG:4326")}w(At,Ko);function Bt(a,b){var c=[],d,e;var f=0;for(e=a.length;f<e;++f){var g=a[f];0<f&&c.pop();0<=g?d=b[g]:d=b[~g].slice().reverse();c.push.apply(c,d)}a=0;for(b=c.length;a<b;++a)c[a]=c[a].slice();return c}
-function Ct(a,b,c,d,e,f,g){a=a.geometries;var h=[],l;var m=0;for(l=a.length;m<l;++m)h[m]=Dt(a[m],b,c,d,e,f,g);return h}function Dt(a,b,c,d,e,f,g){var h=a.type,l=Et[h];c="Point"===h||"MultiPoint"===h?l(a,c,d):l(a,b);b=new Hk;b.Va(Jo(c,!1,g));void 0!==a.id&&b.qc(a.id);a=a.properties;e&&(a||(a={}),a[e]=f);a&&b.H(a);return b}
-At.prototype.Mg=function(a,b){if("Topology"==a.type){var c=null,d=null;if(a.transform){var e=a.transform;c=e.scale;d=e.translate}var f=a.arcs;if(e){e=c;var g=d,h;var l=0;for(h=f.length;l<h;++l){var m,n=f[l],p=e,q=g,r=0,u=0;var v=0;for(m=n.length;v<m;++v){var z=n[v];r+=z[0];u+=z[1];z[0]=r;z[1]=u;Ft(z,p,q)}}}e=[];a=a.objects;g=this.a;for(var A in a)this.b&&-1==this.b.indexOf(A)||("GeometryCollection"===a[A].type?(l=a[A],e.push.apply(e,Ct(l,f,c,d,g,A,b))):(l=a[A],e.push(Dt(l,f,c,d,g,A,b))));return e}return[]};
-function Ft(a,b,c){a[0]=a[0]*b[0]+c[0];a[1]=a[1]*b[1]+c[1]}At.prototype.Tg=function(){return this.defaultDataProjection};
-var Et={Point:function(a,b,c){a=a.coordinates;b&&c&&Ft(a,b,c);return new C(a)},LineString:function(a,b){a=Bt(a.arcs,b);return new I(a)},Polygon:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Bt(a.arcs[e],b);return new D(c)},MultiPoint:function(a,b,c){a=a.coordinates;var d;if(b&&c){var e=0;for(d=a.length;e<d;++e)Ft(a[e],b,c)}return new No(a)},MultiLineString:function(a,b){var c=[],d;var e=0;for(d=a.arcs.length;e<d;++e)c[e]=Bt(a.arcs[e],b);return new P(c)},MultiPolygon:function(a,
-b){var c=[],d,e;var f=0;for(e=a.arcs.length;f<e;++f){var g=a.arcs[f];var h=[];var l=0;for(d=g.length;l<d;++l)h[l]=Bt(g[l],b);c[f]=h}return new Q(c)}};k=At.prototype;k.ld=function(){};k.qe=function(){};k.se=function(){};k.Qg=function(){};k.dd=function(){};function Gt(a){this.rc=a};function Ht(a,b){this.rc=a;this.b=Array.prototype.slice.call(arguments,1);oa(2<=this.b.length,57)}w(Ht,Gt);function It(a){var b=["And"].concat(Array.prototype.slice.call(arguments));Ht.apply(this,b)}w(It,Ht);function Jt(a,b,c){this.rc="BBOX";this.geometryName=a;this.extent=b;this.srsName=c}w(Jt,Gt);function Kt(a,b,c,d){this.rc=a;this.geometryName=b||"the_geom";this.geometry=c;this.srsName=d}w(Kt,Gt);function Lt(a,b,c){Kt.call(this,"Contains",a,b,c)}w(Lt,Kt);function Mt(a,b){this.rc=a;this.b=b}w(Mt,Gt);function Nt(a,b,c){Mt.call(this,"During",a);this.a=b;this.g=c}w(Nt,Mt);function Ot(a,b,c,d){Mt.call(this,a,b);this.g=c;this.a=d}w(Ot,Mt);function Pt(a,b,c){Ot.call(this,"PropertyIsEqualTo",a,b,c)}w(Pt,Ot);function Qt(a,b){Ot.call(this,"PropertyIsGreaterThan",a,b)}w(Qt,Ot);function Rt(a,b){Ot.call(this,"PropertyIsGreaterThanOrEqualTo",a,b)}w(Rt,Ot);function St(a,b,c){Kt.call(this,"Intersects",a,b,c)}w(St,Kt);function Tt(a,b,c){Mt.call(this,"PropertyIsBetween",a);this.a=b;this.g=c}w(Tt,Mt);function Ut(a,b,c,d,e,f){Mt.call(this,"PropertyIsLike",a);this.c=b;this.f=void 0!==c?c:"*";this.i=void 0!==d?d:".";this.g=void 0!==e?e:"!";this.a=f}w(Ut,Mt);function Vt(a){Mt.call(this,"PropertyIsNull",a)}w(Vt,Mt);function Wt(a,b){Ot.call(this,"PropertyIsLessThan",a,b)}w(Wt,Ot);function Xt(a,b){Ot.call(this,"PropertyIsLessThanOrEqualTo",a,b)}w(Xt,Ot);function Yt(a){this.rc="Not";this.condition=a}w(Yt,Gt);function Zt(a,b,c){Ot.call(this,"PropertyIsNotEqualTo",a,b,c)}w(Zt,Ot);function $t(a){var b=["Or"].concat(Array.prototype.slice.call(arguments));Ht.apply(this,b)}w($t,Ht);function au(a,b,c){Kt.call(this,"Within",a,b,c)}w(au,Kt);function bu(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply(It,b))}function cu(a,b,c){return new Jt(a,b,c)};function du(a){a=a?a:{};this.c=a.featureType;this.a=a.featureNS;this.b=a.gmlFormat?a.gmlFormat:new Kp;this.l=a.schemaLocation?a.schemaLocation:eu["1.1.0"];Wo.call(this)}w(du,Wo);var eu={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"};
-du.prototype.Kc=function(a,b){var c={featureType:this.c,featureNS:this.a};kb(c,Ho(this,a,b?b:{}));b=[c];this.b.b["http://www.opengis.net/gml"].featureMember=uo(Zo.prototype.ge);(a=O([],this.b.b,a,b,this.b))||(a=[]);return a};du.prototype.j=function(a){if(qo(a))return fu(a);if(ro(a))return O({},gu,a,[]);if("string"===typeof a)return a=so(a),fu(a)};du.prototype.f=function(a){if(qo(a))return hu(this,a);if(ro(a))return iu(this,a);if("string"===typeof a)return a=so(a),hu(this,a)};
-function hu(a,b){for(b=b.firstChild;b;b=b.nextSibling)if(b.nodeType==Node.ELEMENT_NODE)return iu(a,b)}var ju={"http://www.opengis.net/gml":{boundedBy:L(Zo.prototype.rf,"bounds")}};function iu(a,b){var c={},d=gp(b.getAttribute("numberOfFeatures"));c.numberOfFeatures=d;return O(c,ju,b,[],a.b)}
-var ku={"http://www.opengis.net/wfs":{totalInserted:L(fp),totalUpdated:L(fp),totalDeleted:L(fp)}},lu={"http://www.opengis.net/ogc":{FeatureId:uo(function(a){return a.getAttribute("fid")})}},mu={"http://www.opengis.net/wfs":{Feature:function(a,b){Co(lu,a,b)}}},gu={"http://www.opengis.net/wfs":{TransactionSummary:L(function(a,b){return O({},ku,a,b)},"transactionSummary"),InsertResults:L(function(a,b){return O([],mu,a,b)},"insertIds")}};
-function fu(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return O({},gu,a,[])}var nu={"http://www.opengis.net/wfs":{PropertyName:M(ip)}};function ou(a,b){var c=no("http://www.opengis.net/ogc","Filter"),d=no("http://www.opengis.net/ogc","FeatureId");c.appendChild(d);d.setAttribute("fid",b);a.appendChild(c)}function pu(a,b){a=(a?a:"feature")+":";return 0===b.indexOf(a)?b:a+b}
-var qu={"http://www.opengis.net/wfs":{Insert:M(function(a,b,c){var d=c[c.length-1],e=d.gmlVersion;d=no(d.featureNS,d.featureType);a.appendChild(d);if(2===e){a=Tp.prototype;(e=b.c)&&d.setAttribute("fid",e);e=c[c.length-1];var f=e.featureNS,g=b.a;e.tb||(e.tb={},e.tb[f]={});var h=b.L();b=[];var l=[];for(n in h){var m=h[n];null!==m&&(b.push(n),l.push(m),n==g||m instanceof gf?n in e.tb[f]||(e.tb[f][n]=M(a.ui,a)):n in e.tb[f]||(e.tb[f][n]=M(ip)))}var n=kb({},e);n.node=d;Do(n,e.tb,yo(void 0,f),l,c,b)}else Kp.prototype.Ci(d,
-b,c)}),Update:M(function(a,b,c){var d=c[c.length-1];oa(void 0!==b.c,27);var e=d.featurePrefix,f=d.featureNS,g=b.a;a.setAttribute("typeName",pu(e,d.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);e=b.c;if(void 0!==e){f=b.P();for(var h=[],l=0,m=f.length;l<m;l++){var n=b.get(f[l]);if(void 0!==n){var p=f[l];n instanceof gf&&(p=g);h.push({name:p,value:n})}}Do({gmlVersion:d.gmlVersion,node:a,hasZ:d.hasZ,srsName:d.srsName},qu,yo("Property"),h,c);ou(a,e)}}),Delete:M(function(a,
-b,c){c=c[c.length-1];oa(void 0!==b.c,26);var d=c.featurePrefix,e=c.featureNS;a.setAttribute("typeName",pu(d,c.featureType));a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+d,e);b=b.c;void 0!==b&&ou(a,b)}),Property:M(function(a,b,c){var d=no("http://www.opengis.net/wfs","Name"),e=c[c.length-1].gmlVersion;a.appendChild(d);ip(d,b.name);void 0!==b.value&&null!==b.value&&(d=no("http://www.opengis.net/wfs","Value"),a.appendChild(d),b.value instanceof gf?2===e?Tp.prototype.ui(d,b.value,c):Kp.prototype.Yc(d,
-b.value,c):ip(d,b.value))}),Native:M(function(a,b){b.Uq&&a.setAttribute("vendorId",b.Uq);void 0!==b.qq&&a.setAttribute("safeToIgnore",b.qq);void 0!==b.value&&ip(a,b.value)})}};function ru(a,b,c){a={node:a};b=b.b;for(var d=0,e=b.length;d<e;++d){var f=b[d];Do(a,su,yo(f.rc),[f],c)}}function tu(a,b){void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());uu(a,b.b);vu(a,""+b.g)}function wu(a,b,c){a=no("http://www.opengis.net/ogc",a);ip(a,c);b.appendChild(a)}function uu(a,b){wu("PropertyName",a,b)}
-function vu(a,b){wu("Literal",a,b)}function xu(a,b){var c=no("http://www.opengis.net/gml","TimeInstant");a.appendChild(c);a=no("http://www.opengis.net/gml","timePosition");c.appendChild(a);ip(a,b)}
-var su={"http://www.opengis.net/wfs":{Query:M(function(a,b,c){var d=c[c.length-1],e=d.featurePrefix,f=d.featureNS,g=d.propertyNames,h=d.srsName;a.setAttribute("typeName",e?pu(e,b):b);h&&a.setAttribute("srsName",h);f&&a.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:"+e,f);b=kb({},d);b.node=a;Do(b,nu,yo("PropertyName"),g,c);if(d=d.filter)g=no("http://www.opengis.net/ogc","Filter"),a.appendChild(g),Do({node:g},su,yo(d.rc),[d],c)})},"http://www.opengis.net/ogc":{During:M(function(a,b){var c=no("http://www.opengis.net/fes",
-"ValueReference");ip(c,b.b);a.appendChild(c);c=no("http://www.opengis.net/gml","TimePeriod");a.appendChild(c);a=no("http://www.opengis.net/gml","begin");c.appendChild(a);xu(a,b.a);a=no("http://www.opengis.net/gml","end");c.appendChild(a);xu(a,b.g)}),And:M(ru),Or:M(ru),Not:M(function(a,b,c){b=b.condition;Do({node:a},su,yo(b.rc),[b],c)}),BBOX:M(function(a,b,c){c[c.length-1].srsName=b.srsName;uu(a,b.geometryName);Kp.prototype.Yc(a,b.extent,c)}),Contains:M(function(a,b,c){c[c.length-1].srsName=b.srsName;
-uu(a,b.geometryName);Kp.prototype.Yc(a,b.geometry,c)}),Intersects:M(function(a,b,c){c[c.length-1].srsName=b.srsName;uu(a,b.geometryName);Kp.prototype.Yc(a,b.geometry,c)}),Within:M(function(a,b,c){c[c.length-1].srsName=b.srsName;uu(a,b.geometryName);Kp.prototype.Yc(a,b.geometry,c)}),PropertyIsEqualTo:M(tu),PropertyIsNotEqualTo:M(tu),PropertyIsLessThan:M(tu),PropertyIsLessThanOrEqualTo:M(tu),PropertyIsGreaterThan:M(tu),PropertyIsGreaterThanOrEqualTo:M(tu),PropertyIsNull:M(function(a,b){uu(a,b.b)}),
-PropertyIsBetween:M(function(a,b){uu(a,b.b);var c=no("http://www.opengis.net/ogc","LowerBoundary");a.appendChild(c);vu(c,""+b.a);c=no("http://www.opengis.net/ogc","UpperBoundary");a.appendChild(c);vu(c,""+b.g)}),PropertyIsLike:M(function(a,b){a.setAttribute("wildCard",b.f);a.setAttribute("singleChar",b.i);a.setAttribute("escapeChar",b.g);void 0!==b.a&&a.setAttribute("matchCase",b.a.toString());uu(a,b.b);vu(a,""+b.c)})}};
-du.prototype.s=function(a){var b=no("http://www.opengis.net/wfs","GetFeature");b.setAttribute("service","WFS");b.setAttribute("version","1.1.0");if(a){a.handle&&b.setAttribute("handle",a.handle);a.outputFormat&&b.setAttribute("outputFormat",a.outputFormat);void 0!==a.maxFeatures&&b.setAttribute("maxFeatures",a.maxFeatures);a.resultType&&b.setAttribute("resultType",a.resultType);void 0!==a.startIndex&&b.setAttribute("startIndex",a.startIndex);void 0!==a.count&&b.setAttribute("count",a.count);var c=
-a.filter;if(a.bbox){oa(a.geometryName,12);var d=cu(a.geometryName,a.bbox,a.srsName);c?c=bu(c,d):c=d}}b.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",this.l);c={node:b,srsName:a.srsName,featureNS:a.featureNS?a.featureNS:this.a,featurePrefix:a.featurePrefix,geometryName:a.geometryName,filter:c,propertyNames:a.propertyNames?a.propertyNames:[]};oa(Array.isArray(a.featureTypes),11);a=a.featureTypes;c=[c];d=kb({},c[c.length-1]);d.node=b;Do(d,su,yo("Query"),a,c);return b};
-du.prototype.v=function(a,b,c,d){var e=[],f=no("http://www.opengis.net/wfs","Transaction"),g=d.version?d.version:"1.1.0",h="1.0.0"===g?2:3;f.setAttribute("service","WFS");f.setAttribute("version",g);if(d){var l=d.gmlOptions?d.gmlOptions:{};d.handle&&f.setAttribute("handle",d.handle)}f.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance","xsi:schemaLocation",eu[g]);var m=d.featurePrefix?d.featurePrefix:"feature";a&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:m,gmlVersion:h,
-hasZ:d.hasZ,srsName:d.srsName},kb(g,l),Do(g,qu,yo("Insert"),a,e));b&&(g={node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:m,gmlVersion:h,hasZ:d.hasZ,srsName:d.srsName},kb(g,l),Do(g,qu,yo("Update"),b,e));c&&Do({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:m,gmlVersion:h,srsName:d.srsName},qu,yo("Delete"),c,e);d.nativeElements&&Do({node:f,featureNS:d.featureNS,featureType:d.featureType,featurePrefix:m,gmlVersion:h,srsName:d.srsName},qu,yo("Native"),d.nativeElements,
-e);return f};du.prototype.Sg=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.uf(a);return null};du.prototype.uf=function(a){if(a.firstElementChild&&a.firstElementChild.firstElementChild)for(a=a.firstElementChild.firstElementChild,a=a.firstElementChild;a;a=a.nextElementSibling)if(0!==a.childNodes.length&&(1!==a.childNodes.length||3!==a.firstChild.nodeType)){var b=[{}];this.b.rf(a,b);return Ob(b.pop().srsName)}return null};function Ku(a){a=a?a:{};Go.call(this);this.b=void 0!==a.splitCollection?a.splitCollection:!1}w(Ku,Vq);function Lu(a){a=a.W();return 0===a.length?"":a.join(" ")}function Mu(a){a=a.W();for(var b=[],c=0,d=a.length;c<d;++c)b.push(a[c].join(" "));return b.join(",")}function Nu(a){var b=[];a=a.Ud();for(var c=0,d=a.length;c<d;++c)b.push("("+Mu(a[c])+")");return b.join(",")}
-function Ou(a){var b=a.S(),c=(0,Pu[b])(a);b=b.toUpperCase();if(a instanceof hf){a=a.ja;var d="";if("XYZ"===a||"XYZM"===a)d+="Z";if("XYM"===a||"XYZM"===a)d+="M";a=d;0<a.length&&(b+=" "+a)}return 0===c.length?b+" EMPTY":b+"("+c+")"}
-var Pu={Point:Lu,LineString:Mu,Polygon:Nu,MultiPoint:function(a){var b=[];a=a.de();for(var c=0,d=a.length;c<d;++c)b.push("("+Lu(a[c])+")");return b.join(",")},MultiLineString:function(a){var b=[];a=a.wd();for(var c=0,d=a.length;c<d;++c)b.push("("+Mu(a[c])+")");return b.join(",")},MultiPolygon:function(a){var b=[];a=a.Vd();for(var c=0,d=a.length;c<d;++c)b.push("("+Nu(a[c])+")");return b.join(",")},GeometryCollection:function(a){var b=[];a=a.vd();for(var c=0,d=a.length;c<d;++c)b.push(Ou(a[c]));return b.join(",")}};
-k=Ku.prototype;k.fe=function(a,b){return(a=this.Gd(a,b))?(b=new Hk,b.Va(a),b):null};k.Ng=function(a,b){var c=[];a=this.Gd(a,b);this.b&&"GeometryCollection"==a.S()?c=a.a:c=[a];b=[];for(var d=0,e=c.length;d<e;++d)a=new Hk,a.Va(c[d]),b.push(a);return b};k.Gd=function(a,b){a=new Qu(new Ru(a));Su(a);return(a=Tu(a))?Jo(a,!1,b):null};k.pe=function(a,b){return(a=a.U())?this.Kd(a,b):""};
-k.nh=function(a,b){if(1==a.length)return this.pe(a[0],b);for(var c=[],d=0,e=a.length;d<e;++d)c.push(a[d].U());a=new Mq(c);return this.Kd(a,b)};k.Kd=function(a,b){return Ou(Jo(a,!0,b))};function Ru(a){this.a=a;this.b=-1}
-function Uu(a){var b=a.a.charAt(++a.b),c={position:a.b,value:b};if("("==b)c.type=2;else if(","==b)c.type=5;else if(")"==b)c.type=3;else if("0"<=b&&"9">=b||"."==b||"-"==b){c.type=4;b=a.b;var d=!1,e=!1;do{if("."==f)d=!0;else if("e"==f||"E"==f)e=!0;var f=a.a.charAt(++a.b)}while("0"<=f&&"9">=f||"."==f&&(void 0===d||!d)||!e&&("e"==f||"E"==f)||e&&("-"==f||"+"==f));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do f=a.a.charAt(++a.b);while("a"<=f&&"z">=
-f||"A"<=f&&"Z">=f);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Uu(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function Qu(a){this.g=a;this.a="XY"}function Su(a){a.b=Uu(a.g)}function Vu(a,b){(b=a.b.type==b)&&Su(a);return b}
-function Tu(a){var b=a.b;if(Vu(a,1)){b=b.value;var c="XY",d=a.b;1==a.b.type&&(d=d.value,"Z"===d?c="XYZ":"M"===d?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&Su(a));a.a=c;if("GEOMETRYCOLLECTION"==b){a:{if(Vu(a,2)){b=[];do b.push(Tu(a));while(Vu(a,5));if(Vu(a,3)){a=b;break a}}else if(Wu(a)){a=[];break a}throw Error(Xu(a));}return new Mq(a)}d=Yu[b];c=Zu[b];if(!d||!c)throw Error("Invalid geometry type: "+b);b=d.call(a);return new c(b,a.a)}throw Error(Xu(a));}k=Qu.prototype;
-k.Hg=function(){if(Vu(this,2)){var a=$u(this);if(Vu(this,3))return a}else if(Wu(this))return null;throw Error(Xu(this));};k.Gg=function(){if(Vu(this,2)){var a=av(this);if(Vu(this,3))return a}else if(Wu(this))return[];throw Error(Xu(this));};k.Ig=function(){if(Vu(this,2)){var a=bv(this);if(Vu(this,3))return a}else if(Wu(this))return[];throw Error(Xu(this));};
-k.Hp=function(){if(Vu(this,2)){var a;if(2==this.b.type)for(a=[this.Hg()];Vu(this,5);)a.push(this.Hg());else a=av(this);if(Vu(this,3))return a}else if(Wu(this))return[];throw Error(Xu(this));};k.Gp=function(){if(Vu(this,2)){var a=bv(this);if(Vu(this,3))return a}else if(Wu(this))return[];throw Error(Xu(this));};k.Ip=function(){if(Vu(this,2)){for(var a=[this.Ig()];Vu(this,5);)a.push(this.Ig());if(Vu(this,3))return a}else if(Wu(this))return[];throw Error(Xu(this));};
-function $u(a){for(var b=[],c=a.a.length,d=0;d<c;++d){var e=a.b;if(Vu(a,4))b.push(e.value);else break}if(b.length==c)return b;throw Error(Xu(a));}function av(a){for(var b=[$u(a)];Vu(a,5);)b.push($u(a));return b}function bv(a){for(var b=[a.Gg()];Vu(a,5);)b.push(a.Gg());return b}function Wu(a){var b=1==a.b.type&&"EMPTY"==a.b.value;b&&Su(a);return b}function Xu(a){return"Unexpected `"+a.b.value+"` at position "+a.b.position+" in `"+a.g.a+"`"}
-var Zu={POINT:C,LINESTRING:I,POLYGON:D,MULTIPOINT:No,MULTILINESTRING:P,MULTIPOLYGON:Q},Yu={POINT:Qu.prototype.Hg,LINESTRING:Qu.prototype.Gg,POLYGON:Qu.prototype.Ig,MULTIPOINT:Qu.prototype.Hp,MULTILINESTRING:Qu.prototype.Gp,MULTIPOLYGON:Qu.prototype.Ip};function cv(a){return a.getAttributeNS("http://www.w3.org/1999/xlink","href")};function dv(){}dv.prototype.read=function(a){return qo(a)?this.a(a):ro(a)?this.b(a):"string"===typeof a?(a=so(a),this.a(a)):null};function ev(){this.version=void 0}w(ev,dv);ev.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};ev.prototype.b=function(a){this.version=a.getAttribute("version").trim();return(a=O({version:this.version},fv,a,[]))?a:null};function gv(a,b){return O({},hv,a,b)}function iv(a,b){return O({},jv,a,b)}function kv(a,b){if(b=gv(a,b))return a=[gp(a.getAttribute("width")),gp(a.getAttribute("height"))],b.size=a,b}
-function lv(a,b){return O([],mv,a,b)}
-var nv=[null,"http://www.opengis.net/wms"],fv=N(nv,{Service:L(function(a,b){return O({},ov,a,b)}),Capability:L(function(a,b){return O({},pv,a,b)})}),pv=N(nv,{Request:L(function(a,b){return O({},qv,a,b)}),Exception:L(function(a,b){return O([],rv,a,b)}),Layer:L(function(a,b){return O({},sv,a,b)})}),ov=N(nv,{Name:L(R),Title:L(R),Abstract:L(R),KeywordList:L(lv),OnlineResource:L(cv),ContactInformation:L(function(a,b){return O({},tv,a,b)}),Fees:L(R),AccessConstraints:L(R),LayerLimit:L(fp),MaxWidth:L(fp),
-MaxHeight:L(fp)}),tv=N(nv,{ContactPersonPrimary:L(function(a,b){return O({},uv,a,b)}),ContactPosition:L(R),ContactAddress:L(function(a,b){return O({},vv,a,b)}),ContactVoiceTelephone:L(R),ContactFacsimileTelephone:L(R),ContactElectronicMailAddress:L(R)}),uv=N(nv,{ContactPerson:L(R),ContactOrganization:L(R)}),vv=N(nv,{AddressType:L(R),Address:L(R),City:L(R),StateOrProvince:L(R),PostCode:L(R),Country:L(R)}),rv=N(nv,{Format:uo(R)}),sv=N(nv,{Name:L(R),Title:L(R),Abstract:L(R),KeywordList:L(lv),CRS:wo(R),
-EX_GeographicBoundingBox:L(function(a,b){var c=O({},wv,a,b);if(c){a=c.westBoundLongitude;b=c.southBoundLatitude;var d=c.eastBoundLongitude;c=c.northBoundLatitude;if(void 0!==a&&void 0!==b&&void 0!==d&&void 0!==c)return[a,b,d,c]}}),BoundingBox:wo(function(a){var b=[ep(a.getAttribute("minx")),ep(a.getAttribute("miny")),ep(a.getAttribute("maxx")),ep(a.getAttribute("maxy"))],c=[ep(a.getAttribute("resx")),ep(a.getAttribute("resy"))];return{crs:a.getAttribute("CRS"),extent:b,res:c}}),Dimension:wo(function(a){return{name:a.getAttribute("name"),
-units:a.getAttribute("units"),unitSymbol:a.getAttribute("unitSymbol"),"default":a.getAttribute("default"),multipleValues:bp(a.getAttribute("multipleValues")),nearestValue:bp(a.getAttribute("nearestValue")),current:bp(a.getAttribute("current")),values:R(a)}}),Attribution:L(function(a,b){return O({},xv,a,b)}),AuthorityURL:wo(function(a,b){if(b=gv(a,b))return b.name=a.getAttribute("name"),b}),Identifier:wo(R),MetadataURL:wo(function(a,b){if(b=gv(a,b))return b.type=a.getAttribute("type"),b}),DataURL:wo(gv),
-FeatureListURL:wo(gv),Style:wo(function(a,b){return O({},yv,a,b)}),MinScaleDenominator:L(dp),MaxScaleDenominator:L(dp),Layer:wo(function(a,b){var c=b[b.length-1],d=O({},sv,a,b);if(d)return b=bp(a.getAttribute("queryable")),void 0===b&&(b=c.queryable),d.queryable=void 0!==b?b:!1,b=gp(a.getAttribute("cascaded")),void 0===b&&(b=c.cascaded),d.cascaded=b,b=bp(a.getAttribute("opaque")),void 0===b&&(b=c.opaque),d.opaque=void 0!==b?b:!1,b=bp(a.getAttribute("noSubsets")),void 0===b&&(b=c.noSubsets),d.noSubsets=
-void 0!==b?b:!1,(b=ep(a.getAttribute("fixedWidth")))||(b=c.fixedWidth),d.fixedWidth=b,(a=ep(a.getAttribute("fixedHeight")))||(a=c.fixedHeight),d.fixedHeight=a,["Style","CRS","AuthorityURL"].forEach(function(a){a in c&&(d[a]=(d[a]||[]).concat(c[a]))}),"EX_GeographicBoundingBox BoundingBox Dimension Attribution MinScaleDenominator MaxScaleDenominator".split(" ").forEach(function(a){a in d||(d[a]=c[a])}),d})}),xv=N(nv,{Title:L(R),OnlineResource:L(cv),LogoURL:L(kv)}),wv=N(nv,{westBoundLongitude:L(dp),
-eastBoundLongitude:L(dp),southBoundLatitude:L(dp),northBoundLatitude:L(dp)}),qv=N(nv,{GetCapabilities:L(iv),GetMap:L(iv),GetFeatureInfo:L(iv)}),jv=N(nv,{Format:wo(R),DCPType:wo(function(a,b){return O({},zv,a,b)})}),zv=N(nv,{HTTP:L(function(a,b){return O({},Av,a,b)})}),Av=N(nv,{Get:L(gv),Post:L(gv)}),yv=N(nv,{Name:L(R),Title:L(R),Abstract:L(R),LegendURL:wo(kv),StyleSheetURL:L(gv),StyleURL:L(gv)}),hv=N(nv,{Format:L(R),OnlineResource:L(cv)}),mv=N(nv,{Keyword:uo(R)});function Bv(a){a=a?a:{};this.a="http://mapserver.gis.umn.edu/mapserver";this.b=new Tp;this.c=a.layers?a.layers:null;Wo.call(this)}w(Bv,Wo);
-Bv.prototype.Kc=function(a,b){var c={};b&&kb(c,Ho(this,a,b));c=[c];a.setAttribute("namespaceURI",this.a);var d=a.localName;b=[];if(0!==a.childNodes.length){if("msGMLOutput"==d)for(var e=0,f=a.childNodes.length;e<f;e++){var g=a.childNodes[e];if(g.nodeType===Node.ELEMENT_NODE){var h=c[0],l=g.localName.replace("_layer","");if(!this.c||ec(this.c,l)){l+="_feature";h.featureType=l;h.featureNS=this.a;var m={};m[l]=uo(this.b.Kg,this.b);h=N([h.featureNS,null],m);g.setAttribute("namespaceURI",this.a);(g=O([],
-h,g,c,this.b))&&gc(b,g)}}}"FeatureCollection"==d&&(a=O([],this.b.b,a,[{}],this.b))&&(b=a)}return b};Bv.prototype.mh=function(){};Bv.prototype.bc=function(){};Bv.prototype.re=function(){};function Cv(){}w(Cv,dv);Cv.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Cv.prototype.b=function(a){return(a=O({},Dv,a,[]))?a:null};
-var Ev=[null,"http://www.opengis.net/ows/1.1"],Dv=N(Ev,{ServiceIdentification:L(function(a,b){return O({},Fv,a,b)}),ServiceProvider:L(function(a,b){return O({},Gv,a,b)}),OperationsMetadata:L(function(a,b){return O({},Hv,a,b)})}),Iv=N(Ev,{DeliveryPoint:L(R),City:L(R),AdministrativeArea:L(R),PostalCode:L(R),Country:L(R),ElectronicMailAddress:L(R)}),Jv=N(Ev,{Value:wo(function(a){return R(a)})}),Kv=N(Ev,{AllowedValues:L(function(a,b){return O({},Jv,a,b)})}),Mv=N(Ev,{Phone:L(function(a,b){return O({},
-Lv,a,b)}),Address:L(function(a,b){return O({},Iv,a,b)})}),Ov=N(Ev,{HTTP:L(function(a,b){return O({},Nv,a,b)})}),Nv=N(Ev,{Get:wo(function(a,b){var c=cv(a);if(c)return O({href:c},Pv,a,b)}),Post:void 0}),Qv=N(Ev,{DCP:L(function(a,b){return O({},Ov,a,b)})}),Hv=N(Ev,{Operation:function(a,b){var c=a.getAttribute("name");(a=O({},Qv,a,b))&&(b[b.length-1][c]=a)}}),Lv=N(Ev,{Voice:L(R),Facsimile:L(R)}),Pv=N(Ev,{Constraint:wo(function(a,b){var c=a.getAttribute("name");if(c)return O({name:c},Kv,a,b)})}),Rv=N(Ev,
-{IndividualName:L(R),PositionName:L(R),ContactInfo:L(function(a,b){return O({},Mv,a,b)})}),Fv=N(Ev,{Abstract:L(R),AccessConstraints:L(R),Fees:L(R),Title:L(R),ServiceTypeVersion:L(R),ServiceType:L(R)}),Gv=N(Ev,{ProviderName:L(R),ProviderSite:L(cv),ServiceContact:L(function(a,b){return O({},Rv,a,b)})});function Sv(){this.g=new Cv}w(Sv,dv);Sv.prototype.a=function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType==Node.ELEMENT_NODE)return this.b(a);return null};Sv.prototype.b=function(a){var b=a.getAttribute("version").trim(),c=this.g.b(a);if(!c)return null;c.version=b;return(c=O(c,Tv,a,[]))?c:null};function Uv(a){var b=R(a).split(" ");if(b&&2==b.length&&(a=+b[0],b=+b[1],!isNaN(a)&&!isNaN(b)))return[a,b]}
-var Vv=[null,"http://www.opengis.net/wmts/1.0"],Wv=[null,"http://www.opengis.net/ows/1.1"],Tv=N(Vv,{Contents:L(function(a,b){return O({},Xv,a,b)})}),Xv=N(Vv,{Layer:wo(function(a,b){return O({},Yv,a,b)}),TileMatrixSet:wo(function(a,b){return O({},Zv,a,b)})}),Yv=N(Vv,{Style:wo(function(a,b){if(b=O({},$v,a,b))return a="true"===a.getAttribute("isDefault"),b.isDefault=a,b}),Format:wo(R),TileMatrixSetLink:wo(function(a,b){return O({},aw,a,b)}),Dimension:wo(function(a,b){return O({},bw,a,b)}),ResourceURL:wo(function(a){var b=
-a.getAttribute("format"),c=a.getAttribute("template");a=a.getAttribute("resourceType");var d={};b&&(d.format=b);c&&(d.template=c);a&&(d.resourceType=a);return d})},N(Wv,{Title:L(R),Abstract:L(R),WGS84BoundingBox:L(function(a,b){a=O([],cw,a,b);if(2==a.length)return Ca(a)}),Identifier:L(R)})),$v=N(Vv,{LegendURL:wo(function(a){var b={};b.format=a.getAttribute("format");b.href=cv(a);return b})},N(Wv,{Title:L(R),Identifier:L(R)})),aw=N(Vv,{TileMatrixSet:L(R),TileMatrixSetLimits:L(function(a,b){return O([],
-dw,a,b)})}),dw=N(Vv,{TileMatrixLimits:uo(function(a,b){return O({},ew,a,b)})}),ew=N(Vv,{TileMatrix:L(R),MinTileRow:L(fp),MaxTileRow:L(fp),MinTileCol:L(fp),MaxTileCol:L(fp)}),bw=N(Vv,{Default:L(R),Value:wo(R)},N(Wv,{Identifier:L(R)})),cw=N(Wv,{LowerCorner:uo(Uv),UpperCorner:uo(Uv)}),Zv=N(Vv,{WellKnownScaleSet:L(R),TileMatrix:wo(function(a,b){return O({},fw,a,b)})},N(Wv,{SupportedCRS:L(R),Identifier:L(R)})),fw=N(Vv,{TopLeftCorner:L(Uv),ScaleDenominator:L(dp),TileWidth:L(fp),TileHeight:L(fp),MatrixWidth:L(fp),
-MatrixHeight:L(fp)},N(Wv,{Identifier:L(R)}));function gw(a,b,c){hf.call(this);this.hh(a,b?b:0,c)}w(gw,hf);k=gw.prototype;k.clone=function(){var a=new gw(null);kf(a,this.ja,this.A.slice());a.u();return a};k.Nb=function(a,b,c,d){var e=this.A;a-=e[0];var f=b-e[1];b=a*a+f*f;if(b<d){if(0===b)for(d=0;d<this.a;++d)c[d]=e[d];else for(d=this.Bd()/Math.sqrt(b),c[0]=e[0]+d*a,c[1]=e[1]+d*f,d=2;d<this.a;++d)c[d]=e[d];c.length=this.a;return b}return d};k.Zc=function(a,b){var c=this.A;a-=c[0];b-=c[1];return a*a+b*b<=hw(this)};
-k.xa=function(){return this.A.slice(0,this.a)};k.Ae=function(a){var b=this.A,c=b[this.a]-b[0];return Na(b[0]-c,b[1]-c,b[0]+c,b[1]+c,a)};k.Bd=function(){return Math.sqrt(hw(this))};function hw(a){var b=a.A[a.a]-a.A[0];a=a.A[a.a+1]-a.A[1];return b*b+a*a}k.S=function(){return"Circle"};k.$a=function(a){var b=this.G();return hb(a,b)?(b=this.xa(),a[0]<=b[0]&&a[2]>=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:Ua(a,this.Bb,this)):!1};
-k.ub=function(a){var b=this.a,c=a.slice();c[b]=c[0]+(this.A[b]-this.A[0]);var d;for(d=1;d<b;++d)c[b+d]=a[d];kf(this,this.ja,c);this.u()};k.hh=function(a,b,c){if(a){lf(this,c,a,0);this.A||(this.A=[]);c=this.A;a=vf(c,a);c[a++]=c[0]+b;var d;b=1;for(d=this.a;b<d;++b)c[a++]=c[b];c.length=a}else kf(this,"XY",null);this.u()};k.W=function(){};k.na=function(){};k.fd=function(a){this.A[this.a]=this.A[0]+a;this.u()};function iw(a){a=a?a:{};Jg.call(this,{handleEvent:Re});this.j=a.formatConstructors?a.formatConstructors:[];this.s=a.projection?Ob(a.projection):null;this.a=null;this.f=a.source||null;this.target=a.target?a.target:null}w(iw,Jg);function jw(a){a=a.dataTransfer.files;var b;var c=0;for(b=a.length;c<b;++c){var d=a.item(c);var e=new FileReader;e.addEventListener("load",this.l.bind(this,d));e.readAsText(d)}}function kw(a){a.stopPropagation();a.preventDefault();a.dataTransfer.dropEffect="copy"}
-iw.prototype.l=function(a,b){b=b.target.result;var c=this.v,d=this.s;d||(d=c.aa().v);c=this.j;var e=[],f;var g=0;for(f=c.length;g<f;++g){var h=new c[g];var l={featureProjection:d};try{e=h.Qa(b,l)}catch(m){e=null}if(e&&0<e.length)break}this.f&&(this.f.clear(),this.f.Qc(e));this.b(new lw(mw,a,e,d))};function nw(a){var b=a.v;b&&(b=a.target?a.target:b.a,a.a=[y(b,"drop",jw,a),y(b,"dragenter",kw,a),y(b,"dragover",kw,a),y(b,"drop",kw,a)])}
-iw.prototype.Ha=function(a){Jg.prototype.Ha.call(this,a);a?nw(this):ow(this)};iw.prototype.setMap=function(a){ow(this);Jg.prototype.setMap.call(this,a);this.c()&&nw(this)};function ow(a){a.a&&(a.a.forEach(Gc),a.a=null)}var mw="addfeatures";function lw(a,b,c,d){Qc.call(this,a);this.features=c;this.file=b;this.projection=d}w(lw,Qc);function pw(a){a=a?a:{};fh.call(this,{handleDownEvent:qw,handleDragEvent:rw,handleUpEvent:sw});this.s=a.condition?a.condition:bh;this.a=this.f=void 0;this.j=0;this.o=void 0!==a.duration?a.duration:400}w(pw,fh);
-function rw(a){if(dh(a)){var b=a.map,c=b.Cb(),d=a.pixel;a=d[0]-c[0]/2;d=c[1]/2-d[1];c=Math.atan2(d,a);a=Math.sqrt(a*a+d*d);b=b.aa();b.l.rotation!==re&&void 0!==this.f&&(d=c-this.f,Kg(b,b.Sa()-d));this.f=c;void 0!==this.a&&(c=this.a*(b.Pa()/a),Tg(b,c));void 0!==this.a&&(this.j=this.a/a);this.a=a}}
-function sw(a){if(!dh(a))return!0;a=a.map.aa();bg(a,1,-1);var b=this.j-1,c=a.Sa();c=a.constrainRotation(c,0);Kg(a,c,void 0,void 0);c=a.Pa();var d=this.o;c=a.constrainResolution(c,0,b);Tg(a,c,void 0,d);this.j=0;return!1}function qw(a){return dh(a)&&this.s(a)?(bg(a.map.aa(),1,1),this.a=this.f=void 0,!0):!1};function T(a){a=a?a:{};var b=kb({},a);delete b.style;delete b.renderBuffer;delete b.updateWhileAnimating;delete b.updateWhileInteracting;xg.call(this,b);this.D=void 0!==a.declutter?a.declutter:!1;this.f=void 0!==a.renderBuffer?a.renderBuffer:100;this.C=null;this.V=void 0;this.j(a.style);this.ca=void 0!==a.updateWhileAnimating?a.updateWhileAnimating:!1;this.ra=void 0!==a.updateWhileInteracting?a.updateWhileInteracting:!1;this.l=a.renderMode||"vector";this.type="VECTOR"}w(T,xg);T.prototype.B=function(){return this.C};
-T.prototype.ib=function(){return this.V};T.prototype.j=function(a){this.C=void 0!==a?a:Fk;this.V=null===a?void 0:Dk(this.C);this.u()};var ik="renderOrder";function tw(){return[[-Infinity,-Infinity,Infinity,Infinity]]};function uw(a){Vc.call(this);this.c=Ob(a.projection);this.v=null;this.C=vw(this,a.attributions);this.T=a.logo;this.ra=void 0!==a.state?a.state:"ready";this.D=void 0!==a.wrapX?a.wrapX:!1}w(uw,Vc);
-function vw(a,b){if(!b)return null;if(b instanceof Ec)return a.v=[b],function(){return[b.og]};if(Array.isArray(b)){if(b[0]instanceof Ec){a.v=b;var c=b.map(function(a){return a.og});return function(){return c}}a.v=b.map(function(a){return new Ec({html:a})});return function(){return b}}if("function"===typeof b)return b;a.v=[new Ec({html:b})];return function(){return[b]}}k=uw.prototype;k.wa=ea;k.za=function(){return this.v};k.Aa=function(){return this.T};k.Da=function(){return this.c};k.getState=function(){return this.ra};
-k.sa=function(){this.u()};k.va=function(a){this.C=vw(this,a);this.u()};function ww(a,b){a.ra=b;a.u()};function U(a){a=a||{};uw.call(this,{attributions:a.attributions,logo:a.logo,projection:void 0,state:"ready",wrapX:void 0!==a.wrapX?a.wrapX:!0});this.o=ea;this.O=a.format;this.$=void 0==a.overlaps?!0:a.overlaps;this.V=a.url;void 0!==a.loader?this.o=a.loader:void 0!==this.V&&(oa(this.O,7),this.o=Fo(this.V,this.O));this.ca=void 0!==a.strategy?a.strategy:tw;var b=void 0!==a.useSpatialIndex?a.useSpatialIndex:!0;this.a=b?new um:null;this.B=new um;this.f={};this.j={};this.l={};this.s={};this.i=null;if(a.features instanceof
-B){var c=a.features;var d=c.a}else Array.isArray(a.features)&&(d=a.features);b||void 0!==c||(c=new B(d));void 0!==d&&xw(this,d);void 0!==c&&yw(this,c)}w(U,uw);k=U.prototype;k.Gb=function(a){var b=x(a).toString();if(zw(this,b,a)){Aw(this,b,a);var c=a.U();c?(b=c.G(),this.a&&this.a.Ca(b,a)):this.f[b]=a;this.b(new Bw("addfeature",a))}this.u()};function Aw(a,b,c){a.s[b]=[y(c,"change",a.gj,a),y(c,"propertychange",a.gj,a)]}
-function zw(a,b,c){var d=!0,e=c.c;void 0!==e?e.toString()in a.j?d=!1:a.j[e.toString()]=c:(oa(!(b in a.l),30),a.l[b]=c);return d}k.Qc=function(a){xw(this,a);this.u()};function xw(a,b){var c,d=[],e=[],f=[];var g=0;for(c=b.length;g<c;g++){var h=b[g];var l=x(h).toString();zw(a,l,h)&&e.push(h)}g=0;for(c=e.length;g<c;g++)h=e[g],l=x(h).toString(),Aw(a,l,h),(b=h.U())?(l=b.G(),d.push(l),f.push(h)):a.f[l]=h;a.a&&a.a.load(d,f);g=0;for(c=e.length;g<c;g++)a.b(new Bw("addfeature",e[g]))}
-function yw(a,b){var c=!1;y(a,"addfeature",function(a){c||(c=!0,b.push(a.feature),c=!1)});y(a,"removefeature",function(a){c||(c=!0,b.remove(a.feature),c=!1)});y(b,"add",function(a){c||(c=!0,this.Gb(a.element),c=!1)},a);y(b,"remove",function(a){c||(c=!0,this.Lb(a.element),c=!1)},a);a.i=b}
-k.clear=function(a){if(a){for(var b in this.s)this.s[b].forEach(Gc);this.i||(this.s={},this.j={},this.l={})}else if(this.a){this.a.forEach(this.Yg,this);for(var c in this.f)this.Yg(this.f[c])}this.i&&this.i.clear();this.a&&this.a.clear();this.B.clear();this.f={};this.b(new Bw("clear"));this.u()};k.Lh=function(a,b){if(this.a)return this.a.forEach(a,b);if(this.i)return this.i.forEach(a,b)};function Cw(a,b,c){a.ec([b[0],b[1],b[0],b[1]],function(a){if(a.U().Bb(b))return c.call(void 0,a)})}
-k.ec=function(a,b,c){if(this.a)return zm(this.a,a,b,c);if(this.i)return this.i.forEach(b,c)};k.Mh=function(a,b,c){return this.ec(a,function(d){if(d.U().$a(a)&&(d=b.call(c,d)))return d})};k.Th=function(){return this.i};k.ee=function(){if(this.i)var a=this.i.a;else this.a&&(a=wm(this.a),nb(this.f)||gc(a,mb(this.f)));return a};k.Sh=function(a){var b=[];Cw(this,a,function(a){b.push(a)});return b};k.Yf=function(a){return xm(this.a,a)};
-k.Oh=function(a,b){var c=a[0],d=a[1],e=null,f=[NaN,NaN],g=Infinity,h=[-Infinity,-Infinity,Infinity,Infinity],l=b?b:Re;zm(this.a,h,function(a){if(l(a)){var b=a.U(),m=g;g=b.Nb(c,d,f,g);g<m&&(e=a,a=Math.sqrt(g),h[0]=c-a,h[1]=d-a,h[2]=c+a,h[3]=d+a)}});return e};k.G=function(a){return this.a.G(a)};k.Rh=function(a){a=this.j[a.toString()];return void 0!==a?a:null};k.ej=function(){return this.O};k.fj=function(){return this.V};
-k.gj=function(a){a=a.target;var b=x(a).toString(),c=a.U();c?(c=c.G(),b in this.f?(delete this.f[b],this.a&&this.a.Ca(c,a)):this.a&&vm(this.a,c,a)):b in this.f||(this.a&&this.a.remove(a),this.f[b]=a);c=a.c;void 0!==c?(c=c.toString(),b in this.l?(delete this.l[b],this.j[c]=a):this.j[c]!==a&&(Dw(this,a),this.j[c]=a)):b in this.l||(Dw(this,a),this.l[b]=a);this.u();this.b(new Bw("changefeature",a))};
-k.ae=function(a,b,c){var d=this.B;a=this.ca(a,b);var e;var f=0;for(e=a.length;f<e;++f){var g=a[f];zm(d,g,function(a){return La(a.extent,g)})||(this.o.call(this,g,b,c),d.Ca(g,{extent:g.slice()}))}};k.Cj=function(a){var b=this.B,c;zm(b,a,function(b){if(Sa(b.extent,a))return c=b,!0});c&&b.remove(c)};k.Lb=function(a){var b=x(a).toString();b in this.f?delete this.f[b]:this.a&&this.a.remove(a);this.Yg(a);this.u()};
-k.Yg=function(a){var b=x(a).toString();this.s[b].forEach(Gc);delete this.s[b];var c=a.c;void 0!==c?delete this.j[c.toString()]:delete this.l[b];this.b(new Bw("removefeature",a))};function Dw(a,b){for(var c in a.j)if(a.j[c]===b){delete a.j[c];break}}k.hj=function(a){this.o=a};function Bw(a,b){Qc.call(this,a);this.feature=b}w(Bw,Qc);function Ew(a){fh.call(this,{handleDownEvent:Fw,handleEvent:Gw,handleUpEvent:Hw});this.V=!1;this.ca=null;this.o=!1;this.ob=a.source?a.source:null;this.La=a.features?a.features:null;this.Xk=a.snapTolerance?a.snapTolerance:12;this.O=a.type;this.f=Iw(this.O);this.$k=!!a.stopClick;this.Ea=a.minPoints?a.minPoints:this.f===Jw?3:2;this.ua=a.maxPoints?a.maxPoints:Infinity;this.Md=a.finishCondition?a.finishCondition:Re;var b=a.geometryFunction;if(!b)if("Circle"===this.O)b=function(a,b){b=b?b:new gw([NaN,NaN]);
-b.hh(a[0],Math.sqrt(He(a[0],a[1])));return b};else{var c,d=this.f;d===Kw?c=C:d===Lw?c=I:d===Jw&&(c=D);b=function(a,b){b?d===Jw?a[0].length?b.na([a[0].concat([a[0][0]])]):b.na([]):b.na(a):b=new c(a);return b}}this.cb=b;this.T=this.C=this.a=this.B=this.j=this.s=null;this.sc=a.clickTolerance?a.clickTolerance*a.clickTolerance:36;this.ra=new T({source:new U({useSpatialIndex:!1,wrapX:a.wrapX?a.wrapX:!1}),style:a.style?a.style:Mw()});this.bb=a.geometryName;this.Wk=a.condition?a.condition:ah;this.If=a.freehand?
-Re:a.freehandCondition?a.freehandCondition:bh;y(this,Xc("active"),this.Ki,this)}w(Ew,fh);function Mw(){var a=Gk();return function(b){return a[b.U().S()]}}k=Ew.prototype;k.setMap=function(a){fh.prototype.setMap.call(this,a);this.Ki()};function Gw(a){this.o=this.f!==Kw&&this.If(a);var b=!0;this.o&&"pointerdrag"===a.type&&null!==this.j?(Nw(this,a),b=!1):this.o&&"pointerdown"===a.type?b=!1:"pointermove"===a.type?b=Ow(this,a):"dblclick"===a.type&&(b=!1);return gh.call(this,a)&&b}
-function Fw(a){this.V=!this.o;return this.o?(this.ca=a.pixel,this.s||Pw(this,a),!0):this.Wk(a)?(this.ca=a.pixel,!0):!1}function Hw(a){var b=!0;Ow(this,a);var c=this.f===Qw;this.V?(this.s?this.o||c?this.Pd():Rw(this,a)?this.Md(a)&&this.Pd():Nw(this,a):(Pw(this,a),this.f===Kw&&this.Pd()),b=!1):this.o&&(this.s=null,Sw(this));!b&&this.$k&&a.stopPropagation();return b}
-function Ow(a,b){if(a.ca&&(!a.o&&a.V||a.o&&!a.V)){var c=a.ca,d=b.pixel,e=c[0]-d[0];c=c[1]-d[1];e=e*e+c*c;a.V=a.o?e>a.sc:e<=a.sc}a.s?(e=b.coordinate,c=a.j.U(),a.f===Kw?d=a.a:a.f===Jw?(d=a.a[0],d=d[d.length-1],Rw(a,b)&&(e=a.s.slice())):(d=a.a,d=d[d.length-1]),d[0]=e[0],d[1]=e[1],a.cb(a.a,c),a.B&&a.B.U().na(e),c instanceof D&&a.f!==Jw?(a.C||(a.C=new Hk(new I(null))),e=c.Wh(0),b=a.C.U(),b.ba(e.ja,e.da())):a.T&&(b=a.C.U(),b.na(a.T)),Tw(a)):(b=b.coordinate.slice(),a.B?a.B.U().na(b):(a.B=new Hk(new C(b)),
-Tw(a)));return!0}function Rw(a,b){var c=!1;if(a.j){var d=!1,e=[a.s];a.f===Lw?d=a.a.length>a.Ea:a.f===Jw&&(d=a.a[0].length>a.Ea,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d){d=b.map;for(var f=0,g=e.length;f<g;f++){var h=e[f],l=d.Ia(h),m=b.pixel;c=m[0]-l[0];l=m[1]-l[1];if(c=Math.sqrt(c*c+l*l)<=(a.o?1:a.Xk)){a.s=h;break}}}}return c}
-function Pw(a,b){b=b.coordinate;a.s=b;a.f===Kw?a.a=b.slice():a.f===Jw?(a.a=[[b.slice(),b.slice()]],a.T=a.a[0]):(a.a=[b.slice(),b.slice()],a.f===Qw&&(a.T=a.a));a.T&&(a.C=new Hk(new I(a.T)));b=a.cb(a.a);a.j=new Hk;a.bb&&a.j.Lc(a.bb);a.j.Va(b);Tw(a);a.b(new Uw("drawstart",a.j))}
-function Nw(a,b){b=b.coordinate;var c=a.j.U(),d;if(a.f===Lw){a.s=b.slice();var e=a.a;e.length>=a.ua&&(a.o?e.pop():d=!0);e.push(b.slice());a.cb(e,c)}else a.f===Jw&&(e=a.a[0],e.length>=a.ua&&(a.o?e.pop():d=!0),e.push(b.slice()),d&&(a.s=e[0]),a.cb(a.a,c));Tw(a);d&&a.Pd()}
-k.nq=function(){if(this.j){var a=this.j.U();if(this.f===Lw){var b=this.a;b.splice(-2,1);this.cb(b,a);2<=b.length&&(this.s=b[b.length-2].slice())}else if(this.f===Jw){b=this.a[0];b.splice(-2,1);var c=this.C.U();c.na(b);this.cb(this.a,a)}0===b.length&&(this.s=null);Tw(this)}};
-k.Pd=function(){var a=Sw(this),b=this.a,c=a.U();this.f===Lw?(b.pop(),this.cb(b,c)):this.f===Jw&&(b[0].pop(),this.cb(b,c),b=c.W());"MultiPoint"===this.O?a.Va(new No([b])):"MultiLineString"===this.O?a.Va(new P([b])):"MultiPolygon"===this.O&&a.Va(new Q([b]));this.b(new Uw("drawend",a));this.La&&this.La.push(a);this.ob&&this.ob.Gb(a)};function Sw(a){a.s=null;var b=a.j;b&&(a.j=null,a.B=null,a.C=null,a.ra.ha().clear(!0));return b}
-k.Zn=function(a){var b=a.U();this.j=a;this.a=b.W();a=this.a[this.a.length-1];this.s=a.slice();this.a.push(a.slice());Tw(this);this.b(new Uw("drawstart",this.j))};k.jd=Se;function Tw(a){var b=[];a.j&&b.push(a.j);a.C&&b.push(a.C);a.B&&b.push(a.B);a=a.ra.ha();a.clear(!0);a.Qc(b)}k.Ki=function(){var a=this.v,b=this.c();a&&b||Sw(this);this.ra.setMap(b?a:null)};
-function Iw(a){var b;"Point"===a||"MultiPoint"===a?b=Kw:"LineString"===a||"MultiLineString"===a?b=Lw:"Polygon"===a||"MultiPolygon"===a?b=Jw:"Circle"===a&&(b=Qw);return b}var Kw="Point",Lw="LineString",Jw="Polygon",Qw="Circle";function Uw(a,b){Qc.call(this,a);this.feature=b}w(Uw,Qc);function Vw(a){var b=a||{};this.a=this.j=null;this.C=void 0!==b.pixelTolerance?b.pixelTolerance:10;this.B=!1;this.T=this.s=null;a||(a={});fh.call(this,{handleDownEvent:Ww,handleDragEvent:Xw,handleEvent:Yw,handleUpEvent:Zw});this.o=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.boxStyle?a.boxStyle:$w(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.O=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.pointerStyle?a.pointerStyle:ax(),updateWhileAnimating:!0,
-updateWhileInteracting:!0});a.extent&&this.f(a.extent)}w(Vw,fh);function Yw(a){if(!(a instanceof Ad))return!0;if("pointermove"==a.type&&!this.D){var b=a.pixel,c=a.map,d=bx(this,b,c);d||(d=c.Ra(b));cx(this,d)}gh.call(this,a);return!1}
-function Ww(a){function b(a){var b=null,c=null;a[0]==e[0]?b=e[2]:a[0]==e[2]&&(b=e[0]);a[1]==e[1]?c=e[3]:a[1]==e[3]&&(c=e[1]);return null!==b&&null!==c?[b,c]:null}var c=a.pixel,d=a.map,e=this.G();(a=bx(this,c,d))&&e?(c=a[0]==e[0]||a[0]==e[2]?a[0]:null,d=a[1]==e[1]||a[1]==e[3]?a[1]:null,null!==c&&null!==d?this.a=dx(b(a)):null!==c?this.a=ex(b([c,e[1]]),b([c,e[3]])):null!==d&&(this.a=ex(b([e[0],d]),b([e[2],d])))):(a=d.Ra(c),this.f([a[0],a[1],a[0],a[1]]),this.a=dx(a));return!0}
-function Xw(a){this.a&&(a=a.coordinate,this.f(this.a(a)),cx(this,a));return!0}function Zw(){this.a=null;var a=this.G();a&&0!==ab(a)||this.f(null);return!1}function $w(){var a=Gk();return function(){return a.Polygon}}function ax(){var a=Gk();return function(){return a.Point}}function dx(a){return function(b){return Ca([a,b])}}function ex(a,b){return a[0]==b[0]?function(c){return Ca([a,[c[0],b[1]]])}:a[1]==b[1]?function(c){return Ca([a,[b[0],c[1]]])}:null}
-function bx(a,b,c){function d(a,b){return Je(e,a)-Je(e,b)}var e=c.Ra(b),f=a.G();if(f){f=[[[f[0],f[1]],[f[0],f[3]]],[[f[0],f[3]],[f[2],f[3]]],[[f[2],f[3]],[f[2],f[1]]],[[f[2],f[1]],[f[0],f[1]]]];f.sort(d);f=f[0];var g=Be(e,f),h=c.Ia(g);if(Ie(b,h)<=a.C)return b=c.Ia(f[0]),c=c.Ia(f[1]),b=He(h,b),c=He(h,c),a.B=Math.sqrt(Math.min(b,c))<=a.C,a.B&&(g=b>c?f[1]:f[0]),g}return null}function cx(a,b){var c=a.T;c?c.U().na(b):(c=new Hk(new C(b)),a.T=c,a.O.ha().Gb(c))}
-Vw.prototype.setMap=function(a){this.o.setMap(a);this.O.setMap(a);fh.prototype.setMap.call(this,a)};Vw.prototype.G=function(){return this.j};Vw.prototype.f=function(a){this.j=a?a:null;var b=this.s;b?a?b.Va(Rf(a)):b.Va(void 0):(this.s=b=a?new Hk(Rf(a)):new Hk({}),this.o.ha().Gb(b));this.b(new fx(this.j))};function fx(a){Qc.call(this,"extentchanged");this.extent=a}w(fx,Qc);function gx(a){fh.call(this,{handleDownEvent:hx,handleDragEvent:ix,handleEvent:jx,handleUpEvent:kx});this.Md=a.condition?a.condition:eh;this.bb=function(a){return Wg(a)&&$g(a)};this.ob=a.deleteCondition?a.deleteCondition:this.bb;this.sc=a.insertVertexCondition?a.insertVertexCondition:Re;this.La=this.f=null;this.Ea=[0,0];this.C=this.T=!1;this.a=new um;this.ra=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.s=this.ua=!1;this.j=[];this.B=new T({source:new U({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?
-a.style:lx(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.ca={Point:this.io,LineString:this.Mi,LinearRing:this.Mi,Polygon:this.jo,MultiPoint:this.fo,MultiLineString:this.eo,MultiPolygon:this.ho,Circle:this.bo,GeometryCollection:this.co};this.V=null;a.source?(this.V=a.source,a=new B(this.V.ee()),y(this.V,"addfeature",this.vm,this),y(this.V,"removefeature",this.xm,this)):a=a.features;if(!a)throw Error("The modify interaction requires features or a source");this.o=a;this.o.forEach(this.xg,
-this);y(this.o,"add",this.$n,this);y(this.o,"remove",this.ao,this);this.O=null}w(gx,fh);k=gx.prototype;k.xg=function(a){var b=a.U();b&&b.S()in this.ca&&this.ca[b.S()].call(this,a,b);(b=this.v)&&b.c&&this.c()&&mx(this,this.Ea,b);y(a,"change",this.Li,this)};function nx(a,b){a.C||(a.C=!0,a.b(new ox("modifystart",a.o,b)))}function px(a,b){qx(a,b);a.f&&0===a.o.kc()&&(a.B.ha().Lb(a.f),a.f=null);Mc(b,"change",a.Li,a)}
-function qx(a,b){a=a.a;var c=[];a.forEach(function(a){b===a.feature&&c.push(a)});for(var d=c.length-1;0<=d;--d)a.remove(c[d])}k.Ha=function(a){this.f&&!a&&(this.B.ha().Lb(this.f),this.f=null);fh.prototype.Ha.call(this,a)};k.setMap=function(a){this.B.setMap(a);fh.prototype.setMap.call(this,a)};k.vm=function(a){a.feature&&this.o.push(a.feature)};k.xm=function(a){a.feature&&this.o.remove(a.feature)};k.$n=function(a){this.xg(a.element)};k.Li=function(a){this.s||(a=a.target,px(this,a),this.xg(a))};
-k.ao=function(a){px(this,a.element)};k.io=function(a,b){var c=b.W();a={feature:a,geometry:b,ma:[c,c]};this.a.Ca(b.G(),a)};k.fo=function(a,b){var c=b.W(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,geometry:b,depth:[e],index:e,ma:[f,f]};this.a.Ca(b.G(),f)}};k.Mi=function(a,b){var c=b.W(),d;var e=0;for(d=c.length-1;e<d;++e){var f=c.slice(e,e+2);var g={feature:a,geometry:b,index:e,ma:f};this.a.Ca(Ca(f),g)}};
-k.eo=function(a,b){var c=b.W(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,ma:l};this.a.Ca(Ca(l),m)}}};k.jo=function(a,b){var c=b.W(),d,e;var f=0;for(e=c.length;f<e;++f){var g=c[f];var h=0;for(d=g.length-1;h<d;++h){var l=g.slice(h,h+2);var m={feature:a,geometry:b,depth:[f],index:h,ma:l};this.a.Ca(Ca(l),m)}}};
-k.ho=function(a,b){var c=b.W(),d,e,f;var g=0;for(f=c.length;g<f;++g){var h=c[g];var l=0;for(e=h.length;l<e;++l){var m=h[l];var n=0;for(d=m.length-1;n<d;++n){var p=m.slice(n,n+2);var q={feature:a,geometry:b,depth:[l,g],index:n,ma:p};this.a.Ca(Ca(p),q)}}}};k.bo=function(a,b){var c=b.xa(),d={feature:a,geometry:b,index:0,ma:[c,c]};a={feature:a,geometry:b,index:1,ma:[c,c]};d.Tf=a.Tf=[d,a];this.a.Ca(Pa(c),d);this.a.Ca(b.G(),a)};
-k.co=function(a,b){var c=b.a;for(b=0;b<c.length;++b)this.ca[c[b].S()].call(this,a,c[b])};function rx(a,b){var c=a.f;c?c.U().na(b):(c=new Hk(new C(b)),a.f=c,a.B.ha().Gb(c))}function sx(a,b){return a.index-b.index}
-function hx(a){if(!this.Md(a))return!1;mx(this,a.pixel,a.map);var b=a.map.Ra(a.pixel);this.j.length=0;this.C=!1;var c=this.f;if(c){var d=[];c=c.U().W();var e=Ca([c]);e=xm(this.a,e);var f={};e.sort(sx);for(var g=0,h=e.length;g<h;++g){var l=e[g],m=l.ma,n=x(l.feature),p=l.depth;p&&(n+="-"+p.join("-"));f[n]||(f[n]=Array(2));if("Circle"===l.geometry.S()&&1===l.index)m=tx(b,l),Ee(m,c)&&!f[n][0]&&(this.j.push([l,0]),f[n][0]=l);else if(Ee(m[0],c)&&!f[n][0])this.j.push([l,0]),f[n][0]=l;else if(Ee(m[1],c)&&
-!f[n][1]){if("LineString"!==l.geometry.S()&&"MultiLineString"!==l.geometry.S()||!f[n][0]||0!==f[n][0].index)this.j.push([l,1]),f[n][1]=l}else this.sc(a)&&x(m)in this.La&&!f[n][0]&&!f[n][1]&&d.push([l,c])}d.length&&nx(this,a);for(a=d.length-1;0<=a;--a)this.Em.apply(this,d[a])}return!!this.f}
-function ix(a){this.T=!1;nx(this,a);a=a.coordinate;for(var b=0,c=this.j.length;b<c;++b){var d=this.j[b],e=d[0],f=e.depth,g=e.geometry,h=e.ma;for(d=d[1];a.length<g.pa();)a.push(h[d][a.length]);switch(g.S()){case "Point":var l=a;h[0]=h[1]=a;break;case "MultiPoint":l=g.W();l[e.index]=a;h[0]=h[1]=a;break;case "LineString":l=g.W();l[e.index+d]=a;h[d]=a;break;case "MultiLineString":l=g.W();l[f[0]][e.index+d]=a;h[d]=a;break;case "Polygon":l=g.W();l[f[0]][e.index+d]=a;h[d]=a;break;case "MultiPolygon":l=g.W();
-l[f[1]][f[0]][e.index+d]=a;h[d]=a;break;case "Circle":h[0]=h[1]=a,0===e.index?(this.s=!0,g.ub(a)):(this.s=!0,g.fd(Ie(g.xa(),a))),this.s=!1}l&&(e=g,f=l,this.s=!0,e.na(f),this.s=!1)}rx(this,a)}function kx(a){for(var b,c,d=this.j.length-1;0<=d;--d)if(b=this.j[d][0],c=b.geometry,"Circle"===c.S()){var e=c.xa(),f=b.Tf[0];b=b.Tf[1];f.ma[0]=f.ma[1]=e;b.ma[0]=b.ma[1]=e;vm(this.a,Pa(e),f);vm(this.a,c.G(),b)}else vm(this.a,Ca(b.ma),b);this.C&&(this.b(new ox("modifyend",this.o,a)),this.C=!1);return!1}
-function jx(a){if(!(a instanceof Ad))return!0;this.O=a;var b;a.map.aa().Vh()||"pointermove"!=a.type||this.D||(this.Ea=a.pixel,mx(this,a.pixel,a.map));this.f&&this.ob(a)&&(b="singleclick"==a.type&&this.T?!0:this.Dj());"singleclick"==a.type&&(this.T=!1);return gh.call(this,a)&&!b}
-function mx(a,b,c){function d(a,b){return ux(e,a)-ux(e,b)}var e=c.Ra(b),f=Fa(Pa(e),c.aa().Pa()*a.ra);f=xm(a.a,f);if(0<f.length){f.sort(d);var g=f[0],h=g.ma,l=tx(e,g),m=c.Ia(l),n=Ie(b,m);if(n<=a.ra){b={};if("Circle"===g.geometry.S()&&1===g.index)a.ua=!0,rx(a,l);else for(n=c.Ia(h[0]),g=c.Ia(h[1]),c=He(m,n),m=He(m,g),n=Math.sqrt(Math.min(c,m)),a.ua=n<=a.ra,a.ua&&(l=c>m?h[1]:h[0]),rx(a,l),m=1,c=f.length;m<c;++m)if(l=f[m].ma,Ee(h[0],l[0])&&Ee(h[1],l[1])||Ee(h[0],l[1])&&Ee(h[1],l[0]))b[x(l)]=!0;else break;
-b[x(h)]=!0;a.La=b;return}}a.f&&(a.B.ha().Lb(a.f),a.f=null)}function ux(a,b){var c=b.geometry;return"Circle"===c.S()&&1===b.index?(a=He(c.xa(),a),c=Math.sqrt(a)-c.Bd(),c*c):Je(a,b.ma)}function tx(a,b){var c=b.geometry;return"Circle"===c.S()&&1===b.index?c.Ib(a):Be(a,b.ma)}
-k.Em=function(a,b){for(var c=a.ma,d=a.feature,e=a.geometry,f=a.depth,g=a.index,h;b.length<e.pa();)b.push(0);switch(e.S()){case "MultiLineString":h=e.W();h[f[0]].splice(g+1,0,b);break;case "Polygon":h=e.W();h[f[0]].splice(g+1,0,b);break;case "MultiPolygon":h=e.W();h[f[1]][f[0]].splice(g+1,0,b);break;case "LineString":h=e.W();h.splice(g+1,0,b);break;default:return}this.s=!0;e.na(h);this.s=!1;h=this.a;h.remove(a);vx(this,e,g,f,1);a={ma:[c[0],b],feature:d,geometry:e,depth:f,index:g};h.Ca(Ca(a.ma),a);
-this.j.push([a,1]);b={ma:[b,c[1]],feature:d,geometry:e,depth:f,index:g+1};h.Ca(Ca(b.ma),b);this.j.push([b,0]);this.T=!0};
-k.Dj=function(){if(this.O&&"pointerdrag"!=this.O.type){var a=this.O;nx(this,a);var b=this.j,c={},d,e;for(e=b.length-1;0<=e;--e){var f=b[e];var g=f[0];var h=x(g.feature);g.depth&&(h+="-"+g.depth.join("-"));h in c||(c[h]={});0===f[1]?(c[h].right=g,c[h].index=g.index):1==f[1]&&(c[h].left=g,c[h].index=g.index+1)}for(h in c){var l=c[h].right;var m=c[h].left;e=c[h].index;var n=e-1;g=void 0!==m?m:l;0>n&&(n=0);f=g.geometry;var p=d=f.W();var q=!1;switch(f.S()){case "MultiLineString":2<d[g.depth[0]].length&&
-(d[g.depth[0]].splice(e,1),q=!0);break;case "LineString":2<d.length&&(d.splice(e,1),q=!0);break;case "MultiPolygon":p=p[g.depth[1]];case "Polygon":p=p[g.depth[0]],4<p.length&&(e==p.length-1&&(e=0),p.splice(e,1),q=!0,0===e&&(p.pop(),p.push(p[0]),n=p.length-1))}q&&(q=f,this.s=!0,q.na(d),this.s=!1,d=[],void 0!==m&&(this.a.remove(m),d.push(m.ma[0])),void 0!==l&&(this.a.remove(l),d.push(l.ma[1])),void 0!==m&&void 0!==l&&(m={depth:g.depth,feature:g.feature,geometry:g.geometry,index:n,ma:d},this.a.Ca(Ca(m.ma),
-m)),vx(this,f,e,g.depth,-1),this.f&&(this.B.ha().Lb(this.f),this.f=null),b.length=0)}this.b(new ox("modifyend",this.o,a));this.C=!1;return!0}return!1};function vx(a,b,c,d,e){zm(a.a,b.G(),function(a){a.geometry===b&&(void 0===d||void 0===a.depth||jc(a.depth,d))&&a.index>c&&(a.index+=e)})}function lx(){var a=Gk();return function(){return a.Point}}function ox(a,b,c){Qc.call(this,a);this.features=b;this.mapBrowserEvent=c}w(ox,Qc);function wx(a){Jg.call(this,{handleEvent:xx});a=a?a:{};this.C=a.condition?a.condition:$g;this.D=a.addCondition?a.addCondition:Se;this.B=a.removeCondition?a.removeCondition:Se;this.T=a.toggleCondition?a.toggleCondition:bh;this.s=a.multi?a.multi:!1;this.l=a.filter?a.filter:Re;this.j=a.hitTolerance?a.hitTolerance:0;this.f=new T({source:new U({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:yx(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"===
-typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return ec(b,a)}}else a=Re;this.o=a;this.a={};a=this.f.ha().i;y(a,"add",this.ko,this);y(a,"remove",this.oo,this)}w(wx,Jg);k=wx.prototype;k.lo=function(){return this.f.ha().i};k.mo=function(){return this.j};k.no=function(a){a=x(a);return this.a[a]};
-function xx(a){if(!this.C(a))return!0;var b=this.D(a),c=this.B(a),d=this.T(a),e=!b&&!c&&!d,f=a.map,g=this.f.ha().i,h=[],l=[];if(e){lb(this.a);f.Tc(a.pixel,function(a,b){if(this.l(a,b))return l.push(a),a=x(a),this.a[a]=b,!this.s}.bind(this),{layerFilter:this.o,hitTolerance:this.j});for(e=g.kc()-1;0<=e;--e){f=g.item(e);var m=l.indexOf(f);-1<m?l.splice(m,1):(g.remove(f),h.push(f))}0!==l.length&&g.qg(l)}else{f.Tc(a.pixel,function(a,e){if(this.l(a,e))return!b&&!d||ec(g.a,a)?(c||d)&&ec(g.a,a)&&(h.push(a),
-e=x(a),delete this.a[e]):(l.push(a),a=x(a),this.a[a]=e),!this.s}.bind(this),{layerFilter:this.o,hitTolerance:this.j});for(e=h.length-1;0<=e;--e)g.remove(h[e]);g.qg(l)}(0<l.length||0<h.length)&&this.b(new zx(Ax,l,h,a));return Zg(a)}k.po=function(a){this.j=a};k.setMap=function(a){var b=this.v,c=this.f.ha().i;b&&c.forEach(b.Zj,b);Jg.prototype.setMap.call(this,a);this.f.setMap(a);a&&c.forEach(a.Uj,a)};
-function yx(){var a=Gk();gc(a.Polygon,a.LineString);gc(a.GeometryCollection,a.LineString);return function(b){return b.U()?a[b.U().S()]:null}}k.ko=function(a){var b=this.v;b&&b.Uj(a.element)};k.oo=function(a){var b=this.v;b&&b.Zj(a.element)};function zx(a,b,c,d){Qc.call(this,a);this.selected=b;this.deselected=c;this.mapBrowserEvent=d}w(zx,Qc);var Ax="select";function Bx(a){fh.call(this,{handleEvent:Cx,handleDownEvent:Re,handleUpEvent:Dx});a=a?a:{};this.s=a.source?a.source:null;this.O=void 0!==a.vertex?a.vertex:!0;this.C=void 0!==a.edge?a.edge:!0;this.j=a.features?a.features:null;this.ra=[];this.B={};this.V={};this.o={};this.T=null;this.f=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.ua=Ex.bind(this);this.a=new um;this.ca={Point:this.wo,LineString:this.Pi,LinearRing:this.Pi,Polygon:this.xo,MultiPoint:this.uo,MultiLineString:this.to,MultiPolygon:this.vo,
-GeometryCollection:this.so,Circle:this.ro}}w(Bx,fh);k=Bx.prototype;k.Gb=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=a.U();if(d){var e=this.ca[d.S()];e&&(this.V[c]=d.G(Da()),e.call(this,a,d))}b&&(this.B[c]=y(a,"change",this.qo,this))};k.bl=function(a){this.Gb(a)};k.cl=function(a){this.Lb(a)};k.Ni=function(a){if(a instanceof Bw)var b=a.feature;else a instanceof cd&&(b=a.element);this.Gb(b)};k.Oi=function(a){if(a instanceof Bw)var b=a.feature;else a instanceof cd&&(b=a.element);this.Lb(b)};
-k.qo=function(a){a=a.target;if(this.D){var b=x(a);b in this.o||(this.o[b]=a)}else this.$j(a)};k.Lb=function(a,b){b=void 0!==b?b:!0;var c=x(a),d=this.V[c];if(d){var e=this.a,f=[];zm(e,d,function(b){a===b.feature&&f.push(b)});for(d=f.length-1;0<=d;--d)e.remove(f[d])}b&&(Gc(this.B[c]),delete this.B[c])};
-k.setMap=function(a){var b=this.v,c=this.ra,d;this.j?d=this.j:this.s&&(d=this.s.ee());b&&(c.forEach(Gc),c.length=0,d.forEach(this.cl,this));fh.prototype.setMap.call(this,a);a&&(this.j?c.push(y(this.j,"add",this.Ni,this),y(this.j,"remove",this.Oi,this)):this.s&&c.push(y(this.s,"addfeature",this.Ni,this),y(this.s,"removefeature",this.Oi,this)),d.forEach(this.bl,this))};k.jd=Se;
-function Fx(a,b,c,d){var e=d.Ra([b[0]-a.f,b[1]+a.f]),f=d.Ra([b[0]+a.f,b[1]-a.f]);e=Ca([e,f]);var g=xm(a.a,e);a.O&&!a.C&&(g=g.filter(function(a){return"Circle"!==a.feature.U().S()}));var h=!1;e=!1;var l=f=null;if(0<g.length){a.T=c;g.sort(a.ua);var m=g[0].ma;h="Circle"===g[0].feature.U().S();if(a.O&&!a.C){if(c=d.Ia(m[0]),h=d.Ia(m[1]),c=He(b,c),b=He(b,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.f)e=!0,f=c>b?m[1]:m[0],l=d.Ia(f)}else a.C&&(f=h?Ae(c,g[0].feature.U()):Be(c,m),l=d.Ia(f),Ie(b,l)<=a.f&&(e=!0,a.O&&
-!h&&(c=d.Ia(m[0]),h=d.Ia(m[1]),c=He(l,c),b=He(l,h),h=Math.sqrt(Math.min(c,b)),h=h<=a.f)))&&(f=c>b?m[1]:m[0],l=d.Ia(f));e&&(l=[Math.round(l[0]),Math.round(l[1])])}return{Mq:e,vertex:f,Vq:l}}k.$j=function(a){this.Lb(a,!1);this.Gb(a,!1)};k.ro=function(a,b){b=Sf(b).W()[0];var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,ma:e};this.a.Ca(Ca(e),f)}};k.so=function(a,b){var c=b.a;for(b=0;b<c.length;++b){var d=this.ca[c[b].S()];d&&d.call(this,a,c[b])}};
-k.Pi=function(a,b){b=b.W();var c;var d=0;for(c=b.length-1;d<c;++d){var e=b.slice(d,d+2);var f={feature:a,ma:e};this.a.Ca(Ca(e),f)}};k.to=function(a,b){b=b.W();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,ma:h};this.a.Ca(Ca(h),l)}}};k.uo=function(a,b){var c=b.W(),d;var e=0;for(d=c.length;e<d;++e){var f=c[e];f={feature:a,ma:[f,f]};this.a.Ca(b.G(),f)}};
-k.vo=function(a,b){b=b.W();var c,d,e;var f=0;for(e=b.length;f<e;++f){var g=b[f];var h=0;for(d=g.length;h<d;++h){var l=g[h];var m=0;for(c=l.length-1;m<c;++m){var n=l.slice(m,m+2);var p={feature:a,ma:n};this.a.Ca(Ca(n),p)}}}};k.wo=function(a,b){var c=b.W();a={feature:a,ma:[c,c]};this.a.Ca(b.G(),a)};k.xo=function(a,b){b=b.W();var c,d;var e=0;for(d=b.length;e<d;++e){var f=b[e];var g=0;for(c=f.length-1;g<c;++g){var h=f.slice(g,g+2);var l={feature:a,ma:h};this.a.Ca(Ca(h),l)}}};
-function Cx(a){var b=Fx(this,a.pixel,a.coordinate,a.map);b.Mq&&(a.coordinate=b.vertex.slice(0,2),a.pixel=b.Vq);return gh.call(this,a)}function Dx(){var a=mb(this.o);a.length&&(a.forEach(this.$j,this),this.o={});return!1}function Ex(a,b){return Je(this.T,a.ma)-Je(this.T,b.ma)};function Gx(a){fh.call(this,{handleDownEvent:Hx,handleDragEvent:Ix,handleMoveEvent:Jx,handleUpEvent:Kx});a=a?a:{};this.a=null;this.j=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)var b=a.layers;else{var c=a.layers;b=function(a){return ec(c,a)}}else b=Re;this.C=b;this.s=a.hitTolerance?a.hitTolerance:0;this.f=null;y(this,Xc("active"),this.o,this)}w(Gx,fh);
-function Hx(a){this.f=Lx(this,a.pixel,a.map);if(!this.a&&this.f){this.a=a.coordinate;Jx.call(this,a);var b=this.j||new B([this.f]);this.b(new Mx("translatestart",b,a.coordinate));return!0}return!1}function Kx(a){if(this.a){this.a=null;Jx.call(this,a);var b=this.j||new B([this.f]);this.b(new Mx("translateend",b,a.coordinate));return!0}return!1}
-function Ix(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1],d=this.j||new B([this.f]);d.forEach(function(a){var d=a.U();d.translate(b,c);a.Va(d)});this.a=a;this.b(new Mx("translating",d,a))}}function Jx(a){var b=a.map.a;Lx(this,a.pixel,a.map)?(b.classList.remove(this.a?"ol-grab":"ol-grabbing"),b.classList.add(this.a?"ol-grabbing":"ol-grab")):b.classList.remove("ol-grab","ol-grabbing")}
-function Lx(a,b,c){return c.Tc(b,function(a){if(!this.j||ec(this.j.a,a))return a}.bind(a),{layerFilter:a.C,hitTolerance:a.s})}Gx.prototype.B=function(){return this.s};Gx.prototype.T=function(a){this.s=a};Gx.prototype.setMap=function(a){var b=this.v;fh.prototype.setMap.call(this,a);Nx(this,b)};Gx.prototype.o=function(){Nx(this,null)};function Nx(a,b){var c=a.v;a=a.c();c&&a||(c=c||b)&&c.a.classList.remove("ol-grab","ol-grabbing")}
-function Mx(a,b,c){Qc.call(this,a);this.features=b;this.coordinate=c}w(Mx,Qc);function V(a){a=a?a:{};var b=kb({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;T.call(this,b);this.c=null;this.$=void 0!==a.shadow?a.shadow:250;this.O=void 0;this.T=null;y(this,Xc(Ox),this.cm,this);this.Lj(a.gradient?a.gradient:Px);this.Fj(void 0!==a.blur?a.blur:15);this.fd(void 0!==a.radius?a.radius:8);y(this,Xc(Qx),this.mg,this);y(this,Xc(Rx),this.mg,this);this.mg();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}:d=c;this.j(function(a){a=
-d(a);a=void 0!==a?pa(a,0,1):1;var b=255*a|0,c=this.T[b];c||(c=[new Bk({image:new dr({opacity:a,src:this.O})})],this.T[b]=c);return c}.bind(this));this.set(ik,null);y(this,"render",this.tm,this)}w(V,T);var Px=["#00f","#0ff","#0f0","#ff0","#f00"];k=V.prototype;k.Nh=function(){return this.get(Qx)};k.Uh=function(){return this.get(Ox)};k.Ri=function(){return this.get(Rx)};
-k.cm=function(){for(var a=this.Uh(),b=hg(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;e<f;++e)c.addColorStop(e*d,a[e]);b.fillStyle=c;b.fillRect(0,0,1,256);this.c=b.getImageData(0,0,1,256).data};k.mg=function(){var a=this.Ri(),b=this.Nh(),c=a+b+1,d=2*c;d=hg(d,d);d.shadowOffsetX=d.shadowOffsetY=this.$;d.shadowBlur=b;d.shadowColor="#000";d.beginPath();b=c-this.$;d.arc(b,b,a,0,2*Math.PI,!0);d.fill();this.O=d.canvas.toDataURL();this.T=Array(256);this.u()};
-k.tm=function(a){a=a.context;var b=a.canvas;b=a.getImageData(0,0,b.width,b.height);var c=b.data,d,e;var f=0;for(d=c.length;f<d;f+=4)if(e=4*c[f+3])c[f]=this.c[e],c[f+1]=this.c[e+1],c[f+2]=this.c[e+2];a.putImageData(b,0,0)};k.Fj=function(a){this.set(Qx,a)};k.Lj=function(a){this.set(Ox,a)};k.fd=function(a){this.set(Rx,a)};var Qx="blur",Ox="gradient",Rx="radius";function Sx(a){xg.call(this,a?a:{});this.type="IMAGE"}w(Sx,xg);function Tx(a){a=a?a:{};var b=kb({},a);delete b.preload;delete b.useInterimTilesOnError;xg.call(this,b);this.j(void 0!==a.preload?a.preload:0);this.C(void 0!==a.useInterimTilesOnError?a.useInterimTilesOnError:!0);this.type="TILE"}w(Tx,xg);Tx.prototype.c=function(){return this.get("preload")};Tx.prototype.j=function(a){this.set("preload",a)};Tx.prototype.i=function(){return this.get("useInterimTilesOnError")};Tx.prototype.C=function(a){this.set("useInterimTilesOnError",a)};function W(a){a=a?a:{};var b=a.renderMode||"hybrid";oa(void 0==b||"image"==b||"hybrid"==b||"vector"==b,28);a.declutter&&"image"==b&&(b="hybrid");a.renderMode=b;b=kb({},a);delete b.preload;delete b.useInterimTilesOnError;T.call(this,b);this.T(a.preload?a.preload:0);this.O(a.useInterimTilesOnError?a.useInterimTilesOnError:!0);this.type="VECTOR_TILE"}w(W,T);W.prototype.c=function(){return this.get("preload")};W.prototype.i=function(){return this.get("useInterimTilesOnError")};
-W.prototype.T=function(a){this.set("preload",a)};W.prototype.O=function(a){this.set("useInterimTilesOnError",a)};function Ux(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;oa(a,55);return(a.ka-a.ea+1+g[2]).toString()})}}function Vx(a,b){for(var c=a.length,d=Array(c),e=0;e<c;++e)d[e]=Ux(a[e],b);return Wx(d)}function Wx(a){return 1===a.length?a[0]:function(b,c,d){if(b)return a[wa((b[1]<<b[0])+b[2],a.length)](b,c,d)}}
-function Xx(){}function Yx(a){var b=[],c=/\{([a-z])-([a-z])\}/.exec(a);if(c){var d=c[2].charCodeAt(0),e;for(e=c[1].charCodeAt(0);e<=d;++e)b.push(a.replace(c[0],String.fromCharCode(e)));return b}if(c=c=/\{(\d+)-(\d+)\}/.exec(a)){d=parseInt(c[2],10);for(e=parseInt(c[1],10);e<=d;e++)b.push(a.replace(c[0],e.toString()));return b}b.push(a);return b};function Zx(a,b,c,d){function e(){delete window[g];f.parentNode.removeChild(f)}var f=document.createElement("script"),g="olc_"+x(b);f.async=!0;f.src=a+(-1==a.indexOf("?")?"?":"&")+(d||"callback")+"="+g;var h=setTimeout(function(){e();c&&c()},1E4);window[g]=function(a){clearTimeout(h);e();b(a)};document.getElementsByTagName("head")[0].appendChild(f)};function $x(a){ci.call(this,a)}w($x,ci);$x.prototype.sd=function(a){for(var b,c;di(this);){b=this.g.Pc;c=b.ya[0].toString();var d;if(d=c in a)b=b.ya,d=ma(a[c],b[1],b[2]);if(d)break;else Pc(this.pop())}};function ay(a){if(0!==a.i){var b=a.c.jc.split("/").map(Number)[0];a.forEach(function(a){if(a.ya[0]!==b){var c=a.ya;this.remove(c[0]+"/"+c[1]+"/"+c[2]);Pc(a)}},a)}};function by(a,b,c,d){var e=ac(c,b,a);c=Nb(b,d,c);b=b.Bc();void 0!==b&&(c*=b);b=a.Bc();void 0!==b&&(c/=b);b=a.G();if(!b||Ja(b,e))a=Nb(a,c,e)/c,isFinite(a)&&0<a&&(c/=a);return c}function cy(a,b,c,d){a=c-a;b=d-b;var e=Math.sqrt(a*a+b*b);return[Math.round(c+a/e),Math.round(d+b/e)]}
-function dy(a,b,c,d,e,f,g,h,l,m,n){var p=hg(Math.round(c*a),Math.round(c*b));if(0===l.length)return p.canvas;p.scale(c,c);var q=Da();l.forEach(function(a){Ta(q,a.extent)});var r=hg(Math.round(c*cb(q)/d),Math.round(c*db(q)/d)),u=c/d;l.forEach(function(a){r.drawImage(a.image,m,m,a.image.width-2*m,a.image.height-2*m,(a.extent[0]-q[0])*u,-(a.extent[3]-q[3])*u,cb(a.extent)*u,db(a.extent)*u)});var v=$a(g);h.c.forEach(function(a){var b=a.source,e=a.target,g=b[1][0],h=b[1][1],l=b[2][0],m=b[2][1];a=(e[0][0]-
-v[0])/f;var n=-(e[0][1]-v[1])/f,u=(e[1][0]-v[0])/f,z=-(e[1][1]-v[1])/f,Va=(e[2][0]-v[0])/f,ic=-(e[2][1]-v[1])/f;e=b[0][0];b=b[0][1];g-=e;h-=b;l-=e;m-=b;a:{g=[[g,h,0,0,u-a],[l,m,0,0,Va-a],[0,0,g,h,z-n],[0,0,l,m,ic-n]];h=g.length;for(l=0;l<h;l++){m=l;for(var Xa=Math.abs(g[l][l]),Z=l+1;Z<h;Z++){var Zb=Math.abs(g[Z][l]);Zb>Xa&&(Xa=Zb,m=Z)}if(0===Xa){g=null;break a}Xa=g[m];g[m]=g[l];g[l]=Xa;for(m=l+1;m<h;m++)for(Xa=-g[m][l]/g[l][l],Z=l;Z<h+1;Z++)g[m][Z]=l==Z?0:g[m][Z]+Xa*g[l][Z]}l=Array(h);for(m=h-1;0<=
-m;m--)for(l[m]=g[m][h]/g[m][m],Xa=m-1;0<=Xa;Xa--)g[Xa][h]-=g[Xa][m]*l[m];g=l}g&&(p.save(),p.beginPath(),l=(a+u+Va)/3,m=(n+z+ic)/3,h=cy(l,m,a,n),u=cy(l,m,u,z),Va=cy(l,m,Va,ic),p.moveTo(u[0],u[1]),p.lineTo(h[0],h[1]),p.lineTo(Va[0],Va[1]),p.clip(),p.transform(g[0],g[2],g[1],g[3],a,n),p.translate(q[0]-e,q[3]-b),p.scale(d/c,-d/c),p.drawImage(r.canvas,0,0),p.restore())});n&&(p.save(),p.strokeStyle="black",p.lineWidth=1,h.c.forEach(function(a){var b=a.target;a=(b[0][0]-v[0])/f;var c=-(b[0][1]-v[1])/f,d=
-(b[1][0]-v[0])/f,e=-(b[1][1]-v[1])/f,g=(b[2][0]-v[0])/f;b=-(b[2][1]-v[1])/f;p.beginPath();p.moveTo(d,e);p.lineTo(a,c);p.lineTo(g,b);p.closePath();p.stroke()}),p.restore());return p.canvas};function ey(a,b,c,d,e){this.g=a;this.i=b;var f={},g=Yb(this.i,this.g);this.a=function(a){var b=a[0]+"/"+a[1];f[b]||(f[b]=g(a));return f[b]};this.f=d;this.v=e*e;this.c=[];this.l=!1;this.s=this.g.g&&!!d&&!!this.g.G()&&cb(d)==cb(this.g.G());this.b=this.g.G()?cb(this.g.G()):null;this.j=this.i.G()?cb(this.i.G()):null;a=$a(c);b=Za(c);d=Ya(c);c=Wa(c);e=this.a(a);var h=this.a(b),l=this.a(d),m=this.a(c);fy(this,a,b,d,c,e,h,l,m,10);if(this.l){var n=Infinity;this.c.forEach(function(a){n=Math.min(n,a.source[0][0],
-a.source[1][0],a.source[2][0])});this.c.forEach(function(a){if(Math.max(a.source[0][0],a.source[1][0],a.source[2][0])-n>this.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])<this.b/2&&(a.source=b)}},this)}f={}}
-function fy(a,b,c,d,e,f,g,h,l,m){var n=Ca([f,g,h,l]),p=a.b?cb(n)/a.b:null,q=a.b,r=a.g.g&&.5<p&&1>p,u=!1;if(0<m){if(a.i.c&&a.j){var v=Ca([b,c,d,e]);u|=.25<cb(v)/a.j}!r&&a.g.c&&p&&(u|=.25<p)}if(u||!a.f||hb(n,a.f)){if(!(u||isFinite(f[0])&&isFinite(f[1])&&isFinite(g[0])&&isFinite(g[1])&&isFinite(h[0])&&isFinite(h[1])&&isFinite(l[0])&&isFinite(l[1])))if(0<m)u=!0;else return;if(0<m&&(u||(n=a.a([(b[0]+d[0])/2,(b[1]+d[1])/2]),q=r?(wa(f[0],q)+wa(h[0],q))/2-wa(n[0],q):(f[0]+h[0])/2-n[0],n=(f[1]+h[1])/2-n[1],
-u=q*q+n*n>a.v),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(r=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(r),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),fy(a,b,c,r,n,f,g,q,p,m-1),fy(a,n,r,d,e,p,q,h,l,m-1)):(r=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(r),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),fy(a,b,r,n,e,f,q,p,l,m-1),fy(a,r,c,d,n,q,g,h,p,m-1));return}if(r){if(!a.s)return;a.l=!0}a.c.push({source:[f,h,l],target:[b,d,e]});a.c.push({source:[f,g,h],target:[b,c,d]})}}
-function gy(a){var b=Da();a.c.forEach(function(a){a=a.source;Ea(b,a[0]);Ea(b,a[1]);Ea(b,a[2])});return b};function hy(a,b,c,d,e,f,g,h,l,m,n){cl.call(this,e,0);this.B=void 0!==n?n:!1;this.C=g;this.D=h;this.N=null;this.c=b;this.l=d;this.v=f?f:e;this.a=[];this.Id=null;this.f=0;f=d.Ma(this.v);h=this.l.G();e=this.c.G();f=h?gb(f,h):f;if(0===ab(f))this.state=4;else if((h=a.G())&&(e?e=gb(e,h):e=h),d=by(a,c,eb(f),d.Ta(this.v[0])),!isFinite(d)||0>=d)this.state=4;else if(this.o=new ey(a,c,f,e,d*(void 0!==m?m:.5)),0===this.o.c.length)this.state=4;else if(this.f=b.Dc(d),c=gy(this.o),e&&(a.g?(c[1]=pa(c[1],e[1],e[3]),
-c[3]=pa(c[3],e[1],e[3])):c=gb(c,e)),ab(c)){a=tc(b,c,this.f);for(b=a.fa;b<=a.la;b++)for(c=a.ea;c<=a.ka;c++)(m=l(this.f,b,c,g))&&this.a.push(m);0===this.a.length&&(this.state=4)}else this.state=4}w(hy,cl);hy.prototype.ia=function(){1==this.state&&(this.Id.forEach(Gc),this.Id=null);cl.prototype.ia.call(this)};hy.prototype.Y=function(){return this.N};
-hy.prototype.he=function(){var a=[];this.a.forEach(function(b){b&&2==b.getState()&&a.push({extent:this.c.Ma(b.ya),image:b.Y()})},this);this.a.length=0;if(0===a.length)this.state=3;else{var b=this.v[0],c=this.l.Za(b),d="number"===typeof c?c:c[0];c="number"===typeof c?c:c[1];b=this.l.Ta(b);var e=this.c.Ta(this.f),f=this.l.Ma(this.v);this.N=dy(d,c,this.C,e,this.c.G(),b,f,this.o,a,this.D,this.B);this.state=2}this.u()};
-hy.prototype.load=function(){if(0==this.state){this.state=1;this.u();var a=0;this.Id=[];this.a.forEach(function(b){var c=b.getState();if(0==c||1==c){a++;var d=y(b,"change",function(){var c=b.getState();if(2==c||3==c||4==c)Gc(d),a--,0===a&&(this.Id.forEach(Gc),this.Id=null,this.he())},this);this.Id.push(d)}},this);this.a.forEach(function(a){0==a.getState()&&a.load()});0===a&&setTimeout(this.he.bind(this),0)}};function iy(a){uw.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state,wrapX:a.wrapX});this.bb=void 0!==a.opaque?a.opaque:!1;this.sc=void 0!==a.tilePixelRatio?a.tilePixelRatio:1;this.tileGrid=void 0!==a.tileGrid?a.tileGrid:null;this.a=new $x(a.cacheSize);this.j=[0,0];this.jc="";this.Ea={transition:a.transition}}w(iy,uw);k=iy.prototype;k.cj=function(){return di(this.a)};k.sd=function(a,b){(a=this.Yd(a))&&a.sd(b)};
-function Li(a,b,c,d,e){a=a.Yd(b);if(!a)return!1;b=!0;for(var f,g,h=d.fa;h<=d.la;++h)for(var l=d.ea;l<=d.ka;++l)f=c+"/"+h+"/"+l,g=!1,a.a.hasOwnProperty(f)&&(f=a.get(f),(g=2===f.getState())&&(g=!1!==e(f))),g||(b=!1);return b}k.Zf=function(){return 0};function jy(a,b){a.jc!==b&&(a.jc=b,a.u())}k.eg=function(){return this.bb};k.jb=function(){return this.tileGrid};k.eb=function(a){return this.tileGrid?this.tileGrid:zc(a)};k.Yd=function(a){var b=this.c;return b&&!Xb(b,a)?null:this.a};k.Xc=function(){return this.sc};
-k.Zd=function(a,b,c){c=this.eb(c);b=this.Xc(b);a=Ba(c.Za(a),this.j);return 1==b?a:Aa(a,b,this.j)};function ky(a,b,c){var d=void 0!==c?c:a.c;c=a.eb(d);if(a.D&&d.c){var e=b;b=e[0];a=yc(c,e);d=Dc(d);Ja(d,a)?b=e:(e=cb(d),a[0]+=e*Math.ceil((d[0]-a[0])/e),b=c.jg(a,b))}e=b[0];d=b[1];a=b[2];if(c.minZoom>e||e>c.maxZoom)c=!1;else{var f=c.G();c=(c=f?tc(c,f,e):c.a?c.a[e]:null)?ma(c,d,a):!0}return c?b:null}k.sa=function(){this.a.clear();this.u()};k.kh=ea;function ly(a,b){Qc.call(this,a);this.tile=b}w(ly,Qc);function my(a){iy.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX,transition:a.transition});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.dc?this.dc.bind(this):Xx;this.urls=null;a.urls?this.vb(a.urls):a.url&&this.rb(a.url);a.tileUrlFunction&&this.hb(a.tileUrlFunction);this.V={}}w(my,iy);k=my.prototype;k.yb=function(){return this.tileLoadFunction};
-k.zb=function(){return this.tileUrlFunction};k.Ab=function(){return this.urls};k.dj=function(a){a=a.target;var b=x(a),c=a.getState();if(1==c){this.V[b]=!0;var d="tileloadstart"}else b in this.V&&(delete this.V[b],d=3==c?"tileloaderror":2==c||5==c?"tileloadend":void 0);void 0!=d&&this.b(new ly(d,a))};k.Fb=function(a){this.a.clear();this.tileLoadFunction=a;this.u()};k.hb=function(a,b){this.tileUrlFunction=a;ay(this.a);"undefined"!==typeof b?jy(this,b):this.u()};
-k.rb=function(a){var b=this.urls=Yx(a);this.hb(this.dc?this.dc.bind(this):Vx(b,this.tileGrid),a)};k.vb=function(a){this.urls=a;var b=a.join("\n");this.hb(this.dc?this.dc.bind(this):Vx(a,this.tileGrid),b)};k.kh=function(a,b,c){a=a+"/"+b+"/"+c;this.a.a.hasOwnProperty(a)&&this.a.get(a)};function ny(a){my.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:oy,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX,transition:a.transition});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:el;this.f={};this.s={};this.ob=
-a.reprojectionErrorThreshold;this.O=!1}w(ny,my);k=ny.prototype;k.cj=function(){if(di(this.a))return!0;for(var a in this.f)if(di(this.f[a]))return!0;return!1};k.sd=function(a,b){a=this.Yd(a);this.a.sd(this.a==a?b:{});for(var c in this.f){var d=this.f[c];d.sd(d==a?b:{})}};k.Zf=function(a){return this.c&&a&&!Xb(this.c,a)?0:this.$f()};k.$f=function(){return 0};k.eg=function(a){return this.c&&a&&!Xb(this.c,a)?!1:my.prototype.eg.call(this,a)};
-k.eb=function(a){var b=this.c;return!this.tileGrid||b&&!Xb(b,a)?(b=x(a).toString(),b in this.s||(this.s[b]=zc(a)),this.s[b]):this.tileGrid};k.Yd=function(a){var b=this.c;if(!b||Xb(b,a))return this.a;a=x(a).toString();a in this.f||(this.f[a]=new $x(this.a.highWaterMark));return this.f[a]};
-function py(a,b,c,d,e,f,g){b=[b,c,d];e=(c=ky(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction,a.Ea);e.key=g;y(e,"change",a.dj,a);return e}
-k.ad=function(a,b,c,d,e){var f=this.c;if(f&&e&&!Xb(f,e)){var g=this.Yd(e);c=[a,b,c];var h;a=c[0]+"/"+c[1]+"/"+c[2];g.a.hasOwnProperty(a)&&(h=g.get(a));b=this.jc;if(h&&h.key==b)return h;var l=this.eb(f),m=this.eb(e),n=ky(this,c,e);d=new hy(f,l,e,m,c,n,this.Xc(d),this.$f(),function(a,b,c,d){return qy(this,a,b,c,d,f)}.bind(this),this.ob,this.O);d.key=b;h?(d.g=h,dl(d),g.replace(a,d)):g.set(a,d);return d}return qy(this,a,b,c,d,f||e)};
-function qy(a,b,c,d,e,f){var g=b+"/"+c+"/"+d,h=a.jc;if(a.a.a.hasOwnProperty(g)){var l=a.a.get(g);if(l.key!=h){var m=l;l=py(a,b,c,d,e,f,h);0==m.getState()?l.g=m.g:l.g=m;dl(l);a.a.replace(g,l)}}else l=py(a,b,c,d,e,f,h),a.a.set(g,l);return l}k.Qb=function(a){if(this.O!=a){this.O=a;for(var b in this.f)this.f[b].clear();this.u()}};k.Rb=function(a,b){if(a=Ob(a))a=x(a).toString(),a in this.s||(this.s[a]=b)};function oy(a,b){a.Y().src=b};function ry(a){this.i=void 0!==a.hidpi?a.hidpi:!1;ny.call(this,{cacheSize:a.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Ob("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,tilePixelRatio:this.i?2:1,wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition});this.o=void 0!==a.culture?a.culture:"en-us";this.$=void 0!==a.maxZoom?a.maxZoom:-1;this.l=a.key;this.B=a.imagerySet;Zx("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+
-this.B+"?uriScheme=https&include=ImageryProviders&key="+this.l+"&c="+this.o,this.La.bind(this),void 0,"jsonp")}w(ry,ny);ry.prototype.ca=function(){return this.l};ry.prototype.ua=function(){return this.B};
-ry.prototype.La=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)ww(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0];a=-1==this.$?c.zoomMax:this.$;var d=Dc(this.c);this.tileGrid=Bc({extent:d,minZoom:c.zoomMin,maxZoom:a,tileSize:(c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight])/
-(this.i?2:1)});var e=this.o,f=this.i;this.tileUrlFunction=Wx(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",e);return function(a){if(a)return oc(a[0],a[1],-a[2]-1,b),a=d,f&&(a+="&dpi=d1&device=mobile"),a.replace("{quadkey}",pc(b))}}));if(c.imageryProviders){var g=Pb(Ob("EPSG:4326"),this.c);this.va(function(a){var b=[],d=a.viewState.zoom;c.imageryProviders.map(function(c){for(var e=!1,f=c.coverageAreas,h=0,l=f.length;h<l;++h){var m=f[h];
-if(d>=m.zoomMin&&d<=m.zoomMax&&(m=m.bbox,m=jb([m[1],m[0],m[3],m[2]],g),hb(m,a.extent))){e=!0;break}}e&&b.push(c.attribution)});b.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html">Terms of Use</a>');return b})}this.T=b;ww(this,"ready")}};function sy(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:Bc({extent:Dc(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,
-wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition})}w(sy,ny);function ty(a){this.o=a.account;this.B=a.map||"";this.i=a.config||{};this.l={};sy.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});uy(this)}w(ty,sy);k=ty.prototype;k.nl=function(){return this.i};k.Sq=function(a){kb(this.i,a);uy(this)};k.uq=function(a){this.i=a||{};uy(this)};
-function uy(a){var b=JSON.stringify(a.i);if(a.l[b])vy(a,a.l[b]);else{var c="https://"+a.o+".carto.com/api/v1/map";a.B&&(c+="/named/"+a.B);var d=new XMLHttpRequest;d.addEventListener("load",a.em.bind(a,b));d.addEventListener("error",a.dm.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.i))}}
-k.em=function(a,b){b=b.target;if(!b.status||200<=b.status&&300>b.status){try{var c=JSON.parse(b.responseText)}catch(d){ww(this,"error");return}vy(this,c);this.l[a]=c;ww(this,"ready")}else ww(this,"error")};k.dm=function(){ww(this,"error")};function vy(a,b){a.rb("https://"+b.cdn_url.https+"/"+a.o+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function X(a){U.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.resolution=void 0;this.distance=void 0!==a.distance?a.distance:20;this.features=[];this.geometryFunction=a.geometryFunction||function(a){a=a.U();oa(a instanceof C,10);return a};this.source=a.source;this.source.I("change",X.prototype.sa,this)}w(X,U);k=X.prototype;k.Eo=function(){return this.distance};k.Fo=function(){return this.source};
-k.ae=function(a,b,c){this.source.ae(a,b,c);b!==this.resolution&&(this.clear(),this.resolution=b,wy(this),this.Qc(this.features))};k.vq=function(a){this.distance=a;this.sa()};k.sa=function(){this.clear();wy(this);this.Qc(this.features);U.prototype.sa.call(this)};
-function wy(a){if(void 0!==a.resolution){a.features.length=0;for(var b=Da(),c=a.distance*a.resolution,d=a.source.ee(),e={},f=0,g=d.length;f<g;f++){var h=d[f];x(h).toString()in e||!(h=a.geometryFunction(h))||(h=h.W(),Pa(h,b),Fa(b,c,b),h=a.source.Yf(b),h=h.filter(function(a){a=x(a).toString();return a in e?!1:e[a]=!0}),a.features.push(xy(a,h)))}}}
-function xy(a,b){for(var c=[0,0],d=b.length-1;0<=d;--d){var e=a.geometryFunction(b[d]);e?ze(c,e.W()):b.splice(d,1)}Ge(c,1/b.length);a=new Hk(new C(c));a.set("features",b);return a};function yy(a,b,c,d,e,f){this.s=b;this.l=a.G();var g=b.G(),h=g?gb(c,g):c;g=by(a,b,eb(h),d);this.f=new ey(a,b,h,this.l,.5*g);this.c=d;this.g=c;a=gy(this.f);this.j=(this.Tb=f(a,g,e))?this.Tb.a:1;this.je=this.i=null;e=2;this.Tb&&(e=0);$h.call(this,c,d,this.j,e)}w(yy,$h);yy.prototype.ia=function(){1==this.state&&(Gc(this.je),this.je=null);$h.prototype.ia.call(this)};yy.prototype.Y=function(){return this.i};
-yy.prototype.he=function(){var a=this.Tb.getState();2==a&&(this.i=dy(cb(this.g)/this.c,db(this.g)/this.c,this.j,this.Tb.resolution,0,this.c,this.g,this.f,[{extent:this.Tb.G(),image:this.Tb.Y()}],0));this.state=a;this.u()};yy.prototype.load=function(){if(0==this.state){this.state=1;this.u();var a=this.Tb.getState();2==a||3==a?this.he():(this.je=y(this.Tb,"change",function(){var a=this.Tb.getState();if(2==a||3==a)Gc(this.je),this.je=null,this.he()},this),this.Tb.load())}};function zy(a){uw.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,state:a.state});this.o=void 0!==a.resolutions?a.resolutions:null;this.i=null;this.ua=0}w(zy,uw);function Ay(a,b){a.o&&(b=a.o[fc(a.o,b,0)]);return b}
-zy.prototype.Y=function(a,b,c,d){var e=this.c;if(e&&d&&!Xb(e,d)){if(this.i){if(this.ua==this.g&&Xb(this.i.s,d)&&this.i.resolution==b&&Sa(this.i.G(),a))return this.i;Pc(this.i);this.i=null}this.i=new yy(e,d,a,b,c,function(a,b,c){return this.Wc(a,b,c,e)}.bind(this));this.ua=this.g;return this.i}e&&(d=e);return this.Wc(a,b,c,d)};zy.prototype.j=function(a){a=a.target;switch(a.getState()){case 1:this.b(new By(Cy,a));break;case 2:this.b(new By(Dy,a));break;case 3:this.b(new By(Ey,a))}};
-function Fy(a,b){a.Y().src=b}function By(a,b){Qc.call(this,a);this.image=b}w(By,Qc);var Cy="imageloadstart",Dy="imageloadend",Ey="imageloaderror";function Gy(a,b){var c=[];Object.keys(b).forEach(function(a){null!==b[a]&&void 0!==b[a]&&c.push(a+"="+encodeURIComponent(b[a]))});var d=c.join("&");a=a.replace(/[?&]$/,"");a=-1===a.indexOf("?")?a+"?":a+"&";return a+d};function Hy(a){a=a||{};zy.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.V=void 0!==a.crossOrigin?a.crossOrigin:null;this.$=void 0!==a.hidpi?a.hidpi:!0;this.a=a.url;this.f=void 0!==a.imageLoadFunction?a.imageLoadFunction:Fy;this.s=a.params||{};this.M=null;this.l=[0,0];this.O=0;this.B=void 0!==a.ratio?a.ratio:1.5}w(Hy,zy);k=Hy.prototype;k.Ho=function(){return this.s};
-k.Wc=function(a,b,c,d){if(void 0===this.a)return null;b=Ay(this,b);c=this.$?c:1;var e=this.M;if(e&&this.O==this.g&&e.resolution==b&&e.a==c&&La(e.G(),a))return e;e={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};kb(e,this.s);a=a.slice();var f=(a[0]+a[2])/2,g=(a[1]+a[3])/2;if(1!=this.B){var h=this.B*cb(a)/2,l=this.B*db(a)/2;a[0]=f-h;a[1]=g-l;a[2]=f+h;a[3]=g+l}h=b/c;l=Math.ceil(cb(a)/h);var m=Math.ceil(db(a)/h);a[0]=f-h*l/2;a[2]=f+h*l/2;a[1]=g-h*m/2;a[3]=g+h*m/2;this.l[0]=l;this.l[1]=m;f=a;g=this.l;h=c;d=
-d.wb.split(":").pop();e.SIZE=g[0]+","+g[1];e.BBOX=f.join(",");e.BBOXSR=d;e.IMAGESR=d;e.DPI=Math.round(90*h);d=this.a;f=d.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");f==d&&oa(!1,50);e=Gy(f,e);this.M=new bl(a,b,c,e,this.V,this.f);this.O=this.g;y(this.M,"change",this.j,this);return this.M};k.Go=function(){return this.f};k.Io=function(){return this.a};k.Jo=function(a){this.M=null;this.f=a;this.u()};
-k.Ko=function(a){a!=this.a&&(this.a=a,this.M=null,this.u())};k.Lo=function(a){kb(this.s,a);this.M=null;this.u()};function Iy(a){zy.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions,state:a.state});this.Ea=a.canvasFunction;this.V=null;this.$=0;this.La=void 0!==a.ratio?a.ratio:1.5}w(Iy,zy);Iy.prototype.Wc=function(a,b,c,d){b=Ay(this,b);var e=this.V;if(e&&this.$==this.g&&e.resolution==b&&e.a==c&&La(e.G(),a))return e;a=a.slice();ib(a,this.La);(d=this.Ea(a,b,c,[cb(a)/b*c,db(a)/b*c],d))&&(e=new ai(a,b,c,d));this.V=e;this.$=this.g;return e};function Jy(a){zy.call(this,{projection:a.projection,resolutions:a.resolutions});this.V=void 0!==a.crossOrigin?a.crossOrigin:null;this.l=void 0!==a.displayDpi?a.displayDpi:96;this.f=a.params||{};this.O=a.url;this.a=void 0!==a.imageLoadFunction?a.imageLoadFunction:Fy;this.$=void 0!==a.hidpi?a.hidpi:!0;this.ca=void 0!==a.metersPerUnit?a.metersPerUnit:1;this.s=void 0!==a.ratio?a.ratio:1;this.Ea=void 0!==a.useOverlay?a.useOverlay:!1;this.M=null;this.B=0}w(Jy,zy);k=Jy.prototype;k.No=function(){return this.f};
-k.Wc=function(a,b,c){b=Ay(this,b);c=this.$?c:1;var d=this.M;if(d&&this.B==this.g&&d.resolution==b&&d.a==c&&La(d.G(),a))return d;1!=this.s&&(a=a.slice(),ib(a,this.s));var e=[cb(a)/b*c,db(a)/b*c];if(void 0!==this.O){d=this.O;var f=eb(a),g=this.ca,h=cb(a),l=db(a),m=e[0],n=e[1],p=.0254/this.l;e={OPERATION:this.Ea?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(e[0]),SETDISPLAYHEIGHT:Math.round(e[1]),
-SETVIEWSCALE:n*h>m*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};kb(e,this.f);d=Gy(d,e);d=new bl(a,b,c,d,this.V,this.a);y(d,"change",this.j,this)}else d=null;this.M=d;this.B=this.g;return d};k.Mo=function(){return this.a};k.Po=function(a){kb(this.f,a);this.u()};k.Oo=function(a){this.M=null;this.a=a;this.u()};function Ky(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=void 0!==a.imageLoadFunction?a.imageLoadFunction:Fy;zy.call(this,{attributions:a.attributions,logo:a.logo,projection:Ob(a.projection)});this.M=new bl(b,void 0,1,a.url,c,d);this.a=a.imageSize?a.imageSize:null;y(this.M,"change",this.j,this)}w(Ky,zy);Ky.prototype.Wc=function(a){return hb(a,this.M.G())?this.M:null};
-Ky.prototype.j=function(a){if(2==this.M.getState()){var b=this.M.G(),c=this.M.Y();if(this.a){var d=this.a[0];var e=this.a[1]}else d=c.width,e=c.height;b=Math.ceil(cb(b)/(db(b)/e));if(b!=d){b=hg(b,e);var f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.M.ih(f)}}zy.prototype.j.call(this,a)};function Ly(a){this.a=a.source;this.ob=We();this.f=hg();this.l=[0,0];this.ca=rj.Jc(9);this.bb=void 0==a.renderBuffer?100:a.renderBuffer;this.B=null;Iy.call(this,{attributions:a.attributions,canvasFunction:this.Mk.bind(this),logo:a.logo,projection:a.projection,ratio:a.ratio,resolutions:a.resolutions,state:this.a.getState()});this.O=null;this.s=void 0;this.aj(a.style);y(this.a,"change",this.To,this)}w(Ly,Iy);k=Ly.prototype;
-k.Mk=function(a,b,c,d,e){var f=new Vj(.5*b/c,a,b,c,this.a.$,this.ca,this.bb);this.a.ae(a,b,e);var g=!1;this.a.ec(a,function(a){var d;if(!(d=g)){var e;(d=a.ib())?e=d.call(a,b):this.s&&(e=this.s(a,b));if(e){var h,p=!1;Array.isArray(e)||(e=[e]);d=0;for(h=e.length;d<h;++d)p=ek(f,a,e[d],dk(b,c),this.So,this)||p;d=p}else d=!1}g=d},this);Zj(f);if(g)return null;this.l[0]!=d[0]||this.l[1]!=d[1]?(this.f.canvas.width=d[0],this.f.canvas.height=d[1],this.l[0]=d[0],this.l[1]=d[1]):this.f.clearRect(0,0,d[0],d[1]);
-this.ca.clear();a=My(this,eb(a),b,c,d);f.Na(this.f,a,0,{});this.B=f;return this.f.canvas};k.wa=function(a,b,c,d,e,f){if(this.B){var g={};return this.B.wa(a,b,0,d,e,function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,f(a)},null)}};k.Qo=function(){return this.a};k.Ro=function(){return this.O};k.ib=function(){return this.s};function My(a,b,c,d,e){c=d/c;return ef(a.ob,e[0]/2,e[1]/2,c,-c,0,-b[0],-b[1])}k.So=function(){this.u()};k.To=function(){ww(this,this.a.getState())};
-k.aj=function(a){this.O=void 0!==a?a:Fk;this.s=a?Dk(this.O):void 0;this.u()};function Ny(a){a=a||{};zy.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.ca=void 0!==a.crossOrigin?a.crossOrigin:null;this.f=a.url;this.s=void 0!==a.imageLoadFunction?a.imageLoadFunction:Fy;this.a=a.params||{};this.l=!0;Oy(this);this.$=a.serverType;this.Ea=void 0!==a.hidpi?a.hidpi:!0;this.M=null;this.B=[0,0];this.V=0;this.O=void 0!==a.ratio?a.ratio:1.5}w(Ny,zy);var Py=[101,101];k=Ny.prototype;
-k.Uo=function(a,b,c,d){if(void 0!==this.f){c=Ob(c);var e=this.c;e&&e!==c&&(b=by(e,c,a,b),a=ac(a,c,e));var f=fb(a,b,0,Py),g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.a.LAYERS};kb(g,this.a,d);d=Math.floor((f[3]-a[1])/b);g[this.l?"I":"X"]=Math.floor((a[0]-f[0])/b);g[this.l?"J":"Y"]=d;return Qy(this,f,Py,1,e||c,g)}};k.Wo=function(){return this.a};
-k.Wc=function(a,b,c,d){if(void 0===this.f)return null;b=Ay(this,b);1==c||this.Ea&&void 0!==this.$||(c=1);var e=b/c,f=eb(a),g=fb(f,e,0,[Math.ceil(cb(a)/e),Math.ceil(db(a)/e)]);a=fb(f,e,0,[Math.ceil(this.O*cb(a)/e),Math.ceil(this.O*db(a)/e)]);if((f=this.M)&&this.V==this.g&&f.resolution==b&&f.a==c&&La(f.G(),g))return f;g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};kb(g,this.a);this.B[0]=Math.round(cb(a)/e);this.B[1]=Math.round(db(a)/e);d=Qy(this,a,this.B,c,d,g);
-this.M=new bl(a,b,c,d,this.ca,this.s);this.V=this.g;y(this.M,"change",this.j,this);return this.M};k.Vo=function(){return this.s};
-function Qy(a,b,c,d,e,f){oa(void 0!==a.f,9);f[a.l?"CRS":"SRS"]=e.wb;"STYLES"in a.a||(f.STYLES="");if(1!=d)switch(a.$){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:oa(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.l&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return Gy(a.f,f)}k.Xo=function(){return this.f};
-k.Yo=function(a){this.M=null;this.s=a;this.u()};k.Zo=function(a){a!=this.f&&(this.f=a,this.M=null,this.u())};k.$o=function(a){kb(this.a,a);Oy(this);this.M=null;this.u()};function Oy(a){a.l=0<=ye(a.a.VERSION||"1.3.0")};function Ry(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=['&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'];sy.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",
-wrapX:a.wrapX})}w(Ry,sy);rj.nf={};rj.nf.Hf=function(){};
-(function(a){function b(a,b,c){if(g)return new ImageData(a,b,c);b=h.createImageData(b,c);b.data.set(a);return b}function c(a){var b=!0;try{new ImageData(10,10)}catch(n){b=!1}return function(c){var d=c.buffers,e=c.meta,f=c.width,g=c.height,h=d.length,l=d[0].byteLength;if(c.imageOps){l=Array(h);for(c=0;c<h;++c){var m=c;var n=new Uint8ClampedArray(d[c]);var S=f,Ia=g;n=b?new ImageData(n,S,Ia):{data:n,width:S,height:Ia};l[m]=n}f=a(l,e).data}else{f=new Uint8ClampedArray(l);g=Array(h);m=Array(h);for(c=0;c<
-h;++c)g[c]=new Uint8ClampedArray(d[c]),m[c]=[0,0,0,0];for(d=0;d<l;d+=4){for(c=0;c<h;++c)n=g[c],m[c][0]=n[d],m[c][1]=n[d+1],m[c][2]=n[d+2],m[c][3]=n[d+3];c=a(m,e);f[d]=c[0];f[d+1]=c[1];f[d+2]=c[2];f[d+3]=c[3]}}return f.buffer}}function d(a,b){var d=Object.keys(a.lib||{}).map(function(b){return"var "+b+" = "+a.lib[b].toString()+";"}).concat(["var __minion__ = ("+c.toString()+")(",a.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);",
-"  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]);d=URL.createObjectURL(new Blob(d,{type:"text/javascript"}));d=new Worker(d);d.addEventListener("message",b);return d}function e(a,b){var d=c(a.operation);return{postMessage:function(a){setTimeout(function(){b({data:{buffer:d(a),meta:a.meta}})},0)}}}function f(a){this.Jf=!!a.Cm;var b;0===a.threads?b=0:this.Jf?b=1:b=a.threads||1;var c=[];if(b)for(var f=0;f<b;++f)c[f]=d(a,this.xh.bind(this,f));else c[0]=e(a,this.xh.bind(this,
-0));this.we=c;this.Nd=[];this.Bk=a.Sp||Infinity;this.ve=0;this.od={};this.Kf=null}var g=!0;try{new ImageData(10,10)}catch(l){g=!1}var h=document.createElement("canvas").getContext("2d");f.prototype.Rp=function(a,b,c){this.zk({inputs:a,ii:b,callback:c});this.uh()};f.prototype.zk=function(a){for(this.Nd.push(a);this.Nd.length>this.Bk;)this.Nd.shift().callback(null,null)};f.prototype.uh=function(){if(0===this.ve&&0<this.Nd.length){var a=this.Kf=this.Nd.shift(),b=a.inputs[0].width,c=a.inputs[0].height,
-d=a.inputs.map(function(a){return a.data.buffer}),e=this.we.length;this.ve=e;if(1===e)this.we[0].postMessage({buffers:d,meta:a.ii,imageOps:this.Jf,width:b,height:c},d);else for(var f=4*Math.ceil(a.inputs[0].data.length/4/e),g=0;g<e;++g){for(var h=g*f,z=[],A=0,E=d.length;A<E;++A)z.push(d[g].slice(h,h+f));this.we[g].postMessage({buffers:z,meta:a.ii,imageOps:this.Jf,width:b,height:c},z)}}};f.prototype.xh=function(a,b){this.hr||(this.od[a]=b.data,--this.ve,0===this.ve&&this.Ck())};f.prototype.Ck=function(){var a=
-this.Kf,c=this.we.length;if(1===c){var d=new Uint8ClampedArray(this.od[0].buffer);var e=this.od[0].meta}else{var f=a.inputs[0].data.length;d=new Uint8ClampedArray(f);e=Array(f);f=4*Math.ceil(f/4/c);for(var g=0;g<c;++g){var h=g*f;d.set(new Uint8ClampedArray(this.od[g].buffer),h);e[g]=this.od[g].meta}}this.Kf=null;this.od={};a.callback(null,b(d,a.inputs[0].width,a.inputs[0].height),e);this.uh()};a["default"]={Hf:f};a.Hf=f})(rj.nf=rj.nf||{});function Sy(a){this.B=null;this.Ea=void 0!==a.operationType?a.operationType:"pixel";this.La=void 0!==a.threads?a.threads:1;this.f=Ty(a.sources);for(var b=0,c=this.f.length;b<c;++b)y(this.f[b],"change",this.u,this);this.$=new le(function(){return 1},this.u.bind(this));b=Uy(this.f);c={};for(var d=0,e=b.length;d<e;++d)c[x(b[d].layer)]=b[d];this.a=null;this.O={animate:!1,coordinateToPixelTransform:We(),extent:null,focus:null,index:0,layerStates:c,layerStatesArray:b,logos:{},pixelRatio:1,pixelToCoordinateTransform:We(),
-postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.$,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}};zy.call(this,{});void 0!==a.operation&&this.s(a.operation,a.lib)}w(Sy,zy);Sy.prototype.s=function(a,b){this.B=new rj.nf.Hf({operation:a,Cm:"image"===this.Ea,Sp:1,lib:b,threads:this.La});this.u()};
-Sy.prototype.Y=function(a,b,c,d){c=!0;for(var e,f=0,g=this.f.length;f<g;++f)if(e=this.f[f].a.ha(),"ready"!==e.getState()){c=!1;break}if(!c)return null;c=kb({},this.O);c.viewState=kb({},c.viewState);e=eb(a);c.extent=a.slice();c.focus=e;c.size[0]=Math.round(cb(a)/b);c.size[1]=Math.round(db(a)/b);c.time=Date.now();c.animate=!1;f=c.viewState;f.center=e;f.projection=d;f.resolution=b;this.l=c;this.a&&(d=this.a.resolution,e=this.a.G(),b===d&&Sa(a,e)||(this.a=null));if(!this.a||this.g!==this.V)a:{a=this.l;
-d=this.f.length;b=Array(d);for(e=0;e<d;++e){f=this.f[e];g=a;var h=a.layerStatesArray[e];if(f.$c(g,h)){var l=g.size[0],m=g.size[1];if(Vy){var n=Vy.canvas;n.width!==l||n.height!==m?Vy=hg(l,m):Vy.clearRect(0,0,l,m)}else Vy=hg(l,m);f.df(g,h,Vy);f=Vy.getImageData(0,0,l,m)}else f=null;if(f)b[e]=f;else break a}d={};this.b(new Wy(Xy,a,d));this.B.Rp(b,d,this.ca.bind(this,a))}me(c.tileQueue,16,16);c.animate&&requestAnimationFrame(this.u.bind(this));return this.a};
-Sy.prototype.ca=function(a,b,c,d){if(!b&&c){b=a.extent;var e=a.viewState.resolution;if(e===this.l.viewState.resolution&&Sa(b,this.l.extent)){if(this.a)var f=this.a.Y().getContext("2d");else f=hg(Math.round(cb(b)/e),Math.round(db(b)/e)),this.a=new ai(b,e,1,f.canvas);f.putImageData(c,0,0);this.u();this.V=this.g;this.b(new Wy(Yy,a,d))}}};var Vy=null;function Uy(a){return a.map(function(a){return lg(a.a)})}
-function Ty(a){for(var b=a.length,c=Array(b),d=0;d<b;++d){var e=d,f=a[d],g=null;f instanceof iy?(f=new Tx({source:f}),g=new mj(f)):f instanceof zy&&(f=new Sx({source:f}),g=new bj(f));c[e]=g}return c}function Wy(a,b,c){Qc.call(this,a);this.extent=b.extent;this.resolution=b.viewState.resolution/b.pixelRatio;this.data=c}w(Wy,Qc);Sy.prototype.Wc=function(){return null};var Xy="beforeoperations",Yy="afteroperations";function Zy(a){var b=a.layer.indexOf("-");b=$y[-1==b?a.layer:a.layer.slice(0,b)];var c=az[a.layer];sy.call(this,{attributions:bz,cacheSize:a.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=a.maxZoom?a.maxZoom:b.maxZoom,minZoom:void 0!=a.minZoom?a.minZoom:b.minZoom,opaque:c.opaque,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+a.layer+"/{z}/{x}/{y}."+c.Ob,wrapX:a.wrapX})}w(Zy,sy);
-var bz=['Map tiles by <a href="https://stamen.com/">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.','&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.'],az={terrain:{Ob:"jpg",opaque:!0},"terrain-background":{Ob:"jpg",opaque:!0},"terrain-labels":{Ob:"png",opaque:!1},"terrain-lines":{Ob:"png",opaque:!1},"toner-background":{Ob:"png",opaque:!0},toner:{Ob:"png",opaque:!0},"toner-hybrid":{Ob:"png",opaque:!1},"toner-labels":{Ob:"png",
-opaque:!1},"toner-lines":{Ob:"png",opaque:!1},"toner-lite":{Ob:"png",opaque:!0},watercolor:{Ob:"jpg",opaque:!0}},$y={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function cz(a){a=a||{};ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition});this.i=a.params||{};this.l=Da();jy(this,dz(this))}w(cz,ny);function dz(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}cz.prototype.o=function(){return this.i};
-cz.prototype.Xc=function(a){return a};
-cz.prototype.dc=function(a,b,c){var d=this.tileGrid;d||(d=this.eb(c));if(!(d.b.length<=a[0])){var e=d.Ma(a,this.l),f=Ba(d.Za(a[0]),this.j);1!=b&&(f=Aa(f,b,this.j));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};kb(d,this.i);var g=this.urls;g?(c=c.wb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=(1==g.length?g[0]:g[wa((a[1]<<a[0])+a[2],g.length)]).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),
-a=Gy(a,d)):a=void 0;return a}};cz.prototype.B=function(a){kb(this.i,a);jy(this,dz(this))};function ez(a){iy.call(this,{opaque:!1,projection:a.projection,tileGrid:a.tileGrid,wrapX:void 0!==a.wrapX?a.wrapX:!0})}w(ez,iy);ez.prototype.ad=function(a,b,c){var d=a+"/"+b+"/"+c;if(this.a.a.hasOwnProperty(d))return this.a.get(d);var e=Ba(this.tileGrid.Za(a));a=[a,b,c];b=(b=ky(this,a))?ky(this,b).toString():"";e=new fz(a,e,b);this.a.set(d,e);return e};function fz(a,b,c){cl.call(this,a,2);this.c=b;this.ta=c;this.a=null}w(fz,cl);
-fz.prototype.Y=function(){if(this.a)return this.a;var a=this.c,b=hg(a[0],a[1]);b.strokeStyle="black";b.strokeRect(.5,.5,a[0]+.5,a[1]+.5);b.fillStyle="black";b.textAlign="center";b.textBaseline="middle";b.font="24px sans-serif";b.fillText(this.ta,a[0]/2,a[1]/2);return this.a=b.canvas};fz.prototype.load=function(){};function gz(a){this.i=null;ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,projection:Ob("EPSG:3857"),reprojectionErrorThreshold:a.reprojectionErrorThreshold,state:"loading",tileLoadFunction:a.tileLoadFunction,wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition});if(a.url)if(a.jsonp)Zx(a.url,this.Cg.bind(this),this.ef.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.bp.bind(this));b.addEventListener("error",this.ap.bind(this));
-b.open("GET",a.url);b.send()}else a.tileJSON?this.Cg(a.tileJSON):oa(!1,51)}w(gz,ny);k=gz.prototype;k.bp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.ef();return}this.Cg(b)}else this.ef()};k.ap=function(){this.ef()};k.Sl=function(){return this.i};
-k.Cg=function(a){var b=Ob("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Pb(b,c);d=jb(a.bounds,d)}var e=a.minzoom||0,f=a.maxzoom||22;this.tileGrid=c=Bc({extent:Dc(c),maxZoom:f,minZoom:e});this.tileUrlFunction=Vx(a.tiles,c);if(void 0!==a.attribution&&!this.C){var g=void 0!==d?d:b.G();this.va(function(b){return hb(g,b.extent)?[a.attribution]:null})}this.i=a;ww(this,"ready")};k.ef=function(){ww(this,"error")};function hz(a){iy.call(this,{projection:Ob("EPSG:3857"),state:"loading"});this.s=void 0!==a.preemptive?a.preemptive:!0;this.l=Xx;this.f=void 0;this.i=a.jsonp||!1;if(a.url)if(this.i)Zx(a.url,this.Dg.bind(this),this.ff.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.gp.bind(this));b.addEventListener("error",this.fp.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.Dg(a.tileJSON):oa(!1,51)}w(hz,iy);k=hz.prototype;
-k.gp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.ff();return}this.Dg(b)}else this.ff()};k.fp=function(){this.ff()};k.Pl=function(){return this.f};k.al=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.Le(a,b),iz(this.ad(b[0],b[1],b[2],1,this.c),a,c,d,e)):!0===e?setTimeout(function(){c.call(d,null)},0):c.call(d,null)};k.ff=function(){ww(this,"error")};
-k.Dg=function(a){var b=Ob("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Pb(b,c);d=jb(a.bounds,d)}var e=a.minzoom||0,f=a.maxzoom||22;this.tileGrid=c=Bc({extent:Dc(c),maxZoom:f,minZoom:e});this.f=a.template;if(e=a.grids){this.l=Vx(e,c);if(void 0!==a.attribution){var g=void 0!==d?d:b.G();this.va(function(b){return hb(g,b.extent)?[a.attribution]:null})}ww(this,"ready")}else ww(this,"error")};
-k.ad=function(a,b,c,d,e){var f=a+"/"+b+"/"+c;if(this.a.a.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=ky(this,a,e);d=this.l(b,d,e);d=new jz(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Ma(a),this.s,this.i);this.a.set(f,d);return d};k.kh=function(a,b,c){a=a+"/"+b+"/"+c;this.a.a.hasOwnProperty(a)&&this.a.get(a)};function jz(a,b,c,d,e,f){cl.call(this,a,b);this.v=c;this.a=d;this.N=e;this.c=this.l=this.f=null;this.o=f}w(jz,cl);k=jz.prototype;k.Y=function(){return null};
-k.getData=function(a){if(!this.f||!this.l)return null;var b=this.f[Math.floor((1-(a[1]-this.a[1])/(this.a[3]-this.a[1]))*this.f.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.a[0])/(this.a[2]-this.a[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.l&&(b=this.l[b],this.c&&b in this.c?a=this.c[b]:a=b);return a};
-function iz(a,b,c,d,e){0==a.state&&!0===e?(Lc(a,"change",function(){c.call(d,this.getData(b))},a),kz(a)):!0===e?setTimeout(function(){c.call(d,this.getData(b))}.bind(a),0):c.call(d,a.getData(b))}k.lb=function(){return this.v};k.Ne=function(){this.state=3;this.u()};k.bj=function(a){this.f=a.grid;this.l=a.keys;this.c=a.data;this.state=4;this.u()};
-function kz(a){if(0==a.state)if(a.state=1,a.o)Zx(a.v,a.bj.bind(a),a.Ne.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.ep.bind(a));b.addEventListener("error",a.cp.bind(a));b.open("GET",a.v);b.send()}}k.ep=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.Ne();return}this.bj(b)}else this.Ne()};k.cp=function(){this.Ne()};k.load=function(){this.N&&kz(this)};function lz(a){a=a||{};var b=a.params||{};ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:a.tileClass,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0,transition:a.transition});this.o=void 0!==a.gutter?a.gutter:0;this.i=b;this.l=!0;this.B=a.serverType;
-this.$=void 0!==a.hidpi?a.hidpi:!0;this.ca=Da();mz(this);jy(this,nz(this))}w(lz,ny);k=lz.prototype;
-k.hp=function(a,b,c,d){c=Ob(c);var e=this.c,f=this.tileGrid;f||(f=this.eb(c));b=f.Le(a,b);if(!(f.b.length<=b[0])){var g=f.Ta(b[0]),h=f.Ma(b,this.ca);f=Ba(f.Za(b[0]),this.j);var l=this.o;0!==l&&(f=za(f,l,this.j),h=Fa(h,g*l,h));e&&e!==c&&(g=by(e,c,a,g),h=bc(h,c,e),a=ac(a,c,e));l={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};kb(l,this.i,d);d=Math.floor((h[3]-a[1])/g);l[this.l?"I":"X"]=Math.floor((a[0]-h[0])/g);l[this.l?"J":"Y"]=
-d;return oz(this,b,f,h,1,e||c,l)}};k.$f=function(){return this.o};k.ip=function(){return this.i};
-function oz(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.l?"CRS":"SRS"]=f.wb;"STYLES"in a.i||(g.STYLES="");if(1!=e)switch(a.B){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:oa(!1,52)}f=f.b;a.l&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return Gy(1==h.length?h[0]:h[wa((b[1]<<
-b[0])+b[2],h.length)],g)}}k.Xc=function(a){return this.$&&void 0!==this.B?a:1};function nz(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}
-k.dc=function(a,b,c){var d=this.tileGrid;d||(d=this.eb(c));if(!(d.b.length<=a[0])){1==b||this.$&&void 0!==this.B||(b=1);var e=d.Ta(a[0]),f=d.Ma(a,this.ca);d=Ba(d.Za(a[0]),this.j);var g=this.o;0!==g&&(d=za(d,g,this.j),f=Fa(f,e*g,f));1!=b&&(d=Aa(d,b,this.j));e={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};kb(e,this.i);return oz(this,a,d,f,b,c,e)}};k.jp=function(a){kb(this.i,a);mz(this);jy(this,nz(this))};function mz(a){a.l=0<=ye(a.i.VERSION||"1.3.0")};function pz(a,b,c,d,e,f,g,h,l,m,n,p,q,r,u){cl.call(this,a,b,u);this.v={};this.o={};this.c=m;this.a=[];this.D=c;this.l=f;this.f=[];this.N=[];if(f){var v=l.Ma(f),z=l.Ta(a[0]);h.Vf(v,h.Dc(z),function(a){var b=gb(v,h.Ma(a)),c=h.G();c&&(b=gb(b,c));.5<=cb(b)/z&&.5<=db(b)/z&&(b=a.toString(),c=m[b],c||(c=g(a,n,p),c=m[b]=new q(a,void 0==c?4:0,void 0==c?"":c,d,e),this.N.push(y(c,"change",r))),c.c++,this.a.push(b))}.bind(this))}}w(pz,cl);k=pz.prototype;
-k.ia=function(){for(var a=0,b=this.a.length;a<b;++a){var c=this.a[a],d=this.c[c];d.c--;0==d.c&&(delete this.c[c],Pc(d))}this.a.length=0;this.c=null;this.f.forEach(Gc);this.f.length=0;this.g&&Pc(this.g);this.state=5;this.u();this.N.forEach(Gc);this.N.length=0;cl.prototype.ia.call(this)};function nk(a,b){b=x(b).toString();b in a.v||(a.v[b]=hg());return a.v[b]}k.Y=function(a){return-1==mk(this,a).fh?null:nk(this,a).canvas};
-function mk(a,b){b=x(b).toString();b in a.o||(a.o[b]={Be:!1,eh:null,wf:-1,fh:-1});return a.o[b]}k.lb=function(){return this.a.join("/")+"-"+this.D};
-k.load=function(){var a=0,b={};0==this.state&&oj(this,1);1==this.state&&this.a.forEach(function(c){var d=this.c[c];0==d.state&&(d.ug(this.C),d.load());1==d.state&&(c=y(d,"change",function(){var c=d.getState();if(2==c||3==c){var f=x(d);3==c?b[f]=!0:(--a,delete b[f]);0==a-Object.keys(b).length&&this.Kh()}}.bind(this)),this.f.push(c),++a)}.bind(this));0==a-Object.keys(b).length&&setTimeout(this.Kh.bind(this),0)};
-k.Kh=function(){for(var a=this.a.length,b=0,c=a-1;0<=c;--c){var d=this.c[this.a[c]].getState();2!=d&&--a;4==d&&++b}a==this.a.length?(this.f.forEach(Gc),this.f.length=0,oj(this,2)):oj(this,b==this.a.length?4:3)};function qz(a,b){a.ug(Eo(b,a.v,a.Cp.bind(a),a.Bp.bind(a)))};function rz(a){var b=a.projection||"EPSG:3857",c=a.extent||Dc(b),d=a.tileGrid||Bc({extent:c,maxZoom:a.maxZoom||22,minZoom:a.minZoom,tileSize:a.tileSize||512});my.call(this,{attributions:a.attributions,cacheSize:void 0!==a.cacheSize?a.cacheSize:128,extent:c,logo:a.logo,opaque:!1,projection:b,state:a.state,tileGrid:d,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:qz,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:void 0===a.wrapX?!0:a.wrapX,transition:a.transition});this.l=a.format?
-a.format:null;this.i={};this.s=void 0==a.overlaps?!0:a.overlaps;this.tileClass=a.tileClass?a.tileClass:Kn;this.f={}}w(rz,my);k=rz.prototype;k.clear=function(){this.a.clear();this.i={}};k.ad=function(a,b,c,d,e){var f=a+"/"+b+"/"+c;if(this.a.a.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=ky(this,a,e);d=new pz(a,null!==b?0:4,this.g,this.l,this.tileLoadFunction,b,this.tileUrlFunction,this.tileGrid,this.eb(e),this.i,d,e,this.tileClass,this.dj.bind(this),this.Ea);this.a.set(f,d);return d};
-k.eb=function(a){var b=a.wb,c=this.f[b];c||(c=this.tileGrid,c=this.f[b]=Ac(a,void 0,c?c.Za(c.minZoom):void 0));return c};k.Xc=function(a){return a};k.Zd=function(a,b,c){a=Ba(this.eb(c).Za(a));return[Math.round(a[0]*b),Math.round(a[1]*b)]};function sz(a){this.s=a.matrixIds;qc.call(this,{extent:a.extent,origin:a.origin,origins:a.origins,resolutions:a.resolutions,tileSize:a.tileSize,tileSizes:a.tileSizes,sizes:a.sizes})}w(sz,qc);sz.prototype.v=function(){return this.s};
-function tz(a,b,c){var d=[],e=[],f=[],g=[],h=[],l=void 0!==c?c:[];c=a.SupportedCRS;c=Ob(c.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Ob(c);var m=c.Bc(),n="ne"==c.b.substr(0,2);a.TileMatrix.sort(function(a,b){return b.ScaleDenominator-a.ScaleDenominator});a.TileMatrix.forEach(function(a){var b;0<l.length?b=hc(l,function(b){return a.Identifier==b.TileMatrix}):b=!0;if(b){e.push(a.Identifier);b=2.8E-4*a.ScaleDenominator/m;var c=a.TileWidth,p=a.TileHeight;n?f.push([a.TopLeftCorner[1],a.TopLeftCorner[0]]):
-f.push(a.TopLeftCorner);d.push(b);g.push(c==p?c:[c,p]);h.push([a.MatrixWidth,-a.MatrixHeight])}});return new sz({extent:b,origins:f,resolutions:d,matrixIds:e,tileSizes:g,sizes:h})};function Y(a){this.La=void 0!==a.version?a.version:"1.0.0";this.B=void 0!==a.format?a.format:"image/jpeg";this.i=void 0!==a.dimensions?a.dimensions:{};this.$=a.layer;this.o=a.matrixSet;this.ca=a.style;var b=a.urls;void 0===b&&void 0!==a.url&&(b=Yx(a.url));var c=this.ua=void 0!==a.requestEncoding?a.requestEncoding:"KVP",d=a.tileGrid,e={layer:this.$,style:this.ca,tilematrixset:this.o};"KVP"==c&&kb(e,{Service:"WMTS",Request:"GetTile",Version:this.La,Format:this.B});var f=this.i;this.l=function(a){a=
-"KVP"==c?Gy(a,e):a.replace(/\{(\w+?)\}/g,function(a,b){return b.toLowerCase()in e?e[b.toLowerCase()]:a});return function(b){if(b){var e={TileMatrix:d.s[b[0]],TileCol:b[1],TileRow:-b[2]-1};kb(e,f);b=a;return b="KVP"==c?Gy(b,e):b.replace(/\{(\w+?)\}/g,function(a,b){return e[b]})}}};var g=b&&0<b.length?Wx(b.map(this.l)):Xx;ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,
-tileClass:a.tileClass,tileGrid:d,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:g,urls:b,wrapX:void 0!==a.wrapX?a.wrapX:!1,transition:a.transition});jy(this,uz(this))}w(Y,ny);k=Y.prototype;k.vb=function(a){this.urls=a;var b=a.join("\n");this.hb(this.dc?this.dc.bind(this):Wx(a.map(this.l.bind(this))),b)};k.ol=function(){return this.i};k.kp=function(){return this.B};k.lp=function(){return this.$};k.Al=function(){return this.o};k.Nl=function(){return this.ua};
-k.mp=function(){return this.ca};k.Ul=function(){return this.La};function uz(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}k.Tq=function(a){kb(this.i,a);jy(this,uz(this))};function vz(a){a=a||{};var b=a.size,c=b[0],d=b[1];b=a.extent||[0,-b[1],b[0],0];var e=[],f=a.tileSize||256,g=f;switch(void 0!==a.tierSizeCalculation?a.tierSizeCalculation:wz){case wz:for(;c>g||d>g;)e.push([Math.ceil(c/g),Math.ceil(d/g)]),g+=g;break;case xz:for(;c>g||d>g;)e.push([Math.ceil(c/g),Math.ceil(d/g)]),c>>=1,d>>=1;break;default:oa(!1,53)}e.push([1,1]);e.reverse();d=[1];var h=[0];g=1;for(c=e.length;g<c;g++)d.push(1<<g),h.push(e[g-1][0]*e[g-1][1]+h[g-1]);d.reverse();var l=new qc({tileSize:f,
-extent:b,origin:$a(b),resolutions:d});(b=a.url)&&-1==b.indexOf("{TileGroup}")&&-1==b.indexOf("{tileIndex}")&&(b+="{TileGroup}/{z}-{x}-{y}.jpg");b=Yx(b);b=Wx(b.map(function(a){return function(b){if(b){var c=b[0],d=b[1];b=-b[2]-1;var f=d+b*e[c][0],g={z:c,x:d,y:b,tileIndex:f,TileGroup:"TileGroup"+((f+h[c])/l.Za(c)|0)};return a.replace(/\{(\w+?)\}/g,function(a,b){return g[b]})}}}));ny.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,
-reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileClass:yz.bind(null,l),tileGrid:l,tileUrlFunction:b,transition:a.transition})}w(vz,ny);function yz(a,b,c,d,e,f,g){el.call(this,b,c,d,e,f,g);this.a=null;this.o=Ba(a.Za(b[0]))}w(yz,el);yz.prototype.Y=function(){if(this.a)return this.a;var a=el.prototype.Y.call(this);if(2==this.state){var b=this.o;if(a.width==b[0]&&a.height==b[1])return this.a=a;b=hg(b[0],b[1]);b.drawImage(a,0,0);return this.a=b.canvas}return a};var wz="default",xz="truncated";ha.prototype.code=ha.prototype.code;t("ol.Attribution",Ec);Ec.prototype.getHTML=Ec.prototype.b;t("ol.CanvasMap",H);t("ol.Collection",B);B.prototype.clear=B.prototype.clear;B.prototype.extend=B.prototype.qg;B.prototype.forEach=B.prototype.forEach;B.prototype.getArray=B.prototype.Xm;B.prototype.item=B.prototype.item;B.prototype.getLength=B.prototype.kc;B.prototype.insertAt=B.prototype.Re;B.prototype.pop=B.prototype.pop;B.prototype.push=B.prototype.push;B.prototype.remove=B.prototype.remove;
-B.prototype.removeAt=B.prototype.Wg;B.prototype.setAt=B.prototype.rq;cd.prototype.element=cd.prototype.element;t("ol.color.asArray",vi);t("ol.color.asString",xi);t("ol.colorlike.asColorLike",zi);t("ol.control.defaults",Fg);t("ol.coordinate.add",ze);t("ol.coordinate.createStringXY",function(a){return function(b){return Ke(b,a)}});t("ol.coordinate.format",De);t("ol.coordinate.rotate",Fe);t("ol.coordinate.toStringHDMS",function(a,b){return a?Ce("NS",a[1],b)+" "+Ce("EW",a[0],b):""});
-t("ol.coordinate.toStringXY",Ke);t("ol.DeviceOrientation",pk);pk.prototype.getAlpha=pk.prototype.Ym;pk.prototype.getBeta=pk.prototype.ll;pk.prototype.getGamma=pk.prototype.ql;pk.prototype.getHeading=pk.prototype.Zm;pk.prototype.getTracking=pk.prototype.li;pk.prototype.setTracking=pk.prototype.rg;t("ol.easing.easeIn",Me);t("ol.easing.easeOut",Oe);t("ol.easing.inAndOut",Pe);t("ol.easing.linear",Qe);t("ol.easing.upAndDown",function(a){return.5>a?Pe(2*a):1-Pe(2*(a-.5))});
-t("ol.extent.boundingExtent",Ca);t("ol.extent.buffer",Fa);t("ol.extent.containsCoordinate",Ja);t("ol.extent.containsExtent",La);t("ol.extent.containsXY",Ka);t("ol.extent.createEmpty",Da);t("ol.extent.equals",Sa);t("ol.extent.extend",Ta);t("ol.extent.getArea",ab);t("ol.extent.getBottomLeft",Wa);t("ol.extent.getBottomRight",Ya);t("ol.extent.getCenter",eb);t("ol.extent.getHeight",db);t("ol.extent.getIntersection",gb);t("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]});
-t("ol.extent.getTopLeft",$a);t("ol.extent.getTopRight",Za);t("ol.extent.getWidth",cb);t("ol.extent.intersects",hb);t("ol.extent.isEmpty",bb);t("ol.extent.applyTransform",jb);t("ol.Feature",Hk);Hk.prototype.clone=Hk.prototype.clone;Hk.prototype.getGeometry=Hk.prototype.U;Hk.prototype.getId=Hk.prototype.an;Hk.prototype.getGeometryName=Hk.prototype.sl;Hk.prototype.getStyle=Hk.prototype.bn;Hk.prototype.getStyleFunction=Hk.prototype.ib;Hk.prototype.setGeometry=Hk.prototype.Va;Hk.prototype.setStyle=Hk.prototype.sg;
-Hk.prototype.setId=Hk.prototype.qc;Hk.prototype.setGeometryName=Hk.prototype.Lc;t("ol.featureloader.xhr",Fo);t("ol.Geolocation",Jk);Jk.prototype.getAccuracy=Jk.prototype.el;Jk.prototype.getAccuracyGeometry=Jk.prototype.fl;Jk.prototype.getAltitude=Jk.prototype.gl;Jk.prototype.getAltitudeAccuracy=Jk.prototype.hl;Jk.prototype.getHeading=Jk.prototype.cn;Jk.prototype.getPosition=Jk.prototype.dn;Jk.prototype.getProjection=Jk.prototype.mi;Jk.prototype.getSpeed=Jk.prototype.Ol;Jk.prototype.getTracking=Jk.prototype.ni;
-Jk.prototype.getTrackingOptions=Jk.prototype.ai;Jk.prototype.setProjection=Jk.prototype.oi;Jk.prototype.setTracking=Jk.prototype.Ue;Jk.prototype.setTrackingOptions=Jk.prototype.Rj;t("ol.Graticule",Xk);Xk.prototype.getMap=Xk.prototype.gn;Xk.prototype.getMeridians=Xk.prototype.Cl;Xk.prototype.getParallels=Xk.prototype.Jl;Xk.prototype.setMap=Xk.prototype.setMap;t("ol.has.DEVICE_PIXEL_RATIO",nd);t("ol.has.CANVAS",pd);t("ol.has.DEVICE_ORIENTATION",qd);t("ol.has.GEOLOCATION",rd);t("ol.has.TOUCH",sd);
-t("ol.has.WEBGL",hd);bl.prototype.getImage=bl.prototype.Y;bl.prototype.load=bl.prototype.load;el.prototype.getImage=el.prototype.Y;t("ol.inherits",w);t("ol.interaction.defaults",Zh);t("ol.Kinetic",Gg);t("ol.loadingstrategy.all",tw);t("ol.loadingstrategy.bbox",function(a){return[a]});t("ol.loadingstrategy.tile",function(a){return function(b,c){c=a.Dc(c);b=tc(a,b,c);var d=[];c=[c,0,0];for(c[1]=b.fa;c[1]<=b.la;++c[1])for(c[2]=b.ea;c[2]<=b.ka;++c[2])d.push(a.Ma(c));return d}});t("ol.Map",K);
-ed.prototype.originalEvent=ed.prototype.originalEvent;ed.prototype.pixel=ed.prototype.pixel;ed.prototype.coordinate=ed.prototype.coordinate;ed.prototype.dragging=ed.prototype.dragging;dd.prototype.map=dd.prototype.map;dd.prototype.frameState=dd.prototype.frameState;t("ol.Object",Vc);Vc.prototype.get=Vc.prototype.get;Vc.prototype.getKeys=Vc.prototype.P;Vc.prototype.getProperties=Vc.prototype.L;Vc.prototype.set=Vc.prototype.set;Vc.prototype.setProperties=Vc.prototype.H;Vc.prototype.unset=Vc.prototype.R;
-Zc.prototype.key=Zc.prototype.key;Zc.prototype.oldValue=Zc.prototype.oldValue;t("ol.Observable",Uc);t("ol.Observable.unByKey",function(a){if(Array.isArray(a))for(var b=0,c=a.length;b<c;++b)Gc(a[b]);else Gc(a)});Uc.prototype.changed=Uc.prototype.u;Uc.prototype.dispatchEvent=Uc.prototype.b;Uc.prototype.getRevision=Uc.prototype.K;Uc.prototype.on=Uc.prototype.I;Uc.prototype.once=Uc.prototype.once;Uc.prototype.un=Uc.prototype.J;t("ol.Overlay",Bn);Bn.prototype.getElement=Bn.prototype.Rd;
-Bn.prototype.getId=Bn.prototype.nn;Bn.prototype.getMap=Bn.prototype.Ve;Bn.prototype.getOffset=Bn.prototype.Xh;Bn.prototype.getPosition=Bn.prototype.pi;Bn.prototype.getPositioning=Bn.prototype.Yh;Bn.prototype.setElement=Bn.prototype.Hj;Bn.prototype.setMap=Bn.prototype.setMap;Bn.prototype.setOffset=Bn.prototype.Mj;Bn.prototype.setPosition=Bn.prototype.We;Bn.prototype.setPositioning=Bn.prototype.Pj;t("ol.PluggableMap",G);G.prototype.addControl=G.prototype.Mf;G.prototype.addInteraction=G.prototype.Nf;
-G.prototype.addLayer=G.prototype.xe;G.prototype.addOverlay=G.prototype.ye;G.prototype.forEachFeatureAtPixel=G.prototype.Tc;G.prototype.getFeaturesAtPixel=G.prototype.Xf;G.prototype.forEachLayerAtPixel=G.prototype.tg;G.prototype.hasFeatureAtPixel=G.prototype.ng;G.prototype.getEventCoordinate=G.prototype.Sd;G.prototype.getEventPixel=G.prototype.ud;G.prototype.getTarget=G.prototype.Xd;G.prototype.getTargetElement=G.prototype.Cc;G.prototype.getCoordinateFromPixel=G.prototype.Ra;
-G.prototype.getControls=G.prototype.Wf;G.prototype.getOverlays=G.prototype.gg;G.prototype.getOverlayById=G.prototype.fg;G.prototype.getInteractions=G.prototype.bg;G.prototype.getLayerGroup=G.prototype.hc;G.prototype.getLayers=G.prototype.Xe;G.prototype.getPixelFromCoordinate=G.prototype.Ia;G.prototype.getSize=G.prototype.Cb;G.prototype.getView=G.prototype.aa;G.prototype.getViewport=G.prototype.kg;G.prototype.renderSync=G.prototype.dh;G.prototype.render=G.prototype.render;
-G.prototype.removeControl=G.prototype.Xg;G.prototype.removeInteraction=G.prototype.Zg;G.prototype.removeLayer=G.prototype.$g;G.prototype.removeOverlay=G.prototype.ah;G.prototype.setLayerGroup=G.prototype.zf;G.prototype.setSize=G.prototype.be;G.prototype.setTarget=G.prototype.Ad;G.prototype.setView=G.prototype.jh;G.prototype.updateSize=G.prototype.Oc;t("ol.proj.METERS_PER_UNIT",ub);t("ol.proj.setProj4",function(a){vb=a});t("ol.proj.getPointResolution",Nb);t("ol.proj.addEquivalentProjections",Qb);
-t("ol.proj.addProjection",Rb);t("ol.proj.addCoordinateTransforms",Vb);t("ol.proj.fromLonLat",function(a,b){return ac(a,"EPSG:4326",void 0!==b?b:"EPSG:3857")});t("ol.proj.toLonLat",function(a,b){a=ac(a,void 0!==b?b:"EPSG:3857","EPSG:4326");b=a[0];if(-180>b||180<b)a[0]=wa(b+180,360)-180;return a});t("ol.proj.get",Ob);t("ol.proj.equivalent",Xb);t("ol.proj.getTransform",Yb);t("ol.proj.transform",ac);t("ol.proj.transformExtent",bc);
-t("ol.render.toContext",function(a,b){var c=a.canvas,d=b?b:{};b=d.pixelRatio||nd;if(d=d.size)c.width=d[0]*b,c.height=d[1]*b,c.style.width=d[0]+"px",c.style.height=d[1]+"px";c=[0,0,c.width,c.height];d=cf(We(),b,b);return new Bi(a,b,c,d,0)});t("ol.size.toSize",Ba);t("ol.Sphere",ob);ob.prototype.geodesicArea=ob.prototype.a;ob.prototype.haversineDistance=ob.prototype.b;t("ol.Sphere.getLength",rb);t("ol.Sphere.getArea",tb);t("ol.style.iconImageCache",ej);cl.prototype.getTileCoord=cl.prototype.i;
-cl.prototype.load=cl.prototype.load;t("ol.tilegrid.createXYZ",Bc);Kn.prototype.getExtent=Kn.prototype.G;Kn.prototype.getFormat=Kn.prototype.qn;Kn.prototype.getFeatures=Kn.prototype.pn;Kn.prototype.getProjection=Kn.prototype.rn;Kn.prototype.setExtent=Kn.prototype.ri;Kn.prototype.setFeatures=Kn.prototype.Ij;Kn.prototype.setProjection=Kn.prototype.vg;Kn.prototype.setLoader=Kn.prototype.ug;t("ol.View",F);F.prototype.animate=F.prototype.animate;F.prototype.getAnimating=F.prototype.Ac;
-F.prototype.getInteracting=F.prototype.Vh;F.prototype.cancelAnimations=F.prototype.rd;F.prototype.constrainCenter=F.prototype.Sc;F.prototype.constrainResolution=F.prototype.constrainResolution;F.prototype.constrainRotation=F.prototype.constrainRotation;F.prototype.getCenter=F.prototype.xa;F.prototype.calculateExtent=F.prototype.qd;F.prototype.getMaxResolution=F.prototype.sn;F.prototype.getMinResolution=F.prototype.vn;F.prototype.getMaxZoom=F.prototype.tn;F.prototype.setMaxZoom=F.prototype.Cq;
-F.prototype.getMinZoom=F.prototype.wn;F.prototype.setMinZoom=F.prototype.Dq;F.prototype.getProjection=F.prototype.xn;F.prototype.getResolution=F.prototype.Pa;F.prototype.getResolutions=F.prototype.yn;F.prototype.getResolutionForExtent=F.prototype.Je;F.prototype.getRotation=F.prototype.Sa;F.prototype.getZoom=F.prototype.lg;F.prototype.getZoomForResolution=F.prototype.Me;F.prototype.getResolutionForZoom=F.prototype.$h;F.prototype.fit=F.prototype.Uf;F.prototype.centerOn=F.prototype.Nk;
-F.prototype.rotate=F.prototype.rotate;F.prototype.setCenter=F.prototype.ub;F.prototype.setResolution=F.prototype.gd;F.prototype.setRotation=F.prototype.ce;F.prototype.setZoom=F.prototype.Tj;t("ol.xml.getAllTextContent",oo);t("ol.xml.parse",so);Hl.prototype.getGL=Hl.prototype.yp;Hl.prototype.useProgram=Hl.prototype.cd;t("ol.tilegrid.TileGrid",qc);qc.prototype.forEachTileCoord=qc.prototype.Vf;qc.prototype.getMaxZoom=qc.prototype.mj;qc.prototype.getMinZoom=qc.prototype.nj;qc.prototype.getOrigin=qc.prototype.Ic;
-qc.prototype.getResolution=qc.prototype.Ta;qc.prototype.getResolutions=qc.prototype.oj;qc.prototype.getTileCoordExtent=qc.prototype.Ma;qc.prototype.getTileCoordForCoordAndResolution=qc.prototype.Le;qc.prototype.getTileCoordForCoordAndZ=qc.prototype.jg;qc.prototype.getTileSize=qc.prototype.Za;qc.prototype.getZForResolution=qc.prototype.Dc;t("ol.tilegrid.WMTS",sz);sz.prototype.getMatrixIds=sz.prototype.v;t("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",tz);t("ol.style.AtlasManager",Tm);
-t("ol.style.Circle",yk);yk.prototype.setRadius=yk.prototype.fd;t("ol.style.Fill",zk);zk.prototype.clone=zk.prototype.clone;zk.prototype.getColor=zk.prototype.g;zk.prototype.setColor=zk.prototype.c;t("ol.style.Icon",dr);dr.prototype.clone=dr.prototype.clone;dr.prototype.getAnchor=dr.prototype.Vc;dr.prototype.getColor=dr.prototype.np;dr.prototype.getImage=dr.prototype.Y;dr.prototype.getOrigin=dr.prototype.bd;dr.prototype.getSrc=dr.prototype.op;dr.prototype.getSize=dr.prototype.oc;
-dr.prototype.load=dr.prototype.load;cj.prototype.setSize=cj.prototype.c;t("ol.style.Image",vk);vk.prototype.getOpacity=vk.prototype.hf;vk.prototype.getRotateWithView=vk.prototype.jf;vk.prototype.getRotation=vk.prototype.kf;vk.prototype.getScale=vk.prototype.lf;vk.prototype.getSnapToPixel=vk.prototype.Ke;vk.prototype.setOpacity=vk.prototype.Ed;vk.prototype.setRotation=vk.prototype.mf;vk.prototype.setScale=vk.prototype.Fd;t("ol.style.RegularShape",wk);wk.prototype.clone=wk.prototype.clone;
-wk.prototype.getAnchor=wk.prototype.Vc;wk.prototype.getAngle=wk.prototype.ij;wk.prototype.getFill=wk.prototype.Fa;wk.prototype.getImage=wk.prototype.Y;wk.prototype.getOrigin=wk.prototype.bd;wk.prototype.getPoints=wk.prototype.jj;wk.prototype.getRadius=wk.prototype.kj;wk.prototype.getRadius2=wk.prototype.Zh;wk.prototype.getSize=wk.prototype.oc;wk.prototype.getStroke=wk.prototype.Ga;t("ol.style.Stroke",Ak);Ak.prototype.clone=Ak.prototype.clone;Ak.prototype.getColor=Ak.prototype.pp;
-Ak.prototype.getLineCap=Ak.prototype.vl;Ak.prototype.getLineDash=Ak.prototype.qp;Ak.prototype.getLineDashOffset=Ak.prototype.wl;Ak.prototype.getLineJoin=Ak.prototype.xl;Ak.prototype.getMiterLimit=Ak.prototype.Dl;Ak.prototype.getWidth=Ak.prototype.rp;Ak.prototype.setColor=Ak.prototype.sp;Ak.prototype.setLineCap=Ak.prototype.yq;Ak.prototype.setLineDash=Ak.prototype.setLineDash;Ak.prototype.setLineDashOffset=Ak.prototype.zq;Ak.prototype.setLineJoin=Ak.prototype.Aq;Ak.prototype.setMiterLimit=Ak.prototype.Eq;
-Ak.prototype.setWidth=Ak.prototype.Kq;t("ol.style.Style",Bk);Bk.prototype.clone=Bk.prototype.clone;Bk.prototype.getRenderer=Bk.prototype.Ie;Bk.prototype.setRenderer=Bk.prototype.Iq;Bk.prototype.getGeometry=Bk.prototype.U;Bk.prototype.getGeometryFunction=Bk.prototype.rl;Bk.prototype.getFill=Bk.prototype.Fa;Bk.prototype.setFill=Bk.prototype.yf;Bk.prototype.getImage=Bk.prototype.Y;Bk.prototype.setImage=Bk.prototype.ih;Bk.prototype.getStroke=Bk.prototype.Ga;Bk.prototype.setStroke=Bk.prototype.Af;
-Bk.prototype.getText=Bk.prototype.Ka;Bk.prototype.setText=Bk.prototype.Hd;Bk.prototype.getZIndex=Bk.prototype.Ba;Bk.prototype.setGeometry=Bk.prototype.Va;Bk.prototype.setZIndex=Bk.prototype.$b;t("ol.style.Text",J);J.prototype.clone=J.prototype.clone;J.prototype.getOverflow=J.prototype.Gl;J.prototype.getFont=J.prototype.pl;J.prototype.getMaxAngle=J.prototype.Bl;J.prototype.getPlacement=J.prototype.Kl;J.prototype.getOffsetX=J.prototype.El;J.prototype.getOffsetY=J.prototype.Fl;J.prototype.getFill=J.prototype.Fa;
-J.prototype.getRotateWithView=J.prototype.tp;J.prototype.getRotation=J.prototype.up;J.prototype.getScale=J.prototype.vp;J.prototype.getStroke=J.prototype.Ga;J.prototype.getText=J.prototype.Ka;J.prototype.getTextAlign=J.prototype.Ql;J.prototype.getTextBaseline=J.prototype.Rl;J.prototype.getBackgroundFill=J.prototype.jl;J.prototype.getBackgroundStroke=J.prototype.kl;J.prototype.getPadding=J.prototype.Il;J.prototype.setOverflow=J.prototype.Fq;J.prototype.setFont=J.prototype.Jj;
-J.prototype.setMaxAngle=J.prototype.Bq;J.prototype.setOffsetX=J.prototype.Nj;J.prototype.setOffsetY=J.prototype.Oj;J.prototype.setPlacement=J.prototype.Hq;J.prototype.setFill=J.prototype.yf;J.prototype.setRotation=J.prototype.wp;J.prototype.setScale=J.prototype.lj;J.prototype.setStroke=J.prototype.Af;J.prototype.setText=J.prototype.Hd;J.prototype.setTextAlign=J.prototype.Qj;J.prototype.setTextBaseline=J.prototype.Jq;J.prototype.setBackgroundFill=J.prototype.sq;J.prototype.setBackgroundStroke=J.prototype.tq;
-J.prototype.setPadding=J.prototype.Gq;t("ol.source.BingMaps",ry);t("ol.source.BingMaps.TOS_ATTRIBUTION",'<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html">Terms of Use</a>');ry.prototype.getApiKey=ry.prototype.ca;ry.prototype.getImagerySet=ry.prototype.ua;t("ol.source.CartoDB",ty);ty.prototype.getConfig=ty.prototype.nl;ty.prototype.updateConfig=ty.prototype.Sq;ty.prototype.setConfig=ty.prototype.uq;t("ol.source.Cluster",X);X.prototype.getDistance=X.prototype.Eo;
-X.prototype.getSource=X.prototype.Fo;X.prototype.setDistance=X.prototype.vq;t("ol.source.Image",zy);By.prototype.image=By.prototype.image;t("ol.source.ImageArcGISRest",Hy);Hy.prototype.getParams=Hy.prototype.Ho;Hy.prototype.getImageLoadFunction=Hy.prototype.Go;Hy.prototype.getUrl=Hy.prototype.Io;Hy.prototype.setImageLoadFunction=Hy.prototype.Jo;Hy.prototype.setUrl=Hy.prototype.Ko;Hy.prototype.updateParams=Hy.prototype.Lo;t("ol.source.ImageCanvas",Iy);t("ol.source.ImageMapGuide",Jy);
-Jy.prototype.getParams=Jy.prototype.No;Jy.prototype.getImageLoadFunction=Jy.prototype.Mo;Jy.prototype.updateParams=Jy.prototype.Po;Jy.prototype.setImageLoadFunction=Jy.prototype.Oo;t("ol.source.ImageStatic",Ky);t("ol.source.ImageVector",Ly);Ly.prototype.getSource=Ly.prototype.Qo;Ly.prototype.getStyle=Ly.prototype.Ro;Ly.prototype.getStyleFunction=Ly.prototype.ib;Ly.prototype.setStyle=Ly.prototype.aj;t("ol.source.ImageWMS",Ny);Ny.prototype.getGetFeatureInfoUrl=Ny.prototype.Uo;
-Ny.prototype.getParams=Ny.prototype.Wo;Ny.prototype.getImageLoadFunction=Ny.prototype.Vo;Ny.prototype.getUrl=Ny.prototype.Xo;Ny.prototype.setImageLoadFunction=Ny.prototype.Yo;Ny.prototype.setUrl=Ny.prototype.Zo;Ny.prototype.updateParams=Ny.prototype.$o;t("ol.source.OSM",Ry);t("ol.source.OSM.ATTRIBUTION",'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.');t("ol.source.Raster",Sy);Sy.prototype.setOperation=Sy.prototype.s;Wy.prototype.extent=Wy.prototype.extent;
-Wy.prototype.resolution=Wy.prototype.resolution;Wy.prototype.data=Wy.prototype.data;t("ol.source.Source",uw);uw.prototype.getAttributions=uw.prototype.za;uw.prototype.getLogo=uw.prototype.Aa;uw.prototype.getProjection=uw.prototype.Da;uw.prototype.getState=uw.prototype.getState;uw.prototype.refresh=uw.prototype.sa;uw.prototype.setAttributions=uw.prototype.va;t("ol.source.Stamen",Zy);t("ol.source.Tile",iy);iy.prototype.getTileGrid=iy.prototype.jb;ly.prototype.tile=ly.prototype.tile;
-t("ol.source.TileArcGISRest",cz);cz.prototype.getParams=cz.prototype.o;cz.prototype.updateParams=cz.prototype.B;t("ol.source.TileDebug",ez);t("ol.source.TileImage",ny);ny.prototype.setRenderReprojectionEdges=ny.prototype.Qb;ny.prototype.setTileGridForProjection=ny.prototype.Rb;t("ol.source.TileJSON",gz);gz.prototype.getTileJSON=gz.prototype.Sl;t("ol.source.TileUTFGrid",hz);hz.prototype.getTemplate=hz.prototype.Pl;hz.prototype.forDataAtCoordinateAndResolution=hz.prototype.al;
-t("ol.source.TileWMS",lz);lz.prototype.getGetFeatureInfoUrl=lz.prototype.hp;lz.prototype.getParams=lz.prototype.ip;lz.prototype.updateParams=lz.prototype.jp;my.prototype.getTileLoadFunction=my.prototype.yb;my.prototype.getTileUrlFunction=my.prototype.zb;my.prototype.getUrls=my.prototype.Ab;my.prototype.setTileLoadFunction=my.prototype.Fb;my.prototype.setTileUrlFunction=my.prototype.hb;my.prototype.setUrl=my.prototype.rb;my.prototype.setUrls=my.prototype.vb;t("ol.source.Vector",U);
-U.prototype.addFeature=U.prototype.Gb;U.prototype.addFeatures=U.prototype.Qc;U.prototype.clear=U.prototype.clear;U.prototype.forEachFeature=U.prototype.Lh;U.prototype.forEachFeatureInExtent=U.prototype.ec;U.prototype.forEachFeatureIntersectingExtent=U.prototype.Mh;U.prototype.getFeaturesCollection=U.prototype.Th;U.prototype.getFeatures=U.prototype.ee;U.prototype.getFeaturesAtCoordinate=U.prototype.Sh;U.prototype.getFeaturesInExtent=U.prototype.Yf;U.prototype.getClosestFeatureToCoordinate=U.prototype.Oh;
-U.prototype.getExtent=U.prototype.G;U.prototype.getFeatureById=U.prototype.Rh;U.prototype.getFormat=U.prototype.ej;U.prototype.getUrl=U.prototype.fj;U.prototype.removeLoadedExtent=U.prototype.Cj;U.prototype.removeFeature=U.prototype.Lb;U.prototype.setLoader=U.prototype.hj;Bw.prototype.feature=Bw.prototype.feature;t("ol.source.VectorTile",rz);rz.prototype.clear=rz.prototype.clear;t("ol.source.WMTS",Y);Y.prototype.getDimensions=Y.prototype.ol;Y.prototype.getFormat=Y.prototype.kp;
-Y.prototype.getLayer=Y.prototype.lp;Y.prototype.getMatrixSet=Y.prototype.Al;Y.prototype.getRequestEncoding=Y.prototype.Nl;Y.prototype.getStyle=Y.prototype.mp;Y.prototype.getVersion=Y.prototype.Ul;Y.prototype.updateDimensions=Y.prototype.Tq;
-t("ol.source.WMTS.optionsFromCapabilities",function(a,b){var c=hc(a.Contents.Layer,function(a){return a.Identifier==b.layer});if(null===c)return null;var d=a.Contents.TileMatrixSet;var e=1<c.TileMatrixSetLink.length?"projection"in b?mc(c.TileMatrixSetLink,function(a){var c=hc(d,function(b){return b.Identifier==a.TileMatrixSet}).SupportedCRS,e=Ob(c.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Ob(c),f=Ob(b.projection);return e&&f?Xb(e,f):c==b.projection}):mc(c.TileMatrixSetLink,function(a){return a.TileMatrixSet==
-b.matrixSet}):0;0>e&&(e=0);var f=c.TileMatrixSetLink[e].TileMatrixSet;var g=c.TileMatrixSetLink[e].TileMatrixSetLimits;var h=c.Format[0];"format"in b&&(h=b.format);e=mc(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var l={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);l[b]=c});var m=hc(a.Contents.TileMatrixSet,function(a){return a.Identifier==f}),n,p=m.SupportedCRS;p&&(n=Ob(p.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,
-"$1:$3"))||Ob(p));"projection"in b&&(p=Ob(b.projection),!p||n&&!Xb(p,n)||(n=p));p=c.WGS84BoundingBox;if(void 0!==p){var q=Ob("EPSG:4326").G();q=p[0]==q[0]&&p[2]==q[2];var r=bc(p,"EPSG:4326",n);(p=n.G())&&(La(p,r)||(r=void 0))}g=tz(m,r,g);var u=[];m=b.requestEncoding;m=void 0!==m?m:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(a=a.OperationsMetadata.GetTile.DCP.HTTP.Get,r=0,p=a.length;r<p;++r)if(a[r].Constraint){var v=hc(a[r].Constraint,function(a){return"GetEncoding"==a.name}).AllowedValues.Value;
-""===m&&(m=v[0]);if("KVP"===m)ec(v,"KVP")&&u.push(a[r].href);else break}else a[r].href&&(m="KVP",u.push(a[r].href));0===u.length&&(m="REST",c.ResourceURL.forEach(function(a){"tile"===a.resourceType&&(h=a.format,u.push(a.template))}));return{urls:u,layer:b.layer,matrixSet:f,format:h,projection:n,requestEncoding:m,tileGrid:g,style:e,dimensions:l,wrapX:q,crossOrigin:b.crossOrigin}});t("ol.source.XYZ",sy);t("ol.source.Zoomify",vz);t("ol.renderer.webgl.ImageLayer",pn);t("ol.renderer.webgl.Map",sn);
-t("ol.renderer.webgl.TileLayer",zn);t("ol.renderer.webgl.VectorLayer",An);t("ol.renderer.canvas.ImageLayer",bj);t("ol.renderer.canvas.Map",kj);t("ol.renderer.canvas.TileLayer",mj);t("ol.renderer.canvas.VectorLayer",hk);t("ol.renderer.canvas.VectorTileLayer",jk);bi.prototype.vectorContext=bi.prototype.vectorContext;bi.prototype.frameState=bi.prototype.frameState;bi.prototype.context=bi.prototype.context;bi.prototype.glContext=bi.prototype.glContext;it.prototype.get=it.prototype.get;
-it.prototype.getExtent=it.prototype.G;it.prototype.getId=it.prototype.Ao;it.prototype.getGeometry=it.prototype.U;it.prototype.getProperties=it.prototype.Bo;it.prototype.getType=it.prototype.S;t("ol.render.VectorContext",Ai);gn.prototype.setStyle=gn.prototype.Dd;gn.prototype.drawGeometry=gn.prototype.Hb;gn.prototype.drawFeature=gn.prototype.Ce;Bi.prototype.drawCircle=Bi.prototype.cc;Bi.prototype.setStyle=Bi.prototype.Dd;Bi.prototype.drawGeometry=Bi.prototype.Hb;Bi.prototype.drawFeature=Bi.prototype.Ce;
-t("ol.proj.common.add",cc);t("ol.proj.Projection",wb);wb.prototype.getCode=wb.prototype.ml;wb.prototype.getExtent=wb.prototype.G;wb.prototype.getUnits=wb.prototype.zo;wb.prototype.getMetersPerUnit=wb.prototype.Bc;wb.prototype.getWorldExtent=wb.prototype.Vl;wb.prototype.getAxisOrientation=wb.prototype.il;wb.prototype.isGlobal=wb.prototype.Gm;wb.prototype.setGlobal=wb.prototype.xq;wb.prototype.setExtent=wb.prototype.Si;wb.prototype.setWorldExtent=wb.prototype.Sj;wb.prototype.setGetPointResolution=wb.prototype.wq;
-t("ol.proj.Units.METERS_PER_UNIT",ub);t("ol.layer.Base",kg);kg.prototype.getExtent=kg.prototype.G;kg.prototype.getMaxResolution=kg.prototype.lc;kg.prototype.getMinResolution=kg.prototype.mc;kg.prototype.getOpacity=kg.prototype.nc;kg.prototype.getVisible=kg.prototype.Jb;kg.prototype.getZIndex=kg.prototype.Ba;kg.prototype.setExtent=kg.prototype.Fc;kg.prototype.setMaxResolution=kg.prototype.Mc;kg.prototype.setMinResolution=kg.prototype.Nc;kg.prototype.setOpacity=kg.prototype.Gc;
-kg.prototype.setVisible=kg.prototype.Hc;kg.prototype.setZIndex=kg.prototype.$b;t("ol.layer.Group",mg);mg.prototype.getLayers=mg.prototype.Cd;mg.prototype.setLayers=mg.prototype.Qi;t("ol.layer.Heatmap",V);V.prototype.getBlur=V.prototype.Nh;V.prototype.getGradient=V.prototype.Uh;V.prototype.getRadius=V.prototype.Ri;V.prototype.setBlur=V.prototype.Fj;V.prototype.setGradient=V.prototype.Lj;V.prototype.setRadius=V.prototype.fd;t("ol.layer.Image",Sx);Sx.prototype.getSource=Sx.prototype.ha;
-t("ol.layer.Layer",xg);xg.prototype.getSource=xg.prototype.ha;xg.prototype.setMap=xg.prototype.setMap;xg.prototype.setSource=xg.prototype.hd;t("ol.layer.Tile",Tx);Tx.prototype.getPreload=Tx.prototype.c;Tx.prototype.getSource=Tx.prototype.ha;Tx.prototype.setPreload=Tx.prototype.j;Tx.prototype.getUseInterimTilesOnError=Tx.prototype.i;Tx.prototype.setUseInterimTilesOnError=Tx.prototype.C;t("ol.layer.Vector",T);T.prototype.getSource=T.prototype.ha;T.prototype.getStyle=T.prototype.B;
-T.prototype.getStyleFunction=T.prototype.ib;T.prototype.setStyle=T.prototype.j;t("ol.layer.VectorTile",W);W.prototype.getPreload=W.prototype.c;W.prototype.getUseInterimTilesOnError=W.prototype.i;W.prototype.setPreload=W.prototype.T;W.prototype.setUseInterimTilesOnError=W.prototype.O;W.prototype.getSource=W.prototype.ha;t("ol.interaction.DoubleClickZoom",Ug);t("ol.interaction.DoubleClickZoom.handleEvent",Vg);t("ol.interaction.DragAndDrop",iw);t("ol.interaction.DragAndDrop.handleEvent",Re);
-lw.prototype.features=lw.prototype.features;lw.prototype.file=lw.prototype.file;lw.prototype.projection=lw.prototype.projection;t("ol.interaction.DragBox",th);th.prototype.getGeometry=th.prototype.U;yh.prototype.coordinate=yh.prototype.coordinate;yh.prototype.mapBrowserEvent=yh.prototype.mapBrowserEvent;t("ol.interaction.DragPan",ih);t("ol.interaction.DragRotate",mh);t("ol.interaction.DragRotateAndZoom",pw);t("ol.interaction.DragZoom",Ch);t("ol.interaction.Draw",Ew);
-t("ol.interaction.Draw.handleEvent",Gw);Ew.prototype.removeLastPoint=Ew.prototype.nq;Ew.prototype.finishDrawing=Ew.prototype.Pd;Ew.prototype.extend=Ew.prototype.Zn;t("ol.interaction.Draw.createRegularPolygon",function(a,b){return function(c,d){var e=c[0];c=c[1];var f=Math.sqrt(He(e,c));d=d?d:Sf(new gw(e),a);Tf(d,e,f,b?b:Math.atan((c[1]-e[1])/(c[0]-e[0])));return d}});
-t("ol.interaction.Draw.createBox",function(){return function(a,b){a=Ca(a);b=b||new D(null);b.na([[Wa(a),Ya(a),Za(a),$a(a),Wa(a)]]);return b}});Uw.prototype.feature=Uw.prototype.feature;t("ol.interaction.Extent",Vw);Vw.prototype.getExtent=Vw.prototype.G;Vw.prototype.setExtent=Vw.prototype.f;fx.prototype.extent=fx.prototype.extent;t("ol.interaction.Interaction",Jg);Jg.prototype.getActive=Jg.prototype.c;Jg.prototype.getMap=Jg.prototype.i;Jg.prototype.setActive=Jg.prototype.Ha;
-t("ol.interaction.KeyboardPan",Dh);t("ol.interaction.KeyboardPan.handleEvent",Eh);t("ol.interaction.KeyboardZoom",Fh);t("ol.interaction.KeyboardZoom.handleEvent",Gh);t("ol.interaction.Modify",gx);t("ol.interaction.Modify.handleEvent",jx);gx.prototype.removePoint=gx.prototype.Dj;ox.prototype.features=ox.prototype.features;ox.prototype.mapBrowserEvent=ox.prototype.mapBrowserEvent;t("ol.interaction.MouseWheelZoom",Hh);t("ol.interaction.MouseWheelZoom.handleEvent",Ih);Hh.prototype.setMouseAnchor=Hh.prototype.V;
-t("ol.interaction.PinchRotate",Rh);t("ol.interaction.PinchZoom",Vh);t("ol.interaction.Pointer",fh);t("ol.interaction.Pointer.handleEvent",gh);t("ol.interaction.Select",wx);wx.prototype.getFeatures=wx.prototype.lo;wx.prototype.getHitTolerance=wx.prototype.mo;wx.prototype.getLayer=wx.prototype.no;t("ol.interaction.Select.handleEvent",xx);wx.prototype.setHitTolerance=wx.prototype.po;wx.prototype.setMap=wx.prototype.setMap;zx.prototype.selected=zx.prototype.selected;zx.prototype.deselected=zx.prototype.deselected;
-zx.prototype.mapBrowserEvent=zx.prototype.mapBrowserEvent;t("ol.interaction.Snap",Bx);Bx.prototype.addFeature=Bx.prototype.Gb;Bx.prototype.removeFeature=Bx.prototype.Lb;t("ol.interaction.Translate",Gx);Gx.prototype.getHitTolerance=Gx.prototype.B;Gx.prototype.setHitTolerance=Gx.prototype.T;Mx.prototype.features=Mx.prototype.features;Mx.prototype.coordinate=Mx.prototype.coordinate;t("ol.geom.Circle",gw);gw.prototype.clone=gw.prototype.clone;gw.prototype.getCenter=gw.prototype.xa;
-gw.prototype.getRadius=gw.prototype.Bd;gw.prototype.getType=gw.prototype.S;gw.prototype.intersectsExtent=gw.prototype.$a;gw.prototype.setCenter=gw.prototype.ub;gw.prototype.setCenterAndRadius=gw.prototype.hh;gw.prototype.setRadius=gw.prototype.fd;gw.prototype.transform=gw.prototype.mb;t("ol.geom.Geometry",gf);gf.prototype.getClosestPoint=gf.prototype.Ib;gf.prototype.intersectsCoordinate=gf.prototype.Bb;gf.prototype.getExtent=gf.prototype.G;gf.prototype.rotate=gf.prototype.rotate;
-gf.prototype.scale=gf.prototype.scale;gf.prototype.simplify=gf.prototype.Sb;gf.prototype.transform=gf.prototype.mb;t("ol.geom.GeometryCollection",Mq);Mq.prototype.clone=Mq.prototype.clone;Mq.prototype.getGeometries=Mq.prototype.vd;Mq.prototype.getType=Mq.prototype.S;Mq.prototype.intersectsExtent=Mq.prototype.$a;Mq.prototype.setGeometries=Mq.prototype.Kj;Mq.prototype.applyTransform=Mq.prototype.Rc;Mq.prototype.translate=Mq.prototype.translate;t("ol.geom.LinearRing",Df);Df.prototype.clone=Df.prototype.clone;
-Df.prototype.getArea=Df.prototype.Vn;Df.prototype.getCoordinates=Df.prototype.W;Df.prototype.getType=Df.prototype.S;Df.prototype.setCoordinates=Df.prototype.na;t("ol.geom.LineString",I);I.prototype.appendCoordinate=I.prototype.Fk;I.prototype.clone=I.prototype.clone;I.prototype.forEachSegment=I.prototype.dl;I.prototype.getCoordinateAtM=I.prototype.Tn;I.prototype.getCoordinates=I.prototype.W;I.prototype.getCoordinateAt=I.prototype.Ph;I.prototype.getLength=I.prototype.Un;I.prototype.getType=I.prototype.S;
-I.prototype.intersectsExtent=I.prototype.$a;I.prototype.setCoordinates=I.prototype.na;t("ol.geom.MultiLineString",P);P.prototype.appendLineString=P.prototype.Gk;P.prototype.clone=P.prototype.clone;P.prototype.getCoordinateAtM=P.prototype.Wn;P.prototype.getCoordinates=P.prototype.W;P.prototype.getLineString=P.prototype.yl;P.prototype.getLineStrings=P.prototype.wd;P.prototype.getType=P.prototype.S;P.prototype.intersectsExtent=P.prototype.$a;P.prototype.setCoordinates=P.prototype.na;
-t("ol.geom.MultiPoint",No);No.prototype.appendPoint=No.prototype.Ik;No.prototype.clone=No.prototype.clone;No.prototype.getCoordinates=No.prototype.W;No.prototype.getPoint=No.prototype.Ll;No.prototype.getPoints=No.prototype.de;No.prototype.getType=No.prototype.S;No.prototype.intersectsExtent=No.prototype.$a;No.prototype.setCoordinates=No.prototype.na;t("ol.geom.MultiPolygon",Q);Q.prototype.appendPolygon=Q.prototype.Jk;Q.prototype.clone=Q.prototype.clone;Q.prototype.getArea=Q.prototype.Xn;
-Q.prototype.getCoordinates=Q.prototype.W;Q.prototype.getInteriorPoints=Q.prototype.ul;Q.prototype.getPolygon=Q.prototype.Ml;Q.prototype.getPolygons=Q.prototype.Vd;Q.prototype.getType=Q.prototype.S;Q.prototype.intersectsExtent=Q.prototype.$a;Q.prototype.setCoordinates=Q.prototype.na;t("ol.geom.Point",C);C.prototype.clone=C.prototype.clone;C.prototype.getCoordinates=C.prototype.W;C.prototype.getType=C.prototype.S;C.prototype.intersectsExtent=C.prototype.$a;C.prototype.setCoordinates=C.prototype.na;
-t("ol.geom.Polygon",D);D.prototype.appendLinearRing=D.prototype.Hk;D.prototype.clone=D.prototype.clone;D.prototype.getArea=D.prototype.Yn;D.prototype.getCoordinates=D.prototype.W;D.prototype.getInteriorPoint=D.prototype.tl;D.prototype.getLinearRingCount=D.prototype.zl;D.prototype.getLinearRing=D.prototype.Wh;D.prototype.getLinearRings=D.prototype.Ud;D.prototype.getType=D.prototype.S;D.prototype.intersectsExtent=D.prototype.$a;D.prototype.setCoordinates=D.prototype.na;
-t("ol.geom.Polygon.circular",Qf);t("ol.geom.Polygon.fromExtent",Rf);t("ol.geom.Polygon.fromCircle",Sf);t("ol.geom.SimpleGeometry",hf);hf.prototype.getFirstCoordinate=hf.prototype.fc;hf.prototype.getLastCoordinate=hf.prototype.gc;hf.prototype.getLayout=hf.prototype.ic;hf.prototype.applyTransform=hf.prototype.Rc;hf.prototype.translate=hf.prototype.translate;t("ol.format.EsriJSON",Po);Po.prototype.readFeature=Po.prototype.Yb;Po.prototype.readFeatures=Po.prototype.Qa;Po.prototype.readGeometry=Po.prototype.ed;
-Po.prototype.readProjection=Po.prototype.sb;Po.prototype.writeGeometry=Po.prototype.md;Po.prototype.writeGeometryObject=Po.prototype.se;Po.prototype.writeFeature=Po.prototype.Jd;Po.prototype.writeFeatureObject=Po.prototype.ld;Po.prototype.writeFeatures=Po.prototype.ac;Po.prototype.writeFeaturesObject=Po.prototype.qe;t("ol.format.Feature",Go);t("ol.format.filter.and",bu);
-t("ol.format.filter.or",function(a){var b=[null].concat(Array.prototype.slice.call(arguments));return new (Function.prototype.bind.apply($t,b))});t("ol.format.filter.not",function(a){return new Yt(a)});t("ol.format.filter.bbox",cu);t("ol.format.filter.contains",function(a,b,c){return new Lt(a,b,c)});t("ol.format.filter.intersects",function(a,b,c){return new St(a,b,c)});t("ol.format.filter.within",function(a,b,c){return new au(a,b,c)});
-t("ol.format.filter.equalTo",function(a,b,c){return new Pt(a,b,c)});t("ol.format.filter.notEqualTo",function(a,b,c){return new Zt(a,b,c)});t("ol.format.filter.lessThan",function(a,b){return new Wt(a,b)});t("ol.format.filter.lessThanOrEqualTo",function(a,b){return new Xt(a,b)});t("ol.format.filter.greaterThan",function(a,b){return new Qt(a,b)});t("ol.format.filter.greaterThanOrEqualTo",function(a,b){return new Rt(a,b)});t("ol.format.filter.isNull",function(a){return new Vt(a)});
-t("ol.format.filter.between",function(a,b,c){return new Tt(a,b,c)});t("ol.format.filter.like",function(a,b,c,d,e,f){return new Ut(a,b,c,d,e,f)});t("ol.format.filter.during",function(a,b,c){return new Nt(a,b,c)});t("ol.format.GeoJSON",Qq);Qq.prototype.readFeature=Qq.prototype.Yb;Qq.prototype.readFeatures=Qq.prototype.Qa;Qq.prototype.readGeometry=Qq.prototype.ed;Qq.prototype.readProjection=Qq.prototype.sb;Qq.prototype.writeFeature=Qq.prototype.Jd;Qq.prototype.writeFeatureObject=Qq.prototype.ld;
-Qq.prototype.writeFeatures=Qq.prototype.ac;Qq.prototype.writeFeaturesObject=Qq.prototype.qe;Qq.prototype.writeGeometry=Qq.prototype.md;Qq.prototype.writeGeometryObject=Qq.prototype.se;t("ol.format.GML",Kp);Kp.prototype.writeFeatures=Kp.prototype.ac;Kp.prototype.writeFeaturesNode=Kp.prototype.bc;t("ol.format.GML2",Tp);t("ol.format.GML3",Kp);Kp.prototype.writeGeometryNode=Kp.prototype.re;Kp.prototype.writeFeatures=Kp.prototype.ac;Kp.prototype.writeFeaturesNode=Kp.prototype.bc;
-Zo.prototype.readFeatures=Zo.prototype.Qa;t("ol.format.GPX",dq);dq.prototype.readFeature=dq.prototype.Yb;dq.prototype.readFeatures=dq.prototype.Qa;dq.prototype.readProjection=dq.prototype.sb;dq.prototype.writeFeatures=dq.prototype.ac;dq.prototype.writeFeaturesNode=dq.prototype.bc;t("ol.format.IGC",Xq);Xq.prototype.readFeature=Xq.prototype.Yb;Xq.prototype.readFeatures=Xq.prototype.Qa;Xq.prototype.readProjection=Xq.prototype.sb;t("ol.format.KML",er);er.prototype.readFeature=er.prototype.Yb;
-er.prototype.readFeatures=er.prototype.Qa;er.prototype.readName=er.prototype.cq;er.prototype.readNetworkLinks=er.prototype.eq;er.prototype.readRegion=er.prototype.hq;er.prototype.readRegionFromNode=er.prototype.vf;er.prototype.readProjection=er.prototype.sb;er.prototype.writeFeatures=er.prototype.ac;er.prototype.writeFeaturesNode=er.prototype.bc;t("ol.format.MVT",jt);jt.prototype.getLastExtent=jt.prototype.cg;jt.prototype.readFeatures=jt.prototype.Qa;jt.prototype.readProjection=jt.prototype.sb;
-jt.prototype.setLayers=jt.prototype.Sn;t("ol.format.OSMXML",ot);ot.prototype.readFeatures=ot.prototype.Qa;ot.prototype.readProjection=ot.prototype.sb;t("ol.format.Polyline",vt);t("ol.format.Polyline.encodeDeltas",wt);t("ol.format.Polyline.decodeDeltas",yt);t("ol.format.Polyline.encodeFloats",xt);t("ol.format.Polyline.decodeFloats",zt);vt.prototype.readFeature=vt.prototype.Yb;vt.prototype.readFeatures=vt.prototype.Qa;vt.prototype.readGeometry=vt.prototype.ed;vt.prototype.readProjection=vt.prototype.sb;
-vt.prototype.writeGeometry=vt.prototype.md;t("ol.format.TopoJSON",At);At.prototype.readFeatures=At.prototype.Qa;At.prototype.readProjection=At.prototype.sb;t("ol.format.WFS",du);du.prototype.readFeatures=du.prototype.Qa;du.prototype.readTransactionResponse=du.prototype.j;du.prototype.readFeatureCollectionMetadata=du.prototype.f;t("ol.format.WFS.writeFilter",function(a){var b=no("http://www.opengis.net/ogc","Filter");Do({node:b},su,yo(a.rc),[a],[]);return b});du.prototype.writeGetFeature=du.prototype.s;
-du.prototype.writeTransaction=du.prototype.v;du.prototype.readProjection=du.prototype.sb;t("ol.format.WKT",Ku);Ku.prototype.readFeature=Ku.prototype.Yb;Ku.prototype.readFeatures=Ku.prototype.Qa;Ku.prototype.readGeometry=Ku.prototype.ed;Ku.prototype.writeFeature=Ku.prototype.Jd;Ku.prototype.writeFeatures=Ku.prototype.ac;Ku.prototype.writeGeometry=Ku.prototype.md;t("ol.format.WMSCapabilities",ev);ev.prototype.read=ev.prototype.read;t("ol.format.WMSGetFeatureInfo",Bv);Bv.prototype.readFeatures=Bv.prototype.Qa;
-t("ol.format.WMTSCapabilities",Sv);Sv.prototype.read=Sv.prototype.read;t("ol.format.filter.And",It);t("ol.format.filter.Bbox",Jt);t("ol.format.filter.Comparison",Mt);t("ol.format.filter.ComparisonBinary",Ot);t("ol.format.filter.Contains",Lt);t("ol.format.filter.During",Nt);t("ol.format.filter.EqualTo",Pt);t("ol.format.filter.Filter",Gt);t("ol.format.filter.GreaterThan",Qt);t("ol.format.filter.GreaterThanOrEqualTo",Rt);t("ol.format.filter.Intersects",St);t("ol.format.filter.IsBetween",Tt);
-t("ol.format.filter.IsLike",Ut);t("ol.format.filter.IsNull",Vt);t("ol.format.filter.LessThan",Wt);t("ol.format.filter.LessThanOrEqualTo",Xt);t("ol.format.filter.Not",Yt);t("ol.format.filter.NotEqualTo",Zt);t("ol.format.filter.Or",$t);t("ol.format.filter.Spatial",Kt);t("ol.format.filter.Within",au);t("ol.events.condition.altKeyOnly",Wg);t("ol.events.condition.altShiftKeysOnly",Xg);t("ol.events.condition.always",Re);t("ol.events.condition.click",function(a){return"click"==a.type});
-t("ol.events.condition.never",Se);t("ol.events.condition.pointerMove",Zg);t("ol.events.condition.singleClick",$g);t("ol.events.condition.doubleClick",function(a){return"dblclick"==a.type});t("ol.events.condition.noModifierKeys",ah);t("ol.events.condition.platformModifierKeyOnly",function(a){a=a.originalEvent;return!a.altKey&&(md?a.metaKey:a.ctrlKey)&&!a.shiftKey});t("ol.events.condition.shiftKeyOnly",bh);t("ol.events.condition.targetNotEditable",ch);t("ol.events.condition.mouseOnly",dh);
-t("ol.events.condition.primaryAction",eh);Qc.prototype.type=Qc.prototype.type;Qc.prototype.target=Qc.prototype.target;Qc.prototype.preventDefault=Qc.prototype.preventDefault;Qc.prototype.stopPropagation=Qc.prototype.stopPropagation;t("ol.control.Attribution",zg);t("ol.control.Attribution.render",Ag);zg.prototype.getCollapsible=zg.prototype.An;zg.prototype.setCollapsible=zg.prototype.Dn;zg.prototype.setCollapsed=zg.prototype.Cn;zg.prototype.getCollapsed=zg.prototype.zn;t("ol.control.Control",vg);
-vg.prototype.getMap=vg.prototype.f;vg.prototype.setMap=vg.prototype.setMap;vg.prototype.setTarget=vg.prototype.i;t("ol.control.FullScreen",Mn);t("ol.control.MousePosition",Rn);t("ol.control.MousePosition.render",Sn);Rn.prototype.getCoordinateFormat=Rn.prototype.Qh;Rn.prototype.getProjection=Rn.prototype.si;Rn.prototype.setCoordinateFormat=Rn.prototype.Gj;Rn.prototype.setProjection=Rn.prototype.ti;t("ol.control.OverviewMap",Wn);t("ol.control.OverviewMap.render",Xn);Wn.prototype.getCollapsible=Wn.prototype.Gn;
-Wn.prototype.setCollapsible=Wn.prototype.Jn;Wn.prototype.setCollapsed=Wn.prototype.In;Wn.prototype.getCollapsed=Wn.prototype.Fn;Wn.prototype.getOverviewMap=Wn.prototype.Hl;t("ol.control.Rotate",Cg);t("ol.control.Rotate.render",Dg);t("ol.control.ScaleLine",ao);ao.prototype.getUnits=ao.prototype.C;t("ol.control.ScaleLine.render",bo);ao.prototype.setUnits=ao.prototype.O;t("ol.control.Zoom",Eg);t("ol.control.ZoomSlider",go);t("ol.control.ZoomSlider.render",io);t("ol.control.ZoomToExtent",lo);
-Vc.prototype.changed=Vc.prototype.u;Vc.prototype.dispatchEvent=Vc.prototype.b;Vc.prototype.getRevision=Vc.prototype.K;Vc.prototype.on=Vc.prototype.I;Vc.prototype.once=Vc.prototype.once;Vc.prototype.un=Vc.prototype.J;G.prototype.get=G.prototype.get;G.prototype.getKeys=G.prototype.P;G.prototype.getProperties=G.prototype.L;G.prototype.set=G.prototype.set;G.prototype.setProperties=G.prototype.H;G.prototype.unset=G.prototype.R;G.prototype.changed=G.prototype.u;G.prototype.dispatchEvent=G.prototype.b;
-G.prototype.getRevision=G.prototype.K;G.prototype.on=G.prototype.I;G.prototype.once=G.prototype.once;G.prototype.un=G.prototype.J;H.prototype.addControl=H.prototype.Mf;H.prototype.addInteraction=H.prototype.Nf;H.prototype.addLayer=H.prototype.xe;H.prototype.addOverlay=H.prototype.ye;H.prototype.forEachFeatureAtPixel=H.prototype.Tc;H.prototype.getFeaturesAtPixel=H.prototype.Xf;H.prototype.forEachLayerAtPixel=H.prototype.tg;H.prototype.hasFeatureAtPixel=H.prototype.ng;
-H.prototype.getEventCoordinate=H.prototype.Sd;H.prototype.getEventPixel=H.prototype.ud;H.prototype.getTarget=H.prototype.Xd;H.prototype.getTargetElement=H.prototype.Cc;H.prototype.getCoordinateFromPixel=H.prototype.Ra;H.prototype.getControls=H.prototype.Wf;H.prototype.getOverlays=H.prototype.gg;H.prototype.getOverlayById=H.prototype.fg;H.prototype.getInteractions=H.prototype.bg;H.prototype.getLayerGroup=H.prototype.hc;H.prototype.getLayers=H.prototype.Xe;H.prototype.getPixelFromCoordinate=H.prototype.Ia;
-H.prototype.getSize=H.prototype.Cb;H.prototype.getView=H.prototype.aa;H.prototype.getViewport=H.prototype.kg;H.prototype.renderSync=H.prototype.dh;H.prototype.render=H.prototype.render;H.prototype.removeControl=H.prototype.Xg;H.prototype.removeInteraction=H.prototype.Zg;H.prototype.removeLayer=H.prototype.$g;H.prototype.removeOverlay=H.prototype.ah;H.prototype.setLayerGroup=H.prototype.zf;H.prototype.setSize=H.prototype.be;H.prototype.setTarget=H.prototype.Ad;H.prototype.setView=H.prototype.jh;
-H.prototype.updateSize=H.prototype.Oc;H.prototype.get=H.prototype.get;H.prototype.getKeys=H.prototype.P;H.prototype.getProperties=H.prototype.L;H.prototype.set=H.prototype.set;H.prototype.setProperties=H.prototype.H;H.prototype.unset=H.prototype.R;H.prototype.changed=H.prototype.u;H.prototype.dispatchEvent=H.prototype.b;H.prototype.getRevision=H.prototype.K;H.prototype.on=H.prototype.I;H.prototype.once=H.prototype.once;H.prototype.un=H.prototype.J;B.prototype.get=B.prototype.get;
-B.prototype.getKeys=B.prototype.P;B.prototype.getProperties=B.prototype.L;B.prototype.set=B.prototype.set;B.prototype.setProperties=B.prototype.H;B.prototype.unset=B.prototype.R;B.prototype.changed=B.prototype.u;B.prototype.dispatchEvent=B.prototype.b;B.prototype.getRevision=B.prototype.K;B.prototype.on=B.prototype.I;B.prototype.once=B.prototype.once;B.prototype.un=B.prototype.J;cd.prototype.type=cd.prototype.type;cd.prototype.target=cd.prototype.target;cd.prototype.preventDefault=cd.prototype.preventDefault;
-cd.prototype.stopPropagation=cd.prototype.stopPropagation;pk.prototype.get=pk.prototype.get;pk.prototype.getKeys=pk.prototype.P;pk.prototype.getProperties=pk.prototype.L;pk.prototype.set=pk.prototype.set;pk.prototype.setProperties=pk.prototype.H;pk.prototype.unset=pk.prototype.R;pk.prototype.changed=pk.prototype.u;pk.prototype.dispatchEvent=pk.prototype.b;pk.prototype.getRevision=pk.prototype.K;pk.prototype.on=pk.prototype.I;pk.prototype.once=pk.prototype.once;pk.prototype.un=pk.prototype.J;
-Hk.prototype.get=Hk.prototype.get;Hk.prototype.getKeys=Hk.prototype.P;Hk.prototype.getProperties=Hk.prototype.L;Hk.prototype.set=Hk.prototype.set;Hk.prototype.setProperties=Hk.prototype.H;Hk.prototype.unset=Hk.prototype.R;Hk.prototype.changed=Hk.prototype.u;Hk.prototype.dispatchEvent=Hk.prototype.b;Hk.prototype.getRevision=Hk.prototype.K;Hk.prototype.on=Hk.prototype.I;Hk.prototype.once=Hk.prototype.once;Hk.prototype.un=Hk.prototype.J;Jk.prototype.get=Jk.prototype.get;Jk.prototype.getKeys=Jk.prototype.P;
-Jk.prototype.getProperties=Jk.prototype.L;Jk.prototype.set=Jk.prototype.set;Jk.prototype.setProperties=Jk.prototype.H;Jk.prototype.unset=Jk.prototype.R;Jk.prototype.changed=Jk.prototype.u;Jk.prototype.dispatchEvent=Jk.prototype.b;Jk.prototype.getRevision=Jk.prototype.K;Jk.prototype.on=Jk.prototype.I;Jk.prototype.once=Jk.prototype.once;Jk.prototype.un=Jk.prototype.J;el.prototype.getTileCoord=el.prototype.i;el.prototype.load=el.prototype.load;K.prototype.addControl=K.prototype.Mf;
-K.prototype.addInteraction=K.prototype.Nf;K.prototype.addLayer=K.prototype.xe;K.prototype.addOverlay=K.prototype.ye;K.prototype.forEachFeatureAtPixel=K.prototype.Tc;K.prototype.getFeaturesAtPixel=K.prototype.Xf;K.prototype.forEachLayerAtPixel=K.prototype.tg;K.prototype.hasFeatureAtPixel=K.prototype.ng;K.prototype.getEventCoordinate=K.prototype.Sd;K.prototype.getEventPixel=K.prototype.ud;K.prototype.getTarget=K.prototype.Xd;K.prototype.getTargetElement=K.prototype.Cc;
-K.prototype.getCoordinateFromPixel=K.prototype.Ra;K.prototype.getControls=K.prototype.Wf;K.prototype.getOverlays=K.prototype.gg;K.prototype.getOverlayById=K.prototype.fg;K.prototype.getInteractions=K.prototype.bg;K.prototype.getLayerGroup=K.prototype.hc;K.prototype.getLayers=K.prototype.Xe;K.prototype.getPixelFromCoordinate=K.prototype.Ia;K.prototype.getSize=K.prototype.Cb;K.prototype.getView=K.prototype.aa;K.prototype.getViewport=K.prototype.kg;K.prototype.renderSync=K.prototype.dh;
-K.prototype.render=K.prototype.render;K.prototype.removeControl=K.prototype.Xg;K.prototype.removeInteraction=K.prototype.Zg;K.prototype.removeLayer=K.prototype.$g;K.prototype.removeOverlay=K.prototype.ah;K.prototype.setLayerGroup=K.prototype.zf;K.prototype.setSize=K.prototype.be;K.prototype.setTarget=K.prototype.Ad;K.prototype.setView=K.prototype.jh;K.prototype.updateSize=K.prototype.Oc;K.prototype.get=K.prototype.get;K.prototype.getKeys=K.prototype.P;K.prototype.getProperties=K.prototype.L;
-K.prototype.set=K.prototype.set;K.prototype.setProperties=K.prototype.H;K.prototype.unset=K.prototype.R;K.prototype.changed=K.prototype.u;K.prototype.dispatchEvent=K.prototype.b;K.prototype.getRevision=K.prototype.K;K.prototype.on=K.prototype.I;K.prototype.once=K.prototype.once;K.prototype.un=K.prototype.J;dd.prototype.type=dd.prototype.type;dd.prototype.target=dd.prototype.target;dd.prototype.preventDefault=dd.prototype.preventDefault;dd.prototype.stopPropagation=dd.prototype.stopPropagation;
-ed.prototype.map=ed.prototype.map;ed.prototype.frameState=ed.prototype.frameState;ed.prototype.type=ed.prototype.type;ed.prototype.target=ed.prototype.target;ed.prototype.preventDefault=ed.prototype.preventDefault;ed.prototype.stopPropagation=ed.prototype.stopPropagation;Ad.prototype.originalEvent=Ad.prototype.originalEvent;Ad.prototype.pixel=Ad.prototype.pixel;Ad.prototype.coordinate=Ad.prototype.coordinate;Ad.prototype.dragging=Ad.prototype.dragging;Ad.prototype.preventDefault=Ad.prototype.preventDefault;
-Ad.prototype.stopPropagation=Ad.prototype.stopPropagation;Ad.prototype.map=Ad.prototype.map;Ad.prototype.frameState=Ad.prototype.frameState;Ad.prototype.type=Ad.prototype.type;Ad.prototype.target=Ad.prototype.target;Zc.prototype.type=Zc.prototype.type;Zc.prototype.target=Zc.prototype.target;Zc.prototype.preventDefault=Zc.prototype.preventDefault;Zc.prototype.stopPropagation=Zc.prototype.stopPropagation;Bn.prototype.get=Bn.prototype.get;Bn.prototype.getKeys=Bn.prototype.P;
-Bn.prototype.getProperties=Bn.prototype.L;Bn.prototype.set=Bn.prototype.set;Bn.prototype.setProperties=Bn.prototype.H;Bn.prototype.unset=Bn.prototype.R;Bn.prototype.changed=Bn.prototype.u;Bn.prototype.dispatchEvent=Bn.prototype.b;Bn.prototype.getRevision=Bn.prototype.K;Bn.prototype.on=Bn.prototype.I;Bn.prototype.once=Bn.prototype.once;Bn.prototype.un=Bn.prototype.J;pz.prototype.getTileCoord=pz.prototype.i;pz.prototype.load=pz.prototype.load;Kn.prototype.getTileCoord=Kn.prototype.i;
-Kn.prototype.load=Kn.prototype.load;F.prototype.get=F.prototype.get;F.prototype.getKeys=F.prototype.P;F.prototype.getProperties=F.prototype.L;F.prototype.set=F.prototype.set;F.prototype.setProperties=F.prototype.H;F.prototype.unset=F.prototype.R;F.prototype.changed=F.prototype.u;F.prototype.dispatchEvent=F.prototype.b;F.prototype.getRevision=F.prototype.K;F.prototype.on=F.prototype.I;F.prototype.once=F.prototype.once;F.prototype.un=F.prototype.J;sz.prototype.forEachTileCoord=sz.prototype.Vf;
-sz.prototype.getMaxZoom=sz.prototype.mj;sz.prototype.getMinZoom=sz.prototype.nj;sz.prototype.getOrigin=sz.prototype.Ic;sz.prototype.getResolution=sz.prototype.Ta;sz.prototype.getResolutions=sz.prototype.oj;sz.prototype.getTileCoordExtent=sz.prototype.Ma;sz.prototype.getTileCoordForCoordAndResolution=sz.prototype.Le;sz.prototype.getTileCoordForCoordAndZ=sz.prototype.jg;sz.prototype.getTileSize=sz.prototype.Za;sz.prototype.getZForResolution=sz.prototype.Dc;wk.prototype.getOpacity=wk.prototype.hf;
-wk.prototype.getRotateWithView=wk.prototype.jf;wk.prototype.getRotation=wk.prototype.kf;wk.prototype.getScale=wk.prototype.lf;wk.prototype.getSnapToPixel=wk.prototype.Ke;wk.prototype.setOpacity=wk.prototype.Ed;wk.prototype.setRotation=wk.prototype.mf;wk.prototype.setScale=wk.prototype.Fd;yk.prototype.clone=yk.prototype.clone;yk.prototype.getAngle=yk.prototype.ij;yk.prototype.getFill=yk.prototype.Fa;yk.prototype.getPoints=yk.prototype.jj;yk.prototype.getRadius=yk.prototype.kj;
-yk.prototype.getRadius2=yk.prototype.Zh;yk.prototype.getStroke=yk.prototype.Ga;yk.prototype.getOpacity=yk.prototype.hf;yk.prototype.getRotateWithView=yk.prototype.jf;yk.prototype.getRotation=yk.prototype.kf;yk.prototype.getScale=yk.prototype.lf;yk.prototype.getSnapToPixel=yk.prototype.Ke;yk.prototype.setOpacity=yk.prototype.Ed;yk.prototype.setRotation=yk.prototype.mf;yk.prototype.setScale=yk.prototype.Fd;dr.prototype.getOpacity=dr.prototype.hf;dr.prototype.getRotateWithView=dr.prototype.jf;
-dr.prototype.getRotation=dr.prototype.kf;dr.prototype.getScale=dr.prototype.lf;dr.prototype.getSnapToPixel=dr.prototype.Ke;dr.prototype.setOpacity=dr.prototype.Ed;dr.prototype.setRotation=dr.prototype.mf;dr.prototype.setScale=dr.prototype.Fd;uw.prototype.get=uw.prototype.get;uw.prototype.getKeys=uw.prototype.P;uw.prototype.getProperties=uw.prototype.L;uw.prototype.set=uw.prototype.set;uw.prototype.setProperties=uw.prototype.H;uw.prototype.unset=uw.prototype.R;uw.prototype.changed=uw.prototype.u;
-uw.prototype.dispatchEvent=uw.prototype.b;uw.prototype.getRevision=uw.prototype.K;uw.prototype.on=uw.prototype.I;uw.prototype.once=uw.prototype.once;uw.prototype.un=uw.prototype.J;iy.prototype.getAttributions=iy.prototype.za;iy.prototype.getLogo=iy.prototype.Aa;iy.prototype.getProjection=iy.prototype.Da;iy.prototype.getState=iy.prototype.getState;iy.prototype.refresh=iy.prototype.sa;iy.prototype.setAttributions=iy.prototype.va;iy.prototype.get=iy.prototype.get;iy.prototype.getKeys=iy.prototype.P;
-iy.prototype.getProperties=iy.prototype.L;iy.prototype.set=iy.prototype.set;iy.prototype.setProperties=iy.prototype.H;iy.prototype.unset=iy.prototype.R;iy.prototype.changed=iy.prototype.u;iy.prototype.dispatchEvent=iy.prototype.b;iy.prototype.getRevision=iy.prototype.K;iy.prototype.on=iy.prototype.I;iy.prototype.once=iy.prototype.once;iy.prototype.un=iy.prototype.J;my.prototype.getTileGrid=my.prototype.jb;my.prototype.refresh=my.prototype.sa;my.prototype.getAttributions=my.prototype.za;
-my.prototype.getLogo=my.prototype.Aa;my.prototype.getProjection=my.prototype.Da;my.prototype.getState=my.prototype.getState;my.prototype.setAttributions=my.prototype.va;my.prototype.get=my.prototype.get;my.prototype.getKeys=my.prototype.P;my.prototype.getProperties=my.prototype.L;my.prototype.set=my.prototype.set;my.prototype.setProperties=my.prototype.H;my.prototype.unset=my.prototype.R;my.prototype.changed=my.prototype.u;my.prototype.dispatchEvent=my.prototype.b;my.prototype.getRevision=my.prototype.K;
-my.prototype.on=my.prototype.I;my.prototype.once=my.prototype.once;my.prototype.un=my.prototype.J;ny.prototype.getTileLoadFunction=ny.prototype.yb;ny.prototype.getTileUrlFunction=ny.prototype.zb;ny.prototype.getUrls=ny.prototype.Ab;ny.prototype.setTileLoadFunction=ny.prototype.Fb;ny.prototype.setTileUrlFunction=ny.prototype.hb;ny.prototype.setUrl=ny.prototype.rb;ny.prototype.setUrls=ny.prototype.vb;ny.prototype.getTileGrid=ny.prototype.jb;ny.prototype.refresh=ny.prototype.sa;
-ny.prototype.getAttributions=ny.prototype.za;ny.prototype.getLogo=ny.prototype.Aa;ny.prototype.getProjection=ny.prototype.Da;ny.prototype.getState=ny.prototype.getState;ny.prototype.setAttributions=ny.prototype.va;ny.prototype.get=ny.prototype.get;ny.prototype.getKeys=ny.prototype.P;ny.prototype.getProperties=ny.prototype.L;ny.prototype.set=ny.prototype.set;ny.prototype.setProperties=ny.prototype.H;ny.prototype.unset=ny.prototype.R;ny.prototype.changed=ny.prototype.u;ny.prototype.dispatchEvent=ny.prototype.b;
-ny.prototype.getRevision=ny.prototype.K;ny.prototype.on=ny.prototype.I;ny.prototype.once=ny.prototype.once;ny.prototype.un=ny.prototype.J;ry.prototype.setRenderReprojectionEdges=ry.prototype.Qb;ry.prototype.setTileGridForProjection=ry.prototype.Rb;ry.prototype.getTileLoadFunction=ry.prototype.yb;ry.prototype.getTileUrlFunction=ry.prototype.zb;ry.prototype.getUrls=ry.prototype.Ab;ry.prototype.setTileLoadFunction=ry.prototype.Fb;ry.prototype.setTileUrlFunction=ry.prototype.hb;ry.prototype.setUrl=ry.prototype.rb;
-ry.prototype.setUrls=ry.prototype.vb;ry.prototype.getTileGrid=ry.prototype.jb;ry.prototype.refresh=ry.prototype.sa;ry.prototype.getAttributions=ry.prototype.za;ry.prototype.getLogo=ry.prototype.Aa;ry.prototype.getProjection=ry.prototype.Da;ry.prototype.getState=ry.prototype.getState;ry.prototype.setAttributions=ry.prototype.va;ry.prototype.get=ry.prototype.get;ry.prototype.getKeys=ry.prototype.P;ry.prototype.getProperties=ry.prototype.L;ry.prototype.set=ry.prototype.set;
-ry.prototype.setProperties=ry.prototype.H;ry.prototype.unset=ry.prototype.R;ry.prototype.changed=ry.prototype.u;ry.prototype.dispatchEvent=ry.prototype.b;ry.prototype.getRevision=ry.prototype.K;ry.prototype.on=ry.prototype.I;ry.prototype.once=ry.prototype.once;ry.prototype.un=ry.prototype.J;sy.prototype.setRenderReprojectionEdges=sy.prototype.Qb;sy.prototype.setTileGridForProjection=sy.prototype.Rb;sy.prototype.getTileLoadFunction=sy.prototype.yb;sy.prototype.getTileUrlFunction=sy.prototype.zb;
-sy.prototype.getUrls=sy.prototype.Ab;sy.prototype.setTileLoadFunction=sy.prototype.Fb;sy.prototype.setTileUrlFunction=sy.prototype.hb;sy.prototype.setUrl=sy.prototype.rb;sy.prototype.setUrls=sy.prototype.vb;sy.prototype.getTileGrid=sy.prototype.jb;sy.prototype.refresh=sy.prototype.sa;sy.prototype.getAttributions=sy.prototype.za;sy.prototype.getLogo=sy.prototype.Aa;sy.prototype.getProjection=sy.prototype.Da;sy.prototype.getState=sy.prototype.getState;sy.prototype.setAttributions=sy.prototype.va;
-sy.prototype.get=sy.prototype.get;sy.prototype.getKeys=sy.prototype.P;sy.prototype.getProperties=sy.prototype.L;sy.prototype.set=sy.prototype.set;sy.prototype.setProperties=sy.prototype.H;sy.prototype.unset=sy.prototype.R;sy.prototype.changed=sy.prototype.u;sy.prototype.dispatchEvent=sy.prototype.b;sy.prototype.getRevision=sy.prototype.K;sy.prototype.on=sy.prototype.I;sy.prototype.once=sy.prototype.once;sy.prototype.un=sy.prototype.J;ty.prototype.setRenderReprojectionEdges=ty.prototype.Qb;
-ty.prototype.setTileGridForProjection=ty.prototype.Rb;ty.prototype.getTileLoadFunction=ty.prototype.yb;ty.prototype.getTileUrlFunction=ty.prototype.zb;ty.prototype.getUrls=ty.prototype.Ab;ty.prototype.setTileLoadFunction=ty.prototype.Fb;ty.prototype.setTileUrlFunction=ty.prototype.hb;ty.prototype.setUrl=ty.prototype.rb;ty.prototype.setUrls=ty.prototype.vb;ty.prototype.getTileGrid=ty.prototype.jb;ty.prototype.refresh=ty.prototype.sa;ty.prototype.getAttributions=ty.prototype.za;
-ty.prototype.getLogo=ty.prototype.Aa;ty.prototype.getProjection=ty.prototype.Da;ty.prototype.getState=ty.prototype.getState;ty.prototype.setAttributions=ty.prototype.va;ty.prototype.get=ty.prototype.get;ty.prototype.getKeys=ty.prototype.P;ty.prototype.getProperties=ty.prototype.L;ty.prototype.set=ty.prototype.set;ty.prototype.setProperties=ty.prototype.H;ty.prototype.unset=ty.prototype.R;ty.prototype.changed=ty.prototype.u;ty.prototype.dispatchEvent=ty.prototype.b;ty.prototype.getRevision=ty.prototype.K;
-ty.prototype.on=ty.prototype.I;ty.prototype.once=ty.prototype.once;ty.prototype.un=ty.prototype.J;U.prototype.getAttributions=U.prototype.za;U.prototype.getLogo=U.prototype.Aa;U.prototype.getProjection=U.prototype.Da;U.prototype.getState=U.prototype.getState;U.prototype.refresh=U.prototype.sa;U.prototype.setAttributions=U.prototype.va;U.prototype.get=U.prototype.get;U.prototype.getKeys=U.prototype.P;U.prototype.getProperties=U.prototype.L;U.prototype.set=U.prototype.set;
-U.prototype.setProperties=U.prototype.H;U.prototype.unset=U.prototype.R;U.prototype.changed=U.prototype.u;U.prototype.dispatchEvent=U.prototype.b;U.prototype.getRevision=U.prototype.K;U.prototype.on=U.prototype.I;U.prototype.once=U.prototype.once;U.prototype.un=U.prototype.J;X.prototype.addFeature=X.prototype.Gb;X.prototype.addFeatures=X.prototype.Qc;X.prototype.clear=X.prototype.clear;X.prototype.forEachFeature=X.prototype.Lh;X.prototype.forEachFeatureInExtent=X.prototype.ec;
-X.prototype.forEachFeatureIntersectingExtent=X.prototype.Mh;X.prototype.getFeaturesCollection=X.prototype.Th;X.prototype.getFeatures=X.prototype.ee;X.prototype.getFeaturesAtCoordinate=X.prototype.Sh;X.prototype.getFeaturesInExtent=X.prototype.Yf;X.prototype.getClosestFeatureToCoordinate=X.prototype.Oh;X.prototype.getExtent=X.prototype.G;X.prototype.getFeatureById=X.prototype.Rh;X.prototype.getFormat=X.prototype.ej;X.prototype.getUrl=X.prototype.fj;X.prototype.removeLoadedExtent=X.prototype.Cj;
-X.prototype.removeFeature=X.prototype.Lb;X.prototype.setLoader=X.prototype.hj;X.prototype.getAttributions=X.prototype.za;X.prototype.getLogo=X.prototype.Aa;X.prototype.getProjection=X.prototype.Da;X.prototype.getState=X.prototype.getState;X.prototype.refresh=X.prototype.sa;X.prototype.setAttributions=X.prototype.va;X.prototype.get=X.prototype.get;X.prototype.getKeys=X.prototype.P;X.prototype.getProperties=X.prototype.L;X.prototype.set=X.prototype.set;X.prototype.setProperties=X.prototype.H;
-X.prototype.unset=X.prototype.R;X.prototype.changed=X.prototype.u;X.prototype.dispatchEvent=X.prototype.b;X.prototype.getRevision=X.prototype.K;X.prototype.on=X.prototype.I;X.prototype.once=X.prototype.once;X.prototype.un=X.prototype.J;zy.prototype.getAttributions=zy.prototype.za;zy.prototype.getLogo=zy.prototype.Aa;zy.prototype.getProjection=zy.prototype.Da;zy.prototype.getState=zy.prototype.getState;zy.prototype.refresh=zy.prototype.sa;zy.prototype.setAttributions=zy.prototype.va;
-zy.prototype.get=zy.prototype.get;zy.prototype.getKeys=zy.prototype.P;zy.prototype.getProperties=zy.prototype.L;zy.prototype.set=zy.prototype.set;zy.prototype.setProperties=zy.prototype.H;zy.prototype.unset=zy.prototype.R;zy.prototype.changed=zy.prototype.u;zy.prototype.dispatchEvent=zy.prototype.b;zy.prototype.getRevision=zy.prototype.K;zy.prototype.on=zy.prototype.I;zy.prototype.once=zy.prototype.once;zy.prototype.un=zy.prototype.J;By.prototype.type=By.prototype.type;By.prototype.target=By.prototype.target;
-By.prototype.preventDefault=By.prototype.preventDefault;By.prototype.stopPropagation=By.prototype.stopPropagation;Hy.prototype.getAttributions=Hy.prototype.za;Hy.prototype.getLogo=Hy.prototype.Aa;Hy.prototype.getProjection=Hy.prototype.Da;Hy.prototype.getState=Hy.prototype.getState;Hy.prototype.refresh=Hy.prototype.sa;Hy.prototype.setAttributions=Hy.prototype.va;Hy.prototype.get=Hy.prototype.get;Hy.prototype.getKeys=Hy.prototype.P;Hy.prototype.getProperties=Hy.prototype.L;Hy.prototype.set=Hy.prototype.set;
-Hy.prototype.setProperties=Hy.prototype.H;Hy.prototype.unset=Hy.prototype.R;Hy.prototype.changed=Hy.prototype.u;Hy.prototype.dispatchEvent=Hy.prototype.b;Hy.prototype.getRevision=Hy.prototype.K;Hy.prototype.on=Hy.prototype.I;Hy.prototype.once=Hy.prototype.once;Hy.prototype.un=Hy.prototype.J;Iy.prototype.getAttributions=Iy.prototype.za;Iy.prototype.getLogo=Iy.prototype.Aa;Iy.prototype.getProjection=Iy.prototype.Da;Iy.prototype.getState=Iy.prototype.getState;Iy.prototype.refresh=Iy.prototype.sa;
-Iy.prototype.setAttributions=Iy.prototype.va;Iy.prototype.get=Iy.prototype.get;Iy.prototype.getKeys=Iy.prototype.P;Iy.prototype.getProperties=Iy.prototype.L;Iy.prototype.set=Iy.prototype.set;Iy.prototype.setProperties=Iy.prototype.H;Iy.prototype.unset=Iy.prototype.R;Iy.prototype.changed=Iy.prototype.u;Iy.prototype.dispatchEvent=Iy.prototype.b;Iy.prototype.getRevision=Iy.prototype.K;Iy.prototype.on=Iy.prototype.I;Iy.prototype.once=Iy.prototype.once;Iy.prototype.un=Iy.prototype.J;
-Jy.prototype.getAttributions=Jy.prototype.za;Jy.prototype.getLogo=Jy.prototype.Aa;Jy.prototype.getProjection=Jy.prototype.Da;Jy.prototype.getState=Jy.prototype.getState;Jy.prototype.refresh=Jy.prototype.sa;Jy.prototype.setAttributions=Jy.prototype.va;Jy.prototype.get=Jy.prototype.get;Jy.prototype.getKeys=Jy.prototype.P;Jy.prototype.getProperties=Jy.prototype.L;Jy.prototype.set=Jy.prototype.set;Jy.prototype.setProperties=Jy.prototype.H;Jy.prototype.unset=Jy.prototype.R;Jy.prototype.changed=Jy.prototype.u;
-Jy.prototype.dispatchEvent=Jy.prototype.b;Jy.prototype.getRevision=Jy.prototype.K;Jy.prototype.on=Jy.prototype.I;Jy.prototype.once=Jy.prototype.once;Jy.prototype.un=Jy.prototype.J;Ky.prototype.getAttributions=Ky.prototype.za;Ky.prototype.getLogo=Ky.prototype.Aa;Ky.prototype.getProjection=Ky.prototype.Da;Ky.prototype.getState=Ky.prototype.getState;Ky.prototype.refresh=Ky.prototype.sa;Ky.prototype.setAttributions=Ky.prototype.va;Ky.prototype.get=Ky.prototype.get;Ky.prototype.getKeys=Ky.prototype.P;
-Ky.prototype.getProperties=Ky.prototype.L;Ky.prototype.set=Ky.prototype.set;Ky.prototype.setProperties=Ky.prototype.H;Ky.prototype.unset=Ky.prototype.R;Ky.prototype.changed=Ky.prototype.u;Ky.prototype.dispatchEvent=Ky.prototype.b;Ky.prototype.getRevision=Ky.prototype.K;Ky.prototype.on=Ky.prototype.I;Ky.prototype.once=Ky.prototype.once;Ky.prototype.un=Ky.prototype.J;Ly.prototype.getAttributions=Ly.prototype.za;Ly.prototype.getLogo=Ly.prototype.Aa;Ly.prototype.getProjection=Ly.prototype.Da;
-Ly.prototype.getState=Ly.prototype.getState;Ly.prototype.refresh=Ly.prototype.sa;Ly.prototype.setAttributions=Ly.prototype.va;Ly.prototype.get=Ly.prototype.get;Ly.prototype.getKeys=Ly.prototype.P;Ly.prototype.getProperties=Ly.prototype.L;Ly.prototype.set=Ly.prototype.set;Ly.prototype.setProperties=Ly.prototype.H;Ly.prototype.unset=Ly.prototype.R;Ly.prototype.changed=Ly.prototype.u;Ly.prototype.dispatchEvent=Ly.prototype.b;Ly.prototype.getRevision=Ly.prototype.K;Ly.prototype.on=Ly.prototype.I;
-Ly.prototype.once=Ly.prototype.once;Ly.prototype.un=Ly.prototype.J;Ny.prototype.getAttributions=Ny.prototype.za;Ny.prototype.getLogo=Ny.prototype.Aa;Ny.prototype.getProjection=Ny.prototype.Da;Ny.prototype.getState=Ny.prototype.getState;Ny.prototype.refresh=Ny.prototype.sa;Ny.prototype.setAttributions=Ny.prototype.va;Ny.prototype.get=Ny.prototype.get;Ny.prototype.getKeys=Ny.prototype.P;Ny.prototype.getProperties=Ny.prototype.L;Ny.prototype.set=Ny.prototype.set;Ny.prototype.setProperties=Ny.prototype.H;
-Ny.prototype.unset=Ny.prototype.R;Ny.prototype.changed=Ny.prototype.u;Ny.prototype.dispatchEvent=Ny.prototype.b;Ny.prototype.getRevision=Ny.prototype.K;Ny.prototype.on=Ny.prototype.I;Ny.prototype.once=Ny.prototype.once;Ny.prototype.un=Ny.prototype.J;Ry.prototype.setRenderReprojectionEdges=Ry.prototype.Qb;Ry.prototype.setTileGridForProjection=Ry.prototype.Rb;Ry.prototype.getTileLoadFunction=Ry.prototype.yb;Ry.prototype.getTileUrlFunction=Ry.prototype.zb;Ry.prototype.getUrls=Ry.prototype.Ab;
-Ry.prototype.setTileLoadFunction=Ry.prototype.Fb;Ry.prototype.setTileUrlFunction=Ry.prototype.hb;Ry.prototype.setUrl=Ry.prototype.rb;Ry.prototype.setUrls=Ry.prototype.vb;Ry.prototype.getTileGrid=Ry.prototype.jb;Ry.prototype.refresh=Ry.prototype.sa;Ry.prototype.getAttributions=Ry.prototype.za;Ry.prototype.getLogo=Ry.prototype.Aa;Ry.prototype.getProjection=Ry.prototype.Da;Ry.prototype.getState=Ry.prototype.getState;Ry.prototype.setAttributions=Ry.prototype.va;Ry.prototype.get=Ry.prototype.get;
-Ry.prototype.getKeys=Ry.prototype.P;Ry.prototype.getProperties=Ry.prototype.L;Ry.prototype.set=Ry.prototype.set;Ry.prototype.setProperties=Ry.prototype.H;Ry.prototype.unset=Ry.prototype.R;Ry.prototype.changed=Ry.prototype.u;Ry.prototype.dispatchEvent=Ry.prototype.b;Ry.prototype.getRevision=Ry.prototype.K;Ry.prototype.on=Ry.prototype.I;Ry.prototype.once=Ry.prototype.once;Ry.prototype.un=Ry.prototype.J;Sy.prototype.getAttributions=Sy.prototype.za;Sy.prototype.getLogo=Sy.prototype.Aa;
-Sy.prototype.getProjection=Sy.prototype.Da;Sy.prototype.getState=Sy.prototype.getState;Sy.prototype.refresh=Sy.prototype.sa;Sy.prototype.setAttributions=Sy.prototype.va;Sy.prototype.get=Sy.prototype.get;Sy.prototype.getKeys=Sy.prototype.P;Sy.prototype.getProperties=Sy.prototype.L;Sy.prototype.set=Sy.prototype.set;Sy.prototype.setProperties=Sy.prototype.H;Sy.prototype.unset=Sy.prototype.R;Sy.prototype.changed=Sy.prototype.u;Sy.prototype.dispatchEvent=Sy.prototype.b;Sy.prototype.getRevision=Sy.prototype.K;
-Sy.prototype.on=Sy.prototype.I;Sy.prototype.once=Sy.prototype.once;Sy.prototype.un=Sy.prototype.J;Wy.prototype.type=Wy.prototype.type;Wy.prototype.target=Wy.prototype.target;Wy.prototype.preventDefault=Wy.prototype.preventDefault;Wy.prototype.stopPropagation=Wy.prototype.stopPropagation;Zy.prototype.setRenderReprojectionEdges=Zy.prototype.Qb;Zy.prototype.setTileGridForProjection=Zy.prototype.Rb;Zy.prototype.getTileLoadFunction=Zy.prototype.yb;Zy.prototype.getTileUrlFunction=Zy.prototype.zb;
-Zy.prototype.getUrls=Zy.prototype.Ab;Zy.prototype.setTileLoadFunction=Zy.prototype.Fb;Zy.prototype.setTileUrlFunction=Zy.prototype.hb;Zy.prototype.setUrl=Zy.prototype.rb;Zy.prototype.setUrls=Zy.prototype.vb;Zy.prototype.getTileGrid=Zy.prototype.jb;Zy.prototype.refresh=Zy.prototype.sa;Zy.prototype.getAttributions=Zy.prototype.za;Zy.prototype.getLogo=Zy.prototype.Aa;Zy.prototype.getProjection=Zy.prototype.Da;Zy.prototype.getState=Zy.prototype.getState;Zy.prototype.setAttributions=Zy.prototype.va;
-Zy.prototype.get=Zy.prototype.get;Zy.prototype.getKeys=Zy.prototype.P;Zy.prototype.getProperties=Zy.prototype.L;Zy.prototype.set=Zy.prototype.set;Zy.prototype.setProperties=Zy.prototype.H;Zy.prototype.unset=Zy.prototype.R;Zy.prototype.changed=Zy.prototype.u;Zy.prototype.dispatchEvent=Zy.prototype.b;Zy.prototype.getRevision=Zy.prototype.K;Zy.prototype.on=Zy.prototype.I;Zy.prototype.once=Zy.prototype.once;Zy.prototype.un=Zy.prototype.J;ly.prototype.type=ly.prototype.type;ly.prototype.target=ly.prototype.target;
-ly.prototype.preventDefault=ly.prototype.preventDefault;ly.prototype.stopPropagation=ly.prototype.stopPropagation;cz.prototype.setRenderReprojectionEdges=cz.prototype.Qb;cz.prototype.setTileGridForProjection=cz.prototype.Rb;cz.prototype.getTileLoadFunction=cz.prototype.yb;cz.prototype.getTileUrlFunction=cz.prototype.zb;cz.prototype.getUrls=cz.prototype.Ab;cz.prototype.setTileLoadFunction=cz.prototype.Fb;cz.prototype.setTileUrlFunction=cz.prototype.hb;cz.prototype.setUrl=cz.prototype.rb;
-cz.prototype.setUrls=cz.prototype.vb;cz.prototype.getTileGrid=cz.prototype.jb;cz.prototype.refresh=cz.prototype.sa;cz.prototype.getAttributions=cz.prototype.za;cz.prototype.getLogo=cz.prototype.Aa;cz.prototype.getProjection=cz.prototype.Da;cz.prototype.getState=cz.prototype.getState;cz.prototype.setAttributions=cz.prototype.va;cz.prototype.get=cz.prototype.get;cz.prototype.getKeys=cz.prototype.P;cz.prototype.getProperties=cz.prototype.L;cz.prototype.set=cz.prototype.set;
-cz.prototype.setProperties=cz.prototype.H;cz.prototype.unset=cz.prototype.R;cz.prototype.changed=cz.prototype.u;cz.prototype.dispatchEvent=cz.prototype.b;cz.prototype.getRevision=cz.prototype.K;cz.prototype.on=cz.prototype.I;cz.prototype.once=cz.prototype.once;cz.prototype.un=cz.prototype.J;ez.prototype.getTileGrid=ez.prototype.jb;ez.prototype.refresh=ez.prototype.sa;ez.prototype.getAttributions=ez.prototype.za;ez.prototype.getLogo=ez.prototype.Aa;ez.prototype.getProjection=ez.prototype.Da;
-ez.prototype.getState=ez.prototype.getState;ez.prototype.setAttributions=ez.prototype.va;ez.prototype.get=ez.prototype.get;ez.prototype.getKeys=ez.prototype.P;ez.prototype.getProperties=ez.prototype.L;ez.prototype.set=ez.prototype.set;ez.prototype.setProperties=ez.prototype.H;ez.prototype.unset=ez.prototype.R;ez.prototype.changed=ez.prototype.u;ez.prototype.dispatchEvent=ez.prototype.b;ez.prototype.getRevision=ez.prototype.K;ez.prototype.on=ez.prototype.I;ez.prototype.once=ez.prototype.once;
-ez.prototype.un=ez.prototype.J;gz.prototype.setRenderReprojectionEdges=gz.prototype.Qb;gz.prototype.setTileGridForProjection=gz.prototype.Rb;gz.prototype.getTileLoadFunction=gz.prototype.yb;gz.prototype.getTileUrlFunction=gz.prototype.zb;gz.prototype.getUrls=gz.prototype.Ab;gz.prototype.setTileLoadFunction=gz.prototype.Fb;gz.prototype.setTileUrlFunction=gz.prototype.hb;gz.prototype.setUrl=gz.prototype.rb;gz.prototype.setUrls=gz.prototype.vb;gz.prototype.getTileGrid=gz.prototype.jb;
-gz.prototype.refresh=gz.prototype.sa;gz.prototype.getAttributions=gz.prototype.za;gz.prototype.getLogo=gz.prototype.Aa;gz.prototype.getProjection=gz.prototype.Da;gz.prototype.getState=gz.prototype.getState;gz.prototype.setAttributions=gz.prototype.va;gz.prototype.get=gz.prototype.get;gz.prototype.getKeys=gz.prototype.P;gz.prototype.getProperties=gz.prototype.L;gz.prototype.set=gz.prototype.set;gz.prototype.setProperties=gz.prototype.H;gz.prototype.unset=gz.prototype.R;gz.prototype.changed=gz.prototype.u;
-gz.prototype.dispatchEvent=gz.prototype.b;gz.prototype.getRevision=gz.prototype.K;gz.prototype.on=gz.prototype.I;gz.prototype.once=gz.prototype.once;gz.prototype.un=gz.prototype.J;hz.prototype.getTileGrid=hz.prototype.jb;hz.prototype.refresh=hz.prototype.sa;hz.prototype.getAttributions=hz.prototype.za;hz.prototype.getLogo=hz.prototype.Aa;hz.prototype.getProjection=hz.prototype.Da;hz.prototype.getState=hz.prototype.getState;hz.prototype.setAttributions=hz.prototype.va;hz.prototype.get=hz.prototype.get;
-hz.prototype.getKeys=hz.prototype.P;hz.prototype.getProperties=hz.prototype.L;hz.prototype.set=hz.prototype.set;hz.prototype.setProperties=hz.prototype.H;hz.prototype.unset=hz.prototype.R;hz.prototype.changed=hz.prototype.u;hz.prototype.dispatchEvent=hz.prototype.b;hz.prototype.getRevision=hz.prototype.K;hz.prototype.on=hz.prototype.I;hz.prototype.once=hz.prototype.once;hz.prototype.un=hz.prototype.J;lz.prototype.setRenderReprojectionEdges=lz.prototype.Qb;lz.prototype.setTileGridForProjection=lz.prototype.Rb;
-lz.prototype.getTileLoadFunction=lz.prototype.yb;lz.prototype.getTileUrlFunction=lz.prototype.zb;lz.prototype.getUrls=lz.prototype.Ab;lz.prototype.setTileLoadFunction=lz.prototype.Fb;lz.prototype.setTileUrlFunction=lz.prototype.hb;lz.prototype.setUrl=lz.prototype.rb;lz.prototype.setUrls=lz.prototype.vb;lz.prototype.getTileGrid=lz.prototype.jb;lz.prototype.refresh=lz.prototype.sa;lz.prototype.getAttributions=lz.prototype.za;lz.prototype.getLogo=lz.prototype.Aa;lz.prototype.getProjection=lz.prototype.Da;
-lz.prototype.getState=lz.prototype.getState;lz.prototype.setAttributions=lz.prototype.va;lz.prototype.get=lz.prototype.get;lz.prototype.getKeys=lz.prototype.P;lz.prototype.getProperties=lz.prototype.L;lz.prototype.set=lz.prototype.set;lz.prototype.setProperties=lz.prototype.H;lz.prototype.unset=lz.prototype.R;lz.prototype.changed=lz.prototype.u;lz.prototype.dispatchEvent=lz.prototype.b;lz.prototype.getRevision=lz.prototype.K;lz.prototype.on=lz.prototype.I;lz.prototype.once=lz.prototype.once;
-lz.prototype.un=lz.prototype.J;Bw.prototype.type=Bw.prototype.type;Bw.prototype.target=Bw.prototype.target;Bw.prototype.preventDefault=Bw.prototype.preventDefault;Bw.prototype.stopPropagation=Bw.prototype.stopPropagation;rz.prototype.getTileLoadFunction=rz.prototype.yb;rz.prototype.getTileUrlFunction=rz.prototype.zb;rz.prototype.getUrls=rz.prototype.Ab;rz.prototype.setTileLoadFunction=rz.prototype.Fb;rz.prototype.setTileUrlFunction=rz.prototype.hb;rz.prototype.setUrl=rz.prototype.rb;
-rz.prototype.setUrls=rz.prototype.vb;rz.prototype.getTileGrid=rz.prototype.jb;rz.prototype.refresh=rz.prototype.sa;rz.prototype.getAttributions=rz.prototype.za;rz.prototype.getLogo=rz.prototype.Aa;rz.prototype.getProjection=rz.prototype.Da;rz.prototype.getState=rz.prototype.getState;rz.prototype.setAttributions=rz.prototype.va;rz.prototype.get=rz.prototype.get;rz.prototype.getKeys=rz.prototype.P;rz.prototype.getProperties=rz.prototype.L;rz.prototype.set=rz.prototype.set;
-rz.prototype.setProperties=rz.prototype.H;rz.prototype.unset=rz.prototype.R;rz.prototype.changed=rz.prototype.u;rz.prototype.dispatchEvent=rz.prototype.b;rz.prototype.getRevision=rz.prototype.K;rz.prototype.on=rz.prototype.I;rz.prototype.once=rz.prototype.once;rz.prototype.un=rz.prototype.J;Y.prototype.setRenderReprojectionEdges=Y.prototype.Qb;Y.prototype.setTileGridForProjection=Y.prototype.Rb;Y.prototype.getTileLoadFunction=Y.prototype.yb;Y.prototype.getTileUrlFunction=Y.prototype.zb;
-Y.prototype.getUrls=Y.prototype.Ab;Y.prototype.setTileLoadFunction=Y.prototype.Fb;Y.prototype.setTileUrlFunction=Y.prototype.hb;Y.prototype.setUrl=Y.prototype.rb;Y.prototype.setUrls=Y.prototype.vb;Y.prototype.getTileGrid=Y.prototype.jb;Y.prototype.refresh=Y.prototype.sa;Y.prototype.getAttributions=Y.prototype.za;Y.prototype.getLogo=Y.prototype.Aa;Y.prototype.getProjection=Y.prototype.Da;Y.prototype.getState=Y.prototype.getState;Y.prototype.setAttributions=Y.prototype.va;Y.prototype.get=Y.prototype.get;
-Y.prototype.getKeys=Y.prototype.P;Y.prototype.getProperties=Y.prototype.L;Y.prototype.set=Y.prototype.set;Y.prototype.setProperties=Y.prototype.H;Y.prototype.unset=Y.prototype.R;Y.prototype.changed=Y.prototype.u;Y.prototype.dispatchEvent=Y.prototype.b;Y.prototype.getRevision=Y.prototype.K;Y.prototype.on=Y.prototype.I;Y.prototype.once=Y.prototype.once;Y.prototype.un=Y.prototype.J;vz.prototype.setRenderReprojectionEdges=vz.prototype.Qb;vz.prototype.setTileGridForProjection=vz.prototype.Rb;
-vz.prototype.getTileLoadFunction=vz.prototype.yb;vz.prototype.getTileUrlFunction=vz.prototype.zb;vz.prototype.getUrls=vz.prototype.Ab;vz.prototype.setTileLoadFunction=vz.prototype.Fb;vz.prototype.setTileUrlFunction=vz.prototype.hb;vz.prototype.setUrl=vz.prototype.rb;vz.prototype.setUrls=vz.prototype.vb;vz.prototype.getTileGrid=vz.prototype.jb;vz.prototype.refresh=vz.prototype.sa;vz.prototype.getAttributions=vz.prototype.za;vz.prototype.getLogo=vz.prototype.Aa;vz.prototype.getProjection=vz.prototype.Da;
-vz.prototype.getState=vz.prototype.getState;vz.prototype.setAttributions=vz.prototype.va;vz.prototype.get=vz.prototype.get;vz.prototype.getKeys=vz.prototype.P;vz.prototype.getProperties=vz.prototype.L;vz.prototype.set=vz.prototype.set;vz.prototype.setProperties=vz.prototype.H;vz.prototype.unset=vz.prototype.R;vz.prototype.changed=vz.prototype.u;vz.prototype.dispatchEvent=vz.prototype.b;vz.prototype.getRevision=vz.prototype.K;vz.prototype.on=vz.prototype.I;vz.prototype.once=vz.prototype.once;
-vz.prototype.un=vz.prototype.J;hy.prototype.getTileCoord=hy.prototype.i;hy.prototype.load=hy.prototype.load;Ki.prototype.changed=Ki.prototype.u;Ki.prototype.dispatchEvent=Ki.prototype.b;Ki.prototype.getRevision=Ki.prototype.K;Ki.prototype.on=Ki.prototype.I;Ki.prototype.once=Ki.prototype.once;Ki.prototype.un=Ki.prototype.J;mn.prototype.changed=mn.prototype.u;mn.prototype.dispatchEvent=mn.prototype.b;mn.prototype.getRevision=mn.prototype.K;mn.prototype.on=mn.prototype.I;mn.prototype.once=mn.prototype.once;
-mn.prototype.un=mn.prototype.J;pn.prototype.changed=pn.prototype.u;pn.prototype.dispatchEvent=pn.prototype.b;pn.prototype.getRevision=pn.prototype.K;pn.prototype.on=pn.prototype.I;pn.prototype.once=pn.prototype.once;pn.prototype.un=pn.prototype.J;zn.prototype.changed=zn.prototype.u;zn.prototype.dispatchEvent=zn.prototype.b;zn.prototype.getRevision=zn.prototype.K;zn.prototype.on=zn.prototype.I;zn.prototype.once=zn.prototype.once;zn.prototype.un=zn.prototype.J;An.prototype.changed=An.prototype.u;
-An.prototype.dispatchEvent=An.prototype.b;An.prototype.getRevision=An.prototype.K;An.prototype.on=An.prototype.I;An.prototype.once=An.prototype.once;An.prototype.un=An.prototype.J;Xi.prototype.changed=Xi.prototype.u;Xi.prototype.dispatchEvent=Xi.prototype.b;Xi.prototype.getRevision=Xi.prototype.K;Xi.prototype.on=Xi.prototype.I;Xi.prototype.once=Xi.prototype.once;Xi.prototype.un=Xi.prototype.J;aj.prototype.changed=aj.prototype.u;aj.prototype.dispatchEvent=aj.prototype.b;aj.prototype.getRevision=aj.prototype.K;
-aj.prototype.on=aj.prototype.I;aj.prototype.once=aj.prototype.once;aj.prototype.un=aj.prototype.J;bj.prototype.changed=bj.prototype.u;bj.prototype.dispatchEvent=bj.prototype.b;bj.prototype.getRevision=bj.prototype.K;bj.prototype.on=bj.prototype.I;bj.prototype.once=bj.prototype.once;bj.prototype.un=bj.prototype.J;mj.prototype.changed=mj.prototype.u;mj.prototype.dispatchEvent=mj.prototype.b;mj.prototype.getRevision=mj.prototype.K;mj.prototype.on=mj.prototype.I;mj.prototype.once=mj.prototype.once;
-mj.prototype.un=mj.prototype.J;hk.prototype.changed=hk.prototype.u;hk.prototype.dispatchEvent=hk.prototype.b;hk.prototype.getRevision=hk.prototype.K;hk.prototype.on=hk.prototype.I;hk.prototype.once=hk.prototype.once;hk.prototype.un=hk.prototype.J;jk.prototype.changed=jk.prototype.u;jk.prototype.dispatchEvent=jk.prototype.b;jk.prototype.getRevision=jk.prototype.K;jk.prototype.on=jk.prototype.I;jk.prototype.once=jk.prototype.once;jk.prototype.un=jk.prototype.J;bi.prototype.type=bi.prototype.type;
-bi.prototype.target=bi.prototype.target;bi.prototype.preventDefault=bi.prototype.preventDefault;bi.prototype.stopPropagation=bi.prototype.stopPropagation;Md.prototype.type=Md.prototype.type;Md.prototype.target=Md.prototype.target;Md.prototype.preventDefault=Md.prototype.preventDefault;Md.prototype.stopPropagation=Md.prototype.stopPropagation;kg.prototype.get=kg.prototype.get;kg.prototype.getKeys=kg.prototype.P;kg.prototype.getProperties=kg.prototype.L;kg.prototype.set=kg.prototype.set;
-kg.prototype.setProperties=kg.prototype.H;kg.prototype.unset=kg.prototype.R;kg.prototype.changed=kg.prototype.u;kg.prototype.dispatchEvent=kg.prototype.b;kg.prototype.getRevision=kg.prototype.K;kg.prototype.on=kg.prototype.I;kg.prototype.once=kg.prototype.once;kg.prototype.un=kg.prototype.J;mg.prototype.getExtent=mg.prototype.G;mg.prototype.getMaxResolution=mg.prototype.lc;mg.prototype.getMinResolution=mg.prototype.mc;mg.prototype.getOpacity=mg.prototype.nc;mg.prototype.getVisible=mg.prototype.Jb;
-mg.prototype.getZIndex=mg.prototype.Ba;mg.prototype.setExtent=mg.prototype.Fc;mg.prototype.setMaxResolution=mg.prototype.Mc;mg.prototype.setMinResolution=mg.prototype.Nc;mg.prototype.setOpacity=mg.prototype.Gc;mg.prototype.setVisible=mg.prototype.Hc;mg.prototype.setZIndex=mg.prototype.$b;mg.prototype.get=mg.prototype.get;mg.prototype.getKeys=mg.prototype.P;mg.prototype.getProperties=mg.prototype.L;mg.prototype.set=mg.prototype.set;mg.prototype.setProperties=mg.prototype.H;mg.prototype.unset=mg.prototype.R;
-mg.prototype.changed=mg.prototype.u;mg.prototype.dispatchEvent=mg.prototype.b;mg.prototype.getRevision=mg.prototype.K;mg.prototype.on=mg.prototype.I;mg.prototype.once=mg.prototype.once;mg.prototype.un=mg.prototype.J;xg.prototype.getExtent=xg.prototype.G;xg.prototype.getMaxResolution=xg.prototype.lc;xg.prototype.getMinResolution=xg.prototype.mc;xg.prototype.getOpacity=xg.prototype.nc;xg.prototype.getVisible=xg.prototype.Jb;xg.prototype.getZIndex=xg.prototype.Ba;xg.prototype.setExtent=xg.prototype.Fc;
-xg.prototype.setMaxResolution=xg.prototype.Mc;xg.prototype.setMinResolution=xg.prototype.Nc;xg.prototype.setOpacity=xg.prototype.Gc;xg.prototype.setVisible=xg.prototype.Hc;xg.prototype.setZIndex=xg.prototype.$b;xg.prototype.get=xg.prototype.get;xg.prototype.getKeys=xg.prototype.P;xg.prototype.getProperties=xg.prototype.L;xg.prototype.set=xg.prototype.set;xg.prototype.setProperties=xg.prototype.H;xg.prototype.unset=xg.prototype.R;xg.prototype.changed=xg.prototype.u;xg.prototype.dispatchEvent=xg.prototype.b;
-xg.prototype.getRevision=xg.prototype.K;xg.prototype.on=xg.prototype.I;xg.prototype.once=xg.prototype.once;xg.prototype.un=xg.prototype.J;T.prototype.setMap=T.prototype.setMap;T.prototype.setSource=T.prototype.hd;T.prototype.getExtent=T.prototype.G;T.prototype.getMaxResolution=T.prototype.lc;T.prototype.getMinResolution=T.prototype.mc;T.prototype.getOpacity=T.prototype.nc;T.prototype.getVisible=T.prototype.Jb;T.prototype.getZIndex=T.prototype.Ba;T.prototype.setExtent=T.prototype.Fc;
-T.prototype.setMaxResolution=T.prototype.Mc;T.prototype.setMinResolution=T.prototype.Nc;T.prototype.setOpacity=T.prototype.Gc;T.prototype.setVisible=T.prototype.Hc;T.prototype.setZIndex=T.prototype.$b;T.prototype.get=T.prototype.get;T.prototype.getKeys=T.prototype.P;T.prototype.getProperties=T.prototype.L;T.prototype.set=T.prototype.set;T.prototype.setProperties=T.prototype.H;T.prototype.unset=T.prototype.R;T.prototype.changed=T.prototype.u;T.prototype.dispatchEvent=T.prototype.b;
-T.prototype.getRevision=T.prototype.K;T.prototype.on=T.prototype.I;T.prototype.once=T.prototype.once;T.prototype.un=T.prototype.J;V.prototype.getSource=V.prototype.ha;V.prototype.getStyle=V.prototype.B;V.prototype.getStyleFunction=V.prototype.ib;V.prototype.setStyle=V.prototype.j;V.prototype.setMap=V.prototype.setMap;V.prototype.setSource=V.prototype.hd;V.prototype.getExtent=V.prototype.G;V.prototype.getMaxResolution=V.prototype.lc;V.prototype.getMinResolution=V.prototype.mc;
-V.prototype.getOpacity=V.prototype.nc;V.prototype.getVisible=V.prototype.Jb;V.prototype.getZIndex=V.prototype.Ba;V.prototype.setExtent=V.prototype.Fc;V.prototype.setMaxResolution=V.prototype.Mc;V.prototype.setMinResolution=V.prototype.Nc;V.prototype.setOpacity=V.prototype.Gc;V.prototype.setVisible=V.prototype.Hc;V.prototype.setZIndex=V.prototype.$b;V.prototype.get=V.prototype.get;V.prototype.getKeys=V.prototype.P;V.prototype.getProperties=V.prototype.L;V.prototype.set=V.prototype.set;
-V.prototype.setProperties=V.prototype.H;V.prototype.unset=V.prototype.R;V.prototype.changed=V.prototype.u;V.prototype.dispatchEvent=V.prototype.b;V.prototype.getRevision=V.prototype.K;V.prototype.on=V.prototype.I;V.prototype.once=V.prototype.once;V.prototype.un=V.prototype.J;Sx.prototype.setMap=Sx.prototype.setMap;Sx.prototype.setSource=Sx.prototype.hd;Sx.prototype.getExtent=Sx.prototype.G;Sx.prototype.getMaxResolution=Sx.prototype.lc;Sx.prototype.getMinResolution=Sx.prototype.mc;
-Sx.prototype.getOpacity=Sx.prototype.nc;Sx.prototype.getVisible=Sx.prototype.Jb;Sx.prototype.getZIndex=Sx.prototype.Ba;Sx.prototype.setExtent=Sx.prototype.Fc;Sx.prototype.setMaxResolution=Sx.prototype.Mc;Sx.prototype.setMinResolution=Sx.prototype.Nc;Sx.prototype.setOpacity=Sx.prototype.Gc;Sx.prototype.setVisible=Sx.prototype.Hc;Sx.prototype.setZIndex=Sx.prototype.$b;Sx.prototype.get=Sx.prototype.get;Sx.prototype.getKeys=Sx.prototype.P;Sx.prototype.getProperties=Sx.prototype.L;Sx.prototype.set=Sx.prototype.set;
-Sx.prototype.setProperties=Sx.prototype.H;Sx.prototype.unset=Sx.prototype.R;Sx.prototype.changed=Sx.prototype.u;Sx.prototype.dispatchEvent=Sx.prototype.b;Sx.prototype.getRevision=Sx.prototype.K;Sx.prototype.on=Sx.prototype.I;Sx.prototype.once=Sx.prototype.once;Sx.prototype.un=Sx.prototype.J;Tx.prototype.setMap=Tx.prototype.setMap;Tx.prototype.setSource=Tx.prototype.hd;Tx.prototype.getExtent=Tx.prototype.G;Tx.prototype.getMaxResolution=Tx.prototype.lc;Tx.prototype.getMinResolution=Tx.prototype.mc;
-Tx.prototype.getOpacity=Tx.prototype.nc;Tx.prototype.getVisible=Tx.prototype.Jb;Tx.prototype.getZIndex=Tx.prototype.Ba;Tx.prototype.setExtent=Tx.prototype.Fc;Tx.prototype.setMaxResolution=Tx.prototype.Mc;Tx.prototype.setMinResolution=Tx.prototype.Nc;Tx.prototype.setOpacity=Tx.prototype.Gc;Tx.prototype.setVisible=Tx.prototype.Hc;Tx.prototype.setZIndex=Tx.prototype.$b;Tx.prototype.get=Tx.prototype.get;Tx.prototype.getKeys=Tx.prototype.P;Tx.prototype.getProperties=Tx.prototype.L;Tx.prototype.set=Tx.prototype.set;
-Tx.prototype.setProperties=Tx.prototype.H;Tx.prototype.unset=Tx.prototype.R;Tx.prototype.changed=Tx.prototype.u;Tx.prototype.dispatchEvent=Tx.prototype.b;Tx.prototype.getRevision=Tx.prototype.K;Tx.prototype.on=Tx.prototype.I;Tx.prototype.once=Tx.prototype.once;Tx.prototype.un=Tx.prototype.J;W.prototype.getStyle=W.prototype.B;W.prototype.getStyleFunction=W.prototype.ib;W.prototype.setStyle=W.prototype.j;W.prototype.setMap=W.prototype.setMap;W.prototype.setSource=W.prototype.hd;
-W.prototype.getExtent=W.prototype.G;W.prototype.getMaxResolution=W.prototype.lc;W.prototype.getMinResolution=W.prototype.mc;W.prototype.getOpacity=W.prototype.nc;W.prototype.getVisible=W.prototype.Jb;W.prototype.getZIndex=W.prototype.Ba;W.prototype.setExtent=W.prototype.Fc;W.prototype.setMaxResolution=W.prototype.Mc;W.prototype.setMinResolution=W.prototype.Nc;W.prototype.setOpacity=W.prototype.Gc;W.prototype.setVisible=W.prototype.Hc;W.prototype.setZIndex=W.prototype.$b;W.prototype.get=W.prototype.get;
-W.prototype.getKeys=W.prototype.P;W.prototype.getProperties=W.prototype.L;W.prototype.set=W.prototype.set;W.prototype.setProperties=W.prototype.H;W.prototype.unset=W.prototype.R;W.prototype.changed=W.prototype.u;W.prototype.dispatchEvent=W.prototype.b;W.prototype.getRevision=W.prototype.K;W.prototype.on=W.prototype.I;W.prototype.once=W.prototype.once;W.prototype.un=W.prototype.J;Jg.prototype.get=Jg.prototype.get;Jg.prototype.getKeys=Jg.prototype.P;Jg.prototype.getProperties=Jg.prototype.L;
-Jg.prototype.set=Jg.prototype.set;Jg.prototype.setProperties=Jg.prototype.H;Jg.prototype.unset=Jg.prototype.R;Jg.prototype.changed=Jg.prototype.u;Jg.prototype.dispatchEvent=Jg.prototype.b;Jg.prototype.getRevision=Jg.prototype.K;Jg.prototype.on=Jg.prototype.I;Jg.prototype.once=Jg.prototype.once;Jg.prototype.un=Jg.prototype.J;Ug.prototype.getActive=Ug.prototype.c;Ug.prototype.getMap=Ug.prototype.i;Ug.prototype.setActive=Ug.prototype.Ha;Ug.prototype.get=Ug.prototype.get;Ug.prototype.getKeys=Ug.prototype.P;
-Ug.prototype.getProperties=Ug.prototype.L;Ug.prototype.set=Ug.prototype.set;Ug.prototype.setProperties=Ug.prototype.H;Ug.prototype.unset=Ug.prototype.R;Ug.prototype.changed=Ug.prototype.u;Ug.prototype.dispatchEvent=Ug.prototype.b;Ug.prototype.getRevision=Ug.prototype.K;Ug.prototype.on=Ug.prototype.I;Ug.prototype.once=Ug.prototype.once;Ug.prototype.un=Ug.prototype.J;iw.prototype.getActive=iw.prototype.c;iw.prototype.getMap=iw.prototype.i;iw.prototype.setActive=iw.prototype.Ha;iw.prototype.get=iw.prototype.get;
-iw.prototype.getKeys=iw.prototype.P;iw.prototype.getProperties=iw.prototype.L;iw.prototype.set=iw.prototype.set;iw.prototype.setProperties=iw.prototype.H;iw.prototype.unset=iw.prototype.R;iw.prototype.changed=iw.prototype.u;iw.prototype.dispatchEvent=iw.prototype.b;iw.prototype.getRevision=iw.prototype.K;iw.prototype.on=iw.prototype.I;iw.prototype.once=iw.prototype.once;iw.prototype.un=iw.prototype.J;lw.prototype.type=lw.prototype.type;lw.prototype.target=lw.prototype.target;
-lw.prototype.preventDefault=lw.prototype.preventDefault;lw.prototype.stopPropagation=lw.prototype.stopPropagation;fh.prototype.getActive=fh.prototype.c;fh.prototype.getMap=fh.prototype.i;fh.prototype.setActive=fh.prototype.Ha;fh.prototype.get=fh.prototype.get;fh.prototype.getKeys=fh.prototype.P;fh.prototype.getProperties=fh.prototype.L;fh.prototype.set=fh.prototype.set;fh.prototype.setProperties=fh.prototype.H;fh.prototype.unset=fh.prototype.R;fh.prototype.changed=fh.prototype.u;
-fh.prototype.dispatchEvent=fh.prototype.b;fh.prototype.getRevision=fh.prototype.K;fh.prototype.on=fh.prototype.I;fh.prototype.once=fh.prototype.once;fh.prototype.un=fh.prototype.J;th.prototype.getActive=th.prototype.c;th.prototype.getMap=th.prototype.i;th.prototype.setActive=th.prototype.Ha;th.prototype.get=th.prototype.get;th.prototype.getKeys=th.prototype.P;th.prototype.getProperties=th.prototype.L;th.prototype.set=th.prototype.set;th.prototype.setProperties=th.prototype.H;th.prototype.unset=th.prototype.R;
-th.prototype.changed=th.prototype.u;th.prototype.dispatchEvent=th.prototype.b;th.prototype.getRevision=th.prototype.K;th.prototype.on=th.prototype.I;th.prototype.once=th.prototype.once;th.prototype.un=th.prototype.J;yh.prototype.type=yh.prototype.type;yh.prototype.target=yh.prototype.target;yh.prototype.preventDefault=yh.prototype.preventDefault;yh.prototype.stopPropagation=yh.prototype.stopPropagation;ih.prototype.getActive=ih.prototype.c;ih.prototype.getMap=ih.prototype.i;
-ih.prototype.setActive=ih.prototype.Ha;ih.prototype.get=ih.prototype.get;ih.prototype.getKeys=ih.prototype.P;ih.prototype.getProperties=ih.prototype.L;ih.prototype.set=ih.prototype.set;ih.prototype.setProperties=ih.prototype.H;ih.prototype.unset=ih.prototype.R;ih.prototype.changed=ih.prototype.u;ih.prototype.dispatchEvent=ih.prototype.b;ih.prototype.getRevision=ih.prototype.K;ih.prototype.on=ih.prototype.I;ih.prototype.once=ih.prototype.once;ih.prototype.un=ih.prototype.J;mh.prototype.getActive=mh.prototype.c;
-mh.prototype.getMap=mh.prototype.i;mh.prototype.setActive=mh.prototype.Ha;mh.prototype.get=mh.prototype.get;mh.prototype.getKeys=mh.prototype.P;mh.prototype.getProperties=mh.prototype.L;mh.prototype.set=mh.prototype.set;mh.prototype.setProperties=mh.prototype.H;mh.prototype.unset=mh.prototype.R;mh.prototype.changed=mh.prototype.u;mh.prototype.dispatchEvent=mh.prototype.b;mh.prototype.getRevision=mh.prototype.K;mh.prototype.on=mh.prototype.I;mh.prototype.once=mh.prototype.once;mh.prototype.un=mh.prototype.J;
-pw.prototype.getActive=pw.prototype.c;pw.prototype.getMap=pw.prototype.i;pw.prototype.setActive=pw.prototype.Ha;pw.prototype.get=pw.prototype.get;pw.prototype.getKeys=pw.prototype.P;pw.prototype.getProperties=pw.prototype.L;pw.prototype.set=pw.prototype.set;pw.prototype.setProperties=pw.prototype.H;pw.prototype.unset=pw.prototype.R;pw.prototype.changed=pw.prototype.u;pw.prototype.dispatchEvent=pw.prototype.b;pw.prototype.getRevision=pw.prototype.K;pw.prototype.on=pw.prototype.I;
-pw.prototype.once=pw.prototype.once;pw.prototype.un=pw.prototype.J;Ch.prototype.getGeometry=Ch.prototype.U;Ch.prototype.getActive=Ch.prototype.c;Ch.prototype.getMap=Ch.prototype.i;Ch.prototype.setActive=Ch.prototype.Ha;Ch.prototype.get=Ch.prototype.get;Ch.prototype.getKeys=Ch.prototype.P;Ch.prototype.getProperties=Ch.prototype.L;Ch.prototype.set=Ch.prototype.set;Ch.prototype.setProperties=Ch.prototype.H;Ch.prototype.unset=Ch.prototype.R;Ch.prototype.changed=Ch.prototype.u;
-Ch.prototype.dispatchEvent=Ch.prototype.b;Ch.prototype.getRevision=Ch.prototype.K;Ch.prototype.on=Ch.prototype.I;Ch.prototype.once=Ch.prototype.once;Ch.prototype.un=Ch.prototype.J;Ew.prototype.getActive=Ew.prototype.c;Ew.prototype.getMap=Ew.prototype.i;Ew.prototype.setActive=Ew.prototype.Ha;Ew.prototype.get=Ew.prototype.get;Ew.prototype.getKeys=Ew.prototype.P;Ew.prototype.getProperties=Ew.prototype.L;Ew.prototype.set=Ew.prototype.set;Ew.prototype.setProperties=Ew.prototype.H;Ew.prototype.unset=Ew.prototype.R;
-Ew.prototype.changed=Ew.prototype.u;Ew.prototype.dispatchEvent=Ew.prototype.b;Ew.prototype.getRevision=Ew.prototype.K;Ew.prototype.on=Ew.prototype.I;Ew.prototype.once=Ew.prototype.once;Ew.prototype.un=Ew.prototype.J;Uw.prototype.type=Uw.prototype.type;Uw.prototype.target=Uw.prototype.target;Uw.prototype.preventDefault=Uw.prototype.preventDefault;Uw.prototype.stopPropagation=Uw.prototype.stopPropagation;Vw.prototype.getActive=Vw.prototype.c;Vw.prototype.getMap=Vw.prototype.i;
-Vw.prototype.setActive=Vw.prototype.Ha;Vw.prototype.get=Vw.prototype.get;Vw.prototype.getKeys=Vw.prototype.P;Vw.prototype.getProperties=Vw.prototype.L;Vw.prototype.set=Vw.prototype.set;Vw.prototype.setProperties=Vw.prototype.H;Vw.prototype.unset=Vw.prototype.R;Vw.prototype.changed=Vw.prototype.u;Vw.prototype.dispatchEvent=Vw.prototype.b;Vw.prototype.getRevision=Vw.prototype.K;Vw.prototype.on=Vw.prototype.I;Vw.prototype.once=Vw.prototype.once;Vw.prototype.un=Vw.prototype.J;fx.prototype.type=fx.prototype.type;
-fx.prototype.target=fx.prototype.target;fx.prototype.preventDefault=fx.prototype.preventDefault;fx.prototype.stopPropagation=fx.prototype.stopPropagation;Dh.prototype.getActive=Dh.prototype.c;Dh.prototype.getMap=Dh.prototype.i;Dh.prototype.setActive=Dh.prototype.Ha;Dh.prototype.get=Dh.prototype.get;Dh.prototype.getKeys=Dh.prototype.P;Dh.prototype.getProperties=Dh.prototype.L;Dh.prototype.set=Dh.prototype.set;Dh.prototype.setProperties=Dh.prototype.H;Dh.prototype.unset=Dh.prototype.R;
-Dh.prototype.changed=Dh.prototype.u;Dh.prototype.dispatchEvent=Dh.prototype.b;Dh.prototype.getRevision=Dh.prototype.K;Dh.prototype.on=Dh.prototype.I;Dh.prototype.once=Dh.prototype.once;Dh.prototype.un=Dh.prototype.J;Fh.prototype.getActive=Fh.prototype.c;Fh.prototype.getMap=Fh.prototype.i;Fh.prototype.setActive=Fh.prototype.Ha;Fh.prototype.get=Fh.prototype.get;Fh.prototype.getKeys=Fh.prototype.P;Fh.prototype.getProperties=Fh.prototype.L;Fh.prototype.set=Fh.prototype.set;
-Fh.prototype.setProperties=Fh.prototype.H;Fh.prototype.unset=Fh.prototype.R;Fh.prototype.changed=Fh.prototype.u;Fh.prototype.dispatchEvent=Fh.prototype.b;Fh.prototype.getRevision=Fh.prototype.K;Fh.prototype.on=Fh.prototype.I;Fh.prototype.once=Fh.prototype.once;Fh.prototype.un=Fh.prototype.J;gx.prototype.getActive=gx.prototype.c;gx.prototype.getMap=gx.prototype.i;gx.prototype.setActive=gx.prototype.Ha;gx.prototype.get=gx.prototype.get;gx.prototype.getKeys=gx.prototype.P;
-gx.prototype.getProperties=gx.prototype.L;gx.prototype.set=gx.prototype.set;gx.prototype.setProperties=gx.prototype.H;gx.prototype.unset=gx.prototype.R;gx.prototype.changed=gx.prototype.u;gx.prototype.dispatchEvent=gx.prototype.b;gx.prototype.getRevision=gx.prototype.K;gx.prototype.on=gx.prototype.I;gx.prototype.once=gx.prototype.once;gx.prototype.un=gx.prototype.J;ox.prototype.type=ox.prototype.type;ox.prototype.target=ox.prototype.target;ox.prototype.preventDefault=ox.prototype.preventDefault;
-ox.prototype.stopPropagation=ox.prototype.stopPropagation;Hh.prototype.getActive=Hh.prototype.c;Hh.prototype.getMap=Hh.prototype.i;Hh.prototype.setActive=Hh.prototype.Ha;Hh.prototype.get=Hh.prototype.get;Hh.prototype.getKeys=Hh.prototype.P;Hh.prototype.getProperties=Hh.prototype.L;Hh.prototype.set=Hh.prototype.set;Hh.prototype.setProperties=Hh.prototype.H;Hh.prototype.unset=Hh.prototype.R;Hh.prototype.changed=Hh.prototype.u;Hh.prototype.dispatchEvent=Hh.prototype.b;Hh.prototype.getRevision=Hh.prototype.K;
-Hh.prototype.on=Hh.prototype.I;Hh.prototype.once=Hh.prototype.once;Hh.prototype.un=Hh.prototype.J;Rh.prototype.getActive=Rh.prototype.c;Rh.prototype.getMap=Rh.prototype.i;Rh.prototype.setActive=Rh.prototype.Ha;Rh.prototype.get=Rh.prototype.get;Rh.prototype.getKeys=Rh.prototype.P;Rh.prototype.getProperties=Rh.prototype.L;Rh.prototype.set=Rh.prototype.set;Rh.prototype.setProperties=Rh.prototype.H;Rh.prototype.unset=Rh.prototype.R;Rh.prototype.changed=Rh.prototype.u;Rh.prototype.dispatchEvent=Rh.prototype.b;
-Rh.prototype.getRevision=Rh.prototype.K;Rh.prototype.on=Rh.prototype.I;Rh.prototype.once=Rh.prototype.once;Rh.prototype.un=Rh.prototype.J;Vh.prototype.getActive=Vh.prototype.c;Vh.prototype.getMap=Vh.prototype.i;Vh.prototype.setActive=Vh.prototype.Ha;Vh.prototype.get=Vh.prototype.get;Vh.prototype.getKeys=Vh.prototype.P;Vh.prototype.getProperties=Vh.prototype.L;Vh.prototype.set=Vh.prototype.set;Vh.prototype.setProperties=Vh.prototype.H;Vh.prototype.unset=Vh.prototype.R;Vh.prototype.changed=Vh.prototype.u;
-Vh.prototype.dispatchEvent=Vh.prototype.b;Vh.prototype.getRevision=Vh.prototype.K;Vh.prototype.on=Vh.prototype.I;Vh.prototype.once=Vh.prototype.once;Vh.prototype.un=Vh.prototype.J;wx.prototype.getActive=wx.prototype.c;wx.prototype.getMap=wx.prototype.i;wx.prototype.setActive=wx.prototype.Ha;wx.prototype.get=wx.prototype.get;wx.prototype.getKeys=wx.prototype.P;wx.prototype.getProperties=wx.prototype.L;wx.prototype.set=wx.prototype.set;wx.prototype.setProperties=wx.prototype.H;wx.prototype.unset=wx.prototype.R;
-wx.prototype.changed=wx.prototype.u;wx.prototype.dispatchEvent=wx.prototype.b;wx.prototype.getRevision=wx.prototype.K;wx.prototype.on=wx.prototype.I;wx.prototype.once=wx.prototype.once;wx.prototype.un=wx.prototype.J;zx.prototype.type=zx.prototype.type;zx.prototype.target=zx.prototype.target;zx.prototype.preventDefault=zx.prototype.preventDefault;zx.prototype.stopPropagation=zx.prototype.stopPropagation;Bx.prototype.getActive=Bx.prototype.c;Bx.prototype.getMap=Bx.prototype.i;
-Bx.prototype.setActive=Bx.prototype.Ha;Bx.prototype.get=Bx.prototype.get;Bx.prototype.getKeys=Bx.prototype.P;Bx.prototype.getProperties=Bx.prototype.L;Bx.prototype.set=Bx.prototype.set;Bx.prototype.setProperties=Bx.prototype.H;Bx.prototype.unset=Bx.prototype.R;Bx.prototype.changed=Bx.prototype.u;Bx.prototype.dispatchEvent=Bx.prototype.b;Bx.prototype.getRevision=Bx.prototype.K;Bx.prototype.on=Bx.prototype.I;Bx.prototype.once=Bx.prototype.once;Bx.prototype.un=Bx.prototype.J;Gx.prototype.getActive=Gx.prototype.c;
-Gx.prototype.getMap=Gx.prototype.i;Gx.prototype.setActive=Gx.prototype.Ha;Gx.prototype.get=Gx.prototype.get;Gx.prototype.getKeys=Gx.prototype.P;Gx.prototype.getProperties=Gx.prototype.L;Gx.prototype.set=Gx.prototype.set;Gx.prototype.setProperties=Gx.prototype.H;Gx.prototype.unset=Gx.prototype.R;Gx.prototype.changed=Gx.prototype.u;Gx.prototype.dispatchEvent=Gx.prototype.b;Gx.prototype.getRevision=Gx.prototype.K;Gx.prototype.on=Gx.prototype.I;Gx.prototype.once=Gx.prototype.once;Gx.prototype.un=Gx.prototype.J;
-Mx.prototype.type=Mx.prototype.type;Mx.prototype.target=Mx.prototype.target;Mx.prototype.preventDefault=Mx.prototype.preventDefault;Mx.prototype.stopPropagation=Mx.prototype.stopPropagation;gf.prototype.get=gf.prototype.get;gf.prototype.getKeys=gf.prototype.P;gf.prototype.getProperties=gf.prototype.L;gf.prototype.set=gf.prototype.set;gf.prototype.setProperties=gf.prototype.H;gf.prototype.unset=gf.prototype.R;gf.prototype.changed=gf.prototype.u;gf.prototype.dispatchEvent=gf.prototype.b;
-gf.prototype.getRevision=gf.prototype.K;gf.prototype.on=gf.prototype.I;gf.prototype.once=gf.prototype.once;gf.prototype.un=gf.prototype.J;hf.prototype.getClosestPoint=hf.prototype.Ib;hf.prototype.intersectsCoordinate=hf.prototype.Bb;hf.prototype.getExtent=hf.prototype.G;hf.prototype.rotate=hf.prototype.rotate;hf.prototype.scale=hf.prototype.scale;hf.prototype.simplify=hf.prototype.Sb;hf.prototype.transform=hf.prototype.mb;hf.prototype.get=hf.prototype.get;hf.prototype.getKeys=hf.prototype.P;
-hf.prototype.getProperties=hf.prototype.L;hf.prototype.set=hf.prototype.set;hf.prototype.setProperties=hf.prototype.H;hf.prototype.unset=hf.prototype.R;hf.prototype.changed=hf.prototype.u;hf.prototype.dispatchEvent=hf.prototype.b;hf.prototype.getRevision=hf.prototype.K;hf.prototype.on=hf.prototype.I;hf.prototype.once=hf.prototype.once;hf.prototype.un=hf.prototype.J;gw.prototype.getFirstCoordinate=gw.prototype.fc;gw.prototype.getLastCoordinate=gw.prototype.gc;gw.prototype.getLayout=gw.prototype.ic;
-gw.prototype.rotate=gw.prototype.rotate;gw.prototype.scale=gw.prototype.scale;gw.prototype.getClosestPoint=gw.prototype.Ib;gw.prototype.intersectsCoordinate=gw.prototype.Bb;gw.prototype.getExtent=gw.prototype.G;gw.prototype.simplify=gw.prototype.Sb;gw.prototype.get=gw.prototype.get;gw.prototype.getKeys=gw.prototype.P;gw.prototype.getProperties=gw.prototype.L;gw.prototype.set=gw.prototype.set;gw.prototype.setProperties=gw.prototype.H;gw.prototype.unset=gw.prototype.R;gw.prototype.changed=gw.prototype.u;
-gw.prototype.dispatchEvent=gw.prototype.b;gw.prototype.getRevision=gw.prototype.K;gw.prototype.on=gw.prototype.I;gw.prototype.once=gw.prototype.once;gw.prototype.un=gw.prototype.J;Mq.prototype.getClosestPoint=Mq.prototype.Ib;Mq.prototype.intersectsCoordinate=Mq.prototype.Bb;Mq.prototype.getExtent=Mq.prototype.G;Mq.prototype.rotate=Mq.prototype.rotate;Mq.prototype.scale=Mq.prototype.scale;Mq.prototype.simplify=Mq.prototype.Sb;Mq.prototype.transform=Mq.prototype.mb;Mq.prototype.get=Mq.prototype.get;
-Mq.prototype.getKeys=Mq.prototype.P;Mq.prototype.getProperties=Mq.prototype.L;Mq.prototype.set=Mq.prototype.set;Mq.prototype.setProperties=Mq.prototype.H;Mq.prototype.unset=Mq.prototype.R;Mq.prototype.changed=Mq.prototype.u;Mq.prototype.dispatchEvent=Mq.prototype.b;Mq.prototype.getRevision=Mq.prototype.K;Mq.prototype.on=Mq.prototype.I;Mq.prototype.once=Mq.prototype.once;Mq.prototype.un=Mq.prototype.J;Df.prototype.getFirstCoordinate=Df.prototype.fc;Df.prototype.getLastCoordinate=Df.prototype.gc;
-Df.prototype.getLayout=Df.prototype.ic;Df.prototype.rotate=Df.prototype.rotate;Df.prototype.scale=Df.prototype.scale;Df.prototype.getClosestPoint=Df.prototype.Ib;Df.prototype.intersectsCoordinate=Df.prototype.Bb;Df.prototype.getExtent=Df.prototype.G;Df.prototype.simplify=Df.prototype.Sb;Df.prototype.transform=Df.prototype.mb;Df.prototype.get=Df.prototype.get;Df.prototype.getKeys=Df.prototype.P;Df.prototype.getProperties=Df.prototype.L;Df.prototype.set=Df.prototype.set;Df.prototype.setProperties=Df.prototype.H;
-Df.prototype.unset=Df.prototype.R;Df.prototype.changed=Df.prototype.u;Df.prototype.dispatchEvent=Df.prototype.b;Df.prototype.getRevision=Df.prototype.K;Df.prototype.on=Df.prototype.I;Df.prototype.once=Df.prototype.once;Df.prototype.un=Df.prototype.J;I.prototype.getFirstCoordinate=I.prototype.fc;I.prototype.getLastCoordinate=I.prototype.gc;I.prototype.getLayout=I.prototype.ic;I.prototype.rotate=I.prototype.rotate;I.prototype.scale=I.prototype.scale;I.prototype.getClosestPoint=I.prototype.Ib;
-I.prototype.intersectsCoordinate=I.prototype.Bb;I.prototype.getExtent=I.prototype.G;I.prototype.simplify=I.prototype.Sb;I.prototype.transform=I.prototype.mb;I.prototype.get=I.prototype.get;I.prototype.getKeys=I.prototype.P;I.prototype.getProperties=I.prototype.L;I.prototype.set=I.prototype.set;I.prototype.setProperties=I.prototype.H;I.prototype.unset=I.prototype.R;I.prototype.changed=I.prototype.u;I.prototype.dispatchEvent=I.prototype.b;I.prototype.getRevision=I.prototype.K;I.prototype.on=I.prototype.I;
-I.prototype.once=I.prototype.once;I.prototype.un=I.prototype.J;P.prototype.getFirstCoordinate=P.prototype.fc;P.prototype.getLastCoordinate=P.prototype.gc;P.prototype.getLayout=P.prototype.ic;P.prototype.rotate=P.prototype.rotate;P.prototype.scale=P.prototype.scale;P.prototype.getClosestPoint=P.prototype.Ib;P.prototype.intersectsCoordinate=P.prototype.Bb;P.prototype.getExtent=P.prototype.G;P.prototype.simplify=P.prototype.Sb;P.prototype.transform=P.prototype.mb;P.prototype.get=P.prototype.get;
-P.prototype.getKeys=P.prototype.P;P.prototype.getProperties=P.prototype.L;P.prototype.set=P.prototype.set;P.prototype.setProperties=P.prototype.H;P.prototype.unset=P.prototype.R;P.prototype.changed=P.prototype.u;P.prototype.dispatchEvent=P.prototype.b;P.prototype.getRevision=P.prototype.K;P.prototype.on=P.prototype.I;P.prototype.once=P.prototype.once;P.prototype.un=P.prototype.J;No.prototype.getFirstCoordinate=No.prototype.fc;No.prototype.getLastCoordinate=No.prototype.gc;No.prototype.getLayout=No.prototype.ic;
-No.prototype.rotate=No.prototype.rotate;No.prototype.scale=No.prototype.scale;No.prototype.getClosestPoint=No.prototype.Ib;No.prototype.intersectsCoordinate=No.prototype.Bb;No.prototype.getExtent=No.prototype.G;No.prototype.simplify=No.prototype.Sb;No.prototype.transform=No.prototype.mb;No.prototype.get=No.prototype.get;No.prototype.getKeys=No.prototype.P;No.prototype.getProperties=No.prototype.L;No.prototype.set=No.prototype.set;No.prototype.setProperties=No.prototype.H;No.prototype.unset=No.prototype.R;
-No.prototype.changed=No.prototype.u;No.prototype.dispatchEvent=No.prototype.b;No.prototype.getRevision=No.prototype.K;No.prototype.on=No.prototype.I;No.prototype.once=No.prototype.once;No.prototype.un=No.prototype.J;Q.prototype.getFirstCoordinate=Q.prototype.fc;Q.prototype.getLastCoordinate=Q.prototype.gc;Q.prototype.getLayout=Q.prototype.ic;Q.prototype.rotate=Q.prototype.rotate;Q.prototype.scale=Q.prototype.scale;Q.prototype.getClosestPoint=Q.prototype.Ib;Q.prototype.intersectsCoordinate=Q.prototype.Bb;
-Q.prototype.getExtent=Q.prototype.G;Q.prototype.simplify=Q.prototype.Sb;Q.prototype.transform=Q.prototype.mb;Q.prototype.get=Q.prototype.get;Q.prototype.getKeys=Q.prototype.P;Q.prototype.getProperties=Q.prototype.L;Q.prototype.set=Q.prototype.set;Q.prototype.setProperties=Q.prototype.H;Q.prototype.unset=Q.prototype.R;Q.prototype.changed=Q.prototype.u;Q.prototype.dispatchEvent=Q.prototype.b;Q.prototype.getRevision=Q.prototype.K;Q.prototype.on=Q.prototype.I;Q.prototype.once=Q.prototype.once;
-Q.prototype.un=Q.prototype.J;C.prototype.getFirstCoordinate=C.prototype.fc;C.prototype.getLastCoordinate=C.prototype.gc;C.prototype.getLayout=C.prototype.ic;C.prototype.rotate=C.prototype.rotate;C.prototype.scale=C.prototype.scale;C.prototype.getClosestPoint=C.prototype.Ib;C.prototype.intersectsCoordinate=C.prototype.Bb;C.prototype.getExtent=C.prototype.G;C.prototype.simplify=C.prototype.Sb;C.prototype.transform=C.prototype.mb;C.prototype.get=C.prototype.get;C.prototype.getKeys=C.prototype.P;
-C.prototype.getProperties=C.prototype.L;C.prototype.set=C.prototype.set;C.prototype.setProperties=C.prototype.H;C.prototype.unset=C.prototype.R;C.prototype.changed=C.prototype.u;C.prototype.dispatchEvent=C.prototype.b;C.prototype.getRevision=C.prototype.K;C.prototype.on=C.prototype.I;C.prototype.once=C.prototype.once;C.prototype.un=C.prototype.J;D.prototype.getFirstCoordinate=D.prototype.fc;D.prototype.getLastCoordinate=D.prototype.gc;D.prototype.getLayout=D.prototype.ic;D.prototype.rotate=D.prototype.rotate;
-D.prototype.scale=D.prototype.scale;D.prototype.getClosestPoint=D.prototype.Ib;D.prototype.intersectsCoordinate=D.prototype.Bb;D.prototype.getExtent=D.prototype.G;D.prototype.simplify=D.prototype.Sb;D.prototype.transform=D.prototype.mb;D.prototype.get=D.prototype.get;D.prototype.getKeys=D.prototype.P;D.prototype.getProperties=D.prototype.L;D.prototype.set=D.prototype.set;D.prototype.setProperties=D.prototype.H;D.prototype.unset=D.prototype.R;D.prototype.changed=D.prototype.u;
-D.prototype.dispatchEvent=D.prototype.b;D.prototype.getRevision=D.prototype.K;D.prototype.on=D.prototype.I;D.prototype.once=D.prototype.once;D.prototype.un=D.prototype.J;Kp.prototype.readFeatures=Kp.prototype.Qa;Tp.prototype.readFeatures=Tp.prototype.Qa;Kp.prototype.readFeatures=Kp.prototype.Qa;vg.prototype.get=vg.prototype.get;vg.prototype.getKeys=vg.prototype.P;vg.prototype.getProperties=vg.prototype.L;vg.prototype.set=vg.prototype.set;vg.prototype.setProperties=vg.prototype.H;
-vg.prototype.unset=vg.prototype.R;vg.prototype.changed=vg.prototype.u;vg.prototype.dispatchEvent=vg.prototype.b;vg.prototype.getRevision=vg.prototype.K;vg.prototype.on=vg.prototype.I;vg.prototype.once=vg.prototype.once;vg.prototype.un=vg.prototype.J;zg.prototype.getMap=zg.prototype.f;zg.prototype.setMap=zg.prototype.setMap;zg.prototype.setTarget=zg.prototype.i;zg.prototype.get=zg.prototype.get;zg.prototype.getKeys=zg.prototype.P;zg.prototype.getProperties=zg.prototype.L;zg.prototype.set=zg.prototype.set;
-zg.prototype.setProperties=zg.prototype.H;zg.prototype.unset=zg.prototype.R;zg.prototype.changed=zg.prototype.u;zg.prototype.dispatchEvent=zg.prototype.b;zg.prototype.getRevision=zg.prototype.K;zg.prototype.on=zg.prototype.I;zg.prototype.once=zg.prototype.once;zg.prototype.un=zg.prototype.J;Mn.prototype.getMap=Mn.prototype.f;Mn.prototype.setMap=Mn.prototype.setMap;Mn.prototype.setTarget=Mn.prototype.i;Mn.prototype.get=Mn.prototype.get;Mn.prototype.getKeys=Mn.prototype.P;
-Mn.prototype.getProperties=Mn.prototype.L;Mn.prototype.set=Mn.prototype.set;Mn.prototype.setProperties=Mn.prototype.H;Mn.prototype.unset=Mn.prototype.R;Mn.prototype.changed=Mn.prototype.u;Mn.prototype.dispatchEvent=Mn.prototype.b;Mn.prototype.getRevision=Mn.prototype.K;Mn.prototype.on=Mn.prototype.I;Mn.prototype.once=Mn.prototype.once;Mn.prototype.un=Mn.prototype.J;Rn.prototype.getMap=Rn.prototype.f;Rn.prototype.setMap=Rn.prototype.setMap;Rn.prototype.setTarget=Rn.prototype.i;Rn.prototype.get=Rn.prototype.get;
-Rn.prototype.getKeys=Rn.prototype.P;Rn.prototype.getProperties=Rn.prototype.L;Rn.prototype.set=Rn.prototype.set;Rn.prototype.setProperties=Rn.prototype.H;Rn.prototype.unset=Rn.prototype.R;Rn.prototype.changed=Rn.prototype.u;Rn.prototype.dispatchEvent=Rn.prototype.b;Rn.prototype.getRevision=Rn.prototype.K;Rn.prototype.on=Rn.prototype.I;Rn.prototype.once=Rn.prototype.once;Rn.prototype.un=Rn.prototype.J;Wn.prototype.getMap=Wn.prototype.f;Wn.prototype.setMap=Wn.prototype.setMap;
-Wn.prototype.setTarget=Wn.prototype.i;Wn.prototype.get=Wn.prototype.get;Wn.prototype.getKeys=Wn.prototype.P;Wn.prototype.getProperties=Wn.prototype.L;Wn.prototype.set=Wn.prototype.set;Wn.prototype.setProperties=Wn.prototype.H;Wn.prototype.unset=Wn.prototype.R;Wn.prototype.changed=Wn.prototype.u;Wn.prototype.dispatchEvent=Wn.prototype.b;Wn.prototype.getRevision=Wn.prototype.K;Wn.prototype.on=Wn.prototype.I;Wn.prototype.once=Wn.prototype.once;Wn.prototype.un=Wn.prototype.J;Cg.prototype.getMap=Cg.prototype.f;
-Cg.prototype.setMap=Cg.prototype.setMap;Cg.prototype.setTarget=Cg.prototype.i;Cg.prototype.get=Cg.prototype.get;Cg.prototype.getKeys=Cg.prototype.P;Cg.prototype.getProperties=Cg.prototype.L;Cg.prototype.set=Cg.prototype.set;Cg.prototype.setProperties=Cg.prototype.H;Cg.prototype.unset=Cg.prototype.R;Cg.prototype.changed=Cg.prototype.u;Cg.prototype.dispatchEvent=Cg.prototype.b;Cg.prototype.getRevision=Cg.prototype.K;Cg.prototype.on=Cg.prototype.I;Cg.prototype.once=Cg.prototype.once;
-Cg.prototype.un=Cg.prototype.J;ao.prototype.getMap=ao.prototype.f;ao.prototype.setMap=ao.prototype.setMap;ao.prototype.setTarget=ao.prototype.i;ao.prototype.get=ao.prototype.get;ao.prototype.getKeys=ao.prototype.P;ao.prototype.getProperties=ao.prototype.L;ao.prototype.set=ao.prototype.set;ao.prototype.setProperties=ao.prototype.H;ao.prototype.unset=ao.prototype.R;ao.prototype.changed=ao.prototype.u;ao.prototype.dispatchEvent=ao.prototype.b;ao.prototype.getRevision=ao.prototype.K;ao.prototype.on=ao.prototype.I;
-ao.prototype.once=ao.prototype.once;ao.prototype.un=ao.prototype.J;Eg.prototype.getMap=Eg.prototype.f;Eg.prototype.setMap=Eg.prototype.setMap;Eg.prototype.setTarget=Eg.prototype.i;Eg.prototype.get=Eg.prototype.get;Eg.prototype.getKeys=Eg.prototype.P;Eg.prototype.getProperties=Eg.prototype.L;Eg.prototype.set=Eg.prototype.set;Eg.prototype.setProperties=Eg.prototype.H;Eg.prototype.unset=Eg.prototype.R;Eg.prototype.changed=Eg.prototype.u;Eg.prototype.dispatchEvent=Eg.prototype.b;
-Eg.prototype.getRevision=Eg.prototype.K;Eg.prototype.on=Eg.prototype.I;Eg.prototype.once=Eg.prototype.once;Eg.prototype.un=Eg.prototype.J;go.prototype.getMap=go.prototype.f;go.prototype.setMap=go.prototype.setMap;go.prototype.setTarget=go.prototype.i;go.prototype.get=go.prototype.get;go.prototype.getKeys=go.prototype.P;go.prototype.getProperties=go.prototype.L;go.prototype.set=go.prototype.set;go.prototype.setProperties=go.prototype.H;go.prototype.unset=go.prototype.R;go.prototype.changed=go.prototype.u;
-go.prototype.dispatchEvent=go.prototype.b;go.prototype.getRevision=go.prototype.K;go.prototype.on=go.prototype.I;go.prototype.once=go.prototype.once;go.prototype.un=go.prototype.J;lo.prototype.getMap=lo.prototype.f;lo.prototype.setMap=lo.prototype.setMap;lo.prototype.setTarget=lo.prototype.i;lo.prototype.get=lo.prototype.get;lo.prototype.getKeys=lo.prototype.P;lo.prototype.getProperties=lo.prototype.L;lo.prototype.set=lo.prototype.set;lo.prototype.setProperties=lo.prototype.H;lo.prototype.unset=lo.prototype.R;
-lo.prototype.changed=lo.prototype.u;lo.prototype.dispatchEvent=lo.prototype.b;lo.prototype.getRevision=lo.prototype.K;lo.prototype.on=lo.prototype.I;lo.prototype.once=lo.prototype.once;lo.prototype.un=lo.prototype.J;
-  return OPENLAYERS.ol;
-}));
-
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ol=e():t.ol=e()}(window,function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=9)}([function(t,e,i){"use strict";t.exports=n,t.exports.default=n;var r=i(5);function n(t,e){if(!(this instanceof n))return new n(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,i){if(!i)return e.indexOf(t);for(var r=0;r<e.length;r++)if(i(t,e[r]))return r;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,r,n){n||(n=y(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var o,s=e;s<i;s++)o=t.children[s],h(n,t.leaf?r(o):o);return n}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function f(t,e){var i=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,n-i)*Math.max(0,o-r)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,n,o){for(var s,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(s=e+Math.ceil((i-e)/n/2)*n,r(t,s,e,i,o),a.push(e,s,s,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],r=this.toBBox;if(!g(t,e))return i;for(var n,o,s,a,h=[];e;){for(n=0,o=e.children.length;n<o;n++)s=e.children[n],g(t,a=e.leaf?r(s):s)&&(e.leaf?i.push(s):_(t,a)?this._all(s,i):h.push(s));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!g(t,e))return!1;for(var r,n,o,s,a=[];e;){for(r=0,n=e.children.length;r<n;r++)if(o=e.children[r],g(t,s=e.leaf?i(o):o)){if(e.leaf||_(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(t,e){if(!t)return this;for(var i,r,n,s,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],i=u.pop(),s=!0),a.leaf&&-1!==(n=o(t,a.children,e)))return a.children.splice(n,1),l.push(a),this._condense(l),this;s||a.leaf||!_(a,h)?r?(i++,a=r.children[i],s=!1):a=null:(l.push(a),u.push(i),i=0,r=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var i=[];t;)t.leaf?e.push.apply(e,t.children):i.push.apply(i,t.children),t=i.pop();return e},_build:function(t,e,i,r){var n,o=i-e+1,a=this._maxEntries;if(o<=a)return s(n=y(t.slice(e,i+1)),this.toBBox),n;r||(r=Math.ceil(Math.log(o)/Math.log(a)),a=Math.ceil(o/Math.pow(a,r-1))),(n=y([])).leaf=!1,n.height=r;var h,l,u,p,c=Math.ceil(o/a),d=c*Math.ceil(Math.sqrt(a));for(v(t,e,i,d,this.compareMinX),h=e;h<=i;h+=d)for(v(t,h,u=Math.min(h+d-1,i),c,this.compareMinY),l=h;l<=u;l+=c)p=Math.min(l+c-1,u),n.children.push(this._build(t,l,p,r-1));return s(n,this.toBBox),n},_chooseSubtree:function(t,e,i,r){for(var n,o,s,a,h,l,u,c;r.push(e),!e.leaf&&r.length-1!==i;){for(u=c=1/0,n=0,o=e.children.length;n<o;n++)h=p(s=e.children[n]),(l=d(t,s)-h)<c?(c=l,u=h<u?h:u,a=s):l===c&&h<u&&(u=h,a=s);e=a||e.children[0]}return e},_insert:function(t,e,i){var r=this.toBBox,n=i?t:r(t),o=[],s=this._chooseSubtree(n,this.data,e,o);for(s.children.push(t),h(s,n);e>=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(n,o,e)},_split:function(t,e){var i=t[e],r=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,r);var o=this._chooseSplitIndex(i,n,r),a=y(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},_splitRoot:function(t,e){this.data=y([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,i){var r,n,o,s,h,l,u,c;for(l=u=1/0,r=e;r<=i-e;r++)s=f(n=a(t,0,r,this.toBBox),o=a(t,r,i,this.toBBox)),h=p(n)+p(o),s<l?(l=s,c=r,u=h<u?h:u):s===l&&h<u&&(u=h,c=r);return c},_chooseSplitAxis:function(t,e,i){var r=t.leaf?this.compareMinX:l,n=t.leaf?this.compareMinY:u;this._allDistMargin(t,e,i,r)<this._allDistMargin(t,e,i,n)&&t.children.sort(r)},_allDistMargin:function(t,e,i,r){t.children.sort(r);var n,o,s=this.toBBox,l=a(t,0,e,s),u=a(t,i-e,i,s),p=c(l)+c(u);for(n=e;n<i-e;n++)o=t.children[n],h(l,t.leaf?s(o):o),p+=c(l);for(n=i-e-1;n>=e;n--)o=t.children[n],h(u,t.leaf?s(o):o),p+=c(u);return p},_adjustParentBBoxes:function(t,e,i){for(var r=i;r>=0;r--)h(e[r],t)},_condense:function(t){for(var e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():s(t[i],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},function(t,e,i){"use strict";t.exports=n;var r=i(6);function n(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}n.Varint=0,n.Fixed64=1,n.Bytes=2,n.Fixed32=5;function o(t){return t.type===n.Bytes?t.readVarint()+t.pos:t.pos+1}function s(t,e,i){return i?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function a(t,e,i){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));i.realloc(r);for(var n=i.pos-1;n>=t;n--)i.buf[n+r]=i.buf[n]}function h(t,e){for(var i=0;i<t.length;i++)e.writeVarint(t[i])}function l(t,e){for(var i=0;i<t.length;i++)e.writeSVarint(t[i])}function u(t,e){for(var i=0;i<t.length;i++)e.writeFloat(t[i])}function p(t,e){for(var i=0;i<t.length;i++)e.writeDouble(t[i])}function c(t,e){for(var i=0;i<t.length;i++)e.writeBoolean(t[i])}function d(t,e){for(var i=0;i<t.length;i++)e.writeFixed32(t[i])}function f(t,e){for(var i=0;i<t.length;i++)e.writeSFixed32(t[i])}function _(t,e){for(var i=0;i<t.length;i++)e.writeFixed64(t[i])}function g(t,e){for(var i=0;i<t.length;i++)e.writeSFixed64(t[i])}function y(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function v(t,e,i){t[i]=e,t[i+1]=e>>>8,t[i+2]=e>>>16,t[i+3]=e>>>24}function m(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}n.prototype={destroy:function(){this.buf=null},readFields:function(t,e,i){for(i=i||this.length;this.pos<i;){var r=this.readVarint(),n=r>>3,o=this.pos;this.type=7&r,t(n,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=y(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=m(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=y(this.buf,this.pos)+4294967296*y(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=y(this.buf,this.pos)+4294967296*m(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,i,r=this.buf;return e=127&(i=r[this.pos++]),i<128?e:(e|=(127&(i=r[this.pos++]))<<7,i<128?e:(e|=(127&(i=r[this.pos++]))<<14,i<128?e:(e|=(127&(i=r[this.pos++]))<<21,i<128?e:function(t,e,i){var r,n,o=i.buf;if(n=o[i.pos++],r=(112&n)>>4,n<128)return s(t,r,e);if(n=o[i.pos++],r|=(127&n)<<3,n<128)return s(t,r,e);if(n=o[i.pos++],r|=(127&n)<<10,n<128)return s(t,r,e);if(n=o[i.pos++],r|=(127&n)<<17,n<128)return s(t,r,e);if(n=o[i.pos++],r|=(127&n)<<24,n<128)return s(t,r,e);if(n=o[i.pos++],r|=(1&n)<<31,n<128)return s(t,r,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(i=r[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,i){var r="",n=e;for(;n<i;){var o,s,a,h=t[n],l=null,u=h>239?4:h>223?3:h>191?2:1;if(n+u>i)break;1===u?h<128&&(l=h):2===u?128==(192&(o=t[n+1]))&&(l=(31&h)<<6|63&o)<=127&&(l=null):3===u?(o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&((l=(15&h)<<12|(63&o)<<6|63&s)<=2047||l>=55296&&l<=57343)&&(l=null)):4===u&&(o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&((l=(15&h)<<18|(63&o)<<12|(63&s)<<6|63&a)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,u=1):l>65535&&(l-=65536,r+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),r+=String.fromCharCode(l),n+=u}return r}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var i=o(this);for(t=t||[];this.pos<i;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=o(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===n.Varint)for(;this.buf[this.pos++]>127;);else if(e===n.Bytes)this.pos=this.readVarint()+this.pos;else if(e===n.Fixed32)this.pos+=4;else{if(e!==n.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var i=new Uint8Array(e);i.set(this.buf),this.buf=i,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),v(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),v(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),v(this.buf,-1&t,this.pos),v(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),v(this.buf,-1&t,this.pos),v(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var i,r;t>=0?(i=t%4294967296|0,r=t/4294967296|0):(r=~(-t/4294967296),4294967295^(i=~(-t%4294967296))?i=i+1|0:(i=0,r=r+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,i){i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos++]=127&t|128,t>>>=7,i.buf[i.pos]=127&t}(i,0,e),function(t,e){var i=(7&t)<<4;if(e.buf[e.pos++]|=i|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(r,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,i){for(var r,n,o=0;o<e.length;o++){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){r>56319||o+1===e.length?(t[i++]=239,t[i++]=191,t[i++]=189):n=r;continue}if(r<56320){t[i++]=239,t[i++]=191,t[i++]=189,n=r;continue}r=n-55296<<10|r-56320|65536,n=null}else n&&(t[i++]=239,t[i++]=191,t[i++]=189,n=null);r<128?t[i++]=r:(r<2048?t[i++]=r>>6|192:(r<65536?t[i++]=r>>12|224:(t[i++]=r>>18|240,t[i++]=r>>12&63|128),t[i++]=r>>6&63|128),t[i++]=63&r|128)}return i}(this.buf,t,this.pos);var i=this.pos-e;i>=128&&a(e,i,this),this.pos=e-1,this.writeVarint(i),this.pos+=i},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var i=0;i<e;i++)this.buf[this.pos++]=t[i]},writeRawMessage:function(t,e){this.pos++;var i=this.pos;t(e,this);var r=this.pos-i;r>=128&&a(i,r,this),this.pos=i-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,i){this.writeTag(t,n.Bytes),this.writeRawMessage(e,i)},writePackedVarint:function(t,e){this.writeMessage(t,h,e)},writePackedSVarint:function(t,e){this.writeMessage(t,l,e)},writePackedBoolean:function(t,e){this.writeMessage(t,c,e)},writePackedFloat:function(t,e){this.writeMessage(t,u,e)},writePackedDouble:function(t,e){this.writeMessage(t,p,e)},writePackedFixed32:function(t,e){this.writeMessage(t,d,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,f,e)},writePackedFixed64:function(t,e){this.writeMessage(t,_,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,g,e)},writeBytesField:function(t,e){this.writeTag(t,n.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,n.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,n.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,n.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,n.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,n.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,n.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},function(t,e,i){var r=i(7);e.Processor=r},,,function(t,e,i){t.exports=function(){"use strict";function t(t,e,i){var r=t[e];t[e]=t[i],t[i]=r}function e(t,e){return t<e?-1:t>e?1:0}return function(i,r,n,o,s){!function e(i,r,n,o,s){for(;o>n;){if(o-n>600){var a=o-n+1,h=r-n+1,l=Math.log(a),u=.5*Math.exp(2*l/3),p=.5*Math.sqrt(l*u*(a-u)/a)*(h-a/2<0?-1:1),c=Math.max(n,Math.floor(r-h*u/a+p)),d=Math.min(o,Math.floor(r+(a-h)*u/a+p));e(i,r,c,d,s)}var f=i[r],_=n,g=o;for(t(i,n,r),s(i[o],f)>0&&t(i,n,o);_<g;){for(t(i,_,g),_++,g--;s(i[_],f)<0;)_++;for(;s(i[g],f)>0;)g--}0===s(i[n],f)?t(i,n,g):t(i,++g,o),g<=r&&(n=g+1),r<=g&&(o=g-1)}}(i,r,n||0,o||i.length-1,s||e)}}()},function(t,e){e.read=function(t,e,i,r,n){var o,s,a=8*n-r-1,h=(1<<a)-1,l=h>>1,u=-7,p=i?n-1:0,c=i?-1:1,d=t[e+p];for(p+=c,o=d&(1<<-u)-1,d>>=-u,u+=a;u>0;o=256*o+t[e+p],p+=c,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+t[e+p],p+=c,u-=8);if(0===o)o=1-l;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),o-=l}return(d?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,i,r,n,o){var s,a,h,l=8*o-n-1,u=(1<<l)-1,p=u>>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,f=r?1:-1,_=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+p>=1?c/h:c*Math.pow(2,1-p))*h>=2&&(s++,h/=2),s+p>=u?(a=0,s=u):s+p>=1?(a=(e*h-1)*Math.pow(2,n),s+=p):(a=e*Math.pow(2,p-1)*Math.pow(2,n),s=0));n>=8;t[i+d]=255&a,d+=f,a/=256,n-=8);for(s=s<<n|a,l+=n;l>0;t[i+d]=255&s,d+=f,s/=256,l-=8);t[i+d-f]|=128*_}},function(t,e,i){var r=i(8).newImageData;function n(t){var e=!0;try{new ImageData(10,10)}catch(t){e=!1}function i(t,i,r){return e?new ImageData(t,i,r):{data:t,width:i,height:r}}return function(e){var r,n,o=e.buffers,s=e.meta,a=e.imageOps,h=e.width,l=e.height,u=o.length,p=o[0].byteLength;if(a){var c=new Array(u);for(n=0;n<u;++n)c[n]=i(new Uint8ClampedArray(o[n]),h,l);r=t(c,s).data}else{r=new Uint8ClampedArray(p);var d=new Array(u),f=new Array(u);for(n=0;n<u;++n)d[n]=new Uint8ClampedArray(o[n]),f[n]=[0,0,0,0];for(var _=0;_<p;_+=4){for(var g=0;g<u;++g){var y=d[g];f[g][0]=y[_],f[g][1]=y[_+1],f[g][2]=y[_+2],f[g][3]=y[_+3]}var v=t(f,s);r[_]=v[0],r[_+1]=v[1],r[_+2]=v[2],r[_+3]=v[3]}}return r.buffer}}function o(t,e){var i=Object.keys(t.lib||{}).map(function(e){return"var "+e+" = "+t.lib[e].toString()+";"}).concat(["var __minion__ = ("+n.toString()+")(",t.operation.toString(),");",'self.addEventListener("message", function(event) {',"  var buffer = __minion__(event.data);","  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);","});"]),r=new Blob(i,{type:"text/javascript"}),o=URL.createObjectURL(r),s=new Worker(o);return s.addEventListener("message",e),s}function s(t){var e;this._imageOps=!!t.imageOps;var i=[];if(e=0===t.threads?0:this._imageOps?1:t.threads||1)for(var r=0;r<e;++r)i[r]=o(t,this._onWorkerMessage.bind(this,r));else i[0]=function(t,e){var i=n(t.operation);return{postMessage:function(t){setTimeout(function(){e({data:{buffer:i(t),meta:t.meta}})},0)}}}(t,this._onWorkerMessage.bind(this,0));this._workers=i,this._queue=[],this._maxQueueLength=t.queue||1/0,this._running=0,this._dataLookup={},this._job=null}s.prototype.process=function(t,e,i){this._enqueue({inputs:t,meta:e,callback:i}),this._dispatch()},s.prototype.destroy=function(){for(var t in this)this[t]=null;this._destroyed=!0},s.prototype._enqueue=function(t){for(this._queue.push(t);this._queue.length>this._maxQueueLength;)this._queue.shift().callback(null,null)},s.prototype._dispatch=function(){if(0===this._running&&this._queue.length>0){var t=this._job=this._queue.shift(),e=t.inputs[0].width,i=t.inputs[0].height,r=t.inputs.map(function(t){return t.data.buffer}),n=this._workers.length;if(this._running=n,1===n)this._workers[0].postMessage({buffers:r,meta:t.meta,imageOps:this._imageOps,width:e,height:i},r);else for(var o=t.inputs[0].data.length,s=4*Math.ceil(o/4/n),a=0;a<n;++a){for(var h=a*s,l=[],u=0,p=r.length;u<p;++u)l.push(r[a].slice(h,h+s));this._workers[a].postMessage({buffers:l,meta:t.meta,imageOps:this._imageOps,width:e,height:i},l)}}},s.prototype._onWorkerMessage=function(t,e){this._destroyed||(this._dataLookup[t]=e.data,--this._running,0===this._running&&this._resolveJob())},s.prototype._resolveJob=function(){var t,e,i=this._job,n=this._workers.length;if(1===n)t=new Uint8ClampedArray(this._dataLookup[0].buffer),e=this._dataLookup[0].meta;else{var o=i.inputs[0].data.length;t=new Uint8ClampedArray(o),e=new Array(o);for(var s=4*Math.ceil(o/4/n),a=0;a<n;++a){var h=this._dataLookup[a].buffer,l=a*s;t.set(new Uint8ClampedArray(h),l),e[a]=this._dataLookup[a].meta}}this._job=null,this._dataLookup={},i.callback(null,r(t,i.inputs[0].width,i.inputs[0].height),e),this._dispatch()},t.exports=s},function(t,e){var i=!0;try{new ImageData(10,10)}catch(t){i=!1}var r=document.createElement("canvas").getContext("2d");e.newImageData=function(t,e,n){if(i)return new ImageData(t,e,n);var o=r.createImageData(e,n);return o.data.set(t),o}},function(t,e,i){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}i.r(e);var n=0;function o(t){return t.ol_uid||(t.ol_uid=String(++n))}var s="5.3.3",a=function(t){function e(e){var i="Assertion failed. See https://openlayers.org/en/"+("latest"===s?s:"v"+s.split("-")[0])+"/doc/errors/#"+e+" for details.";t.call(this,i),this.code=e,this.name="AssertionError",this.message=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),h={ADD:"add",REMOVE:"remove"},l="propertychange",u="function"==typeof Object.assign?Object.assign:function(t,e){var i=arguments;if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),n=1,o=arguments.length;n<o;++n){var s=i[n];if(void 0!==s&&null!==s)for(var a in s)s.hasOwnProperty(a)&&(r[a]=s[a])}return r};function p(t){for(var e in t)delete t[e]}function c(t){var e=[];for(var i in t)e.push(t[i]);return e}function d(t){var e;for(e in t)return!1;return!e}function f(t,e,i,r){for(var n,o=0,s=t.length;o<s;++o)if((n=t[o]).listener===e&&n.bindTo===i)return r&&(n.deleteIndex=o),n}function _(t,e){var i=g(t);return i?i[e]:void 0}function g(t,e){var i=t.ol_lm;return!i&&e&&(i=t.ol_lm={}),i}function y(t,e){var i=_(t,e);if(i){for(var r=0,n=i.length;r<n;++r)t.removeEventListener(e,i[r].boundListener),p(i[r]);i.length=0;var o=g(t);o&&(delete o[e],0===Object.keys(o).length&&function(t){delete t.ol_lm}(t))}}function v(t,e,i,r,n){var o=g(t,!0),s=o[e];s||(s=o[e]=[]);var a=f(s,i,r,!1);return a?n||(a.callOnce=!1):(a={bindTo:r,callOnce:!!n,listener:i,target:t,type:e},t.addEventListener(e,function(t){var e=function(e){var i=t.listener,r=t.bindTo||t.target;return t.callOnce&&E(t),i.call(r,e)};return t.boundListener=e,e}(a)),s.push(a)),a}function m(t,e,i,r){return v(t,e,i,r,!0)}function x(t,e,i,r){var n=_(t,e);if(n){var o=f(n,i,r,!0);o&&E(o)}}function E(t){if(t&&t.target){t.target.removeEventListener(t.type,t.boundListener);var e=_(t.target,t.type);if(e){var i="deleteIndex"in t?t.deleteIndex:e.indexOf(t);-1!==i&&e.splice(i,1),0===e.length&&y(t.target,t.type)}p(t)}}function S(t){var e=g(t);if(e)for(var i in e)y(t,i)}var T=function(){this.disposed_=!1};T.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())},T.prototype.disposeInternal=function(){};var C=T;function R(){return!0}function w(){return!1}function I(){}var L=function(t){this.propagationStopped,this.type=t,this.target=null};function O(t){t.stopPropagation()}L.prototype.preventDefault=function(){this.propagationStopped=!0},L.prototype.stopPropagation=function(){this.propagationStopped=!0};var P=L,b=function(t){function e(){t.call(this),this.pendingRemovals_={},this.dispatching_={},this.listeners_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addEventListener=function(t,e){var i=this.listeners_[t];i||(i=this.listeners_[t]=[]),-1===i.indexOf(e)&&i.push(e)},e.prototype.dispatchEvent=function(t){var e="string"==typeof t?new P(t):t,i=e.type;e.target=this;var r,n=this.listeners_[i];if(n){i in this.dispatching_||(this.dispatching_[i]=0,this.pendingRemovals_[i]=0),++this.dispatching_[i];for(var o=0,s=n.length;o<s;++o)if(!1===n[o].call(this,e)||e.propagationStopped){r=!1;break}if(--this.dispatching_[i],0===this.dispatching_[i]){var a=this.pendingRemovals_[i];for(delete this.pendingRemovals_[i];a--;)this.removeEventListener(i,I);delete this.dispatching_[i]}return r}},e.prototype.disposeInternal=function(){S(this)},e.prototype.getListeners=function(t){return this.listeners_[t]},e.prototype.hasListener=function(t){return t?t in this.listeners_:Object.keys(this.listeners_).length>0},e.prototype.removeEventListener=function(t,e){var i=this.listeners_[t];if(i){var r=i.indexOf(e);t in this.pendingRemovals_?(i[r]=I,++this.pendingRemovals_[t]):(i.splice(r,1),0===i.length&&delete this.listeners_[t])}},e}(C),M={CHANGE:"change",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",ERROR:"error",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",MOUSEDOWN:"mousedown",MOUSEMOVE:"mousemove",MOUSEOUT:"mouseout",MOUSEUP:"mouseup",MOUSEWHEEL:"mousewheel",MSPOINTERDOWN:"MSPointerDown",RESIZE:"resize",TOUCHSTART:"touchstart",TOUCHMOVE:"touchmove",TOUCHEND:"touchend",WHEEL:"wheel"};var F=function(t){function e(){t.call(this),this.revision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){++this.revision_,this.dispatchEvent(M.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.on=function(t,e){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),n=0;n<i;++n)r[n]=v(this,t[n],e);return r}return v(this,t,e)},e.prototype.once=function(t,e){if(Array.isArray(t)){for(var i=t.length,r=new Array(i),n=0;n<i;++n)r[n]=m(this,t[n],e);return r}return m(this,t,e)},e.prototype.un=function(t,e){if(Array.isArray(t))for(var i=0,r=t.length;i<r;++i)x(this,t[i],e);else x(this,t,e)},e}(b),A=function(t){function e(e,i,r){t.call(this,e),this.key=i,this.oldValue=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),N={};function G(t){return N.hasOwnProperty(t)?N[t]:N[t]="change:"+t}var D=function(t){function e(e){t.call(this),o(this),this.values_={},void 0!==e&&this.setProperties(e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){var e;return this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return Object.keys(this.values_)},e.prototype.getProperties=function(){return u({},this.values_)},e.prototype.notify=function(t,e){var i;i=G(t),this.dispatchEvent(new A(i,t,e)),i=l,this.dispatchEvent(new A(i,t,e))},e.prototype.set=function(t,e,i){if(i)this.values_[t]=e;else{var r=this.values_[t];this.values_[t]=e,r!==e&&this.notify(t,r)}},e.prototype.setProperties=function(t,e){for(var i in t)this.set(i,t[i],e)},e.prototype.unset=function(t,e){if(t in this.values_){var i=this.values_[t];delete this.values_[t],e||this.notify(t,i)}},e}(F),k="length",j=function(t){function e(e,i){t.call(this,e),this.element=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),U=function(t){function e(e,i){t.call(this);var r=i||{};if(this.unique_=!!r.unique,this.array_=e||[],this.unique_)for(var n=0,o=this.array_.length;n<o;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var e=0,i=t.length;e<i;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,i=0,r=e.length;i<r;++i)t(e[i],i,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(k)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new j(h.ADD,e))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,i=0,r=e.length;i<r;++i)if(e[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new j(h.REMOVE,e)),e},e.prototype.setAt=function(t,e){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(e,t);var r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new j(h.REMOVE,r)),this.dispatchEvent(new j(h.ADD,e))}else{for(var n=i;n<t;++n)this.insertAt(n,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(k,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var i=0,r=this.array_.length;i<r;++i)if(this.array_[i]===t&&i!==e)throw new a(58)},e}(D);function Y(t,e){if(!t)throw new a(e)}var B=function(t){function e(e){if(t.call(this),this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,v(this,G(this.geometryName_),this.handleGeometryChanged_,this),e)if("function"==typeof e.getSimplifiedGeometry){var i=e;this.setGeometry(i)}else{var r=e;this.setProperties(r)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e(this.getProperties());t.setGeometryName(this.getGeometryName());var i=this.getGeometry();i&&t.setGeometry(i.clone());var r=this.getStyle();return r&&t.setStyle(r),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(E(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=v(t,M.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;var e;if(Array.isArray(t))e=t;else{Y("function"==typeof t.getZIndex,41);var i=t;e=[i]}return function(){return e}}(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){x(this,G(this.geometryName_),this.handleGeometryChanged_,this),this.geometryName_=t,v(this,G(this.geometryName_),this.handleGeometryChanged_,this),this.handleGeometryChanged_()},e}(D);function V(t,e){return t>e?1:t<e?-1:0}function X(t,e){return t.indexOf(e)>=0}function z(t,e,i){var r,n=t.length;if(t[0]<=e)return 0;if(e<=t[n-1])return n-1;if(i>0){for(r=1;r<n;++r)if(t[r]<e)return r-1}else if(i<0){for(r=1;r<n;++r)if(t[r]<=e)return r}else for(r=1;r<n;++r){if(t[r]==e)return r;if(t[r]<e)return t[r-1]-e<e-t[r]?r-1:r}return n-1}function W(t,e,i){for(;e<i;){var r=t[e];t[e]=t[i],t[i]=r,++e,--i}}function K(t,e){for(var i=Array.isArray(e)?e:[e],r=i.length,n=0;n<r;n++)t[t.length]=i[n]}function H(t,e){for(var i,r=t.length>>>0,n=0;n<r;n++)if(e(i=t[n],n,t))return i;return null}function Z(t,e){var i=t.length;if(i!==e.length)return!1;for(var r=0;r<i;r++)if(t[r]!==e[r])return!1;return!0}function q(t,e){var i,r=t.length,n=Array(t.length);for(i=0;i<r;i++)n[i]={index:i,value:t[i]};for(n.sort(function(t,i){return e(t.value,i.value)||t.index-i.index}),i=0;i<t.length;i++)t[i]=n[i].value}function J(t,e){var i;return!t.every(function(r,n){return i=n,!e(r,n,t)})?i:-1}var Q={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},$={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function tt(t){for(var e=ht(),i=0,r=t.length;i<r;++i)_t(e,t[i]);return e}function et(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function it(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function rt(t,e,i){var r,n;return(r=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0)*r+(n=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0)*n}function nt(t,e){return st(t,e[0],e[1])}function ot(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function st(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function at(t,e){var i=t[0],r=t[1],n=t[2],o=t[3],s=e[0],a=e[1],h=$.UNKNOWN;return s<i?h|=$.LEFT:s>n&&(h|=$.RIGHT),a<r?h|=$.BELOW:a>o&&(h|=$.ABOVE),h===$.UNKNOWN&&(h=$.INTERSECTING),h}function ht(){return[1/0,1/0,-1/0,-1/0]}function lt(t,e,i,r,n){return n?(n[0]=t,n[1]=e,n[2]=i,n[3]=r,n):[t,e,i,r]}function ut(t){return lt(1/0,1/0,-1/0,-1/0,t)}function pt(t,e){var i=t[0],r=t[1];return lt(i,r,i,r,e)}function ct(t,e,i,r,n){return yt(ut(n),t,e,i,r)}function dt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function ft(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function _t(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function gt(t,e){for(var i=0,r=e.length;i<r;++i)_t(t,e[i]);return t}function yt(t,e,i,r,n){for(;i<r;i+=n)vt(t,e[i],e[i+1]);return t}function vt(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function mt(t,e,i){var r;return(r=e.call(i,Et(t)))?r:(r=e.call(i,St(t)))?r:(r=e.call(i,Lt(t)))?r:(r=e.call(i,It(t)))||!1}function xt(t){var e=0;return bt(t)||(e=Ot(t)*Rt(t)),e}function Et(t){return[t[0],t[1]]}function St(t){return[t[2],t[1]]}function Tt(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function Ct(t,e,i,r,n){var o=e*r[0]/2,s=e*r[1]/2,a=Math.cos(i),h=Math.sin(i),l=o*a,u=o*h,p=s*a,c=s*h,d=t[0],f=t[1],_=d-l+c,g=d-l-c,y=d+l-c,v=d+l+c,m=f-u-p,x=f-u+p,E=f+u+p,S=f+u-p;return lt(Math.min(_,g,y,v),Math.min(m,x,E,S),Math.max(_,g,y,v),Math.max(m,x,E,S),n)}function Rt(t){return t[3]-t[1]}function wt(t,e,i){var r=i||[1/0,1/0,-1/0,-1/0];return Pt(t,e)?(t[0]>e[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]<e[2]?r[2]=t[2]:r[2]=e[2],t[3]<e[3]?r[3]=t[3]:r[3]=e[3]):ut(r),r}function It(t){return[t[0],t[3]]}function Lt(t){return[t[2],t[3]]}function Ot(t){return t[2]-t[0]}function Pt(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function bt(t){return t[2]<t[0]||t[3]<t[1]}function Mt(t,e){var i=(t[2]-t[0])/2*(e-1),r=(t[3]-t[1])/2*(e-1);t[0]-=i,t[2]+=i,t[1]-=r,t[3]+=r}function Ft(t,e,i){var r=[t[0],t[1],t[0],t[3],t[2],t[1],t[2],t[3]];return e(r,r,2),function(t,e,i){return lt(Math.min.apply(null,t),Math.min.apply(null,e),Math.max.apply(null,t),Math.max.apply(null,e),i)}([r[0],r[2],r[4],r[6]],[r[1],r[3],r[5],r[7]],i)}var At={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"},Nt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"};function Gt(t,e,i,r,n,o){for(var s=o||[],a=0,h=e;h<i;h+=r){var l=t[h],u=t[h+1];s[a++]=n[0]*l+n[2]*u+n[4],s[a++]=n[1]*l+n[3]*u+n[5]}return o&&s.length!=a&&(s.length=a),s}function Dt(t,e,i,r,n,o,s){for(var a=s||[],h=0,l=e;l<i;l+=r){a[h++]=t[l]+n,a[h++]=t[l+1]+o;for(var u=l+2;u<l+r;++u)a[h++]=t[u]}return s&&a.length!=h&&(a.length=h),a}function kt(t,e,i){return Math.min(Math.max(t,e),i)}var jt="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2};function Ut(t,e,i,r,n,o){var s=n-i,a=o-r;if(0!==s||0!==a){var h=((t-i)*s+(e-r)*a)/(s*s+a*a);h>1?(i=n,r=o):h>0&&(i+=s*h,r+=a*h)}return Yt(t,e,i,r)}function Yt(t,e,i,r){var n=i-t,o=r-e;return n*n+o*o}function Bt(t){return 180*t/Math.PI}function Vt(t){return t*Math.PI/180}function Xt(t,e){var i=t%e;return i*e<0?i+e:i}function zt(t,e,i){return t+i*(e-t)}
+/**
+ * @license
+ * Latitude/longitude spherical geodesy formulae taken from
+ * http://www.movable-type.co.uk/scripts/latlong.html
+ * Licensed under CC-BY-3.0.
+ */var Wt=6371008.8;function Kt(t,e,i){var r=i||Wt,n=Vt(t[1]),o=Vt(e[1]),s=(o-n)/2,a=Vt(e[0]-t[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function Ht(t,e){for(var i=0,r=0,n=t.length;r<n-1;++r)i+=Kt(t[r],t[r+1],e);return i}function Zt(t,e){for(var i=0,r=t.length,n=t[r-1][0],o=t[r-1][1],s=0;s<r;s++){var a=t[s][0],h=t[s][1];i+=Vt(a-n)*(2+Math.sin(Vt(o))+Math.sin(Vt(h))),n=a,o=h}return i*e*e/2}function qt(t,e,i,r){var n=r||Wt,o=Vt(t[1]),s=Vt(t[0]),a=e/n,h=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(i));return[Bt(s+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(h))),Bt(h)]}var Jt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Qt={};Qt[Jt.DEGREES]=2*Math.PI*6370997/360,Qt[Jt.FEET]=.3048,Qt[Jt.METERS]=1,Qt[Jt.USFEET]=1200/3937;var $t=Jt,te=function(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit};te.prototype.canWrapX=function(){return this.canWrapX_},te.prototype.getCode=function(){return this.code_},te.prototype.getExtent=function(){return this.extent_},te.prototype.getUnits=function(){return this.units_},te.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Qt[this.units_]},te.prototype.getWorldExtent=function(){return this.worldExtent_},te.prototype.getAxisOrientation=function(){return this.axisOrientation_},te.prototype.isGlobal=function(){return this.global_},te.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},te.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},te.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},te.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},te.prototype.setWorldExtent=function(t){this.worldExtent_=t},te.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},te.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var ee=te,ie=6378137,re=Math.PI*ie,ne=[-re,-re,re,re],oe=[-180,-85,180,85],se=function(t){function e(e){t.call(this,{code:e,units:$t.METERS,extent:ne,global:!0,worldExtent:oe,getPointResolution:function(t,e){return t/jt(e[1]/ie)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee),ae=[new se("EPSG:3857"),new se("EPSG:102100"),new se("EPSG:102113"),new se("EPSG:900913"),new se("urn:ogc:def:crs:EPSG:6.18:3:3857"),new se("urn:ogc:def:crs:EPSG::3857"),new se("http://www.opengis.net/gml/srs/epsg.xml#3857")];function he(t,e,i){var r=t.length,n=i>1?i:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(r));for(var s=re,a=0;a<r;a+=n){o[a]=s*t[a]/180;var h=ie*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));h>s?h=s:h<-s&&(h=-s),o[a+1]=h}return o}function le(t,e,i){var r=t.length,n=i>1?i:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(r));for(var s=0;s<r;s+=n)o[s]=180*t[s]/re,o[s+1]=360*Math.atan(Math.exp(t[s+1]/ie))/Math.PI-90;return o}var ue=[-180,-90,180,90],pe=6378137*Math.PI/180,ce=function(t){function e(e,i){t.call(this,{code:e,units:$t.DEGREES,extent:ue,axisOrientation:i,global:!0,metersPerUnit:pe,worldExtent:ue})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee),de=[new ce("CRS:84"),new ce("EPSG:4326","neu"),new ce("urn:ogc:def:crs:EPSG::4326","neu"),new ce("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new ce("urn:ogc:def:crs:OGC:1.3:CRS84"),new ce("urn:ogc:def:crs:OGC:2:84"),new ce("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ce("urn:x-ogc:def:crs:EPSG:4326","neu")],fe={};var _e={};function ge(t,e,i){var r=t.getCode(),n=e.getCode();r in _e||(_e[r]={}),_e[r][n]=i}function ye(t,e){var i;return t in _e&&e in _e[t]&&(i=_e[t][e]),i}function ve(t,e,i){var r;if(void 0!==e){for(var n=0,o=t.length;n<o;++n)e[n]=t[n];r=e}else r=t.slice();return r}function me(t,e,i){if(void 0!==e&&t!==e){for(var r=0,n=t.length;r<n;++r)e[r]=t[r];t=e}return t}function xe(t){!function(t,e){fe[t]=e}(t.getCode(),t),ge(t,t,ve)}function Ee(t){return"string"==typeof t?function(t){return fe[t]||null}(t):t||null}function Se(t,e,i,r){var n,o=(t=Ee(t)).getPointResolutionFunc();if(o)n=o(e,i);else if(t.getUnits()==$t.DEGREES&&!r||r==$t.DEGREES)n=e;else{var s=Le(t,Ee("EPSG:4326")),a=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];n=(Kt((a=s(a,a,2)).slice(0,2),a.slice(2,4))+Kt(a.slice(4,6),a.slice(6,8)))/2;var h=r?Qt[r]:t.getMetersPerUnit();void 0!==h&&(n/=h)}return n}function Te(t){!function(t){t.forEach(xe)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&ge(e,t,ve)})})}function Ce(t,e){return t?"string"==typeof t?Ee(t):t:Ee(e)}function Re(t){return function(e,i,r){for(var n=e.length,o=void 0!==r?r:2,s=void 0!==i?i:new Array(n),a=0;a<n;a+=o){var h=t([e[a],e[a+1]]);s[a]=h[0],s[a+1]=h[1];for(var l=o-1;l>=2;--l)s[a+l]=e[a+l]}return s}}function we(t,e,i,r){var n=Ee(t),o=Ee(e);ge(n,o,Re(i)),ge(o,n,Re(r))}function Ie(t,e){if(t===e)return!0;var i=t.getUnits()===e.getUnits();return t.getCode()===e.getCode()?i:Le(t,e)===ve&&i}function Le(t,e){var i=ye(t.getCode(),e.getCode());return i||(i=me),i}function Oe(t,e){return Le(Ee(t),Ee(e))}function Pe(t,e,i){return Oe(e,i)(t,void 0,t.length)}function be(t,e,i){return Ft(t,Oe(e,i))}Te(ae),Te(de),function(t,e,i,r){t.forEach(function(t){e.forEach(function(e){ge(t,e,i),ge(e,t,r)})})}(de,ae,he,le);var Me=new Array(6);function Fe(t){return Ne(t,1,0,0,1,0,0)}function Ae(t,e){var i=t[0],r=t[1],n=t[2],o=t[3],s=t[4],a=t[5],h=e[0],l=e[1],u=e[2],p=e[3],c=e[4],d=e[5];return t[0]=i*h+n*l,t[1]=r*h+o*l,t[2]=i*u+n*p,t[3]=r*u+o*p,t[4]=i*c+n*d+s,t[5]=r*c+o*d+a,t}function Ne(t,e,i,r,n,o,s){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t[4]=o,t[5]=s,t}function Ge(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function De(t,e){var i=e[0],r=e[1];return e[0]=t[0]*i+t[2]*r+t[4],e[1]=t[1]*i+t[3]*r+t[5],e}function ke(t,e){var i=Math.cos(e),r=Math.sin(e);return Ae(t,Ne(Me,i,r,-r,i,0,0))}function je(t,e,i){return Ae(t,Ne(Me,e,0,0,i,0,0))}function Ue(t,e,i){return Ae(t,Ne(Me,1,0,0,1,e,i))}function Ye(t,e,i,r,n,o,s,a){var h=Math.sin(o),l=Math.cos(o);return t[0]=r*l,t[1]=n*h,t[2]=-r*h,t[3]=n*l,t[4]=s*r*l-a*r*h+e,t[5]=s*n*h+a*n*l+i,t}function Be(t){var e=function(t){return t[0]*t[3]-t[1]*t[2]}(t);Y(0!==e,32);var i=t[0],r=t[1],n=t[2],o=t[3],s=t[4],a=t[5];return t[0]=o/e,t[1]=-r/e,t[2]=-n/e,t[3]=i/e,t[4]=(n*a-o*s)/e,t[5]=-(i*a-r*s)/e,t}var Ve=[1,0,0,1,0,0],Xe=function(t){function e(){t.call(this),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryCache={},this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return r()},e.prototype.closestPointXY=function(t,e,i,n){return r()},e.prototype.containsXY=function(t,e){return!1},e.prototype.getClosestPoint=function(t,e){var i=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return r()},e.prototype.getExtent=function(t){return this.extentRevision_!=this.getRevision()&&(this.extent_=this.computeExtent(this.extent_),this.extentRevision_=this.getRevision()),function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)},e.prototype.rotate=function(t,e){r()},e.prototype.scale=function(t,e,i){r()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return r()},e.prototype.getType=function(){return r()},e.prototype.applyTransform=function(t){r()},e.prototype.intersectsExtent=function(t){return r()},e.prototype.translate=function(t,e){r()},e.prototype.transform=function(t,e){var i=Ee(t),r=i.getUnits()==$t.TILE_PIXELS?function(t,r,n){var o=i.getExtent(),s=i.getWorldExtent(),a=Rt(s)/Rt(o);return Ye(Ve,s[0],s[3],a,-a,0,0,0),Gt(t,0,t.length,n,Ve,r),Oe(i,e)(t,r,n)}:Oe(i,e);return this.applyTransform(r),this},e}(D);function ze(t){var e;return t==At.XY?e=2:t==At.XYZ||t==At.XYM?e=3:t==At.XYZM&&(e=4),e}var We=function(t){function e(){t.call(this),this.layout=At.XY,this.stride=2,this.flatCoordinates=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeExtent=function(t){return ct(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return r()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()&&(p(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(e))return this.simplifiedGeometryCache[e];var i=this.getSimplifiedGeometryInternal(t);return i.getFlatCoordinates().length<this.flatCoordinates.length?(this.simplifiedGeometryCache[e]=i,i):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=ze(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){r()},e.prototype.setLayout=function(t,e,i){var r;if(t)r=ze(t);else{for(var n=0;n<i;++n){if(0===e.length)return this.layout=At.XY,void(this.stride=2);e=e[0]}t=function(t){var e;2==t?e=At.XY:3==t?e=At.XYZ:4==t&&(e=At.XYZM);return e}(r=e.length)}this.layout=t,this.stride=r},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var i=this.getFlatCoordinates();if(i){var r=this.getStride();!function(t,e,i,r,n,o,s){for(var a=s||[],h=Math.cos(n),l=Math.sin(n),u=o[0],p=o[1],c=0,d=e;d<i;d+=r){var f=t[d]-u,_=t[d+1]-p;a[c++]=u+f*h-_*l,a[c++]=p+f*l+_*h;for(var g=d+2;g<d+r;++g)a[c++]=t[g]}s&&a.length!=c&&(a.length=c)}(i,0,i.length,r,t,e,i),this.changed()}},e.prototype.scale=function(t,e,i){var r=e;void 0===r&&(r=t);var n=i;n||(n=Tt(this.getExtent()));var o=this.getFlatCoordinates();if(o){var s=this.getStride();!function(t,e,i,r,n,o,s,a){for(var h=a||[],l=s[0],u=s[1],p=0,c=e;c<i;c+=r){var d=t[c]-l,f=t[c+1]-u;h[p++]=l+n*d,h[p++]=u+o*f;for(var _=c+2;_<c+r;++_)h[p++]=t[_]}a&&h.length!=p&&(h.length=p)}(o,0,o.length,s,t,r,n,o),this.changed()}},e.prototype.translate=function(t,e){var i=this.getFlatCoordinates();if(i){var r=this.getStride();Dt(i,0,i.length,r,t,e,i),this.changed()}},e}(Xe);function Ke(t,e,i,r){for(var n=0,o=t[i-r],s=t[i-r+1];e<i;e+=r){var a=t[e],h=t[e+1];n+=s*a-o*h,o=a,s=h}return n/2}function He(t,e,i,r){for(var n=0,o=0,s=i.length;o<s;++o){var a=i[o];n+=Ke(t,e,a,r),e=a}return n}function Ze(t,e,i,r,n,o,s){var a,h=t[e],l=t[e+1],u=t[i]-h,p=t[i+1]-l;if(0===u&&0===p)a=e;else{var c=((n-h)*u+(o-l)*p)/(u*u+p*p);if(c>1)a=i;else{if(c>0){for(var d=0;d<r;++d)s[d]=zt(t[e+d],t[i+d],c);return void(s.length=r)}a=e}}for(var f=0;f<r;++f)s[f]=t[a+f];s.length=r}function qe(t,e,i,r,n){var o=t[e],s=t[e+1];for(e+=r;e<i;e+=r){var a=t[e],h=t[e+1],l=Yt(o,s,a,h);l>n&&(n=l),o=a,s=h}return n}function Je(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o){var a=i[o];n=qe(t,e,a,r,n),e=a}return n}function Qe(t,e,i,r,n,o,s,a,h,l,u){if(e==i)return l;var p,c;if(0===n){if((c=Yt(s,a,t[e],t[e+1]))<l){for(p=0;p<r;++p)h[p]=t[e+p];return h.length=r,c}return l}for(var d=u||[NaN,NaN],f=e+r;f<i;)if(Ze(t,f-r,f,r,s,a,d),(c=Yt(s,a,d[0],d[1]))<l){for(l=c,p=0;p<r;++p)h[p]=d[p];h.length=r,f+=r}else f+=r*Math.max((Math.sqrt(c)-Math.sqrt(l))/n|0,1);if(o&&(Ze(t,i-r,e,r,s,a,d),(c=Yt(s,a,d[0],d[1]))<l)){for(l=c,p=0;p<r;++p)h[p]=d[p];h.length=r}return l}function $e(t,e,i,r,n,o,s,a,h,l,u){for(var p=u||[NaN,NaN],c=0,d=i.length;c<d;++c){var f=i[c];l=Qe(t,e,f,r,n,o,s,a,h,l,p),e=f}return l}function ti(t,e,i,r){for(var n=0,o=i.length;n<o;++n)t[e++]=i[n];return e}function ei(t,e,i,r){for(var n=0,o=i.length;n<o;++n)for(var s=i[n],a=0;a<r;++a)t[e++]=s[a];return e}function ii(t,e,i,r,n){for(var o=n||[],s=0,a=0,h=i.length;a<h;++a){var l=ei(t,e,i[a],r);o[s++]=l,e=l}return o.length=s,o}function ri(t,e,i,r,n){for(var o=void 0!==n?n:[],s=0,a=e;a<i;a+=r)o[s++]=t.slice(a,a+r);return o.length=s,o}function ni(t,e,i,r,n){for(var o=void 0!==n?n:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];o[s++]=ri(t,e,l,r,o[s]),e=l}return o.length=s,o}function oi(t,e,i,r,n){for(var o=void 0!==n?n:[],s=0,a=0,h=i.length;a<h;++a){var l=i[a];o[s++]=ni(t,e,l,r,o[s]),e=l[l.length-1]}return o.length=s,o}function si(t,e,i,r,n,o,s){var a=(i-e)/r;if(a<3){for(;e<i;e+=r)o[s++]=t[e],o[s++]=t[e+1];return s}var h=new Array(a);h[0]=1,h[a-1]=1;for(var l=[e,i-r],u=0;l.length>0;){for(var p=l.pop(),c=l.pop(),d=0,f=t[c],_=t[c+1],g=t[p],y=t[p+1],v=c+r;v<p;v+=r){var m=Ut(t[v],t[v+1],f,_,g,y);m>d&&(u=v,d=m)}d>n&&(h[(u-e)/r]=1,c+r<u&&l.push(c,u),u+r<p&&l.push(u,p))}for(var x=0;x<a;++x)h[x]&&(o[s++]=t[e+x*r],o[s++]=t[e+x*r+1]);return s}function ai(t,e,i,r,n,o,s,a){for(var h=0,l=i.length;h<l;++h){var u=i[h];s=si(t,e,u,r,n,o,s),a.push(s),e=u}return s}function hi(t,e){return e*Math.round(t/e)}function li(t,e,i,r,n,o,s){if(e==i)return s;var a,h,l=hi(t[e],n),u=hi(t[e+1],n);e+=r,o[s++]=l,o[s++]=u;do{if(a=hi(t[e],n),h=hi(t[e+1],n),(e+=r)==i)return o[s++]=a,o[s++]=h,s}while(a==l&&h==u);for(;e<i;){var p=hi(t[e],n),c=hi(t[e+1],n);if(e+=r,p!=a||c!=h){var d=a-l,f=h-u,_=p-l,g=c-u;d*g==f*_&&(d<0&&_<d||d==_||d>0&&_>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=p,h=c):(o[s++]=a,o[s++]=h,l=a,u=h,a=p,h=c)}}return o[s++]=a,o[s++]=h,s}function ui(t,e,i,r,n,o,s,a){for(var h=0,l=i.length;h<l;++h){var u=i[h];s=li(t,e,u,r,n,o,s),a.push(s),e=u}return s}var pi=function(t){function e(e,i){t.call(this),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,r){return r<rt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,r))},e.prototype.getArea=function(){return Ke(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=si(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,At.XY)},e.prototype.getType=function(){return Nt.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ei(this.flatCoordinates,0,t,this.stride),this.changed()},e}(We),ci=function(t){function e(e,i){t.call(this),this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,r){var n=this.flatCoordinates,o=Yt(t,e,n[0],n[1]);if(o<r){for(var s=this.stride,a=0;a<s;++a)i[a]=n[a];return i.length=s,o}return r},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return pt(this.flatCoordinates,t)},e.prototype.getType=function(){return Nt.POINT},e.prototype.intersectsExtent=function(t){return st(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ti(this.flatCoordinates,0,t,this.stride),this.changed()},e}(We);function di(t,e,i,r,n){return!mt(n,function(n){return!fi(t,e,i,r,n[0],n[1])})}function fi(t,e,i,r,n,o){for(var s=0,a=t[i-r],h=t[i-r+1];e<i;e+=r){var l=t[e],u=t[e+1];h<=o?u>o&&(l-a)*(o-h)-(n-a)*(u-h)>0&&s++:u<=o&&(l-a)*(o-h)-(n-a)*(u-h)<0&&s--,a=l,h=u}return 0!==s}function _i(t,e,i,r,n,o){if(0===i.length)return!1;if(!fi(t,e,i[0],r,n,o))return!1;for(var s=1,a=i.length;s<a;++s)if(fi(t,i[s-1],i[s],r,n,o))return!1;return!0}function gi(t,e,i,r,n,o,s){for(var a,h,l,u,p,c,d,f=n[o+1],_=[],g=0,y=i.length;g<y;++g){var v=i[g];for(u=t[v-r],c=t[v-r+1],a=e;a<v;a+=r)p=t[a],d=t[a+1],(f<=c&&d<=f||c<=f&&f<=d)&&(l=(f-c)/(d-c)*(p-u)+u,_.push(l)),u=p,c=d}var m=NaN,x=-1/0;for(_.sort(V),u=_[0],a=1,h=_.length;a<h;++a){p=_[a];var E=Math.abs(p-u);E>x&&_i(t,e,i,r,l=(u+p)/2,f)&&(m=l,x=E),u=p}return isNaN(m)&&(m=n[o]),s?(s.push(m,f,x),s):[m,f,x]}function yi(t,e,i,r,n){for(var o=[],s=0,a=i.length;s<a;++s){var h=i[s];o=gi(t,e,h,r,n,2*s,o),e=h[h.length-1]}return o}function vi(t,e,i,r,n,o){for(var s,a=[t[e],t[e+1]],h=[];e+r<i;e+=r){if(h[0]=t[e+r],h[1]=t[e+r+1],s=n.call(o,a,h))return s;a[0]=h[0],a[1]=h[1]}return!1}function mi(t,e,i,r,n){var o=yt([1/0,1/0,-1/0,-1/0],t,e,i,r);return!!Pt(n,o)&&(!!ot(n,o)||(o[0]>=n[0]&&o[2]<=n[2]||(o[1]>=n[1]&&o[3]<=n[3]||vi(t,e,i,r,function(t,e){return function(t,e,i){var r=!1,n=at(t,e),o=at(t,i);if(n===$.INTERSECTING||o===$.INTERSECTING)r=!0;else{var s,a,h=t[0],l=t[1],u=t[2],p=t[3],c=e[0],d=e[1],f=i[0],_=i[1],g=(_-d)/(f-c);o&$.ABOVE&&!(n&$.ABOVE)&&(r=(s=f-(_-p)/g)>=h&&s<=u),r||!(o&$.RIGHT)||n&$.RIGHT||(r=(a=_-(f-u)*g)>=l&&a<=p),r||!(o&$.BELOW)||n&$.BELOW||(r=(s=f-(_-l)/g)>=h&&s<=u),r||!(o&$.LEFT)||n&$.LEFT||(r=(a=_-(f-h)*g)>=l&&a<=p)}return r}(n,t,e)}))))}function xi(t,e,i,r,n){if(!function(t,e,i,r,n){return!!(mi(t,e,i,r,n)||fi(t,e,i,r,n[0],n[1])||fi(t,e,i,r,n[0],n[3])||fi(t,e,i,r,n[2],n[1])||fi(t,e,i,r,n[2],n[3]))}(t,e,i[0],r,n))return!1;if(1===i.length)return!0;for(var o=1,s=i.length;o<s;++o)if(di(t,i[o-1],i[o],r,n)&&!mi(t,i[o-1],i[o],r,n))return!1;return!0}function Ei(t,e,i,r){for(;e<i-r;){for(var n=0;n<r;++n){var o=t[e+n];t[e+n]=t[i-r+n],t[i-r+n]=o}e+=r,i-=r}}function Si(t,e,i,r){for(var n=0,o=t[i-r],s=t[i-r+1];e<i;e+=r){var a=t[e],h=t[e+1];n+=(a-o)*(h+s),o=a,s=h}return n>0}function Ti(t,e,i,r,n){for(var o=void 0!==n&&n,s=0,a=i.length;s<a;++s){var h=i[s],l=Si(t,e,h,r);if(0===s){if(o&&l||!o&&!l)return!1}else if(o&&!l||!o&&l)return!1;e=h}return!0}function Ci(t,e,i,r,n){for(var o=void 0!==n&&n,s=0,a=i.length;s<a;++s){var h=i[s],l=Si(t,e,h,r);(0===s?o&&l||!o&&!l:o&&!l||!o&&l)&&Ei(t,e,h,r),e=h}return e}function Ri(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o)e=Ci(t,e,i[o],r,n);return e}var wi=function(t){function e(e,i,r){t.call(this),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==i&&r?(this.setFlatCoordinates(i,e),this.ends_=r):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendLinearRing=function(t){this.flatCoordinates?K(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,i,r){return r<rt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Je(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$e(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,r))},e.prototype.containsXY=function(t,e){return _i(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return He(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Ci(e=this.getOrientedFlatCoordinates().slice(),0,this.ends_,this.stride,t):e=this.flatCoordinates,ni(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Tt(this.getExtent());this.flatInteriorPoint_=gi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new ci(this.getFlatInteriorPoint(),At.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new pi(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.ends_,r=[],n=0,o=0,s=i.length;o<s;++o){var a=i[o],h=new pi(e.slice(n,a),t);r.push(h),n=a}return r},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Ti(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ci(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=ui(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),i,0,r),new e(i,At.XY,r)},e.prototype.getType=function(){return Nt.POLYGON},e.prototype.intersectsExtent=function(t){return xi(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ii(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(We),Ii=wi;function Li(t,e,i,r){for(var n=i||32,o=[],s=0;s<n;++s)K(o,qt(t,e,2*Math.PI*s/n,r));return o.push(o[0],o[1]),new wi(o,At.XY,[o.length])}function Oi(t){var e=t[0],i=t[1],r=t[2],n=t[3],o=[e,i,e,n,r,n,r,i,e,i];return new wi(o,At.XY,[o.length])}function Pi(t,e,i){for(var r=e||32,n=t.getStride(),o=t.getLayout(),s=t.getCenter(),a=n*(r+1),h=new Array(a),l=0;l<a;l+=n){h[l]=0,h[l+1]=0;for(var u=2;u<n;u++)h[l+u]=s[u]}var p=[h.length],c=new wi(h,o,p);return bi(c,s,t.getRadius(),i),c}function bi(t,e,i,r){for(var n=t.getFlatCoordinates(),o=t.getStride(),s=n.length/o-1,a=r||0,h=0;h<=s;++h){var l=h*o,u=a+2*Xt(h,s)*Math.PI/s;n[l]=e[0]+i*Math.cos(u),n[l+1]=e[1]+i*Math.sin(u)}t.changed()}var Mi="undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"",Fi=-1!==Mi.indexOf("firefox"),Ai=-1!==Mi.indexOf("safari")&&-1==Mi.indexOf("chrom"),Ni=-1!==Mi.indexOf("webkit")&&-1==Mi.indexOf("edge"),Gi=-1!==Mi.indexOf("macintosh"),Di=window.devicePixelRatio||1,ki=function(){var t=!1;try{t=!!document.createElement("canvas").getContext("2d").setLineDash}catch(t){}return t}(),ji="geolocation"in navigator,Ui="ontouchstart"in window,Yi="PointerEvent"in window,Bi=!!navigator.msPointerEnabled,Vi={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Xi=function(t){function e(e){t.call(this,M.ERROR),this.code=e.code,this.message=e.message}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),zi=function(t){function e(e){t.call(this);var i=e||{};this.position_=null,this.transform_=me,this.watchId_=void 0,v(this,G(Vi.PROJECTION),this.handleProjectionChanged_,this),v(this,G(Vi.TRACKING),this.handleTrackingChanged_,this),void 0!==i.projection&&this.setProjection(i.projection),void 0!==i.trackingOptions&&this.setTrackingOptions(i.trackingOptions),this.setTracking(void 0!==i.tracking&&i.tracking)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.setTracking(!1),t.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=Le(Ee("EPSG:4326"),t),this.position_&&this.set(Vi.POSITION,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if(ji){var t=this.getTracking();t&&void 0===this.watchId_?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):t||void 0===this.watchId_||(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var e=t.coords;this.set(Vi.ACCURACY,e.accuracy),this.set(Vi.ALTITUDE,null===e.altitude?void 0:e.altitude),this.set(Vi.ALTITUDE_ACCURACY,null===e.altitudeAccuracy?void 0:e.altitudeAccuracy),this.set(Vi.HEADING,null===e.heading?void 0:Vt(e.heading)),this.position_?(this.position_[0]=e.longitude,this.position_[1]=e.latitude):this.position_=[e.longitude,e.latitude];var i=this.transform_(this.position_);this.set(Vi.POSITION,i),this.set(Vi.SPEED,null===e.speed?void 0:e.speed);var r=Li(this.position_,e.accuracy);r.applyTransform(this.transform_),this.set(Vi.ACCURACY_GEOMETRY,r),this.changed()},e.prototype.positionError_=function(t){this.setTracking(!1),this.dispatchEvent(new Xi(t))},e.prototype.getAccuracy=function(){return this.get(Vi.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(Vi.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(Vi.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(Vi.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(Vi.HEADING)},e.prototype.getPosition=function(){return this.get(Vi.POSITION)},e.prototype.getProjection=function(){return this.get(Vi.PROJECTION)},e.prototype.getSpeed=function(){return this.get(Vi.SPEED)},e.prototype.getTracking=function(){return this.get(Vi.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(Vi.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(Vi.PROJECTION,Ee(t))},e.prototype.setTracking=function(t){this.set(Vi.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(Vi.TRACKING_OPTIONS,t)},e}(D);function Wi(t,e,i){var r=void 0!==i?t.toFixed(i):""+t,n=r.indexOf(".");return(n=-1===n?r.length:n)>e?r:new Array(1+e-n).join("0")+r}function Ki(t,e){for(var i=(""+t).split("."),r=(""+e).split("."),n=0;n<Math.max(i.length,r.length);n++){var o=parseInt(i[n]||"0",10),s=parseInt(r[n]||"0",10);if(o>s)return 1;if(s>o)return-1}return 0}function Hi(t,e){return t[0]+=e[0],t[1]+=e[1],t}function Zi(t,e){var i,r,n=t[0],o=t[1],s=e[0],a=e[1],h=s[0],l=s[1],u=a[0],p=a[1],c=u-h,d=p-l,f=0===c&&0===d?0:(c*(n-h)+d*(o-l))/(c*c+d*d||0);return f<=0?(i=h,r=l):f>=1?(i=u,r=p):(i=h+f*c,r=l+f*d),[i,r]}function qi(t,e,i){var r=Xt(e+180,360)-180,n=Math.abs(3600*r),o=i||0,s=Math.pow(10,o),a=Math.floor(n/3600),h=Math.floor((n-3600*a)/60),l=n-3600*a-60*h;return(l=Math.ceil(l*s)/s)>=60&&(l=0,h+=1),h>=60&&(h=0,a+=1),a+"° "+Wi(h,2)+"′ "+Wi(l,2,o)+"″"+(0==r?"":" "+t.charAt(r<0?1:0))}function Ji(t,e,i){return t?e.replace("{x}",t[0].toFixed(i)).replace("{y}",t[1].toFixed(i)):""}function Qi(t,e){for(var i=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){i=!1;break}return i}function $i(t,e){var i=Math.cos(e),r=Math.sin(e),n=t[0]*i-t[1]*r,o=t[1]*i+t[0]*r;return t[0]=n,t[1]=o,t}function tr(t,e){return t[0]*=e,t[1]*=e,t}function er(t,e){var i=t[0]-e[0],r=t[1]-e[1];return i*i+r*r}function ir(t,e){return Math.sqrt(er(t,e))}function rr(t,e){return er(t,Zi(t,e))}function nr(t,e){return Ji(t,"{x}, {y}",e)}function or(t,e,i,r,n,o){var s=NaN,a=NaN,h=(i-e)/r;if(1===h)s=t[e],a=t[e+1];else if(2==h)s=(1-n)*t[e]+n*t[e+r],a=(1-n)*t[e+1]+n*t[e+r+1];else if(0!==h){for(var l=t[e],u=t[e+1],p=0,c=[0],d=e+r;d<i;d+=r){var f=t[d],_=t[d+1];p+=Math.sqrt((f-l)*(f-l)+(_-u)*(_-u)),c.push(p),l=f,u=_}var g=n*p,y=function(t,e,i){for(var r,n,o=i||V,s=0,a=t.length,h=!1;s<a;)(n=+o(t[r=s+(a-s>>1)],e))<0?s=r+1:(a=r,h=!n);return h?s:~s}(c,g);if(y<0){var v=(g-c[-y-2])/(c[-y-1]-c[-y-2]),m=e+(-y-2)*r;s=zt(t[m],t[m+r],v),a=zt(t[m+1],t[m+r+1],v)}else s=t[e+y*r],a=t[e+y*r+1]}return o?(o[0]=s,o[1]=a,o):[s,a]}function sr(t,e,i,r,n,o){if(i==e)return null;var s;if(n<t[e+r-1])return o?((s=t.slice(e,e+r))[r-1]=n,s):null;if(t[i-1]<n)return o?((s=t.slice(i-r,i))[r-1]=n,s):null;if(n==t[e+r-1])return t.slice(e,e+r);for(var a=e/r,h=i/r;a<h;){var l=a+h>>1;n<t[(l+1)*r-1]?h=l:a=l+1}var u=t[a*r-1];if(n==u)return t.slice((a-1)*r,(a-1)*r+r);var p=(n-u)/(t[(a+1)*r-1]-u);s=[];for(var c=0;c<r-1;++c)s.push(zt(t[(a-1)*r+c],t[a*r+c],p));return s.push(n),s}function ar(t,e,i,r){for(var n=t[e],o=t[e+1],s=0,a=e+r;a<i;a+=r){var h=t[a],l=t[a+1];s+=Math.sqrt((h-n)*(h-n)+(l-o)*(l-o)),n=h,o=l}return s}var hr=function(t){function e(e,i){t.call(this),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===i||Array.isArray(e[0])?this.setCoordinates(e,i):this.setFlatCoordinates(i,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendCoordinate=function(t){this.flatCoordinates?K(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,r){return r<rt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Qe(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,r))},e.prototype.forEachSegment=function(t){return vi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,e){if(this.layout!=At.XYM&&this.layout!=At.XYZM)return null;var i=void 0!==e&&e;return sr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,e){return or(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e)},e.prototype.getLength=function(){return ar(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[];return i.length=si(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i,0),new e(i,At.XY)},e.prototype.getType=function(){return Nt.LINE_STRING},e.prototype.intersectsExtent=function(t){return mi(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ei(this.flatCoordinates,0,t,this.stride),this.changed()},e}(We);function lr(t,e,i){for(var r,n,o,s,a,h,l=[],u=t(0),p=t(1),c=e(u),d=e(p),f=[p,u],_=[d,c],g=[1,0],y={},v=1e5;--v>0&&g.length>0;)o=g.pop(),u=f.pop(),c=_.pop(),(h=o.toString())in y||(l.push(c[0],c[1]),y[h]=!0),s=g.pop(),p=f.pop(),d=_.pop(),Ut((n=e(r=t(a=(o+s)/2)))[0],n[1],c[0],c[1],d[0],d[1])<i?(l.push(d[0],d[1]),y[h=s.toString()]=!0):(g.push(s,a,a,o),_.push(d,n,n,c),f.push(p,r,r,u));return l}var ur={POSTCOMPOSE:"postcompose",PRECOMPOSE:"precompose",RENDER:"render",RENDERCOMPLETE:"rendercomplete"},pr=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,cr=/^([a-z]*)$/i;function dr(t){return"string"==typeof t?t:yr(t)}var fr=function(){var t={},e=0;return function(i){var r;if(t.hasOwnProperty(i))r=t[i];else{if(e>=1024){var n=0;for(var o in t)0==(3&n++)&&(delete t[o],--e)}r=function(t){var e,i,r,n,o;cr.exec(t)&&(t=function(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var i=getComputedStyle(e).color;return document.body.removeChild(e),i}return""}(t));if(pr.exec(t)){var s,a=t.length-1;s=a<=4?1:2;var h=4===a||8===a;e=parseInt(t.substr(1+0*s,s),16),i=parseInt(t.substr(1+1*s,s),16),r=parseInt(t.substr(1+2*s,s),16),n=h?parseInt(t.substr(1+3*s,s),16):255,1==s&&(e=(e<<4)+e,i=(i<<4)+i,r=(r<<4)+r,h&&(n=(n<<4)+n)),o=[e,i,r,n/255]}else 0==t.indexOf("rgba(")?gr(o=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((o=t.slice(4,-1).split(",").map(Number)).push(1),gr(o)):Y(!1,14);return o}(i),t[i]=r,++e}return r}}();function _r(t){return Array.isArray(t)?t:fr(t)}function gr(t){return t[0]=kt(t[0]+.5|0,0,255),t[1]=kt(t[1]+.5|0,0,255),t[2]=kt(t[2]+.5|0,0,255),t[3]=kt(t[3],0,1),t}function yr(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var i=t[1];i!=(0|i)&&(i=i+.5|0);var r=t[2];return r!=(0|r)&&(r=r+.5|0),"rgba("+e+","+i+","+r+","+(void 0===t[3]?1:t[3])+")"}var vr=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.checksum_=void 0};vr.prototype.clone=function(){var t=this.getColor();return new vr({color:Array.isArray(t)?t.slice():t||void 0})},vr.prototype.getColor=function(){return this.color_},vr.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},vr.prototype.getChecksum=function(){if(void 0===this.checksum_){var t=this.color_;t?Array.isArray(t)||"string"==typeof t?this.checksum_="f"+dr(t):this.checksum_=o(this.color_):this.checksum_="f-"}return this.checksum_};var mr=vr,xr=function(t){var e=t||{};this.color_=void 0!==e.color?e.color:null,this.lineCap_=e.lineCap,this.lineDash_=void 0!==e.lineDash?e.lineDash:null,this.lineDashOffset_=e.lineDashOffset,this.lineJoin_=e.lineJoin,this.miterLimit_=e.miterLimit,this.width_=e.width,this.checksum_=void 0};xr.prototype.clone=function(){var t=this.getColor();return new xr({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},xr.prototype.getColor=function(){return this.color_},xr.prototype.getLineCap=function(){return this.lineCap_},xr.prototype.getLineDash=function(){return this.lineDash_},xr.prototype.getLineDashOffset=function(){return this.lineDashOffset_},xr.prototype.getLineJoin=function(){return this.lineJoin_},xr.prototype.getMiterLimit=function(){return this.miterLimit_},xr.prototype.getWidth=function(){return this.width_},xr.prototype.setColor=function(t){this.color_=t,this.checksum_=void 0},xr.prototype.setLineCap=function(t){this.lineCap_=t,this.checksum_=void 0},xr.prototype.setLineDash=function(t){this.lineDash_=t,this.checksum_=void 0},xr.prototype.setLineDashOffset=function(t){this.lineDashOffset_=t,this.checksum_=void 0},xr.prototype.setLineJoin=function(t){this.lineJoin_=t,this.checksum_=void 0},xr.prototype.setMiterLimit=function(t){this.miterLimit_=t,this.checksum_=void 0},xr.prototype.setWidth=function(t){this.width_=t,this.checksum_=void 0},xr.prototype.getChecksum=function(){return void 0===this.checksum_&&(this.checksum_="s",this.color_?"string"==typeof this.color_?this.checksum_+=this.color_:this.checksum_+=o(this.color_):this.checksum_+="-",this.checksum_+=","+(void 0!==this.lineCap_?this.lineCap_.toString():"-")+","+(this.lineDash_?this.lineDash_.toString():"-")+","+(void 0!==this.lineDashOffset_?this.lineDashOffset_:"-")+","+(void 0!==this.lineJoin_?this.lineJoin_:"-")+","+(void 0!==this.miterLimit_?this.miterLimit_.toString():"-")+","+(void 0!==this.width_?this.width_.toString():"-")),this.checksum_};var Er=xr,Sr="point",Tr="line",Cr=function(t){var e=t||{};this.font_=e.font,this.rotation_=e.rotation,this.rotateWithView_=e.rotateWithView,this.scale_=e.scale,this.text_=e.text,this.textAlign_=e.textAlign,this.textBaseline_=e.textBaseline,this.fill_=void 0!==e.fill?e.fill:new mr({color:"#333"}),this.maxAngle_=void 0!==e.maxAngle?e.maxAngle:Math.PI/4,this.placement_=void 0!==e.placement?e.placement:Sr,this.overflow_=!!e.overflow,this.stroke_=void 0!==e.stroke?e.stroke:null,this.offsetX_=void 0!==e.offsetX?e.offsetX:0,this.offsetY_=void 0!==e.offsetY?e.offsetY:0,this.backgroundFill_=e.backgroundFill?e.backgroundFill:null,this.backgroundStroke_=e.backgroundStroke?e.backgroundStroke:null,this.padding_=void 0===e.padding?null:e.padding};Cr.prototype.clone=function(){return new Cr({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:this.getScale(),text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0})},Cr.prototype.getOverflow=function(){return this.overflow_},Cr.prototype.getFont=function(){return this.font_},Cr.prototype.getMaxAngle=function(){return this.maxAngle_},Cr.prototype.getPlacement=function(){return this.placement_},Cr.prototype.getOffsetX=function(){return this.offsetX_},Cr.prototype.getOffsetY=function(){return this.offsetY_},Cr.prototype.getFill=function(){return this.fill_},Cr.prototype.getRotateWithView=function(){return this.rotateWithView_},Cr.prototype.getRotation=function(){return this.rotation_},Cr.prototype.getScale=function(){return this.scale_},Cr.prototype.getStroke=function(){return this.stroke_},Cr.prototype.getText=function(){return this.text_},Cr.prototype.getTextAlign=function(){return this.textAlign_},Cr.prototype.getTextBaseline=function(){return this.textBaseline_},Cr.prototype.getBackgroundFill=function(){return this.backgroundFill_},Cr.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},Cr.prototype.getPadding=function(){return this.padding_},Cr.prototype.setOverflow=function(t){this.overflow_=t},Cr.prototype.setFont=function(t){this.font_=t},Cr.prototype.setMaxAngle=function(t){this.maxAngle_=t},Cr.prototype.setOffsetX=function(t){this.offsetX_=t},Cr.prototype.setOffsetY=function(t){this.offsetY_=t},Cr.prototype.setPlacement=function(t){this.placement_=t},Cr.prototype.setFill=function(t){this.fill_=t},Cr.prototype.setRotation=function(t){this.rotation_=t},Cr.prototype.setScale=function(t){this.scale_=t},Cr.prototype.setStroke=function(t){this.stroke_=t},Cr.prototype.setText=function(t){this.text_=t},Cr.prototype.setTextAlign=function(t){this.textAlign_=t},Cr.prototype.setTextBaseline=function(t){this.textBaseline_=t},Cr.prototype.setBackgroundFill=function(t){this.backgroundFill_=t},Cr.prototype.setBackgroundStroke=function(t){this.backgroundStroke_=t},Cr.prototype.setPadding=function(t){this.padding_=t};var Rr=Cr,wr=new Er({color:"rgba(0,0,0,0.2)"}),Ir=[90,45,30,20,10,5,2,1,.5,.2,.1,.05,.01,.005,.002,.001],Lr=function(t){var e=t||{};this.map_=null,this.postcomposeListenerKey_=null,this.projection_=null,this.maxLat_=1/0,this.maxLon_=1/0,this.minLat_=-1/0,this.minLon_=-1/0,this.maxLatP_=1/0,this.maxLonP_=1/0,this.minLatP_=-1/0,this.minLonP_=-1/0,this.targetSize_=void 0!==e.targetSize?e.targetSize:100,this.maxLines_=void 0!==e.maxLines?e.maxLines:100,this.meridians_=[],this.parallels_=[],this.strokeStyle_=void 0!==e.strokeStyle?e.strokeStyle:wr,this.fromLonLatTransform_=void 0,this.toLonLatTransform_=void 0,this.projectionCenterLonLat_=null,this.meridiansLabels_=null,this.parallelsLabels_=null,1==e.showLabels&&(this.lonLabelFormatter_=void 0==e.lonLabelFormatter?qi.bind(this,"EW"):e.lonLabelFormatter,this.latLabelFormatter_=void 0==e.latLabelFormatter?qi.bind(this,"NS"):e.latLabelFormatter,this.lonLabelPosition_=void 0==e.lonLabelPosition?0:e.lonLabelPosition,this.latLabelPosition_=void 0==e.latLabelPosition?1:e.latLabelPosition,this.lonLabelStyle_=void 0!==e.lonLabelStyle?e.lonLabelStyle:new Rr({font:"12px Calibri,sans-serif",textBaseline:"bottom",fill:new mr({color:"rgba(0,0,0,1)"}),stroke:new Er({color:"rgba(255,255,255,1)",width:3})}),this.latLabelStyle_=void 0!==e.latLabelStyle?e.latLabelStyle:new Rr({font:"12px Calibri,sans-serif",textAlign:"end",fill:new mr({color:"rgba(0,0,0,1)"}),stroke:new Er({color:"rgba(255,255,255,1)",width:3})}),this.meridiansLabels_=[],this.parallelsLabels_=[]),this.intervals_=void 0!==e.intervals?e.intervals:Ir,this.setMap(void 0!==e.map?e.map:null)};Lr.prototype.addMeridian_=function(t,e,i,r,n,o){var s=this.getMeridian_(t,e,i,r,o);if(Pt(s.getExtent(),n)){if(this.meridiansLabels_){var a=this.getMeridianPoint_(s,n,o);this.meridiansLabels_[o]={geom:a,text:this.lonLabelFormatter_(t)}}this.meridians_[o++]=s}return o},Lr.prototype.getMeridianPoint_=function(t,e,i){var r,n=t.getFlatCoordinates(),o=Math.max(e[1],n[1]),s=Math.min(e[3],n[n.length-1]),a=kt(e[1]+Math.abs(e[1]-e[3])*this.lonLabelPosition_,o,s),h=[n[0],a];return i in this.meridiansLabels_?(r=this.meridiansLabels_[i].geom).setCoordinates(h):r=new ci(h),r},Lr.prototype.addParallel_=function(t,e,i,r,n,o){var s=this.getParallel_(t,e,i,r,o);if(Pt(s.getExtent(),n)){if(this.parallelsLabels_){var a=this.getParallelPoint_(s,n,o);this.parallelsLabels_[o]={geom:a,text:this.latLabelFormatter_(t)}}this.parallels_[o++]=s}return o},Lr.prototype.getParallelPoint_=function(t,e,i){var r,n=t.getFlatCoordinates(),o=Math.max(e[0],n[0]),s=Math.min(e[2],n[n.length-2]),a=[kt(e[0]+Math.abs(e[0]-e[2])*this.latLabelPosition_,o,s),n[1]];return i in this.parallelsLabels_?(r=this.parallelsLabels_[i].geom).setCoordinates(a):r=new ci(a),r},Lr.prototype.createGraticule_=function(t,e,i,r){var n=this.getInterval_(i);if(-1==n)return this.meridians_.length=this.parallels_.length=0,this.meridiansLabels_&&(this.meridiansLabels_.length=0),void(this.parallelsLabels_&&(this.parallelsLabels_.length=0));var o,s,a,h,l=this.toLonLatTransform_(e),u=l[0],p=l[1],c=this.maxLines_,d=[Math.max(t[0],this.minLonP_),Math.max(t[1],this.minLatP_),Math.min(t[2],this.maxLonP_),Math.min(t[3],this.maxLatP_)],f=(d=be(d,this.projection_,"EPSG:4326"))[3],_=d[2],g=d[1],y=d[0];for(h=kt(u=Math.floor(u/n)*n,this.minLon_,this.maxLon_),s=this.addMeridian_(h,g,f,r,t,0),o=0;h!=this.minLon_&&o++<c;)h=Math.max(h-n,this.minLon_),s=this.addMeridian_(h,g,f,r,t,s);for(h=kt(u,this.minLon_,this.maxLon_),o=0;h!=this.maxLon_&&o++<c;)h=Math.min(h+n,this.maxLon_),s=this.addMeridian_(h,g,f,r,t,s);for(this.meridians_.length=s,this.meridiansLabels_&&(this.meridiansLabels_.length=s),a=kt(p=Math.floor(p/n)*n,this.minLat_,this.maxLat_),s=this.addParallel_(a,y,_,r,t,0),o=0;a!=this.minLat_&&o++<c;)a=Math.max(a-n,this.minLat_),s=this.addParallel_(a,y,_,r,t,s);for(a=kt(p,this.minLat_,this.maxLat_),o=0;a!=this.maxLat_&&o++<c;)a=Math.min(a+n,this.maxLat_),s=this.addParallel_(a,y,_,r,t,s);this.parallels_.length=s,this.parallelsLabels_&&(this.parallelsLabels_.length=s)},Lr.prototype.getInterval_=function(t){for(var e=this.projectionCenterLonLat_[0],i=this.projectionCenterLonLat_[1],r=-1,n=Math.pow(this.targetSize_*t,2),o=[],s=[],a=0,h=this.intervals_.length;a<h;++a){var l=this.intervals_[a]/2;if(o[0]=e-l,o[1]=i-l,s[0]=e+l,s[1]=i+l,this.fromLonLatTransform_(o,o),this.fromLonLatTransform_(s,s),Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)<=n)break;r=this.intervals_[a]}return r},Lr.prototype.getMap=function(){return this.map_},Lr.prototype.getMeridian_=function(t,e,i,r,n){var o=function(t,e,i,r,n){return lr(function(r){return[t,e+(i-e)*r]},Oe(Ee("EPSG:4326"),r),n)}(t,e,i,this.projection_,r),s=this.meridians_[n];return s?(s.setFlatCoordinates(At.XY,o),s.changed()):s=this.meridians_[n]=new hr(o,At.XY),s},Lr.prototype.getMeridians=function(){return this.meridians_},Lr.prototype.getParallel_=function(t,e,i,r,n){var o=function(t,e,i,r,n){return lr(function(r){return[e+(i-e)*r,t]},Oe(Ee("EPSG:4326"),r),n)}(t,e,i,this.projection_,r),s=this.parallels_[n];return s?(s.setFlatCoordinates(At.XY,o),s.changed()):s=new hr(o,At.XY),s},Lr.prototype.getParallels=function(){return this.parallels_},Lr.prototype.handlePostCompose_=function(t){var e,i,r,n,o=t.vectorContext,s=t.frameState,a=s.extent,h=s.viewState,l=h.center,u=h.projection,p=h.resolution,c=s.pixelRatio,d=p*p/(4*c*c);for((!this.projection_||!Ie(this.projection_,u))&&this.updateProjectionInfo_(u),this.createGraticule_(a,l,p,d),o.setFillStrokeStyle(null,this.strokeStyle_),e=0,i=this.meridians_.length;e<i;++e)r=this.meridians_[e],o.drawGeometry(r);for(e=0,i=this.parallels_.length;e<i;++e)r=this.parallels_[e],o.drawGeometry(r);if(this.meridiansLabels_)for(e=0,i=this.meridiansLabels_.length;e<i;++e)n=this.meridiansLabels_[e],this.lonLabelStyle_.setText(n.text),o.setTextStyle(this.lonLabelStyle_),o.drawGeometry(n.geom);if(this.parallelsLabels_)for(e=0,i=this.parallelsLabels_.length;e<i;++e)n=this.parallelsLabels_[e],this.latLabelStyle_.setText(n.text),o.setTextStyle(this.latLabelStyle_),o.drawGeometry(n.geom)},Lr.prototype.updateProjectionInfo_=function(t){var e=Ee("EPSG:4326"),i=t.getWorldExtent(),r=be(i,e,t);this.maxLat_=i[3],this.maxLon_=i[2],this.minLat_=i[1],this.minLon_=i[0],this.maxLatP_=r[3],this.maxLonP_=r[2],this.minLatP_=r[1],this.minLonP_=r[0],this.fromLonLatTransform_=Oe(e,t),this.toLonLatTransform_=Oe(t,e),this.projectionCenterLonLat_=this.toLonLatTransform_(Tt(t.getExtent())),this.projection_=t},Lr.prototype.setMap=function(t){this.map_&&(E(this.postcomposeListenerKey_),this.postcomposeListenerKey_=null,this.map_.render()),t&&(this.postcomposeListenerKey_=v(t,ur.POSTCOMPOSE,this.handlePostCompose_,this),t.render()),this.map_=t};var Or=Lr,Pr=function(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0};Pr.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},Pr.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},Pr.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;for(var i=e-3;i>0&&this.points_[i+2]>t;)i-=3;var r=this.points_[e+2]-this.points_[i+2];if(r<1e3/60)return!1;var n=this.points_[e]-this.points_[i],o=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(o,n),this.initialVelocity_=Math.sqrt(n*n+o*o)/r,this.initialVelocity_>this.minVelocity_},Pr.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},Pr.prototype.getAngle=function(){return this.angle_};var br=Pr,Mr=function(t){function e(e,i,r){t.call(this,e),this.map=i,this.frameState=void 0!==r?r:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),Fr=function(t){function e(e,i,r,n,o){t.call(this,e,i,o),this.originalEvent=r,this.pixel=i.getEventPixel(r),this.coordinate=i.getCoordinateFromPixel(this.pixel),this.dragging=void 0!==n&&n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),this.originalEvent.stopPropagation()},e}(Mr),Ar={SINGLECLICK:"singleclick",CLICK:M.CLICK,DBLCLICK:M.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Nr=function(t){function e(e,i,r,n,o){t.call(this,e,i,r.originalEvent,n,o),this.pointerEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fr),Gr={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Dr=function(t,e){this.dispatcher=t,this.mapping_=e};Dr.prototype.getEvents=function(){return Object.keys(this.mapping_)},Dr.prototype.getHandlerForEvent=function(t){return this.mapping_[t]};var kr=Dr,jr=1,Ur="mouse";function Yr(t){if(!this.isEventSimulatedFromTouch_(t)){jr.toString()in this.pointerMap&&this.cancel(t);var e=Wr(t,this.dispatcher);this.pointerMap[jr.toString()]=t,this.dispatcher.down(e,t)}}function Br(t){if(!this.isEventSimulatedFromTouch_(t)){var e=Wr(t,this.dispatcher);this.dispatcher.move(e,t)}}function Vr(t){if(!this.isEventSimulatedFromTouch_(t)){var e=this.pointerMap[jr.toString()];if(e&&e.button===t.button){var i=Wr(t,this.dispatcher);this.dispatcher.up(i,t),this.cleanupMouse()}}}function Xr(t){if(!this.isEventSimulatedFromTouch_(t)){var e=Wr(t,this.dispatcher);this.dispatcher.enterOver(e,t)}}function zr(t){if(!this.isEventSimulatedFromTouch_(t)){var e=Wr(t,this.dispatcher);this.dispatcher.leaveOut(e,t)}}function Wr(t,e){var i=e.cloneEvent(t,t),r=i.preventDefault;return i.preventDefault=function(){t.preventDefault(),r()},i.pointerId=jr,i.isPrimary=!0,i.pointerType=Ur,i}var Kr=function(t){function e(e){var i={mousedown:Yr,mousemove:Br,mouseup:Vr,mouseover:Xr,mouseout:zr};t.call(this,e,i),this.pointerMap=e.pointerMap,this.lastTouches=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isEventSimulatedFromTouch_=function(t){for(var e=this.lastTouches,i=t.clientX,r=t.clientY,n=0,o=e.length,s=void 0;n<o&&(s=e[n]);n++){var a=Math.abs(i-s[0]),h=Math.abs(r-s[1]);if(a<=25&&h<=25)return!0}return!1},e.prototype.cancel=function(t){var e=Wr(t,this.dispatcher);this.dispatcher.cancel(e,t),this.cleanupMouse()},e.prototype.cleanupMouse=function(){delete this.pointerMap[jr.toString()]},e}(kr),Hr=["","unavailable","touch","pen","mouse"];function Zr(t){this.pointerMap[t.pointerId.toString()]=t;var e=this.prepareEvent_(t);this.dispatcher.down(e,t)}function qr(t){var e=this.prepareEvent_(t);this.dispatcher.move(e,t)}function Jr(t){var e=this.prepareEvent_(t);this.dispatcher.up(e,t),this.cleanup(t.pointerId)}function Qr(t){var e=this.prepareEvent_(t);this.dispatcher.leaveOut(e,t)}function $r(t){var e=this.prepareEvent_(t);this.dispatcher.enterOver(e,t)}function tn(t){var e=this.prepareEvent_(t);this.dispatcher.cancel(e,t),this.cleanup(t.pointerId)}function en(t){var e=this.dispatcher.makeEvent("lostpointercapture",t,t);this.dispatcher.dispatchEvent(e)}function rn(t){var e=this.dispatcher.makeEvent("gotpointercapture",t,t);this.dispatcher.dispatchEvent(e)}var nn=function(t){function e(e){var i={MSPointerDown:Zr,MSPointerMove:qr,MSPointerUp:Jr,MSPointerOut:Qr,MSPointerOver:$r,MSPointerCancel:tn,MSGotPointerCapture:rn,MSLostPointerCapture:en};t.call(this,e,i),this.pointerMap=e.pointerMap}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvent_=function(t){var e=t;return"number"==typeof t.pointerType&&((e=this.dispatcher.cloneEvent(t,t)).pointerType=Hr[t.pointerType]),e},e.prototype.cleanup=function(t){delete this.pointerMap[t.toString()]},e}(kr);function on(t){this.dispatcher.fireNativeEvent(t)}function sn(t){this.dispatcher.fireNativeEvent(t)}function an(t){this.dispatcher.fireNativeEvent(t)}function hn(t){this.dispatcher.fireNativeEvent(t)}function ln(t){this.dispatcher.fireNativeEvent(t)}function un(t){this.dispatcher.fireNativeEvent(t)}function pn(t){this.dispatcher.fireNativeEvent(t)}function cn(t){this.dispatcher.fireNativeEvent(t)}var dn=function(t){function e(e){var i={pointerdown:on,pointermove:sn,pointerup:an,pointerout:hn,pointerover:ln,pointercancel:un,gotpointercapture:cn,lostpointercapture:pn};t.call(this,e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(kr),fn=!1,_n=function(t){function e(e,i,r){t.call(this,e),this.originalEvent=i;var n=r||{};this.buttons=function(t){var e;if(t.buttons||fn)e=t.buttons;else switch(t.which){case 1:e=1;break;case 2:e=4;break;case 3:e=2;break;default:e=0}return e}(n),this.pressure=function(t,e){var i=0;i=t.pressure?t.pressure:e?.5:0;return i}(n,this.buttons),this.bubbles="bubbles"in n&&n.bubbles,this.cancelable="cancelable"in n&&n.cancelable,this.view="view"in n?n.view:null,this.detail="detail"in n?n.detail:null,this.screenX="screenX"in n?n.screenX:0,this.screenY="screenY"in n?n.screenY:0,this.clientX="clientX"in n?n.clientX:0,this.clientY="clientY"in n?n.clientY:0,this.ctrlKey="ctrlKey"in n&&n.ctrlKey,this.altKey="altKey"in n&&n.altKey,this.shiftKey="shiftKey"in n&&n.shiftKey,this.metaKey="metaKey"in n&&n.metaKey,this.button="button"in n?n.button:0,this.relatedTarget="relatedTarget"in n?n.relatedTarget:null,this.pointerId="pointerId"in n?n.pointerId:0,this.width="width"in n?n.width:0,this.height="height"in n?n.height:0,this.tiltX="tiltX"in n?n.tiltX:0,this.tiltY="tiltY"in n?n.tiltY:0,this.pointerType="pointerType"in n?n.pointerType:"",this.hwTimestamp="hwTimestamp"in n?n.hwTimestamp:0,this.isPrimary="isPrimary"in n&&n.isPrimary,i.preventDefault&&(this.preventDefault=function(){i.preventDefault()})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);!function(){try{var t=new MouseEvent("click",{buttons:1});fn=1===t.buttons}catch(t){}}();var gn=_n;function yn(t){this.vacuumTouches_(t),this.setPrimaryTouch_(t.changedTouches[0]),this.dedupSynthMouse_(t),this.clickCount_++,this.processTouches_(t,this.overDown_)}function vn(t){this.processTouches_(t,this.moveOverOut_)}function mn(t){this.dedupSynthMouse_(t),this.processTouches_(t,this.upOut_)}function xn(t){this.processTouches_(t,this.cancelOut_)}var En=function(t){function e(e,i){var r={touchstart:yn,touchmove:vn,touchend:mn,touchcancel:xn};t.call(this,e,r),this.pointerMap=e.pointerMap,this.mouseSource=i,this.firstTouchId_=void 0,this.clickCount_=0,this.resetId_,this.dedupTimeout_=2500}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isPrimaryTouch_=function(t){return this.firstTouchId_===t.identifier},e.prototype.setPrimaryTouch_=function(t){var e=Object.keys(this.pointerMap).length;(0===e||1===e&&jr.toString()in this.pointerMap)&&(this.firstTouchId_=t.identifier,this.cancelResetClickCount_())},e.prototype.removePrimaryPointer_=function(t){t.isPrimary&&(this.firstTouchId_=void 0,this.resetClickCount_())},e.prototype.resetClickCount_=function(){this.resetId_=setTimeout(this.resetClickCountHandler_.bind(this),200)},e.prototype.resetClickCountHandler_=function(){this.clickCount_=0,this.resetId_=void 0},e.prototype.cancelResetClickCount_=function(){void 0!==this.resetId_&&clearTimeout(this.resetId_)},e.prototype.touchToPointer_=function(t,e){var i=this.dispatcher.cloneEvent(t,e);return i.pointerId=e.identifier+2,i.bubbles=!0,i.cancelable=!0,i.detail=this.clickCount_,i.button=0,i.buttons=1,i.width=e.radiusX||0,i.height=e.radiusY||0,i.pressure=e.force||.5,i.isPrimary=this.isPrimaryTouch_(e),i.pointerType="touch",i.clientX=e.clientX,i.clientY=e.clientY,i.screenX=e.screenX,i.screenY=e.screenY,i},e.prototype.processTouches_=function(t,e){var i=Array.prototype.slice.call(t.changedTouches),r=i.length;function n(){t.preventDefault()}for(var o=0;o<r;++o){var s=this.touchToPointer_(t,i[o]);s.preventDefault=n,e.call(this,t,s)}},e.prototype.findTouch_=function(t,e){for(var i=t.length,r=0;r<i;r++){if(t[r].identifier===e)return!0}return!1},e.prototype.vacuumTouches_=function(t){var e=t.touches,i=Object.keys(this.pointerMap),r=i.length;if(r>=e.length){for(var n=[],o=0;o<r;++o){var s=Number(i[o]),a=this.pointerMap[s];s==jr||this.findTouch_(e,s-2)||n.push(a.out)}for(var h=0;h<n.length;++h)this.cancelOut_(t,n[h])}},e.prototype.overDown_=function(t,e){this.pointerMap[e.pointerId]={target:e.target,out:e,outTarget:e.target},this.dispatcher.over(e,t),this.dispatcher.enter(e,t),this.dispatcher.down(e,t)},e.prototype.moveOverOut_=function(t,e){var i=e,r=this.pointerMap[i.pointerId];if(r){var n=r.out,o=r.outTarget;this.dispatcher.move(i,t),n&&o!==i.target&&(n.relatedTarget=i.target,i.relatedTarget=o,n.target=o,i.target?(this.dispatcher.leaveOut(n,t),this.dispatcher.enterOver(i,t)):(i.target=o,i.relatedTarget=null,this.cancelOut_(t,i))),r.out=i,r.outTarget=i.target}},e.prototype.upOut_=function(t,e){this.dispatcher.up(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cancelOut_=function(t,e){this.dispatcher.cancel(e,t),this.dispatcher.out(e,t),this.dispatcher.leave(e,t),this.cleanUpPointer_(e)},e.prototype.cleanUpPointer_=function(t){delete this.pointerMap[t.pointerId],this.removePrimaryPointer_(t)},e.prototype.dedupSynthMouse_=function(t){var e=this.mouseSource.lastTouches,i=t.changedTouches[0];if(this.isPrimaryTouch_(i)){var r=[i.clientX,i.clientY];e.push(r),setTimeout(function(){!function(t,e){var i=t.indexOf(e),r=i>-1;r&&t.splice(i,1)}(e,r)},this.dedupTimeout_)}},e}(kr),Sn=[["bubbles",!1],["cancelable",!1],["view",null],["detail",null],["screenX",0],["screenY",0],["clientX",0],["clientY",0],["ctrlKey",!1],["altKey",!1],["shiftKey",!1],["metaKey",!1],["button",0],["relatedTarget",null],["buttons",0],["pointerId",0],["width",0],["height",0],["pressure",0],["tiltX",0],["tiltY",0],["pointerType",""],["hwTimestamp",0],["isPrimary",!1],["type",""],["target",null],["currentTarget",null],["which",0]],Tn=function(t){function e(e){t.call(this),this.element_=e,this.pointerMap={},this.eventMap_={},this.eventSourceList_=[],this.registerSources()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.registerSources=function(){if(Yi)this.registerSource("native",new dn(this));else if(Bi)this.registerSource("ms",new nn(this));else{var t=new Kr(this);this.registerSource("mouse",t),Ui&&this.registerSource("touch",new En(this,t))}this.register_()},e.prototype.registerSource=function(t,e){var i=e,r=i.getEvents();r&&(r.forEach(function(t){var e=i.getHandlerForEvent(t);e&&(this.eventMap_[t]=e.bind(i))}.bind(this)),this.eventSourceList_.push(i))},e.prototype.register_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.addEvents_(i.getEvents())}},e.prototype.unregister_=function(){for(var t=this.eventSourceList_.length,e=0;e<t;e++){var i=this.eventSourceList_[e];this.removeEvents_(i.getEvents())}},e.prototype.eventHandler_=function(t){var e=t.type,i=this.eventMap_[e];i&&i(t)},e.prototype.addEvents_=function(t){t.forEach(function(t){v(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.removeEvents_=function(t){t.forEach(function(t){x(this.element_,t,this.eventHandler_,this)}.bind(this))},e.prototype.cloneEvent=function(t,e){for(var i={},r=0,n=Sn.length;r<n;r++){var o=Sn[r][0];i[o]=t[o]||e[o]||Sn[r][1]}return i},e.prototype.down=function(t,e){this.fireEvent(Gr.POINTERDOWN,t,e)},e.prototype.move=function(t,e){this.fireEvent(Gr.POINTERMOVE,t,e)},e.prototype.up=function(t,e){this.fireEvent(Gr.POINTERUP,t,e)},e.prototype.enter=function(t,e){t.bubbles=!1,this.fireEvent(Gr.POINTERENTER,t,e)},e.prototype.leave=function(t,e){t.bubbles=!1,this.fireEvent(Gr.POINTERLEAVE,t,e)},e.prototype.over=function(t,e){t.bubbles=!0,this.fireEvent(Gr.POINTEROVER,t,e)},e.prototype.out=function(t,e){t.bubbles=!0,this.fireEvent(Gr.POINTEROUT,t,e)},e.prototype.cancel=function(t,e){this.fireEvent(Gr.POINTERCANCEL,t,e)},e.prototype.leaveOut=function(t,e){this.out(t,e),this.contains_(t.target,t.relatedTarget)||this.leave(t,e)},e.prototype.enterOver=function(t,e){this.over(t,e),this.contains_(t.target,t.relatedTarget)||this.enter(t,e)},e.prototype.contains_=function(t,e){return!(!t||!e)&&t.contains(e)},e.prototype.makeEvent=function(t,e,i){return new gn(t,i,e)},e.prototype.fireEvent=function(t,e,i){var r=this.makeEvent(t,e,i);this.dispatchEvent(r)},e.prototype.fireNativeEvent=function(t){var e=this.makeEvent(t.type,t,t);this.dispatchEvent(e)},e.prototype.wrapMouseEvent=function(t,e){return this.makeEvent(t,Wr(e,this),e)},e.prototype.disposeInternal=function(){this.unregister_(),t.prototype.disposeInternal.call(this)},e}(b),Cn=function(t){function e(e,i){t.call(this),this.map_=e,this.clickTimeoutId_,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=i?i*Di:Di,this.down_=null;var r=this.map_.getViewport();this.activePointers_=0,this.trackedTouches_={},this.pointerEventHandler_=new Tn(r),this.documentPointerEventHandler_=null,this.pointerdownListenerKey_=v(this.pointerEventHandler_,Gr.POINTERDOWN,this.handlePointerDown_,this),this.relayedListenerKey_=v(this.pointerEventHandler_,Gr.POINTERMOVE,this.relayEvent_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.emulateClick_=function(t){var e=new Nr(Ar.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new Nr(Ar.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new Nr(Ar.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t;e.type==Ar.POINTERUP||e.type==Ar.POINTERCANCEL?delete this.trackedTouches_[e.pointerId]:e.type==Ar.POINTERDOWN&&(this.trackedTouches_[e.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new Nr(Ar.POINTERUP,this.map_,t);this.dispatchEvent(e),e.propagationStopped||this.dragging_||!this.isMouseActionButton_(t)||this.emulateClick_(this.down_),0===this.activePointers_&&(this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null,this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.updateActivePointers_(t);var e=new Nr(Ar.POINTERDOWN,this.map_,t);this.dispatchEvent(e),this.down_=t,0===this.dragListenerKeys_.length&&(this.documentPointerEventHandler_=new Tn(document),this.dragListenerKeys_.push(v(this.documentPointerEventHandler_,Ar.POINTERMOVE,this.handlePointerMove_,this),v(this.documentPointerEventHandler_,Ar.POINTERUP,this.handlePointerUp_,this),v(this.pointerEventHandler_,Ar.POINTERCANCEL,this.handlePointerUp_,this)))},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var e=new Nr(Ar.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(e)}t.preventDefault()},e.prototype.relayEvent_=function(t){var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new Nr(t.type,this.map_,t,e))},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(E(this.relayedListenerKey_),this.relayedListenerKey_=null),this.pointerdownListenerKey_&&(E(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0,this.documentPointerEventHandler_&&(this.documentPointerEventHandler_.dispose(),this.documentPointerEventHandler_=null),this.pointerEventHandler_&&(this.pointerEventHandler_.dispose(),this.pointerEventHandler_=null),t.prototype.disposeInternal.call(this)},e}(b),Rn="postrender",wn="movestart",In="moveend",Ln={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},On={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4,ABORT:5},Pn=function(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}};Pn.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,p(this.queuedElements_)},Pn.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var r=this.keyFunction_(i);return delete this.queuedElements_[r],i},Pn.prototype.enqueue=function(t){Y(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=1/0&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},Pn.prototype.getCount=function(){return this.elements_.length},Pn.prototype.getLeftChildIndex_=function(t){return 2*t+1},Pn.prototype.getRightChildIndex_=function(t){return 2*t+2},Pn.prototype.getParentIndex_=function(t){return t-1>>1},Pn.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},Pn.prototype.isEmpty=function(){return 0===this.elements_.length},Pn.prototype.isKeyQueued=function(t){return t in this.queuedElements_},Pn.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},Pn.prototype.siftUp_=function(t){for(var e=this.elements_,i=this.priorities_,r=e.length,n=e[t],o=i[t],s=t;t<r>>1;){var a=this.getLeftChildIndex_(t),h=this.getRightChildIndex_(t),l=h<r&&i[h]<i[a]?h:a;e[t]=e[l],i[t]=i[l],t=l}e[t]=n,i[t]=o,this.siftDown_(s,t)},Pn.prototype.siftDown_=function(t,e){for(var i=this.elements_,r=this.priorities_,n=i[e],o=r[e];e>t;){var s=this.getParentIndex_(e);if(!(r[s]>o))break;i[e]=i[s],r[e]=r[s],e=s}i[e]=n,r[e]=o},Pn.prototype.reprioritize=function(){var t,e,i,r=this.priorityFunction_,n=this.elements_,o=this.priorities_,s=0,a=n.length;for(e=0;e<a;++e)(i=r(t=n[e]))==1/0?delete this.queuedElements_[this.keyFunction_(t)]:(o[s]=i,n[s++]=t);n.length=s,o.length=s,this.heapify_()};var bn=Pn,Mn=function(t){function e(e,i){t.call(this,function(t){return e.apply(null,t)},function(t){return t[0].getKey()}),this.tileChangeCallback_=i,this.tilesLoading_=0,this.tilesLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.enqueue=function(e){var i=t.prototype.enqueue.call(this,e);i&&v(e[0],M.CHANGE,this.handleTileChange,this);return i},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,i=e.getState();if(i===On.LOADED||i===On.ERROR||i===On.EMPTY||i===On.ABORT){x(e,M.CHANGE,this.handleTileChange,this);var r=e.getKey();r in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[r],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){for(var i,r,n,o=0,s=!1;this.tilesLoading_<t&&o<e&&this.getCount()>0;)n=(r=this.dequeue()[0]).getKey(),(i=r.getState())===On.ABORT?s=!0:i!==On.IDLE||n in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[n]=!0,++this.tilesLoading_,++o,r.load());0===o&&s&&this.tileChangeCallback_()},e}(bn),Fn=42,An=256;function Nn(t){return t}function Gn(t,e){return void 0!==t?0:void 0}function Dn(t,e){return void 0!==t?t+e:void 0}var kn=0,jn=1,Un="center",Yn="resolution",Bn="rotation";function Vn(t){return Math.pow(t,3)}function Xn(t){return 1-Vn(1-t)}function zn(t){return 3*t*t-2*t*t*t}function Wn(t){return t}var Kn=0;function Hn(t,e){setTimeout(function(){t(e)},0)}function Zn(t){return!(t.sourceCenter&&t.targetCenter&&!Qi(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}var qn=function(t){function e(e){t.call(this);var i=u({},e);this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.updateAnimations_=this.updateAnimations_.bind(this),this.projection_=Ce(i.projection,"EPSG:3857"),this.applyOptions_(i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.applyOptions_=function(t){var e={};e[Un]=void 0!==t.center?t.center:null;var i=function(t){var e,i,r,n=void 0!==t.minZoom?t.minZoom:Kn,o=void 0!==t.maxZoom?t.maxZoom:28,s=void 0!==t.zoomFactor?t.zoomFactor:2;if(void 0!==t.resolutions){var a=t.resolutions;i=a[n],r=void 0!==a[o]?a[o]:a[a.length-1],e=function(t){return function(e,i,r){if(void 0!==e){var n=z(t,e,r);n=kt(n+i,0,t.length-1);var o=Math.floor(n);if(n!=o&&o<t.length-1){var s=t[o]/t[o+1];return t[o]/Math.pow(s,n-o)}return t[o]}}}(a)}else{var h=Ce(t.projection,"EPSG:3857"),l=h.getExtent(),u=l?Math.max(Ot(l),Rt(l)):360*Qt[$t.DEGREES]/h.getMetersPerUnit(),p=u/An/Math.pow(2,Kn),c=p/Math.pow(2,28-Kn);void 0!==(i=t.maxResolution)?n=0:i=p/Math.pow(s,n),void 0===(r=t.minResolution)&&(r=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(s,o):p/Math.pow(s,o):c),o=n+Math.floor(Math.log(i/r)/Math.log(s)),r=i/Math.pow(s,o-n),e=function(t,e,i){return function(r,n,o){if(void 0!==r){var s=-o/2+.5,a=Math.floor(Math.log(e/r)/Math.log(t)+s),h=Math.max(a+n,0);return void 0!==i&&(h=Math.min(h,i)),e/Math.pow(t,h)}}}(s,i,o-n)}return{constraint:e,maxResolution:i,minResolution:r,minZoom:n,zoomFactor:s}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.minZoom_=i.minZoom;var r=function(t){return void 0!==t.extent?function(t){return function(e){return e?[kt(e[0],t[0],t[2]),kt(e[1],t[1],t[3])]:void 0}}(t.extent):Nn}(t),n=i.constraint,o=function(t){if(void 0===t.enableRotation||t.enableRotation){var e=t.constrainRotation;return void 0===e||!0===e?function(t){var e=t||Vt(5);return function(t,i){return void 0!==t?Math.abs(t+i)<=e?0:t+i:void 0}}():!1===e?Dn:"number"==typeof e?function(t){var e=2*Math.PI/t;return function(t,i){return void 0!==t?t=Math.floor((t+i)/e+.5)*e:void 0}}(e):Dn}return Gn}(t);this.constraints_={center:r,resolution:n,rotation:o},void 0!==t.resolution?e[Yn]=t.resolution:void 0!==t.zoom&&(e[Yn]=this.constrainResolution(this.maxResolution_,t.zoom-this.minZoom_),this.resolutions_&&(e[Yn]=kt(Number(this.getResolution()||e[Yn]),this.minResolution_,this.maxResolution_))),e[Bn]=void 0!==t.rotation?t.rotation:0,this.setProperties(e),this.options_=t},e.prototype.getUpdatedOptions_=function(t){var e=u({},this.options_);return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenter(),e.rotation=this.getRotation(),u({},e,t)},e.prototype.animate=function(t){var e,i=arguments,r=arguments.length;if(r>1&&"function"==typeof arguments[r-1]&&(e=arguments[r-1],--r),!this.isDef()){var n=arguments[r-1];return n.center&&this.setCenter(n.center),void 0!==n.zoom&&this.setZoom(n.zoom),void 0!==n.rotation&&this.setRotation(n.rotation),void(e&&Hn(e,!0))}for(var o=Date.now(),s=this.getCenter().slice(),a=this.getResolution(),h=this.getRotation(),l=[],u=0;u<r;++u){var p=i[u],c={start:o,complete:!1,anchor:p.anchor,duration:void 0!==p.duration?p.duration:1e3,easing:p.easing||zn};if(p.center&&(c.sourceCenter=s,c.targetCenter=p.center,s=c.targetCenter),void 0!==p.zoom?(c.sourceResolution=a,c.targetResolution=this.constrainResolution(this.maxResolution_,p.zoom-this.minZoom_,0),a=c.targetResolution):p.resolution&&(c.sourceResolution=a,c.targetResolution=p.resolution,a=c.targetResolution),void 0!==p.rotation){c.sourceRotation=h;var d=Xt(p.rotation-h+Math.PI,2*Math.PI)-Math.PI;c.targetRotation=h+d,h=c.targetRotation}c.callback=e,Zn(c)?c.complete=!0:o+=c.duration,l.push(c)}this.animations_.push(l),this.setHint(kn,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[kn]>0},e.prototype.getInteracting=function(){return this.hints_[jn]>0},e.prototype.cancelAnimations=function(){this.setHint(kn,-this.hints_[kn]);for(var t=0,e=this.animations_.length;t<e;++t){var i=this.animations_[t];i[0].callback&&Hn(i[0].callback,!1)}this.animations_.length=0},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,i=this.animations_.length-1;i>=0;--i){for(var r=this.animations_[i],n=!0,o=0,s=r.length;o<s;++o){var a=r[o];if(!a.complete){var h=t-a.start,l=a.duration>0?h/a.duration:1;l>=1?(a.complete=!0,l=1):n=!1;var u=a.easing(l);if(a.sourceCenter){var p=a.sourceCenter[0],c=a.sourceCenter[1],d=p+u*(a.targetCenter[0]-p),f=c+u*(a.targetCenter[1]-c);this.set(Un,[d,f])}if(a.sourceResolution&&a.targetResolution){var _=1===u?a.targetResolution:a.sourceResolution+u*(a.targetResolution-a.sourceResolution);a.anchor&&this.set(Un,this.calculateCenterZoom(_,a.anchor)),this.set(Yn,_)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var g=1===u?Xt(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+u*(a.targetRotation-a.sourceRotation);a.anchor&&this.set(Un,this.calculateCenterRotate(g,a.anchor)),this.set(Bn,g)}if(e=!0,!a.complete)break}}if(n){this.animations_[i]=null,this.setHint(kn,-1);var y=r[0].callback;y&&Hn(y,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_))}},e.prototype.calculateCenterRotate=function(t,e){var i,r=this.getCenter();return void 0!==r&&($i(i=[r[0]-e[0],r[1]-e[1]],t-this.getRotation()),Hi(i,e)),i},e.prototype.calculateCenterZoom=function(t,e){var i,r=this.getCenter(),n=this.getResolution();void 0!==r&&void 0!==n&&(i=[e[0]-t*(e[0]-r[0])/n,e[1]-t*(e[1]-r[1])/n]);return i},e.prototype.getSizeFromViewport_=function(){var t=[100,100],e='.ol-viewport[data-view="'+o(this)+'"]',i=document.querySelector(e);if(i){var r=getComputedStyle(i);t[0]=parseInt(r.width,10),t[1]=parseInt(r.height,10)}return t},e.prototype.constrainCenter=function(t){return this.constraints_.center(t)},e.prototype.constrainResolution=function(t,e,i){var r=e||0,n=i||0;return this.constraints_.resolution(t,r,n)},e.prototype.constrainRotation=function(t,e){var i=e||0;return this.constraints_.rotation(t,i)},e.prototype.getCenter=function(){return this.get(Un)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=t||this.getSizeFromViewport_(),i=this.getCenter();Y(i,1);var r=this.getResolution();Y(void 0!==r,2);var n=this.getRotation();return Y(void 0!==n,3),Ct(i,r,n,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Yn)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){var i=e||this.getSizeFromViewport_(),r=Ot(t)/i[0],n=Rt(t)/i[1];return Math.max(r,n)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,i=this.maxResolution_,r=this.minResolution_,n=Math.log(i/r)/Math.log(e);return function(t){return i/Math.pow(e,t*n)}},e.prototype.getRotation=function(){return this.get(Bn)},e.prototype.getValueForResolutionFunction=function(t){var e=t||2,i=this.maxResolution_,r=this.minResolution_,n=Math.log(i/r)/Math.log(e);return function(t){return Math.log(i/t)/Math.log(e)/n}},e.prototype.getState=function(t){var e=this.getCenter(),i=this.getProjection(),r=this.getResolution(),n=r/t,o=this.getRotation();return{center:[Math.round(e[0]/n)*n,Math.round(e[1]/n)*n],projection:void 0!==i?i:null,resolution:r,rotation:o,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,i,r=this.minZoom_||0;if(this.resolutions_){var n=z(this.resolutions_,t,1);r=n,e=this.resolutions_[n],i=n==this.resolutions_.length-1?2:e/this.resolutions_[n+1]}else e=this.maxResolution_,i=this.zoomFactor_;return r+Math.log(e/t)/Math.log(i)},e.prototype.getResolutionForZoom=function(t){return this.constrainResolution(this.maxResolution_,t-this.minZoom_,0)},e.prototype.fit=function(t,e){var i,r=e||{},n=r.size;n||(n=this.getSizeFromViewport_()),Y(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)?(Y(!bt(t),25),i=Oi(t)):t.getType()===Nt.CIRCLE?(i=Oi(t=t.getExtent())).rotate(this.getRotation(),Tt(t)):i=t;var o,s=void 0!==r.padding?r.padding:[0,0,0,0],a=void 0===r.constrainResolution||r.constrainResolution,h=void 0!==r.nearest&&r.nearest;o=void 0!==r.minResolution?r.minResolution:void 0!==r.maxZoom?this.constrainResolution(this.maxResolution_,r.maxZoom-this.minZoom_,0):0;for(var l=i.getFlatCoordinates(),u=this.getRotation(),p=Math.cos(-u),c=Math.sin(-u),d=1/0,f=1/0,_=-1/0,g=-1/0,y=i.getStride(),v=0,m=l.length;v<m;v+=y){var x=l[v]*p-l[v+1]*c,E=l[v]*c+l[v+1]*p;d=Math.min(d,x),f=Math.min(f,E),_=Math.max(_,x),g=Math.max(g,E)}var S=this.getResolutionForExtent([d,f,_,g],[n[0]-s[1]-s[3],n[1]-s[0]-s[2]]);if(S=isNaN(S)?o:Math.max(S,o),a){var T=this.constrainResolution(S,0,0);!h&&T<S&&(T=this.constrainResolution(T,-1,0)),S=T}c=-c;var C=(d+_)/2,R=(f+g)/2,w=[(C+=(s[1]-s[3])/2*S)*p-(R+=(s[0]-s[2])/2*S)*c,R*p+C*c],L=r.callback?r.callback:I;void 0!==r.duration?this.animate({resolution:S,center:w,duration:r.duration,easing:r.easing},L):(this.setResolution(S),this.setCenter(w),Hn(L,!0))},e.prototype.centerOn=function(t,e,i){var r=this.getRotation(),n=Math.cos(-r),o=Math.sin(-r),s=t[0]*n-t[1]*o,a=t[1]*n+t[0]*o,h=this.getResolution(),l=(s+=(e[0]/2-i[0])*h)*n-(a+=(i[1]-e[1]/2)*h)*(o=-o),u=a*n+s*o;this.setCenter([l,u])},e.prototype.isDef=function(){return!!this.getCenter()&&void 0!==this.getResolution()},e.prototype.rotate=function(t,e){if(void 0!==e){var i=this.calculateCenterRotate(t,e);this.setCenter(i)}this.setRotation(t)},e.prototype.setCenter=function(t){this.set(Un,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.set(Yn,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setRotation=function(t){this.set(Bn,t),this.getAnimating()&&this.cancelAnimations()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e}(D);function Jn(t,e){var i=document.createElement("canvas");return t&&(i.width=t),e&&(i.height=e),i.getContext("2d")}function Qn(t,e){var i=e.parentNode;i&&i.replaceChild(t,e)}function $n(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function to(t){for(;t.lastChild;)t.removeChild(t.lastChild)}var eo={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",SOURCE:"source"},io=function(t){function e(e){t.call(this);var i=u({},e);i[eo.OPACITY]=void 0!==e.opacity?e.opacity:1,i[eo.VISIBLE]=void 0===e.visible||e.visible,i[eo.Z_INDEX]=e.zIndex,i[eo.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[eo.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,this.setProperties(i),this.state_=null,this.type}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return this.type},e.prototype.getLayerState=function(){var t=this.state_||{layer:this,managed:!0};return t.opacity=kt(this.getOpacity(),0,1),t.sourceState=this.getSourceState(),t.visible=this.getVisible(),t.extent=this.getExtent(),t.zIndex=this.getZIndex()||0,t.maxResolution=this.getMaxResolution(),t.minResolution=Math.max(this.getMinResolution(),0),this.state_=t,t},e.prototype.getLayersArray=function(t){return r()},e.prototype.getLayerStatesArray=function(t){return r()},e.prototype.getExtent=function(){return this.get(eo.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(eo.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(eo.MIN_RESOLUTION)},e.prototype.getOpacity=function(){return this.get(eo.OPACITY)},e.prototype.getSourceState=function(){return r()},e.prototype.getVisible=function(){return this.get(eo.VISIBLE)},e.prototype.getZIndex=function(){return this.get(eo.Z_INDEX)},e.prototype.setExtent=function(t){this.set(eo.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(eo.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(eo.MIN_RESOLUTION,t)},e.prototype.setOpacity=function(t){this.set(eo.OPACITY,t)},e.prototype.setVisible=function(t){this.set(eo.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(eo.Z_INDEX,t)},e}(D),ro={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},no={LAYERS:"layers"},oo=function(t){function e(e){var i=e||{},r=u({},i);delete r.layers;var n=i.layers;t.call(this,r),this.layersListenerKeys_=[],this.listenerKeys_={},v(this,G(no.LAYERS),this.handleLayersChanged_,this),n?Array.isArray(n)?n=new U(n.slice(),{unique:!0}):Y("function"==typeof n.getArray,43):n=new U(void 0,{unique:!0}),this.setLayers(n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(E),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(v(t,h.ADD,this.handleLayersAdd_,this),v(t,h.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(E);p(this.listenerKeys_);for(var i=t.getArray(),r=0,n=i.length;r<n;r++){var s=i[r];this.listenerKeys_[o(s)]=[v(s,l,this.handleLayerChange_,this),v(s,M.CHANGE,this.handleLayerChange_,this)]}this.changed()},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.listenerKeys_[o(e)]=[v(e,l,this.handleLayerChange_,this),v(e,M.CHANGE,this.handleLayerChange_,this)],this.changed()},e.prototype.handleLayersRemove_=function(t){var e=o(t.element);this.listenerKeys_[e].forEach(E),delete this.listenerKeys_[e],this.changed()},e.prototype.getLayers=function(){return this.get(no.LAYERS)},e.prototype.setLayers=function(t){this.set(no.LAYERS,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach(function(t){t.getLayersArray(e)}),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});for(var r=this.getLayerState(),n=i,o=e.length;n<o;n++){var s=e[n];s.opacity*=r.opacity,s.visible=s.visible&&r.visible,s.maxResolution=Math.min(s.maxResolution,r.maxResolution),s.minResolution=Math.max(s.minResolution,r.minResolution),void 0!==r.extent&&(void 0!==s.extent?s.extent=wt(s.extent,r.extent):s.extent=r.extent)}return e},e.prototype.getSourceState=function(){return ro.READY},e}(io);function so(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]+2*e,i[1]=t[1]+2*e,i}function ao(t,e,i){return void 0===i&&(i=[0,0]),i[0]=t[0]*e+.5|0,i[1]=t[1]*e+.5|0,i}function ho(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:e[0]=e[1]=t,e)}var lo=function(t){function e(e){t.call(this);var i=function(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var i,r,n,o={},s=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new oo({layers:t.layers});o[Ln.LAYERGROUP]=s,o[Ln.TARGET]=t.target,o[Ln.VIEW]=void 0!==t.view?t.view:new qn,void 0!==t.controls&&(Array.isArray(t.controls)?i=new U(t.controls.slice()):(Y("function"==typeof t.controls.getArray,47),i=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new U(t.interactions.slice()):(Y("function"==typeof t.interactions.getArray,48),r=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?n=new U(t.overlays.slice()):(Y("function"==typeof t.overlays.getArray,49),n=t.overlays):n=new U;return{controls:i,interactions:r,keyboardEventTarget:e,overlays:n,values:o}}(e);this.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,this.loadTilesWhileAnimating_=void 0!==e.loadTilesWhileAnimating&&e.loadTilesWhileAnimating,this.loadTilesWhileInteracting_=void 0!==e.loadTilesWhileInteracting&&e.loadTilesWhileInteracting,this.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:Di,this.animationDelayKey_,this.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_.call(this,Date.now())}.bind(this),this.coordinateToPixelTransform_=[1,0,0,1,0,0],this.pixelToCoordinateTransform_=[1,0,0,1,0,0],this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+(Ui?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.viewport_.style.msTouchAction="none",this.viewport_.style.touchAction="none",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent";for(var r=[M.CLICK,M.DBLCLICK,M.MOUSEDOWN,M.TOUCHSTART,M.MSPOINTERDOWN,Ar.POINTERDOWN,M.MOUSEWHEEL,M.WHEEL],n=0,o=r.length;n<o;++n)v(this.overlayContainerStopEvent_,r[n],O);for(var s in this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=new Cn(this,e.moveTolerance),Ar)v(this.mapBrowserEventHandler_,Ar[s],this.handleMapBrowserEvent,this);this.keyboardEventTarget_=i.keyboardEventTarget,this.keyHandlerKeys_=null,v(this.viewport_,M.CONTEXTMENU,this.handleBrowserEvent,this),v(this.viewport_,M.WHEEL,this.handleBrowserEvent,this),v(this.viewport_,M.MOUSEWHEEL,this.handleBrowserEvent,this),this.controls=i.controls||new U,this.interactions=i.interactions||new U,this.overlays_=i.overlays,this.overlayIdIndex_={},this.renderer_=this.createRenderer(),this.handleResize_,this.focus_=null,this.postRenderFunctions_=[],this.tileQueue_=new Mn(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.skippedFeatureUids_={},v(this,G(Ln.LAYERGROUP),this.handleLayerGroupChanged_,this),v(this,G(Ln.VIEW),this.handleViewChanged_,this),v(this,G(Ln.SIZE),this.handleSizeChanged_,this),v(this,G(Ln.TARGET),this.handleTargetChanged_,this),this.setProperties(i.values),this.controls.forEach(function(t){t.setMap(this)}.bind(this)),v(this.controls,h.ADD,function(t){t.element.setMap(this)},this),v(this.controls,h.REMOVE,function(t){t.element.setMap(null)},this),this.interactions.forEach(function(t){t.setMap(this)}.bind(this)),v(this.interactions,h.ADD,function(t){t.element.setMap(this)},this),v(this.interactions,h.REMOVE,function(t){t.element.setMap(null)},this),this.overlays_.forEach(this.addOverlayInternal_.bind(this)),v(this.overlays_,h.ADD,function(t){this.addOverlayInternal_(t.element)},this),v(this.overlays_,h.REMOVE,function(t){var e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)},this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.mapBrowserEventHandler_.dispose(),x(this.viewport_,M.CONTEXTMENU,this.handleBrowserEvent,this),x(this.viewport_,M.WHEEL,this.handleBrowserEvent,this),x(this.viewport_,M.MOUSEWHEEL,this.handleBrowserEvent,this),void 0!==this.handleResize_&&(removeEventListener(M.RESIZE,this.handleResize_,!1),this.handleResize_=void 0),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,i){if(this.frameState_){var r=this.getCoordinateFromPixel(t),n=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,o=void 0!==i.layerFilter?i.layerFilter:R;return this.renderer_.forEachFeatureAtCoordinate(r,this.frameState_,n,e,null,o,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var i=null;return this.forEachFeatureAtPixel(t,function(t){i||(i=[]),i.push(t)},e),i},e.prototype.forEachLayerAtPixel=function(t,e,i){if(this.frameState_){var r=i||{},n=void 0!==r.hitTolerance?i.hitTolerance*this.frameState_.pixelRatio:0,o=r.layerFilter||R;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,n,e,null,o,null)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_)return!1;var i=this.getCoordinateFromPixel(t),r=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:R,n=void 0!==e.hitTolerance?e.hitTolerance*this.frameState_.pixelRatio:0;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,n,r,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-e.left,i.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Ln.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){var e=this.frameState_;return e?De(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Ln.LAYERGROUP)},e.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},e.prototype.getPixelFromCoordinate=function(t){var e=this.frameState_;return e?De(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Ln.SIZE)},e.prototype.getView=function(){return this.get(Ln.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getTilePriority=function(t,e,i,r){var n=this.frameState_;if(!(n&&e in n.wantedTiles))return 1/0;if(!n.wantedTiles[e][t.getKey()])return 1/0;var o=i[0]-n.focus[0],s=i[1]-n.focus[1];return 65536*Math.log(r)+Math.sqrt(o*o+s*s)/r},e.prototype.handleBrowserEvent=function(t,e){var i=e||t.type,r=new Fr(i,this,t);this.handleMapBrowserEvent(r)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){this.focus_=t.coordinate,t.frameState=this.frameState_;var e=this.getInteractions().getArray();if(!1!==this.dispatchEvent(t))for(var i=e.length-1;i>=0;i--){var r=e[i];if(r.getActive())if(!r.handleEvent(t))break}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var i=this.maxTilesLoading_,r=i;if(t){var n=t.viewHints;n[kn]&&(i=this.loadTilesWhileAnimating_?8:0,r=2),n[jn]&&(i=this.loadTilesWhileInteracting_?8:0,r=2)}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,r))}!t||!this.hasListener(ur.RENDERCOMPLETE)||t.animate||this.tileQueue_.getTilesLoading()||function t(e){for(var i=0,r=e.length;i<r;++i){var n=e[i];if("function"==typeof n.getLayers)return t(n.getLayers().getArray());var o=n.getSource();if(o&&o.loading)return!0}return!1}(this.getLayers().getArray())||this.renderer_.dispatchRenderEvent(ur.RENDERCOMPLETE,t);for(var o=this.postRenderFunctions_,s=0,a=o.length;s<a;++s)o[s](this,t);o.length=0},e.prototype.handleSizeChanged_=function(){this.render()},e.prototype.handleTargetChanged_=function(){var t;if(this.getTarget()&&(t=this.getTargetElement()),this.keyHandlerKeys_){for(var e=0,i=this.keyHandlerKeys_.length;e<i;++e)E(this.keyHandlerKeys_[e]);this.keyHandlerKeys_=null}if(t){t.appendChild(this.viewport_);var r=this.keyboardEventTarget_?this.keyboardEventTarget_:t;this.keyHandlerKeys_=[v(r,M.KEYDOWN,this.handleBrowserEvent,this),v(r,M.KEYPRESS,this.handleBrowserEvent,this)],this.handleResize_||(this.handleResize_=this.updateSize.bind(this),window.addEventListener(M.RESIZE,this.handleResize_,!1))}else this.renderer_.removeLayerRenderers(),$n(this.viewport_),void 0!==this.handleResize_&&(removeEventListener(M.RESIZE,this.handleResize_,!1),this.handleResize_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(E(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(E(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.viewport_.setAttribute("data-view",o(t)),this.viewPropertyListenerKey_=v(t,l,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=v(t,M.CHANGE,this.handleViewPropertyChanged_,this)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(E),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.layerGroupPropertyListenerKeys_=[v(t,l,this.render,this),v(t,M.CHANGE,this.render,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.render=function(){void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){return this.getLayerGroup().getLayers().remove(t)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e,i=this.getSize(),r=this.getView(),n=[1/0,1/0,-1/0,-1/0],s=this.frameState_,a=null;if(void 0!==i&&function(t){return t[0]>0&&t[1]>0}(i)&&r&&r.isDef()){for(var h=r.getHints(this.frameState_?this.frameState_.viewHints:void 0),l=this.getLayerGroup().getLayerStatesArray(),u={},p=0,c=l.length;p<c;++p)u[o(l[p].layer)]=l[p];e=r.getState(this.pixelRatio_),a={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,extent:n,focus:this.focus_?this.focus_:e.center,index:this.frameIndex_++,layerStates:u,layerStatesArray:l,pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,skippedFeatureUids:this.skippedFeatureUids_,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:e,viewHints:h,wantedTiles:{}}}if(a&&(a.extent=Ct(e.center,e.resolution,e.rotation,a.size,n)),this.frameState_=a,this.renderer_.renderFrame(a),a){if(a.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,a.postRenderFunctions),s)(!this.previousExtent_||!bt(this.previousExtent_)&&!dt(a.extent,this.previousExtent_))&&(this.dispatchEvent(new Mr(wn,this,s)),this.previousExtent_=ut(this.previousExtent_));this.previousExtent_&&!a.viewHints[kn]&&!a.viewHints[jn]&&!dt(a.extent,this.previousExtent_)&&(this.dispatchEvent(new Mr(In,this,a)),it(a.extent,this.previousExtent_))}this.dispatchEvent(new Mr(Rn,this,a)),setTimeout(this.handlePostRender.bind(this),0)},e.prototype.setLayerGroup=function(t){this.set(Ln.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(Ln.SIZE,t)},e.prototype.setTarget=function(t){this.set(Ln.TARGET,t)},e.prototype.setView=function(t){this.set(Ln.VIEW,t)},e.prototype.skipFeature=function(t){this.skippedFeatureUids_[o(t)]=!0,this.render()},e.prototype.updateSize=function(){var t=this.getTargetElement();if(t){var e=getComputedStyle(t);this.setSize([t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)])}else this.setSize(void 0)},e.prototype.unskipFeature=function(t){delete this.skippedFeatureUids_[o(t)],this.render()},e}(D);var uo=function(t){function e(e){t.call(this),this.element=e.element?e.element:null,this.target_=null,this.map_=null,this.listenerKeys=[],this.render=e.render?e.render:I,e.target&&this.setTarget(e.target)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){$n(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&$n(this.element);for(var e=0,i=this.listenerKeys.length;e<i;++e)E(this.listenerKeys[e]);(this.listenerKeys.length=0,this.map_=t,this.map_)&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==I&&this.listenerKeys.push(v(t,Rn,this.render,this)),t.render())},e.prototype.setTarget=function(t){this.target_="string"==typeof t?document.getElementById(t):t},e}(D),po="ol-hidden",co="ol-selectable",fo="ol-unselectable",_o="ol-unsupported",go="ol-control",yo="ol-collapsed",vo=function(){var t,e={};return function(i){if(t||(t=document.createElement("div").style),!(i in e)){t.font=i;var r=t.fontFamily;if(t.font="",!r)return null;e[i]=r.split(/,\s?/)}return e[i]}}();function mo(t,e){return t.visible&&e>=t.minResolution&&e<t.maxResolution}var xo=function(t){function e(e){var i=u({},e);delete i.source,t.call(this,i),this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,e.map&&this.setMap(e.map),v(this,G(eo.SOURCE),this.handleSourcePropertyChange_,this);var r=e.source?e.source:null;this.setSource(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(eo.SOURCE)||null},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():ro.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(E(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=v(t,M.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(E(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(E(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=v(t,ur.PRECOMPOSE,function(t){var e=t,i=this.getLayerState();i.managed=!1,void 0===this.getZIndex()&&(i.zIndex=1/0),e.frameState.layerStatesArray.push(i),e.frameState.layerStates[o(this)]=i},this),this.mapRenderKey_=v(this,M.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(eo.SOURCE,t)},e}(io);function Eo(t){this.updateElement_(t.frameState)}var So=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||Eo,target:i.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===i.collapsed||i.collapsed,this.overrideCollapsible_=void 0!==i.collapsible,this.collapsible_=void 0===i.collapsible||i.collapsible,this.collapsible_||(this.collapsed_=!1);var r=void 0!==i.className?i.className:"ol-attribution",n=void 0!==i.tipLabel?i.tipLabel:"Attributions",o=void 0!==i.collapseLabel?i.collapseLabel:"»";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o):this.collapseLabel_=o;var s=void 0!==i.label?i.label:"i";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s):this.label_=s;var a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=n,h.appendChild(a),v(h,M.CLICK,this.handleClick_,this);var l=r+" "+fo+" "+go+(this.collapsed_&&this.collapsible_?" "+yo:"")+(this.collapsible_?"":" ol-uncollapsible"),u=this.element;u.className=l,u.appendChild(this.ulElement_),u.appendChild(h),this.renderedAttributions_=[],this.renderedVisible_=!0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.collectSourceAttributions_=function(t){for(var e={},i=[],r=t.layerStatesArray,n=t.viewState.resolution,o=0,s=r.length;o<s;++o){var a=r[o];if(mo(a,n)){var h=a.layer.getSource();if(h){var l=h.getAttributions();if(l){var u=l(t);if(u)if(this.overrideCollapsible_||!1!==h.getAttributionsCollapsible()||this.setCollapsible(!1),Array.isArray(u))for(var p=0,c=u.length;p<c;++p)u[p]in e||(i.push(u[p]),e[u[p]]=!0);else u in e||(i.push(u),e[u]=!0)}}}}return i},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Z(e,this.renderedAttributions_)){to(this.ulElement_);for(var r=0,n=e.length;r<n;++r){var o=document.createElement("li");o.innerHTML=e[r],this.ulElement_.appendChild(o)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(yo),this.collapsed_?Qn(this.collapseLabel_,this.label_):Qn(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e}(uo);function To(t){var e=t.frameState;if(e){var i=e.viewState.rotation;if(i!=this.rotation_){var r="rotate("+i+"rad)";if(this.autoHide_){var n=this.element.classList.contains(po);n||0!==i?n&&0!==i&&this.element.classList.remove(po):this.element.classList.add(po)}this.label_.style.msTransform=r,this.label_.style.webkitTransform=r,this.label_.style.transform=r}this.rotation_=i}}var Co=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||To,target:i.target});var r=void 0!==i.className?i.className:"ol-rotate",n=void 0!==i.label?i.label:"⇧";this.label_=null,"string"==typeof n?(this.label_=document.createElement("span"),this.label_.className="ol-compass",this.label_.textContent=n):(this.label_=n,this.label_.classList.add("ol-compass"));var o=i.tipLabel?i.tipLabel:"Reset rotation",s=document.createElement("button");s.className=r+"-reset",s.setAttribute("type","button"),s.title=o,s.appendChild(this.label_),v(s,M.CLICK,this.handleClick_,this);var a=r+" "+fo+" "+go,h=this.element;h.className=a,h.appendChild(s),this.callResetNorth_=i.resetNorth?i.resetNorth:void 0,this.duration_=void 0!==i.duration?i.duration:250,this.autoHide_=void 0===i.autoHide||i.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(po)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap().getView();t&&void 0!==t.getRotation()&&(this.duration_>0?t.animate({rotation:0,duration:this.duration_,easing:Xn}):t.setRotation(0))},e}(uo),Ro=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),target:i.target});var r=void 0!==i.className?i.className:"ol-zoom",n=void 0!==i.delta?i.delta:1,o=void 0!==i.zoomInLabel?i.zoomInLabel:"+",s=void 0!==i.zoomOutLabel?i.zoomOutLabel:"−",a=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",h=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=r+"-in",l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof o?document.createTextNode(o):o),v(l,M.CLICK,this.handleClick_.bind(this,n));var u=document.createElement("button");u.className=r+"-out",u.setAttribute("type","button"),u.title=h,u.appendChild("string"==typeof s?document.createTextNode(s):s),v(u,M.CLICK,this.handleClick_.bind(this,-n));var p=r+" "+fo+" "+go,c=this.element;c.className=p,c.appendChild(l),c.appendChild(u),this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap().getView();if(e){var i=e.getResolution();if(i){var r=e.constrainResolution(i,t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({resolution:r,duration:this.duration_,easing:Xn})):e.setResolution(r)}}},e}(uo);function wo(t){var e=t||{},i=new U;return(void 0===e.zoom||e.zoom)&&i.push(new Ro(e.zoomOptions)),(void 0===e.rotate||e.rotate)&&i.push(new Co(e.rotateOptions)),(void 0===e.attribution||e.attribution)&&i.push(new So(e.attributionOptions)),i}var Io={ACTIVE:"active"};function Lo(t,e,i,r){Oo(t,e=t.constrainRotation(e,0),i,r)}function Oo(t,e,i,r){if(void 0!==e){var n=t.getRotation(),o=t.getCenter();void 0!==n&&o&&r>0?t.animate({rotation:e,anchor:i,duration:r,easing:Xn}):t.rotate(e,i)}}function Po(t,e,i,r,n){Mo(t,e=t.constrainResolution(e,0,n),i,r)}function bo(t,e,i,r){var n=t.getResolution(),o=t.constrainResolution(n,e,0);if(void 0!==o){var s=t.getResolutions();o=kt(o,t.getMinResolution()||s[s.length-1],t.getMaxResolution()||s[0])}if(i&&void 0!==o&&o!==n){var a=t.getCenter(),h=t.calculateCenterZoom(o,i);h=t.constrainCenter(h),i=[(o*a[0]-n*h[0])/(o-n),(o*a[1]-n*h[1])/(o-n)]}Mo(t,o,i,r)}function Mo(t,e,i,r){if(e){var n=t.getResolution(),o=t.getCenter();if(void 0!==n&&o&&e!==n&&r)t.animate({resolution:e,anchor:i,duration:r,easing:Xn});else{if(i){var s=t.calculateCenterZoom(e,i);t.setCenter(s)}t.setResolution(e)}}}var Fo=function(t){function e(e){t.call(this),e.handleEvent&&(this.handleEvent=e.handleEvent),this.map_=null,this.setActive(!0)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getActive=function(){return this.get(Io.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Io.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(D);function Ao(t){var e=!1;if(t.type==Ar.DBLCLICK){var i=t.originalEvent,r=t.map,n=t.coordinate,o=i.shiftKey?-this.delta_:this.delta_;bo(r.getView(),o,n,this.duration_),t.preventDefault(),e=!0}return!e}var No=function(t){function e(e){t.call(this,{handleEvent:Ao});var i=e||{};this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fo),Go=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Do=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ko=function(t){return t.target.getTargetElement()===document.activeElement},jo=R,Uo=function(t){var e=t.originalEvent;return 0==e.button&&!(Ni&&Gi&&e.ctrlKey)},Yo=w,Bo=function(t){return"pointermove"==t.type},Vo=function(t){return t.type==Ar.SINGLECLICK},Xo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},zo=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Wo=function(t){var e=t.originalEvent.target.tagName;return"INPUT"!==e&&"SELECT"!==e&&"TEXTAREA"!==e},Ko=function(t){var e=t.pointerEvent;return Y(void 0!==e,56),"mouse"==e.pointerType},Ho=function(t){var e=t.pointerEvent;return Y(void 0!==e,56),e.isPrimary&&0===e.button};function Zo(t){for(var e=t.length,i=0,r=0,n=0;n<e;n++)i+=t[n].clientX,r+=t[n].clientY;return[i/e,r/e]}var qo=function(t){function e(e){var i=e||{};t.call(this,i),i.handleDownEvent&&(this.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(this.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(this.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(this.handleUpEvent=i.handleUpEvent),i.stopDown&&(this.stopDown=i.stopDown),this.handlingDownUpSequence=!1,this.trackedPointers_={},this.targetPointers=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.pointerEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==Ar.POINTERDRAG)this.handleDragEvent(t);else if(t.type==Ar.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==Ar.POINTERDOWN){var r=this.handleDownEvent(t);r&&t.preventDefault(),this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==Ar.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(function(t){var e=t.type;return e===Ar.POINTERDOWN||e===Ar.POINTERDRAG||e===Ar.POINTERUP}(t)){var e=t.pointerEvent,i=e.pointerId.toString();t.type==Ar.POINTERUP?delete this.trackedPointers_[i]:t.type==Ar.POINTERDOWN?this.trackedPointers_[i]=e:i in this.trackedPointers_&&(this.trackedPointers_[i]=e),this.targetPointers=c(this.trackedPointers_)}},e}(Fo),Jo=function(t){function e(e){t.call(this,{stopDown:w});var i=e||{};this.kinetic_=i.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1,this.condition_=i.condition?i.condition:Xo,this.noKinetic_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().setHint(jn,1));var e=this.targetPointers,i=Zo(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var r=this.lastCentroid[0]-i[0],n=i[1]-this.lastCentroid[1],o=t.map.getView(),s=[r,n];tr(s,o.getResolution()),$i(s,o.getRotation()),Hi(s,o.getCenter()),s=o.constrainCenter(s),o.setCenter(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=e.length},e.prototype.handleUpEvent=function(t){var e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var r=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),o=i.getCenter(),s=e.getPixelFromCoordinate(o),a=e.getCoordinateFromPixel([s[0]-r*Math.cos(n),s[1]-r*Math.sin(n)]);i.animate({center:i.constrainCenter(a),duration:500,easing:Xn})}return this.panning_&&(this.panning_=!1,i.setHint(jn,-1)),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.setCenter(t.frameState.viewState.center),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(qo),Qo=function(t){function e(e){var i=e||{};t.call(this,{stopDown:w}),this.condition_=i.condition?i.condition:Do,this.lastAngle_=void 0,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){if(Ko(t)){var e=t.map,i=e.getView();if(i.getConstraints().rotation!==Gn){var r=e.getSize(),n=t.pixel,o=Math.atan2(r[1]/2-n[1],n[0]-r[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;Oo(i,i.getRotation()-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){if(!Ko(t))return!0;var e=t.map.getView();return e.setHint(jn,-1),Lo(e,e.getRotation(),void 0,this.duration_),!1},e.prototype.handleDownEvent=function(t){return!!Ko(t)&&(!(!Uo(t)||!this.condition_(t))&&(t.map.getView().setHint(jn,1),this.lastAngle_=void 0,!0))},e}(qo),$o=function(t){function e(e){t.call(this),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.className="ol-box "+e,this.map_=null,this.startPixel_=null,this.endPixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,i=this.element_.style;i.left=Math.min(t[0],e[0])+"px",i.top=Math.min(t[1],e[1])+"px",i.width=Math.abs(e[0]-t[0])+"px",i.height=Math.abs(e[1]-t[1])+"px"},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left=e.top=e.width=e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixel,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Ii([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(C),ts="boxstart",es="boxdrag",is="boxend",rs=function(t){function e(e,i,r){t.call(this,e),this.coordinate=i,this.mapBrowserEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),ns=function(t){function e(e){t.call(this);var i=e||{};this.box_=new $o(i.className||"ol-dragbox"),this.minArea_=void 0!==i.minArea?i.minArea:64,this.onBoxEnd_=i.onBoxEnd?i.onBoxEnd:I,this.startPixel_=null,this.condition_=i.condition?i.condition:jo,this.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:this.defaultBoxEndCondition}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.defaultBoxEndCondition=function(t,e,i){var r=i[0]-e[0],n=i[1]-e[1];return r*r+n*n>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){Ko(t)&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new rs(es,t.coordinate,t)))},e.prototype.handleUpEvent=function(t){return!Ko(t)||(this.box_.setMap(null),this.boxEndCondition_(t,this.startPixel_,t.pixel)&&(this.onBoxEnd_(t),this.dispatchEvent(new rs(is,t.coordinate,t))),!1)},e.prototype.handleDownEvent=function(t){return!!Ko(t)&&(!(!Uo(t)||!this.condition_(t))&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new rs(ts,t.coordinate,t)),!0))},e}(qo);function os(){var t=this.getMap(),e=t.getView(),i=t.getSize(),r=this.getGeometry().getExtent();if(this.out_){var n=e.calculateExtent(i),o=function(t,e){return gt(ut(e),t)}([t.getPixelFromCoordinate(Et(r)),t.getPixelFromCoordinate(Lt(r))]);Mt(n,1/e.getResolutionForExtent(o,i)),r=n}var s=e.constrainResolution(e.getResolutionForExtent(r,i)),a=Tt(r);a=e.constrainCenter(a),e.animate({resolution:s,center:a,duration:this.duration_,easing:Xn})}var ss=function(t){function e(e){var i=e||{},r=i.condition?i.condition:zo;t.call(this,{condition:r,className:i.className||"ol-dragzoom",onBoxEnd:os}),this.duration_=void 0!==i.duration?i.duration:200,this.out_=void 0!==i.out&&i.out}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ns),as={LEFT:37,UP:38,RIGHT:39,DOWN:40};function hs(t){var e=!1;if(t.type==M.KEYDOWN){var i=t.originalEvent.keyCode;if(this.condition_(t)&&(i==as.DOWN||i==as.LEFT||i==as.RIGHT||i==as.UP)){var r=t.map.getView(),n=r.getResolution()*this.pixelDelta_,o=0,s=0;i==as.DOWN?s=-n:i==as.LEFT?o=-n:i==as.RIGHT?o=n:s=n;var a=[o,s];$i(a,r.getRotation()),function(t,e,i){var r=t.getCenter();if(r){var n=t.constrainCenter([r[0]+e[0],r[1]+e[1]]);i?t.animate({duration:i,easing:Wn,center:n}):t.setCenter(n)}}(r,a,this.duration_),t.preventDefault(),e=!0}}return!e}var ls=function(t){function e(e){t.call(this,{handleEvent:hs});var i=e||{};this.defaultCondition_=function(t){return Xo(t)&&Wo(t)},this.condition_=void 0!==i.condition?i.condition:this.defaultCondition_,this.duration_=void 0!==i.duration?i.duration:100,this.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fo);function us(t){var e=!1;if(t.type==M.KEYDOWN||t.type==M.KEYPRESS){var i=t.originalEvent.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var r=t.map,n=i=="+".charCodeAt(0)?this.delta_:-this.delta_;bo(r.getView(),n,void 0,this.duration_),t.preventDefault(),e=!0}}return!e}var ps=function(t){function e(e){t.call(this,{handleEvent:us});var i=e||{};this.condition_=i.condition?i.condition:Wo,this.delta_=i.delta?i.delta:1,this.duration_=void 0!==i.duration?i.duration:100}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Fo),cs="trackpad",ds="wheel",fs=function(t){function e(e){var i=e||{};t.call(this,i),this.delta_=0,this.duration_=void 0!==i.duration?i.duration:250,this.timeout_=void 0!==i.timeout?i.timeout:80,this.useAnchor_=void 0===i.useAnchor||i.useAnchor,this.constrainResolution_=i.constrainResolution||!1,this.condition_=i.condition?i.condition:jo,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.trackpadDeltaPerZoom_=300,this.trackpadZoomBuffer_=1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.decrementInteractingHint_=function(){this.trackpadTimeoutId_=void 0,this.getMap().getView().setHint(jn,-1)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=t.type;if(e!==M.WHEEL&&e!==M.MOUSEWHEEL)return!0;t.preventDefault();var i,r=t.map,n=t.originalEvent;if(this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==M.WHEEL?(i=n.deltaY,Fi&&n.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=Di),n.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)):t.type==M.MOUSEWHEEL&&(i=-n.wheelDeltaY,Ai&&(i/=3)),0===i)return!1;var o=Date.now();if(void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(i)<4?cs:ds),this.mode_===cs){var s=r.getView();this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):s.setHint(jn,1),this.trackpadTimeoutId_=setTimeout(this.decrementInteractingHint_.bind(this),this.trackpadEventGap_);var a=s.getResolution()*Math.pow(2,i/this.trackpadDeltaPerZoom_),h=s.getMinResolution(),l=s.getMaxResolution(),u=0;if(a<h?(a=Math.max(a,h/this.trackpadZoomBuffer_),u=1):a>l&&(a=Math.min(a,l*this.trackpadZoomBuffer_),u=-1),this.lastAnchor_){var p=s.calculateCenterZoom(a,this.lastAnchor_);s.setCenter(s.constrainCenter(p))}return s.setResolution(a),0===u&&this.constrainResolution_&&s.animate({resolution:s.constrainResolution(a,i>0?-1:1),easing:Xn,anchor:this.lastAnchor_,duration:this.duration_}),u>0?s.animate({resolution:h,easing:Xn,anchor:this.lastAnchor_,duration:500}):u<0&&s.animate({resolution:l,easing:Xn,anchor:this.lastAnchor_,duration:500}),this.startTime_=o,!1}this.delta_+=i;var c=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),c),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();bo(e,-kt(this.delta_,-1,1),this.lastAnchor_,this.duration_),this.mode_=void 0,this.delta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Fo),_s=function(t){function e(e){var i=e||{},r=i;r.stopDown||(r.stopDown=w),t.call(this,r),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==i.threshold?i.threshold:.3,this.duration_=void 0!==i.duration?i.duration:250}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=0,i=this.targetPointers[0],r=this.targetPointers[1],n=Math.atan2(r.clientY-i.clientY,r.clientX-i.clientX);if(void 0!==this.lastAngle_){var o=n-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=n;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==Gn){var h=s.getViewport().getBoundingClientRect(),l=Zo(this.targetPointers);if(l[0]-=h.left,l[1]-=h.top,this.anchor_=s.getCoordinateFromPixel(l),this.rotating_){var u=a.getRotation();s.render(),Oo(a,u+e,this.anchor_)}}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();if(e.setHint(jn,-1),this.rotating_)Lo(e,e.getRotation(),this.anchor_,this.duration_);return!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().setHint(jn,1),!0}return!1},e}(qo),gs=function(t){function e(e){var i=e||{},r=i;r.stopDown||(r.stopDown=w),t.call(this,r),this.constrainResolution_=i.constrainResolution||!1,this.anchor_=null,this.duration_=void 0!==i.duration?i.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){var e=1,i=this.targetPointers[0],r=this.targetPointers[1],n=i.clientX-r.clientX,o=i.clientY-r.clientY,s=Math.sqrt(n*n+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,h=a.getView(),l=h.getResolution(),u=h.getMaxResolution(),p=h.getMinResolution(),c=l*e;c>u?(e=u/l,c=u):c<p&&(e=p/l,c=p),1!=e&&(this.lastScaleDelta_=e);var d=a.getViewport().getBoundingClientRect(),f=Zo(this.targetPointers);f[0]-=d.left,f[1]-=d.top,this.anchor_=a.getCoordinateFromPixel(f),a.render(),Mo(h,c,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map.getView();e.setHint(jn,-1);var i=e.getResolution();if(this.constrainResolution_||i<e.getMinResolution()||i>e.getMaxResolution()){var r=this.lastScaleDelta_-1;Po(e,i,this.anchor_,this.duration_,r)}return!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().setHint(jn,1),!0}return!1},e}(qo);function ys(t){var e=t||{},i=new U,r=new br(-.005,.05,100);return(void 0===e.altShiftDragRotate||e.altShiftDragRotate)&&i.push(new Qo),(void 0===e.doubleClickZoom||e.doubleClickZoom)&&i.push(new No({delta:e.zoomDelta,duration:e.zoomDuration})),(void 0===e.dragPan||e.dragPan)&&i.push(new Jo({condition:e.onFocusOnly?ko:void 0,kinetic:r})),(void 0===e.pinchRotate||e.pinchRotate)&&i.push(new _s),(void 0===e.pinchZoom||e.pinchZoom)&&i.push(new gs({constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.keyboard||e.keyboard)&&(i.push(new ls),i.push(new ps({delta:e.zoomDelta,duration:e.zoomDuration}))),(void 0===e.mouseWheelZoom||e.mouseWheelZoom)&&i.push(new fs({condition:e.onFocusOnly?ko:void 0,constrainResolution:e.constrainResolution,duration:e.zoomDuration})),(void 0===e.shiftDragZoom||e.shiftDragZoom)&&i.push(new ss({duration:e.zoomDuration})),i}var vs=.5,ms=function(t){function e(e,i,r,n){t.call(this),this.extent=e,this.pixelRatio_=r,this.resolution=i,this.state=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(M.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return r()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){r()},e}(b),xs={IDLE:0,LOADING:1,LOADED:2,ERROR:3},Es=function(t){function e(e,i,r,n,o){var s=void 0!==o?xs.IDLE:xs.LOADED;t.call(this,e,i,r,s),this.loader_=void 0!==o?o:null,this.canvas_=n,this.error_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getError=function(){return this.error_},e.prototype.handleLoad_=function(t){t?(this.error_=t,this.state=xs.ERROR):this.state=xs.LOADED,this.changed()},e.prototype.load=function(){this.state==xs.IDLE&&(this.state=xs.LOADING,this.changed(),this.loader_(this.handleLoad_.bind(this)))},e.prototype.getImage=function(){return this.canvas_},e}(ms),Ss={IMAGE:"IMAGE",TILE:"TILE",VECTOR_TILE:"VECTOR_TILE",VECTOR:"VECTOR"},Ts={IMAGE:"image",VECTOR:"vector"},Cs=function(t){function e(e,i,r,n,o){t.call(this,e),this.vectorContext=i,this.frameState=r,this.context=n,this.glContext=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),Rs=function(t){function e(e){t.call(this),this.highWaterMark=void 0!==e?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.getCount()>this.highWaterMark},e.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null,this.dispatchEvent(M.CLEAR)},e.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},e.prototype.forEach=function(t,e){for(var i=this.oldest_;i;)t.call(e,i.value_,i.key_,this),i=i.newer},e.prototype.get=function(t){var e=this.entries_[t];return Y(void 0!==e,15),e===this.newest_?e.value_:(e===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.newest_,this.newest_.newer=e,this.newest_=e,e.value_)},e.prototype.remove=function(t){var e=this.entries_[t];return Y(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},e.prototype.getCount=function(){return this.count_},e.prototype.getKeys=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.key_;return e},e.prototype.getValues=function(){var t,e=new Array(this.count_),i=0;for(t=this.newest_;t;t=t.older)e[i++]=t.value_;return e},e.prototype.peekLast=function(){return this.oldest_.value_},e.prototype.peekLastKey=function(){return this.oldest_.key_},e.prototype.peekFirstKey=function(){return this.newest_.key_},e.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},e.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},e.prototype.set=function(t,e){Y(!(t in this.entries_),16);var i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_},e.prototype.setSize=function(t){this.highWaterMark=t},e.prototype.prune=function(){for(;this.canExpireCache();)this.pop()},e}(b),ws=[0,0,0,1],Is=[],Ls=[0,0,0,1],Os=[0,0,0,0],Ps=new Rs,bs={},Ms=null,Fs={},As=function(){var t,e,i=60,r=bs,n="32px ",o=["monospace","serif"],s=o.length,a="wmytzilWMYTZIL@#/&?$%10";function h(t){for(var i=Ns(),r=100;r<=700;r+=300){for(var h=r+" ",l=!0,u=0;u<s;++u){var p=o[u];if(i.font=h+n+p,e=i.measureText(a).width,t!=p){i.font=h+n+t+","+p;var c=i.measureText(a).width;l=l&&c!=e}}if(l)return!0}return!1}function l(){var e=!0;for(var n in r)r[n]<i&&(h(n)?(r[n]=i,p(Fs),Ms=null,Ps.clear()):(++r[n],e=!1));e&&(clearInterval(t),t=void 0)}return function(e){var n=vo(e);if(n)for(var o=0,s=n.length;o<s;++o){var a=n[o];a in r||(r[a]=i,h(a)||(r[a]=0,void 0===t&&(t=setInterval(l,32))))}}}();function Ns(){return Ms||(Ms=Jn(1,1)),Ms}var Gs=function(){var t,e=Fs;return function(i){var r=e[i];return void 0==r&&(t||((t=document.createElement("span")).textContent="M",t.style.margin=t.style.padding="0 !important",t.style.position="absolute !important",t.style.left="-99999px !important"),t.style.font=i,document.body.appendChild(t),r=e[i]=t.offsetHeight,document.body.removeChild(t)),r}}();function Ds(t,e){var i=Ns();return t!=i.font&&(i.font=t),i.measureText(e).width}function ks(t,e,i,r){0!==e&&(t.translate(i,r),t.rotate(e),t.translate(-i,-r))}var js=[1,0,0,1,0,0];function Us(t,e,i,r,n,o,s,a,h,l,u){var p;1!=i&&(p=t.globalAlpha,t.globalAlpha=p*i),e&&t.setTransform.apply(t,e),t.drawImage(r,n,o,s,a,h,l,s*u,a*u),p&&(t.globalAlpha=p),e&&t.setTransform.apply(t,js)}function Ys(t){return Array.isArray(t)?yr(t):t}var Bs=function(){};Bs.prototype.drawCustom=function(t,e,i){},Bs.prototype.drawGeometry=function(t){},Bs.prototype.setStyle=function(t){},Bs.prototype.drawCircle=function(t,e){},Bs.prototype.drawFeature=function(t,e){},Bs.prototype.drawGeometryCollection=function(t,e){},Bs.prototype.drawLineString=function(t,e){},Bs.prototype.drawMultiLineString=function(t,e){},Bs.prototype.drawMultiPoint=function(t,e){},Bs.prototype.drawMultiPolygon=function(t,e){},Bs.prototype.drawPoint=function(t,e){},Bs.prototype.drawPolygon=function(t,e){},Bs.prototype.drawText=function(t,e){},Bs.prototype.setFillStrokeStyle=function(t,e){},Bs.prototype.setImageStyle=function(t,e){},Bs.prototype.setTextStyle=function(t,e){};var Vs=Bs,Xs=function(t){function e(e,i,r,n,o){t.call(this),this.context_=e,this.pixelRatio_=i,this.extent_=r,this.transform_=n,this.viewRotation_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=0,this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=0,this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawImages_=function(t,e,i,r){if(this.image_){var n=Gt(t,e,i,2,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.tmpLocalTransform_,a=o.globalAlpha;1!=this.imageOpacity_&&(o.globalAlpha=a*this.imageOpacity_);var h=this.imageRotation_;this.imageRotateWithView_&&(h+=this.viewRotation_);for(var l=0,u=n.length;l<u;l+=2){var p=n[l]-this.imageAnchorX_,c=n[l+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_){var d=p+this.imageAnchorX_,f=c+this.imageAnchorY_;Ye(s,d,f,this.imageScale_,this.imageScale_,h,-d,-f),o.setTransform.apply(o,s)}o.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,p,c,this.imageWidth_,this.imageHeight_)}0===h&&1==this.imageScale_||o.setTransform(1,0,0,1,0,0),1!=this.imageOpacity_&&(o.globalAlpha=a)}},e.prototype.drawText_=function(t,e,i,r){if(this.textState_&&""!==this.text_){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var n=Gt(t,e,i,r,this.transform_,this.pixelCoordinates_),o=this.context_,s=this.textRotation_;for(this.textRotateWithView_&&(s+=this.viewRotation_);e<i;e+=r){var a=n[e]+this.textOffsetX_,h=n[e+1]+this.textOffsetY_;if(0!==s||1!=this.textScale_){var l=Ye(this.tmpLocalTransform_,a,h,this.textScale_,this.textScale_,s,-a,-h);o.setTransform.apply(o,l)}this.textStrokeState_&&o.strokeText(this.text_,a,h),this.textFillState_&&o.fillText(this.text_,a,h)}0===s&&1==this.textScale_||o.setTransform(1,0,0,1,0,0)}},e.prototype.moveToLineTo_=function(t,e,i,r,n){var o=this.context_,s=Gt(t,e,i,r,this.transform_,this.pixelCoordinates_);o.moveTo(s[0],s[1]);var a=s.length;n&&(a-=2);for(var h=2;h<a;h+=2)o.lineTo(s[h],s[h+1]);return n&&o.closePath(),i},e.prototype.drawRings_=function(t,e,i,r){for(var n=0,o=i.length;n<o;++n)e=this.moveToLineTo_(t,e,i[n],r,!0);return e},e.prototype.drawCircle=function(t){if(Pt(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=function(t,e,i){var r=t.getFlatCoordinates();if(r){var n=t.getStride();return Gt(r,0,r.length,n,e,i)}return null}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],r=e[3]-e[1],n=Math.sqrt(i*i+r*r),o=this.context_;o.beginPath(),o.arc(e[0],e[1],n,0,2*Math.PI),this.fillState_&&o.fill(),this.strokeState_&&o.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.drawGeometry=function(t){switch(t.getType()){case Nt.POINT:this.drawPoint(t);break;case Nt.LINE_STRING:this.drawLineString(t);break;case Nt.POLYGON:this.drawPolygon(t);break;case Nt.MULTI_POINT:this.drawMultiPoint(t);break;case Nt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case Nt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case Nt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case Nt.CIRCLE:this.drawCircle(t)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&Pt(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var e=t.getGeometriesArray(),i=0,r=e.length;i<r;++i)this.drawGeometry(e[i])},e.prototype.drawPoint=function(t){var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawMultiPoint=function(t){var e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)},e.prototype.drawLineString=function(t){if(Pt(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),e.stroke()}if(""!==this.text_){var r=t.getFlatMidpoint();this.drawText_(r,0,2,2)}}},e.prototype.drawMultiLineString=function(t){var e=t.getExtent();if(Pt(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,r=t.getFlatCoordinates(),n=0,o=t.getEnds(),s=t.getStride();i.beginPath();for(var a=0,h=o.length;a<h;++a)n=this.moveToLineTo_(r,n,o[a],s,!1);i.stroke()}if(""!==this.text_){var l=t.getFlatMidpoints();this.drawText_(l,0,l.length,2)}}},e.prototype.drawPolygon=function(t){if(Pt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(Pt(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var e=this.context_,i=t.getOrientedFlatCoordinates(),r=0,n=t.getEndss(),o=t.getStride();e.beginPath();for(var s=0,a=n.length;s<a;++s){var h=n[s];r=this.drawRings_(i,r,h,o)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){var l=t.getFlatInteriorPoints();this.drawText_(l,0,l.length,2)}}},e.prototype.setContextFillState_=function(t){var e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=e.lineCap=t.lineCap),ki&&(Z(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=e.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,ki&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var e=this.context_,i=this.contextTextState_,r=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=e.font=t.font),i.textAlign!=r&&(i.textAlign=e.textAlign=r),i.textBaseline!=t.textBaseline&&(i.textBaseline=e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=r,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:r,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,e){if(t){var i=t.getColor();this.fillState_={fillStyle:Ys(i||ws)}}else this.fillState_=null;if(e){var r=e.getColor(),n=e.getLineCap(),o=e.getLineDash(),s=e.getLineDashOffset(),a=e.getLineJoin(),h=e.getWidth(),l=e.getMiterLimit();this.strokeState_={lineCap:void 0!==n?n:"round",lineDash:o||Is,lineDashOffset:s||0,lineJoin:void 0!==a?a:"round",lineWidth:this.pixelRatio_*(void 0!==h?h:1),miterLimit:void 0!==l?l:10,strokeStyle:Ys(r||Ls)}}else this.strokeState_=null},e.prototype.setImageStyle=function(t){if(t){var e=t.getAnchor(),i=t.getImage(1),r=t.getOrigin(),n=t.getSize();this.imageAnchorX_=e[0],this.imageAnchorY_=e[1],this.imageHeight_=n[1],this.image_=i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=r[0],this.imageOriginY_=r[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScale()*this.pixelRatio_,this.imageWidth_=n[0]}else this.image_=null},e.prototype.setTextStyle=function(t){if(t){var e=t.getFill();if(e){var i=e.getColor();this.textFillState_={fillStyle:Ys(i||ws)}}else this.textFillState_=null;var r=t.getStroke();if(r){var n=r.getColor(),o=r.getLineCap(),s=r.getLineDash(),a=r.getLineDashOffset(),h=r.getLineJoin(),l=r.getWidth(),u=r.getMiterLimit();this.textStrokeState_={lineCap:void 0!==o?o:"round",lineDash:s||Is,lineDashOffset:a||0,lineJoin:void 0!==h?h:"round",lineWidth:void 0!==l?l:1,miterLimit:void 0!==u?u:10,strokeStyle:Ys(n||Ls)}}else this.textStrokeState_=null;var p=t.getFont(),c=t.getOffsetX(),d=t.getOffsetY(),f=t.getRotateWithView(),_=t.getRotation(),g=t.getScale(),y=t.getText(),v=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:void 0!==p?p:"10px sans-serif",textAlign:void 0!==v?v:"center",textBaseline:void 0!==m?m:"middle"},this.text_=void 0!==y?y:"",this.textOffsetX_=void 0!==c?this.pixelRatio_*c:0,this.textOffsetY_=void 0!==d?this.pixelRatio_*d:0,this.textRotateWithView_=void 0!==f&&f,this.textRotation_=void 0!==_?_:0,this.textScale_=this.pixelRatio_*(void 0!==g?g:1)}else this.text_=""},e}(Vs),zs=function(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32};function Ws(t,e,i){return e+":"+t+":"+(i?dr(i):"null")}zs.prototype.clear=function(){this.cache_={},this.cacheSize_=0},zs.prototype.expire=function(){if(this.cacheSize_>this.maxCacheSize_){var t=0;for(var e in this.cache_){var i=this.cache_[e];0!=(3&t++)||i.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},zs.prototype.get=function(t,e,i){var r=Ws(t,e,i);return r in this.cache_?this.cache_[r]:null},zs.prototype.set=function(t,e,i,r){var n=Ws(t,e,i);this.cache_[n]=r,++this.cacheSize_},zs.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()};var Ks=new zs;function Hs(t,e){Ks.expire()}function Zs(t,e){return t.zIndex-e.zIndex}var qs=function(t){function e(e){t.call(this),this.map_=e,this.layerRenderers_={},this.layerRendererListeners_={},this.layerRendererConstructors_=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){r()},e.prototype.registerLayerRenderers=function(t){this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_,t)},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,i=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Ye(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Be(Ge(r,i))},e.prototype.removeLayerRenderers=function(){for(var t in this.layerRenderers_)this.removeLayerRendererByKey_(t).dispose()},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n,s,a){var h,l=e.viewState,u=l.resolution;function p(t,i){var s=e.layerStates[o(i)].managed;if(!(o(t)in e.skippedFeatureUids)||s)return r.call(n,t,s?i:null)}var c=l.projection,d=t;if(c.canWrapX()){var f=c.getExtent(),_=Ot(f),g=t[0];if(g<f[0]||g>f[2])d=[g+_*Math.ceil((f[0]-g)/_),t[1]]}var y,v=e.layerStatesArray;for(y=v.length-1;y>=0;--y){var m=v[y],x=m.layer;if(mo(m,u)&&s.call(a,x)){var E=this.getLayerRenderer(x),S=x.getSource();if(S&&(h=E.forEachFeatureAtCoordinate(S.getWrapX()?d:t,e,i,p)),h)return h}}},e.prototype.forEachLayerAtPixel=function(t,e,i,n,o,s,a){return r()},e.prototype.hasFeatureAtCoordinate=function(t,e,i,r,n){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,R,this,r,n)},e.prototype.getLayerRenderer=function(t){var e=o(t);if(e in this.layerRenderers_)return this.layerRenderers_[e];for(var i,r=0,n=this.layerRendererConstructors_.length;r<n;++r){var s=this.layerRendererConstructors_[r];if(s.handles(t)){i=s.create(this,t);break}}if(!i)throw new Error("Unable to create renderer for layer: "+t.getType());return this.layerRenderers_[e]=i,this.layerRendererListeners_[e]=v(i,M.CHANGE,this.handleLayerRendererChange_,this),i},e.prototype.getLayerRendererByKey=function(t){return this.layerRenderers_[t]},e.prototype.getLayerRenderers=function(){return this.layerRenderers_},e.prototype.getMap=function(){return this.map_},e.prototype.handleLayerRendererChange_=function(){this.map_.render()},e.prototype.removeLayerRendererByKey_=function(t){var e=this.layerRenderers_[t];return delete this.layerRenderers_[t],E(this.layerRendererListeners_[t]),delete this.layerRendererListeners_[t],e},e.prototype.removeUnusedLayerRenderers_=function(t,e){for(var i in this.layerRenderers_)e&&i in e.layerStates||this.removeLayerRendererByKey_(i).dispose()},e.prototype.renderFrame=function(t){r()},e.prototype.scheduleExpireIconCache=function(t){t.postRenderFunctions.push(Hs)},e.prototype.scheduleRemoveUnusedLayerRenderers=function(t){for(var e in this.layerRenderers_)if(!(e in t.layerStates))return void t.postRenderFunctions.push(this.removeUnusedLayerRenderers_.bind(this))},e}(C),Js=[],Qs=function(t){function e(e){t.call(this,e);var i=e.getViewport();this.context_=Jn(),this.canvas_=this.context_.canvas,this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=fo,i.insertBefore(this.canvas_,i.childNodes[0]||null),this.renderedVisible_=!0,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap(),r=this.context_;if(i.hasListener(t)){var n=e.extent,o=e.pixelRatio,s=e.viewState.rotation,a=this.getTransform(e),h=new Xs(r,o,n,a,s),l=new Cs(t,h,e,r,null);i.dispatchEvent(l)}},e.prototype.getTransform=function(t){var e=t.viewState,i=this.canvas_.width/2,r=this.canvas_.height/2,n=t.pixelRatio/e.resolution,o=-n,s=-e.rotation,a=-e.center[0],h=-e.center[1];return Ye(this.transform_,i,r,n,o,s,a,h)},e.prototype.renderFrame=function(t){if(t){var e=this.context_,i=t.pixelRatio,r=Math.round(t.size[0]*i),n=Math.round(t.size[1]*i);this.canvas_.width!=r||this.canvas_.height!=n?(this.canvas_.width=r,this.canvas_.height=n):e.clearRect(0,0,r,n);var o=t.viewState.rotation;this.calculateMatrices2D(t),this.dispatchRenderEvent(ur.PRECOMPOSE,t);var s=t.layerStatesArray;q(s,Zs),o&&(e.save(),ks(e,o,r/2,n/2));var a,h,l=t.viewState.resolution;for(a=0,h=s.length;a<h;++a){var u=s[a],p=u.layer,c=this.getLayerRenderer(p);mo(u,l)&&u.sourceState==ro.READY&&(c.prepareFrame(t,u)&&c.composeFrame(t,u,e))}o&&e.restore(),this.dispatchRenderEvent(ur.POSTCOMPOSE,t),this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0),this.scheduleRemoveUnusedLayerRenderers(t),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,i,r,n,o,s){var a,h,l=e.viewState.resolution,u=e.layerStatesArray,p=u.length,c=De(e.pixelToCoordinateTransform,t.slice());for(h=p-1;h>=0;--h){var d=u[h],f=d.layer;if(mo(d,l)&&o.call(s,f))if(a=this.getLayerRenderer(f).forEachLayerAtCoordinate(c,e,i,r,n))return a}},e.prototype.registerLayerRenderers=function(e){t.prototype.registerLayerRenderers.call(this,e);for(var i=0,r=e.length;i<r;++i){var n=e[i];X(Js,n)||Js.push(n)}},e}(qs),$s=function(t){function e(e){t.call(this),this.layer_=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createLoadedTileFinder=function(t,e,i){return function(r,n){return t.forEachLoadedTile(e,r,n,function(t){i[r]||(i[r]={}),i[r][t.tileCoord.toString()]=t})}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r){},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleImageChange_=function(t){t.target.getState()===xs.LOADED&&this.renderIfReadyAndVisible()},e.prototype.hasFeatureAtCoordinate=function(t,e){return!1},e.prototype.loadImage=function(t){var e=t.getState();return e!=xs.LOADED&&e!=xs.ERROR&&v(t,M.CHANGE,this.handleImageChange_,this),e==xs.IDLE&&(t.load(),e=t.getState()),e==xs.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==ro.READY&&this.changed()},e.prototype.scheduleExpireCache=function(t,e){if(e.canExpireCache()){var i=function(t,e,i){var r=o(t);r in i.usedTiles&&t.expireCache(i.viewState.projection,i.usedTiles[r])}.bind(null,e);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,e,i,r){var n=o(e),s=i.toString();n in t?s in t[n]?t[n][s].extend(r):t[n][s]=r:(t[n]={},t[n][s]=r)},e.prototype.manageTilePyramid=function(t,e,i,r,n,s,a,h,l,u){var p=o(e);p in t.wantedTiles||(t.wantedTiles[p]={});var c,d,f,_,g,y,v=t.wantedTiles[p],m=t.tileQueue;for(y=i.getMinZoom();y<=a;++y)for(d=i.getTileRangeForExtentAndZ(s,y,d),f=i.getResolution(y),_=d.minX;_<=d.maxX;++_)for(g=d.minY;g<=d.maxY;++g)a-y<=h?((c=e.getTile(y,_,g,r,n)).getState()==On.IDLE&&(v[c.getKey()]=!0,m.isKeyQueued(c.getKey())||m.enqueue([c,p,i.getTileCoordCenter(c.tileCoord),f])),void 0!==l&&l.call(u,c)):e.useTile(y,_,g,n)},e}(F),ta=function(t){function e(e){t.call(this,e),this.renderedResolution,this.transform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clip=function(t,e,i){var r=e.pixelRatio,n=e.size[0]*r,o=e.size[1]*r,s=e.viewState.rotation,a=It(i),h=Lt(i),l=St(i),u=Et(i);De(e.coordinateToPixelTransform,a),De(e.coordinateToPixelTransform,h),De(e.coordinateToPixelTransform,l),De(e.coordinateToPixelTransform,u),t.save(),ks(t,-s,n/2,o/2),t.beginPath(),t.moveTo(a[0]*r,a[1]*r),t.lineTo(h[0]*r,h[1]*r),t.lineTo(l[0]*r,l[1]*r),t.lineTo(u[0]*r,u[1]*r),t.clip(),ks(t,s,n/2,o/2)},e.prototype.dispatchComposeEvent_=function(t,e,i,r){var n=this.getLayer();if(n.hasListener(t)){var o=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,a=i.viewState.rotation;ks(e,-a,o/2,s/2);var h=void 0!==r?r:this.getTransform(i,0),l=new Xs(e,i.pixelRatio,i.extent,h,i.viewState.rotation),u=new Cs(t,l,i,e,null);n.dispatchEvent(u),ks(e,a,o/2,s/2)}},e.prototype.forEachLayerAtCoordinate=function(t,e,i,r,n){return this.forEachFeatureAtCoordinate(t,e,i,R)?r.call(n,this.getLayer(),null):void 0},e.prototype.postCompose=function(t,e,i,r){this.dispatchComposeEvent_(ur.POSTCOMPOSE,t,e,r)},e.prototype.preCompose=function(t,e,i){this.dispatchComposeEvent_(ur.PRECOMPOSE,t,e,i)},e.prototype.dispatchRenderEvent=function(t,e,i){this.dispatchComposeEvent_(ur.RENDER,t,e,i)},e.prototype.getTransform=function(t,e){var i=t.viewState,r=t.pixelRatio,n=r*t.size[0]/2,o=r*t.size[1]/2,s=r/i.resolution,a=-s,h=-i.rotation,l=-i.center[0]+e,u=-i.center[1];return Ye(this.transform_,n,o,s,a,h,l,u)},e.prototype.composeFrame=function(t,e,i){r()},e.prototype.prepareFrame=function(t,e){return r()},e}($s),ea=function(t){function e(e){t.call(this,e),this.coordinateToCanvasPixelTransform=[1,0,0,1,0,0],this.hitCanvasContext_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.composeFrame=function(t,e,i){this.preCompose(i,t);var r=this.getImage();if(r){var n=e.extent,o=void 0!==n&&!ot(n,t.extent)&&Pt(n,t.extent);o&&this.clip(i,t,n);var s=this.getImageTransform(),a=i.globalAlpha;i.globalAlpha=e.opacity;var h=s[4],l=s[5],u=r.width*s[0],p=r.height*s[3];u>=.5&&p>=.5&&i.drawImage(r,0,0,+r.width,+r.height,Math.round(h),Math.round(l),Math.round(u),Math.round(p)),i.globalAlpha=a,o&&i.restore()}this.postCompose(i,t,e)},e.prototype.getImage=function(){return r()},e.prototype.getImageTransform=function(){return r()},e.prototype.forEachLayerAtCoordinate=function(t,e,i,r,n){if(this.getImage()){var o=De(this.coordinateToCanvasPixelTransform,t.slice());tr(o,e.viewState.resolution/this.renderedResolution),this.hitCanvasContext_||(this.hitCanvasContext_=Jn(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.getImage(),o[0],o[1],1,1,0,0,1,1);var s=this.hitCanvasContext_.getImageData(0,0,1,1).data;return s[3]>0?r.call(n,this.getLayer(),s):void 0}},e}(ta),ia=function(t){function e(i){if(t.call(this,i),this.image_=null,this.imageTransform_=[1,0,0,1,0,0],this.skippedFeatures_=[],this.vectorRenderer_=null,i.getType()===Ss.VECTOR)for(var r=0,n=Js.length;r<n;++r){var o=Js[r];if(o!==e&&o.handles(i)){this.vectorRenderer_=new o(i);break}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.vectorRenderer_&&this.vectorRenderer_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.prepareFrame=function(t,e){var i,r=t.pixelRatio,n=t.size,o=t.viewState,s=o.center,a=o.resolution,h=this.getLayer().getSource(),l=t.viewHints,p=this.vectorRenderer_,c=t.extent;if(p||void 0===e.extent||(c=wt(c,e.extent)),!l[kn]&&!l[jn]&&!bt(c)){var d=o.projection,f=this.skippedFeatures_;if(p){var _=p.context,g=u({},t,{size:[Ot(c)/a,Rt(c)/a],viewState:u({},t.viewState,{rotation:0})}),y=Object.keys(g.skippedFeatureUids).sort();i=new Es(c,a,r,_.canvas,function(t){!p.prepareFrame(g,e)||!p.replayGroupChanged&&Z(f,y)||(_.canvas.width=g.size[0]*r,_.canvas.height=g.size[1]*r,p.compose(_,g,e),f=y,t())})}else i=h.getImage(c,a,r,d);i&&this.loadImage(i)&&(this.image_=i,this.skippedFeatures_=f)}if(this.image_){var v=(i=this.image_).getExtent(),m=i.getResolution(),x=i.getPixelRatio(),E=r*m/(a*x),S=Ye(this.imageTransform_,r*n[0]/2,r*n[1]/2,E,E,0,x*(v[0]-s[0])/m,x*(s[1]-v[3])/m);Ye(this.coordinateToCanvasPixelTransform,r*n[0]/2-S[4],r*n[1]/2-S[5],r/a,-r/a,0,-s[0],-s[1]),this.renderedResolution=m*r/x}return!!this.image_},e.prototype.forEachFeatureAtCoordinate=function(e,i,r,n){return this.vectorRenderer_?this.vectorRenderer_.forEachFeatureAtCoordinate(e,i,r,n):t.prototype.forEachFeatureAtCoordinate.call(this,e,i,r,n)},e}(ea);ia.handles=function(t){return t.getType()===Ss.IMAGE||t.getType()===Ss.VECTOR&&t.getRenderMode()===Ts.IMAGE},ia.create=function(t,e){return new ia(e)};var ra=ia,na=function(t,e,i,r){this.minX=t,this.maxX=e,this.minY=i,this.maxY=r};function oa(t,e,i,r,n){return void 0!==n?(n.minX=t,n.maxX=e,n.minY=i,n.maxY=r,n):new na(t,e,i,r)}na.prototype.contains=function(t){return this.containsXY(t[1],t[2])},na.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},na.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},na.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},na.prototype.extend=function(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)},na.prototype.getHeight=function(){return this.maxY-this.minY+1},na.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},na.prototype.getWidth=function(){return this.maxX-this.minX+1},na.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY};var sa=na,aa=function(t){function e(e,i){t.call(this,e),this.context=i?null:Jn(),this.oversampling_,this.renderedExtent_=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=[1/0,1/0,-1/0,-1/0],this.tmpTileRange_=new sa(0,0,0,0),this.imageTransform_=[1,0,0,1,0,0],this.zDirection=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isDrawableTile_=function(t){var e=this.getLayer(),i=t.getState(),r=e.getUseInterimTilesOnError();return i==On.LOADED||i==On.EMPTY||i==On.ERROR&&!r},e.prototype.getTile=function(t,e,i,r,n){var o=this.getLayer(),s=o.getSource().getTile(t,e,i,r,n);return s.getState()==On.ERROR&&(o.getUseInterimTilesOnError()?o.getPreload()>0&&(this.newTiles_=!0):s.setState(On.LOADED)),this.isDrawableTile_(s)||(s=s.getInterimTile()),s},e.prototype.prepareFrame=function(t,e){var i=t.pixelRatio,r=t.size,n=t.viewState,s=n.projection,a=n.resolution,h=n.center,l=this.getLayer(),u=l.getSource(),p=u.getRevision(),c=u.getTileGridForProjection(s),d=c.getZForResolution(a,this.zDirection),f=c.getResolution(d),_=Math.round(a/f)||1,g=t.extent;if(void 0!==e.extent&&(g=wt(g,e.extent)),bt(g))return!1;var y=c.getTileRangeForExtentAndZ(g,d),v=c.getTileRangeExtent(d,y),m=u.getTilePixelRatio(i),x={};x[d]={};var E,S,T,C=this.createLoadedTileFinder(u,s,x),R=t.viewHints,w=R[kn]||R[jn],I=this.tmpExtent,L=this.tmpTileRange_;for(this.newTiles_=!1,S=y.minX;S<=y.maxX;++S)for(T=y.minY;T<=y.maxY;++T)if(!(Date.now()-t.time>16&&w)){if(E=this.getTile(d,S,T,i,s),this.isDrawableTile_(E)){var O=o(this);if(E.getState()==On.LOADED){x[d][E.tileCoord.toString()]=E;var P=E.inTransition(O);this.newTiles_||!P&&-1!==this.renderedTiles.indexOf(E)||(this.newTiles_=!0)}if(1===E.getAlpha(O,t.time))continue}var b=c.getTileCoordChildTileRange(E.tileCoord,L,I),M=!1;b&&(M=C(d+1,b)),M||c.forEachTileCoordParentTileRange(E.tileCoord,C,null,L,I)}var F=f*i/m*_;if(!(this.renderedResolution&&Date.now()-t.time>16&&w)&&(this.newTiles_||!this.renderedExtent_||!ot(this.renderedExtent_,g)||this.renderedRevision!=p||_!=this.oversampling_||!w&&F!=this.renderedResolution)){var A=this.context;if(A){var N=u.getTilePixelSize(d,i,s),G=Math.round(y.getWidth()*N[0]/_),D=Math.round(y.getHeight()*N[1]/_),k=A.canvas;k.width!=G||k.height!=D?(this.oversampling_=_,k.width=G,k.height=D):((this.renderedExtent_&&!dt(v,this.renderedExtent_)||this.renderedRevision!=p)&&A.clearRect(0,0,G,D),_=this.oversampling_)}this.renderedTiles.length=0;var j,U,Y,B,V,X,z,W,K,H,Z=Object.keys(x).map(Number);for(Z.sort(function(t,e){return t===d?1:e===d?-1:t>e?1:t<e?-1:0}),B=0,V=Z.length;B<V;++B)for(var q in Y=Z[B],U=u.getTilePixelSize(Y,i,s),j=c.getResolution(Y)/f,z=m*u.getGutterForProjection(s),W=x[Y])E=W[q],S=((X=c.getTileCoordExtent(E.getTileCoord(),I))[0]-v[0])/f*m/_,T=(v[3]-X[3])/f*m/_,K=U[0]*j/_,H=U[1]*j/_,this.drawTileImage(E,t,e,S,T,K,H,z,d===Y),this.renderedTiles.push(E);this.renderedRevision=p,this.renderedResolution=f*i/m*_,this.renderedExtent_=v}var J=this.renderedResolution/a,Q=Ye(this.imageTransform_,i*r[0]/2,i*r[1]/2,J,J,0,(this.renderedExtent_[0]-h[0])/this.renderedResolution*i,(h[1]-this.renderedExtent_[3])/this.renderedResolution*i);return Ye(this.coordinateToCanvasPixelTransform,i*r[0]/2-Q[4],i*r[1]/2-Q[5],i/a,-i/a,0,-h[0],-h[1]),this.updateUsedTiles(t.usedTiles,u,d,y),this.manageTilePyramid(t,u,c,i,s,g,d,l.getPreload()),this.scheduleExpireCache(t,u),this.renderedTiles.length>0},e.prototype.drawTileImage=function(t,e,i,r,n,s,a,h,l){var u=this.getTileImage(t);if(u){var p=o(this),c=l?t.getAlpha(p,e.time):1,d=this.getLayer().getSource();1!==c||d.getOpaque(e.viewState.projection)||this.context.clearRect(r,n,s,a);var f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(u,h,h,u.width-2*h,u.height-2*h,r,n,s,a),f&&this.context.restore(),1!==c?e.animate=!0:l&&t.endTransition(p)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getImageTransform=function(){return this.imageTransform_},e.prototype.getTileImage=function(t){return t.getImage()},e}(ea);aa.handles=function(t){return t.getType()===Ss.TILE},aa.create=function(t,e){return new aa(e)},aa.prototype.getLayer;var ha=aa,la=i(0),ua=i.n(la),pa=function(){};pa.prototype.getReplay=function(t,e){return r()},pa.prototype.isEmpty=function(){return r()},pa.prototype.addDeclutter=function(t){return r()};var ca=pa,da={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function fa(t,e,i,r,n,o,s,a){for(var h,l,u,p=[],c=t[e]>t[i-r],d=n.length,f=t[e],_=t[e+1],g=t[e+=r],y=t[e+1],v=0,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(y-_,2)),x="",E=0,S=0;S<d;++S){l=c?d-S-1:S;var T=n.charAt(l),C=o(x=c?T+x:x+T)-E;E+=C;for(var R=s+C/2;e<i-r&&v+m<R;)f=g,_=y,g=t[e+=r],y=t[e+1],v+=m,m=Math.sqrt(Math.pow(g-f,2)+Math.pow(y-_,2));var w=R-v,I=Math.atan2(y-_,g-f);if(c&&(I+=I>0?-Math.PI:Math.PI),void 0!==u){var L=I-u;if(L+=L>Math.PI?-2*Math.PI:L<-Math.PI?2*Math.PI:0,Math.abs(L)>a)return null}var O=w/m,P=zt(f,g,O),b=zt(_,y,O);u==I?(c&&(h[0]=P,h[1]=b,h[2]=C/2),h[4]=x):(E=C,h=[P,b,C/2,I,x=T],c?p.unshift(h):p.push(h),u=I),s+=C}return p}var _a={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},ga=[_a.FILL],ya=[_a.STROKE],va=[_a.BEGIN_PATH],ma=[_a.CLOSE_PATH],xa=_a,Ea=[da.POLYGON,da.CIRCLE,da.LINE_STRING,da.IMAGE,da.TEXT,da.DEFAULT],Sa={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},Ta=[1/0,1/0,-1/0,-1/0],Ca=[1,0,0,1,0,0],Ra=function(t){function e(e,i,r,n,o,s){t.call(this),this.declutterTree=s,this.tolerance=e,this.maxExtent=i,this.overlaps=o,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=r,this.alignFill_,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.coordinateCache_={},this.renderedTransform_=[1,0,0,1,0,0],this.hitDetectionInstructions=[],this.pixelCoordinates_=null,this.state={},this.viewRotation_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.replayTextBackground_=function(t,e,i,r,n,o,s){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,r),t.lineTo.apply(t,n),t.lineTo.apply(t,e),o&&(this.alignFill_=o[2],this.fill_(t)),s&&(this.setStrokeStyle_(t,s),t.stroke())},e.prototype.replayImage_=function(t,e,i,r,n,o,s,a,h,l,u,p,c,d,f,_,g,y){var v=g||y;e-=n*=c,i-=o*=c;var m,x,E,S,T=f+l>r.width?r.width-l:f,C=a+u>r.height?r.height-u:a,R=_[3]+T*c+_[1],w=_[0]+C*c+_[2],I=e-_[3],L=i-_[0];(v||0!==p)&&(m=[I,L],x=[I+R,L],E=[I+R,L+w],S=[I,L+w]);var O=null;if(0!==p){var P=e+n,b=i+o;O=Ye(Ca,P,b,1,1,p,-P,-b),ut(Ta),_t(Ta,De(Ca,m)),_t(Ta,De(Ca,x)),_t(Ta,De(Ca,E)),_t(Ta,De(Ca,S))}else lt(I,L,I+R,L+w,Ta);var M=t.canvas,F=y?y[2]*c/2:0,A=Ta[0]-F<=M.width&&Ta[2]+F>=0&&Ta[1]-F<=M.height&&Ta[3]+F>=0;if(d&&(e=Math.round(e),i=Math.round(i)),s){if(!A&&1==s[4])return;ft(s,Ta);var N=A?[t,O?O.slice(0):null,h,r,l,u,T,C,e,i,c]:null;N&&v&&N.push(g,y,m,x,E,S),s.push(N)}else A&&(v&&this.replayTextBackground_(t,m,x,E,S,g,y),Us(t,O,h,r,l,u,T,C,e,i,c))},e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})},e.prototype.appendFlatCoordinates=function(t,e,i,r,n,o){var s=this.coordinates.length,a=this.getBufferedMaxExtent();o&&(e+=r);var h,l,u,p=[t[e],t[e+1]],c=[NaN,NaN],d=!0;for(h=e+r;h<i;h+=r)c[0]=t[h],c[1]=t[h+1],(u=at(a,c))!==l?(d&&(this.coordinates[s++]=p[0],this.coordinates[s++]=p[1]),this.coordinates[s++]=c[0],this.coordinates[s++]=c[1],d=!1):u===$.INTERSECTING?(this.coordinates[s++]=c[0],this.coordinates[s++]=c[1],d=!1):d=!0,p[0]=c[0],p[1]=c[1],l=u;return(n&&d||h===e+r)&&(this.coordinates[s++]=p[0],this.coordinates[s++]=p[1]),s},e.prototype.drawCustomCoordinates_=function(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o){var a=i[o],h=this.appendFlatCoordinates(t,e,a,r,!1,!1);n.push(h),e=a}return e},e.prototype.drawCustom=function(t,e,i){this.beginGeometry(t,e);var r,n,o,s,a,h=t.getType(),l=t.getStride(),u=this.coordinates.length;if(h==Nt.MULTI_POLYGON){r=(t=t).getOrientedFlatCoordinates(),s=[];var p=t.getEndss();a=0;for(var c=0,d=p.length;c<d;++c){var f=[];a=this.drawCustomCoordinates_(r,a,p[c],l,f),s.push(f)}this.instructions.push([xa.CUSTOM,u,s,t,i,oi])}else h==Nt.POLYGON||h==Nt.MULTI_LINE_STRING?(o=[],r=h==Nt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),a=this.drawCustomCoordinates_(r,0,t.getEnds(),l,o),this.instructions.push([xa.CUSTOM,u,o,t,i,ni])):h==Nt.LINE_STRING||h==Nt.MULTI_POINT?(r=t.getFlatCoordinates(),n=this.appendFlatCoordinates(r,0,r.length,l,!1,!1),this.instructions.push([xa.CUSTOM,u,n,t,i,ri])):h==Nt.POINT&&(r=t.getFlatCoordinates(),this.coordinates.push(r[0],r[1]),n=this.coordinates.length,this.instructions.push([xa.CUSTOM,u,n,t,i]));this.endGeometry(t,e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[xa.BEGIN_GEOMETRY,e,0],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[xa.BEGIN_GEOMETRY,e,0],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){},e.prototype.fill_=function(t){if(this.alignFill_){var e=De(this.renderedTransform_,[0,0]),i=512*this.pixelRatio;t.translate(e[0]%i,e[1]%i),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.setTransform.apply(t,js)},e.prototype.setStrokeStyle_=function(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],ki&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},e.prototype.renderDeclutter_=function(t,e){if(t&&t.length>5){var i=t[4];if(1==i||i==t.length-5){var r={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};if(!this.declutterTree.collides(r)){this.declutterTree.insert(r);for(var n=5,o=t.length;n<o;++n){var s=t[n];s&&(s.length>11&&this.replayTextBackground_(s[0],s[13],s[14],s[15],s[16],s[11],s[12]),Us.apply(void 0,s))}}t.length=5,ut(t)}}},e.prototype.replay_=function(t,e,i,r,n,s,a){var h;this.pixelCoordinates_&&Z(e,this.renderedTransform_)?h=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),h=Gt(this.coordinates,0,this.coordinates.length,2,e,this.pixelCoordinates_),Ge(this.renderedTransform_,e));for(var l,u,p,c,f,_,g,y,v,m,x,E,S=!d(i),T=0,C=r.length,R=0,w=0,I=0,L=null,O=null,P=this.coordinateCache_,b=this.viewRotation_,M={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:b},F=this.instructions!=r||this.overlaps?0:200;T<C;){var A=r[T];switch(A[0]){case xa.BEGIN_GEOMETRY:m=A[1],S&&i[o(m)]||!m.getGeometry()?T=A[2]:void 0===a||Pt(a,m.getGeometry().getExtent())?++T:T=A[2]+1;break;case xa.BEGIN_PATH:w>F&&(this.fill_(t),w=0),I>F&&(t.stroke(),I=0),w||I||(t.beginPath(),c=f=NaN),++T;break;case xa.CIRCLE:var N=h[R=A[1]],G=h[R+1],D=h[R+2]-N,k=h[R+3]-G,j=Math.sqrt(D*D+k*k);t.moveTo(N+j,G),t.arc(N,G,j,0,2*Math.PI,!0),++T;break;case xa.CLOSE_PATH:t.closePath(),++T;break;case xa.CUSTOM:R=A[1],l=A[2];var U=A[3],Y=A[4],B=6==A.length?A[5]:void 0;M.geometry=U,M.feature=m,T in P||(P[T]=[]);var V=P[T];B?B(h,R,l,2,V):(V[0]=h[R],V[1]=h[R+1],V.length=2),Y(V,M),++T;break;case xa.DRAW_IMAGE:R=A[1],l=A[2],v=A[3],u=A[4],p=A[5],y=s?null:A[6];var X=A[7],z=A[8],W=A[9],K=A[10],H=A[11],q=A[12],J=A[13],Q=A[14],$=void 0,tt=void 0,et=void 0;for(A.length>16?($=A[15],tt=A[16],et=A[17]):($=Os,tt=et=!1),H&&(q+=b);R<l;R+=2)this.replayImage_(t,h[R],h[R+1],v,u,p,y,X,z,W,K,q,J,n,Q,$,tt?L:null,et?O:null);this.renderDeclutter_(y,m),++T;break;case xa.DRAW_CHARS:var it=A[1],rt=A[2],nt=A[3];y=s?null:A[4];var ot=A[5],st=A[6],at=A[7],ht=A[8],lt=A[9],ut=A[10],pt=A[11],ct=A[12],dt=A[13],ft=A[14],_t=ar(h,it,rt,2),gt=ht(ct);if(ot||gt<=_t){var yt=this.textStates[dt].textAlign,vt=fa(h,it,rt,2,ct,ht,(_t-gt)*Sa[yt],at);if(vt){var mt=void 0,xt=void 0,Et=void 0,St=void 0,Tt=void 0;if(ut)for(mt=0,xt=vt.length;mt<xt;++mt)Et=(Tt=vt[mt])[4],St=this.getImage(Et,dt,"",ut),u=Tt[2]+pt,p=nt*St.height+2*(.5-nt)*pt-lt,this.replayImage_(t,Tt[0],Tt[1],St,u,p,y,St.height,1,0,0,Tt[3],ft,!1,St.width,Os,null,null);if(st)for(mt=0,xt=vt.length;mt<xt;++mt)Et=(Tt=vt[mt])[4],St=this.getImage(Et,dt,st,""),u=Tt[2],p=nt*St.height-lt,this.replayImage_(t,Tt[0],Tt[1],St,u,p,y,St.height,1,0,0,Tt[3],ft,!1,St.width,Os,null,null)}}this.renderDeclutter_(y,m),++T;break;case xa.END_GEOMETRY:if(void 0!==s){var Ct=s(m=A[1]);if(Ct)return Ct}++T;break;case xa.FILL:F?w++:this.fill_(t),++T;break;case xa.MOVE_TO_LINE_TO:for(R=A[1],l=A[2],x=h[R],g=(E=h[R+1])+.5|0,(_=x+.5|0)===c&&g===f||(t.moveTo(x,E),c=_,f=g),R+=2;R<l;R+=2)_=(x=h[R])+.5|0,g=(E=h[R+1])+.5|0,R!=l-2&&_===c&&g===f||(t.lineTo(x,E),c=_,f=g);++T;break;case xa.SET_FILL_STYLE:L=A,this.alignFill_=A[2],w&&(this.fill_(t),w=0,I&&(t.stroke(),I=0)),t.fillStyle=A[1],++T;break;case xa.SET_STROKE_STYLE:O=A,I&&(t.stroke(),I=0),this.setStrokeStyle_(t,A),++T;break;case xa.STROKE:F?I++:t.stroke(),++T;break;default:++T}}w&&this.fill_(t),I&&t.stroke()},e.prototype.replay=function(t,e,i,r,n){this.viewRotation_=i,this.replay_(t,e,r,this.instructions,n,void 0,void 0)},e.prototype.replayHitDetection=function(t,e,i,r,n,o){return this.viewRotation_=i,this.replay_(t,e,r,this.hitDetectionInstructions,!0,n,o)},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var i,r,n=e.length,o=-1;for(t=0;t<n;++t)(r=(i=e[t])[0])==xa.END_GEOMETRY?o=t:r==xa.BEGIN_GEOMETRY&&(i[2]=t,W(this.hitDetectionInstructions,o,t),o=-1)},e.prototype.setFillStrokeStyle=function(t,e){var i=this.state;if(t){var r=t.getColor();i.fillStyle=Ys(r||ws)}else i.fillStyle=void 0;if(e){var n=e.getColor();i.strokeStyle=Ys(n||Ls);var o=e.getLineCap();i.lineCap=void 0!==o?o:"round";var s=e.getLineDash();i.lineDash=s?s.slice():Is;var a=e.getLineDashOffset();i.lineDashOffset=a||0;var h=e.getLineJoin();i.lineJoin=void 0!==h?h:"round";var l=e.getWidth();i.lineWidth=void 0!==l?l:1;var u=e.getMiterLimit();i.miterLimit=void 0!==u?u:10,i.lineWidth>this.maxLineWidth&&(this.maxLineWidth=i.lineWidth,this.bufferedMaxExtent_=null)}else i.strokeStyle=void 0,i.lineCap=void 0,i.lineDash=null,i.lineDashOffset=void 0,i.lineJoin=void 0,i.lineWidth=void 0,i.miterLimit=void 0},e.prototype.createFill=function(t,e){var i=t.fillStyle,r=[xa.SET_FILL_STYLE,i];return"string"!=typeof i&&r.push(!0),r},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[xa.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e,i){var r=t.fillStyle;"string"==typeof r&&t.currentFillStyle==r||(void 0!==r&&this.instructions.push(e.call(this,t,i)),t.currentFillStyle=r)},e.prototype.updateStrokeStyle=function(t,e){var i=t.strokeStyle,r=t.lineCap,n=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,h=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=r||n!=t.currentLineDash&&!Z(t.currentLineDash,n)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=h)&&(void 0!==i&&e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=r,t.currentLineDash=n,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=h)},e.prototype.endGeometry=function(t,e){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var i=[xa.END_GEOMETRY,e];this.instructions.push(i),this.hitDetectionInstructions.push(i)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=it(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;et(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(Vs),wa=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,r,n,o,s),this.declutterGroup_=null,this.hitDetectionImage_=null,this.image_=null,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,i,r){return this.appendFlatCoordinates(t,e,i,r,!1,!1)},e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),r=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,r);this.instructions.push([xa.DRAW_IMAGE,n,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([xa.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var i=t.getFlatCoordinates(),r=t.getStride(),n=this.coordinates.length,o=this.drawCoordinates_(i,0,i.length,r);this.instructions.push([xa.DRAW_IMAGE,n,o,this.image_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_*this.pixelRatio,this.width_]),this.hitDetectionInstructions.push([xa.DRAW_IMAGE,n,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.declutterGroup_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_]),this.endGeometry(t,e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0},e.prototype.setImageStyle=function(t,e){var i=t.getAnchor(),r=t.getSize(),n=t.getHitDetectionImage(1),o=t.getImage(1),s=t.getOrigin();this.anchorX_=i[0],this.anchorY_=i[1],this.declutterGroup_=e,this.hitDetectionImage_=n,this.image_=o,this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScale(),this.width_=r[0]},e}(Ra),Ia=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,r,n,o,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinates_=function(t,e,i,r){var n=this.coordinates.length,o=this.appendFlatCoordinates(t,e,i,r,!1,!1),s=[xa.MOVE_TO_LINE_TO,n,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),i},e.prototype.drawLineString=function(t,e){var i=this.state,r=i.strokeStyle,n=i.lineWidth;if(void 0!==r&&void 0!==n){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([xa.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],va);var o=t.getFlatCoordinates(),s=t.getStride();this.drawFlatCoordinates_(o,0,o.length,s),this.hitDetectionInstructions.push(ya),this.endGeometry(t,e)}},e.prototype.drawMultiLineString=function(t,e){var i=this.state,r=i.strokeStyle,n=i.lineWidth;if(void 0!==r&&void 0!==n){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([xa.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],va);for(var o=t.getEnds(),s=t.getFlatCoordinates(),a=t.getStride(),h=0,l=0,u=o.length;l<u;++l)h=this.drawFlatCoordinates_(s,h,o[l],a);this.hitDetectionInstructions.push(ya),this.endGeometry(t,e)}},e.prototype.finish=function(){var t=this.state;void 0!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(ya),this.reverseHitDetectionInstructions(),this.state=null},e.prototype.applyStroke=function(e){void 0!=e.lastStroke&&e.lastStroke!=this.coordinates.length&&(this.instructions.push(ya),e.lastStroke=this.coordinates.length),e.lastStroke=0,t.prototype.applyStroke.call(this,e),this.instructions.push(va)},e}(Ra),La=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,r,n,o,s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawFlatCoordinatess_=function(t,e,i,r){var n=this.state,o=void 0!==n.fillStyle,s=void 0!=n.strokeStyle,a=i.length;this.instructions.push(va),this.hitDetectionInstructions.push(va);for(var h=0;h<a;++h){var l=i[h],u=this.coordinates.length,p=this.appendFlatCoordinates(t,e,l,r,!0,!s),c=[xa.MOVE_TO_LINE_TO,u,p];this.instructions.push(c),this.hitDetectionInstructions.push(c),s&&(this.instructions.push(ma),this.hitDetectionInstructions.push(ma)),e=l}return o&&(this.instructions.push(ga),this.hitDetectionInstructions.push(ga)),s&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),e},e.prototype.drawCircle=function(t,e){var i=this.state,r=i.fillStyle,n=i.strokeStyle;if(void 0!==r||void 0!==n){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([xa.SET_FILL_STYLE,dr(ws)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xa.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getFlatCoordinates(),s=t.getStride(),a=this.coordinates.length;this.appendFlatCoordinates(o,0,o.length,s,!1,!1);var h=[xa.CIRCLE,a];this.instructions.push(va,h),this.hitDetectionInstructions.push(va,h),this.hitDetectionInstructions.push(ga),void 0!==i.fillStyle&&this.instructions.push(ga),void 0!==i.strokeStyle&&(this.instructions.push(ya),this.hitDetectionInstructions.push(ya)),this.endGeometry(t,e)}},e.prototype.drawPolygon=function(t,e){var i=this.state,r=i.fillStyle,n=i.strokeStyle;if(void 0!==r||void 0!==n){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([xa.SET_FILL_STYLE,dr(ws)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xa.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var o=t.getEnds(),s=t.getOrientedFlatCoordinates(),a=t.getStride();this.drawFlatCoordinatess_(s,0,o,a),this.endGeometry(t,e)}},e.prototype.drawMultiPolygon=function(t,e){var i=this.state,r=i.fillStyle,n=i.strokeStyle;if(void 0!==r||void 0!==n){this.setFillStrokeStyles_(t),this.beginGeometry(t,e),void 0!==i.fillStyle&&this.hitDetectionInstructions.push([xa.SET_FILL_STYLE,dr(ws)]),void 0!==i.strokeStyle&&this.hitDetectionInstructions.push([xa.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var o=t.getEndss(),s=t.getOrientedFlatCoordinates(),a=t.getStride(),h=0,l=0,u=o.length;l<u;++l)h=this.drawFlatCoordinatess_(s,h,o[l],a);this.endGeometry(t,e)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(0!==t)for(var e=this.coordinates,i=0,r=e.length;i<r;++i)e[i]=hi(e[i],t)},e.prototype.setFillStrokeStyles_=function(t){var e=this.state;void 0!==e.fillStyle&&this.updateFillStyle(e,this.createFill,t),void 0!==e.strokeStyle&&this.updateStrokeStyle(e,this.applyStroke)},e}(Ra);function Oa(t,e,i,r,n){var o,s,a,h,l,u,p,c,d,f=i,_=i,g=0,y=0,v=i;for(o=i;o<r;o+=n){var m=e[o],x=e[o+1];void 0!==h&&(c=m-h,d=x-l,a=Math.sqrt(c*c+d*d),void 0!==u&&(y+=s,Math.acos((u*c+p*d)/(s*a))>t&&(y>g&&(g=y,f=v,_=o),y=0,v=o-n)),s=a,u=c,p=d),h=m,l=x}return(y+=a)>g?[v,o]:[f,_]}var Pa={Circle:La,Default:Ra,Image:wa,LineString:Ia,Polygon:La,Text:function(t){function e(e,i,r,n,o,s){t.call(this,e,i,r,n,o,s),this.declutterGroup_,this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.widths_={},Ps.prune()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText=function(t,e){var i=this.textFillState_,r=this.textStrokeState_,n=this.textState_;if(""!==this.text_&&n&&(i||r)){var o,s,a=this.coordinates.length,h=t.getType(),l=null,u=2,p=2;if(n.placement===Tr){if(!Pt(this.getBufferedMaxExtent(),t.getExtent()))return;var c;if(l=t.getFlatCoordinates(),p=t.getStride(),h==Nt.LINE_STRING)c=[l.length];else if(h==Nt.MULTI_LINE_STRING)c=t.getEnds();else if(h==Nt.POLYGON)c=t.getEnds().slice(0,1);else if(h==Nt.MULTI_POLYGON){var d=t.getEndss();for(c=[],o=0,s=d.length;o<s;++o)c.push(d[o][0])}this.beginGeometry(t,e);for(var f,_=n.textAlign,g=0,y=0,v=c.length;y<v;++y){if(void 0==_){var m=Oa(n.maxAngle,l,g,c[y],p);g=m[0],f=m[1]}else f=c[y];for(o=g;o<f;o+=p)this.coordinates.push(l[o],l[o+1]);u=this.coordinates.length,g=c[y],this.drawChars_(a,u,this.declutterGroup_),a=u}this.endGeometry(t,e)}else{var x=this.getImage(this.text_,this.textKey_,this.fillKey_,this.strokeKey_),E=x.width/this.pixelRatio;switch(h){case Nt.POINT:case Nt.MULTI_POINT:u=(l=t.getFlatCoordinates()).length;break;case Nt.LINE_STRING:l=t.getFlatMidpoint();break;case Nt.CIRCLE:l=t.getCenter();break;case Nt.MULTI_LINE_STRING:u=(l=t.getFlatMidpoints()).length;break;case Nt.POLYGON:if(l=t.getFlatInteriorPoint(),!n.overflow&&l[2]/this.resolution<E)return;p=3;break;case Nt.MULTI_POLYGON:var S=t.getFlatInteriorPoints();for(l=[],o=0,s=S.length;o<s;o+=3)(n.overflow||S[o+2]/this.resolution>=E)&&l.push(S[o],S[o+1]);if(0==(u=l.length))return}u=this.appendFlatCoordinates(l,0,u,p,!1,!1),(n.backgroundFill||n.backgroundStroke)&&(this.setFillStrokeStyle(n.backgroundFill,n.backgroundStroke),n.backgroundFill&&(this.updateFillStyle(this.state,this.createFill,t),this.hitDetectionInstructions.push(this.createFill(this.state,t))),n.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e),this.drawTextImage_(x,a,u),this.endGeometry(t,e)}}},e.prototype.getImage=function(t,e,i,r){var n,o=r+e+t+i+this.pixelRatio;if(!Ps.containsKey(o)){var s=r?this.strokeStates[r]||this.textStrokeState_:null,a=i?this.fillStates[i]||this.textFillState_:null,h=this.textStates[e]||this.textState_,l=this.pixelRatio,u=h.scale*l,p=Sa[h.textAlign||"center"],c=r&&s.lineWidth?s.lineWidth:0,d=t.split("\n"),f=d.length,_=[],g=function(t,e,i){for(var r=e.length,n=0,o=0;o<r;++o){var s=Ds(t,e[o]);n=Math.max(n,s),i.push(s)}return n}(h.font,d,_),y=Gs(h.font),v=y*f,m=g+c,x=Jn(Math.ceil(m*u),Math.ceil((v+c)*u));n=x.canvas,Ps.set(o,n),1!=u&&x.scale(u,u),x.font=h.font,r&&(x.strokeStyle=s.strokeStyle,x.lineWidth=c,x.lineCap=s.lineCap,x.lineJoin=s.lineJoin,x.miterLimit=s.miterLimit,ki&&s.lineDash.length&&(x.setLineDash(s.lineDash),x.lineDashOffset=s.lineDashOffset)),i&&(x.fillStyle=a.fillStyle),x.textBaseline="middle",x.textAlign="center";var E,S=.5-p,T=p*n.width/u+S*c;if(r)for(E=0;E<f;++E)x.strokeText(d[E],T+S*_[E],.5*(c+y)+E*y);if(i)for(E=0;E<f;++E)x.fillText(d[E],T+S*_[E],.5*(c+y)+E*y)}return Ps.get(o)},e.prototype.drawTextImage_=function(t,e,i){var r=this.textState_,n=this.textStrokeState_,o=this.pixelRatio,s=Sa[r.textAlign||"center"],a=Sa[r.textBaseline],h=n&&n.lineWidth?n.lineWidth:0,l=s*t.width/o+2*(.5-s)*h,u=a*t.height/o+2*(.5-a)*h;this.instructions.push([xa.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*o,(u-this.textOffsetY_)*o,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1,t.width,r.padding==Os?Os:r.padding.map(function(t){return t*o}),!!r.backgroundFill,!!r.backgroundStroke]),this.hitDetectionInstructions.push([xa.DRAW_IMAGE,e,i,t,(l-this.textOffsetX_)*o,(u-this.textOffsetY_)*o,this.declutterGroup_,t.height,1,0,0,this.textRotateWithView_,this.textRotation_,1/o,t.width,r.padding,!!r.backgroundFill,!!r.backgroundStroke])},e.prototype.drawChars_=function(t,e,i){var r=this.textStrokeState_,n=this.textState_,o=this.textFillState_,s=this.strokeKey_;r&&(s in this.strokeStates||(this.strokeStates[s]={strokeStyle:r.strokeStyle,lineCap:r.lineCap,lineDashOffset:r.lineDashOffset,lineWidth:r.lineWidth,lineJoin:r.lineJoin,miterLimit:r.miterLimit,lineDash:r.lineDash}));var a=this.textKey_;this.textKey_ in this.textStates||(this.textStates[this.textKey_]={font:n.font,textAlign:n.textAlign||"center",scale:n.scale});var h=this.fillKey_;o&&(h in this.fillStates||(this.fillStates[h]={fillStyle:o.fillStyle}));var l=this.pixelRatio,u=Sa[n.textBaseline],p=this.textOffsetY_*l,c=this.text_,d=n.font,f=n.scale,_=r?r.lineWidth*f/2:0,g=this.widths_[d];g||(this.widths_[d]=g={}),this.instructions.push([xa.DRAW_CHARS,t,e,u,i,n.overflow,h,n.maxAngle,function(t){var e=g[t];return e||(e=g[t]=Ds(d,t)),e*f*l},p,s,_*l,c,a,1]),this.hitDetectionInstructions.push([xa.DRAW_CHARS,t,e,u,i,n.overflow,h,n.maxAngle,function(t){var e=g[t];return e||(e=g[t]=Ds(d,t)),e*f},p,s,_,c,a,1/l])},e.prototype.setTextStyle=function(t,e){var i,r,n;if(t){this.declutterGroup_=e;var s=t.getFill();s?((r=this.textFillState_)||(r=this.textFillState_={}),r.fillStyle=Ys(s.getColor()||ws)):r=this.textFillState_=null;var a=t.getStroke();if(a){(n=this.textStrokeState_)||(n=this.textStrokeState_={});var h=a.getLineDash(),l=a.getLineDashOffset(),u=a.getWidth(),p=a.getMiterLimit();n.lineCap=a.getLineCap()||"round",n.lineDash=h?h.slice():Is,n.lineDashOffset=void 0===l?0:l,n.lineJoin=a.getLineJoin()||"round",n.lineWidth=void 0===u?1:u,n.miterLimit=void 0===p?10:p,n.strokeStyle=Ys(a.getColor()||Ls)}else n=this.textStrokeState_=null;i=this.textState_;var c=t.getFont()||"10px sans-serif";As(c);var d=t.getScale();i.overflow=t.getOverflow(),i.font=c,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Os,i.scale=void 0===d?1:d;var f=t.getOffsetX(),_=t.getOffsetY(),g=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===f?0:f,this.textOffsetY_=void 0===_?0:_,this.textRotateWithView_=void 0!==g&&g,this.textRotation_=void 0===y?0:y,this.strokeKey_=n?("string"==typeof n.strokeStyle?n.strokeStyle:o(n.strokeStyle))+n.lineCap+n.lineDashOffset+"|"+n.lineWidth+n.lineJoin+n.miterLimit+"["+n.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?"),this.fillKey_=r?"string"==typeof r.fillStyle?r.fillStyle:"|"+o(r.fillStyle):""}else this.text_=""},e}(Ra)},ba=function(t){function e(e,i,r,n,o,s,a){t.call(this),this.declutterTree_=s,this.declutterGroup_=null,this.tolerance_=e,this.maxExtent_=i,this.overlaps_=o,this.pixelRatio_=n,this.resolution_=r,this.renderBuffer_=a,this.replaysByZIndex_={},this.hitDetectionContext_=Jn(1,1),this.hitDetectionTransform_=[1,0,0,1,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addDeclutter=function(t){var e=null;return this.declutterTree_&&(t?(e=this.declutterGroup_)[4]++:(e=this.declutterGroup_=[1/0,1/0,-1/0,-1/0]).push(1)),e},e.prototype.clip=function(t,e){var i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()},e.prototype.hasReplays=function(t){for(var e in this.replaysByZIndex_)for(var i=this.replaysByZIndex_[e],r=0,n=t.length;r<n;++r)if(t[r]in i)return!0;return!1},e.prototype.finish=function(){for(var t in this.replaysByZIndex_){var e=this.replaysByZIndex_[t];for(var i in e)e[i].finish()}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n,o,s){var a,h=2*(r=Math.round(r))+1,l=Ye(this.hitDetectionTransform_,r+.5,r+.5,1/e,-1/e,-i,-t[0],-t[1]),u=this.hitDetectionContext_;u.canvas.width!==h||u.canvas.height!==h?(u.canvas.width=h,u.canvas.height=h):u.clearRect(0,0,h,h),void 0!==this.renderBuffer_&&(_t(a=[1/0,1/0,-1/0,-1/0],t),et(a,e*(this.renderBuffer_+r),a));var p,c,d=function(t){if(void 0!==Ma[t])return Ma[t];for(var e=2*t+1,i=new Array(e),r=0;r<e;r++)i[r]=new Array(e);var n=t,o=0,s=0;for(;n>=o;)Fa(i,t+n,t+o),Fa(i,t+o,t+n),Fa(i,t-o,t+n),Fa(i,t-n,t+o),Fa(i,t-n,t-o),Fa(i,t-o,t-n),Fa(i,t+o,t-n),Fa(i,t+n,t-o),2*((s+=1+2*++o)-n)+1>0&&(s+=1-2*(n-=1));return Ma[t]=i,i}(r);function f(t){for(var e=u.getImageData(0,0,h,h).data,i=0;i<h;i++)for(var r=0;r<h;r++)if(d[i][r]&&e[4*(r*h+i)+3]>0){var n=void 0;return(!p||c!=da.IMAGE&&c!=da.TEXT||-1!==p.indexOf(t))&&(n=o(t)),n||void u.clearRect(0,0,h,h)}}this.declutterTree_&&(p=this.declutterTree_.all().map(function(t){return t.value}));var _,g,y,v,m,x=Object.keys(this.replaysByZIndex_).map(Number);for(x.sort(V),_=x.length-1;_>=0;--_){var E=x[_].toString();for(y=this.replaysByZIndex_[E],g=Ea.length-1;g>=0;--g)if(void 0!==(v=y[c=Ea[g]]))if(!s||c!=da.IMAGE&&c!=da.TEXT){if(m=v.replayHitDetection(u,l,i,n,f,a))return m}else{var S=s[E];S?S.push(v,l.slice(0)):s[E]=[v,l.slice(0)]}}},e.prototype.getClipCoords=function(t){var e=this.maxExtent_,i=e[0],r=e[1],n=e[2],o=e[3],s=[i,r,i,o,n,o,n,r];return Gt(s,0,8,2,t,s),s},e.prototype.getReplay=function(t,e){var i=void 0!==t?t.toString():"0",r=this.replaysByZIndex_[i];void 0===r&&(r={},this.replaysByZIndex_[i]=r);var n=r[e];void 0===n&&(n=new(0,Pa[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_,this.overlaps_,this.declutterTree_),r[e]=n);return n},e.prototype.getReplays=function(){return this.replaysByZIndex_},e.prototype.isEmpty=function(){return d(this.replaysByZIndex_)},e.prototype.replay=function(t,e,i,r,n,o,s){var a=Object.keys(this.replaysByZIndex_).map(Number);a.sort(V),t.save(),this.clip(t,e);var h,l,u,p,c,d,f=o||Ea;for(h=0,l=a.length;h<l;++h){var _=a[h].toString();for(c=this.replaysByZIndex_[_],u=0,p=f.length;u<p;++u){var g=f[u];if(d=c[g],void 0!==d)if(!s||g!=da.IMAGE&&g!=da.TEXT)d.replay(t,e,i,r,n);else{var y=s[_];y?y.push(d,e.slice(0)):s[_]=[d,e.slice(0)]}}}t.restore()},e}(ca),Ma={0:[[!0]]};function Fa(t,e,i){var r,n=Math.floor(t.length/2);if(e>=n)for(r=n;r<e;r++)t[r][i]=!0;else if(e<n)for(r=e+1;r<n;r++)t[r][i]=!0}var Aa=ba,Na=.5,Ga={Point:function(t,e,i,r){var n=i.getImage();if(n){if(n.getImageState()!=xs.LOADED)return;var o=t.getReplay(i.getZIndex(),da.IMAGE);o.setImageStyle(n,t.addDeclutter(!1)),o.drawPoint(e,r)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),da.TEXT);a.setTextStyle(s,t.addDeclutter(!!n)),a.drawText(e,r)}},LineString:function(t,e,i,r){var n=i.getStroke();if(n){var o=t.getReplay(i.getZIndex(),da.LINE_STRING);o.setFillStrokeStyle(null,n),o.drawLineString(e,r)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),da.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,r)}},Polygon:function(t,e,i,r){var n=i.getFill(),o=i.getStroke();if(n||o){var s=t.getReplay(i.getZIndex(),da.POLYGON);s.setFillStrokeStyle(n,o),s.drawPolygon(e,r)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),da.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,r)}},MultiPoint:function(t,e,i,r){var n=i.getImage();if(n){if(n.getImageState()!=xs.LOADED)return;var o=t.getReplay(i.getZIndex(),da.IMAGE);o.setImageStyle(n,t.addDeclutter(!1)),o.drawMultiPoint(e,r)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),da.TEXT);a.setTextStyle(s,t.addDeclutter(!!n)),a.drawText(e,r)}},MultiLineString:function(t,e,i,r){var n=i.getStroke();if(n){var o=t.getReplay(i.getZIndex(),da.LINE_STRING);o.setFillStrokeStyle(null,n),o.drawMultiLineString(e,r)}var s=i.getText();if(s){var a=t.getReplay(i.getZIndex(),da.TEXT);a.setTextStyle(s,t.addDeclutter(!1)),a.drawText(e,r)}},MultiPolygon:function(t,e,i,r){var n=i.getFill(),o=i.getStroke();if(o||n){var s=t.getReplay(i.getZIndex(),da.POLYGON);s.setFillStrokeStyle(n,o),s.drawMultiPolygon(e,r)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),da.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,r)}},GeometryCollection:function(t,e,i,r){var n,o,s=e.getGeometriesArray();for(n=0,o=s.length;n<o;++n){var a=Ga[s[n].getType()];a(t,s[n],i,r)}},Circle:function(t,e,i,r){var n=i.getFill(),o=i.getStroke();if(n||o){var s=t.getReplay(i.getZIndex(),da.CIRCLE);s.setFillStrokeStyle(n,o),s.drawCircle(e,r)}var a=i.getText();if(a){var h=t.getReplay(i.getZIndex(),da.TEXT);h.setTextStyle(a,t.addDeclutter(!1)),h.drawText(e,r)}}};function Da(t,e){return parseInt(o(t),10)-parseInt(o(e),10)}function ka(t,e){var i=ja(t,e);return i*i}function ja(t,e){return Na*t/e}function Ua(t,e,i,r,n,o){var s=!1,a=i.getImage();if(a){var h=a.getImageState();h==xs.LOADED||h==xs.ERROR?a.unlistenImageChange(n,o):(h==xs.IDLE&&a.load(),h=a.getImageState(),a.listenImageChange(n,o),s=!0)}return function(t,e,i,r){var n=i.getGeometryFunction()(e);if(!n)return;var o=n.getSimplifiedGeometry(r);if(i.getRenderer())!function t(e,i,r,n){if(i.getType()==Nt.GEOMETRY_COLLECTION){for(var o=i.getGeometries(),s=0,a=o.length;s<a;++s)t(e,o[s],r,n);return}var h=e.getReplay(r.getZIndex(),da.DEFAULT);h.drawCustom(i,n,r.getRenderer())}(t,o,i,e);else{var s=Ga[o.getType()];s(t,o,i,e)}}(t,e,i,r),s}var Ya=function(t){function e(e){t.call(this,e),this.declutterTree_=e.getDeclutter()?ua()(9,void 0):null,this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.context=Jn(),v(Ps,M.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){x(Ps,M.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.compose=function(t,e,i){var r=e.extent,n=e.pixelRatio,o=i.managed?e.skippedFeatureUids:{},s=e.viewState,a=s.projection,h=s.rotation,l=a.getExtent(),u=this.getLayer().getSource(),p=this.getTransform(e,0),c=i.extent,d=void 0!==c;d&&this.clip(t,e,c);var f=this.replayGroup_;if(f&&!f.isEmpty()){this.declutterTree_&&this.declutterTree_.clear();var _,g=this.getLayer(),y=0,v=0,m=1!==i.opacity,x=g.hasListener(ur.RENDER);if(m||x){var E=t.canvas.width,S=t.canvas.height;if(h){var T=Math.round(Math.sqrt(E*E+S*S));y=(T-E)/2,v=(T-S)/2,E=S=T}this.context.canvas.width=E,this.context.canvas.height=S,_=this.context}else _=t;var C=_.globalAlpha;m||(_.globalAlpha=i.opacity),_!=t&&_.translate(y,v);var R=e.viewHints,w=!(R[kn]||R[jn]),I=e.size[0]*n,L=e.size[1]*n;if(ks(_,-h,I/2,L/2),f.replay(_,p,h,o,w),u.getWrapX()&&a.canWrapX()&&!ot(l,r)){for(var O,P=r[0],b=Ot(l),M=0;P<l[0];)O=b*--M,p=this.getTransform(e,O),f.replay(_,p,h,o,w),P+=b;for(M=0,P=r[2];P>l[2];)O=b*++M,p=this.getTransform(e,O),f.replay(_,p,h,o,w),P-=b}if(ks(_,h,I/2,L/2),x&&this.dispatchRenderEvent(_,e,p),_!=t){if(m){var F=t.globalAlpha;t.globalAlpha=i.opacity,t.drawImage(_.canvas,-y,-v),t.globalAlpha=F}else t.drawImage(_.canvas,-y,-v);_.translate(-y,-v)}m||(_.globalAlpha=C)}d&&t.restore()},e.prototype.composeFrame=function(t,e,i){var r=this.getTransform(t,0);this.preCompose(i,t,r),this.compose(i,t,e),this.postCompose(i,t,e,r)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n){if(this.replayGroup_){var s=e.viewState.resolution,a=e.viewState.rotation,h=this.getLayer(),l={};return this.replayGroup_.forEachFeatureAtCoordinate(t,s,a,i,{},function(t){var e=o(t);if(!(e in l))return l[e]=!0,r.call(n,t,h)},null)}},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&this.replayGroup_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t,e){var i=this.getLayer(),r=i.getSource(),n=t.viewHints[kn],o=t.viewHints[jn],s=i.getUpdateWhileAnimating(),a=i.getUpdateWhileInteracting();if(!this.dirty_&&!s&&n||!a&&o)return!0;var h=t.extent,l=t.viewState,u=l.projection,p=l.resolution,c=t.pixelRatio,d=i.getRevision(),f=i.getRenderBuffer(),_=i.getRenderOrder();void 0===_&&(_=Da);var g=et(h,f*p),y=l.projection.getExtent();if(r.getWrapX()&&l.projection.canWrapX()&&!ot(y,t.extent)){var v=Ot(y),m=Math.max(Ot(g)/2,v);g[0]=y[0]-m,g[2]=y[2]+m}if(!this.dirty_&&this.renderedResolution_==p&&this.renderedRevision_==d&&this.renderedRenderOrder_==_&&ot(this.renderedExtent_,g))return this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var x=new Aa(ja(p,c),g,p,c,r.getOverlaps(),this.declutterTree_,i.getRenderBuffer());r.loadFeatures(g,p,u);var E=function(t){var e,r=t.getStyleFunction()||i.getStyleFunction();if(r&&(e=r(t,p)),e){var n=this.renderFeature(t,p,c,e,x);this.dirty_=this.dirty_||n}}.bind(this);if(_){var S=[];r.forEachFeatureInExtent(g,function(t){S.push(t)}),S.sort(_);for(var T=0,C=S.length;T<C;++T)E(S[T])}else r.forEachFeatureInExtent(g,E);return x.finish(),this.renderedResolution_=p,this.renderedRevision_=d,this.renderedRenderOrder_=_,this.renderedExtent_=g,this.replayGroup_=x,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,e,i,r,n){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var s=0,a=r.length;s<a;++s)o=Ua(n,t,r[s],ka(e,i),this.handleStyleImageChange_,this)||o;else o=Ua(n,t,r,ka(e,i),this.handleStyleImageChange_,this);return o},e}(ta);Ya.handles=function(t){return t.getType()===Ss.VECTOR},Ya.create=function(t,e){return new Ya(e)};var Ba=Ya,Va={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},Xa={image:[da.POLYGON,da.CIRCLE,da.LINE_STRING,da.IMAGE,da.TEXT],hybrid:[da.POLYGON,da.LINE_STRING]},za={image:[da.DEFAULT],hybrid:[da.IMAGE,da.TEXT,da.DEFAULT],vector:Ea},Wa=function(t){function e(e){t.call(this,e,!0),this.declutterTree_=e.getDeclutter()?ua()(9,void 0):null,this.dirty_=!1,this.renderedLayerRevision_,this.tmpTransform_=[1,0,0,1,0,0];var i=e.getRenderMode();this.zDirection=i===Va.VECTOR?1:0,i!==Va.VECTOR&&(this.context=Jn()),v(Ps,M.CLEAR,this.handleFontsChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){x(Ps,M.CLEAR,this.handleFontsChanged_,this),t.prototype.disposeInternal.call(this)},e.prototype.getTile=function(e,i,r,n,o){var s=t.prototype.getTile.call(this,e,i,r,n,o);return s.getState()===On.LOADED&&(this.createReplayGroup_(s,n,o),this.context&&this.renderTileImage_(s,n,o)),s},e.prototype.getTileImage=function(t){var e=this.getLayer();return t.getImage(e)},e.prototype.prepareFrame=function(e,i){var r=this.getLayer().getRevision();return this.renderedLayerRevision_!=r&&(this.renderedTiles.length=0),this.renderedLayerRevision_=r,t.prototype.prepareFrame.call(this,e,i)},e.prototype.createReplayGroup_=function(t,e,i){var r=this,n=this.getLayer(),o=n.getRevision(),s=n.getRenderOrder()||null,a=t.getReplayState(n);if(a.dirty||a.renderedRevision!=o||a.renderedRenderOrder!=s){for(var h=n.getSource(),l=h.getTileGrid(),u=h.getTileGridForProjection(i).getResolution(t.tileCoord[0]),p=t.extent,c=function(o,c){var d=t.getTile(t.tileKeys[o]);if(d.getState()==On.LOADED){var f=d.tileCoord,_=l.getTileCoordExtent(f),g=wt(p,_),y=dt(_,g)?null:et(g,n.getRenderBuffer()*u,r.tmpExtent),v=d.getProjection(),m=!1;Ie(i,v)||(m=!0,d.setProjection(i)),a.dirty=!1;var x=new Aa(0,g,u,e,h.getOverlaps(),r.declutterTree_,n.getRenderBuffer()),E=ka(u,e),S=function(t){var e,i=t.getStyleFunction()||n.getStyleFunction();if(i&&(e=i(t,u)),e){var r=this.renderFeature(t,E,e,x);this.dirty_=this.dirty_||r,a.dirty=a.dirty||r}},T=d.getFeatures();s&&s!==a.renderedRenderOrder&&T.sort(s);for(var C=0,R=T.length;C<R;++C){var w=T[C];m&&(v.getUnits()==$t.TILE_PIXELS&&(v.setWorldExtent(_),v.setExtent(d.getExtent())),w.getGeometry().transform(v,i)),y&&!Pt(y,w.getGeometry().getExtent())||S.call(r,w)}x.finish(),d.setReplayGroup(n,t.tileCoord.toString(),x)}},d=0,f=t.tileKeys.length;d<f;++d)c(d);a.renderedRevision=o,a.renderedRenderOrder=s}},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n){var s=e.viewState.resolution,a=e.viewState.rotation;i=void 0==i?0:i;var h,l,u,p,c=this.getLayer(),d={},f=this.renderedTiles;for(u=0,p=f.length;u<p;++u){var _=f[u];if(nt(h=et(_.extent,i*s,h),t))for(var g=0,y=_.tileKeys.length;g<y;++g){var v=_.getTile(_.tileKeys[g]);if(v.getState()==On.LOADED){var m=v.getReplayGroup(c,_.tileCoord.toString());l=l||m.forEachFeatureAtCoordinate(t,s,a,i,{},function(t){var e=o(t);if(!(e in d))return d[e]=!0,r.call(n,t,c)},null)}}}return l},e.prototype.getReplayTransform_=function(t,e){var i=this.getLayer().getSource().getTileGrid(),r=t.tileCoord,n=i.getResolution(r[0]),o=e.viewState,s=e.pixelRatio,a=o.resolution/s,h=i.getTileCoordExtent(r,this.tmpExtent),l=o.center,u=It(h),p=e.size,c=Math.round(s*p[0]/2),d=Math.round(s*p[1]/2);return Ye(this.tmpTransform_,c,d,n/a,n/a,o.rotation,(u[0]-l[0])/n,(l[1]-u[1])/n)},e.prototype.handleFontsChanged_=function(t){var e=this.getLayer();e.getVisible()&&void 0!==this.renderedLayerRevision_&&e.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.postCompose=function(e,i,r){var n=this.getLayer(),o=n.getRenderMode();if(o!=Va.IMAGE){var s,a,h=n.getDeclutter()?{}:null,l=n.getSource(),u=za[o],p=i.pixelRatio,c=i.viewState.rotation,d=i.size;c&&ks(e,-c,s=Math.round(p*d[0]/2),a=Math.round(p*d[1]/2)),h&&this.declutterTree_.clear();for(var f=i.viewHints,_=!(f[kn]||f[jn]),g=this.renderedTiles,y=l.getTileGridForProjection(i.viewState.projection),v=[],m=[],x=g.length-1;x>=0;--x){var E=g[x];if(E.getState()!=On.ABORT)for(var S=E.tileCoord,T=y.getTileCoordExtent(S,this.tmpExtent)[0]-E.extent[0],C=void 0,R=0,w=E.tileKeys.length;R<w;++R){var I=E.getTile(E.tileKeys[R]);if(I.getState()==On.LOADED){var L=I.getReplayGroup(n,S.toString());if(L&&L.hasReplays(u)){C||(C=this.getTransform(i,T));var O=I.tileCoord[0],P=L.getClipCoords(C);e.save(),e.globalAlpha=r.opacity;for(var b=0,M=v.length;b<M;++b){var F=v[b];O<m[b]&&(e.beginPath(),e.moveTo(P[0],P[1]),e.lineTo(P[2],P[3]),e.lineTo(P[4],P[5]),e.lineTo(P[6],P[7]),e.moveTo(F[6],F[7]),e.lineTo(F[4],F[5]),e.lineTo(F[2],F[3]),e.lineTo(F[0],F[1]),e.clip())}L.replay(e,C,c,{},_,u,h),e.restore(),v.push(P),m.push(O)}}}}h&&function(t,e,i,r){for(var n=Object.keys(t).map(Number).sort(V),o={},s=0,a=n.length;s<a;++s)for(var h=t[n[s].toString()],l=0,u=h.length;l<u;){var p=h[l++],c=h[l++];p.replay(e,c,i,o,r)}}(h,e,c,_),c&&ks(e,c,s,a)}t.prototype.postCompose.call(this,e,i,r)},e.prototype.renderFeature=function(t,e,i,r){if(!i)return!1;var n=!1;if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)n=Ua(r,t,i[o],e,this.handleStyleImageChange_,this)||n;else n=Ua(r,t,i,e,this.handleStyleImageChange_,this);return n},e.prototype.renderTileImage_=function(t,e,i){var r=this.getLayer(),n=t.getReplayState(r),o=r.getRevision(),s=Xa[r.getRenderMode()];if(s&&n.renderedTileRevision!==o){n.renderedTileRevision=o;var a=t.wrappedTileCoord,h=a[0],l=r.getSource(),u=l.getTileGridForProjection(i),p=u.getResolution(h),c=t.getContext(r),d=l.getTilePixelSize(h,e,i);c.canvas.width=d[0],c.canvas.height=d[1];for(var f=u.getTileCoordExtent(a,this.tmpExtent),_=0,g=t.tileKeys.length;_<g;++_){var y=t.getTile(t.tileKeys[_]);if(y.getState()==On.LOADED){var v=e/p,m=Fe(this.tmpTransform_);je(m,v,-v),Ue(m,-f[0],-f[3]),y.getReplayGroup(r,t.tileCoord.toString()).replay(c,m,0,{},!0,s)}}}},e}(ha);Wa.handles=function(t){return t.getType()===Ss.VECTOR_TILE},Wa.create=function(t,e){return new Wa(e)};var Ka=Wa,Ha=function(t){function e(e){(e=u({},e)).controls||(e.controls=wo()),e.interactions||(e.interactions=ys()),t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){var t=new Qs(this);return t.registerLayerRenderers([ra,ha,Ba,Ka]),t},e}(lo),Za={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},qa={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},Ja=function(t){function e(e){t.call(this),this.options=e,this.id=e.id,this.insertFirst=void 0===e.insertFirst||e.insertFirst,this.stopEvent=void 0===e.stopEvent||e.stopEvent,this.element=document.createElement("div"),this.element.className=void 0!==e.className?e.className:"ol-overlay-container "+co,this.element.style.position="absolute",this.autoPan=void 0!==e.autoPan&&e.autoPan,this.autoPanAnimation=e.autoPanAnimation||{},this.autoPanMargin=void 0!==e.autoPanMargin?e.autoPanMargin:20,this.rendered={bottom_:"",left_:"",right_:"",top_:"",visible:!0},this.mapPostrenderListenerKey=null,v(this,G(qa.ELEMENT),this.handleElementChanged,this),v(this,G(qa.MAP),this.handleMapChanged,this),v(this,G(qa.OFFSET),this.handleOffsetChanged,this),v(this,G(qa.POSITION),this.handlePositionChanged,this),v(this,G(qa.POSITIONING),this.handlePositioningChanged,this),void 0!==e.element&&this.setElement(e.element),this.setOffset(void 0!==e.offset?e.offset:[0,0]),this.setPositioning(void 0!==e.positioning?e.positioning:Za.TOP_LEFT),void 0!==e.position&&this.setPosition(e.position)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getElement=function(){return this.get(qa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(qa.MAP)},e.prototype.getOffset=function(){return this.get(qa.OFFSET)},e.prototype.getPosition=function(){return this.get(qa.POSITION)},e.prototype.getPositioning=function(){return this.get(qa.POSITIONING)},e.prototype.handleElementChanged=function(){to(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&($n(this.element),E(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=v(t,Rn,this.render,this),this.updatePixelPosition();var e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element)}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.get(qa.POSITION)&&this.autoPan&&this.panIntoView()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(qa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(qa.MAP,t)},e.prototype.setOffset=function(t){this.set(qa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(qa.POSITION,t)},e.prototype.panIntoView=function(){var t=this.getMap();if(t&&t.getTargetElement()){var e=this.getRect(t.getTargetElement(),t.getSize()),i=this.getElement(),r=this.getRect(i,[function(t){var e=t.offsetWidth,i=getComputedStyle(t);return e+=parseInt(i.marginLeft,10)+parseInt(i.marginRight,10)}(i),function(t){var e=t.offsetHeight,i=getComputedStyle(t);return e+=parseInt(i.marginTop,10)+parseInt(i.marginBottom,10)}(i)]),n=this.autoPanMargin;if(!ot(e,r)){var o=r[0]-e[0],s=e[2]-r[2],a=r[1]-e[1],h=e[3]-r[3],l=[0,0];if(o<0?l[0]=o-n:s<0&&(l[0]=Math.abs(s)+n),a<0?l[1]=a-n:h<0&&(l[1]=Math.abs(h)+n),0!==l[0]||0!==l[1]){var u=t.getView().getCenter(),p=t.getPixelFromCoordinate(u),c=[p[0]+l[0],p[1]+l[1]];t.getView().animate({center:t.getCoordinateFromPixel(c),duration:this.autoPanAnimation.duration,easing:this.autoPanAnimation.easing})}}}},e.prototype.getRect=function(t,e){var i=t.getBoundingClientRect(),r=i.left+window.pageXOffset,n=i.top+window.pageYOffset;return[r,n,r+e[0],n+e[1]]},e.prototype.setPositioning=function(t){this.set(qa.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),e=this.getPosition();if(t&&t.isRendered()&&e){var i=t.getPixelFromCoordinate(e),r=t.getSize();this.updateRenderedPosition(i,r)}else this.setVisible(!1)},e.prototype.updateRenderedPosition=function(t,e){var i=this.element.style,r=this.getOffset(),n=this.getPositioning();this.setVisible(!0);var o=r[0],s=r[1];if(n==Za.BOTTOM_RIGHT||n==Za.CENTER_RIGHT||n==Za.TOP_RIGHT){""!==this.rendered.left_&&(this.rendered.left_=i.left="");var a=Math.round(e[0]-t[0]-o)+"px";this.rendered.right_!=a&&(this.rendered.right_=i.right=a)}else{""!==this.rendered.right_&&(this.rendered.right_=i.right=""),n!=Za.BOTTOM_CENTER&&n!=Za.CENTER_CENTER&&n!=Za.TOP_CENTER||(o-=this.element.offsetWidth/2);var h=Math.round(t[0]+o)+"px";this.rendered.left_!=h&&(this.rendered.left_=i.left=h)}if(n==Za.BOTTOM_LEFT||n==Za.BOTTOM_CENTER||n==Za.BOTTOM_RIGHT){""!==this.rendered.top_&&(this.rendered.top_=i.top="");var l=Math.round(e[1]-t[1]-s)+"px";this.rendered.bottom_!=l&&(this.rendered.bottom_=i.bottom=l)}else{""!==this.rendered.bottom_&&(this.rendered.bottom_=i.bottom=""),n!=Za.CENTER_LEFT&&n!=Za.CENTER_CENTER&&n!=Za.CENTER_RIGHT||(s-=this.element.offsetHeight/2);var u=Math.round(t[1]+s)+"px";this.rendered.top_!=u&&(this.rendered.top_=i.top=u)}},e.prototype.getOptions=function(){return this.options},e}(D),Qa=9729,$a=10242,th=10243,eh=3553,ih=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function rh(t,e){for(var i=ih.length,r=0;r<i;++r)try{var n=t.getContext(ih[r],e);if(n)return n}catch(t){}return null}var nh,oh;if("undefined"!=typeof window&&"WebGLRenderingContext"in window)try{var sh=rh(document.createElement("canvas"),{failIfMajorPerformanceCaveat:!0});sh&&(!0,nh=sh.getParameter(sh.MAX_TEXTURE_SIZE),oh=sh.getSupportedExtensions())}catch(t){}var ah=function(t){this.source_=t};ah.prototype.isAnimated=function(){return!1},ah.prototype.getType=function(){return r()},ah.prototype.getSource=function(){return this.source_};var hh=ah,lh=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return 35632},e}(hh),uh=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return 35633},e}(hh),ph=new lh("precision mediump float;\nvarying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_fillColor;\nuniform vec4 u_strokeColor;\nuniform vec2 u_size;\n\nvoid main(void) {\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\n  float radius = length(windowCenter - windowOffset);\n  float dist = length(windowCenter - gl_FragCoord.xy);\n  if (dist > radius + v_halfWidth) {\n    if (u_strokeColor.a == 0.0) {\n      gl_FragColor = u_fillColor;\n    } else {\n      gl_FragColor = u_strokeColor;\n    }\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\n  } else if (u_fillColor.a == 0.0) {\n    // Hooray, no fill, just stroke. We can use real antialiasing.\n    gl_FragColor = u_strokeColor;\n    if (dist < radius - v_halfWidth) {\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\n    }\n  } else {\n    gl_FragColor = u_fillColor;\n    float strokeDist = radius - v_halfWidth;\n    float antialias = 2.0 * v_pixelRatio;\n    if (dist > strokeDist) {\n      gl_FragColor = u_strokeColor;\n    } else if (dist >= strokeDist - antialias) {\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\n    }\n  }\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\n  if (gl_FragColor.a <= 0.0) {\n    discard;\n  }\n}\n"),ch=new uh("varying vec2 v_center;\nvarying vec2 v_offset;\nvarying float v_halfWidth;\nvarying float v_pixelRatio;\n\n\nattribute vec2 a_position;\nattribute float a_instruction;\nattribute float a_radius;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\n  v_pixelRatio = u_pixelRatio;\n  float lineWidth = u_lineWidth * u_pixelRatio;\n  v_halfWidth = lineWidth / 2.0;\n  if (lineWidth == 0.0) {\n    lineWidth = 2.0 * u_pixelRatio;\n  }\n  vec2 offset;\n  // Radius with anitaliasing (roughly).\n  float radius = a_radius + 3.0 * u_pixelRatio;\n  // Until we get gl_VertexID in WebGL, we store an instruction.\n  if (a_instruction == 0.0) {\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\n    offset = vec2(-1.0, 1.0);\n  } else if (a_instruction == 1.0) {\n    offset = vec2(-1.0, -1.0);\n  } else if (a_instruction == 2.0) {\n    offset = vec2(1.0, -1.0);\n  } else {\n    offset = vec2(1.0, 1.0);\n  }\n\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\n      0.0, 1.0)).xy;\n\n  if (distance(v_center, v_offset) > 20000.0) {\n    gl_Position = vec4(v_center, 0.0, 1.0);\n  }\n}\n\n\n"),dh=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,"u_projectionMatrix"),this.u_offsetScaleMatrix=t.getUniformLocation(e,"u_offsetScaleMatrix"),this.u_offsetRotateMatrix=t.getUniformLocation(e,"u_offsetRotateMatrix"),this.u_lineWidth=t.getUniformLocation(e,"u_lineWidth"),this.u_pixelRatio=t.getUniformLocation(e,"u_pixelRatio"),this.u_opacity=t.getUniformLocation(e,"u_opacity"),this.u_fillColor=t.getUniformLocation(e,"u_fillColor"),this.u_strokeColor=t.getUniformLocation(e,"u_strokeColor"),this.u_size=t.getUniformLocation(e,"u_size"),this.a_position=t.getAttribLocation(e,"a_position"),this.a_instruction=t.getAttribLocation(e,"a_instruction"),this.a_radius=t.getAttribLocation(e,"a_radius")};function fh(t,e){return t[0]=e[0],t[1]=e[1],t[4]=e[2],t[5]=e[3],t[12]=e[4],t[13]=e[5],t}var _h=function(t){function e(e,i){t.call(this),this.tolerance=e,this.maxExtent=i,this.origin=Tt(i),this.projectionMatrix_=[1,0,0,1,0,0],this.offsetRotateMatrix_=[1,0,0,1,0,0],this.offsetScaleMatrix_=[1,0,0,1,0,0],this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.indices=[],this.indicesBuffer=null,this.startIndices=[],this.startIndicesFeature=[],this.vertices=[],this.verticesBuffer=null,this.lineStringReplay=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeleteResourcesFunction=function(t){return r()},e.prototype.finish=function(t){r()},e.prototype.setUpProgram=function(t,e,i,n){return r()},e.prototype.shutDownProgram=function(t,e){r()},e.prototype.drawReplay=function(t,e,i,n){r()},e.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,n,o){return r()},e.prototype.drawHitDetectionReplay=function(t,e,i,r,n,o){return n?this.drawHitDetectionReplayOneByOne(t,e,i,r,o):this.drawHitDetectionReplayAll(t,e,i,r)},e.prototype.drawHitDetectionReplayAll=function(t,e,i,r){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawReplay(t,e,i,!0);var n=r(null);return n||void 0},e.prototype.replay=function(t,e,i,r,n,o,s,a,h,l,u){var p,c,d,f,_,g,y,v,m=t.getGL();this.lineStringReplay&&(p=m.isEnabled(m.STENCIL_TEST),c=m.getParameter(m.STENCIL_FUNC),d=m.getParameter(m.STENCIL_VALUE_MASK),f=m.getParameter(m.STENCIL_REF),_=m.getParameter(m.STENCIL_WRITEMASK),g=m.getParameter(m.STENCIL_FAIL),y=m.getParameter(m.STENCIL_PASS_DEPTH_PASS),v=m.getParameter(m.STENCIL_PASS_DEPTH_FAIL),m.enable(m.STENCIL_TEST),m.clear(m.STENCIL_BUFFER_BIT),m.stencilMask(255),m.stencilFunc(m.ALWAYS,1,255),m.stencilOp(m.KEEP,m.KEEP,m.REPLACE),this.lineStringReplay.replay(t,e,i,r,n,o,s,a,h,l,u),m.stencilMask(0),m.stencilFunc(m.NOTEQUAL,1,255)),t.bindBuffer(34962,this.verticesBuffer),t.bindBuffer(34963,this.indicesBuffer);var x=this.setUpProgram(m,t,n,o),E=Fe(this.projectionMatrix_);je(E,2/(i*n[0]),2/(i*n[1])),ke(E,-r),Ue(E,-(e[0]-this.origin[0]),-(e[1]-this.origin[1]));var S=Fe(this.offsetScaleMatrix_);je(S,2/n[0],2/n[1]);var T,C=Fe(this.offsetRotateMatrix_);return 0!==r&&ke(C,-r),m.uniformMatrix4fv(x.u_projectionMatrix,!1,fh(this.tmpMat4_,E)),m.uniformMatrix4fv(x.u_offsetScaleMatrix,!1,fh(this.tmpMat4_,S)),m.uniformMatrix4fv(x.u_offsetRotateMatrix,!1,fh(this.tmpMat4_,C)),m.uniform1f(x.u_opacity,s),void 0===h?this.drawReplay(m,t,a,!1):T=this.drawHitDetectionReplay(m,t,a,h,l,u),this.shutDownProgram(m,x),this.lineStringReplay&&(p||m.disable(m.STENCIL_TEST),m.clear(m.STENCIL_BUFFER_BIT),m.stencilFunc(c,f,d),m.stencilMask(_),m.stencilOp(g,v,y)),T},e.prototype.drawElements=function(t,e,i,r){var n=e.hasOESElementIndexUint?5125:5123,o=r-i,s=i*(e.hasOESElementIndexUint?4:2);t.drawElements(4,o,n,s)},e}(Vs),gh=[0,0,0,1],yh=[],vh=[0,0,0,1],mh=Number.EPSILON||2.220446049250313e-16,xh=function(t,e,i,r,n,o){var s=(i-t)*(o-e)-(n-t)*(r-e);return s<=mh&&s>=-mh?void 0:s>0},Eh=35044,Sh=function(t,e){this.arr_=void 0!==t?t:[],this.usage_=void 0!==e?e:Eh};Sh.prototype.getArray=function(){return this.arr_},Sh.prototype.getUsage=function(){return this.usage_};var Th=Sh,Ch=function(t){function e(e,i){t.call(this,e,i),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.radius_=0,this.state_={fillColor:null,strokeColor:null,lineDash:null,lineDashOffset:void 0,lineWidth:void 0,changed:!1}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,i,r){var n,o,s=this.vertices.length,a=this.indices.length,h=s/4;for(n=e,o=i;n<o;n+=r)this.vertices[s++]=t[n],this.vertices[s++]=t[n+1],this.vertices[s++]=0,this.vertices[s++]=this.radius_,this.vertices[s++]=t[n],this.vertices[s++]=t[n+1],this.vertices[s++]=1,this.vertices[s++]=this.radius_,this.vertices[s++]=t[n],this.vertices[s++]=t[n+1],this.vertices[s++]=2,this.vertices[s++]=this.radius_,this.vertices[s++]=t[n],this.vertices[s++]=t[n+1],this.vertices[s++]=3,this.vertices[s++]=this.radius_,this.indices[a++]=h,this.indices[a++]=h+1,this.indices[a++]=h+2,this.indices[a++]=h+2,this.indices[a++]=h+3,this.indices[a++]=h,h+=4},e.prototype.drawCircle=function(t,e){var i=t.getRadius(),r=t.getStride();if(i){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.radius_=i;var n=t.getFlatCoordinates();n=Dt(n,0,2,r,-this.origin[0],-this.origin[1]),this.drawCoordinates_(n,0,2,r)}else if(this.state_.changed&&(this.styles_.pop(),this.styles_.length)){var o=this.styles_[this.styles_.length-1];this.state_.fillColor=o[0],this.state_.strokeColor=o[1],this.state_.lineWidth=o[2],this.state_.changed=!1}},e.prototype.finish=function(t){this.verticesBuffer=new Th(this.vertices),this.indicesBuffer=new Th(this.indices),this.startIndices.push(this.indices.length),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},e.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer;return function(){t.deleteBuffer(e),t.deleteBuffer(i)}},e.prototype.setUpProgram=function(t,e,i,r){var n,o=e.getProgram(ph,ch);return this.defaultLocations_?n=this.defaultLocations_:(n=new dh(t,o),this.defaultLocations_=n),e.useProgram(o),t.enableVertexAttribArray(n.a_position),t.vertexAttribPointer(n.a_position,2,5126,!1,16,0),t.enableVertexAttribArray(n.a_instruction),t.vertexAttribPointer(n.a_instruction,1,5126,!1,16,8),t.enableVertexAttribArray(n.a_radius),t.vertexAttribPointer(n.a_radius,1,5126,!1,16,12),t.uniform2fv(n.u_size,i),t.uniform1f(n.u_pixelRatio,r),n},e.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_instruction),t.disableVertexAttribArray(e.a_radius)},e.prototype.drawReplay=function(t,e,i,r){var n,o,s,a;if(d(i))for(s=this.startIndices[this.startIndices.length-1],n=this.styleIndices_.length-1;n>=0;--n)o=this.styleIndices_[n],a=this.styles_[n],this.setFillStyle_(t,a[0]),this.setStrokeStyle_(t,a[1],a[2]),this.drawElements(t,e,o,s),s=o;else this.drawReplaySkipping_(t,e,i)},e.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,n){var s,a,h,l,u,p,c;for(c=this.startIndices.length-2,h=this.startIndices[c+1],s=this.styleIndices_.length-1;s>=0;--s)for(l=this.styles_[s],this.setFillStyle_(t,l[0]),this.setStrokeStyle_(t,l[1],l[2]),u=this.styleIndices_[s];c>=0&&this.startIndices[c]>=u;){if(a=this.startIndices[c],void 0===i[o(p=this.startIndicesFeature[c])]&&p.getGeometry()&&(void 0===n||Pt(n,p.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,a,h);var d=r(p);if(d)return d}c--,h=a}},e.prototype.drawReplaySkipping_=function(t,e,i){var r,n,s,a,h,l,u;for(l=this.startIndices.length-2,s=n=this.startIndices[l+1],r=this.styleIndices_.length-1;r>=0;--r){for(a=this.styles_[r],this.setFillStyle_(t,a[0]),this.setStrokeStyle_(t,a[1],a[2]),h=this.styleIndices_[r];l>=0&&this.startIndices[l]>=h;)u=this.startIndices[l],i[o(this.startIndicesFeature[l])]&&(n!==s&&this.drawElements(t,e,n,s),s=u),l--,n=u;n!==s&&this.drawElements(t,e,n,s),n=s=h}},e.prototype.setFillStyle_=function(t,e){t.uniform4fv(this.defaultLocations_.u_fillColor,e)},e.prototype.setStrokeStyle_=function(t,e,i){t.uniform4fv(this.defaultLocations_.u_strokeColor,e),t.uniform1f(this.defaultLocations_.u_lineWidth,i)},e.prototype.setFillStrokeStyle=function(t,e){var i,r;if(e){var n=e.getLineDash();this.state_.lineDash=n||yh;var o=e.getLineDashOffset();this.state_.lineDashOffset=o||0,i=(i=e.getColor())instanceof CanvasGradient||i instanceof CanvasPattern?vh:_r(i).map(function(t,e){return 3!=e?t/255:t})||vh,r=void 0!==(r=e.getWidth())?r:1}else i=[0,0,0,0],r=0;var s=t?t.getColor():[0,0,0,0];s=s instanceof CanvasGradient||s instanceof CanvasPattern?gh:_r(s).map(function(t,e){return 3!=e?t/255:t})||gh,this.state_.strokeColor&&Z(this.state_.strokeColor,i)&&this.state_.fillColor&&Z(this.state_.fillColor,s)&&this.state_.lineWidth===r||(this.state_.changed=!0,this.state_.fillColor=s,this.state_.strokeColor=i,this.state_.lineWidth=r,this.styles_.push([s,i,r]))},e}(_h),Rh=new lh("precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_image, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  float alpha = texColor.a * v_opacity * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),wh=new uh("varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  mat4 offsetMatrix = u_offsetScaleMatrix;\n  if (a_rotateWithView == 1.0) {\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  }\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n  v_texCoord = a_texCoord;\n  v_opacity = a_opacity;\n}\n\n\n"),Ih=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,"u_projectionMatrix"),this.u_offsetScaleMatrix=t.getUniformLocation(e,"u_offsetScaleMatrix"),this.u_offsetRotateMatrix=t.getUniformLocation(e,"u_offsetRotateMatrix"),this.u_opacity=t.getUniformLocation(e,"u_opacity"),this.u_image=t.getUniformLocation(e,"u_image"),this.a_position=t.getAttribLocation(e,"a_position"),this.a_texCoord=t.getAttribLocation(e,"a_texCoord"),this.a_offsets=t.getAttribLocation(e,"a_offsets"),this.a_opacity=t.getAttribLocation(e,"a_opacity"),this.a_rotateWithView=t.getAttribLocation(e,"a_rotateWithView")},Lh={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"};function Oh(t,e,i){var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(eh,$a,e),void 0!==i&&t.texParameteri(eh,th,i),r}function Ph(t,e,i,r,n){var o=Oh(t,r,n);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,i,0,t.RGBA,t.UNSIGNED_BYTE,null),o}function bh(t,e,i,r){var n=Oh(t,i,r);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),n}var Mh=function(t){function e(e,i){t.call(this),this.canvas_=e,this.gl_=i,this.bufferCache_={},this.shaderCache_={},this.programCache_={},this.currentProgram_=null,this.hitDetectionFramebuffer_=null,this.hitDetectionTexture_=null,this.hitDetectionRenderbuffer_=null,this.hasOESElementIndexUint=X(oh,"OES_element_index_uint"),this.hasOESElementIndexUint&&i.getExtension("OES_element_index_uint"),v(this.canvas_,Lh.LOST,this.handleWebGLContextLost,this),v(this.canvas_,Lh.RESTORED,this.handleWebGLContextRestored,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bindBuffer=function(t,e){var i=this.getGL(),r=e.getArray(),n=o(e);if(n in this.bufferCache_){var s=this.bufferCache_[n];i.bindBuffer(t,s.buffer)}else{var a,h=i.createBuffer();i.bindBuffer(t,h),34962==t?a=new Float32Array(r):34963==t&&(a=this.hasOESElementIndexUint?new Uint32Array(r):new Uint16Array(r)),i.bufferData(t,a,e.getUsage()),this.bufferCache_[n]={buf:e,buffer:h}}},e.prototype.deleteBuffer=function(t){var e=this.getGL(),i=o(t),r=this.bufferCache_[i];e.isContextLost()||e.deleteBuffer(r.buffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){S(this.canvas_);var t=this.getGL();if(!t.isContextLost()){for(var e in this.bufferCache_)t.deleteBuffer(this.bufferCache_[e].buffer);for(var i in this.programCache_)t.deleteProgram(this.programCache_[i]);for(var r in this.shaderCache_)t.deleteShader(this.shaderCache_[r]);t.deleteFramebuffer(this.hitDetectionFramebuffer_),t.deleteRenderbuffer(this.hitDetectionRenderbuffer_),t.deleteTexture(this.hitDetectionTexture_)}},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.getHitDetectionFramebuffer=function(){return this.hitDetectionFramebuffer_||this.initHitDetectionFramebuffer_(),this.hitDetectionFramebuffer_},e.prototype.getShader=function(t){var e=o(t);if(e in this.shaderCache_)return this.shaderCache_[e];var i=this.getGL(),r=i.createShader(t.getType());return i.shaderSource(r,t.getSource()),i.compileShader(r),this.shaderCache_[e]=r,r},e.prototype.getProgram=function(t,e){var i=o(t)+"/"+o(e);if(i in this.programCache_)return this.programCache_[i];var r=this.getGL(),n=r.createProgram();return r.attachShader(n,this.getShader(t)),r.attachShader(n,this.getShader(e)),r.linkProgram(n),this.programCache_[i]=n,n},e.prototype.handleWebGLContextLost=function(){p(this.bufferCache_),p(this.shaderCache_),p(this.programCache_),this.currentProgram_=null,this.hitDetectionFramebuffer_=null,this.hitDetectionTexture_=null,this.hitDetectionRenderbuffer_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.initHitDetectionFramebuffer_=function(){var t=this.gl_,e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var i=Ph(t,1,1),r=t.createRenderbuffer();t.bindRenderbuffer(t.RENDERBUFFER,r),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,1,1),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,i,0),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,r),t.bindTexture(t.TEXTURE_2D,null),t.bindRenderbuffer(t.RENDERBUFFER,null),t.bindFramebuffer(t.FRAMEBUFFER,null),this.hitDetectionFramebuffer_=e,this.hitDetectionTexture_=i,this.hitDetectionRenderbuffer_=r},e.prototype.useProgram=function(t){return t!=this.currentProgram_&&(this.getGL().useProgram(t),this.currentProgram_=t,!0)},e}(C),Fh=function(t){function e(e,i){t.call(this,e,i),this.anchorX=void 0,this.anchorY=void 0,this.groupIndices=[],this.hitDetectionGroupIndices=[],this.height=void 0,this.imageHeight=void 0,this.imageWidth=void 0,this.defaultLocations=null,this.opacity=void 0,this.originX=void 0,this.originY=void 0,this.rotateWithView=void 0,this.rotation=void 0,this.scale=void 0,this.width=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer,r=this.getTextures(!0),n=t.getGL();return function(){var o,s;if(!n.isContextLost())for(o=0,s=r.length;o<s;++o)n.deleteTexture(r[o]);t.deleteBuffer(e),t.deleteBuffer(i)}},e.prototype.drawCoordinates=function(t,e,i,r){var n,o,s,a,h,l,u=this.anchorX,p=this.anchorY,c=this.height,d=this.imageHeight,f=this.imageWidth,_=this.opacity,g=this.originX,y=this.originY,v=this.rotateWithView?1:0,m=-this.rotation,x=this.scale,E=this.width,S=Math.cos(m),T=Math.sin(m),C=this.indices.length,R=this.vertices.length;for(n=e;n<i;n+=r)h=t[n]-this.origin[0],l=t[n+1]-this.origin[1],o=R/8,s=-x*u,a=-x*(c-p),this.vertices[R++]=h,this.vertices[R++]=l,this.vertices[R++]=s*S-a*T,this.vertices[R++]=s*T+a*S,this.vertices[R++]=g/f,this.vertices[R++]=(y+c)/d,this.vertices[R++]=_,this.vertices[R++]=v,s=x*(E-u),a=-x*(c-p),this.vertices[R++]=h,this.vertices[R++]=l,this.vertices[R++]=s*S-a*T,this.vertices[R++]=s*T+a*S,this.vertices[R++]=(g+E)/f,this.vertices[R++]=(y+c)/d,this.vertices[R++]=_,this.vertices[R++]=v,s=x*(E-u),a=x*p,this.vertices[R++]=h,this.vertices[R++]=l,this.vertices[R++]=s*S-a*T,this.vertices[R++]=s*T+a*S,this.vertices[R++]=(g+E)/f,this.vertices[R++]=y/d,this.vertices[R++]=_,this.vertices[R++]=v,s=-x*u,a=x*p,this.vertices[R++]=h,this.vertices[R++]=l,this.vertices[R++]=s*S-a*T,this.vertices[R++]=s*T+a*S,this.vertices[R++]=g/f,this.vertices[R++]=y/d,this.vertices[R++]=_,this.vertices[R++]=v,this.indices[C++]=o,this.indices[C++]=o+1,this.indices[C++]=o+2,this.indices[C++]=o,this.indices[C++]=o+2,this.indices[C++]=o+3;return R},e.prototype.createTextures=function(t,e,i,r){var n,s,a,h,l=e.length;for(h=0;h<l;++h)(a=o(s=e[h]))in i?n=i[a]:(n=bh(r,s,33071,33071),i[a]=n),t[h]=n},e.prototype.setUpProgram=function(t,e,i,r){var n,o=e.getProgram(Rh,wh);return this.defaultLocations?n=this.defaultLocations:(n=new Ih(t,o),this.defaultLocations=n),e.useProgram(o),t.enableVertexAttribArray(n.a_position),t.vertexAttribPointer(n.a_position,2,5126,!1,32,0),t.enableVertexAttribArray(n.a_offsets),t.vertexAttribPointer(n.a_offsets,2,5126,!1,32,8),t.enableVertexAttribArray(n.a_texCoord),t.vertexAttribPointer(n.a_texCoord,2,5126,!1,32,16),t.enableVertexAttribArray(n.a_opacity),t.vertexAttribPointer(n.a_opacity,1,5126,!1,32,24),t.enableVertexAttribArray(n.a_rotateWithView),t.vertexAttribPointer(n.a_rotateWithView,1,5126,!1,32,28),n},e.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_offsets),t.disableVertexAttribArray(e.a_texCoord),t.disableVertexAttribArray(e.a_opacity),t.disableVertexAttribArray(e.a_rotateWithView)},e.prototype.drawReplay=function(t,e,i,r){var n,o,s,a=r?this.getHitDetectionTextures():this.getTextures(),h=r?this.hitDetectionGroupIndices:this.groupIndices;if(d(i))for(n=0,o=a.length,s=0;n<o;++n){t.bindTexture(eh,a[n]);var l=h[n];this.drawElements(t,e,s,l),s=l}else this.drawReplaySkipping(t,e,i,a,h)},e.prototype.drawReplaySkipping=function(t,e,i,r,n){var s,a,h=0;for(s=0,a=r.length;s<a;++s){t.bindTexture(eh,r[s]);for(var l=s>0?n[s-1]:0,u=n[s],p=l,c=l;h<this.startIndices.length&&this.startIndices[h]<=u;){void 0!==i[o(this.startIndicesFeature[h])]?(p!==c&&this.drawElements(t,e,p,c),c=p=h===this.startIndices.length-1?u:this.startIndices[h+1]):c=h===this.startIndices.length-1?u:this.startIndices[h+1],h++}p!==c&&this.drawElements(t,e,p,c)}},e.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,n){var s,a,h,l,u,p=this.startIndices.length-1,c=this.getHitDetectionTextures();for(s=c.length-1;s>=0;--s)for(t.bindTexture(eh,c[s]),a=s>0?this.hitDetectionGroupIndices[s-1]:0,l=this.hitDetectionGroupIndices[s];p>=0&&this.startIndices[p]>=a;){if(h=this.startIndices[p],void 0===i[o(u=this.startIndicesFeature[p])]&&u.getGeometry()&&(void 0===n||Pt(n,u.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,h,l);var d=r(u);if(d)return d}l=h,p--}},e.prototype.finish=function(t){this.anchorX=void 0,this.anchorY=void 0,this.height=void 0,this.imageHeight=void 0,this.imageWidth=void 0,this.indices=null,this.opacity=void 0,this.originX=void 0,this.originY=void 0,this.rotateWithView=void 0,this.rotation=void 0,this.scale=void 0,this.vertices=null,this.width=void 0},e.prototype.getTextures=function(t){return r()},e.prototype.getHitDetectionTextures=function(){return r()},e}(_h),Ah=function(t){function e(e,i){t.call(this,e,i),this.images_=[],this.hitDetectionImages_=[],this.textures_=[],this.hitDetectionTextures_=[]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawMultiPoint=function(t,e){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var i=t.getFlatCoordinates(),r=t.getStride();this.drawCoordinates(i,0,i.length,r)},e.prototype.drawPoint=function(t,e){this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var i=t.getFlatCoordinates(),r=t.getStride();this.drawCoordinates(i,0,i.length,r)},e.prototype.finish=function(e){var i=e.getGL();this.groupIndices.push(this.indices.length),this.hitDetectionGroupIndices.push(this.indices.length),this.verticesBuffer=new Th(this.vertices);var r=this.indices;this.indicesBuffer=new Th(r);var n={};this.createTextures(this.textures_,this.images_,n,i),this.createTextures(this.hitDetectionTextures_,this.hitDetectionImages_,n,i),this.images_=null,this.hitDetectionImages_=null,t.prototype.finish.call(this,e)},e.prototype.setImageStyle=function(t){var e=t.getAnchor(),i=t.getImage(1),r=t.getImageSize(),n=t.getHitDetectionImage(1),s=t.getOpacity(),a=t.getOrigin(),h=t.getRotateWithView(),l=t.getRotation(),u=t.getSize(),p=t.getScale();0===this.images_.length?this.images_.push(i):o(this.images_[this.images_.length-1])!=o(i)&&(this.groupIndices.push(this.indices.length),this.images_.push(i)),0===this.hitDetectionImages_.length?this.hitDetectionImages_.push(n):o(this.hitDetectionImages_[this.hitDetectionImages_.length-1])!=o(n)&&(this.hitDetectionGroupIndices.push(this.indices.length),this.hitDetectionImages_.push(n)),this.anchorX=e[0],this.anchorY=e[1],this.height=u[1],this.imageHeight=r[1],this.imageWidth=r[0],this.opacity=s,this.originX=a[0],this.originY=a[1],this.rotation=l,this.rotateWithView=h,this.scale=p,this.width=u[0]},e.prototype.getTextures=function(t){return t?this.textures_.concat(this.hitDetectionTextures_):this.textures_},e.prototype.getHitDetectionTextures=function(){return this.hitDetectionTextures_},e}(Fh);function Nh(t,e,i,r){var n=i-r;return t[e]===t[n]&&t[e+1]===t[n+1]&&(i-e)/r>3&&!!Ke(t,e,i,r)}var Gh=new lh("precision mediump float;\nvarying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\n\nuniform float u_opacity;\nuniform vec4 u_color;\nuniform vec2 u_size;\nuniform float u_pixelRatio;\n\nvoid main(void) {\n  if (v_round > 0.0) {\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\n      discard;\n    }\n  }\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),Dh=new uh("varying float v_round;\nvarying vec2 v_roundVertex;\nvarying float v_halfWidth;\n\n\nattribute vec2 a_lastPos;\nattribute vec2 a_position;\nattribute vec2 a_nextPos;\nattribute float a_direction;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\nuniform float u_lineWidth;\nuniform float u_miterLimit;\n\nbool nearlyEquals(in float value, in float ref) {\n  float epsilon = 0.000000000001;\n  return value >= ref - epsilon && value <= ref + epsilon;\n}\n\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\n  vec2 dirVect = nextP - a_position;\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\n  offset = u_lineWidth / 2.0 * normal * direction;\n}\n\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\n  float halfWidth = u_lineWidth / 2.0;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_nextPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n  offset = normal * direction * miterLength;\n  round = 0.0;\n  if (isRound) {\n    round = 1.0;\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\n    offset = halfWidth * tmpNormal * direction;\n  }\n}\n\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\n  bool degenerate = false;\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\n  vec2 normal = vec2(-tangent.y, tangent.x);\n  vec2 dirVect = a_lastPos - a_position;\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\n  vec2 longOffset, shortOffset, longVertex;\n  vec4 shortProjVertex;\n  float halfWidth = u_lineWidth / 2.0;\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\n    longOffset = tmpNormal * direction * halfWidth;\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_nextPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\n  } else {\n    shortOffset = tmpNormal * direction * halfWidth;\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\n    longVertex = a_lastPos;\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\n  }\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\n  float epsilon = 0.000000000001;\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\n    offset = shortProjVertex.xy;\n    degenerate = true;\n  } else {\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\n    offset = normal * direction * miterLength;\n  }\n  return degenerate;\n}\n\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\n    in float turnDir, in float direction) {\n  round = 0.0;\n  vec2 dirVect = a_position - nextP;\n  vec2 firstNormal = normalize(dirVect);\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\n  offset = normal * length;\n  if (isRound) {\n    round = 1.0;\n  }\n}\n\nvoid main(void) {\n  bool degenerate = false;\n  float direction = float(sign(a_direction));\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n  vec2 offset;\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\n\n  v_round = 0.0;\n  v_halfWidth = u_lineWidth / 2.0;\n  v_roundVertex = projPos.xy;\n\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\n    alongNormal(offset, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\n    alongNormal(offset, a_lastPos, -1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\n    miterUp(offset, v_round, round, direction);\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\n  }\n  if (!degenerate) {\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\n    gl_Position = projPos + offsets;\n  } else {\n    gl_Position = vec4(offset, 0.0, 1.0);\n  }\n}\n\n\n"),kh=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,"u_projectionMatrix"),this.u_offsetScaleMatrix=t.getUniformLocation(e,"u_offsetScaleMatrix"),this.u_offsetRotateMatrix=t.getUniformLocation(e,"u_offsetRotateMatrix"),this.u_lineWidth=t.getUniformLocation(e,"u_lineWidth"),this.u_miterLimit=t.getUniformLocation(e,"u_miterLimit"),this.u_opacity=t.getUniformLocation(e,"u_opacity"),this.u_color=t.getUniformLocation(e,"u_color"),this.u_size=t.getUniformLocation(e,"u_size"),this.u_pixelRatio=t.getUniformLocation(e,"u_pixelRatio"),this.a_lastPos=t.getAttribLocation(e,"a_lastPos"),this.a_position=t.getAttribLocation(e,"a_position"),this.a_nextPos=t.getAttribLocation(e,"a_nextPos"),this.a_direction=t.getAttribLocation(e,"a_direction")},jh=3,Uh=5,Yh=7,Bh=11,Vh=13,Xh=17,zh=19,Wh=23,Kh=function(t){function e(e,i){t.call(this,e,i),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,changed:!1}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,i,r){var n,o,s,a,h,l,u,p,c=this.vertices.length,d=this.indices.length,f="bevel"===this.state_.lineJoin?0:"miter"===this.state_.lineJoin?1:2,_="butt"===this.state_.lineCap?0:"square"===this.state_.lineCap?1:2,g=Nh(t,e,i,r),y=d,v=1;for(n=e,o=i;n<o;n+=r){if(h=c/7,l=u,u=p||[t[n],t[n+1]],n===e){if(p=[t[n+r],t[n+r+1]],i-e==2*r&&Z(u,p))break;if(!g){_&&(c=this.addVertices_([0,0],u,p,v*Yh*_,c),c=this.addVertices_([0,0],u,p,-v*Yh*_,c),this.indices[d++]=h+2,this.indices[d++]=h,this.indices[d++]=h+1,this.indices[d++]=h+1,this.indices[d++]=h+3,this.indices[d++]=h+2),c=this.addVertices_([0,0],u,p,v*jh*(_||1),c),y=(c=this.addVertices_([0,0],u,p,-v*jh*(_||1),c))/7-1;continue}l=[t[i-2*r],t[i-2*r+1]],s=p}else{if(n===i-r){if(g){p=s;break}l=l||[0,0],c=this.addVertices_(l,u,[0,0],v*Uh*(_||1),c),c=this.addVertices_(l,u,[0,0],-v*Uh*(_||1),c),this.indices[d++]=h,this.indices[d++]=y-1,this.indices[d++]=y,this.indices[d++]=y,this.indices[d++]=h+1,this.indices[d++]=h,_&&(c=this.addVertices_(l,u,[0,0],v*Bh*_,c),c=this.addVertices_(l,u,[0,0],-v*Bh*_,c),this.indices[d++]=h+2,this.indices[d++]=h,this.indices[d++]=h+1,this.indices[d++]=h+1,this.indices[d++]=h+3,this.indices[d++]=h+2);break}p=[t[n+r],t[n+r+1]]}a=xh(l[0],l[1],u[0],u[1],p[0],p[1])?-1:1,c=this.addVertices_(l,u,p,a*Vh*(f||1),c),c=this.addVertices_(l,u,p,a*Xh*(f||1),c),c=this.addVertices_(l,u,p,-a*zh*(f||1),c),n>e&&(this.indices[d++]=h,this.indices[d++]=y-1,this.indices[d++]=y,this.indices[d++]=h+2,this.indices[d++]=h,this.indices[d++]=v*a>0?y:y-1),this.indices[d++]=h,this.indices[d++]=h+2,this.indices[d++]=h+1,y=h+2,v=a,f&&(c=this.addVertices_(l,u,p,a*Wh*f,c),this.indices[d++]=h+1,this.indices[d++]=h+3,this.indices[d++]=h)}g&&(h=h||c/7,a=Si([l[0],l[1],u[0],u[1],p[0],p[1]],0,6,2)?1:-1,c=this.addVertices_(l,u,p,a*Vh*(f||1),c),c=this.addVertices_(l,u,p,-a*zh*(f||1),c),this.indices[d++]=h,this.indices[d++]=y-1,this.indices[d++]=y,this.indices[d++]=h+1,this.indices[d++]=h,this.indices[d++]=v*a>0?y:y-1)},e.prototype.addVertices_=function(t,e,i,r,n){return this.vertices[n++]=t[0],this.vertices[n++]=t[1],this.vertices[n++]=e[0],this.vertices[n++]=e[1],this.vertices[n++]=i[0],this.vertices[n++]=i[1],this.vertices[n++]=r,n},e.prototype.isValid_=function(t,e,i,r){var n=i-e;return!(n<2*r)&&(n!==2*r||!Z([t[e],t[e+1]],[t[e+r],t[e+r+1]]))},e.prototype.drawLineString=function(t,e){var i=t.getFlatCoordinates(),r=t.getStride();this.isValid_(i,0,i.length,r)&&(i=Dt(i,0,i.length,r,-this.origin[0],-this.origin[1]),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.drawCoordinates_(i,0,i.length,r))},e.prototype.drawMultiLineString=function(t,e){var i=this.indices.length,r=t.getEnds();r.unshift(0);var n,o,s=t.getFlatCoordinates(),a=t.getStride();if(r.length>1)for(n=1,o=r.length;n<o;++n)if(this.isValid_(s,r[n-1],r[n],a)){var h=Dt(s,r[n-1],r[n],a,-this.origin[0],-this.origin[1]);this.drawCoordinates_(h,0,h.length,a)}this.indices.length>i&&(this.startIndices.push(i),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(i),this.state_.changed=!1))},e.prototype.drawPolygonCoordinates=function(t,e,i){var r,n;if(Nh(t,0,t.length,i)||(t.push(t[0]),t.push(t[1])),this.drawCoordinates_(t,0,t.length,i),e.length)for(r=0,n=e.length;r<n;++r)Nh(e[r],0,e[r].length,i)||(e[r].push(e[r][0]),e[r].push(e[r][1])),this.drawCoordinates_(e[r],0,e[r].length,i)},e.prototype.setPolygonStyle=function(t,e){var i=void 0===e?this.indices.length:e;this.startIndices.push(i),this.startIndicesFeature.push(t),this.state_.changed&&(this.styleIndices_.push(i),this.state_.changed=!1)},e.prototype.getCurrentIndex=function(){return this.indices.length},e.prototype.finish=function(t){this.verticesBuffer=new Th(this.vertices),this.indicesBuffer=new Th(this.indices),this.startIndices.push(this.indices.length),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},e.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer;return function(){t.deleteBuffer(e),t.deleteBuffer(i)}},e.prototype.setUpProgram=function(t,e,i,r){var n,o=e.getProgram(Gh,Dh);return this.defaultLocations_?n=this.defaultLocations_:(n=new kh(t,o),this.defaultLocations_=n),e.useProgram(o),t.enableVertexAttribArray(n.a_lastPos),t.vertexAttribPointer(n.a_lastPos,2,5126,!1,28,0),t.enableVertexAttribArray(n.a_position),t.vertexAttribPointer(n.a_position,2,5126,!1,28,8),t.enableVertexAttribArray(n.a_nextPos),t.vertexAttribPointer(n.a_nextPos,2,5126,!1,28,16),t.enableVertexAttribArray(n.a_direction),t.vertexAttribPointer(n.a_direction,1,5126,!1,28,24),t.uniform2fv(n.u_size,i),t.uniform1f(n.u_pixelRatio,r),n},e.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_lastPos),t.disableVertexAttribArray(e.a_position),t.disableVertexAttribArray(e.a_nextPos),t.disableVertexAttribArray(e.a_direction)},e.prototype.drawReplay=function(t,e,i,r){var n,o,s,a,h=t.getParameter(t.DEPTH_FUNC),l=t.getParameter(t.DEPTH_WRITEMASK);if(r||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),d(i))for(s=this.startIndices[this.startIndices.length-1],n=this.styleIndices_.length-1;n>=0;--n)o=this.styleIndices_[n],a=this.styles_[n],this.setStrokeStyle_(t,a[0],a[1],a[2]),this.drawElements(t,e,o,s),t.clear(t.DEPTH_BUFFER_BIT),s=o;else this.drawReplaySkipping_(t,e,i);r||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(l),t.depthFunc(h))},e.prototype.drawReplaySkipping_=function(t,e,i){var r,n,s,a,h,l,u;for(l=this.startIndices.length-2,s=n=this.startIndices[l+1],r=this.styleIndices_.length-1;r>=0;--r){for(a=this.styles_[r],this.setStrokeStyle_(t,a[0],a[1],a[2]),h=this.styleIndices_[r];l>=0&&this.startIndices[l]>=h;)u=this.startIndices[l],i[o(this.startIndicesFeature[l])]&&(n!==s&&(this.drawElements(t,e,n,s),t.clear(t.DEPTH_BUFFER_BIT)),s=u),l--,n=u;n!==s&&(this.drawElements(t,e,n,s),t.clear(t.DEPTH_BUFFER_BIT)),n=s=h}},e.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,n){var s,a,h,l,u,p,c;for(c=this.startIndices.length-2,h=this.startIndices[c+1],s=this.styleIndices_.length-1;s>=0;--s)for(l=this.styles_[s],this.setStrokeStyle_(t,l[0],l[1],l[2]),u=this.styleIndices_[s];c>=0&&this.startIndices[c]>=u;){if(a=this.startIndices[c],void 0===i[o(p=this.startIndicesFeature[c])]&&p.getGeometry()&&(void 0===n||Pt(n,p.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,a,h);var d=r(p);if(d)return d}c--,h=a}},e.prototype.setStrokeStyle_=function(t,e,i,r){t.uniform4fv(this.defaultLocations_.u_color,e),t.uniform1f(this.defaultLocations_.u_lineWidth,i),t.uniform1f(this.defaultLocations_.u_miterLimit,r)},e.prototype.setFillStrokeStyle=function(t,e){var i=e.getLineCap();this.state_.lineCap=void 0!==i?i:"round";var r=e.getLineDash();this.state_.lineDash=r||yh;var n=e.getLineDashOffset();this.state_.lineDashOffset=n||0;var o=e.getLineJoin();this.state_.lineJoin=void 0!==o?o:"round";var s=e.getColor();s=s instanceof CanvasGradient||s instanceof CanvasPattern?vh:_r(s).map(function(t,e){return 3!=e?t/255:t})||vh;var a=e.getWidth();a=void 0!==a?a:1;var h=e.getMiterLimit();h=void 0!==h?h:10,this.state_.strokeColor&&Z(this.state_.strokeColor,s)&&this.state_.lineWidth===a&&this.state_.miterLimit===h||(this.state_.changed=!0,this.state_.strokeColor=s,this.state_.lineWidth=a,this.state_.miterLimit=h,this.styles_.push([s,a,h]))},e}(_h),Hh=new lh("precision mediump float;\n\n\n\nuniform vec4 u_color;\nuniform float u_opacity;\n\nvoid main(void) {\n  gl_FragColor = u_color;\n  float alpha = u_color.a * u_opacity;\n  if (alpha == 0.0) {\n    discard;\n  }\n  gl_FragColor.a = alpha;\n}\n"),Zh=new uh("\n\nattribute vec2 a_position;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\n}\n\n\n"),qh=function(t,e){this.u_projectionMatrix=t.getUniformLocation(e,"u_projectionMatrix"),this.u_offsetScaleMatrix=t.getUniformLocation(e,"u_offsetScaleMatrix"),this.u_offsetRotateMatrix=t.getUniformLocation(e,"u_offsetRotateMatrix"),this.u_color=t.getUniformLocation(e,"u_color"),this.u_opacity=t.getUniformLocation(e,"u_opacity"),this.a_position=t.getAttribLocation(e,"a_position")},Jh=function(t){this.first_,this.last_,this.head_,this.circular_=void 0===t||t,this.length_=0};Jh.prototype.insertItem=function(t){var e={prev:void 0,next:void 0,data:t},i=this.head_;if(i){var r=i.next;e.prev=i,e.next=r,i.next=e,r&&(r.prev=e),i===this.last_&&(this.last_=e)}else this.first_=e,this.last_=e,this.circular_&&(e.next=e,e.prev=e);this.head_=e,this.length_++},Jh.prototype.removeItem=function(){var t=this.head_;if(t){var e=t.next,i=t.prev;e&&(e.prev=i),i&&(i.next=e),this.head_=e||i,this.first_===this.last_?(this.head_=void 0,this.first_=void 0,this.last_=void 0):this.first_===t?this.first_=this.head_:this.last_===t&&(this.last_=i?this.head_.prev:this.head_),this.length_--}},Jh.prototype.firstItem=function(){if(this.head_=this.first_,this.head_)return this.head_.data},Jh.prototype.lastItem=function(){if(this.head_=this.last_,this.head_)return this.head_.data},Jh.prototype.nextItem=function(){if(this.head_&&this.head_.next)return this.head_=this.head_.next,this.head_.data},Jh.prototype.getNextItem=function(){if(this.head_&&this.head_.next)return this.head_.next.data},Jh.prototype.prevItem=function(){if(this.head_&&this.head_.prev)return this.head_=this.head_.prev,this.head_.data},Jh.prototype.getPrevItem=function(){if(this.head_&&this.head_.prev)return this.head_.prev.data},Jh.prototype.getCurrItem=function(){if(this.head_)return this.head_.data},Jh.prototype.setFirstItem=function(){this.circular_&&this.head_&&(this.first_=this.head_,this.last_=this.head_.prev)},Jh.prototype.concat=function(t){if(t.head_){if(this.head_){var e=this.head_.next;this.head_.next=t.first_,t.first_.prev=this.head_,e.prev=t.last_,t.last_.next=e,this.length_+=t.length_}else this.head_=t.head_,this.first_=t.first_,this.last_=t.last_,this.length_=t.length_;t.head_=void 0,t.first_=void 0,t.last_=void 0,t.length_=0}},Jh.prototype.getLength=function(){return this.length_};var Qh=Jh,$h=function(t){this.rbush_=ua()(t,void 0),this.items_={}};$h.prototype.insert=function(t,e){var i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[o(e)]=i},$h.prototype.load=function(t,e){for(var i=new Array(e.length),r=0,n=e.length;r<n;r++){var s=t[r],a=e[r],h={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:a};i[r]=h,this.items_[o(a)]=h}this.rbush_.load(i)},$h.prototype.remove=function(t){var e=o(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)},$h.prototype.update=function(t,e){var i=this.items_[o(e)];dt([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))},$h.prototype.getAll=function(){return this.rbush_.all().map(function(t){return t.value})},$h.prototype.getInExtent=function(t){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})},$h.prototype.forEach=function(t,e){return this.forEach_(this.getAll(),t,e)},$h.prototype.forEachInExtent=function(t,e,i){return this.forEach_(this.getInExtent(t),e,i)},$h.prototype.forEach_=function(t,e,i){for(var r,n=0,o=t.length;n<o;n++)if(r=e.call(i,t[n]))return r;return r},$h.prototype.isEmpty=function(){return d(this.items_)},$h.prototype.clear=function(){this.rbush_.clear(),this.items_={}},$h.prototype.getExtent=function(t){var e=this.rbush_.toJSON();return lt(e.minX,e.minY,e.maxX,e.maxY,t)},$h.prototype.concat=function(t){for(var e in this.rbush_.load(t.rbush_.all()),t.items_)this.items_[e]=t.items_[e]};var tl=$h,el=function(t){function e(e,i){t.call(this,e,i),this.lineStringReplay=new Kh(e,i),this.defaultLocations_=null,this.styles_=[],this.styleIndices_=[],this.state_={fillColor:null,changed:!1}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawCoordinates_=function(t,e,i){var r=new Qh,n=new tl;this.processFlatCoordinates_(t,i,r,n,!0);var o=this.getMaxCoords_(r);if(e.length){var s,a,h=[];for(s=0,a=e.length;s<a;++s){var l={list:new Qh,maxCoords:void 0,rtree:new tl};h.push(l),this.processFlatCoordinates_(e[s],i,l.list,l.rtree,!1),this.classifyPoints_(l.list,l.rtree,!0),l.maxCoords=this.getMaxCoords_(l.list)}for(h.sort(function(t,e){return e.maxCoords[0]===t.maxCoords[0]?t.maxCoords[1]-e.maxCoords[1]:e.maxCoords[0]-t.maxCoords[0]}),s=0;s<h.length;++s){var u=h[s].list,p=u.firstItem(),c=p,d=void 0;do{if(this.getIntersections_(c,n).length){d=!0;break}c=u.nextItem()}while(p!==c);d||this.bridgeHole_(u,h[s].maxCoords[0],r,o[0],n)&&(n.concat(h[s].rtree),this.classifyPoints_(r,n,!1))}}else this.classifyPoints_(r,n,!1);this.triangulate_(r,n)},e.prototype.processFlatCoordinates_=function(t,e,i,r,n){var o,s,a,h,l,u=Si(t,0,t.length,e),p=this.vertices.length/2,c=[],d=[];if(n===u){for(h=a=this.createPoint_(t[0],t[1],p++),o=e,s=t.length;o<s;o+=e)l=this.createPoint_(t[o],t[o+1],p++),d.push(this.insertItem_(h,l,i)),c.push([Math.min(h.x,l.x),Math.min(h.y,l.y),Math.max(h.x,l.x),Math.max(h.y,l.y)]),h=l;d.push(this.insertItem_(l,a,i)),c.push([Math.min(h.x,l.x),Math.min(h.y,l.y),Math.max(h.x,l.x),Math.max(h.y,l.y)])}else{var f=t.length-e;for(h=a=this.createPoint_(t[f],t[f+1],p++),o=f-e,s=0;o>=s;o-=e)l=this.createPoint_(t[o],t[o+1],p++),d.push(this.insertItem_(h,l,i)),c.push([Math.min(h.x,l.x),Math.min(h.y,l.y),Math.max(h.x,l.x),Math.max(h.y,l.y)]),h=l;d.push(this.insertItem_(l,a,i)),c.push([Math.min(h.x,l.x),Math.min(h.y,l.y),Math.max(h.x,l.x),Math.max(h.y,l.y)])}r.load(c,d)},e.prototype.getMaxCoords_=function(t){var e=t.firstItem(),i=e,r=[i.p0.x,i.p0.y];do{(i=t.nextItem()).p0.x>r[0]&&(r=[i.p0.x,i.p0.y])}while(i!==e);return r},e.prototype.classifyPoints_=function(t,e,i){var r=t.firstItem(),n=r,o=t.nextItem(),s=!1;do{var a=i?xh(o.p1.x,o.p1.y,n.p1.x,n.p1.y,n.p0.x,n.p0.y):xh(n.p0.x,n.p0.y,n.p1.x,n.p1.y,o.p1.x,o.p1.y);void 0===a?(this.removeItem_(n,o,t,e),s=!0,o===r&&(r=t.getNextItem()),o=n,t.prevItem()):n.p1.reflex!==a&&(n.p1.reflex=a,s=!0),n=o,o=t.nextItem()}while(n!==r);return s},e.prototype.bridgeHole_=function(t,e,i,r,n){for(var o=t.firstItem();o.p1.x!==e;)o=t.nextItem();var s,a,h,l,u=o.p1,p={x:r,y:u.y,i:-1},c=1/0,d=this.getIntersections_({p0:u,p1:p},n,!0);for(s=0,a=d.length;s<a;++s){var f=d[s],_=this.calculateIntersection_(u,p,f.p0,f.p1,!0),g=Math.abs(u.x-_[0]);g<c&&void 0!==xh(u.x,u.y,f.p0.x,f.p0.y,f.p1.x,f.p1.y)&&(c=g,l={x:_[0],y:_[1],i:-1},o=f)}if(c===1/0)return!1;if(h=o.p1,c>0){var y=this.getPointsInTriangle_(u,l,o.p1,n);if(y.length){var v=1/0;for(s=0,a=y.length;s<a;++s){var m=y[s],x=Math.atan2(u.y-m.y,p.x-m.x);(x<v||x===v&&m.x<h.x)&&(v=x,h=m)}}}for(o=i.firstItem();o.p1.x!==h.x||o.p1.y!==h.y;)o=i.nextItem();var E={x:u.x,y:u.y,i:u.i,reflex:void 0},S={x:o.p1.x,y:o.p1.y,i:o.p1.i,reflex:void 0};return t.getNextItem().p0=E,this.insertItem_(u,o.p1,t,n),this.insertItem_(S,E,t,n),o.p1=S,t.setFirstItem(),i.concat(t),!0},e.prototype.triangulate_=function(t,e){for(var i=!1,r=this.isSimple_(t,e);t.getLength()>3;)if(r){if(!this.clipEars_(t,e,r,i)&&!this.classifyPoints_(t,e,i)&&!this.resolveSelfIntersections_(t,e,!0))break}else if(!this.clipEars_(t,e,r,i)&&!this.classifyPoints_(t,e,i)&&!this.resolveSelfIntersections_(t,e)){if(!(r=this.isSimple_(t,e))){this.splitPolygon_(t,e);break}i=!this.isClockwise_(t),this.classifyPoints_(t,e,i)}if(3===t.getLength()){var n=this.indices.length;this.indices[n++]=t.getPrevItem().p0.i,this.indices[n++]=t.getCurrItem().p0.i,this.indices[n++]=t.getNextItem().p0.i}},e.prototype.clipEars_=function(t,e,i,r){var n,o,s,a=this.indices.length,h=t.firstItem(),l=t.getPrevItem(),u=h,p=t.nextItem(),c=t.getNextItem(),d=!1;do{if(n=u.p0,o=u.p1,s=p.p1,!1===o.reflex){var f=void 0;f=i?0===this.getPointsInTriangle_(n,o,s,e,!0).length:r?this.diagonalIsInside_(c.p1,s,o,n,l.p0):this.diagonalIsInside_(l.p0,n,o,s,c.p1),(i||0===this.getIntersections_({p0:n,p1:s},e).length)&&f&&(i||!1===n.reflex||!1===s.reflex||Si([l.p0.x,l.p0.y,n.x,n.y,o.x,o.y,s.x,s.y,c.p1.x,c.p1.y],0,10,2)===!r)&&(this.indices[a++]=n.i,this.indices[a++]=o.i,this.indices[a++]=s.i,this.removeItem_(u,p,t,e),p===h&&(h=c),d=!0)}l=t.getPrevItem(),u=t.getCurrItem(),p=t.nextItem(),c=t.getNextItem()}while(u!==h&&t.getLength()>3);return d},e.prototype.resolveSelfIntersections_=function(t,e,i){var r=t.firstItem();t.nextItem();var n=r,o=t.nextItem(),s=!1;do{var a=this.calculateIntersection_(n.p0,n.p1,o.p0,o.p1,i);if(a){var h=!1,l=this.vertices.length,u=this.indices.length,p=l/2,c=t.prevItem();t.removeItem(),e.remove(c),h=c===r;var d=void 0;if(i?(a[0]===n.p0.x&&a[1]===n.p0.y?(t.prevItem(),d=n.p0,o.p0=d,e.remove(n),h=h||n===r):(d=o.p1,n.p1=d,e.remove(o),h=h||o===r),t.removeItem()):(d=this.createPoint_(a[0],a[1],p),n.p1=d,o.p0=d,e.update([Math.min(n.p0.x,n.p1.x),Math.min(n.p0.y,n.p1.y),Math.max(n.p0.x,n.p1.x),Math.max(n.p0.y,n.p1.y)],n),e.update([Math.min(o.p0.x,o.p1.x),Math.min(o.p0.y,o.p1.y),Math.max(o.p0.x,o.p1.x),Math.max(o.p0.y,o.p1.y)],o)),this.indices[u++]=c.p0.i,this.indices[u++]=c.p1.i,this.indices[u++]=d.i,s=!0,h)break}n=t.getPrevItem(),o=t.nextItem()}while(n!==r);return s},e.prototype.isSimple_=function(t,e){var i=t.firstItem(),r=i;do{if(this.getIntersections_(r,e).length)return!1;r=t.nextItem()}while(r!==i);return!0},e.prototype.isClockwise_=function(t){var e=2*t.getLength(),i=new Array(e),r=t.firstItem(),n=r,o=0;do{i[o++]=n.p0.x,i[o++]=n.p0.y,n=t.nextItem()}while(n!==r);return Si(i,0,e,2)},e.prototype.splitPolygon_=function(t,e){var i=t.firstItem(),r=i;do{var n=this.getIntersections_(r,e);if(n.length){var o=n[0],s=this.vertices.length/2,a=this.calculateIntersection_(r.p0,r.p1,o.p0,o.p1),h=this.createPoint_(a[0],a[1],s),l=new Qh,u=new tl;this.insertItem_(h,r.p1,l,u),r.p1=h,e.update([Math.min(r.p0.x,h.x),Math.min(r.p0.y,h.y),Math.max(r.p0.x,h.x),Math.max(r.p0.y,h.y)],r);for(var p=t.nextItem();p!==o;)this.insertItem_(p.p0,p.p1,l,u),e.remove(p),t.removeItem(),p=t.getCurrItem();this.insertItem_(o.p0,h,l,u),o.p0=h,e.update([Math.min(o.p1.x,h.x),Math.min(o.p1.y,h.y),Math.max(o.p1.x,h.x),Math.max(o.p1.y,h.y)],o),this.classifyPoints_(t,e,!1),this.triangulate_(t,e),this.classifyPoints_(l,u,!1),this.triangulate_(l,u);break}r=t.nextItem()}while(r!==i)},e.prototype.createPoint_=function(t,e,i){var r=this.vertices.length;return this.vertices[r++]=t,this.vertices[r++]=e,{x:t,y:e,i:i,reflex:void 0}},e.prototype.insertItem_=function(t,e,i,r){var n={p0:t,p1:e};return i.insertItem(n),r&&r.insert([Math.min(t.x,e.x),Math.min(t.y,e.y),Math.max(t.x,e.x),Math.max(t.y,e.y)],n),n},e.prototype.removeItem_=function(t,e,i,r){i.getCurrItem()===e&&(i.removeItem(),t.p1=e.p1,r.remove(e),r.update([Math.min(t.p0.x,t.p1.x),Math.min(t.p0.y,t.p1.y),Math.max(t.p0.x,t.p1.x),Math.max(t.p0.y,t.p1.y)],t))},e.prototype.getPointsInTriangle_=function(t,e,i,r,n){for(var o=[],s=r.getInExtent([Math.min(t.x,e.x,i.x),Math.min(t.y,e.y,i.y),Math.max(t.x,e.x,i.x),Math.max(t.y,e.y,i.y)]),a=0,h=s.length;a<h;++a)for(var l in s[a]){var u=s[a][l];"object"!=typeof u||n&&!u.reflex||u.x===t.x&&u.y===t.y||u.x===e.x&&u.y===e.y||u.x===i.x&&u.y===i.y||-1!==o.indexOf(u)||!fi([t.x,t.y,e.x,e.y,i.x,i.y],0,6,2,u.x,u.y)||o.push(u)}return o},e.prototype.getIntersections_=function(t,e,i){for(var r=t.p0,n=t.p1,o=e.getInExtent([Math.min(r.x,n.x),Math.min(r.y,n.y),Math.max(r.x,n.x),Math.max(r.y,n.y)]),s=[],a=0,h=o.length;a<h;++a){var l=o[a];t!==l&&(i||l.p0!==n||l.p1!==r)&&this.calculateIntersection_(r,n,l.p0,l.p1,i)&&s.push(l)}return s},e.prototype.calculateIntersection_=function(t,e,i,r,n){var o=(r.y-i.y)*(e.x-t.x)-(r.x-i.x)*(e.y-t.y);if(0!==o){var s=((r.x-i.x)*(t.y-i.y)-(r.y-i.y)*(t.x-i.x))/o,a=((e.x-t.x)*(t.y-i.y)-(e.y-t.y)*(t.x-i.x))/o;if(!n&&s>mh&&s<1-mh&&a>mh&&a<1-mh||n&&s>=0&&s<=1&&a>=0&&a<=1)return[t.x+s*(e.x-t.x),t.y+s*(e.y-t.y)]}},e.prototype.diagonalIsInside_=function(t,e,i,r,n){if(void 0===e.reflex||void 0===r.reflex)return!1;var o=(i.x-r.x)*(e.y-r.y)>(i.y-r.y)*(e.x-r.x),s=(n.x-r.x)*(e.y-r.y)<(n.y-r.y)*(e.x-r.x),a=(t.x-e.x)*(r.y-e.y)>(t.y-e.y)*(r.x-e.x),h=(i.x-e.x)*(r.y-e.y)<(i.y-e.y)*(r.x-e.x),l=r.reflex?s||o:s&&o,u=e.reflex?h||a:h&&a;return l&&u},e.prototype.drawMultiPolygon=function(t,e){var i,r,n,o,s=t.getEndss(),a=t.getStride(),h=this.indices.length,l=this.lineStringReplay.getCurrentIndex(),u=t.getFlatCoordinates(),p=0;for(i=0,r=s.length;i<r;++i){var c=s[i];if(c.length>0){var d=Dt(u,p,c[0],a,-this.origin[0],-this.origin[1]);if(d.length){var f=[],_=void 0;for(n=1,o=c.length;n<o;++n)c[n]!==c[n-1]&&(_=Dt(u,c[n-1],c[n],a,-this.origin[0],-this.origin[1]),f.push(_));this.lineStringReplay.drawPolygonCoordinates(d,f,a),this.drawCoordinates_(d,f,a)}}p=c[c.length-1]}this.indices.length>h&&(this.startIndices.push(h),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(h),this.state_.changed=!1)),this.lineStringReplay.getCurrentIndex()>l&&this.lineStringReplay.setPolygonStyle(e,l)},e.prototype.drawPolygon=function(t,e){var i=t.getEnds(),r=t.getStride();if(i.length>0){var n=t.getFlatCoordinates().map(Number),o=Dt(n,0,i[0],r,-this.origin[0],-this.origin[1]);if(o.length){var s,a,h,l=[];for(s=1,a=i.length;s<a;++s)i[s]!==i[s-1]&&(h=Dt(n,i[s-1],i[s],r,-this.origin[0],-this.origin[1]),l.push(h));this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e),this.state_.changed&&(this.styleIndices_.push(this.indices.length),this.state_.changed=!1),this.lineStringReplay.setPolygonStyle(e),this.lineStringReplay.drawPolygonCoordinates(o,l,r),this.drawCoordinates_(o,l,r)}}},e.prototype.finish=function(t){this.verticesBuffer=new Th(this.vertices),this.indicesBuffer=new Th(this.indices),this.startIndices.push(this.indices.length),this.lineStringReplay.finish(t),0===this.styleIndices_.length&&this.styles_.length>0&&(this.styles_=[]),this.vertices=null,this.indices=null},e.prototype.getDeleteResourcesFunction=function(t){var e=this.verticesBuffer,i=this.indicesBuffer,r=this.lineStringReplay.getDeleteResourcesFunction(t);return function(){t.deleteBuffer(e),t.deleteBuffer(i),r()}},e.prototype.setUpProgram=function(t,e,i,r){var n,o=e.getProgram(Hh,Zh);return this.defaultLocations_?n=this.defaultLocations_:(n=new qh(t,o),this.defaultLocations_=n),e.useProgram(o),t.enableVertexAttribArray(n.a_position),t.vertexAttribPointer(n.a_position,2,5126,!1,8,0),n},e.prototype.shutDownProgram=function(t,e){t.disableVertexAttribArray(e.a_position)},e.prototype.drawReplay=function(t,e,i,r){var n,o,s,a,h=t.getParameter(t.DEPTH_FUNC),l=t.getParameter(t.DEPTH_WRITEMASK);if(r||(t.enable(t.DEPTH_TEST),t.depthMask(!0),t.depthFunc(t.NOTEQUAL)),d(i))for(s=this.startIndices[this.startIndices.length-1],n=this.styleIndices_.length-1;n>=0;--n)o=this.styleIndices_[n],a=this.styles_[n],this.setFillStyle_(t,a),this.drawElements(t,e,o,s),s=o;else this.drawReplaySkipping_(t,e,i);r||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(l),t.depthFunc(h))},e.prototype.drawHitDetectionReplayOneByOne=function(t,e,i,r,n){var s,a,h,l,u,p,c;for(c=this.startIndices.length-2,h=this.startIndices[c+1],s=this.styleIndices_.length-1;s>=0;--s)for(l=this.styles_[s],this.setFillStyle_(t,l),u=this.styleIndices_[s];c>=0&&this.startIndices[c]>=u;){if(a=this.startIndices[c],void 0===i[o(p=this.startIndicesFeature[c])]&&p.getGeometry()&&(void 0===n||Pt(n,p.getGeometry().getExtent()))){t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),this.drawElements(t,e,a,h);var d=r(p);if(d)return d}c--,h=a}},e.prototype.drawReplaySkipping_=function(t,e,i){var r,n,s,a,h,l,u;for(l=this.startIndices.length-2,s=n=this.startIndices[l+1],r=this.styleIndices_.length-1;r>=0;--r){for(a=this.styles_[r],this.setFillStyle_(t,a),h=this.styleIndices_[r];l>=0&&this.startIndices[l]>=h;)u=this.startIndices[l],i[o(this.startIndicesFeature[l])]&&(n!==s&&(this.drawElements(t,e,n,s),t.clear(t.DEPTH_BUFFER_BIT)),s=u),l--,n=u;n!==s&&(this.drawElements(t,e,n,s),t.clear(t.DEPTH_BUFFER_BIT)),n=s=h}},e.prototype.setFillStyle_=function(t,e){t.uniform4fv(this.defaultLocations_.u_color,e)},e.prototype.setFillStrokeStyle=function(t,e){var i=t?t.getColor():[0,0,0,0];if(i=i instanceof CanvasGradient||i instanceof CanvasPattern?gh:_r(i).map(function(t,e){return 3!=e?t/255:t})||gh,this.state_.fillColor&&Z(i,this.state_.fillColor)||(this.state_.fillColor=i,this.state_.changed=!0,this.styles_.push(i)),e)this.lineStringReplay.setFillStrokeStyle(null,e);else{var r=new Er({color:[0,0,0,0],width:0});this.lineStringReplay.setFillStrokeStyle(null,r)}},e}(_h),il=function(t,e){this.space_=e,this.emptyBlocks_=[{x:0,y:0,width:t,height:t}],this.entries_={},this.context_=Jn(t,t),this.canvas_=this.context_.canvas};il.prototype.get=function(t){return this.entries_[t]||null},il.prototype.add=function(t,e,i,r,n){for(var o=0,s=this.emptyBlocks_.length;o<s;++o){var a=this.emptyBlocks_[o];if(a.width>=e+this.space_&&a.height>=i+this.space_){var h={offsetX:a.x+this.space_,offsetY:a.y+this.space_,image:this.canvas_};return this.entries_[t]=h,r.call(n,this.context_,a.x+this.space_,a.y+this.space_),this.split_(o,a,e+this.space_,i+this.space_),h}}return null},il.prototype.split_=function(t,e,i,r){var n,o;e.width-i>e.height-r?(n={x:e.x+i,y:e.y,width:e.width-i,height:e.height},o={x:e.x,y:e.y+r,width:i,height:e.height-r},this.updateBlocks_(t,n,o)):(n={x:e.x+i,y:e.y,width:e.width-i,height:r},o={x:e.x,y:e.y+r,width:e.width,height:e.height-r},this.updateBlocks_(t,n,o))},il.prototype.updateBlocks_=function(t,e,i){var r=[t,1];e.width>0&&e.height>0&&r.push(e),i.width>0&&i.height>0&&r.push(i),this.emptyBlocks_.splice.apply(this.emptyBlocks_,r)};var rl=il,nl=function(t){var e=t||{};this.currentSize_=void 0!==e.initialSize?e.initialSize:256,this.maxSize_=void 0!==e.maxSize?e.maxSize:void 0!==nh?nh:2048,this.space_=void 0!==e.space?e.space:1,this.atlases_=[new rl(this.currentSize_,this.space_)],this.currentHitSize_=this.currentSize_,this.hitAtlases_=[new rl(this.currentHitSize_,this.space_)]};nl.prototype.getInfo=function(t){var e=this.getInfo_(this.atlases_,t);if(!e)return null;var i=this.getInfo_(this.hitAtlases_,t);return this.mergeInfos_(e,i)},nl.prototype.getInfo_=function(t,e){for(var i=0,r=t.length;i<r;++i){var n=t[i].get(e);if(n)return n}return null},nl.prototype.mergeInfos_=function(t,e){return{offsetX:t.offsetX,offsetY:t.offsetY,image:t.image,hitImage:e.image}},nl.prototype.add=function(t,e,i,r,n,o){if(e+this.space_>this.maxSize_||i+this.space_>this.maxSize_)return null;var s=this.add_(!1,t,e,i,r,o);if(!s)return null;var a=void 0!==n?n:I,h=this.add_(!0,t,e,i,a,o);return this.mergeInfos_(s,h)},nl.prototype.add_=function(t,e,i,r,n,o){var s,a,h,l,u=t?this.hitAtlases_:this.atlases_;for(h=0,l=u.length;h<l;++h){if(a=(s=u[h]).add(e,i,r,n,o))return a;if(!a&&h===l-1){var p=void 0;t?(p=Math.min(2*this.currentHitSize_,this.maxSize_),this.currentHitSize_=p):(p=Math.min(2*this.currentSize_,this.maxSize_),this.currentSize_=p),s=new rl(p,this.space_),u.push(s),++l}}return null};var ol=nl,sl=[1,1],al={Circle:Ch,Image:Ah,LineString:Kh,Polygon:el,Text:function(t){function e(e,i){t.call(this,e,i),this.images_=[],this.textures_=[],this.measureCanvas_=Jn(0,0).canvas,this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0},this.text_="",this.textAlign_=void 0,this.textBaseline_=void 0,this.offsetX_=void 0,this.offsetY_=void 0,this.atlases_={},this.currAtlas_=void 0,this.scale=1,this.opacity=1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText=function(t,e){if(this.text_){var i=null,r=2,n=2;switch(t.getType()){case Nt.POINT:case Nt.MULTI_POINT:r=(i=t.getFlatCoordinates()).length,n=t.getStride();break;case Nt.CIRCLE:i=t.getCenter();break;case Nt.LINE_STRING:i=t.getFlatMidpoint();break;case Nt.MULTI_LINE_STRING:r=(i=t.getFlatMidpoints()).length;break;case Nt.POLYGON:i=t.getFlatInteriorPoint();break;case Nt.MULTI_POLYGON:r=(i=t.getFlatInteriorPoints()).length}this.startIndices.push(this.indices.length),this.startIndicesFeature.push(e);var s,a,h,l,u,p,c,d,f=this.currAtlas_,_=this.text_.split("\n"),g=this.getTextSize_(_),y=Math.round(g[0]*this.textAlign_-this.offsetX_),v=Math.round(g[1]*this.textBaseline_-this.offsetY_),m=this.state_.lineWidth/2*this.state_.scale;for(s=0,a=_.length;s<a;++s)for(u=0,p=f.height*s,h=0,l=(c=_[s].split("")).length;h<l;++h){if(d=f.atlas.getInfo(c[h])){var x=d.image;if(this.anchorX=y-u,this.anchorY=v-p,this.originX=0===h?d.offsetX-m:d.offsetX,this.originY=d.offsetY,this.height=f.height,this.width=0===h||h===c.length-1?f.width[c[h]]+m:f.width[c[h]],this.imageHeight=x.height,this.imageWidth=x.width,0===this.images_.length)this.images_.push(x);else o(this.images_[this.images_.length-1])!=o(x)&&(this.groupIndices.push(this.indices.length),this.images_.push(x));this.drawText_(i,0,r,n)}u+=this.width}}},e.prototype.getTextSize_=function(t){var e=this,i=this.currAtlas_,r=t.length*i.height;return[t.map(function(t){for(var r=0,n=0,o=t.length;n<o;++n){var s=t[n];i.width[s]||e.addCharToAtlas_(s),r+=i.width[s]?i.width[s]:0}return r}).reduce(function(t,e){return Math.max(t,e)}),r]},e.prototype.drawText_=function(t,e,i,r){for(var n=e,o=i;n<o;n+=r)this.drawCoordinates(t,e,i,r)},e.prototype.addCharToAtlas_=function(t){if(1===t.length){var e=this.currAtlas_,i=this.state_,r=this.measureCanvas_.getContext("2d");r.font=i.font;var n=Math.ceil(r.measureText(t).width*i.scale);e.atlas.add(t,n,e.height,function(e,r,n){e.font=i.font,e.fillStyle=i.fillColor,e.strokeStyle=i.strokeColor,e.lineWidth=i.lineWidth,e.lineCap=i.lineCap,e.lineJoin=i.lineJoin,e.miterLimit=i.miterLimit,e.textAlign="left",e.textBaseline="top",ki&&i.lineDash&&(e.setLineDash(i.lineDash),e.lineDashOffset=i.lineDashOffset),1!==i.scale&&e.setTransform(i.scale,0,0,i.scale,0,0),i.strokeColor&&e.strokeText(t,r,n),i.fillColor&&e.fillText(t,r,n)})&&(e.width[t]=n)}},e.prototype.finish=function(e){var i=e.getGL();this.groupIndices.push(this.indices.length),this.hitDetectionGroupIndices=this.groupIndices,this.verticesBuffer=new Th(this.vertices),this.indicesBuffer=new Th(this.indices);this.createTextures(this.textures_,this.images_,{},i),this.state_={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:0,miterLimit:void 0,fillColor:null,font:void 0,scale:void 0},this.text_="",this.textAlign_=void 0,this.textBaseline_=void 0,this.offsetX_=void 0,this.offsetY_=void 0,this.images_=null,this.atlases_={},this.currAtlas_=void 0,t.prototype.finish.call(this,e)},e.prototype.setTextStyle=function(t){var e=this.state_,i=t.getFill(),r=t.getStroke();if(t&&t.getText()&&(i||r)){if(i){var n=i.getColor();e.fillColor=Ys(n||gh)}else e.fillColor=null;if(r){var o=r.getColor();e.strokeColor=Ys(o||vh),e.lineWidth=r.getWidth()||1,e.lineCap=r.getLineCap()||"round",e.lineDashOffset=r.getLineDashOffset()||0,e.lineJoin=r.getLineJoin()||"round",e.miterLimit=r.getMiterLimit()||10;var s=r.getLineDash();e.lineDash=s?s.slice():yh}else e.strokeColor=null,e.lineWidth=0;e.font=t.getFont()||"10px sans-serif",e.scale=t.getScale()||1,this.text_=t.getText();var a=Sa[t.getTextAlign()],h=Sa[t.getTextBaseline()];this.textAlign_=void 0===a?.5:a,this.textBaseline_=void 0===h?.5:h,this.offsetX_=t.getOffsetX()||0,this.offsetY_=t.getOffsetY()||0,this.rotateWithView=!!t.getRotateWithView(),this.rotation=t.getRotation()||0,this.currAtlas_=this.getAtlas_(e)}else this.text_=""},e.prototype.getAtlas_=function(t){var e=[];for(var i in t)(t[i]||0===t[i])&&(Array.isArray(t[i])?e=e.concat(t[i]):e.push(t[i]));var r=this.calculateHash_(e);if(!this.atlases_[r]){var n=this.measureCanvas_.getContext("2d");n.font=t.font;var o=Math.ceil((1.5*n.measureText("M").width+t.lineWidth/2)*t.scale);this.atlases_[r]={atlas:new ol({space:t.lineWidth+1}),width:{},height:o}}return this.atlases_[r]},e.prototype.calculateHash_=function(t){for(var e="",i=0,r=t.length;i<r;++i)e+=t[i];return e},e.prototype.getTextures=function(t){return this.textures_},e.prototype.getHitDetectionTextures=function(){return this.textures_},e}(Fh)},hl=function(t){function e(e,i,r){t.call(this),this.maxExtent_=i,this.tolerance_=e,this.renderBuffer_=r,this.replaysByZIndex_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addDeclutter=function(t){return[]},e.prototype.getDeleteResourcesFunction=function(t){var e,i=[];for(e in this.replaysByZIndex_){var r=this.replaysByZIndex_[e];for(var n in r)i.push(r[n].getDeleteResourcesFunction(t))}return function(){for(var t,e=arguments,r=i.length,n=0;n<r;n++)t=i[n].apply(this,e);return t}},e.prototype.finish=function(t){var e;for(e in this.replaysByZIndex_){var i=this.replaysByZIndex_[e];for(var r in i)i[r].finish(t)}},e.prototype.getReplay=function(t,e){var i=void 0!==t?t.toString():"0",r=this.replaysByZIndex_[i];void 0===r&&(r={},this.replaysByZIndex_[i]=r);var n=r[e];void 0===n&&(n=new(0,al[e])(this.tolerance_,this.maxExtent_),r[e]=n);return n},e.prototype.isEmpty=function(){return d(this.replaysByZIndex_)},e.prototype.replay=function(t,e,i,r,n,o,s,a){var h,l,u,p,c,d,f=Object.keys(this.replaysByZIndex_).map(Number);for(f.sort(V),h=0,l=f.length;h<l;++h)for(c=this.replaysByZIndex_[f[h].toString()],u=0,p=Ea.length;u<p;++u)d=c[Ea[u]],void 0!==d&&d.replay(t,e,i,r,n,o,s,a,void 0,!1)},e.prototype.replayHitDetection_=function(t,e,i,r,n,o,s,a,h,l,u){var p,c,d,f,_,g,y=Object.keys(this.replaysByZIndex_).map(Number);for(y.sort(function(t,e){return e-t}),p=0,c=y.length;p<c;++p)for(f=this.replaysByZIndex_[y[p].toString()],d=Ea.length-1;d>=0;--d)if(void 0!==(_=f[Ea[d]])&&(g=_.replay(t,e,i,r,n,o,s,a,h,l,u)))return g},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n,o,s,a,h,l){var u,p=e.getGL();return p.bindFramebuffer(p.FRAMEBUFFER,e.getHitDetectionFramebuffer()),void 0!==this.renderBuffer_&&(u=et(pt(t),r*this.renderBuffer_)),this.replayHitDetection_(e,t,r,n,sl,s,a,h,function(t){var e=new Uint8Array(4);if(p.readPixels(0,0,1,1,p.RGBA,p.UNSIGNED_BYTE,e),e[3]>0){var i=l(t);if(i)return i}},!0,u)},e.prototype.hasFeatureAtCoordinate=function(t,e,i,r,n,o,s,a,h){var l=e.getGL();return l.bindFramebuffer(l.FRAMEBUFFER,e.getHitDetectionFramebuffer()),void 0!==this.replayHitDetection_(e,t,r,n,sl,s,a,h,function(t){var e=new Uint8Array(4);return l.readPixels(0,0,1,1,l.RGBA,l.UNSIGNED_BYTE,e),e[3]>0},!1)},e}(ca),ll=function(t){function e(e,i,r,n,o,s,a){t.call(this),this.context_=e,this.center_=i,this.extent_=s,this.pixelRatio_=a,this.size_=o,this.rotation_=n,this.resolution_=r,this.imageStyle_=null,this.fillStyle_=null,this.strokeStyle_=null,this.textStyle_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.drawText_=function(t,e){var i=this.context_,r=t.getReplay(0,da.TEXT);r.setTextStyle(this.textStyle_),r.drawText(e,null),r.finish(i);r.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),r.getDeleteResourcesFunction(i)()},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.drawGeometry=function(t){switch(t.getType()){case Nt.POINT:this.drawPoint(t,null);break;case Nt.LINE_STRING:this.drawLineString(t,null);break;case Nt.POLYGON:this.drawPolygon(t,null);break;case Nt.MULTI_POINT:this.drawMultiPoint(t,null);break;case Nt.MULTI_LINE_STRING:this.drawMultiLineString(t,null);break;case Nt.MULTI_POLYGON:this.drawMultiPolygon(t,null);break;case Nt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t,null);break;case Nt.CIRCLE:this.drawCircle(t,null)}},e.prototype.drawFeature=function(t,e){var i=e.getGeometryFunction()(t);i&&Pt(this.extent_,i.getExtent())&&(this.setStyle(e),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t,e){var i,r,n=t.getGeometriesArray();for(i=0,r=n.length;i<r;++i)this.drawGeometry(n[i])},e.prototype.drawPoint=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.IMAGE);n.setImageStyle(this.imageStyle_),n.drawPoint(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawMultiPoint=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.IMAGE);n.setImageStyle(this.imageStyle_),n.drawMultiPoint(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawLineString=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.LINE_STRING);n.setFillStrokeStyle(null,this.strokeStyle_),n.drawLineString(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawMultiLineString=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.LINE_STRING);n.setFillStrokeStyle(null,this.strokeStyle_),n.drawMultiLineString(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawPolygon=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.POLYGON);n.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),n.drawPolygon(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawMultiPolygon=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.POLYGON);n.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),n.drawMultiPolygon(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.drawCircle=function(t,e){var i=this.context_,r=new hl(1,this.extent_),n=r.getReplay(0,da.CIRCLE);n.setFillStrokeStyle(this.fillStyle_,this.strokeStyle_),n.drawCircle(t,e),n.finish(i);n.replay(this.context_,this.center_,this.resolution_,this.rotation_,this.size_,this.pixelRatio_,1,{},void 0,!1),n.getDeleteResourcesFunction(i)(),this.textStyle_&&this.drawText_(r,t)},e.prototype.setImageStyle=function(t){this.imageStyle_=t},e.prototype.setFillStrokeStyle=function(t,e){this.fillStyle_=t,this.strokeStyle_=e},e.prototype.setTextStyle=function(t){this.textStyle_=t},e}(Vs),ul=new lh("precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform float u_opacity;\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  vec4 texColor = texture2D(u_texture, v_texCoord);\n  gl_FragColor.rgb = texColor.rgb;\n  gl_FragColor.a = texColor.a * u_opacity;\n}\n"),pl=new uh("varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\n\nuniform mat4 u_texCoordMatrix;\nuniform mat4 u_projectionMatrix;\n\nvoid main(void) {\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\n}\n\n\n"),cl=function(t,e){this.u_texCoordMatrix=t.getUniformLocation(e,"u_texCoordMatrix"),this.u_projectionMatrix=t.getUniformLocation(e,"u_projectionMatrix"),this.u_opacity=t.getUniformLocation(e,"u_opacity"),this.u_texture=t.getUniformLocation(e,"u_texture"),this.a_position=t.getAttribLocation(e,"a_position"),this.a_texCoord=t.getAttribLocation(e,"a_texCoord")},dl=function(t){function e(e,i){t.call(this,i),this.mapRenderer=e,this.arrayBuffer_=new Th([-1,-1,0,0,1,-1,1,0,-1,1,0,1,1,1,1,1]),this.texture=null,this.framebuffer=null,this.framebufferDimension=void 0,this.texCoordMatrix=[1,0,0,1,0,0],this.projectionMatrix=[1,0,0,1,0,0],this.tmpMat4_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.defaultLocations_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bindFramebuffer=function(t,e){var i=this.mapRenderer.getGL();if(void 0===this.framebufferDimension||this.framebufferDimension!=e){var r=function(t,e,i){t.isContextLost()||(t.deleteFramebuffer(e),t.deleteTexture(i))}.bind(null,i,this.framebuffer,this.texture);t.postRenderFunctions.push(r);var n=Ph(i,e,e),o=i.createFramebuffer();i.bindFramebuffer(36160,o),i.framebufferTexture2D(36160,36064,eh,n,0),this.texture=n,this.framebuffer=o,this.framebufferDimension=e}else i.bindFramebuffer(36160,this.framebuffer)},e.prototype.composeFrame=function(t,e,i){this.dispatchComposeEvent_(ur.PRECOMPOSE,i,t),i.bindBuffer(34962,this.arrayBuffer_);var r,n=i.getGL(),o=i.getProgram(ul,pl);this.defaultLocations_?r=this.defaultLocations_:(r=new cl(n,o),this.defaultLocations_=r),i.useProgram(o)&&(n.enableVertexAttribArray(r.a_position),n.vertexAttribPointer(r.a_position,2,5126,!1,16,0),n.enableVertexAttribArray(r.a_texCoord),n.vertexAttribPointer(r.a_texCoord,2,5126,!1,16,8),n.uniform1i(r.u_texture,0)),n.uniformMatrix4fv(r.u_texCoordMatrix,!1,fh(this.tmpMat4_,this.getTexCoordMatrix())),n.uniformMatrix4fv(r.u_projectionMatrix,!1,fh(this.tmpMat4_,this.getProjectionMatrix())),n.uniform1f(r.u_opacity,e.opacity),n.bindTexture(eh,this.getTexture()),n.drawArrays(5,0,4),this.dispatchComposeEvent_(ur.POSTCOMPOSE,i,t)},e.prototype.dispatchComposeEvent_=function(t,e,i){var r=this.getLayer();if(r.hasListener(t)){var n=i.viewState,o=n.resolution,s=i.pixelRatio,a=i.extent,h=n.center,l=n.rotation,u=i.size,p=new ll(e,h,o,l,u,a,s),c=new Cs(t,p,i,null,e);r.dispatchEvent(c)}},e.prototype.getTexCoordMatrix=function(){return this.texCoordMatrix},e.prototype.getTexture=function(){return this.texture},e.prototype.getProjectionMatrix=function(){return this.projectionMatrix},e.prototype.handleWebGLContextLost=function(){this.texture=null,this.framebuffer=null,this.framebufferDimension=void 0},e.prototype.prepareFrame=function(t,e,i){return r()},e.prototype.forEachLayerAtPixel=function(t,e,i,n){return r()},e}($s),fl=function(t){function e(e,i){t.call(this,e,i),this.image_=null,this.hitCanvasContext_=null,this.hitTransformationMatrix_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createTexture_=function(t){var e=t.getImage();return bh(this.mapRenderer.getGL(),e,33071,33071)},e.prototype.prepareFrame=function(t,e,i){var r=this.mapRenderer.getGL(),n=t.pixelRatio,o=t.viewState,s=o.center,a=o.resolution,h=o.rotation,l=this.image_,u=this.texture,p=this.getLayer().getSource(),c=t.viewHints,d=t.extent;if(void 0!==e.extent&&(d=wt(d,e.extent)),!c[kn]&&!c[jn]&&!bt(d)){var f=o.projection,_=p.getImage(d,a,n,f);if(_)if(this.loadImage(_)&&(l=_,u=this.createTexture_(_),this.texture)){var g=function(t,e){t.isContextLost()||t.deleteTexture(e)}.bind(null,r,this.texture);t.postRenderFunctions.push(g)}}if(l){var y=this.mapRenderer.getContext().getCanvas();this.updateProjectionMatrix_(y.width,y.height,n,s,a,h,l.getExtent()),this.hitTransformationMatrix_=null;var v=this.texCoordMatrix;Fe(v),je(v,1,-1),Ue(v,0,-1),this.image_=l,this.texture=u}return!!l},e.prototype.updateProjectionMatrix_=function(t,e,i,r,n,o,s){var a=t*n,h=e*n,l=this.projectionMatrix;Fe(l),je(l,2*i/a,2*i/h),ke(l,-o),Ue(l,s[0]-r[0],s[1]-r[1]),je(l,(s[2]-s[0])/2,(s[3]-s[1])/2),Ue(l,1,1)},e.prototype.forEachLayerAtPixel=function(t,e,i,r){if(this.image_&&this.image_.getImage()){var n=[this.image_.getImage().width,this.image_.getImage().height];this.hitTransformationMatrix_||(this.hitTransformationMatrix_=this.getHitTransformationMatrix_(e.size,n));var o=De(this.hitTransformationMatrix_,t.slice());if(!(o[0]<0||o[0]>n[0]||o[1]<0||o[1]>n[1])){this.hitCanvasContext_||(this.hitCanvasContext_=Jn(1,1)),this.hitCanvasContext_.clearRect(0,0,1,1),this.hitCanvasContext_.drawImage(this.image_.getImage(),o[0],o[1],1,1,0,0,1,1);var s=this.hitCanvasContext_.getImageData(0,0,1,1).data;return s[3]>0?i.call(r,this.getLayer(),s):void 0}}},e.prototype.getHitTransformationMatrix_=function(t,e){var i=[1,0,0,1,0,0];Ue(i,-1,-1),je(i,2/t[0],2/t[1]),Ue(i,0,t[1]),je(i,1,-1);var r=Be(this.projectionMatrix.slice()),n=[1,0,0,1,0,0];return Ue(n,0,e[1]),je(n,1,-1),je(n,e[0]/2,e[1]/2),Ue(n,1,1),Ae(n,r),Ae(n,i),n},e}(dl);fl.handles=function(t){return t.getType()===Ss.IMAGE},fl.create=function(t,e){return new fl(t,e)};var _l=fl,gl=function(t){function e(e){t.call(this,e);var i=e.getViewport();this.canvas_=document.createElement("canvas"),this.canvas_.style.width="100%",this.canvas_.style.height="100%",this.canvas_.style.display="block",this.canvas_.className=fo,i.insertBefore(this.canvas_,i.childNodes[0]||null),this.clipTileCanvasWidth_=0,this.clipTileCanvasHeight_=0,this.clipTileContext_=Jn(),this.renderedVisible_=!0,this.gl_=rh(this.canvas_,{antialias:!0,depth:!0,failIfMajorPerformanceCaveat:!0,preserveDrawingBuffer:!1,stencil:!0}),this.context_=new Mh(this.canvas_,this.gl_),v(this.canvas_,Lh.LOST,this.handleWebGLContextLost,this),v(this.canvas_,Lh.RESTORED,this.handleWebGLContextRestored,this),this.textureCache_=new Rs,this.focus_=null,this.tileTextureQueue_=new bn(function(t){var e=t[1],i=t[2],r=e[0]-this.focus_[0],n=e[1]-this.focus_[1];return 65536*Math.log(i)+Math.sqrt(r*r+n*n)/i}.bind(this),function(t){return t[0].getKey()}),this.loadNextTileTexture_=function(t,e){if(!this.tileTextureQueue_.isEmpty()){this.tileTextureQueue_.reprioritize();var i=this.tileTextureQueue_.dequeue(),r=i[0],n=i[3],o=i[4];this.bindTileTexture(r,n,o,Qa,Qa)}return!1}.bind(this),this.textureCacheFrameMarkerCount_=0,this.initializeGL_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.bindTileTexture=function(t,e,i,r,n){var o=this.getGL(),s=t.getKey();if(this.textureCache_.containsKey(s)){var a=this.textureCache_.get(s);o.bindTexture(eh,a.texture),a.magFilter!=r&&(o.texParameteri(eh,10240,r),a.magFilter=r),a.minFilter!=n&&(o.texParameteri(eh,10241,n),a.minFilter=n)}else{var h=o.createTexture(),l=t;if(o.bindTexture(eh,h),i>0){var u=this.clipTileContext_.canvas,p=this.clipTileContext_;this.clipTileCanvasWidth_!==e[0]||this.clipTileCanvasHeight_!==e[1]?(u.width=e[0],u.height=e[1],this.clipTileCanvasWidth_=e[0],this.clipTileCanvasHeight_=e[1]):p.clearRect(0,0,e[0],e[1]),p.drawImage(l.getImage(),i,i,e[0],e[1],0,0,e[0],e[1]),o.texImage2D(eh,0,6408,6408,5121,u)}else o.texImage2D(eh,0,6408,6408,5121,l.getImage());o.texParameteri(eh,10240,r),o.texParameteri(eh,10241,n),o.texParameteri(eh,$a,33071),o.texParameteri(eh,th,33071),this.textureCache_.set(s,{texture:h,magFilter:r,minFilter:n})}},e.prototype.dispatchRenderEvent=function(t,e){var i=this.getMap();if(i.hasListener(t)){var r=this.context_,n=e.extent,o=e.size,s=e.viewState,a=e.pixelRatio,h=s.resolution,l=s.center,u=s.rotation,p=new ll(r,l,h,u,o,n,a),c=new Cs(t,p,e,null,r);i.dispatchEvent(c)}},e.prototype.disposeInternal=function(){var e=this.getGL();e.isContextLost()||this.textureCache_.forEach(function(t){t&&e.deleteTexture(t.texture)}),this.context_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.expireCache_=function(t,e){for(var i,r=this.getGL();this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>1024;){if(i=this.textureCache_.peekLast())r.deleteTexture(i.texture);else{if(+this.textureCache_.peekLastKey()==e.index)break;--this.textureCacheFrameMarkerCount_}this.textureCache_.pop()}},e.prototype.getContext=function(){return this.context_},e.prototype.getGL=function(){return this.gl_},e.prototype.getTileTextureQueue=function(){return this.tileTextureQueue_},e.prototype.handleWebGLContextLost=function(t){t.preventDefault(),this.textureCache_.clear(),this.textureCacheFrameMarkerCount_=0;var e=this.getLayerRenderers();for(var i in e){e[i].handleWebGLContextLost()}},e.prototype.handleWebGLContextRestored=function(){this.initializeGL_(),this.getMap().render()},e.prototype.initializeGL_=function(){var t=this.gl_;t.activeTexture(33984),t.blendFuncSeparate(770,771,1,771),t.disable(2884),t.disable(2929),t.disable(3089),t.disable(2960)},e.prototype.isTileTextureLoaded=function(t){return this.textureCache_.containsKey(t.getKey())},e.prototype.renderFrame=function(t){var e=this.getContext(),i=this.getGL();if(i.isContextLost())return!1;if(!t)return this.renderedVisible_&&(this.canvas_.style.display="none",this.renderedVisible_=!1),!1;this.focus_=t.focus,this.textureCache_.set((-t.index).toString(),null),++this.textureCacheFrameMarkerCount_,this.dispatchRenderEvent(ur.PRECOMPOSE,t);var r=[],n=t.layerStatesArray;q(n,Zs);var o,s,a=t.viewState.resolution;for(o=0,s=n.length;o<s;++o){var h=n[o];if(mo(h,a)&&h.sourceState==ro.READY)this.getLayerRenderer(h.layer).prepareFrame(t,h,e)&&r.push(h)}var l=t.size[0]*t.pixelRatio,u=t.size[1]*t.pixelRatio;for(this.canvas_.width==l&&this.canvas_.height==u||(this.canvas_.width=l,this.canvas_.height=u),i.bindFramebuffer(36160,null),i.clearColor(0,0,0,0),i.clear(16384),i.enable(3042),i.viewport(0,0,this.canvas_.width,this.canvas_.height),o=0,s=r.length;o<s;++o){var p=r[o];this.getLayerRenderer(p.layer).composeFrame(t,p,e)}this.renderedVisible_||(this.canvas_.style.display="",this.renderedVisible_=!0),this.calculateMatrices2D(t),this.textureCache_.getCount()-this.textureCacheFrameMarkerCount_>1024&&t.postRenderFunctions.push(this.expireCache_.bind(this)),this.tileTextureQueue_.isEmpty()||(t.postRenderFunctions.push(this.loadNextTileTexture_),t.animate=!0),this.dispatchRenderEvent(ur.POSTCOMPOSE,t),this.scheduleRemoveUnusedLayerRenderers(t),this.scheduleExpireIconCache(t)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n,o,s){var a;if(this.getGL().isContextLost())return!1;var h,l=e.viewState,u=e.layerStatesArray;for(h=u.length-1;h>=0;--h){var p=u[h],c=p.layer;if(mo(p,l.resolution)&&o.call(s,c))if(a=this.getLayerRenderer(c).forEachFeatureAtCoordinate(t,e,i,r))return a}},e.prototype.hasFeatureAtCoordinate=function(t,e,i,r,n){var o=!1;if(this.getGL().isContextLost())return!1;var s,a=e.viewState,h=e.layerStatesArray;for(s=h.length-1;s>=0;--s){var l=h[s],u=l.layer;if(mo(l,a.resolution)&&r.call(n,u))if(o=this.getLayerRenderer(u).hasFeatureAtCoordinate(t,e))return!0}return o},e.prototype.forEachLayerAtPixel=function(t,e,i,r,n,o,s){if(this.getGL().isContextLost())return!1;var a,h,l=e.viewState,u=e.layerStatesArray;for(h=u.length-1;h>=0;--h){var p=u[h],c=p.layer;if(mo(p,l.resolution)&&o.call(n,c))if(a=this.getLayerRenderer(c).forEachLayerAtPixel(t,e,r,n))return a}},e}(qs),yl=function(t){function e(e,i,r){t.call(this);var n=r||{};this.tileCoord=e,this.state=i,this.interimTile=null,this.key="",this.transition_=void 0===n.transition?250:n.transition,this.transitionStarts_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.changed=function(){this.dispatchEvent(M.CHANGE)},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==On.LOADED)return t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==On.LOADED){t.interimTile=null;break}t.getState()==On.LOADING?e=t:t.getState()==On.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){this.state=t,this.changed()},e.prototype.load=function(){},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;var r=e-i+1e3/60;return r>=this.transition_?1:Vn(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(b);function vl(){var t=Jn(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}var ml=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,s),this.crossOrigin_=n,this.src_=r,this.image_=new Image,null!==n&&(this.image_.crossOrigin=n),this.imageListenerKeys_=null,this.tileLoadFunction_=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==On.LOADING&&(this.unlistenImage_(),this.image_=vl()),this.interimTile&&this.interimTile.dispose(),this.state=On.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.image_},e.prototype.getKey=function(){return this.src_},e.prototype.handleImageError_=function(){this.state=On.ERROR,this.unlistenImage_(),this.image_=vl(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=On.LOADED:this.state=On.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==On.ERROR&&(this.state=On.IDLE,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==On.IDLE&&(this.state=On.LOADING,this.changed(),this.imageListenerKeys_=[m(this.image_,M.ERROR,this.handleImageError_,this),m(this.image_,M.LOAD,this.handleImageLoad_,this)],this.tileLoadFunction_(this,this.src_))},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(E),this.imageListenerKeys_=null},e}(yl);function xl(t,e,i,r){return void 0!==r?(r[0]=t,r[1]=e,r[2]=i,r):[t,e,i]}function El(t,e,i){return t+"/"+e+"/"+i}function Sl(t){return El(t[0],t[1],t[2])}function Tl(t){return(t[1]<<t[0])+t[2]}var Cl=function(t){function e(e){t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.expireCache=function(t){for(;this.canExpireCache();){var e=this.peekLast(),i=e.tileCoord[0].toString();if(i in t&&t[i].contains(e.tileCoord))break;this.pop().dispose()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=function(t){return t.split("/").map(Number)}(this.peekFirstKey())[0];this.forEach(function(e){e.tileCoord[0]!==t&&(this.remove(Sl(e.tileCoord)),e.dispose())},this)}},e}(Rs);function Rl(t){return t?Array.isArray(t)?function(e){return t}:"function"==typeof t?t:function(e){return[t]}:null}var wl=function(t){function e(e){t.call(this),this.projection_=Ee(e.projection),this.attributions_=Rl(e.attributions),this.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,this.loading=!1,this.state_=void 0!==e.state?e.state:ro.READY,this.wrapX_=void 0!==e.wrapX&&e.wrapX}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolutions=function(){return r()},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=Rl(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(D),Il=[0,0,0],Ll=function(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Y(function(t,e,i){var r=e||V;return t.every(function(e,n){if(0===n)return!0;var o=r(t[n-1],e);return!(o>0||i&&0===o)})}(this.resolutions_,function(t,e){return e-t},!0),17),!t.origins)for(var i=0,r=this.resolutions_.length-1;i<r;++i)if(e){if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}else e=this.resolutions_[i]/this.resolutions_[i+1];this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,Y(this.origins_.length==this.resolutions_.length,20));var n=t.extent;void 0===n||this.origin_||this.origins_||(this.origin_=It(n)),Y(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Y(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:An,Y(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=void 0!==n?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],void 0!==t.sizes?this.fullTileRanges_=t.sizes.map(function(t,e){return new sa(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1))},this):n&&this.calculateTileRanges_(n)};Ll.prototype.forEachTileCoord=function(t,e,i){for(var r=this.getTileRangeForExtentAndZ(t,e),n=r.minX,o=r.maxX;n<=o;++n)for(var s=r.minY,a=r.maxY;s<=a;++s)i([e,n,s])},Ll.prototype.forEachTileCoordParentTileRange=function(t,e,i,r,n){var o,s,a,h=null,l=t[0]-1;for(2===this.zoomFactor_?(s=t[1],a=t[2]):h=this.getTileCoordExtent(t,n);l>=this.minZoom;){if(o=2===this.zoomFactor_?oa(s=Math.floor(s/2),s,a=Math.floor(a/2),a,r):this.getTileRangeForExtentAndZ(h,l,r),e.call(i,l,o))return!0;--l}return!1},Ll.prototype.getExtent=function(){return this.extent_},Ll.prototype.getMaxZoom=function(){return this.maxZoom},Ll.prototype.getMinZoom=function(){return this.minZoom},Ll.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},Ll.prototype.getResolution=function(t){return this.resolutions_[t]},Ll.prototype.getResolutions=function(){return this.resolutions_},Ll.prototype.getTileCoordChildTileRange=function(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){var r=2*t[1],n=2*t[2];return oa(r,r+1,n,n+1,e)}var o=this.getTileCoordExtent(t,i);return this.getTileRangeForExtentAndZ(o,t[0]+1,e)}return null},Ll.prototype.getTileRangeExtent=function(t,e,i){var r=this.getOrigin(t),n=this.getResolution(t),o=ho(this.getTileSize(t),this.tmpSize_),s=r[0]+e.minX*o[0]*n,a=r[0]+(e.maxX+1)*o[0]*n;return lt(s,r[1]+e.minY*o[1]*n,a,r[1]+(e.maxY+1)*o[1]*n,i)},Ll.prototype.getTileRangeForExtentAndZ=function(t,e,i){var r=Il;this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,r);var n=r[1],o=r[2];return this.getTileCoordForXYAndZ_(t[2],t[3],e,!0,r),oa(n,r[1],o,r[2],i)},Ll.prototype.getTileCoordCenter=function(t){var e=this.getOrigin(t[0]),i=this.getResolution(t[0]),r=ho(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*r[0]*i,e[1]+(t[2]+.5)*r[1]*i]},Ll.prototype.getTileCoordExtent=function(t,e){var i=this.getOrigin(t[0]),r=this.getResolution(t[0]),n=ho(this.getTileSize(t[0]),this.tmpSize_),o=i[0]+t[1]*n[0]*r,s=i[1]+t[2]*n[1]*r;return lt(o,s,o+n[0]*r,s+n[1]*r,e)},Ll.prototype.getTileCoordForCoordAndResolution=function(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)},Ll.prototype.getTileCoordForXYAndResolution_=function(t,e,i,r,n){var o=this.getZForResolution(i),s=i/this.getResolution(o),a=this.getOrigin(o),h=ho(this.getTileSize(o),this.tmpSize_),l=r?.5:0,u=r?0:.5,p=Math.floor((t-a[0])/i+l),c=Math.floor((e-a[1])/i+u),d=s*p/h[0],f=s*c/h[1];return r?(d=Math.ceil(d)-1,f=Math.ceil(f)-1):(d=Math.floor(d),f=Math.floor(f)),xl(o,d,f,n)},Ll.prototype.getTileCoordForXYAndZ_=function(t,e,i,r,n){var o=this.getOrigin(i),s=this.getResolution(i),a=ho(this.getTileSize(i),this.tmpSize_),h=r?.5:0,l=r?0:.5,u=Math.floor((t-o[0])/s+h),p=Math.floor((e-o[1])/s+l),c=u/a[0],d=p/a[1];return r?(c=Math.ceil(c)-1,d=Math.ceil(d)-1):(c=Math.floor(c),d=Math.floor(d)),xl(i,c,d,n)},Ll.prototype.getTileCoordForCoordAndZ=function(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)},Ll.prototype.getTileCoordResolution=function(t){return this.resolutions_[t[0]]},Ll.prototype.getTileSize=function(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]},Ll.prototype.getFullTileRange=function(t){return this.fullTileRanges_?this.fullTileRanges_[t]:null},Ll.prototype.getZForResolution=function(t,e){return kt(z(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)},Ll.prototype.calculateTileRanges_=function(t){for(var e=this.resolutions_.length,i=new Array(e),r=this.minZoom;r<e;++r)i[r]=this.getTileRangeForExtentAndZ(t,r);this.fullTileRanges_=i};var Ol=Ll;function Pl(t){var e=t.getDefaultTileGrid();return e||(e=Al(t),t.setDefaultTileGrid(e)),e}function bl(t,e,i,r){var n=void 0!==r?r:Q.TOP_LEFT,o=Fl(t,e,i);return new Ol({extent:t,origin:function(t,e){var i;return e===Q.BOTTOM_LEFT?i=Et(t):e===Q.BOTTOM_RIGHT?i=St(t):e===Q.TOP_LEFT?i=It(t):e===Q.TOP_RIGHT?i=Lt(t):Y(!1,13),i}(t,n),resolutions:o,tileSize:i})}function Ml(t){var e=t||{},i=e.extent||Ee("EPSG:3857").getExtent(),r={extent:i,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:Fl(i,e.maxZoom,e.tileSize)};return new Ol(r)}function Fl(t,e,i){for(var r=void 0!==e?e:Fn,n=Rt(t),o=Ot(t),s=ho(void 0!==i?i:An),a=Math.max(o/s[0],n/s[1]),h=r+1,l=new Array(h),u=0;u<h;++u)l[u]=a/Math.pow(2,u);return l}function Al(t,e,i,r){return bl(Nl(t),e,i,r)}function Nl(t){var e=(t=Ee(t)).getExtent();if(!e){var i=180*Qt[$t.DEGREES]/t.getMetersPerUnit();e=lt(-i,-i,i,i)}return e}var Gl=function(t){function e(e){t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX}),this.opaque_=void 0!==e.opaque&&e.opaque,this.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,this.tileGrid=void 0!==e.tileGrid?e.tileGrid:null,this.tileCache=new Cl(e.cacheSize),this.tmpSize=[0,0],this.key_=e.key||"",this.tileOptions={transition:e.transition}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);i&&i.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,i,r){var n=this.getTileCacheForProjection(t);if(!n)return!1;for(var o,s,a,h=!0,l=i.minX;l<=i.maxX;++l)for(var u=i.minY;u<=i.maxY;++u)s=El(e,l,u),a=!1,n.containsKey(s)&&(a=(o=n.get(s)).getState()===On.LOADED)&&(a=!1!==r(o)),a||(h=!1);return h},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},e.prototype.getTile=function(t,e,i,n,o){return r()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Pl(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return e&&!Ie(e,t)?null:this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,i){var r=this.getTileGridForProjection(i),n=this.getTilePixelRatio(e),o=ho(r.getTileSize(t),this.tmpSize);return 1==n?o:ao(o,n,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var i=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){var r=e[0],n=t.getTileCoordCenter(e),o=Nl(i);if(nt(o,n))return e;var s=Ot(o),a=Math.ceil((o[0]-n[0])/s);return n[0]+=s*a,t.getTileCoordForCoordAndZ(n,r)}(r,t,i)),function(t,e){var i=t[0],r=t[1],n=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;var o,s=e.getExtent();return!(o=s?e.getTileRangeForExtentAndZ(s,i):e.getFullTileRange(i))||o.containsXY(r,n)}(t,r)?t:null},e.prototype.refresh=function(){this.tileCache.clear(),this.changed()},e.prototype.useTile=function(t,e,i,r){},e}(wl),Dl=function(t){function e(e,i){t.call(this,e),this.tile=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),kl=Gl,jl=new lh("precision mediump float;\nvarying vec2 v_texCoord;\n\n\nuniform sampler2D u_texture;\n\nvoid main(void) {\n  gl_FragColor = texture2D(u_texture, v_texCoord);\n}\n"),Ul=new uh("varying vec2 v_texCoord;\n\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nuniform vec4 u_tileOffset;\n\nvoid main(void) {\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\n  v_texCoord = a_texCoord;\n}\n\n\n"),Yl=function(t,e){this.u_tileOffset=t.getUniformLocation(e,"u_tileOffset"),this.u_texture=t.getUniformLocation(e,"u_texture"),this.a_position=t.getAttribLocation(e,"a_position"),this.a_texCoord=t.getAttribLocation(e,"a_texCoord")},Bl=function(t){function e(e,i){t.call(this,e,i),this.fragmentShader_=jl,this.vertexShader_=Ul,this.locations_=null,this.renderArrayBuffer_=new Th([0,0,0,1,1,0,1,1,0,1,0,0,1,1,1,0]),this.renderedTileRange_=null,this.renderedFramebufferExtent_=null,this.renderedRevision_=-1,this.tmpSize_=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.mapRenderer.getContext().deleteBuffer(this.renderArrayBuffer_),t.prototype.disposeInternal.call(this)},e.prototype.createLoadedTileFinder=function(t,e,i){var r=this.mapRenderer;return function(n,o){return t.forEachLoadedTile(e,n,o,function(t){var e=r.isTileTextureLoaded(t);return e&&(i[n]||(i[n]={}),i[n][t.tileCoord.toString()]=t),e})}},e.prototype.handleWebGLContextLost=function(){t.prototype.handleWebGLContextLost.call(this),this.locations_=null},e.prototype.prepareFrame=function(t,e,i){var r=this.mapRenderer,n=i.getGL(),o=t.viewState,s=o.projection,a=this.getLayer(),h=a.getSource();if(!(h instanceof kl))return!0;var l,u=h.getTileGridForProjection(s),p=u.getZForResolution(o.resolution),c=u.getResolution(p),d=h.getTilePixelSize(p,t.pixelRatio,s),f=d[0]/ho(u.getTileSize(p),this.tmpSize_)[0],_=c/f,g=h.getTilePixelRatio(f)*h.getGutterForProjection(s),y=o.center,v=t.extent,m=u.getTileRangeForExtentAndZ(v,p);if(this.renderedTileRange_&&this.renderedTileRange_.equals(m)&&this.renderedRevision_==h.getRevision())l=this.renderedFramebufferExtent_;else{var x=m.getSize(),E=function(t){return Y(0<t,29),Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}(Math.max(x[0]*d[0],x[1]*d[1])),S=_*E,T=u.getOrigin(p),C=T[0]+m.minX*d[0]*_,R=T[1]+m.minY*d[1]*_;l=[C,R,C+S,R+S],this.bindFramebuffer(t,E),n.viewport(0,0,E,E),n.clearColor(0,0,0,0),n.clear(16384),n.disable(3042);var w=i.getProgram(this.fragmentShader_,this.vertexShader_);i.useProgram(w),this.locations_||(this.locations_=new Yl(n,w)),i.bindBuffer(34962,this.renderArrayBuffer_),n.enableVertexAttribArray(this.locations_.a_position),n.vertexAttribPointer(this.locations_.a_position,2,5126,!1,16,0),n.enableVertexAttribArray(this.locations_.a_texCoord),n.vertexAttribPointer(this.locations_.a_texCoord,2,5126,!1,16,8),n.uniform1i(this.locations_.u_texture,0);var I={};I[p]={};var L,O,P,b,M,F,A=this.createLoadedTileFinder(h,s,I),N=a.getUseInterimTilesOnError(),G=!0,D=[1/0,1/0,-1/0,-1/0],k=new sa(0,0,0,0);for(b=m.minX;b<=m.maxX;++b)for(M=m.minY;M<=m.maxY;++M)if(O=h.getTile(p,b,M,f,s),void 0===e.extent||Pt(F=u.getTileCoordExtent(O.tileCoord,D),e.extent)){if((P=O.getState())==On.LOADED||P==On.EMPTY||P==On.ERROR&&!N||(O=O.getInterimTile()),(P=O.getState())==On.LOADED){if(r.isTileTextureLoaded(O)){I[p][O.tileCoord.toString()]=O;continue}}else if(P==On.EMPTY||P==On.ERROR&&!N)continue;G=!1,u.forEachTileCoordParentTileRange(O.tileCoord,A,null,k,D)||(L=u.getTileCoordChildTileRange(O.tileCoord,k,D))&&A(p+1,L)}var j=Object.keys(I).map(Number);j.sort(V);for(var U=new Float32Array(4),B=0,X=j.length;B<X;++B){var z=I[j[B]];for(var W in z)(O=z[W])instanceof ml&&(F=u.getTileCoordExtent(O.tileCoord,D),U[0]=2*(F[2]-F[0])/S,U[1]=2*(F[3]-F[1])/S,U[2]=2*(F[0]-l[0])/S-1,U[3]=2*(F[1]-l[1])/S-1,n.uniform4fv(this.locations_.u_tileOffset,U),r.bindTileTexture(O,d,g*f,Qa,Qa),n.drawArrays(5,0,4))}G?(this.renderedTileRange_=m,this.renderedFramebufferExtent_=l,this.renderedRevision_=h.getRevision()):(this.renderedTileRange_=null,this.renderedFramebufferExtent_=null,this.renderedRevision_=-1,t.animate=!0)}this.updateUsedTiles(t.usedTiles,h,p,m);var K=r.getTileTextureQueue();this.manageTilePyramid(t,h,u,f,s,v,p,a.getPreload(),function(t){t.getState()!=On.LOADED||r.isTileTextureLoaded(t)||K.isKeyQueued(t.getKey())||K.enqueue([t,u.getTileCoordCenter(t.tileCoord),u.getResolution(t.tileCoord[0]),d,g*f])},this),this.scheduleExpireCache(t,h);var H=this.texCoordMatrix;return Fe(H),Ue(H,(Math.round(y[0]/c)*c-l[0])/(l[2]-l[0]),(Math.round(y[1]/c)*c-l[1])/(l[3]-l[1])),0!==o.rotation&&ke(H,o.rotation),je(H,t.size[0]*o.resolution/(l[2]-l[0]),t.size[1]*o.resolution/(l[3]-l[1])),Ue(H,-.5,-.5),!0},e.prototype.forEachLayerAtPixel=function(t,e,i,r){if(this.framebuffer){var n=[t[0]/e.size[0],(e.size[1]-t[1])/e.size[1]],o=De(this.texCoordMatrix,n.slice()),s=[o[0]*this.framebufferDimension,o[1]*this.framebufferDimension],a=this.mapRenderer.getContext().getGL();a.bindFramebuffer(a.FRAMEBUFFER,this.framebuffer);var h=new Uint8Array(4);return a.readPixels(s[0],s[1],1,1,a.RGBA,a.UNSIGNED_BYTE,h),h[3]>0?i.call(r,this.getLayer(),h):void 0}},e}(dl);Bl.handles=function(t){return t.getType()===Ss.TILE},Bl.create=function(t,e){return new Bl(t,e)};var Vl=Bl,Xl=function(t){function e(e,i){t.call(this,e,i),this.dirty_=!1,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRenderOrder_=null,this.replayGroup_=null,this.layerState_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.composeFrame=function(t,e,i){this.layerState_=e;var r=t.viewState,n=this.replayGroup_,o=t.size,s=t.pixelRatio,a=this.mapRenderer.getGL();n&&!n.isEmpty()&&(a.enable(a.SCISSOR_TEST),a.scissor(0,0,o[0]*s,o[1]*s),n.replay(i,r.center,r.resolution,r.rotation,o,s,e.opacity,e.managed?t.skippedFeatureUids:{}),a.disable(a.SCISSOR_TEST))},e.prototype.disposeInternal=function(){var e=this.replayGroup_;if(e){var i=this.mapRenderer.getContext();e.getDeleteResourcesFunction(i)(),this.replayGroup_=null}t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,i,r,n){if(this.replayGroup_&&this.layerState_){var s=this.mapRenderer.getContext(),a=e.viewState,h=this.getLayer(),l=this.layerState_,u={};return this.replayGroup_.forEachFeatureAtCoordinate(t,s,a.center,a.resolution,a.rotation,e.size,e.pixelRatio,l.opacity,{},function(t){var e=o(t);if(!(e in u))return u[e]=!0,r.call(n,t,h)})}},e.prototype.hasFeatureAtCoordinate=function(t,e){if(this.replayGroup_&&this.layerState_){var i=this.mapRenderer.getContext(),r=e.viewState,n=this.layerState_;return this.replayGroup_.hasFeatureAtCoordinate(t,i,r.center,r.resolution,r.rotation,e.size,e.pixelRatio,n.opacity,e.skippedFeatureUids)}return!1},e.prototype.forEachLayerAtPixel=function(t,e,i,r){var n=De(e.pixelToCoordinateTransform,t.slice());return this.hasFeatureAtCoordinate(n,e)?i.call(r,this.getLayer(),null):void 0},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t,e,i){var r=this.getLayer(),n=r.getSource(),o=t.viewHints[kn],s=t.viewHints[jn],a=r.getUpdateWhileAnimating(),h=r.getUpdateWhileInteracting();if(!this.dirty_&&!a&&o||!h&&s)return!0;var l=t.extent,u=t.viewState,p=u.projection,c=u.resolution,d=t.pixelRatio,f=r.getRevision(),_=r.getRenderBuffer(),g=r.getRenderOrder();void 0===g&&(g=Da);var y=et(l,_*c);if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==f&&this.renderedRenderOrder_==g&&ot(this.renderedExtent_,y))return!0;this.replayGroup_&&t.postRenderFunctions.push(this.replayGroup_.getDeleteResourcesFunction(i)),this.dirty_=!1;var v=new hl(ja(c,d),y,r.getRenderBuffer());n.loadFeatures(y,c,p);var m=function(t){var e,i=t.getStyleFunction()||r.getStyleFunction();if(i&&(e=i(t,c)),e){var n=this.renderFeature(t,c,d,e,v);this.dirty_=this.dirty_||n}}.bind(this);if(g){var x=[];n.forEachFeatureInExtent(y,function(t){x.push(t)}),x.sort(g),x.forEach(m.bind(this))}else n.forEachFeatureInExtent(y,m);return v.finish(i),this.renderedResolution_=c,this.renderedRevision_=f,this.renderedRenderOrder_=g,this.renderedExtent_=y,this.replayGroup_=v,!0},e.prototype.renderFeature=function(t,e,i,r,n){if(!r)return!1;var o=!1;if(Array.isArray(r))for(var s=r.length-1;s>=0;--s)o=Ua(n,t,r[s],ka(e,i),this.handleStyleImageChange_,this)||o;else o=Ua(n,t,r,ka(e,i),this.handleStyleImageChange_,this)||o;return o},e}(dl);Xl.handles=function(t){return t.getType()===Ss.VECTOR},Xl.create=function(t,e){return new Xl(t,e)};var zl=Xl,Wl=function(t){function e(e){(e=u({},e)).controls||(e.controls=wo()),e.interactions||(e.interactions=ys()),t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createRenderer=function(){var t=new gl(this);return t.registerLayerRenderers([_l,Vl,zl]),t},e}(lo),Kl={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"};function Hl(t,e,i,r){return function(n,o,s){var a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(n,o,s):t,!0),e.getType()==Kl.ARRAY_BUFFER&&(a.responseType="arraybuffer"),a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){var n,o=e.getType();o==Kl.JSON||o==Kl.TEXT?n=a.responseText:o==Kl.XML?(n=a.responseXML)||(n=(new DOMParser).parseFromString(a.responseText,"application/xml")):o==Kl.ARRAY_BUFFER&&(n=a.response),n?i.call(this,e.readFeatures(n,{featureProjection:s}),e.readProjection(n),e.getLastExtent()):r.call(this)}else r.call(this)}.bind(this),a.onerror=function(){r.call(this)}.bind(this),a.send()}}function Zl(t,e){return Hl(t,e,function(t,e){"function"==typeof this.addFeatures&&this.addFeatures(t)},I)}function ql(t,e){return[[-1/0,-1/0,1/0,1/0]]}var Jl=document.implementation.createDocument("","",null),Ql="http://www.w3.org/2001/XMLSchema-instance";function $l(t,e){return Jl.createElementNS(t,e)}function tu(t,e){return function t(e,i,r){if(e.nodeType==Node.CDATA_SECTION_NODE||e.nodeType==Node.TEXT_NODE)i?r.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(e.nodeValue);else{var n;for(n=e.firstChild;n;n=n.nextSibling)t(n,i,r)}return r}(t,e,[]).join("")}function eu(t){return"documentElement"in t}function iu(t){return(new DOMParser).parseFromString(t,"application/xml")}function ru(t,e){return function(i,r){var n=t.call(void 0!==e?e:this,i,r);void 0!==n&&K(r[r.length-1],n)}}function nu(t,e){return function(i,r){var n=t.call(void 0!==e?e:this,i,r);void 0!==n&&r[r.length-1].push(n)}}function ou(t,e){return function(i,r){var n=t.call(void 0!==e?e:this,i,r);void 0!==n&&(r[r.length-1]=n)}}function su(t,e,i){return function(r,n){var o=t.call(void 0!==i?i:this,r,n);if(void 0!==o){var s=n[n.length-1],a=void 0!==e?e:r.localName;(a in s?s[a]:s[a]=[]).push(o)}}}function au(t,e,i){return function(r,n){var o=t.call(void 0!==i?i:this,r,n);void 0!==o&&(n[n.length-1][void 0!==e?e:r.localName]=o)}}function hu(t,e){return function(i,r,n){t.call(void 0!==e?e:this,i,r,n),n[n.length-1].node.appendChild(i)}}function lu(t,e){var i,r;return function(e,n,o){if(void 0===i){i={};var s={};s[e.localName]=t,i[e.namespaceURI]=s,r=uu(e.localName)}gu(i,r,n,o)}}function uu(t,e){var i=t;return function(t,r,n){var o=r[r.length-1].node,s=i;return void 0===s&&(s=n),$l(void 0!==e?e:o.namespaceURI,s)}}var pu=uu();function cu(t,e){for(var i=e.length,r=new Array(i),n=0;n<i;++n)r[n]=t[e[n]];return r}function du(t,e,i){var r,n,o=void 0!==i?i:{};for(r=0,n=t.length;r<n;++r)o[t[r]]=e;return o}function fu(t,e,i,r){var n;for(n=e.firstElementChild;n;n=n.nextElementSibling){var o=t[n.namespaceURI];if(void 0!==o){var s=o[n.localName];void 0!==s&&s.call(r,n,i)}}}function _u(t,e,i,r,n){return r.push(t),fu(e,i,r,n),r.pop()}function gu(t,e,i,r,n,o){for(var s,a,h=(void 0!==n?n:i).length,l=0;l<h;++l)void 0!==(s=i[l])&&void 0!==(a=e.call(void 0!==o?o:this,s,r,void 0!==n?n[l]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,r)}function yu(t,e,i,r,n,o,s){return n.push(t),gu(e,i,r,n,o,s),n.pop()}var vu=function(t){function e(e){t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes}),this.matrixIds_=e.matrixIds}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(Ol),mu=vu;function xu(t,e,i){var r=[],n=[],o=[],s=[],a=[],h=void 0!==i?i:[],l=t.SupportedCRS,u=Ee(l.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Ee(l),p=u.getMetersPerUnit(),c="ne"==u.getAxisOrientation().substr(0,2);return t.TileMatrix.sort(function(t,e){return e.ScaleDenominator-t.ScaleDenominator}),t.TileMatrix.forEach(function(e){if(!(h.length>0)||H(h,function(i){return e.Identifier==i.TileMatrix||-1===e.Identifier.indexOf(":")&&t.Identifier+":"+e.Identifier===i.TileMatrix})){n.push(e.Identifier);var i=28e-5*e.ScaleDenominator/p,l=e.TileWidth,u=e.TileHeight;c?o.push([e.TopLeftCorner[1],e.TopLeftCorner[0]]):o.push(e.TopLeftCorner),r.push(i),s.push(l==u?l:[l,u]),a.push([e.MatrixWidth,-e.MatrixHeight])}}),new vu({extent:e,origins:o,resolutions:r,matrixIds:n,tileSizes:s,sizes:a})}var Eu=function(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale};Eu.prototype.clone=function(){return new Eu({opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},Eu.prototype.getOpacity=function(){return this.opacity_},Eu.prototype.getRotateWithView=function(){return this.rotateWithView_},Eu.prototype.getRotation=function(){return this.rotation_},Eu.prototype.getScale=function(){return this.scale_},Eu.prototype.getSnapToPixel=function(){return!1},Eu.prototype.getAnchor=function(){return r()},Eu.prototype.getImage=function(t){return r()},Eu.prototype.getHitDetectionImage=function(t){return r()},Eu.prototype.getImageState=function(){return r()},Eu.prototype.getImageSize=function(){return r()},Eu.prototype.getHitDetectionImageSize=function(){return r()},Eu.prototype.getOrigin=function(){return r()},Eu.prototype.getSize=function(){return r()},Eu.prototype.setOpacity=function(t){this.opacity_=t},Eu.prototype.setRotateWithView=function(t){this.rotateWithView_=t},Eu.prototype.setRotation=function(t){this.rotation_=t},Eu.prototype.setScale=function(t){this.scale_=t},Eu.prototype.setSnapToPixel=function(t){},Eu.prototype.listenImageChange=function(t,e){return r()},Eu.prototype.load=function(){r()},Eu.prototype.unlistenImageChange=function(t,e){r()};var Su=Eu,Tu=function(t){function e(e){var i=void 0!==e.rotateWithView&&e.rotateWithView;t.call(this,{opacity:1,rotateWithView:i,rotation:void 0!==e.rotation?e.rotation:0,scale:1}),this.checksums_=null,this.canvas_=null,this.hitDetectionCanvas_=null,this.fill_=void 0!==e.fill?e.fill:null,this.origin_=[0,0],this.points_=e.points,this.radius_=void 0!==e.radius?e.radius:e.radius1,this.radius2_=e.radius2,this.angle_=void 0!==e.angle?e.angle:0,this.stroke_=void 0!==e.stroke?e.stroke:null,this.anchor_=null,this.size_=null,this.imageSize_=null,this.hitDetectionImageSize_=null,this.atlasManager_=e.atlasManager,this.render_(this.atlasManager_)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.getAnchor=function(){return this.anchor_},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(t){return this.hitDetectionCanvas_},e.prototype.getImage=function(t){return this.canvas_},e.prototype.getImageSize=function(){return this.imageSize_},e.prototype.getHitDetectionImageSize=function(){return this.hitDetectionImageSize_},e.prototype.getImageState=function(){return xs.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t,e){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t,e){},e.prototype.render_=function(t){var e,i,r="",n="",o=0,s=null,a=0,h=0;this.stroke_&&(null===(i=this.stroke_.getColor())&&(i=Ls),i=Ys(i),void 0===(h=this.stroke_.getWidth())&&(h=1),s=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),ki||(s=null,a=0),void 0===(n=this.stroke_.getLineJoin())&&(n="round"),void 0===(r=this.stroke_.getLineCap())&&(r="round"),void 0===(o=this.stroke_.getMiterLimit())&&(o=10));var l=2*(this.radius_+h)+1,u={strokeStyle:i,strokeWidth:h,size:l,lineCap:r,lineDash:s,lineDashOffset:a,lineJoin:n,miterLimit:o};if(void 0===t){var p=Jn(l,l);this.canvas_=p.canvas,e=l=this.canvas_.width,this.draw_(u,p,0,0),this.createHitDetectionCanvas_(u)}else{l=Math.round(l);var c,d=!this.fill_;d&&(c=this.drawHitDetectionCanvas_.bind(this,u));var f=this.getChecksum(),_=t.add(f,l,l,this.draw_.bind(this,u),c);this.canvas_=_.image,this.origin_=[_.offsetX,_.offsetY],e=_.image.width,d?(this.hitDetectionCanvas_=_.hitImage,this.hitDetectionImageSize_=[_.hitImage.width,_.hitImage.height]):(this.hitDetectionCanvas_=this.canvas_,this.hitDetectionImageSize_=[e,e])}this.anchor_=[l/2,l/2],this.size_=[l,l],this.imageSize_=[e,e]},e.prototype.draw_=function(t,e,i,r){var n,o,s;e.setTransform(1,0,0,1,0,0),e.translate(i,r),e.beginPath();var a=this.points_;if(a===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(a*=2),n=0;n<=a;n++)o=2*n*Math.PI/a-Math.PI/2+this.angle_,s=n%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(o),t.size/2+s*Math.sin(o))}if(this.fill_){var l=this.fill_.getColor();null===l&&(l=ws),e.fillStyle=Ys(l),e.fill()}this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke()),e.closePath()},e.prototype.createHitDetectionCanvas_=function(t){if(this.hitDetectionImageSize_=[t.size,t.size],this.fill_)this.hitDetectionCanvas_=this.canvas_;else{var e=Jn(t.size,t.size);this.hitDetectionCanvas_=e.canvas,this.drawHitDetectionCanvas_(t,e,0,0)}},e.prototype.drawHitDetectionCanvas_=function(t,e,i,r){e.setTransform(1,0,0,1,0,0),e.translate(i,r),e.beginPath();var n=this.points_;if(n===1/0)e.arc(t.size/2,t.size/2,this.radius_,0,2*Math.PI,!0);else{var o,s,a,h=void 0!==this.radius2_?this.radius2_:this.radius_;for(h!==this.radius_&&(n*=2),o=0;o<=n;o++)a=2*o*Math.PI/n-Math.PI/2+this.angle_,s=o%2==0?this.radius_:h,e.lineTo(t.size/2+s*Math.cos(a),t.size/2+s*Math.sin(a))}e.fillStyle=dr(ws),e.fill(),this.stroke_&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.stroke()),e.closePath()},e.prototype.getChecksum=function(){var t=this.stroke_?this.stroke_.getChecksum():"-",e=this.fill_?this.fill_.getChecksum():"-";if(!this.checksums_||t!=this.checksums_[1]||e!=this.checksums_[2]||this.radius_!=this.checksums_[3]||this.radius2_!=this.checksums_[4]||this.angle_!=this.checksums_[5]||this.points_!=this.checksums_[6]){var i="r"+t+e+(void 0!==this.radius_?this.radius_.toString():"-")+(void 0!==this.radius2_?this.radius2_.toString():"-")+(void 0!==this.angle_?this.angle_.toString():"-")+(void 0!==this.points_?this.points_.toString():"-");this.checksums_=[i,t,e,this.radius_,this.radius2_,this.angle_,this.points_]}return this.checksums_[0]},e}(Su),Cu=function(t){function e(e){var i=e||{};t.call(this,{points:1/0,fill:i.fill,radius:i.radius,stroke:i.stroke,atlasManager:i.atlasManager})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){var t=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),atlasManager:this.atlasManager_});return t.setOpacity(this.getOpacity()),t.setScale(this.getScale()),t},e.prototype.setRadius=function(t){this.radius_=t,this.render_(this.atlasManager_)},e}(Tu),Ru={FRACTION:"fraction",PIXELS:"pixels"},wu=function(t){function e(e,i,r,n,o,s){t.call(this),this.hitDetectionImage_=null,this.image_=e||new Image,null!==n&&(this.image_.crossOrigin=n),this.canvas_=s?document.createElement("canvas"):null,this.color_=s,this.imageListenerKeys_=null,this.imageState_=o,this.size_=r,this.src_=i,this.tainted_}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===xs.LOADED){this.tainted_=!1;var t=Jn(1,1);try{t.drawImage(this.image_,0,0),t.getImageData(0,0,1,1)}catch(t){this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(M.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=xs.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=xs.LOADED,this.size_&&(this.image_.width=this.size_[0],this.image_.height=this.size_[1]),this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.replaceColor_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.canvas_?this.canvas_:this.image_},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(t){if(!this.hitDetectionImage_)if(this.isTainted_()){var e=this.size_[0],i=this.size_[1],r=Jn(e,i);r.fillRect(0,0,e,i),this.hitDetectionImage_=r.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==xs.IDLE){this.imageState_=xs.LOADING,this.imageListenerKeys_=[m(this.image_,M.ERROR,this.handleImageError_,this),m(this.image_,M.LOAD,this.handleImageLoad_,this)];try{this.image_.src=this.src_}catch(t){this.handleImageError_()}}},e.prototype.replaceColor_=function(){if(this.color_&&!this.isTainted_()){this.canvas_.width=this.image_.width,this.canvas_.height=this.image_.height;var t=this.canvas_.getContext("2d");t.drawImage(this.image_,0,0);for(var e=t.getImageData(0,0,this.image_.width,this.image_.height),i=e.data,r=this.color_[0]/255,n=this.color_[1]/255,o=this.color_[2]/255,s=0,a=i.length;s<a;s+=4)i[s]*=r,i[s+1]*=n,i[s+2]*=o;t.putImageData(e,0,0)}},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(E),this.imageListenerKeys_=null},e}(b);var Iu={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Lu=function(t){function e(e){var i=e||{},r=void 0!==i.opacity?i.opacity:1,n=void 0!==i.rotation?i.rotation:0,s=void 0!==i.scale?i.scale:1,a=void 0!==i.rotateWithView&&i.rotateWithView;t.call(this,{opacity:r,rotation:n,scale:s,rotateWithView:a}),this.anchor_=void 0!==i.anchor?i.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==i.anchorOrigin?i.anchorOrigin:Iu.TOP_LEFT,this.anchorXUnits_=void 0!==i.anchorXUnits?i.anchorXUnits:Ru.FRACTION,this.anchorYUnits_=void 0!==i.anchorYUnits?i.anchorYUnits:Ru.FRACTION,this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null;var h=void 0!==i.img?i.img:null,l=void 0!==i.imgSize?i.imgSize:null,u=i.src;Y(!(void 0!==u&&h),4),Y(!h||h&&l,5),void 0!==u&&0!==u.length||!h||(u=h.src||o(h)),Y(void 0!==u&&u.length>0,6);var p=void 0!==i.src?xs.IDLE:xs.LOADED;this.color_=void 0!==i.color?_r(i.color):null,this.iconImage_=function(t,e,i,r,n,o){var s=Ks.get(e,r,o);return s||(s=new wu(t,e,i,r,n,o),Ks.set(e,r,o,s)),s}(h,u,l,this.crossOrigin_,p,this.color_),this.offset_=void 0!==i.offset?i.offset:[0,0],this.offsetOrigin_=void 0!==i.offsetOrigin?i.offsetOrigin:Iu.TOP_LEFT,this.origin_=null,this.size_=void 0!==i.size?i.size:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,crossOrigin:this.crossOrigin_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,src:this.getSrc(),offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,size:null!==this.size_?this.size_.slice():void 0,opacity:this.getOpacity(),scale:this.getScale(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},e.prototype.getAnchor=function(){if(this.normalizedAnchor_)return this.normalizedAnchor_;var t=this.anchor_,e=this.getSize();if(this.anchorXUnits_==Ru.FRACTION||this.anchorYUnits_==Ru.FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==Ru.FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==Ru.FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=Iu.TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=Iu.TOP_RIGHT&&this.anchorOrigin_!=Iu.BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=Iu.BOTTOM_LEFT&&this.anchorOrigin_!=Iu.BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}return this.normalizedAnchor_=t,this.normalizedAnchor_},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getHitDetectionImageSize=function(){return this.getImageSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(t){return this.iconImage_.getHitDetectionImage(t)},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=Iu.TOP_LEFT){var e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),this.offsetOrigin_!=Iu.TOP_RIGHT&&this.offsetOrigin_!=Iu.BOTTOM_RIGHT||(t[0]=i[0]-e[0]-t[0]),this.offsetOrigin_!=Iu.BOTTOM_LEFT&&this.offsetOrigin_!=Iu.BOTTOM_RIGHT||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t,e){return v(this.iconImage_,M.CHANGE,t,e)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t,e){x(this.iconImage_,M.CHANGE,t,e)},e}(Su),Ou=function(t){var e=t||{};this.geometry_=null,this.geometryFunction_=Fu,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex};Ou.prototype.clone=function(){var t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new Ou({geometry:t,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},Ou.prototype.getRenderer=function(){return this.renderer_},Ou.prototype.setRenderer=function(t){this.renderer_=t},Ou.prototype.getGeometry=function(){return this.geometry_},Ou.prototype.getGeometryFunction=function(){return this.geometryFunction_},Ou.prototype.getFill=function(){return this.fill_},Ou.prototype.setFill=function(t){this.fill_=t},Ou.prototype.getImage=function(){return this.image_},Ou.prototype.setImage=function(t){this.image_=t},Ou.prototype.getStroke=function(){return this.stroke_},Ou.prototype.setStroke=function(t){this.stroke_=t},Ou.prototype.getText=function(){return this.text_},Ou.prototype.setText=function(t){this.text_=t},Ou.prototype.getZIndex=function(){return this.zIndex_},Ou.prototype.setGeometry=function(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Fu,this.geometry_=t},Ou.prototype.setZIndex=function(t){this.zIndex_=t};var Pu=null;function bu(t,e){if(!Pu){var i=new mr({color:"rgba(255,255,255,0.4)"}),r=new Er({color:"#3399CC",width:1.25});Pu=[new Ou({image:new Cu({fill:i,stroke:r,radius:5}),fill:i,stroke:r})]}return Pu}function Mu(){var t={},e=[255,255,255,1],i=[0,153,255,1];return t[Nt.POLYGON]=[new Ou({fill:new mr({color:[255,255,255,.5]})})],t[Nt.MULTI_POLYGON]=t[Nt.POLYGON],t[Nt.LINE_STRING]=[new Ou({stroke:new Er({color:e,width:5})}),new Ou({stroke:new Er({color:i,width:3})})],t[Nt.MULTI_LINE_STRING]=t[Nt.LINE_STRING],t[Nt.CIRCLE]=t[Nt.POLYGON].concat(t[Nt.LINE_STRING]),t[Nt.POINT]=[new Ou({image:new Cu({radius:6,fill:new mr({color:i}),stroke:new Er({color:e,width:1.5})}),zIndex:1/0})],t[Nt.MULTI_POINT]=t[Nt.POINT],t[Nt.GEOMETRY_COLLECTION]=t[Nt.POLYGON].concat(t[Nt.LINE_STRING],t[Nt.POINT]),t}function Fu(t){return t.getGeometry()}var Au=Ou;function Nu(t,e){var i=/\{z\}/g,r=/\{x\}/g,n=/\{y\}/g,o=/\{-y\}/g;return function(s,a,h){return s?t.replace(i,s[0].toString()).replace(r,s[1].toString()).replace(n,function(){return(-s[2]-1).toString()}).replace(o,function(){var t=s[0],i=e.getFullTileRange(t);return Y(i,55),(i.getHeight()+s[2]).toString()}):void 0}}function Gu(t,e){for(var i=t.length,r=new Array(i),n=0;n<i;++n)r[n]=Nu(t[n],e);return Du(r)}function Du(t){return 1===t.length?t[0]:function(e,i,r){if(e){var n=Xt(Tl(e),t.length);return t[n](e,i,r)}}}function ku(t,e,i){}function ju(t){var e=[],i=/\{([a-z])-([a-z])\}/.exec(t);if(i){var r,n=i[1].charCodeAt(0),o=i[2].charCodeAt(0);for(r=n;r<=o;++r)e.push(t.replace(i[0],String.fromCharCode(r)));return e}if(i=i=/\{(\d+)-(\d+)\}/.exec(t)){for(var s=parseInt(i[2],10),a=parseInt(i[1],10);a<=s;a++)e.push(t.replace(i[0],a.toString()));return e}return e.push(t),e}function Uu(t,e,i,r){var n=document.createElement("script"),s="olc_"+o(e);function a(){delete window[s],n.parentNode.removeChild(n)}n.async=!0,n.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+s;var h=setTimeout(function(){a(),i&&i()},1e4);window[s]=function(t){clearTimeout(h),a(),e(t)},document.getElementsByTagName("head")[0].appendChild(n)}function Yu(t,e,i,r){var n=Pe(i,e,t),o=Se(e,r,i),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var h=t.getExtent();if(!h||nt(h,n)){var l=Se(t,o,n)/o;isFinite(l)&&l>0&&(o/=l)}return o}function Bu(t,e,i,r){var n=i-t,o=r-e,s=Math.sqrt(n*n+o*o);return[Math.round(i+n/s),Math.round(r+o/s)]}function Vu(t,e,i,r,n,o,s,a,h,l,u){var p=Jn(Math.round(i*t),Math.round(i*e));if(0===h.length)return p.canvas;p.scale(i,i);var c=[1/0,1/0,-1/0,-1/0];h.forEach(function(t,e,i){ft(c,t.extent)});var d=Ot(c),f=Rt(c),_=Jn(Math.round(i*d/r),Math.round(i*f/r)),g=i/r;h.forEach(function(t,e,i){var r=t.extent[0]-c[0],n=-(t.extent[3]-c[3]),o=Ot(t.extent),s=Rt(t.extent);_.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,r*g,n*g,o*g,s*g)});var y=It(s);return a.getTriangles().forEach(function(t,e,n){var s=t.source,a=t.target,h=s[0][0],l=s[0][1],u=s[1][0],d=s[1][1],f=s[2][0],g=s[2][1],v=(a[0][0]-y[0])/o,m=-(a[0][1]-y[1])/o,x=(a[1][0]-y[0])/o,E=-(a[1][1]-y[1])/o,S=(a[2][0]-y[0])/o,T=-(a[2][1]-y[1])/o,C=h,R=l;h=0,l=0;var w=function(t){for(var e=t.length,i=0;i<e;i++){for(var r=i,n=Math.abs(t[i][i]),o=i+1;o<e;o++){var s=Math.abs(t[o][i]);s>n&&(n=s,r=o)}if(0===n)return null;var a=t[r];t[r]=t[i],t[i]=a;for(var h=i+1;h<e;h++)for(var l=-t[h][i]/t[i][i],u=i;u<e+1;u++)i==u?t[h][u]=0:t[h][u]+=l*t[i][u]}for(var p=new Array(e),c=e-1;c>=0;c--){p[c]=t[c][e]/t[c][c];for(var d=c-1;d>=0;d--)t[d][e]-=t[d][c]*p[c]}return p}([[u-=C,d-=R,0,0,x-v],[f-=C,g-=R,0,0,S-v],[0,0,u,d,E-m],[0,0,f,g,T-m]]);if(w){p.save(),p.beginPath();var I=(v+x+S)/3,L=(m+E+T)/3,O=Bu(I,L,v,m),P=Bu(I,L,x,E),b=Bu(I,L,S,T);p.moveTo(P[0],P[1]),p.lineTo(O[0],O[1]),p.lineTo(b[0],b[1]),p.clip(),p.transform(w[0],w[2],w[1],w[3],v,m),p.translate(c[0]-C,c[3]-R),p.scale(r/i,-r/i),p.drawImage(_.canvas,0,0),p.restore()}}),u&&(p.save(),p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach(function(t,e,i){var r=t.target,n=(r[0][0]-y[0])/o,s=-(r[0][1]-y[1])/o,a=(r[1][0]-y[0])/o,h=-(r[1][1]-y[1])/o,l=(r[2][0]-y[0])/o,u=-(r[2][1]-y[1])/o;p.beginPath(),p.moveTo(a,h),p.lineTo(n,s),p.lineTo(l,u),p.closePath(),p.stroke()}),p.restore()),p.canvas}var Xu=function(t,e,i,r,n){this.sourceProj_=t,this.targetProj_=e;var o={},s=Oe(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return o[e]||(o[e]=s(t)),o[e]},this.maxSourceExtent_=r,this.errorThresholdSquared_=n*n,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Ot(r)==Ot(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Ot(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Ot(this.targetProj_.getExtent()):null;var a=It(i),h=Lt(i),l=St(i),u=Et(i),p=this.transformInv_(a),c=this.transformInv_(h),d=this.transformInv_(l),f=this.transformInv_(u);if(this.addQuad_(a,h,l,u,p,c,d,f,10),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach(function(t,e,i){_=Math.min(_,t.source[0][0],t.source[1][0],t.source[2][0])}),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-_>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-_>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-_>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-_>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var i=Math.min(e[0][0],e[1][0],e[2][0]);Math.max(e[0][0],e[1][0],e[2][0])-i<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}o={}};Xu.prototype.addTriangle_=function(t,e,i,r,n,o){this.triangles_.push({source:[r,n,o],target:[t,e,i]})},Xu.prototype.addQuad_=function(t,e,i,r,n,o,s,a,h){var l=tt([n,o,s,a]),u=this.sourceWorldWidth_?Ot(l)/this.sourceWorldWidth_:null,p=this.sourceWorldWidth_,c=this.sourceProj_.canWrapX()&&u>.5&&u<1,d=!1;if(h>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_)d=Ot(tt([t,e,i,r]))/this.targetWorldWidth_>.25||d;!c&&this.sourceProj_.isGlobal()&&u&&(d=u>.25||d)}if(d||!this.maxSourceExtent_||Pt(l,this.maxSourceExtent_)){if(!(d||isFinite(n[0])&&isFinite(n[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])&&isFinite(a[0])&&isFinite(a[1]))){if(!(h>0))return;d=!0}if(h>0){if(!d){var f,_=[(t[0]+i[0])/2,(t[1]+i[1])/2],g=this.transformInv_(_);if(c)f=(Xt(n[0],p)+Xt(s[0],p))/2-Xt(g[0],p);else f=(n[0]+s[0])/2-g[0];var y=(n[1]+s[1])/2-g[1];d=f*f+y*y>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){var v=[(e[0]+i[0])/2,(e[1]+i[1])/2],m=this.transformInv_(v),x=[(r[0]+t[0])/2,(r[1]+t[1])/2],E=this.transformInv_(x);this.addQuad_(t,e,v,x,n,o,m,E,h-1),this.addQuad_(x,v,i,r,E,m,s,a,h-1)}else{var S=[(t[0]+e[0])/2,(t[1]+e[1])/2],T=this.transformInv_(S),C=[(i[0]+r[0])/2,(i[1]+r[1])/2],R=this.transformInv_(C);this.addQuad_(t,S,C,r,n,T,R,a,h-1),this.addQuad_(S,e,i,C,T,o,s,R,h-1)}return}}if(c){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}this.addTriangle_(t,i,r,n,s,a),this.addTriangle_(t,e,i,n,o,s)}},Xu.prototype.calculateSourceExtent=function(){var t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,r){var n=e.source;_t(t,n[0]),_t(t,n[1]),_t(t,n[2])}),t},Xu.prototype.getTriangles=function(){return this.triangles_};var zu=Xu,Wu=function(t){function e(e,i,r,n,o,s,a,h,l,u,p){t.call(this,o,On.IDLE),this.renderEdges_=void 0!==p&&p,this.pixelRatio_=a,this.gutter_=h,this.canvas_=null,this.sourceTileGrid_=i,this.targetTileGrid_=n,this.wrappedTileCoord_=s||o,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;var c=n.getTileCoordExtent(this.wrappedTileCoord_),d=this.targetTileGrid_.getExtent(),f=this.sourceTileGrid_.getExtent(),_=d?wt(c,d):c;if(0!==xt(_)){var g=e.getExtent();g&&(f=f?wt(f,g):g);var y=n.getResolution(this.wrappedTileCoord_[0]),v=Yu(e,r,Tt(_),y);if(!isFinite(v)||v<=0)this.state=On.EMPTY;else{var m=void 0!==u?u:vs;if(this.triangulation_=new zu(e,r,_,f,v*m),0!==this.triangulation_.getTriangles().length){this.sourceZ_=i.getZForResolution(v);var x=this.triangulation_.calculateSourceExtent();if(f&&(e.canWrapX()?(x[1]=kt(x[1],f[1],f[3]),x[3]=kt(x[3],f[1],f[3])):x=wt(x,f)),xt(x)){for(var E=i.getTileRangeForExtentAndZ(x,this.sourceZ_),S=E.minX;S<=E.maxX;S++)for(var T=E.minY;T<=E.maxY;T++){var C=l(this.sourceZ_,S,T,a);C&&this.sourceTiles_.push(C)}0===this.sourceTiles_.length&&(this.state=On.EMPTY)}else this.state=On.EMPTY}else this.state=On.EMPTY}}else this.state=On.EMPTY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==On.LOADING&&this.unlistenSources_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(e,i,r){e&&e.getState()==On.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}.bind(this)),this.sourceTiles_.length=0,0===t.length)this.state=On.ERROR;else{var e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),r="number"==typeof i?i:i[0],n="number"==typeof i?i:i[1],o=this.targetTileGrid_.getResolution(e),s=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=Vu(r,n,this.pixelRatio_,s,this.sourceTileGrid_.getExtent(),o,a,this.triangulation_,t,this.gutter_,this.renderEdges_),this.state=On.LOADED}this.changed()},e.prototype.load=function(){if(this.state==On.IDLE){this.state=On.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(e,i,r){var n=e.getState();if(n==On.IDLE||n==On.LOADING){t++;var o=v(e,M.CHANGE,function(i){var r=e.getState();r!=On.LOADED&&r!=On.ERROR&&r!=On.EMPTY||(E(o),0===--t&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(o)}}.bind(this)),this.sourceTiles_.forEach(function(t,e,i){t.getState()==On.IDLE&&t.load()}),0===t&&setTimeout(this.reproject_.bind(this),0)}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(E),this.sourcesListenerKeys_=null},e}(yl),Ku="tileloadstart",Hu="tileloadend",Zu="tileloaderror",qu=function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.generateTileUrlFunction_=!e.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,this.tileUrlFunction=e.tileUrlFunction?e.tileUrlFunction.bind(this):ku,this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),e.tileUrlFunction&&this.setTileUrlFunction(e.tileUrlFunction,this.key_),this.tileLoadingKeys_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,i=t.target,r=o(i),n=i.getState();n==On.LOADING?(this.tileLoadingKeys_[r]=!0,e=Ku):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=n==On.ERROR?Zu:n==On.LOADED||n==On.ABORT?Hu:void 0),void 0!=e&&this.dispatchEvent(new Dl(e,i))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=this.urls=ju(t);this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Gu(t,this.tileGrid),e):this.setKey(e)},e.prototype.useTile=function(t,e,i){var r=El(t,e,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(kl);function Ju(t,e){t.getImage().src=e}var Qu=function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:Ju,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible}),this.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,this.tileClass=void 0!==e.tileClass?e.tileClass:ml,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,e){var i=this.getTileCacheForProjection(t);for(var r in this.tileCache.expireCache(this.tileCache==i?e:{}),this.tileCacheForProjection){var n=this.tileCacheForProjection[r];n.expireCache(n==i?e:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!Ie(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getOpaque=function(e){return!(this.getProjection()&&e&&!Ie(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(t){var e=this.getProjection();if(!this.tileGrid||e&&!Ie(e,t)){var i=o(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=Pl(t)),this.tileGridForProjection[i]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();if(!e||Ie(e,t))return this.tileCache;var i=o(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Cl(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,e,i,r,n,o){var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,n),h=a?this.tileUrlFunction(a,r,n):void 0,l=new this.tileClass(s,void 0!==h?On.IDLE:On.EMPTY,void 0!==h?h:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=o,v(l,M.CHANGE,this.handleTileChange,this),l},e.prototype.getTile=function(t,e,i,r,n){var o=this.getProjection();if(o&&n&&!Ie(o,n)){var s,a=this.getTileCacheForProjection(n),h=[t,e,i],l=Sl(h);a.containsKey(l)&&(s=a.get(l));var u=this.getKey();if(s&&s.key==u)return s;var p=this.getTileGridForProjection(o),c=this.getTileGridForProjection(n),d=this.getTileCoordForTileUrlFunction(h,n),f=new Wu(o,p,n,c,h,d,this.getTilePixelRatio(r),this.getGutter(),function(t,e,i,r){return this.getTileInternal(t,e,i,r,o)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_);return f.key=u,s?(f.interimTile=s,f.refreshInterimChain(),a.replace(l,f)):a.set(l,f),f}return this.getTileInternal(t,e,i,r,o||n)},e.prototype.getTileInternal=function(t,e,i,r,n){var o=null,s=El(t,e,i),a=this.getKey();if(this.tileCache.containsKey(s)){if((o=this.tileCache.get(s)).key!=a){var h=o;o=this.createTile_(t,e,i,r,n,a),h.getState()==On.IDLE?o.interimTile=h.interimTile:o.interimTile=h,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,i,r,n,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){var i=Ee(t);if(i){var r=o(i);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}},e}(qu),$u=function(t){function e(e){var i=void 0!==e.hidpi&&e.hidpi;t.call(this,{cacheSize:e.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Ee("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:ro.LOADING,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.hidpi_=i,this.culture_=void 0!==e.culture?e.culture:"en-us",this.maxZoom_=void 0!==e.maxZoom?e.maxZoom:-1,this.apiKey_=e.key,this.imagerySet_=e.imagerySet,Uu("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+this.apiKey_+"&c="+this.culture_,this.handleImageryMetadataResponse.bind(this),void 0,"jsonp")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var e=t.resourceSets[0].resources[0],i=-1==this.maxZoom_?e.zoomMax:this.maxZoom_,r=Nl(this.getProjection()),n=this.hidpi_?2:1,o=e.imageWidth==e.imageHeight?e.imageWidth/n:[e.imageWidth/n,e.imageHeight/n],s=Ml({extent:r,minZoom:e.zoomMin,maxZoom:i,tileSize:o});this.tileGrid=s;var a=this.culture_,h=this.hidpi_;if(this.tileUrlFunction=Du(e.imageUrlSubdomains.map(function(t){var i=[0,0,0],r=e.imageUrl.replace("{subdomain}",t).replace("{culture}",a);return function(t,e,n){if(t){xl(t[0],t[1],-t[2]-1,i);var o=r;return h&&(o+="&dpi=d1&device=mobile"),o.replace("{quadkey}",function(t){var e,i,r=t[0],n=new Array(r),o=1<<r-1;for(e=0;e<r;++e)i=48,t[1]&o&&(i+=1),t[2]&o&&(i+=2),n[e]=String.fromCharCode(i),o>>=1;return n.join("")}(i))}}})),e.imageryProviders){var l=Le(Ee("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var i=[],r=t.viewState,n=this.getTileGrid().getTileCoordForCoordAndResolution(r.center,r.resolution)[0];return e.imageryProviders.map(function(e){for(var r=!1,o=e.coverageAreas,s=0,a=o.length;s<a;++s){var h=o[s];if(n>=h.zoomMin&&n<=h.zoomMax){var u=h.bbox;if(Pt(Ft([u[1],u[0],u[3],u[2]],l),t.extent)){r=!0;break}}}r&&i.push(e.attribution)}),i.push('<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html">Terms of Use</a>'),i}.bind(this))}this.setState(ro.READY)}else this.setState(ro.ERROR)},e}(Qu),tp=function(t){function e(e){var i=e||{},r=void 0!==i.projection?i.projection:"EPSG:3857",n=void 0!==i.tileGrid?i.tileGrid:Ml({extent:Nl(r),maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize});t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:i.opaque,projection:r,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,attributionsCollapsible:i.attributionsCollapsible})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qu),ep=function(t){function e(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,maxZoom:void 0!==e.maxZoom?e.maxZoom:18,minZoom:e.minZoom,projection:e.projection,wrapX:e.wrapX}),this.account_=e.account,this.mapId_=e.map||"",this.config_=e.config||{},this.templateCache_={},this.initializeMap_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getConfig=function(){return this.config_},e.prototype.updateConfig=function(t){u(this.config_,t),this.initializeMap_()},e.prototype.setConfig=function(t){this.config_=t||{},this.initializeMap_()},e.prototype.initializeMap_=function(){var t=JSON.stringify(this.config_);if(this.templateCache_[t])this.applyTemplate_(this.templateCache_[t]);else{var e="https://"+this.account_+".carto.com/api/v1/map";this.mapId_&&(e+="/named/"+this.mapId_);var i=new XMLHttpRequest;i.addEventListener("load",this.handleInitResponse_.bind(this,t)),i.addEventListener("error",this.handleInitError_.bind(this)),i.open("POST",e),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(this.config_))}},e.prototype.handleInitResponse_=function(t,e){var i=e.target;if(!i.status||i.status>=200&&i.status<300){var r;try{r=JSON.parse(i.responseText)}catch(t){return void this.setState(ro.ERROR)}this.applyTemplate_(r),this.templateCache_[t]=r,this.setState(ro.READY)}else this.setState(ro.ERROR)},e.prototype.handleInitError_=function(t){this.setState(ro.ERROR)},e.prototype.applyTemplate_=function(t){var e="https://"+t.cdn_url.https+"/"+this.account_+"/api/v1/map/"+t.layergroupid+"/{z}/{x}/{y}.png";this.setUrl(e)},e}(tp),ip={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature"},rp=function(t){function e(e,i){t.call(this,e),this.feature=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),np=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,projection:void 0,state:ro.READY,wrapX:void 0===i.wrapX||i.wrapX}),this.loader_=I,this.format_=i.format,this.overlaps_=void 0==i.overlaps||i.overlaps,this.url_=i.url,void 0!==i.loader?this.loader_=i.loader:void 0!==this.url_&&(Y(this.format_,7),this.loader_=Zl(this.url_,this.format_)),this.strategy_=void 0!==i.strategy?i.strategy:ql;var r,n,o=void 0===i.useSpatialIndex||i.useSpatialIndex;this.featuresRtree_=o?new tl:null,this.loadedExtentsRtree_=new tl,this.nullGeometryFeatures_={},this.idIndex_={},this.undefIdIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(i.features)?n=i.features:i.features&&(n=(r=i.features).getArray()),o||void 0!==r||(r=new U(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==r&&this.bindFeaturesCollection_(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=o(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var i=t.getGeometry();if(i){var r=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new rp(ip.ADDFEATURE,t))}},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[v(e,M.CHANGE,this.handleFeatureChange_,this),v(e,l,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var i=!0,r=e.getId();return void 0!==r?r.toString()in this.idIndex_?i=!1:this.idIndex_[r.toString()]=e:(Y(!(t in this.undefIdIndex_),30),this.undefIdIndex_[t]=e),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],i=[],r=[],n=0,s=t.length;n<s;n++){var a=t[n],h=o(a);this.addToIndex_(h,a)&&i.push(a)}for(var l=0,u=i.length;l<u;l++){var p=i[l],c=o(p);this.setupChangeEvents_(c,p);var d=p.getGeometry();if(d){var f=d.getExtent();e.push(f),r.push(p)}else this.nullGeometryFeatures_[c]=p}this.featuresRtree_&&this.featuresRtree_.load(e,r);for(var _=0,g=i.length;_<g;_++)this.dispatchEvent(new rp(ip.ADDFEATURE,i[_]))},e.prototype.bindFeaturesCollection_=function(t){var e=!1;v(this,ip.ADDFEATURE,function(i){e||(e=!0,t.push(i.feature),e=!1)}),v(this,ip.REMOVEFEATURE,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),v(t,h.ADD,function(t){e||(e=!0,this.addFeature(t.element),e=!1)},this),v(t,h.REMOVE,function(t){e||(e=!0,this.removeFeature(t.element),e=!1)},this),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var e in this.featureChangeKeys_){this.featureChangeKeys_[e].forEach(E)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.undefIdIndex_={})}else if(this.featuresRtree_)for(var i in this.featuresRtree_.forEach(this.removeFeatureInternal,this),this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i]);this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.loadedExtentsRtree_.clear(),this.nullGeometryFeatures_={};var r=new rp(ip.CLEAR);this.dispatchEvent(r),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,e){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(i){return i.getGeometry().intersectsCoordinate(t)?e(i):void 0})},e.prototype.forEachFeatureInExtent=function(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)},e.prototype.forEachFeatureIntersectingExtent=function(t,e){return this.forEachFeatureInExtent(t,function(i){if(i.getGeometry().intersectsExtent(t)){var r=e(i);if(r)return r}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray():this.featuresRtree_&&(t=this.featuresRtree_.getAll(),d(this.nullGeometryFeatures_)||K(t,c(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_.getInExtent(t)},e.prototype.getClosestFeatureToCoordinate=function(t,e){var i=t[0],r=t[1],n=null,o=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],h=e||R;return this.featuresRtree_.forEachInExtent(a,function(t){if(h(t)){var e=t.getGeometry(),l=s;if((s=e.closestPointXY(i,r,o,s))<l){n=t;var u=Math.sqrt(s);a[0]=i-u,a[1]=r-u,a[2]=i+u,a[3]=r+u}}}),n},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var e=this.idIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var e=t.target,i=o(e),r=e.getGeometry();if(r){var n=r.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(n,e)):this.featuresRtree_&&this.featuresRtree_.update(n,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);var s=e.getId();if(void 0!==s){var a=s.toString();i in this.undefIdIndex_?(delete this.undefIdIndex_[i],this.idIndex_[a]=e):this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else i in this.undefIdIndex_||(this.removeFromIdIndex_(e),this.undefIdIndex_[i]=e);this.changed(),this.dispatchEvent(new rp(ip.CHANGEFEATURE,e))},e.prototype.hasFeature=function(t){var e=t.getId();return void 0!==e?e in this.idIndex_:o(t)in this.undefIdIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_.isEmpty()&&d(this.nullGeometryFeatures_)},e.prototype.loadFeatures=function(t,e,i){var r=this,n=this.loadedExtentsRtree_,o=this.strategy_(t,e);this.loading=!1;for(var s=function(t,s){var a=o[t];n.forEachInExtent(a,function(t){return ot(t.extent,a)})||(r.loader_.call(r,a,e,i),n.insert(a,{extent:a.slice()}),r.loading=r.loader_!==I)},a=0,h=o.length;a<h;++a)s(a)},e.prototype.removeLoadedExtent=function(t){var e,i=this.loadedExtentsRtree_;i.forEachInExtent(t,function(i){if(dt(i.extent,t))return e=i,!0}),e&&i.remove(e)},e.prototype.removeFeature=function(t){var e=o(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t),this.changed()},e.prototype.removeFeatureInternal=function(t){var e=o(t);this.featureChangeKeys_[e].forEach(E),delete this.featureChangeKeys_[e];var i=t.getId();void 0!==i?delete this.idIndex_[i.toString()]:delete this.undefIdIndex_[e],this.dispatchEvent(new rp(ip.REMOVEFEATURE,t))},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e}(wl),op=function(t){function e(e){t.call(this,{attributions:e.attributions,wrapX:e.wrapX}),this.resolution=void 0,this.distance=void 0!==e.distance?e.distance:20,this.features=[],this.geometryFunction=e.geometryFunction||function(t){var e=t.getGeometry();return Y(e.getType()==Nt.POINT,10),e},this.source=e.source,v(this.source,M.CHANGE,this.refresh,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,e,i){this.source.loadFeatures(t,e,i),e!==this.resolution&&(this.clear(),this.resolution=e,this.cluster(),this.addFeatures(this.features))},e.prototype.setDistance=function(t){this.distance=t,this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features),t.prototype.refresh.call(this)},e.prototype.cluster=function(){if(void 0!==this.resolution){this.features.length=0;for(var t=[1/0,1/0,-1/0,-1/0],e=this.distance*this.resolution,i=this.source.getFeatures(),r={},n=0,s=i.length;n<s;n++){var a=i[n];if(!(o(a)in r)){var h=this.geometryFunction(a);if(h){pt(h.getCoordinates(),t),et(t,e,t);var l=this.source.getFeaturesInExtent(t);l=l.filter(function(t){var e=o(t);return!(e in r)&&(r[e]=!0,!0)}),this.features.push(this.createCluster(l))}}}}},e.prototype.createCluster=function(t){for(var e=[0,0],i=t.length-1;i>=0;--i){var r=this.geometryFunction(t[i]);r?Hi(e,r.getCoordinates()):t.splice(i,1)}tr(e,1/t.length);var n=new B(new ci(e));return n.set("features",t),n},e}(np),sp=function(t){function e(e,i,r,n,o,s){var a=e.getExtent(),h=i.getExtent(),l=h?wt(r,h):r,u=Yu(e,i,Tt(l),n),p=new zu(e,i,l,a,u*vs),c=s(p.calculateSourceExtent(),u,o),d=xs.LOADED;c&&(d=xs.IDLE);var f=c?c.getPixelRatio():1;t.call(this,r,n,f,d),this.targetProj_=i,this.maxSourceExtent_=a,this.triangulation_=p,this.targetResolution_=n,this.targetExtent_=r,this.sourceImage_=c,this.sourcePixelRatio_=f,this.canvas_=null,this.sourceListenerKey_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state==xs.LOADING&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==xs.LOADED){var e=Ot(this.targetExtent_)/this.targetResolution_,i=Rt(this.targetExtent_)/this.targetResolution_;this.canvas_=Vu(e,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==xs.IDLE){this.state=xs.LOADING,this.changed();var t=this.sourceImage_.getState();t==xs.LOADED||t==xs.ERROR?this.reproject_():(this.sourceListenerKey_=v(this.sourceImage_,M.CHANGE,function(t){var e=this.sourceImage_.getState();e!=xs.LOADED&&e!=xs.ERROR||(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){E(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(ms),ap="imageloadstart",hp="imageloadend",lp="imageloaderror",up=function(t){function e(e,i){t.call(this,e),this.image=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);function pp(t,e){t.getImage().src=e}var cp=function(t){function e(e){t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state}),this.resolutions_=void 0!==e.resolutions?e.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=z(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,i,r){var n=this.getProjection();if(n&&r&&!Ie(n,r)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ie(this.reprojectedImage_.getProjection(),r)&&this.reprojectedImage_.getResolution()==e&&dt(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new sp(n,r,t,e,i,function(t,e,i){return this.getImageInternal(t,e,i,n)}.bind(this)),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return n&&(r=n),this.getImageInternal(t,e,i,r)},e.prototype.getImageInternal=function(t,e,i,n){return r()},e.prototype.handleImageChange=function(t){var e=t.target;switch(e.getState()){case xs.LOADING:this.loading=!0,this.dispatchEvent(new up(ap,e));break;case xs.LOADED:this.loading=!1,this.dispatchEvent(new up(hp,e));break;case xs.ERROR:this.loading=!1,this.dispatchEvent(new up(lp,e))}},e}(wl),dp=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,r,xs.IDLE),this.src_=n,this.image_=new Image,null!==o&&(this.image_.crossOrigin=o),this.imageListenerKeys_=null,this.state=xs.IDLE,this.imageLoadFunction_=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=xs.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Rt(this.extent)/this.image_.height),this.state=xs.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=xs.IDLE&&this.state!=xs.ERROR||(this.state=xs.LOADING,this.changed(),this.imageListenerKeys_=[m(this.image_,M.ERROR,this.handleImageError_,this),m(this.image_,M.LOAD,this.handleImageLoad_,this)],this.imageLoadFunction_(this,this.src_))},e.prototype.setImage=function(t){this.image_=t},e.prototype.unlistenImage_=function(){this.imageListenerKeys_.forEach(E),this.imageListenerKeys_=null},e}(ms);function fp(t,e){var i=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});var r=i.join("&");return(t=-1===(t=t.replace(/[?&]$/,"")).indexOf("?")?t+"?":t+"&")+r}var _p=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions}),this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,this.hidpi_=void 0===i.hidpi||i.hidpi,this.url_=i.url,this.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:pp,this.params_=i.params||{},this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==i.ratio?i.ratio:1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,i,r){if(void 0===this.url_)return null;e=this.findNearestResolution(e),i=this.hidpi_?i:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==i&&ot(n.getExtent(),t))return n;var o={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};u(o,this.params_);var s=((t=t.slice())[0]+t[2])/2,a=(t[1]+t[3])/2;if(1!=this.ratio_){var h=this.ratio_*Ot(t)/2,l=this.ratio_*Rt(t)/2;t[0]=s-h,t[1]=a-l,t[2]=s+h,t[3]=a+l}var p=e/i,c=Math.ceil(Ot(t)/p),d=Math.ceil(Rt(t)/p);t[0]=s-p*c/2,t[2]=s+p*c/2,t[1]=a-p*d/2,t[3]=a+p*d/2,this.imageSize_[0]=c,this.imageSize_[1]=d;var f=this.getRequestUrl_(t,this.imageSize_,i,r,o);return this.image_=new dp(t,e,i,f,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),v(this.image_,M.CHANGE,this.handleImageChange,this),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,i,r,n){var o=r.getCode().split(":").pop();n.SIZE=e[0]+","+e[1],n.BBOX=t.join(","),n.BBOXSR=o,n.IMAGESR=o,n.DPI=Math.round(90*i);var s=this.url_,a=s.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage");return a==s&&Y(!1,50),fp(a,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){u(this.params_,t),this.image_=null,this.changed()},e}(cp),gp=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions,state:i.state}),this.canvasFunction_=i.canvasFunction,this.canvas_=null,this.renderedRevision_=0,this.ratio_=void 0!==i.ratio?i.ratio:1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImageInternal=function(t,e,i,r){e=this.findNearestResolution(e);var n=this.canvas_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==i&&ot(n.getExtent(),t))return n;Mt(t=t.slice(),this.ratio_);var o=[Ot(t)/e*i,Rt(t)/e*i],s=this.canvasFunction_.call(this,t,e,i,o,r);return s&&(n=new Es(t,e,i,s)),this.canvas_=n,this.renderedRevision_=this.getRevision(),n},e}(cp);var yp=function(t){function e(e){t.call(this,{projection:e.projection,resolutions:e.resolutions}),this.crossOrigin_=void 0!==e.crossOrigin?e.crossOrigin:null,this.displayDpi_=void 0!==e.displayDpi?e.displayDpi:96,this.params_=e.params||{},this.url_=e.url,this.imageLoadFunction_=void 0!==e.imageLoadFunction?e.imageLoadFunction:pp,this.hidpi_=void 0===e.hidpi||e.hidpi,this.metersPerUnit_=void 0!==e.metersPerUnit?e.metersPerUnit:1,this.ratio_=void 0!==e.ratio?e.ratio:1,this.useOverlay_=void 0!==e.useOverlay&&e.useOverlay,this.image_=null,this.renderedRevision_=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,i,r){e=this.findNearestResolution(e),i=this.hidpi_?i:1;var n=this.image_;if(n&&this.renderedRevision_==this.getRevision()&&n.getResolution()==e&&n.getPixelRatio()==i&&ot(n.getExtent(),t))return n;1!=this.ratio_&&Mt(t=t.slice(),this.ratio_);var o=[Ot(t)/e*i,Rt(t)/e*i];if(void 0!==this.url_){var s=this.getUrl(this.url_,this.params_,t,o,r);v(n=new dp(t,e,i,s,this.crossOrigin_,this.imageLoadFunction_),M.CHANGE,this.handleImageChange,this)}else n=null;return this.image_=n,this.renderedRevision_=this.getRevision(),n},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.updateParams=function(t){u(this.params_,t),this.changed()},e.prototype.getUrl=function(t,e,i,r,n){var o=function(t,e,i,r){var n=Ot(t),o=Rt(t),s=e[0],a=e[1],h=.0254/r;return a*n>s*o?n*i/(s*h):o*i/(a*h)}(i,r,this.metersPerUnit_,this.displayDpi_),s=Tt(i),a={OPERATION:this.useOverlay_?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol/source/ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.displayDpi_,SETDISPLAYWIDTH:Math.round(r[0]),SETDISPLAYHEIGHT:Math.round(r[1]),SETVIEWSCALE:o,SETVIEWCENTERX:s[0],SETVIEWCENTERY:s[1]};return u(a,e),fp(t,a)},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e}(cp),vp=function(t){function e(e){var i=void 0!==e.crossOrigin?e.crossOrigin:null,r=void 0!==e.imageLoadFunction?e.imageLoadFunction:pp;t.call(this,{attributions:e.attributions,projection:Ee(e.projection)}),this.url_=e.url,this.imageExtent_=e.imageExtent,this.image_=new dp(this.imageExtent_,void 0,1,this.url_,i,r),this.imageSize_=e.imageSize?e.imageSize:null,v(this.image_,M.CHANGE,this.handleImageChange,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,i,r){return Pt(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==xs.LOADED){var i,r,n=this.image_.getExtent(),o=this.image_.getImage();this.imageSize_?(i=this.imageSize_[0],r=this.imageSize_[1]):(i=o.width,r=o.height);var s=Rt(n)/r,a=Math.ceil(Ot(n)/s);if(a!=i){var h=Jn(a,r),l=h.canvas;h.drawImage(o,0,0,i,r,0,0,l.width,l.height),this.image_.setImage(l)}}t.prototype.handleImageChange.call(this,e)},e}(cp),mp="1.3.0",xp="carmentaserver",Ep="geoserver",Sp="mapserver",Tp="qgis",Cp=[101,101],Rp=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,projection:i.projection,resolutions:i.resolutions}),this.crossOrigin_=void 0!==i.crossOrigin?i.crossOrigin:null,this.url_=i.url,this.imageLoadFunction_=void 0!==i.imageLoadFunction?i.imageLoadFunction:pp,this.params_=i.params||{},this.v13_=!0,this.updateV13_(),this.serverType_=i.serverType,this.hidpi_=void 0===i.hidpi||i.hidpi,this.image_=null,this.imageSize_=[0,0],this.renderedRevision_=0,this.ratio_=void 0!==i.ratio?i.ratio:1.5}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getGetFeatureInfoUrl=function(t,e,i,r){if(void 0!==this.url_){var n=Ee(i),o=this.getProjection();o&&o!==n&&(e=Yu(o,n,t,e),t=Pe(t,n,o));var s=Ct(t,e,0,Cp),a={SERVICE:"WMS",VERSION:mp,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};u(a,this.params_,r);var h=Math.floor((t[0]-s[0])/e),l=Math.floor((s[3]-t[1])/e);return a[this.v13_?"I":"X"]=h,a[this.v13_?"J":"Y"]=l,this.getRequestUrl_(s,Cp,1,o||n,a)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,e,i,r){if(void 0===this.url_)return null;e=this.findNearestResolution(e),1==i||this.hidpi_&&void 0!==this.serverType_||(i=1);var n=e/i,o=Tt(t),s=Ct(o,n,0,[Math.ceil(Ot(t)/n),Math.ceil(Rt(t)/n)]),a=Ct(o,n,0,[Math.ceil(this.ratio_*Ot(t)/n),Math.ceil(this.ratio_*Rt(t)/n)]),h=this.image_;if(h&&this.renderedRevision_==this.getRevision()&&h.getResolution()==e&&h.getPixelRatio()==i&&ot(h.getExtent(),s))return h;var l={SERVICE:"WMS",VERSION:mp,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};u(l,this.params_),this.imageSize_[0]=Math.round(Ot(a)/n),this.imageSize_[1]=Math.round(Rt(a)/n);var p=this.getRequestUrl_(a,this.imageSize_,i,r,l);return this.image_=new dp(a,e,i,p,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),v(this.image_,M.CHANGE,this.handleImageChange,this),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,e,i,r,n){if(Y(void 0!==this.url_,9),n[this.v13_?"CRS":"SRS"]=r.getCode(),"STYLES"in this.params_||(n.STYLES=""),1!=i)switch(this.serverType_){case Ep:var o=90*i+.5|0;"FORMAT_OPTIONS"in n?n.FORMAT_OPTIONS+=";dpi:"+o:n.FORMAT_OPTIONS="dpi:"+o;break;case Sp:n.MAP_RESOLUTION=90*i;break;case xp:case Tp:n.DPI=90*i;break;default:Y(!1,8)}n.WIDTH=e[0],n.HEIGHT=e[1];var s,a=r.getAxisOrientation();return s=this.v13_&&"ne"==a.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,n.BBOX=s.join(","),fp(this.url_,n)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){u(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||mp;this.v13_=Ki(t,"1.3")>=0},e}(cp),wp='&#169; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.',Ip=function(t){function e(e){var i,r=e||{};i=void 0!==r.attributions?r.attributions:[wp];var n=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",o=void 0!==r.url?r.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";t.call(this,{attributions:i,cacheSize:r.cacheSize,crossOrigin:n,opaque:void 0===r.opaque||r.opaque,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,url:o,wrapX:r.wrapX,attributionsCollapsible:!1})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(tp),Lp=i(2),Op=function(t){function e(e){var i=e||{};t.call(this,i),this.type=Ss.IMAGE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xo);Op.prototype.getSource;var Pp=Op,bp="preload",Mp="useInterimTilesOnError",Fp=function(t){function e(e){var i=e||{},r=u({},i);delete r.preload,delete r.useInterimTilesOnError,t.call(this,r),this.setPreload(void 0!==i.preload?i.preload:0),this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),this.type=Ss.TILE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPreload=function(){return this.get(bp)},e.prototype.setPreload=function(t){this.set(bp,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Mp)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Mp,t)},e}(xo);Fp.prototype.getSource;var Ap=Fp,Np="beforeoperations",Gp="afteroperations",Dp={PIXEL:"pixel",IMAGE:"image"},kp=function(t){function e(e,i,r){t.call(this,e),this.extent=i.extent,this.resolution=i.viewState.resolution/i.pixelRatio,this.data=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),jp=null;function Up(t,e,i){if(!t.prepareFrame(e,i))return null;var r=e.size[0],n=e.size[1];if(jp){var o=jp.canvas;o.width!==r||o.height!==n?jp=Jn(r,n):jp.clearRect(0,0,r,n)}else jp=Jn(r,n);return t.composeFrame(e,i,jp),jp.getImageData(0,0,r,n)}function Yp(t){var e=t,i=t,r=t,n=null;return"function"==typeof e.getTile?n=function(t){var e=new Ap({source:t});return new ha(e)}(e):"function"==typeof i.getImage?n=function(t){var e=new Pp({source:t});return new ra(e)}(i):r.getType()===Ss.TILE?n=new ha(r):r.getType()!=Ss.IMAGE&&r.getType()!=Ss.VECTOR||(n=new ra(r)),n}var Bp=function(t){function e(e){t.call(this,{projection:null}),this.worker_=null,this.operationType_=void 0!==e.operationType?e.operationType:Dp.PIXEL,this.threads_=void 0!==e.threads?e.threads:1,this.renderers_=function(t){for(var e=t.length,i=new Array(e),r=0;r<e;++r)i[r]=Yp(t[r]);return i}(e.sources);for(var i=0,r=this.renderers_.length;i<r;++i)v(this.renderers_[i],M.CHANGE,this.changed,this);this.tileQueue_=new Mn(function(){return 1},this.changed.bind(this));for(var n=function(t){return t.map(function(t){return t.getLayer().getLayerState()})}(this.renderers_),s={},a=0,h=n.length;a<h;++a)s[o(n[a].layer)]=n[a];this.requestedFrameState_,this.renderedImageCanvas_=null,this.renderedRevision_,this.frameState_={animate:!1,coordinateToPixelTransform:[1,0,0,1,0,0],extent:null,focus:null,index:0,layerStates:s,layerStatesArray:n,pixelRatio:1,pixelToCoordinateTransform:[1,0,0,1,0,0],postRenderFunctions:[],size:[0,0],skippedFeatureUids:{},tileQueue:this.tileQueue_,time:Date.now(),usedTiles:{},viewState:{rotation:0},viewHints:[],wantedTiles:{}},void 0!==e.operation&&this.setOperation(e.operation,e.lib)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setOperation=function(t,e){this.worker_=new Lp.Processor({operation:t,imageOps:this.operationType_===Dp.IMAGE,queue:1,lib:e,threads:this.threads_}),this.changed()},e.prototype.updateFrameState_=function(t,e,i){var r=u({},this.frameState_);r.viewState=u({},r.viewState);var n=Tt(t);r.extent=t.slice(),r.focus=n,r.size[0]=Math.round(Ot(t)/e),r.size[1]=Math.round(Rt(t)/e),r.time=Date.now(),r.animate=!1;var o=r.viewState;return o.center=n,o.projection=i,o.resolution=e,r},e.prototype.allSourcesReady_=function(){for(var t=!0,e=0,i=this.renderers_.length;e<i;++e)if(this.renderers_[e].getLayer().getSource().getState()!==ro.READY){t=!1;break}return t},e.prototype.getImage=function(t,e,i,r){if(!this.allSourcesReady_())return null;var n=this.updateFrameState_(t,e,r);if(this.requestedFrameState_=n,this.renderedImageCanvas_){var o=this.renderedImageCanvas_.getResolution(),s=this.renderedImageCanvas_.getExtent();e===o&&dt(t,s)||(this.renderedImageCanvas_=null)}return this.renderedImageCanvas_&&this.getRevision()===this.renderedRevision_||this.processSources_(),n.tileQueue.loadMoreTiles(16,16),n.animate&&requestAnimationFrame(this.changed.bind(this)),this.renderedImageCanvas_},e.prototype.processSources_=function(){for(var t=this.requestedFrameState_,e=this.renderers_.length,i=new Array(e),r=0;r<e;++r){var n=Up(this.renderers_[r],t,t.layerStatesArray[r]);if(!n)return;i[r]=n}var o={};this.dispatchEvent(new kp(Np,t,o)),this.worker_.process(i,o,this.onWorkerComplete_.bind(this,t))},e.prototype.onWorkerComplete_=function(t,e,i,r){if(!e&&i){var n=t.extent,o=t.viewState.resolution;if(o===this.requestedFrameState_.viewState.resolution&&dt(n,this.requestedFrameState_.extent)){var s;if(this.renderedImageCanvas_)s=this.renderedImageCanvas_.getImage().getContext("2d");else s=Jn(Math.round(Ot(n)/o),Math.round(Rt(n)/o)),this.renderedImageCanvas_=new Es(n,o,1,s.canvas);s.putImageData(i,0,0),this.changed(),this.renderedRevision_=this.getRevision(),this.dispatchEvent(new kp(Gp,t,r))}}},e.prototype.getImageInternal=function(){return null},e}(cp),Vp=['Map tiles by <a href="https://stamen.com/">Stamen Design</a>, under <a href="https://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>.',wp],Xp={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},zp={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}},Wp=function(t){function e(e){var i=e.layer.indexOf("-"),r=-1==i?e.layer:e.layer.slice(0,i),n=zp[r],o=Xp[e.layer],s=void 0!==e.url?e.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+e.layer+"/{z}/{x}/{y}."+o.extension;t.call(this,{attributions:Vp,cacheSize:e.cacheSize,crossOrigin:"anonymous",maxZoom:void 0!=e.maxZoom?e.maxZoom:n.maxZoom,minZoom:void 0!=e.minZoom?e.minZoom:n.minZoom,opaque:o.opaque,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileLoadFunction:e.tileLoadFunction,url:s,wrapX:e.wrapX})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(tp);function Kp(t,e,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){var n=r.getTileCoordExtent(t,this.tmpExtent_),o=ho(r.getTileSize(t[0]),this.tmpSize);1!=e&&(o=ao(o,e,this.tmpSize));var s={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};return u(s,this.params_),this.getRequestUrl_(t,o,n,e,i,s)}}var Hp=function(t){function e(e){var i=e||{};t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:Kp,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition}),this.params_=i.params||{},this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.setKey(this.getKeyForParams_())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,r,n,o){var s=this.urls;if(s){var a,h=n.getCode().split(":").pop();if(o.SIZE=e[0]+","+e[1],o.BBOX=i.join(","),o.BBOXSR=h,o.IMAGESR=h,o.DPI=Math.round(o.DPI?o.DPI*r:90*r),1==s.length)a=s[0];else a=s[Xt(Tl(t),s.length)];return fp(a.replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"),o)}},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.updateParams=function(t){u(this.params_,t),this.setKey(this.getKeyForParams_())},e}(Qu),Zp=function(t){function e(e,i,r){t.call(this,e,On.LOADED),this.tileSize_=i,this.text_=r,this.canvas_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){if(this.canvas_)return this.canvas_;var t=this.tileSize_,e=Jn(t[0],t[1]);return e.strokeStyle="black",e.strokeRect(.5,.5,t[0]+.5,t[1]+.5),e.fillStyle="black",e.textAlign="center",e.textBaseline="middle",e.font="24px sans-serif",e.fillText(this.text_,t[0]/2,t[1]/2),this.canvas_=e.canvas,e.canvas},e.prototype.load=function(){},e}(yl),qp=function(t){function e(e){t.call(this,{opaque:!1,projection:e.projection,tileGrid:e.tileGrid,wrapX:void 0===e.wrapX||e.wrapX})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getTile=function(t,e,i){var r=El(t,e,i);if(this.tileCache.containsKey(r))return this.tileCache.get(r);var n=ho(this.tileGrid.getTileSize(t)),o=[t,e,i],s=this.getTileCoordForTileUrlFunction(o),a=s?this.getTileCoordForTileUrlFunction(s).toString():"",h=new Zp(o,n,a);return this.tileCache.set(r,h),h},e}(kl),Jp=function(t){function e(e){if(t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,projection:Ee("EPSG:3857"),reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:ro.LOADING,tileLoadFunction:e.tileLoadFunction,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.tileJSON_=null,e.url)if(e.jsonp)Uu(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var i=new XMLHttpRequest;i.addEventListener("load",this.onXHRLoad_.bind(this)),i.addEventListener("error",this.onXHRError_.bind(this)),i.open("GET",e.url),i.send()}else e.tileJSON?this.handleTileJSONResponse(e.tileJSON):Y(!1,51)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var i;try{i=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTileJSON=function(){return this.tileJSON_},e.prototype.handleTileJSONResponse=function(t){var e,i=Ee("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var n=Le(i,r);e=Ft(t.bounds,n)}var o=t.minzoom||0,s=t.maxzoom||22,a=Ml({extent:Nl(r),maxZoom:s,minZoom:o});if(this.tileGrid=a,this.tileUrlFunction=Gu(t.tiles,a),void 0!==t.attribution&&!this.getAttributions()){var h=void 0!==e?e:i.getExtent();this.setAttributions(function(e){return Pt(h,e.extent)?[t.attribution]:null})}this.tileJSON_=t,this.setState(ro.READY)},e.prototype.handleTileJSONError=function(){this.setState(ro.ERROR)},e}(Qu);function Qp(t,e,i){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(i)),!(r.getResolutions().length<=t[0])){1==e||this.hidpi_&&void 0!==this.serverType_||(e=1);var n=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.tmpExtent_),s=ho(r.getTileSize(t[0]),this.tmpSize),a=this.gutter_;0!==a&&(s=so(s,a,this.tmpSize),o=et(o,n*a,o)),1!=e&&(s=ao(s,e,this.tmpSize));var h={SERVICE:"WMS",VERSION:mp,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return u(h,this.params_),this.getRequestUrl_(t,s,o,e,i,h)}}var $p=function(t){function e(e){var i=e||{},r=i.params||{},n=!("TRANSPARENT"in r)||r.TRANSPARENT;t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,opaque:!n,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,tileUrlFunction:Qp,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition}),this.gutter_=void 0!==i.gutter?i.gutter:0,this.params_=r,this.v13_=!0,this.serverType_=i.serverType,this.hidpi_=void 0===i.hidpi||i.hidpi,this.tmpExtent_=[1/0,1/0,-1/0,-1/0],this.updateV13_(),this.setKey(this.getKeyForParams_())}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getGetFeatureInfoUrl=function(t,e,i,r){var n=Ee(i),o=this.getProjection(),s=this.getTileGrid();s||(s=this.getTileGridForProjection(n));var a=s.getTileCoordForCoordAndResolution(t,e);if(!(s.getResolutions().length<=a[0])){var h=s.getResolution(a[0]),l=s.getTileCoordExtent(a,this.tmpExtent_),p=ho(s.getTileSize(a[0]),this.tmpSize),c=this.gutter_;0!==c&&(p=so(p,c,this.tmpSize),l=et(l,h*c,l)),o&&o!==n&&(h=Yu(o,n,t,h),l=be(l,n,o),t=Pe(t,n,o));var d={SERVICE:"WMS",VERSION:mp,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};u(d,this.params_,r);var f=Math.floor((t[0]-l[0])/h),_=Math.floor((l[3]-t[1])/h);return d[this.v13_?"I":"X"]=f,d[this.v13_?"J":"Y"]=_,this.getRequestUrl_(a,p,l,1,o||n,d)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,e,i,r,n,o){var s=this.urls;if(s){if(o.WIDTH=e[0],o.HEIGHT=e[1],o[this.v13_?"CRS":"SRS"]=n.getCode(),"STYLES"in this.params_||(o.STYLES=""),1!=r)switch(this.serverType_){case Ep:var a=90*r+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+a:o.FORMAT_OPTIONS="dpi:"+a;break;case Sp:o.MAP_RESOLUTION=90*r;break;case xp:case Tp:o.DPI=90*r;break;default:Y(!1,52)}var h,l,u=n.getAxisOrientation(),p=i;if(this.v13_&&"ne"==u.substr(0,2))h=i[0],p[0]=i[1],p[1]=h,h=i[2],p[2]=i[3],p[3]=h;if(o.BBOX=p.join(","),1==s.length)l=s[0];else l=s[Xt(Tl(t),s.length)];return fp(l,o)}},e.prototype.getTilePixelRatio=function(t){return this.hidpi_&&void 0!==this.serverType_?t:1},e.prototype.getKeyForParams_=function(){var t=0,e=[];for(var i in this.params_)e[t++]=i+"-"+this.params_[i];return e.join("/")},e.prototype.updateParams=function(t){u(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||mp;this.v13_=Ki(t,"1.3")>=0},e}(Qu),tc=function(t){function e(e,i,r,n,o,s){t.call(this,e,i),this.src_=r,this.extent_=n,this.preemptive_=o,this.grid_=null,this.keys_=null,this.data_=null,this.jsonp_=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){return null},e.prototype.getData=function(t){if(!this.grid_||!this.keys_)return null;var e=(t[0]-this.extent_[0])/(this.extent_[2]-this.extent_[0]),i=(t[1]-this.extent_[1])/(this.extent_[3]-this.extent_[1]),r=this.grid_[Math.floor((1-i)*this.grid_.length)];if("string"!=typeof r)return null;var n=r.charCodeAt(Math.floor(e*r.length));n>=93&&n--,n>=35&&n--;var o=null;if((n-=32)in this.keys_){var s=this.keys_[n];o=this.data_&&s in this.data_?this.data_[s]:s}return o},e.prototype.forDataAtCoordinate=function(t,e,i,r){this.state==On.IDLE&&!0===r?(m(this,M.CHANGE,function(r){e.call(i,this.getData(t))},this),this.loadInternal_()):!0===r?setTimeout(function(){e.call(i,this.getData(t))}.bind(this),0):e.call(i,this.getData(t))},e.prototype.getKey=function(){return this.src_},e.prototype.handleError_=function(){this.state=On.ERROR,this.changed()},e.prototype.handleLoad_=function(t){this.grid_=t.grid,this.keys_=t.keys,this.data_=t.data,this.state=On.EMPTY,this.changed()},e.prototype.loadInternal_=function(){if(this.state==On.IDLE)if(this.state=On.LOADING,this.jsonp_)Uu(this.src_,this.handleLoad_.bind(this),this.handleError_.bind(this));else{var t=new XMLHttpRequest;t.addEventListener("load",this.onXHRLoad_.bind(this)),t.addEventListener("error",this.onXHRError_.bind(this)),t.open("GET",this.src_),t.send()}},e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var i;try{i=JSON.parse(e.responseText)}catch(t){return void this.handleError_()}this.handleLoad_(i)}else this.handleError_()},e.prototype.onXHRError_=function(t){this.handleError_()},e.prototype.load=function(){this.preemptive_&&this.loadInternal_()},e}(yl),ec=function(t){function e(e){if(t.call(this,{projection:Ee("EPSG:3857"),state:ro.LOADING}),this.preemptive_=void 0===e.preemptive||e.preemptive,this.tileUrlFunction_=ku,this.template_=void 0,this.jsonp_=e.jsonp||!1,e.url)if(this.jsonp_)Uu(e.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var i=new XMLHttpRequest;i.addEventListener("load",this.onXHRLoad_.bind(this)),i.addEventListener("error",this.onXHRError_.bind(this)),i.open("GET",e.url),i.send()}else e.tileJSON?this.handleTileJSONResponse(e.tileJSON):Y(!1,51)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.onXHRLoad_=function(t){var e=t.target;if(!e.status||e.status>=200&&e.status<300){var i;try{i=JSON.parse(e.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(i)}else this.handleTileJSONError()},e.prototype.onXHRError_=function(t){this.handleTileJSONError()},e.prototype.getTemplate=function(){return this.template_},e.prototype.forDataAtCoordinateAndResolution=function(t,e,i,r){if(this.tileGrid){var n=this.tileGrid.getTileCoordForCoordAndResolution(t,e);this.getTile(n[0],n[1],n[2],1,this.getProjection()).forDataAtCoordinate(t,i,null,r)}else!0===r?setTimeout(function(){i(null)},0):i(null)},e.prototype.handleTileJSONError=function(){this.setState(ro.ERROR)},e.prototype.handleTileJSONResponse=function(t){var e,i=Ee("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var n=Le(i,r);e=Ft(t.bounds,n)}var o=t.minzoom||0,s=t.maxzoom||22,a=Ml({extent:Nl(r),maxZoom:s,minZoom:o});this.tileGrid=a,this.template_=t.template;var h=t.grids;if(h){if(this.tileUrlFunction_=Gu(h,a),void 0!==t.attribution){var l=void 0!==e?e:i.getExtent();this.setAttributions(function(e){return Pt(l,e.extent)?[t.attribution]:null})}this.setState(ro.READY)}else this.setState(ro.ERROR)},e.prototype.getTile=function(t,e,i,r,n){var o=El(t,e,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,n),h=this.tileUrlFunction_(a,r,n),l=new tc(s,void 0!==h?On.IDLE:On.EMPTY,void 0!==h?h:"",this.tileGrid.getTileCoordExtent(s),this.preemptive_,this.jsonp_);return this.tileCache.set(o,l),l},e.prototype.useTile=function(t,e,i){var r=El(t,e,i);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(kl),ic=function(t){function e(i,r,n,o,s,a,h,l,u,p,c,d,f,_,g){if(t.call(this,i,r,{transition:0}),this.context_={},this.loader_,this.replayState_={},this.sourceTiles_=p,this.tileKeys=[],this.extent=null,this.sourceRevision_=n,this.wrappedTileCoord=a,this.loadListenerKeys_=[],this.sourceTileListenerKeys_=[],a){var y=this.extent=u.getTileCoordExtent(a),m=u.getResolution(g),x=l.getZForResolution(m),E=g!=i[0],S=0;if(l.forEachTileCoord(y,x,function(t){var e=wt(y,l.getTileCoordExtent(t)),i=l.getExtent();if(i&&(e=wt(e,i,e)),Ot(e)/m>=.5&&Rt(e)/m>=.5){++S;var r=t.toString(),n=p[r];if(!n&&!E){var a=h(t,c,d);n=p[r]=new f(t,void 0==a?On.EMPTY:On.IDLE,void 0==a?"":a,o,s),this.sourceTileListenerKeys_.push(v(n,M.CHANGE,_))}!n||E&&n.getState()!=On.LOADED||(n.consumers++,this.tileKeys.push(r))}}.bind(this)),E&&S==this.tileKeys.length&&this.finishLoading_(),g<=i[0]&&this.state!=On.LOADED)for(;g>u.getMinZoom();){var T=new e(i,r,n,o,s,a,h,l,u,p,c,d,f,I,--g);if(T.state==On.LOADED){this.interimTile=T;break}}}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.state=On.ABORT,this.changed(),this.interimTile&&this.interimTile.dispose();for(var e=0,i=this.tileKeys.length;e<i;++e){var r=this.tileKeys[e],n=this.getTile(r);n.consumers--,0==n.consumers&&(delete this.sourceTiles_[r],n.dispose())}this.tileKeys.length=0,this.sourceTiles_=null,this.loadListenerKeys_.forEach(E),this.loadListenerKeys_.length=0,this.sourceTileListenerKeys_.forEach(E),this.sourceTileListenerKeys_.length=0,t.prototype.disposeInternal.call(this)},e.prototype.getContext=function(t){var e=o(t);return e in this.context_||(this.context_[e]=Jn()),this.context_[e]},e.prototype.getImage=function(t){return-1==this.getReplayState(t).renderedTileRevision?null:this.getContext(t).canvas},e.prototype.getReplayState=function(t){var e=o(t);return e in this.replayState_||(this.replayState_[e]={dirty:!1,renderedRenderOrder:null,renderedRevision:-1,renderedTileRevision:-1}),this.replayState_[e]},e.prototype.getKey=function(){return this.tileKeys.join("/")+"-"+this.sourceRevision_},e.prototype.getTile=function(t){return this.sourceTiles_[t]},e.prototype.load=function(){var t=0,e={};this.state==On.IDLE&&this.setState(On.LOADING),this.state==On.LOADING&&this.tileKeys.forEach(function(i){var r=this.getTile(i);if(r.state==On.IDLE&&(r.setLoader(this.loader_),r.load()),r.state==On.LOADING){var n=v(r,M.CHANGE,function(i){var n=r.getState();if(n==On.LOADED||n==On.ERROR){var s=o(r);n==On.ERROR?e[s]=!0:(--t,delete e[s]),t-Object.keys(e).length==0&&this.finishLoading_()}}.bind(this));this.loadListenerKeys_.push(n),++t}}.bind(this)),t-Object.keys(e).length==0&&setTimeout(this.finishLoading_.bind(this),0)},e.prototype.finishLoading_=function(){for(var t=this.tileKeys.length,e=0,i=t-1;i>=0;--i){var r=this.getTile(this.tileKeys[i]).getState();r!=On.LOADED&&--t,r==On.EMPTY&&++e}t==this.tileKeys.length?(this.loadListenerKeys_.forEach(E),this.loadListenerKeys_.length=0,this.setState(On.LOADED)):this.setState(e==this.tileKeys.length?On.EMPTY:On.ERROR)},e}(yl);function rc(t,e){var i=Hl(e,t.getFormat(),t.onLoad.bind(t),t.onError.bind(t));t.setLoader(i)}var nc=[0,0,4096,4096],oc=function(t){function e(e,i,r,n,o,s){t.call(this,e,i,s),this.consumers=0,this.extent_=null,this.format_=n,this.features_=null,this.loader_,this.projection_=null,this.replayGroups_={},this.tileLoadFunction_=o,this.url_=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.features_=null,this.replayGroups_={},this.state=On.ABORT,this.changed(),t.prototype.disposeInternal.call(this)},e.prototype.getExtent=function(){return this.extent_||nc},e.prototype.getFormat=function(){return this.format_},e.prototype.getFeatures=function(){return this.features_},e.prototype.getKey=function(){return this.url_},e.prototype.getProjection=function(){return this.projection_},e.prototype.getReplayGroup=function(t,e){return this.replayGroups_[o(t)+","+e]},e.prototype.load=function(){this.state==On.IDLE&&(this.setState(On.LOADING),this.tileLoadFunction_(this,this.url_),this.loader_(null,NaN,null))},e.prototype.onLoad=function(t,e,i){this.setProjection(e),this.setFeatures(t),this.setExtent(i)},e.prototype.onError=function(){this.setState(On.ERROR)},e.prototype.setExtent=function(t){this.extent_=t},e.prototype.setFeatures=function(t){this.features_=t,this.setState(On.LOADED)},e.prototype.setProjection=function(t){this.projection_=t},e.prototype.setReplayGroup=function(t,e,i){this.replayGroups_[o(t)+","+e]=i},e.prototype.setLoader=function(t){this.loader_=t},e}(yl),sc=function(t){function e(e){var i=e.projection||"EPSG:3857",r=e.extent||Nl(i),n=e.tileGrid||Ml({extent:r,maxZoom:e.maxZoom||22,minZoom:e.minZoom,tileSize:e.tileSize||512});t.call(this,{attributions:e.attributions,cacheSize:void 0!==e.cacheSize?e.cacheSize:128,opaque:!1,projection:i,state:e.state,tileGrid:n,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:rc,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition}),this.format_=e.format?e.format:null,this.sourceTiles_={},this.overlaps_=void 0==e.overlaps||e.overlaps,this.tileClass=e.tileClass?e.tileClass:oc,this.tileGrids_={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.clear=function(){this.tileCache.clear(),this.sourceTiles_={}},e.prototype.getTile=function(t,e,i,r,n){var o=El(t,e,i);if(this.tileCache.containsKey(o))return this.tileCache.get(o);var s=[t,e,i],a=this.getTileCoordForTileUrlFunction(s,n),h=new ic(s,null!==a?On.IDLE:On.EMPTY,this.getRevision(),this.format_,this.tileLoadFunction,a,this.tileUrlFunction,this.tileGrid,this.getTileGridForProjection(n),this.sourceTiles_,r,n,this.tileClass,this.handleTileChange.bind(this),s[0]);return this.tileCache.set(o,h),h},e.prototype.getTileGridForProjection=function(t){var e=t.getCode(),i=this.tileGrids_[e];if(!i){var r=this.tileGrid;i=this.tileGrids_[e]=Al(t,void 0,r?r.getTileSize(r.getMinZoom()):void 0)}return i},e.prototype.getTilePixelRatio=function(t){return t},e.prototype.getTilePixelSize=function(t,e,i){var r=ho(this.getTileGridForProjection(i).getTileSize(t),this.tmpSize);return[Math.round(r[0]*e),Math.round(r[1]*e)]},e}(qu),ac={KVP:"KVP",REST:"REST"},hc=function(t){function e(e){var i=void 0!==e.requestEncoding?e.requestEncoding:ac.KVP,r=e.tileGrid,n=e.urls;void 0===n&&void 0!==e.url&&(n=ju(e.url)),t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:r,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:ku,urls:n,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition}),this.version_=void 0!==e.version?e.version:"1.0.0",this.format_=void 0!==e.format?e.format:"image/jpeg",this.dimensions_=void 0!==e.dimensions?e.dimensions:{},this.layer_=e.layer,this.matrixSet_=e.matrixSet,this.style_=e.style,this.requestEncoding_=i,this.setKey(this.getKeyForDimensions_()),n&&n.length>0&&(this.tileUrlFunction=Du(n.map(lc.bind(this))))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Du(t.map(lc.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var i in this.dimensions_)e[t++]=i+"-"+this.dimensions_[i];return e.join("/")},e.prototype.updateDimensions=function(t){u(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e}(Qu);function lc(t){var e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};e==ac.KVP&&u(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=e==ac.KVP?fp(t,i):t.replace(/\{(\w+?)\}/g,function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t});var r=this.tileGrid,n=this.dimensions_;return function(i,o,s){if(i){var a={TileMatrix:r.getMatrixId(i[0]),TileCol:i[1],TileRow:-i[2]-1};u(a,n);var h=t;return h=e==ac.KVP?fp(h,a):h.replace(/\{(\w+?)\}/g,function(t,e){return a[e]})}}}var uc={DEFAULT:"default",TRUNCATED:"truncated"},pc=function(t){function e(e,i,r,n,o,s,a){t.call(this,i,r,n,o,s,a),this.zoomifyImage_=null,this.tileSize_=ho(e.getTileSize(i[0]))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getImage=function(){if(this.zoomifyImage_)return this.zoomifyImage_;var e=t.prototype.getImage.call(this);if(this.state==On.LOADED){var i=this.tileSize_;if(e.width==i[0]&&e.height==i[1])return this.zoomifyImage_=e,e;var r=Jn(i[0],i[1]);return r.drawImage(e,0,0),this.zoomifyImage_=r.canvas,r.canvas}return e},e}(ml),cc=function(t){function e(e){var i=e||{},r=i.size,n=void 0!==i.tierSizeCalculation?i.tierSizeCalculation:uc.DEFAULT,o=r[0],s=r[1],a=i.extent||[0,-r[1],r[0],0],h=[],l=i.tileSize||An,u=l;switch(n){case uc.DEFAULT:for(;o>u||s>u;)h.push([Math.ceil(o/u),Math.ceil(s/u)]),u+=u;break;case uc.TRUNCATED:for(var p=o,c=s;p>u||c>u;)h.push([Math.ceil(p/u),Math.ceil(c/u)]),p>>=1,c>>=1;break;default:Y(!1,53)}h.push([1,1]),h.reverse();for(var d=[1],f=[0],_=1,g=h.length;_<g;_++)d.push(1<<_),f.push(h[_-1][0]*h[_-1][1]+f[_-1]);d.reverse();var y=new Ol({tileSize:l,extent:a,origin:It(a),resolutions:d}),v=i.url;v&&-1==v.indexOf("{TileGroup}")&&-1==v.indexOf("{tileIndex}")&&(v+="{TileGroup}/{z}-{x}-{y}.jpg");var m=Du(ju(v).map(function(t){return function(e,i,r){if(e){var n=e[0],o=e[1],s=-e[2]-1,a=o+s*h[n][0],l=y.getTileSize(n),u=Array.isArray(l)?l[0]:l,p={z:n,x:o,y:s,tileIndex:a,TileGroup:"TileGroup"+((a+f[n])/u|0)};return t.replace(/\{(\w+?)\}/g,function(t,e){return p[e]})}}})),x=pc.bind(null,y);t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:x,tileGrid:y,tileUrlFunction:m,transition:i.transition})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qu);var dc="renderOrder",fc=function(t){function e(e){var i=e||{},r=u({},i);delete r.style,delete r.renderBuffer,delete r.updateWhileAnimating,delete r.updateWhileInteracting,t.call(this,r),this.declutter_=void 0!==i.declutter&&i.declutter,this.renderBuffer_=void 0!==i.renderBuffer?i.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(i.style),this.updateWhileAnimating_=void 0!==i.updateWhileAnimating&&i.updateWhileAnimating,this.updateWhileInteracting_=void 0!==i.updateWhileInteracting&&i.updateWhileInteracting,this.renderMode_=i.renderMode||Ts.VECTOR,this.type=Ss.VECTOR}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.setDeclutter=function(t){this.declutter_=t},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(dc)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.setRenderOrder=function(t){this.set(dc,t)},e.prototype.setStyle=function(t){this.style_=void 0!==t?t:bu,this.styleFunction_=null===t?void 0:function(t){var e;if("function"==typeof t)e=t;else{var i;Array.isArray(t)?i=t:(Y("function"==typeof t.getZIndex,41),i=[t]),e=function(){return i}}return e}(this.style_),this.changed()},e.prototype.getRenderMode=function(){return this.renderMode_},e}(xo);fc.prototype.getSource;var _c=fc,gc={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},yc=["#00f","#0ff","#0f0","#ff0","#f00"];var vc=function(t){function e(e){var i=e||{},r=u({},i);delete r.gradient,delete r.radius,delete r.blur,delete r.shadow,delete r.weight,t.call(this,r),this.gradient_=null,this.shadow_=void 0!==i.shadow?i.shadow:250,this.circleImage_=void 0,this.styleCache_=null,v(this,G(gc.GRADIENT),this.handleGradientChanged_,this),this.setGradient(i.gradient?i.gradient:yc),this.setBlur(void 0!==i.blur?i.blur:15),this.setRadius(void 0!==i.radius?i.radius:8),v(this,G(gc.BLUR),this.handleStyleChanged_,this),v(this,G(gc.RADIUS),this.handleStyleChanged_,this),this.handleStyleChanged_();var n,o=i.weight?i.weight:"weight";n="string"==typeof o?function(t){return t.get(o)}:o,this.setStyle(function(t,e){var i=n(t),r=void 0!==i?kt(i,0,1):1,o=255*r|0,s=this.styleCache_[o];return s||(s=[new Au({image:new Lu({opacity:r,src:this.circleImage_})})],this.styleCache_[o]=s),s}.bind(this)),this.setRenderOrder(null),v(this,ur.RENDER,this.handleRender_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createCircle_=function(){var t=this.getRadius(),e=this.getBlur(),i=t+e+1,r=2*i,n=Jn(r,r);n.shadowOffsetX=n.shadowOffsetY=this.shadow_,n.shadowBlur=e,n.shadowColor="#000",n.beginPath();var o=i-this.shadow_;return n.arc(o,o,t,0,2*Math.PI,!0),n.fill(),n.canvas.toDataURL()},e.prototype.getBlur=function(){return this.get(gc.BLUR)},e.prototype.getGradient=function(){return this.get(gc.GRADIENT)},e.prototype.getRadius=function(){return this.get(gc.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=function(t){for(var e=Jn(1,256),i=e.createLinearGradient(0,0,1,256),r=1/(t.length-1),n=0,o=t.length;n<o;++n)i.addColorStop(n*r,t[n]);return e.fillStyle=i,e.fillRect(0,0,1,256),e.getImageData(0,0,1,256).data}(this.getGradient())},e.prototype.handleStyleChanged_=function(){this.circleImage_=this.createCircle_(),this.styleCache_=new Array(256),this.changed()},e.prototype.handleRender_=function(t){for(var e=t.context,i=e.canvas,r=e.getImageData(0,0,i.width,i.height),n=r.data,o=0,s=n.length;o<s;o+=4){var a=4*n[o+3];a&&(n[o]=this.gradient_[a],n[o+1]=this.gradient_[a+1],n[o+2]=this.gradient_[a+2])}e.putImageData(r,0,0)},e.prototype.setBlur=function(t){this.set(gc.BLUR,t)},e.prototype.setGradient=function(t){this.set(gc.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(gc.RADIUS,t)},e}(_c),mc=function(t){function e(e){var i=e||{},r=i.renderMode||Va.HYBRID;Y(void 0==r||r==Va.IMAGE||r==Va.HYBRID||r==Va.VECTOR,28),i.declutter&&r==Va.IMAGE&&(r=Va.HYBRID),i.renderMode=r;var n=u({},i);delete n.preload,delete n.useInterimTilesOnError,t.call(this,n),this.setPreload(i.preload?i.preload:0),this.setUseInterimTilesOnError(void 0===i.useInterimTilesOnError||i.useInterimTilesOnError),this.type=Ss.VECTOR_TILE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getPreload=function(){return this.get(bp)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Mp)},e.prototype.setPreload=function(t){this.set(bp,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Mp,t)},e}(_c);mc.prototype.getSource;var xc=mc,Ec="addfeatures",Sc=function(t){function e(e,i,r,n){t.call(this,e),this.features=r,this.file=i,this.projection=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);function Tc(t){for(var e=t.dataTransfer.files,i=0,r=e.length;i<r;++i){var n=e.item(i),o=new FileReader;o.addEventListener(M.LOAD,this.handleResult_.bind(this,n)),o.readAsText(n)}}function Cc(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"}var Rc=function(t){function e(e){var i=e||{};t.call(this,{handleEvent:R}),this.formatConstructors_=i.formatConstructors?i.formatConstructors:[],this.projection_=i.projection?Ee(i.projection):null,this.dropListenKeys_=null,this.source_=i.source||null,this.target=i.target?i.target:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleResult_=function(t,e){var i=e.target.result,r=this.getMap(),n=this.projection_;n||(n=r.getView().getProjection());for(var o=this.formatConstructors_,s=[],a=0,h=o.length;a<h;++a){var l=new o[a];if((s=this.tryReadFeatures_(l,i,{featureProjection:n}))&&s.length>0)break}this.source_&&(this.source_.clear(),this.source_.addFeatures(s)),this.dispatchEvent(new Sc(Ec,t,s,n))},e.prototype.registerListeners_=function(){var t=this.getMap();if(t){var e=this.target?this.target:t.getViewport();this.dropListenKeys_=[v(e,M.DROP,Tc,this),v(e,M.DRAGENTER,Cc,this),v(e,M.DRAGOVER,Cc,this),v(e,M.DROP,Cc,this)]}},e.prototype.setActive=function(e){t.prototype.setActive.call(this,e),e?this.registerListeners_():this.unregisterListeners_()},e.prototype.setMap=function(e){this.unregisterListeners_(),t.prototype.setMap.call(this,e),this.getActive()&&this.registerListeners_()},e.prototype.tryReadFeatures_=function(t,e,i){try{return t.readFeatures(e,i)}catch(t){return null}},e.prototype.unregisterListeners_=function(){this.dropListenKeys_&&(this.dropListenKeys_.forEach(E),this.dropListenKeys_=null)},e}(Fo),wc=function(t){function e(e){var i=e||{};t.call(this,i),this.condition_=i.condition?i.condition:zo,this.lastAngle_=void 0,this.lastMagnitude_=void 0,this.lastScaleDelta_=0,this.duration_=void 0!==i.duration?i.duration:400}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDragEvent=function(t){if(Ko(t)){var e=t.map,i=e.getSize(),r=t.pixel,n=r[0]-i[0]/2,o=i[1]/2-r[1],s=Math.atan2(o,n),a=Math.sqrt(n*n+o*o),h=e.getView();if(h.getConstraints().rotation!==Gn&&void 0!==this.lastAngle_){var l=s-this.lastAngle_;Oo(h,h.getRotation()-l)}if(this.lastAngle_=s,void 0!==this.lastMagnitude_)Mo(h,this.lastMagnitude_*(h.getResolution()/a));void 0!==this.lastMagnitude_&&(this.lastScaleDelta_=this.lastMagnitude_/a),this.lastMagnitude_=a}},e.prototype.handleUpEvent=function(t){if(!Ko(t))return!0;var e=t.map.getView();e.setHint(jn,-1);var i=this.lastScaleDelta_-1;return Lo(e,e.getRotation()),Po(e,e.getResolution(),void 0,this.duration_,i),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return!!Ko(t)&&(!!this.condition_(t)&&(t.map.getView().setHint(jn,1),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0))},e}(qo),Ic=function(t){function e(e,i,r){if(t.call(this),void 0!==r&&void 0===i)this.setFlatCoordinates(r,e);else{var n=i||0;this.setCenterAndRadius(e,n,r)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),void 0,this.layout)},e.prototype.closestPointXY=function(t,e,i,r){var n=this.flatCoordinates,o=t-n[0],s=e-n[1],a=o*o+s*s;if(a<r){if(0===a)for(var h=0;h<this.stride;++h)i[h]=n[h];else{var l=this.getRadius()/Math.sqrt(a);i[0]=n[0]+l*o,i[1]=n[1]+l*s;for(var u=2;u<this.stride;++u)i[u]=n[u]}return i.length=this.stride,a}return r},e.prototype.containsXY=function(t,e){var i=this.flatCoordinates,r=t-i[0],n=e-i[1];return r*r+n*n<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var e=this.flatCoordinates,i=e[this.stride]-e[0];return lt(e[0]-i,e[1]-i,e[0]+i,e[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],e=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+e*e},e.prototype.getType=function(){return Nt.CIRCLE},e.prototype.intersectsExtent=function(t){if(Pt(t,this.getExtent())){var e=this.getCenter();return t[0]<=e[0]&&t[2]>=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||mt(t,this.intersectsCoordinate,this))}return!1},e.prototype.setCenter=function(t){var e=this.stride,i=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+i;for(var n=1;n<e;++n)r[e+n]=t[n];this.setFlatCoordinates(this.layout,r),this.changed()},e.prototype.setCenterAndRadius=function(t,e,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var r=this.flatCoordinates,n=ti(r,0,t,this.stride);r[n++]=r[0]+e;for(var o=1,s=this.stride;o<s;++o)r[n++]=r[o];r.length=n,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,e){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e}(We);Ic.prototype.transform;var Lc=Ic,Oc=function(t){function e(e,i,r){if(t.call(this),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(e[0]))this.setCoordinates(e,i);else if(void 0!==i&&r)this.setFlatCoordinates(i,e),this.ends_=r;else{for(var n=this.getLayout(),o=e,s=[],a=[],h=0,l=o.length;h<l;++h){var u=o[h];0===h&&(n=u.getLayout()),K(s,u.getFlatCoordinates()),a.push(s.length)}this.setFlatCoordinates(n,s),this.ends_=a}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendLineString=function(t){this.flatCoordinates?K(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice())},e.prototype.closestPointXY=function(t,e,i,r){return r<rt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Je(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$e(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,r))},e.prototype.getCoordinateAtM=function(t,e,i){if(this.layout!=At.XYM&&this.layout!=At.XYZM||0===this.flatCoordinates.length)return null;var r=void 0!==e&&e,n=void 0!==i&&i;return function(t,e,i,r,n,o,s){if(s)return sr(t,e,i[i.length-1],r,n,o);var a;if(n<t[r-1])return o?((a=t.slice(0,r))[r-1]=n,a):null;if(t[t.length-1]<n)return o?((a=t.slice(t.length-r))[r-1]=n,a):null;for(var h=0,l=i.length;h<l;++h){var u=i[h];if(e!=u){if(n<t[e+r-1])return null;if(n<=t[u-1])return sr(t,e,u,r,n,!1);e=u}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,r,n)},e.prototype.getCoordinates=function(){return ni(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new hr(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,e=this.ends_,i=this.layout,r=[],n=0,o=0,s=e.length;o<s;++o){var a=e[o],h=new hr(t.slice(n,a),i);r.push(h),n=a}return r},e.prototype.getFlatMidpoints=function(){for(var t=[],e=this.flatCoordinates,i=0,r=this.ends_,n=this.stride,o=0,s=r.length;o<s;++o){var a=r[o];K(t,or(e,i,a,n,.5)),i=a}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=ai(this.flatCoordinates,0,this.ends_,this.stride,t,i,0,r),new e(i,At.XY,r)},e.prototype.getType=function(){return Nt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return function(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o){if(mi(t,e,i[o],r,n))return!0;e=i[o]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=ii(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()},e}(We),Pc=function(t){function e(e,i){t.call(this),i&&!Array.isArray(e[0])?this.setFlatCoordinates(i,e):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendPoint=function(t){this.flatCoordinates?K(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,i,r){if(r<rt(this.getExtent(),t,e))return r;for(var n=this.flatCoordinates,o=this.stride,s=0,a=n.length;s<a;s+=o){var h=Yt(t,e,n[s],n[s+1]);if(h<r){r=h;for(var l=0;l<o;++l)i[l]=n[s+l];i.length=o}}return r},e.prototype.getCoordinates=function(){return ri(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var e=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||e<=t?null:new ci(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,e=this.layout,i=this.stride,r=[],n=0,o=t.length;n<o;n+=i){var s=new ci(t.slice(n,n+i),e);r.push(s)}return r},e.prototype.getType=function(){return Nt.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var e=this.flatCoordinates,i=this.stride,r=0,n=e.length;r<n;r+=i){if(st(t,e[r],e[r+1]))return!0}return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=ei(this.flatCoordinates,0,t,this.stride),this.changed()},e}(We);function bc(t,e,i,r){for(var n=[],o=[1/0,1/0,-1/0,-1/0],s=0,a=i.length;s<a;++s){var h=i[s];o=ct(t,e,h[0],r),n.push((o[0]+o[2])/2,(o[1]+o[3])/2),e=h[h.length-1]}return n}var Mc=function(t){function e(e,i,r){if(t.call(this),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!r&&!Array.isArray(e[0])){for(var n=this.getLayout(),o=e,s=[],a=[],h=0,l=o.length;h<l;++h){var u=o[h];0===h&&(n=u.getLayout());for(var p=s.length,c=u.getEnds(),d=0,f=c.length;d<f;++d)c[d]+=p;K(s,u.getFlatCoordinates()),a.push(c)}i=n,e=s,r=a}void 0!==i&&r?(this.setFlatCoordinates(i,e),this.endss_=r):this.setCoordinates(e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.appendPolygon=function(t){var e;if(this.flatCoordinates){var i=this.flatCoordinates.length;K(this.flatCoordinates,t.getFlatCoordinates());for(var r=0,n=(e=t.getEnds().slice()).length;r<n;++r)e[r]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,i=new Array(t),r=0;r<t;++r)i[r]=this.endss_[r].slice();return new e(this.flatCoordinates.slice(),this.layout,i)},e.prototype.closestPointXY=function(t,e,i,r){return r<rt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o){var a=i[o];n=Je(t,e,a,r,n),e=a[a.length-1]}return n}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,r,n,o,s,a,h,l,u){for(var p=u||[NaN,NaN],c=0,d=i.length;c<d;++c){var f=i[c];l=$e(t,e,f,r,n,o,s,a,h,l,p),e=f[f.length-1]}return l}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,i,r))},e.prototype.containsXY=function(t,e){return function(t,e,i,r,n,o){if(0===i.length)return!1;for(var s=0,a=i.length;s<a;++s){var h=i[s];if(_i(t,e,h,r,n,o))return!0;e=h[h.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)},e.prototype.getArea=function(){return function(t,e,i,r){for(var n=0,o=0,s=i.length;o<s;++o){var a=i[o];n+=He(t,e,a,r),e=a[a.length-1]}return n}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?Ri(e=this.getOrientedFlatCoordinates().slice(),0,this.endss_,this.stride,t):e=this.flatCoordinates,oi(e,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=bc(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=yi(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new Pc(this.getFlatInteriorPoints().slice(),At.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;!function(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o)if(!Ti(t,e,i[o],r,n))return!1;return!0}(t,0,this.endss_,this.stride)?(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ri(this.orientedFlatCoordinates_,0,this.endss_,this.stride)):this.orientedFlatCoordinates_=t,this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var i=[],r=[];return i.length=function(t,e,i,r,n,o,s,a){for(var h=0,l=i.length;h<l;++h){var u=i[h],p=[];s=ui(t,e,u,r,n,o,s,p),a.push(p),e=u[u.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),i,0,r),new e(i,At.XY,r)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var e;if(0===t)e=0;else{var i=this.endss_[t-1];e=i[i.length-1]}var r=this.endss_[t].slice(),n=r[r.length-1];if(0!==e)for(var o=0,s=r.length;o<s;++o)r[o]-=e;return new Ii(this.flatCoordinates.slice(e,n),this.layout,r)},e.prototype.getPolygons=function(){for(var t=this.layout,e=this.flatCoordinates,i=this.endss_,r=[],n=0,o=0,s=i.length;o<s;++o){var a=i[o].slice(),h=a[a.length-1];if(0!==n)for(var l=0,u=a.length;l<u;++l)a[l]-=n;var p=new Ii(e.slice(n,h),t,a);r.push(p),n=h}return r},e.prototype.getType=function(){return Nt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return function(t,e,i,r,n){for(var o=0,s=i.length;o<s;++o){var a=i[o];if(xi(t,e,a,r,n))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=function(t,e,i,r,n){for(var o=n||[],s=0,a=0,h=i.length;a<h;++a){var l=ii(t,e,i[a],r,o[s]);o[s++]=l,e=l[l.length-1]}return o.length=s,o}(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{var r=i[i.length-1];this.flatCoordinates.length=0===r.length?0:r[r.length-1]}this.changed()},e}(We),Fc={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Ac="drawstart",Nc="drawend",Gc=function(t){function e(e,i){t.call(this,e),this.feature=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);var Dc=function(t){function e(e){var i=e;i.stopDown||(i.stopDown=w),t.call(this,i),this.shouldHandle_=!1,this.downPx_=null,this.downTimeout_,this.lastDragTime_,this.freehand_=!1,this.source_=e.source?e.source:null,this.features_=e.features?e.features:null,this.snapTolerance_=e.snapTolerance?e.snapTolerance:12,this.type_=e.type,this.mode_=function(t){var e;t===Nt.POINT||t===Nt.MULTI_POINT?e=Fc.POINT:t===Nt.LINE_STRING||t===Nt.MULTI_LINE_STRING?e=Fc.LINE_STRING:t===Nt.POLYGON||t===Nt.MULTI_POLYGON?e=Fc.POLYGON:t===Nt.CIRCLE&&(e=Fc.CIRCLE);return e}(this.type_),this.stopClick_=!!e.stopClick,this.minPoints_=e.minPoints?e.minPoints:this.mode_===Fc.POLYGON?3:2,this.maxPoints_=e.maxPoints?e.maxPoints:1/0,this.finishCondition_=e.finishCondition?e.finishCondition:R;var r=e.geometryFunction;if(!r)if(this.type_===Nt.CIRCLE)r=function(t,e){var i=e||new Lc([NaN,NaN]),r=er(t[0],t[1]);return i.setCenterAndRadius(t[0],Math.sqrt(r)),i};else{var n,o=this.mode_;o===Fc.POINT?n=ci:o===Fc.LINE_STRING?n=hr:o===Fc.POLYGON&&(n=Ii),r=function(t,e){var i=e;return i?o===Fc.POLYGON?t[0].length?i.setCoordinates([t[0].concat([t[0][0]])]):i.setCoordinates([]):i.setCoordinates(t):i=new n(t),i}}this.geometryFunction_=r,this.dragVertexDelay_=void 0!==e.dragVertexDelay?e.dragVertexDelay:500,this.finishCoordinate_=null,this.sketchFeature_=null,this.sketchPoint_=null,this.sketchCoords_=null,this.sketchLine_=null,this.sketchLineCoords_=null,this.squaredClickTolerance_=e.clickTolerance?e.clickTolerance*e.clickTolerance:36,this.overlay_=new _c({source:new np({useSpatialIndex:!1,wrapX:!!e.wrapX&&e.wrapX}),style:e.style?e.style:function(){var t=Mu();return function(e,i){return t[e.getGeometry().getType()]}}(),updateWhileInteracting:!0}),this.geometryName_=e.geometryName,this.condition_=e.condition?e.condition:Xo,this.freehandCondition_,e.freehand?this.freehandCondition_=jo:this.freehandCondition_=e.freehandCondition?e.freehandCondition:zo,v(this,G(Io.ACTIVE),this.updateState_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(e){e.originalEvent.type===M.CONTEXTMENU&&e.preventDefault(),this.freehand_=this.mode_!==Fc.POINT&&this.freehandCondition_(e);var i=e.type===Ar.POINTERMOVE,r=!0;!this.freehand_&&this.lastDragTime_&&e.type===Ar.POINTERDRAG&&(Date.now()-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,i=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0));return this.freehand_&&e.type===Ar.POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e),r=!1):this.freehand_&&e.type===Ar.POINTERDOWN?r=!1:i?(r=e.type===Ar.POINTERMOVE)&&this.freehand_?r=this.handlePointerMove_(e):(e.pointerEvent.pointerType==Ur||e.type===Ar.POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e):e.type===Ar.DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,e)&&r},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t),!0):!!this.condition_(t)&&(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new Nr(Ar.POINTERMOVE,t.map,t.pointerEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0)},e.prototype.handleUpEvent=function(t){var e=!0;this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t);var i=this.mode_===Fc.CIRCLE;return this.shouldHandle_?(this.finishCoordinate_?this.freehand_||i?this.finishDrawing():this.atFinish_(t)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t):(this.startDrawing_(t),this.mode_===Fc.POINT&&this.finishDrawing()),e=!1):this.freehand_&&(this.finishCoordinate_=null,this.abortDrawing_()),!e&&this.stopClick_&&t.stopPropagation(),e},e.prototype.handlePointerMove_=function(t){if(this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,i=t.pixel,r=e[0]-i[0],n=e[1]-i[1],o=r*r+n*n;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return!0}return this.finishCoordinate_?this.modifyDrawing_(t):this.createOrUpdateSketchPoint_(t),!0},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var i=!1,r=[this.finishCoordinate_];if(this.mode_===Fc.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(this.mode_===Fc.POLYGON){var n=this.sketchCoords_;i=n[0].length>this.minPoints_,r=[n[0][0],n[0][n[0].length-2]]}if(i)for(var o=t.map,s=0,a=r.length;s<a;s++){var h=r[s],l=o.getPixelFromCoordinate(h),u=t.pixel,p=u[0]-l[0],c=u[1]-l[1],d=this.freehand_?1:this.snapTolerance_;if(e=Math.sqrt(p*p+c*c)<=d){this.finishCoordinate_=h;break}}}return e},e.prototype.createOrUpdateSketchPoint_=function(t){var e=t.coordinate.slice();this.sketchPoint_?this.sketchPoint_.getGeometry().setCoordinates(e):(this.sketchPoint_=new B(new ci(e)),this.updateSketchFeatures_())},e.prototype.startDrawing_=function(t){var e=t.coordinate;this.finishCoordinate_=e,this.mode_===Fc.POINT?this.sketchCoords_=e.slice():this.mode_===Fc.POLYGON?(this.sketchCoords_=[[e.slice(),e.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[e.slice(),e.slice()],this.sketchLineCoords_&&(this.sketchLine_=new B(new hr(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_);this.sketchFeature_=new B,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Gc(Ac,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var e,i,r,n=t.coordinate,o=this.sketchFeature_.getGeometry();(this.mode_===Fc.POINT?i=this.sketchCoords_:this.mode_===Fc.POLYGON?(i=(e=this.sketchCoords_[0])[e.length-1],this.atFinish_(t)&&(n=this.finishCoordinate_.slice())):i=(e=this.sketchCoords_)[e.length-1],i[0]=n[0],i[1]=n[1],this.geometryFunction_(this.sketchCoords_,o),this.sketchPoint_)&&this.sketchPoint_.getGeometry().setCoordinates(n);if(o.getType()==Nt.POLYGON&&this.mode_!==Fc.POLYGON){this.sketchLine_||(this.sketchLine_=new B);var s=o.getLinearRing(0);(r=this.sketchLine_.getGeometry())?(r.setFlatCoordinates(s.getLayout(),s.getFlatCoordinates()),r.changed()):(r=new hr(s.getFlatCoordinates(),s.getLayout()),this.sketchLine_.setGeometry(r))}else this.sketchLineCoords_&&(r=this.sketchLine_.getGeometry()).setCoordinates(this.sketchLineCoords_);this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var e,i,r=t.coordinate,n=this.sketchFeature_.getGeometry();this.mode_===Fc.LINE_STRING?(this.finishCoordinate_=r.slice(),(i=this.sketchCoords_).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(r.slice()),this.geometryFunction_(i,n)):this.mode_===Fc.POLYGON&&((i=this.sketchCoords_[0]).length>=this.maxPoints_&&(this.freehand_?i.pop():e=!0),i.push(r.slice()),e&&(this.finishCoordinate_=i[0]),this.geometryFunction_(this.sketchCoords_,n)),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry();this.mode_===Fc.LINE_STRING?((t=this.sketchCoords_).splice(-2,1),this.geometryFunction_(t,e),t.length>=2&&(this.finishCoordinate_=t[t.length-2].slice())):this.mode_===Fc.POLYGON&&((t=this.sketchCoords_[0]).splice(-2,1),this.sketchLine_.getGeometry().setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e)),0===t.length&&(this.finishCoordinate_=null),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,i=t.getGeometry();this.mode_===Fc.LINE_STRING?(e.pop(),this.geometryFunction_(e,i)):this.mode_===Fc.POLYGON&&(e[0].pop(),this.geometryFunction_(e,i),e=i.getCoordinates()),this.type_===Nt.MULTI_POINT?t.setGeometry(new Pc([e])):this.type_===Nt.MULTI_LINE_STRING?t.setGeometry(new Oc([e])):this.type_===Nt.MULTI_POLYGON&&t.setGeometry(new Mc([e])),this.dispatchEvent(new Gc(Nc,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return t&&(this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0)),t},e.prototype.extend=function(t){var e=t.getGeometry();this.sketchFeature_=t,this.sketchCoords_=e.getCoordinates();var i=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=i.slice(),this.sketchCoords_.push(i.slice()),this.updateSketchFeatures_(),this.dispatchEvent(new Gc(Ac,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var e=this.overlay_.getSource();e.clear(!0),e.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),e=this.getActive();t&&e||this.abortDrawing_(),this.overlay_.setMap(e?t:null)},e}(qo),kc={EXTENTCHANGED:"extentchanged"},jc=function(t){function e(e){t.call(this,kc.EXTENTCHANGED),this.extent=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);function Uc(t){return function(e){return tt([t,e])}}function Yc(t,e){return t[0]==e[0]?function(i){return tt([t,[i[0],e[1]]])}:t[1]==e[1]?function(i){return tt([t,[e[0],i[1]]])}:null}var Bc=function(t){function e(e){var i=e||{};t.call(this,i),this.extent_=null,this.pointerHandler_=null,this.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,this.snappedToVertex_=!1,this.extentFeature_=null,this.vertexFeature_=null,e||(e={}),this.extentOverlay_=new _c({source:new np({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.boxStyle?e.boxStyle:function(){var t=Mu();return function(e,i){return t[Nt.POLYGON]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.vertexOverlay_=new _c({source:new np({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.pointerStyle?e.pointerStyle:function(){var t=Mu();return function(e,i){return t[Nt.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),e.extent&&this.setExtent(e.extent)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapToVertex_=function(t,e){var i=e.getCoordinateFromPixel(t),r=this.getExtent();if(r){var n=function(t){return[[[t[0],t[1]],[t[0],t[3]]],[[t[0],t[3]],[t[2],t[3]]],[[t[2],t[3]],[t[2],t[1]]],[[t[2],t[1]],[t[0],t[1]]]]}(r);n.sort(function(t,e){return rr(i,t)-rr(i,e)});var o=n[0],s=Zi(i,o),a=e.getPixelFromCoordinate(s);if(ir(t,a)<=this.pixelTolerance_){var h=e.getPixelFromCoordinate(o[0]),l=e.getPixelFromCoordinate(o[1]),u=er(a,h),p=er(a,l),c=Math.sqrt(Math.min(u,p));return this.snappedToVertex_=c<=this.pixelTolerance_,this.snappedToVertex_&&(s=u>p?o[1]:o[0]),s}}return null},e.prototype.handlePointerMove_=function(t){var e=t.pixel,i=t.map,r=this.snapToVertex_(e,i);r||(r=i.getCoordinateFromPixel(e)),this.createOrUpdatePointerFeature_(r)},e.prototype.createOrUpdateExtentFeature_=function(t){var e=this.extentFeature_;return e?t?e.setGeometry(Oi(t)):e.setGeometry(void 0):(e=new B(t?Oi(t):{}),this.extentFeature_=e,this.extentOverlay_.getSource().addFeature(e)),e},e.prototype.createOrUpdatePointerFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new B(new ci(t)),this.vertexFeature_=e,this.vertexOverlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.pointerEvent||(e.type!=Ar.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),t.prototype.handleEvent.call(this,e),!1)},e.prototype.handleDownEvent=function(t){var e=t.pixel,i=t.map,r=this.getExtent(),n=this.snapToVertex_(e,i),o=function(t){var e=null,i=null;return t[0]==r[0]?e=r[2]:t[0]==r[2]&&(e=r[0]),t[1]==r[1]?i=r[3]:t[1]==r[3]&&(i=r[1]),null!==e&&null!==i?[e,i]:null};if(n&&r){var s=n[0]==r[0]||n[0]==r[2]?n[0]:null,a=n[1]==r[1]||n[1]==r[3]?n[1]:null;null!==s&&null!==a?this.pointerHandler_=Uc(o(n)):null!==s?this.pointerHandler_=Yc(o([s,r[1]]),o([s,r[3]])):null!==a&&(this.pointerHandler_=Yc(o([r[0],a]),o([r[2],a])))}else n=i.getCoordinateFromPixel(e),this.setExtent([n[0],n[1],n[0],n[1]]),this.pointerHandler_=Uc(n);return!0},e.prototype.handleDragEvent=function(t){if(this.pointerHandler_){var e=t.coordinate;this.setExtent(this.pointerHandler_(e)),this.createOrUpdatePointerFeature_(e)}return!0},e.prototype.handleUpEvent=function(t){this.pointerHandler_=null;var e=this.getExtent();return e&&0!==xt(e)||this.setExtent(null),!1},e.prototype.setMap=function(e){this.extentOverlay_.setMap(e),this.vertexOverlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getExtent=function(){return this.extent_},e.prototype.setExtent=function(t){this.extent_=t||null,this.createOrUpdateExtentFeature_(t),this.dispatchEvent(new jc(this.extent_))},e}(qo),Vc=1,Xc="modifystart",zc="modifyend",Wc=function(t){function e(e,i,r){t.call(this,e),this.features=i,this.mapBrowserEvent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);function Kc(t,e){return t.index-e.index}function Hc(t,e){var i=e.geometry;if(i.getType()===Nt.CIRCLE){var r=i;if(e.index===Vc){var n=er(r.getCenter(),t),o=Math.sqrt(n)-r.getRadius();return o*o}}return rr(t,e.segment)}function Zc(t,e){var i=e.geometry;return i.getType()===Nt.CIRCLE&&e.index===Vc?i.getClosestPoint(t):Zi(t,e.segment)}var qc=function(t){function e(e){var i;if(t.call(this,e),this.condition_=e.condition?e.condition:Ho,this.defaultDeleteCondition_=function(t){return Go(t)&&Vo(t)},this.deleteCondition_=e.deleteCondition?e.deleteCondition:this.defaultDeleteCondition_,this.insertVertexCondition_=e.insertVertexCondition?e.insertVertexCondition:jo,this.vertexFeature_=null,this.vertexSegments_=null,this.lastPixel_=[0,0],this.ignoreNextSingleClick_=!1,this.modified_=!1,this.rBush_=new tl,this.pixelTolerance_=void 0!==e.pixelTolerance?e.pixelTolerance:10,this.snappedToVertex_=!1,this.changingFeature_=!1,this.dragSegments_=[],this.overlay_=new _c({source:new np({useSpatialIndex:!1,wrapX:!!e.wrapX}),style:e.style?e.style:function(){var t=Mu();return function(e,i){return t[Nt.POINT]}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),this.SEGMENT_WRITERS_={Point:this.writePointGeometry_,LineString:this.writeLineStringGeometry_,LinearRing:this.writeLineStringGeometry_,Polygon:this.writePolygonGeometry_,MultiPoint:this.writeMultiPointGeometry_,MultiLineString:this.writeMultiLineStringGeometry_,MultiPolygon:this.writeMultiPolygonGeometry_,Circle:this.writeCircleGeometry_,GeometryCollection:this.writeGeometryCollectionGeometry_},this.source_=null,e.source?(this.source_=e.source,i=new U(this.source_.getFeatures()),v(this.source_,ip.ADDFEATURE,this.handleSourceAdd_,this),v(this.source_,ip.REMOVEFEATURE,this.handleSourceRemove_,this)):i=e.features,!i)throw new Error("The modify interaction requires features or a source");this.features_=i,this.features_.forEach(this.addFeature_.bind(this)),v(this.features_,h.ADD,this.handleFeatureAdd_,this),v(this.features_,h.REMOVE,this.handleFeatureRemove_,this),this.lastPointerEvent_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addFeature_=function(t){var e=t.getGeometry();e&&e.getType()in this.SEGMENT_WRITERS_&&this.SEGMENT_WRITERS_[e.getType()].call(this,t,e);var i=this.getMap();i&&i.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,i),v(t,M.CHANGE,this.handleFeatureChange_,this)},e.prototype.willModifyFeatures_=function(t){this.modified_||(this.modified_=!0,this.dispatchEvent(new Wc(Xc,this.features_,t)))},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&0===this.features_.getLength()&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),x(t,M.CHANGE,this.handleFeatureChange_,this)},e.prototype.removeFeatureSegmentData_=function(t){var e=this.rBush_,i=[];e.forEach(function(e){t===e.feature&&i.push(e)});for(var r=i.length-1;r>=0;--r)e.remove(i[r])},e.prototype.setActive=function(e){this.vertexFeature_&&!e&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.prototype.setActive.call(this,e)},e.prototype.setMap=function(e){this.overlay_.setMap(e),t.prototype.setMap.call(this,e)},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleSourceAdd_=function(t){t.feature&&this.features_.push(t.feature)},e.prototype.handleSourceRemove_=function(t){t.feature&&this.features_.remove(t.feature)},e.prototype.handleFeatureAdd_=function(t){this.addFeature_(t.element)},e.prototype.handleFeatureChange_=function(t){if(!this.changingFeature_){var e=t.target;this.removeFeature_(e),this.addFeature_(e)}},e.prototype.handleFeatureRemove_=function(t){var e=t.element;this.removeFeature_(e)},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),r={feature:t,geometry:e,segment:[i,i]};this.rBush_.insert(e.getExtent(),r)},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r){var o=i[r],s={feature:t,geometry:e,depth:[r],index:r,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length-1;r<n;++r){var o=i.slice(r,r+2),s={feature:t,geometry:e,index:r,segment:o};this.rBush_.insert(tt(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var h=o.slice(s,s+2),l={feature:t,geometry:e,depth:[r],index:s,segment:h};this.rBush_.insert(tt(h),l)}},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var h=o.slice(s,s+2),l={feature:t,geometry:e,depth:[r],index:s,segment:h};this.rBush_.insert(tt(h),l)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length;s<a;++s)for(var h=o[s],l=0,u=h.length-1;l<u;++l){var p=h.slice(l,l+2),c={feature:t,geometry:e,depth:[s,r],index:l,segment:p};this.rBush_.insert(tt(p),c)}},e.prototype.writeCircleGeometry_=function(t,e){var i=e.getCenter(),r={feature:t,geometry:e,index:0,segment:[i,i]},n={feature:t,geometry:e,index:Vc,segment:[i,i]},o=[r,n];r.featureSegments=n.featureSegments=o,this.rBush_.insert(pt(i),r),this.rBush_.insert(e.getExtent(),n)},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),r=0;r<i.length;++r)this.SEGMENT_WRITERS_[i[r].getType()].call(this,t,i[r])},e.prototype.createOrUpdateVertexFeature_=function(t){var e=this.vertexFeature_;e?e.getGeometry().setCoordinates(t):(e=new B(new ci(t)),this.vertexFeature_=e,this.overlay_.getSource().addFeature(e));return e},e.prototype.handleEvent=function(e){return!e.pointerEvent||(this.lastPointerEvent_=e,e.map.getView().getInteracting()||e.type!=Ar.POINTERMOVE||this.handlingDownUpSequence||this.handlePointerMove_(e),this.vertexFeature_&&this.deleteCondition_(e)&&(i=!(e.type!=Ar.SINGLECLICK||!this.ignoreNextSingleClick_)||this.removePoint()),e.type==Ar.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),t.prototype.handleEvent.call(this,e)&&!i);var i},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t);for(var e=t.coordinate,i=0,r=this.dragSegments_.length;i<r;++i){for(var n=this.dragSegments_[i],o=n[0],s=o.depth,a=o.geometry,h=void 0,l=o.segment,u=n[1];e.length<a.getStride();)e.push(l[u][e.length]);switch(a.getType()){case Nt.POINT:h=e,l[0]=l[1]=e;break;case Nt.MULTI_POINT:(h=a.getCoordinates())[o.index]=e,l[0]=l[1]=e;break;case Nt.LINE_STRING:(h=a.getCoordinates())[o.index+u]=e,l[u]=e;break;case Nt.MULTI_LINE_STRING:case Nt.POLYGON:(h=a.getCoordinates())[s[0]][o.index+u]=e,l[u]=e;break;case Nt.MULTI_POLYGON:(h=a.getCoordinates())[s[1]][s[0]][o.index+u]=e,l[u]=e;break;case Nt.CIRCLE:l[0]=l[1]=e,0===o.index?(this.changingFeature_=!0,a.setCenter(e),this.changingFeature_=!1):(this.changingFeature_=!0,a.setRadius(ir(a.getCenter(),e)),this.changingFeature_=!1)}h&&this.setGeometryCoordinates_(a,h)}this.createOrUpdateVertexFeature_(e)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;this.handlePointerAtPixel_(t.pixel,t.map);var e=t.map.getCoordinateFromPixel(t.pixel);this.dragSegments_.length=0,this.modified_=!1;var i=this.vertexFeature_;if(i){var r=[],n=i.getGeometry().getCoordinates(),s=tt([n]),a=this.rBush_.getInExtent(s),h={};a.sort(Kc);for(var l=0,u=a.length;l<u;++l){var p=a[l],c=p.segment,d=o(p.feature),f=p.depth;if(f&&(d+="-"+f.join("-")),h[d]||(h[d]=new Array(2)),p.geometry.getType()===Nt.CIRCLE&&p.index===Vc)Qi(Zc(e,p),n)&&!h[d][0]&&(this.dragSegments_.push([p,0]),h[d][0]=p);else if(Qi(c[0],n)&&!h[d][0])this.dragSegments_.push([p,0]),h[d][0]=p;else if(Qi(c[1],n)&&!h[d][1]){if((p.geometry.getType()===Nt.LINE_STRING||p.geometry.getType()===Nt.MULTI_LINE_STRING)&&h[d][0]&&0===h[d][0].index)continue;this.dragSegments_.push([p,1]),h[d][1]=p}else this.insertVertexCondition_(t)&&o(c)in this.vertexSegments_&&!h[d][0]&&!h[d][1]&&r.push([p,n])}r.length&&this.willModifyFeatures_(t);for(var _=r.length-1;_>=0;--_)this.insertVertex_.apply(this,r[_])}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var e=this.dragSegments_.length-1;e>=0;--e){var i=this.dragSegments_[e][0],r=i.geometry;if(r.getType()===Nt.CIRCLE){var n=r.getCenter(),o=i.featureSegments[0],s=i.featureSegments[1];o.segment[0]=o.segment[1]=n,s.segment[0]=s.segment[1]=n,this.rBush_.update(pt(n),o),this.rBush_.update(r.getExtent(),s)}else this.rBush_.update(tt(i.segment),i)}return this.modified_&&(this.dispatchEvent(new Wc(zc,this.features_,t)),this.modified_=!1),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map)},e.prototype.handlePointerAtPixel_=function(t,e){var i=e.getCoordinateFromPixel(t),r=et(pt(i),e.getView().getResolution()*this.pixelTolerance_),n=this.rBush_.getInExtent(r);if(n.length>0){n.sort(function(t,e){return Hc(i,t)-Hc(i,e)});var s=n[0],a=s.segment,h=Zc(i,s),l=e.getPixelFromCoordinate(h),u=ir(t,l);if(u<=this.pixelTolerance_){var p={};if(s.geometry.getType()===Nt.CIRCLE&&s.index===Vc)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(h);else{var c=e.getPixelFromCoordinate(a[0]),d=e.getPixelFromCoordinate(a[1]),f=er(l,c),_=er(l,d);u=Math.sqrt(Math.min(f,_)),this.snappedToVertex_=u<=this.pixelTolerance_,this.snappedToVertex_&&(h=f>_?a[1]:a[0]),this.createOrUpdateVertexFeature_(h);for(var g=1,y=n.length;g<y;++g){var v=n[g].segment;if(!(Qi(a[0],v[0])&&Qi(a[1],v[1])||Qi(a[0],v[1])&&Qi(a[1],v[0])))break;p[o(v)]=!0}}return p[o(a)]=!0,void(this.vertexSegments_=p)}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,e){for(var i,r=t.segment,n=t.feature,o=t.geometry,s=t.depth,a=t.index;e.length<o.getStride();)e.push(0);switch(o.getType()){case Nt.MULTI_LINE_STRING:case Nt.POLYGON:(i=o.getCoordinates())[s[0]].splice(a+1,0,e);break;case Nt.MULTI_POLYGON:(i=o.getCoordinates())[s[1]][s[0]].splice(a+1,0,e);break;case Nt.LINE_STRING:(i=o.getCoordinates()).splice(a+1,0,e);break;default:return}this.setGeometryCoordinates_(o,i);var h=this.rBush_;h.remove(t),this.updateSegmentIndices_(o,a,s,1);var l={segment:[r[0],e],feature:n,geometry:o,depth:s,index:a};h.insert(tt(l.segment),l),this.dragSegments_.push([l,1]);var u={segment:[e,r[1]],feature:n,geometry:o,depth:s,index:a+1};h.insert(tt(u.segment),u),this.dragSegments_.push([u,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=Ar.POINTERDRAG){var t=this.lastPointerEvent_;return this.willModifyFeatures_(t),this.removeVertex_(),this.dispatchEvent(new Wc(zc,this.features_,t)),this.modified_=!1,!0}return!1},e.prototype.removeVertex_=function(){var t,e,i,r,n,s,a,h,l,u,p,c=this.dragSegments_,d={},f=!1;for(n=c.length-1;n>=0;--n)p=o((u=(i=c[n])[0]).feature),u.depth&&(p+="-"+u.depth.join("-")),p in d||(d[p]={}),0===i[1]?(d[p].right=u,d[p].index=u.index):1==i[1]&&(d[p].left=u,d[p].index=u.index+1);for(p in d){switch(l=d[p].right,a=d[p].left,h=(s=d[p].index)-1,u=void 0!==a?a:l,h<0&&(h=0),t=e=(r=u.geometry).getCoordinates(),f=!1,r.getType()){case Nt.MULTI_LINE_STRING:e[u.depth[0]].length>2&&(e[u.depth[0]].splice(s,1),f=!0);break;case Nt.LINE_STRING:e.length>2&&(e.splice(s,1),f=!0);break;case Nt.MULTI_POLYGON:t=t[u.depth[1]];case Nt.POLYGON:(t=t[u.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),f=!0,0===s&&(t.pop(),t.push(t[0]),h=t.length-1))}if(f){this.setGeometryCoordinates_(r,e);var _=[];if(void 0!==a&&(this.rBush_.remove(a),_.push(a.segment[0])),void 0!==l&&(this.rBush_.remove(l),_.push(l.segment[1])),void 0!==a&&void 0!==l){var g={depth:u.depth,feature:u.feature,geometry:u.geometry,index:h,segment:_};this.rBush_.insert(tt(g.segment),g)}this.updateSegmentIndices_(r,s,u.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),c.length=0}}return f},e.prototype.setGeometryCoordinates_=function(t,e){this.changingFeature_=!0,t.setCoordinates(e),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,e,i,r){this.rBush_.forEachInExtent(t.getExtent(),function(n){n.geometry===t&&(void 0===i||void 0===n.depth||Z(n.depth,i))&&n.index>e&&(n.index+=r)})},e}(qo),Jc={SELECT:"select"},Qc=function(t){function e(e,i,r,n){t.call(this,e),this.selected=i,this.deselected=r,this.mapBrowserEvent=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P);function $c(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),i=this.removeCondition_(t),r=this.toggleCondition_(t),n=!e&&!i&&!r,o=t.map,s=this.getFeatures(),a=[],h=[];if(n){p(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return h.push(t),this.addFeatureLayerAssociation_(t,e),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var l=s.getLength()-1;l>=0;--l){var u=s.item(l),c=h.indexOf(u);c>-1?h.splice(c,1):(s.remove(u),a.push(u))}0!==h.length&&s.extend(h)}else{o.forEachFeatureAtPixel(t.pixel,function(t,n){if(this.filter_(t,n))return!e&&!r||X(s.getArray(),t)?(i||r)&&X(s.getArray(),t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(h.push(t),this.addFeatureLayerAssociation_(t,n)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=a.length-1;d>=0;--d)s.remove(a[d]);s.extend(h)}return(h.length>0||a.length>0)&&this.dispatchEvent(new Qc(Jc.SELECT,h,a,t)),Bo(t)}var td=function(t){function e(e){t.call(this,{handleEvent:$c});var i=e||{};this.condition_=i.condition?i.condition:Vo,this.addCondition_=i.addCondition?i.addCondition:Yo,this.removeCondition_=i.removeCondition?i.removeCondition:Yo,this.toggleCondition_=i.toggleCondition?i.toggleCondition:zo,this.multi_=!!i.multi&&i.multi,this.filter_=i.filter?i.filter:R,this.hitTolerance_=i.hitTolerance?i.hitTolerance:0;var r,n=new _c({source:new np({useSpatialIndex:!1,features:i.features,wrapX:i.wrapX}),style:i.style?i.style:function(){var t=Mu();return K(t[Nt.POLYGON],t[Nt.LINE_STRING]),K(t[Nt.GEOMETRY_COLLECTION],t[Nt.LINE_STRING]),function(e,i){return e.getGeometry()?t[e.getGeometry().getType()]:null}}(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(this.featureOverlay_=n,i.layers)if("function"==typeof i.layers)r=i.layers;else{var o=i.layers;r=function(t){return X(o,t)}}else r=R;this.layerFilter_=r,this.featureLayerAssociation_={};var s=this.getFeatures();v(s,h.ADD,this.addFeature_,this),v(s,h.REMOVE,this.removeFeature_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[o(t)]=e},e.prototype.getFeatures=function(){return this.featureOverlay_.getSource().getFeaturesCollection()},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[o(t)]},e.prototype.getOverlay=function(){return this.featureOverlay_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var i=this.getMap(),r=this.getFeatures();i&&r.forEach(i.unskipFeature.bind(i)),t.prototype.setMap.call(this,e),this.featureOverlay_.setMap(e),e&&r.forEach(e.skipFeature.bind(e))},e.prototype.addFeature_=function(t){var e=this.getMap();e&&e.skipFeature(t.element)},e.prototype.removeFeature_=function(t){var e=this.getMap();e&&e.unskipFeature(t.element)},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[o(t)]},e}(Fo);function ed(t){return t.feature?t.feature:t.element?t.element:void 0}var id=function(t){function e(e){var i=e||{},r=i;r.handleDownEvent||(r.handleDownEvent=R),r.stopDown||(r.stopDown=w),t.call(this,r),this.source_=i.source?i.source:null,this.vertex_=void 0===i.vertex||i.vertex,this.edge_=void 0===i.edge||i.edge,this.features_=i.features?i.features:null,this.featuresListenerKeys_=[],this.featureChangeListenerKeys_={},this.indexedFeaturesExtents_={},this.pendingFeatures_={},this.pixelCoordinate_=null,this.pixelTolerance_=void 0!==i.pixelTolerance?i.pixelTolerance:10,this.sortByDistance_=function(t,e){var i=rr(this.pixelCoordinate_,t.segment),r=rr(this.pixelCoordinate_,e.segment);return i-r}.bind(this),this.rBush_=new tl,this.SEGMENT_WRITERS_={Point:this.writePointGeometry_,LineString:this.writeLineStringGeometry_,LinearRing:this.writeLineStringGeometry_,Polygon:this.writePolygonGeometry_,MultiPoint:this.writeMultiPointGeometry_,MultiLineString:this.writeMultiLineStringGeometry_,MultiPolygon:this.writeMultiPolygonGeometry_,GeometryCollection:this.writeGeometryCollectionGeometry_,Circle:this.writeCircleGeometry_}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.addFeature=function(t,e){var i=void 0===e||e,r=o(t),n=t.getGeometry();if(n){var s=this.SEGMENT_WRITERS_[n.getType()];s&&(this.indexedFeaturesExtents_[r]=n.getExtent([1/0,1/0,-1/0,-1/0]),s.call(this,t,n))}i&&(this.featureChangeListenerKeys_[r]=v(t,M.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(e){var i=this.snapTo(e.pixel,e.coordinate,e.map);return i.snapped&&(e.coordinate=i.vertex.slice(0,2),e.pixel=i.vertexPixel),t.prototype.handleEvent.call(this,e)},e.prototype.handleFeatureAdd_=function(t){var e=ed(t);this.addFeature(e)},e.prototype.handleFeatureRemove_=function(t){var e=ed(t);this.removeFeature(e)},e.prototype.handleFeatureChange_=function(t){var e=t.target;if(this.handlingDownUpSequence){var i=o(e);i in this.pendingFeatures_||(this.pendingFeatures_[i]=e)}else this.updateFeature_(e)},e.prototype.handleUpEvent=function(t){var e=c(this.pendingFeatures_);return e.length&&(e.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,e){var i=void 0===e||e,r=o(t),n=this.indexedFeaturesExtents_[r];if(n){var s=this.rBush_,a=[];s.forEachInExtent(n,function(e){t===e.feature&&a.push(e)});for(var h=a.length-1;h>=0;--h)s.remove(a[h])}i&&(E(this.featureChangeListenerKeys_[r]),delete this.featureChangeListenerKeys_[r])},e.prototype.setMap=function(e){var i=this.getMap(),r=this.featuresListenerKeys_,n=this.getFeatures_();i&&(r.forEach(E),r.length=0,n.forEach(this.forEachFeatureRemove_.bind(this))),t.prototype.setMap.call(this,e),e&&(this.features_?r.push(v(this.features_,h.ADD,this.handleFeatureAdd_,this),v(this.features_,h.REMOVE,this.handleFeatureRemove_,this)):this.source_&&r.push(v(this.source_,ip.ADDFEATURE,this.handleFeatureAdd_,this),v(this.source_,ip.REMOVEFEATURE,this.handleFeatureRemove_,this)),n.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,e,i){var r=tt([i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_])]),n=this.rBush_.getInExtent(r);this.vertex_&&!this.edge_&&(n=n.filter(function(t){return t.feature.getGeometry().getType()!==Nt.CIRCLE}));var o,s,a,h,l=!1,u=null,p=null;if(n.length>0){this.pixelCoordinate_=e,n.sort(this.sortByDistance_);var c=n[0].segment,d=n[0].feature.getGeometry().getType()===Nt.CIRCLE;this.vertex_&&!this.edge_?(o=i.getPixelFromCoordinate(c[0]),s=i.getPixelFromCoordinate(c[1]),a=er(t,o),h=er(t,s),Math.sqrt(Math.min(a,h))<=this.pixelTolerance_&&(l=!0,u=a>h?c[1]:c[0],p=i.getPixelFromCoordinate(u))):this.edge_&&(u=d?function(t,e){var i=e.getRadius(),r=e.getCenter(),n=r[0],o=r[1],s=t[0]-n,a=t[1]-o;0===s&&0===a&&(s=1);var h=Math.sqrt(s*s+a*a);return[n+i*s/h,o+i*a/h]}(e,n[0].feature.getGeometry()):Zi(e,c),ir(t,p=i.getPixelFromCoordinate(u))<=this.pixelTolerance_&&(l=!0,this.vertex_&&!d&&(o=i.getPixelFromCoordinate(c[0]),s=i.getPixelFromCoordinate(c[1]),a=er(p,o),h=er(p,s),Math.sqrt(Math.min(a,h))<=this.pixelTolerance_&&(u=a>h?c[1]:c[0],p=i.getPixelFromCoordinate(u))))),l&&(p=[Math.round(p[0]),Math.round(p[1])])}return{snapped:l,vertex:u,vertexPixel:p}},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.writeCircleGeometry_=function(t,e){for(var i=Pi(e).getCoordinates()[0],r=0,n=i.length-1;r<n;++r){var o=i.slice(r,r+2),s={feature:t,segment:o};this.rBush_.insert(tt(o),s)}},e.prototype.writeGeometryCollectionGeometry_=function(t,e){for(var i=e.getGeometriesArray(),r=0;r<i.length;++r){var n=this.SEGMENT_WRITERS_[i[r].getType()];n&&n.call(this,t,i[r])}},e.prototype.writeLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length-1;r<n;++r){var o=i.slice(r,r+2),s={feature:t,segment:o};this.rBush_.insert(tt(o),s)}},e.prototype.writeMultiLineStringGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var h=o.slice(s,s+2),l={feature:t,segment:h};this.rBush_.insert(tt(h),l)}},e.prototype.writeMultiPointGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r){var o=i[r],s={feature:t,segment:[o,o]};this.rBush_.insert(e.getExtent(),s)}},e.prototype.writeMultiPolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length;s<a;++s)for(var h=o[s],l=0,u=h.length-1;l<u;++l){var p=h.slice(l,l+2),c={feature:t,segment:p};this.rBush_.insert(tt(p),c)}},e.prototype.writePointGeometry_=function(t,e){var i=e.getCoordinates(),r={feature:t,segment:[i,i]};this.rBush_.insert(e.getExtent(),r)},e.prototype.writePolygonGeometry_=function(t,e){for(var i=e.getCoordinates(),r=0,n=i.length;r<n;++r)for(var o=i[r],s=0,a=o.length-1;s<a;++s){var h=o.slice(s,s+2),l={feature:t,segment:h};this.rBush_.insert(tt(h),l)}},e}(qo),rd="translatestart",nd="translating",od="translateend",sd=function(t){function e(e,i,r){t.call(this,e),this.features=i,this.coordinate=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(P),ad=function(t){function e(e){var i,r=e||{};if(t.call(this,r),this.lastCoordinate_=null,this.features_=void 0!==r.features?r.features:null,r.layers)if("function"==typeof r.layers)i=r.layers;else{var n=r.layers;i=function(t){return X(n,t)}}else i=R;this.layerFilter_=i,this.hitTolerance_=r.hitTolerance?r.hitTolerance:0,this.lastFeature_=null,v(this,G(Io.ACTIVE),this.handleActiveChanged_,this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleDownEvent=function(t){if(this.lastFeature_=this.featuresAtPixel_(t.pixel,t.map),!this.lastCoordinate_&&this.lastFeature_){this.lastCoordinate_=t.coordinate,this.handleMoveEvent(t);var e=this.features_||new U([this.lastFeature_]);return this.dispatchEvent(new sd(rd,e,t.coordinate)),!0}return!1},e.prototype.handleUpEvent=function(t){if(this.lastCoordinate_){this.lastCoordinate_=null,this.handleMoveEvent(t);var e=this.features_||new U([this.lastFeature_]);return this.dispatchEvent(new sd(od,e,t.coordinate)),!0}return!1},e.prototype.handleDragEvent=function(t){if(this.lastCoordinate_){var e=t.coordinate,i=e[0]-this.lastCoordinate_[0],r=e[1]-this.lastCoordinate_[1],n=this.features_||new U([this.lastFeature_]);n.forEach(function(t){var e=t.getGeometry();e.translate(i,r),t.setGeometry(e)}),this.lastCoordinate_=e,this.dispatchEvent(new sd(nd,n,e))}},e.prototype.handleMoveEvent=function(t){var e=t.map.getViewport();this.featuresAtPixel_(t.pixel,t.map)?(e.classList.remove(this.lastCoordinate_?"ol-grab":"ol-grabbing"),e.classList.add(this.lastCoordinate_?"ol-grabbing":"ol-grab")):e.classList.remove("ol-grab","ol-grabbing")},e.prototype.featuresAtPixel_=function(t,e){return e.forEachFeatureAtPixel(t,function(t){if(!this.features_||X(this.features_.getArray(),t))return t}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_})},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var i=this.getMap();t.prototype.setMap.call(this,e),this.updateState_(i)},e.prototype.handleActiveChanged_=function(){this.updateState_(null)},e.prototype.updateState_=function(t){var e=this.getMap(),i=this.getActive();e&&i||(e=e||t)&&e.getViewport().classList.remove("ol-grab","ol-grabbing")},e}(qo);function hd(t){for(var e=[],i=0,r=t.length;i<r;++i)e.push(t[i].clone());return e}var ld=function(t){function e(e){t.call(this),this.geometries_=e||null,this.listenGeometriesChange_()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.unlistenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)x(this.geometries_[t],M.CHANGE,this.changed,this)},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,e=this.geometries_.length;t<e;++t)v(this.geometries_[t],M.CHANGE,this.changed,this)},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t},e.prototype.closestPointXY=function(t,e,i,r){if(r<rt(this.getExtent(),t,e))return r;for(var n=this.geometries_,o=0,s=n.length;o<s;++o)r=n[o].closestPointXY(t,e,i,r);return r},e.prototype.containsXY=function(t,e){for(var i=this.geometries_,r=0,n=i.length;r<n;++r)if(i[r].containsXY(t,e))return!0;return!1},e.prototype.computeExtent=function(t){ut(t);for(var e=this.geometries_,i=0,r=e.length;i<r;++i)ft(t,e[i].getExtent());return t},e.prototype.getGeometries=function(){return hd(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!=this.getRevision()&&(p(this.simplifiedGeometryCache),this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;var i=t.toString();if(this.simplifiedGeometryCache.hasOwnProperty(i))return this.simplifiedGeometryCache[i];for(var r=[],n=this.geometries_,o=!1,s=0,a=n.length;s<a;++s){var h=n[s],l=h.getSimplifiedGeometry(t);r.push(l),l!==h&&(o=!0)}if(o){var u=new e(null);return u.setGeometriesArray(r),this.simplifiedGeometryCache[i]=u,u}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return Nt.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var e=this.geometries_,i=0,r=e.length;i<r;++i)if(e[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return 0===this.geometries_.length},e.prototype.rotate=function(t,e){for(var i=this.geometries_,r=0,n=i.length;r<n;++r)i[r].rotate(t,e);this.changed()},e.prototype.scale=function(t,e,i){var r=i;r||(r=Tt(this.getExtent()));for(var n=this.geometries_,o=0,s=n.length;o<s;++o)n[o].scale(t,e,r);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(hd(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var e=this.geometries_,i=0,r=e.length;i<r;++i)e[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,e){for(var i=this.geometries_,r=0,n=i.length;r<n;++r)i[r].translate(t,e);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),t.prototype.disposeInternal.call(this)},e}(Xe),ud=function(){this.dataProjection=null,this.defaultFeatureProjection=null};ud.prototype.getReadOptions=function(t,e){var i;return e&&(i={dataProjection:e.dataProjection?e.dataProjection:this.readProjection(t),featureProjection:e.featureProjection}),this.adaptOptions(i)},ud.prototype.adaptOptions=function(t){return u({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},ud.prototype.getLastExtent=function(){return null},ud.prototype.getType=function(){return r()},ud.prototype.readFeature=function(t,e){return r()},ud.prototype.readFeatures=function(t,e){return r()},ud.prototype.readGeometry=function(t,e){return r()},ud.prototype.readProjection=function(t){return r()},ud.prototype.writeFeature=function(t,e){return r()},ud.prototype.writeFeatures=function(t,e){return r()},ud.prototype.writeGeometry=function(t,e){return r()};var pd=ud;function cd(t,e,i){var r,n=i?Ee(i.featureProjection):null,o=i?Ee(i.dataProjection):null;if(r=n&&o&&!Ie(n,o)?Array.isArray(t)?be(t,o,n):(e?t.clone():t).transform(e?n:o,e?o:n):t,e&&i&&void 0!==i.decimals&&!Array.isArray(r)){var s=Math.pow(10,i.decimals);r===t&&(r=t.clone()),r.applyTransform(function(t){for(var e=0,i=t.length;e<i;++e)t[e]=Math.round(t[e]*s)/s;return t})}return r}function dd(t){if("string"==typeof t){var e=JSON.parse(t);return e||null}return null!==t?t:null}var fd=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return Kl.JSON},e.prototype.readFeature=function(t,e){return this.readFeatureFromObject(dd(t),this.getReadOptions(t,e))},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromObject(dd(t),this.getReadOptions(t,e))},e.prototype.readFeatureFromObject=function(t,e){return r()},e.prototype.readFeaturesFromObject=function(t,e){return r()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromObject(dd(t),this.getReadOptions(t,e))},e.prototype.readGeometryFromObject=function(t,e){return r()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(dd(t))},e.prototype.readProjectionFromObject=function(t){return r()},e.prototype.writeFeature=function(t,e){return JSON.stringify(this.writeFeatureObject(t,e))},e.prototype.writeFeatureObject=function(t,e){return r()},e.prototype.writeFeatures=function(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))},e.prototype.writeFeaturesObject=function(t,e){return r()},e.prototype.writeGeometry=function(t,e){return JSON.stringify(this.writeGeometryObject(t,e))},e.prototype.writeGeometryObject=function(t,e){return r()},e}(pd),_d={};_d[Nt.POINT]=function(t){var e;e=void 0!==t.m&&void 0!==t.z?new ci([t.x,t.y,t.z,t.m],At.XYZM):void 0!==t.z?new ci([t.x,t.y,t.z],At.XYZ):void 0!==t.m?new ci([t.x,t.y,t.m],At.XYM):new ci([t.x,t.y]);return e},_d[Nt.LINE_STRING]=function(t){var e=vd(t);return new hr(t.paths[0],e)},_d[Nt.POLYGON]=function(t){var e=vd(t);return new Ii(t.rings,e)},_d[Nt.MULTI_POINT]=function(t){var e=vd(t);return new Pc(t.points,e)},_d[Nt.MULTI_LINE_STRING]=function(t){var e=vd(t);return new Oc(t.paths,e)},_d[Nt.MULTI_POLYGON]=function(t){var e=vd(t);return new Mc(t.rings,e)};var gd={};function yd(t,e){if(!t)return null;var i;if("number"==typeof t.x&&"number"==typeof t.y)i=Nt.POINT;else if(t.points)i=Nt.MULTI_POINT;else if(t.paths){i=1===t.paths.length?Nt.LINE_STRING:Nt.MULTI_LINE_STRING}else if(t.rings){var r=t,n=vd(r),o=function(t,e){var i,r,n=[],o=[],s=[];for(i=0,r=t.length;i<r;++i){n.length=0,ei(n,0,t[i],e.length);var a=Si(n,0,n.length,e.length);a?o.push([t[i]]):s.push(t[i])}for(;s.length;){var h=s.shift(),l=!1;for(i=o.length-1;i>=0;i--){var u=o[i][0],p=ot(new pi(u).getExtent(),new pi(h).getExtent());if(p){o[i].push(h),l=!0;break}}l||o.push([h.reverse()])}return o}(r.rings,n);1===o.length?(i=Nt.POLYGON,t.rings=o[0]):(i=Nt.MULTI_POLYGON,t.rings=o)}return cd((0,_d[i])(t),!1,e)}function vd(t){var e=At.XY;return!0===t.hasZ&&!0===t.hasM?e=At.XYZM:!0===t.hasZ?e=At.XYZ:!0===t.hasM&&(e=At.XYM),e}function md(t){var e=t.getLayout();return{hasZ:e===At.XYZ||e===At.XYZM,hasM:e===At.XYM||e===At.XYZM}}function xd(t,e){return(0,gd[t.getType()])(cd(t,!0,e),e)}gd[Nt.POINT]=function(t,e){var i,r=t.getCoordinates(),n=t.getLayout();n===At.XYZ?i={x:r[0],y:r[1],z:r[2]}:n===At.XYM?i={x:r[0],y:r[1],m:r[2]}:n===At.XYZM?i={x:r[0],y:r[1],z:r[2],m:r[3]}:n===At.XY?i={x:r[0],y:r[1]}:Y(!1,34);return i},gd[Nt.LINE_STRING]=function(t,e){var i=t,r=md(i);return{hasZ:r.hasZ,hasM:r.hasM,paths:[i.getCoordinates()]}},gd[Nt.POLYGON]=function(t,e){var i=t,r=md(i);return{hasZ:r.hasZ,hasM:r.hasM,rings:i.getCoordinates(!1)}},gd[Nt.MULTI_POINT]=function(t,e){var i=t,r=md(i);return{hasZ:r.hasZ,hasM:r.hasM,points:i.getCoordinates()}},gd[Nt.MULTI_LINE_STRING]=function(t,e){var i=t,r=md(i);return{hasZ:r.hasZ,hasM:r.hasM,paths:i.getCoordinates()}},gd[Nt.MULTI_POLYGON]=function(t,e){for(var i=md(t),r=t.getCoordinates(!1),n=[],o=0;o<r.length;o++)for(var s=r[o].length-1;s>=0;s--)n.push(r[o][s]);return{hasZ:i.hasZ,hasM:i.hasM,rings:n}};var Ed=function(t){function e(e){var i=e||{};t.call(this),this.geometryName_=i.geometryName}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeatureFromObject=function(t,e){var i=t,r=yd(i.geometry,e),n=new B;return this.geometryName_&&n.setGeometryName(this.geometryName_),n.setGeometry(r),e&&e.idField&&i.attributes[e.idField]&&n.setId(i.attributes[e.idField]),i.attributes&&n.setProperties(i.attributes),n},e.prototype.readFeaturesFromObject=function(t,e){var i=e||{};if(t.features){var r=[],n=t.features;i.idField=t.objectIdFieldName;for(var o=0,s=n.length;o<s;++o)r.push(this.readFeatureFromObject(n[o],i));return r}return[this.readFeatureFromObject(t,i)]},e.prototype.readGeometryFromObject=function(t,e){return yd(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?Ee("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return xd(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={},r=t.getGeometry();r&&(i.geometry=xd(r,e),e&&e.featureProjection&&(i.geometry.spatialReference={wkid:Number(Ee(e.featureProjection).getCode().split(":").pop())}));var n=t.getProperties();return delete n[t.getGeometryName()],d(n)?i.attributes={}:i.attributes=n,i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],r=0,n=t.length;r<n;++r)i.push(this.writeFeatureObject(t[r],e));return{features:i}},e}(fd),Sd=function(t){function e(){t.call(this),this.xmlSerializer_=new XMLSerializer}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return Kl.XML},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var i=iu(t);return this.readFeatureFromDocument(i,e)}return eu(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var i=this.readFeaturesFromDocument(t,e);return i.length>0?i[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var i=iu(t);return this.readFeaturesFromDocument(i,e)}return eu(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var i=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&K(i,this.readFeaturesFromNode(r,e));return i},e.prototype.readFeaturesFromNode=function(t,e){return r()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var i=iu(t);return this.readGeometryFromDocument(i,e)}return eu(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=iu(t);return this.readProjectionFromDocument(e)}return eu(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var i=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var i=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var i=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeGeometryNode=function(t,e){return null},e}(pd),Td="http://www.opengis.net/gml",Cd=/^[\s\xa0]*$/,Rd=function(t){function e(e){t.call(this);var i=e||{};this.featureType=i.featureType,this.featureNS=i.featureNS,this.srsName=i.srsName,this.schemaLocation="",this.FEATURE_COLLECTION_PARSERS={},this.FEATURE_COLLECTION_PARSERS[this.namespace]={featureMember:nu(this.readFeaturesInternal),featureMembers:ou(this.readFeaturesInternal)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeaturesInternal=function(t,e){var i=t.localName,r=null;if("FeatureCollection"==i)r=_u([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==i||"featureMember"==i){var n=e[0],o=n.featureType,s=n.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,h=t.childNodes.length;a<h;++a){var l=t.childNodes[a];if(1===l.nodeType){var u=l.nodeName.split(":").pop();if(-1===o.indexOf(u)){var p="",c=0,d=l.namespaceURI;for(var f in s){if(s[f]===d){p=f;break}++c}p||(s[p="p"+c]=d),o.push(p+":"+u)}}}"featureMember"!=i&&(n.featureType=o,n.featureNS=s)}if("string"==typeof s){var _=s;(s={}).p0=_}var g={},y=Array.isArray(o)?o:[o];for(var v in s){for(var m={},x=0,E=y.length;x<E;++x){(-1===y[x].indexOf(":")?"p0":y[x].split(":")[0])===v&&(m[y[x].split(":").pop()]="featureMembers"==i?nu(this.readFeatureElement,this):ou(this.readFeatureElement,this))}g[s[v]]=m}r=_u("featureMember"==i?void 0:[],g,t,e)}return null===r&&(r=[]),r},e.prototype.readGeometryElement=function(t,e){var i=e[0];i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension");var r=_u(null,this.GEOMETRY_PARSERS,t,e,this);return r?cd(r,!1,i):void 0},e.prototype.readFeatureElementInternal=function(t,e,i){for(var r,n={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=tu(o,!1),Cd.test(s)&&(s=void 0)):(i&&(s=this.readGeometryElement(o,e)),s?"boundedBy"!==a&&(r=a):s=this.readFeatureElementInternal(o,e,!1)),n[a]?(n[a]instanceof Array||(n[a]=[n[a]]),n[a].push(s)):n[a]=s;var h=o.attributes.length;if(h>0){n[a]={_content_:n[a]};for(var l=0;l<h;l++){var u=o.attributes[l].name;n[a][u]=o.attributes[l].value}}}if(i){var p=new B(n);r&&p.setGeometryName(r);var c=t.getAttribute("fid")||function(t,e,i){return t.getAttributeNS(e,i)||""}(t,this.namespace,"id");return c&&p.setId(c),p}return n},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var i=this.readFlatCoordinatesFromNode_(t,e);if(i)return new ci(i,At.XYZ)},e.prototype.readMultiPoint=function(t,e){var i=_u([],this.MULTIPOINT_PARSERS_,t,e,this);return i?new Pc(i):void 0},e.prototype.readMultiLineString=function(t,e){var i=_u([],this.MULTILINESTRING_PARSERS_,t,e,this);if(i)return new Oc(i)},e.prototype.readMultiPolygon=function(t,e){var i=_u([],this.MULTIPOLYGON_PARSERS_,t,e,this);if(i)return new Mc(i)},e.prototype.pointMemberParser_=function(t,e){fu(this.POINTMEMBER_PARSERS_,t,e,this)},e.prototype.lineStringMemberParser_=function(t,e){fu(this.LINESTRINGMEMBER_PARSERS_,t,e,this)},e.prototype.polygonMemberParser_=function(t,e){fu(this.POLYGONMEMBER_PARSERS_,t,e,this)},e.prototype.readLineString=function(t,e){var i=this.readFlatCoordinatesFromNode_(t,e);return i?new hr(i,At.XYZ):void 0},e.prototype.readFlatLinearRing_=function(t,e){var i=_u(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this);return i||void 0},e.prototype.readLinearRing=function(t,e){var i=this.readFlatCoordinatesFromNode_(t,e);if(i)return new pi(i,At.XYZ)},e.prototype.readPolygon=function(t,e){var i=_u([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(i&&i[0]){var r,n,o=i[0],s=[o.length];for(r=1,n=i.length;r<n;++r)K(o,i[r]),s.push(o.length);return new Ii(o,At.XYZ,s)}},e.prototype.readFlatCoordinatesFromNode_=function(t,e){return _u(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){var i=this.readGeometryElement(t,[this.getReadOptions(t,e||{})]);return i||null},e.prototype.readFeaturesFromNode=function(t,e){var i={featureType:this.featureType,featureNS:this.featureNS};return e&&u(i,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[i])||[]},e.prototype.readProjectionFromNode=function(t){return Ee(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(Sd);Rd.prototype.namespace=Td,Rd.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},Rd.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},Rd.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},Rd.prototype.MULTIPOINT_PARSERS_={"http://www.opengis.net/gml":{pointMember:nu(Rd.prototype.pointMemberParser_),pointMembers:nu(Rd.prototype.pointMemberParser_)}},Rd.prototype.MULTILINESTRING_PARSERS_={"http://www.opengis.net/gml":{lineStringMember:nu(Rd.prototype.lineStringMemberParser_),lineStringMembers:nu(Rd.prototype.lineStringMemberParser_)}},Rd.prototype.MULTIPOLYGON_PARSERS_={"http://www.opengis.net/gml":{polygonMember:nu(Rd.prototype.polygonMemberParser_),polygonMembers:nu(Rd.prototype.polygonMemberParser_)}},Rd.prototype.POINTMEMBER_PARSERS_={"http://www.opengis.net/gml":{Point:nu(Rd.prototype.readFlatCoordinatesFromNode_)}},Rd.prototype.LINESTRINGMEMBER_PARSERS_={"http://www.opengis.net/gml":{LineString:nu(Rd.prototype.readLineString)}},Rd.prototype.POLYGONMEMBER_PARSERS_={"http://www.opengis.net/gml":{Polygon:nu(Rd.prototype.readPolygon)}},Rd.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:ou(Rd.prototype.readFlatLinearRing_)}};var wd=Rd;function Id(t){return Ld(tu(t,!1))}function Ld(t){var e=/^\s*(true|1)|(false|0)\s*$/.exec(t);return e?void 0!==e[1]||!1:void 0}function Od(t){var e=tu(t,!1),i=Date.parse(e);return isNaN(i)?void 0:i/1e3}function Pd(t){return bd(tu(t,!1))}function bd(t){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return e?parseFloat(e[1]):void 0}function Md(t){return Fd(tu(t,!1))}function Fd(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function Ad(t){return tu(t,!1).trim()}function Nd(t,e){kd(t,e?"1":"0")}function Gd(t,e){var i=e.toPrecision();t.appendChild(Jl.createTextNode(i))}function Dd(t,e){var i=e.toString();t.appendChild(Jl.createTextNode(i))}function kd(t,e){t.appendChild(Jl.createTextNode(e))}var jd=Td+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Ud={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Yd=function(t){function e(e){var i=e||{};t.call(this,i),this.surface_=void 0!==i.surface&&i.surface,this.curve_=void 0!==i.curve&&i.curve,this.multiCurve_=void 0===i.multiCurve||i.multiCurve,this.multiSurface_=void 0===i.multiSurface||i.multiSurface,this.schemaLocation=i.schemaLocation?i.schemaLocation:jd,this.hasZ=void 0!==i.hasZ&&i.hasZ}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readMultiCurve_=function(t,e){var i=_u([],this.MULTICURVE_PARSERS_,t,e,this);return i?new Oc(i):void 0},e.prototype.readMultiSurface_=function(t,e){var i=_u([],this.MULTISURFACE_PARSERS_,t,e,this);if(i)return new Mc(i)},e.prototype.curveMemberParser_=function(t,e){fu(this.CURVEMEMBER_PARSERS_,t,e,this)},e.prototype.surfaceMemberParser_=function(t,e){fu(this.SURFACEMEMBER_PARSERS_,t,e,this)},e.prototype.readPatch_=function(t,e){return _u([null],this.PATCHES_PARSERS_,t,e,this)},e.prototype.readSegment_=function(t,e){return _u([null],this.SEGMENTS_PARSERS_,t,e,this)},e.prototype.readPolygonPatch_=function(t,e){return _u([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment_=function(t,e){return _u([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser_=function(t,e){var i=_u(void 0,this.RING_PARSERS,t,e,this);i&&e[e.length-1].push(i)},e.prototype.exteriorParser_=function(t,e){var i=_u(void 0,this.RING_PARSERS,t,e,this);i&&(e[e.length-1][0]=i)},e.prototype.readSurface_=function(t,e){var i=_u([null],this.SURFACE_PARSERS_,t,e,this);if(i&&i[0]){var r,n,o=i[0],s=[o.length];for(r=1,n=i.length;r<n;++r)K(o,i[r]),s.push(o.length);return new Ii(o,At.XYZ,s)}},e.prototype.readCurve_=function(t,e){var i=_u([null],this.CURVE_PARSERS_,t,e,this);return i?new hr(i,At.XYZ):void 0},e.prototype.readEnvelope_=function(t,e){var i=_u([null],this.ENVELOPE_PARSERS_,t,e,this);return lt(i[1][0],i[1][1],i[2][0],i[2][1])},e.prototype.readFlatPos_=function(t,e){for(var i,r=tu(t,!1),n=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];i=n.exec(r);)o.push(parseFloat(i[1])),r=r.substr(i[0].length);if(""===r){var s,a,h=e[0].srsName,l="enu";if(h)l=Ee(h).getAxisOrientation();if("neu"===l)for(s=0,a=o.length;s<a;s+=3){var u=o[s],p=o[s+1];o[s]=p,o[s+1]=u}var c=o.length;if(2==c&&o.push(0),0!==c)return o}},e.prototype.readFlatPosList_=function(t,e){var i=tu(t,!1).replace(/^\s*|\s*$/g,""),r=e[0],n=r.srsName,o=r.srsDimension,s="enu";n&&(s=Ee(n).getAxisOrientation());var a,h,l,u=i.split(/\s+/),p=2;t.getAttribute("srsDimension")?p=Fd(t.getAttribute("srsDimension")):t.getAttribute("dimension")?p=Fd(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?p=Fd(t.parentNode.getAttribute("srsDimension")):o&&(p=Fd(o));for(var c=[],d=0,f=u.length;d<f;d+=p)a=parseFloat(u[d]),h=parseFloat(u[d+1]),l=3===p?parseFloat(u[d+2]):0,"en"===s.substr(0,2)?c.push(a,h,l):c.push(h,a,l);return c},e.prototype.writePos_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=n?"3":"2";t.setAttribute("srsDimension",o);var s=r.srsName,a="enu";s&&(a=Ee(s).getAxisOrientation());var h,l=e.getCoordinates();(h="en"===a.substr(0,2)?l[0]+" "+l[1]:l[1]+" "+l[0],n)&&(h+=" "+(l[2]||0));kd(t,h)},e.prototype.getCoords_=function(t,e,i){var r="enu";e&&(r=Ee(e).getAxisOrientation());var n="en"===r.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];i&&(n+=" "+(t[2]||0));return n},e.prototype.writePosList_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=n?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=r.srsName,h=e.getCoordinates(),l=h.length,u=new Array(l),p=0;p<l;++p)s=h[p],u[p]=this.getCoords_(s,a,n);kd(t,u.join(" "))},e.prototype.writePoint_=function(t,e,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var n=$l(t.namespaceURI,"pos");t.appendChild(n),this.writePos_(n,e,i)},e.prototype.writeEnvelope=function(t,e,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var n=[e[0]+" "+e[1],e[2]+" "+e[3]];yu({node:t},this.ENVELOPE_SERIALIZERS_,pu,n,i,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing_=function(t,e,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var n=$l(t.namespaceURI,"posList");t.appendChild(n),this.writePosList_(n,e,i)},e.prototype.RING_NODE_FACTORY_=function(t,e,i){var r=e[e.length-1],n=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),$l(n.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();yu({node:t,hasZ:n,srsName:o},this.RING_SERIALIZERS_,this.RING_NODE_FACTORY_,s,i,void 0,this)}else if("Surface"===t.nodeName){var a=$l(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,i)}},e.prototype.writeCurveOrLineString_=function(t,e,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var n=$l(t.namespaceURI,"posList");t.appendChild(n),this.writePosList_(n,e,i)}else if("Curve"===t.nodeName){var o=$l(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,i)}},e.prototype.writeMultiSurfaceOrPolygon_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();yu({node:t,hasZ:n,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,i,void 0,this)},e.prototype.writeMultiPoint_=function(t,e,i){var r=i[i.length-1],n=r.srsName,o=r.hasZ;n&&t.setAttribute("srsName",n);var s=e.getPoints();yu({node:t,hasZ:o,srsName:n},this.POINTMEMBER_SERIALIZERS_,uu("pointMember"),s,i,void 0,this)},e.prototype.writeMultiCurveOrLineString_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();yu({node:t,hasZ:n,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,i,void 0,this)},e.prototype.writeRing_=function(t,e,i){var r=$l(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing_(r,e,i)},e.prototype.writeSurfaceOrPolygonMember_=function(t,e,i){var r=this.GEOMETRY_NODE_FACTORY_(e,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon_(r,e,i))},e.prototype.writePointMember_=function(t,e,i){var r=$l(t.namespaceURI,"Point");t.appendChild(r),this.writePoint_(r,e,i)},e.prototype.writeLineStringOrCurveMember_=function(t,e,i){var r=this.GEOMETRY_NODE_FACTORY_(e,i);r&&(t.appendChild(r),this.writeCurveOrLineString_(r,e,i))},e.prototype.writeSurfacePatches_=function(t,e,i){var r=$l(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon_(r,e,i)},e.prototype.writeCurveSegments_=function(t,e,i){var r=$l(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString_(r,e,i)},e.prototype.writeGeometryElement=function(t,e,i){var r,n=i[i.length-1],o=u({},n);o.node=t,r=Array.isArray(e)?n.dataProjection?be(e,n.featureProjection,n.dataProjection):e:cd(e,!0,n),yu(o,this.GEOMETRY_SERIALIZERS_,this.GEOMETRY_NODE_FACTORY_,[r],i,void 0,this)},e.prototype.writeFeatureElement=function(t,e,i){var r=e.getId();r&&t.setAttribute("fid",r);var n=i[i.length-1],o=n.featureNS,s=e.getGeometryName();n.serializers||(n.serializers={},n.serializers[o]={});var a=e.getProperties(),h=[],l=[];for(var p in a){var c=a[p];null!==c&&(h.push(p),l.push(c),p==s||"function"==typeof c.getSimplifiedGeometry?p in n.serializers[o]||(n.serializers[o][p]=hu(this.writeGeometryElement,this)):p in n.serializers[o]||(n.serializers[o][p]=hu(kd)))}var d=u({},n);d.node=t,yu(d,n.serializers,uu(void 0,o),l,i,h)},e.prototype.writeFeatureMembers_=function(t,e,i){var r=i[i.length-1],n=r.featureType,o=r.featureNS,s={};s[o]={},s[o][n]=hu(this.writeFeatureElement,this);var a=u({},r);a.node=t,yu(a,s,uu(n,o),e,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,i){var r=e[e.length-1].node;return $l(this.namespace,Ud[r.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,i){var r,n=e[e.length-1],o=n.multiSurface,s=n.surface,a=n.curve,h=n.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"LineString"===r&&!0===a?r="Curve":"MultiLineString"===r&&!0===h&&(r="MultiCurve"),$l(this.namespace,r)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var i=$l(this.namespace,"geom"),r={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&u(r,e),this.writeGeometryElement(i,t,[r]),i},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=$l(this.namespace,"featureMembers");i.setAttributeNS(Ql,"xsi:schemaLocation",this.schemaLocation);var r={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&u(r,e),this.writeFeatureMembers_(i,t,[r]),i},e}(wd);Yd.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:ou(Yd.prototype.readFlatPos_),posList:ou(Yd.prototype.readFlatPosList_)}},Yd.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:Yd.prototype.interiorParser_,exterior:Yd.prototype.exteriorParser_}},Yd.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:ou(wd.prototype.readPoint),MultiPoint:ou(wd.prototype.readMultiPoint),LineString:ou(wd.prototype.readLineString),MultiLineString:ou(wd.prototype.readMultiLineString),LinearRing:ou(wd.prototype.readLinearRing),Polygon:ou(wd.prototype.readPolygon),MultiPolygon:ou(wd.prototype.readMultiPolygon),Surface:ou(Yd.prototype.readSurface_),MultiSurface:ou(Yd.prototype.readMultiSurface_),Curve:ou(Yd.prototype.readCurve_),MultiCurve:ou(Yd.prototype.readMultiCurve_),Envelope:ou(Yd.prototype.readEnvelope_)}},Yd.prototype.MULTICURVE_PARSERS_={"http://www.opengis.net/gml":{curveMember:nu(Yd.prototype.curveMemberParser_),curveMembers:nu(Yd.prototype.curveMemberParser_)}},Yd.prototype.MULTISURFACE_PARSERS_={"http://www.opengis.net/gml":{surfaceMember:nu(Yd.prototype.surfaceMemberParser_),surfaceMembers:nu(Yd.prototype.surfaceMemberParser_)}},Yd.prototype.CURVEMEMBER_PARSERS_={"http://www.opengis.net/gml":{LineString:nu(wd.prototype.readLineString),Curve:nu(Yd.prototype.readCurve_)}},Yd.prototype.SURFACEMEMBER_PARSERS_={"http://www.opengis.net/gml":{Polygon:nu(wd.prototype.readPolygon),Surface:nu(Yd.prototype.readSurface_)}},Yd.prototype.SURFACE_PARSERS_={"http://www.opengis.net/gml":{patches:ou(Yd.prototype.readPatch_)}},Yd.prototype.CURVE_PARSERS_={"http://www.opengis.net/gml":{segments:ou(Yd.prototype.readSegment_)}},Yd.prototype.ENVELOPE_PARSERS_={"http://www.opengis.net/gml":{lowerCorner:nu(Yd.prototype.readFlatPosList_),upperCorner:nu(Yd.prototype.readFlatPosList_)}},Yd.prototype.PATCHES_PARSERS_={"http://www.opengis.net/gml":{PolygonPatch:ou(Yd.prototype.readPolygonPatch_)}},Yd.prototype.SEGMENTS_PARSERS_={"http://www.opengis.net/gml":{LineStringSegment:ou(Yd.prototype.readLineStringSegment_)}},Yd.prototype.writeFeatures,Yd.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml":{exterior:hu(Yd.prototype.writeRing_),interior:hu(Yd.prototype.writeRing_)}},Yd.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml":{lowerCorner:hu(kd),upperCorner:hu(kd)}},Yd.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{surfaceMember:hu(Yd.prototype.writeSurfaceOrPolygonMember_),polygonMember:hu(Yd.prototype.writeSurfaceOrPolygonMember_)}},Yd.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{pointMember:hu(Yd.prototype.writePointMember_)}},Yd.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{lineStringMember:hu(Yd.prototype.writeLineStringOrCurveMember_),curveMember:hu(Yd.prototype.writeLineStringOrCurveMember_)}},Yd.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml":{Curve:hu(Yd.prototype.writeCurveOrLineString_),MultiCurve:hu(Yd.prototype.writeMultiCurveOrLineString_),Point:hu(Yd.prototype.writePoint_),MultiPoint:hu(Yd.prototype.writeMultiPoint_),LineString:hu(Yd.prototype.writeCurveOrLineString_),MultiLineString:hu(Yd.prototype.writeMultiCurveOrLineString_),LinearRing:hu(Yd.prototype.writeLinearRing_),Polygon:hu(Yd.prototype.writeSurfaceOrPolygon_),MultiPolygon:hu(Yd.prototype.writeMultiSurfaceOrPolygon_),Surface:hu(Yd.prototype.writeSurfaceOrPolygon_),MultiSurface:hu(Yd.prototype.writeMultiSurfaceOrPolygon_),Envelope:hu(Yd.prototype.writeEnvelope)}};var Bd=Yd,Vd=Bd;Vd.prototype.writeFeatures,Vd.prototype.writeFeaturesNode;var Xd=Vd,zd=Td+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Wd={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Kd=function(t){function e(e){var i=e||{};t.call(this,i),this.FEATURE_COLLECTION_PARSERS[Td].featureMember=nu(this.readFeaturesInternal),this.schemaLocation=i.schemaLocation?i.schemaLocation:zd}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFlatCoordinates_=function(t,e){var i=tu(t,!1).replace(/^\s*|\s*$/g,""),r=e[0].srsName,n="enu";if(r){var o=Ee(r);o&&(n=o.getAxisOrientation())}for(var s=i.trim().split(/\s+/),a=[],h=0,l=s.length;h<l;h++){var u=s[h].split(/,+/),p=parseFloat(u[0]),c=parseFloat(u[1]),d=3===u.length?parseFloat(u[2]):0;"en"===n.substr(0,2)?a.push(p,c,d):a.push(c,p,d)}return a},e.prototype.readBox_=function(t,e){var i=_u([null],this.BOX_PARSERS_,t,e,this);return lt(i[1][0],i[1][1],i[1][3],i[1][4])},e.prototype.innerBoundaryIsParser_=function(t,e){var i=_u(void 0,this.RING_PARSERS,t,e,this);i&&e[e.length-1].push(i)},e.prototype.outerBoundaryIsParser_=function(t,e){var i=_u(void 0,this.RING_PARSERS,t,e,this);i&&(e[e.length-1][0]=i)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,i){var r,n=e[e.length-1],o=n.multiSurface,s=n.surface,a=n.multiCurve;return Array.isArray(t)?r="Envelope":"MultiPolygon"===(r=t.getType())&&!0===o?r="MultiSurface":"Polygon"===r&&!0===s?r="Surface":"MultiLineString"===r&&!0===a&&(r="MultiCurve"),$l("http://www.opengis.net/gml",r)},e.prototype.writeFeatureElement=function(t,e,i){var r=e.getId();r&&t.setAttribute("fid",r);var n=i[i.length-1],o=n.featureNS,s=e.getGeometryName();n.serializers||(n.serializers={},n.serializers[o]={});var a=e.getProperties(),h=[],l=[];for(var p in a){var c=a[p];null!==c&&(h.push(p),l.push(c),p==s||"function"==typeof c.getSimplifiedGeometry?p in n.serializers[o]||(n.serializers[o][p]=hu(this.writeGeometryElement,this)):p in n.serializers[o]||(n.serializers[o][p]=hu(kd)))}var d=u({},n);d.node=t,yu(d,n.serializers,uu(void 0,o),l,i,h)},e.prototype.writeCurveOrLineString_=function(t,e,i){var r=i[i.length-1].srsName;if("LineStringSegment"!==t.nodeName&&r&&t.setAttribute("srsName",r),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var n=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(n),this.writeCoordinates_(n,e,i)}else if("Curve"===t.nodeName){var o=$l(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,i)}},e.prototype.writeLineStringOrCurveMember_=function(t,e,i){var r=this.GEOMETRY_NODE_FACTORY_(e,i);r&&(t.appendChild(r),this.writeCurveOrLineString_(r,e,i))},e.prototype.writeMultiCurveOrLineString_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName,s=r.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();yu({node:t,hasZ:n,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,i,void 0,this)},e.prototype.writeGeometryElement=function(t,e,i){var r,n=i[i.length-1],o=u({},n);o.node=t,r=Array.isArray(e)?n.dataProjection?be(e,n.featureProjection,n.dataProjection):e:cd(e,!0,n),yu(o,this.GEOMETRY_SERIALIZERS_,this.GEOMETRY_NODE_FACTORY_,[r],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=$l(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,i){for(var r=i[i.length-1],n=r.hasZ,o=r.srsName,s=e.getCoordinates(),a=s.length,h=new Array(a),l=0;l<a;++l){var u=s[l];h[l]=this.getCoords_(u,o,n)}kd(t,h.join(" "))},e.prototype.writeCurveSegments_=function(t,e,i){var r=$l(t.namespaceURI,"LineStringSegment");t.appendChild(r),this.writeCurveOrLineString_(r,e,i)},e.prototype.writeSurfaceOrPolygon_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();yu({node:t,hasZ:n,srsName:o},this.RING_SERIALIZERS_,this.RING_NODE_FACTORY_,s,i,void 0,this)}else if("Surface"===t.nodeName){var a=$l(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,i)}},e.prototype.RING_NODE_FACTORY_=function(t,e,i){var r=e[e.length-1],n=r.node,o=r.exteriorWritten;return void 0===o&&(r.exteriorWritten=!0),$l(n.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,i){var r=$l(t.namespaceURI,"PolygonPatch");t.appendChild(r),this.writeSurfaceOrPolygon_(r,e,i)},e.prototype.writeRing_=function(t,e,i){var r=$l(t.namespaceURI,"LinearRing");t.appendChild(r),this.writeLinearRing_(r,e,i)},e.prototype.getCoords_=function(t,e,i){var r="enu";e&&(r=Ee(e).getAxisOrientation());var n="en"===r.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];i&&(n+=","+(t[2]||0));return n},e.prototype.writePoint_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s);var a=e.getCoordinates();kd(s,this.getCoords_(a,o,n))},e.prototype.writeMultiPoint_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName;o&&t.setAttribute("srsName",o);var s=e.getPoints();yu({node:t,hasZ:n,srsName:o},this.POINTMEMBER_SERIALIZERS_,uu("pointMember"),s,i,void 0,this)},e.prototype.writePointMember_=function(t,e,i){var r=$l(t.namespaceURI,"Point");t.appendChild(r),this.writePoint_(r,e,i)},e.prototype.writeLinearRing_=function(t,e,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var n=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(n),this.writeCoordinates_(n,e,i)},e.prototype.writeMultiSurfaceOrPolygon_=function(t,e,i){var r=i[i.length-1],n=r.hasZ,o=r.srsName,s=r.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();yu({node:t,hasZ:n,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,i,void 0,this)},e.prototype.writeSurfaceOrPolygonMember_=function(t,e,i){var r=this.GEOMETRY_NODE_FACTORY_(e,i);r&&(t.appendChild(r),this.writeSurfaceOrPolygon_(r,e,i))},e.prototype.writeEnvelope=function(t,e,i){var r=i[i.length-1].srsName;r&&t.setAttribute("srsName",r);var n=[e[0]+" "+e[1],e[2]+" "+e[3]];yu({node:t},this.ENVELOPE_SERIALIZERS_,pu,n,i,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,i){var r=e[e.length-1].node;return $l("http://www.opengis.net/gml",Wd[r.nodeName])},e}(wd);Kd.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:ou(Kd.prototype.readFlatCoordinates_)}},Kd.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:Kd.prototype.innerBoundaryIsParser_,outerBoundaryIs:Kd.prototype.outerBoundaryIsParser_}},Kd.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:nu(Kd.prototype.readFlatCoordinates_)}},Kd.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:ou(wd.prototype.readPoint),MultiPoint:ou(wd.prototype.readMultiPoint),LineString:ou(wd.prototype.readLineString),MultiLineString:ou(wd.prototype.readMultiLineString),LinearRing:ou(wd.prototype.readLinearRing),Polygon:ou(wd.prototype.readPolygon),MultiPolygon:ou(wd.prototype.readMultiPolygon),Box:ou(Kd.prototype.readBox_)}},Kd.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml":{Curve:hu(Kd.prototype.writeCurveOrLineString_),MultiCurve:hu(Kd.prototype.writeMultiCurveOrLineString_),Point:hu(Kd.prototype.writePoint_),MultiPoint:hu(Kd.prototype.writeMultiPoint_),LineString:hu(Kd.prototype.writeCurveOrLineString_),MultiLineString:hu(Kd.prototype.writeMultiCurveOrLineString_),LinearRing:hu(Kd.prototype.writeLinearRing_),Polygon:hu(Kd.prototype.writeSurfaceOrPolygon_),MultiPolygon:hu(Kd.prototype.writeMultiSurfaceOrPolygon_),Surface:hu(Kd.prototype.writeSurfaceOrPolygon_),MultiSurface:hu(Kd.prototype.writeMultiSurfaceOrPolygon_),Envelope:hu(Kd.prototype.writeEnvelope)}},Kd.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{lineStringMember:hu(Kd.prototype.writeLineStringOrCurveMember_),curveMember:hu(Kd.prototype.writeLineStringOrCurveMember_)}},Kd.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml":{outerBoundaryIs:hu(Kd.prototype.writeRing_),innerBoundaryIs:hu(Kd.prototype.writeRing_)}},Kd.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{pointMember:hu(Kd.prototype.writePointMember_)}},Kd.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml":{surfaceMember:hu(Kd.prototype.writeSurfaceOrPolygonMember_),polygonMember:hu(Kd.prototype.writeSurfaceOrPolygonMember_)}},Kd.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml":{lowerCorner:hu(kd),upperCorner:hu(kd)}};var Hd=Kd,Zd=function(t){function e(e){var i=e||{};t.call(this,i),this.schemaLocation=i.schemaLocation?i.schemaLocation:this.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Bd);Zd.prototype.namespace="http://www.opengis.net/gml/3.2",Zd.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:ou(Bd.prototype.readFlatPos_),posList:ou(Bd.prototype.readFlatPosList_)}},Zd.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:Bd.prototype.interiorParser_,exterior:Bd.prototype.exteriorParser_}},Zd.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:ou(wd.prototype.readPoint),MultiPoint:ou(wd.prototype.readMultiPoint),LineString:ou(wd.prototype.readLineString),MultiLineString:ou(wd.prototype.readMultiLineString),LinearRing:ou(wd.prototype.readLinearRing),Polygon:ou(wd.prototype.readPolygon),MultiPolygon:ou(wd.prototype.readMultiPolygon),Surface:ou(Zd.prototype.readSurface_),MultiSurface:ou(Bd.prototype.readMultiSurface_),Curve:ou(Zd.prototype.readCurve_),MultiCurve:ou(Bd.prototype.readMultiCurve_),Envelope:ou(Zd.prototype.readEnvelope_)}},Zd.prototype.MULTICURVE_PARSERS_={"http://www.opengis.net/gml/3.2":{curveMember:nu(Bd.prototype.curveMemberParser_),curveMembers:nu(Bd.prototype.curveMemberParser_)}},Zd.prototype.MULTISURFACE_PARSERS_={"http://www.opengis.net/gml/3.2":{surfaceMember:nu(Bd.prototype.surfaceMemberParser_),surfaceMembers:nu(Bd.prototype.surfaceMemberParser_)}},Zd.prototype.CURVEMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{LineString:nu(wd.prototype.readLineString),Curve:nu(Bd.prototype.readCurve_)}},Zd.prototype.SURFACEMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Polygon:nu(wd.prototype.readPolygon),Surface:nu(Bd.prototype.readSurface_)}},Zd.prototype.SURFACE_PARSERS_={"http://www.opengis.net/gml/3.2":{patches:ou(Bd.prototype.readPatch_)}},Zd.prototype.CURVE_PARSERS_={"http://www.opengis.net/gml/3.2":{segments:ou(Bd.prototype.readSegment_)}},Zd.prototype.ENVELOPE_PARSERS_={"http://www.opengis.net/gml/3.2":{lowerCorner:nu(Bd.prototype.readFlatPosList_),upperCorner:nu(Bd.prototype.readFlatPosList_)}},Zd.prototype.PATCHES_PARSERS_={"http://www.opengis.net/gml/3.2":{PolygonPatch:ou(Bd.prototype.readPolygonPatch_)}},Zd.prototype.SEGMENTS_PARSERS_={"http://www.opengis.net/gml/3.2":{LineStringSegment:ou(Bd.prototype.readLineStringSegment_)}},Zd.prototype.MULTIPOINT_PARSERS_={"http://www.opengis.net/gml/3.2":{pointMember:nu(wd.prototype.pointMemberParser_),pointMembers:nu(wd.prototype.pointMemberParser_)}},Zd.prototype.MULTILINESTRING_PARSERS_={"http://www.opengis.net/gml/3.2":{lineStringMember:nu(wd.prototype.lineStringMemberParser_),lineStringMembers:nu(wd.prototype.lineStringMemberParser_)}},Zd.prototype.MULTIPOLYGON_PARSERS_={"http://www.opengis.net/gml/3.2":{polygonMember:nu(wd.prototype.polygonMemberParser_),polygonMembers:nu(wd.prototype.polygonMemberParser_)}},Zd.prototype.POINTMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Point:nu(wd.prototype.readFlatCoordinatesFromNode_)}},Zd.prototype.LINESTRINGMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{LineString:nu(wd.prototype.readLineString)}},Zd.prototype.POLYGONMEMBER_PARSERS_={"http://www.opengis.net/gml/3.2":{Polygon:nu(wd.prototype.readPolygon)}},Zd.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:ou(wd.prototype.readFlatLinearRing_)}},Zd.prototype.RING_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{exterior:hu(Bd.prototype.writeRing_),interior:hu(Bd.prototype.writeRing_)}},Zd.prototype.ENVELOPE_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{lowerCorner:hu(kd),upperCorner:hu(kd)}},Zd.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{surfaceMember:hu(Bd.prototype.writeSurfaceOrPolygonMember_),polygonMember:hu(Bd.prototype.writeSurfaceOrPolygonMember_)}},Zd.prototype.POINTMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{pointMember:hu(Bd.prototype.writePointMember_)}},Zd.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{lineStringMember:hu(Bd.prototype.writeLineStringOrCurveMember_),curveMember:hu(Bd.prototype.writeLineStringOrCurveMember_)}},Zd.prototype.GEOMETRY_SERIALIZERS_={"http://www.opengis.net/gml/3.2":{Curve:hu(Bd.prototype.writeCurveOrLineString_),MultiCurve:hu(Bd.prototype.writeMultiCurveOrLineString_),Point:hu(Zd.prototype.writePoint_),MultiPoint:hu(Bd.prototype.writeMultiPoint_),LineString:hu(Bd.prototype.writeCurveOrLineString_),MultiLineString:hu(Bd.prototype.writeMultiCurveOrLineString_),LinearRing:hu(Bd.prototype.writeLinearRing_),Polygon:hu(Bd.prototype.writeSurfaceOrPolygon_),MultiPolygon:hu(Bd.prototype.writeMultiSurfaceOrPolygon_),Surface:hu(Bd.prototype.writeSurfaceOrPolygon_),MultiSurface:hu(Bd.prototype.writeMultiSurfaceOrPolygon_),Envelope:hu(Bd.prototype.writeEnvelope)}};var qd=Zd,Jd=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Qd={rte:If,trk:Lf,wpt:Of},$d=du(Jd,{rte:nu(If),trk:nu(Lf),wpt:nu(Of)}),tf=du(Jd,{text:au(Ad,"linkText"),type:au(Ad,"linkType")}),ef=du(Jd,{rte:hu(function(t,e,i){var r=i[0],n=e.getProperties(),o={node:t};o.properties=n;var s=e.getGeometry();if(s.getType()==Nt.LINE_STRING){var a=cd(s,!0,r);o.geometryLayout=a.getLayout(),n.rtept=a.getCoordinates()}var h=i[i.length-1].node,l=cf[h.namespaceURI],u=cu(n,l);yu(o,df,pu,u,i,l)}),trk:hu(function(t,e,i){var r=i[0],n=e.getProperties(),o={node:t};o.properties=n;var s=e.getGeometry();if(s.getType()==Nt.MULTI_LINE_STRING){var a=cd(s,!0,r);n.trkseg=a.getLineStrings()}var h=i[i.length-1].node,l=_f[h.namespaceURI],u=cu(n,l);yu(o,gf,pu,u,i,l)}),wpt:hu(function(t,e,i){var r=i[0],n=i[i.length-1];n.properties=e.getProperties();var o=e.getGeometry();if(o.getType()==Nt.POINT){var s=cd(o,!0,r);n.geometryLayout=s.getLayout(),bf(t,s.getCoordinates(),i)}})}),rf=function(t){function e(e){t.call(this);var i=e||{};this.dataProjection=Ee("EPSG:4326"),this.readExtensions_=i.readExtensions}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var e=0,i=t.length;e<i;++e){var r=t[e];if(this.readExtensions_){var n=r.get("extensionsNode_")||null;this.readExtensions_(r,n)}r.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,e){if(!X(Jd,t.namespaceURI))return null;var i=Qd[t.localName];if(!i)return null;var r=i(t,[this.getReadOptions(t,e)]);return r?(this.handleReadExtensions_([r]),r):null},e.prototype.readFeaturesFromNode=function(t,e){if(!X(Jd,t.namespaceURI))return[];if("gpx"==t.localName){var i=_u([],$d,t,[this.getReadOptions(t,e)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=$l("http://www.topografix.com/GPX/1/1","gpx");return i.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xsi",Ql),i.setAttributeNS(Ql,"xsi:schemaLocation","http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),yu({node:i},ef,Sf,t,[e]),i},e}(Sd),nf=du(Jd,{name:au(Ad),cmt:au(Ad),desc:au(Ad),src:au(Ad),link:Rf,number:au(Md),extensions:wf,type:au(Ad),rtept:function(t,e){var i=_u({},of,t,e);if(i){var r=e[e.length-1],n=r.flatCoordinates,o=r.layoutOptions;Tf(n,o,t,i)}}}),of=du(Jd,{ele:au(Pd),time:au(Od)}),sf=du(Jd,{name:au(Ad),cmt:au(Ad),desc:au(Ad),src:au(Ad),link:Rf,number:au(Md),type:au(Ad),extensions:wf,trkseg:function(t,e){var i=e[e.length-1];fu(af,t,e);var r=i.flatCoordinates;i.ends.push(r.length)}}),af=du(Jd,{trkpt:function(t,e){var i=_u({},hf,t,e);if(i){var r=e[e.length-1],n=r.flatCoordinates,o=r.layoutOptions;Tf(n,o,t,i)}}}),hf=du(Jd,{ele:au(Pd),time:au(Od)}),lf=du(Jd,{ele:au(Pd),time:au(Od),magvar:au(Pd),geoidheight:au(Pd),name:au(Ad),cmt:au(Ad),desc:au(Ad),src:au(Ad),link:Rf,sym:au(Ad),type:au(Ad),fix:au(Ad),sat:au(Md),hdop:au(Pd),vdop:au(Pd),pdop:au(Pd),ageofdgpsdata:au(Pd),dgpsid:au(Md),extensions:wf}),uf=["text","type"],pf=du(Jd,{text:hu(kd),type:hu(kd)}),cf=du(Jd,["name","cmt","desc","src","link","number","type","rtept"]),df=du(Jd,{name:hu(kd),cmt:hu(kd),desc:hu(kd),src:hu(kd),link:hu(Pf),number:hu(Dd),type:hu(kd),rtept:lu(hu(bf))}),ff=du(Jd,["ele","time"]),_f=du(Jd,["name","cmt","desc","src","link","number","type","trkseg"]),gf=du(Jd,{name:hu(kd),cmt:hu(kd),desc:hu(kd),src:hu(kd),link:hu(Pf),number:hu(Dd),type:hu(kd),trkseg:lu(hu(function(t,e,i){var r={node:t};r.geometryLayout=e.getLayout(),r.properties={},yu(r,vf,yf,e.getCoordinates(),i)}))}),yf=uu("trkpt"),vf=du(Jd,{trkpt:hu(bf)}),mf=du(Jd,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),xf=du(Jd,{ele:hu(Gd),time:hu(function(t,e){var i=new Date(1e3*e),r=i.getUTCFullYear()+"-"+Wi(i.getUTCMonth()+1,2)+"-"+Wi(i.getUTCDate(),2)+"T"+Wi(i.getUTCHours(),2)+":"+Wi(i.getUTCMinutes(),2)+":"+Wi(i.getUTCSeconds(),2)+"Z";t.appendChild(Jl.createTextNode(r))}),magvar:hu(Gd),geoidheight:hu(Gd),name:hu(kd),cmt:hu(kd),desc:hu(kd),src:hu(kd),link:hu(Pf),sym:hu(kd),type:hu(kd),fix:hu(kd),sat:hu(Dd),hdop:hu(Gd),vdop:hu(Gd),pdop:hu(Gd),ageofdgpsdata:hu(Gd),dgpsid:hu(Dd)}),Ef={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Sf(t,e,i){var r=t.getGeometry();if(r){var n=Ef[r.getType()];if(n)return $l(e[e.length-1].node.namespaceURI,n)}}function Tf(t,e,i,r){return t.push(parseFloat(i.getAttribute("lon")),parseFloat(i.getAttribute("lat"))),"ele"in r?(t.push(r.ele),delete r.ele,e.hasZ=!0):t.push(0),"time"in r?(t.push(r.time),delete r.time,e.hasM=!0):t.push(0),t}function Cf(t,e,i){var r=At.XY,n=2;if(t.hasZ&&t.hasM?(r=At.XYZM,n=4):t.hasZ?(r=At.XYZ,n=3):t.hasM&&(r=At.XYM,n=3),4!==n){for(var o=0,s=e.length/4;o<s;o++)e[o*n]=e[4*o],e[o*n+1]=e[4*o+1],t.hasZ&&(e[o*n+2]=e[4*o+2]),t.hasM&&(e[o*n+2]=e[4*o+3]);if(e.length=e.length/4*n,i)for(var a=0,h=i.length;a<h;a++)i[a]=i[a]/4*n}return r}function Rf(t,e){var i=e[e.length-1],r=t.getAttribute("href");null!==r&&(i.link=r),fu(tf,t,e)}function wf(t,e){e[e.length-1].extensionsNode_=t}function If(t,e){var i=e[0],r=_u({flatCoordinates:[],layoutOptions:{}},nf,t,e);if(r){var n=r.flatCoordinates;delete r.flatCoordinates;var o=r.layoutOptions;delete r.layoutOptions;var s=Cf(o,n),a=new hr(n,s);cd(a,!1,i);var h=new B(a);return h.setProperties(r),h}}function Lf(t,e){var i=e[0],r=_u({flatCoordinates:[],ends:[],layoutOptions:{}},sf,t,e);if(r){var n=r.flatCoordinates;delete r.flatCoordinates;var o=r.ends;delete r.ends;var s=r.layoutOptions;delete r.layoutOptions;var a=Cf(s,n,o),h=new Oc(n,a,o);cd(h,!1,i);var l=new B(h);return l.setProperties(r),l}}function Of(t,e){var i=e[0],r=_u({},lf,t,e);if(r){var n={},o=Tf([],n,t,r),s=Cf(n,o),a=new ci(o,s);cd(a,!1,i);var h=new B(a);return h.setProperties(r),h}}function Pf(t,e,i){t.setAttribute("href",e);var r=i[i.length-1].properties,n=[r.linkText,r.linkType];yu({node:t},pf,pu,n,i,uf)}function bf(t,e,i){var r=i[i.length-1],n=r.node.namespaceURI,o=r.properties;switch(t.setAttributeNS(null,"lat",String(e[1])),t.setAttributeNS(null,"lon",String(e[0])),r.geometryLayout){case At.XYZM:0!==e[3]&&(o.time=e[3]);case At.XYZ:0!==e[2]&&(o.ele=e[2]);break;case At.XYM:0!==e[2]&&(o.time=e[2])}var s="rtept"==t.nodeName?ff[n]:mf[n],a=cu(o,s);yu({node:t,properties:o},xf,pu,a,i,s)}var Mf=rf;function Ff(t,e){if(!t)return null;var i;switch(t.type){case Nt.POINT:i=function(t){return new ci(t.coordinates)}(t);break;case Nt.LINE_STRING:i=function(t){return new hr(t.coordinates)}(t);break;case Nt.POLYGON:i=function(t){return new Ii(t.coordinates)}(t);break;case Nt.MULTI_POINT:i=function(t){return new Pc(t.coordinates)}(t);break;case Nt.MULTI_LINE_STRING:i=function(t){return new Oc(t.coordinates)}(t);break;case Nt.MULTI_POLYGON:i=function(t){return new Mc(t.coordinates)}(t);break;case Nt.GEOMETRY_COLLECTION:i=function(t,e){var i=t.geometries.map(function(t){return Ff(t,e)});return new ld(i)}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return cd(i,!1,e)}function Af(t,e){var i,r=(t=cd(t,!0,e)).getType();switch(r){case Nt.POINT:i=function(t,e){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case Nt.LINE_STRING:i=function(t,e){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case Nt.POLYGON:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case Nt.MULTI_POINT:i=function(t,e){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case Nt.MULTI_LINE_STRING:i=function(t,e){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case Nt.MULTI_POLYGON:i=function(t,e){var i;e&&(i=e.rightHanded);return{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case Nt.GEOMETRY_COLLECTION:i=function(t,e){return{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(t){var i=u({},e);return delete i.featureProjection,Af(t,i)})}}(t,e);break;case Nt.CIRCLE:i={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+r)}return i}var Nf=function(t){function e(e){var i=e||{};t.call(this),this.dataProjection=Ee(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(this.defaultFeatureProjection=Ee(i.featureProjection)),this.geometryName_=i.geometryName,this.extractGeometryName_=i.extractGeometryName}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeatureFromObject=function(t,e){var i=null,r=Ff((i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null}).geometry,e),n=new B;return this.geometryName_?n.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&n.setGeometryName(i.geometry_name),n.setGeometry(r),"id"in i&&n.setId(i.id),i.properties&&n.setProperties(i.properties),n},e.prototype.readFeaturesFromObject=function(t,e){var i=null;if("FeatureCollection"===t.type){i=[];for(var r=t.features,n=0,o=r.length;n<o;++n)i.push(this.readFeatureFromObject(r[n],e))}else i=[this.readFeatureFromObject(t,e)];return i},e.prototype.readGeometryFromObject=function(t,e){return Ff(t,e)},e.prototype.readProjectionFromObject=function(t){var e,i=t.crs;return i?"name"==i.type?e=Ee(i.properties.name):Y(!1,36):e=this.dataProjection,e},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var i={type:"Feature",geometry:null,properties:null},r=t.getId();void 0!==r&&(i.id=r);var n=t.getGeometry();n&&(i.geometry=Af(n,e));var o=t.getProperties();return delete o[t.getGeometryName()],d(o)||(i.properties=o),i},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var i=[],r=0,n=t.length;r<n;++r)i.push(this.writeFeatureObject(t[r],e));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,e){return Af(t,this.adaptOptions(e))},e}(fd);function Gf(t){return"string"==typeof t?t:""}var Df,kf,jf,Uf,Yf,Bf,Vf,Xf=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getType=function(){return Kl.TEXT},e.prototype.readFeature=function(t,e){return this.readFeatureFromText(Gf(t),this.adaptOptions(e))},e.prototype.readFeatureFromText=function(t,e){return r()},e.prototype.readFeatures=function(t,e){return this.readFeaturesFromText(Gf(t),this.adaptOptions(e))},e.prototype.readFeaturesFromText=function(t,e){return r()},e.prototype.readGeometry=function(t,e){return this.readGeometryFromText(Gf(t),this.adaptOptions(e))},e.prototype.readGeometryFromText=function(t,e){return r()},e.prototype.readProjection=function(t){return this.readProjectionFromText(Gf(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){return this.writeFeatureText(t,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){return r()},e.prototype.writeFeatures=function(t,e){return this.writeFeaturesText(t,this.adaptOptions(e))},e.prototype.writeFeaturesText=function(t,e){return r()},e.prototype.writeGeometry=function(t,e){return this.writeGeometryText(t,this.adaptOptions(e))},e.prototype.writeGeometryText=function(t,e){return r()},e}(pd),zf={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},Wf=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Kf=/^H.([A-Z]{3}).*?:(.*)/,Hf=/^HFDTE(\d{2})(\d{2})(\d{2})/,Zf=/\r\n|\r|\n/,qf=function(t){function e(e){t.call(this);var i=e||{};this.dataProjection=Ee("EPSG:4326"),this.altitudeMode_=i.altitudeMode?i.altitudeMode:zf.NONE}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeatureFromText=function(t,e){var i,r,n=this.altitudeMode_,o=t.split(Zf),s={},a=[],h=2e3,l=0,u=1,p=-1;for(i=0,r=o.length;i<r;++i){var c=o[i],d=void 0;if("B"==c.charAt(0)){if(d=Wf.exec(c)){var f=parseInt(d[1],10),_=parseInt(d[2],10),g=parseInt(d[3],10),y=parseInt(d[4],10)+parseInt(d[5],10)/6e4;"S"==d[6]&&(y=-y);var v=parseInt(d[7],10)+parseInt(d[8],10)/6e4;if("W"==d[9]&&(v=-v),a.push(v,y),n!=zf.NONE){var m=void 0;m=n==zf.GPS?parseInt(d[11],10):n==zf.BAROMETRIC?parseInt(d[12],10):0,a.push(m)}var x=Date.UTC(h,l,u,f,_,g);x<p&&(x=Date.UTC(h,l,u+1,f,_,g)),a.push(x/1e3),p=x}}else"H"==c.charAt(0)&&((d=Hf.exec(c))?(u=parseInt(d[1],10),l=parseInt(d[2],10)-1,h=2e3+parseInt(d[3],10)):(d=Kf.exec(c))&&(s[d[1]]=d[2].trim()))}if(0===a.length)return null;var E=n==zf.NONE?At.XYM:At.XYZM,S=new hr(a,E),T=new B(cd(S,!1,e));return T.setProperties(s),T},e.prototype.readFeaturesFromText=function(t,e){var i=this.readFeatureFromText(t,e);return i?[i]:[]},e}(Xf),Jf=["http://www.google.com/kml/ext/2.2"],Qf=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],$f={fraction:Ru.FRACTION,pixels:Ru.PIXELS,insetPixels:Ru.PIXELS},t_=du(Qf,{ExtendedData:K_,Region:H_,MultiGeometry:au(k_,"geometry"),LineString:au(N_,"geometry"),LinearRing:au(G_,"geometry"),Point:au(j_,"geometry"),Polygon:au(Y_,"geometry"),Style:au(V_),StyleMap:function(t,e){var i=E_(t,e);if(!i)return;var r=e[e.length-1];Array.isArray(i)?r.Style=i:"string"==typeof i?r.styleUrl=i:Y(!1,38)},address:au(Ad),description:au(Ad),name:au(Ad),open:au(Id),phoneNumber:au(Ad),styleUrl:au(v_),visibility:au(Id)},du(Jf,{MultiTrack:au(function(t,e){var i=_u([],L_,t,e);if(!i)return;return new Oc(i)},"geometry"),Track:au(P_,"geometry")})),e_=du(Qf,{ExtendedData:K_,Region:H_,Link:function(t,e){fu(i_,t,e)},address:au(Ad),description:au(Ad),name:au(Ad),open:au(Id),phoneNumber:au(Ad),visibility:au(Id)}),i_=du(Qf,{href:au(v_)}),r_=du(Qf,{LatLonAltBox:function(t,e){var i=_u({},J_,t,e);if(!i)return;var r=e[e.length-1],n=[parseFloat(i.west),parseFloat(i.south),parseFloat(i.east),parseFloat(i.north)];r.extent=n,r.altitudeMode=i.altitudeMode,r.minAltitude=parseFloat(i.minAltitude),r.maxAltitude=parseFloat(i.maxAltitude)},Lod:function(t,e){var i=_u({},Q_,t,e);if(!i)return;var r=e[e.length-1];r.minLodPixels=parseFloat(i.minLodPixels),r.maxLodPixels=parseFloat(i.maxLodPixels),r.minFadeExtent=parseFloat(i.minFadeExtent),r.maxFadeExtent=parseFloat(i.maxFadeExtent)}}),n_=du(Qf,["Document","Placemark"]),o_=du(Qf,{Document:hu(function(t,e,i){yu({node:t},rg,ng,e,i,void 0,this)}),Placemark:hu(Lg)}),s_=null;var a_,h_=null;var l_,u_=null;var p_=null;var c_=null;var d_=null;var f_=function(t){function e(e){t.call(this);var i=e||{};d_||(s_=new mr({color:Df=[255,255,255,1]}),kf=[20,2],jf=Ru.PIXELS,Uf=Ru.PIXELS,Yf=[64,64],Bf="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Vf=.5,h_=new Lu({anchor:kf,anchorOrigin:Iu.BOTTOM_LEFT,anchorXUnits:jf,anchorYUnits:Uf,crossOrigin:"anonymous",rotation:0,scale:Vf,size:Yf,src:Bf}),a_="NO_IMAGE",u_=new Er({color:Df,width:1}),l_=new Er({color:[51,51,51,1],width:2}),p_=new Rr({font:"bold 16px Helvetica",fill:s_,stroke:l_,scale:.8}),c_=new Au({fill:s_,image:h_,text:p_,stroke:u_,zIndex:0}),d_=[c_]),this.dataProjection=Ee("EPSG:4326"),this.defaultStyle_=i.defaultStyle?i.defaultStyle:d_,this.extractStyles_=void 0===i.extractStyles||i.extractStyles,this.writeStyles_=void 0===i.writeStyles||i.writeStyles,this.sharedStyles_={},this.showPointNames_=void 0===i.showPointNames||i.showPointNames}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readDocumentOrFolder_=function(t,e){var i=_u([],du(Qf,{Document:ru(this.readDocumentOrFolder_,this),Folder:ru(this.readDocumentOrFolder_,this),Placemark:nu(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this);return i||void 0},e.prototype.readPlacemark_=function(t,e){var i=_u({geometry:null},t_,t,e);if(i){var r=new B,n=t.getAttribute("id");null!==n&&r.setId(n);var o=e[0],s=i.geometry;if(s&&cd(s,!1,o),r.setGeometry(s),delete i.geometry,this.extractStyles_){var a=function(t,e,i,r,n){return function(o,s){var a,h=n,l="";if(h){var u=o.getGeometry();u&&(h=u.getType()===Nt.POINT)}if(h&&(l=o.get("name"),h=h&&!!l),t)return h?(a=__(t[0],l),t.concat(a)):t;if(e){var p=function t(e,i,r){return Array.isArray(e)?e:"string"==typeof e?(!(e in r)&&"#"+e in r&&(e="#"+e),t(r[e],i,r)):i}(e,i,r);return h?(a=__(p[0],l),p.concat(a)):p}return h?(a=__(i[0],l),i.concat(a)):i}}(i.Style,i.styleUrl,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);r.setStyle(a)}return delete i.Style,r.setProperties(i),r}},e.prototype.readSharedStyle_=function(t,e){var i=t.getAttribute("id");if(null!==i){var r=V_(t,e);if(r){var n,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)n=new URL("#"+i,o).href;else n="#"+i;this.sharedStyles_[n]=r}}},e.prototype.readSharedStyleMap_=function(t,e){var i=t.getAttribute("id");if(null!==i){var r=E_(t,e);if(r){var n,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o)n=new URL("#"+i,o).href;else n="#"+i;this.sharedStyles_[n]=r}}},e.prototype.readFeatureFromNode=function(t,e){if(!X(Qf,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i||null},e.prototype.readFeaturesFromNode=function(t,e){if(!X(Qf,t.namespaceURI))return[];var i,r=t.localName;if("Document"==r||"Folder"==r)return(i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==r){var n=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return n?[n]:[]}if("kml"==r){i=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,e);s&&K(i,s)}return i}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=iu(t);return this.readNameFromDocument(e)}return eu(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(e);if(i)return i}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(X(Qf,e.namespaceURI)&&"name"==e.localName)return Ad(e);for(var i=t.firstElementChild;i;i=i.nextElementSibling){var r=i.localName;if(X(Qf,i.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var n=this.readNameFromNode(i);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var i=iu(t);K(e,this.readNetworkLinksFromDocument(i))}else eu(t)?K(e,this.readNetworkLinksFromDocument(t)):K(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&K(e,this.readNetworkLinksFromNode(i));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(X(Qf,i.namespaceURI)&&"NetworkLink"==i.localName){var r=_u({},e_,i,[]);e.push(r)}for(var n=t.firstElementChild;n;n=n.nextElementSibling){var o=n.localName;!X(Qf,n.namespaceURI)||"Document"!=o&&"Folder"!=o&&"kml"!=o||K(e,this.readNetworkLinksFromNode(n))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var i=iu(t);K(e,this.readRegionFromDocument(i))}else eu(t)?K(e,this.readRegionFromDocument(t)):K(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&K(e,this.readRegionFromNode(i));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(X(Qf,i.namespaceURI)&&"Region"==i.localName){var r=_u({},r_,i,[]);e.push(r)}for(var n=t.firstElementChild;n;n=n.nextElementSibling){var o=n.localName;!X(Qf,n.namespaceURI)||"Document"!=o&&"Folder"!=o&&"kml"!=o||K(e,this.readRegionFromNode(n))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var i=$l(Qf[4],"kml"),r="http://www.w3.org/2000/xmlns/";i.setAttributeNS(r,"xmlns:gx",Jf[0]),i.setAttributeNS(r,"xmlns:xsi",Ql),i.setAttributeNS(Ql,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var n={node:i},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=n_[i.namespaceURI],a=cu(o,s);return yu(n,o_,pu,a,[e],s,this),i},e}(Sd);function __(t,e){var i=null,r=[0,0],n="start";if(t.getImage()){var o=t.getImage().getImageSize();if(null===o&&(o=Yf),2==o.length){var s=t.getImage().getScale();r[0]=s*o[0]/2,r[1]=-s*o[1]/2,n="left"}}if(null!==t.getText()){var a=t.getText();(i=a.clone()).setFont(a.getFont()||p_.getFont()),i.setScale(a.getScale()||p_.getScale()),i.setFill(a.getFill()||p_.getFill()),i.setStroke(a.getStroke()||l_)}else i=p_.clone();return i.setText(e),i.setOffsetX(r[0]),i.setOffsetY(r[1]),i.setTextAlign(n),new Au({text:i})}function g_(t){var e=tu(t,!1),i=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(i){var r=i[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function y_(t){for(var e,i=tu(t,!1),r=[],n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s*,\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?))?\s*/i;e=n.exec(i);){var o=parseFloat(e[1]),s=parseFloat(e[2]),a=e[3]?parseFloat(e[3]):0;r.push(o,s,a),i=i.substr(e[0].length)}if(""===i)return r}function v_(t){var e=tu(t,!1).trim(),i=t.baseURI;return i&&"about:blank"!=i||(i=window.location.href),i?new URL(e,i).href:e}function m_(t){return Pd(t)}var x_=du(Qf,{Pair:function(t,e){var i=_u({},Z_,t,e);if(!i)return;var r=i.key;if(r&&"normal"==r){var n=i.styleUrl;n&&(e[e.length-1]=n);var o=i.Style;o&&(e[e.length-1]=o)}}});function E_(t,e){return _u(void 0,x_,t,e)}var S_=du(Qf,{Icon:au(function(t,e){var i=_u({},b_,t,e);return i||null}),heading:au(Pd),hotSpot:au(function(t){var e,i=t.getAttribute("xunits"),r=t.getAttribute("yunits");return e="insetPixels"!==i?"insetPixels"!==r?Iu.BOTTOM_LEFT:Iu.TOP_LEFT:"insetPixels"!==r?Iu.BOTTOM_RIGHT:Iu.TOP_RIGHT,{x:parseFloat(t.getAttribute("x")),xunits:$f[i],y:parseFloat(t.getAttribute("y")),yunits:$f[r],origin:e}}),scale:au(m_)});var T_=du(Qf,{color:au(g_),scale:au(m_)});var C_=du(Qf,{color:au(g_),width:au(Pd)});var R_=du(Qf,{color:au(g_),fill:au(Id),outline:au(Id)});var w_=du(Qf,{coordinates:ou(y_)});function I_(t,e){return _u(null,w_,t,e)}var L_=du(Jf,{Track:nu(P_)});var O_=du(Qf,{when:function(t,e){var i=e[e.length-1].whens,r=tu(t,!1),n=Date.parse(r);i.push(isNaN(n)?0:n)}},du(Jf,{coord:function(t,e){var i=e[e.length-1].flatCoordinates,r=tu(t,!1),n=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(r);if(n){var o=parseFloat(n[1]),s=parseFloat(n[2]),a=parseFloat(n[3]);i.push(o,s,a,0)}else i.push(0,0,0,0)}}));function P_(t,e){var i=_u({flatCoordinates:[],whens:[]},O_,t,e);if(i){for(var r=i.flatCoordinates,n=i.whens,o=0,s=Math.min(r.length,n.length);o<s;++o)r[4*o+3]=n[o];return new hr(r,At.XYZM)}}var b_=du(Qf,{href:au(v_)},du(Jf,{x:au(Pd),y:au(Pd),w:au(Pd),h:au(Pd)}));var M_=du(Qf,{coordinates:ou(y_)});function F_(t,e){return _u(null,M_,t,e)}var A_=du(Qf,{extrude:au(Id),tessellate:au(Id),altitudeMode:au(Ad)});function N_(t,e){var i=_u({},A_,t,e),r=F_(t,e);if(r){var n=new hr(r,At.XYZ);return n.setProperties(i),n}}function G_(t,e){var i=_u({},A_,t,e),r=F_(t,e);if(r){var n=new Ii(r,At.XYZ,[r.length]);return n.setProperties(i),n}}var D_=du(Qf,{LineString:nu(N_),LinearRing:nu(G_),MultiGeometry:nu(k_),Point:nu(j_),Polygon:nu(Y_)});function k_(t,e){var i,r=_u([],D_,t,e);if(!r)return null;if(0===r.length)return new ld(r);for(var n,o,s=!0,a=r[0].getType(),h=1,l=r.length;h<l;++h)if(r[h].getType()!=a){s=!1;break}if(s)if(a==Nt.POINT){var u=r[0];n=u.getLayout(),o=u.getFlatCoordinates();for(var p=1,c=r.length;p<c;++p)K(o,r[p].getFlatCoordinates());X_(i=new Pc(o,n),r)}else a==Nt.LINE_STRING?X_(i=new Oc(r),r):a==Nt.POLYGON?X_(i=new Mc(r),r):a==Nt.GEOMETRY_COLLECTION?i=new ld(r):Y(!1,37);else i=new ld(r);return i}function j_(t,e){var i=_u({},A_,t,e),r=F_(t,e);if(r){var n=new ci(r,At.XYZ);return n.setProperties(i),n}}var U_=du(Qf,{innerBoundaryIs:function(t,e){var i=_u(void 0,$_,t,e);if(i){var r=e[e.length-1];r.push(i)}},outerBoundaryIs:function(t,e){var i=_u(void 0,tg,t,e);if(i){var r=e[e.length-1];r[0]=i}}});function Y_(t,e){var i=_u({},A_,t,e),r=_u([null],U_,t,e);if(r&&r[0]){for(var n=r[0],o=[n.length],s=1,a=r.length;s<a;++s)K(n,r[s]),o.push(n.length);var h=new Ii(n,At.XYZ,o);return h.setProperties(i),h}}var B_=du(Qf,{IconStyle:function(t,e){var i=_u({},S_,t,e);if(i){var r,n,o,s,a=e[e.length-1],h="Icon"in i?i.Icon:{},l=!("Icon"in i)||Object.keys(h).length>0,u=h.href;u?r=u:l&&(r=Bf);var p,c=Iu.BOTTOM_LEFT,d=i.hotSpot;d?(n=[d.x,d.y],o=d.xunits,s=d.yunits,c=d.origin):r===Bf?(n=kf,o=jf,s=Uf):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(n=[.5,0],o=Ru.FRACTION,s=Ru.FRACTION);var f,_=h.x,g=h.y;void 0!==_&&void 0!==g&&(p=[_,g]);var y,v=h.w,m=h.h;void 0!==v&&void 0!==m&&(f=[v,m]);var x=i.heading;void 0!==x&&(y=Vt(x));var E=i.scale;if(l){r==Bf&&(f=Yf,void 0===E&&(E=Vf));var S=new Lu({anchor:n,anchorOrigin:c,anchorXUnits:o,anchorYUnits:s,crossOrigin:"anonymous",offset:p,offsetOrigin:Iu.BOTTOM_LEFT,rotation:y,scale:E,size:f,src:r});a.imageStyle=S}else a.imageStyle=a_}},LabelStyle:function(t,e){var i=_u({},T_,t,e);if(i){var r=e[e.length-1],n=new Rr({fill:new mr({color:"color"in i?i.color:Df}),scale:i.scale});r.textStyle=n}},LineStyle:function(t,e){var i=_u({},C_,t,e);if(i){var r=e[e.length-1],n=new Er({color:"color"in i?i.color:Df,width:"width"in i?i.width:1});r.strokeStyle=n}},PolyStyle:function(t,e){var i=_u({},R_,t,e);if(i){var r=e[e.length-1],n=new mr({color:"color"in i?i.color:Df});r.fillStyle=n;var o=i.fill;void 0!==o&&(r.fill=o);var s=i.outline;void 0!==s&&(r.outline=s)}}});function V_(t,e){var i=_u({},B_,t,e);if(!i)return null;var r,n="fillStyle"in i?i.fillStyle:s_,o=i.fill;void 0===o||o||(n=null),"imageStyle"in i?i.imageStyle!=a_&&(r=i.imageStyle):r=h_;var s="textStyle"in i?i.textStyle:p_,a="strokeStyle"in i?i.strokeStyle:u_,h=i.outline;return void 0===h||h||(a=null),[new Au({fill:n,image:r,stroke:a,text:s,zIndex:void 0})]}function X_(t,e){var i,r,n,o=e.length,s=new Array(e.length),a=new Array(e.length),h=new Array(e.length);i=r=n=!1;for(var l=0;l<o;++l){var u=e[l];s[l]=u.get("extrude"),a[l]=u.get("tessellate"),h[l]=u.get("altitudeMode"),i=i||void 0!==s[l],r=r||void 0!==a[l],n=n||h[l]}i&&t.set("extrude",s),r&&t.set("tessellate",a),n&&t.set("altitudeMode",h)}var z_=du(Qf,{displayName:au(Ad),value:au(Ad)});var W_=du(Qf,{Data:function(t,e){var i=t.getAttribute("name");fu(z_,t,e);var r=e[e.length-1];null!==i?r[i]=r.value:null!==r.displayName&&(r[r.displayName]=r.value),delete r.value},SchemaData:function(t,e){fu(q_,t,e)}});function K_(t,e){fu(W_,t,e)}function H_(t,e){fu(r_,t,e)}var Z_=du(Qf,{Style:au(V_),key:au(Ad),styleUrl:au(v_)});var q_=du(Qf,{SimpleData:function(t,e){var i=t.getAttribute("name");if(null!==i){var r=Ad(t),n=e[e.length-1];n[i]=r}}});var J_=du(Qf,{altitudeMode:au(Ad),minAltitude:au(Pd),maxAltitude:au(Pd),north:au(Pd),south:au(Pd),east:au(Pd),west:au(Pd)});var Q_=du(Qf,{minLodPixels:au(Pd),maxLodPixels:au(Pd),minFadeExtent:au(Pd),maxFadeExtent:au(Pd)});var $_=du(Qf,{LinearRing:ou(I_)});var tg=du(Qf,{LinearRing:ou(I_)});function eg(t,e){for(var i=_r(e),r=[255*(4==i.length?i[3]:1),i[2],i[1],i[0]],n=0;n<4;++n){var o=Math.floor(r[n]).toString(16);r[n]=1==o.length?"0"+o:o}kd(t,r.join(""))}var ig=du(Qf,{Data:hu(function(t,e,i){t.setAttribute("name",e.name);var r={node:t},n=e.value;"object"==typeof n?(null!==n&&n.displayName&&yu(r,ig,pu,[n.displayName],i,["displayName"]),null!==n&&n.value&&yu(r,ig,pu,[n.value],i,["value"])):yu(r,ig,pu,[n],i,["value"])}),value:hu(function(t,e){kd(t,e)}),displayName:hu(function(t,e){!function(t,e){t.appendChild(Jl.createCDATASection(e))}(t,e)})});var rg=du(Qf,{Placemark:hu(Lg)}),ng=function(t,e,i){return $l(e[e.length-1].node.namespaceURI,"Placemark")};var og=uu("Data");var sg=du(Qf,["href"],du(Jf,["x","y","w","h"])),ag=du(Qf,{href:hu(kd)},du(Jf,{x:hu(Gd),y:hu(Gd),w:hu(Gd),h:hu(Gd)})),hg=function(t,e,i){return $l(Jf[0],"gx:"+i)};var lg=du(Qf,["scale","heading","Icon","hotSpot"]),ug=du(Qf,{Icon:hu(function(t,e,i){var r={node:t},n=i[i.length-1].node,o=sg[n.namespaceURI],s=cu(e,o);yu(r,ag,pu,s,i,o),s=cu(e,o=sg[Jf[0]]),yu(r,ag,hg,s,i,o)}),heading:hu(Gd),hotSpot:hu(function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)}),scale:hu(kg)});var pg=du(Qf,["color","scale"]),cg=du(Qf,{color:hu(eg),scale:hu(kg)});var dg=du(Qf,["color","width"]),fg=du(Qf,{color:hu(eg),width:hu(Gd)});var _g={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},gg=function(t,e,i){if(t)return $l(e[e.length-1].node.namespaceURI,_g[t.getType()])},yg=uu("Point"),vg=uu("LineString"),mg=uu("LinearRing"),xg=uu("Polygon"),Eg=du(Qf,{LineString:hu(bg),Point:hu(bg),Polygon:hu(Ng),GeometryCollection:hu(Sg)});function Sg(t,e,i){var r,n,o={node:t},s=e.getType();s==Nt.GEOMETRY_COLLECTION?(r=e.getGeometries(),n=gg):s==Nt.MULTI_POINT?(r=e.getPoints(),n=yg):s==Nt.MULTI_LINE_STRING?(r=e.getLineStrings(),n=vg):s==Nt.MULTI_POLYGON?(r=e.getPolygons(),n=xg):Y(!1,39),yu(o,Eg,n,r,i)}var Tg=du(Qf,{LinearRing:hu(bg)});function Cg(t,e,i){yu({node:t},Tg,mg,[e],i)}var Rg=du(Qf,{ExtendedData:hu(function(t,e,i){for(var r={node:t},n=e.names,o=e.values,s=n.length,a=0;a<s;a++)yu(r,ig,og,[{name:n[a],value:o[a]}],i)}),MultiGeometry:hu(Sg),LineString:hu(bg),LinearRing:hu(bg),Point:hu(bg),Polygon:hu(Ng),Style:hu(function(t,e,i){var r={node:t},n={},o=e.getFill(),s=e.getStroke(),a=e.getImage(),h=e.getText();a&&"function"==typeof a.getSrc&&(n.IconStyle=a);h&&(n.LabelStyle=h);s&&(n.LineStyle=s);o&&(n.PolyStyle=o);var l=i[i.length-1].node,u=jg[l.namespaceURI],p=cu(n,u);yu(r,Ug,pu,p,i,u)}),address:hu(kd),description:hu(kd),name:hu(kd),open:hu(Nd),phoneNumber:hu(kd),styleUrl:hu(kd),visibility:hu(Nd)}),wg=du(Qf,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Ig=uu("ExtendedData");function Lg(t,e,i){var r={node:t};e.getId()&&t.setAttribute("id",e.getId());var n=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var s=Object.keys(n||{}).sort().filter(function(t){return!o[t]});if(s.length>0){var a=cu(n,s);yu(r,Rg,Ig,[{names:s,values:a}],i)}var h=e.getStyleFunction();if(h){var l=h(e,0);if(l){var u=Array.isArray(l)?l[0]:l;this.writeStyles_&&(n.Style=u);var p=u.getText();p&&(n.name=p.getText())}}var c=i[i.length-1].node,d=wg[c.namespaceURI],f=cu(n,d);yu(r,Rg,pu,f,i,d);var _=i[0],g=e.getGeometry();g&&(g=cd(g,!0,_)),yu(r,Rg,gg,[g],i)}var Og=du(Qf,["extrude","tessellate","altitudeMode","coordinates"]),Pg=du(Qf,{extrude:hu(Nd),tessellate:hu(Nd),altitudeMode:hu(kd),coordinates:hu(function(t,e,i){var r,n=i[i.length-1],o=n.layout,s=n.stride;o==At.XY||o==At.XYM?r=2:o==At.XYZ||o==At.XYZM?r=3:Y(!1,34);var a=e.length,h="";if(a>0){h+=e[0];for(var l=1;l<r;++l)h+=","+e[l];for(var u=s;u<a;u+=s){h+=" "+e[u];for(var p=1;p<r;++p)h+=","+e[u+p]}}kd(t,h)})});function bg(t,e,i){var r=e.getFlatCoordinates(),n={node:t};n.layout=e.getLayout(),n.stride=e.getStride();var o=e.getProperties();o.coordinates=r;var s=i[i.length-1].node,a=Og[s.namespaceURI],h=cu(o,a);yu(n,Pg,pu,h,i,a)}var Mg=du(Qf,{outerBoundaryIs:hu(Cg),innerBoundaryIs:hu(Cg)}),Fg=uu("innerBoundaryIs"),Ag=uu("outerBoundaryIs");function Ng(t,e,i){var r=e.getLinearRings(),n=r.shift(),o={node:t};yu(o,Mg,Fg,r,i),yu(o,Mg,Ag,[n],i)}var Gg=du(Qf,{color:hu(eg)}),Dg=uu("color");function kg(t,e){Gd(t,Math.round(1e6*e)/1e6)}var jg=du(Qf,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Ug=du(Qf,{IconStyle:hu(function(t,e,i){var r={node:t},n={},o=e.getSrc(),s=e.getSize(),a=e.getImageSize(),h={href:o};if(s){h.w=s[0],h.h=s[1];var l=e.getAnchor(),u=e.getOrigin();if(u&&a&&0!==u[0]&&u[1]!==s[1]&&(h.x=u[0],h.y=a[1]-(u[1]+s[1])),l&&(l[0]!==s[0]/2||l[1]!==s[1]/2)){var p={x:l[0],xunits:Ru.PIXELS,y:s[1]-l[1],yunits:Ru.PIXELS};n.hotSpot=p}}n.Icon=h;var c=e.getScale();1!==c&&(n.scale=c);var d=e.getRotation();0!==d&&(n.heading=d);var f=i[i.length-1].node,_=lg[f.namespaceURI],g=cu(n,_);yu(r,ug,pu,g,i,_)}),LabelStyle:hu(function(t,e,i){var r={node:t},n={},o=e.getFill();o&&(n.color=o.getColor());var s=e.getScale();s&&1!==s&&(n.scale=s);var a=i[i.length-1].node,h=pg[a.namespaceURI],l=cu(n,h);yu(r,cg,pu,l,i,h)}),LineStyle:hu(function(t,e,i){var r={node:t},n={color:e.getColor(),width:e.getWidth()},o=i[i.length-1].node,s=dg[o.namespaceURI],a=cu(n,s);yu(r,fg,pu,a,i,s)}),PolyStyle:hu(function(t,e,i){yu({node:t},Gg,Dg,[e.getColor()],i)})});var Yg=f_,Bg=i(1),Vg=i.n(Bg),Xg=[1,0,0,1,0,0],zg=function(t,e,i,r,n){this.extent_,this.id_=n,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i,this.properties_=r};zg.prototype.get=function(t){return this.properties_[t]},zg.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===Nt.POINT?pt(this.flatCoordinates_):ct(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},zg.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=Tt(this.getExtent());this.flatInteriorPoints_=gi(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},zg.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=bc(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=yi(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},zg.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=or(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},zg.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,i=this.ends_,r=0,n=i.length;r<n;++r){var o=i[r],s=or(t,e,o,2,.5);K(this.flatMidpoints_,s),e=o}}return this.flatMidpoints_},zg.prototype.getId=function(){return this.id_},zg.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},zg.prototype.getGeometry=function(){return this},zg.prototype.getSimplifiedGeometry=function(t){return this},zg.prototype.getProperties=function(){return this.properties_},zg.prototype.getStride=function(){return 2},zg.prototype.getStyleFunction=function(){},zg.prototype.getType=function(){return this.type_},zg.prototype.transform=function(t,e){var i=(t=Ee(t)).getExtent(),r=t.getWorldExtent(),n=Rt(r)/Rt(i);Ye(Xg,r[0],r[3],n,-n,0,0,0),Gt(this.flatCoordinates_,0,this.flatCoordinates_.length,2,Xg,this.flatCoordinates_)},zg.prototype.getEnds=zg.prototype.getEndss=function(){return this.ends_},zg.prototype.getFlatCoordinates=zg.prototype.getOrientedFlatCoordinates;var Wg=zg;function Kg(t,e,i){if(3===t){var r={keys:[],values:[],features:[]},n=i.readVarint()+i.pos;i.readFields(Hg,r,n),r.length=r.features.length,r.length&&(e[r.name]=r)}}function Hg(t,e,i){if(15===t)e.version=i.readVarint();else if(1===t)e.name=i.readString();else if(5===t)e.extent=i.readVarint();else if(2===t)e.features.push(i.pos);else if(3===t)e.keys.push(i.readString());else if(4===t){for(var r=null,n=i.readVarint()+i.pos;i.pos<n;)r=1===(t=i.readVarint()>>3)?i.readString():2===t?i.readFloat():3===t?i.readDouble():4===t?i.readVarint64():5===t?i.readVarint():6===t?i.readSVarint():7===t?i.readBoolean():null;e.values.push(r)}}function Zg(t,e,i){if(1==t)e.id=i.readVarint();else if(2==t)for(var r=i.readVarint()+i.pos;i.pos<r;){var n=e.layer.keys[i.readVarint()],o=e.layer.values[i.readVarint()];e.properties[n]=o}else 3==t?e.type=i.readVarint():4==t&&(e.geometry=i.pos)}function qg(t,e,i){t.pos=e.features[i];var r=t.readVarint()+t.pos,n={layer:e,type:0,properties:{}};return t.readFields(Zg,n,r),n}var Jg=function(t){function e(e){t.call(this);var i=e||{};this.dataProjection=new ee({code:"",units:$t.TILE_PIXELS}),this.featureClass_=i.featureClass?i.featureClass:Wg,this.geometryName_=i.geometryName,this.layerName_=i.layerName?i.layerName:"layer",this.layers_=i.layers?i.layers:null,this.extent_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readRawGeometry_=function(t,e,i,r){t.pos=e.geometry;for(var n=t.readVarint()+t.pos,o=1,s=0,a=0,h=0,l=0,u=0;t.pos<n;){if(!s){var p=t.readVarint();o=7&p,s=p>>3}s--,1===o||2===o?(a+=t.readSVarint(),h+=t.readSVarint(),1===o&&l>u&&(r.push(l),u=l),i.push(a,h),l+=2):7===o?l>u&&(i.push(i[u],i[u+1]),l+=2):Y(!1,59)}l>u&&(r.push(l),u=l)},e.prototype.createFeature_=function(t,e,i){var r,n=e.type;if(0===n)return null;var o=e.id,s=e.properties;s[this.layerName_]=e.layer.name;var a=[],h=[];this.readRawGeometry_(t,e,a,h);var l=function(t,e){var i;1===t?i=1===e?Nt.POINT:Nt.MULTI_POINT:2===t?i=1===e?Nt.LINE_STRING:Nt.MULTI_LINE_STRING:3===t&&(i=Nt.POLYGON);return i}(n,h.length);if(this.featureClass_===Wg)r=new this.featureClass_(l,a,h,s,o);else{var u;if(l==Nt.POLYGON){for(var p=[],c=0,d=0,f=0,_=h.length;f<_;++f){var g=h[f];Si(a,c,g,2)||(p.push(h.slice(d,f)),d=f),c=g}u=p.length>1?new Mc(a,At.XY,p):new Ii(a,At.XY,h)}else u=l===Nt.POINT?new ci(a,At.XY):l===Nt.LINE_STRING?new hr(a,At.XY):l===Nt.POLYGON?new Ii(a,At.XY,h):l===Nt.MULTI_POINT?new Pc(a,At.XY):l===Nt.MULTI_LINE_STRING?new Oc(a,At.XY,h):null;r=new(0,this.featureClass_),this.geometryName_&&r.setGeometryName(this.geometryName_);var y=cd(u,!1,this.adaptOptions(i));r.setGeometry(y),r.setId(o),r.setProperties(s)}return r},e.prototype.getLastExtent=function(){return this.extent_},e.prototype.getType=function(){return Kl.ARRAY_BUFFER},e.prototype.readFeatures=function(t,e){var i=this.layers_,r=new Vg.a(t),n=r.readFields(Kg,{}),o=[];for(var s in n)if(!i||-1!=i.indexOf(s)){for(var a=n[s],h=0,l=a.length;h<l;++h){var u=qg(r,a,h);o.push(this.createFeature_(r,u))}this.extent_=a?[0,0,a.extent,a.extent]:null}return o},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(pd),Qg=[null],$g=du(Qg,{nd:function(t,e){e[e.length-1].ndrefs.push(t.getAttribute("ref"))},tag:ry}),ty=du(Qg,{node:function(t,e){var i=e[0],r=e[e.length-1],n=t.getAttribute("id"),o=[parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))];r.nodes[n]=o;var s=_u({tags:{}},iy,t,e);if(!d(s.tags)){var a=new ci(o);cd(a,!1,i);var h=new B(a);h.setId(n),h.setProperties(s.tags),r.features.push(h)}},way:function(t,e){var i=_u({id:t.getAttribute("id"),ndrefs:[],tags:{}},$g,t,e);e[e.length-1].ways.push(i)}}),ey=function(t){function e(){t.call(this),this.dataProjection=Ee("EPSG:4326")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeaturesFromNode=function(t,e){var i=this.getReadOptions(t,e);if("osm"==t.localName){for(var r=_u({nodes:{},ways:[],features:[]},ty,t,[i]),n=0;n<r.ways.length;n++){for(var o=r.ways[n],s=[],a=0,h=o.ndrefs.length;a<h;a++){K(s,r.nodes[o.ndrefs[a]])}var l=void 0;cd(l=o.ndrefs[0]==o.ndrefs[o.ndrefs.length-1]?new Ii(s,At.XY,[s.length]):new hr(s,At.XY),!1,i);var u=new B(l);u.setId(o.id),u.setProperties(o.tags),r.features.push(u)}if(r.features)return r.features}return[]},e}(Sd),iy=du(Qg,{tag:ry});function ry(t,e){e[e.length-1].tags[t.getAttribute("k")]=t.getAttribute("v")}var ny=ey;function oy(t,e,i,r,n,o){var s,a;void 0!==n?(s=n,a=void 0!==o?o:0):(s=[],a=0);for(var h=e;h<i;){var l=t[h++];s[a++]=t[h++],s[a++]=l;for(var u=2;u<r;++u)s[a++]=t[h++]}return s.length=a,s}function sy(t,e,i){var r,n=i||1e5,o=new Array(e);for(r=0;r<e;++r)o[r]=0;for(var s=0,a=t.length;s<a;)for(r=0;r<e;++r,++s){var h=t[s],l=h-o[r];o[r]=h,t[s]=l}return hy(t,n)}function ay(t,e,i){var r,n=i||1e5,o=new Array(e);for(r=0;r<e;++r)o[r]=0;for(var s=ly(t,n),a=0,h=s.length;a<h;)for(r=0;r<e;++r,++a)o[r]+=s[a],s[a]=o[r];return s}function hy(t,e){for(var i=e||1e5,r=0,n=t.length;r<n;++r)t[r]=Math.round(t[r]*i);return function(t){for(var e=0,i=t.length;e<i;++e){var r=t[e];t[e]=r<0?~(r<<1):r<<1}return function(t){for(var e="",i=0,r=t.length;i<r;++i)e+=uy(t[i]);return e}(t)}(t)}function ly(t,e){for(var i=e||1e5,r=function(t){for(var e=function(t){for(var e=[],i=0,r=0,n=0,o=t.length;n<o;++n){var s=t.charCodeAt(n)-63;i|=(31&s)<<r,s<32?(e.push(i),i=0,r=0):r+=5}return e}(t),i=0,r=e.length;i<r;++i){var n=e[i];e[i]=1&n?~(n>>1):n>>1}return e}(t),n=0,o=r.length;n<o;++n)r[n]/=i;return r}function uy(t){for(var e,i="";t>=32;)e=63+(32|31&t),i+=String.fromCharCode(e),t>>=5;return e=t+63,i+=String.fromCharCode(e)}var py=function(t){function e(e){t.call(this);var i=e||{};this.dataProjection=Ee("EPSG:4326"),this.factor_=i.factor?i.factor:1e5,this.geometryLayout_=i.geometryLayout?i.geometryLayout:At.XY}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeatureFromText=function(t,e){var i=this.readGeometryFromText(t,e);return new B(i)},e.prototype.readFeaturesFromText=function(t,e){return[this.readFeatureFromText(t,e)]},e.prototype.readGeometryFromText=function(t,e){var i=ze(this.geometryLayout_),r=ay(t,i,this.factor_);oy(r,0,r.length,i,r);var n=ri(r,0,r.length,i);return cd(new hr(n,this.geometryLayout_),!1,this.adaptOptions(e))},e.prototype.writeFeatureText=function(t,e){var i=t.getGeometry();return i?this.writeGeometryText(i,e):(Y(!1,40),"")},e.prototype.writeFeaturesText=function(t,e){return this.writeFeatureText(t[0],e)},e.prototype.writeGeometryText=function(t,e){var i=(t=cd(t,!0,this.adaptOptions(e))).getFlatCoordinates(),r=t.getStride();return oy(i,0,i.length,r,i),sy(i,r,this.factor_)},e}(Xf),cy={Point:function(t,e,i){var r=t.coordinates;e&&i&&yy(r,e,i);return new ci(r)},LineString:function(t,e){var i=dy(t.arcs,e);return new hr(i)},Polygon:function(t,e){for(var i=[],r=0,n=t.arcs.length;r<n;++r)i[r]=dy(t.arcs[r],e);return new Ii(i)},MultiPoint:function(t,e,i){var r=t.coordinates;if(e&&i)for(var n=0,o=r.length;n<o;++n)yy(r[n],e,i);return new Pc(r)},MultiLineString:function(t,e){for(var i=[],r=0,n=t.arcs.length;r<n;++r)i[r]=dy(t.arcs[r],e);return new Oc(i)},MultiPolygon:function(t,e){for(var i=[],r=0,n=t.arcs.length;r<n;++r){for(var o=t.arcs[r],s=[],a=0,h=o.length;a<h;++a)s[a]=dy(o[a],e);i[r]=s}return new Mc(i)}};function dy(t,e){for(var i,r,n=[],o=0,s=t.length;o<s;++o)i=t[o],o>0&&n.pop(),r=i>=0?e[i]:e[~i].slice().reverse(),n.push.apply(n,r);for(var a=0,h=n.length;a<h;++a)n[a]=n[a].slice();return n}function fy(t,e,i,r,n,o,s){for(var a=t.geometries,h=[],l=0,u=a.length;l<u;++l)h[l]=_y(a[l],e,i,r,n,o,s);return h}function _y(t,e,i,r,n,o,s){var a,h=t.type,l=cy[h];a="Point"===h||"MultiPoint"===h?l(t,i,r):l(t,e);var u=new B;u.setGeometry(cd(a,!1,s)),void 0!==t.id&&u.setId(t.id);var p=t.properties;return n&&(p||(p={}),p[n]=o),p&&u.setProperties(p),u}function gy(t,e,i){for(var r=0,n=0,o=0,s=t.length;o<s;++o){var a=t[o];r+=a[0],n+=a[1],a[0]=r,a[1]=n,yy(a,e,i)}}function yy(t,e,i){t[0]=t[0]*e[0]+i[0],t[1]=t[1]*e[1]+i[1]}var vy=function(t){function e(e){t.call(this);var i=e||{};this.layerName_=i.layerName,this.layers_=i.layers?i.layers:null,this.dataProjection=Ee(i.dataProjection?i.dataProjection:"EPSG:4326")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var i,r=t,n=null,o=null;r.transform&&(n=(i=r.transform).scale,o=i.translate);var s=r.arcs;i&&function(t,e,i){for(var r=0,n=t.length;r<n;++r)gy(t[r],e,i)}(s,n,o);var a,h=[],l=r.objects,u=this.layerName_;for(var p in l)this.layers_&&-1==this.layers_.indexOf(p)||("GeometryCollection"===l[p].type?(a=l[p],h.push.apply(h,fy(a,s,n,o,u,p,e))):(a=l[p],h.push(_y(a,s,n,o,u,p,e))));return h}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(fd),my=function(t){this.tagName_=t};my.prototype.getTagName=function(){return this.tagName_};var xy=my,Ey=function(t){function e(e,i){t.call(this,e),this.conditions=i,Y(this.conditions.length>=2,57)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xy),Sy=function(t){function e(e){t.call(this,"And",Array.prototype.slice.call(arguments))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ey),Ty=function(t){function e(e,i,r){t.call(this,"BBOX"),this.geometryName=e,this.extent=i,this.srsName=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xy),Cy=function(t){function e(e,i,r,n){t.call(this,e),this.geometryName=i||"the_geom",this.geometry=r,this.srsName=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xy),Ry=function(t){function e(e,i,r){t.call(this,"Contains",e,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Cy),wy=function(t){function e(e,i){t.call(this,e),this.propertyName=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xy),Iy=function(t){function e(e,i,r){t.call(this,"During",e),this.begin=i,this.end=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wy),Ly=function(t){function e(e,i,r,n){t.call(this,e,i),this.expression=r,this.matchCase=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wy),Oy=function(t){function e(e,i,r){t.call(this,"PropertyIsEqualTo",e,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),Py=function(t){function e(e,i){t.call(this,"PropertyIsGreaterThan",e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),by=function(t){function e(e,i){t.call(this,"PropertyIsGreaterThanOrEqualTo",e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),My=function(t){function e(e,i,r){t.call(this,"Intersects",e,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Cy),Fy=function(t){function e(e,i,r){t.call(this,"PropertyIsBetween",e),this.lowerBoundary=i,this.upperBoundary=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wy),Ay=function(t){function e(e,i,r,n,o,s){t.call(this,"PropertyIsLike",e),this.pattern=i,this.wildCard=void 0!==r?r:"*",this.singleChar=void 0!==n?n:".",this.escapeChar=void 0!==o?o:"!",this.matchCase=s}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wy),Ny=function(t){function e(e){t.call(this,"PropertyIsNull",e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(wy),Gy=function(t){function e(e,i){t.call(this,"PropertyIsLessThan",e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),Dy=function(t){function e(e,i){t.call(this,"PropertyIsLessThanOrEqualTo",e,i)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),ky=function(t){function e(e){t.call(this,"Not"),this.condition=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(xy),jy=function(t){function e(e,i,r){t.call(this,"PropertyIsNotEqualTo",e,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ly),Uy=function(t){function e(e){t.call(this,"Or",Array.prototype.slice.call(arguments))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ey),Yy=function(t){function e(e,i,r){t.call(this,"Within",e,i,r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Cy);function By(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Sy,e))}function Vy(t,e,i){return new Ty(t,e,i)}var Xy={"http://www.opengis.net/gml":{boundedBy:au(wd.prototype.readGeometryElement,"bounds")}},zy={"http://www.opengis.net/wfs":{totalInserted:au(Md),totalUpdated:au(Md),totalDeleted:au(Md)}},Wy={"http://www.opengis.net/wfs":{TransactionSummary:au(function(t,e){return _u({},zy,t,e)},"transactionSummary"),InsertResults:au(function(t,e){return _u([],nv,t,e)},"insertIds")}},Ky={"http://www.opengis.net/wfs":{PropertyName:hu(kd)}},Hy={"http://www.opengis.net/wfs":{Insert:hu(function(t,e,i){var r=i[i.length-1],n=r.featureType,o=r.featureNS,s=r.gmlVersion,a=$l(o,n);t.appendChild(a),2===s?Hd.prototype.writeFeatureElement(a,e,i):Bd.prototype.writeFeatureElement(a,e,i)}),Update:hu(function(t,e,i){var r=i[i.length-1];Y(void 0!==e.getId(),27);var n=r.featureType,o=r.featurePrefix,s=r.featureNS,a=sv(o,n),h=e.getGeometryName();t.setAttribute("typeName",a),t.setAttributeNS(qy,"xmlns:"+o,s);var l=e.getId();if(void 0!==l){for(var u=e.getKeys(),p=[],c=0,d=u.length;c<d;c++){var f=e.get(u[c]);if(void 0!==f){var _=u[c];f&&"function"==typeof f.getSimplifiedGeometry&&(_=h),p.push({name:_,value:f})}}yu({gmlVersion:r.gmlVersion,node:t,hasZ:r.hasZ,srsName:r.srsName},Hy,uu("Property"),p,i),ov(t,l,i)}}),Delete:hu(function(t,e,i){var r=i[i.length-1];Y(void 0!==e.getId(),26);var n=r.featureType,o=r.featurePrefix,s=r.featureNS,a=sv(o,n);t.setAttribute("typeName",a),t.setAttributeNS(qy,"xmlns:"+o,s);var h=e.getId();void 0!==h&&ov(t,h,i)}),Property:hu(function(t,e,i){var r=$l(Qy,"Name"),n=i[i.length-1].gmlVersion;if(t.appendChild(r),kd(r,e.name),void 0!==e.value&&null!==e.value){var o=$l(Qy,"Value");t.appendChild(o),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===n?Hd.prototype.writeGeometryElement(o,e.value,i):Bd.prototype.writeGeometryElement(o,e.value,i):kd(o,e.value)}}),Native:hu(function(t,e,i){e.vendorId&&t.setAttribute("vendorId",e.vendorId);void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore));void 0!==e.value&&kd(t,e.value)})}},Zy="feature",qy="http://www.w3.org/2000/xmlns/",Jy="http://www.opengis.net/ogc",Qy="http://www.opengis.net/wfs",$y="http://www.opengis.net/fes",tv={"1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},ev="1.1.0",iv=function(t){function e(e){t.call(this);var i=e||{};this.featureType_=i.featureType,this.featureNS_=i.featureNS,this.gmlFormat_=i.gmlFormat?i.gmlFormat:new Bd,this.schemaLocation_=i.schemaLocation?i.schemaLocation:tv[ev]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var i={node:t};u(i,{featureType:this.featureType_,featureNS:this.featureNS_}),u(i,this.getReadOptions(t,e||{}));var r=[i];this.gmlFormat_.FEATURE_COLLECTION_PARSERS[Td].featureMember=nu(wd.prototype.readFeaturesInternal);var n=_u([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,r,this.gmlFormat_);return n||(n=[]),n},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=iu(t);return this.readTransactionResponseFromDocument(e)}return eu(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=iu(t);return this.readFeatureCollectionMetadataFromDocument(e)}return eu(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},i=Fd(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=i,_u(e,Xy,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return _u({},Wy,t,[])},e.prototype.writeGetFeature=function(t){var e,i=$l(Qy,"GetFeature");if(i.setAttribute("service","WFS"),i.setAttribute("version","1.1.0"),t&&(t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&i.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&i.setAttribute("count",String(t.count)),void 0!==t.viewParams&&i.setAttribute("viewParams ",t.viewParams),e=t.filter,t.bbox)){Y(t.geometryName,12);var r=Vy(t.geometryName,t.bbox,t.srsName);e=e?By(e,r):r}i.setAttributeNS(Ql,"xsi:schemaLocation",this.schemaLocation_);var n={node:i};return u(n,{srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,geometryName:t.geometryName,filter:e,propertyNames:t.propertyNames?t.propertyNames:[]}),Y(Array.isArray(t.featureTypes),11),function(t,e,i){var r=i[i.length-1],n=u({},r);n.node=t,yu(n,av,uu("Query"),e,i)}(i,t.featureTypes,[n]),i},e.prototype.writeTransaction=function(t,e,i,r){var n,o,s=[],a=$l(Qy,"Transaction"),h=r.version?r.version:ev,l="1.0.0"===h?2:3;a.setAttribute("service","WFS"),a.setAttribute("version",h),r&&(n=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle));var p=tv[h];a.setAttributeNS(Ql,"xsi:schemaLocation",p);var c=r.featurePrefix?r.featurePrefix:Zy;return t&&(o=u({node:a},{featureNS:r.featureNS,featureType:r.featureType,featurePrefix:c,gmlVersion:l,hasZ:r.hasZ,srsName:r.srsName}),u(o,n),yu(o,Hy,uu("Insert"),t,s)),e&&(o=u({node:a},{featureNS:r.featureNS,featureType:r.featureType,featurePrefix:c,gmlVersion:l,hasZ:r.hasZ,srsName:r.srsName}),u(o,n),yu(o,Hy,uu("Update"),e,s)),i&&yu({node:a,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:c,gmlVersion:l,srsName:r.srsName},Hy,uu("Delete"),i,s),r.nativeElements&&yu({node:a,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:c,gmlVersion:l,srsName:r.srsName},Hy,uu("Native"),r.nativeElements,s),a},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var i=[{}];return this.gmlFormat_.readGeometryElement(e,i),Ee(i.pop().srsName)}return null},e}(Sd);var rv={"http://www.opengis.net/ogc":{FeatureId:nu(function(t,e){return t.getAttribute("fid")})}};var nv={"http://www.opengis.net/wfs":{Feature:function(t,e){fu(rv,t,e)}}};function ov(t,e,i){var r=$l(Jy,"Filter"),n=$l(Jy,"FeatureId");r.appendChild(n),n.setAttribute("fid",e),t.appendChild(r)}function sv(t,e){var i=(t=t||Zy)+":";return 0===e.indexOf(i)?e:i+e}var av={"http://www.opengis.net/wfs":{Query:hu(function(t,e,i){var r,n=i[i.length-1],o=n.featurePrefix,s=n.featureNS,a=n.propertyNames,h=n.srsName;r=o?sv(o,e):e;t.setAttribute("typeName",r),h&&t.setAttribute("srsName",h);s&&t.setAttributeNS(qy,"xmlns:"+o,s);var l=u({},n);l.node=t,yu(l,Ky,uu("PropertyName"),a,i);var p=n.filter;if(p){var c=$l(Jy,"Filter");t.appendChild(c),hv(c,p,i)}})},"http://www.opengis.net/ogc":{During:hu(function(t,e,i){var r=$l($y,"ValueReference");kd(r,e.propertyName),t.appendChild(r);var n=$l(Td,"TimePeriod");t.appendChild(n);var o=$l(Td,"begin");n.appendChild(o),fv(o,e.begin);var s=$l(Td,"end");n.appendChild(s),fv(s,e.end)}),And:hu(lv),Or:hu(lv),Not:hu(function(t,e,i){var r={node:t},n=e.condition;yu(r,av,uu(n.getTagName()),[n],i)}),BBOX:hu(function(t,e,i){i[i.length-1].srsName=e.srsName,cv(t,e.geometryName),Bd.prototype.writeGeometryElement(t,e.extent,i)}),Contains:hu(function(t,e,i){i[i.length-1].srsName=e.srsName,cv(t,e.geometryName),Bd.prototype.writeGeometryElement(t,e.geometry,i)}),Intersects:hu(function(t,e,i){i[i.length-1].srsName=e.srsName,cv(t,e.geometryName),Bd.prototype.writeGeometryElement(t,e.geometry,i)}),Within:hu(function(t,e,i){i[i.length-1].srsName=e.srsName,cv(t,e.geometryName),Bd.prototype.writeGeometryElement(t,e.geometry,i)}),PropertyIsEqualTo:hu(uv),PropertyIsNotEqualTo:hu(uv),PropertyIsLessThan:hu(uv),PropertyIsLessThanOrEqualTo:hu(uv),PropertyIsGreaterThan:hu(uv),PropertyIsGreaterThanOrEqualTo:hu(uv),PropertyIsNull:hu(function(t,e,i){cv(t,e.propertyName)}),PropertyIsBetween:hu(function(t,e,i){cv(t,e.propertyName);var r=$l(Jy,"LowerBoundary");t.appendChild(r),dv(r,""+e.lowerBoundary);var n=$l(Jy,"UpperBoundary");t.appendChild(n),dv(n,""+e.upperBoundary)}),PropertyIsLike:hu(function(t,e,i){t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString());cv(t,e.propertyName),dv(t,""+e.pattern)})}};function hv(t,e,i){yu({node:t},av,uu(e.getTagName()),[e],i)}function lv(t,e,i){for(var r={node:t},n=e.conditions,o=0,s=n.length;o<s;++o){var a=n[o];yu(r,av,uu(a.getTagName()),[a],i)}}function uv(t,e,i){void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),cv(t,e.propertyName),dv(t,""+e.expression)}function pv(t,e,i){var r=$l(Jy,t);kd(r,i),e.appendChild(r)}function cv(t,e){pv("PropertyName",t,e)}function dv(t,e){pv("Literal",t,e)}function fv(t,e){var i=$l(Td,"TimeInstant");t.appendChild(i);var r=$l(Td,"timePosition");i.appendChild(r),kd(r,e)}var _v=iv,gv={POINT:ci,LINESTRING:hr,POLYGON:Ii,MULTIPOINT:Pc,MULTILINESTRING:Oc,MULTIPOLYGON:Mc},yv="EMPTY",vv="Z",mv="M",xv=1,Ev=2,Sv=3,Tv=4,Cv=5,Rv=6,wv={};for(var Iv in Nt)wv[Iv]=Nt[Iv].toUpperCase();var Lv=function(t){this.wkt=t,this.index_=-1};Lv.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},Lv.prototype.isNumeric_=function(t,e){return t>="0"&&t<="9"||"."==t&&!(void 0!==e&&e)},Lv.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},Lv.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},Lv.prototype.nextToken=function(){var t,e=this.nextChar_(),i=this.index_,r=e;if("("==e)t=Ev;else if(","==e)t=Cv;else if(")"==e)t=Sv;else if(this.isNumeric_(e)||"-"==e)t=Tv,r=this.readNumber_();else if(this.isAlpha_(e))t=xv,r=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=Rv}return{position:i,value:r,type:t}},Lv.prototype.readNumber_=function(){var t,e=this.index_,i=!1,r=!1;do{"."==t?i=!0:"e"!=t&&"E"!=t||(r=!0),t=this.nextChar_()}while(this.isNumeric_(t,i)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},Lv.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()};var Ov=function(t){this.lexer_=t,this.token_,this.layout_=At.XY};function Pv(t){var e=t.getCoordinates();return 0===e.length?"":e.join(" ")}function bv(t){for(var e=t.getCoordinates(),i=[],r=0,n=e.length;r<n;++r)i.push(e[r].join(" "));return i.join(",")}function Mv(t){for(var e=[],i=t.getLinearRings(),r=0,n=i.length;r<n;++r)e.push("("+bv(i[r])+")");return e.join(",")}Ov.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},Ov.prototype.isTokenType=function(t){return this.token_.type==t},Ov.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},Ov.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},Ov.prototype.parseGeometryLayout_=function(){var t=At.XY,e=this.token_;if(this.isTokenType(xv)){var i=e.value;i===vv?t=At.XYZ:i===mv?t=At.XYM:"ZM"===i&&(t=At.XYZM),t!==At.XY&&this.consume_()}return t},Ov.prototype.parseGeometryCollectionText_=function(){if(this.match(Ev)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(Cv));if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parsePointText_=function(){if(this.match(Ev)){var t=this.parsePoint_();if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())},Ov.prototype.parseLineStringText_=function(){if(this.match(Ev)){var t=this.parsePointList_();if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parsePolygonText_=function(){if(this.match(Ev)){var t=this.parseLineStringTextList_();if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parseMultiPointText_=function(){var t;if(this.match(Ev)){if(t=this.token_.type==Ev?this.parsePointTextList_():this.parsePointList_(),this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parseMultiLineStringText_=function(){if(this.match(Ev)){var t=this.parseLineStringTextList_();if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parseMultiPolygonText_=function(){if(this.match(Ev)){var t=this.parsePolygonTextList_();if(this.match(Sv))return t}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())},Ov.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,i=0;i<e;++i){var r=this.token_;if(!this.match(Tv))break;t.push(r.value)}if(t.length==e)return t;throw new Error(this.formatErrorMessage_())},Ov.prototype.parsePointList_=function(){for(var t=[this.parsePoint_()];this.match(Cv);)t.push(this.parsePoint_());return t},Ov.prototype.parsePointTextList_=function(){for(var t=[this.parsePointText_()];this.match(Cv);)t.push(this.parsePointText_());return t},Ov.prototype.parseLineStringTextList_=function(){for(var t=[this.parseLineStringText_()];this.match(Cv);)t.push(this.parseLineStringText_());return t},Ov.prototype.parsePolygonTextList_=function(){for(var t=[this.parsePolygonText_()];this.match(Cv);)t.push(this.parsePolygonText_());return t},Ov.prototype.isEmptyGeometry_=function(){var t=this.isTokenType(xv)&&this.token_.value==yv;return t&&this.consume_(),t},Ov.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},Ov.prototype.parseGeometry_=function(){var t=this.token_;if(this.match(xv)){var e=t.value;if(this.layout_=this.parseGeometryLayout_(),"GEOMETRYCOLLECTION"==e){var i=this.parseGeometryCollectionText_();return new ld(i)}var r,n=gv[e];if(!n)throw new Error("Invalid geometry type: "+e);switch(e){case"POINT":r=this.parsePointText_();break;case"LINESTRING":r=this.parseLineStringText_();break;case"POLYGON":r=this.parsePolygonText_();break;case"MULTIPOINT":r=this.parseMultiPointText_();break;case"MULTILINESTRING":r=this.parseMultiLineStringText_();break;case"MULTIPOLYGON":r=this.parseMultiPolygonText_();break;default:throw new Error("Invalid geometry type: "+e)}return r||(r=n===gv.POINT?[NaN,NaN]:[]),new n(r,this.layout_)}throw new Error(this.formatErrorMessage_())};var Fv={Point:Pv,LineString:bv,Polygon:Mv,MultiPoint:function(t){for(var e=[],i=t.getPoints(),r=0,n=i.length;r<n;++r)e.push("("+Pv(i[r])+")");return e.join(",")},MultiLineString:function(t){for(var e=[],i=t.getLineStrings(),r=0,n=i.length;r<n;++r)e.push("("+bv(i[r])+")");return e.join(",")},MultiPolygon:function(t){for(var e=[],i=t.getPolygons(),r=0,n=i.length;r<n;++r)e.push("("+Mv(i[r])+")");return e.join(",")},GeometryCollection:function(t){for(var e=[],i=t.getGeometries(),r=0,n=i.length;r<n;++r)e.push(Av(i[r]));return e.join(",")}};function Av(t){var e=t.getType(),i=(0,Fv[e])(t);if(e=e.toUpperCase(),"function"==typeof t.getFlatCoordinates){var r=function(t){var e=t.getLayout(),i="";return e!==At.XYZ&&e!==At.XYZM||(i+=vv),e!==At.XYM&&e!==At.XYZM||(i+=mv),i}(t);r.length>0&&(e+=" "+r)}return 0===i.length?e+" "+yv:e+"("+i+")"}var Nv=function(t){function e(e){t.call(this);var i=e||{};this.splitCollection_=void 0!==i.splitCollection&&i.splitCollection}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.parse_=function(t){var e=new Lv(t);return new Ov(e).parse()},e.prototype.readFeatureFromText=function(t,e){var i=this.readGeometryFromText(t,e);if(i){var r=new B;return r.setGeometry(i),r}return null},e.prototype.readFeaturesFromText=function(t,e){for(var i=[],r=this.readGeometryFromText(t,e),n=[],o=0,s=(i=this.splitCollection_&&r.getType()==Nt.GEOMETRY_COLLECTION?r.getGeometriesArray():[r]).length;o<s;++o){var a=new B;a.setGeometry(i[o]),n.push(a)}return n},e.prototype.readGeometryFromText=function(t,e){var i=this.parse_(t);return i?cd(i,!1,e):null},e.prototype.writeFeatureText=function(t,e){var i=t.getGeometry();return i?this.writeGeometryText(i,e):""},e.prototype.writeFeaturesText=function(t,e){if(1==t.length)return this.writeFeatureText(t[0],e);for(var i=[],r=0,n=t.length;r<n;++r)i.push(t[r].getGeometry());var o=new ld(i);return this.writeGeometryText(o,e)},e.prototype.writeGeometryText=function(t,e){return Av(cd(t,!0,e))},e}(Xf),Gv="http://www.w3.org/1999/xlink";function Dv(t){return t.getAttributeNS(Gv,"href")}var kv=function(){};kv.prototype.read=function(t){if(t){if("string"==typeof t){var e=iu(t);return this.readFromDocument(e)}return eu(t)?this.readFromDocument(t):this.readFromNode(t)}return null},kv.prototype.readFromDocument=function(t){},kv.prototype.readFromNode=function(t){};var jv=kv,Uv=[null,"http://www.opengis.net/wms"],Yv=du(Uv,{Service:au(function(t,e){return _u({},Xv,t,e)}),Capability:au(function(t,e){return _u({},Bv,t,e)})}),Bv=du(Uv,{Request:au(function(t,e){return _u({},Qv,t,e)}),Exception:au(function(t,e){return _u([],Hv,t,e)}),Layer:au(function(t,e){return _u({},Zv,t,e)})}),Vv=function(t){function e(){t.call(this),this.version=void 0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var e=_u({version:this.version},Yv,t,[]);return e||null},e}(jv),Xv=du(Uv,{Name:au(Ad),Title:au(Ad),Abstract:au(Ad),KeywordList:au(hm),OnlineResource:au(Dv),ContactInformation:au(function(t,e){return _u({},zv,t,e)}),Fees:au(Ad),AccessConstraints:au(Ad),LayerLimit:au(Md),MaxWidth:au(Md),MaxHeight:au(Md)}),zv=du(Uv,{ContactPersonPrimary:au(function(t,e){return _u({},Wv,t,e)}),ContactPosition:au(Ad),ContactAddress:au(function(t,e){return _u({},Kv,t,e)}),ContactVoiceTelephone:au(Ad),ContactFacsimileTelephone:au(Ad),ContactElectronicMailAddress:au(Ad)}),Wv=du(Uv,{ContactPerson:au(Ad),ContactOrganization:au(Ad)}),Kv=du(Uv,{AddressType:au(Ad),Address:au(Ad),City:au(Ad),StateOrProvince:au(Ad),PostCode:au(Ad),Country:au(Ad)}),Hv=du(Uv,{Format:nu(Ad)}),Zv=du(Uv,{Name:au(Ad),Title:au(Ad),Abstract:au(Ad),KeywordList:au(hm),CRS:su(Ad),EX_GeographicBoundingBox:au(function(t,e){var i=_u({},Jv,t,e);if(!i)return;var r=i.westBoundLongitude,n=i.southBoundLatitude,o=i.eastBoundLongitude,s=i.northBoundLatitude;if(void 0===r||void 0===n||void 0===o||void 0===s)return;return[r,n,o,s]}),BoundingBox:su(function(t,e){var i=[bd(t.getAttribute("minx")),bd(t.getAttribute("miny")),bd(t.getAttribute("maxx")),bd(t.getAttribute("maxy"))],r=[bd(t.getAttribute("resx")),bd(t.getAttribute("resy"))];return{crs:t.getAttribute("CRS"),extent:i,res:r}}),Dimension:su(function(t,e){return{name:t.getAttribute("name"),units:t.getAttribute("units"),unitSymbol:t.getAttribute("unitSymbol"),default:t.getAttribute("default"),multipleValues:Ld(t.getAttribute("multipleValues")),nearestValue:Ld(t.getAttribute("nearestValue")),current:Ld(t.getAttribute("current")),values:Ad(t)}}),Attribution:au(function(t,e){return _u({},qv,t,e)}),AuthorityURL:su(function(t,e){var i=om(t,e);if(i)return i.name=t.getAttribute("name"),i;return}),Identifier:su(Ad),MetadataURL:su(function(t,e){var i=om(t,e);if(i)return i.type=t.getAttribute("type"),i;return}),DataURL:su(om),FeatureListURL:su(om),Style:su(function(t,e){return _u({},im,t,e)}),MinScaleDenominator:au(Pd),MaxScaleDenominator:au(Pd),Layer:su(function(t,e){var i=e[e.length-1],r=_u({},Zv,t,e);if(!r)return;var n=Ld(t.getAttribute("queryable"));void 0===n&&(n=i.queryable);r.queryable=void 0!==n&&n;var o=Fd(t.getAttribute("cascaded"));void 0===o&&(o=i.cascaded);r.cascaded=o;var s=Ld(t.getAttribute("opaque"));void 0===s&&(s=i.opaque);r.opaque=void 0!==s&&s;var a=Ld(t.getAttribute("noSubsets"));void 0===a&&(a=i.noSubsets);r.noSubsets=void 0!==a&&a;var h=bd(t.getAttribute("fixedWidth"));h||(h=i.fixedWidth);r.fixedWidth=h;var l=bd(t.getAttribute("fixedHeight"));l||(l=i.fixedHeight);r.fixedHeight=l,["Style","CRS","AuthorityURL"].forEach(function(t){if(t in i){var e=r[t]||[];r[t]=e.concat(i[t])}});return["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"].forEach(function(t){if(!(t in r)){var e=i[t];r[t]=e}}),r})}),qv=du(Uv,{Title:au(Ad),OnlineResource:au(Dv),LogoURL:au(am)}),Jv=du(Uv,{westBoundLongitude:au(Pd),eastBoundLongitude:au(Pd),southBoundLatitude:au(Pd),northBoundLatitude:au(Pd)}),Qv=du(Uv,{GetCapabilities:au(sm),GetMap:au(sm),GetFeatureInfo:au(sm)}),$v=du(Uv,{Format:su(Ad),DCPType:su(function(t,e){return _u({},tm,t,e)})}),tm=du(Uv,{HTTP:au(function(t,e){return _u({},em,t,e)})}),em=du(Uv,{Get:au(om),Post:au(om)}),im=du(Uv,{Name:au(Ad),Title:au(Ad),Abstract:au(Ad),LegendURL:su(am),StyleSheetURL:au(om),StyleURL:au(om)}),rm=du(Uv,{Format:au(Ad),OnlineResource:au(Dv)}),nm=du(Uv,{Keyword:nu(Ad)});function om(t,e){return _u({},rm,t,e)}function sm(t,e){return _u({},$v,t,e)}function am(t,e){var i=om(t,e);if(i){var r=[Fd(t.getAttribute("width")),Fd(t.getAttribute("height"))];return i.size=r,i}}function hm(t,e){return _u([],nm,t,e)}var lm=Vv,um=function(t){function e(e){t.call(this);var i=e||{};this.featureNS_="http://mapserver.gis.umn.edu/mapserver",this.gmlFormat_=new Hd,this.layers_=i.layers?i.layers:null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,e){t.setAttribute("namespaceURI",this.featureNS_);var i=t.localName,r=[];if(0===t.childNodes.length)return r;if("msGMLOutput"==i)for(var n=0,o=t.childNodes.length;n<o;n++){var s=t.childNodes[n];if(s.nodeType===Node.ELEMENT_NODE){var a=s,h=e[0],l=a.localName.replace("_layer","");if(!this.layers_||X(this.layers_,l)){var u=l+"_feature";h.featureType=u,h.featureNS=this.featureNS_;var p={};p[u]=nu(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var c=du([h.featureNS,null],p);a.setAttribute("namespaceURI",this.featureNS_);var d=_u([],c,a,e,this.gmlFormat_);d&&K(r,d)}}}if("FeatureCollection"==i){var f=_u([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);f&&(r=f)}return r},e.prototype.readFeaturesFromNode=function(t,e){var i={};return e&&u(i,this.getReadOptions(t,e)),this.readFeatures_(t,[i])},e}(Sd),pm=[null,"http://www.opengis.net/ows/1.1"],cm=du(pm,{ServiceIdentification:au(function(t,e){return _u({},Rm,t,e)}),ServiceProvider:au(function(t,e){return _u({},wm,t,e)}),OperationsMetadata:au(function(t,e){return _u({},Em,t,e)})}),dm=function(t){function e(){t.call(this)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},e.prototype.readFromNode=function(t){var e=_u({},cm,t,[]);return e||null},e}(jv),fm=du(pm,{DeliveryPoint:au(Ad),City:au(Ad),AdministrativeArea:au(Ad),PostalCode:au(Ad),Country:au(Ad),ElectronicMailAddress:au(Ad)}),_m=du(pm,{Value:su(function(t,e){return Ad(t)})}),gm=du(pm,{AllowedValues:au(function(t,e){return _u({},_m,t,e)})}),ym=du(pm,{Phone:au(function(t,e){return _u({},Sm,t,e)}),Address:au(function(t,e){return _u({},fm,t,e)})}),vm=du(pm,{HTTP:au(function(t,e){return _u({},mm,t,e)})}),mm=du(pm,{Get:su(function(t,e){var i=Dv(t);if(!i)return;return _u({href:i},Tm,t,e)}),Post:void 0}),xm=du(pm,{DCP:au(function(t,e){return _u({},vm,t,e)})}),Em=du(pm,{Operation:function(t,e){var i=t.getAttribute("name"),r=_u({},xm,t,e);if(!r)return;e[e.length-1][i]=r}}),Sm=du(pm,{Voice:au(Ad),Facsimile:au(Ad)}),Tm=du(pm,{Constraint:su(function(t,e){var i=t.getAttribute("name");if(!i)return;return _u({name:i},gm,t,e)})}),Cm=du(pm,{IndividualName:au(Ad),PositionName:au(Ad),ContactInfo:au(function(t,e){return _u({},ym,t,e)})}),Rm=du(pm,{Abstract:au(Ad),AccessConstraints:au(Ad),Fees:au(Ad),Title:au(Ad),ServiceTypeVersion:au(Ad),ServiceType:au(Ad)}),wm=du(pm,{ProviderName:au(Ad),ProviderSite:au(Dv),ServiceContact:au(function(t,e){return _u({},Cm,t,e)})});var Im=dm,Lm=[null,"http://www.opengis.net/wmts/1.0"],Om=[null,"http://www.opengis.net/ows/1.1"],Pm=du(Lm,{Contents:au(function(t,e){return _u({},Mm,t,e)})}),bm=function(t){function e(){t.call(this),this.owsParser_=new Im}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},e.prototype.readFromNode=function(t){var e=t.getAttribute("version").trim(),i=this.owsParser_.readFromNode(t);return i?(i.version=e,(i=_u(i,Pm,t,[]))||null):null},e}(jv),Mm=du(Lm,{Layer:su(function(t,e){return _u({},Fm,t,e)}),TileMatrixSet:su(function(t,e){return _u({},Um,t,e)})}),Fm=du(Lm,{Style:su(function(t,e){var i=_u({},Am,t,e);if(!i)return;var r="true"===t.getAttribute("isDefault");return i.isDefault=r,i}),Format:su(Ad),TileMatrixSetLink:su(function(t,e){return _u({},Nm,t,e)}),Dimension:su(function(t,e){return _u({},km,t,e)}),ResourceURL:su(function(t,e){var i=t.getAttribute("format"),r=t.getAttribute("template"),n=t.getAttribute("resourceType"),o={};i&&(o.format=i);r&&(o.template=r);n&&(o.resourceType=n);return o})},du(Om,{Title:au(Ad),Abstract:au(Ad),WGS84BoundingBox:au(function(t,e){var i=_u([],jm,t,e);if(2!=i.length)return;return tt(i)}),Identifier:au(Ad)})),Am=du(Lm,{LegendURL:su(function(t,e){var i={};return i.format=t.getAttribute("format"),i.href=Dv(t),i})},du(Om,{Title:au(Ad),Identifier:au(Ad)})),Nm=du(Lm,{TileMatrixSet:au(Ad),TileMatrixSetLimits:au(function(t,e){return _u([],Gm,t,e)})}),Gm=du(Lm,{TileMatrixLimits:nu(function(t,e){return _u({},Dm,t,e)})}),Dm=du(Lm,{TileMatrix:au(Ad),MinTileRow:au(Md),MaxTileRow:au(Md),MinTileCol:au(Md),MaxTileCol:au(Md)}),km=du(Lm,{Default:au(Ad),Value:su(Ad)},du(Om,{Identifier:au(Ad)})),jm=du(Om,{LowerCorner:nu(Bm),UpperCorner:nu(Bm)}),Um=du(Lm,{WellKnownScaleSet:au(Ad),TileMatrix:su(function(t,e){return _u({},Ym,t,e)})},du(Om,{SupportedCRS:au(Ad),Identifier:au(Ad)})),Ym=du(Lm,{TopLeftCorner:au(Bm),ScaleDenominator:au(Pd),TileWidth:au(Md),TileHeight:au(Md),MatrixWidth:au(Md),MatrixHeight:au(Md)},du(Om,{Identifier:au(Ad)}));function Bm(t,e){var i=Ad(t).split(/\s+/);if(i&&2==i.length){var r=+i[0],n=+i[1];if(!isNaN(r)&&!isNaN(n))return[r,n]}}var Vm=bm,Xm=function(){var t;return function(){if(!t){var e=document.body;e.webkitRequestFullscreen?t="webkitfullscreenchange":e.mozRequestFullScreen?t="mozfullscreenchange":e.msRequestFullscreen?t="MSFullscreenChange":e.requestFullscreen&&(t="fullscreenchange")}return t}}();function zm(){var t=document.body;return!!(t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function Wm(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function Km(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}var Hm=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),target:i.target}),this.cssClassName_=void 0!==i.className?i.className:"ol-full-screen";var r=void 0!==i.label?i.label:"⤢";this.labelNode_="string"==typeof r?document.createTextNode(r):r;var n=void 0!==i.labelActive?i.labelActive:"×";this.labelActiveNode_="string"==typeof n?document.createTextNode(n):n,this.button_=document.createElement("button");var o=i.tipLabel?i.tipLabel:"Toggle full-screen";this.setClassName_(this.button_,Wm()),this.button_.setAttribute("type","button"),this.button_.title=o,this.button_.appendChild(this.labelNode_),v(this.button_,M.CLICK,this.handleClick_,this);var s=this.cssClassName_+" "+fo+" "+go+" "+(zm()?"":_o),a=this.element;a.className=s,a.appendChild(this.button_),this.keys_=void 0!==i.keys&&i.keys,this.source_=i.source}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){if(zm()){var t,e=this.getMap();if(e)if(Wm())document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen();else t=this.source_?"string"==typeof this.source_?document.getElementById(this.source_):this.source_:e.getTargetElement(),this.keys_?function(t){t.mozRequestFullScreenWithKeys?t.mozRequestFullScreenWithKeys():t.webkitRequestFullscreen?t.webkitRequestFullscreen():Km(t)}(t):Km(t)}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();Wm()?(this.setClassName_(this.button_,!0),Qn(this.labelActiveNode_,this.labelNode_)):(this.setClassName_(this.button_,!1),Qn(this.labelNode_,this.labelActiveNode_)),t&&t.updateSize()},e.prototype.setClassName_=function(t,e){var i=this.cssClassName_+"-true",r=this.cssClassName_+"-false",n=e?i:r;t.classList.remove(i),t.classList.remove(r),t.classList.add(n)},e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&this.listenerKeys.push(v(document,Xm(),this.handleFullScreenChange_,this))},e}(uo),Zm="projection";function qm(t){var e=t.frameState;e?this.mapProjection_!=e.viewState.projection&&(this.mapProjection_=e.viewState.projection,this.transform_=null):this.mapProjection_=null}var Jm=function(t){function e(e){var i=e||{},r=document.createElement("div");r.className=void 0!==i.className?i.className:"ol-mouse-position",t.call(this,{element:r,render:i.render||qm,target:i.target}),v(this,G(Zm),this.handleProjectionChanged_,this),i.coordinateFormat&&this.setCoordinateFormat(i.coordinateFormat),i.projection&&this.setProjection(i.projection),this.undefinedHTML_=void 0!==i.undefinedHTML?i.undefinedHTML:"&#160;",this.renderOnMouseOut_=!!this.undefinedHTML_,this.renderedHTML_=r.innerHTML,this.mapProjection_=null,this.transform_=null,this.lastMouseMovePixel_=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get("coordinateFormat")},e.prototype.getProjection=function(){return this.get(Zm)},e.prototype.handleMouseMove=function(t){var e=this.getMap();this.lastMouseMovePixel_=e.getEventPixel(t),this.updateHTML_(this.lastMouseMovePixel_)},e.prototype.handleMouseOut=function(t){this.updateHTML_(null),this.lastMouseMovePixel_=null},e.prototype.setMap=function(e){if(t.prototype.setMap.call(this,e),e){var i=e.getViewport();this.listenerKeys.push(v(i,M.MOUSEMOVE,this.handleMouseMove,this),v(i,M.TOUCHSTART,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(v(i,M.MOUSEOUT,this.handleMouseOut,this),v(i,M.TOUCHEND,this.handleMouseOut,this))}},e.prototype.setCoordinateFormat=function(t){this.set("coordinateFormat",t)},e.prototype.setProjection=function(t){this.set(Zm,Ee(t))},e.prototype.updateHTML_=function(t){var e=this.undefinedHTML_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();this.transform_=i?Le(this.mapProjection_,i):me}var r=this.getMap().getCoordinateFromPixel(t);if(r){this.transform_(r,r);var n=this.getCoordinateFormat();e=n?n(r):r.toString()}}this.renderedHTML_&&e===this.renderedHTML_||(this.element.innerHTML=e,this.renderedHTML_=e)},e}(uo);function Qm(t){this.validateExtent_(),this.updateBox_()}var $m=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||Qm,target:i.target}),this.collapsed_=void 0===i.collapsed||i.collapsed,this.collapsible_=void 0===i.collapsible||i.collapsible,this.collapsible_||(this.collapsed_=!1);var r=void 0!==i.className?i.className:"ol-overviewmap",n=void 0!==i.tipLabel?i.tipLabel:"Overview map",o=void 0!==i.collapseLabel?i.collapseLabel:"«";"string"==typeof o?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=o):this.collapseLabel_=o;var s=void 0!==i.label?i.label:"»";"string"==typeof s?(this.label_=document.createElement("span"),this.label_.textContent=s):this.label_=s;var a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_,h=document.createElement("button");h.setAttribute("type","button"),h.title=n,h.appendChild(a),v(h,M.CLICK,this.handleClick_,this),this.ovmapDiv_=document.createElement("div"),this.ovmapDiv_.className="ol-overviewmap-map",this.ovmap_=new Ha({controls:new U,interactions:new U,view:i.view});var l=this.ovmap_;i.layers&&i.layers.forEach(function(t){l.addLayer(t)}.bind(this));var u=document.createElement("div");u.className="ol-overviewmap-box",u.style.boxSizing="border-box",this.boxOverlay_=new Ja({position:[0,0],positioning:Za.BOTTOM_LEFT,element:u}),this.ovmap_.addOverlay(this.boxOverlay_);var p=r+" "+fo+" "+go+(this.collapsed_&&this.collapsible_?" "+yo:"")+(this.collapsible_?"":" ol-uncollapsible"),c=this.element;c.className=p,c.appendChild(this.ovmapDiv_),c.appendChild(h);var d=this,f=this.boxOverlay_,_=this.boxOverlay_.getElement(),g=function(t){var e=function(t){return{clientX:t.clientX-_.offsetWidth/2,clientY:t.clientY+_.offsetHeight/2}}(t),i=l.getEventCoordinate(e);f.setPosition(i)},y=function(t){var e=l.getEventCoordinate(t);d.getMap().getView().setCenter(e),window.removeEventListener("mousemove",g),window.removeEventListener("mouseup",y)};_.addEventListener("mousedown",function(){window.addEventListener("mousemove",g),window.addEventListener("mouseup",y)})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setMap=function(e){var i=this.getMap();if(e!==i){if(i){var r=i.getView();r&&this.unbindView_(r),this.ovmap_.setTarget(null)}if(t.prototype.setMap.call(this,e),e){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(v(e,l,this.handleMapPropertyChange_,this)),0===this.ovmap_.getLayers().getLength()&&this.ovmap_.setLayerGroup(e.getLayerGroup());var n=e.getView();n&&(this.bindView_(n),n.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_()))}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===Ln.VIEW){var e=t.oldValue;e&&this.unbindView_(e);var i=this.getMap().getView();this.bindView_(i)}},e.prototype.bindView_=function(t){v(t,G(Bn),this.handleRotationChanged_,this)},e.prototype.unbindView_=function(t){x(t,G(Bn),this.handleRotationChanged_,this)},e.prototype.handleRotationChanged_=function(){this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var i=t.getSize(),r=t.getView().calculateExtent(i),n=e.getSize(),o=e.getView().calculateExtent(n),s=e.getPixelFromCoordinate(It(r)),a=e.getPixelFromCoordinate(St(r)),h=Math.abs(s[0]-a[0]),l=Math.abs(s[1]-a[1]),u=n[0],p=n[1];h<.1*u||l<.1*p||h>.75*u||l>.75*p?this.resetExtent_():ot(o,r)||this.recenter_()}},e.prototype.resetExtent_=function(){var t=this.getMap(),e=this.ovmap_,i=t.getSize(),r=t.getView().calculateExtent(i),n=e.getView(),o=Math.log(7.5)/Math.LN2;Mt(r,1/(.1*Math.pow(2,o/2))),n.fit(r)},e.prototype.recenter_=function(){var t=this.getMap(),e=this.ovmap_,i=t.getView();e.getView().setCenter(i.getCenter())},e.prototype.updateBox_=function(){var t=this.getMap(),e=this.ovmap_;if(t.isRendered()&&e.isRendered()){var i=t.getSize(),r=t.getView(),n=e.getView(),o=r.getRotation(),s=this.boxOverlay_,a=this.boxOverlay_.getElement(),h=r.calculateExtent(i),l=n.getResolution(),u=Et(h),p=Lt(h),c=this.calculateCoordinateRotate_(o,u);s.setPosition(c),a&&(a.style.width=Math.abs((u[0]-p[0])/l)+"px",a.style.height=Math.abs((p[1]-u[1])/l)+"px")}},e.prototype.calculateCoordinateRotate_=function(t,e){var i,r=this.getMap().getView().getCenter();return r&&($i(i=[e[0]-r[0],e[1]-r[1]],t),Hi(i,r)),i},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(yo),this.collapsed_?Qn(this.collapseLabel_,this.label_):Qn(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;this.collapsed_||t.isRendered()||(t.updateSize(),this.resetExtent_(),m(t,Rn,function(t){this.updateBox_()},this))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getOverviewMap=function(){return this.ovmap_},e}(uo),tx="units",ex={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},ix=[1,2,5];function rx(t){var e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}var nx=function(t){function e(e){var i=e||{},r=void 0!==i.className?i.className:"ol-scale-line";t.call(this,{element:document.createElement("div"),render:i.render||rx,target:i.target}),this.innerElement_=document.createElement("div"),this.innerElement_.className=r+"-inner",this.element.className=r+" "+fo,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==i.minWidth?i.minWidth:64,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",v(this,G(tx),this.handleUnitsChanged_,this),this.setUnits(i.units||ex.METRIC)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getUnits=function(){return this.get(tx)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(tx,t)},e.prototype.updateElement_=function(){var t=this.viewState_;if(t){var e=t.center,i=t.projection,r=this.getUnits(),n=r==ex.DEGREES?$t.DEGREES:$t.METERS,o=Se(i,t.resolution,e,n);i.getUnits()!=$t.DEGREES&&i.getMetersPerUnit()&&n==$t.METERS&&(o*=i.getMetersPerUnit());var s=this.minWidth_*o,a="";if(r==ex.DEGREES){var h=Qt[$t.DEGREES];i.getUnits()==$t.DEGREES?s*=h:o/=h,s<h/60?(a="″",o*=3600):s<h?(a="′",o*=60):a="°"}else r==ex.IMPERIAL?s<.9144?(a="in",o/=.0254):s<1609.344?(a="ft",o/=.3048):(a="mi",o/=1609.344):r==ex.NAUTICAL?(o/=1852,a="nm"):r==ex.METRIC?s<.001?(a="μm",o*=1e6):s<1?(a="mm",o*=1e3):s<1e3?a="m":(a="km",o/=1e3):r==ex.US?s<.9144?(a="in",o*=39.37):s<1609.344?(a="ft",o/=.30480061):(a="mi",o/=1609.3472):Y(!1,33);for(var l,u,p=3*Math.floor(Math.log(this.minWidth_*o)/Math.log(10));;){if(l=ix[(p%3+3)%3]*Math.pow(10,Math.floor(p/3)),u=Math.round(l/o),isNaN(u))return this.element.style.display="none",void(this.renderedVisible_=!1);if(u>=this.minWidth_)break;++p}var c=l+" "+a;this.renderedHTML_!=c&&(this.innerElement_.innerHTML=c,this.renderedHTML_=c),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e}(uo),ox={VERTICAL:0,HORIZONTAL:1};function sx(t){if(t.frameState){this.sliderInitialized_||this.initSlider_();var e=t.frameState.viewState.resolution;e!==this.currentResolution_&&(this.currentResolution_=e,this.setThumbPosition_(e))}}var ax=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),render:i.render||sx}),this.dragListenerKeys_=[],this.currentResolution_=void 0,this.direction_=ox.VERTICAL,this.dragging_,this.heightLimit_=0,this.widthLimit_=0,this.previousX_,this.previousY_,this.thumbSize_=null,this.sliderInitialized_=!1,this.duration_=void 0!==i.duration?i.duration:200;var r=void 0!==i.className?i.className:"ol-zoomslider",n=document.createElement("button");n.setAttribute("type","button"),n.className=r+"-thumb "+fo;var o=this.element;o.className=r+" "+fo+" "+go,o.appendChild(n),this.dragger_=new Tn(o),v(this.dragger_,Gr.POINTERDOWN,this.handleDraggerStart_,this),v(this.dragger_,Gr.POINTERMOVE,this.handleDraggerDrag_,this),v(this.dragger_,Gr.POINTERUP,this.handleDraggerEnd_,this),v(o,M.CLICK,this.handleContainerClick_,this),v(n,M.CLICK,O)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.disposeInternal=function(){this.dragger_.dispose(),t.prototype.disposeInternal.call(this)},e.prototype.setMap=function(e){t.prototype.setMap.call(this,e),e&&e.render()},e.prototype.initSlider_=function(){var t=this.element,e=t.offsetWidth,i=t.offsetHeight,r=t.firstElementChild,n=getComputedStyle(r),o=r.offsetWidth+parseFloat(n.marginRight)+parseFloat(n.marginLeft),s=r.offsetHeight+parseFloat(n.marginTop)+parseFloat(n.marginBottom);this.thumbSize_=[o,s],e>i?(this.direction_=ox.HORIZONTAL,this.widthLimit_=e-o):(this.direction_=ox.VERTICAL,this.heightLimit_=i-s),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var e=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),r=this.getResolutionForPosition_(i);e.animate({resolution:e.constrainResolution(r),duration:this.duration_,easing:Xn})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.originalEvent.target===this.element.firstElementChild&&(this.getMap().getView().setHint(jn,1),this.previousX_=t.clientX,this.previousY_=t.clientY,this.dragging_=!0,0===this.dragListenerKeys_.length)){var e=this.handleDraggerDrag_,i=this.handleDraggerEnd_;this.dragListenerKeys_.push(v(document,M.MOUSEMOVE,e,this),v(document,Gr.POINTERMOVE,e,this),v(document,M.MOUSEUP,i,this),v(document,Gr.POINTERUP,i,this))}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var e=this.element.firstElementChild,i=t.clientX-this.previousX_+parseFloat(e.style.left),r=t.clientY-this.previousY_+parseFloat(e.style.top),n=this.getRelativePosition_(i,r);this.currentResolution_=this.getResolutionForPosition_(n),this.getMap().getView().setResolution(this.currentResolution_),this.setThumbPosition_(this.currentResolution_),this.previousX_=t.clientX,this.previousY_=t.clientY}},e.prototype.handleDraggerEnd_=function(t){if(this.dragging_){var e=this.getMap().getView();e.setHint(jn,-1),e.animate({resolution:e.constrainResolution(this.currentResolution_),duration:this.duration_,easing:Xn}),this.dragging_=!1,this.previousX_=void 0,this.previousY_=void 0,this.dragListenerKeys_.forEach(E),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var e=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==ox.HORIZONTAL?i.style.left=this.widthLimit_*e+"px":i.style.top=this.heightLimit_*e+"px"},e.prototype.getRelativePosition_=function(t,e){return kt(this.direction_===ox.HORIZONTAL?t/this.widthLimit_:e/this.heightLimit_,0,1)},e.prototype.getResolutionForPosition_=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},e.prototype.getPositionForResolution_=function(t){return 1-this.getMap().getView().getValueForResolutionFunction()(t)},e}(uo),hx=function(t){function e(e){var i=e||{};t.call(this,{element:document.createElement("div"),target:i.target}),this.extent=i.extent?i.extent:null;var r=void 0!==i.className?i.className:"ol-zoom-extent",n=void 0!==i.label?i.label:"E",o=void 0!==i.tipLabel?i.tipLabel:"Fit to extent",s=document.createElement("button");s.setAttribute("type","button"),s.title=o,s.appendChild("string"==typeof n?document.createTextNode(n):n),v(s,M.CLICK,this.handleClick_,this);var a=r+" "+fo+" "+go,h=this.element;h.className=a,h.appendChild(s)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap().getView(),e=this.extent?this.extent:t.getProjection().getExtent();t.fit(e)},e}(uo),lx={array:{},color:{},colorlike:{},control:{},coordinate:{},easing:{},events:{}};lx.events.condition={},lx.extent={},lx.featureloader={},lx.format={},lx.format.filter={},lx.geom={},lx.has={},lx.interaction={},lx.layer={},lx.loadingstrategy={},lx.proj={},lx.proj.Units={},lx.proj.proj4={},lx.render={},lx.render.canvas={},lx.renderer={},lx.renderer.canvas={},lx.renderer.webgl={},lx.size={},lx.source={},lx.sphere={},lx.style={},lx.style.IconImageCache={},lx.tilegrid={},lx.xml={},lx.Collection=U,lx.Feature=B,lx.Geolocation=zi,lx.Graticule=Or,lx.Kinetic=br,lx.Map=Ha,lx.Object=D,lx.Observable=F,lx.Observable.unByKey=function(t){if(Array.isArray(t))for(var e=0,i=t.length;e<i;++e)E(t[e]);else E(t)},lx.Overlay=Ja,lx.PluggableMap=lo,lx.View=qn,lx.WebGLMap=Wl,lx.array.stableSort=q,lx.color.asArray=_r,lx.color.asString=dr,lx.colorlike.asColorLike=Ys,lx.control.Attribution=So,lx.control.Attribution.render=Eo,lx.control.Control=uo,lx.control.FullScreen=Hm,lx.control.MousePosition=Jm,lx.control.MousePosition.render=qm,lx.control.OverviewMap=$m,lx.control.OverviewMap.render=Qm,lx.control.Rotate=Co,lx.control.Rotate.render=To,lx.control.ScaleLine=nx,lx.control.ScaleLine.render=rx,lx.control.Zoom=Ro,lx.control.ZoomSlider=ax,lx.control.ZoomSlider.render=sx,lx.control.ZoomToExtent=hx,lx.control.defaults=wo,lx.coordinate.add=Hi,lx.coordinate.createStringXY=function(t){return function(e){return nr(e,t)}},lx.coordinate.format=Ji,lx.coordinate.rotate=$i,lx.coordinate.toStringHDMS=function(t,e){return t?qi("NS",t[1],e)+" "+qi("EW",t[0],e):""},lx.coordinate.toStringXY=nr,lx.easing.easeIn=Vn,lx.easing.easeOut=Xn,lx.easing.inAndOut=zn,lx.easing.linear=Wn,lx.easing.upAndDown=function(t){return t<.5?zn(2*t):1-zn(2*(t-.5))},lx.events.condition.altKeyOnly=Go,lx.events.condition.altShiftKeysOnly=Do,lx.events.condition.always=jo,lx.events.condition.click=function(t){return t.type==Ar.CLICK},lx.events.condition.doubleClick=function(t){return t.type==Ar.DBLCLICK},lx.events.condition.focus=ko,lx.events.condition.mouseOnly=Ko,lx.events.condition.never=Yo,lx.events.condition.noModifierKeys=Xo,lx.events.condition.platformModifierKeyOnly=function(t){var e=t.originalEvent;return!e.altKey&&(Gi?e.metaKey:e.ctrlKey)&&!e.shiftKey},lx.events.condition.pointerMove=Bo,lx.events.condition.primaryAction=Ho,lx.events.condition.shiftKeyOnly=zo,lx.events.condition.singleClick=Vo,lx.events.condition.targetNotEditable=Wo,lx.extent.applyTransform=Ft,lx.extent.boundingExtent=tt,lx.extent.buffer=et,lx.extent.containsCoordinate=nt,lx.extent.containsExtent=ot,lx.extent.containsXY=st,lx.extent.createEmpty=ht,lx.extent.equals=dt,lx.extent.extend=ft,lx.extent.getArea=xt,lx.extent.getBottomLeft=Et,lx.extent.getBottomRight=St,lx.extent.getCenter=Tt,lx.extent.getHeight=Rt,lx.extent.getIntersection=wt,lx.extent.getSize=function(t){return[t[2]-t[0],t[3]-t[1]]},lx.extent.getTopLeft=It,lx.extent.getTopRight=Lt,lx.extent.getWidth=Ot,lx.extent.intersects=Pt,lx.extent.isEmpty=bt,lx.featureloader.xhr=Zl,lx.format.EsriJSON=Ed,lx.format.Feature=pd,lx.format.GML=Xd,lx.format.GML2=Hd,lx.format.GML3=Bd,lx.format.GML32=qd,lx.format.GPX=Mf,lx.format.GeoJSON=Nf,lx.format.IGC=qf,lx.format.KML=Yg,lx.format.MVT=Jg,lx.format.OSMXML=ny,lx.format.Polyline=py,lx.format.Polyline.decodeDeltas=ay,lx.format.Polyline.decodeFloats=ly,lx.format.Polyline.encodeDeltas=sy,lx.format.Polyline.encodeFloats=hy,lx.format.TopoJSON=vy,lx.format.WFS=_v,lx.format.WFS.writeFilter=function(t){var e=$l(Jy,"Filter");return hv(e,t,[]),e},lx.format.WKT=Nv,lx.format.WMSCapabilities=lm,lx.format.WMSGetFeatureInfo=um,lx.format.WMTSCapabilities=Vm,lx.format.filter.Bbox=Ty,lx.format.filter.Contains=Ry,lx.format.filter.During=Iy,lx.format.filter.EqualTo=Oy,lx.format.filter.GreaterThan=Py,lx.format.filter.GreaterThanOrEqualTo=by,lx.format.filter.Intersects=My,lx.format.filter.IsBetween=Fy,lx.format.filter.IsLike=Ay,lx.format.filter.IsNull=Ny,lx.format.filter.LessThan=Gy,lx.format.filter.LessThanOrEqualTo=Dy,lx.format.filter.Not=ky,lx.format.filter.NotEqualTo=jy,lx.format.filter.Or=Uy,lx.format.filter.Within=Yy,lx.format.filter.and=By,lx.format.filter.bbox=Vy,lx.format.filter.between=function(t,e,i){return new Fy(t,e,i)},lx.format.filter.contains=function(t,e,i){return new Ry(t,e,i)},lx.format.filter.during=function(t,e,i){return new Iy(t,e,i)},lx.format.filter.equalTo=function(t,e,i){return new Oy(t,e,i)},lx.format.filter.greaterThan=function(t,e){return new Py(t,e)},lx.format.filter.greaterThanOrEqualTo=function(t,e){return new by(t,e)},lx.format.filter.intersects=function(t,e,i){return new My(t,e,i)},lx.format.filter.isNull=function(t){return new Ny(t)},lx.format.filter.lessThan=function(t,e){return new Gy(t,e)},lx.format.filter.lessThanOrEqualTo=function(t,e){return new Dy(t,e)},lx.format.filter.like=function(t,e,i,r,n,o){return new Ay(t,e,i,r,n,o)},lx.format.filter.not=function(t){return new ky(t)},lx.format.filter.notEqualTo=function(t,e,i){return new jy(t,e,i)},lx.format.filter.or=function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Uy,e))},lx.format.filter.within=function(t,e,i){return new Yy(t,e,i)},lx.geom.Circle=Lc,lx.geom.Geometry=Xe,lx.geom.GeometryCollection=ld,lx.geom.LineString=hr,lx.geom.LinearRing=pi,lx.geom.MultiLineString=Oc,lx.geom.MultiPoint=Pc,lx.geom.MultiPolygon=Mc,lx.geom.Point=ci,lx.geom.Polygon=Ii,lx.geom.Polygon.circular=Li,lx.geom.Polygon.fromCircle=Pi,lx.geom.Polygon.fromExtent=Oi,lx.geom.SimpleGeometry=We,lx.getUid=o,lx.has.DEVICE_PIXEL_RATIO=Di,lx.has.GEOLOCATION=ji,lx.has.TOUCH=Ui,lx.inherits=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},lx.interaction.DoubleClickZoom=No,lx.interaction.DragAndDrop=Rc,lx.interaction.DragBox=ns,lx.interaction.DragPan=Jo,lx.interaction.DragRotate=Qo,lx.interaction.DragRotateAndZoom=wc,lx.interaction.DragZoom=ss,lx.interaction.Draw=Dc,lx.interaction.Draw.createBox=function(){return function(t,e){var i=tt(t),r=[[Et(i),St(i),Lt(i),It(i),Et(i)]],n=e;return n?n.setCoordinates(r):n=new Ii(r),n}},lx.interaction.Draw.createRegularPolygon=function(t,e){return function(i,r){var n=i[0],o=i[1],s=Math.sqrt(er(n,o)),a=r||Pi(new Lc(n),t),h=e;if(!e){var l=o[0]-n[0],u=o[1]-n[1];h=Math.atan(u/l)-(l<0?Math.PI:0)}return bi(a,n,s,h),a}},lx.interaction.Extent=Bc,lx.interaction.Interaction=Fo,lx.interaction.KeyboardPan=ls,lx.interaction.KeyboardZoom=ps,lx.interaction.Modify=qc,lx.interaction.MouseWheelZoom=fs,lx.interaction.PinchRotate=_s,lx.interaction.PinchZoom=gs,lx.interaction.Pointer=qo,lx.interaction.Select=td,lx.interaction.Snap=id,lx.interaction.Translate=ad,lx.interaction.defaults=ys,lx.layer.Base=io,lx.layer.Group=oo,lx.layer.Heatmap=vc,lx.layer.Image=Pp,lx.layer.Tile=Ap,lx.layer.Vector=_c,lx.layer.VectorTile=xc,lx.loadingstrategy.all=ql,lx.loadingstrategy.bbox=function(t,e){return[t]},lx.loadingstrategy.tile=function(t){return function(e,i){var r=t.getZForResolution(i),n=t.getTileRangeForExtentAndZ(e,r),o=[],s=[r,0,0];for(s[1]=n.minX;s[1]<=n.maxX;++s[1])for(s[2]=n.minY;s[2]<=n.maxY;++s[2])o.push(t.getTileCoordExtent(s));return o}},lx.proj.Projection=ee,lx.proj.Units.METERS_PER_UNIT=Qt,lx.proj.addCoordinateTransforms=we,lx.proj.addEquivalentProjections=Te,lx.proj.addProjection=xe,lx.proj.equivalent=Ie,lx.proj.fromLonLat=function(t,e){return Pe(t,"EPSG:4326",void 0!==e?e:"EPSG:3857")},lx.proj.get=Ee,lx.proj.getPointResolution=Se,lx.proj.getTransform=Oe,lx.proj.proj4.register=function(t){var e,i,r=Object.keys(t.defs),n=r.length;for(e=0;e<n;++e){var o=r[e];if(!Ee(o)){var s=t.defs(o);xe(new ee({code:o,axisOrientation:s.axis,metersPerUnit:s.to_meter,units:s.units}))}}for(e=0;e<n;++e){var a=r[e],h=Ee(a);for(i=0;i<n;++i){var l=r[i],u=Ee(l);if(!ye(a,l))if(t.defs[a]===t.defs[l])Te([h,u]);else{var p=t(a,l);we(h,u,p.forward,p.inverse)}}}},lx.proj.toLonLat=function(t,e){var i=Pe(t,void 0!==e?e:"EPSG:3857","EPSG:4326"),r=i[0];return(r<-180||r>180)&&(i[0]=Xt(r+180,360)-180),i},lx.proj.transform=Pe,lx.proj.transformExtent=be,lx.render.VectorContext=Vs,lx.render.canvas.labelCache=Ps,lx.render.toContext=function(t,e){var i=t.canvas,r=e||{},n=r.pixelRatio||Di,o=r.size;o&&(i.width=o[0]*n,i.height=o[1]*n,i.style.width=o[0]+"px",i.style.height=o[1]+"px");var s=[0,0,i.width,i.height],a=je([1,0,0,1,0,0],n,n);return new Xs(t,n,s,a,0)},lx.renderer.canvas.ImageLayer=ra,lx.renderer.canvas.Map=Qs,lx.renderer.canvas.TileLayer=ha,lx.renderer.canvas.VectorLayer=Ba,lx.renderer.canvas.VectorTileLayer=Ka,lx.renderer.webgl.ImageLayer=_l,lx.renderer.webgl.Map=gl,lx.renderer.webgl.TileLayer=Vl,lx.renderer.webgl.VectorLayer=zl,lx.size.toSize=ho,lx.source.BingMaps=$u,lx.source.CartoDB=ep,lx.source.Cluster=op,lx.source.Image=cp,lx.source.ImageArcGISRest=_p,lx.source.ImageCanvas=gp,lx.source.ImageMapGuide=yp,lx.source.ImageStatic=vp,lx.source.ImageWMS=Rp,lx.source.OSM=Ip,lx.source.OSM.ATTRIBUTION=wp,lx.source.Raster=Bp,lx.source.Source=wl,lx.source.Stamen=Wp,lx.source.Tile=kl,lx.source.TileArcGISRest=Hp,lx.source.TileDebug=qp,lx.source.TileImage=Qu,lx.source.TileJSON=Jp,lx.source.TileWMS=$p,lx.source.UTFGrid=ec,lx.source.Vector=np,lx.source.VectorTile=sc,lx.source.WMTS=hc,lx.source.WMTS.optionsFromCapabilities=function(t,e){var i=H(t.Contents.Layer,function(t,i,r){return t.Identifier==e.layer});if(null===i)return null;var r,n=t.Contents.TileMatrixSet;(r=i.TileMatrixSetLink.length>1?J(i.TileMatrixSetLink,"projection"in e?function(t,i,r){var o=H(n,function(e){return e.Identifier==t.TileMatrixSet}).SupportedCRS,s=Ee(o.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Ee(o),a=Ee(e.projection);return s&&a?Ie(s,a):o==e.projection}:function(t,i,r){return t.TileMatrixSet==e.matrixSet}):0)<0&&(r=0);var o=i.TileMatrixSetLink[r].TileMatrixSet,s=i.TileMatrixSetLink[r].TileMatrixSetLimits,a=i.Format[0];"format"in e&&(a=e.format),(r=J(i.Style,function(t,i,r){return"style"in e?t.Title==e.style:t.isDefault}))<0&&(r=0);var h=i.Style[r].Identifier,l={};"Dimension"in i&&i.Dimension.forEach(function(t,e,i){var r=t.Identifier,n=t.Default;void 0===n&&(n=t.Value[0]),l[r]=n});var u,p=H(t.Contents.TileMatrixSet,function(t,e,i){return t.Identifier==o}),c=p.SupportedCRS;if(c&&(u=Ee(c.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"))||Ee(c)),"projection"in e){var d=Ee(e.projection);d&&(u&&!Ie(d,u)||(u=d))}var f,_,g=i.WGS84BoundingBox;if(void 0!==g){var y=Ee("EPSG:4326").getExtent();_=g[0]==y[0]&&g[2]==y[2],f=be(g,"EPSG:4326",u);var v=u.getExtent();v&&(ot(v,f)||(f=void 0))}var m=xu(p,f,s),x=[],E=e.requestEncoding;if(E=void 0!==E?E:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var S=t.OperationsMetadata.GetTile.DCP.HTTP.Get,T=0,C=S.length;T<C;++T)if(S[T].Constraint){var R=H(S[T].Constraint,function(t){return"GetEncoding"==t.name}).AllowedValues.Value;if(""===E&&(E=R[0]),E!==ac.KVP)break;X(R,ac.KVP)&&x.push(S[T].href)}else S[T].href&&(E=ac.KVP,x.push(S[T].href));return 0===x.length&&(E=ac.REST,i.ResourceURL.forEach(function(t){"tile"===t.resourceType&&(a=t.format,x.push(t.template))})),{urls:x,layer:e.layer,matrixSet:o,format:a,projection:u,requestEncoding:E,tileGrid:m,style:h,dimensions:l,wrapX:_,crossOrigin:e.crossOrigin}},lx.source.XYZ=tp,lx.source.Zoomify=cc,lx.sphere.getArea=function t(e,i){var r=i||{},n=r.radius||Wt,o=r.projection||"EPSG:3857",s=e.getType();s!==Nt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var a,h,l,u,p,c,d=0;switch(s){case Nt.POINT:case Nt.MULTI_POINT:case Nt.LINE_STRING:case Nt.MULTI_LINE_STRING:case Nt.LINEAR_RING:break;case Nt.POLYGON:for(a=e.getCoordinates(),d=Math.abs(Zt(a[0],n)),l=1,u=a.length;l<u;++l)d-=Math.abs(Zt(a[l],n));break;case Nt.MULTI_POLYGON:for(l=0,u=(a=e.getCoordinates()).length;l<u;++l)for(h=a[l],d+=Math.abs(Zt(h[0],n)),p=1,c=h.length;p<c;++p)d-=Math.abs(Zt(h[p],n));break;case Nt.GEOMETRY_COLLECTION:var f=e.getGeometries();for(l=0,u=f.length;l<u;++l)d+=t(f[l],i);break;default:throw new Error("Unsupported geometry type: "+s)}return d},lx.sphere.getDistance=Kt,lx.sphere.getLength=function t(e,i){var r=i||{},n=r.radius||Wt,o=r.projection||"EPSG:3857",s=e.getType();s!==Nt.GEOMETRY_COLLECTION&&(e=e.clone().transform(o,"EPSG:4326"));var a,h,l,u,p,c,d=0;switch(s){case Nt.POINT:case Nt.MULTI_POINT:break;case Nt.LINE_STRING:case Nt.LINEAR_RING:d=Ht(a=e.getCoordinates(),n);break;case Nt.MULTI_LINE_STRING:case Nt.POLYGON:for(l=0,u=(a=e.getCoordinates()).length;l<u;++l)d+=Ht(a[l],n);break;case Nt.MULTI_POLYGON:for(l=0,u=(a=e.getCoordinates()).length;l<u;++l)for(p=0,c=(h=a[l]).length;p<c;++p)d+=Ht(h[p],n);break;case Nt.GEOMETRY_COLLECTION:var f=e.getGeometries();for(l=0,u=f.length;l<u;++l)d+=t(f[l],i);break;default:throw new Error("Unsupported geometry type: "+s)}return d},lx.style.AtlasManager=ol,lx.style.Circle=Cu,lx.style.Fill=mr,lx.style.Icon=Lu,lx.style.IconImageCache.shared=Ks,lx.style.Image=Su,lx.style.RegularShape=Tu,lx.style.Stroke=Er,lx.style.Style=Au,lx.style.Text=Rr,lx.tilegrid.TileGrid=Ol,lx.tilegrid.WMTS=mu,lx.tilegrid.WMTS.createFromCapabilitiesMatrixSet=xu,lx.tilegrid.createXYZ=Ml,lx.xml.getAllTextContent=tu,lx.xml.parse=iu;e.default=lx}]).default});
+//# sourceMappingURL=ol.js.map
\ No newline at end of file
diff --git a/VIPSWeb/static/js/3rdparty/ol.js.map b/VIPSWeb/static/js/3rdparty/ol.js.map
new file mode 100644
index 00000000..53117120
--- /dev/null
+++ b/VIPSWeb/static/js/3rdparty/ol.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack://ol/webpack/universalModuleDefinition","webpack://ol/webpack/bootstrap","webpack://ol/./node_modules/rbush/index.js","webpack://ol/./node_modules/pbf/index.js","webpack://ol/./node_modules/pixelworks/lib/index.js","webpack://ol/./node_modules/quickselect/quickselect.js","webpack://ol/./node_modules/ieee754/index.js","webpack://ol/./node_modules/pixelworks/lib/processor.js","webpack://ol/./node_modules/pixelworks/lib/util.js","webpack://ol/./build/ol/util.js","webpack://ol/./build/ol/AssertionError.js","webpack://ol/./build/ol/CollectionEventType.js","webpack://ol/./build/ol/ObjectEventType.js","webpack://ol/./build/ol/obj.js","webpack://ol/./build/ol/events.js","webpack://ol/./build/ol/Disposable.js","webpack://ol/./build/ol/functions.js","webpack://ol/./build/ol/events/Event.js","webpack://ol/./build/ol/events/Target.js","webpack://ol/./build/ol/events/EventType.js","webpack://ol/./build/ol/Observable.js","webpack://ol/./build/ol/Object.js","webpack://ol/./build/ol/Collection.js","webpack://ol/./build/ol/asserts.js","webpack://ol/./build/ol/Feature.js","webpack://ol/./build/ol/array.js","webpack://ol/./build/ol/extent/Corner.js","webpack://ol/./build/ol/extent/Relationship.js","webpack://ol/./build/ol/extent.js","webpack://ol/./build/ol/geom/GeometryLayout.js","webpack://ol/./build/ol/geom/GeometryType.js","webpack://ol/./build/ol/geom/flat/transform.js","webpack://ol/./build/ol/math.js","webpack://ol/./build/ol/sphere.js","webpack://ol/./build/ol/proj/Units.js","webpack://ol/./build/ol/proj/Projection.js","webpack://ol/./build/ol/proj/epsg3857.js","webpack://ol/./build/ol/proj/epsg4326.js","webpack://ol/./build/ol/proj/projections.js","webpack://ol/./build/ol/proj/transforms.js","webpack://ol/./build/ol/proj.js","webpack://ol/./build/ol/transform.js","webpack://ol/./build/ol/geom/Geometry.js","webpack://ol/./build/ol/geom/SimpleGeometry.js","webpack://ol/./build/ol/geom/flat/area.js","webpack://ol/./build/ol/geom/flat/closest.js","webpack://ol/./build/ol/geom/flat/deflate.js","webpack://ol/./build/ol/geom/flat/inflate.js","webpack://ol/./build/ol/geom/flat/simplify.js","webpack://ol/./build/ol/geom/LinearRing.js","webpack://ol/./build/ol/geom/Point.js","webpack://ol/./build/ol/geom/flat/contains.js","webpack://ol/./build/ol/geom/flat/interiorpoint.js","webpack://ol/./build/ol/geom/flat/segments.js","webpack://ol/./build/ol/geom/flat/intersectsextent.js","webpack://ol/./build/ol/geom/flat/reverse.js","webpack://ol/./build/ol/geom/flat/orient.js","webpack://ol/./build/ol/geom/Polygon.js","webpack://ol/./build/ol/has.js","webpack://ol/./build/ol/Geolocation.js","webpack://ol/./build/ol/string.js","webpack://ol/./build/ol/coordinate.js","webpack://ol/./build/ol/geom/flat/interpolate.js","webpack://ol/./build/ol/geom/flat/length.js","webpack://ol/./build/ol/geom/LineString.js","webpack://ol/./build/ol/geom/flat/geodesic.js","webpack://ol/./build/ol/render/EventType.js","webpack://ol/./build/ol/color.js","webpack://ol/./build/ol/style/Fill.js","webpack://ol/./build/ol/style/Stroke.js","webpack://ol/./build/ol/style/TextPlacement.js","webpack://ol/./build/ol/style/Text.js","webpack://ol/./build/ol/Graticule.js","webpack://ol/./build/ol/Kinetic.js","webpack://ol/./build/ol/MapEvent.js","webpack://ol/./build/ol/MapBrowserEvent.js","webpack://ol/./build/ol/MapBrowserEventType.js","webpack://ol/./build/ol/MapBrowserPointerEvent.js","webpack://ol/./build/ol/pointer/EventType.js","webpack://ol/./build/ol/pointer/EventSource.js","webpack://ol/./build/ol/pointer/MouseSource.js","webpack://ol/./build/ol/pointer/MsSource.js","webpack://ol/./build/ol/pointer/NativeSource.js","webpack://ol/./build/ol/pointer/PointerEvent.js","webpack://ol/./build/ol/pointer/TouchSource.js","webpack://ol/./build/ol/pointer/PointerEventHandler.js","webpack://ol/./build/ol/MapBrowserEventHandler.js","webpack://ol/./build/ol/MapEventType.js","webpack://ol/./build/ol/MapProperty.js","webpack://ol/./build/ol/TileState.js","webpack://ol/./build/ol/structs/PriorityQueue.js","webpack://ol/./build/ol/TileQueue.js","webpack://ol/./build/ol/tilegrid/common.js","webpack://ol/./build/ol/centerconstraint.js","webpack://ol/./build/ol/rotationconstraint.js","webpack://ol/./build/ol/ViewHint.js","webpack://ol/./build/ol/ViewProperty.js","webpack://ol/./build/ol/easing.js","webpack://ol/./build/ol/View.js","webpack://ol/./build/ol/resolutionconstraint.js","webpack://ol/./build/ol/dom.js","webpack://ol/./build/ol/layer/Property.js","webpack://ol/./build/ol/layer/Base.js","webpack://ol/./build/ol/source/State.js","webpack://ol/./build/ol/layer/Group.js","webpack://ol/./build/ol/size.js","webpack://ol/./build/ol/PluggableMap.js","webpack://ol/./build/ol/control/Control.js","webpack://ol/./build/ol/css.js","webpack://ol/./build/ol/layer/Layer.js","webpack://ol/./build/ol/control/Attribution.js","webpack://ol/./build/ol/control/Rotate.js","webpack://ol/./build/ol/control/Zoom.js","webpack://ol/./build/ol/control/util.js","webpack://ol/./build/ol/interaction/Property.js","webpack://ol/./build/ol/interaction/Interaction.js","webpack://ol/./build/ol/interaction/DoubleClickZoom.js","webpack://ol/./build/ol/events/condition.js","webpack://ol/./build/ol/interaction/Pointer.js","webpack://ol/./build/ol/interaction/DragPan.js","webpack://ol/./build/ol/interaction/DragRotate.js","webpack://ol/./build/ol/render/Box.js","webpack://ol/./build/ol/interaction/DragBox.js","webpack://ol/./build/ol/interaction/DragZoom.js","webpack://ol/./build/ol/events/KeyCode.js","webpack://ol/./build/ol/interaction/KeyboardPan.js","webpack://ol/./build/ol/interaction/KeyboardZoom.js","webpack://ol/./build/ol/interaction/MouseWheelZoom.js","webpack://ol/./build/ol/interaction/PinchRotate.js","webpack://ol/./build/ol/interaction/PinchZoom.js","webpack://ol/./build/ol/interaction.js","webpack://ol/./build/ol/reproj/common.js","webpack://ol/./build/ol/ImageBase.js","webpack://ol/./build/ol/ImageState.js","webpack://ol/./build/ol/ImageCanvas.js","webpack://ol/./build/ol/LayerType.js","webpack://ol/./build/ol/layer/VectorRenderType.js","webpack://ol/./build/ol/render/Event.js","webpack://ol/./build/ol/structs/LRUCache.js","webpack://ol/./build/ol/render/canvas.js","webpack://ol/./build/ol/colorlike.js","webpack://ol/./build/ol/render/VectorContext.js","webpack://ol/./build/ol/render/canvas/Immediate.js","webpack://ol/./build/ol/style/IconImageCache.js","webpack://ol/./build/ol/renderer/Map.js","webpack://ol/./build/ol/renderer/canvas/Map.js","webpack://ol/./build/ol/renderer/Layer.js","webpack://ol/./build/ol/renderer/canvas/Layer.js","webpack://ol/./build/ol/renderer/canvas/IntermediateCanvas.js","webpack://ol/./build/ol/renderer/canvas/ImageLayer.js","webpack://ol/./build/ol/TileRange.js","webpack://ol/./build/ol/renderer/canvas/TileLayer.js","webpack://ol/./build/ol/render/ReplayGroup.js","webpack://ol/./build/ol/render/ReplayType.js","webpack://ol/./build/ol/geom/flat/textpath.js","webpack://ol/./build/ol/render/canvas/Instruction.js","webpack://ol/./build/ol/render/replay.js","webpack://ol/./build/ol/render/canvas/Replay.js","webpack://ol/./build/ol/render/canvas/ImageReplay.js","webpack://ol/./build/ol/render/canvas/LineStringReplay.js","webpack://ol/./build/ol/render/canvas/PolygonReplay.js","webpack://ol/./build/ol/geom/flat/straightchunk.js","webpack://ol/./build/ol/render/canvas/TextReplay.js","webpack://ol/./build/ol/render/canvas/ReplayGroup.js","webpack://ol/./build/ol/renderer/vector.js","webpack://ol/./build/ol/renderer/canvas/VectorLayer.js","webpack://ol/./build/ol/layer/VectorTileRenderType.js","webpack://ol/./build/ol/renderer/canvas/VectorTileLayer.js","webpack://ol/./build/ol/Map.js","webpack://ol/./build/ol/OverlayPositioning.js","webpack://ol/./build/ol/Overlay.js","webpack://ol/./build/ol/webgl.js","webpack://ol/./build/ol/webgl/Shader.js","webpack://ol/./build/ol/webgl/Fragment.js","webpack://ol/./build/ol/webgl/Vertex.js","webpack://ol/./build/ol/render/webgl/circlereplay/defaultshader.js","webpack://ol/./build/ol/render/webgl/circlereplay/defaultshader/Locations.js","webpack://ol/./build/ol/vec/mat4.js","webpack://ol/./build/ol/render/webgl/Replay.js","webpack://ol/./build/ol/render/webgl.js","webpack://ol/./build/ol/webgl/Buffer.js","webpack://ol/./build/ol/render/webgl/CircleReplay.js","webpack://ol/./build/ol/render/webgl/texturereplay/defaultshader.js","webpack://ol/./build/ol/render/webgl/texturereplay/defaultshader/Locations.js","webpack://ol/./build/ol/webgl/ContextEventType.js","webpack://ol/./build/ol/webgl/Context.js","webpack://ol/./build/ol/render/webgl/TextureReplay.js","webpack://ol/./build/ol/render/webgl/ImageReplay.js","webpack://ol/./build/ol/geom/flat/topology.js","webpack://ol/./build/ol/render/webgl/linestringreplay/defaultshader.js","webpack://ol/./build/ol/render/webgl/linestringreplay/defaultshader/Locations.js","webpack://ol/./build/ol/render/webgl/LineStringReplay.js","webpack://ol/./build/ol/render/webgl/polygonreplay/defaultshader.js","webpack://ol/./build/ol/render/webgl/polygonreplay/defaultshader/Locations.js","webpack://ol/./build/ol/structs/LinkedList.js","webpack://ol/./build/ol/structs/RBush.js","webpack://ol/./build/ol/render/webgl/PolygonReplay.js","webpack://ol/./build/ol/style/Atlas.js","webpack://ol/./build/ol/style/AtlasManager.js","webpack://ol/./build/ol/render/webgl/ReplayGroup.js","webpack://ol/./build/ol/render/webgl/TextReplay.js","webpack://ol/./build/ol/render/webgl/Immediate.js","webpack://ol/./build/ol/renderer/webgl/defaultmapshader.js","webpack://ol/./build/ol/renderer/webgl/defaultmapshader/Locations.js","webpack://ol/./build/ol/renderer/webgl/Layer.js","webpack://ol/./build/ol/renderer/webgl/ImageLayer.js","webpack://ol/./build/ol/renderer/webgl/Map.js","webpack://ol/./build/ol/Tile.js","webpack://ol/./build/ol/ImageTile.js","webpack://ol/./build/ol/tilecoord.js","webpack://ol/./build/ol/TileCache.js","webpack://ol/./build/ol/source/Source.js","webpack://ol/./build/ol/tilegrid/TileGrid.js","webpack://ol/./build/ol/tilegrid.js","webpack://ol/./build/ol/source/Tile.js","webpack://ol/./build/ol/renderer/webgl/tilelayershader.js","webpack://ol/./build/ol/renderer/webgl/tilelayershader/Locations.js","webpack://ol/./build/ol/renderer/webgl/TileLayer.js","webpack://ol/./build/ol/renderer/webgl/VectorLayer.js","webpack://ol/./build/ol/WebGLMap.js","webpack://ol/./build/ol/format/FormatType.js","webpack://ol/./build/ol/featureloader.js","webpack://ol/./build/ol/loadingstrategy.js","webpack://ol/./build/ol/xml.js","webpack://ol/./build/ol/tilegrid/WMTS.js","webpack://ol/./build/ol/style/Image.js","webpack://ol/./build/ol/style/RegularShape.js","webpack://ol/./build/ol/style/Circle.js","webpack://ol/./build/ol/style/IconAnchorUnits.js","webpack://ol/./build/ol/style/IconImage.js","webpack://ol/./build/ol/style/IconOrigin.js","webpack://ol/./build/ol/style/Icon.js","webpack://ol/./build/ol/style/Style.js","webpack://ol/./build/ol/tileurlfunction.js","webpack://ol/./build/ol/net.js","webpack://ol/./build/ol/reproj.js","webpack://ol/./build/ol/reproj/Triangulation.js","webpack://ol/./build/ol/reproj/Tile.js","webpack://ol/./build/ol/source/TileEventType.js","webpack://ol/./build/ol/source/UrlTile.js","webpack://ol/./build/ol/source/TileImage.js","webpack://ol/./build/ol/source/BingMaps.js","webpack://ol/./build/ol/source/XYZ.js","webpack://ol/./build/ol/source/CartoDB.js","webpack://ol/./build/ol/source/VectorEventType.js","webpack://ol/./build/ol/source/Vector.js","webpack://ol/./build/ol/source/Cluster.js","webpack://ol/./build/ol/reproj/Image.js","webpack://ol/./build/ol/source/Image.js","webpack://ol/./build/ol/Image.js","webpack://ol/./build/ol/uri.js","webpack://ol/./build/ol/source/ImageArcGISRest.js","webpack://ol/./build/ol/source/ImageCanvas.js","webpack://ol/./build/ol/source/ImageMapGuide.js","webpack://ol/./build/ol/source/ImageStatic.js","webpack://ol/./build/ol/source/common.js","webpack://ol/./build/ol/source/WMSServerType.js","webpack://ol/./build/ol/source/ImageWMS.js","webpack://ol/./build/ol/source/OSM.js","webpack://ol/./build/ol/layer/Image.js","webpack://ol/./build/ol/layer/TileProperty.js","webpack://ol/./build/ol/layer/Tile.js","webpack://ol/./build/ol/source/Raster.js","webpack://ol/./build/ol/source/Stamen.js","webpack://ol/./build/ol/source/TileArcGISRest.js","webpack://ol/./build/ol/source/TileDebug.js","webpack://ol/./build/ol/source/TileJSON.js","webpack://ol/./build/ol/source/TileWMS.js","webpack://ol/./build/ol/source/UTFGrid.js","webpack://ol/./build/ol/VectorImageTile.js","webpack://ol/./build/ol/VectorTile.js","webpack://ol/./build/ol/source/VectorTile.js","webpack://ol/./build/ol/source/WMTSRequestEncoding.js","webpack://ol/./build/ol/source/WMTS.js","webpack://ol/./build/ol/source/Zoomify.js","webpack://ol/./build/ol/layer/Vector.js","webpack://ol/./build/ol/layer/Heatmap.js","webpack://ol/./build/ol/layer/VectorTile.js","webpack://ol/./build/ol/interaction/DragAndDrop.js","webpack://ol/./build/ol/interaction/DragRotateAndZoom.js","webpack://ol/./build/ol/geom/Circle.js","webpack://ol/./build/ol/geom/MultiLineString.js","webpack://ol/./build/ol/geom/MultiPoint.js","webpack://ol/./build/ol/geom/flat/center.js","webpack://ol/./build/ol/geom/MultiPolygon.js","webpack://ol/./build/ol/interaction/Draw.js","webpack://ol/./build/ol/interaction/Extent.js","webpack://ol/./build/ol/interaction/Modify.js","webpack://ol/./build/ol/interaction/Select.js","webpack://ol/./build/ol/interaction/Snap.js","webpack://ol/./build/ol/interaction/Translate.js","webpack://ol/./build/ol/geom/GeometryCollection.js","webpack://ol/./build/ol/format/Feature.js","webpack://ol/./build/ol/format/JSONFeature.js","webpack://ol/./build/ol/format/EsriJSON.js","webpack://ol/./build/ol/format/XMLFeature.js","webpack://ol/./build/ol/format/GMLBase.js","webpack://ol/./build/ol/format/xsd.js","webpack://ol/./build/ol/format/GML3.js","webpack://ol/./build/ol/format/GML.js","webpack://ol/./build/ol/format/GML2.js","webpack://ol/./build/ol/format/GML32.js","webpack://ol/./build/ol/format/GPX.js","webpack://ol/./build/ol/format/GeoJSON.js","webpack://ol/./build/ol/format/TextFeature.js","webpack://ol/./build/ol/format/KML.js","webpack://ol/./build/ol/format/IGC.js","webpack://ol/./build/ol/render/Feature.js","webpack://ol/./build/ol/format/MVT.js","webpack://ol/./build/ol/format/OSMXML.js","webpack://ol/./build/ol/geom/flat/flip.js","webpack://ol/./build/ol/format/Polyline.js","webpack://ol/./build/ol/format/TopoJSON.js","webpack://ol/./build/ol/format/filter/Filter.js","webpack://ol/./build/ol/format/filter/LogicalNary.js","webpack://ol/./build/ol/format/filter/And.js","webpack://ol/./build/ol/format/filter/Bbox.js","webpack://ol/./build/ol/format/filter/Spatial.js","webpack://ol/./build/ol/format/filter/Contains.js","webpack://ol/./build/ol/format/filter/Comparison.js","webpack://ol/./build/ol/format/filter/During.js","webpack://ol/./build/ol/format/filter/ComparisonBinary.js","webpack://ol/./build/ol/format/filter/EqualTo.js","webpack://ol/./build/ol/format/filter/GreaterThan.js","webpack://ol/./build/ol/format/filter/GreaterThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Intersects.js","webpack://ol/./build/ol/format/filter/IsBetween.js","webpack://ol/./build/ol/format/filter/IsLike.js","webpack://ol/./build/ol/format/filter/IsNull.js","webpack://ol/./build/ol/format/filter/LessThan.js","webpack://ol/./build/ol/format/filter/LessThanOrEqualTo.js","webpack://ol/./build/ol/format/filter/Not.js","webpack://ol/./build/ol/format/filter/NotEqualTo.js","webpack://ol/./build/ol/format/filter/Or.js","webpack://ol/./build/ol/format/filter/Within.js","webpack://ol/./build/ol/format/filter.js","webpack://ol/./build/ol/format/WFS.js","webpack://ol/./build/ol/format/WKT.js","webpack://ol/./build/ol/format/XLink.js","webpack://ol/./build/ol/format/XML.js","webpack://ol/./build/ol/format/WMSCapabilities.js","webpack://ol/./build/ol/format/WMSGetFeatureInfo.js","webpack://ol/./build/ol/format/OWS.js","webpack://ol/./build/ol/format/WMTSCapabilities.js","webpack://ol/./build/ol/control/FullScreen.js","webpack://ol/./build/ol/control/MousePosition.js","webpack://ol/./build/ol/control/OverviewMap.js","webpack://ol/./build/ol/control/ScaleLine.js","webpack://ol/./build/ol/control/ZoomSlider.js","webpack://ol/./build/ol/control/ZoomToExtent.js","webpack://ol/./build/index.js","webpack://ol/./build/ol/proj/proj4.js","webpack://ol/./build/ol/render.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","rbush","default","quickselect","maxEntries","format","this","_maxEntries","Math","max","_minEntries","ceil","_initFormat","clear","findItem","item","items","equalsFn","indexOf","length","calcBBox","node","toBBox","distBBox","children","k","destNode","createNode","minX","Infinity","minY","maxX","maxY","child","extend","leaf","a","b","min","compareNodeMinX","compareNodeMinY","bboxArea","bboxMargin","enlargedArea","intersectionArea","contains","intersects","height","multiSelect","arr","left","right","compare","mid","stack","pop","push","all","_all","data","search","bbox","result","len","childBBox","nodesToSearch","collides","load","insert","_build","slice","_splitRoot","tmpNode","_insert","remove","parent","index","goingUp","path","indexes","splice","_condense","compareMinX","compareMinY","toJSON","fromJSON","apply","N","M","log","pow","j","right2","right3","N2","N1","sqrt","_chooseSubtree","level","targetNode","area","enlargement","minArea","minEnlargement","isNode","insertPath","_split","_adjustParentBBoxes","_chooseSplitAxis","splitIndex","_chooseSplitIndex","newNode","bbox1","bbox2","overlap","minOverlap","_allDistMargin","sort","leftBBox","rightBBox","margin","siblings","compareArr","Function","join","Pbf","ieee754","buf","ArrayBuffer","isView","Uint8Array","pos","type","Varint","Fixed64","Bytes","Fixed32","readPackedEnd","pbf","readVarint","toNum","low","high","isSigned","makeRoomForExtraLength","startPos","extraLen","LN2","realloc","writePackedVarint","writeVarint","writePackedSVarint","writeSVarint","writePackedFloat","writeFloat","writePackedDouble","writeDouble","writePackedBoolean","writeBoolean","writePackedFixed32","writeFixed32","writePackedSFixed32","writeSFixed32","writePackedFixed64","writeFixed64","writePackedSFixed64","writeSFixed64","readUInt32","writeInt32","val","readInt32","destroy","readFields","readField","end","tag","skip","readMessage","readFixed32","readSFixed32","readFixed64","readSFixed64","readFloat","read","readDouble","h","Error","readVarintRemainder","readVarint64","readSVarint","num","readBoolean","Boolean","readString","str","b1","b2","b3","b0","bytesPerSequence","String","fromCharCode","readUtf8","readBytes","buffer","subarray","readPackedVarint","readPackedSVarint","readPackedBoolean","readPackedFloat","readPackedDouble","readPackedFixed32","readPackedSFixed32","readPackedFixed64","readPackedSFixed64","writeTag","set","finish","floor","writeBigVarintLow","lsb","writeBigVarintHigh","writeBigVarint","writeString","lead","charCodeAt","writeUtf8","write","writeBytes","writeRawMessage","fn","obj","writeMessage","writeBytesField","writeFixed32Field","writeSFixed32Field","writeFixed64Field","writeSFixed64Field","writeVarintField","writeSVarintField","writeStringField","writeFloatField","writeDoubleField","writeBooleanField","Processor","swap","tmp","defaultCompare","quickselectStep","z","exp","sd","newLeft","newRight","offset","isLE","mLen","nBytes","e","eLen","eMax","eBias","nBits","NaN","rt","abs","isNaN","newImageData","createMinion","operation","workerHasImageData","ImageData","_","newWorkerImageData","width","output","buffers","meta","imageOps","numBuffers","numBytes","byteLength","images","Array","Uint8ClampedArray","arrays","pixels","array","pixel","createWorker","config","onMessage","lines","keys","lib","map","toString","concat","blob","Blob","source","URL","createObjectURL","worker","Worker","addEventListener","threads","_imageOps","workers","_onWorkerMessage","minion","postMessage","setTimeout","createFauxWorker","_workers","_queue","_maxQueueLength","queue","_running","_dataLookup","_job","process","inputs","callback","_enqueue","_dispatch","_destroyed","job","shift","input","segmentLength","slices","jj","event","_resolveJob","hasImageData","context","document","createElement","getContext","imageData","createImageData","util_abstract","uidCounter_","getUid","ol_uid","VERSION","ol_AssertionError","AssertionError","code","message","split","__proto__","constructor","CollectionEventType","ADD","REMOVE","ObjectEventType","obj_assign","assign","target","var_sources","arguments$1","arguments","undefined","TypeError","ii","obj_clear","getValues","values","obj_isEmpty","findListener","listeners","listener","opt_this","opt_setDeleteIndex","listenerObj","bindTo","deleteIndex","getListeners","listenerMap","getListenerMap","opt_create","ol_lm","removeListeners","removeEventListener","boundListener","removeListenerMap","listen","opt_once","callOnce","evt","unlistenByKey","bindListener","listenOnce","unlisten","unlistenAll","Disposable_Disposable","disposed_","dispose","disposeInternal","ol_Disposable","TRUE","FALSE","VOID","Event_Event","propagationStopped","stopPropagation","preventDefault","events_Event","events_Target","Disposable","Target","pendingRemovals_","dispatching_","listeners_","dispatchEvent","propagate","pendingRemovals","hasListener","opt_type","EventType","CHANGE","CLEAR","CONTEXTMENU","CLICK","DBLCLICK","DRAGENTER","DRAGOVER","DROP","ERROR","KEYDOWN","KEYPRESS","LOAD","MOUSEDOWN","MOUSEMOVE","MOUSEOUT","MOUSEUP","MOUSEWHEEL","MSPOINTERDOWN","RESIZE","TOUCHSTART","TOUCHMOVE","TOUCHEND","WHEEL","ol_Observable","EventTarget","Observable","revision_","changed","getRevision","on","isArray","once","un","ObjectEvent","Event","oldValue","changeEventTypeCache","getChangeEventType","ol_Object","BaseObject","opt_values","values_","setProperties","getKeys","getProperties","notify","eventType","opt_silent","unset","Property","CollectionEvent","opt_element","element","ol_Collection","Collection","opt_array","opt_options","options","unique_","unique","array_","assertUnique_","updateLength_","getLength","forEach","f","getArray","insertAt","elem","removeAt","prev","setAt","opt_except","assert","assertion","errorCode","ol_Feature","Feature","opt_geometryOrProperties","id_","geometryName_","style_","styleFunction_","geometryChangeKey_","handleGeometryChanged_","getSimplifiedGeometry","geometry","setGeometry","properties","clone","setGeometryName","getGeometryName","getGeometry","style","getStyle","setStyle","getId","getStyleFunction","handleGeometryChange_","styles","getZIndex","createStyleFunction","setId","id","numberSafeCompareFunction","includes","linearFindNearest","direction","reverseSubArray","begin","extension","find","func","equals","arr1","arr2","len1","stableSort","compareFnc","findIndex","every","el","idx","Corner","BOTTOM_LEFT","BOTTOM_RIGHT","TOP_LEFT","TOP_RIGHT","Relationship","UNKNOWN","INTERSECTING","ABOVE","RIGHT","BELOW","LEFT","boundingExtent","coordinates","extent","createEmpty","extendCoordinate","extent_buffer","opt_extent","extent_clone","closestSquaredDistanceXY","x","y","dx","dy","containsCoordinate","coordinate","extent_containsXY","containsExtent","extent1","extent2","coordinateRelationship","relationship","createOrUpdate","createOrUpdateEmpty","createOrUpdateFromCoordinate","createOrUpdateFromFlatCoordinates","flatCoordinates","stride","extendFlatCoordinates","extent_equals","extent_extend","extendCoordinates","extendXY","forEachCorner","getBottomLeft","getBottomRight","getTopRight","getTopLeft","extent_getArea","extent_isEmpty","getWidth","getHeight","extent_getCenter","getForViewAndSize","center","resolution","rotation","size","cosRotation","cos","sinRotation","sin","xCos","xSin","yCos","ySin","x0","x1","x2","x3","y0","y1","y2","y3","getIntersection","intersection","extent_intersects","scaleFromCenter","deltaX","deltaY","extent_applyTransform","transformFn","xs","ys","_boundingExtentXYs","GeometryLayout","XY","XYZ","XYM","XYZM","GeometryType","POINT","LINE_STRING","LINEAR_RING","POLYGON","MULTI_POINT","MULTI_LINE_STRING","MULTI_POLYGON","GEOMETRY_COLLECTION","CIRCLE","transform2D","transform","opt_dest","dest","transform_translate","clamp","cosh","squaredSegmentDistance","math_squaredDistance","toDegrees","angleInRadians","PI","toRadians","angleInDegrees","modulo","lerp","DEFAULT_RADIUS","getDistance","c1","c2","opt_radius","radius","lat1","lat2","deltaLatBy2","deltaLonBy2","atan2","getLengthInternal","getAreaInternal","sphere_offset","distance","bearing","lon1","dByR","lat","asin","Units","DEGREES","FEET","METERS","PIXELS","TILE_PIXELS","USFEET","METERS_PER_UNIT","proj_Units","Projection_Projection","code_","units_","extent_","worldExtent_","worldExtent","axisOrientation_","axisOrientation","global_","global","canWrapX_","getPointResolutionFunc_","getPointResolution","defaultTileGrid_","metersPerUnit_","metersPerUnit","canWrapX","getCode","getExtent","getUnits","getMetersPerUnit","getWorldExtent","getAxisOrientation","isGlobal","setGlobal","getDefaultTileGrid","setDefaultTileGrid","tileGrid","setExtent","setWorldExtent","setGetPointResolution","getPointResolutionFunc","proj_Projection","RADIUS","HALF_SIZE","EXTENT","WORLD_EXTENT","epsg3857_EPSG3857Projection","Projection","EPSG3857Projection","units","point","PROJECTIONS","fromEPSG4326","opt_output","opt_dimension","dimension","halfSize","tan","epsg3857_toEPSG4326","atan","epsg4326_EXTENT","epsg4326_METERS_PER_UNIT","epsg4326_EPSG4326Projection","EPSG4326Projection","opt_axisOrientation","epsg4326_PROJECTIONS","projections_cache","transforms","transforms_add","destination","sourceCode","destinationCode","transforms_get","cloneTransform","identityTransform","addProjection","projection","projections_add","proj_get","projectionLike","projections_get","opt_units","pointResolution","toEPSG4326","getTransformFromProjections","vertices","addEquivalentProjections","projections","addProjections","createProjection","defaultCode","createTransformFromCoordinateTransform","coordTransform","addCoordinateTransforms","forward","inverse","sourceProj","destProj","equivalent","projection1","projection2","equalUnits","sourceProjection","destinationProjection","transformFunc","proj_getTransform","proj_transform","transformExtent","projections1","projections2","forwardTransform","inverseTransform","addEquivalentTransforms","tmp_","transform_reset","transform_set","multiply","transform1","transform2","a1","d1","e1","f1","a2","d2","e2","f2","setFromArray","ol_transform_rotate","angle","ol_transform_scale","ol_transform_translate","transform_compose","dx1","dy1","sx","sy","dx2","dy2","invert","det","mat","determinant","tmpTransform","geom_Geometry","Geometry","extentRevision_","simplifiedGeometryCache","simplifiedGeometryMaxMinSquaredTolerance","simplifiedGeometryRevision","closestPointXY","closestPoint","minSquaredDistance","containsXY","getClosestPoint","opt_closestPoint","intersectsCoordinate","computeExtent","returnOrUpdate","rotate","anchor","scale","opt_sy","opt_anchor","simplify","tolerance","squaredTolerance","getType","applyTransform","intersectsExtent","translate","inCoordinates","outCoordinates","pixelExtent","projectedExtent","getStrideForLayout","layout","geom_SimpleGeometry","SimpleGeometry","getCoordinates","getFirstCoordinate","getFlatCoordinates","getLastCoordinate","getLayout","simplifiedGeometry","getSimplifiedGeometryInternal","getStride","setFlatCoordinates","setCoordinates","opt_layout","setLayout","nesting","getLayoutForStride","anchorX","anchorY","transform_rotate","transform_scale","area_linearRing","twiceArea","area_linearRings","ends","assignClosest","offset1","offset2","i$1","maxSquaredDelta","squaredDelta","arrayMaxSquaredDelta","assignClosestPoint","maxDelta","isRing","opt_tmpPoint","squaredDistance","tmpPoint","assignClosestArrayPoint","deflateCoordinate","deflateCoordinates","deflateCoordinatesArray","coordinatess","opt_ends","inflateCoordinates","opt_coordinates","inflateCoordinatesArray","opt_coordinatess","inflateMultiCoordinatesArray","endss","opt_coordinatesss","coordinatesss","douglasPeucker","simplifiedFlatCoordinates","simplifiedOffset","markers","last","first","maxSquaredDistance","douglasPeuckerArray","simplifiedEnds","snap","round","quantize","quantizeArray","geom_LinearRing","LinearRing","maxDelta_","maxDeltaRevision_","getArea","geom_Point","Point","linearRingContainsExtent","linearRingContainsXY","wn","linearRingsContainsXY","getInteriorPointOfArray","flatCenters","flatCentersOffset","intersections","rr","pointX","maxSegmentLength","getInteriorPointsOfMultiArray","interiorPoints","ret","point1","point2","intersectsLineString","coordinatesExtent","start","startRel","endRel","startX","startY","endX","endY","slope","intersectsSegment","intersectsLinearRingArray","intersectsLinearRing","reverse_coordinates","linearRingIsClockwise","edge","linearRingIsOriented","opt_right","isClockwise","orientLinearRings","orientLinearRingsArray","Polygon_Polygon","Polygon","ends_","flatInteriorPointRevision_","flatInteriorPoint_","orientedRevision_","orientedFlatCoordinates_","appendLinearRing","linearRing","getOrientedFlatCoordinates","getEnds","getFlatInteriorPoint","flatCenter","getInteriorPoint","getLinearRingCount","getLinearRing","getLinearRings","linearRings","geom_Polygon","circular","opt_n","opt_sphereRadius","fromExtent","fromCircle","circle","opt_sides","opt_angle","sides","getCenter","arrayLength","polygon","makeRegular","getRadius","startAngle","has_ua","navigator","userAgent","toLowerCase","FIREFOX","SAFARI","WEBKIT","MAC","DEVICE_PIXEL_RATIO","devicePixelRatio","CANVAS_LINE_DASH","has","setLineDash","GEOLOCATION","TOUCH","POINTER","MSPOINTER","Geolocation_Property","ACCURACY","ACCURACY_GEOMETRY","ALTITUDE","ALTITUDE_ACCURACY","HEADING","POSITION","PROJECTION","SPEED","TRACKING","TRACKING_OPTIONS","Geolocation_GeolocationError","GeolocationError","error","ol_Geolocation","Geolocation","position_","transform_","watchId_","handleProjectionChanged_","handleTrackingChanged_","setProjection","trackingOptions","setTrackingOptions","setTracking","tracking","getProjection","getTracking","geolocation","watchPosition","positionChange_","positionError_","getTrackingOptions","clearWatch","position","coords","accuracy","altitude","altitudeAccuracy","heading","longitude","latitude","projectedPosition","speed","getAccuracy","getAccuracyGeometry","getAltitude","getAltitudeAccuracy","getHeading","getPosition","getSpeed","padNumber","number","opt_precision","numberString","toFixed","decimal","compareVersions","v1","v2","s1","s2","n1","parseInt","n2","coordinate_add","delta","closestOnSegment","segment","along","degreesToStringHDMS","hemispheres","degrees","opt_fractionDigits","normalizedDegrees","dflPrecision","precision","deg","sec","charAt","coordinate_format","template","replace","coordinate_equals","coordinate1","coordinate2","coordinate_rotate","cosAngle","sinAngle","coordinate_scale","coordinate_squaredDistance","coord1","coord2","coordinate_distance","squaredDistanceToSegment","toStringXY","interpolatePoint","fraction","pointY","cumulativeLengths","haystack","needle","opt_comparator","cmp","comparator","found","binarySearch","lineStringCoordinateAtM","extrapolate","lo","hi","m0","lineStringLength","geom_LineString","LineString","flatMidpoint_","flatMidpointRevision_","appendCoordinate","forEachSegment","getCoordinateAtM","opt_extrapolate","getCoordinateAt","getFlatMidpoint","geodesic_line","interpolate","geoM","fracA","fracB","fracM","geoA","geoB","geoStack","fractionStack","fractions","maxIterations","render_EventType","POSTCOMPOSE","PRECOMPOSE","RENDER","RENDERCOMPLETE","HEX_COLOR_RE_","NAMED_COLOR_RE_","asString","color","color_toString","fromString","cache","cacheSize","g","exec","body","appendChild","rgb","getComputedStyle","removeChild","fromNamed","hasAlpha","substr","normalize","Number","fromStringInternal_","asArray","Fill","color_","checksum_","getColor","setColor","getChecksum","style_Fill","Stroke","lineCap_","lineCap","lineDash_","lineDash","lineDashOffset_","lineDashOffset","lineJoin_","lineJoin","miterLimit_","miterLimit","width_","getLineCap","getLineDash","getLineDashOffset","getLineJoin","getMiterLimit","setLineCap","setLineDashOffset","setLineJoin","setMiterLimit","setWidth","style_Stroke","TextPlacement","Text_Text","font_","font","rotation_","rotateWithView_","rotateWithView","scale_","text_","text","textAlign_","textAlign","textBaseline_","textBaseline","fill_","fill","maxAngle_","maxAngle","placement_","placement","overflow_","overflow","stroke_","stroke","offsetX_","offsetX","offsetY_","offsetY","backgroundFill_","backgroundFill","backgroundStroke_","backgroundStroke","padding_","padding","getFont","getPlacement","getMaxAngle","getOverflow","getRotation","getRotateWithView","getScale","getText","getTextAlign","getTextBaseline","getFill","getStroke","getOffsetX","getOffsetY","getBackgroundFill","getBackgroundStroke","getPadding","setOverflow","setFont","setMaxAngle","setOffsetX","setOffsetY","setPlacement","setFill","setRotation","setScale","setStroke","setText","setTextAlign","setTextBaseline","setBackgroundFill","setBackgroundStroke","setPadding","style_Text","DEFAULT_STROKE_STYLE","INTERVALS","Graticule_Graticule","map_","postcomposeListenerKey_","projection_","maxLat_","maxLon_","minLat_","minLon_","maxLatP_","maxLonP_","minLatP_","minLonP_","targetSize_","targetSize","maxLines_","maxLines","meridians_","parallels_","strokeStyle_","strokeStyle","fromLonLatTransform_","toLonLatTransform_","projectionCenterLonLat_","meridiansLabels_","parallelsLabels_","showLabels","lonLabelFormatter_","lonLabelFormatter","latLabelFormatter_","latLabelFormatter","lonLabelPosition_","lonLabelPosition","latLabelPosition_","latLabelPosition","lonLabelStyle_","lonLabelStyle","latLabelStyle_","latLabelStyle","intervals_","intervals","setMap","addMeridian_","lon","minLat","maxLat","lineString","getMeridian_","textPoint","getMeridianPoint_","geom","clampedBottom","clampedTop","addParallel_","minLon","maxLon","getParallel_","getParallelPoint_","clampedLeft","clampedRight","createGraticule_","interval","getInterval_","cnt","centerLonLat","centerLon","centerLat","validExtent","p1","p2","getMap","frac","meridian","getMeridians","lon2","parallel","getParallels","handlePostCompose_","line","labelData","vectorContext","frameState","viewState","pixelRatio","updateProjectionInfo_","setFillStrokeStyle","drawGeometry","setTextStyle","epsg4326Projection","worldExtentP","render","ol_Graticule","Kinetic","decay","minVelocity","delay","decay_","minVelocity_","delay_","points_","angle_","initialVelocity_","update","Date","now","lastIndex","firstIndex","duration","getAngle","ol_Kinetic","ol_MapEvent","MapEvent","opt_frameState","ol_MapBrowserEvent","MapBrowserEvent","browserEvent","opt_dragging","originalEvent","getEventPixel","getCoordinateFromPixel","dragging","MapBrowserEventType","SINGLECLICK","POINTERDRAG","POINTERMOVE","POINTERDOWN","POINTERUP","POINTEROVER","POINTEROUT","POINTERENTER","POINTERLEAVE","POINTERCANCEL","ol_MapBrowserPointerEvent","MapBrowserPointerEvent","pointerEvent","pointer_EventType","EventSource_EventSource","dispatcher","mapping","mapping_","getEvents","getHandlerForEvent","pointer_EventSource","POINTER_ID","POINTER_TYPE","mousedown","inEvent","isEventSimulatedFromTouch_","pointerMap","cancel","prepareEvent","down","mousemove","move","mouseup","button","up","cleanupMouse","mouseover","enterOver","mouseout","leaveOut","cloneEvent","pd","pointerId","isPrimary","pointerType","pointer_MouseSource","EventSource","MouseSource","lastTouches","lts","clientX","clientY","POINTER_TYPES","msPointerDown","prepareEvent_","msPointerMove","msPointerUp","cleanup","msPointerOut","msPointerOver","msPointerCancel","msLostPointerCapture","makeEvent","msGotPointerCapture","pointer_MsSource","MsSource","MSPointerDown","MSPointerMove","MSPointerUp","MSPointerOut","MSPointerOver","MSPointerCancel","MSGotPointerCapture","MSLostPointerCapture","pointerDown","fireNativeEvent","pointerMove","pointerUp","pointerOut","pointerOver","pointerCancel","lostPointerCapture","gotPointerCapture","pointer_NativeSource","NativeSource","pointerdown","pointermove","pointerup","pointerout","pointerover","pointercancel","gotpointercapture","lostpointercapture","HAS_BUTTONS","PointerEvent","_Event","opt_eventDict","eventDict","buttons","which","getButtons","pressure","getPressure","bubbles","cancelable","view","detail","screenX","screenY","ctrlKey","altKey","shiftKey","metaKey","relatedTarget","tiltX","tiltY","hwTimestamp","ev","MouseEvent","pointer_PointerEvent","touchstart","vacuumTouches_","setPrimaryTouch_","changedTouches","dedupSynthMouse_","clickCount_","processTouches_","overDown_","touchmove","moveOverOut_","touchend","upOut_","touchcancel","cancelOut_","pointer_TouchSource","TouchSource","mouseSource","firstTouchId_","resetId_","dedupTimeout_","isPrimaryTouch_","inTouch","identifier","count","cancelResetClickCount_","removePrimaryPointer_","inPointer","resetClickCount_","resetClickCountHandler_","clearTimeout","touchToPointer_","radiusX","radiusY","force","inFunction","touches","pointer","findTouch_","touchList","searchId","out","outTarget","over","enter","outEvent","leave","cleanUpPointer_","lt","array_remove","CLONE_PROPS","pointer_PointerEventHandler","PointerEventHandler","element_","eventMap_","eventSourceList_","registerSources","registerSource","register_","newEvents","handler","eventSource","addEvents_","unregister_","removeEvents_","eventHandler_","events","eventName","eventCopy","fireEvent","contains_","container","contained","inType","wrapMouseEvent","ol_MapBrowserEventHandler","MapBrowserEventHandler","moveTolerance","clickTimeoutId_","dragging_","dragListenerKeys_","moveTolerance_","down_","getViewport","activePointers_","trackedTouches_","pointerEventHandler_","documentPointerEventHandler_","pointerdownListenerKey_","handlePointerDown_","relayedListenerKey_","relayEvent_","emulateClick_","newEvent","updateActivePointers_","handlePointerUp_","isMouseActionButton_","handlePointerMove_","isMoving_","MapEventType","MapProperty","LAYERGROUP","SIZE","TARGET","VIEW","TileState","IDLE","LOADING","LOADED","EMPTY","ABORT","PriorityQueue_PriorityQueue","priorityFunction","keyFunction","priorityFunction_","keyFunction_","elements_","priorities_","queuedElements_","dequeue","elements","priorities","siftUp_","elementKey","enqueue","priority","siftDown_","getCount","getLeftChildIndex_","getRightChildIndex_","getParentIndex_","heapify_","isEmpty","isKeyQueued","isQueued","startIndex","lIndex","rIndex","smallerChildIndex","parentIndex","reprioritize","structs_PriorityQueue","ol_TileQueue","PriorityQueue","TileQueue","tilePriorityFunction","tileChangeCallback","getKey","tileChangeCallback_","tilesLoading_","tilesLoadingKeys_","added","handleTileChange","getTilesLoading","tile","state","getState","tileKey","loadMoreTiles","maxTotalLoading","maxNewLoads","newLoads","abortedTiles","DEFAULT_MAX_ZOOM","DEFAULT_TILE_SIZE","none","disable","rotationconstraint_none","ViewHint","ViewProperty","easeIn","easeOut","inAndOut","linear","DEFAULT_MIN_ZOOM","animationCallback","returnValue","isNoopAnimation","animation","sourceCenter","targetCenter","sourceResolution","targetResolution","sourceRotation","targetRotation","ol_View","View","hints_","animations_","updateAnimationKey_","updateAnimations_","applyOptions_","resolutionConstraintInfo","resolutionConstraint","maxResolution","minResolution","minZoom","maxZoom","zoomFactor","resolutions","power","createSnapToResolutions","defaultMaxResolution","defaultMinResolution","opt_maxLevel","oldLevel","newLevel","createSnapToPower","constraint","createResolutionConstraint","maxResolution_","minResolution_","zoomFactor_","resolutions_","minZoom_","centerConstraint","createExtent","createCenterConstraint","rotationConstraint","enableRotation","constrainRotation","opt_tolerance","createSnapToZero","theta","createSnapToN","createRotationConstraint","constraints_","zoom","constrainResolution","getResolution","options_","getUpdatedOptions_","newOptions","getZoom","animate","var_args","animationCount","isDef","setCenter","setZoom","series","complete","easing","setHint","getAnimating","getInteracting","cancelAnimations","cancelAnimationFrame","more","seriesComplete","elapsed","progress","calculateCenterZoom","calculateCenterRotate","filter","requestAnimationFrame","currentCenter","currentResolution","getSizeFromViewport_","selector","querySelector","metrics","constrainCenter","opt_delta","opt_direction","getConstraints","getHints","opt_hints","calculateExtent","opt_size","getMaxResolution","getMinResolution","getMaxZoom","getZoomForResolution","setMaxZoom","getMinZoom","setMinZoom","getResolutions","getResolutionForExtent","xResolution","yResolution","getResolutionForValueFunction","opt_power","getValueForResolutionFunction","pixelResolution","nearest","getResolutionForZoom","fit","geometryOrExtent","minRotX","minRotY","maxRotX","maxRotY","rotX","rotY","constrainedResolution","centerRotX","centerRotY","setResolution","centerOn","centerX","centerY","hint","createCanvasContext2D","opt_width","opt_height","canvas","replaceNode","oldNode","parentNode","replaceChild","removeNode","removeChildren","lastChild","layer_Property","OPACITY","VISIBLE","Z_INDEX","MAX_RESOLUTION","MIN_RESOLUTION","SOURCE","Base","BaseLayer","opacity","visible","zIndex","state_","getLayerState","layer","managed","getOpacity","sourceState","getSourceState","getVisible","getLayersArray","getLayerStatesArray","opt_states","setMaxResolution","setMinResolution","setOpacity","setVisible","setZIndex","zindex","State","UNDEFINED","READY","Group_Property","LAYERS","Group","LayerGroup","baseOptions","layers","layersListenerKeys_","listenerKeys_","handleLayersChanged_","setLayers","handleLayerChange_","getLayers","handleLayersAdd_","handleLayersRemove_","layersArray","collectionEvent","states","ownLayerState","layerState","size_buffer","size_scale","ratio","toSize","ol_PluggableMap","PluggableMap","optionsInternal","keyboardEventTarget","getElementById","controls","interactions","overlays","layerGroup","createOptionsInternal","maxTilesLoading_","maxTilesLoading","loadTilesWhileAnimating_","loadTilesWhileAnimating","loadTilesWhileInteracting_","loadTilesWhileInteracting","pixelRatio_","animationDelayKey_","animationDelay_","renderFrame_","coordinateToPixelTransform_","pixelToCoordinateTransform_","frameIndex_","frameState_","previousExtent_","viewPropertyListenerKey_","viewChangeListenerKey_","layerGroupPropertyListenerKeys_","viewport_","className","msTouchAction","touchAction","overlayContainer_","overlayContainerStopEvent_","overlayEvents","mapBrowserEventHandler_","handleMapBrowserEvent","keyboardEventTarget_","keyHandlerKeys_","handleBrowserEvent","overlays_","overlayIdIndex_","renderer_","createRenderer","handleResize_","focus_","postRenderFunctions_","tileQueue_","getTilePriority","handleTileChange_","skippedFeatureUids_","handleLayerGroupChanged_","handleViewChanged_","handleSizeChanged_","handleTargetChanged_","control","interaction","addOverlayInternal_","addControl","getControls","addInteraction","getInteractions","addLayer","getLayerGroup","addOverlay","overlay","getOverlays","setTarget","forEachFeatureAtPixel","hitTolerance","layerFilter","forEachFeatureAtCoordinate","getFeaturesAtPixel","features","feature","forEachLayerAtPixel","hasFeatureAtPixel","hasFeatureAtCoordinate","getEventCoordinate","viewportPosition","getBoundingClientRect","eventPosition","top","getTarget","getTargetElement","pixelToCoordinateTransform","getOverlayById","getPixelFromCoordinate","coordinateToPixelTransform","getRenderer","getSize","getView","getOverlayContainer","getOverlayContainerStopEvent","tileSourceKey","tileCenter","tileResolution","wantedTiles","focus","mapBrowserEvent","interactionsArray","getActive","handleEvent","handlePostRender","tileQueue","hints","viewHints","getLoading","getSource","loading","dispatchRenderEvent","postRenderFunctions","targetElement","updateSize","removeLayerRenderers","handleViewPropertyChanged_","setAttribute","isRendered","renderSync","removeControl","removeInteraction","removeLayer","removeOverlay","time","previousFrameState","hasArea","layerStatesArray","layerStates","skippedFeatureUids","usedTiles","renderFrame","setLayerGroup","setSize","setView","skipFeature","computedStyle","offsetWidth","parseFloat","offsetHeight","unskipFeature","control_Control","Control","target_","listenerKeys","CLASS_HIDDEN","CLASS_SELECTABLE","CLASS_UNSELECTABLE","CLASS_UNSUPPORTED","CLASS_CONTROL","CLASS_COLLAPSED","getFontFamilies","family","fontFamily","visibleAtResolution","layer_Layer","Layer","mapPrecomposeKey_","mapRenderKey_","sourceChangeKey_","handleSourcePropertyChange_","setSource","handleSourceChange_","renderEvent","Attribution_render","mapEvent","updateElement_","control_Attribution","Attribution","ulElement_","collapsed_","collapsed","overrideCollapsible_","collapsible","collapsible_","tipLabel","collapseLabel","collapseLabel_","textContent","label","label_","activeLabel","title","handleClick_","cssClasses","renderedAttributions_","renderedVisible_","collectSourceAttributions_","lookup","visibleAttributions","attributionGetter","getAttributions","attributions","getAttributionsCollapsible","setCollapsible","display","innerHTML","handleToggle_","classList","toggle","getCollapsible","setCollapsed","getCollapsed","Rotate_render","autoHide_","add","msTransform","webkitTransform","control_Rotate","Rotate","callResetNorth_","resetNorth","duration_","autoHide","resetNorth_","control_Zoom","Zoom","zoomInLabel","zoomOutLabel","zoomInTipLabel","zoomOutTipLabel","inElement","createTextNode","outElement","zoomByDelta_","newResolution","defaults","zoomOptions","rotateOptions","attribution","attributionOptions","interaction_Property","ACTIVE","Interaction_rotate","opt_duration","rotateWithoutConstraints","currentRotation","Interaction_zoom","zoomWithoutConstraints","zoomByDelta","interaction_Interaction","Interaction","setActive","active","DoubleClickZoom_handleEvent","stopEvent","delta_","interaction_DoubleClickZoom","DoubleClickZoom","altKeyOnly","altShiftKeysOnly","condition_focus","activeElement","always","mouseActionButton","never","condition_pointerMove","singleClick","noModifierKeys","shiftKeyOnly","targetNotEditable","tagName","mouseOnly","primaryAction","Pointer_centroid","pointerEvents","Pointer","PointerInteraction","handleDownEvent","handleDragEvent","handleMoveEvent","handleUpEvent","stopDown","handlingDownUpSequence","trackedPointers_","targetPointers","updateTrackedPointers_","handledUp","handled","isPointerDraggingEvent","interaction_DragPan","DragPan","kinetic_","kinetic","lastCentroid","lastPointersCount_","panning_","condition_","condition","noKinetic_","centroid","centerpx","interaction_DragRotate","DragRotate","lastAngle_","Box","RenderBox","geometry_","startPixel_","endPixel_","render_","startPixel","endPixel","setPixels","createOrUpdateGeometry","DragBoxEventType","DragBoxEvent","interaction_DragBox","DragBox","box_","minArea_","onBoxEnd_","onBoxEnd","boxEndCondition_","boxEndCondition","defaultBoxEndCondition","out_","mapExtent","boxPixelExtent","createOrUpdateFromCoordinates","interaction_DragZoom","DragZoom","KeyCode","UP","DOWN","KeyboardPan_handleEvent","keyCode","mapUnitsDelta","pixelDelta_","pan","interaction_KeyboardPan","KeyboardPan","defaultCondition_","pixelDelta","KeyboardZoom_handleEvent","charCode","interaction_KeyboardZoom","KeyboardZoom","Mode","interaction_MouseWheelZoom","MouseWheelZoom","timeout_","timeout","useAnchor_","useAnchor","constrainResolution_","lastAnchor_","startTime_","timeoutId_","mode_","trackpadEventGap_","trackpadTimeoutId_","trackpadDeltaPerZoom_","trackpadZoomBuffer_","decrementInteractingHint_","wheelEvent","deltaMode","WheelEvent","DOM_DELTA_PIXEL","DOM_DELTA_LINE","wheelDeltaY","rebound","timeLeft","handleWheelZoom_","setMouseAnchor","interaction_PinchRotate","PinchRotate","pointerOptions","anchor_","rotating_","rotationDelta_","threshold_","threshold","rotationDelta","touch0","touch1","interaction_PinchZoom","PinchZoom","lastDistance_","lastScaleDelta_","scaleDelta","interaction_defaults","altShiftDragRotate","doubleClickZoom","zoomDelta","zoomDuration","dragPan","onFocusOnly","pinchRotate","pinchZoom","keyboard","mouseWheelZoom","shiftDragZoom","ERROR_THRESHOLD","ol_ImageBase","ImageBase","getImage","getPixelRatio","ImageState","ol_ImageCanvas","ImageCanvas","opt_loader","loader_","canvas_","error_","getError","handleLoad_","err","LayerType","IMAGE","TILE","VECTOR_TILE","VECTOR","VectorRenderType","render_Event","RenderEvent","opt_vectorContext","opt_context","opt_glContext","glContext","structs_LRUCache","LRUCache","opt_highWaterMark","highWaterMark","count_","entries_","oldest_","newest_","canExpireCache","containsKey","entry","value_","key_","newer","older","peekLast","peekLastKey","peekFirstKey","prune","defaultFillStyle","defaultLineDash","defaultStrokeStyle","defaultPadding","labelCache","checkedFonts","measureContext","textHeights","checkFont","referenceWidth","retries","checked","referenceFonts","isAvailable","getMeasureContext","weight","fontWeight","available","referenceFont","measureText","check","done","clearInterval","fontSpec","fontFamilies","setInterval","measureTextHeight","span","heights","measureTextWidth","rotateAtOffset","resetTransform","drawImage","image","originX","originY","w","alpha","globalAlpha","setTransform","asColorLike","VectorContext_VectorContext","drawCustom","renderer","drawCircle","circleGeometry","drawFeature","drawGeometryCollection","geometryCollectionGeometry","drawLineString","lineStringGeometry","drawMultiLineString","multiLineStringGeometry","drawMultiPoint","multiPointGeometry","drawMultiPolygon","multiPolygonGeometry","drawPoint","pointGeometry","drawPolygon","polygonGeometry","drawText","fillStyle","setImageStyle","imageStyle","opt_declutterGroup","textStyle","render_VectorContext","Immediate","VectorContext","CanvasImmediateRenderer","viewRotation","context_","viewRotation_","contextFillState_","contextStrokeState_","contextTextState_","fillState_","strokeState_","image_","imageAnchorX_","imageAnchorY_","imageHeight_","imageOpacity_","imageOriginX_","imageOriginY_","imageRotateWithView_","imageRotation_","imageScale_","imageWidth_","textOffsetX_","textOffsetY_","textRotateWithView_","textRotation_","textScale_","textFillState_","textStrokeState_","textState_","pixelCoordinates_","tmpLocalTransform_","drawImages_","pixelCoordinates","localTransform","drawText_","setContextFillState_","setContextStrokeState_","setContextTextState_","strokeText","fillText","moveToLineTo_","close","moveTo","lineTo","closePath","drawRings_","simpleGeometry","transformGeom2D","beginPath","arc","getGeometryFunction","geometries","getGeometriesArray","flatMidpoint","geometryExtent","flatMidpoints","getFlatMidpoints","flatInteriorPoint","getEndss","flatInteriorPoints","getFlatInteriorPoints","fillState","contextFillState","strokeState","contextStrokeState","lineWidth","textState","contextTextState","fillStyleColor","strokeStyleColor","strokeStyleLineCap","strokeStyleLineDash","strokeStyleLineDashOffset","strokeStyleLineJoin","strokeStyleWidth","strokeStyleMiterLimit","imageAnchor","getAnchor","imageImage","imageOrigin","getOrigin","imageSize","textFillStyle","textFillStyleColor","textStrokeStyle","textStrokeStyleColor","textStrokeStyleLineCap","textStrokeStyleLineDash","textStrokeStyleLineDashOffset","textStrokeStyleLineJoin","textStrokeStyleWidth","textStrokeStyleMiterLimit","textFont","textOffsetX","textOffsetY","textRotateWithView","textRotation","textScale","textText","textTextAlign","textTextBaseline","IconImageCache","cache_","cacheSize_","maxCacheSize_","src","crossOrigin","expire","iconImage","maxCacheSize","shared","expireIconCache","sortByZIndex","state1","state2","renderer_Map","MapRenderer","layerRenderers_","layerRendererListeners_","layerRendererConstructors_","registerLayerRenderers","constructors","calculateMatrices2D","removeLayerRendererByKey_","thisArg","thisArg2","viewResolution","translatedCoordinate","projectionExtent","worldWidth","layerRenderer","getLayerRenderer","getWrapX","layerKey","candidate","handleLayerRendererChange_","getLayerRendererByKey","getLayerRenderers","removeUnusedLayerRenderers_","scheduleExpireIconCache","scheduleRemoveUnusedLayerRenderers","layerRendererConstructors","canvas_Map","CanvasMapRenderer","insertBefore","childNodes","getTransform","composeEvent","clearRect","save","prepareFrame","composeFrame","restore","numLayers","forEachLayerAtCoordinate","ctor","renderer_Layer","LayerRenderer","layer_","createLoadedTileFinder","tiles","tileRange","forEachLoadedTile","tileCoord","getLayer","handleImageChange_","renderIfReadyAndVisible","loadImage","imageState","scheduleExpireCache","tileSource","postRenderFunction","expireCache","updateUsedTiles","zKey","manageTilePyramid","currentZ","preload","opt_tileCallback","getTileRangeForExtentAndZ","getTile","getTileCoordCenter","useTile","canvas_Layer","CanvasLayerRenderer","renderedResolution","clip","topLeft","topRight","bottomRight","bottomLeft","dispatchComposeEvent_","opt_transform","postCompose","preCompose","IntermediateCanvas","IntermediateCanvasRenderer","coordinateToCanvasPixelTransform","hitCanvasContext_","clipped","imageTransform","getImageTransform","dw","dh","getImageData","ImageLayer_CanvasImageLayerRenderer","CanvasImageLayerRenderer","imageLayer","imageTransform_","skippedFeatures_","vectorRenderer_","viewCenter","imageSource","vectorRenderer","renderedExtent","skippedFeatures","imageFrameState","newSkippedFeatures","replayGroupChanged","compose","imageExtent","imageResolution","imagePixelRatio","getRenderMode","mapRenderer","canvas_ImageLayer","TileRange","TileRange_createOrUpdate","containsTileRange","ol_TileRange","TileLayer_CanvasTileLayerRenderer","CanvasTileLayerRenderer","tileLayer","opt_noContext","oversampling_","renderedExtent_","renderedRevision","renderedTiles","newTiles_","tmpExtent","tmpTileRange_","zDirection","isDrawableTile_","tileState","useInterimTilesOnError","getUseInterimTilesOnError","getPreload","setState","getInterimTile","sourceRevision","getTileGridForProjection","getZForResolution","oversampling","getTileRangeExtent","tilePixelRatio","getTilePixelRatio","tilesToDrawByZ","findLoadedTiles","animatingOrInteracting","tmpTileRange","uid","inTransition","getAlpha","childTileRange","getTileCoordChildTileRange","covered","forEachTileCoordParentTileRange","tilePixelSize","getTilePixelSize","currentScale","currentTilePixelSize","tileExtent","tileGutter","tilesToDraw","zs","tileCoordKey","getGutterForProjection","getTileCoordExtent","getTileCoord","drawTileImage","gutter","transition","getTileImage","getOpaque","alphaChanged","endTransition","canvas_TileLayer","ReplayGroup_ReplayGroup","getReplay","replayType","addDeclutter","group","render_ReplayGroup","ReplayType","DEFAULT","TEXT","drawTextOnPath","measure","startM","previousAngle","reverse","numChars","segmentM","chunk","chunkLength","char","charLength","charM","segmentPos","unshift","Instruction","BEGIN_GEOMETRY","BEGIN_PATH","CLOSE_PATH","CUSTOM","DRAW_CHARS","DRAW_IMAGE","END_GEOMETRY","FILL","MOVE_TO_LINE_TO","SET_FILL_STYLE","SET_STROKE_STYLE","STROKE","Instruction_fillInstruction","Instruction_strokeInstruction","beginPathInstruction","closePathInstruction","canvas_Instruction","ORDER","TEXT_ALIGN","middle","hanging","alphabetic","ideographic","bottom","Replay_tmpExtent","Replay_tmpTransform","Replay","CanvasReplay","maxExtent","overlaps","declutterTree","maxLineWidth","alignFill_","beginGeometryInstruction1_","beginGeometryInstruction2_","bufferedMaxExtent_","instructions","coordinateCache_","renderedTransform_","hitDetectionInstructions","replayTextBackground_","p3","p4","fillInstruction","strokeInstruction","setStrokeStyle_","replayImage_","declutterGroup","snapToPixel","fillStroke","boxW","boxH","boxX","boxY","strokePadding","declutterArgs","applyPixelRatio","dashArray","dash","appendFlatCoordinates","closed","skipFirst","myEnd","getBufferedMaxExtent","lastRel","nextRel","lastCoord","nextCoord","skipped","drawCustomCoordinates_","replayEnds","replayEnd","beginGeometry","replayEndss","replayBegin","myEnds","endGeometry","origin","repeatSize","instruction","renderDeclutter_","groupCount","box","declutterData","replay_","skippedFeaturesHash","featureCallback","opt_hitExtent","dd","prevX","prevY","roundX","roundY","skipFeatures","pendingFill","pendingStroke","lastFillInstruction","lastStrokeInstruction","coordinateCache","batchSize","baseline","fillKey","strokeKey","strokeWidth","textKey","pathLength","textLength","textStates","parts","cc","chars","part","replay","replayHitDetection","opt_featureCallback","reverseHitDetectionInstructions","createFill","applyStroke","createStroke","updateFillStyle","currentFillStyle","updateStrokeStyle","currentStrokeStyle","currentLineCap","currentLineDash","currentLineDashOffset","currentLineJoin","currentLineWidth","currentMiterLimit","endGeometryInstruction","ImageReplay","CanvasImageReplay","declutterGroup_","hitDetectionImage_","anchorX_","anchorY_","height_","opacity_","originX_","originY_","drawCoordinates_","myBegin","hitDetectionImage","getHitDetectionImage","LineStringReplay","CanvasLineStringReplay","drawFlatCoordinates_","moveToLineToInstruction","lastStroke","PolygonReplay_CanvasPolygonReplay","CanvasPolygonReplay","drawFlatCoordinatess_","numEnds","setFillStrokeStyles_","circleInstruction","matchingChunk","m12","m23","x12","y12","x23","y23","chunkStart","chunkEnd","chunkM","acos","BATCH_CONSTRUCTORS","Circle","Default","Image","Text","CanvasTextReplay","labels_","fillStates","strokeStates","textKey_","fillKey_","strokeKey_","widths_","geometryType","flatEnd","flatOffset","oo","range","drawChars_","drawTextImage_","align","numLines","widths","currentWidth","measureTextWidths","lineHeight","renderWidth","leftRight","ReplayGroup_CanvasReplayGroup","ReplayGroup","CanvasReplayGroup","opt_renderBuffer","declutterTree_","tolerance_","maxExtent_","overlaps_","resolution_","renderBuffer_","replaysByZIndex_","hitDetectionContext_","hitDetectionTransform_","declutter","flatClipCoords","getClipCoords","hasReplays","replays","candidates","replayKey","declutterReplays","hitExtent","contextSize","declutteredFeatures","mask","circleArrayCache","arraySize","fillCircleArrayRowToMiddle","getCircleArray","zIndexKey","Constructor","getReplays","opt_replayTypes","opt_declutterReplays","replayTypes","0","canvas_ReplayGroup","SIMPLIFY_TOLERANCE","GEOMETRY_RENDERERS","replayGroup","getImageState","imageReplay","textReplay","lineStringReplay","polygonReplay","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection","geometryRenderer","circleReplay","defaultOrder","feature1","feature2","getSquaredTolerance","getTolerance","renderFeature","unlistenImageChange","listenImageChange","renderGeometry","getGeometries","renderFeatureInternal","VectorLayer_CanvasVectorLayerRenderer","CanvasVectorLayerRenderer","vectorLayer","getDeclutter","rbush_default","dirty_","renderedRevision_","renderedResolution_","renderedRenderOrder_","replayGroup_","handleFontsChanged_","vectorSource","clipExtent","replayContext","drawOffsetX","drawOffsetY","transparentLayer","hasRenderListeners","drawWidth","drawHeight","drawSize","world","mainContextAlpha","handleStyleImageChange_","animating","interacting","updateWhileAnimating","getUpdateWhileAnimating","updateWhileInteracting","getUpdateWhileInteracting","frameStateExtent","vectorLayerRevision","vectorLayerRenderBuffer","getRenderBuffer","vectorLayerRenderOrder","getRenderOrder","getOverlaps","loadFeatures","styleFunction","dirty","forEachFeatureInExtent","canvas_VectorLayer","VectorTileRenderType","HYBRID","IMAGE_REPLAYS","hybrid","VECTOR_REPLAYS","vector","VectorTileLayer_CanvasVectorTileLayerRenderer","CanvasVectorTileLayerRenderer","renderedLayerRevision_","tmpTransform_","renderMode","createReplayGroup_","renderTileImage_","layerRevision","this$1","revision","renderOrder","replayState","getReplayState","renderedRenderOrder","sourceTileGrid","getTileGrid","loop","tt","sourceTile","tileKeys","sourceTileCoord","sourceTileExtent","sharedExtent","bufferedExtent","tileProjection","reproject","getFeatures","setReplayGroup","getReplayGroup","getReplayTransform_","renderResolution","clips","worldOffset","currentClip","zz","replayData","replayDeclutter","renderedTileRevision","wrappedTileCoord","pixelScale","canvas_VectorTileLayer","ol_Map","Map","OverlayPositioning","BOTTOM_CENTER","CENTER_LEFT","CENTER_CENTER","CENTER_RIGHT","TOP_CENTER","Overlay_Property","ELEMENT","MAP","OFFSET","POSITIONING","ol_Overlay","Overlay","insertFirst","autoPan","autoPanAnimation","autoPanMargin","rendered","bottom_","left_","right_","top_","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","setPosition","getElement","getOffset","getPositioning","updatePixelPosition","panIntoView","mapRect","getRect","overlayRect","marginLeft","marginRight","dom_outerWidth","marginTop","marginBottom","dom_outerHeight","offsetLeft","offsetRight","offsetTop","offsetBottom","centerPx","newCenterPx","pageXOffset","pageYOffset","mapSize","updateRenderedPosition","getOptions","LINEAR","TEXTURE_WRAP_S","TEXTURE_WRAP_T","TEXTURE_2D","CONTEXT_IDS","webgl_getContext","opt_attributes","MAX_TEXTURE_SIZE","EXTENSIONS","webgl_gl","failIfMajorPerformanceCaveat","getParameter","getSupportedExtensions","Shader_WebGLShader","source_","isAnimated","Shader","Fragment","WebGLShader","WebGLFragment","Vertex","WebGLVertex","fragment","defaultshader_vertex","defaultshader_Locations","gl","program","u_projectionMatrix","getUniformLocation","u_offsetScaleMatrix","u_offsetRotateMatrix","u_lineWidth","u_pixelRatio","u_opacity","u_fillColor","u_strokeColor","u_size","a_position","getAttribLocation","a_instruction","a_radius","fromTransform","mat4","webgl_Replay","WebGLReplay","projectionMatrix_","offsetRotateMatrix_","offsetScaleMatrix_","tmpMat4_","indices","indicesBuffer","startIndices","startIndicesFeature","verticesBuffer","getDeleteResourcesFunction","setUpProgram","shutDownProgram","locations","drawReplay","hitDetection","drawHitDetectionReplayOneByOne","drawHitDetectionReplay","oneByOne","drawHitDetectionReplayAll","COLOR_BUFFER_BIT","DEPTH_BUFFER_BIT","tmpStencil","tmpStencilFunc","tmpStencilMaskVal","tmpStencilRef","tmpStencilMask","tmpStencilOpFail","tmpStencilOpPass","tmpStencilOpZFail","getGL","isEnabled","STENCIL_TEST","STENCIL_FUNC","STENCIL_VALUE_MASK","STENCIL_REF","STENCIL_WRITEMASK","STENCIL_FAIL","STENCIL_PASS_DEPTH_PASS","STENCIL_PASS_DEPTH_FAIL","enable","STENCIL_BUFFER_BIT","stencilMask","stencilFunc","ALWAYS","stencilOp","KEEP","REPLACE","NOTEQUAL","bindBuffer","projectionMatrix","offsetScaleMatrix","offsetRotateMatrix","uniformMatrix4fv","uniform1f","drawElements","elementType","hasOESElementIndexUint","numItems","offsetInBytes","DEFAULT_FILLSTYLE","DEFAULT_LINEDASH","DEFAULT_STROKESTYLE","EPSILON","triangleIsCounterClockwise","BufferUsage","WebGLBuffer","opt_arr","opt_usage","arr_","usage_","getUsage","Buffer","CircleReplay","WebGLCircleReplay","defaultLocations_","styles_","styleIndices_","radius_","fillColor","strokeColor","numVertices","numIndices","lastState","deleteBuffer","getProgram","useProgram","enableVertexAttribArray","vertexAttribPointer","uniform2fv","disableVertexAttribArray","nextStyle","setFillStyle_","drawReplaySkipping_","groupStart","featureIndex","featureStart","uniform4fv","CanvasGradient","CanvasPattern","defaultshader_fragment","texturereplay_defaultshader_vertex","texturereplay_defaultshader_Locations","u_image","a_texCoord","a_offsets","a_opacity","a_rotateWithView","ContextEventType","LOST","RESTORED","createTextureInternal","opt_wrapS","opt_wrapT","texture","createTexture","bindTexture","texParameteri","TEXTURE_MAG_FILTER","TEXTURE_MIN_FILTER","createEmptyTexture","texImage2D","RGBA","UNSIGNED_BYTE","Context","WebGLContext","gl_","bufferCache_","shaderCache_","programCache_","currentProgram_","hitDetectionFramebuffer_","hitDetectionTexture_","hitDetectionRenderbuffer_","getExtension","handleWebGLContextLost","handleWebGLContextRestored","bufferKey","bufferCacheEntry","arrayBuffer","createBuffer","Float32Array","Uint32Array","Uint16Array","bufferData","isContextLost","key$1","deleteProgram","key$2","deleteShader","deleteFramebuffer","deleteRenderbuffer","deleteTexture","getCanvas","getHitDetectionFramebuffer","initHitDetectionFramebuffer_","getShader","shaderObject","shaderKey","shader","createShader","shaderSource","compileShader","fragmentShaderObject","vertexShaderObject","programKey","createProgram","attachShader","linkProgram","framebuffer","createFramebuffer","bindFramebuffer","FRAMEBUFFER","renderbuffer","createRenderbuffer","bindRenderbuffer","RENDERBUFFER","renderbufferStorage","DEPTH_COMPONENT16","framebufferTexture2D","COLOR_ATTACHMENT0","framebufferRenderbuffer","DEPTH_ATTACHMENT","TextureReplay","WebGLTextureReplay","groupIndices","hitDetectionGroupIndices","imageHeight","imageWidth","defaultLocations","textures","getTextures","drawCoordinates","createTextures","texturePerImage","getHitDetectionTextures","drawReplaySkipping","groupEnd","hitDetectionTextures","opt_all","webgl_ImageReplay","WebGLImageReplay","images_","hitDetectionImages_","textures_","hitDetectionTextures_","getImageSize","lineStringIsClosed","linestringreplay_defaultshader_fragment","linestringreplay_defaultshader_vertex","linestringreplay_defaultshader_Locations","u_miterLimit","u_color","a_lastPos","a_nextPos","a_direction","LineStringReplay_Instruction","webgl_LineStringReplay","WebGLLineStringReplay","startCoords","sign","p0","lastSign","addVertices_","product","isValid_","indexCount","drawPolygonCoordinates","holeFlatCoordinates","setPolygonStyle","opt_index","getCurrentIndex","tmpDepthFunc","DEPTH_FUNC","tmpDepthMask","DEPTH_WRITEMASK","DEPTH_TEST","depthMask","depthFunc","polygonreplay_defaultshader_fragment","polygonreplay_defaultshader_vertex","polygonreplay_defaultshader_Locations","LinkedList","opt_circular","first_","last_","head_","circular_","length_","insertItem","next","head","removeItem","firstItem","lastItem","nextItem","getNextItem","prevItem","getPrevItem","getCurrItem","setFirstItem","list","structs_LinkedList","RBush_RBush","opt_maxEntries","rbush_","items_","extents","getAll","getInExtent","forEach_","forEachInExtent","structs_RBush","webgl_PolygonReplay","WebGLPolygonReplay","outerRing","rtree","processFlatCoordinates_","maxCoords","getMaxCoords_","holeLists","holeList","classifyPoints_","currList","currItem","getIntersections_","bridgeHole_","triangulate_","clockwise","segments","createPoint_","insertItem_","seg","ccw","s0","pointsReclassified","reflex","removeItem_","hole","holeMaxX","listMaxX","bestPoint","p5","minDist","intersectingSegments","currSeg","calculateIntersection_","dist","pointsInTriangle","getPointsInTriangle_","currPoint","currTheta","p0Bridge","p1Bridge","simple","isSimple_","clipEars_","resolveSelfIntersections_","splitPolygon_","isClockwise_","s3","processedEars","variableCriterion","diagonalIsInside_","opt_touch","resolvedIntersections","breakCond","newPolygon","newRtree","opt_rtree","opt_reflex","segmentsInExtent","denom","ua","ub","p1IsLeftOf","p1IsRightOf","p3IsLeftOf","p3IsRightOf","p1InCone","p3InCone","currIndex","currLineIndex","holes","holeFlatCoords","lineDeleter","nullStrokeStyle","Atlas_Atlas","space","space_","emptyBlocks_","renderCallback","block","split_","newBlock1","newBlock2","updateBlocks_","args","style_Atlas","AtlasManager_AtlasManager","currentSize_","initialSize","maxSize_","maxSize","atlases_","currentHitSize_","hitAtlases_","getInfo","info","getInfo_","hitInfo","mergeInfos_","atlases","hitImage","opt_renderHitCallback","add_","renderHitCallback","isHitAtlas","atlas","style_AtlasManager","HIT_DETECTION_SIZE","ReplayGroup_BATCH_CONSTRUCTORS","WebGLTextReplay","measureCanvas_","currAtlas_","currX","currY","charArr","charInfo","glyphAtlas","textSize","getTextSize_","self","textHeight","sum","curr","addCharToAtlas_","reduce","mCtx","ctx","getAtlas_","params","hash","calculateHash_","webgl_ReplayGroup","WebGLReplayGroup","functions","replayHitDetection_","readPixels","webgl_Immediate","WebGLImmediateRenderer","center_","size_","imageStyle_","fillStyle_","textStyle_","defaultmapshader_fragment","defaultmapshader_vertex","defaultmapshader_Locations","u_texCoordMatrix","u_texture","webgl_Layer","WebGLLayerRenderer","arrayBuffer_","framebufferDimension","texCoordMatrix","uniform1i","getTexCoordMatrix","getProjectionMatrix","getTexture","drawArrays","ImageLayer_WebGLImageLayerRenderer","WebGLImageLayerRenderer","hitTransformationMatrix_","createTexture_","imageElement","updateProjectionMatrix_","canvasWidth","canvasHeight","canvasExtentWidth","canvasExtentHeight","getHitTransformationMatrix_","pixelOnFrameBuffer","mapCoordTransform","projectionMatrixInv","webgl_ImageLayer","webgl_Map","WebGLMapRenderer","clipTileCanvasWidth_","clipTileCanvasHeight_","clipTileContext_","antialias","depth","preserveDrawingBuffer","stencil","textureCache_","tileTextureQueue_","loadNextTileTexture_","tileSize","bindTileTexture","textureCacheFrameMarkerCount_","initializeGL_","magFilter","minFilter","textureCacheEntry","imageTile","clipTileCanvas","clipTileContext","expireCache_","getTileTextureQueue","renderers","activeTexture","blendFuncSeparate","isTileTextureLoaded","layerStatesToDraw","clearColor","viewport","layerState$1","hasFeature","ol_Tile","Tile","interimTile","transition_","transitionStarts_","refreshInterimChain","getBlankImage","fillRect","ol_ImageTile","ImageTile","tileLoadFunction","crossOrigin_","src_","imageListenerKeys_","tileLoadFunction_","unlistenImage_","handleImageError_","handleImageLoad_","naturalWidth","naturalHeight","tilecoord_createOrUpdate","opt_tileCoord","getKeyZXY","tilecoord_getKey","tilecoord_hash","ol_TileCache","TileCache","pruneExceptNewestZ","fromKey","adaptAttributions","attributionLike","source_Source","Source","attributions_","attributionsCollapsible_","attributionsCollapsible","wrapX_","wrapX","refresh","setAttributions","tmpTileCoord","TileGrid_TileGrid","opt_func","opt_strict","currentVal","res","isSorted","origins","origin_","origins_","tileSizes_","tileSizes","tileSize_","fullTileRanges_","tmpSize_","sizes","calculateTileRanges_","forEachTileCoord","opt_tileRange","tileCoordExtent","getTileSize","getTileCoordForXYAndZ_","getTileCoordForCoordAndResolution","getTileCoordForXYAndResolution_","reverseIntersectionPolicy","adjustX","adjustY","xFromOrigin","yFromOrigin","tileCoordX","tileCoordY","getTileCoordForCoordAndZ","getTileCoordResolution","getFullTileRange","fullTileRanges","tilegrid_TileGrid","getForProjection","createForProjection","createForExtent","opt_maxZoom","opt_tileSize","opt_corner","corner","resolutionsFromExtent","getCorner","createXYZ","xyzOptions","gridOptions","extentFromProjection","half","Tile_TileSource","TileSource","opaque_","opaque","tilePixelRatio_","tileCache","tmpSize","tileOptions","getTileCacheForProjection","loaded","setKey","thisProj","getTileCoordForTileUrlFunction","opt_projection","worldsAway","tilegrid_wrapX","withinExtentAndZ","TileSourceEvent","source_Tile","tilelayershader_fragment","tilelayershader_vertex","tilelayershader_Locations","u_tileOffset","TileLayer_WebGLTileLayerRenderer","WebGLTileLayerRenderer","fragmentShader_","vertexShader_","locations_","renderArrayBuffer_","renderedTileRange_","renderedFramebufferExtent_","framebufferExtent","tilePixelResolution","tileRangeSize","roundUpToPowerOfTwo","framebufferExtentDimension","allTilesLoaded","tileTextureQueue","pixelOnMapScaled","pixelOnFrameBufferScaled","webgl_TileLayer","VectorLayer_WebGLVectorLayerRenderer","WebGLVectorLayerRenderer","layerState_","SCISSOR_TEST","scissor","webgl_VectorLayer","ol_WebGLMap","WebGLMap","FormatType","ARRAY_BUFFER","JSON","XML","loadFeaturesXhr","url","success","failure","xhr","XMLHttpRequest","open","responseType","onload","status","responseText","responseXML","DOMParser","parseFromString","readFeatures","featureProjection","readProjection","getLastExtent","onerror","send","featureloader_xhr","dataProjection","addFeatures","loadingstrategy_all","DOCUMENT","implementation","createDocument","XML_SCHEMA_INSTANCE_URI","createElementNS","namespaceURI","qualifiedName","getAllTextContent","normalizeWhitespace","getAllTextContent_","accumulator","nodeType","Node","CDATA_SECTION_NODE","TEXT_NODE","nodeValue","firstChild","nextSibling","isDocument","parse","xml","makeArrayExtender","valueReader","objectStack","makeArrayPusher","makeReplacer","makeObjectPropertyPusher","opt_property","localName","makeObjectPropertySetter","makeChildAppender","nodeWriter","makeArraySerializer","serializersNS","nodeFactory","serializers","makeSimpleNodeFactory","serialize","opt_nodeName","opt_namespaceURI","fixedNodeName","nodeName","OBJECT_PROPERTY_NODE_FACTORY","makeSequence","orderedKeys","sequence","makeStructureNS","namespaceURIs","structure","opt_structureNS","structureNS","parseNode","parsersNS","firstElementChild","nextElementSibling","parsers","parser","pushParseAndPop","opt_keys","pushSerializeAndPop","WMTSTileGrid","TileGrid","matrixIds_","matrixIds","getMatrixId","getMatrixIds","tilegrid_WMTS","createFromCapabilitiesMatrixSet","matrixSet","opt_matrixLimits","matrixLimits","switchOriginXY","elt","elt_ml","tileWidth","tileHeight","Image_ImageStyle","getSnapToPixel","getHitDetectionImageSize","setRotateWithView","setSnapToPixel","style_Image","style_RegularShape","ImageStyle","RegularShape","checksums_","hitDetectionCanvas_","points","radius1","radius2_","radius2","imageSize_","hitDetectionImageSize_","atlasManager_","atlasManager","getPoints","getRadius2","renderOptions","draw_","createHitDetectionCanvas_","renderHitDetectionCallback","hasCustomHitDetectionImage","drawHitDetectionCanvas_","angle0","radiusC","strokeChecksum","fillChecksum","checksum","style_Circle","CircleStyle","setRadius","IconAnchorUnits","FRACTION","IconImage_IconImage","IconImage","imageState_","tainted_","isTainted_","dispatchChangeEvent_","replaceColor_","getSrc","imgData","putImageData","IconOrigin","style_Icon","Icon","normalizedAnchor_","anchorOrigin_","anchorOrigin","anchorXUnits_","anchorXUnits","anchorYUnits_","anchorYUnits","img","imgSize","iconImage_","IconImage_get","offset_","offsetOrigin_","offsetOrigin","setAnchor","iconImageSize","Style","geometryFunction_","defaultGeometryFunction","zIndex_","setRenderer","setImage","defaultStyles","createDefaultStyle","createEditingStyle","white","blue","style_Style","tileurlfunction_createFromTemplate","zRegEx","xRegEx","yRegEx","dashYRegEx","createFromTemplates","templates","tileUrlFunctions","createFromTileUrlFunctions","nullTileUrlFunction","expandUrl","urls","match","startCharCode","stopCharCode","stop","jsonp","opt_errback","opt_callbackParam","script","async","timer","getElementsByTagName","calculateSourceResolution","targetProj","targetMetersPerUnit","sourceMetersPerUnit","sourceExtent","compensationFactor","isFinite","enlargeClipPoint","centroidX","centroidY","dX","dY","reproj_render","targetExtent","triangulation","sources","opt_renderEdges","sourceDataExtent","canvasWidthInUnits","canvasHeightInUnits","stitchContext","stitchScale","xPos","yPos","srcWidth","srcHeight","targetTopLeft","getTriangles","triangle","u0","v0","u1","u2","sourceNumericalShiftX","sourceNumericalShiftY","affineCoefs","maxRow","maxEl","absValue","coef","solveLinearSystem","Triangulation_Triangulation","maxSourceExtent","errorThreshold","sourceProj_","targetProj_","transformInvCache","transformInv","transformInv_","maxSourceExtent_","errorThresholdSquared_","triangles_","wrapsXInSource_","canWrapXInSource_","sourceWorldWidth_","targetWorldWidth_","destinationTopLeft","destinationTopRight","destinationBottomRight","destinationBottomLeft","sourceTopLeft","sourceTopRight","sourceBottomRight","sourceBottomLeft","addQuad_","leftBound","newTriangle","addTriangle_","aSrc","bSrc","cSrc","dSrc","maxSubdivision","sourceQuadExtent","sourceCoverageX","sourceWorldWidth","wrapsX","needsSubdivision","centerSrc","bc","bcSrc","da","daSrc","ab","abSrc","cd","cdSrc","calculateSourceExtent","reproj_Triangulation","reproj_Tile","ReprojTile","targetTileGrid","getTileFunction","opt_errorThreshold","renderEdges_","gutter_","sourceTileGrid_","targetTileGrid_","wrappedTileCoord_","sourceTiles_","sourcesListenerKeys_","sourceZ_","maxTargetExtent","limitedTargetExtent","sourceProjExtent","errorThresholdInPixels","triangulation_","sourceRange","srcX","srcY","unlistenSources_","reproject_","leftToLoad","sourceListenKey","TileEventType","source_UrlTile","UrlTile","generateTileUrlFunction_","tileUrlFunction","setUrls","setUrl","setTileUrlFunction","tileLoadingKeys_","getTileLoadFunction","getTileUrlFunction","getUrls","setTileLoadFunction","defaultTileLoadFunction","source_TileImage","TileImage","tileClass","tileCacheForProjection","tileGridForProjection","reprojectionErrorThreshold_","reprojectionErrorThreshold","renderReprojectionEdges_","usedTileCache","getGutter","projKey","createTile_","urlTileCoord","tileUrl","newTile","getTileInternal","setRenderReprojectionEdges","setTileGridForProjection","tilegrid","proj","source_BingMaps","BingMaps","hidpi","hidpi_","culture_","culture","maxZoom_","apiKey_","imagerySet_","imagerySet","handleImageryMetadataResponse","getApiKey","getImagerySet","response","statusCode","statusDescription","authenticationResultCode","resourceSets","resources","resource","zoomMax","zoomMin","imageUrlSubdomains","subdomain","quadKeyTileCoord","imageUrl","digits","quadKey","imageryProviders","imageryProvider","intersecting","coverageAreas","coverageArea","source_XYZ","source_CartoDB","CartoDB","account_","account","mapId_","config_","templateCache_","initializeMap_","getConfig","updateConfig","setConfig","paramHash","stringify","applyTemplate_","mapUrl","client","handleInitResponse_","handleInitError_","setRequestHeader","tilesUrl","cdn_url","https","layergroupid","VectorEventType","ADDFEATURE","CHANGEFEATURE","REMOVEFEATURE","VectorSourceEvent","opt_feature","Vector","VectorSource","format_","url_","loader","strategy_","strategy","collection","useSpatialIndex","featuresRtree_","loadedExtentsRtree_","nullGeometryFeatures_","idIndex_","undefIdIndex_","featureChangeKeys_","featuresCollection_","addFeaturesInternal","bindFeaturesCollection_","addFeature","addFeatureInternal","featureKey","addToIndex_","setupChangeEvents_","handleFeatureChange_","valid","newFeatures","geometryFeatures","length$1","feature$1","featureKey$1","i$2","length$2","modifyingCollection","removeFeature","opt_fast","featureId","removeFeatureInternal","clearEvent","forEachFeature","forEachFeatureAtCoordinateDirect","forEachFeatureIntersectingExtent","getFeaturesCollection","getFeaturesAtCoordinate","getFeaturesInExtent","getClosestFeatureToCoordinate","opt_filter","closestFeature","previousMinSquaredDistance","minDistance","getFeatureById","getFormat","getUrl","sid","removeFromIdIndex_","loadedExtentsRtree","extentsToLoad","extentToLoad","removeLoadedExtent","removed","setLoader","source_Cluster","Cluster","geometryFunction","cluster","setDistance","mapDistance","clustered","neighbors","neighbor","createCluster","reproj_Image","ReprojImage","getImageFunction","sourceImage","sourcePixelRatio","targetResolution_","targetExtent_","sourceImage_","sourcePixelRatio_","sourceListenerKey_","unlistenSource_","ImageSourceEventType","ImageSourceEvent","defaultImageLoadFunction","source_Image","ImageSource","reprojectedImage_","reprojectedRevision_","findNearestResolution","getImageInternal","handleImageChange","ol_Image","ImageWrapper","imageLoadFunction","imageLoadFunction_","appendParams","uri","keyParams","encodeURIComponent","qs","source_ImageArcGISRest","ImageArcGISRest","params_","ratio_","getParams","F","FORMAT","TRANSPARENT","halfWidth","halfHeight","getRequestUrl_","getImageLoadFunction","srid","modifiedUrl","setImageLoadFunction","updateParams","source_ImageCanvas","ImageCanvasSource","canvasFunction_","canvasFunction","canvasElement","source_ImageMapGuide","ImageMapGuide","displayDpi_","displayDpi","useOverlay_","useOverlay","baseUrl","dpi","mcsW","mcsH","devW","devH","mpp","baseParams","OPERATION","LOCALE","CLIENTAGENT","CLIP","SETDISPLAYDPI","SETDISPLAYWIDTH","SETDISPLAYHEIGHT","SETVIEWSCALE","SETVIEWCENTERX","SETVIEWCENTERY","ImageStatic","Static","imageExtent_","getImageExtent","targetWidth","DEFAULT_WMS_VERSION","WMSServerType","GETFEATUREINFO_IMAGE_SIZE","source_ImageWMS","ImageWMS","v13_","updateV13_","serverType_","getGetFeatureInfoUrl","projectionObj","sourceProjectionObj","SERVICE","REQUEST","QUERY_LAYERS","viewExtent","requestExtent","version","ATTRIBUTION","source_OSM","OSM","Image_ImageLayer","ImageLayer","layer_Image","TileProperty","Tile_TileLayer","TileLayer","setPreload","setUseInterimTilesOnError","layer_Tile","RasterEventType","RasterOperationType","PIXEL","RasterSourceEvent","sharedContext","Raster_createRenderer","layerOrSource","createTileRenderer","createImageRenderer","Raster","RasterSource","worker_","operationType_","operationType","threads_","renderers_","createRenderers","Raster_getLayerStatesArray","requestedFrameState_","renderedImageCanvas_","setOperation","opt_lib","updateFrameState_","allSourcesReady_","ready","processSources_","imageDatas","onWorkerComplete_","ATTRIBUTIONS","LayerConfig","terrain","terrain-background","terrain-labels","terrain-lines","toner-background","toner","toner-hybrid","toner-labels","toner-lines","toner-lite","watercolor","ProviderConfig","source_Stamen","Stamen","provider","providerConfig","layerConfig","TileArcGISRest_tileUrlFunction","tmpExtent_","source_TileArcGISRest","TileArcGISRest","getKeyForParams_","TileDebug_LabeledTile","LabeledTile","strokeRect","source_TileDebug","TileDebug","textTileCoord","source_TileJSON","TileJSON","tileJSON_","handleTileJSONResponse","handleTileJSONError","onXHRLoad_","onXHRError_","tileJSON","getTileJSON","attributionExtent","TileWMS_tileUrlFunction","source_TileWMS","TileWMS","transparent","UTFGrid_CustomTile","CustomTile","preemptive","preemptive_","grid_","keys_","data_","jsonp_","getData","xRelative","yRelative","row","forDataAtCoordinate","opt_request","loadInternal_","handleError_","json","source_UTFGrid","UTFGrid","tileUrlFunction_","template_","getTemplate","forDataAtCoordinateAndResolution","grids","ol_VectorImageTile","VectorImageTile","sourceTiles","replayState_","sourceRevision_","loadListenerKeys_","sourceTileListenerKeys_","sourceZ","useLoadedOnly","loadCount","sourceTileKey","consumers","finishLoading_","errorSourceTiles","empty","defaultLoadFunction","onLoad","onError","DEFAULT_EXTENT","ol_VectorTile","VectorTile","features_","replayGroups_","setFeatures","source_VectorTile","tileGrids_","WMTSRequestEncoding","KVP","REST","source_WMTS","WMTS","requestEncoding","version_","dimensions_","dimensions","matrixSet_","requestEncoding_","getKeyForDimensions_","createFromWMTSTemplate","getDimensions","getMatrixSet","getRequestEncoding","getVersion","updateDimensions","tilematrixset","Service","Request","Version","Format","localContext","TileMatrix","TileCol","TileRow","TierSizeCalculation","TRUNCATED","Zoomify_CustomTile","zoomifyImage_","source_Zoomify","Zoomify","tierSizeCalculation","tierSizeInTiles","tileSizeForTierSizeCalculation","tileCountUpToTier","tileCoordZ","tileIndex","TileGroup","ZoomifyTileClass","Vector_Property","Vector_VectorLayer","VectorLayer","renderBuffer","declutter_","updateWhileAnimating_","updateWhileInteracting_","renderMode_","setDeclutter","setRenderOrder","toFunction","layer_Vector","Heatmap_Property","BLUR","GRADIENT","DEFAULT_GRADIENT","layer_Heatmap","Heatmap","gradient","blur","shadow","gradient_","shadow_","circleImage_","styleCache_","handleGradientChanged_","setGradient","setBlur","handleStyleChanged_","weightFunction","handleRender_","createCircle_","getBlur","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","toDataURL","getGradient","colors","createLinearGradient","step","addColorStop","createGradient","view8","VectorTile_VectorTileLayer","VectorTileLayer","layer_VectorTile","DragAndDropEventType","DragAndDropEvent","file","opt_features","handleDrop","files","dataTransfer","reader","FileReader","handleResult_","readAsText","handleStop","dropEffect","interaction_DragAndDrop","DragAndDrop","formatConstructors_","formatConstructors","dropListenKeys_","tryReadFeatures_","registerListeners_","dropArea","unregisterListeners_","interaction_DragRotateAndZoom","DragRotateAndZoom","lastMagnitude_","magnitude","angleDelta","Circle_Circle","setCenterAndRadius","getRadiusSquared_","geom_Circle","geom_MultiLineString","lineStrings","appendLineString","opt_interpolate","lineStringsCoordinateAtM","getLineString","getLineStrings","midpoints","intersectsLineStringArray","geom_MultiPoint","appendPoint","getPoint","center_linearRingss","geom_MultiPolygon","opt_endss","endss_","flatInteriorPointsRevision_","flatInteriorPoints_","polygons","appendPolygon","newEndss","multiArrayMaxSquaredDelta","assignClosestMultiArrayPoint","linearRingssContainsXY","linearRingss","getInteriorPoints","linearRingsAreOriented","simplifiedEndss","quantizeMultiArray","getPolygon","prevEnds","getPolygons","intersectsLinearRingMultiArray","deflateMultiCoordinatesArray","lastEnds","Draw_Mode","DrawEventType","DrawEvent","interaction_Draw","Draw","shouldHandle_","downPx_","downTimeout_","lastDragTime_","freehand_","snapTolerance_","snapTolerance","type_","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","finishCondition_","finishCondition","opt_geometry","squaredLength","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","getDefaultStyleFunction","geometryName","freehandCondition_","freehand","freehandCondition","updateState_","getOverlay","pass","addToDrawing_","startDrawing_","circleMode","finishDrawing","atFinish_","abortDrawing_","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","at","potentiallyDone","potentiallyFinishCoordinates","sketchCoords","finishCoordinate","finishPixel","updateSketchFeatures_","sketchLineGeom","ring","removeLastPoint","sketchFeature","sketchFeatures","overlaySource","ExtentEventType","EXTENTCHANGED","ExtentInteractionEvent","getPointHandler","fixedPoint","getEdgeHandler","fixedP1","fixedP2","Extent","ExtentInteraction","pointerHandler_","pixelTolerance_","pixelTolerance","snappedToVertex_","extentFeature_","vertexFeature_","extentOverlay_","boxStyle","getDefaultExtentStyleFunction","vertexOverlay_","pointerStyle","getDefaultPointerStyleFunction","snapToVertex_","pixelCoordinate","getSegments","closestSegment","vertex","vertexPixel","pixel1","pixel2","squaredDist1","squaredDist2","createOrUpdatePointerFeature_","createOrUpdateExtentFeature_","extentFeature","vertexFeature","getOpposingPoint","x_","y_","CIRCLE_CIRCUMFERENCE_INDEX","ModifyEventType","ModifyEvent","mapBrowserPointerEvent","compareIndexes","pointDistanceToSegmentDataSquared","pointCoordinates","segmentData","distanceToCenterSquared","distanceToCircumference","closestOnSegmentData","interaction_Modify","Modify","defaultDeleteCondition_","deleteCondition_","deleteCondition","insertVertexCondition_","insertVertexCondition","vertexSegments_","lastPixel_","ignoreNextSingleClick_","modified_","rBush_","changingFeature_","dragSegments_","Modify_getDefaultStyleFunction","SEGMENT_WRITERS_","writePointGeometry_","writeLineStringGeometry_","writePolygonGeometry_","writeMultiPointGeometry_","writeMultiLineStringGeometry_","writeMultiPolygonGeometry_","writeCircleGeometry_","writeGeometryCollectionGeometry_","handleSourceAdd_","handleSourceRemove_","addFeature_","handleFeatureAdd_","handleFeatureRemove_","lastPointerEvent_","handlePointerAtPixel_","willModifyFeatures_","removeFeature_","removeFeatureSegmentData_","rBush","nodesToRemove","rings","kk","centerSegmentData","circumferenceSegmentData","featureSegments","createOrUpdateVertexFeature_","removePoint","dragSegment","setGeometryCoordinates_","insertVertices","vertexExtent","segmentDataMatches","componentSegments","segmentDataMatch","insertVertex_","nodes","vertexSegments","rTree","updateSegmentIndices_","newSegmentData","newSegmentData2","removeVertex_","component","newIndex","dragSegments","segmentsByFeature","deleted","SelectEventType","SELECT","SelectEvent","selected","deselected","Select_handleEvent","addCondition_","removeCondition_","toggleCondition_","featureLayerAssociation_","filter_","addFeatureLayerAssociation_","multi_","layerFilter_","hitTolerance_","removeFeatureLayerAssociation_","interaction_Select","Select","addCondition","removeCondition","toggleCondition","multi","featureOverlay","Select_getDefaultStyleFunction","featureOverlay_","getHitTolerance","setHitTolerance","currentMap","selectedFeatures","getFeatureFromEvent","interaction_Snap","Snap","vertex_","edge_","featuresListenerKeys_","featureChangeListenerKeys_","indexedFeaturesExtents_","pendingFeatures_","pixelCoordinate_","sortByDistance_","deltaA","deltaB","opt_listen","register","feature_uid","segmentWriter","forEachFeatureAdd_","forEachFeatureRemove_","getFeatures_","snapTo","snapped","updateFeature_","featuresToUpdate","opt_unlisten","unregister","isCircle","closestOnCircle","TranslateEventType","TranslateEvent","interaction_Translate","Translate","lastCoordinate_","lastFeature_","handleActiveChanged_","featuresAtPixel_","newCoordinate","oldMap","cloneGeometries","clonedGeometries","geom_GeometryCollection","opt_geometries","geometries_","listenGeometriesChange_","unlistenGeometriesChange_","geometryCollection","setGeometries","simplifiedGeometries","simplified","simplifiedGeometryCollection","setGeometriesArray","Feature_FeatureFormat","defaultFeatureProjection","getReadOptions","adaptOptions","readFeature","readGeometry","writeFeature","writeFeatures","writeGeometry","format_Feature","transformWithOptions","transformed","decimals","getObject","format_JSONFeature","FeatureFormat","JSONFeature","readFeatureFromObject","readFeaturesFromObject","readGeometryFromObject","readProjectionFromObject","writeFeatureObject","writeFeaturesObject","writeGeometryObject","GEOMETRY_READERS","getGeometryLayout","paths","GEOMETRY_WRITERS","EsriJSON_readGeometry","esriJSONPolygon","flatRing","outerRings","matched","containsHole","convertRings","geometryReader","hasZ","hasM","getHasZM","EsriJSON_writeGeometry","geometryWriter","esriJSON","hasZM","multiPoint","multiLineString","format_EsriJSON","EsriJSON","esriJSONFeature","idField","attributes","esriJSONFeatures","objectIdFieldName","wkid","objects","format_XMLFeature","XMLFeature","xmlSerializer_","XMLSerializer","doc","readFeatureFromDocument","readFeatureFromNode","readFeaturesFromDocument","readFeaturesFromNode","ELEMENT_NODE","readGeometryFromDocument","readGeometryFromNode","readProjectionFromDocument","readProjectionFromNode","writeFeatureNode","serializeToString","writeFeaturesNode","writeGeometryNode","GMLNS","ONLY_WHITESPACE_RE","GMLBase_GMLBase","GMLBase","featureType","featureNS","srsName","schemaLocation","FEATURE_COLLECTION_PARSERS","namespace","featureMember","readFeaturesInternal","featureMembers","ft","featureTypes","ii$1","readFeatureElement","readGeometryElement","getAttribute","GEOMETRY_PARSERS","readFeatureElementInternal","asFeature","test","_content_","attName","fid","getAttributeNS","readPoint","readFlatCoordinatesFromNode_","readMultiPoint","MULTIPOINT_PARSERS_","readMultiLineString","MULTILINESTRING_PARSERS_","readMultiPolygon","MULTIPOLYGON_PARSERS_","pointMemberParser_","POINTMEMBER_PARSERS_","lineStringMemberParser_","LINESTRINGMEMBER_PARSERS_","polygonMemberParser_","POLYGONMEMBER_PARSERS_","readLineString","readFlatLinearRing_","GEOMETRY_FLAT_COORDINATES_PARSERS","readLinearRing","readPolygon","flatLinearRings","FLAT_LINEAR_RINGS_PARSERS","http://www.opengis.net/gml","pointMember","pointMembers","lineStringMember","lineStringMembers","polygonMember","polygonMembers","RING_PARSERS","format_GMLBase","readBooleanString","string","readDateTime","dateTime","readDecimal","readDecimalString","readNonNegativeInteger","readNonNegativeIntegerString","trim","writeBooleanTextNode","bool","writeStringTextNode","writeDecimalTextNode","toPrecision","writeNonNegativeIntegerTextNode","nonNegativeInteger","GML3_schemaLocation","MULTIGEOMETRY_TO_MEMBER_NODENAME","MultiCurve","MultiSurface","GML3_GML3","GML3","surface_","surface","curve_","curve","multiCurve_","multiCurve","multiSurface_","multiSurface","readMultiCurve_","MULTICURVE_PARSERS_","readMultiSurface_","MULTISURFACE_PARSERS_","curveMemberParser_","CURVEMEMBER_PARSERS_","surfaceMemberParser_","SURFACEMEMBER_PARSERS_","readPatch_","PATCHES_PARSERS_","readSegment_","SEGMENTS_PARSERS_","readPolygonPatch_","readLineStringSegment_","interiorParser_","flatLinearRing","exteriorParser_","readSurface_","SURFACE_PARSERS_","readCurve_","CURVE_PARSERS_","readEnvelope_","ENVELOPE_PARSERS_","readFlatPos_","re","containerSrs","readFlatPosList_","contextDimension","dim","writePos_","srsDimension","getCoords_","opt_srsName","opt_hasZ","writePosList_","writePoint_","writeEnvelope","ENVELOPE_SERIALIZERS_","writeLinearRing_","posList","RING_NODE_FACTORY_","exteriorWritten","writeSurfaceOrPolygon_","RING_SERIALIZERS_","patches","writeSurfacePatches_","writeCurveOrLineString_","writeCurveSegments_","writeMultiSurfaceOrPolygon_","SURFACEORPOLYGONMEMBER_SERIALIZERS_","MULTIGEOMETRY_MEMBER_NODE_FACTORY_","writeMultiPoint_","POINTMEMBER_SERIALIZERS_","writeMultiCurveOrLineString_","LINESTRINGORCURVEMEMBER_SERIALIZERS_","writeRing_","writeSurfaceOrPolygonMember_","GEOMETRY_NODE_FACTORY_","writePointMember_","writeLineStringOrCurveMember_","writeGeometryElement","GEOMETRY_SERIALIZERS_","writeFeatureElement","writeFeatureMembers_","setAttributeNS","interior","exterior","Surface","Curve","Envelope","curveMember","curveMembers","surfaceMember","surfaceMembers","lowerCorner","upperCorner","PolygonPatch","LineStringSegment","format_GML3","GML","format_GML","GML2_schemaLocation","GML2_MULTIGEOMETRY_TO_MEMBER_NODENAME","GML2_GML2","GML2","readFlatCoordinates_","coordsGroups","readBox_","BOX_PARSERS_","innerBoundaryIsParser_","outerBoundaryIsParser_","createCoordinatesNode_","writeCoordinates_","innerBoundaryIs","outerBoundaryIs","format_GML2","GML32","http://www.opengis.net/gml/3.2","format_GML32","NAMESPACE_URIS","FEATURE_READER","rte","readRte","trk","readTrk","wpt","readWpt","GPX_PARSERS","LINK_PARSERS","GPX_SERIALIZERS","RTE_SEQUENCE","RTE_SERIALIZERS","TRK_SEQUENCE","TRK_SERIALIZERS","writeWptType","GPX_GPX","GPX","readExtensions_","readExtensions","handleReadExtensions_","extensionsNode","featureReader","gpx","GPX_NODE_FACTORY","RTE_PARSERS","cmt","desc","link","parseLink","extensions","parseExtensions","rtept","RTEPT_PARSERS","rteValues","layoutOptions","GPX_appendCoordinate","ele","TRK_PARSERS","trkseg","TRKSEG_PARSERS","trkpt","TRKPT_PARSERS","trkValues","WPT_PARSERS","magvar","geoidheight","sym","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid","LINK_SEQUENCE","LINK_SERIALIZERS","writeLink","RTEPT_TYPE_SEQUENCE","TRKSEG_SERIALIZERS","TRKSEG_NODE_FACTORY","WPT_TYPE_SEQUENCE","WPT_TYPE_SERIALIZERS","date","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","GEOMETRY_TYPE_TO_NODENAME","applyLayoutOptions","href","format_GPX","GeoJSON_readGeometry","GeoJSON_readPointGeometry","GeoJSON_readLineStringGeometry","GeoJSON_readPolygonGeometry","GeoJSON_readMultiPointGeometry","GeoJSON_readMultiLineStringGeometry","GeoJSON_readMultiPolygonGeometry","readGeometryCollectionGeometry","GeoJSON_writeGeometry","geoJSON","GeoJSON_writePointGeometry","GeoJSON_writeLineStringGeometry","rightHanded","GeoJSON_writePolygonGeometry","GeoJSON_writeMultiPointGeometry","GeoJSON_writeMultiLineStringGeometry","GeoJSON_writeMultiPolygonGeometry","writeGeometryCollectionGeometry","format_GeoJSON","GeoJSON","extractGeometryName_","extractGeometryName","geoJSONFeature","geoJSONFeatures","crs","DEFAULT_COLOR","DEFAULT_IMAGE_STYLE_ANCHOR","DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS","DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS","DEFAULT_IMAGE_STYLE_SIZE","DEFAULT_IMAGE_STYLE_SRC","DEFAULT_IMAGE_SCALE_MULTIPLIER","format_TextFeature","TextFeature","readFeatureFromText","readFeaturesFromText","readGeometryFromText","readProjectionFromText","writeFeatureText","writeFeaturesText","writeGeometryText","IGCZ","BAROMETRIC","GPS","NONE","B_RECORD_RE","H_RECORD_RE","HFDTE_RECORD_RE","NEWLINE_RE","format_IGC","IGC","altitudeMode_","altitudeMode","year","month","day","lastDateTime","hour","minute","second","UTC","GX_NAMESPACE_URIS","KML_NAMESPACE_URIS","ICON_ANCHOR_UNITS_MAP","insetPixels","PLACEMARK_PARSERS","ExtendedData","extendedDataParser","Region","regionParser","MultiGeometry","readMultiGeometry","KML_readLineString","KML_readLinearRing","KML_readPoint","KML_readPolygon","readStyle","StyleMap","styleMapValue","readStyleMapValue","placemarkObject","address","description","phoneNumber","styleUrl","readURI","visibility","MultiTrack","GX_MULTITRACK_GEOMETRY_PARSERS","Track","readGxTrack","NETWORK_LINK_PARSERS","Link","KML_LINK_PARSERS","REGION_PARSERS","LatLonAltBox","LAT_LON_ALT_BOX_PARSERS","regionObject","Lod","LOD_PARSERS","lodObject","KML_SEQUENCE","KML_SERIALIZERS","Document","DOCUMENT_SERIALIZERS","DOCUMENT_NODE_FACTORY","Placemark","writePlacemark","DEFAULT_FILL_STYLE","DEFAULT_NO_IMAGE_STYLE","DEFAULT_IMAGE_STYLE","DEFAULT_TEXT_STROKE_STYLE","KML_DEFAULT_STROKE_STYLE","DEFAULT_TEXT_STYLE","DEFAULT_STYLE","DEFAULT_STYLE_ARRAY","KML_KML","KML","defaultStyle_","defaultStyle","extractStyles_","extractStyles","writeStyles_","writeStyles","sharedStyles_","showPointNames_","showPointNames","readDocumentOrFolder_","Folder","readPlacemark_","readSharedStyle_","readSharedStyleMap_","sharedStyles","nameStyle","drawName","createNameStyleFunction","foundStyle","findStyle","styleValue","createFeatureStyleFunction","styleUri","baseURI","location","fs","readName","readNameFromDocument","readNameFromNode","n$1","readNetworkLinks","networkLinks","readNetworkLinksFromDocument","readNetworkLinksFromNode","readRegion","regions","readRegionFromDocument","readRegionFromNode","kml","xmlnsUri","textOffset","imageScale","foundText","readColor","hexColor","readFlatCoordinates","readScale","STYLE_MAP_PARSERS","Pair","pairObject","PAIR_PARSERS","ICON_STYLE_PARSERS","iconObject","ICON_PARSERS","hotSpot","xunits","yunits","LABEL_STYLE_PARSERS","LINE_STYLE_PARSERS","POLY_STYLE_PARSERS","outline","FLAT_LINEAR_RING_PARSERS","readFlatLinearRing","GX_TRACK_PARSERS","when","whens","coord","gxTrackObject","readFlatCoordinatesFromNode","EXTRUDE_AND_ALTITUDE_MODE_PARSERS","extrude","tessellate","MULTI_GEOMETRY_PARSERS","multiGeometry","homogeneous","setCommonGeometryProperties","INNER_BOUNDARY_IS_PARSERS","OUTER_BOUNDARY_IS_PARSERS","STYLE_PARSERS","IconStyle","styleObject","IconObject","drawIcon","LabelStyle","LineStyle","PolyStyle","hasExtrude","hasTessellate","hasAltitudeMode","extrudes","tessellates","altitudeModes","DATA_PARSERS","displayName","EXTENDED_DATA_PARSERS","Data","featureObject","SchemaData","SCHEMA_DATA_PARSERS","SimpleData","minAltitude","maxAltitude","north","south","east","west","minLodPixels","maxLodPixels","minFadeExtent","maxFadeExtent","writeColorTextNode","rgba","abgr","hex","EXTENDEDDATA_NODE_SERIALIZERS","pair","createCDATASection","writeCDATASection","DATA_NODE_FACTORY","ICON_SEQUENCE","ICON_SERIALIZERS","GX_NODE_FACTORY","ICON_STYLE_SEQUENCE","ICON_STYLE_SERIALIZERS","icon","vec2","writeScaleTextNode","LABEL_STYLE_SEQUENCE","LABEL_STYLE_SERIALIZERS","LINE_STYLE_SEQUENCE","LINE_STYLE_SERIALIZERS","KML_GEOMETRY_TYPE_TO_NODENAME","GEOMETRY_NODE_FACTORY","POINT_NODE_FACTORY","LINE_STRING_NODE_FACTORY","LINEAR_RING_NODE_FACTORY","POLYGON_NODE_FACTORY","MULTI_GEOMETRY_SERIALIZERS","writePrimitiveGeometry","writePolygon","writeMultiGeometry","BOUNDARY_IS_SERIALIZERS","writeBoundaryIs","PLACEMARK_SERIALIZERS","namesAndValues","names","STYLE_SEQUENCE","STYLE_SERIALIZERS","PLACEMARK_SEQUENCE","EXTENDEDDATA_NODE_FACTORY","v","PRIMITIVE_GEOMETRY_SEQUENCE","PRIMITIVE_GEOMETRY_SERIALIZERS","d$1","POLYGON_SERIALIZERS","INNER_BOUNDARY_NODE_FACTORY","OUTER_BOUNDARY_NODE_FACTORY","POLY_STYLE_SERIALIZERS","COLOR_NODE_FACTORY","iconProperties","format_KML","Feature_tmpTransform","RenderFeature","flatCoordinates_","flatMidpoints_","properties_","midpoint","render_Feature","layersPBFReader","layerPBFReader","featurePBFReader","readRawFeature","format_MVT","MVT","featureClass_","featureClass","layerName_","layerName","layers_","readRawGeometry_","cmd","coordsLen","currentEnd","cmdLen","createFeature_","rawFeature","getGeometryType","prevEndIndex","pbf_default","pbfLayers","pbfLayer","OSMXML_NAMESPACE_URIS","WAY_PARSERS","nd","ndrefs","readTag","PARSERS","tags","NODE_PARSERS","way","ways","OSMXML_OSMXML","OSMXML","format_OSMXML","flipXY","opt_destOffset","destOffset","encodeDeltas","numbers","opt_factor","factor","lastNumbers","encodeFloats","decodeDeltas","encoded","decodeFloats","encodeUnsignedInteger","encodeUnsignedIntegers","encodeSignedIntegers","current","decodeUnsignedIntegers","decodeSignedIntegers","format_Polyline","Polyline","factor_","geometryLayout_","geometryLayout","TopoJSON_GEOMETRY_READERS","transformVertex","arcs","concatenateArcs","polyArray","ringCoords","readFeaturesFromGeometryCollection","readFeatureFromGeometry","transformArc","format_TopoJSON","TopoJSON","topoJSONTopology","transformArcs","topoJSONFeatures","objectName","Filter_Filter","tagName_","getTagName","filter_Filter","filter_LogicalNary","Filter","LogicalNary","conditions","filter_And","And","filter_Bbox","Bbox","filter_Spatial","Spatial","filter_Contains","Contains","filter_Comparison","Comparison","propertyName","filter_During","During","filter_ComparisonBinary","ComparisonBinary","expression","opt_matchCase","matchCase","filter_EqualTo","EqualTo","filter_GreaterThan","GreaterThan","filter_GreaterThanOrEqualTo","GreaterThanOrEqualTo","filter_Intersects","Intersects","filter_IsBetween","IsBetween","lowerBoundary","upperBoundary","filter_IsLike","IsLike","pattern","opt_wildCard","opt_singleChar","opt_escapeChar","wildCard","singleChar","escapeChar","filter_IsNull","IsNull","filter_LessThan","LessThan","filter_LessThanOrEqualTo","LessThanOrEqualTo","filter_Not","Not","filter_NotEqualTo","NotEqualTo","filter_Or","Or","filter_Within","Within","and","filter_bbox","boundedBy","TRANSACTION_SUMMARY_PARSERS","http://www.opengis.net/wfs","totalInserted","totalUpdated","totalDeleted","TRANSACTION_RESPONSE_PARSERS","TransactionSummary","InsertResults","INSERT_RESULTS_PARSERS","QUERY_SERIALIZERS","PropertyName","TRANSACTION_SERIALIZERS","Insert","gmlVersion","Update","featurePrefix","typeName","getTypeName","XMLNS","writeOgcFidFilter","Delete","WFSNS","Native","nativeElement","vendorId","safeToIgnore","FEATURE_PREFIX","OGCNS","FESNS","SCHEMA_LOCATIONS","1.1.0","1.0.0","DEFAULT_VERSION","WFS_WFS","WFS","featureType_","featureNS_","gmlFormat_","gmlFormat","schemaLocation_","getFeatureType","setFeatureType","readTransactionResponse","readTransactionResponseFromDocument","readTransactionResponseFromNode","readFeatureCollectionMetadata","readFeatureCollectionMetadataFromDocument","readFeatureCollectionMetadataFromNode","writeGetFeature","handle","outputFormat","maxFeatures","resultType","viewParams","propertyNames","GETFEATURE_SERIALIZERS","writeTransaction","inserts","updates","deletes","baseObj","gmlOptions","nativeElements","OGC_FID_PARSERS","http://www.opengis.net/ogc","FeatureId","prefix","Query","writeFilterCondition","valueReference","timePeriod","writeTimeInstant","writeLogicalFilter","BBOX","writeOgcPropertyName","PropertyIsEqualTo","writeComparisonFilter","PropertyIsNotEqualTo","PropertyIsLessThan","PropertyIsLessThanOrEqualTo","PropertyIsGreaterThan","PropertyIsGreaterThanOrEqualTo","PropertyIsNull","PropertyIsBetween","writeOgcLiteral","PropertyIsLike","writeOgcExpression","timeInstant","timePosition","format_WFS","GeometryConstructor","LINESTRING","MULTIPOINT","MULTILINESTRING","MULTIPOLYGON","Z","TokenType","WKTGeometryType","WKT_type","toUpperCase","Lexer","wkt","index_","isAlpha_","isNumeric_","opt_decimal","isWhiteSpace_","nextChar_","nextToken","readNumber_","readText_","scientificNotation","substring","WKT_Parser","lexer","lexer_","token_","layout_","encodePointGeometry","encodeLineStringGeometry","encodePolygonGeometry","consume_","isTokenType","isMatch","parseGeometry_","parseGeometryLayout_","dimToken","dimInfo","parseGeometryCollectionText_","isEmptyGeometry_","formatErrorMessage_","parsePointText_","parsePoint_","parseLineStringText_","parsePointList_","parsePolygonText_","parseLineStringTextList_","parseMultiPointText_","parsePointTextList_","parseMultiLineStringText_","parseMultiPolygonText_","parsePolygonTextList_","token","geomType","GeometryEncoder","components","geoms","encode","enc","geometryEncoder","encodeGeometryLayout","format_WKT","WKT","splitCollection_","splitCollection","parse_","NAMESPACE_URI","readHref","XML_XML","readFromDocument","readFromNode","format_XML","WMSCapabilities_NAMESPACE_URIS","WMSCapabilities_PARSERS","SERVICE_PARSERS","Capability","CAPABILITY_PARSERS","REQUEST_PARSERS","Exception","EXCEPTION_PARSERS","LAYER_PARSERS","WMSCapabilities_WMSCapabilities","WMSCapabilities","wmsCapabilityObject","Name","Title","Abstract","KeywordList","readKeywordList","OnlineResource","ContactInformation","CONTACT_INFORMATION_PARSERS","Fees","AccessConstraints","LayerLimit","MaxWidth","MaxHeight","ContactPersonPrimary","CONTACT_PERSON_PARSERS","ContactPosition","ContactAddress","CONTACT_ADDRESS_PARSERS","ContactVoiceTelephone","ContactFacsimileTelephone","ContactElectronicMailAddress","ContactPerson","ContactOrganization","AddressType","Address","City","StateOrProvince","PostCode","Country","CRS","EX_GeographicBoundingBox","geographicBoundingBox","EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS","westBoundLongitude","southBoundLatitude","eastBoundLongitude","northBoundLatitude","BoundingBox","Dimension","unitSymbol","multipleValues","nearestValue","ATTRIBUTION_PARSERS","AuthorityURL","authorityObject","readFormatOnlineresource","Identifier","MetadataURL","metadataObject","DataURL","FeatureListURL","WMSCapabilities_STYLE_PARSERS","MinScaleDenominator","MaxScaleDenominator","parentLayerObject","layerObject","queryable","cascaded","noSubsets","fixedWidth","fixedHeight","childValue","parentValue","LogoURL","readSizedFormatOnlineresource","GetCapabilities","readOperationType","GetMap","GetFeatureInfo","OPERATIONTYPE_PARSERS","DCPType","DCPTYPE_PARSERS","HTTP","HTTP_PARSERS","Get","Post","LegendURL","StyleSheetURL","StyleURL","FORMAT_ONLINERESOURCE_PARSERS","KEYWORDLIST_PARSERS","Keyword","formatOnlineresource","format_WMSCapabilities","format_WMSGetFeatureInfo","WMSGetFeatureInfo","readFeatures_","layerElement","layerFeatures","gmlFeatures","OWS_NAMESPACE_URIS","OWS_PARSERS","ServiceIdentification","SERVICE_IDENTIFICATION_PARSERS","ServiceProvider","SERVICE_PROVIDER_PARSERS","OperationsMetadata","OPERATIONS_METADATA_PARSERS","OWS_OWS","OWS","owsObject","ADDRESS_PARSERS","DeliveryPoint","AdministrativeArea","PostalCode","ElectronicMailAddress","ALLOWED_VALUES_PARSERS","Value","CONSTRAINT_PARSERS","AllowedValues","CONTACT_INFO_PARSERS","Phone","PHONE_PARSERS","DCP_PARSERS","OWS_HTTP_PARSERS","REQUEST_METHOD_PARSERS","OPERATION_PARSERS","DCP","Operation","Voice","Facsimile","Constraint","SERVICE_CONTACT_PARSERS","IndividualName","PositionName","ContactInfo","ServiceTypeVersion","ServiceType","ProviderName","ProviderSite","ServiceContact","format_OWS","WMTSCapabilities_NAMESPACE_URIS","WMTSCapabilities_OWS_NAMESPACE_URIS","WMTSCapabilities_PARSERS","Contents","CONTENTS_PARSERS","WMTSCapabilities_WMTSCapabilities","WMTSCapabilities","owsParser_","WMTSCapabilityObject","WMTSCapabilities_LAYER_PARSERS","TileMatrixSet","TMS_PARSERS","WMTSCapabilities_STYLE_PARSERS","isDefault","TileMatrixSetLink","TMS_LINKS_PARSERS","DIMENSION_PARSERS","ResourceURL","resourceType","WGS84BoundingBox","WGS84_BBOX_READERS","legend","TileMatrixSetLimits","TMS_LIMITS_LIST_PARSERS","TileMatrixLimits","TMS_LIMITS_PARSERS","MinTileRow","MaxTileRow","MinTileCol","MaxTileCol","LowerCorner","readCoordinates","UpperCorner","WellKnownScaleSet","TM_PARSERS","SupportedCRS","TopLeftCorner","ScaleDenominator","TileWidth","TileHeight","MatrixWidth","MatrixHeight","format_WMTSCapabilities","getChangeType","changeType","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","requestFullscreen","isFullScreenSupported","mozFullScreenEnabled","msFullscreenEnabled","fullscreenEnabled","isFullScreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement","fullscreenElement","requestFullScreen","control_FullScreen","FullScreen","cssClassName_","labelNode_","labelActive","labelActiveNode_","button_","setClassName_","handleFullScreen_","exitFullscreen","msExitFullscreen","mozCancelFullScreen","webkitExitFullscreen","mozRequestFullScreenWithKeys","requestFullScreenWithKeys","handleFullScreenChange_","fullscreen","activeClassName","inactiveClassName","nextClassName","MousePosition_render","mapProjection_","control_MousePosition","MousePosition","coordinateFormat","setCoordinateFormat","undefinedHTML_","undefinedHTML","renderOnMouseOut_","renderedHTML_","lastMouseMovePixel_","getCoordinateFormat","handleMouseMove","updateHTML_","handleMouseOut","html","OverviewMap_render","validateExtent_","updateBox_","control_OverviewMap","OverviewMap","ovmapDiv_","ovmap_","ovmap","boxSizing","boxOverlay_","scope","overlayBox","mousePosition","endMoving","oldView","unbindView_","handleMapPropertyChange_","bindView_","resetExtent_","newView","handleRotationChanged_","ovmapSize","ovextent","topLeftPixel","bottomRightPixel","boxWidth","boxHeight","ovmapWidth","ovmapHeight","recenter_","ovview","steps","MAX_RATIO","ovresolution","rotateBottomLeft","calculateCoordinateRotate_","coordinateRotate","getOverviewMap","UNITS_PROP","ScaleLine_Units","IMPERIAL","NAUTICAL","METRIC","US","LEADING_DIGITS","ScaleLine_render","viewState_","control_ScaleLine","ScaleLine","innerElement_","minWidth_","minWidth","renderedWidth_","handleUnitsChanged_","setUnits","pointResolutionUnits","nominalCount","suffix","metersPerDegree","Direction","VERTICAL","HORIZONTAL","ZoomSlider_render","sliderInitialized_","initSlider_","currentResolution_","setThumbPosition_","control_ZoomSlider","ZoomSlider","direction_","heightLimit_","widthLimit_","previousX_","previousY_","thumbSize_","thumbElement","containerElement","dragger_","handleDraggerStart_","handleDraggerDrag_","handleDraggerEnd_","handleContainerClick_","containerSize","thumb","thumbWidth","thumbHeight","relativePosition","getRelativePosition_","getResolutionForPosition_","drag","getPositionForResolution_","control_ZoomToExtent","ZoomToExtent","handleZoomToExtent","ol","colorlike","featureloader","loadingstrategy","proj4","webgl","sphere","Graticule","unByKey","createStringXY","toStringHDMS","upAndDown","click","doubleClick","platformModifierKeyOnly","writeFilter","between","during","equalTo","greaterThan","greaterThanOrEqualTo","isNull","lessThan","lessThanOrEqualTo","like","not","notEqualTo","or","within","inherits","childCtor","parentCtor","createBox","boxCoordinates","createRegularPolygon","fromLonLat","projCodes","defs","def","axis","to_meter","code1","proj1","code2","proj2","toLonLat","lonLat","toContext","optionsFromCapabilities","wmtsCap","tileMatrixSets","supportedCRS","matrixSetObj","projConfig","wgs84BoundingBox","wgs84ProjectionExtent","gets","encodings","sphere_getArea","sphere_getLength","AtlasManager","__webpack_exports__"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,GAA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Q,oBACrB,IAAA2wD,EAAiF,EAAAkgB,gBACjF,IAAAh7F,EAAA,EAAA6Y,EAAAiiE,EAAA53E,OAAyClD,EAAA6Y,IAAQ7Y,EACjDkD,GAAkBojM,EAASxrH,EAAA96E,GAAA6f,GAE3B,MAEA,QACA,UAAApS,MAAA,8BAAAtD,GAGA,OAAAjH,G6T8ZAy/L,GAAAzgL,MAAAqkL,aAAwBznF,GACxB6jF,GAAAzgL,MAAAuzE,OAAkB4gC,GAClBssE,GAAAzgL,MAAAypB,KAAgBM,GAChB02J,GAAAzgL,MAAAo1G,KAAgBD,GAChBsrE,GAAAzgL,MAAA87D,eAAAS,OAAiCA,GACjCkkH,GAAAzgL,MAAAyzE,MAAiB++B,GACjBiuE,GAAAzgL,MAAA2yG,aAAwBF,GACxBguE,GAAAzgL,MAAAgqB,OAAkBsB,GAClBm1J,GAAAzgL,MAAAq2G,MAAiBW,GACjBypE,GAAAzgL,MAAA0zE,KAAgBhkD,GAChB+wJ,GAAA/+D,SAAAtQ,SAAuBzJ,GACvB84E,GAAA/+D,SAAAkX,KAAmBnnB,GACnBgvE,GAAA/+D,SAAAkX,KAAAlnB,gCAAmDA,GACnD+uE,GAAA/+D,SAAArZ,UAAwBA,GACxBo4E,GAAA9xE,IAAAb,kBAA2BA,GAC3B2yE,GAAA9xE,IAAAD,MAAeA,GAEA41E,EAAA","file":"ol.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ol\"] = factory();\n\telse\n\t\troot[\"ol\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 9);\n","'use strict';\n\nmodule.exports = rbush;\nmodule.exports.default = rbush;\n\nvar quickselect = require('quickselect');\n\nfunction rbush(maxEntries, format) {\n    if (!(this instanceof rbush)) return new rbush(maxEntries, format);\n\n    // max entries in a node is 9 by default; min node fill is 40% for best performance\n    this._maxEntries = Math.max(4, maxEntries || 9);\n    this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\n\n    if (format) {\n        this._initFormat(format);\n    }\n\n    this.clear();\n}\n\nrbush.prototype = {\n\n    all: function () {\n        return this._all(this.data, []);\n    },\n\n    search: function (bbox) {\n\n        var node = this.data,\n            result = [],\n            toBBox = this.toBBox;\n\n        if (!intersects(bbox, node)) return result;\n\n        var nodesToSearch = [],\n            i, len, child, childBBox;\n\n        while (node) {\n            for (i = 0, len = node.children.length; i < len; i++) {\n\n                child = node.children[i];\n                childBBox = node.leaf ? toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf) result.push(child);\n                    else if (contains(bbox, childBBox)) this._all(child, result);\n                    else nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return result;\n    },\n\n    collides: function (bbox) {\n\n        var node = this.data,\n            toBBox = this.toBBox;\n\n        if (!intersects(bbox, node)) return false;\n\n        var nodesToSearch = [],\n            i, len, child, childBBox;\n\n        while (node) {\n            for (i = 0, len = node.children.length; i < len; i++) {\n\n                child = node.children[i];\n                childBBox = node.leaf ? toBBox(child) : child;\n\n                if (intersects(bbox, childBBox)) {\n                    if (node.leaf || contains(bbox, childBBox)) return true;\n                    nodesToSearch.push(child);\n                }\n            }\n            node = nodesToSearch.pop();\n        }\n\n        return false;\n    },\n\n    load: function (data) {\n        if (!(data && data.length)) return this;\n\n        if (data.length < this._minEntries) {\n            for (var i = 0, len = data.length; i < len; i++) {\n                this.insert(data[i]);\n            }\n            return this;\n        }\n\n        // recursively build the tree with the given data from scratch using OMT algorithm\n        var node = this._build(data.slice(), 0, data.length - 1, 0);\n\n        if (!this.data.children.length) {\n            // save as is if tree is empty\n            this.data = node;\n\n        } else if (this.data.height === node.height) {\n            // split root if trees have the same height\n            this._splitRoot(this.data, node);\n\n        } else {\n            if (this.data.height < node.height) {\n                // swap trees if inserted one is bigger\n                var tmpNode = this.data;\n                this.data = node;\n                node = tmpNode;\n            }\n\n            // insert the small tree into the large tree at appropriate level\n            this._insert(node, this.data.height - node.height - 1, true);\n        }\n\n        return this;\n    },\n\n    insert: function (item) {\n        if (item) this._insert(item, this.data.height - 1);\n        return this;\n    },\n\n    clear: function () {\n        this.data = createNode([]);\n        return this;\n    },\n\n    remove: function (item, equalsFn) {\n        if (!item) return this;\n\n        var node = this.data,\n            bbox = this.toBBox(item),\n            path = [],\n            indexes = [],\n            i, parent, index, goingUp;\n\n        // depth-first iterative tree traversal\n        while (node || path.length) {\n\n            if (!node) { // go up\n                node = path.pop();\n                parent = path[path.length - 1];\n                i = indexes.pop();\n                goingUp = true;\n            }\n\n            if (node.leaf) { // check current node\n                index = findItem(item, node.children, equalsFn);\n\n                if (index !== -1) {\n                    // item found, remove the item and condense tree upwards\n                    node.children.splice(index, 1);\n                    path.push(node);\n                    this._condense(path);\n                    return this;\n                }\n            }\n\n            if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\n                path.push(node);\n                indexes.push(i);\n                i = 0;\n                parent = node;\n                node = node.children[0];\n\n            } else if (parent) { // go right\n                i++;\n                node = parent.children[i];\n                goingUp = false;\n\n            } else node = null; // nothing found\n        }\n\n        return this;\n    },\n\n    toBBox: function (item) { return item; },\n\n    compareMinX: compareNodeMinX,\n    compareMinY: compareNodeMinY,\n\n    toJSON: function () { return this.data; },\n\n    fromJSON: function (data) {\n        this.data = data;\n        return this;\n    },\n\n    _all: function (node, result) {\n        var nodesToSearch = [];\n        while (node) {\n            if (node.leaf) result.push.apply(result, node.children);\n            else nodesToSearch.push.apply(nodesToSearch, node.children);\n\n            node = nodesToSearch.pop();\n        }\n        return result;\n    },\n\n    _build: function (items, left, right, height) {\n\n        var N = right - left + 1,\n            M = this._maxEntries,\n            node;\n\n        if (N <= M) {\n            // reached leaf level; return leaf\n            node = createNode(items.slice(left, right + 1));\n            calcBBox(node, this.toBBox);\n            return node;\n        }\n\n        if (!height) {\n            // target height of the bulk-loaded tree\n            height = Math.ceil(Math.log(N) / Math.log(M));\n\n            // target number of root entries to maximize storage utilization\n            M = Math.ceil(N / Math.pow(M, height - 1));\n        }\n\n        node = createNode([]);\n        node.leaf = false;\n        node.height = height;\n\n        // split the items into M mostly square tiles\n\n        var N2 = Math.ceil(N / M),\n            N1 = N2 * Math.ceil(Math.sqrt(M)),\n            i, j, right2, right3;\n\n        multiSelect(items, left, right, N1, this.compareMinX);\n\n        for (i = left; i <= right; i += N1) {\n\n            right2 = Math.min(i + N1 - 1, right);\n\n            multiSelect(items, i, right2, N2, this.compareMinY);\n\n            for (j = i; j <= right2; j += N2) {\n\n                right3 = Math.min(j + N2 - 1, right2);\n\n                // pack each entry recursively\n                node.children.push(this._build(items, j, right3, height - 1));\n            }\n        }\n\n        calcBBox(node, this.toBBox);\n\n        return node;\n    },\n\n    _chooseSubtree: function (bbox, node, level, path) {\n\n        var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\n\n        while (true) {\n            path.push(node);\n\n            if (node.leaf || path.length - 1 === level) break;\n\n            minArea = minEnlargement = Infinity;\n\n            for (i = 0, len = node.children.length; i < len; i++) {\n                child = node.children[i];\n                area = bboxArea(child);\n                enlargement = enlargedArea(bbox, child) - area;\n\n                // choose entry with the least area enlargement\n                if (enlargement < minEnlargement) {\n                    minEnlargement = enlargement;\n                    minArea = area < minArea ? area : minArea;\n                    targetNode = child;\n\n                } else if (enlargement === minEnlargement) {\n                    // otherwise choose one with the smallest area\n                    if (area < minArea) {\n                        minArea = area;\n                        targetNode = child;\n                    }\n                }\n            }\n\n            node = targetNode || node.children[0];\n        }\n\n        return node;\n    },\n\n    _insert: function (item, level, isNode) {\n\n        var toBBox = this.toBBox,\n            bbox = isNode ? item : toBBox(item),\n            insertPath = [];\n\n        // find the best node for accommodating the item, saving all nodes along the path too\n        var node = this._chooseSubtree(bbox, this.data, level, insertPath);\n\n        // put the item into the node\n        node.children.push(item);\n        extend(node, bbox);\n\n        // split on node overflow; propagate upwards if necessary\n        while (level >= 0) {\n            if (insertPath[level].children.length > this._maxEntries) {\n                this._split(insertPath, level);\n                level--;\n            } else break;\n        }\n\n        // adjust bboxes along the insertion path\n        this._adjustParentBBoxes(bbox, insertPath, level);\n    },\n\n    // split overflowed node into two\n    _split: function (insertPath, level) {\n\n        var node = insertPath[level],\n            M = node.children.length,\n            m = this._minEntries;\n\n        this._chooseSplitAxis(node, m, M);\n\n        var splitIndex = this._chooseSplitIndex(node, m, M);\n\n        var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\n        newNode.height = node.height;\n        newNode.leaf = node.leaf;\n\n        calcBBox(node, this.toBBox);\n        calcBBox(newNode, this.toBBox);\n\n        if (level) insertPath[level - 1].children.push(newNode);\n        else this._splitRoot(node, newNode);\n    },\n\n    _splitRoot: function (node, newNode) {\n        // split root node\n        this.data = createNode([node, newNode]);\n        this.data.height = node.height + 1;\n        this.data.leaf = false;\n        calcBBox(this.data, this.toBBox);\n    },\n\n    _chooseSplitIndex: function (node, m, M) {\n\n        var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\n\n        minOverlap = minArea = Infinity;\n\n        for (i = m; i <= M - m; i++) {\n            bbox1 = distBBox(node, 0, i, this.toBBox);\n            bbox2 = distBBox(node, i, M, this.toBBox);\n\n            overlap = intersectionArea(bbox1, bbox2);\n            area = bboxArea(bbox1) + bboxArea(bbox2);\n\n            // choose distribution with minimum overlap\n            if (overlap < minOverlap) {\n                minOverlap = overlap;\n                index = i;\n\n                minArea = area < minArea ? area : minArea;\n\n            } else if (overlap === minOverlap) {\n                // otherwise choose distribution with minimum area\n                if (area < minArea) {\n                    minArea = area;\n                    index = i;\n                }\n            }\n        }\n\n        return index;\n    },\n\n    // sorts node children by the best axis for split\n    _chooseSplitAxis: function (node, m, M) {\n\n        var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\n            compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\n            xMargin = this._allDistMargin(node, m, M, compareMinX),\n            yMargin = this._allDistMargin(node, m, M, compareMinY);\n\n        // if total distributions margin value is minimal for x, sort by minX,\n        // otherwise it's already sorted by minY\n        if (xMargin < yMargin) node.children.sort(compareMinX);\n    },\n\n    // total margin of all possible split distributions where each node is at least m full\n    _allDistMargin: function (node, m, M, compare) {\n\n        node.children.sort(compare);\n\n        var toBBox = this.toBBox,\n            leftBBox = distBBox(node, 0, m, toBBox),\n            rightBBox = distBBox(node, M - m, M, toBBox),\n            margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\n            i, child;\n\n        for (i = m; i < M - m; i++) {\n            child = node.children[i];\n            extend(leftBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(leftBBox);\n        }\n\n        for (i = M - m - 1; i >= m; i--) {\n            child = node.children[i];\n            extend(rightBBox, node.leaf ? toBBox(child) : child);\n            margin += bboxMargin(rightBBox);\n        }\n\n        return margin;\n    },\n\n    _adjustParentBBoxes: function (bbox, path, level) {\n        // adjust bboxes along the given tree path\n        for (var i = level; i >= 0; i--) {\n            extend(path[i], bbox);\n        }\n    },\n\n    _condense: function (path) {\n        // go through the path, removing empty nodes and updating bboxes\n        for (var i = path.length - 1, siblings; i >= 0; i--) {\n            if (path[i].children.length === 0) {\n                if (i > 0) {\n                    siblings = path[i - 1].children;\n                    siblings.splice(siblings.indexOf(path[i]), 1);\n\n                } else this.clear();\n\n            } else calcBBox(path[i], this.toBBox);\n        }\n    },\n\n    _initFormat: function (format) {\n        // data format (minX, minY, maxX, maxY accessors)\n\n        // uses eval-type function compilation instead of just accepting a toBBox function\n        // because the algorithms are very sensitive to sorting functions performance,\n        // so they should be dead simple and without inner calls\n\n        var compareArr = ['return a', ' - b', ';'];\n\n        this.compareMinX = new Function('a', 'b', compareArr.join(format[0]));\n        this.compareMinY = new Function('a', 'b', compareArr.join(format[1]));\n\n        this.toBBox = new Function('a',\n            'return {minX: a' + format[0] +\n            ', minY: a' + format[1] +\n            ', maxX: a' + format[2] +\n            ', maxY: a' + format[3] + '};');\n    }\n};\n\nfunction findItem(item, items, equalsFn) {\n    if (!equalsFn) return items.indexOf(item);\n\n    for (var i = 0; i < items.length; i++) {\n        if (equalsFn(item, items[i])) return i;\n    }\n    return -1;\n}\n\n// calculate node's bbox from bboxes of its children\nfunction calcBBox(node, toBBox) {\n    distBBox(node, 0, node.children.length, toBBox, node);\n}\n\n// min bounding rectangle of node children from k to p-1\nfunction distBBox(node, k, p, toBBox, destNode) {\n    if (!destNode) destNode = createNode(null);\n    destNode.minX = Infinity;\n    destNode.minY = Infinity;\n    destNode.maxX = -Infinity;\n    destNode.maxY = -Infinity;\n\n    for (var i = k, child; i < p; i++) {\n        child = node.children[i];\n        extend(destNode, node.leaf ? toBBox(child) : child);\n    }\n\n    return destNode;\n}\n\nfunction extend(a, b) {\n    a.minX = Math.min(a.minX, b.minX);\n    a.minY = Math.min(a.minY, b.minY);\n    a.maxX = Math.max(a.maxX, b.maxX);\n    a.maxY = Math.max(a.maxY, b.maxY);\n    return a;\n}\n\nfunction compareNodeMinX(a, b) { return a.minX - b.minX; }\nfunction compareNodeMinY(a, b) { return a.minY - b.minY; }\n\nfunction bboxArea(a)   { return (a.maxX - a.minX) * (a.maxY - a.minY); }\nfunction bboxMargin(a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\n\nfunction enlargedArea(a, b) {\n    return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\n           (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\n}\n\nfunction intersectionArea(a, b) {\n    var minX = Math.max(a.minX, b.minX),\n        minY = Math.max(a.minY, b.minY),\n        maxX = Math.min(a.maxX, b.maxX),\n        maxY = Math.min(a.maxY, b.maxY);\n\n    return Math.max(0, maxX - minX) *\n           Math.max(0, maxY - minY);\n}\n\nfunction contains(a, b) {\n    return a.minX <= b.minX &&\n           a.minY <= b.minY &&\n           b.maxX <= a.maxX &&\n           b.maxY <= a.maxY;\n}\n\nfunction intersects(a, b) {\n    return b.minX <= a.maxX &&\n           b.minY <= a.maxY &&\n           b.maxX >= a.minX &&\n           b.maxY >= a.minY;\n}\n\nfunction createNode(children) {\n    return {\n        children: children,\n        height: 1,\n        leaf: true,\n        minX: Infinity,\n        minY: Infinity,\n        maxX: -Infinity,\n        maxY: -Infinity\n    };\n}\n\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\n// combines selection algorithm with binary divide & conquer approach\n\nfunction multiSelect(arr, left, right, n, compare) {\n    var stack = [left, right],\n        mid;\n\n    while (stack.length) {\n        right = stack.pop();\n        left = stack.pop();\n\n        if (right - left <= n) continue;\n\n        mid = left + Math.ceil((right - left) / n / 2) * n;\n        quickselect(arr, mid, left, right, compare);\n\n        stack.push(left, mid, mid, right);\n    }\n}\n","'use strict';\n\nmodule.exports = Pbf;\n\nvar ieee754 = require('ieee754');\n\nfunction Pbf(buf) {\n    this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);\n    this.pos = 0;\n    this.type = 0;\n    this.length = this.buf.length;\n}\n\nPbf.Varint  = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum\nPbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64\nPbf.Bytes   = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields\nPbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32\n\nvar SHIFT_LEFT_32 = (1 << 16) * (1 << 16),\n    SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;\n\nPbf.prototype = {\n\n    destroy: function() {\n        this.buf = null;\n    },\n\n    // === READING =================================================================\n\n    readFields: function(readField, result, end) {\n        end = end || this.length;\n\n        while (this.pos < end) {\n            var val = this.readVarint(),\n                tag = val >> 3,\n                startPos = this.pos;\n\n            this.type = val & 0x7;\n            readField(tag, result, this);\n\n            if (this.pos === startPos) this.skip(val);\n        }\n        return result;\n    },\n\n    readMessage: function(readField, result) {\n        return this.readFields(readField, result, this.readVarint() + this.pos);\n    },\n\n    readFixed32: function() {\n        var val = readUInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    readSFixed32: function() {\n        var val = readInt32(this.buf, this.pos);\n        this.pos += 4;\n        return val;\n    },\n\n    // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)\n\n    readFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readSFixed64: function() {\n        var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;\n        this.pos += 8;\n        return val;\n    },\n\n    readFloat: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 23, 4);\n        this.pos += 4;\n        return val;\n    },\n\n    readDouble: function() {\n        var val = ieee754.read(this.buf, this.pos, true, 52, 8);\n        this.pos += 8;\n        return val;\n    },\n\n    readVarint: function(isSigned) {\n        var buf = this.buf,\n            val, b;\n\n        b = buf[this.pos++]; val  =  b & 0x7f;        if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 7;  if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;\n        b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;\n        b = buf[this.pos];   val |= (b & 0x0f) << 28;\n\n        return readVarintRemainder(val, isSigned, this);\n    },\n\n    readVarint64: function() { // for compatibility with v2.0.1\n        return this.readVarint(true);\n    },\n\n    readSVarint: function() {\n        var num = this.readVarint();\n        return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding\n    },\n\n    readBoolean: function() {\n        return Boolean(this.readVarint());\n    },\n\n    readString: function() {\n        var end = this.readVarint() + this.pos,\n            str = readUtf8(this.buf, this.pos, end);\n        this.pos = end;\n        return str;\n    },\n\n    readBytes: function() {\n        var end = this.readVarint() + this.pos,\n            buffer = this.buf.subarray(this.pos, end);\n        this.pos = end;\n        return buffer;\n    },\n\n    // verbose for performance reasons; doesn't affect gzipped size\n\n    readPackedVarint: function(arr, isSigned) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readVarint(isSigned));\n        return arr;\n    },\n    readPackedSVarint: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSVarint());\n        return arr;\n    },\n    readPackedBoolean: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readBoolean());\n        return arr;\n    },\n    readPackedFloat: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFloat());\n        return arr;\n    },\n    readPackedDouble: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readDouble());\n        return arr;\n    },\n    readPackedFixed32: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed32());\n        return arr;\n    },\n    readPackedSFixed32: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed32());\n        return arr;\n    },\n    readPackedFixed64: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readFixed64());\n        return arr;\n    },\n    readPackedSFixed64: function(arr) {\n        var end = readPackedEnd(this);\n        arr = arr || [];\n        while (this.pos < end) arr.push(this.readSFixed64());\n        return arr;\n    },\n\n    skip: function(val) {\n        var type = val & 0x7;\n        if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}\n        else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;\n        else if (type === Pbf.Fixed32) this.pos += 4;\n        else if (type === Pbf.Fixed64) this.pos += 8;\n        else throw new Error('Unimplemented type: ' + type);\n    },\n\n    // === WRITING =================================================================\n\n    writeTag: function(tag, type) {\n        this.writeVarint((tag << 3) | type);\n    },\n\n    realloc: function(min) {\n        var length = this.length || 16;\n\n        while (length < this.pos + min) length *= 2;\n\n        if (length !== this.length) {\n            var buf = new Uint8Array(length);\n            buf.set(this.buf);\n            this.buf = buf;\n            this.length = length;\n        }\n    },\n\n    finish: function() {\n        this.length = this.pos;\n        this.pos = 0;\n        return this.buf.subarray(0, this.length);\n    },\n\n    writeFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeSFixed32: function(val) {\n        this.realloc(4);\n        writeInt32(this.buf, val, this.pos);\n        this.pos += 4;\n    },\n\n    writeFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeSFixed64: function(val) {\n        this.realloc(8);\n        writeInt32(this.buf, val & -1, this.pos);\n        writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);\n        this.pos += 8;\n    },\n\n    writeVarint: function(val) {\n        val = +val || 0;\n\n        if (val > 0xfffffff || val < 0) {\n            writeBigVarint(val, this);\n            return;\n        }\n\n        this.realloc(4);\n\n        this.buf[this.pos++] =           val & 0x7f  | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;\n        this.buf[this.pos++] =   (val >>> 7) & 0x7f;\n    },\n\n    writeSVarint: function(val) {\n        this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);\n    },\n\n    writeBoolean: function(val) {\n        this.writeVarint(Boolean(val));\n    },\n\n    writeString: function(str) {\n        str = String(str);\n        this.realloc(str.length * 4);\n\n        this.pos++; // reserve 1 byte for short string length\n\n        var startPos = this.pos;\n        // write the string directly to the buffer and see how much was written\n        this.pos = writeUtf8(this.buf, str, this.pos);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeFloat: function(val) {\n        this.realloc(4);\n        ieee754.write(this.buf, val, this.pos, true, 23, 4);\n        this.pos += 4;\n    },\n\n    writeDouble: function(val) {\n        this.realloc(8);\n        ieee754.write(this.buf, val, this.pos, true, 52, 8);\n        this.pos += 8;\n    },\n\n    writeBytes: function(buffer) {\n        var len = buffer.length;\n        this.writeVarint(len);\n        this.realloc(len);\n        for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];\n    },\n\n    writeRawMessage: function(fn, obj) {\n        this.pos++; // reserve 1 byte for short message length\n\n        // write the message directly to the buffer and see how much was written\n        var startPos = this.pos;\n        fn(obj, this);\n        var len = this.pos - startPos;\n\n        if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);\n\n        // finally, write the message length in the reserved place and restore the position\n        this.pos = startPos - 1;\n        this.writeVarint(len);\n        this.pos += len;\n    },\n\n    writeMessage: function(tag, fn, obj) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeRawMessage(fn, obj);\n    },\n\n    writePackedVarint:   function(tag, arr) { this.writeMessage(tag, writePackedVarint, arr);   },\n    writePackedSVarint:  function(tag, arr) { this.writeMessage(tag, writePackedSVarint, arr);  },\n    writePackedBoolean:  function(tag, arr) { this.writeMessage(tag, writePackedBoolean, arr);  },\n    writePackedFloat:    function(tag, arr) { this.writeMessage(tag, writePackedFloat, arr);    },\n    writePackedDouble:   function(tag, arr) { this.writeMessage(tag, writePackedDouble, arr);   },\n    writePackedFixed32:  function(tag, arr) { this.writeMessage(tag, writePackedFixed32, arr);  },\n    writePackedSFixed32: function(tag, arr) { this.writeMessage(tag, writePackedSFixed32, arr); },\n    writePackedFixed64:  function(tag, arr) { this.writeMessage(tag, writePackedFixed64, arr);  },\n    writePackedSFixed64: function(tag, arr) { this.writeMessage(tag, writePackedSFixed64, arr); },\n\n    writeBytesField: function(tag, buffer) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeBytes(buffer);\n    },\n    writeFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFixed32(val);\n    },\n    writeSFixed32Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeSFixed32(val);\n    },\n    writeFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeFixed64(val);\n    },\n    writeSFixed64Field: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeSFixed64(val);\n    },\n    writeVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeVarint(val);\n    },\n    writeSVarintField: function(tag, val) {\n        this.writeTag(tag, Pbf.Varint);\n        this.writeSVarint(val);\n    },\n    writeStringField: function(tag, str) {\n        this.writeTag(tag, Pbf.Bytes);\n        this.writeString(str);\n    },\n    writeFloatField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed32);\n        this.writeFloat(val);\n    },\n    writeDoubleField: function(tag, val) {\n        this.writeTag(tag, Pbf.Fixed64);\n        this.writeDouble(val);\n    },\n    writeBooleanField: function(tag, val) {\n        this.writeVarintField(tag, Boolean(val));\n    }\n};\n\nfunction readVarintRemainder(l, s, p) {\n    var buf = p.buf,\n        h, b;\n\n    b = buf[p.pos++]; h  = (b & 0x70) >> 4;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 3;  if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);\n    b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);\n\n    throw new Error('Expected varint not more than 10 bytes');\n}\n\nfunction readPackedEnd(pbf) {\n    return pbf.type === Pbf.Bytes ?\n        pbf.readVarint() + pbf.pos : pbf.pos + 1;\n}\n\nfunction toNum(low, high, isSigned) {\n    if (isSigned) {\n        return high * 0x100000000 + (low >>> 0);\n    }\n\n    return ((high >>> 0) * 0x100000000) + (low >>> 0);\n}\n\nfunction writeBigVarint(val, pbf) {\n    var low, high;\n\n    if (val >= 0) {\n        low  = (val % 0x100000000) | 0;\n        high = (val / 0x100000000) | 0;\n    } else {\n        low  = ~(-val % 0x100000000);\n        high = ~(-val / 0x100000000);\n\n        if (low ^ 0xffffffff) {\n            low = (low + 1) | 0;\n        } else {\n            low = 0;\n            high = (high + 1) | 0;\n        }\n    }\n\n    if (val >= 0x10000000000000000 || val < -0x10000000000000000) {\n        throw new Error('Given varint doesn\\'t fit into 10 bytes');\n    }\n\n    pbf.realloc(10);\n\n    writeBigVarintLow(low, high, pbf);\n    writeBigVarintHigh(high, pbf);\n}\n\nfunction writeBigVarintLow(low, high, pbf) {\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;\n    pbf.buf[pbf.pos]   = low & 0x7f;\n}\n\nfunction writeBigVarintHigh(high, pbf) {\n    var lsb = (high & 0x07) << 4;\n\n    pbf.buf[pbf.pos++] |= lsb         | ((high >>>= 3) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;\n    pbf.buf[pbf.pos++]  = high & 0x7f;\n}\n\nfunction makeRoomForExtraLength(startPos, len, pbf) {\n    var extraLen =\n        len <= 0x3fff ? 1 :\n        len <= 0x1fffff ? 2 :\n        len <= 0xfffffff ? 3 : Math.ceil(Math.log(len) / (Math.LN2 * 7));\n\n    // if 1 byte isn't enough for encoding message length, shift the data to the right\n    pbf.realloc(extraLen);\n    for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];\n}\n\nfunction writePackedVarint(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]);   }\nfunction writePackedSVarint(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]);  }\nfunction writePackedFloat(arr, pbf)    { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]);    }\nfunction writePackedDouble(arr, pbf)   { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]);   }\nfunction writePackedBoolean(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]);  }\nfunction writePackedFixed32(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]);  }\nfunction writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }\nfunction writePackedFixed64(arr, pbf)  { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]);  }\nfunction writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }\n\n// Buffer code below from https://github.com/feross/buffer, MIT-licensed\n\nfunction readUInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] * 0x1000000);\n}\n\nfunction writeInt32(buf, val, pos) {\n    buf[pos] = val;\n    buf[pos + 1] = (val >>> 8);\n    buf[pos + 2] = (val >>> 16);\n    buf[pos + 3] = (val >>> 24);\n}\n\nfunction readInt32(buf, pos) {\n    return ((buf[pos]) |\n        (buf[pos + 1] << 8) |\n        (buf[pos + 2] << 16)) +\n        (buf[pos + 3] << 24);\n}\n\nfunction readUtf8(buf, pos, end) {\n    var str = '';\n    var i = pos;\n\n    while (i < end) {\n        var b0 = buf[i];\n        var c = null; // codepoint\n        var bytesPerSequence =\n            b0 > 0xEF ? 4 :\n            b0 > 0xDF ? 3 :\n            b0 > 0xBF ? 2 : 1;\n\n        if (i + bytesPerSequence > end) break;\n\n        var b1, b2, b3;\n\n        if (bytesPerSequence === 1) {\n            if (b0 < 0x80) {\n                c = b0;\n            }\n        } else if (bytesPerSequence === 2) {\n            b1 = buf[i + 1];\n            if ((b1 & 0xC0) === 0x80) {\n                c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);\n                if (c <= 0x7F) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 3) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);\n                if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {\n                    c = null;\n                }\n            }\n        } else if (bytesPerSequence === 4) {\n            b1 = buf[i + 1];\n            b2 = buf[i + 2];\n            b3 = buf[i + 3];\n            if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {\n                c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);\n                if (c <= 0xFFFF || c >= 0x110000) {\n                    c = null;\n                }\n            }\n        }\n\n        if (c === null) {\n            c = 0xFFFD;\n            bytesPerSequence = 1;\n\n        } else if (c > 0xFFFF) {\n            c -= 0x10000;\n            str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);\n            c = 0xDC00 | c & 0x3FF;\n        }\n\n        str += String.fromCharCode(c);\n        i += bytesPerSequence;\n    }\n\n    return str;\n}\n\nfunction writeUtf8(buf, str, pos) {\n    for (var i = 0, c, lead; i < str.length; i++) {\n        c = str.charCodeAt(i); // code point\n\n        if (c > 0xD7FF && c < 0xE000) {\n            if (lead) {\n                if (c < 0xDC00) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                    lead = c;\n                    continue;\n                } else {\n                    c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;\n                    lead = null;\n                }\n            } else {\n                if (c > 0xDBFF || (i + 1 === str.length)) {\n                    buf[pos++] = 0xEF;\n                    buf[pos++] = 0xBF;\n                    buf[pos++] = 0xBD;\n                } else {\n                    lead = c;\n                }\n                continue;\n            }\n        } else if (lead) {\n            buf[pos++] = 0xEF;\n            buf[pos++] = 0xBF;\n            buf[pos++] = 0xBD;\n            lead = null;\n        }\n\n        if (c < 0x80) {\n            buf[pos++] = c;\n        } else {\n            if (c < 0x800) {\n                buf[pos++] = c >> 0x6 | 0xC0;\n            } else {\n                if (c < 0x10000) {\n                    buf[pos++] = c >> 0xC | 0xE0;\n                } else {\n                    buf[pos++] = c >> 0x12 | 0xF0;\n                    buf[pos++] = c >> 0xC & 0x3F | 0x80;\n                }\n                buf[pos++] = c >> 0x6 & 0x3F | 0x80;\n            }\n            buf[pos++] = c & 0x3F | 0x80;\n        }\n    }\n    return pos;\n}\n","var Processor = require('./processor');\n\nexports.Processor = Processor;\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.quickselect = factory());\n}(this, (function () { 'use strict';\n\nfunction quickselect(arr, k, left, right, compare) {\n    quickselectStep(arr, k, left || 0, right || (arr.length - 1), compare || defaultCompare);\n}\n\nfunction quickselectStep(arr, k, left, right, compare) {\n\n    while (right > left) {\n        if (right - left > 600) {\n            var n = right - left + 1;\n            var m = k - left + 1;\n            var z = Math.log(n);\n            var s = 0.5 * Math.exp(2 * z / 3);\n            var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n            var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n            var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n            quickselectStep(arr, k, newLeft, newRight, compare);\n        }\n\n        var t = arr[k];\n        var i = left;\n        var j = right;\n\n        swap(arr, left, k);\n        if (compare(arr[right], t) > 0) swap(arr, left, right);\n\n        while (i < j) {\n            swap(arr, i, j);\n            i++;\n            j--;\n            while (compare(arr[i], t) < 0) i++;\n            while (compare(arr[j], t) > 0) j--;\n        }\n\n        if (compare(arr[left], t) === 0) swap(arr, left, j);\n        else {\n            j++;\n            swap(arr, j, right);\n        }\n\n        if (j <= k) left = j + 1;\n        if (k <= j) right = j - 1;\n    }\n}\n\nfunction swap(arr, i, j) {\n    var tmp = arr[i];\n    arr[i] = arr[j];\n    arr[j] = tmp;\n}\n\nfunction defaultCompare(a, b) {\n    return a < b ? -1 : a > b ? 1 : 0;\n}\n\nreturn quickselect;\n\n})));\n","exports.read = function (buffer, offset, isLE, mLen, nBytes) {\n  var e, m\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var nBits = -7\n  var i = isLE ? (nBytes - 1) : 0\n  var d = isLE ? -1 : 1\n  var s = buffer[offset + i]\n\n  i += d\n\n  e = s & ((1 << (-nBits)) - 1)\n  s >>= (-nBits)\n  nBits += eLen\n  for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  m = e & ((1 << (-nBits)) - 1)\n  e >>= (-nBits)\n  nBits += mLen\n  for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n  if (e === 0) {\n    e = 1 - eBias\n  } else if (e === eMax) {\n    return m ? NaN : ((s ? -1 : 1) * Infinity)\n  } else {\n    m = m + Math.pow(2, mLen)\n    e = e - eBias\n  }\n  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n  var e, m, c\n  var eLen = (nBytes * 8) - mLen - 1\n  var eMax = (1 << eLen) - 1\n  var eBias = eMax >> 1\n  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n  var i = isLE ? 0 : (nBytes - 1)\n  var d = isLE ? 1 : -1\n  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n  value = Math.abs(value)\n\n  if (isNaN(value) || value === Infinity) {\n    m = isNaN(value) ? 1 : 0\n    e = eMax\n  } else {\n    e = Math.floor(Math.log(value) / Math.LN2)\n    if (value * (c = Math.pow(2, -e)) < 1) {\n      e--\n      c *= 2\n    }\n    if (e + eBias >= 1) {\n      value += rt / c\n    } else {\n      value += rt * Math.pow(2, 1 - eBias)\n    }\n    if (value * c >= 2) {\n      e++\n      c /= 2\n    }\n\n    if (e + eBias >= eMax) {\n      m = 0\n      e = eMax\n    } else if (e + eBias >= 1) {\n      m = ((value * c) - 1) * Math.pow(2, mLen)\n      e = e + eBias\n    } else {\n      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n      e = 0\n    }\n  }\n\n  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n  e = (e << mLen) | m\n  eLen += mLen\n  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n  buffer[offset + i - d] |= s * 128\n}\n","var newImageData = require('./util').newImageData;\n\n/**\n * Create a function for running operations.  This function is serialized for\n * use in a worker.\n * @param {function(Array, Object):*} operation The operation.\n * @return {function(Object):ArrayBuffer} A function that takes an object with\n * buffers, meta, imageOps, width, and height properties and returns an array\n * buffer.\n */\nfunction createMinion(operation) {\n  var workerHasImageData = true;\n  try {\n    new ImageData(10, 10);\n  } catch (_) {\n    workerHasImageData = false;\n  }\n\n  function newWorkerImageData(data, width, height) {\n    if (workerHasImageData) {\n      return new ImageData(data, width, height);\n    } else {\n      return {data: data, width: width, height: height};\n    }\n  }\n\n  return function(data) {\n    // bracket notation for minification support\n    var buffers = data['buffers'];\n    var meta = data['meta'];\n    var imageOps = data['imageOps'];\n    var width = data['width'];\n    var height = data['height'];\n\n    var numBuffers = buffers.length;\n    var numBytes = buffers[0].byteLength;\n    var output, b;\n\n    if (imageOps) {\n      var images = new Array(numBuffers);\n      for (b = 0; b < numBuffers; ++b) {\n        images[b] = newWorkerImageData(\n            new Uint8ClampedArray(buffers[b]), width, height);\n      }\n      output = operation(images, meta).data;\n    } else {\n      output = new Uint8ClampedArray(numBytes);\n      var arrays = new Array(numBuffers);\n      var pixels = new Array(numBuffers);\n      for (b = 0; b < numBuffers; ++b) {\n        arrays[b] = new Uint8ClampedArray(buffers[b]);\n        pixels[b] = [0, 0, 0, 0];\n      }\n      for (var i = 0; i < numBytes; i += 4) {\n        for (var j = 0; j < numBuffers; ++j) {\n          var array = arrays[j];\n          pixels[j][0] = array[i];\n          pixels[j][1] = array[i + 1];\n          pixels[j][2] = array[i + 2];\n          pixels[j][3] = array[i + 3];\n        }\n        var pixel = operation(pixels, meta);\n        output[i] = pixel[0];\n        output[i + 1] = pixel[1];\n        output[i + 2] = pixel[2];\n        output[i + 3] = pixel[3];\n      }\n    }\n    return output.buffer;\n  };\n}\n\n/**\n * Create a worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent)} onMessage Called with a message event.\n * @return {Worker} The worker.\n */\nfunction createWorker(config, onMessage) {\n  var lib = Object.keys(config.lib || {}).map(function(name) {\n    return 'var ' + name + ' = ' + config.lib[name].toString() + ';';\n  });\n\n  var lines = lib.concat([\n    'var __minion__ = (' + createMinion.toString() + ')(', config.operation.toString(), ');',\n    'self.addEventListener(\"message\", function(event) {',\n    '  var buffer = __minion__(event.data);',\n    '  self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',\n    '});'\n  ]);\n\n  var blob = new Blob(lines, {type: 'text/javascript'});\n  var source = URL.createObjectURL(blob);\n  var worker = new Worker(source);\n  worker.addEventListener('message', onMessage);\n  return worker;\n}\n\n/**\n * Create a faux worker for running operations.\n * @param {Object} config Configuration.\n * @param {function(MessageEvent)} onMessage Called with a message event.\n * @return {Object} The faux worker.\n */\nfunction createFauxWorker(config, onMessage) {\n  var minion = createMinion(config.operation);\n  return {\n    postMessage: function(data) {\n      setTimeout(function() {\n        onMessage({'data': {'buffer': minion(data), 'meta': data['meta']}});\n      }, 0);\n    }\n  };\n}\n\n/**\n * A processor runs pixel or image operations in workers.\n * @param {Object} config Configuration.\n */\nfunction Processor(config) {\n  this._imageOps = !!config.imageOps;\n  var threads;\n  if (config.threads === 0) {\n    threads = 0;\n  } else if (this._imageOps) {\n    threads = 1;\n  } else {\n    threads = config.threads || 1;\n  }\n  var workers = [];\n  if (threads) {\n    for (var i = 0; i < threads; ++i) {\n      workers[i] = createWorker(config, this._onWorkerMessage.bind(this, i));\n    }\n  } else {\n    workers[0] = createFauxWorker(config, this._onWorkerMessage.bind(this, 0));\n  }\n  this._workers = workers;\n  this._queue = [];\n  this._maxQueueLength = config.queue || Infinity;\n  this._running = 0;\n  this._dataLookup = {};\n  this._job = null;\n}\n\n/**\n * Run operation on input data.\n * @param {Array.<Array|ImageData>} inputs Array of pixels or image data\n *     (depending on the operation type).\n * @param {Object} meta A user data object.  This is passed to all operations\n *     and must be serializable.\n * @param {function(Error, ImageData, Object)} callback Called when work\n *     completes.  The first argument is any error.  The second is the ImageData\n *     generated by operations.  The third is the user data object.\n */\nProcessor.prototype.process = function(inputs, meta, callback) {\n  this._enqueue({\n    inputs: inputs,\n    meta: meta,\n    callback: callback\n  });\n  this._dispatch();\n};\n\n/**\n * Stop responding to any completed work and destroy the processor.\n */\nProcessor.prototype.destroy = function() {\n  for (var key in this) {\n    this[key] = null;\n  }\n  this._destroyed = true;\n};\n\n/**\n * Add a job to the queue.\n * @param {Object} job The job.\n */\nProcessor.prototype._enqueue = function(job) {\n  this._queue.push(job);\n  while (this._queue.length > this._maxQueueLength) {\n    this._queue.shift().callback(null, null);\n  }\n};\n\n/**\n * Dispatch a job.\n */\nProcessor.prototype._dispatch = function() {\n  if (this._running === 0 && this._queue.length > 0) {\n    var job = this._job = this._queue.shift();\n    var width = job.inputs[0].width;\n    var height = job.inputs[0].height;\n    var buffers = job.inputs.map(function(input) {\n      return input.data.buffer;\n    });\n    var threads = this._workers.length;\n    this._running = threads;\n    if (threads === 1) {\n      this._workers[0].postMessage({\n        'buffers': buffers,\n        'meta': job.meta,\n        'imageOps': this._imageOps,\n        'width': width,\n        'height': height\n      }, buffers);\n    } else {\n      var length = job.inputs[0].data.length;\n      var segmentLength = 4 * Math.ceil(length / 4 / threads);\n      for (var i = 0; i < threads; ++i) {\n        var offset = i * segmentLength;\n        var slices = [];\n        for (var j = 0, jj = buffers.length; j < jj; ++j) {\n          slices.push(buffers[i].slice(offset, offset + segmentLength));\n        }\n        this._workers[i].postMessage({\n          'buffers': slices,\n          'meta': job.meta,\n          'imageOps': this._imageOps,\n          'width': width,\n          'height': height\n        }, slices);\n      }\n    }\n  }\n};\n\n/**\n * Handle messages from the worker.\n * @param {number} index The worker index.\n * @param {MessageEvent} event The message event.\n */\nProcessor.prototype._onWorkerMessage = function(index, event) {\n  if (this._destroyed) {\n    return;\n  }\n  this._dataLookup[index] = event.data;\n  --this._running;\n  if (this._running === 0) {\n    this._resolveJob();\n  }\n};\n\n/**\n * Resolve a job.  If there are no more worker threads, the processor callback\n * will be called.\n */\nProcessor.prototype._resolveJob = function() {\n  var job = this._job;\n  var threads = this._workers.length;\n  var data, meta;\n  if (threads === 1) {\n    data = new Uint8ClampedArray(this._dataLookup[0]['buffer']);\n    meta = this._dataLookup[0]['meta'];\n  } else {\n    var length = job.inputs[0].data.length;\n    data = new Uint8ClampedArray(length);\n    meta = new Array(length);\n    var segmentLength = 4 * Math.ceil(length / 4 / threads);\n    for (var i = 0; i < threads; ++i) {\n      var buffer = this._dataLookup[i]['buffer'];\n      var offset = i * segmentLength;\n      data.set(new Uint8ClampedArray(buffer), offset);\n      meta[i] = this._dataLookup[i]['meta'];\n    }\n  }\n  this._job = null;\n  this._dataLookup = {};\n  job.callback(null,\n      newImageData(data, job.inputs[0].width, job.inputs[0].height), meta);\n  this._dispatch();\n};\n\nmodule.exports = Processor;\n","var hasImageData = true;\ntry {\n  new ImageData(10, 10);\n} catch (_) {\n  hasImageData = false;\n}\n\nvar context = document.createElement('canvas').getContext('2d');\n\nfunction newImageData(data, width, height) {\n  if (hasImageData) {\n    return new ImageData(data, width, height);\n  } else {\n    var imageData = context.createImageData(width, height);\n    imageData.data.set(data);\n    return imageData;\n  }\n}\n\nexports.newImageData = newImageData;\n","/**\n * @module ol/util\n */\n\n/**\n * @return {?} Any return.\n */\nexport function abstract() {\n  return /** @type {?} */ ((function() {\n    throw new Error('Unimplemented abstract method.');\n  })());\n}\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * Usage:\n *\n *     function ParentClass(a, b) { }\n *     ParentClass.prototype.foo = function(a) { }\n *\n *     function ChildClass(a, b, c) {\n *       // Call parent constructor\n *       ParentClass.call(this, a, b);\n *     }\n *     inherits(ChildClass, ParentClass);\n *\n *     var child = new ChildClass('a', 'b', 'see');\n *     child.foo(); // This works.\n *\n * @param {!Function} childCtor Child constructor.\n * @param {!Function} parentCtor Parent constructor.\n * @function module:ol.inherits\n * @deprecated\n * @api\n */\nexport function inherits(childCtor, parentCtor) {\n  childCtor.prototype = Object.create(parentCtor.prototype);\n  childCtor.prototype.constructor = childCtor;\n}\n\n/**\n * Counter for getUid.\n * @type {number}\n * @private\n */\nvar uidCounter_ = 0;\n\n/**\n * Gets a unique ID for an object. This mutates the object so that further calls\n * with the same object as a parameter returns the same value. Unique IDs are generated\n * as a strictly increasing sequence. Adapted from goog.getUid.\n *\n * @param {Object} obj The object to get the unique ID for.\n * @return {string} The unique ID for the object.\n * @function module:ol.getUid\n * @api\n */\nexport function getUid(obj) {\n  return obj.ol_uid || (obj.ol_uid = String(++uidCounter_));\n}\n\n/**\n * OpenLayers version.\n * @type {string}\n */\nexport var VERSION = '5.3.3';\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/AssertionError\n */\nimport {VERSION} from './util.js';\n\n/**\n * Error object thrown when an assertion failed. This is an ECMA-262 Error,\n * extended with a `code` property.\n * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error.\n */\nvar AssertionError = /*@__PURE__*/(function (Error) {\n  function AssertionError(code) {\n    var path = VERSION === 'latest' ? VERSION : 'v' + VERSION.split('-')[0];\n    var message = 'Assertion failed. See https://openlayers.org/en/' + path +\n    '/doc/errors/#' + code + ' for details.';\n\n    Error.call(this, message);\n\n    /**\n     * Error code. The meaning of the code can be found on\n     * https://openlayers.org/en/latest/doc/errors/ (replace `latest` with\n     * the version found in the OpenLayers script's header comment if a version\n     * other than the latest is used).\n     * @type {number}\n     * @api\n     */\n    this.code = code;\n\n    /**\n     * @type {string}\n     */\n    this.name = 'AssertionError';\n\n    // Re-assign message, see https://github.com/Rich-Harris/buble/issues/40\n    this.message = message;\n  }\n\n  if ( Error ) AssertionError.__proto__ = Error;\n  AssertionError.prototype = Object.create( Error && Error.prototype );\n  AssertionError.prototype.constructor = AssertionError;\n\n  return AssertionError;\n}(Error));\n\nexport default AssertionError;\n\n//# sourceMappingURL=AssertionError.js.map","/**\n * @module ol/CollectionEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when an item is added to the collection.\n   * @event module:ol/Collection.CollectionEvent#add\n   * @api\n   */\n  ADD: 'add',\n  /**\n   * Triggered when an item is removed from the collection.\n   * @event module:ol/Collection.CollectionEvent#remove\n   * @api\n   */\n  REMOVE: 'remove'\n};\n\n//# sourceMappingURL=CollectionEventType.js.map","/**\n * @module ol/ObjectEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a property is changed.\n   * @event module:ol/Object.ObjectEvent#propertychange\n   * @api\n   */\n  PROPERTYCHANGE: 'propertychange'\n};\n\n//# sourceMappingURL=ObjectEventType.js.map","/**\n * @module ol/obj\n */\n\n\n/**\n * Polyfill for Object.assign().  Assigns enumerable and own properties from\n * one or more source objects to a target object.\n * See https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign.\n *\n * @param {!Object} target The target object.\n * @param {...Object} var_sources The source object(s).\n * @return {!Object} The modified target object.\n */\nexport var assign = (typeof Object.assign === 'function') ? Object.assign : function(target, var_sources) {\n  var arguments$1 = arguments;\n\n  if (target === undefined || target === null) {\n    throw new TypeError('Cannot convert undefined or null to object');\n  }\n\n  var output = Object(target);\n  for (var i = 1, ii = arguments.length; i < ii; ++i) {\n    var source = arguments$1[i];\n    if (source !== undefined && source !== null) {\n      for (var key in source) {\n        if (source.hasOwnProperty(key)) {\n          output[key] = source[key];\n        }\n      }\n    }\n  }\n  return output;\n};\n\n\n/**\n * Removes all properties from an object.\n * @param {Object} object The object to clear.\n */\nexport function clear(object) {\n  for (var property in object) {\n    delete object[property];\n  }\n}\n\n\n/**\n * Get an array of property values from an object.\n * @param {Object<K,V>} object The object from which to get the values.\n * @return {!Array<V>} The property values.\n * @template K,V\n */\nexport function getValues(object) {\n  var values = [];\n  for (var property in object) {\n    values.push(object[property]);\n  }\n  return values;\n}\n\n\n/**\n * Determine if an object has any properties.\n * @param {Object} object The object to check.\n * @return {boolean} The object is empty.\n */\nexport function isEmpty(object) {\n  var property;\n  for (property in object) {\n    return false;\n  }\n  return !property;\n}\n\n//# sourceMappingURL=obj.js.map","/**\n * @module ol/events\n */\nimport {clear} from './obj.js';\n\n\n/**\n * Key to use with {@link module:ol/Observable~Observable#unByKey}.\n * @typedef {Object} EventsKey\n * @property {Object} [bindTo]\n * @property {ListenerFunction} [boundListener]\n * @property {boolean} callOnce\n * @property {number} [deleteIndex]\n * @property {ListenerFunction} listener\n * @property {import(\"./events/Target.js\").EventTargetLike} target\n * @property {string} type\n * @api\n */\n\n\n/**\n * Listener function. This function is called with an event object as argument.\n * When the function returns `false`, event propagation will stop.\n *\n * @typedef {function((Event|import(\"./events/Event.js\").default)): (void|boolean)} ListenerFunction\n * @api\n */\n\n\n/**\n * @param {EventsKey} listenerObj Listener object.\n * @return {ListenerFunction} Bound listener.\n */\nexport function bindListener(listenerObj) {\n  var boundListener = function(evt) {\n    var listener = listenerObj.listener;\n    var bindTo = listenerObj.bindTo || listenerObj.target;\n    if (listenerObj.callOnce) {\n      unlistenByKey(listenerObj);\n    }\n    return listener.call(bindTo, evt);\n  };\n  listenerObj.boundListener = boundListener;\n  return boundListener;\n}\n\n\n/**\n * Finds the matching {@link module:ol/events~EventsKey} in the given listener\n * array.\n *\n * @param {!Array<!EventsKey>} listeners Array of listeners.\n * @param {!Function} listener The listener function.\n * @param {Object=} opt_this The `this` value inside the listener.\n * @param {boolean=} opt_setDeleteIndex Set the deleteIndex on the matching\n *     listener, for {@link module:ol/events~unlistenByKey}.\n * @return {EventsKey|undefined} The matching listener object.\n */\nexport function findListener(listeners, listener, opt_this, opt_setDeleteIndex) {\n  var listenerObj;\n  for (var i = 0, ii = listeners.length; i < ii; ++i) {\n    listenerObj = listeners[i];\n    if (listenerObj.listener === listener &&\n        listenerObj.bindTo === opt_this) {\n      if (opt_setDeleteIndex) {\n        listenerObj.deleteIndex = i;\n      }\n      return listenerObj;\n    }\n  }\n  return undefined;\n}\n\n\n/**\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n * @return {Array<EventsKey>|undefined} Listeners.\n */\nexport function getListeners(target, type) {\n  var listenerMap = getListenerMap(target);\n  return listenerMap ? listenerMap[type] : undefined;\n}\n\n\n/**\n * Get the lookup of listeners.\n * @param {Object} target Target.\n * @param {boolean=} opt_create If a map should be created if it doesn't exist.\n * @return {!Object<string, Array<EventsKey>>} Map of\n *     listeners by event type.\n */\nfunction getListenerMap(target, opt_create) {\n  var listenerMap = target.ol_lm;\n  if (!listenerMap && opt_create) {\n    listenerMap = target.ol_lm = {};\n  }\n  return listenerMap;\n}\n\n\n/**\n * Remove the listener map from a target.\n * @param {Object} target Target.\n */\nfunction removeListenerMap(target) {\n  delete target.ol_lm;\n}\n\n\n/**\n * Clean up all listener objects of the given type.  All properties on the\n * listener objects will be removed, and if no listeners remain in the listener\n * map, it will be removed from the target.\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n * @param {string} type Type.\n */\nfunction removeListeners(target, type) {\n  var listeners = getListeners(target, type);\n  if (listeners) {\n    for (var i = 0, ii = listeners.length; i < ii; ++i) {\n      /** @type {import(\"./events/Target.js\").default} */ (target).\n        removeEventListener(type, listeners[i].boundListener);\n      clear(listeners[i]);\n    }\n    listeners.length = 0;\n    var listenerMap = getListenerMap(target);\n    if (listenerMap) {\n      delete listenerMap[type];\n      if (Object.keys(listenerMap).length === 0) {\n        removeListenerMap(target);\n      }\n    }\n  }\n}\n\n\n/**\n * Registers an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` to a `this` object, and returns\n * a key for use with {@link module:ol/events~unlistenByKey}.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @param {boolean=} opt_once If true, add the listener as one-off listener.\n * @return {EventsKey} Unique key for the listener.\n */\nexport function listen(target, type, listener, opt_this, opt_once) {\n  var listenerMap = getListenerMap(target, true);\n  var listeners = listenerMap[type];\n  if (!listeners) {\n    listeners = listenerMap[type] = [];\n  }\n  var listenerObj = findListener(listeners, listener, opt_this, false);\n  if (listenerObj) {\n    if (!opt_once) {\n      // Turn one-off listener into a permanent one.\n      listenerObj.callOnce = false;\n    }\n  } else {\n    listenerObj = /** @type {EventsKey} */ ({\n      bindTo: opt_this,\n      callOnce: !!opt_once,\n      listener: listener,\n      target: target,\n      type: type\n    });\n    /** @type {import(\"./events/Target.js\").default} */ (target).\n      addEventListener(type, bindListener(listenerObj));\n    listeners.push(listenerObj);\n  }\n\n  return listenerObj;\n}\n\n\n/**\n * Registers a one-off event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * This function efficiently binds a `listener` as self-unregistering listener\n * to a `this` object, and returns a key for use with\n * {@link module:ol/events~unlistenByKey} in case the listener needs to be\n * unregistered before it is called.\n *\n * When {@link module:ol/events~listen} is called with the same arguments after this\n * function, the self-unregistering listener will be turned into a permanent\n * listener.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n * @return {EventsKey} Key for unlistenByKey.\n */\nexport function listenOnce(target, type, listener, opt_this) {\n  return listen(target, type, listener, opt_this, true);\n}\n\n\n/**\n * Unregisters an event listener on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * To return a listener, this function needs to be called with the exact same\n * arguments that were used for a previous {@link module:ol/events~listen} call.\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Event target.\n * @param {string} type Event type.\n * @param {ListenerFunction} listener Listener.\n * @param {Object=} opt_this Object referenced by the `this` keyword in the\n *     listener. Default is the `target`.\n */\nexport function unlisten(target, type, listener, opt_this) {\n  var listeners = getListeners(target, type);\n  if (listeners) {\n    var listenerObj = findListener(listeners, listener, opt_this, true);\n    if (listenerObj) {\n      unlistenByKey(listenerObj);\n    }\n  }\n}\n\n\n/**\n * Unregisters event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * The argument passed to this function is the key returned from\n * {@link module:ol/events~listen} or {@link module:ol/events~listenOnce}.\n *\n * @param {EventsKey} key The key.\n */\nexport function unlistenByKey(key) {\n  if (key && key.target) {\n    /** @type {import(\"./events/Target.js\").default} */ (key.target).\n      removeEventListener(key.type, key.boundListener);\n    var listeners = getListeners(key.target, key.type);\n    if (listeners) {\n      var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);\n      if (i !== -1) {\n        listeners.splice(i, 1);\n      }\n      if (listeners.length === 0) {\n        removeListeners(key.target, key.type);\n      }\n    }\n    clear(key);\n  }\n}\n\n\n/**\n * Unregisters all event listeners on an event target. Inspired by\n * https://google.github.io/closure-library/api/source/closure/goog/events/events.js.src.html\n *\n * @param {import(\"./events/Target.js\").EventTargetLike} target Target.\n */\nexport function unlistenAll(target) {\n  var listenerMap = getListenerMap(target);\n  if (listenerMap) {\n    for (var type in listenerMap) {\n      removeListeners(target, type);\n    }\n  }\n}\n\n//# sourceMappingURL=events.js.map","/**\n * @module ol/Disposable\n */\n\n/**\n * @classdesc\n * Objects that need to clean up after themselves.\n */\nvar Disposable = function Disposable() {\n  /**\n   * The object has already been disposed.\n   * @type {boolean}\n   * @private\n   */\n  this.disposed_ = false;\n};\n\n/**\n * Clean up.\n */\nDisposable.prototype.dispose = function dispose () {\n  if (!this.disposed_) {\n    this.disposed_ = true;\n    this.disposeInternal();\n  }\n};\n\n/**\n * Extension point for disposable objects.\n * @protected\n */\nDisposable.prototype.disposeInternal = function disposeInternal () {};\n\nexport default Disposable;\n\n//# sourceMappingURL=Disposable.js.map","/**\n * @module ol/functions\n */\n\n/**\n * Always returns true.\n * @returns {boolean} true.\n */\nexport function TRUE() {\n  return true;\n}\n\n/**\n * Always returns false.\n * @returns {boolean} false.\n */\nexport function FALSE() {\n  return false;\n}\n\n/**\n * A reusable function, used e.g. as a default for callbacks.\n *\n * @return {void} Nothing.\n */\nexport function VOID() {}\n\n//# sourceMappingURL=functions.js.map","/**\n * @module ol/events/Event\n */\n\n/**\n * @classdesc\n * Stripped down implementation of the W3C DOM Level 2 Event interface.\n * See https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-interface.\n *\n * This implementation only provides `type` and `target` properties, and\n * `stopPropagation` and `preventDefault` methods. It is meant as base class\n * for higher level events defined in the library, and works with\n * {@link module:ol/events/Target~Target}.\n */\nvar Event = function Event(type) {\n\n  /**\n   * @type {boolean}\n   */\n  this.propagationStopped;\n\n  /**\n   * The event type.\n   * @type {string}\n   * @api\n   */\n  this.type = type;\n\n  /**\n   * The event target.\n   * @type {Object}\n   * @api\n   */\n  this.target = null;\n};\n\n/**\n * Stop event propagation.\n * @api\n */\nEvent.prototype.preventDefault = function preventDefault () {\n  this.propagationStopped = true;\n};\n\n/**\n * Stop event propagation.\n * @api\n */\nEvent.prototype.stopPropagation = function stopPropagation () {\n  this.propagationStopped = true;\n};\n\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function stopPropagation(evt) {\n  evt.stopPropagation();\n}\n\n\n/**\n * @param {Event|import(\"./Event.js\").default} evt Event\n */\nexport function preventDefault(evt) {\n  evt.preventDefault();\n}\n\nexport default Event;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/events/Target\n */\nimport Disposable from '../Disposable.js';\nimport {unlistenAll} from '../events.js';\nimport {VOID} from '../functions.js';\nimport Event from './Event.js';\n\n\n/**\n * @typedef {EventTarget|Target} EventTargetLike\n */\n\n\n/**\n * @classdesc\n * A simplified implementation of the W3C DOM Level 2 EventTarget interface.\n * See https://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-EventTarget.\n *\n * There are two important simplifications compared to the specification:\n *\n * 1. The handling of `useCapture` in `addEventListener` and\n *    `removeEventListener`. There is no real capture model.\n * 2. The handling of `stopPropagation` and `preventDefault` on `dispatchEvent`.\n *    There is no event target hierarchy. When a listener calls\n *    `stopPropagation` or `preventDefault` on an event object, it means that no\n *    more listeners after this one will be called. Same as when the listener\n *    returns false.\n */\nvar Target = /*@__PURE__*/(function (Disposable) {\n  function Target() {\n\n    Disposable.call(this);\n\n    /**\n     * @private\n     * @type {!Object<string, number>}\n     */\n    this.pendingRemovals_ = {};\n\n    /**\n     * @private\n     * @type {!Object<string, number>}\n     */\n    this.dispatching_ = {};\n\n    /**\n     * @private\n     * @type {!Object<string, Array<import(\"../events.js\").ListenerFunction>>}\n     */\n    this.listeners_ = {};\n\n  }\n\n  if ( Disposable ) Target.__proto__ = Disposable;\n  Target.prototype = Object.create( Disposable && Disposable.prototype );\n  Target.prototype.constructor = Target;\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").ListenerFunction} listener Listener.\n   */\n  Target.prototype.addEventListener = function addEventListener (type, listener) {\n    var listeners = this.listeners_[type];\n    if (!listeners) {\n      listeners = this.listeners_[type] = [];\n    }\n    if (listeners.indexOf(listener) === -1) {\n      listeners.push(listener);\n    }\n  };\n\n  /**\n   * Dispatches an event and calls all listeners listening for events\n   * of this type. The event parameter can either be a string or an\n   * Object with a `type` property.\n   *\n   * @param {{type: string,\n   *     target: (EventTargetLike|undefined),\n   *     propagationStopped: (boolean|undefined)}|\n   *     import(\"./Event.js\").default|string} event Event object.\n   * @return {boolean|undefined} `false` if anyone called preventDefault on the\n   *     event object or if any of the listeners returned false.\n   * @api\n   */\n  Target.prototype.dispatchEvent = function dispatchEvent (event) {\n    var evt = typeof event === 'string' ? new Event(event) : event;\n    var type = evt.type;\n    evt.target = this;\n    var listeners = this.listeners_[type];\n    var propagate;\n    if (listeners) {\n      if (!(type in this.dispatching_)) {\n        this.dispatching_[type] = 0;\n        this.pendingRemovals_[type] = 0;\n      }\n      ++this.dispatching_[type];\n      for (var i = 0, ii = listeners.length; i < ii; ++i) {\n        if (listeners[i].call(this, evt) === false || evt.propagationStopped) {\n          propagate = false;\n          break;\n        }\n      }\n      --this.dispatching_[type];\n      if (this.dispatching_[type] === 0) {\n        var pendingRemovals = this.pendingRemovals_[type];\n        delete this.pendingRemovals_[type];\n        while (pendingRemovals--) {\n          this.removeEventListener(type, VOID);\n        }\n        delete this.dispatching_[type];\n      }\n      return propagate;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Target.prototype.disposeInternal = function disposeInternal () {\n    unlistenAll(this);\n  };\n\n  /**\n   * Get the listeners for a specified event type. Listeners are returned in the\n   * order that they will be called in.\n   *\n   * @param {string} type Type.\n   * @return {Array<import(\"../events.js\").ListenerFunction>} Listeners.\n   */\n  Target.prototype.getListeners = function getListeners (type) {\n    return this.listeners_[type];\n  };\n\n  /**\n   * @param {string=} opt_type Type. If not provided,\n   *     `true` will be returned if this event target has any listeners.\n   * @return {boolean} Has listeners.\n   */\n  Target.prototype.hasListener = function hasListener (opt_type) {\n    return opt_type ?\n      opt_type in this.listeners_ :\n      Object.keys(this.listeners_).length > 0;\n  };\n\n  /**\n   * @param {string} type Type.\n   * @param {import(\"../events.js\").ListenerFunction} listener Listener.\n   */\n  Target.prototype.removeEventListener = function removeEventListener (type, listener) {\n    var listeners = this.listeners_[type];\n    if (listeners) {\n      var index = listeners.indexOf(listener);\n      if (type in this.pendingRemovals_) {\n        // make listener a no-op, and remove later in #dispatchEvent()\n        listeners[index] = VOID;\n        ++this.pendingRemovals_[type];\n      } else {\n        listeners.splice(index, 1);\n        if (listeners.length === 0) {\n          delete this.listeners_[type];\n        }\n      }\n    }\n  };\n\n  return Target;\n}(Disposable));\n\n\nexport default Target;\n\n//# sourceMappingURL=Target.js.map","/**\n * @module ol/events/EventType\n */\n\n/**\n * @enum {string}\n * @const\n */\nexport default {\n  /**\n   * Generic change event. Triggered when the revision counter is increased.\n   * @event module:ol/events/Event~Event#change\n   * @api\n   */\n  CHANGE: 'change',\n\n  CLEAR: 'clear',\n  CONTEXTMENU: 'contextmenu',\n  CLICK: 'click',\n  DBLCLICK: 'dblclick',\n  DRAGENTER: 'dragenter',\n  DRAGOVER: 'dragover',\n  DROP: 'drop',\n  ERROR: 'error',\n  KEYDOWN: 'keydown',\n  KEYPRESS: 'keypress',\n  LOAD: 'load',\n  MOUSEDOWN: 'mousedown',\n  MOUSEMOVE: 'mousemove',\n  MOUSEOUT: 'mouseout',\n  MOUSEUP: 'mouseup',\n  MOUSEWHEEL: 'mousewheel',\n  MSPOINTERDOWN: 'MSPointerDown',\n  RESIZE: 'resize',\n  TOUCHSTART: 'touchstart',\n  TOUCHMOVE: 'touchmove',\n  TOUCHEND: 'touchend',\n  WHEEL: 'wheel'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/Observable\n */\nimport {listen, unlistenByKey, unlisten, listenOnce} from './events.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * An event target providing convenient methods for listener registration\n * and unregistration. A generic `change` event is always available through\n * {@link module:ol/Observable~Observable#changed}.\n *\n * @fires import(\"./events/Event.js\").Event\n * @api\n */\nvar Observable = /*@__PURE__*/(function (EventTarget) {\n  function Observable() {\n\n    EventTarget.call(this);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.revision_ = 0;\n\n  }\n\n  if ( EventTarget ) Observable.__proto__ = EventTarget;\n  Observable.prototype = Object.create( EventTarget && EventTarget.prototype );\n  Observable.prototype.constructor = Observable;\n\n  /**\n   * Increases the revision counter and dispatches a 'change' event.\n   * @api\n   */\n  Observable.prototype.changed = function changed () {\n    ++this.revision_;\n    this.dispatchEvent(EventType.CHANGE);\n  };\n\n  /**\n   * Get the version number for this object.  Each time the object is modified,\n   * its version number will be incremented.\n   * @return {number} Revision.\n   * @api\n   */\n  Observable.prototype.getRevision = function getRevision () {\n    return this.revision_;\n  };\n\n  /**\n   * Listen for a certain type of event.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n   *     called with an array of event types as the first argument, the return\n   *     will be an array of keys.\n   * @api\n   */\n  Observable.prototype.on = function on (type, listener) {\n    if (Array.isArray(type)) {\n      var len = type.length;\n      var keys = new Array(len);\n      for (var i = 0; i < len; ++i) {\n        keys[i] = listen(this, type[i], listener);\n      }\n      return keys;\n    } else {\n      return listen(this, /** @type {string} */ (type), listener);\n    }\n  };\n\n  /**\n   * Listen once for a certain type of event.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @return {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} Unique key for the listener. If\n   *     called with an array of event types as the first argument, the return\n   *     will be an array of keys.\n   * @api\n   */\n  Observable.prototype.once = function once (type, listener) {\n    if (Array.isArray(type)) {\n      var len = type.length;\n      var keys = new Array(len);\n      for (var i = 0; i < len; ++i) {\n        keys[i] = listenOnce(this, type[i], listener);\n      }\n      return keys;\n    } else {\n      return listenOnce(this, /** @type {string} */ (type), listener);\n    }\n  };\n\n  /**\n   * Unlisten for a certain type of event.\n   * @param {string|Array<string>} type The event type or array of event types.\n   * @param {function(?): ?} listener The listener function.\n   * @api\n   */\n  Observable.prototype.un = function un (type, listener) {\n    if (Array.isArray(type)) {\n      for (var i = 0, ii = type.length; i < ii; ++i) {\n        unlisten(this, type[i], listener);\n      }\n      return;\n    } else {\n      unlisten(this, /** @type {string} */ (type), listener);\n    }\n  };\n\n  return Observable;\n}(EventTarget));\n\n\n/**\n * Removes an event listener using the key returned by `on()` or `once()`.\n * @param {import(\"./events.js\").EventsKey|Array<import(\"./events.js\").EventsKey>} key The key returned by `on()`\n *     or `once()` (or an array of keys).\n * @api\n */\nexport function unByKey(key) {\n  if (Array.isArray(key)) {\n    for (var i = 0, ii = key.length; i < ii; ++i) {\n      unlistenByKey(key[i]);\n    }\n  } else {\n    unlistenByKey(/** @type {import(\"./events.js\").EventsKey} */ (key));\n  }\n}\n\n\nexport default Observable;\n\n//# sourceMappingURL=Observable.js.map","/**\n * @module ol/Object\n */\nimport {getUid} from './util.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport Observable from './Observable.js';\nimport Event from './events/Event.js';\nimport {assign} from './obj.js';\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Object~BaseObject} instances are instances of this type.\n */\nexport var ObjectEvent = /*@__PURE__*/(function (Event) {\n  function ObjectEvent(type, key, oldValue) {\n    Event.call(this, type);\n\n    /**\n     * The name of the property whose value is changing.\n     * @type {string}\n     * @api\n     */\n    this.key = key;\n\n    /**\n     * The old value. To get the new value use `e.target.get(e.key)` where\n     * `e` is the event object.\n     * @type {*}\n     * @api\n     */\n    this.oldValue = oldValue;\n\n  }\n\n  if ( Event ) ObjectEvent.__proto__ = Event;\n  ObjectEvent.prototype = Object.create( Event && Event.prototype );\n  ObjectEvent.prototype.constructor = ObjectEvent;\n\n  return ObjectEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Most non-trivial classes inherit from this.\n *\n * This extends {@link module:ol/Observable} with observable\n * properties, where each property is observable as well as the object as a\n * whole.\n *\n * Classes that inherit from this have pre-defined properties, to which you can\n * add your owns. The pre-defined properties are listed in this documentation as\n * 'Observable Properties', and have their own accessors; for example,\n * {@link module:ol/Map~Map} has a `target` property, accessed with\n * `getTarget()` and changed with `setTarget()`. Not all properties are however\n * settable. There are also general-purpose accessors `get()` and `set()`. For\n * example, `get('target')` is equivalent to `getTarget()`.\n *\n * The `set` accessors trigger a change event, and you can monitor this by\n * registering a listener. For example, {@link module:ol/View~View} has a\n * `center` property, so `view.on('change:center', function(evt) {...});` would\n * call the function whenever the value of the center property changes. Within\n * the function, `evt.target` would be the view, so `evt.target.getCenter()`\n * would return the new center.\n *\n * You can add your own observable properties with\n * `object.set('prop', 'value')`, and retrieve that with `object.get('prop')`.\n * You can listen for changes on that property value with\n * `object.on('change:prop', listener)`. You can get a list of all\n * properties with {@link module:ol/Object~BaseObject#getProperties}.\n *\n * Note that the observable properties are separate from standard JS properties.\n * You can, for example, give your map object a title with\n * `map.title='New title'` and with `map.set('title', 'Another title')`. The\n * first will be a `hasOwnProperty`; the second will appear in\n * `getProperties()`. Only the second is observable.\n *\n * Properties can be deleted by using the unset method. E.g.\n * object.unset('foo').\n *\n * @fires ObjectEvent\n * @api\n */\nvar BaseObject = /*@__PURE__*/(function (Observable) {\n  function BaseObject(opt_values) {\n    Observable.call(this);\n\n    // Call {@link module:ol/util~getUid} to ensure that the order of objects' ids is\n    // the same as the order in which they were created.  This also helps to\n    // ensure that object properties are always added in the same order, which\n    // helps many JavaScript engines generate faster code.\n    getUid(this);\n\n    /**\n     * @private\n     * @type {!Object<string, *>}\n     */\n    this.values_ = {};\n\n    if (opt_values !== undefined) {\n      this.setProperties(opt_values);\n    }\n  }\n\n  if ( Observable ) BaseObject.__proto__ = Observable;\n  BaseObject.prototype = Object.create( Observable && Observable.prototype );\n  BaseObject.prototype.constructor = BaseObject;\n\n  /**\n   * Gets a value.\n   * @param {string} key Key name.\n   * @return {*} Value.\n   * @api\n   */\n  BaseObject.prototype.get = function get (key) {\n    var value;\n    if (this.values_.hasOwnProperty(key)) {\n      value = this.values_[key];\n    }\n    return value;\n  };\n\n  /**\n   * Get a list of object property names.\n   * @return {Array<string>} List of property names.\n   * @api\n   */\n  BaseObject.prototype.getKeys = function getKeys () {\n    return Object.keys(this.values_);\n  };\n\n  /**\n   * Get an object of all property names and values.\n   * @return {Object<string, *>} Object.\n   * @api\n   */\n  BaseObject.prototype.getProperties = function getProperties () {\n    return assign({}, this.values_);\n  };\n\n  /**\n   * @param {string} key Key name.\n   * @param {*} oldValue Old value.\n   */\n  BaseObject.prototype.notify = function notify (key, oldValue) {\n    var eventType;\n    eventType = getChangeEventType(key);\n    this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n    eventType = ObjectEventType.PROPERTYCHANGE;\n    this.dispatchEvent(new ObjectEvent(eventType, key, oldValue));\n  };\n\n  /**\n   * Sets a value.\n   * @param {string} key Key name.\n   * @param {*} value Value.\n   * @param {boolean=} opt_silent Update without triggering an event.\n   * @api\n   */\n  BaseObject.prototype.set = function set (key, value, opt_silent) {\n    if (opt_silent) {\n      this.values_[key] = value;\n    } else {\n      var oldValue = this.values_[key];\n      this.values_[key] = value;\n      if (oldValue !== value) {\n        this.notify(key, oldValue);\n      }\n    }\n  };\n\n  /**\n   * Sets a collection of key-value pairs.  Note that this changes any existing\n   * properties and adds new ones (it does not remove any existing properties).\n   * @param {Object<string, *>} values Values.\n   * @param {boolean=} opt_silent Update without triggering an event.\n   * @api\n   */\n  BaseObject.prototype.setProperties = function setProperties (values, opt_silent) {\n    for (var key in values) {\n      this.set(key, values[key], opt_silent);\n    }\n  };\n\n  /**\n   * Unsets a property.\n   * @param {string} key Key name.\n   * @param {boolean=} opt_silent Unset without triggering an event.\n   * @api\n   */\n  BaseObject.prototype.unset = function unset (key, opt_silent) {\n    if (key in this.values_) {\n      var oldValue = this.values_[key];\n      delete this.values_[key];\n      if (!opt_silent) {\n        this.notify(key, oldValue);\n      }\n    }\n  };\n\n  return BaseObject;\n}(Observable));\n\n\n/**\n * @type {Object<string, string>}\n */\nvar changeEventTypeCache = {};\n\n\n/**\n * @param {string} key Key name.\n * @return {string} Change name.\n */\nexport function getChangeEventType(key) {\n  return changeEventTypeCache.hasOwnProperty(key) ?\n    changeEventTypeCache[key] :\n    (changeEventTypeCache[key] = 'change:' + key);\n}\n\n\nexport default BaseObject;\n\n//# sourceMappingURL=Object.js.map","/**\n * @module ol/Collection\n */\nimport AssertionError from './AssertionError.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport BaseObject from './Object.js';\nimport Event from './events/Event.js';\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n  LENGTH: 'length'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/Collection~Collection} instances are instances of this\n * type.\n */\nexport var CollectionEvent = /*@__PURE__*/(function (Event) {\n  function CollectionEvent(type, opt_element) {\n    Event.call(this, type);\n\n    /**\n     * The element that is added to or removed from the collection.\n     * @type {*}\n     * @api\n     */\n    this.element = opt_element;\n\n  }\n\n  if ( Event ) CollectionEvent.__proto__ = Event;\n  CollectionEvent.prototype = Object.create( Event && Event.prototype );\n  CollectionEvent.prototype.constructor = CollectionEvent;\n\n  return CollectionEvent;\n}(Event));\n\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [unique=false] Disallow the same item from being added to\n * the collection twice.\n */\n\n/**\n * @classdesc\n * An expanded version of standard JS Array, adding convenience methods for\n * manipulation. Add and remove changes to the Collection trigger a Collection\n * event. Note that this does not cover changes to the objects _within_ the\n * Collection; they trigger events on the appropriate object, not on the\n * Collection as a whole.\n *\n * @fires CollectionEvent\n *\n * @template T\n * @api\n */\nvar Collection = /*@__PURE__*/(function (BaseObject) {\n  function Collection(opt_array, opt_options) {\n\n    BaseObject.call(this);\n\n    var options = opt_options || {};\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.unique_ = !!options.unique;\n\n    /**\n     * @private\n     * @type {!Array<T>}\n     */\n    this.array_ = opt_array ? opt_array : [];\n\n    if (this.unique_) {\n      for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n        this.assertUnique_(this.array_[i], i);\n      }\n    }\n\n    this.updateLength_();\n\n  }\n\n  if ( BaseObject ) Collection.__proto__ = BaseObject;\n  Collection.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Collection.prototype.constructor = Collection;\n\n  /**\n   * Remove all elements from the collection.\n   * @api\n   */\n  Collection.prototype.clear = function clear () {\n    while (this.getLength() > 0) {\n      this.pop();\n    }\n  };\n\n  /**\n   * Add elements to the collection.  This pushes each item in the provided array\n   * to the end of the collection.\n   * @param {!Array<T>} arr Array.\n   * @return {Collection<T>} This collection.\n   * @api\n   */\n  Collection.prototype.extend = function extend (arr) {\n    for (var i = 0, ii = arr.length; i < ii; ++i) {\n      this.push(arr[i]);\n    }\n    return this;\n  };\n\n  /**\n   * Iterate over each element, calling the provided callback.\n   * @param {function(T, number, Array<T>): *} f The function to call\n   *     for every element. This function takes 3 arguments (the element, the\n   *     index and the array). The return value is ignored.\n   * @api\n   */\n  Collection.prototype.forEach = function forEach (f) {\n    var array = this.array_;\n    for (var i = 0, ii = array.length; i < ii; ++i) {\n      f(array[i], i, array);\n    }\n  };\n\n  /**\n   * Get a reference to the underlying Array object. Warning: if the array\n   * is mutated, no events will be dispatched by the collection, and the\n   * collection's \"length\" property won't be in sync with the actual length\n   * of the array.\n   * @return {!Array<T>} Array.\n   * @api\n   */\n  Collection.prototype.getArray = function getArray () {\n    return this.array_;\n  };\n\n  /**\n   * Get the element at the provided index.\n   * @param {number} index Index.\n   * @return {T} Element.\n   * @api\n   */\n  Collection.prototype.item = function item (index) {\n    return this.array_[index];\n  };\n\n  /**\n   * Get the length of this collection.\n   * @return {number} The length of the array.\n   * @observable\n   * @api\n   */\n  Collection.prototype.getLength = function getLength () {\n    return this.get(Property.LENGTH);\n  };\n\n  /**\n   * Insert an element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */\n  Collection.prototype.insertAt = function insertAt (index, elem) {\n    if (this.unique_) {\n      this.assertUnique_(elem);\n    }\n    this.array_.splice(index, 0, elem);\n    this.updateLength_();\n    this.dispatchEvent(\n      new CollectionEvent(CollectionEventType.ADD, elem));\n  };\n\n  /**\n   * Remove the last element of the collection and return it.\n   * Return `undefined` if the collection is empty.\n   * @return {T|undefined} Element.\n   * @api\n   */\n  Collection.prototype.pop = function pop () {\n    return this.removeAt(this.getLength() - 1);\n  };\n\n  /**\n   * Insert the provided element at the end of the collection.\n   * @param {T} elem Element.\n   * @return {number} New length of the collection.\n   * @api\n   */\n  Collection.prototype.push = function push (elem) {\n    if (this.unique_) {\n      this.assertUnique_(elem);\n    }\n    var n = this.getLength();\n    this.insertAt(n, elem);\n    return this.getLength();\n  };\n\n  /**\n   * Remove the first occurrence of an element from the collection.\n   * @param {T} elem Element.\n   * @return {T|undefined} The removed element or undefined if none found.\n   * @api\n   */\n  Collection.prototype.remove = function remove (elem) {\n    var arr = this.array_;\n    for (var i = 0, ii = arr.length; i < ii; ++i) {\n      if (arr[i] === elem) {\n        return this.removeAt(i);\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * Remove the element at the provided index and return it.\n   * Return `undefined` if the collection does not contain this index.\n   * @param {number} index Index.\n   * @return {T|undefined} Value.\n   * @api\n   */\n  Collection.prototype.removeAt = function removeAt (index) {\n    var prev = this.array_[index];\n    this.array_.splice(index, 1);\n    this.updateLength_();\n    this.dispatchEvent(new CollectionEvent(CollectionEventType.REMOVE, prev));\n    return prev;\n  };\n\n  /**\n   * Set the element at the provided index.\n   * @param {number} index Index.\n   * @param {T} elem Element.\n   * @api\n   */\n  Collection.prototype.setAt = function setAt (index, elem) {\n    var n = this.getLength();\n    if (index < n) {\n      if (this.unique_) {\n        this.assertUnique_(elem, index);\n      }\n      var prev = this.array_[index];\n      this.array_[index] = elem;\n      this.dispatchEvent(\n        new CollectionEvent(CollectionEventType.REMOVE, prev));\n      this.dispatchEvent(\n        new CollectionEvent(CollectionEventType.ADD, elem));\n    } else {\n      for (var j = n; j < index; ++j) {\n        this.insertAt(j, undefined);\n      }\n      this.insertAt(index, elem);\n    }\n  };\n\n  /**\n   * @private\n   */\n  Collection.prototype.updateLength_ = function updateLength_ () {\n    this.set(Property.LENGTH, this.array_.length);\n  };\n\n  /**\n   * @private\n   * @param {T} elem Element.\n   * @param {number=} opt_except Optional index to ignore.\n   */\n  Collection.prototype.assertUnique_ = function assertUnique_ (elem, opt_except) {\n    for (var i = 0, ii = this.array_.length; i < ii; ++i) {\n      if (this.array_[i] === elem && i !== opt_except) {\n        throw new AssertionError(58);\n      }\n    }\n  };\n\n  return Collection;\n}(BaseObject));\n\n\nexport default Collection;\n\n//# sourceMappingURL=Collection.js.map","/**\n * @module ol/asserts\n */\nimport AssertionError from './AssertionError.js';\n\n/**\n * @param {*} assertion Assertion we expected to be truthy.\n * @param {number} errorCode Error code.\n */\nexport function assert(assertion, errorCode) {\n  if (!assertion) {\n    throw new AssertionError(errorCode);\n  }\n}\n\n//# sourceMappingURL=asserts.js.map","/**\n * @module ol/Feature\n */\nimport {assert} from './asserts.js';\nimport {listen, unlisten, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature.  For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature';\n * import Polygon from 'ol/geom/Polygon';\n * import Point from 'ol/geom/Point';\n *\n * var feature = new Feature({\n *   geometry: new Polygon(polyCoords),\n *   labelPoint: new Point(labelCoords),\n *   name: 'My Polygon'\n * });\n *\n * // get the polygon geometry\n * var poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * var point = feature.getGeometry();\n * ```\n *\n * @api\n */\nvar Feature = /*@__PURE__*/(function (BaseObject) {\n  function Feature(opt_geometryOrProperties) {\n\n    BaseObject.call(this);\n\n    /**\n     * @private\n     * @type {number|string|undefined}\n     */\n    this.id_ = undefined;\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.geometryName_ = 'geometry';\n\n    /**\n     * User provided style.\n     * @private\n     * @type {import(\"./style/Style.js\").StyleLike}\n     */\n    this.style_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n     */\n    this.styleFunction_ = undefined;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.geometryChangeKey_ = null;\n\n    listen(\n      this, getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_, this);\n\n    if (opt_geometryOrProperties) {\n      if (typeof /** @type {?} */ (opt_geometryOrProperties).getSimplifiedGeometry === 'function') {\n        var geometry = /** @type {import(\"./geom/Geometry.js\").default} */ (opt_geometryOrProperties);\n        this.setGeometry(geometry);\n      } else {\n        /** @type {Object<string, *>} */\n        var properties = opt_geometryOrProperties;\n        this.setProperties(properties);\n      }\n    }\n  }\n\n  if ( BaseObject ) Feature.__proto__ = BaseObject;\n  Feature.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Feature.prototype.constructor = Feature;\n\n  /**\n   * Clone this feature. If the original feature has a geometry it\n   * is also cloned. The feature id is not set in the clone.\n   * @return {Feature} The clone.\n   * @api\n   */\n  Feature.prototype.clone = function clone () {\n    var clone = new Feature(this.getProperties());\n    clone.setGeometryName(this.getGeometryName());\n    var geometry = this.getGeometry();\n    if (geometry) {\n      clone.setGeometry(geometry.clone());\n    }\n    var style = this.getStyle();\n    if (style) {\n      clone.setStyle(style);\n    }\n    return clone;\n  };\n\n  /**\n   * Get the feature's default geometry.  A feature may have any number of named\n   * geometries.  The \"default\" geometry (the one that is rendered by default) is\n   * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n   * @return {import(\"./geom/Geometry.js\").default|undefined} The default geometry for the feature.\n   * @api\n   * @observable\n   */\n  Feature.prototype.getGeometry = function getGeometry () {\n    return (\n      /** @type {import(\"./geom/Geometry.js\").default|undefined} */ (this.get(this.geometryName_))\n    );\n  };\n\n  /**\n   * Get the feature identifier.  This is a stable identifier for the feature and\n   * is either set when reading data from a remote source or set explicitly by\n   * calling {@link module:ol/Feature~Feature#setId}.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  Feature.prototype.getId = function getId () {\n    return this.id_;\n  };\n\n  /**\n   * Get the name of the feature's default geometry.  By default, the default\n   * geometry is named `geometry`.\n   * @return {string} Get the property name associated with the default geometry\n   *     for this feature.\n   * @api\n   */\n  Feature.prototype.getGeometryName = function getGeometryName () {\n    return this.geometryName_;\n  };\n\n  /**\n   * Get the feature's style. Will return what was provided to the\n   * {@link module:ol/Feature~Feature#setStyle} method.\n   * @return {import(\"./style/Style.js\").StyleLike} The feature style.\n   * @api\n   */\n  Feature.prototype.getStyle = function getStyle () {\n    return this.style_;\n  };\n\n  /**\n   * Get the feature's style function.\n   * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n   * representing the current style of this feature.\n   * @api\n   */\n  Feature.prototype.getStyleFunction = function getStyleFunction () {\n    return this.styleFunction_;\n  };\n\n  /**\n   * @private\n   */\n  Feature.prototype.handleGeometryChange_ = function handleGeometryChange_ () {\n    this.changed();\n  };\n\n  /**\n   * @private\n   */\n  Feature.prototype.handleGeometryChanged_ = function handleGeometryChanged_ () {\n    if (this.geometryChangeKey_) {\n      unlistenByKey(this.geometryChangeKey_);\n      this.geometryChangeKey_ = null;\n    }\n    var geometry = this.getGeometry();\n    if (geometry) {\n      this.geometryChangeKey_ = listen(geometry,\n        EventType.CHANGE, this.handleGeometryChange_, this);\n    }\n    this.changed();\n  };\n\n  /**\n   * Set the default geometry for the feature.  This will update the property\n   * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n   * @param {import(\"./geom/Geometry.js\").default|undefined} geometry The new geometry.\n   * @api\n   * @observable\n   */\n  Feature.prototype.setGeometry = function setGeometry (geometry) {\n    this.set(this.geometryName_, geometry);\n  };\n\n  /**\n   * Set the style for the feature.  This can be a single style object, an array\n   * of styles, or a function that takes a resolution and returns an array of\n   * styles. If it is `null` the feature has no style (a `null` style).\n   * @param {import(\"./style/Style.js\").StyleLike} style Style for this feature.\n   * @api\n   * @fires module:ol/events/Event~Event#event:change\n   */\n  Feature.prototype.setStyle = function setStyle (style) {\n    this.style_ = style;\n    this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n    this.changed();\n  };\n\n  /**\n   * Set the feature id.  The feature id is considered stable and may be used when\n   * requesting features or comparing identifiers returned from a remote source.\n   * The feature id can be used with the\n   * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n   * @param {number|string|undefined} id The feature id.\n   * @api\n   * @fires module:ol/events/Event~Event#event:change\n   */\n  Feature.prototype.setId = function setId (id) {\n    this.id_ = id;\n    this.changed();\n  };\n\n  /**\n   * Set the property name to be used when getting the feature's default geometry.\n   * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n   * this name will be returned.\n   * @param {string} name The property name of the default geometry.\n   * @api\n   */\n  Feature.prototype.setGeometryName = function setGeometryName (name) {\n    unlisten(\n      this, getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_, this);\n    this.geometryName_ = name;\n    listen(\n      this, getChangeEventType(this.geometryName_),\n      this.handleGeometryChanged_, this);\n    this.handleGeometryChanged_();\n  };\n\n  return Feature;\n}(BaseObject));\n\n\n/**\n * Convert the provided object into a feature style function.  Functions passed\n * through unchanged.  Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n *     A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n  if (typeof obj === 'function') {\n    return obj;\n  } else {\n    /**\n     * @type {Array<import(\"./style/Style.js\").default>}\n     */\n    var styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(typeof /** @type {?} */ (obj).getZIndex === 'function',\n        41); // Expected an `import(\"./style/Style.js\").Style` or an array of `import(\"./style/Style.js\").Style`\n      var style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n      styles = [style];\n    }\n    return function() {\n      return styles;\n    };\n  }\n}\nexport default Feature;\n\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/array\n */\n\n\n/**\n * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1.\n * https://github.com/darkskyapp/binary-search\n *\n * @param {Array<*>} haystack Items to search through.\n * @param {*} needle The item to look for.\n * @param {Function=} opt_comparator Comparator function.\n * @return {number} The index of the item if found, -1 if not.\n */\nexport function binarySearch(haystack, needle, opt_comparator) {\n  var mid, cmp;\n  var comparator = opt_comparator || numberSafeCompareFunction;\n  var low = 0;\n  var high = haystack.length;\n  var found = false;\n\n  while (low < high) {\n    /* Note that \"(low + high) >>> 1\" may overflow, and results in a typecast\n     * to double (which gives the wrong results). */\n    mid = low + (high - low >> 1);\n    cmp = +comparator(haystack[mid], needle);\n\n    if (cmp < 0.0) { /* Too low. */\n      low = mid + 1;\n\n    } else { /* Key found or too high */\n      high = mid;\n      found = !cmp;\n    }\n  }\n\n  /* Key not found. */\n  return found ? low : ~low;\n}\n\n\n/**\n * Compare function for array sort that is safe for numbers.\n * @param {*} a The first object to be compared.\n * @param {*} b The second object to be compared.\n * @return {number} A negative number, zero, or a positive number as the first\n *     argument is less than, equal to, or greater than the second.\n */\nexport function numberSafeCompareFunction(a, b) {\n  return a > b ? 1 : a < b ? -1 : 0;\n}\n\n\n/**\n * Whether the array contains the given object.\n * @param {Array<*>} arr The array to test for the presence of the element.\n * @param {*} obj The object for which to test.\n * @return {boolean} The object is in the array.\n */\nexport function includes(arr, obj) {\n  return arr.indexOf(obj) >= 0;\n}\n\n\n/**\n * @param {Array<number>} arr Array.\n * @param {number} target Target.\n * @param {number} direction 0 means return the nearest, > 0\n *    means return the largest nearest, < 0 means return the\n *    smallest nearest.\n * @return {number} Index.\n */\nexport function linearFindNearest(arr, target, direction) {\n  var n = arr.length;\n  if (arr[0] <= target) {\n    return 0;\n  } else if (target <= arr[n - 1]) {\n    return n - 1;\n  } else {\n    var i;\n    if (direction > 0) {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] < target) {\n          return i - 1;\n        }\n      }\n    } else if (direction < 0) {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] <= target) {\n          return i;\n        }\n      }\n    } else {\n      for (i = 1; i < n; ++i) {\n        if (arr[i] == target) {\n          return i;\n        } else if (arr[i] < target) {\n          if (arr[i - 1] - target < target - arr[i]) {\n            return i - 1;\n          } else {\n            return i;\n          }\n        }\n      }\n    }\n    return n - 1;\n  }\n}\n\n\n/**\n * @param {Array<*>} arr Array.\n * @param {number} begin Begin index.\n * @param {number} end End index.\n */\nexport function reverseSubArray(arr, begin, end) {\n  while (begin < end) {\n    var tmp = arr[begin];\n    arr[begin] = arr[end];\n    arr[end] = tmp;\n    ++begin;\n    --end;\n  }\n}\n\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {!Array<VALUE>|VALUE} data The elements or arrays of elements to add to arr.\n * @template VALUE\n */\nexport function extend(arr, data) {\n  var extension = Array.isArray(data) ? data : [data];\n  var length = extension.length;\n  for (var i = 0; i < length; i++) {\n    arr[arr.length] = extension[i];\n  }\n}\n\n\n/**\n * @param {Array<VALUE>} arr The array to modify.\n * @param {VALUE} obj The element to remove.\n * @template VALUE\n * @return {boolean} If the element was removed.\n */\nexport function remove(arr, obj) {\n  var i = arr.indexOf(obj);\n  var found = i > -1;\n  if (found) {\n    arr.splice(i, 1);\n  }\n  return found;\n}\n\n\n/**\n * @param {Array<VALUE>} arr The array to search in.\n * @param {function(VALUE, number, ?) : boolean} func The function to compare.\n * @template VALUE\n * @return {VALUE|null} The element found or null.\n */\nexport function find(arr, func) {\n  var length = arr.length >>> 0;\n  var value;\n\n  for (var i = 0; i < length; i++) {\n    value = arr[i];\n    if (func(value, i, arr)) {\n      return value;\n    }\n  }\n  return null;\n}\n\n\n/**\n * @param {Array|Uint8ClampedArray} arr1 The first array to compare.\n * @param {Array|Uint8ClampedArray} arr2 The second array to compare.\n * @return {boolean} Whether the two arrays are equal.\n */\nexport function equals(arr1, arr2) {\n  var len1 = arr1.length;\n  if (len1 !== arr2.length) {\n    return false;\n  }\n  for (var i = 0; i < len1; i++) {\n    if (arr1[i] !== arr2[i]) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/**\n * Sort the passed array such that the relative order of equal elements is preverved.\n * See https://en.wikipedia.org/wiki/Sorting_algorithm#Stability for details.\n * @param {Array<*>} arr The array to sort (modifies original).\n * @param {!function(*, *): number} compareFnc Comparison function.\n * @api\n */\nexport function stableSort(arr, compareFnc) {\n  var length = arr.length;\n  var tmp = Array(arr.length);\n  var i;\n  for (i = 0; i < length; i++) {\n    tmp[i] = {index: i, value: arr[i]};\n  }\n  tmp.sort(function(a, b) {\n    return compareFnc(a.value, b.value) || a.index - b.index;\n  });\n  for (i = 0; i < arr.length; i++) {\n    arr[i] = tmp[i].value;\n  }\n}\n\n\n/**\n * @param {Array<*>} arr The array to search in.\n * @param {Function} func Comparison function.\n * @return {number} Return index.\n */\nexport function findIndex(arr, func) {\n  var index;\n  var found = !arr.every(function(el, idx) {\n    index = idx;\n    return !func(el, idx, arr);\n  });\n  return found ? index : -1;\n}\n\n\n/**\n * @param {Array<*>} arr The array to test.\n * @param {Function=} opt_func Comparison function.\n * @param {boolean=} opt_strict Strictly sorted (default false).\n * @return {boolean} Return index.\n */\nexport function isSorted(arr, opt_func, opt_strict) {\n  var compare = opt_func || numberSafeCompareFunction;\n  return arr.every(function(currentVal, index) {\n    if (index === 0) {\n      return true;\n    }\n    var res = compare(arr[index - 1], currentVal);\n    return !(res > 0 || opt_strict && res === 0);\n  });\n}\n\n//# sourceMappingURL=array.js.map","/**\n * @module ol/extent/Corner\n */\n\n/**\n * Extent corner.\n * @enum {string}\n */\nexport default {\n  BOTTOM_LEFT: 'bottom-left',\n  BOTTOM_RIGHT: 'bottom-right',\n  TOP_LEFT: 'top-left',\n  TOP_RIGHT: 'top-right'\n};\n\n//# sourceMappingURL=Corner.js.map","/**\n * @module ol/extent/Relationship\n */\n\n/**\n * Relationship to an extent.\n * @enum {number}\n */\nexport default {\n  UNKNOWN: 0,\n  INTERSECTING: 1,\n  ABOVE: 2,\n  RIGHT: 4,\n  BELOW: 8,\n  LEFT: 16\n};\n\n//# sourceMappingURL=Relationship.js.map","/**\n * @module ol/extent\n */\nimport {assert} from './asserts.js';\nimport Corner from './extent/Corner.js';\nimport Relationship from './extent/Relationship.js';\n\n\n/**\n * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`.\n * @typedef {Array<number>} Extent\n * @api\n */\n\n/**\n * Build an extent that includes all given coordinates.\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Bounding extent.\n * @api\n */\nexport function boundingExtent(coordinates) {\n  var extent = createEmpty();\n  for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n\n/**\n * @param {Array<number>} xs Xs.\n * @param {Array<number>} ys Ys.\n * @param {Extent=} opt_extent Destination extent.\n * @private\n * @return {Extent} Extent.\n */\nfunction _boundingExtentXYs(xs, ys, opt_extent) {\n  var minX = Math.min.apply(null, xs);\n  var minY = Math.min.apply(null, ys);\n  var maxX = Math.max.apply(null, xs);\n  var maxY = Math.max.apply(null, ys);\n  return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n}\n\n\n/**\n * Return extent increased by the provided value.\n * @param {Extent} extent Extent.\n * @param {number} value The amount by which the extent should be buffered.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function buffer(extent, value, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0] - value;\n    opt_extent[1] = extent[1] - value;\n    opt_extent[2] = extent[2] + value;\n    opt_extent[3] = extent[3] + value;\n    return opt_extent;\n  } else {\n    return [\n      extent[0] - value,\n      extent[1] - value,\n      extent[2] + value,\n      extent[3] + value\n    ];\n  }\n}\n\n\n/**\n * Creates a clone of an extent.\n *\n * @param {Extent} extent Extent to clone.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} The clone.\n */\nexport function clone(extent, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0];\n    opt_extent[1] = extent[1];\n    opt_extent[2] = extent[2];\n    opt_extent[3] = extent[3];\n    return opt_extent;\n  } else {\n    return extent.slice();\n  }\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {number} Closest squared distance.\n */\nexport function closestSquaredDistanceXY(extent, x, y) {\n  var dx, dy;\n  if (x < extent[0]) {\n    dx = extent[0] - x;\n  } else if (extent[2] < x) {\n    dx = x - extent[2];\n  } else {\n    dx = 0;\n  }\n  if (y < extent[1]) {\n    dy = extent[1] - y;\n  } else if (extent[3] < y) {\n    dy = y - extent[3];\n  } else {\n    dy = 0;\n  }\n  return dx * dx + dy * dy;\n}\n\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {boolean} The coordinate is contained in the extent.\n * @api\n */\nexport function containsCoordinate(extent, coordinate) {\n  return containsXY(extent, coordinate[0], coordinate[1]);\n}\n\n\n/**\n * Check if one extent contains another.\n *\n * An extent is deemed contained if it lies completely within the other extent,\n * including if they share one or more edges.\n *\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The second extent is contained by or on the edge of the\n *     first.\n * @api\n */\nexport function containsExtent(extent1, extent2) {\n  return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] &&\n      extent1[1] <= extent2[1] && extent2[3] <= extent1[3];\n}\n\n\n/**\n * Check if the passed coordinate is contained or on the edge of the extent.\n *\n * @param {Extent} extent Extent.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n * @return {boolean} The x, y values are contained in the extent.\n * @api\n */\nexport function containsXY(extent, x, y) {\n  return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];\n}\n\n\n/**\n * Get the relationship between a coordinate and extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate The coordinate.\n * @return {Relationship} The relationship (bitwise compare with\n *     import(\"./extent/Relationship.js\").Relationship).\n */\nexport function coordinateRelationship(extent, coordinate) {\n  var minX = extent[0];\n  var minY = extent[1];\n  var maxX = extent[2];\n  var maxY = extent[3];\n  var x = coordinate[0];\n  var y = coordinate[1];\n  var relationship = Relationship.UNKNOWN;\n  if (x < minX) {\n    relationship = relationship | Relationship.LEFT;\n  } else if (x > maxX) {\n    relationship = relationship | Relationship.RIGHT;\n  }\n  if (y < minY) {\n    relationship = relationship | Relationship.BELOW;\n  } else if (y > maxY) {\n    relationship = relationship | Relationship.ABOVE;\n  }\n  if (relationship === Relationship.UNKNOWN) {\n    relationship = Relationship.INTERSECTING;\n  }\n  return relationship;\n}\n\n\n/**\n * Create an empty extent.\n * @return {Extent} Empty extent.\n * @api\n */\nexport function createEmpty() {\n  return [Infinity, Infinity, -Infinity, -Infinity];\n}\n\n\n/**\n * Create a new extent or update the provided extent.\n * @param {number} minX Minimum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxX Maximum X.\n * @param {number} maxY Maximum Y.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdate(minX, minY, maxX, maxY, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = minX;\n    opt_extent[1] = minY;\n    opt_extent[2] = maxX;\n    opt_extent[3] = maxY;\n    return opt_extent;\n  } else {\n    return [minX, minY, maxX, maxY];\n  }\n}\n\n\n/**\n * Create a new empty extent or make the provided one empty.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateEmpty(opt_extent) {\n  return createOrUpdate(\n    Infinity, Infinity, -Infinity, -Infinity, opt_extent);\n}\n\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinate(coordinate, opt_extent) {\n  var x = coordinate[0];\n  var y = coordinate[1];\n  return createOrUpdate(x, y, x, y, opt_extent);\n}\n\n\n/**\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromCoordinates(coordinates, opt_extent) {\n  var extent = createOrUpdateEmpty(opt_extent);\n  return extendCoordinates(extent, coordinates);\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, stride, opt_extent) {\n  var extent = createOrUpdateEmpty(opt_extent);\n  return extendFlatCoordinates(extent, flatCoordinates, offset, end, stride);\n}\n\n/**\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function createOrUpdateFromRings(rings, opt_extent) {\n  var extent = createOrUpdateEmpty(opt_extent);\n  return extendRings(extent, rings);\n}\n\n\n/**\n * Determine if two extents are equivalent.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {boolean} The two extents are equivalent.\n * @api\n */\nexport function equals(extent1, extent2) {\n  return extent1[0] == extent2[0] && extent1[2] == extent2[2] &&\n      extent1[1] == extent2[1] && extent1[3] == extent2[3];\n}\n\n\n/**\n * Modify an extent to include another extent.\n * @param {Extent} extent1 The extent to be modified.\n * @param {Extent} extent2 The extent that will be included in the first.\n * @return {Extent} A reference to the first (extended) extent.\n * @api\n */\nexport function extend(extent1, extent2) {\n  if (extent2[0] < extent1[0]) {\n    extent1[0] = extent2[0];\n  }\n  if (extent2[2] > extent1[2]) {\n    extent1[2] = extent2[2];\n  }\n  if (extent2[1] < extent1[1]) {\n    extent1[1] = extent2[1];\n  }\n  if (extent2[3] > extent1[3]) {\n    extent1[3] = extent2[3];\n  }\n  return extent1;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n */\nexport function extendCoordinate(extent, coordinate) {\n  if (coordinate[0] < extent[0]) {\n    extent[0] = coordinate[0];\n  }\n  if (coordinate[0] > extent[2]) {\n    extent[2] = coordinate[0];\n  }\n  if (coordinate[1] < extent[1]) {\n    extent[1] = coordinate[1];\n  }\n  if (coordinate[1] > extent[3]) {\n    extent[3] = coordinate[1];\n  }\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates Coordinates.\n * @return {Extent} Extent.\n */\nexport function extendCoordinates(extent, coordinates) {\n  for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n    extendCoordinate(extent, coordinates[i]);\n  }\n  return extent;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Extent} Extent.\n */\nexport function extendFlatCoordinates(extent, flatCoordinates, offset, end, stride) {\n  for (; offset < end; offset += stride) {\n    extendXY(extent, flatCoordinates[offset], flatCoordinates[offset + 1]);\n  }\n  return extent;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {Array<Array<import(\"./coordinate.js\").Coordinate>>} rings Rings.\n * @return {Extent} Extent.\n */\nexport function extendRings(extent, rings) {\n  for (var i = 0, ii = rings.length; i < ii; ++i) {\n    extendCoordinates(extent, rings[i]);\n  }\n  return extent;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} x X.\n * @param {number} y Y.\n */\nexport function extendXY(extent, x, y) {\n  extent[0] = Math.min(extent[0], x);\n  extent[1] = Math.min(extent[1], y);\n  extent[2] = Math.max(extent[2], x);\n  extent[3] = Math.max(extent[3], y);\n}\n\n\n/**\n * This function calls `callback` for each corner of the extent. If the\n * callback returns a truthy value the function returns that value\n * immediately. Otherwise the function returns `false`.\n * @param {Extent} extent Extent.\n * @param {function(this:T, import(\"./coordinate.js\").Coordinate): S} callback Callback.\n * @param {T=} opt_this Value to use as `this` when executing `callback`.\n * @return {S|boolean} Value.\n * @template S, T\n */\nexport function forEachCorner(extent, callback, opt_this) {\n  var val;\n  val = callback.call(opt_this, getBottomLeft(extent));\n  if (val) {\n    return val;\n  }\n  val = callback.call(opt_this, getBottomRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback.call(opt_this, getTopRight(extent));\n  if (val) {\n    return val;\n  }\n  val = callback.call(opt_this, getTopLeft(extent));\n  if (val) {\n    return val;\n  }\n  return false;\n}\n\n\n/**\n * Get the size of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Area.\n * @api\n */\nexport function getArea(extent) {\n  var area = 0;\n  if (!isEmpty(extent)) {\n    area = getWidth(extent) * getHeight(extent);\n  }\n  return area;\n}\n\n\n/**\n * Get the bottom left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom left coordinate.\n * @api\n */\nexport function getBottomLeft(extent) {\n  return [extent[0], extent[1]];\n}\n\n\n/**\n * Get the bottom right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Bottom right coordinate.\n * @api\n */\nexport function getBottomRight(extent) {\n  return [extent[2], extent[1]];\n}\n\n\n/**\n * Get the center coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Center.\n * @api\n */\nexport function getCenter(extent) {\n  return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];\n}\n\n\n/**\n * Get a corner coordinate of an extent.\n * @param {Extent} extent Extent.\n * @param {Corner} corner Corner.\n * @return {import(\"./coordinate.js\").Coordinate} Corner coordinate.\n */\nexport function getCorner(extent, corner) {\n  var coordinate;\n  if (corner === Corner.BOTTOM_LEFT) {\n    coordinate = getBottomLeft(extent);\n  } else if (corner === Corner.BOTTOM_RIGHT) {\n    coordinate = getBottomRight(extent);\n  } else if (corner === Corner.TOP_LEFT) {\n    coordinate = getTopLeft(extent);\n  } else if (corner === Corner.TOP_RIGHT) {\n    coordinate = getTopRight(extent);\n  } else {\n    assert(false, 13); // Invalid corner\n  }\n  return coordinate;\n}\n\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Enlarged area.\n */\nexport function getEnlargedArea(extent1, extent2) {\n  var minX = Math.min(extent1[0], extent2[0]);\n  var minY = Math.min(extent1[1], extent2[1]);\n  var maxX = Math.max(extent1[2], extent2[2]);\n  var maxY = Math.max(extent1[3], extent2[3]);\n  return (maxX - minX) * (maxY - minY);\n}\n\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {import(\"./size.js\").Size} size Size.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n */\nexport function getForViewAndSize(center, resolution, rotation, size, opt_extent) {\n  var dx = resolution * size[0] / 2;\n  var dy = resolution * size[1] / 2;\n  var cosRotation = Math.cos(rotation);\n  var sinRotation = Math.sin(rotation);\n  var xCos = dx * cosRotation;\n  var xSin = dx * sinRotation;\n  var yCos = dy * cosRotation;\n  var ySin = dy * sinRotation;\n  var x = center[0];\n  var y = center[1];\n  var x0 = x - xCos + ySin;\n  var x1 = x - xCos - ySin;\n  var x2 = x + xCos - ySin;\n  var x3 = x + xCos + ySin;\n  var y0 = y - xSin - yCos;\n  var y1 = y - xSin + yCos;\n  var y2 = y + xSin + yCos;\n  var y3 = y + xSin - yCos;\n  return createOrUpdate(\n    Math.min(x0, x1, x2, x3), Math.min(y0, y1, y2, y3),\n    Math.max(x0, x1, x2, x3), Math.max(y0, y1, y2, y3),\n    opt_extent);\n}\n\n\n/**\n * Get the height of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Height.\n * @api\n */\nexport function getHeight(extent) {\n  return extent[3] - extent[1];\n}\n\n\n/**\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @return {number} Intersection area.\n */\nexport function getIntersectionArea(extent1, extent2) {\n  var intersection = getIntersection(extent1, extent2);\n  return getArea(intersection);\n}\n\n\n/**\n * Get the intersection of two extents.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent 2.\n * @param {Extent=} opt_extent Optional extent to populate with intersection.\n * @return {Extent} Intersecting extent.\n * @api\n */\nexport function getIntersection(extent1, extent2, opt_extent) {\n  var intersection = opt_extent ? opt_extent : createEmpty();\n  if (intersects(extent1, extent2)) {\n    if (extent1[0] > extent2[0]) {\n      intersection[0] = extent1[0];\n    } else {\n      intersection[0] = extent2[0];\n    }\n    if (extent1[1] > extent2[1]) {\n      intersection[1] = extent1[1];\n    } else {\n      intersection[1] = extent2[1];\n    }\n    if (extent1[2] < extent2[2]) {\n      intersection[2] = extent1[2];\n    } else {\n      intersection[2] = extent2[2];\n    }\n    if (extent1[3] < extent2[3]) {\n      intersection[3] = extent1[3];\n    } else {\n      intersection[3] = extent2[3];\n    }\n  } else {\n    createOrUpdateEmpty(intersection);\n  }\n  return intersection;\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @return {number} Margin.\n */\nexport function getMargin(extent) {\n  return getWidth(extent) + getHeight(extent);\n}\n\n\n/**\n * Get the size (width, height) of an extent.\n * @param {Extent} extent The extent.\n * @return {import(\"./size.js\").Size} The extent size.\n * @api\n */\nexport function getSize(extent) {\n  return [extent[2] - extent[0], extent[3] - extent[1]];\n}\n\n\n/**\n * Get the top left coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top left coordinate.\n * @api\n */\nexport function getTopLeft(extent) {\n  return [extent[0], extent[3]];\n}\n\n\n/**\n * Get the top right coordinate of an extent.\n * @param {Extent} extent Extent.\n * @return {import(\"./coordinate.js\").Coordinate} Top right coordinate.\n * @api\n */\nexport function getTopRight(extent) {\n  return [extent[2], extent[3]];\n}\n\n\n/**\n * Get the width of an extent.\n * @param {Extent} extent Extent.\n * @return {number} Width.\n * @api\n */\nexport function getWidth(extent) {\n  return extent[2] - extent[0];\n}\n\n\n/**\n * Determine if one extent intersects another.\n * @param {Extent} extent1 Extent 1.\n * @param {Extent} extent2 Extent.\n * @return {boolean} The two extents intersect.\n * @api\n */\nexport function intersects(extent1, extent2) {\n  return extent1[0] <= extent2[2] &&\n      extent1[2] >= extent2[0] &&\n      extent1[1] <= extent2[3] &&\n      extent1[3] >= extent2[1];\n}\n\n\n/**\n * Determine if an extent is empty.\n * @param {Extent} extent Extent.\n * @return {boolean} Is empty.\n * @api\n */\nexport function isEmpty(extent) {\n  return extent[2] < extent[0] || extent[3] < extent[1];\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {Extent=} opt_extent Extent.\n * @return {Extent} Extent.\n */\nexport function returnOrUpdate(extent, opt_extent) {\n  if (opt_extent) {\n    opt_extent[0] = extent[0];\n    opt_extent[1] = extent[1];\n    opt_extent[2] = extent[2];\n    opt_extent[3] = extent[3];\n    return opt_extent;\n  } else {\n    return extent;\n  }\n}\n\n\n/**\n * @param {Extent} extent Extent.\n * @param {number} value Value.\n */\nexport function scaleFromCenter(extent, value) {\n  var deltaX = ((extent[2] - extent[0]) / 2) * (value - 1);\n  var deltaY = ((extent[3] - extent[1]) / 2) * (value - 1);\n  extent[0] -= deltaX;\n  extent[2] += deltaX;\n  extent[1] -= deltaY;\n  extent[3] += deltaY;\n}\n\n\n/**\n * Determine if the segment between two coordinates intersects (crosses,\n * touches, or is contained by) the provided extent.\n * @param {Extent} extent The extent.\n * @param {import(\"./coordinate.js\").Coordinate} start Segment start coordinate.\n * @param {import(\"./coordinate.js\").Coordinate} end Segment end coordinate.\n * @return {boolean} The segment intersects the extent.\n */\nexport function intersectsSegment(extent, start, end) {\n  var intersects = false;\n  var startRel = coordinateRelationship(extent, start);\n  var endRel = coordinateRelationship(extent, end);\n  if (startRel === Relationship.INTERSECTING ||\n      endRel === Relationship.INTERSECTING) {\n    intersects = true;\n  } else {\n    var minX = extent[0];\n    var minY = extent[1];\n    var maxX = extent[2];\n    var maxY = extent[3];\n    var startX = start[0];\n    var startY = start[1];\n    var endX = end[0];\n    var endY = end[1];\n    var slope = (endY - startY) / (endX - startX);\n    var x, y;\n    if (!!(endRel & Relationship.ABOVE) &&\n        !(startRel & Relationship.ABOVE)) {\n      // potentially intersects top\n      x = endX - ((endY - maxY) / slope);\n      intersects = x >= minX && x <= maxX;\n    }\n    if (!intersects && !!(endRel & Relationship.RIGHT) &&\n        !(startRel & Relationship.RIGHT)) {\n      // potentially intersects right\n      y = endY - ((endX - maxX) * slope);\n      intersects = y >= minY && y <= maxY;\n    }\n    if (!intersects && !!(endRel & Relationship.BELOW) &&\n        !(startRel & Relationship.BELOW)) {\n      // potentially intersects bottom\n      x = endX - ((endY - minY) / slope);\n      intersects = x >= minX && x <= maxX;\n    }\n    if (!intersects && !!(endRel & Relationship.LEFT) &&\n        !(startRel & Relationship.LEFT)) {\n      // potentially intersects left\n      y = endY - ((endX - minX) * slope);\n      intersects = y >= minY && y <= maxY;\n    }\n\n  }\n  return intersects;\n}\n\n\n/**\n * Apply a transform function to the extent.\n * @param {Extent} extent Extent.\n * @param {import(\"./proj.js\").TransformFunction} transformFn Transform function.\n * Called with `[minX, minY, maxX, maxY]` extent coordinates.\n * @param {Extent=} opt_extent Destination extent.\n * @return {Extent} Extent.\n * @api\n */\nexport function applyTransform(extent, transformFn, opt_extent) {\n  var coordinates = [\n    extent[0], extent[1],\n    extent[0], extent[3],\n    extent[2], extent[1],\n    extent[2], extent[3]\n  ];\n  transformFn(coordinates, coordinates, 2);\n  var xs = [coordinates[0], coordinates[2], coordinates[4], coordinates[6]];\n  var ys = [coordinates[1], coordinates[3], coordinates[5], coordinates[7]];\n  return _boundingExtentXYs(xs, ys, opt_extent);\n}\n\n//# sourceMappingURL=extent.js.map","/**\n * @module ol/geom/GeometryLayout\n */\n\n/**\n * The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')\n * or measure ('M') coordinate is available. Supported values are `'XY'`,\n * `'XYZ'`, `'XYM'`, `'XYZM'`.\n * @enum {string}\n */\nexport default {\n  XY: 'XY',\n  XYZ: 'XYZ',\n  XYM: 'XYM',\n  XYZM: 'XYZM'\n};\n\n//# sourceMappingURL=GeometryLayout.js.map","/**\n * @module ol/geom/GeometryType\n */\n\n/**\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,\n * `'GeometryCollection'`, `'Circle'`.\n * @enum {string}\n */\nexport default {\n  POINT: 'Point',\n  LINE_STRING: 'LineString',\n  LINEAR_RING: 'LinearRing',\n  POLYGON: 'Polygon',\n  MULTI_POINT: 'MultiPoint',\n  MULTI_LINE_STRING: 'MultiLineString',\n  MULTI_POLYGON: 'MultiPolygon',\n  GEOMETRY_COLLECTION: 'GeometryCollection',\n  CIRCLE: 'Circle'\n};\n\n//# sourceMappingURL=GeometryType.js.map","/**\n * @module ol/geom/flat/transform\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) {\n  var dest = opt_dest ? opt_dest : [];\n  var i = 0;\n  for (var j = offset; j < end; j += stride) {\n    var x = flatCoordinates[j];\n    var y = flatCoordinates[j + 1];\n    dest[i++] = transform[0] * x + transform[2] * y + transform[4];\n    dest[i++] = transform[1] * x + transform[3] * y + transform[5];\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} angle Angle.\n * @param {Array<number>} anchor Rotation anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) {\n  var dest = opt_dest ? opt_dest : [];\n  var cos = Math.cos(angle);\n  var sin = Math.sin(angle);\n  var anchorX = anchor[0];\n  var anchorY = anchor[1];\n  var i = 0;\n  for (var j = offset; j < end; j += stride) {\n    var deltaX = flatCoordinates[j] - anchorX;\n    var deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + deltaX * cos - deltaY * sin;\n    dest[i++] = anchorY + deltaX * sin + deltaY * cos;\n    for (var k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n\n/**\n * Scale the coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} sx Scale factor in the x-direction.\n * @param {number} sy Scale factor in the y-direction.\n * @param {Array<number>} anchor Scale anchor point.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) {\n  var dest = opt_dest ? opt_dest : [];\n  var anchorX = anchor[0];\n  var anchorY = anchor[1];\n  var i = 0;\n  for (var j = offset; j < end; j += stride) {\n    var deltaX = flatCoordinates[j] - anchorX;\n    var deltaY = flatCoordinates[j + 1] - anchorY;\n    dest[i++] = anchorX + sx * deltaX;\n    dest[i++] = anchorY + sy * deltaY;\n    for (var k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed coordinates.\n */\nexport function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) {\n  var dest = opt_dest ? opt_dest : [];\n  var i = 0;\n  for (var j = offset; j < end; j += stride) {\n    dest[i++] = flatCoordinates[j] + deltaX;\n    dest[i++] = flatCoordinates[j + 1] + deltaY;\n    for (var k = j + 2; k < j + stride; ++k) {\n      dest[i++] = flatCoordinates[k];\n    }\n  }\n  if (opt_dest && dest.length != i) {\n    dest.length = i;\n  }\n  return dest;\n}\n\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/math\n */\nimport {assert} from './asserts.js';\n\n/**\n * Takes a number and clamps it to within the provided bounds.\n * @param {number} value The input number.\n * @param {number} min The minimum value to return.\n * @param {number} max The maximum value to return.\n * @return {number} The input number if it is within bounds, or the nearest\n *     number within the bounds.\n */\nexport function clamp(value, min, max) {\n  return Math.min(Math.max(value, min), max);\n}\n\n\n/**\n * Return the hyperbolic cosine of a given number. The method will use the\n * native `Math.cosh` function if it is available, otherwise the hyperbolic\n * cosine will be calculated via the reference implementation of the Mozilla\n * developer network.\n *\n * @param {number} x X.\n * @return {number} Hyperbolic cosine of x.\n */\nexport var cosh = (function() {\n  // Wrapped in a iife, to save the overhead of checking for the native\n  // implementation on every invocation.\n  var cosh;\n  if ('cosh' in Math) {\n    // The environment supports the native Math.cosh function, use it…\n    cosh = Math.cosh;\n  } else {\n    // … else, use the reference implementation of MDN:\n    cosh = function(x) {\n      var y = /** @type {Math} */ (Math).exp(x);\n      return (y + 1 / y) / 2;\n    };\n  }\n  return cosh;\n}());\n\n\n/**\n * @param {number} x X.\n * @return {number} The smallest power of two greater than or equal to x.\n */\nexport function roundUpToPowerOfTwo(x) {\n  assert(0 < x, 29); // `x` must be greater than `0`\n  return Math.pow(2, Math.ceil(Math.log(x) / Math.LN2));\n}\n\n\n/**\n * Returns the square of the closest distance between the point (x, y) and the\n * line segment (x1, y1) to (x2, y2).\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredSegmentDistance(x, y, x1, y1, x2, y2) {\n  var dx = x2 - x1;\n  var dy = y2 - y1;\n  if (dx !== 0 || dy !== 0) {\n    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      x1 = x2;\n      y1 = y2;\n    } else if (t > 0) {\n      x1 += dx * t;\n      y1 += dy * t;\n    }\n  }\n  return squaredDistance(x, y, x1, y1);\n}\n\n\n/**\n * Returns the square of the distance between the points (x1, y1) and (x2, y2).\n * @param {number} x1 X1.\n * @param {number} y1 Y1.\n * @param {number} x2 X2.\n * @param {number} y2 Y2.\n * @return {number} Squared distance.\n */\nexport function squaredDistance(x1, y1, x2, y2) {\n  var dx = x2 - x1;\n  var dy = y2 - y1;\n  return dx * dx + dy * dy;\n}\n\n\n/**\n * Solves system of linear equations using Gaussian elimination method.\n *\n * @param {Array<Array<number>>} mat Augmented matrix (n x n + 1 column)\n *                                     in row-major order.\n * @return {Array<number>} The resulting vector.\n */\nexport function solveLinearSystem(mat) {\n  var n = mat.length;\n\n  for (var i = 0; i < n; i++) {\n    // Find max in the i-th column (ignoring i - 1 first rows)\n    var maxRow = i;\n    var maxEl = Math.abs(mat[i][i]);\n    for (var r = i + 1; r < n; r++) {\n      var absValue = Math.abs(mat[r][i]);\n      if (absValue > maxEl) {\n        maxEl = absValue;\n        maxRow = r;\n      }\n    }\n\n    if (maxEl === 0) {\n      return null; // matrix is singular\n    }\n\n    // Swap max row with i-th (current) row\n    var tmp = mat[maxRow];\n    mat[maxRow] = mat[i];\n    mat[i] = tmp;\n\n    // Subtract the i-th row to make all the remaining rows 0 in the i-th column\n    for (var j = i + 1; j < n; j++) {\n      var coef = -mat[j][i] / mat[i][i];\n      for (var k = i; k < n + 1; k++) {\n        if (i == k) {\n          mat[j][k] = 0;\n        } else {\n          mat[j][k] += coef * mat[i][k];\n        }\n      }\n    }\n  }\n\n  // Solve Ax=b for upper triangular matrix A (mat)\n  var x = new Array(n);\n  for (var l = n - 1; l >= 0; l--) {\n    x[l] = mat[l][n] / mat[l][l];\n    for (var m = l - 1; m >= 0; m--) {\n      mat[m][n] -= mat[m][l] * x[l];\n    }\n  }\n  return x;\n}\n\n\n/**\n * Converts radians to to degrees.\n *\n * @param {number} angleInRadians Angle in radians.\n * @return {number} Angle in degrees.\n */\nexport function toDegrees(angleInRadians) {\n  return angleInRadians * 180 / Math.PI;\n}\n\n\n/**\n * Converts degrees to radians.\n *\n * @param {number} angleInDegrees Angle in degrees.\n * @return {number} Angle in radians.\n */\nexport function toRadians(angleInDegrees) {\n  return angleInDegrees * Math.PI / 180;\n}\n\n/**\n * Returns the modulo of a / b, depending on the sign of b.\n *\n * @param {number} a Dividend.\n * @param {number} b Divisor.\n * @return {number} Modulo.\n */\nexport function modulo(a, b) {\n  var r = a % b;\n  return r * b < 0 ? r + b : r;\n}\n\n/**\n * Calculates the linearly interpolated value of x between a and b.\n *\n * @param {number} a Number\n * @param {number} b Number\n * @param {number} x Value to be interpolated.\n * @return {number} Interpolated value.\n */\nexport function lerp(a, b, x) {\n  return a + x * (b - a);\n}\n\n//# sourceMappingURL=math.js.map","/**\n * @license\n * Latitude/longitude spherical geodesy formulae taken from\n * http://www.movable-type.co.uk/scripts/latlong.html\n * Licensed under CC-BY-3.0.\n */\n\n/**\n * @module ol/sphere\n */\nimport {toRadians, toDegrees} from './math.js';\nimport GeometryType from './geom/GeometryType.js';\n\n\n/**\n * Object literal with options for the {@link getLength} or {@link getArea}\n * functions.\n * @typedef {Object} SphereMetricOptions\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857']\n * Projection of the  geometry.  By default, the geometry is assumed to be in\n * Web Mercator.\n * @property {number} [radius=6371008.8] Sphere radius.  By default, the radius of the\n * earth is used (Clarke 1866 Authalic Sphere).\n */\n\n\n/**\n * The mean Earth radius (1/3 * (2a + b)) for the WGS84 ellipsoid.\n * https://en.wikipedia.org/wiki/Earth_radius#Mean_radius\n * @type {number}\n */\nexport var DEFAULT_RADIUS = 6371008.8;\n\n\n/**\n * Get the great circle distance (in meters) between two geographic coordinates.\n * @param {Array} c1 Starting coordinate.\n * @param {Array} c2 Ending coordinate.\n * @param {number=} opt_radius The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {number} The great circle distance between the points (in meters).\n * @api\n */\nexport function getDistance(c1, c2, opt_radius) {\n  var radius = opt_radius || DEFAULT_RADIUS;\n  var lat1 = toRadians(c1[1]);\n  var lat2 = toRadians(c2[1]);\n  var deltaLatBy2 = (lat2 - lat1) / 2;\n  var deltaLonBy2 = toRadians(c2[0] - c1[0]) / 2;\n  var a = Math.sin(deltaLatBy2) * Math.sin(deltaLatBy2) +\n      Math.sin(deltaLonBy2) * Math.sin(deltaLonBy2) *\n      Math.cos(lat1) * Math.cos(lat2);\n  return 2 * radius * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n}\n\n\n/**\n * Get the cumulative great circle length of linestring coordinates (geographic).\n * @param {Array} coordinates Linestring coordinates.\n * @param {number} radius The sphere radius to use.\n * @return {number} The length (in meters).\n */\nfunction getLengthInternal(coordinates, radius) {\n  var length = 0;\n  for (var i = 0, ii = coordinates.length; i < ii - 1; ++i) {\n    length += getDistance(coordinates[i], coordinates[i + 1], radius);\n  }\n  return length;\n}\n\n\n/**\n * Get the spherical length of a geometry.  This length is the sum of the\n * great circle distances between coordinates.  For polygons, the length is\n * the sum of all rings.  For points, the length is zero.  For multi-part\n * geometries, the length is the sum of the length of each part.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the\n * length calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n * You can change this by providing a `projection` option.\n * @return {number} The spherical length (in meters).\n * @api\n */\nexport function getLength(geometry, opt_options) {\n  var options = opt_options || {};\n  var radius = options.radius || DEFAULT_RADIUS;\n  var projection = options.projection || 'EPSG:3857';\n  var type = geometry.getType();\n  if (type !== GeometryType.GEOMETRY_COLLECTION) {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  var length = 0;\n  var coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case GeometryType.POINT:\n    case GeometryType.MULTI_POINT: {\n      break;\n    }\n    case GeometryType.LINE_STRING:\n    case GeometryType.LINEAR_RING: {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n      length = getLengthInternal(coordinates, radius);\n      break;\n    }\n    case GeometryType.MULTI_LINE_STRING:\n    case GeometryType.POLYGON: {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        length += getLengthInternal(coordinates[i], radius);\n      }\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        coords = coordinates[i];\n        for (j = 0, jj = coords.length; j < jj; ++j) {\n          length += getLengthInternal(coords[j], radius);\n        }\n      }\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        length += getLength(geometries[i], opt_options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return length;\n}\n\n\n/**\n * Returns the spherical area for a list of coordinates.\n *\n * [Reference](https://trs-new.jpl.nasa.gov/handle/2014/40409)\n * Robert. G. Chamberlain and William H. Duquette, \"Some Algorithms for\n * Polygons on a Sphere\", JPL Publication 07-03, Jet Propulsion\n * Laboratory, Pasadena, CA, June 2007\n *\n * @param {Array<import(\"./coordinate.js\").Coordinate>} coordinates List of coordinates of a linear\n * ring. If the ring is oriented clockwise, the area will be positive,\n * otherwise it will be negative.\n * @param {number} radius The sphere radius.\n * @return {number} Area (in square meters).\n */\nfunction getAreaInternal(coordinates, radius) {\n  var area = 0;\n  var len = coordinates.length;\n  var x1 = coordinates[len - 1][0];\n  var y1 = coordinates[len - 1][1];\n  for (var i = 0; i < len; i++) {\n    var x2 = coordinates[i][0];\n    var y2 = coordinates[i][1];\n    area += toRadians(x2 - x1) *\n        (2 + Math.sin(toRadians(y1)) +\n        Math.sin(toRadians(y2)));\n    x1 = x2;\n    y1 = y2;\n  }\n  return area * radius * radius / 2.0;\n}\n\n\n/**\n * Get the spherical area of a geometry.  This is the area (in meters) assuming\n * that polygon edges are segments of great circles on a sphere.\n * @param {import(\"./geom/Geometry.js\").default} geometry A geometry.\n * @param {SphereMetricOptions=} opt_options Options for the area\n *     calculation.  By default, geometries are assumed to be in 'EPSG:3857'.\n *     You can change this by providing a `projection` option.\n * @return {number} The spherical area (in square meters).\n * @api\n */\nexport function getArea(geometry, opt_options) {\n  var options = opt_options || {};\n  var radius = options.radius || DEFAULT_RADIUS;\n  var projection = options.projection || 'EPSG:3857';\n  var type = geometry.getType();\n  if (type !== GeometryType.GEOMETRY_COLLECTION) {\n    geometry = geometry.clone().transform(projection, 'EPSG:4326');\n  }\n  var area = 0;\n  var coordinates, coords, i, ii, j, jj;\n  switch (type) {\n    case GeometryType.POINT:\n    case GeometryType.MULTI_POINT:\n    case GeometryType.LINE_STRING:\n    case GeometryType.MULTI_LINE_STRING:\n    case GeometryType.LINEAR_RING: {\n      break;\n    }\n    case GeometryType.POLYGON: {\n      coordinates = /** @type {import(\"./geom/Polygon.js\").default} */ (geometry).getCoordinates();\n      area = Math.abs(getAreaInternal(coordinates[0], radius));\n      for (i = 1, ii = coordinates.length; i < ii; ++i) {\n        area -= Math.abs(getAreaInternal(coordinates[i], radius));\n      }\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      coordinates = /** @type {import(\"./geom/SimpleGeometry.js\").default} */ (geometry).getCoordinates();\n      for (i = 0, ii = coordinates.length; i < ii; ++i) {\n        coords = coordinates[i];\n        area += Math.abs(getAreaInternal(coords[0], radius));\n        for (j = 1, jj = coords.length; j < jj; ++j) {\n          area -= Math.abs(getAreaInternal(coords[j], radius));\n        }\n      }\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      var geometries = /** @type {import(\"./geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n      for (i = 0, ii = geometries.length; i < ii; ++i) {\n        area += getArea(geometries[i], opt_options);\n      }\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return area;\n}\n\n\n/**\n * Returns the coordinate at the given distance and bearing from `c1`.\n *\n * @param {import(\"./coordinate.js\").Coordinate} c1 The origin point (`[lon, lat]` in degrees).\n * @param {number} distance The great-circle distance between the origin\n *     point and the target point.\n * @param {number} bearing The bearing (in radians).\n * @param {number=} opt_radius The sphere radius to use.  Defaults to the Earth's\n *     mean radius using the WGS84 ellipsoid.\n * @return {import(\"./coordinate.js\").Coordinate} The target point.\n */\nexport function offset(c1, distance, bearing, opt_radius) {\n  var radius = opt_radius || DEFAULT_RADIUS;\n  var lat1 = toRadians(c1[1]);\n  var lon1 = toRadians(c1[0]);\n  var dByR = distance / radius;\n  var lat = Math.asin(\n    Math.sin(lat1) * Math.cos(dByR) +\n      Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));\n  var lon = lon1 + Math.atan2(\n    Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),\n    Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat));\n  return [toDegrees(lon), toDegrees(lat)];\n}\n\n//# sourceMappingURL=sphere.js.map","/**\n * @module ol/proj/Units\n */\n\n/**\n * Projection units: `'degrees'`, `'ft'`, `'m'`, `'pixels'`, `'tile-pixels'` or\n * `'us-ft'`.\n * @enum {string}\n */\nvar Units = {\n  DEGREES: 'degrees',\n  FEET: 'ft',\n  METERS: 'm',\n  PIXELS: 'pixels',\n  TILE_PIXELS: 'tile-pixels',\n  USFEET: 'us-ft'\n};\n\n\n/**\n * Meters per unit lookup table.\n * @const\n * @type {Object<Units, number>}\n * @api\n */\nexport var METERS_PER_UNIT = {};\n// use the radius of the Normal sphere\nMETERS_PER_UNIT[Units.DEGREES] = 2 * Math.PI * 6370997 / 360;\nMETERS_PER_UNIT[Units.FEET] = 0.3048;\nMETERS_PER_UNIT[Units.METERS] = 1;\nMETERS_PER_UNIT[Units.USFEET] = 1200 / 3937;\n\nexport default Units;\n\n//# sourceMappingURL=Units.js.map","/**\n * @module ol/proj/Projection\n */\nimport {METERS_PER_UNIT} from './Units.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} code The SRS identifier code, e.g. `EPSG:4326`.\n * @property {import(\"./Units.js\").default|string} [units] Units. Required unless a\n * proj4 projection is defined for `code`.\n * @property {import(\"../extent.js\").Extent} [extent] The validity extent for the SRS.\n * @property {string} [axisOrientation='enu'] The axis orientation as specified in Proj4.\n * @property {boolean} [global=false] Whether the projection is valid for the whole globe.\n * @property {number} [metersPerUnit] The meters per unit for the SRS.\n * If not provided, the `units` are used to get the meters per unit from the {@link module:ol/proj/Units~METERS_PER_UNIT}\n * lookup table.\n * @property {import(\"../extent.js\").Extent} [worldExtent] The world extent for the SRS.\n * @property {function(number, import(\"../coordinate.js\").Coordinate):number} [getPointResolution]\n * Function to determine resolution at a point. The function is called with a\n * `{number}` view resolution and an `{import(\"../coordinate.js\").Coordinate}` as arguments, and returns\n * the `{number}` resolution at the passed coordinate. If this is `undefined`,\n * the default {@link module:ol/proj#getPointResolution} function will be used.\n */\n\n\n/**\n * @classdesc\n * Projection definition class. One of these is created for each projection\n * supported in the application and stored in the {@link module:ol/proj} namespace.\n * You can use these in applications, but this is not required, as API params\n * and options use {@link module:ol/proj~ProjectionLike} which means the simple string\n * code will suffice.\n *\n * You can use {@link module:ol/proj~get} to retrieve the object for a particular\n * projection.\n *\n * The library includes definitions for `EPSG:4326` and `EPSG:3857`, together\n * with the following aliases:\n * * `EPSG:4326`: CRS:84, urn:ogc:def:crs:EPSG:6.6:4326,\n *     urn:ogc:def:crs:OGC:1.3:CRS84, urn:ogc:def:crs:OGC:2:84,\n *     http://www.opengis.net/gml/srs/epsg.xml#4326,\n *     urn:x-ogc:def:crs:EPSG:4326\n * * `EPSG:3857`: EPSG:102100, EPSG:102113, EPSG:900913,\n *     urn:ogc:def:crs:EPSG:6.18:3:3857,\n *     http://www.opengis.net/gml/srs/epsg.xml#3857\n *\n * If you use [proj4js](https://github.com/proj4js/proj4js), aliases can\n * be added using `proj4.defs()`. After all required projection definitions are\n * added, call the {@link module:ol/proj/proj4~register} function.\n *\n * @api\n */\nvar Projection = function Projection(options) {\n  /**\n   * @private\n   * @type {string}\n   */\n  this.code_ = options.code;\n\n  /**\n   * Units of projected coordinates. When set to `TILE_PIXELS`, a\n   * `this.extent_` and `this.worldExtent_` must be configured properly for each\n   * tile.\n   * @private\n   * @type {import(\"./Units.js\").default}\n   */\n  this.units_ = /** @type {import(\"./Units.js\").default} */ (options.units);\n\n  /**\n   * Validity extent of the projection in projected coordinates. For projections\n   * with `TILE_PIXELS` units, this is the extent of the tile in\n   * tile pixel space.\n   * @private\n   * @type {import(\"../extent.js\").Extent}\n   */\n  this.extent_ = options.extent !== undefined ? options.extent : null;\n\n  /**\n   * Extent of the world in EPSG:4326. For projections with\n   * `TILE_PIXELS` units, this is the extent of the tile in\n   * projected coordinate space.\n   * @private\n   * @type {import(\"../extent.js\").Extent}\n   */\n  this.worldExtent_ = options.worldExtent !== undefined ?\n    options.worldExtent : null;\n\n  /**\n   * @private\n   * @type {string}\n   */\n  this.axisOrientation_ = options.axisOrientation !== undefined ?\n    options.axisOrientation : 'enu';\n\n  /**\n   * @private\n   * @type {boolean}\n   */\n  this.global_ = options.global !== undefined ? options.global : false;\n\n  /**\n   * @private\n   * @type {boolean}\n   */\n  this.canWrapX_ = !!(this.global_ && this.extent_);\n\n  /**\n   * @private\n   * @type {function(number, import(\"../coordinate.js\").Coordinate):number|undefined}\n   */\n  this.getPointResolutionFunc_ = options.getPointResolution;\n\n  /**\n   * @private\n   * @type {import(\"../tilegrid/TileGrid.js\").default}\n   */\n  this.defaultTileGrid_ = null;\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.metersPerUnit_ = options.metersPerUnit;\n};\n\n/**\n * @return {boolean} The projection is suitable for wrapping the x-axis\n */\nProjection.prototype.canWrapX = function canWrapX () {\n  return this.canWrapX_;\n};\n\n/**\n * Get the code for this projection, e.g. 'EPSG:4326'.\n * @return {string} Code.\n * @api\n */\nProjection.prototype.getCode = function getCode () {\n  return this.code_;\n};\n\n/**\n * Get the validity extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\nProjection.prototype.getExtent = function getExtent () {\n  return this.extent_;\n};\n\n/**\n * Get the units of this projection.\n * @return {import(\"./Units.js\").default} Units.\n * @api\n */\nProjection.prototype.getUnits = function getUnits () {\n  return this.units_;\n};\n\n/**\n * Get the amount of meters per unit of this projection.If the projection is\n * not configured with `metersPerUnit` or a units identifier, the return is\n * `undefined`.\n * @return {number|undefined} Meters.\n * @api\n */\nProjection.prototype.getMetersPerUnit = function getMetersPerUnit () {\n  return this.metersPerUnit_ || METERS_PER_UNIT[this.units_];\n};\n\n/**\n * Get the world extent for this projection.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\nProjection.prototype.getWorldExtent = function getWorldExtent () {\n  return this.worldExtent_;\n};\n\n/**\n * Get the axis orientation of this projection.\n * Example values are:\n * enu - the default easting, northing, elevation.\n * neu - northing, easting, up - useful for \"lat/long\" geographic coordinates,\n *   or south orientated transverse mercator.\n * wnu - westing, northing, up - some planetary coordinate systems have\n *   \"west positive\" coordinate systems\n * @return {string} Axis orientation.\n * @api\n */\nProjection.prototype.getAxisOrientation = function getAxisOrientation () {\n  return this.axisOrientation_;\n};\n\n/**\n * Is this projection a global projection which spans the whole world?\n * @return {boolean} Whether the projection is global.\n * @api\n */\nProjection.prototype.isGlobal = function isGlobal () {\n  return this.global_;\n};\n\n/**\n * Set if the projection is a global projection which spans the whole world\n * @param {boolean} global Whether the projection is global.\n * @api\n */\nProjection.prototype.setGlobal = function setGlobal (global) {\n  this.global_ = global;\n  this.canWrapX_ = !!(global && this.extent_);\n};\n\n/**\n * @return {import(\"../tilegrid/TileGrid.js\").default} The default tile grid.\n */\nProjection.prototype.getDefaultTileGrid = function getDefaultTileGrid () {\n  return this.defaultTileGrid_;\n};\n\n/**\n * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid The default tile grid.\n */\nProjection.prototype.setDefaultTileGrid = function setDefaultTileGrid (tileGrid) {\n  this.defaultTileGrid_ = tileGrid;\n};\n\n/**\n * Set the validity extent for this projection.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\nProjection.prototype.setExtent = function setExtent (extent) {\n  this.extent_ = extent;\n  this.canWrapX_ = !!(this.global_ && extent);\n};\n\n/**\n * Set the world extent for this projection.\n * @param {import(\"../extent.js\").Extent} worldExtent World extent\n *   [minlon, minlat, maxlon, maxlat].\n * @api\n */\nProjection.prototype.setWorldExtent = function setWorldExtent (worldExtent) {\n  this.worldExtent_ = worldExtent;\n};\n\n/**\n * Set the getPointResolution function (see {@link module:ol/proj~getPointResolution}\n * for this projection.\n * @param {function(number, import(\"../coordinate.js\").Coordinate):number} func Function\n * @api\n */\nProjection.prototype.setGetPointResolution = function setGetPointResolution (func) {\n  this.getPointResolutionFunc_ = func;\n};\n\n/**\n * Get the custom point resolution function for this projection (if set).\n * @return {function(number, import(\"../coordinate.js\").Coordinate):number|undefined} The custom point\n * resolution function (if set).\n */\nProjection.prototype.getPointResolutionFunc = function getPointResolutionFunc () {\n  return this.getPointResolutionFunc_;\n};\n\nexport default Projection;\n\n//# sourceMappingURL=Projection.js.map","/**\n * @module ol/proj/epsg3857\n */\nimport {cosh} from '../math.js';\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Radius of WGS84 sphere\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var HALF_SIZE = Math.PI * RADIUS;\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [\n  -HALF_SIZE, -HALF_SIZE,\n  HALF_SIZE, HALF_SIZE\n];\n\n\n/**\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var WORLD_EXTENT = [-180, -85, 180, 85];\n\n\n/**\n * @classdesc\n * Projection object for web/spherical Mercator (EPSG:3857).\n */\nvar EPSG3857Projection = /*@__PURE__*/(function (Projection) {\n  function EPSG3857Projection(code) {\n    Projection.call(this, {\n      code: code,\n      units: Units.METERS,\n      extent: EXTENT,\n      global: true,\n      worldExtent: WORLD_EXTENT,\n      getPointResolution: function(resolution, point) {\n        return resolution / cosh(point[1] / RADIUS);\n      }\n    });\n\n  }\n\n  if ( Projection ) EPSG3857Projection.__proto__ = Projection;\n  EPSG3857Projection.prototype = Object.create( Projection && Projection.prototype );\n  EPSG3857Projection.prototype.constructor = EPSG3857Projection;\n\n  return EPSG3857Projection;\n}(Projection));\n\n\n/**\n * Projections equal to EPSG:3857.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n  new EPSG3857Projection('EPSG:3857'),\n  new EPSG3857Projection('EPSG:102100'),\n  new EPSG3857Projection('EPSG:102113'),\n  new EPSG3857Projection('EPSG:900913'),\n  new EPSG3857Projection('urn:ogc:def:crs:EPSG:6.18:3:3857'),\n  new EPSG3857Projection('urn:ogc:def:crs:EPSG::3857'),\n  new EPSG3857Projection('http://www.opengis.net/gml/srs/epsg.xml#3857')\n];\n\n\n/**\n * Transformation from EPSG:4326 to EPSG:3857.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function fromEPSG4326(input, opt_output, opt_dimension) {\n  var length = input.length;\n  var dimension = opt_dimension > 1 ? opt_dimension : 2;\n  var output = opt_output;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  var halfSize = HALF_SIZE;\n  for (var i = 0; i < length; i += dimension) {\n    output[i] = halfSize * input[i] / 180;\n    var y = RADIUS *\n        Math.log(Math.tan(Math.PI * (input[i + 1] + 90) / 360));\n    if (y > halfSize) {\n      y = halfSize;\n    } else if (y < -halfSize) {\n      y = -halfSize;\n    }\n    output[i + 1] = y;\n  }\n  return output;\n}\n\n\n/**\n * Transformation from EPSG:3857 to EPSG:4326.\n *\n * @param {Array<number>} input Input array of coordinate values.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension (default is `2`).\n * @return {Array<number>} Output array of coordinate values.\n */\nexport function toEPSG4326(input, opt_output, opt_dimension) {\n  var length = input.length;\n  var dimension = opt_dimension > 1 ? opt_dimension : 2;\n  var output = opt_output;\n  if (output === undefined) {\n    if (dimension > 2) {\n      // preserve values beyond second dimension\n      output = input.slice();\n    } else {\n      output = new Array(length);\n    }\n  }\n  for (var i = 0; i < length; i += dimension) {\n    output[i] = 180 * input[i] / HALF_SIZE;\n    output[i + 1] = 360 * Math.atan(\n      Math.exp(input[i + 1] / RADIUS)) / Math.PI - 90;\n  }\n  return output;\n}\n\n//# sourceMappingURL=epsg3857.js.map","/**\n * @module ol/proj/epsg4326\n */\nimport Projection from './Projection.js';\nimport Units from './Units.js';\n\n\n/**\n * Semi-major radius of the WGS84 ellipsoid.\n *\n * @const\n * @type {number}\n */\nexport var RADIUS = 6378137;\n\n\n/**\n * Extent of the EPSG:4326 projection which is the whole world.\n *\n * @const\n * @type {import(\"../extent.js\").Extent}\n */\nexport var EXTENT = [-180, -90, 180, 90];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var METERS_PER_UNIT = Math.PI * RADIUS / 180;\n\n\n/**\n * @classdesc\n * Projection object for WGS84 geographic coordinates (EPSG:4326).\n *\n * Note that OpenLayers does not strictly comply with the EPSG definition.\n * The EPSG registry defines 4326 as a CRS for Latitude,Longitude (y,x).\n * OpenLayers treats EPSG:4326 as a pseudo-projection, with x,y coordinates.\n */\nvar EPSG4326Projection = /*@__PURE__*/(function (Projection) {\n  function EPSG4326Projection(code, opt_axisOrientation) {\n    Projection.call(this, {\n      code: code,\n      units: Units.DEGREES,\n      extent: EXTENT,\n      axisOrientation: opt_axisOrientation,\n      global: true,\n      metersPerUnit: METERS_PER_UNIT,\n      worldExtent: EXTENT\n    });\n\n  }\n\n  if ( Projection ) EPSG4326Projection.__proto__ = Projection;\n  EPSG4326Projection.prototype = Object.create( Projection && Projection.prototype );\n  EPSG4326Projection.prototype.constructor = EPSG4326Projection;\n\n  return EPSG4326Projection;\n}(Projection));\n\n\n/**\n * Projections equal to EPSG:4326.\n *\n * @const\n * @type {Array<import(\"./Projection.js\").default>}\n */\nexport var PROJECTIONS = [\n  new EPSG4326Projection('CRS:84'),\n  new EPSG4326Projection('EPSG:4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:EPSG::4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:EPSG:6.6:4326', 'neu'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:1.3:CRS84'),\n  new EPSG4326Projection('urn:ogc:def:crs:OGC:2:84'),\n  new EPSG4326Projection('http://www.opengis.net/gml/srs/epsg.xml#4326', 'neu'),\n  new EPSG4326Projection('urn:x-ogc:def:crs:EPSG:4326', 'neu')\n];\n\n//# sourceMappingURL=epsg4326.js.map","/**\n * @module ol/proj/projections\n */\n\n\n/**\n * @type {Object<string, import(\"./Projection.js\").default>}\n */\nvar cache = {};\n\n\n/**\n * Clear the projections cache.\n */\nexport function clear() {\n  cache = {};\n}\n\n\n/**\n * Get a cached projection by code.\n * @param {string} code The code for the projection.\n * @return {import(\"./Projection.js\").default} The projection (if cached).\n */\nexport function get(code) {\n  return cache[code] || null;\n}\n\n\n/**\n * Add a projection to the cache.\n * @param {string} code The projection code.\n * @param {import(\"./Projection.js\").default} projection The projection to cache.\n */\nexport function add(code, projection) {\n  cache[code] = projection;\n}\n\n//# sourceMappingURL=projections.js.map","/**\n * @module ol/proj/transforms\n */\nimport {isEmpty} from '../obj.js';\n\n\n/**\n * @private\n * @type {!Object<string, Object<string, import(\"../proj.js\").TransformFunction>>}\n */\nvar transforms = {};\n\n\n/**\n * Clear the transform cache.\n */\nexport function clear() {\n  transforms = {};\n}\n\n\n/**\n * Registers a conversion function to convert coordinates from the source\n * projection to the destination projection.\n *\n * @param {import(\"./Projection.js\").default} source Source.\n * @param {import(\"./Projection.js\").default} destination Destination.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n */\nexport function add(source, destination, transformFn) {\n  var sourceCode = source.getCode();\n  var destinationCode = destination.getCode();\n  if (!(sourceCode in transforms)) {\n    transforms[sourceCode] = {};\n  }\n  transforms[sourceCode][destinationCode] = transformFn;\n}\n\n\n/**\n * Unregisters the conversion function to convert coordinates from the source\n * projection to the destination projection.  This method is used to clean up\n * cached transforms during testing.\n *\n * @param {import(\"./Projection.js\").default} source Source projection.\n * @param {import(\"./Projection.js\").default} destination Destination projection.\n * @return {import(\"../proj.js\").TransformFunction} transformFn The unregistered transform.\n */\nexport function remove(source, destination) {\n  var sourceCode = source.getCode();\n  var destinationCode = destination.getCode();\n  var transform = transforms[sourceCode][destinationCode];\n  delete transforms[sourceCode][destinationCode];\n  if (isEmpty(transforms[sourceCode])) {\n    delete transforms[sourceCode];\n  }\n  return transform;\n}\n\n\n/**\n * Get a transform given a source code and a destination code.\n * @param {string} sourceCode The code for the source projection.\n * @param {string} destinationCode The code for the destination projection.\n * @return {import(\"../proj.js\").TransformFunction|undefined} The transform function (if found).\n */\nexport function get(sourceCode, destinationCode) {\n  var transform;\n  if (sourceCode in transforms && destinationCode in transforms[sourceCode]) {\n    transform = transforms[sourceCode][destinationCode];\n  }\n  return transform;\n}\n\n//# sourceMappingURL=transforms.js.map","/**\n * @module ol/proj\n */\n\n/**\n * The ol/proj module stores:\n * * a list of {@link module:ol/proj/Projection}\n * objects, one for each projection supported by the application\n * * a list of transform functions needed to convert coordinates in one projection\n * into another.\n *\n * The static functions are the methods used to maintain these.\n * Each transform function can handle not only simple coordinate pairs, but also\n * large arrays of coordinates such as vector geometries.\n *\n * When loaded, the library adds projection objects for EPSG:4326 (WGS84\n * geographic coordinates) and EPSG:3857 (Web or Spherical Mercator, as used\n * for example by Bing Maps or OpenStreetMap), together with the relevant\n * transform functions.\n *\n * Additional transforms may be added by using the http://proj4js.org/\n * library (version 2.2 or later). You can use the full build supplied by\n * Proj4js, or create a custom build to support those projections you need; see\n * the Proj4js website for how to do this. You also need the Proj4js definitions\n * for the required projections. These definitions can be obtained from\n * https://epsg.io/, and are a JS function, so can be loaded in a script\n * tag (as in the examples) or pasted into your application.\n *\n * After all required projection definitions are added to proj4's registry (by\n * using `proj4.defs()`), simply call `register(proj4)` from the `ol/proj/proj4`\n * package. Existing transforms are not changed by this function. See\n * examples/wms-image-custom-proj for an example of this.\n *\n * Additional projection definitions can be registered with `proj4.defs()` any\n * time. Just make sure to call `register(proj4)` again; for example, with user-supplied data where you don't\n * know in advance what projections are needed, you can initially load minimal\n * support and then load whichever are requested.\n *\n * Note that Proj4js does not support projection extents. If you want to add\n * one for creating default tile grids, you can add it after the Projection\n * object has been created with `setExtent`, for example,\n * `get('EPSG:1234').setExtent(extent)`.\n *\n * In addition to Proj4js support, any transform functions can be added with\n * {@link module:ol/proj~addCoordinateTransforms}. To use this, you must first create\n * a {@link module:ol/proj/Projection} object for the new projection and add it with\n * {@link module:ol/proj~addProjection}. You can then add the forward and inverse\n * functions with {@link module:ol/proj~addCoordinateTransforms}. See\n * examples/wms-custom-proj for an example of this.\n *\n * Note that if no transforms are needed and you only need to define the\n * projection, just add a {@link module:ol/proj/Projection} with\n * {@link module:ol/proj~addProjection}. See examples/wms-no-proj for an example of\n * this.\n */\nimport {getDistance} from './sphere.js';\nimport {applyTransform} from './extent.js';\nimport {modulo} from './math.js';\nimport {toEPSG4326, fromEPSG4326, PROJECTIONS as EPSG3857_PROJECTIONS} from './proj/epsg3857.js';\nimport {PROJECTIONS as EPSG4326_PROJECTIONS} from './proj/epsg4326.js';\nimport Projection from './proj/Projection.js';\nimport Units, {METERS_PER_UNIT} from './proj/Units.js';\nimport * as projections from './proj/projections.js';\nimport {add as addTransformFunc, clear as clearTransformFuncs, get as getTransformFunc} from './proj/transforms.js';\n\n\n/**\n * A projection as {@link module:ol/proj/Projection}, SRS identifier\n * string or undefined.\n * @typedef {Projection|string|undefined} ProjectionLike\n * @api\n */\n\n\n/**\n * A transform function accepts an array of input coordinate values, an optional\n * output array, and an optional dimension (default should be 2).  The function\n * transforms the input coordinate values, populates the output array, and\n * returns the output array.\n *\n * @typedef {function(Array<number>, Array<number>=, number=): Array<number>} TransformFunction\n * @api\n */\n\n\nexport {METERS_PER_UNIT};\n\nexport {Projection};\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Output coordinate array (new array, same coordinate\n *     values).\n */\nexport function cloneTransform(input, opt_output, opt_dimension) {\n  var output;\n  if (opt_output !== undefined) {\n    for (var i = 0, ii = input.length; i < ii; ++i) {\n      opt_output[i] = input[i];\n    }\n    output = opt_output;\n  } else {\n    output = input.slice();\n  }\n  return output;\n}\n\n\n/**\n * @param {Array<number>} input Input coordinate array.\n * @param {Array<number>=} opt_output Output array of coordinate values.\n * @param {number=} opt_dimension Dimension.\n * @return {Array<number>} Input coordinate array (same array as input).\n */\nexport function identityTransform(input, opt_output, opt_dimension) {\n  if (opt_output !== undefined && input !== opt_output) {\n    for (var i = 0, ii = input.length; i < ii; ++i) {\n      opt_output[i] = input[i];\n    }\n    input = opt_output;\n  }\n  return input;\n}\n\n\n/**\n * Add a Projection object to the list of supported projections that can be\n * looked up by their code.\n *\n * @param {Projection} projection Projection instance.\n * @api\n */\nexport function addProjection(projection) {\n  projections.add(projection.getCode(), projection);\n  addTransformFunc(projection, projection, cloneTransform);\n}\n\n\n/**\n * @param {Array<Projection>} projections Projections.\n */\nexport function addProjections(projections) {\n  projections.forEach(addProjection);\n}\n\n\n/**\n * Fetches a Projection object for the code specified.\n *\n * @param {ProjectionLike} projectionLike Either a code string which is\n *     a combination of authority and identifier such as \"EPSG:4326\", or an\n *     existing projection object, or undefined.\n * @return {Projection} Projection object, or null if not in list.\n * @api\n */\nexport function get(projectionLike) {\n  return typeof projectionLike === 'string' ?\n    projections.get(/** @type {string} */ (projectionLike)) :\n    (/** @type {Projection} */ (projectionLike) || null);\n}\n\n\n/**\n * Get the resolution of the point in degrees or distance units.\n * For projections with degrees as the unit this will simply return the\n * provided resolution. For other projections the point resolution is\n * by default estimated by transforming the 'point' pixel to EPSG:4326,\n * measuring its width and height on the normal sphere,\n * and taking the average of the width and height.\n * A custom function can be provided for a specific projection, either\n * by setting the `getPointResolution` option in the\n * {@link module:ol/proj/Projection~Projection} constructor or by using\n * {@link module:ol/proj/Projection~Projection#setGetPointResolution} to change an existing\n * projection object.\n * @param {ProjectionLike} projection The projection.\n * @param {number} resolution Nominal resolution in projection units.\n * @param {import(\"./coordinate.js\").Coordinate} point Point to find adjusted resolution at.\n * @param {Units=} opt_units Units to get the point resolution in.\n * Default is the projection's units.\n * @return {number} Point resolution.\n * @api\n */\nexport function getPointResolution(projection, resolution, point, opt_units) {\n  projection = get(projection);\n  var pointResolution;\n  var getter = projection.getPointResolutionFunc();\n  if (getter) {\n    pointResolution = getter(resolution, point);\n  } else {\n    var units = projection.getUnits();\n    if (units == Units.DEGREES && !opt_units || opt_units == Units.DEGREES) {\n      pointResolution = resolution;\n    } else {\n      // Estimate point resolution by transforming the center pixel to EPSG:4326,\n      // measuring its width and height on the normal sphere, and taking the\n      // average of the width and height.\n      var toEPSG4326 = getTransformFromProjections(projection, get('EPSG:4326'));\n      var vertices = [\n        point[0] - resolution / 2, point[1],\n        point[0] + resolution / 2, point[1],\n        point[0], point[1] - resolution / 2,\n        point[0], point[1] + resolution / 2\n      ];\n      vertices = toEPSG4326(vertices, vertices, 2);\n      var width = getDistance(vertices.slice(0, 2), vertices.slice(2, 4));\n      var height = getDistance(vertices.slice(4, 6), vertices.slice(6, 8));\n      pointResolution = (width + height) / 2;\n      var metersPerUnit = opt_units ?\n        METERS_PER_UNIT[opt_units] :\n        projection.getMetersPerUnit();\n      if (metersPerUnit !== undefined) {\n        pointResolution /= metersPerUnit;\n      }\n    }\n  }\n  return pointResolution;\n}\n\n\n/**\n * Registers transformation functions that don't alter coordinates. Those allow\n * to transform between projections with equal meaning.\n *\n * @param {Array<Projection>} projections Projections.\n * @api\n */\nexport function addEquivalentProjections(projections) {\n  addProjections(projections);\n  projections.forEach(function(source) {\n    projections.forEach(function(destination) {\n      if (source !== destination) {\n        addTransformFunc(source, destination, cloneTransform);\n      }\n    });\n  });\n}\n\n\n/**\n * Registers transformation functions to convert coordinates in any projection\n * in projection1 to any projection in projection2.\n *\n * @param {Array<Projection>} projections1 Projections with equal\n *     meaning.\n * @param {Array<Projection>} projections2 Projections with equal\n *     meaning.\n * @param {TransformFunction} forwardTransform Transformation from any\n *   projection in projection1 to any projection in projection2.\n * @param {TransformFunction} inverseTransform Transform from any projection\n *   in projection2 to any projection in projection1..\n */\nexport function addEquivalentTransforms(projections1, projections2, forwardTransform, inverseTransform) {\n  projections1.forEach(function(projection1) {\n    projections2.forEach(function(projection2) {\n      addTransformFunc(projection1, projection2, forwardTransform);\n      addTransformFunc(projection2, projection1, inverseTransform);\n    });\n  });\n}\n\n\n/**\n * Clear all cached projections and transforms.\n */\nexport function clearAllProjections() {\n  projections.clear();\n  clearTransformFuncs();\n}\n\n\n/**\n * @param {Projection|string|undefined} projection Projection.\n * @param {string} defaultCode Default code.\n * @return {Projection} Projection.\n */\nexport function createProjection(projection, defaultCode) {\n  if (!projection) {\n    return get(defaultCode);\n  } else if (typeof projection === 'string') {\n    return get(projection);\n  } else {\n    return (\n      /** @type {Projection} */ (projection)\n    );\n  }\n}\n\n\n/**\n * Creates a {@link module:ol/proj~TransformFunction} from a simple 2D coordinate transform\n * function.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} coordTransform Coordinate\n *     transform.\n * @return {TransformFunction} Transform function.\n */\nexport function createTransformFromCoordinateTransform(coordTransform) {\n  return (\n    /**\n     * @param {Array<number>} input Input.\n     * @param {Array<number>=} opt_output Output.\n     * @param {number=} opt_dimension Dimension.\n     * @return {Array<number>} Output.\n     */\n    function(input, opt_output, opt_dimension) {\n      var length = input.length;\n      var dimension = opt_dimension !== undefined ? opt_dimension : 2;\n      var output = opt_output !== undefined ? opt_output : new Array(length);\n      for (var i = 0; i < length; i += dimension) {\n        var point = coordTransform([input[i], input[i + 1]]);\n        output[i] = point[0];\n        output[i + 1] = point[1];\n        for (var j = dimension - 1; j >= 2; --j) {\n          output[i + j] = input[i + j];\n        }\n      }\n      return output;\n    });\n}\n\n\n/**\n * Registers coordinate transform functions to convert coordinates between the\n * source projection and the destination projection.\n * The forward and inverse functions convert coordinate pairs; this function\n * converts these into the functions used internally which also handle\n * extents and coordinate arrays.\n *\n * @param {ProjectionLike} source Source projection.\n * @param {ProjectionLike} destination Destination projection.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} forward The forward transform\n *     function (that is, from the source projection to the destination\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @param {function(import(\"./coordinate.js\").Coordinate): import(\"./coordinate.js\").Coordinate} inverse The inverse transform\n *     function (that is, from the destination projection to the source\n *     projection) that takes a {@link module:ol/coordinate~Coordinate} as argument and returns\n *     the transformed {@link module:ol/coordinate~Coordinate}.\n * @api\n */\nexport function addCoordinateTransforms(source, destination, forward, inverse) {\n  var sourceProj = get(source);\n  var destProj = get(destination);\n  addTransformFunc(sourceProj, destProj, createTransformFromCoordinateTransform(forward));\n  addTransformFunc(destProj, sourceProj, createTransformFromCoordinateTransform(inverse));\n}\n\n\n/**\n * Transforms a coordinate from longitude/latitude to a different projection.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate as longitude and latitude, i.e.\n *     an array with longitude as 1st and latitude as 2nd element.\n * @param {ProjectionLike=} opt_projection Target projection. The\n *     default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate projected to the target projection.\n * @api\n */\nexport function fromLonLat(coordinate, opt_projection) {\n  return transform(coordinate, 'EPSG:4326',\n    opt_projection !== undefined ? opt_projection : 'EPSG:3857');\n}\n\n\n/**\n * Transforms a coordinate to longitude/latitude.\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Projected coordinate.\n * @param {ProjectionLike=} opt_projection Projection of the coordinate.\n *     The default is Web Mercator, i.e. 'EPSG:3857'.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate as longitude and latitude, i.e. an array\n *     with longitude as 1st and latitude as 2nd element.\n * @api\n */\nexport function toLonLat(coordinate, opt_projection) {\n  var lonLat = transform(coordinate,\n    opt_projection !== undefined ? opt_projection : 'EPSG:3857', 'EPSG:4326');\n  var lon = lonLat[0];\n  if (lon < -180 || lon > 180) {\n    lonLat[0] = modulo(lon + 180, 360) - 180;\n  }\n  return lonLat;\n}\n\n\n/**\n * Checks if two projections are the same, that is every coordinate in one\n * projection does represent the same geographic point as the same coordinate in\n * the other projection.\n *\n * @param {Projection} projection1 Projection 1.\n * @param {Projection} projection2 Projection 2.\n * @return {boolean} Equivalent.\n * @api\n */\nexport function equivalent(projection1, projection2) {\n  if (projection1 === projection2) {\n    return true;\n  }\n  var equalUnits = projection1.getUnits() === projection2.getUnits();\n  if (projection1.getCode() === projection2.getCode()) {\n    return equalUnits;\n  } else {\n    var transformFunc = getTransformFromProjections(projection1, projection2);\n    return transformFunc === cloneTransform && equalUnits;\n  }\n}\n\n\n/**\n * Searches in the list of transform functions for the function for converting\n * coordinates from the source projection to the destination projection.\n *\n * @param {Projection} sourceProjection Source Projection object.\n * @param {Projection} destinationProjection Destination Projection\n *     object.\n * @return {TransformFunction} Transform function.\n */\nexport function getTransformFromProjections(sourceProjection, destinationProjection) {\n  var sourceCode = sourceProjection.getCode();\n  var destinationCode = destinationProjection.getCode();\n  var transformFunc = getTransformFunc(sourceCode, destinationCode);\n  if (!transformFunc) {\n    transformFunc = identityTransform;\n  }\n  return transformFunc;\n}\n\n\n/**\n * Given the projection-like objects, searches for a transformation\n * function to convert a coordinates array from the source projection to the\n * destination projection.\n *\n * @param {ProjectionLike} source Source.\n * @param {ProjectionLike} destination Destination.\n * @return {TransformFunction} Transform function.\n * @api\n */\nexport function getTransform(source, destination) {\n  var sourceProjection = get(source);\n  var destinationProjection = get(destination);\n  return getTransformFromProjections(sourceProjection, destinationProjection);\n}\n\n\n/**\n * Transforms a coordinate from source projection to destination projection.\n * This returns a new coordinate (and does not modify the original).\n *\n * See {@link module:ol/proj~transformExtent} for extent transformation.\n * See the transform method of {@link module:ol/geom/Geometry~Geometry} and its\n * subclasses for geometry transforms.\n *\n * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n * @api\n */\nexport function transform(coordinate, source, destination) {\n  var transformFunc = getTransform(source, destination);\n  return transformFunc(coordinate, undefined, coordinate.length);\n}\n\n\n/**\n * Transforms an extent from source projection to destination projection.  This\n * returns a new extent (and does not modify the original).\n *\n * @param {import(\"./extent.js\").Extent} extent The extent to transform.\n * @param {ProjectionLike} source Source projection-like.\n * @param {ProjectionLike} destination Destination projection-like.\n * @return {import(\"./extent.js\").Extent} The transformed extent.\n * @api\n */\nexport function transformExtent(extent, source, destination) {\n  var transformFunc = getTransform(source, destination);\n  return applyTransform(extent, transformFunc);\n}\n\n\n/**\n * Transforms the given point to the destination projection.\n *\n * @param {import(\"./coordinate.js\").Coordinate} point Point.\n * @param {Projection} sourceProjection Source projection.\n * @param {Projection} destinationProjection Destination projection.\n * @return {import(\"./coordinate.js\").Coordinate} Point.\n */\nexport function transformWithProjections(point, sourceProjection, destinationProjection) {\n  var transformFunc = getTransformFromProjections(sourceProjection, destinationProjection);\n  return transformFunc(point);\n}\n\n/**\n * Add transforms to and from EPSG:4326 and EPSG:3857.  This function is called\n * by when this module is executed and should only need to be called again after\n * `clearAllProjections()` is called (e.g. in tests).\n */\nexport function addCommon() {\n  // Add transformations that don't alter coordinates to convert within set of\n  // projections with equal meaning.\n  addEquivalentProjections(EPSG3857_PROJECTIONS);\n  addEquivalentProjections(EPSG4326_PROJECTIONS);\n  // Add transformations to convert EPSG:4326 like coordinates to EPSG:3857 like\n  // coordinates and back.\n  addEquivalentTransforms(EPSG4326_PROJECTIONS, EPSG3857_PROJECTIONS, fromEPSG4326, toEPSG4326);\n}\n\naddCommon();\n\n//# sourceMappingURL=proj.js.map","/**\n * @module ol/transform\n */\nimport {assert} from './asserts.js';\n\n\n/**\n * An array representing an affine 2d transformation for use with\n * {@link module:ol/transform} functions. The array has 6 elements.\n * @typedef {!Array<number>} Transform\n */\n\n\n/**\n * Collection of affine 2d transformation functions. The functions work on an\n * array of 6 elements. The element order is compatible with the [SVGMatrix\n * interface](https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix) and is\n * a subset (elements a to f) of a 3×3 matrix:\n * ```\n * [ a c e ]\n * [ b d f ]\n * [ 0 0 1 ]\n * ```\n */\n\n\n/**\n * @private\n * @type {Transform}\n */\nvar tmp_ = new Array(6);\n\n\n/**\n * Create an identity transform.\n * @return {!Transform} Identity transform.\n */\nexport function create() {\n  return [1, 0, 0, 1, 0, 0];\n}\n\n\n/**\n * Resets the given transform to an identity transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Transform.\n */\nexport function reset(transform) {\n  return set(transform, 1, 0, 0, 1, 0, 0);\n}\n\n\n/**\n * Multiply the underlying matrices of two transforms and return the result in\n * the first transform.\n * @param {!Transform} transform1 Transform parameters of matrix 1.\n * @param {!Transform} transform2 Transform parameters of matrix 2.\n * @return {!Transform} transform1 multiplied with transform2.\n */\nexport function multiply(transform1, transform2) {\n  var a1 = transform1[0];\n  var b1 = transform1[1];\n  var c1 = transform1[2];\n  var d1 = transform1[3];\n  var e1 = transform1[4];\n  var f1 = transform1[5];\n  var a2 = transform2[0];\n  var b2 = transform2[1];\n  var c2 = transform2[2];\n  var d2 = transform2[3];\n  var e2 = transform2[4];\n  var f2 = transform2[5];\n\n  transform1[0] = a1 * a2 + c1 * b2;\n  transform1[1] = b1 * a2 + d1 * b2;\n  transform1[2] = a1 * c2 + c1 * d2;\n  transform1[3] = b1 * c2 + d1 * d2;\n  transform1[4] = a1 * e2 + c1 * f2 + e1;\n  transform1[5] = b1 * e2 + d1 * f2 + f1;\n\n  return transform1;\n}\n\n/**\n * Set the transform components a-f on a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} a The a component of the transform.\n * @param {number} b The b component of the transform.\n * @param {number} c The c component of the transform.\n * @param {number} d The d component of the transform.\n * @param {number} e The e component of the transform.\n * @param {number} f The f component of the transform.\n * @return {!Transform} Matrix with transform applied.\n */\nexport function set(transform, a, b, c, d, e, f) {\n  transform[0] = a;\n  transform[1] = b;\n  transform[2] = c;\n  transform[3] = d;\n  transform[4] = e;\n  transform[5] = f;\n  return transform;\n}\n\n\n/**\n * Set transform on one matrix from another matrix.\n * @param {!Transform} transform1 Matrix to set transform to.\n * @param {!Transform} transform2 Matrix to set transform from.\n * @return {!Transform} transform1 with transform from transform2 applied.\n */\nexport function setFromArray(transform1, transform2) {\n  transform1[0] = transform2[0];\n  transform1[1] = transform2[1];\n  transform1[2] = transform2[2];\n  transform1[3] = transform2[3];\n  transform1[4] = transform2[4];\n  transform1[5] = transform2[5];\n  return transform1;\n}\n\n\n/**\n * Transforms the given coordinate with the given transform returning the\n * resulting, transformed coordinate. The coordinate will be modified in-place.\n *\n * @param {Transform} transform The transformation.\n * @param {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} coordinate The coordinate to transform.\n * @return {import(\"./coordinate.js\").Coordinate|import(\"./pixel.js\").Pixel} return coordinate so that operations can be\n *     chained together.\n */\nexport function apply(transform, coordinate) {\n  var x = coordinate[0];\n  var y = coordinate[1];\n  coordinate[0] = transform[0] * x + transform[2] * y + transform[4];\n  coordinate[1] = transform[1] * x + transform[3] * y + transform[5];\n  return coordinate;\n}\n\n\n/**\n * Applies rotation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} angle Angle in radians.\n * @return {!Transform} The rotated transform.\n */\nexport function rotate(transform, angle) {\n  var cos = Math.cos(angle);\n  var sin = Math.sin(angle);\n  return multiply(transform, set(tmp_, cos, sin, -sin, cos, 0, 0));\n}\n\n\n/**\n * Applies scale to a given transform.\n * @param {!Transform} transform Transform.\n * @param {number} x Scale factor x.\n * @param {number} y Scale factor y.\n * @return {!Transform} The scaled transform.\n */\nexport function scale(transform, x, y) {\n  return multiply(transform, set(tmp_, x, 0, 0, y, 0, 0));\n}\n\n\n/**\n * Applies translation to the given transform.\n * @param {!Transform} transform Transform.\n * @param {number} dx Translation x.\n * @param {number} dy Translation y.\n * @return {!Transform} The translated transform.\n */\nexport function translate(transform, dx, dy) {\n  return multiply(transform, set(tmp_, 1, 0, 0, 1, dx, dy));\n}\n\n\n/**\n * Creates a composite transform given an initial translation, scale, rotation, and\n * final translation (in that order only, not commutative).\n * @param {!Transform} transform The transform (will be modified in place).\n * @param {number} dx1 Initial translation x.\n * @param {number} dy1 Initial translation y.\n * @param {number} sx Scale factor x.\n * @param {number} sy Scale factor y.\n * @param {number} angle Rotation (in counter-clockwise radians).\n * @param {number} dx2 Final translation x.\n * @param {number} dy2 Final translation y.\n * @return {!Transform} The composite transform.\n */\nexport function compose(transform, dx1, dy1, sx, sy, angle, dx2, dy2) {\n  var sin = Math.sin(angle);\n  var cos = Math.cos(angle);\n  transform[0] = sx * cos;\n  transform[1] = sy * sin;\n  transform[2] = -sx * sin;\n  transform[3] = sy * cos;\n  transform[4] = dx2 * sx * cos - dy2 * sx * sin + dx1;\n  transform[5] = dx2 * sy * sin + dy2 * sy * cos + dy1;\n  return transform;\n}\n\n\n/**\n * Invert the given transform.\n * @param {!Transform} transform Transform.\n * @return {!Transform} Inverse of the transform.\n */\nexport function invert(transform) {\n  var det = determinant(transform);\n  assert(det !== 0, 32); // Transformation matrix cannot be inverted\n\n  var a = transform[0];\n  var b = transform[1];\n  var c = transform[2];\n  var d = transform[3];\n  var e = transform[4];\n  var f = transform[5];\n\n  transform[0] = d / det;\n  transform[1] = -b / det;\n  transform[2] = -c / det;\n  transform[3] = a / det;\n  transform[4] = (c * f - d * e) / det;\n  transform[5] = -(a * f - b * e) / det;\n\n  return transform;\n}\n\n\n/**\n * Returns the determinant of the given matrix.\n * @param {!Transform} mat Matrix.\n * @return {number} Determinant.\n */\nexport function determinant(mat) {\n  return mat[0] * mat[3] - mat[1] * mat[2];\n}\n\n//# sourceMappingURL=transform.js.map","/**\n * @module ol/geom/Geometry\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {createEmpty, getHeight, returnOrUpdate} from '../extent.js';\nimport {transform2D} from './flat/transform.js';\nimport {get as getProjection, getTransform} from '../proj.js';\nimport Units from '../proj/Units.js';\nimport {create as createTransform, compose as composeTransform} from '../transform.js';\n\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for vector geometries.\n *\n * To get notified of changes to the geometry, register a listener for the\n * generic `change` event on your geometry instance.\n *\n * @abstract\n * @api\n */\nvar Geometry = /*@__PURE__*/(function (BaseObject) {\n  function Geometry() {\n\n    BaseObject.call(this);\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.extentRevision_ = -1;\n\n    /**\n     * @protected\n     * @type {Object<string, Geometry>}\n     */\n    this.simplifiedGeometryCache = {};\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.simplifiedGeometryRevision = 0;\n\n  }\n\n  if ( BaseObject ) Geometry.__proto__ = BaseObject;\n  Geometry.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Geometry.prototype.constructor = Geometry;\n\n  /**\n   * Make a complete copy of the geometry.\n   * @abstract\n   * @return {!Geometry} Clone.\n   */\n  Geometry.prototype.clone = function clone () {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n   * @param {number} minSquaredDistance Minimum squared distance.\n   * @return {number} Minimum squared distance.\n   */\n  Geometry.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    return abstract();\n  };\n\n  /**\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @return {boolean} Contains (x, y).\n   */\n  Geometry.prototype.containsXY = function containsXY (x, y) {\n    return false;\n  };\n\n  /**\n   * Return the closest point of the geometry to the passed point as\n   * {@link module:ol/coordinate~Coordinate coordinate}.\n   * @param {import(\"../coordinate.js\").Coordinate} point Point.\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_closestPoint Closest point.\n   * @return {import(\"../coordinate.js\").Coordinate} Closest point.\n   * @api\n   */\n  Geometry.prototype.getClosestPoint = function getClosestPoint (point, opt_closestPoint) {\n    var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];\n    this.closestPointXY(point[0], point[1], closestPoint, Infinity);\n    return closestPoint;\n  };\n\n  /**\n   * Returns true if this geometry includes the specified coordinate. If the\n   * coordinate is on the boundary of the geometry, returns false.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {boolean} Contains coordinate.\n   * @api\n   */\n  Geometry.prototype.intersectsCoordinate = function intersectsCoordinate (coordinate) {\n    return this.containsXY(coordinate[0], coordinate[1]);\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @protected\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   */\n  Geometry.prototype.computeExtent = function computeExtent (extent) {\n    return abstract();\n  };\n\n  /**\n   * Get the extent of the geometry.\n   * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n   * @return {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  Geometry.prototype.getExtent = function getExtent (opt_extent) {\n    if (this.extentRevision_ != this.getRevision()) {\n      this.extent_ = this.computeExtent(this.extent_);\n      this.extentRevision_ = this.getRevision();\n    }\n    return returnOrUpdate(this.extent_, opt_extent);\n  };\n\n  /**\n   * Rotate the geometry around a given coordinate. This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} angle Rotation angle in radians.\n   * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n   * @api\n   */\n  Geometry.prototype.rotate = function rotate (angle, anchor) {\n    abstract();\n  };\n\n  /**\n   * Scale the geometry (with an optional origin).  This modifies the geometry\n   * coordinates in place.\n   * @abstract\n   * @param {number} sx The scaling factor in the x-direction.\n   * @param {number=} opt_sy The scaling factor in the y-direction (defaults to\n   *     sx).\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor The scale origin (defaults to the center\n   *     of the geometry extent).\n   * @api\n   */\n  Geometry.prototype.scale = function scale (sx, opt_sy, opt_anchor) {\n    abstract();\n  };\n\n  /**\n   * Create a simplified version of this geometry.  For linestrings, this uses\n   * the the {@link\n   * https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\n   * Douglas Peucker} algorithm.  For polygons, a quantization-based\n   * simplification is used to preserve topology.\n   * @param {number} tolerance The tolerance distance for simplification.\n   * @return {Geometry} A new, simplified version of the original geometry.\n   * @api\n   */\n  Geometry.prototype.simplify = function simplify (tolerance) {\n    return this.getSimplifiedGeometry(tolerance * tolerance);\n  };\n\n  /**\n   * Create a simplified version of this geometry using the Douglas Peucker\n   * algorithm.\n   * See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.\n   * @abstract\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {Geometry} Simplified geometry.\n   */\n  Geometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n    return abstract();\n  };\n\n  /**\n   * Get the type of this geometry.\n   * @abstract\n   * @return {import(\"./GeometryType.js\").default} Geometry type.\n   */\n  Geometry.prototype.getType = function getType () {\n    return abstract();\n  };\n\n  /**\n   * Apply a transform function to each coordinate of the geometry.\n   * The geometry is modified in place.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   * @abstract\n   * @param {import(\"../proj.js\").TransformFunction} transformFn Transform.\n   */\n  Geometry.prototype.applyTransform = function applyTransform (transformFn) {\n    abstract();\n  };\n\n  /**\n   * Test if the geometry and the passed extent intersect.\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {boolean} `true` if the geometry and the extent intersect.\n   */\n  Geometry.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return abstract();\n  };\n\n  /**\n   * Translate the geometry.  This modifies the geometry coordinates in place.  If\n   * instead you want a new geometry, first `clone()` this geometry.\n   * @abstract\n   * @param {number} deltaX Delta X.\n   * @param {number} deltaY Delta Y.\n   * @api\n   */\n  Geometry.prototype.translate = function translate (deltaX, deltaY) {\n    abstract();\n  };\n\n  /**\n   * Transform each coordinate of the geometry from one coordinate reference\n   * system to another. The geometry is modified in place.\n   * For example, a line will be transformed to a line and a circle to a circle.\n   * If you do not want the geometry modified in place, first `clone()` it and\n   * then use this function on the clone.\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n   * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n   *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n   * @return {Geometry} This geometry.  Note that original geometry is\n   *     modified in place.\n   * @api\n   */\n  Geometry.prototype.transform = function transform (source, destination) {\n    /** @type {import(\"../proj/Projection.js\").default} */\n    var sourceProj = getProjection(source);\n    var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS ?\n      function(inCoordinates, outCoordinates, stride) {\n        var pixelExtent = sourceProj.getExtent();\n        var projectedExtent = sourceProj.getWorldExtent();\n        var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n        composeTransform(tmpTransform,\n          projectedExtent[0], projectedExtent[3],\n          scale, -scale, 0,\n          0, 0);\n        transform2D(inCoordinates, 0, inCoordinates.length, stride,\n          tmpTransform, outCoordinates);\n        return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);\n      } :\n      getTransform(sourceProj, destination);\n    this.applyTransform(transformFn);\n    return this;\n  };\n\n  return Geometry;\n}(BaseObject));\n\n\nexport default Geometry;\n\n//# sourceMappingURL=Geometry.js.map","/**\n * @module ol/geom/SimpleGeometry\n */\nimport {abstract} from '../util.js';\nimport {createOrUpdateFromFlatCoordinates, getCenter} from '../extent.js';\nimport Geometry from './Geometry.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport {rotate, scale, translate, transform2D} from './flat/transform.js';\nimport {clear} from '../obj.js';\n\n/**\n * @classdesc\n * Abstract base class; only used for creating subclasses; do not instantiate\n * in apps, as cannot be rendered.\n *\n * @abstract\n * @api\n */\nvar SimpleGeometry = /*@__PURE__*/(function (Geometry) {\n  function SimpleGeometry() {\n\n    Geometry.call(this);\n\n    /**\n     * @protected\n     * @type {GeometryLayout}\n     */\n    this.layout = GeometryLayout.XY;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.stride = 2;\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.flatCoordinates = null;\n\n  }\n\n  if ( Geometry ) SimpleGeometry.__proto__ = Geometry;\n  SimpleGeometry.prototype = Object.create( Geometry && Geometry.prototype );\n  SimpleGeometry.prototype.constructor = SimpleGeometry;\n\n  /**\n   * @inheritDoc\n   */\n  SimpleGeometry.prototype.computeExtent = function computeExtent (extent) {\n    return createOrUpdateFromFlatCoordinates(this.flatCoordinates,\n      0, this.flatCoordinates.length, this.stride, extent);\n  };\n\n  /**\n   * @abstract\n   * @return {Array} Coordinates.\n   */\n  SimpleGeometry.prototype.getCoordinates = function getCoordinates () {\n    return abstract();\n  };\n\n  /**\n   * Return the first coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} First coordinate.\n   * @api\n   */\n  SimpleGeometry.prototype.getFirstCoordinate = function getFirstCoordinate () {\n    return this.flatCoordinates.slice(0, this.stride);\n  };\n\n  /**\n   * @return {Array<number>} Flat coordinates.\n   */\n  SimpleGeometry.prototype.getFlatCoordinates = function getFlatCoordinates () {\n    return this.flatCoordinates;\n  };\n\n  /**\n   * Return the last coordinate of the geometry.\n   * @return {import(\"../coordinate.js\").Coordinate} Last point.\n   * @api\n   */\n  SimpleGeometry.prototype.getLastCoordinate = function getLastCoordinate () {\n    return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);\n  };\n\n  /**\n   * Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.\n   * @return {GeometryLayout} Layout.\n   * @api\n   */\n  SimpleGeometry.prototype.getLayout = function getLayout () {\n    return this.layout;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  SimpleGeometry.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n    if (this.simplifiedGeometryRevision != this.getRevision()) {\n      clear(this.simplifiedGeometryCache);\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    // If squaredTolerance is negative or if we know that simplification will not\n    // have any effect then just return this.\n    if (squaredTolerance < 0 ||\n        (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n         squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {\n      return this;\n    }\n    var key = squaredTolerance.toString();\n    if (this.simplifiedGeometryCache.hasOwnProperty(key)) {\n      return this.simplifiedGeometryCache[key];\n    } else {\n      var simplifiedGeometry =\n          this.getSimplifiedGeometryInternal(squaredTolerance);\n      var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();\n      if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {\n        this.simplifiedGeometryCache[key] = simplifiedGeometry;\n        return simplifiedGeometry;\n      } else {\n        // Simplification did not actually remove any coordinates.  We now know\n        // that any calls to getSimplifiedGeometry with a squaredTolerance less\n        // than or equal to the current squaredTolerance will also not have any\n        // effect.  This allows us to short circuit simplification (saving CPU\n        // cycles) and prevents the cache of simplified geometries from filling\n        // up with useless identical copies of this geometry (saving memory).\n        this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n        return this;\n      }\n    }\n  };\n\n  /**\n   * @param {number} squaredTolerance Squared tolerance.\n   * @return {SimpleGeometry} Simplified geometry.\n   * @protected\n   */\n  SimpleGeometry.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    return this;\n  };\n\n  /**\n   * @return {number} Stride.\n   */\n  SimpleGeometry.prototype.getStride = function getStride () {\n    return this.stride;\n  };\n\n  /**\n   * @param {GeometryLayout} layout Layout.\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   */\n  SimpleGeometry.prototype.setFlatCoordinates = function setFlatCoordinates (layout, flatCoordinates) {\n    this.stride = getStrideForLayout(layout);\n    this.layout = layout;\n    this.flatCoordinates = flatCoordinates;\n  };\n\n  /**\n   * @abstract\n   * @param {!Array} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   */\n  SimpleGeometry.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    abstract();\n  };\n\n  /**\n   * @param {GeometryLayout|undefined} layout Layout.\n   * @param {Array} coordinates Coordinates.\n   * @param {number} nesting Nesting.\n   * @protected\n   */\n  SimpleGeometry.prototype.setLayout = function setLayout (layout, coordinates, nesting) {\n    /** @type {number} */\n    var stride;\n    if (layout) {\n      stride = getStrideForLayout(layout);\n    } else {\n      for (var i = 0; i < nesting; ++i) {\n        if (coordinates.length === 0) {\n          this.layout = GeometryLayout.XY;\n          this.stride = 2;\n          return;\n        } else {\n          coordinates = /** @type {Array} */ (coordinates[0]);\n        }\n      }\n      stride = coordinates.length;\n      layout = getLayoutForStride(stride);\n    }\n    this.layout = layout;\n    this.stride = stride;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  SimpleGeometry.prototype.applyTransform = function applyTransform (transformFn) {\n    if (this.flatCoordinates) {\n      transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);\n      this.changed();\n    }\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  SimpleGeometry.prototype.rotate = function rotate$1 (angle, anchor) {\n    var flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      var stride = this.getStride();\n      rotate(\n        flatCoordinates, 0, flatCoordinates.length,\n        stride, angle, anchor, flatCoordinates);\n      this.changed();\n    }\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  SimpleGeometry.prototype.scale = function scale$1 (sx, opt_sy, opt_anchor) {\n    var sy = opt_sy;\n    if (sy === undefined) {\n      sy = sx;\n    }\n    var anchor = opt_anchor;\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    var flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      var stride = this.getStride();\n      scale(\n        flatCoordinates, 0, flatCoordinates.length,\n        stride, sx, sy, anchor, flatCoordinates);\n      this.changed();\n    }\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  SimpleGeometry.prototype.translate = function translate$1 (deltaX, deltaY) {\n    var flatCoordinates = this.getFlatCoordinates();\n    if (flatCoordinates) {\n      var stride = this.getStride();\n      translate(\n        flatCoordinates, 0, flatCoordinates.length, stride,\n        deltaX, deltaY, flatCoordinates);\n      this.changed();\n    }\n  };\n\n  return SimpleGeometry;\n}(Geometry));\n\n\n/**\n * @param {number} stride Stride.\n * @return {GeometryLayout} layout Layout.\n */\nfunction getLayoutForStride(stride) {\n  var layout;\n  if (stride == 2) {\n    layout = GeometryLayout.XY;\n  } else if (stride == 3) {\n    layout = GeometryLayout.XYZ;\n  } else if (stride == 4) {\n    layout = GeometryLayout.XYZM;\n  }\n  return (\n    /** @type {GeometryLayout} */ (layout)\n  );\n}\n\n\n/**\n * @param {GeometryLayout} layout Layout.\n * @return {number} Stride.\n */\nexport function getStrideForLayout(layout) {\n  var stride;\n  if (layout == GeometryLayout.XY) {\n    stride = 2;\n  } else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {\n    stride = 3;\n  } else if (layout == GeometryLayout.XYZM) {\n    stride = 4;\n  }\n  return /** @type {number} */ (stride);\n}\n\n\n/**\n * @param {SimpleGeometry} simpleGeometry Simple geometry.\n * @param {import(\"../transform.js\").Transform} transform Transform.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Transformed flat coordinates.\n */\nexport function transformGeom2D(simpleGeometry, transform, opt_dest) {\n  var flatCoordinates = simpleGeometry.getFlatCoordinates();\n  if (!flatCoordinates) {\n    return null;\n  } else {\n    var stride = simpleGeometry.getStride();\n    return transform2D(\n      flatCoordinates, 0, flatCoordinates.length, stride,\n      transform, opt_dest);\n  }\n}\n\nexport default SimpleGeometry;\n\n//# sourceMappingURL=SimpleGeometry.js.map","/**\n * @module ol/geom/flat/area\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRing(flatCoordinates, offset, end, stride) {\n  var twiceArea = 0;\n  var x1 = flatCoordinates[end - stride];\n  var y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    twiceArea += y1 * x2 - x1 * y2;\n    x1 = x2;\n    y1 = y2;\n  }\n  return twiceArea / 2;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRings(flatCoordinates, offset, ends, stride) {\n  var area = 0;\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    area += linearRing(flatCoordinates, offset, end, stride);\n    offset = end;\n  }\n  return area;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {number} Area.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  var area = 0;\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    area += linearRings(flatCoordinates, offset, ends, stride);\n    offset = ends[ends.length - 1];\n  }\n  return area;\n}\n\n//# sourceMappingURL=area.js.map","/**\n * @module ol/geom/flat/closest\n */\nimport {lerp, squaredDistance as squaredDx} from '../../math.js';\n\n\n/**\n * Returns the point on the 2D line segment flatCoordinates[offset1] to\n * flatCoordinates[offset2] that is closest to the point (x, y).  Extra\n * dimensions are linearly interpolated.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset1 Offset 1.\n * @param {number} offset2 Offset 2.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n */\nfunction assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {\n  var x1 = flatCoordinates[offset1];\n  var y1 = flatCoordinates[offset1 + 1];\n  var dx = flatCoordinates[offset2] - x1;\n  var dy = flatCoordinates[offset2 + 1] - y1;\n  var offset;\n  if (dx === 0 && dy === 0) {\n    offset = offset1;\n  } else {\n    var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);\n    if (t > 1) {\n      offset = offset2;\n    } else if (t > 0) {\n      for (var i = 0; i < stride; ++i) {\n        closestPoint[i] = lerp(flatCoordinates[offset1 + i],\n          flatCoordinates[offset2 + i], t);\n      }\n      closestPoint.length = stride;\n      return;\n    } else {\n      offset = offset1;\n    }\n  }\n  for (var i$1 = 0; i$1 < stride; ++i$1) {\n    closestPoint[i$1] = flatCoordinates[offset + i$1];\n  }\n  closestPoint.length = stride;\n}\n\n\n/**\n * Return the squared of the largest distance between any pair of consecutive\n * coordinates.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {\n  var x1 = flatCoordinates[offset];\n  var y1 = flatCoordinates[offset + 1];\n  for (offset += stride; offset < end; offset += stride) {\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    var squaredDelta = squaredDx(x1, y1, x2, y2);\n    if (squaredDelta > max) {\n      max = squaredDelta;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return max;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    max = maxSquaredDelta(\n      flatCoordinates, offset, end, stride, max);\n    offset = end;\n  }\n  return max;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} max Max squared delta.\n * @return {number} Max squared delta.\n */\nexport function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    max = arrayMaxSquaredDelta(\n      flatCoordinates, offset, ends, stride, max);\n    offset = ends[ends.length - 1];\n  }\n  return max;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestPoint(flatCoordinates, offset, end,\n  stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n  opt_tmpPoint) {\n  if (offset == end) {\n    return minSquaredDistance;\n  }\n  var i, squaredDistance;\n  if (maxDelta === 0) {\n    // All points are identical, so just test the first point.\n    squaredDistance = squaredDx(\n      x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);\n    if (squaredDistance < minSquaredDistance) {\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[offset + i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    } else {\n      return minSquaredDistance;\n    }\n  }\n  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n  var index = offset + stride;\n  while (index < end) {\n    assignClosest(\n      flatCoordinates, index - stride, index, stride, x, y, tmpPoint);\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n      index += stride;\n    } else {\n      // Skip ahead multiple points, because we know that all the skipped\n      // points cannot be any closer than the closest point we have found so\n      // far.  We know this because we know how close the current point is, how\n      // close the closest point we have found so far is, and the maximum\n      // distance between consecutive points.  For example, if we're currently\n      // at distance 10, the best we've found so far is 3, and that the maximum\n      // distance between consecutive points is 2, then we'll need to skip at\n      // least (10 - 3) / 2 == 3 (rounded down) points to have any chance of\n      // finding a closer point.  We use Math.max(..., 1) to ensure that we\n      // always advance at least one point, to avoid an infinite loop.\n      index += stride * Math.max(\n        ((Math.sqrt(squaredDistance) -\n            Math.sqrt(minSquaredDistance)) / maxDelta) | 0, 1);\n    }\n  }\n  if (isRing) {\n    // Check the closing segment.\n    assignClosest(\n      flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);\n    squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);\n    if (squaredDistance < minSquaredDistance) {\n      minSquaredDistance = squaredDistance;\n      for (i = 0; i < stride; ++i) {\n        closestPoint[i] = tmpPoint[i];\n      }\n      closestPoint.length = stride;\n    }\n  }\n  return minSquaredDistance;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestArrayPoint(flatCoordinates, offset, ends,\n  stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n  opt_tmpPoint) {\n  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    minSquaredDistance = assignClosestPoint(\n      flatCoordinates, offset, end, stride,\n      maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n    offset = end;\n  }\n  return minSquaredDistance;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} maxDelta Max delta.\n * @param {boolean} isRing Is ring.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {Array<number>} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @param {Array<number>=} opt_tmpPoint Temporary point object.\n * @return {number} Minimum squared distance.\n */\nexport function assignClosestMultiArrayPoint(flatCoordinates, offset,\n  endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance,\n  opt_tmpPoint) {\n  var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    minSquaredDistance = assignClosestArrayPoint(\n      flatCoordinates, offset, ends, stride,\n      maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);\n    offset = ends[ends.length - 1];\n  }\n  return minSquaredDistance;\n}\n\n//# sourceMappingURL=closest.js.map","/**\n * @module ol/geom/flat/deflate\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {\n  for (var i = 0, ii = coordinate.length; i < ii; ++i) {\n    flatCoordinates[offset++] = coordinate[i];\n  }\n  return offset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {number} stride Stride.\n * @return {number} offset Offset.\n */\nexport function deflateCoordinates(flatCoordinates, offset, coordinates, stride) {\n  for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n    var coordinate = coordinates[i];\n    for (var j = 0; j < stride; ++j) {\n      flatCoordinates[offset++] = coordinate[j];\n    }\n  }\n  return offset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>} coordinatess Coordinatess.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_ends Ends.\n * @return {Array<number>} Ends.\n */\nexport function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {\n  var ends = opt_ends ? opt_ends : [];\n  var i = 0;\n  for (var j = 0, jj = coordinatess.length; j < jj; ++j) {\n    var end = deflateCoordinates(\n      flatCoordinates, offset, coordinatess[j], stride);\n    ends[i++] = end;\n    offset = end;\n  }\n  ends.length = i;\n  return ends;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} coordinatesss Coordinatesss.\n * @param {number} stride Stride.\n * @param {Array<Array<number>>=} opt_endss Endss.\n * @return {Array<Array<number>>} Endss.\n */\nexport function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {\n  var endss = opt_endss ? opt_endss : [];\n  var i = 0;\n  for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {\n    var ends = deflateCoordinatesArray(\n      flatCoordinates, offset, coordinatesss[j], stride, endss[i]);\n    endss[i++] = ends;\n    offset = ends[ends.length - 1];\n  }\n  endss.length = i;\n  return endss;\n}\n\n//# sourceMappingURL=deflate.js.map","/**\n * @module ol/geom/flat/inflate\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<import(\"../../coordinate.js\").Coordinate>=} opt_coordinates Coordinates.\n * @return {Array<import(\"../../coordinate.js\").Coordinate>} Coordinates.\n */\nexport function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {\n  var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];\n  var i = 0;\n  for (var j = offset; j < end; j += stride) {\n    coordinates[i++] = flatCoordinates.slice(j, j + stride);\n  }\n  coordinates.length = i;\n  return coordinates;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<Array<import(\"../../coordinate.js\").Coordinate>>=} opt_coordinatess Coordinatess.\n * @return {Array<Array<import(\"../../coordinate.js\").Coordinate>>} Coordinatess.\n */\nexport function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {\n  var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];\n  var i = 0;\n  for (var j = 0, jj = ends.length; j < jj; ++j) {\n    var end = ends[j];\n    coordinatess[i++] = inflateCoordinates(\n      flatCoordinates, offset, end, stride, coordinatess[i]);\n    offset = end;\n  }\n  coordinatess.length = i;\n  return coordinatess;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>=} opt_coordinatesss\n *     Coordinatesss.\n * @return {Array<Array<Array<import(\"../../coordinate.js\").Coordinate>>>} Coordinatesss.\n */\nexport function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {\n  var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];\n  var i = 0;\n  for (var j = 0, jj = endss.length; j < jj; ++j) {\n    var ends = endss[j];\n    coordinatesss[i++] = inflateCoordinatesArray(\n      flatCoordinates, offset, ends, stride, coordinatesss[i]);\n    offset = ends[ends.length - 1];\n  }\n  coordinatesss.length = i;\n  return coordinatesss;\n}\n\n//# sourceMappingURL=inflate.js.map","/**\n * @module ol/geom/flat/simplify\n */\n// Based on simplify-js https://github.com/mourner/simplify-js\n// Copyright (c) 2012, Vladimir Agafonkin\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are met:\n//\n//    1. Redistributions of source code must retain the above copyright notice,\n//       this list of conditions and the following disclaimer.\n//\n//    2. Redistributions in binary form must reproduce the above copyright\n//       notice, this list of conditions and the following disclaimer in the\n//       documentation and/or other materials provided with the distribution.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n// POSSIBILITY OF SUCH DAMAGE.\n\nimport {squaredSegmentDistance, squaredDistance} from '../../math.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {boolean} highQuality Highest quality.\n * @param {Array<number>=} opt_simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @return {Array<number>} Simplified line string.\n */\nexport function simplifyLineString(flatCoordinates, offset, end,\n  stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) {\n  var simplifiedFlatCoordinates = opt_simplifiedFlatCoordinates !== undefined ?\n    opt_simplifiedFlatCoordinates : [];\n  if (!highQuality) {\n    end = radialDistance(flatCoordinates, offset, end,\n      stride, squaredTolerance,\n      simplifiedFlatCoordinates, 0);\n    flatCoordinates = simplifiedFlatCoordinates;\n    offset = 0;\n    stride = 2;\n  }\n  simplifiedFlatCoordinates.length = douglasPeucker(\n    flatCoordinates, offset, end, stride, squaredTolerance,\n    simplifiedFlatCoordinates, 0);\n  return simplifiedFlatCoordinates;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function douglasPeucker(flatCoordinates, offset, end,\n  stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n  var n = (end - offset) / stride;\n  if (n < 3) {\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n          flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n          flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  /** @type {Array<number>} */\n  var markers = new Array(n);\n  markers[0] = 1;\n  markers[n - 1] = 1;\n  /** @type {Array<number>} */\n  var stack = [offset, end - stride];\n  var index = 0;\n  while (stack.length > 0) {\n    var last = stack.pop();\n    var first = stack.pop();\n    var maxSquaredDistance = 0;\n    var x1 = flatCoordinates[first];\n    var y1 = flatCoordinates[first + 1];\n    var x2 = flatCoordinates[last];\n    var y2 = flatCoordinates[last + 1];\n    for (var i = first + stride; i < last; i += stride) {\n      var x = flatCoordinates[i];\n      var y = flatCoordinates[i + 1];\n      var squaredDistance = squaredSegmentDistance(\n        x, y, x1, y1, x2, y2);\n      if (squaredDistance > maxSquaredDistance) {\n        index = i;\n        maxSquaredDistance = squaredDistance;\n      }\n    }\n    if (maxSquaredDistance > squaredTolerance) {\n      markers[(index - offset) / stride] = 1;\n      if (first + stride < index) {\n        stack.push(first, index);\n      }\n      if (index + stride < last) {\n        stack.push(index, last);\n      }\n    }\n  }\n  for (var i$1 = 0; i$1 < n; ++i$1) {\n    if (markers[i$1]) {\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n          flatCoordinates[offset + i$1 * stride];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n          flatCoordinates[offset + i$1 * stride + 1];\n    }\n  }\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerArray(flatCoordinates, offset,\n  ends, stride, squaredTolerance, simplifiedFlatCoordinates,\n  simplifiedOffset, simplifiedEnds) {\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    simplifiedOffset = douglasPeucker(\n      flatCoordinates, offset, end, stride, squaredTolerance,\n      simplifiedFlatCoordinates, simplifiedOffset);\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function douglasPeuckerMultiArray(\n  flatCoordinates, offset, endss, stride, squaredTolerance,\n  simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    var simplifiedEnds = [];\n    simplifiedOffset = douglasPeuckerArray(\n      flatCoordinates, offset, ends, stride, squaredTolerance,\n      simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function radialDistance(flatCoordinates, offset, end,\n  stride, squaredTolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n  if (end <= offset + stride) {\n    // zero or one point, no simplification possible, so copy and return\n    for (; offset < end; offset += stride) {\n      simplifiedFlatCoordinates[simplifiedOffset++] = flatCoordinates[offset];\n      simplifiedFlatCoordinates[simplifiedOffset++] =\n          flatCoordinates[offset + 1];\n    }\n    return simplifiedOffset;\n  }\n  var x1 = flatCoordinates[offset];\n  var y1 = flatCoordinates[offset + 1];\n  // copy first point\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n  var x2 = x1;\n  var y2 = y1;\n  for (offset += stride; offset < end; offset += stride) {\n    x2 = flatCoordinates[offset];\n    y2 = flatCoordinates[offset + 1];\n    if (squaredDistance(x1, y1, x2, y2) > squaredTolerance) {\n      // copy point at offset\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  if (x2 != x1 || y2 != y1) {\n    // copy last point\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  }\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {number} value Value.\n * @param {number} tolerance Tolerance.\n * @return {number} Rounded value.\n */\nexport function snap(value, tolerance) {\n  return tolerance * Math.round(value / tolerance);\n}\n\n\n/**\n * Simplifies a line string using an algorithm designed by Tim Schaub.\n * Coordinates are snapped to the nearest value in a virtual grid and\n * consecutive duplicate coordinates are discarded.  This effectively preserves\n * topology as the simplification of any subsection of a line string is\n * independent of the rest of the line string.  This means that, for examples,\n * the common edge between two polygons will be simplified to the same line\n * string independently in both polygons.  This implementation uses a single\n * pass over the coordinates and eliminates intermediate collinear points.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @return {number} Simplified offset.\n */\nexport function quantize(flatCoordinates, offset, end, stride,\n  tolerance, simplifiedFlatCoordinates, simplifiedOffset) {\n  // do nothing if the line is empty\n  if (offset == end) {\n    return simplifiedOffset;\n  }\n  // snap the first coordinate (P1)\n  var x1 = snap(flatCoordinates[offset], tolerance);\n  var y1 = snap(flatCoordinates[offset + 1], tolerance);\n  offset += stride;\n  // add the first coordinate to the output\n  simplifiedFlatCoordinates[simplifiedOffset++] = x1;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y1;\n  // find the next coordinate that does not snap to the same value as the first\n  // coordinate (P2)\n  var x2, y2;\n  do {\n    x2 = snap(flatCoordinates[offset], tolerance);\n    y2 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    if (offset == end) {\n      // all coordinates snap to the same value, the line collapses to a point\n      // push the last snapped value anyway to ensure that the output contains\n      // at least two points\n      // FIXME should we really return at least two points anyway?\n      simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n      simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n      return simplifiedOffset;\n    }\n  } while (x2 == x1 && y2 == y1);\n  while (offset < end) {\n    // snap the next coordinate (P3)\n    var x3 = snap(flatCoordinates[offset], tolerance);\n    var y3 = snap(flatCoordinates[offset + 1], tolerance);\n    offset += stride;\n    // skip P3 if it is equal to P2\n    if (x3 == x2 && y3 == y2) {\n      continue;\n    }\n    // calculate the delta between P1 and P2\n    var dx1 = x2 - x1;\n    var dy1 = y2 - y1;\n    // calculate the delta between P3 and P1\n    var dx2 = x3 - x1;\n    var dy2 = y3 - y1;\n    // if P1, P2, and P3 are colinear and P3 is further from P1 than P2 is from\n    // P1 in the same direction then P2 is on the straight line between P1 and\n    // P3\n    if ((dx1 * dy2 == dy1 * dx2) &&\n        ((dx1 < 0 && dx2 < dx1) || dx1 == dx2 || (dx1 > 0 && dx2 > dx1)) &&\n        ((dy1 < 0 && dy2 < dy1) || dy1 == dy2 || (dy1 > 0 && dy2 > dy1))) {\n      // discard P2 and set P2 = P3\n      x2 = x3;\n      y2 = y3;\n      continue;\n    }\n    // either P1, P2, and P3 are not colinear, or they are colinear but P3 is\n    // between P3 and P1 or on the opposite half of the line to P2.  add P2,\n    // and continue with P1 = P2 and P2 = P3\n    simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n    simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n    x1 = x2;\n    y1 = y2;\n    x2 = x3;\n    y2 = y3;\n  }\n  // add the last point (P2)\n  simplifiedFlatCoordinates[simplifiedOffset++] = x2;\n  simplifiedFlatCoordinates[simplifiedOffset++] = y2;\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<number>} simplifiedEnds Simplified ends.\n * @return {number} Simplified offset.\n */\nexport function quantizeArray(\n  flatCoordinates, offset, ends, stride,\n  tolerance,\n  simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds) {\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    simplifiedOffset = quantize(\n      flatCoordinates, offset, end, stride,\n      tolerance,\n      simplifiedFlatCoordinates, simplifiedOffset);\n    simplifiedEnds.push(simplifiedOffset);\n    offset = end;\n  }\n  return simplifiedOffset;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} tolerance Tolerance.\n * @param {Array<number>} simplifiedFlatCoordinates Simplified flat\n *     coordinates.\n * @param {number} simplifiedOffset Simplified offset.\n * @param {Array<Array<number>>} simplifiedEndss Simplified endss.\n * @return {number} Simplified offset.\n */\nexport function quantizeMultiArray(\n  flatCoordinates, offset, endss, stride,\n  tolerance,\n  simplifiedFlatCoordinates, simplifiedOffset, simplifiedEndss) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    var simplifiedEnds = [];\n    simplifiedOffset = quantizeArray(\n      flatCoordinates, offset, ends, stride,\n      tolerance,\n      simplifiedFlatCoordinates, simplifiedOffset, simplifiedEnds);\n    simplifiedEndss.push(simplifiedEnds);\n    offset = ends[ends.length - 1];\n  }\n  return simplifiedOffset;\n}\n\n//# sourceMappingURL=simplify.js.map","/**\n * @module ol/geom/LinearRing\n */\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRing as linearRingArea} from './flat/area.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linear ring geometry. Only used as part of polygon; cannot be rendered\n * on its own.\n *\n * @api\n */\nvar LinearRing = /*@__PURE__*/(function (SimpleGeometry) {\n  function LinearRing(coordinates, opt_layout) {\n\n    SimpleGeometry.call(this);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n    } else {\n      this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n    }\n\n  }\n\n  if ( SimpleGeometry ) LinearRing.__proto__ = SimpleGeometry;\n  LinearRing.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  LinearRing.prototype.constructor = LinearRing;\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LinearRing} Clone.\n   * @override\n   * @api\n   */\n  LinearRing.prototype.clone = function clone () {\n    return new LinearRing(this.flatCoordinates.slice(), this.layout);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LinearRing.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(maxSquaredDelta(\n        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n  };\n\n  /**\n   * Return the area of the linear ring on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  LinearRing.prototype.getArea = function getArea () {\n    return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n  };\n\n  /**\n   * Return the coordinates of the linear ring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @override\n   * @api\n   */\n  LinearRing.prototype.getCoordinates = function getCoordinates () {\n    return inflateCoordinates(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LinearRing.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    var simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      squaredTolerance, simplifiedFlatCoordinates, 0);\n    return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  LinearRing.prototype.getType = function getType () {\n    return GeometryType.LINEAR_RING;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LinearRing.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return false;\n  };\n\n  /**\n   * Set the coordinates of the linear ring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  LinearRing.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates, 0, coordinates, this.stride);\n    this.changed();\n  };\n\n  return LinearRing;\n}(SimpleGeometry));\n\n\nexport default LinearRing;\n\n//# sourceMappingURL=LinearRing.js.map","/**\n * @module ol/geom/Point\n */\nimport {createOrUpdateFromCoordinate, containsXY} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Point geometry.\n *\n * @api\n */\nvar Point = /*@__PURE__*/(function (SimpleGeometry) {\n  function Point(coordinates, opt_layout) {\n    SimpleGeometry.call(this);\n    this.setCoordinates(coordinates, opt_layout);\n  }\n\n  if ( SimpleGeometry ) Point.__proto__ = SimpleGeometry;\n  Point.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  Point.prototype.constructor = Point;\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Point} Clone.\n   * @override\n   * @api\n   */\n  Point.prototype.clone = function clone () {\n    var point = new Point(this.flatCoordinates.slice(), this.layout);\n    return point;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Point.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    var flatCoordinates = this.flatCoordinates;\n    var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);\n    if (squaredDistance < minSquaredDistance) {\n      var stride = this.stride;\n      for (var i = 0; i < stride; ++i) {\n        closestPoint[i] = flatCoordinates[i];\n      }\n      closestPoint.length = stride;\n      return squaredDistance;\n    } else {\n      return minSquaredDistance;\n    }\n  };\n\n  /**\n   * Return the coordinate of the point.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinates.\n   * @override\n   * @api\n   */\n  Point.prototype.getCoordinates = function getCoordinates () {\n    return !this.flatCoordinates ? [] : this.flatCoordinates.slice();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Point.prototype.computeExtent = function computeExtent (extent) {\n    return createOrUpdateFromCoordinate(this.flatCoordinates, extent);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Point.prototype.getType = function getType () {\n    return GeometryType.POINT;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Point.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Point.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 0);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinate(\n      this.flatCoordinates, 0, coordinates, this.stride);\n    this.changed();\n  };\n\n  return Point;\n}(SimpleGeometry));\n\n\nexport default Point;\n\n//# sourceMappingURL=Point.js.map","/**\n * @module ol/geom/flat/contains\n */\nimport {forEachCorner} from '../../extent.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} Contains extent.\n */\nexport function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {\n  var outside = forEachCorner(extent,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @return {boolean} Contains (x, y).\n     */\n    function(coordinate) {\n      return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);\n    });\n  return !outside;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {\n  // http://geomalgorithms.com/a03-_inclusion.html\n  // Copyright 2000 softSurfer, 2012 Dan Sunday\n  // This code may be freely used and modified for any purpose\n  // providing that this copyright notice is included with it.\n  // SoftSurfer makes no warranty for this code, and cannot be held\n  // liable for any real or imagined damage resulting from its use.\n  // Users of this code must verify correctness for their application.\n  var wn = 0;\n  var x1 = flatCoordinates[end - stride];\n  var y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    if (y1 <= y) {\n      if (y2 > y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) > 0) {\n        wn++;\n      }\n    } else if (y2 <= y && ((x2 - x1) * (y - y1)) - ((x - x1) * (y2 - y1)) < 0) {\n      wn--;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  return wn !== 0;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {\n  if (ends.length === 0) {\n    return false;\n  }\n  if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {\n    return false;\n  }\n  for (var i = 1, ii = ends.length; i < ii; ++i) {\n    if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\nexport function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {\n  if (endss.length === 0) {\n    return false;\n  }\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n\n//# sourceMappingURL=contains.js.map","/**\n * @module ol/geom/flat/interiorpoint\n */\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {linearRingsContainsXY} from './contains.js';\n\n\n/**\n * Calculates a point that is likely to lie in the interior of the linear rings.\n * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @param {number} flatCentersOffset Flat center offset.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination point as XYM coordinate, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointOfArray(flatCoordinates, offset,\n  ends, stride, flatCenters, flatCentersOffset, opt_dest) {\n  var i, ii, x, x1, x2, y1, y2;\n  var y = flatCenters[flatCentersOffset + 1];\n  /** @type {Array<number>} */\n  var intersections = [];\n  // Calculate intersections with the horizontal line\n  for (var r = 0, rr = ends.length; r < rr; ++r) {\n    var end = ends[r];\n    x1 = flatCoordinates[end - stride];\n    y1 = flatCoordinates[end - stride + 1];\n    for (i = offset; i < end; i += stride) {\n      x2 = flatCoordinates[i];\n      y2 = flatCoordinates[i + 1];\n      if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {\n        x = (y - y1) / (y2 - y1) * (x2 - x1) + x1;\n        intersections.push(x);\n      }\n      x1 = x2;\n      y1 = y2;\n    }\n  }\n  // Find the longest segment of the horizontal line that has its center point\n  // inside the linear ring.\n  var pointX = NaN;\n  var maxSegmentLength = -Infinity;\n  intersections.sort(numberSafeCompareFunction);\n  x1 = intersections[0];\n  for (i = 1, ii = intersections.length; i < ii; ++i) {\n    x2 = intersections[i];\n    var segmentLength = Math.abs(x2 - x1);\n    if (segmentLength > maxSegmentLength) {\n      x = (x1 + x2) / 2;\n      if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {\n        pointX = x;\n        maxSegmentLength = segmentLength;\n      }\n    }\n    x1 = x2;\n  }\n  if (isNaN(pointX)) {\n    // There is no horizontal line that has its center point inside the linear\n    // ring.  Use the center of the the linear ring's extent.\n    pointX = flatCenters[flatCentersOffset];\n  }\n  if (opt_dest) {\n    opt_dest.push(pointX, y, maxSegmentLength);\n    return opt_dest;\n  } else {\n    return [pointX, y, maxSegmentLength];\n  }\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {Array<number>} flatCenters Flat centers.\n * @return {Array<number>} Interior points as XYM coordinates, where M is the\n * length of the horizontal intersection that the point belongs to.\n */\nexport function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {\n  var interiorPoints = [];\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    interiorPoints = getInteriorPointOfArray(flatCoordinates,\n      offset, ends, stride, flatCenters, 2 * i, interiorPoints);\n    offset = ends[ends.length - 1];\n  }\n  return interiorPoints;\n}\n\n//# sourceMappingURL=interiorpoint.js.map","/**\n * @module ol/geom/flat/segments\n */\n\n\n/**\n * This function calls `callback` for each segment of the flat coordinates\n * array. If the callback returns a truthy value the function returns that\n * value immediately. Otherwise the function returns `false`.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {function(this: S, import(\"../../coordinate.js\").Coordinate, import(\"../../coordinate.js\").Coordinate): T} callback Function\n *     called for each segment.\n * @param {S=} opt_this The object to be used as the value of 'this'\n *     within callback.\n * @return {T|boolean} Value.\n * @template T,S\n */\nexport function forEach(flatCoordinates, offset, end, stride, callback, opt_this) {\n  var point1 = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n  var point2 = [];\n  var ret;\n  for (; (offset + stride) < end; offset += stride) {\n    point2[0] = flatCoordinates[offset + stride];\n    point2[1] = flatCoordinates[offset + stride + 1];\n    ret = callback.call(opt_this, point1, point2);\n    if (ret) {\n      return ret;\n    }\n    point1[0] = point2[0];\n    point1[1] = point2[1];\n  }\n  return false;\n}\n\n//# sourceMappingURL=segments.js.map","/**\n * @module ol/geom/flat/intersectsextent\n */\nimport {containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment} from '../../extent.js';\nimport {linearRingContainsXY, linearRingContainsExtent} from './contains.js';\nimport {forEach as forEachSegment} from './segments.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineString(flatCoordinates, offset, end, stride, extent) {\n  var coordinatesExtent = extendFlatCoordinates(\n    createEmpty(), flatCoordinates, offset, end, stride);\n  if (!intersects(extent, coordinatesExtent)) {\n    return false;\n  }\n  if (containsExtent(extent, coordinatesExtent)) {\n    return true;\n  }\n  if (coordinatesExtent[0] >= extent[0] &&\n      coordinatesExtent[2] <= extent[2]) {\n    return true;\n  }\n  if (coordinatesExtent[1] >= extent[1] &&\n      coordinatesExtent[3] <= extent[3]) {\n    return true;\n  }\n  return forEachSegment(flatCoordinates, offset, end, stride,\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} point1 Start point.\n     * @param {import(\"../../coordinate.js\").Coordinate} point2 End point.\n     * @return {boolean} `true` if the segment and the extent intersect,\n     *     `false` otherwise.\n     */\n    function(point1, point2) {\n      return intersectsSegment(extent, point1, point2);\n    });\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    if (intersectsLineString(\n      flatCoordinates, offset, ends[i], stride, extent)) {\n      return true;\n    }\n    offset = ends[i];\n  }\n  return false;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {\n  if (intersectsLineString(\n    flatCoordinates, offset, end, stride, extent)) {\n    return true;\n  }\n  if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {\n    return true;\n  }\n  if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {\n    return true;\n  }\n  if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {\n    return true;\n  }\n  if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {\n    return true;\n  }\n  return false;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {\n  if (!intersectsLinearRing(\n    flatCoordinates, offset, ends[0], stride, extent)) {\n    return false;\n  }\n  if (ends.length === 1) {\n    return true;\n  }\n  for (var i = 1, ii = ends.length; i < ii; ++i) {\n    if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n      if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {\n        return false;\n      }\n    }\n  }\n  return true;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @return {boolean} True if the geometry and the extent intersect.\n */\nexport function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    if (intersectsLinearRingArray(\n      flatCoordinates, offset, ends, stride, extent)) {\n      return true;\n    }\n    offset = ends[ends.length - 1];\n  }\n  return false;\n}\n\n//# sourceMappingURL=intersectsextent.js.map","/**\n * @module ol/geom/flat/reverse\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n */\nexport function coordinates(flatCoordinates, offset, end, stride) {\n  while (offset < end - stride) {\n    for (var i = 0; i < stride; ++i) {\n      var tmp = flatCoordinates[offset + i];\n      flatCoordinates[offset + i] = flatCoordinates[end - stride + i];\n      flatCoordinates[end - stride + i] = tmp;\n    }\n    offset += stride;\n    end -= stride;\n  }\n}\n\n//# sourceMappingURL=reverse.js.map","/**\n * @module ol/geom/flat/orient\n */\nimport {coordinates as reverseCoordinates} from './reverse.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} Is clockwise.\n */\nexport function linearRingIsClockwise(flatCoordinates, offset, end, stride) {\n  // http://tinyurl.com/clockwise-method\n  // https://github.com/OSGeo/gdal/blob/trunk/gdal/ogr/ogrlinearring.cpp\n  var edge = 0;\n  var x1 = flatCoordinates[end - stride];\n  var y1 = flatCoordinates[end - stride + 1];\n  for (; offset < end; offset += stride) {\n    var x2 = flatCoordinates[offset];\n    var y2 = flatCoordinates[offset + 1];\n    edge += (x2 - x1) * (y2 + y1);\n    x1 = x2;\n    y1 = y2;\n  }\n  return edge > 0;\n}\n\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingIsOriented(flatCoordinates, offset, ends, stride, opt_right) {\n  var right = opt_right !== undefined ? opt_right : false;\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    var isClockwise = linearRingIsClockwise(\n      flatCoordinates, offset, end, stride);\n    if (i === 0) {\n      if ((right && isClockwise) || (!right && !isClockwise)) {\n        return false;\n      }\n    } else {\n      if ((right && !isClockwise) || (!right && isClockwise)) {\n        return false;\n      }\n    }\n    offset = end;\n  }\n  return true;\n}\n\n\n/**\n * Determines if linear rings are oriented.  By default, left-hand orientation\n * is tested (first ring must be clockwise, remaining rings counter-clockwise).\n * To test for right-hand orientation, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Test for right-hand orientation\n *     (counter-clockwise exterior ring and clockwise interior rings).\n * @return {boolean} Rings are correctly oriented.\n */\nexport function linearRingsAreOriented(flatCoordinates, offset, endss, stride, opt_right) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    if (!linearRingIsOriented(\n      flatCoordinates, offset, endss[i], stride, opt_right)) {\n      return false;\n    }\n  }\n  return true;\n}\n\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {\n  var right = opt_right !== undefined ? opt_right : false;\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    var isClockwise = linearRingIsClockwise(\n      flatCoordinates, offset, end, stride);\n    var reverse = i === 0 ?\n      (right && isClockwise) || (!right && !isClockwise) :\n      (right && !isClockwise) || (!right && isClockwise);\n    if (reverse) {\n      reverseCoordinates(flatCoordinates, offset, end, stride);\n    }\n    offset = end;\n  }\n  return offset;\n}\n\n\n/**\n * Orient coordinates in a flat array of linear rings.  By default, rings\n * are oriented following the left-hand rule (clockwise for exterior and\n * counter-clockwise for interior rings).  To orient according to the\n * right-hand rule, use the `opt_right` argument.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Array of array of end indexes.\n * @param {number} stride Stride.\n * @param {boolean=} opt_right Follow the right-hand rule for orientation.\n * @return {number} End.\n */\nexport function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    offset = orientLinearRings(\n      flatCoordinates, offset, endss[i], stride, opt_right);\n  }\n  return offset;\n}\n\n//# sourceMappingURL=orient.js.map","/**\n * @module ol/geom/Polygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, getCenter} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LinearRing from './LinearRing.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {offset as sphereOffset} from '../sphere.js';\nimport {linearRings as linearRingsArea} from './flat/area.js';\nimport {assignClosestArrayPoint, arrayMaxSquaredDelta} from './flat/closest.js';\nimport {linearRingsContainsXY} from './flat/contains.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointOfArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingArray} from './flat/intersectsextent.js';\nimport {linearRingIsOriented, orientLinearRings} from './flat/orient.js';\nimport {quantizeArray} from './flat/simplify.js';\nimport {modulo} from '../math.js';\n\n/**\n * @classdesc\n * Polygon geometry.\n *\n * @api\n */\nvar Polygon = /*@__PURE__*/(function (SimpleGeometry) {\n  function Polygon(coordinates, opt_layout, opt_ends) {\n\n    SimpleGeometry.call(this);\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.flatInteriorPoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (opt_layout !== undefined && opt_ends) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n      this.ends_ = opt_ends;\n    } else {\n      this.setCoordinates(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n    }\n\n  }\n\n  if ( SimpleGeometry ) Polygon.__proto__ = SimpleGeometry;\n  Polygon.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  Polygon.prototype.constructor = Polygon;\n\n  /**\n   * Append the passed linear ring to this polygon.\n   * @param {LinearRing} linearRing Linear ring.\n   * @api\n   */\n  Polygon.prototype.appendLinearRing = function appendLinearRing (linearRing) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = linearRing.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, linearRing.getFlatCoordinates());\n    }\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Polygon} Clone.\n   * @override\n   * @api\n   */\n  Polygon.prototype.clone = function clone () {\n    return new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polygon.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(\n        this.flatCoordinates, 0, this.ends_, this.stride, 0));\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates, 0, this.ends_, this.stride,\n      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polygon.prototype.containsXY = function containsXY (x, y) {\n    return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);\n  };\n\n  /**\n   * Return the area of the polygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  Polygon.prototype.getArea = function getArea () {\n    return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);\n  };\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for polygons.\n   *\n   * @param {boolean=} opt_right Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @override\n   * @api\n   */\n  Polygon.prototype.getCoordinates = function getCoordinates (opt_right) {\n    var flatCoordinates;\n    if (opt_right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRings(\n        flatCoordinates, 0, this.ends_, this.stride, opt_right);\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateCoordinatesArray(\n      flatCoordinates, 0, this.ends_, this.stride);\n  };\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  Polygon.prototype.getEnds = function getEnds () {\n    return this.ends_;\n  };\n\n  /**\n   * @return {Array<number>} Interior point.\n   */\n  Polygon.prototype.getFlatInteriorPoint = function getFlatInteriorPoint () {\n    if (this.flatInteriorPointRevision_ != this.getRevision()) {\n      var flatCenter = getCenter(this.getExtent());\n      this.flatInteriorPoint_ = getInteriorPointOfArray(\n        this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride,\n        flatCenter, 0);\n      this.flatInteriorPointRevision_ = this.getRevision();\n    }\n    return this.flatInteriorPoint_;\n  };\n\n  /**\n   * Return an interior point of the polygon.\n   * @return {Point} Interior point as XYM coordinate, where M is the\n   * length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  Polygon.prototype.getInteriorPoint = function getInteriorPoint () {\n    return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);\n  };\n\n  /**\n   * Return the number of rings of the polygon,  this includes the exterior\n   * ring and any interior rings.\n   *\n   * @return {number} Number of rings.\n   * @api\n   */\n  Polygon.prototype.getLinearRingCount = function getLinearRingCount () {\n    return this.ends_.length;\n  };\n\n  /**\n   * Return the Nth linear ring of the polygon geometry. Return `null` if the\n   * given index is out of range.\n   * The exterior linear ring is available at index `0` and the interior rings\n   * at index `1` and beyond.\n   *\n   * @param {number} index Index.\n   * @return {LinearRing} Linear ring.\n   * @api\n   */\n  Polygon.prototype.getLinearRing = function getLinearRing (index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new LinearRing(this.flatCoordinates.slice(\n      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n  };\n\n  /**\n   * Return the linear rings of the polygon.\n   * @return {Array<LinearRing>} Linear rings.\n   * @api\n   */\n  Polygon.prototype.getLinearRings = function getLinearRings () {\n    var layout = this.layout;\n    var flatCoordinates = this.flatCoordinates;\n    var ends = this.ends_;\n    var linearRings = [];\n    var offset = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      var end = ends[i];\n      var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);\n      linearRings.push(linearRing);\n      offset = end;\n    }\n    return linearRings;\n  };\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  Polygon.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n    if (this.orientedRevision_ != this.getRevision()) {\n      var flatCoordinates = this.flatCoordinates;\n      if (linearRingIsOriented(\n        flatCoordinates, 0, this.ends_, this.stride)) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length =\n            orientLinearRings(\n              this.orientedFlatCoordinates_, 0, this.ends_, this.stride);\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return this.orientedFlatCoordinates_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polygon.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    var simplifiedFlatCoordinates = [];\n    var simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = quantizeArray(\n      this.flatCoordinates, 0, this.ends_, this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates, 0, simplifiedEnds);\n    return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Polygon.prototype.getType = function getType () {\n    return GeometryType.POLYGON;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Polygon.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return intersectsLinearRingArray(\n      this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);\n  };\n\n  /**\n   * Set the coordinates of the polygon.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  Polygon.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    var ends = deflateCoordinatesArray(\n      this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  };\n\n  return Polygon;\n}(SimpleGeometry));\n\n\nexport default Polygon;\n\n\n/**\n * Create an approximation of a circle on the surface of a sphere.\n * @param {import(\"../coordinate.js\").Coordinate} center Center (`[lon, lat]` in degrees).\n * @param {number} radius The great-circle distance from the center to\n *     the polygon vertices.\n * @param {number=} opt_n Optional number of vertices for the resulting\n *     polygon. Default is `32`.\n * @param {number=} opt_sphereRadius Optional radius for the sphere (defaults to\n *     the Earth's mean radius using the WGS84 ellipsoid).\n * @return {Polygon} The \"circular\" polygon.\n * @api\n */\nexport function circular(center, radius, opt_n, opt_sphereRadius) {\n  var n = opt_n ? opt_n : 32;\n  /** @type {Array<number>} */\n  var flatCoordinates = [];\n  for (var i = 0; i < n; ++i) {\n    extend(flatCoordinates, sphereOffset(center, radius, 2 * Math.PI * i / n, opt_sphereRadius));\n  }\n  flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);\n  return new Polygon(flatCoordinates, GeometryLayout.XY, [flatCoordinates.length]);\n}\n\n\n/**\n * Create a polygon from an extent. The layout used is `XY`.\n * @param {import(\"../extent.js\").Extent} extent The extent.\n * @return {Polygon} The polygon.\n * @api\n */\nexport function fromExtent(extent) {\n  var minX = extent[0];\n  var minY = extent[1];\n  var maxX = extent[2];\n  var maxY = extent[3];\n  var flatCoordinates =\n      [minX, minY, minX, maxY, maxX, maxY, maxX, minY, minX, minY];\n  return new Polygon(flatCoordinates, GeometryLayout.XY, [flatCoordinates.length]);\n}\n\n\n/**\n * Create a regular polygon from a circle.\n * @param {import(\"./Circle.js\").default} circle Circle geometry.\n * @param {number=} opt_sides Number of sides of the polygon. Default is 32.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n * @return {Polygon} Polygon geometry.\n * @api\n */\nexport function fromCircle(circle, opt_sides, opt_angle) {\n  var sides = opt_sides ? opt_sides : 32;\n  var stride = circle.getStride();\n  var layout = circle.getLayout();\n  var center = circle.getCenter();\n  var arrayLength = stride * (sides + 1);\n  var flatCoordinates = new Array(arrayLength);\n  for (var i = 0; i < arrayLength; i += stride) {\n    flatCoordinates[i] = 0;\n    flatCoordinates[i + 1] = 0;\n    for (var j = 2; j < stride; j++) {\n      flatCoordinates[i + j] = center[j];\n    }\n  }\n  var ends = [flatCoordinates.length];\n  var polygon = new Polygon(flatCoordinates, layout, ends);\n  makeRegular(polygon, center, circle.getRadius(), opt_angle);\n  return polygon;\n}\n\n\n/**\n * Modify the coordinates of a polygon to make it a regular polygon.\n * @param {Polygon} polygon Polygon geometry.\n * @param {import(\"../coordinate.js\").Coordinate} center Center of the regular polygon.\n * @param {number} radius Radius of the regular polygon.\n * @param {number=} opt_angle Start angle for the first vertex of the polygon in\n *     radians. Default is 0.\n */\nexport function makeRegular(polygon, center, radius, opt_angle) {\n  var flatCoordinates = polygon.getFlatCoordinates();\n  var stride = polygon.getStride();\n  var sides = flatCoordinates.length / stride - 1;\n  var startAngle = opt_angle ? opt_angle : 0;\n  for (var i = 0; i <= sides; ++i) {\n    var offset = i * stride;\n    var angle = startAngle + (modulo(i, sides) * 2 * Math.PI / sides);\n    flatCoordinates[offset] = center[0] + (radius * Math.cos(angle));\n    flatCoordinates[offset + 1] = center[1] + (radius * Math.sin(angle));\n  }\n  polygon.changed();\n}\n\n//# sourceMappingURL=Polygon.js.map","/**\n * @module ol/has\n */\n\nvar ua = typeof navigator !== 'undefined' ?\n  navigator.userAgent.toLowerCase() : '';\n\n/**\n * User agent string says we are dealing with Firefox as browser.\n * @type {boolean}\n */\nexport var FIREFOX = ua.indexOf('firefox') !== -1;\n\n/**\n * User agent string says we are dealing with Safari as browser.\n * @type {boolean}\n */\nexport var SAFARI = ua.indexOf('safari') !== -1 && ua.indexOf('chrom') == -1;\n\n/**\n * User agent string says we are dealing with a WebKit engine.\n * @type {boolean}\n */\nexport var WEBKIT = ua.indexOf('webkit') !== -1 && ua.indexOf('edge') == -1;\n\n/**\n * User agent string says we are dealing with a Mac as platform.\n * @type {boolean}\n */\nexport var MAC = ua.indexOf('macintosh') !== -1;\n\n\n/**\n * The ratio between physical pixels and device-independent pixels\n * (dips) on the device (`window.devicePixelRatio`).\n * @const\n * @type {number}\n * @api\n */\nexport var DEVICE_PIXEL_RATIO = window.devicePixelRatio || 1;\n\n\n/**\n * True if the browser's Canvas implementation implements {get,set}LineDash.\n * @type {boolean}\n */\nexport var CANVAS_LINE_DASH = function() {\n  var has = false;\n  try {\n    has = !!document.createElement('canvas').getContext('2d').setLineDash;\n  } catch (e) {\n    // pass\n  }\n  return has;\n}();\n\n\n/**\n * Is HTML5 geolocation supported in the current browser?\n * @const\n * @type {boolean}\n * @api\n */\nexport var GEOLOCATION = 'geolocation' in navigator;\n\n\n/**\n * True if browser supports touch events.\n * @const\n * @type {boolean}\n * @api\n */\nexport var TOUCH = 'ontouchstart' in window;\n\n\n/**\n * True if browser supports pointer events.\n * @const\n * @type {boolean}\n */\nexport var POINTER = 'PointerEvent' in window;\n\n\n/**\n * True if browser supports ms pointer events (IE 10).\n * @const\n * @type {boolean}\n */\nexport var MSPOINTER = !!(navigator.msPointerEnabled);\n\n\nexport {HAS as WEBGL} from './webgl.js';\n\n//# sourceMappingURL=has.js.map","/**\n * @module ol/Geolocation\n */\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport {listen} from './events.js';\nimport Event from './events/Event.js';\nimport EventType from './events/EventType.js';\nimport {circular as circularPolygon} from './geom/Polygon.js';\nimport {GEOLOCATION} from './has.js';\nimport {toRadians} from './math.js';\nimport {get as getProjection, getTransformFromProjections, identityTransform} from './proj.js';\n\n\n/**\n * @enum {string}\n */\nvar Property = {\n  ACCURACY: 'accuracy',\n  ACCURACY_GEOMETRY: 'accuracyGeometry',\n  ALTITUDE: 'altitude',\n  ALTITUDE_ACCURACY: 'altitudeAccuracy',\n  HEADING: 'heading',\n  POSITION: 'position',\n  PROJECTION: 'projection',\n  SPEED: 'speed',\n  TRACKING: 'tracking',\n  TRACKING_OPTIONS: 'trackingOptions'\n};\n\n\n/**\n * @classdesc\n * Events emitted on Geolocation error.\n */\nvar GeolocationError = /*@__PURE__*/(function (Event) {\n  function GeolocationError(error) {\n    Event.call(this, EventType.ERROR);\n\n    /**\n     * @type {number}\n     */\n    this.code = error.code;\n\n    /**\n     * @type {string}\n     */\n    this.message = error.message;\n  }\n\n  if ( Event ) GeolocationError.__proto__ = Event;\n  GeolocationError.prototype = Object.create( Event && Event.prototype );\n  GeolocationError.prototype.constructor = GeolocationError;\n\n  return GeolocationError;\n}(Event));\n\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [tracking=false] Start Tracking right after\n * instantiation.\n * @property {PositionOptions} [trackingOptions] Tracking options.\n * See http://www.w3.org/TR/geolocation-API/#position_options_interface.\n * @property {import(\"./proj.js\").ProjectionLike} [projection] The projection the position\n * is reported in.\n */\n\n\n/**\n * @classdesc\n * Helper class for providing HTML5 Geolocation capabilities.\n * The [Geolocation API](http://www.w3.org/TR/geolocation-API/)\n * is used to locate a user's position.\n *\n * To get notified of position changes, register a listener for the generic\n * `change` event on your instance of {@link module:ol/Geolocation~Geolocation}.\n *\n * Example:\n *\n *     var geolocation = new Geolocation({\n *       // take the projection to use from the map's view\n *       projection: view.getProjection()\n *     });\n *     // listen to changes in position\n *     geolocation.on('change', function(evt) {\n *       window.console.log(geolocation.getPosition());\n *     });\n *\n * @fires error\n * @api\n */\nvar Geolocation = /*@__PURE__*/(function (BaseObject) {\n  function Geolocation(opt_options) {\n\n    BaseObject.call(this);\n\n    var options = opt_options || {};\n\n    /**\n     * The unprojected (EPSG:4326) device position.\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate}\n     */\n    this.position_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./proj.js\").TransformFunction}\n     */\n    this.transform_ = identityTransform;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.watchId_ = undefined;\n\n    listen(\n      this, getChangeEventType(Property.PROJECTION),\n      this.handleProjectionChanged_, this);\n    listen(\n      this, getChangeEventType(Property.TRACKING),\n      this.handleTrackingChanged_, this);\n\n    if (options.projection !== undefined) {\n      this.setProjection(options.projection);\n    }\n    if (options.trackingOptions !== undefined) {\n      this.setTrackingOptions(options.trackingOptions);\n    }\n\n    this.setTracking(options.tracking !== undefined ? options.tracking : false);\n\n  }\n\n  if ( BaseObject ) Geolocation.__proto__ = BaseObject;\n  Geolocation.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Geolocation.prototype.constructor = Geolocation;\n\n  /**\n   * @inheritDoc\n   */\n  Geolocation.prototype.disposeInternal = function disposeInternal () {\n    this.setTracking(false);\n    BaseObject.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @private\n   */\n  Geolocation.prototype.handleProjectionChanged_ = function handleProjectionChanged_ () {\n    var projection = this.getProjection();\n    if (projection) {\n      this.transform_ = getTransformFromProjections(\n        getProjection('EPSG:4326'), projection);\n      if (this.position_) {\n        this.set(Property.POSITION, this.transform_(this.position_));\n      }\n    }\n  };\n\n  /**\n   * @private\n   */\n  Geolocation.prototype.handleTrackingChanged_ = function handleTrackingChanged_ () {\n    if (GEOLOCATION) {\n      var tracking = this.getTracking();\n      if (tracking && this.watchId_ === undefined) {\n        this.watchId_ = navigator.geolocation.watchPosition(\n          this.positionChange_.bind(this),\n          this.positionError_.bind(this),\n          this.getTrackingOptions());\n      } else if (!tracking && this.watchId_ !== undefined) {\n        navigator.geolocation.clearWatch(this.watchId_);\n        this.watchId_ = undefined;\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {Position} position position event.\n   */\n  Geolocation.prototype.positionChange_ = function positionChange_ (position) {\n    var coords = position.coords;\n    this.set(Property.ACCURACY, coords.accuracy);\n    this.set(Property.ALTITUDE,\n      coords.altitude === null ? undefined : coords.altitude);\n    this.set(Property.ALTITUDE_ACCURACY,\n      coords.altitudeAccuracy === null ?\n        undefined : coords.altitudeAccuracy);\n    this.set(Property.HEADING, coords.heading === null ?\n      undefined : toRadians(coords.heading));\n    if (!this.position_) {\n      this.position_ = [coords.longitude, coords.latitude];\n    } else {\n      this.position_[0] = coords.longitude;\n      this.position_[1] = coords.latitude;\n    }\n    var projectedPosition = this.transform_(this.position_);\n    this.set(Property.POSITION, projectedPosition);\n    this.set(Property.SPEED,\n      coords.speed === null ? undefined : coords.speed);\n    var geometry = circularPolygon(this.position_, coords.accuracy);\n    geometry.applyTransform(this.transform_);\n    this.set(Property.ACCURACY_GEOMETRY, geometry);\n    this.changed();\n  };\n\n  /**\n   * Triggered when the Geolocation returns an error.\n   * @event error\n   * @api\n   */\n\n  /**\n   * @private\n   * @param {PositionError} error error object.\n   */\n  Geolocation.prototype.positionError_ = function positionError_ (error) {\n    this.setTracking(false);\n    this.dispatchEvent(new GeolocationError(error));\n  };\n\n  /**\n   * Get the accuracy of the position in meters.\n   * @return {number|undefined} The accuracy of the position measurement in\n   *     meters.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getAccuracy = function getAccuracy () {\n    return /** @type {number|undefined} */ (this.get(Property.ACCURACY));\n  };\n\n  /**\n   * Get a geometry of the position accuracy.\n   * @return {?import(\"./geom/Polygon.js\").default} A geometry of the position accuracy.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getAccuracyGeometry = function getAccuracyGeometry () {\n    return (\n      /** @type {?import(\"./geom/Polygon.js\").default} */ (this.get(Property.ACCURACY_GEOMETRY) || null)\n    );\n  };\n\n  /**\n   * Get the altitude associated with the position.\n   * @return {number|undefined} The altitude of the position in meters above mean\n   *     sea level.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getAltitude = function getAltitude () {\n    return /** @type {number|undefined} */ (this.get(Property.ALTITUDE));\n  };\n\n  /**\n   * Get the altitude accuracy of the position.\n   * @return {number|undefined} The accuracy of the altitude measurement in\n   *     meters.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getAltitudeAccuracy = function getAltitudeAccuracy () {\n    return /** @type {number|undefined} */ (this.get(Property.ALTITUDE_ACCURACY));\n  };\n\n  /**\n   * Get the heading as radians clockwise from North.\n   * Note: depending on the browser, the heading is only defined if the `enableHighAccuracy`\n   * is set to `true` in the tracking options.\n   * @return {number|undefined} The heading of the device in radians from north.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getHeading = function getHeading () {\n    return /** @type {number|undefined} */ (this.get(Property.HEADING));\n  };\n\n  /**\n   * Get the position of the device.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The current position of the device reported\n   *     in the current projection.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getPosition = function getPosition () {\n    return (\n      /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION))\n    );\n  };\n\n  /**\n   * Get the projection associated with the position.\n   * @return {import(\"./proj/Projection.js\").default|undefined} The projection the position is\n   *     reported in.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getProjection = function getProjection () {\n    return (\n      /** @type {import(\"./proj/Projection.js\").default|undefined} */ (this.get(Property.PROJECTION))\n    );\n  };\n\n  /**\n   * Get the speed in meters per second.\n   * @return {number|undefined} The instantaneous speed of the device in meters\n   *     per second.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getSpeed = function getSpeed () {\n    return /** @type {number|undefined} */ (this.get(Property.SPEED));\n  };\n\n  /**\n   * Determine if the device location is being tracked.\n   * @return {boolean} The device location is being tracked.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getTracking = function getTracking () {\n    return /** @type {boolean} */ (this.get(Property.TRACKING));\n  };\n\n  /**\n   * Get the tracking options.\n   * See http://www.w3.org/TR/geolocation-API/#position-options.\n   * @return {PositionOptions|undefined} PositionOptions as defined by\n   *     the [HTML5 Geolocation spec\n   *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.getTrackingOptions = function getTrackingOptions () {\n    return /** @type {PositionOptions|undefined} */ (this.get(Property.TRACKING_OPTIONS));\n  };\n\n  /**\n   * Set the projection to use for transforming the coordinates.\n   * @param {import(\"./proj.js\").ProjectionLike} projection The projection the position is\n   *     reported in.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.setProjection = function setProjection (projection) {\n    this.set(Property.PROJECTION, getProjection(projection));\n  };\n\n  /**\n   * Enable or disable tracking.\n   * @param {boolean} tracking Enable tracking.\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.setTracking = function setTracking (tracking) {\n    this.set(Property.TRACKING, tracking);\n  };\n\n  /**\n   * Set the tracking options.\n   * See http://www.w3.org/TR/geolocation-API/#position-options.\n   * @param {PositionOptions} options PositionOptions as defined by the\n   *     [HTML5 Geolocation spec\n   *     ](http://www.w3.org/TR/geolocation-API/#position_options_interface).\n   * @observable\n   * @api\n   */\n  Geolocation.prototype.setTrackingOptions = function setTrackingOptions (options) {\n    this.set(Property.TRACKING_OPTIONS, options);\n  };\n\n  return Geolocation;\n}(BaseObject));\n\n\nexport default Geolocation;\n\n//# sourceMappingURL=Geolocation.js.map","/**\n * @module ol/string\n */\n\n/**\n * @param {number} number Number to be formatted\n * @param {number} width The desired width\n * @param {number=} opt_precision Precision of the output string (i.e. number of decimal places)\n * @returns {string} Formatted string\n */\nexport function padNumber(number, width, opt_precision) {\n  var numberString = opt_precision !== undefined ? number.toFixed(opt_precision) : '' + number;\n  var decimal = numberString.indexOf('.');\n  decimal = decimal === -1 ? numberString.length : decimal;\n  return decimal > width ? numberString : new Array(1 + width - decimal).join('0') + numberString;\n}\n\n\n/**\n * Adapted from https://github.com/omichelsen/compare-versions/blob/master/index.js\n * @param {string|number} v1 First version\n * @param {string|number} v2 Second version\n * @returns {number} Value\n */\nexport function compareVersions(v1, v2) {\n  var s1 = ('' + v1).split('.');\n  var s2 = ('' + v2).split('.');\n\n  for (var i = 0; i < Math.max(s1.length, s2.length); i++) {\n    var n1 = parseInt(s1[i] || '0', 10);\n    var n2 = parseInt(s2[i] || '0', 10);\n\n    if (n1 > n2) {\n      return 1;\n    }\n    if (n2 > n1) {\n      return -1;\n    }\n  }\n\n  return 0;\n}\n\n//# sourceMappingURL=string.js.map","/**\n * @module ol/coordinate\n */\nimport {modulo} from './math.js';\nimport {padNumber} from './string.js';\n\n\n/**\n * An array of numbers representing an xy coordinate. Example: `[16, 48]`.\n * @typedef {Array<number>} Coordinate\n * @api\n */\n\n\n/**\n * A function that takes a {@link module:ol/coordinate~Coordinate} and\n * transforms it into a `{string}`.\n *\n * @typedef {function((Coordinate|undefined)): string} CoordinateFormat\n * @api\n */\n\n\n/**\n * Add `delta` to `coordinate`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {add} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     add(coord, [-2, 4]);\n *     // coord is now [5.85, 51.983333]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {Coordinate} delta Delta.\n * @return {Coordinate} The input coordinate adjusted by\n * the given delta.\n * @api\n */\nexport function add(coordinate, delta) {\n  coordinate[0] += delta[0];\n  coordinate[1] += delta[1];\n  return coordinate;\n}\n\n\n/**\n * Calculates the point closest to the passed coordinate on the passed circle.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {import(\"./geom/Circle.js\").default} circle The circle.\n * @return {Coordinate} Closest point on the circumference.\n */\nexport function closestOnCircle(coordinate, circle) {\n  var r = circle.getRadius();\n  var center = circle.getCenter();\n  var x0 = center[0];\n  var y0 = center[1];\n  var x1 = coordinate[0];\n  var y1 = coordinate[1];\n\n  var dx = x1 - x0;\n  var dy = y1 - y0;\n  if (dx === 0 && dy === 0) {\n    dx = 1;\n  }\n  var d = Math.sqrt(dx * dx + dy * dy);\n\n  var x = x0 + r * dx / d;\n  var y = y0 + r * dy / d;\n\n  return [x, y];\n}\n\n\n/**\n * Calculates the point closest to the passed coordinate on the passed segment.\n * This is the foot of the perpendicular of the coordinate to the segment when\n * the foot is on the segment, or the closest segment coordinate when the foot\n * is outside the segment.\n *\n * @param {Coordinate} coordinate The coordinate.\n * @param {Array<Coordinate>} segment The two coordinates\n * of the segment.\n * @return {Coordinate} The foot of the perpendicular of\n * the coordinate to the segment.\n */\nexport function closestOnSegment(coordinate, segment) {\n  var x0 = coordinate[0];\n  var y0 = coordinate[1];\n  var start = segment[0];\n  var end = segment[1];\n  var x1 = start[0];\n  var y1 = start[1];\n  var x2 = end[0];\n  var y2 = end[1];\n  var dx = x2 - x1;\n  var dy = y2 - y1;\n  var along = (dx === 0 && dy === 0) ? 0 :\n    ((dx * (x0 - x1)) + (dy * (y0 - y1))) / ((dx * dx + dy * dy) || 0);\n  var x, y;\n  if (along <= 0) {\n    x = x1;\n    y = y1;\n  } else if (along >= 1) {\n    x = x2;\n    y = y2;\n  } else {\n    x = x1 + along * dx;\n    y = y1 + along * dy;\n  }\n  return [x, y];\n}\n\n\n/**\n * Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be\n * used to format\n * a {Coordinate} to a string.\n *\n * Example without specifying the fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY();\n *     var out = stringifyFunc(coord);\n *     // out is now '8, 48'\n *\n * Example with explicitly specifying 2 fractional digits:\n *\n *     import {createStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var stringifyFunc = createStringXY(2);\n *     var out = stringifyFunc(coord);\n *     // out is now '7.85, 47.98'\n *\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {CoordinateFormat} Coordinate format.\n * @api\n */\nexport function createStringXY(opt_fractionDigits) {\n  return (\n    /**\n     * @param {Coordinate} coordinate Coordinate.\n     * @return {string} String XY.\n     */\n    function(coordinate) {\n      return toStringXY(coordinate, opt_fractionDigits);\n    }\n  );\n}\n\n\n/**\n * @param {string} hemispheres Hemispheres.\n * @param {number} degrees Degrees.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} String.\n */\nexport function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {\n  var normalizedDegrees = modulo(degrees + 180, 360) - 180;\n  var x = Math.abs(3600 * normalizedDegrees);\n  var dflPrecision = opt_fractionDigits || 0;\n  var precision = Math.pow(10, dflPrecision);\n\n  var deg = Math.floor(x / 3600);\n  var min = Math.floor((x - deg * 3600) / 60);\n  var sec = x - (deg * 3600) - (min * 60);\n  sec = Math.ceil(sec * precision) / precision;\n\n  if (sec >= 60) {\n    sec = 0;\n    min += 1;\n  }\n\n  if (min >= 60) {\n    min = 0;\n    deg += 1;\n  }\n\n  return deg + '\\u00b0 ' + padNumber(min, 2) + '\\u2032 ' +\n    padNumber(sec, 2, dflPrecision) + '\\u2033' +\n    (normalizedDegrees == 0 ? '' : ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0));\n}\n\n\n/**\n * Transforms the given {@link module:ol/coordinate~Coordinate} to a string\n * using the given string template. The strings `{x}` and `{y}` in the template\n * will be replaced with the first and second coordinate values respectively.\n *\n * Example without specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template);\n *     // out is now 'Coordinate is (8|48).'\n *\n * Example explicitly specifying the fractional digits:\n *\n *     import {format} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var template = 'Coordinate is ({x}|{y}).';\n *     var out = format(coord, template, 2);\n *     // out is now 'Coordinate is (7.85|47.98).'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {string} template A template string with `{x}` and `{y}` placeholders\n *     that will be replaced by first and second coordinate values.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Formatted coordinate.\n * @api\n */\nexport function format(coordinate, template, opt_fractionDigits) {\n  if (coordinate) {\n    return template\n      .replace('{x}', coordinate[0].toFixed(opt_fractionDigits))\n      .replace('{y}', coordinate[1].toFixed(opt_fractionDigits));\n  } else {\n    return '';\n  }\n}\n\n\n/**\n * @param {Coordinate} coordinate1 First coordinate.\n * @param {Coordinate} coordinate2 Second coordinate.\n * @return {boolean} The two coordinates are equal.\n */\nexport function equals(coordinate1, coordinate2) {\n  var equals = true;\n  for (var i = coordinate1.length - 1; i >= 0; --i) {\n    if (coordinate1[i] != coordinate2[i]) {\n      equals = false;\n      break;\n    }\n  }\n  return equals;\n}\n\n\n/**\n * Rotate `coordinate` by `angle`. `coordinate` is modified in place and\n * returned by the function.\n *\n * Example:\n *\n *     import {rotate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var rotateRadians = Math.PI / 2; // 90 degrees\n *     rotate(coord, rotateRadians);\n *     // coord is now [-47.983333, 7.85]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} angle Angle in radian.\n * @return {Coordinate} Coordinate.\n * @api\n */\nexport function rotate(coordinate, angle) {\n  var cosAngle = Math.cos(angle);\n  var sinAngle = Math.sin(angle);\n  var x = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n  var y = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n  coordinate[0] = x;\n  coordinate[1] = y;\n  return coordinate;\n}\n\n\n/**\n * Scale `coordinate` by `scale`. `coordinate` is modified in place and returned\n * by the function.\n *\n * Example:\n *\n *     import {scale as scaleCoordinate} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var scale = 1.2;\n *     scaleCoordinate(coord, scale);\n *     // coord is now [9.42, 57.5799996]\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number} scale Scale factor.\n * @return {Coordinate} Coordinate.\n */\nexport function scale(coordinate, scale) {\n  coordinate[0] *= scale;\n  coordinate[1] *= scale;\n  return coordinate;\n}\n\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Squared distance between coord1 and coord2.\n */\nexport function squaredDistance(coord1, coord2) {\n  var dx = coord1[0] - coord2[0];\n  var dy = coord1[1] - coord2[1];\n  return dx * dx + dy * dy;\n}\n\n\n/**\n * @param {Coordinate} coord1 First coordinate.\n * @param {Coordinate} coord2 Second coordinate.\n * @return {number} Distance between coord1 and coord2.\n */\nexport function distance(coord1, coord2) {\n  return Math.sqrt(squaredDistance(coord1, coord2));\n}\n\n\n/**\n * Calculate the squared distance from a coordinate to a line segment.\n *\n * @param {Coordinate} coordinate Coordinate of the point.\n * @param {Array<Coordinate>} segment Line segment (2\n * coordinates).\n * @return {number} Squared distance from the point to the line segment.\n */\nexport function squaredDistanceToSegment(coordinate, segment) {\n  return squaredDistance(coordinate,\n    closestOnSegment(coordinate, segment));\n}\n\n\n/**\n * Format a geographic coordinate with the hemisphere, degrees, minutes, and\n * seconds.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord);\n *     // out is now '47° 58′ 60″ N 7° 50′ 60″ E'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringHDMS} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringHDMS(coord, 1);\n *     // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} Hemisphere, degrees, minutes and seconds.\n * @api\n */\nexport function toStringHDMS(coordinate, opt_fractionDigits) {\n  if (coordinate) {\n    return degreesToStringHDMS('NS', coordinate[1], opt_fractionDigits) + ' ' +\n        degreesToStringHDMS('EW', coordinate[0], opt_fractionDigits);\n  } else {\n    return '';\n  }\n}\n\n\n/**\n * Format a coordinate as a comma delimited string.\n *\n * Example without specifying fractional digits:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord);\n *     // out is now '8, 48'\n *\n * Example explicitly specifying 1 fractional digit:\n *\n *     import {toStringXY} from 'ol/coordinate';\n *\n *     var coord = [7.85, 47.983333];\n *     var out = toStringXY(coord, 1);\n *     // out is now '7.8, 48.0'\n *\n * @param {Coordinate} coordinate Coordinate.\n * @param {number=} opt_fractionDigits The number of digits to include\n *    after the decimal point. Default is `0`.\n * @return {string} XY.\n * @api\n */\nexport function toStringXY(coordinate, opt_fractionDigits) {\n  return format(coordinate, '{x}, {y}', opt_fractionDigits);\n}\n\n//# sourceMappingURL=coordinate.js.map","/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>=} opt_dest Destination.\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest) {\n  var pointX = NaN;\n  var pointY = NaN;\n  var n = (end - offset) / stride;\n  if (n === 1) {\n    pointX = flatCoordinates[offset];\n    pointY = flatCoordinates[offset + 1];\n  } else if (n == 2) {\n    pointX = (1 - fraction) * flatCoordinates[offset] +\n        fraction * flatCoordinates[offset + stride];\n    pointY = (1 - fraction) * flatCoordinates[offset + 1] +\n        fraction * flatCoordinates[offset + stride + 1];\n  } else if (n !== 0) {\n    var x1 = flatCoordinates[offset];\n    var y1 = flatCoordinates[offset + 1];\n    var length = 0;\n    var cumulativeLengths = [0];\n    for (var i = offset + stride; i < end; i += stride) {\n      var x2 = flatCoordinates[i];\n      var y2 = flatCoordinates[i + 1];\n      length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n      cumulativeLengths.push(length);\n      x1 = x2;\n      y1 = y2;\n    }\n    var target = fraction * length;\n    var index = binarySearch(cumulativeLengths, target);\n    if (index < 0) {\n      var t = (target - cumulativeLengths[-index - 2]) /\n          (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n      var o = offset + (-index - 2) * stride;\n      pointX = lerp(\n        flatCoordinates[o], flatCoordinates[o + stride], t);\n      pointY = lerp(\n        flatCoordinates[o + 1], flatCoordinates[o + stride + 1], t);\n    } else {\n      pointX = flatCoordinates[offset + index * stride];\n      pointY = flatCoordinates[offset + index * stride + 1];\n    }\n  }\n  if (opt_dest) {\n    opt_dest[0] = pointX;\n    opt_dest[1] = pointY;\n    return opt_dest;\n  } else {\n    return [pointX, pointY];\n  }\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {\n  if (end == offset) {\n    return null;\n  }\n  var coordinate;\n  if (m < flatCoordinates[offset + stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(offset, offset + stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  } else if (flatCoordinates[end - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(end - stride, end);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  // FIXME use O(1) search\n  if (m == flatCoordinates[offset + stride - 1]) {\n    return flatCoordinates.slice(offset, offset + stride);\n  }\n  var lo = offset / stride;\n  var hi = end / stride;\n  while (lo < hi) {\n    var mid = (lo + hi) >> 1;\n    if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n      hi = mid;\n    } else {\n      lo = mid + 1;\n    }\n  }\n  var m0 = flatCoordinates[lo * stride - 1];\n  if (m == m0) {\n    return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n  }\n  var m1 = flatCoordinates[(lo + 1) * stride - 1];\n  var t = (m - m0) / (m1 - m0);\n  coordinate = [];\n  for (var i = 0; i < stride - 1; ++i) {\n    coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i],\n      flatCoordinates[lo * stride + i], t));\n  }\n  coordinate.push(m);\n  return coordinate;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n  flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {\n  if (interpolate) {\n    return lineStringCoordinateAtM(\n      flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);\n  }\n  var coordinate;\n  if (m < flatCoordinates[stride - 1]) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(0, stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  if (flatCoordinates[flatCoordinates.length - 1] < m) {\n    if (extrapolate) {\n      coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n      coordinate[stride - 1] = m;\n      return coordinate;\n    } else {\n      return null;\n    }\n  }\n  for (var i = 0, ii = ends.length; i < ii; ++i) {\n    var end = ends[i];\n    if (offset == end) {\n      continue;\n    }\n    if (m < flatCoordinates[offset + stride - 1]) {\n      return null;\n    } else if (m <= flatCoordinates[end - 1]) {\n      return lineStringCoordinateAtM(\n        flatCoordinates, offset, end, stride, m, false);\n    }\n    offset = end;\n  }\n  return null;\n}\n\n//# sourceMappingURL=interpolate.js.map","/**\n * @module ol/geom/flat/length\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n  var x1 = flatCoordinates[offset];\n  var y1 = flatCoordinates[offset + 1];\n  var length = 0;\n  for (var i = offset + stride; i < end; i += stride) {\n    var x2 = flatCoordinates[i];\n    var y2 = flatCoordinates[i + 1];\n    length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n    x1 = x2;\n    y1 = y2;\n  }\n  return length;\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n  var perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n  var dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n  var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n  perimeter += Math.sqrt(dx * dx + dy * dy);\n  return perimeter;\n}\n\n//# sourceMappingURL=length.js.map","/**\n * @module ol/geom/LineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestPoint, maxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {interpolatePoint, lineStringCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineString} from './flat/intersectsextent.js';\nimport {lineStringLength} from './flat/length.js';\nimport {forEach as forEachSegment} from './flat/segments.js';\nimport {douglasPeucker} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Linestring geometry.\n *\n * @api\n */\nvar LineString = /*@__PURE__*/(function (SimpleGeometry) {\n  function LineString(coordinates, opt_layout) {\n\n    SimpleGeometry.call(this);\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.flatMidpoint_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatMidpointRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n    } else {\n      this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n    }\n\n  }\n\n  if ( SimpleGeometry ) LineString.__proto__ = SimpleGeometry;\n  LineString.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  LineString.prototype.constructor = LineString;\n\n  /**\n   * Append the passed coordinate to the coordinates of the linestring.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @api\n   */\n  LineString.prototype.appendCoordinate = function appendCoordinate (coordinate) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = coordinate.slice();\n    } else {\n      extend(this.flatCoordinates, coordinate);\n    }\n    this.changed();\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!LineString} Clone.\n   * @override\n   * @api\n   */\n  LineString.prototype.clone = function clone () {\n    return new LineString(this.flatCoordinates.slice(), this.layout);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LineString.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(maxSquaredDelta(\n        this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestPoint(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n  };\n\n  /**\n   * Iterate over each segment, calling the provided callback.\n   * If the callback returns a truthy value the function returns that\n   * value immediately. Otherwise the function returns `false`.\n   *\n   * @param {function(this: S, import(\"../coordinate.js\").Coordinate, import(\"../coordinate.js\").Coordinate): T} callback Function\n   *     called for each segment.\n   * @return {T|boolean} Value.\n   * @template T,S\n   * @api\n   */\n  LineString.prototype.forEachSegment = function forEachSegment$1 (callback) {\n    return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);\n  };\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * @param {number} m M.\n   * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  LineString.prototype.getCoordinateAtM = function getCoordinateAtM (m, opt_extrapolate) {\n    if (this.layout != GeometryLayout.XYM &&\n        this.layout != GeometryLayout.XYZM) {\n      return null;\n    }\n    var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n    return lineStringCoordinateAtM(this.flatCoordinates, 0,\n      this.flatCoordinates.length, this.stride, m, extrapolate);\n  };\n\n  /**\n   * Return the coordinates of the linestring.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @override\n   * @api\n   */\n  LineString.prototype.getCoordinates = function getCoordinates () {\n    return inflateCoordinates(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n  };\n\n  /**\n   * Return the coordinate at the provided fraction along the linestring.\n   * The `fraction` is a number between 0 and 1, where 0 is the start of the\n   * linestring and 1 is the end.\n   * @param {number} fraction Fraction.\n   * @param {import(\"../coordinate.js\").Coordinate=} opt_dest Optional coordinate whose values will\n   *     be modified. If not provided, a new coordinate will be returned.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate of the interpolated point.\n   * @api\n   */\n  LineString.prototype.getCoordinateAt = function getCoordinateAt (fraction, opt_dest) {\n    return interpolatePoint(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      fraction, opt_dest);\n  };\n\n  /**\n   * Return the length of the linestring on projected plane.\n   * @return {number} Length (on projected plane).\n   * @api\n   */\n  LineString.prototype.getLength = function getLength () {\n    return lineStringLength(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n  };\n\n  /**\n   * @return {Array<number>} Flat midpoint.\n   */\n  LineString.prototype.getFlatMidpoint = function getFlatMidpoint () {\n    if (this.flatMidpointRevision_ != this.getRevision()) {\n      this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);\n      this.flatMidpointRevision_ = this.getRevision();\n    }\n    return this.flatMidpoint_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LineString.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    var simplifiedFlatCoordinates = [];\n    simplifiedFlatCoordinates.length = douglasPeucker(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      squaredTolerance, simplifiedFlatCoordinates, 0);\n    return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  LineString.prototype.getType = function getType () {\n    return GeometryType.LINE_STRING;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  LineString.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return intersectsLineString(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride,\n      extent);\n  };\n\n  /**\n   * Set the coordinates of the linestring.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  LineString.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates, 0, coordinates, this.stride);\n    this.changed();\n  };\n\n  return LineString;\n}(SimpleGeometry));\n\n\nexport default LineString;\n\n//# sourceMappingURL=LineString.js.map","/**\n * @module ol/geom/flat/geodesic\n */\nimport {squaredSegmentDistance, toRadians, toDegrees} from '../../math.js';\nimport {get as getProjection, getTransform} from '../../proj.js';\n\n\n/**\n * @param {function(number): import(\"../../coordinate.js\").Coordinate} interpolate Interpolate function.\n * @param {import(\"../../proj.js\").TransformFunction} transform Transform from longitude/latitude to\n *     projected coordinates.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nfunction line(interpolate, transform, squaredTolerance) {\n  // FIXME reduce garbage generation\n  // FIXME optimize stack operations\n\n  /** @type {Array<number>} */\n  var flatCoordinates = [];\n\n  var geoA = interpolate(0);\n  var geoB = interpolate(1);\n\n  var a = transform(geoA);\n  var b = transform(geoB);\n\n  /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n  var geoStack = [geoB, geoA];\n  /** @type {Array<import(\"../../coordinate.js\").Coordinate>} */\n  var stack = [b, a];\n  /** @type {Array<number>} */\n  var fractionStack = [1, 0];\n\n  /** @type {!Object<string, boolean>} */\n  var fractions = {};\n\n  var maxIterations = 1e5;\n  var geoM, m, fracA, fracB, fracM, key;\n\n  while (--maxIterations > 0 && fractionStack.length > 0) {\n    // Pop the a coordinate off the stack\n    fracA = fractionStack.pop();\n    geoA = geoStack.pop();\n    a = stack.pop();\n    // Add the a coordinate if it has not been added yet\n    key = fracA.toString();\n    if (!(key in fractions)) {\n      flatCoordinates.push(a[0], a[1]);\n      fractions[key] = true;\n    }\n    // Pop the b coordinate off the stack\n    fracB = fractionStack.pop();\n    geoB = geoStack.pop();\n    b = stack.pop();\n    // Find the m point between the a and b coordinates\n    fracM = (fracA + fracB) / 2;\n    geoM = interpolate(fracM);\n    m = transform(geoM);\n    if (squaredSegmentDistance(m[0], m[1], a[0], a[1],\n      b[0], b[1]) < squaredTolerance) {\n      // If the m point is sufficiently close to the straight line, then we\n      // discard it.  Just use the b coordinate and move on to the next line\n      // segment.\n      flatCoordinates.push(b[0], b[1]);\n      key = fracB.toString();\n      fractions[key] = true;\n    } else {\n      // Otherwise, we need to subdivide the current line segment.  Split it\n      // into two and push the two line segments onto the stack.\n      fractionStack.push(fracB, fracM, fracM, fracA);\n      stack.push(b, m, m, a);\n      geoStack.push(geoB, geoM, geoM, geoA);\n    }\n  }\n\n  return flatCoordinates;\n}\n\n\n/**\n * Generate a great-circle arcs between two lat/lon points.\n * @param {number} lon1 Longitude 1 in degrees.\n * @param {number} lat1 Latitude 1 in degrees.\n * @param {number} lon2 Longitude 2 in degrees.\n * @param {number} lat2 Latitude 2 in degrees.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) {\n  var geoProjection = getProjection('EPSG:4326');\n\n  var cosLat1 = Math.cos(toRadians(lat1));\n  var sinLat1 = Math.sin(toRadians(lat1));\n  var cosLat2 = Math.cos(toRadians(lat2));\n  var sinLat2 = Math.sin(toRadians(lat2));\n  var cosDeltaLon = Math.cos(toRadians(lon2 - lon1));\n  var sinDeltaLon = Math.sin(toRadians(lon2 - lon1));\n  var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;\n\n  return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function(frac) {\n      if (1 <= d) {\n        return [lon2, lat2];\n      }\n      var D = frac * Math.acos(d);\n      var cosD = Math.cos(D);\n      var sinD = Math.sin(D);\n      var y = sinDeltaLon * cosLat2;\n      var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;\n      var theta = Math.atan2(y, x);\n      var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));\n      var lon = toRadians(lon1) +\n            Math.atan2(Math.sin(theta) * sinD * cosLat1,\n              cosD - sinLat1 * Math.sin(lat));\n      return [toDegrees(lon), toDegrees(lat)];\n    }, getTransform(geoProjection, projection), squaredTolerance);\n}\n\n\n/**\n * Generate a meridian (line at constant longitude).\n * @param {number} lon Longitude.\n * @param {number} lat1 Latitude 1.\n * @param {number} lat2 Latitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function meridian(lon, lat1, lat2, projection, squaredTolerance) {\n  var epsg4326Projection = getProjection('EPSG:4326');\n  return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function(frac) {\n      return [lon, lat1 + ((lat2 - lat1) * frac)];\n    },\n    getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n\n\n/**\n * Generate a parallel (line at constant latitude).\n * @param {number} lat Latitude.\n * @param {number} lon1 Longitude 1.\n * @param {number} lon2 Longitude 2.\n * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {Array<number>} Flat coordinates.\n */\nexport function parallel(lat, lon1, lon2, projection, squaredTolerance) {\n  var epsg4326Projection = getProjection('EPSG:4326');\n  return line(\n    /**\n     * @param {number} frac Fraction.\n     * @return {import(\"../../coordinate.js\").Coordinate} Coordinate.\n     */\n    function(frac) {\n      return [lon1 + ((lon2 - lon1) * frac), lat];\n    },\n    getTransform(epsg4326Projection, projection), squaredTolerance);\n}\n\n//# sourceMappingURL=geodesic.js.map","/**\n * @module ol/render/EventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * @event module:ol/render/Event~RenderEvent#postcompose\n   * @api\n   */\n  POSTCOMPOSE: 'postcompose',\n  /**\n   * @event module:ol/render/Event~RenderEvent#precompose\n   * @api\n   */\n  PRECOMPOSE: 'precompose',\n  /**\n   * @event module:ol/render/Event~RenderEvent#render\n   * @api\n   */\n  RENDER: 'render',\n  /**\n   * Triggered when rendering is complete, i.e. all sources and tiles have\n   * finished loading for the current viewport, and all tiles are faded in.\n   * @event module:ol/render/Event~RenderEvent#rendercomplete\n   * @api\n   */\n  RENDERCOMPLETE: 'rendercomplete'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/color\n */\nimport {assert} from './asserts.js';\nimport {clamp} from './math.js';\n\n\n/**\n * A color represented as a short array [red, green, blue, alpha].\n * red, green, and blue should be integers in the range 0..255 inclusive.\n * alpha should be a float in the range 0..1 inclusive. If no alpha value is\n * given then `1` will be used.\n * @typedef {Array<number>} Color\n * @api\n */\n\n\n/**\n * This RegExp matches # followed by 3, 4, 6, or 8 hex digits.\n * @const\n * @type {RegExp}\n * @private\n */\nvar HEX_COLOR_RE_ = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i;\n\n\n/**\n * Regular expression for matching potential named color style strings.\n * @const\n * @type {RegExp}\n * @private\n */\nvar NAMED_COLOR_RE_ = /^([a-z]*)$/i;\n\n\n/**\n * Return the color as an rgba string.\n * @param {Color|string} color Color.\n * @return {string} Rgba string.\n * @api\n */\nexport function asString(color) {\n  if (typeof color === 'string') {\n    return color;\n  } else {\n    return toString(color);\n  }\n}\n\n/**\n * Return named color as an rgba string.\n * @param {string} color Named color.\n * @return {string} Rgb string.\n */\nfunction fromNamed(color) {\n  var el = document.createElement('div');\n  el.style.color = color;\n  if (el.style.color !== '') {\n    document.body.appendChild(el);\n    var rgb = getComputedStyle(el).color;\n    document.body.removeChild(el);\n    return rgb;\n  } else {\n    return '';\n  }\n}\n\n\n/**\n * @param {string} s String.\n * @return {Color} Color.\n */\nexport var fromString = (\n  function() {\n\n    // We maintain a small cache of parsed strings.  To provide cheap LRU-like\n    // semantics, whenever the cache grows too large we simply delete an\n    // arbitrary 25% of the entries.\n\n    /**\n     * @const\n     * @type {number}\n     */\n    var MAX_CACHE_SIZE = 1024;\n\n    /**\n     * @type {Object<string, Color>}\n     */\n    var cache = {};\n\n    /**\n     * @type {number}\n     */\n    var cacheSize = 0;\n\n    return (\n      /**\n       * @param {string} s String.\n       * @return {Color} Color.\n       */\n      function(s) {\n        var color;\n        if (cache.hasOwnProperty(s)) {\n          color = cache[s];\n        } else {\n          if (cacheSize >= MAX_CACHE_SIZE) {\n            var i = 0;\n            for (var key in cache) {\n              if ((i++ & 3) === 0) {\n                delete cache[key];\n                --cacheSize;\n              }\n            }\n          }\n          color = fromStringInternal_(s);\n          cache[s] = color;\n          ++cacheSize;\n        }\n        return color;\n      }\n    );\n\n  })();\n\n/**\n * Return the color as an array. This function maintains a cache of calculated\n * arrays which means the result should not be modified.\n * @param {Color|string} color Color.\n * @return {Color} Color.\n * @api\n */\nexport function asArray(color) {\n  if (Array.isArray(color)) {\n    return color;\n  } else {\n    return fromString(color);\n  }\n}\n\n/**\n * @param {string} s String.\n * @private\n * @return {Color} Color.\n */\nfunction fromStringInternal_(s) {\n  var r, g, b, a, color;\n\n  if (NAMED_COLOR_RE_.exec(s)) {\n    s = fromNamed(s);\n  }\n\n  if (HEX_COLOR_RE_.exec(s)) { // hex\n    var n = s.length - 1; // number of hex digits\n    var d; // number of digits per channel\n    if (n <= 4) {\n      d = 1;\n    } else {\n      d = 2;\n    }\n    var hasAlpha = n === 4 || n === 8;\n    r = parseInt(s.substr(1 + 0 * d, d), 16);\n    g = parseInt(s.substr(1 + 1 * d, d), 16);\n    b = parseInt(s.substr(1 + 2 * d, d), 16);\n    if (hasAlpha) {\n      a = parseInt(s.substr(1 + 3 * d, d), 16);\n    } else {\n      a = 255;\n    }\n    if (d == 1) {\n      r = (r << 4) + r;\n      g = (g << 4) + g;\n      b = (b << 4) + b;\n      if (hasAlpha) {\n        a = (a << 4) + a;\n      }\n    }\n    color = [r, g, b, a / 255];\n  } else if (s.indexOf('rgba(') == 0) { // rgba()\n    color = s.slice(5, -1).split(',').map(Number);\n    normalize(color);\n  } else if (s.indexOf('rgb(') == 0) { // rgb()\n    color = s.slice(4, -1).split(',').map(Number);\n    color.push(1);\n    normalize(color);\n  } else {\n    assert(false, 14); // Invalid color\n  }\n  return color;\n}\n\n\n/**\n * TODO this function is only used in the test, we probably shouldn't export it\n * @param {Color} color Color.\n * @return {Color} Clamped color.\n */\nexport function normalize(color) {\n  color[0] = clamp((color[0] + 0.5) | 0, 0, 255);\n  color[1] = clamp((color[1] + 0.5) | 0, 0, 255);\n  color[2] = clamp((color[2] + 0.5) | 0, 0, 255);\n  color[3] = clamp(color[3], 0, 1);\n  return color;\n}\n\n\n/**\n * @param {Color} color Color.\n * @return {string} String.\n */\nexport function toString(color) {\n  var r = color[0];\n  if (r != (r | 0)) {\n    r = (r + 0.5) | 0;\n  }\n  var g = color[1];\n  if (g != (g | 0)) {\n    g = (g + 0.5) | 0;\n  }\n  var b = color[2];\n  if (b != (b | 0)) {\n    b = (b + 0.5) | 0;\n  }\n  var a = color[3] === undefined ? 1 : color[3];\n  return 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')';\n}\n\n//# sourceMappingURL=color.js.map","/**\n * @module ol/style/Fill\n */\nimport {getUid} from '../util.js';\nimport {asString} from '../color.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n */\n\n\n/**\n * @classdesc\n * Set fill style for vector features.\n * @api\n */\nvar Fill = function Fill(opt_options) {\n\n  var options = opt_options || {};\n\n  /**\n   * @private\n   * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n   */\n  this.color_ = options.color !== undefined ? options.color : null;\n\n  /**\n   * @private\n   * @type {string|undefined}\n   */\n  this.checksum_ = undefined;\n};\n\n/**\n * Clones the style. The color is not cloned if it is an {@link module:ol/colorlike~ColorLike}.\n * @return {Fill} The cloned style.\n * @api\n */\nFill.prototype.clone = function clone () {\n  var color = this.getColor();\n  return new Fill({\n    color: Array.isArray(color) ? color.slice() : color || undefined\n  });\n};\n\n/**\n * Get the fill color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\nFill.prototype.getColor = function getColor () {\n  return this.color_;\n};\n\n/**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\nFill.prototype.setColor = function setColor (color) {\n  this.color_ = color;\n  this.checksum_ = undefined;\n};\n\n/**\n * @return {string} The checksum.\n */\nFill.prototype.getChecksum = function getChecksum () {\n  if (this.checksum_ === undefined) {\n    var color = this.color_;\n    if (color) {\n      if (Array.isArray(color) || typeof color == 'string') {\n        this.checksum_ = 'f' + asString(/** @type {import(\"../color.js\").Color|string} */ (color));\n      } else {\n        this.checksum_ = getUid(this.color_);\n      }\n    } else {\n      this.checksum_ = 'f-';\n    }\n  }\n\n  return this.checksum_;\n};\n\nexport default Fill;\n\n//# sourceMappingURL=Fill.js.map","/**\n * @module ol/style/Stroke\n */\nimport {getUid} from '../util.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} [color] A color, gradient or pattern.\n * See {@link module:ol/color~Color} and {@link module:ol/colorlike~ColorLike} for possible formats.\n * Default null; if null, the Canvas/renderer default black will be used.\n * @property {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`.\n * @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`.\n * @property {Array<number>} [lineDash] Line dash pattern. Default is `undefined` (no dash).\n * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on\n * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers.\n * @property {number} [lineDashOffset=0] Line dash offset.\n * @property {number} [miterLimit=10] Miter limit.\n * @property {number} [width] Width.\n */\n\n\n/**\n * @classdesc\n * Set stroke style for vector features.\n * Note that the defaults given are the Canvas defaults, which will be used if\n * option is not defined. The `get` functions return whatever was entered in\n * the options; they will not return the default.\n * @api\n */\nvar Stroke = function Stroke(opt_options) {\n\n  var options = opt_options || {};\n\n  /**\n   * @private\n   * @type {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike}\n   */\n  this.color_ = options.color !== undefined ? options.color : null;\n\n  /**\n   * @private\n   * @type {string|undefined}\n   */\n  this.lineCap_ = options.lineCap;\n\n  /**\n   * @private\n   * @type {Array<number>}\n   */\n  this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null;\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.lineDashOffset_ = options.lineDashOffset;\n\n  /**\n   * @private\n   * @type {string|undefined}\n   */\n  this.lineJoin_ = options.lineJoin;\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.miterLimit_ = options.miterLimit;\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.width_ = options.width;\n\n  /**\n   * @private\n   * @type {string|undefined}\n   */\n  this.checksum_ = undefined;\n};\n\n/**\n * Clones the style.\n * @return {Stroke} The cloned style.\n * @api\n */\nStroke.prototype.clone = function clone () {\n  var color = this.getColor();\n  return new Stroke({\n    color: Array.isArray(color) ? color.slice() : color || undefined,\n    lineCap: this.getLineCap(),\n    lineDash: this.getLineDash() ? this.getLineDash().slice() : undefined,\n    lineDashOffset: this.getLineDashOffset(),\n    lineJoin: this.getLineJoin(),\n    miterLimit: this.getMiterLimit(),\n    width: this.getWidth()\n  });\n};\n\n/**\n * Get the stroke color.\n * @return {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} Color.\n * @api\n */\nStroke.prototype.getColor = function getColor () {\n  return this.color_;\n};\n\n/**\n * Get the line cap type for the stroke.\n * @return {string|undefined} Line cap.\n * @api\n */\nStroke.prototype.getLineCap = function getLineCap () {\n  return this.lineCap_;\n};\n\n/**\n * Get the line dash style for the stroke.\n * @return {Array<number>} Line dash.\n * @api\n */\nStroke.prototype.getLineDash = function getLineDash () {\n  return this.lineDash_;\n};\n\n/**\n * Get the line dash offset for the stroke.\n * @return {number|undefined} Line dash offset.\n * @api\n */\nStroke.prototype.getLineDashOffset = function getLineDashOffset () {\n  return this.lineDashOffset_;\n};\n\n/**\n * Get the line join type for the stroke.\n * @return {string|undefined} Line join.\n * @api\n */\nStroke.prototype.getLineJoin = function getLineJoin () {\n  return this.lineJoin_;\n};\n\n/**\n * Get the miter limit for the stroke.\n * @return {number|undefined} Miter limit.\n * @api\n */\nStroke.prototype.getMiterLimit = function getMiterLimit () {\n  return this.miterLimit_;\n};\n\n/**\n * Get the stroke width.\n * @return {number|undefined} Width.\n * @api\n */\nStroke.prototype.getWidth = function getWidth () {\n  return this.width_;\n};\n\n/**\n * Set the color.\n *\n * @param {import(\"../color.js\").Color|import(\"../colorlike.js\").ColorLike} color Color.\n * @api\n */\nStroke.prototype.setColor = function setColor (color) {\n  this.color_ = color;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the line cap.\n *\n * @param {string|undefined} lineCap Line cap.\n * @api\n */\nStroke.prototype.setLineCap = function setLineCap (lineCap) {\n  this.lineCap_ = lineCap;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the line dash.\n *\n * Please note that Internet Explorer 10 and lower [do not support][mdn] the\n * `setLineDash` method on the `CanvasRenderingContext2D` and therefore this\n * property will have no visual effect in these browsers.\n *\n * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility\n *\n * @param {Array<number>} lineDash Line dash.\n * @api\n */\nStroke.prototype.setLineDash = function setLineDash (lineDash) {\n  this.lineDash_ = lineDash;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the line dash offset.\n *\n * @param {number|undefined} lineDashOffset Line dash offset.\n * @api\n */\nStroke.prototype.setLineDashOffset = function setLineDashOffset (lineDashOffset) {\n  this.lineDashOffset_ = lineDashOffset;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the line join.\n *\n * @param {string|undefined} lineJoin Line join.\n * @api\n */\nStroke.prototype.setLineJoin = function setLineJoin (lineJoin) {\n  this.lineJoin_ = lineJoin;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the miter limit.\n *\n * @param {number|undefined} miterLimit Miter limit.\n * @api\n */\nStroke.prototype.setMiterLimit = function setMiterLimit (miterLimit) {\n  this.miterLimit_ = miterLimit;\n  this.checksum_ = undefined;\n};\n\n/**\n * Set the width.\n *\n * @param {number|undefined} width Width.\n * @api\n */\nStroke.prototype.setWidth = function setWidth (width) {\n  this.width_ = width;\n  this.checksum_ = undefined;\n};\n\n/**\n * @return {string} The checksum.\n */\nStroke.prototype.getChecksum = function getChecksum () {\n  if (this.checksum_ === undefined) {\n    this.checksum_ = 's';\n    if (this.color_) {\n      if (typeof this.color_ === 'string') {\n        this.checksum_ += this.color_;\n      } else {\n        this.checksum_ += getUid(this.color_);\n      }\n    } else {\n      this.checksum_ += '-';\n    }\n    this.checksum_ += ',' +\n        (this.lineCap_ !== undefined ?\n          this.lineCap_.toString() : '-') + ',' +\n        (this.lineDash_ ?\n          this.lineDash_.toString() : '-') + ',' +\n        (this.lineDashOffset_ !== undefined ?\n          this.lineDashOffset_ : '-') + ',' +\n        (this.lineJoin_ !== undefined ?\n          this.lineJoin_ : '-') + ',' +\n        (this.miterLimit_ !== undefined ?\n          this.miterLimit_.toString() : '-') + ',' +\n        (this.width_ !== undefined ?\n          this.width_.toString() : '-');\n  }\n\n  return this.checksum_;\n};\n\nexport default Stroke;\n\n//# sourceMappingURL=Stroke.js.map","/**\n * @module ol/style/TextPlacement\n */\n\n/**\n * Text placement. One of `'point'`, `'line'`. Default is `'point'`. Note that\n * `'line'` requires the underlying geometry to be a {@link module:ol/geom/LineString~LineString},\n * {@link module:ol/geom/Polygon~Polygon}, {@link module:ol/geom/MultiLineString~MultiLineString} or\n * {@link module:ol/geom/MultiPolygon~MultiPolygon}.\n * @enum {string}\n */\nexport default {\n  POINT: 'point',\n  LINE: 'line'\n};\n\n//# sourceMappingURL=TextPlacement.js.map","/**\n * @module ol/style/Text\n */\nimport Fill from './Fill.js';\nimport TextPlacement from './TextPlacement.js';\n\n\n/**\n * The default fill color to use if no fill was set at construction time; a\n * blackish `#333`.\n *\n * @const {string}\n */\nvar DEFAULT_FILL_COLOR = '#333';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [font] Font style as CSS 'font' value, see:\n * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'\n * @property {number} [maxAngle] When `placement` is set to `'line'`, allow a maximum angle between adjacent characters.\n * The expected value is in radians, and the default is 45° (`Math.PI / 4`).\n * @property {number} [offsetX=0] Horizontal text offset in pixels. A positive will shift the text right.\n * @property {number} [offsetY=0] Vertical text offset in pixels. A positive will shift the text down.\n * @property {boolean} [overflow=false] For polygon labels or when `placement` is set to `'line'`, allow text to exceed\n * the width of the polygon at the label position or the length of the path that it follows.\n * @property {import(\"./TextPlacement.js\").default|string} [placement] Text placement.\n * @property {number} [scale] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the text with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {string} [text] Text content.\n * @property {string} [textAlign] Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'.\n * Default is 'center' for `placement: 'point'`. For `placement: 'line'`, the default is to let the renderer choose a\n * placement where `maxAngle` is not exceeded.\n * @property {string} [textBaseline='middle'] Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic',\n * 'hanging', 'ideographic'.\n * @property {import(\"./Fill.js\").default} [fill] Fill style. If none is provided, we'll use a dark fill-style (#333).\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Fill.js\").default} [backgroundFill] Fill style for the text background when `placement` is\n * `'point'`. Default is no fill.\n * @property {import(\"./Stroke.js\").default} [backgroundStroke] Stroke style for the text background  when `placement`\n * is `'point'`. Default is no stroke.\n * @property {Array<number>} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of\n * values in the array is `[top, right, bottom, left]`.\n */\n\n\n/**\n * @classdesc\n * Set text style for vector features.\n * @api\n */\nvar Text = function Text(opt_options) {\n\n  var options = opt_options || {};\n\n  /**\n  * @private\n  * @type {string|undefined}\n  */\n  this.font_ = options.font;\n\n  /**\n  * @private\n  * @type {number|undefined}\n  */\n  this.rotation_ = options.rotation;\n\n  /**\n  * @private\n  * @type {boolean|undefined}\n  */\n  this.rotateWithView_ = options.rotateWithView;\n\n  /**\n  * @private\n  * @type {number|undefined}\n  */\n  this.scale_ = options.scale;\n\n  /**\n  * @private\n  * @type {string|undefined}\n  */\n  this.text_ = options.text;\n\n  /**\n  * @private\n  * @type {string|undefined}\n  */\n  this.textAlign_ = options.textAlign;\n\n  /**\n  * @private\n  * @type {string|undefined}\n  */\n  this.textBaseline_ = options.textBaseline;\n\n  /**\n  * @private\n  * @type {import(\"./Fill.js\").default}\n  */\n  this.fill_ = options.fill !== undefined ? options.fill :\n    new Fill({color: DEFAULT_FILL_COLOR});\n\n  /**\n  * @private\n  * @type {number}\n  */\n  this.maxAngle_ = options.maxAngle !== undefined ? options.maxAngle : Math.PI / 4;\n\n  /**\n  * @private\n  * @type {import(\"./TextPlacement.js\").default|string}\n  */\n  this.placement_ = options.placement !== undefined ? options.placement : TextPlacement.POINT;\n\n  /**\n  * @private\n  * @type {boolean}\n  */\n  this.overflow_ = !!options.overflow;\n\n  /**\n  * @private\n  * @type {import(\"./Stroke.js\").default}\n  */\n  this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n  /**\n  * @private\n  * @type {number}\n  */\n  this.offsetX_ = options.offsetX !== undefined ? options.offsetX : 0;\n\n  /**\n  * @private\n  * @type {number}\n  */\n  this.offsetY_ = options.offsetY !== undefined ? options.offsetY : 0;\n\n  /**\n  * @private\n  * @type {import(\"./Fill.js\").default}\n  */\n  this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;\n\n  /**\n  * @private\n  * @type {import(\"./Stroke.js\").default}\n  */\n  this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;\n\n  /**\n  * @private\n  * @type {Array<number>}\n  */\n  this.padding_ = options.padding === undefined ? null : options.padding;\n};\n\n/**\n* Clones the style.\n* @return {Text} The cloned style.\n* @api\n*/\nText.prototype.clone = function clone () {\n  return new Text({\n    font: this.getFont(),\n    placement: this.getPlacement(),\n    maxAngle: this.getMaxAngle(),\n    overflow: this.getOverflow(),\n    rotation: this.getRotation(),\n    rotateWithView: this.getRotateWithView(),\n    scale: this.getScale(),\n    text: this.getText(),\n    textAlign: this.getTextAlign(),\n    textBaseline: this.getTextBaseline(),\n    fill: this.getFill() ? this.getFill().clone() : undefined,\n    stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n    offsetX: this.getOffsetX(),\n    offsetY: this.getOffsetY(),\n    backgroundFill: this.getBackgroundFill() ? this.getBackgroundFill().clone() : undefined,\n    backgroundStroke: this.getBackgroundStroke() ? this.getBackgroundStroke().clone() : undefined\n  });\n};\n\n/**\n* Get the `overflow` configuration.\n* @return {boolean} Let text overflow the length of the path they follow.\n* @api\n*/\nText.prototype.getOverflow = function getOverflow () {\n  return this.overflow_;\n};\n\n/**\n* Get the font name.\n* @return {string|undefined} Font.\n* @api\n*/\nText.prototype.getFont = function getFont () {\n  return this.font_;\n};\n\n/**\n* Get the maximum angle between adjacent characters.\n* @return {number} Angle in radians.\n* @api\n*/\nText.prototype.getMaxAngle = function getMaxAngle () {\n  return this.maxAngle_;\n};\n\n/**\n* Get the label placement.\n* @return {import(\"./TextPlacement.js\").default|string} Text placement.\n* @api\n*/\nText.prototype.getPlacement = function getPlacement () {\n  return this.placement_;\n};\n\n/**\n* Get the x-offset for the text.\n* @return {number} Horizontal text offset.\n* @api\n*/\nText.prototype.getOffsetX = function getOffsetX () {\n  return this.offsetX_;\n};\n\n/**\n* Get the y-offset for the text.\n* @return {number} Vertical text offset.\n* @api\n*/\nText.prototype.getOffsetY = function getOffsetY () {\n  return this.offsetY_;\n};\n\n/**\n* Get the fill style for the text.\n* @return {import(\"./Fill.js\").default} Fill style.\n* @api\n*/\nText.prototype.getFill = function getFill () {\n  return this.fill_;\n};\n\n/**\n* Determine whether the text rotates with the map.\n* @return {boolean|undefined} Rotate with map.\n* @api\n*/\nText.prototype.getRotateWithView = function getRotateWithView () {\n  return this.rotateWithView_;\n};\n\n/**\n* Get the text rotation.\n* @return {number|undefined} Rotation.\n* @api\n*/\nText.prototype.getRotation = function getRotation () {\n  return this.rotation_;\n};\n\n/**\n* Get the text scale.\n* @return {number|undefined} Scale.\n* @api\n*/\nText.prototype.getScale = function getScale () {\n  return this.scale_;\n};\n\n/**\n* Get the stroke style for the text.\n* @return {import(\"./Stroke.js\").default} Stroke style.\n* @api\n*/\nText.prototype.getStroke = function getStroke () {\n  return this.stroke_;\n};\n\n/**\n* Get the text to be rendered.\n* @return {string|undefined} Text.\n* @api\n*/\nText.prototype.getText = function getText () {\n  return this.text_;\n};\n\n/**\n* Get the text alignment.\n* @return {string|undefined} Text align.\n* @api\n*/\nText.prototype.getTextAlign = function getTextAlign () {\n  return this.textAlign_;\n};\n\n/**\n* Get the text baseline.\n* @return {string|undefined} Text baseline.\n* @api\n*/\nText.prototype.getTextBaseline = function getTextBaseline () {\n  return this.textBaseline_;\n};\n\n/**\n* Get the background fill style for the text.\n* @return {import(\"./Fill.js\").default} Fill style.\n* @api\n*/\nText.prototype.getBackgroundFill = function getBackgroundFill () {\n  return this.backgroundFill_;\n};\n\n/**\n* Get the background stroke style for the text.\n* @return {import(\"./Stroke.js\").default} Stroke style.\n* @api\n*/\nText.prototype.getBackgroundStroke = function getBackgroundStroke () {\n  return this.backgroundStroke_;\n};\n\n/**\n* Get the padding for the text.\n* @return {Array<number>} Padding.\n* @api\n*/\nText.prototype.getPadding = function getPadding () {\n  return this.padding_;\n};\n\n/**\n* Set the `overflow` property.\n*\n* @param {boolean} overflow Let text overflow the path that it follows.\n* @api\n*/\nText.prototype.setOverflow = function setOverflow (overflow) {\n  this.overflow_ = overflow;\n};\n\n/**\n* Set the font.\n*\n* @param {string|undefined} font Font.\n* @api\n*/\nText.prototype.setFont = function setFont (font) {\n  this.font_ = font;\n};\n\n/**\n* Set the maximum angle between adjacent characters.\n*\n* @param {number} maxAngle Angle in radians.\n* @api\n*/\nText.prototype.setMaxAngle = function setMaxAngle (maxAngle) {\n  this.maxAngle_ = maxAngle;\n};\n\n/**\n* Set the x offset.\n*\n* @param {number} offsetX Horizontal text offset.\n* @api\n*/\nText.prototype.setOffsetX = function setOffsetX (offsetX) {\n  this.offsetX_ = offsetX;\n};\n\n/**\n* Set the y offset.\n*\n* @param {number} offsetY Vertical text offset.\n* @api\n*/\nText.prototype.setOffsetY = function setOffsetY (offsetY) {\n  this.offsetY_ = offsetY;\n};\n\n/**\n* Set the text placement.\n*\n* @param {import(\"./TextPlacement.js\").default|string} placement Placement.\n* @api\n*/\nText.prototype.setPlacement = function setPlacement (placement) {\n  this.placement_ = placement;\n};\n\n/**\n* Set the fill.\n*\n* @param {import(\"./Fill.js\").default} fill Fill style.\n* @api\n*/\nText.prototype.setFill = function setFill (fill) {\n  this.fill_ = fill;\n};\n\n/**\n* Set the rotation.\n*\n* @param {number|undefined} rotation Rotation.\n* @api\n*/\nText.prototype.setRotation = function setRotation (rotation) {\n  this.rotation_ = rotation;\n};\n\n/**\n* Set the scale.\n*\n* @param {number|undefined} scale Scale.\n* @api\n*/\nText.prototype.setScale = function setScale (scale) {\n  this.scale_ = scale;\n};\n\n/**\n* Set the stroke.\n*\n* @param {import(\"./Stroke.js\").default} stroke Stroke style.\n* @api\n*/\nText.prototype.setStroke = function setStroke (stroke) {\n  this.stroke_ = stroke;\n};\n\n/**\n* Set the text.\n*\n* @param {string|undefined} text Text.\n* @api\n*/\nText.prototype.setText = function setText (text) {\n  this.text_ = text;\n};\n\n/**\n* Set the text alignment.\n*\n* @param {string|undefined} textAlign Text align.\n* @api\n*/\nText.prototype.setTextAlign = function setTextAlign (textAlign) {\n  this.textAlign_ = textAlign;\n};\n\n/**\n* Set the text baseline.\n*\n* @param {string|undefined} textBaseline Text baseline.\n* @api\n*/\nText.prototype.setTextBaseline = function setTextBaseline (textBaseline) {\n  this.textBaseline_ = textBaseline;\n};\n\n/**\n* Set the background fill.\n*\n* @param {import(\"./Fill.js\").default} fill Fill style.\n* @api\n*/\nText.prototype.setBackgroundFill = function setBackgroundFill (fill) {\n  this.backgroundFill_ = fill;\n};\n\n/**\n* Set the background stroke.\n*\n* @param {import(\"./Stroke.js\").default} stroke Stroke style.\n* @api\n*/\nText.prototype.setBackgroundStroke = function setBackgroundStroke (stroke) {\n  this.backgroundStroke_ = stroke;\n};\n\n/**\n* Set the padding (`[top, right, bottom, left]`).\n*\n* @param {!Array<number>} padding Padding.\n* @api\n*/\nText.prototype.setPadding = function setPadding (padding) {\n  this.padding_ = padding;\n};\n\nexport default Text;\n\n//# sourceMappingURL=Text.js.map","/**\n * @module ol/Graticule\n */\nimport {degreesToStringHDMS} from './coordinate.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {intersects, getCenter} from './extent.js';\nimport GeometryLayout from './geom/GeometryLayout.js';\nimport LineString from './geom/LineString.js';\nimport Point from './geom/Point.js';\nimport {meridian, parallel} from './geom/flat/geodesic.js';\nimport {clamp} from './math.js';\nimport {get as getProjection, equivalent as equivalentProjection, getTransform, transformExtent} from './proj.js';\nimport RenderEventType from './render/EventType.js';\nimport Fill from './style/Fill.js';\nimport Stroke from './style/Stroke.js';\nimport Text from './style/Text.js';\n\n\n/**\n * @type {Stroke}\n * @private\n * @const\n */\nvar DEFAULT_STROKE_STYLE = new Stroke({\n  color: 'rgba(0,0,0,0.2)'\n});\n\n/**\n * @type {Array<number>}\n * @private\n */\nvar INTERVALS = [\n  90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001\n];\n\n/**\n * @typedef {Object} GraticuleLabelDataType\n * @property {Point} geom\n * @property {string} text\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./PluggableMap.js\").default} [map] Reference to an\n * {@link module:ol/Map~Map} object.\n * @property {number} [maxLines=100] The maximum number of meridians and\n * parallels from the center of the map. The default value of 100 means that at\n * most 200 meridians and 200 parallels will be displayed. The default value is\n * appropriate for conformal projections like Spherical Mercator. If you\n * increase the value, more lines will be drawn and the drawing performance will\n * decrease.\n * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The\n * stroke style to use for drawing the graticule. If not provided, a not fully\n * opaque black will be used.\n * @property {number} [targetSize=100] The target size of the graticule cells,\n * in pixels.\n * @property {boolean} [showLabels=false] Render a label with the respective\n * latitude/longitude for each graticule line.\n * @property {function(number):string} [lonLabelFormatter] Label formatter for\n * longitudes. This function is called with the longitude as argument, and\n * should return a formatted string representing the longitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {function(number):string} [latLabelFormatter] Label formatter for\n * latitudes. This function is called with the latitude as argument, and\n * should return a formatted string representing the latitude. By default,\n * labels are formatted as degrees, minutes, seconds and hemisphere.\n * @property {number} [lonLabelPosition=0] Longitude label position in fractions\n * (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the\n * top.\n * @property {number} [latLabelPosition=1] Latitude label position in fractions\n * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the\n * right.\n * @property {Text} [lonLabelStyle] Longitude label text\n * style. If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textBaseline: 'bottom',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: new Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textBaseline` configuration will not work well for\n * `lonLabelPosition` configurations that position labels close to the top of\n * the viewport.\n * @property {Text} [latLabelStyle] Latitude label text style.\n * If not provided, the following style will be used:\n * ```js\n * new Text({\n *   font: '12px Calibri,sans-serif',\n *   textAlign: 'end',\n *   fill: new Fill({\n *     color: 'rgba(0,0,0,1)'\n *   }),\n *   stroke: Stroke({\n *     color: 'rgba(255,255,255,1)',\n *     width: 3\n *   })\n * });\n * ```\n * Note that the default's `textAlign` configuration will not work well for\n * `latLabelPosition` configurations that position labels close to the left of\n * the viewport.\n * @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]\n * Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:\n * ```js\n * [30, 10]\n * ```\n */\n\n\n/**\n * Render a grid for a coordinate system on a map.\n * @api\n */\nvar Graticule = function Graticule(opt_options) {\n  var options = opt_options || {};\n\n  /**\n   * @type {import(\"./PluggableMap.js\").default}\n   * @private\n   */\n  this.map_ = null;\n\n  /**\n   * @type {?import(\"./events.js\").EventsKey}\n   * @private\n   */\n  this.postcomposeListenerKey_ = null;\n\n  /**\n   * @type {import(\"./proj/Projection.js\").default}\n   */\n  this.projection_ = null;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.maxLat_ = Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.maxLon_ = Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.minLat_ = -Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.minLon_ = -Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.maxLatP_ = Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.maxLonP_ = Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.minLatP_ = -Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.minLonP_ = -Infinity;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.targetSize_ = options.targetSize !== undefined ? options.targetSize : 100;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;\n\n  /**\n   * @type {Array<LineString>}\n   * @private\n   */\n  this.meridians_ = [];\n\n  /**\n   * @type {Array<LineString>}\n   * @private\n   */\n  this.parallels_ = [];\n\n  /**\n   * @type {Stroke}\n   * @private\n   */\n  this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE;\n\n  /**\n   * @type {import(\"./proj.js\").TransformFunction|undefined}\n   * @private\n   */\n  this.fromLonLatTransform_ = undefined;\n\n  /**\n   * @type {import(\"./proj.js\").TransformFunction|undefined}\n   * @private\n   */\n  this.toLonLatTransform_ = undefined;\n\n  /**\n   * @type {import(\"./coordinate.js\").Coordinate}\n   * @private\n   */\n  this.projectionCenterLonLat_ = null;\n\n  /**\n   * @type {Array<GraticuleLabelDataType>}\n   * @private\n   */\n  this.meridiansLabels_ = null;\n\n  /**\n   * @type {Array<GraticuleLabelDataType>}\n   * @private\n   */\n  this.parallelsLabels_ = null;\n\n  if (options.showLabels == true) {\n\n    /**\n     * @type {null|function(number):string}\n     * @private\n     */\n    this.lonLabelFormatter_ = options.lonLabelFormatter == undefined ?\n      degreesToStringHDMS.bind(this, 'EW') : options.lonLabelFormatter;\n\n    /**\n     * @type {function(number):string}\n     * @private\n     */\n    this.latLabelFormatter_ = options.latLabelFormatter == undefined ?\n      degreesToStringHDMS.bind(this, 'NS') : options.latLabelFormatter;\n\n    /**\n     * Longitude label position in fractions (0..1) of view extent. 0 means\n     * bottom, 1 means top.\n     * @type {number}\n     * @private\n     */\n    this.lonLabelPosition_ = options.lonLabelPosition == undefined ? 0 :\n      options.lonLabelPosition;\n\n    /**\n     * Latitude Label position in fractions (0..1) of view extent. 0 means left, 1\n     * means right.\n     * @type {number}\n     * @private\n     */\n    this.latLabelPosition_ = options.latLabelPosition == undefined ? 1 :\n      options.latLabelPosition;\n\n    /**\n     * @type {Text}\n     * @private\n     */\n    this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :\n      new Text({\n        font: '12px Calibri,sans-serif',\n        textBaseline: 'bottom',\n        fill: new Fill({\n          color: 'rgba(0,0,0,1)'\n        }),\n        stroke: new Stroke({\n          color: 'rgba(255,255,255,1)',\n          width: 3\n        })\n      });\n\n    /**\n     * @type {Text}\n     * @private\n     */\n    this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle :\n      new Text({\n        font: '12px Calibri,sans-serif',\n        textAlign: 'end',\n        fill: new Fill({\n          color: 'rgba(0,0,0,1)'\n        }),\n        stroke: new Stroke({\n          color: 'rgba(255,255,255,1)',\n          width: 3\n        })\n      });\n\n    this.meridiansLabels_ = [];\n    this.parallelsLabels_ = [];\n  }\n\n  /**\n   * @type {Array<number>}\n   * @private\n   */\n  this.intervals_ = options.intervals !== undefined ? options.intervals : INTERVALS;\n\n  this.setMap(options.map !== undefined ? options.map : null);\n};\n\n/**\n * @param {number} lon Longitude.\n * @param {number} minLat Minimal latitude.\n * @param {number} maxLat Maximal latitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {number} Index.\n * @private\n */\nGraticule.prototype.addMeridian_ = function addMeridian_ (lon, minLat, maxLat, squaredTolerance, extent, index) {\n  var lineString = this.getMeridian_(lon, minLat, maxLat, squaredTolerance, index);\n  if (intersects(lineString.getExtent(), extent)) {\n    if (this.meridiansLabels_) {\n      var textPoint = this.getMeridianPoint_(lineString, extent, index);\n      this.meridiansLabels_[index] = {\n        geom: textPoint,\n        text: this.lonLabelFormatter_(lon)\n      };\n    }\n    this.meridians_[index++] = lineString;\n  }\n  return index;\n};\n\n/**\n * @param {LineString} lineString Meridian\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {Point} Meridian point.\n * @private\n */\nGraticule.prototype.getMeridianPoint_ = function getMeridianPoint_ (lineString, extent, index) {\n  var flatCoordinates = lineString.getFlatCoordinates();\n  var clampedBottom = Math.max(extent[1], flatCoordinates[1]);\n  var clampedTop = Math.min(extent[3], flatCoordinates[flatCoordinates.length - 1]);\n  var lat = clamp(\n    extent[1] + Math.abs(extent[1] - extent[3]) * this.lonLabelPosition_,\n    clampedBottom, clampedTop);\n  var coordinate = [flatCoordinates[0], lat];\n  var point;\n  if (index in this.meridiansLabels_) {\n    point = this.meridiansLabels_[index].geom;\n    point.setCoordinates(coordinate);\n  } else {\n    point = new Point(coordinate);\n  }\n  return point;\n};\n\n/**\n * @param {number} lat Latitude.\n * @param {number} minLon Minimal longitude.\n * @param {number} maxLon Maximal longitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {number} Index.\n * @private\n */\nGraticule.prototype.addParallel_ = function addParallel_ (lat, minLon, maxLon, squaredTolerance, extent, index) {\n  var lineString = this.getParallel_(lat, minLon, maxLon, squaredTolerance, index);\n  if (intersects(lineString.getExtent(), extent)) {\n    if (this.parallelsLabels_) {\n      var textPoint = this.getParallelPoint_(lineString, extent, index);\n      this.parallelsLabels_[index] = {\n        geom: textPoint,\n        text: this.latLabelFormatter_(lat)\n      };\n    }\n    this.parallels_[index++] = lineString;\n  }\n  return index;\n};\n\n/**\n * @param {LineString} lineString Parallels.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} index Index.\n * @return {Point} Parallel point.\n * @private\n */\nGraticule.prototype.getParallelPoint_ = function getParallelPoint_ (lineString, extent, index) {\n  var flatCoordinates = lineString.getFlatCoordinates();\n  var clampedLeft = Math.max(extent[0], flatCoordinates[0]);\n  var clampedRight = Math.min(extent[2], flatCoordinates[flatCoordinates.length - 2]);\n  var lon = clamp(\n    extent[0] + Math.abs(extent[0] - extent[2]) * this.latLabelPosition_,\n    clampedLeft, clampedRight);\n  var coordinate = [lon, flatCoordinates[1]];\n  var point;\n  if (index in this.parallelsLabels_) {\n    point = this.parallelsLabels_[index].geom;\n    point.setCoordinates(coordinate);\n  } else {\n    point = new Point(coordinate);\n  }\n  return point;\n};\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {import(\"./coordinate.js\").Coordinate} center Center.\n * @param {number} resolution Resolution.\n * @param {number} squaredTolerance Squared tolerance.\n * @private\n */\nGraticule.prototype.createGraticule_ = function createGraticule_ (extent, center, resolution, squaredTolerance) {\n\n  var interval = this.getInterval_(resolution);\n  if (interval == -1) {\n    this.meridians_.length = this.parallels_.length = 0;\n    if (this.meridiansLabels_) {\n      this.meridiansLabels_.length = 0;\n    }\n    if (this.parallelsLabels_) {\n      this.parallelsLabels_.length = 0;\n    }\n    return;\n  }\n\n  var centerLonLat = this.toLonLatTransform_(center);\n  var centerLon = centerLonLat[0];\n  var centerLat = centerLonLat[1];\n  var maxLines = this.maxLines_;\n  var cnt, idx, lat, lon;\n\n  var validExtent = [\n    Math.max(extent[0], this.minLonP_),\n    Math.max(extent[1], this.minLatP_),\n    Math.min(extent[2], this.maxLonP_),\n    Math.min(extent[3], this.maxLatP_)\n  ];\n\n  validExtent = transformExtent(validExtent, this.projection_, 'EPSG:4326');\n  var maxLat = validExtent[3];\n  var maxLon = validExtent[2];\n  var minLat = validExtent[1];\n  var minLon = validExtent[0];\n\n  // Create meridians\n\n  centerLon = Math.floor(centerLon / interval) * interval;\n  lon = clamp(centerLon, this.minLon_, this.maxLon_);\n\n  idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, 0);\n\n  cnt = 0;\n  while (lon != this.minLon_ && cnt++ < maxLines) {\n    lon = Math.max(lon - interval, this.minLon_);\n    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n  }\n\n  lon = clamp(centerLon, this.minLon_, this.maxLon_);\n\n  cnt = 0;\n  while (lon != this.maxLon_ && cnt++ < maxLines) {\n    lon = Math.min(lon + interval, this.maxLon_);\n    idx = this.addMeridian_(lon, minLat, maxLat, squaredTolerance, extent, idx);\n  }\n\n  this.meridians_.length = idx;\n  if (this.meridiansLabels_) {\n    this.meridiansLabels_.length = idx;\n  }\n\n  // Create parallels\n\n  centerLat = Math.floor(centerLat / interval) * interval;\n  lat = clamp(centerLat, this.minLat_, this.maxLat_);\n\n  idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, 0);\n\n  cnt = 0;\n  while (lat != this.minLat_ && cnt++ < maxLines) {\n    lat = Math.max(lat - interval, this.minLat_);\n    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n  }\n\n  lat = clamp(centerLat, this.minLat_, this.maxLat_);\n\n  cnt = 0;\n  while (lat != this.maxLat_ && cnt++ < maxLines) {\n    lat = Math.min(lat + interval, this.maxLat_);\n    idx = this.addParallel_(lat, minLon, maxLon, squaredTolerance, extent, idx);\n  }\n\n  this.parallels_.length = idx;\n  if (this.parallelsLabels_) {\n    this.parallelsLabels_.length = idx;\n  }\n\n};\n\n/**\n * @param {number} resolution Resolution.\n * @return {number} The interval in degrees.\n * @private\n */\nGraticule.prototype.getInterval_ = function getInterval_ (resolution) {\n  var centerLon = this.projectionCenterLonLat_[0];\n  var centerLat = this.projectionCenterLonLat_[1];\n  var interval = -1;\n  var target = Math.pow(this.targetSize_ * resolution, 2);\n  /** @type {Array<number>} **/\n  var p1 = [];\n  /** @type {Array<number>} **/\n  var p2 = [];\n  for (var i = 0, ii = this.intervals_.length; i < ii; ++i) {\n    var delta = this.intervals_[i] / 2;\n    p1[0] = centerLon - delta;\n    p1[1] = centerLat - delta;\n    p2[0] = centerLon + delta;\n    p2[1] = centerLat + delta;\n    this.fromLonLatTransform_(p1, p1);\n    this.fromLonLatTransform_(p2, p2);\n    var dist = Math.pow(p2[0] - p1[0], 2) + Math.pow(p2[1] - p1[1], 2);\n    if (dist <= target) {\n      break;\n    }\n    interval = this.intervals_[i];\n  }\n  return interval;\n};\n\n/**\n * Get the map associated with this graticule.\n * @return {import(\"./PluggableMap.js\").default} The map.\n * @api\n */\nGraticule.prototype.getMap = function getMap () {\n  return this.map_;\n};\n\n/**\n * @param {number} lon Longitude.\n * @param {number} minLat Minimal latitude.\n * @param {number} maxLat Maximal latitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} The meridian line string.\n * @param {number} index Index.\n * @private\n */\nGraticule.prototype.getMeridian_ = function getMeridian_ (lon, minLat, maxLat, squaredTolerance, index) {\n  var flatCoordinates = meridian(lon, minLat, maxLat, this.projection_, squaredTolerance);\n  var lineString = this.meridians_[index];\n  if (!lineString) {\n    lineString = this.meridians_[index] = new LineString(flatCoordinates, GeometryLayout.XY);\n  } else {\n    lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n    lineString.changed();\n  }\n  return lineString;\n};\n\n/**\n * Get the list of meridians.Meridians are lines of equal longitude.\n * @return {Array<LineString>} The meridians.\n * @api\n */\nGraticule.prototype.getMeridians = function getMeridians () {\n  return this.meridians_;\n};\n\n/**\n * @param {number} lat Latitude.\n * @param {number} minLon Minimal longitude.\n * @param {number} maxLon Maximal longitude.\n * @param {number} squaredTolerance Squared tolerance.\n * @return {LineString} The parallel line string.\n * @param {number} index Index.\n * @private\n */\nGraticule.prototype.getParallel_ = function getParallel_ (lat, minLon, maxLon, squaredTolerance, index) {\n  var flatCoordinates = parallel(lat, minLon, maxLon, this.projection_, squaredTolerance);\n  var lineString = this.parallels_[index];\n  if (!lineString) {\n    lineString = new LineString(flatCoordinates, GeometryLayout.XY);\n  } else {\n    lineString.setFlatCoordinates(GeometryLayout.XY, flatCoordinates);\n    lineString.changed();\n  }\n  return lineString;\n};\n\n/**\n * Get the list of parallels.Parallels are lines of equal latitude.\n * @return {Array<LineString>} The parallels.\n * @api\n */\nGraticule.prototype.getParallels = function getParallels () {\n  return this.parallels_;\n};\n\n/**\n * @param {import(\"./render/Event.js\").default} e Event.\n * @private\n */\nGraticule.prototype.handlePostCompose_ = function handlePostCompose_ (e) {\n  var vectorContext = e.vectorContext;\n  var frameState = e.frameState;\n  var extent = frameState.extent;\n  var viewState = frameState.viewState;\n  var center = viewState.center;\n  var projection = viewState.projection;\n  var resolution = viewState.resolution;\n  var pixelRatio = frameState.pixelRatio;\n  var squaredTolerance =\n      resolution * resolution / (4 * pixelRatio * pixelRatio);\n\n  var updateProjectionInfo = !this.projection_ ||\n      !equivalentProjection(this.projection_, projection);\n\n  if (updateProjectionInfo) {\n    this.updateProjectionInfo_(projection);\n  }\n\n  this.createGraticule_(extent, center, resolution, squaredTolerance);\n\n  // Draw the lines\n  vectorContext.setFillStrokeStyle(null, this.strokeStyle_);\n  var i, l, line;\n  for (i = 0, l = this.meridians_.length; i < l; ++i) {\n    line = this.meridians_[i];\n    vectorContext.drawGeometry(line);\n  }\n  for (i = 0, l = this.parallels_.length; i < l; ++i) {\n    line = this.parallels_[i];\n    vectorContext.drawGeometry(line);\n  }\n  var labelData;\n  if (this.meridiansLabels_) {\n    for (i = 0, l = this.meridiansLabels_.length; i < l; ++i) {\n      labelData = this.meridiansLabels_[i];\n      this.lonLabelStyle_.setText(labelData.text);\n      vectorContext.setTextStyle(this.lonLabelStyle_);\n      vectorContext.drawGeometry(labelData.geom);\n    }\n  }\n  if (this.parallelsLabels_) {\n    for (i = 0, l = this.parallelsLabels_.length; i < l; ++i) {\n      labelData = this.parallelsLabels_[i];\n      this.latLabelStyle_.setText(labelData.text);\n      vectorContext.setTextStyle(this.latLabelStyle_);\n      vectorContext.drawGeometry(labelData.geom);\n    }\n  }\n};\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @private\n */\nGraticule.prototype.updateProjectionInfo_ = function updateProjectionInfo_ (projection) {\n  var epsg4326Projection = getProjection('EPSG:4326');\n\n  var worldExtent = projection.getWorldExtent();\n  var worldExtentP = transformExtent(worldExtent, epsg4326Projection, projection);\n\n  this.maxLat_ = worldExtent[3];\n  this.maxLon_ = worldExtent[2];\n  this.minLat_ = worldExtent[1];\n  this.minLon_ = worldExtent[0];\n\n  this.maxLatP_ = worldExtentP[3];\n  this.maxLonP_ = worldExtentP[2];\n  this.minLatP_ = worldExtentP[1];\n  this.minLonP_ = worldExtentP[0];\n\n  this.fromLonLatTransform_ = getTransform(epsg4326Projection, projection);\n\n  this.toLonLatTransform_ = getTransform(projection, epsg4326Projection);\n\n  this.projectionCenterLonLat_ = this.toLonLatTransform_(getCenter(projection.getExtent()));\n\n  this.projection_ = projection;\n};\n\n/**\n * Set the map for this graticule.The graticule will be rendered on the\n * provided map.\n * @param {import(\"./PluggableMap.js\").default} map Map.\n * @api\n */\nGraticule.prototype.setMap = function setMap (map) {\n  if (this.map_) {\n    unlistenByKey(this.postcomposeListenerKey_);\n    this.postcomposeListenerKey_ = null;\n    this.map_.render();\n  }\n  if (map) {\n    this.postcomposeListenerKey_ = listen(map, RenderEventType.POSTCOMPOSE, this.handlePostCompose_, this);\n    map.render();\n  }\n  this.map_ = map;\n};\n\nexport default Graticule;\n\n//# sourceMappingURL=Graticule.js.map","/**\n * @module ol/Kinetic\n */\n\n/**\n * @classdesc\n * Implementation of inertial deceleration for map movement.\n *\n * @api\n */\nvar Kinetic = function Kinetic(decay, minVelocity, delay) {\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.decay_ = decay;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.minVelocity_ = minVelocity;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.delay_ = delay;\n\n  /**\n   * @private\n   * @type {Array<number>}\n   */\n  this.points_ = [];\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.angle_ = 0;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.initialVelocity_ = 0;\n};\n\n/**\n * FIXME empty description for jsdoc\n */\nKinetic.prototype.begin = function begin () {\n  this.points_.length = 0;\n  this.angle_ = 0;\n  this.initialVelocity_ = 0;\n};\n\n/**\n * @param {number} x X.\n * @param {number} y Y.\n */\nKinetic.prototype.update = function update (x, y) {\n  this.points_.push(x, y, Date.now());\n};\n\n/**\n * @return {boolean} Whether we should do kinetic animation.\n */\nKinetic.prototype.end = function end () {\n  if (this.points_.length < 6) {\n    // at least 2 points are required (i.e. there must be at least 6 elements\n    // in the array)\n    return false;\n  }\n  var delay = Date.now() - this.delay_;\n  var lastIndex = this.points_.length - 3;\n  if (this.points_[lastIndex + 2] < delay) {\n    // the last tracked point is too old, which means that the user stopped\n    // panning before releasing the map\n    return false;\n  }\n\n  // get the first point which still falls into the delay time\n  var firstIndex = lastIndex - 3;\n  while (firstIndex > 0 && this.points_[firstIndex + 2] > delay) {\n    firstIndex -= 3;\n  }\n\n  var duration = this.points_[lastIndex + 2] - this.points_[firstIndex + 2];\n  // we don't want a duration of 0 (divide by zero)\n  // we also make sure the user panned for a duration of at least one frame\n  // (1/60s) to compute sane displacement values\n  if (duration < 1000 / 60) {\n    return false;\n  }\n\n  var dx = this.points_[lastIndex] - this.points_[firstIndex];\n  var dy = this.points_[lastIndex + 1] - this.points_[firstIndex + 1];\n  this.angle_ = Math.atan2(dy, dx);\n  this.initialVelocity_ = Math.sqrt(dx * dx + dy * dy) / duration;\n  return this.initialVelocity_ > this.minVelocity_;\n};\n\n/**\n * @return {number} Total distance travelled (pixels).\n */\nKinetic.prototype.getDistance = function getDistance () {\n  return (this.minVelocity_ - this.initialVelocity_) / this.decay_;\n};\n\n/**\n * @return {number} Angle of the kinetic panning animation (radians).\n */\nKinetic.prototype.getAngle = function getAngle () {\n  return this.angle_;\n};\n\nexport default Kinetic;\n\n//# sourceMappingURL=Kinetic.js.map","/**\n * @module ol/MapEvent\n */\nimport Event from './events/Event.js';\n\n/**\n * @classdesc\n * Events emitted as map events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map event.\n */\nvar MapEvent = /*@__PURE__*/(function (Event) {\n  function MapEvent(type, map, opt_frameState) {\n\n    Event.call(this, type);\n\n    /**\n     * The map where the event occurred.\n     * @type {import(\"./PluggableMap.js\").default}\n     * @api\n     */\n    this.map = map;\n\n    /**\n     * The frame state at the time of the event.\n     * @type {?import(\"./PluggableMap.js\").FrameState}\n     * @api\n     */\n    this.frameState = opt_frameState !== undefined ? opt_frameState : null;\n\n  }\n\n  if ( Event ) MapEvent.__proto__ = Event;\n  MapEvent.prototype = Object.create( Event && Event.prototype );\n  MapEvent.prototype.constructor = MapEvent;\n\n  return MapEvent;\n}(Event));\n\nexport default MapEvent;\n\n//# sourceMappingURL=MapEvent.js.map","/**\n * @module ol/MapBrowserEvent\n */\nimport MapEvent from './MapEvent.js';\n\n/**\n * @classdesc\n * Events emitted as map browser events are instances of this type.\n * See {@link module:ol/PluggableMap~PluggableMap} for which events trigger a map browser event.\n */\nvar MapBrowserEvent = /*@__PURE__*/(function (MapEvent) {\n  function MapBrowserEvent(type, map, browserEvent, opt_dragging, opt_frameState) {\n\n    MapEvent.call(this, type, map, opt_frameState);\n\n    /**\n     * The original browser event.\n     * @const\n     * @type {Event}\n     * @api\n     */\n    this.originalEvent = browserEvent;\n\n    /**\n     * The map pixel relative to the viewport corresponding to the original browser event.\n     * @type {import(\"./pixel.js\").Pixel}\n     * @api\n     */\n    this.pixel = map.getEventPixel(browserEvent);\n\n    /**\n     * The coordinate in view projection corresponding to the original browser event.\n     * @type {import(\"./coordinate.js\").Coordinate}\n     * @api\n     */\n    this.coordinate = map.getCoordinateFromPixel(this.pixel);\n\n    /**\n     * Indicates if the map is currently being dragged. Only set for\n     * `POINTERDRAG` and `POINTERMOVE` events. Default is `false`.\n     *\n     * @type {boolean}\n     * @api\n     */\n    this.dragging = opt_dragging !== undefined ? opt_dragging : false;\n\n  }\n\n  if ( MapEvent ) MapBrowserEvent.__proto__ = MapEvent;\n  MapBrowserEvent.prototype = Object.create( MapEvent && MapEvent.prototype );\n  MapBrowserEvent.prototype.constructor = MapBrowserEvent;\n\n  /**\n   * Prevents the default browser action.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.preventDefault.\n   * @override\n   * @api\n   */\n  MapBrowserEvent.prototype.preventDefault = function preventDefault () {\n    MapEvent.prototype.preventDefault.call(this);\n    this.originalEvent.preventDefault();\n  };\n\n  /**\n   * Prevents further propagation of the current event.\n   * See https://developer.mozilla.org/en-US/docs/Web/API/event.stopPropagation.\n   * @override\n   * @api\n   */\n  MapBrowserEvent.prototype.stopPropagation = function stopPropagation () {\n    MapEvent.prototype.stopPropagation.call(this);\n    this.originalEvent.stopPropagation();\n  };\n\n  return MapBrowserEvent;\n}(MapEvent));\n\n\nexport default MapBrowserEvent;\n\n//# sourceMappingURL=MapBrowserEvent.js.map","/**\n * @module ol/MapBrowserEventType\n */\nimport EventType from './events/EventType.js';\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n\n  /**\n   * A true single click with no dragging and no double click. Note that this\n   * event is delayed by 250 ms to ensure that it is not a double click.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#singleclick\n   * @api\n   */\n  SINGLECLICK: 'singleclick',\n\n  /**\n   * A click with no dragging. A double click will fire two of this.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#click\n   * @api\n   */\n  CLICK: EventType.CLICK,\n\n  /**\n   * A true double click, with no dragging.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#dblclick\n   * @api\n   */\n  DBLCLICK: EventType.DBLCLICK,\n\n  /**\n   * Triggered when a pointer is dragged.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointerdrag\n   * @api\n   */\n  POINTERDRAG: 'pointerdrag',\n\n  /**\n   * Triggered when a pointer is moved. Note that on touch devices this is\n   * triggered when the map is panned, so is not the same as mousemove.\n   * @event module:ol/MapBrowserEvent~MapBrowserEvent#pointermove\n   * @api\n   */\n  POINTERMOVE: 'pointermove',\n\n  POINTERDOWN: 'pointerdown',\n  POINTERUP: 'pointerup',\n  POINTEROVER: 'pointerover',\n  POINTEROUT: 'pointerout',\n  POINTERENTER: 'pointerenter',\n  POINTERLEAVE: 'pointerleave',\n  POINTERCANCEL: 'pointercancel'\n};\n\n//# sourceMappingURL=MapBrowserEventType.js.map","/**\n * @module ol/MapBrowserPointerEvent\n */\nimport MapBrowserEvent from './MapBrowserEvent.js';\n\nvar MapBrowserPointerEvent = /*@__PURE__*/(function (MapBrowserEvent) {\n  function MapBrowserPointerEvent(type, map, pointerEvent, opt_dragging, opt_frameState) {\n\n    MapBrowserEvent.call(this, type, map, pointerEvent.originalEvent, opt_dragging, opt_frameState);\n\n    /**\n     * @const\n     * @type {import(\"./pointer/PointerEvent.js\").default}\n     */\n    this.pointerEvent = pointerEvent;\n\n  }\n\n  if ( MapBrowserEvent ) MapBrowserPointerEvent.__proto__ = MapBrowserEvent;\n  MapBrowserPointerEvent.prototype = Object.create( MapBrowserEvent && MapBrowserEvent.prototype );\n  MapBrowserPointerEvent.prototype.constructor = MapBrowserPointerEvent;\n\n  return MapBrowserPointerEvent;\n}(MapBrowserEvent));\n\nexport default MapBrowserPointerEvent;\n\n//# sourceMappingURL=MapBrowserPointerEvent.js.map","/**\n * @module ol/pointer/EventType\n */\n\n/**\n * Constants for event names.\n * @enum {string}\n */\nexport default {\n  POINTERMOVE: 'pointermove',\n  POINTERDOWN: 'pointerdown',\n  POINTERUP: 'pointerup',\n  POINTEROVER: 'pointerover',\n  POINTEROUT: 'pointerout',\n  POINTERENTER: 'pointerenter',\n  POINTERLEAVE: 'pointerleave',\n  POINTERCANCEL: 'pointercancel'\n};\n\n//# sourceMappingURL=EventType.js.map","/**\n * @module ol/pointer/EventSource\n */\n\nvar EventSource = function EventSource(dispatcher, mapping) {\n\n  /**\n   * @type {import(\"./PointerEventHandler.js\").default}\n   */\n  this.dispatcher = dispatcher;\n\n  /**\n   * @private\n   * @const\n   * @type {!Object<string, function(Event)>}\n   */\n  this.mapping_ = mapping;\n};\n\n/**\n * List of events supported by this source.\n * @return {Array<string>} Event names\n */\nEventSource.prototype.getEvents = function getEvents () {\n  return Object.keys(this.mapping_);\n};\n\n/**\n * Returns the handler that should handle a given event type.\n * @param {string} eventType The event type.\n * @return {function(Event)} Handler\n */\nEventSource.prototype.getHandlerForEvent = function getHandlerForEvent (eventType) {\n  return this.mapping_[eventType];\n};\n\nexport default EventSource;\n\n//# sourceMappingURL=EventSource.js.map","/**\n * @module ol/pointer/MouseSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport EventSource from './EventSource.js';\n\n\n/**\n * @type {number}\n */\nexport var POINTER_ID = 1;\n\n\n/**\n * @type {string}\n */\nexport var POINTER_TYPE = 'mouse';\n\n\n/**\n * Radius around touchend that swallows mouse events.\n *\n * @type {number}\n */\nvar DEDUP_DIST = 25;\n\n/**\n * Handler for `mousedown`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousedown(inEvent) {\n  if (!this.isEventSimulatedFromTouch_(inEvent)) {\n    // TODO(dfreedman) workaround for some elements not sending mouseup\n    // http://crbug/149091\n    if (POINTER_ID.toString() in this.pointerMap) {\n      this.cancel(inEvent);\n    }\n    var e = prepareEvent(inEvent, this.dispatcher);\n    this.pointerMap[POINTER_ID.toString()] = inEvent;\n    this.dispatcher.down(e, inEvent);\n  }\n}\n\n/**\n * Handler for `mousemove`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mousemove(inEvent) {\n  if (!this.isEventSimulatedFromTouch_(inEvent)) {\n    var e = prepareEvent(inEvent, this.dispatcher);\n    this.dispatcher.move(e, inEvent);\n  }\n}\n\n/**\n * Handler for `mouseup`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseup(inEvent) {\n  if (!this.isEventSimulatedFromTouch_(inEvent)) {\n    var p = this.pointerMap[POINTER_ID.toString()];\n\n    if (p && p.button === inEvent.button) {\n      var e = prepareEvent(inEvent, this.dispatcher);\n      this.dispatcher.up(e, inEvent);\n      this.cleanupMouse();\n    }\n  }\n}\n\n/**\n * Handler for `mouseover`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseover(inEvent) {\n  if (!this.isEventSimulatedFromTouch_(inEvent)) {\n    var e = prepareEvent(inEvent, this.dispatcher);\n    this.dispatcher.enterOver(e, inEvent);\n  }\n}\n\n/**\n * Handler for `mouseout`.\n *\n * @this {MouseSource}\n * @param {MouseEvent} inEvent The in event.\n */\nfunction mouseout(inEvent) {\n  if (!this.isEventSimulatedFromTouch_(inEvent)) {\n    var e = prepareEvent(inEvent, this.dispatcher);\n    this.dispatcher.leaveOut(e, inEvent);\n  }\n}\n\n\nvar MouseSource = /*@__PURE__*/(function (EventSource) {\n  function MouseSource(dispatcher) {\n    var mapping = {\n      'mousedown': mousedown,\n      'mousemove': mousemove,\n      'mouseup': mouseup,\n      'mouseover': mouseover,\n      'mouseout': mouseout\n    };\n    EventSource.call(this, dispatcher, mapping);\n\n    /**\n     * @const\n     * @type {!Object<string, Event|Object>}\n     */\n    this.pointerMap = dispatcher.pointerMap;\n\n    /**\n     * @const\n     * @type {Array<import(\"../pixel.js\").Pixel>}\n     */\n    this.lastTouches = [];\n  }\n\n  if ( EventSource ) MouseSource.__proto__ = EventSource;\n  MouseSource.prototype = Object.create( EventSource && EventSource.prototype );\n  MouseSource.prototype.constructor = MouseSource;\n\n  /**\n   * Detect if a mouse event was simulated from a touch by\n   * checking if previously there was a touch event at the\n   * same position.\n   *\n   * FIXME - Known problem with the native Android browser on\n   * Samsung GT-I9100 (Android 4.1.2):\n   * In case the page is scrolled, this function does not work\n   * correctly when a canvas is used (WebGL or canvas renderer).\n   * Mouse listeners on canvas elements (for this browser), create\n   * two mouse events: One 'good' and one 'bad' one (on other browsers or\n   * when a div is used, there is only one event). For the 'bad' one,\n   * clientX/clientY and also pageX/pageY are wrong when the page\n   * is scrolled. Because of that, this function can not detect if\n   * the events were simulated from a touch event. As result, a\n   * pointer event at a wrong position is dispatched, which confuses\n   * the map interactions.\n   * It is unclear, how one can get the correct position for the event\n   * or detect that the positions are invalid.\n   *\n   * @private\n   * @param {MouseEvent} inEvent The in event.\n   * @return {boolean} True, if the event was generated by a touch.\n   */\n  MouseSource.prototype.isEventSimulatedFromTouch_ = function isEventSimulatedFromTouch_ (inEvent) {\n    var lts = this.lastTouches;\n    var x = inEvent.clientX;\n    var y = inEvent.clientY;\n    for (var i = 0, l = lts.length, t = (void 0); i < l && (t = lts[i]); i++) {\n      // simulated mouse events will be swallowed near a primary touchend\n      var dx = Math.abs(x - t[0]);\n      var dy = Math.abs(y - t[1]);\n      if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * Dispatches a `pointercancel` event.\n   *\n   * @param {Event} inEvent The in event.\n   */\n  MouseSource.prototype.cancel = function cancel (inEvent) {\n    var e = prepareEvent(inEvent, this.dispatcher);\n    this.dispatcher.cancel(e, inEvent);\n    this.cleanupMouse();\n  };\n\n  /**\n   * Remove the mouse from the list of active pointers.\n   */\n  MouseSource.prototype.cleanupMouse = function cleanupMouse () {\n    delete this.pointerMap[POINTER_ID.toString()];\n  };\n\n  return MouseSource;\n}(EventSource));\n\n\n/**\n * Creates a copy of the original event that will be used\n * for the fake pointer event.\n *\n * @param {Event} inEvent The in event.\n * @param {import(\"./PointerEventHandler.js\").default} dispatcher Event handler.\n * @return {Object} The copied event.\n */\nexport function prepareEvent(inEvent, dispatcher) {\n  var e = dispatcher.cloneEvent(inEvent, inEvent);\n\n  // forward mouse preventDefault\n  var pd = e.preventDefault;\n  e.preventDefault = function() {\n    inEvent.preventDefault();\n    pd();\n  };\n\n  e.pointerId = POINTER_ID;\n  e.isPrimary = true;\n  e.pointerType = POINTER_TYPE;\n\n  return e;\n}\n\n\nexport default MouseSource;\n\n//# sourceMappingURL=MouseSource.js.map","/**\n * @module ol/pointer/MsSource\n */\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport EventSource from './EventSource.js';\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar POINTER_TYPES = [\n  '',\n  'unavailable',\n  'touch',\n  'pen',\n  'mouse'\n];\n\n/**\n * Handler for `msPointerDown`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerDown(inEvent) {\n  this.pointerMap[inEvent.pointerId.toString()] = inEvent;\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.down(e, inEvent);\n}\n\n/**\n * Handler for `msPointerMove`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerMove(inEvent) {\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.move(e, inEvent);\n}\n\n/**\n * Handler for `msPointerUp`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerUp(inEvent) {\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.up(e, inEvent);\n  this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msPointerOut`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOut(inEvent) {\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.leaveOut(e, inEvent);\n}\n\n/**\n * Handler for `msPointerOver`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerOver(inEvent) {\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.enterOver(e, inEvent);\n}\n\n/**\n * Handler for `msPointerCancel`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msPointerCancel(inEvent) {\n  var e = this.prepareEvent_(inEvent);\n  this.dispatcher.cancel(e, inEvent);\n  this.cleanup(inEvent.pointerId);\n}\n\n/**\n * Handler for `msLostPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msLostPointerCapture(inEvent) {\n  var e = this.dispatcher.makeEvent('lostpointercapture', inEvent, inEvent);\n  this.dispatcher.dispatchEvent(e);\n}\n\n/**\n * Handler for `msGotPointerCapture`.\n *\n * @this {MsSource}\n * @param {MSPointerEvent} inEvent The in event.\n */\nfunction msGotPointerCapture(inEvent) {\n  var e = this.dispatcher.makeEvent('gotpointercapture', inEvent, inEvent);\n  this.dispatcher.dispatchEvent(e);\n}\n\nvar MsSource = /*@__PURE__*/(function (EventSource) {\n  function MsSource(dispatcher) {\n    var mapping = {\n      'MSPointerDown': msPointerDown,\n      'MSPointerMove': msPointerMove,\n      'MSPointerUp': msPointerUp,\n      'MSPointerOut': msPointerOut,\n      'MSPointerOver': msPointerOver,\n      'MSPointerCancel': msPointerCancel,\n      'MSGotPointerCapture': msGotPointerCapture,\n      'MSLostPointerCapture': msLostPointerCapture\n    };\n    EventSource.call(this, dispatcher, mapping);\n\n    /**\n     * @const\n     * @type {!Object<string, MSPointerEvent|Object>}\n     */\n    this.pointerMap = dispatcher.pointerMap;\n  }\n\n  if ( EventSource ) MsSource.__proto__ = EventSource;\n  MsSource.prototype = Object.create( EventSource && EventSource.prototype );\n  MsSource.prototype.constructor = MsSource;\n\n  /**\n   * Creates a copy of the original event that will be used\n   * for the fake pointer event.\n   *\n   * @private\n   * @param {MSPointerEvent} inEvent The in event.\n   * @return {Object} The copied event.\n   */\n  MsSource.prototype.prepareEvent_ = function prepareEvent_ (inEvent) {\n    /** @type {MSPointerEvent|Object} */\n    var e = inEvent;\n    if (typeof inEvent.pointerType === 'number') {\n      e = this.dispatcher.cloneEvent(inEvent, inEvent);\n      e.pointerType = POINTER_TYPES[inEvent.pointerType];\n    }\n\n    return e;\n  };\n\n  /**\n   * Remove this pointer from the list of active pointers.\n   * @param {number} pointerId Pointer identifier.\n   */\n  MsSource.prototype.cleanup = function cleanup (pointerId) {\n    delete this.pointerMap[pointerId.toString()];\n  };\n\n  return MsSource;\n}(EventSource));\n\nexport default MsSource;\n\n//# sourceMappingURL=MsSource.js.map","/**\n * @module ol/pointer/NativeSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport EventSource from './EventSource.js';\n\n/**\n * Handler for `pointerdown`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerDown(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointermove`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerMove(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerup`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerUp(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerout`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOut(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointerover`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerOver(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `pointercancel`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction pointerCancel(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `lostpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction lostPointerCapture(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\n/**\n * Handler for `gotpointercapture`.\n *\n * @this {NativeSource}\n * @param {Event} inEvent The in event.\n */\nfunction gotPointerCapture(inEvent) {\n  this.dispatcher.fireNativeEvent(inEvent);\n}\n\nvar NativeSource = /*@__PURE__*/(function (EventSource) {\n  function NativeSource(dispatcher) {\n    var mapping = {\n      'pointerdown': pointerDown,\n      'pointermove': pointerMove,\n      'pointerup': pointerUp,\n      'pointerout': pointerOut,\n      'pointerover': pointerOver,\n      'pointercancel': pointerCancel,\n      'gotpointercapture': gotPointerCapture,\n      'lostpointercapture': lostPointerCapture\n    };\n    EventSource.call(this, dispatcher, mapping);\n  }\n\n  if ( EventSource ) NativeSource.__proto__ = EventSource;\n  NativeSource.prototype = Object.create( EventSource && EventSource.prototype );\n  NativeSource.prototype.constructor = NativeSource;\n\n  return NativeSource;\n}(EventSource));\n\nexport default NativeSource;\n\n//# sourceMappingURL=NativeSource.js.map","/**\n * @module ol/pointer/PointerEvent\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport _Event from '../events/Event.js';\n\n\n/**\n * Is the `buttons` property supported?\n * @type {boolean}\n */\nvar HAS_BUTTONS = false;\n\n\nvar PointerEvent = /*@__PURE__*/(function (_Event) {\n  function PointerEvent(type, originalEvent, opt_eventDict) {\n    _Event.call(this, type);\n\n    /**\n     * @const\n     * @type {Event}\n     */\n    this.originalEvent = originalEvent;\n\n    var eventDict = opt_eventDict ? opt_eventDict : {};\n\n    /**\n     * @type {number}\n     */\n    this.buttons = getButtons(eventDict);\n\n    /**\n     * @type {number}\n     */\n    this.pressure = getPressure(eventDict, this.buttons);\n\n    // MouseEvent related properties\n\n    /**\n     * @type {boolean}\n     */\n    this.bubbles = 'bubbles' in eventDict ? eventDict['bubbles'] : false;\n\n    /**\n     * @type {boolean}\n     */\n    this.cancelable = 'cancelable' in eventDict ? eventDict['cancelable'] : false;\n\n    /**\n     * @type {Object}\n     */\n    this.view = 'view' in eventDict ? eventDict['view'] : null;\n\n    /**\n     * @type {number}\n     */\n    this.detail = 'detail' in eventDict ? eventDict['detail'] : null;\n\n    /**\n     * @type {number}\n     */\n    this.screenX = 'screenX' in eventDict ? eventDict['screenX'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.screenY = 'screenY' in eventDict ? eventDict['screenY'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.clientX = 'clientX' in eventDict ? eventDict['clientX'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.clientY = 'clientY' in eventDict ? eventDict['clientY'] : 0;\n\n    /**\n     * @type {boolean}\n     */\n    this.ctrlKey = 'ctrlKey' in eventDict ? eventDict['ctrlKey'] : false;\n\n    /**\n     * @type {boolean}\n     */\n    this.altKey = 'altKey' in eventDict ? eventDict['altKey'] : false;\n\n    /**\n     * @type {boolean}\n     */\n    this.shiftKey = 'shiftKey' in eventDict ? eventDict['shiftKey'] : false;\n\n    /**\n     * @type {boolean}\n     */\n    this.metaKey = 'metaKey' in eventDict ? eventDict['metaKey'] : false;\n\n    /**\n     * @type {number}\n     */\n    this.button = 'button' in eventDict ? eventDict['button'] : 0;\n\n    /**\n     * @type {Node}\n     */\n    this.relatedTarget = 'relatedTarget' in eventDict ?\n      eventDict['relatedTarget'] : null;\n\n    // PointerEvent related properties\n\n    /**\n     * @const\n     * @type {number}\n     */\n    this.pointerId = 'pointerId' in eventDict ? eventDict['pointerId'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.width = 'width' in eventDict ? eventDict['width'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.height = 'height' in eventDict ? eventDict['height'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.tiltX = 'tiltX' in eventDict ? eventDict['tiltX'] : 0;\n\n    /**\n     * @type {number}\n     */\n    this.tiltY = 'tiltY' in eventDict ? eventDict['tiltY'] : 0;\n\n    /**\n     * @type {string}\n     */\n    this.pointerType = 'pointerType' in eventDict ? eventDict['pointerType'] : '';\n\n    /**\n     * @type {number}\n     */\n    this.hwTimestamp = 'hwTimestamp' in eventDict ? eventDict['hwTimestamp'] : 0;\n\n    /**\n     * @type {boolean}\n     */\n    this.isPrimary = 'isPrimary' in eventDict ? eventDict['isPrimary'] : false;\n\n    // keep the semantics of preventDefault\n    if (originalEvent.preventDefault) {\n      this.preventDefault = function() {\n        originalEvent.preventDefault();\n      };\n    }\n  }\n\n  if ( _Event ) PointerEvent.__proto__ = _Event;\n  PointerEvent.prototype = Object.create( _Event && _Event.prototype );\n  PointerEvent.prototype.constructor = PointerEvent;\n\n  return PointerEvent;\n}(_Event));\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @return {number} Button indicator.\n */\nfunction getButtons(eventDict) {\n  // According to the w3c spec,\n  // http://www.w3.org/TR/DOM-Level-3-Events/#events-MouseEvent-button\n  // MouseEvent.button == 0 can mean either no mouse button depressed, or the\n  // left mouse button depressed.\n  //\n  // As of now, the only way to distinguish between the two states of\n  // MouseEvent.button is by using the deprecated MouseEvent.which property, as\n  // this maps mouse buttons to positive integers > 0, and uses 0 to mean that\n  // no mouse button is held.\n  //\n  // MouseEvent.which is derived from MouseEvent.button at MouseEvent creation,\n  // but initMouseEvent does not expose an argument with which to set\n  // MouseEvent.which. Calling initMouseEvent with a buttonArg of 0 will set\n  // MouseEvent.button == 0 and MouseEvent.which == 1, breaking the expectations\n  // of app developers.\n  //\n  // The only way to propagate the correct state of MouseEvent.which and\n  // MouseEvent.button to a new MouseEvent.button == 0 and MouseEvent.which == 0\n  // is to call initMouseEvent with a buttonArg value of -1.\n  //\n  // This is fixed with DOM Level 4's use of buttons\n  var buttons;\n  if (eventDict.buttons || HAS_BUTTONS) {\n    buttons = eventDict.buttons;\n  } else {\n    switch (eventDict.which) {\n      case 1: buttons = 1; break;\n      case 2: buttons = 4; break;\n      case 3: buttons = 2; break;\n      default: buttons = 0;\n    }\n  }\n  return buttons;\n}\n\n\n/**\n * @param {Object<string, ?>} eventDict The event dictionary.\n * @param {number} buttons Button indicator.\n * @return {number} The pressure.\n */\nfunction getPressure(eventDict, buttons) {\n  // Spec requires that pointers without pressure specified use 0.5 for down\n  // state and 0 for up state.\n  var pressure = 0;\n  if (eventDict.pressure) {\n    pressure = eventDict.pressure;\n  } else {\n    pressure = buttons ? 0.5 : 0;\n  }\n  return pressure;\n}\n\n\n/**\n * Checks if the `buttons` property is supported.\n */\n(function() {\n  try {\n    var ev = new MouseEvent('click', {buttons: 1});\n    HAS_BUTTONS = ev.buttons === 1;\n  } catch (e) {\n    // pass\n  }\n})();\n\nexport default PointerEvent;\n\n//# sourceMappingURL=PointerEvent.js.map","/**\n * @module ol/pointer/TouchSource\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport {remove} from '../array.js';\nimport EventSource from './EventSource.js';\nimport {POINTER_ID} from './MouseSource.js';\n\n\n/**\n * @type {number}\n */\nvar CLICK_COUNT_TIMEOUT = 200;\n\n/**\n * @type {string}\n */\nvar POINTER_TYPE = 'touch';\n\n/**\n * Handler for `touchstart`, triggers `pointerover`,\n * `pointerenter` and `pointerdown` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchstart(inEvent) {\n  this.vacuumTouches_(inEvent);\n  this.setPrimaryTouch_(inEvent.changedTouches[0]);\n  this.dedupSynthMouse_(inEvent);\n  this.clickCount_++;\n  this.processTouches_(inEvent, this.overDown_);\n}\n\n/**\n * Handler for `touchmove`.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchmove(inEvent) {\n  this.processTouches_(inEvent, this.moveOverOut_);\n}\n\n/**\n * Handler for `touchend`, triggers `pointerup`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The event.\n */\nfunction touchend(inEvent) {\n  this.dedupSynthMouse_(inEvent);\n  this.processTouches_(inEvent, this.upOut_);\n}\n\n/**\n * Handler for `touchcancel`, triggers `pointercancel`,\n * `pointerout` and `pointerleave` events.\n *\n * @this {TouchSource}\n * @param {TouchEvent} inEvent The in event.\n */\nfunction touchcancel(inEvent) {\n  this.processTouches_(inEvent, this.cancelOut_);\n}\n\n\nvar TouchSource = /*@__PURE__*/(function (EventSource) {\n  function TouchSource(dispatcher, mouseSource) {\n    var mapping = {\n      'touchstart': touchstart,\n      'touchmove': touchmove,\n      'touchend': touchend,\n      'touchcancel': touchcancel\n    };\n    EventSource.call(this, dispatcher, mapping);\n\n    /**\n     * @const\n     * @type {!Object<string, Event|Object>}\n     */\n    this.pointerMap = dispatcher.pointerMap;\n\n    /**\n     * @const\n     * @type {import(\"./MouseSource.js\").default}\n     */\n    this.mouseSource = mouseSource;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.firstTouchId_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.clickCount_ = 0;\n\n    /**\n     * @private\n     * @type {?}\n     */\n    this.resetId_;\n\n    /**\n     * Mouse event timeout: This should be long enough to\n     * ignore compat mouse events made by touch.\n     * @private\n     * @type {number}\n     */\n    this.dedupTimeout_ = 2500;\n  }\n\n  if ( EventSource ) TouchSource.__proto__ = EventSource;\n  TouchSource.prototype = Object.create( EventSource && EventSource.prototype );\n  TouchSource.prototype.constructor = TouchSource;\n\n  /**\n   * @private\n   * @param {Touch} inTouch The in touch.\n   * @return {boolean} True, if this is the primary touch.\n   */\n  TouchSource.prototype.isPrimaryTouch_ = function isPrimaryTouch_ (inTouch) {\n    return this.firstTouchId_ === inTouch.identifier;\n  };\n\n  /**\n   * Set primary touch if there are no pointers, or the only pointer is the mouse.\n   * @param {Touch} inTouch The in touch.\n   * @private\n   */\n  TouchSource.prototype.setPrimaryTouch_ = function setPrimaryTouch_ (inTouch) {\n    var count = Object.keys(this.pointerMap).length;\n    if (count === 0 || (count === 1 && POINTER_ID.toString() in this.pointerMap)) {\n      this.firstTouchId_ = inTouch.identifier;\n      this.cancelResetClickCount_();\n    }\n  };\n\n  /**\n   * @private\n   * @param {PointerEvent} inPointer The in pointer object.\n   */\n  TouchSource.prototype.removePrimaryPointer_ = function removePrimaryPointer_ (inPointer) {\n    if (inPointer.isPrimary) {\n      this.firstTouchId_ = undefined;\n      this.resetClickCount_();\n    }\n  };\n\n  /**\n   * @private\n   */\n  TouchSource.prototype.resetClickCount_ = function resetClickCount_ () {\n    this.resetId_ = setTimeout(\n      this.resetClickCountHandler_.bind(this),\n      CLICK_COUNT_TIMEOUT);\n  };\n\n  /**\n   * @private\n   */\n  TouchSource.prototype.resetClickCountHandler_ = function resetClickCountHandler_ () {\n    this.clickCount_ = 0;\n    this.resetId_ = undefined;\n  };\n\n  /**\n   * @private\n   */\n  TouchSource.prototype.cancelResetClickCount_ = function cancelResetClickCount_ () {\n    if (this.resetId_ !== undefined) {\n      clearTimeout(this.resetId_);\n    }\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} browserEvent Browser event\n   * @param {Touch} inTouch Touch event\n   * @return {PointerEvent} A pointer object.\n   */\n  TouchSource.prototype.touchToPointer_ = function touchToPointer_ (browserEvent, inTouch) {\n    var e = this.dispatcher.cloneEvent(browserEvent, inTouch);\n    // Spec specifies that pointerId 1 is reserved for Mouse.\n    // Touch identifiers can start at 0.\n    // Add 2 to the touch identifier for compatibility.\n    e.pointerId = inTouch.identifier + 2;\n    // TODO: check if this is necessary?\n    //e.target = findTarget(e);\n    e.bubbles = true;\n    e.cancelable = true;\n    e.detail = this.clickCount_;\n    e.button = 0;\n    e.buttons = 1;\n    e.width = inTouch.radiusX || 0;\n    e.height = inTouch.radiusY || 0;\n    e.pressure = inTouch.force || 0.5;\n    e.isPrimary = this.isPrimaryTouch_(inTouch);\n    e.pointerType = POINTER_TYPE;\n\n    // make sure that the properties that are different for\n    // each `Touch` object are not copied from the BrowserEvent object\n    e.clientX = inTouch.clientX;\n    e.clientY = inTouch.clientY;\n    e.screenX = inTouch.screenX;\n    e.screenY = inTouch.screenY;\n\n    return e;\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} inEvent Touch event\n   * @param {function(TouchEvent, PointerEvent)} inFunction In function.\n   */\n  TouchSource.prototype.processTouches_ = function processTouches_ (inEvent, inFunction) {\n    var touches = Array.prototype.slice.call(inEvent.changedTouches);\n    var count = touches.length;\n    function preventDefault() {\n      inEvent.preventDefault();\n    }\n    for (var i = 0; i < count; ++i) {\n      var pointer = this.touchToPointer_(inEvent, touches[i]);\n      // forward touch preventDefaults\n      pointer.preventDefault = preventDefault;\n      inFunction.call(this, inEvent, pointer);\n    }\n  };\n\n  /**\n   * @private\n   * @param {TouchList} touchList The touch list.\n   * @param {number} searchId Search identifier.\n   * @return {boolean} True, if the `Touch` with the given id is in the list.\n   */\n  TouchSource.prototype.findTouch_ = function findTouch_ (touchList, searchId) {\n    var l = touchList.length;\n    for (var i = 0; i < l; i++) {\n      var touch = touchList[i];\n      if (touch.identifier === searchId) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * In some instances, a touchstart can happen without a touchend. This\n   * leaves the pointermap in a broken state.\n   * Therefore, on every touchstart, we remove the touches that did not fire a\n   * touchend event.\n   * To keep state globally consistent, we fire a pointercancel for\n   * this \"abandoned\" touch\n   *\n   * @private\n   * @param {TouchEvent} inEvent The in event.\n   */\n  TouchSource.prototype.vacuumTouches_ = function vacuumTouches_ (inEvent) {\n    var touchList = inEvent.touches;\n    // pointerMap.getCount() should be < touchList.length here,\n    // as the touchstart has not been processed yet.\n    var keys = Object.keys(this.pointerMap);\n    var count = keys.length;\n    if (count >= touchList.length) {\n      var d = [];\n      for (var i = 0; i < count; ++i) {\n        var key = Number(keys[i]);\n        var value = this.pointerMap[key];\n        // Never remove pointerId == 1, which is mouse.\n        // Touch identifiers are 2 smaller than their pointerId, which is the\n        // index in pointermap.\n        if (key != POINTER_ID && !this.findTouch_(touchList, key - 2)) {\n          d.push(value.out);\n        }\n      }\n      for (var i$1 = 0; i$1 < d.length; ++i$1) {\n        this.cancelOut_(inEvent, d[i$1]);\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} browserEvent The event.\n   * @param {PointerEvent} inPointer The in pointer object.\n   */\n  TouchSource.prototype.overDown_ = function overDown_ (browserEvent, inPointer) {\n    this.pointerMap[inPointer.pointerId] = {\n      target: inPointer.target,\n      out: inPointer,\n      outTarget: inPointer.target\n    };\n    this.dispatcher.over(inPointer, browserEvent);\n    this.dispatcher.enter(inPointer, browserEvent);\n    this.dispatcher.down(inPointer, browserEvent);\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} browserEvent The event.\n   * @param {PointerEvent} inPointer The in pointer.\n   */\n  TouchSource.prototype.moveOverOut_ = function moveOverOut_ (browserEvent, inPointer) {\n    var event = inPointer;\n    var pointer = this.pointerMap[event.pointerId];\n    // a finger drifted off the screen, ignore it\n    if (!pointer) {\n      return;\n    }\n    var outEvent = pointer.out;\n    var outTarget = pointer.outTarget;\n    this.dispatcher.move(event, browserEvent);\n    if (outEvent && outTarget !== event.target) {\n      outEvent.relatedTarget = event.target;\n      /** @type {Object} */ (event).relatedTarget = outTarget;\n      // recover from retargeting by shadow\n      outEvent.target = outTarget;\n      if (event.target) {\n        this.dispatcher.leaveOut(outEvent, browserEvent);\n        this.dispatcher.enterOver(event, browserEvent);\n      } else {\n        // clean up case when finger leaves the screen\n        /** @type {Object} */ (event).target = outTarget;\n        /** @type {Object} */ (event).relatedTarget = null;\n        this.cancelOut_(browserEvent, event);\n      }\n    }\n    pointer.out = event;\n    pointer.outTarget = event.target;\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} browserEvent An event.\n   * @param {PointerEvent} inPointer The inPointer object.\n   */\n  TouchSource.prototype.upOut_ = function upOut_ (browserEvent, inPointer) {\n    this.dispatcher.up(inPointer, browserEvent);\n    this.dispatcher.out(inPointer, browserEvent);\n    this.dispatcher.leave(inPointer, browserEvent);\n    this.cleanUpPointer_(inPointer);\n  };\n\n  /**\n   * @private\n   * @param {TouchEvent} browserEvent The event.\n   * @param {PointerEvent} inPointer The in pointer.\n   */\n  TouchSource.prototype.cancelOut_ = function cancelOut_ (browserEvent, inPointer) {\n    this.dispatcher.cancel(inPointer, browserEvent);\n    this.dispatcher.out(inPointer, browserEvent);\n    this.dispatcher.leave(inPointer, browserEvent);\n    this.cleanUpPointer_(inPointer);\n  };\n\n  /**\n   * @private\n   * @param {PointerEvent} inPointer The inPointer object.\n   */\n  TouchSource.prototype.cleanUpPointer_ = function cleanUpPointer_ (inPointer) {\n    delete this.pointerMap[inPointer.pointerId];\n    this.removePrimaryPointer_(inPointer);\n  };\n\n  /**\n   * Prevent synth mouse events from creating pointer events.\n   *\n   * @private\n   * @param {TouchEvent} inEvent The in event.\n   */\n  TouchSource.prototype.dedupSynthMouse_ = function dedupSynthMouse_ (inEvent) {\n    var lts = this.mouseSource.lastTouches;\n    var t = inEvent.changedTouches[0];\n    // only the primary finger will synth mouse events\n    if (this.isPrimaryTouch_(t)) {\n      // remember x/y of last touch\n      var lt = [t.clientX, t.clientY];\n      lts.push(lt);\n\n      setTimeout(function() {\n        // remove touch after timeout\n        remove(lts, lt);\n      }, this.dedupTimeout_);\n    }\n  };\n\n  return TouchSource;\n}(EventSource));\n\nexport default TouchSource;\n\n//# sourceMappingURL=TouchSource.js.map","/**\n * @module ol/pointer/PointerEventHandler\n */\n\n// Based on https://github.com/Polymer/PointerEvents\n\n// Copyright (c) 2013 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nimport {listen, unlisten} from '../events.js';\nimport EventTarget from '../events/Target.js';\nimport {POINTER, MSPOINTER, TOUCH} from '../has.js';\nimport PointerEventType from './EventType.js';\nimport MouseSource, {prepareEvent as prepareMouseEvent} from './MouseSource.js';\nimport MsSource from './MsSource.js';\nimport NativeSource from './NativeSource.js';\nimport PointerEvent from './PointerEvent.js';\nimport TouchSource from './TouchSource.js';\n\n\n/**\n * Properties to copy when cloning an event, with default values.\n * @type {Array<Array>}\n */\nvar CLONE_PROPS = [\n  // MouseEvent\n  ['bubbles', false],\n  ['cancelable', false],\n  ['view', null],\n  ['detail', null],\n  ['screenX', 0],\n  ['screenY', 0],\n  ['clientX', 0],\n  ['clientY', 0],\n  ['ctrlKey', false],\n  ['altKey', false],\n  ['shiftKey', false],\n  ['metaKey', false],\n  ['button', 0],\n  ['relatedTarget', null],\n  // DOM Level 3\n  ['buttons', 0],\n  // PointerEvent\n  ['pointerId', 0],\n  ['width', 0],\n  ['height', 0],\n  ['pressure', 0],\n  ['tiltX', 0],\n  ['tiltY', 0],\n  ['pointerType', ''],\n  ['hwTimestamp', 0],\n  ['isPrimary', false],\n  // event instance\n  ['type', ''],\n  ['target', null],\n  ['currentTarget', null],\n  ['which', 0]\n];\n\n\nvar PointerEventHandler = /*@__PURE__*/(function (EventTarget) {\n  function PointerEventHandler(element) {\n    EventTarget.call(this);\n\n    /**\n     * @const\n     * @private\n     * @type {Element|HTMLDocument}\n     */\n    this.element_ = element;\n\n    /**\n     * @const\n     * @type {!Object<string, Event|Object>}\n     */\n    this.pointerMap = {};\n\n    /**\n     * @type {Object<string, function(Event)>}\n     * @private\n     */\n    this.eventMap_ = {};\n\n    /**\n     * @type {Array<import(\"./EventSource.js\").default>}\n     * @private\n     */\n    this.eventSourceList_ = [];\n\n    this.registerSources();\n  }\n\n  if ( EventTarget ) PointerEventHandler.__proto__ = EventTarget;\n  PointerEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n  PointerEventHandler.prototype.constructor = PointerEventHandler;\n\n  /**\n   * Set up the event sources (mouse, touch and native pointers)\n   * that generate pointer events.\n   */\n  PointerEventHandler.prototype.registerSources = function registerSources () {\n    if (POINTER) {\n      this.registerSource('native', new NativeSource(this));\n    } else if (MSPOINTER) {\n      this.registerSource('ms', new MsSource(this));\n    } else {\n      var mouseSource = new MouseSource(this);\n      this.registerSource('mouse', mouseSource);\n\n      if (TOUCH) {\n        this.registerSource('touch', new TouchSource(this, mouseSource));\n      }\n    }\n\n    // register events on the viewport element\n    this.register_();\n  };\n\n  /**\n   * Add a new event source that will generate pointer events.\n   *\n   * @param {string} name A name for the event source\n   * @param {import(\"./EventSource.js\").default} source The source event.\n   */\n  PointerEventHandler.prototype.registerSource = function registerSource (name, source) {\n    var s = source;\n    var newEvents = s.getEvents();\n\n    if (newEvents) {\n      newEvents.forEach(function(e) {\n        var handler = s.getHandlerForEvent(e);\n\n        if (handler) {\n          this.eventMap_[e] = handler.bind(s);\n        }\n      }.bind(this));\n      this.eventSourceList_.push(s);\n    }\n  };\n\n  /**\n   * Set up the events for all registered event sources.\n   * @private\n   */\n  PointerEventHandler.prototype.register_ = function register_ () {\n    var l = this.eventSourceList_.length;\n    for (var i = 0; i < l; i++) {\n      var eventSource = this.eventSourceList_[i];\n      this.addEvents_(eventSource.getEvents());\n    }\n  };\n\n  /**\n   * Remove all registered events.\n   * @private\n   */\n  PointerEventHandler.prototype.unregister_ = function unregister_ () {\n    var l = this.eventSourceList_.length;\n    for (var i = 0; i < l; i++) {\n      var eventSource = this.eventSourceList_[i];\n      this.removeEvents_(eventSource.getEvents());\n    }\n  };\n\n  /**\n   * Calls the right handler for a new event.\n   * @private\n   * @param {Event} inEvent Browser event.\n   */\n  PointerEventHandler.prototype.eventHandler_ = function eventHandler_ (inEvent) {\n    var type = inEvent.type;\n    var handler = this.eventMap_[type];\n    if (handler) {\n      handler(inEvent);\n    }\n  };\n\n  /**\n   * Setup listeners for the given events.\n   * @private\n   * @param {Array<string>} events List of events.\n   */\n  PointerEventHandler.prototype.addEvents_ = function addEvents_ (events) {\n    events.forEach(function(eventName) {\n      listen(this.element_, eventName, this.eventHandler_, this);\n    }.bind(this));\n  };\n\n  /**\n   * Unregister listeners for the given events.\n   * @private\n   * @param {Array<string>} events List of events.\n   */\n  PointerEventHandler.prototype.removeEvents_ = function removeEvents_ (events) {\n    events.forEach(function(e) {\n      unlisten(this.element_, e, this.eventHandler_, this);\n    }.bind(this));\n  };\n\n  /**\n   * Returns a snapshot of inEvent, with writable properties.\n   *\n   * @param {Event} event Browser event.\n   * @param {Event|Touch} inEvent An event that contains\n   *    properties to copy.\n   * @return {Object} An object containing shallow copies of\n   *    `inEvent`'s properties.\n   */\n  PointerEventHandler.prototype.cloneEvent = function cloneEvent (event, inEvent) {\n    var eventCopy = {};\n    for (var i = 0, ii = CLONE_PROPS.length; i < ii; i++) {\n      var p = CLONE_PROPS[i][0];\n      eventCopy[p] = event[p] || inEvent[p] || CLONE_PROPS[i][1];\n    }\n\n    return eventCopy;\n  };\n\n  // EVENTS\n\n\n  /**\n   * Triggers a 'pointerdown' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.down = function down (data, event) {\n    this.fireEvent(PointerEventType.POINTERDOWN, data, event);\n  };\n\n  /**\n   * Triggers a 'pointermove' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.move = function move (data, event) {\n    this.fireEvent(PointerEventType.POINTERMOVE, data, event);\n  };\n\n  /**\n   * Triggers a 'pointerup' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.up = function up (data, event) {\n    this.fireEvent(PointerEventType.POINTERUP, data, event);\n  };\n\n  /**\n   * Triggers a 'pointerenter' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.enter = function enter (data, event) {\n    data.bubbles = false;\n    this.fireEvent(PointerEventType.POINTERENTER, data, event);\n  };\n\n  /**\n   * Triggers a 'pointerleave' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.leave = function leave (data, event) {\n    data.bubbles = false;\n    this.fireEvent(PointerEventType.POINTERLEAVE, data, event);\n  };\n\n  /**\n   * Triggers a 'pointerover' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.over = function over (data, event) {\n    data.bubbles = true;\n    this.fireEvent(PointerEventType.POINTEROVER, data, event);\n  };\n\n  /**\n   * Triggers a 'pointerout' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.out = function out (data, event) {\n    data.bubbles = true;\n    this.fireEvent(PointerEventType.POINTEROUT, data, event);\n  };\n\n  /**\n   * Triggers a 'pointercancel' event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.cancel = function cancel (data, event) {\n    this.fireEvent(PointerEventType.POINTERCANCEL, data, event);\n  };\n\n  /**\n   * Triggers a combination of 'pointerout' and 'pointerleave' events.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.leaveOut = function leaveOut (data, event) {\n    this.out(data, event);\n    if (!this.contains_(data.target, data.relatedTarget)) {\n      this.leave(data, event);\n    }\n  };\n\n  /**\n   * Triggers a combination of 'pointerover' and 'pointerevents' events.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.enterOver = function enterOver (data, event) {\n    this.over(data, event);\n    if (!this.contains_(data.target, data.relatedTarget)) {\n      this.enter(data, event);\n    }\n  };\n\n  /**\n   * @private\n   * @param {Element} container The container element.\n   * @param {Element} contained The contained element.\n   * @return {boolean} Returns true if the container element\n   *   contains the other element.\n   */\n  PointerEventHandler.prototype.contains_ = function contains_ (container, contained) {\n    if (!container || !contained) {\n      return false;\n    }\n    return container.contains(contained);\n  };\n\n  // EVENT CREATION AND TRACKING\n  /**\n   * Creates a new Event of type `inType`, based on the information in\n   * `data`.\n   *\n   * @param {string} inType A string representing the type of event to create.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   * @return {PointerEvent} A PointerEvent of type `inType`.\n   */\n  PointerEventHandler.prototype.makeEvent = function makeEvent (inType, data, event) {\n    return new PointerEvent(inType, event, data);\n  };\n\n  /**\n   * Make and dispatch an event in one call.\n   * @param {string} inType A string representing the type of event.\n   * @param {Object} data Pointer event data.\n   * @param {Event} event The event.\n   */\n  PointerEventHandler.prototype.fireEvent = function fireEvent (inType, data, event) {\n    var e = this.makeEvent(inType, data, event);\n    this.dispatchEvent(e);\n  };\n\n  /**\n   * Creates a pointer event from a native pointer event\n   * and dispatches this event.\n   * @param {Event} event A platform event with a target.\n   */\n  PointerEventHandler.prototype.fireNativeEvent = function fireNativeEvent (event) {\n    var e = this.makeEvent(event.type, event, event);\n    this.dispatchEvent(e);\n  };\n\n  /**\n   * Wrap a native mouse event into a pointer event.\n   * This proxy method is required for the legacy IE support.\n   * @param {string} eventType The pointer event type.\n   * @param {Event} event The event.\n   * @return {PointerEvent} The wrapped event.\n   */\n  PointerEventHandler.prototype.wrapMouseEvent = function wrapMouseEvent (eventType, event) {\n    var pointerEvent = this.makeEvent(\n      eventType, prepareMouseEvent(event, this), event);\n    return pointerEvent;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  PointerEventHandler.prototype.disposeInternal = function disposeInternal () {\n    this.unregister_();\n    EventTarget.prototype.disposeInternal.call(this);\n  };\n\n  return PointerEventHandler;\n}(EventTarget));\n\nexport default PointerEventHandler;\n\n//# sourceMappingURL=PointerEventHandler.js.map","/**\n * @module ol/MapBrowserEventHandler\n */\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapBrowserPointerEvent from './MapBrowserPointerEvent.js';\nimport {listen, unlistenByKey} from './events.js';\nimport EventTarget from './events/Target.js';\nimport PointerEventType from './pointer/EventType.js';\nimport PointerEventHandler from './pointer/PointerEventHandler.js';\n\nvar MapBrowserEventHandler = /*@__PURE__*/(function (EventTarget) {\n  function MapBrowserEventHandler(map, moveTolerance) {\n\n    EventTarget.call(this);\n\n    /**\n     * This is the element that we will listen to the real events on.\n     * @type {import(\"./PluggableMap.js\").default}\n     * @private\n     */\n    this.map_ = map;\n\n    /**\n     * @type {any}\n     * @private\n     */\n    this.clickTimeoutId_;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.dragging_ = false;\n\n    /**\n     * @type {!Array<import(\"./events.js\").EventsKey>}\n     * @private\n     */\n    this.dragListenerKeys_ = [];\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.moveTolerance_ = moveTolerance ?\n      moveTolerance * DEVICE_PIXEL_RATIO : DEVICE_PIXEL_RATIO;\n\n    /**\n     * The most recent \"down\" type event (or null if none have occurred).\n     * Set on pointerdown.\n     * @type {import(\"./pointer/PointerEvent.js\").default}\n     * @private\n     */\n    this.down_ = null;\n\n    var element = this.map_.getViewport();\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.activePointers_ = 0;\n\n    /**\n     * @type {!Object<number, boolean>}\n     * @private\n     */\n    this.trackedTouches_ = {};\n\n    /**\n     * Event handler which generates pointer events for\n     * the viewport element.\n     *\n     * @type {PointerEventHandler}\n     * @private\n     */\n    this.pointerEventHandler_ = new PointerEventHandler(element);\n\n    /**\n     * Event handler which generates pointer events for\n     * the document (used when dragging).\n     *\n     * @type {PointerEventHandler}\n     * @private\n     */\n    this.documentPointerEventHandler_ = null;\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey}\n     * @private\n     */\n    this.pointerdownListenerKey_ = listen(this.pointerEventHandler_,\n      PointerEventType.POINTERDOWN,\n      this.handlePointerDown_, this);\n\n    /**\n     * @type {?import(\"./events.js\").EventsKey}\n     * @private\n     */\n    this.relayedListenerKey_ = listen(this.pointerEventHandler_,\n      PointerEventType.POINTERMOVE,\n      this.relayEvent_, this);\n\n  }\n\n  if ( EventTarget ) MapBrowserEventHandler.__proto__ = EventTarget;\n  MapBrowserEventHandler.prototype = Object.create( EventTarget && EventTarget.prototype );\n  MapBrowserEventHandler.prototype.constructor = MapBrowserEventHandler;\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.emulateClick_ = function emulateClick_ (pointerEvent) {\n    var newEvent = new MapBrowserPointerEvent(\n      MapBrowserEventType.CLICK, this.map_, pointerEvent);\n    this.dispatchEvent(newEvent);\n    if (this.clickTimeoutId_ !== undefined) {\n      // double-click\n      clearTimeout(this.clickTimeoutId_);\n      this.clickTimeoutId_ = undefined;\n      newEvent = new MapBrowserPointerEvent(\n        MapBrowserEventType.DBLCLICK, this.map_, pointerEvent);\n      this.dispatchEvent(newEvent);\n    } else {\n      // click\n      this.clickTimeoutId_ = setTimeout(function() {\n        this.clickTimeoutId_ = undefined;\n        var newEvent = new MapBrowserPointerEvent(\n          MapBrowserEventType.SINGLECLICK, this.map_, pointerEvent);\n        this.dispatchEvent(newEvent);\n      }.bind(this), 250);\n    }\n  };\n\n  /**\n   * Keeps track on how many pointers are currently active.\n   *\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.updateActivePointers_ = function updateActivePointers_ (pointerEvent) {\n    var event = pointerEvent;\n\n    if (event.type == MapBrowserEventType.POINTERUP ||\n        event.type == MapBrowserEventType.POINTERCANCEL) {\n      delete this.trackedTouches_[event.pointerId];\n    } else if (event.type == MapBrowserEventType.POINTERDOWN) {\n      this.trackedTouches_[event.pointerId] = true;\n    }\n    this.activePointers_ = Object.keys(this.trackedTouches_).length;\n  };\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.handlePointerUp_ = function handlePointerUp_ (pointerEvent) {\n    this.updateActivePointers_(pointerEvent);\n    var newEvent = new MapBrowserPointerEvent(\n      MapBrowserEventType.POINTERUP, this.map_, pointerEvent);\n    this.dispatchEvent(newEvent);\n\n    // We emulate click events on left mouse button click, touch contact, and pen\n    // contact. isMouseActionButton returns true in these cases (evt.button is set\n    // to 0).\n    // See http://www.w3.org/TR/pointerevents/#button-states\n    // We only fire click, singleclick, and doubleclick if nobody has called\n    // event.stopPropagation() or event.preventDefault().\n    if (!newEvent.propagationStopped && !this.dragging_ && this.isMouseActionButton_(pointerEvent)) {\n      this.emulateClick_(this.down_);\n    }\n\n    if (this.activePointers_ === 0) {\n      this.dragListenerKeys_.forEach(unlistenByKey);\n      this.dragListenerKeys_.length = 0;\n      this.dragging_ = false;\n      this.down_ = null;\n      this.documentPointerEventHandler_.dispose();\n      this.documentPointerEventHandler_ = null;\n    }\n  };\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @return {boolean} If the left mouse button was pressed.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.isMouseActionButton_ = function isMouseActionButton_ (pointerEvent) {\n    return pointerEvent.button === 0;\n  };\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.handlePointerDown_ = function handlePointerDown_ (pointerEvent) {\n    this.updateActivePointers_(pointerEvent);\n    var newEvent = new MapBrowserPointerEvent(\n      MapBrowserEventType.POINTERDOWN, this.map_, pointerEvent);\n    this.dispatchEvent(newEvent);\n\n    this.down_ = pointerEvent;\n\n    if (this.dragListenerKeys_.length === 0) {\n      /* Set up a pointer event handler on the `document`,\n       * which is required when the pointer is moved outside\n       * the viewport when dragging.\n       */\n      this.documentPointerEventHandler_ =\n          new PointerEventHandler(document);\n\n      this.dragListenerKeys_.push(\n        listen(this.documentPointerEventHandler_,\n          MapBrowserEventType.POINTERMOVE,\n          this.handlePointerMove_, this),\n        listen(this.documentPointerEventHandler_,\n          MapBrowserEventType.POINTERUP,\n          this.handlePointerUp_, this),\n        /* Note that the listener for `pointercancel is set up on\n         * `pointerEventHandler_` and not `documentPointerEventHandler_` like\n         * the `pointerup` and `pointermove` listeners.\n         *\n         * The reason for this is the following: `TouchSource.vacuumTouches_()`\n         * issues `pointercancel` events, when there was no `touchend` for a\n         * `touchstart`. Now, let's say a first `touchstart` is registered on\n         * `pointerEventHandler_`. The `documentPointerEventHandler_` is set up.\n         * But `documentPointerEventHandler_` doesn't know about the first\n         * `touchstart`. If there is no `touchend` for the `touchstart`, we can\n         * only receive a `touchcancel` from `pointerEventHandler_`, because it is\n         * only registered there.\n         */\n        listen(this.pointerEventHandler_,\n          MapBrowserEventType.POINTERCANCEL,\n          this.handlePointerUp_, this)\n      );\n    }\n  };\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.handlePointerMove_ = function handlePointerMove_ (pointerEvent) {\n    // Between pointerdown and pointerup, pointermove events are triggered.\n    // To avoid a 'false' touchmove event to be dispatched, we test if the pointer\n    // moved a significant distance.\n    if (this.isMoving_(pointerEvent)) {\n      this.dragging_ = true;\n      var newEvent = new MapBrowserPointerEvent(\n        MapBrowserEventType.POINTERDRAG, this.map_, pointerEvent,\n        this.dragging_);\n      this.dispatchEvent(newEvent);\n    }\n\n    // Some native android browser triggers mousemove events during small period\n    // of time. See: https://code.google.com/p/android/issues/detail?id=5491 or\n    // https://code.google.com/p/android/issues/detail?id=19827\n    // ex: Galaxy Tab P3110 + Android 4.1.1\n    pointerEvent.preventDefault();\n  };\n\n  /**\n   * Wrap and relay a pointer event.  Note that this requires that the type\n   * string for the MapBrowserPointerEvent matches the PointerEvent type.\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.relayEvent_ = function relayEvent_ (pointerEvent) {\n    var dragging = !!(this.down_ && this.isMoving_(pointerEvent));\n    this.dispatchEvent(new MapBrowserPointerEvent(\n      pointerEvent.type, this.map_, pointerEvent, dragging));\n  };\n\n  /**\n   * @param {import(\"./pointer/PointerEvent.js\").default} pointerEvent Pointer\n   * event.\n   * @return {boolean} Is moving.\n   * @private\n   */\n  MapBrowserEventHandler.prototype.isMoving_ = function isMoving_ (pointerEvent) {\n    return this.dragging_ ||\n        Math.abs(pointerEvent.clientX - this.down_.clientX) > this.moveTolerance_ ||\n        Math.abs(pointerEvent.clientY - this.down_.clientY) > this.moveTolerance_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MapBrowserEventHandler.prototype.disposeInternal = function disposeInternal () {\n    if (this.relayedListenerKey_) {\n      unlistenByKey(this.relayedListenerKey_);\n      this.relayedListenerKey_ = null;\n    }\n    if (this.pointerdownListenerKey_) {\n      unlistenByKey(this.pointerdownListenerKey_);\n      this.pointerdownListenerKey_ = null;\n    }\n\n    this.dragListenerKeys_.forEach(unlistenByKey);\n    this.dragListenerKeys_.length = 0;\n\n    if (this.documentPointerEventHandler_) {\n      this.documentPointerEventHandler_.dispose();\n      this.documentPointerEventHandler_ = null;\n    }\n    if (this.pointerEventHandler_) {\n      this.pointerEventHandler_.dispose();\n      this.pointerEventHandler_ = null;\n    }\n    EventTarget.prototype.disposeInternal.call(this);\n  };\n\n  return MapBrowserEventHandler;\n}(EventTarget));\n\n\nexport default MapBrowserEventHandler;\n\n//# sourceMappingURL=MapBrowserEventHandler.js.map","/**\n * @module ol/MapEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\n  /**\n   * Triggered after a map frame is rendered.\n   * @event module:ol/MapEvent~MapEvent#postrender\n   * @api\n   */\n  POSTRENDER: 'postrender',\n\n  /**\n   * Triggered when the map starts moving.\n   * @event module:ol/MapEvent~MapEvent#movestart\n   * @api\n   */\n  MOVESTART: 'movestart',\n\n  /**\n   * Triggered after the map is moved.\n   * @event module:ol/MapEvent~MapEvent#moveend\n   * @api\n   */\n  MOVEEND: 'moveend'\n\n};\n\n//# sourceMappingURL=MapEventType.js.map","/**\n * @module ol/MapProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  LAYERGROUP: 'layergroup',\n  SIZE: 'size',\n  TARGET: 'target',\n  VIEW: 'view'\n};\n\n//# sourceMappingURL=MapProperty.js.map","/**\n * @module ol/TileState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  /**\n   * Indicates that tile loading failed\n   * @type {number}\n   */\n  ERROR: 3,\n  EMPTY: 4,\n  ABORT: 5\n};\n\n//# sourceMappingURL=TileState.js.map","/**\n * @module ol/structs/PriorityQueue\n */\nimport {assert} from '../asserts.js';\nimport {clear} from '../obj.js';\n\n\n/**\n * @type {number}\n */\nexport var DROP = Infinity;\n\n\n/**\n * @classdesc\n * Priority queue.\n *\n * The implementation is inspired from the Closure Library's Heap class and\n * Python's heapq module.\n *\n * See http://closure-library.googlecode.com/svn/docs/closure_goog_structs_heap.js.source.html\n * and http://hg.python.org/cpython/file/2.7/Lib/heapq.py.\n *\n * @template T\n */\nvar PriorityQueue = function PriorityQueue(priorityFunction, keyFunction) {\n\n  /**\n   * @type {function(T): number}\n   * @private\n   */\n  this.priorityFunction_ = priorityFunction;\n\n  /**\n   * @type {function(T): string}\n   * @private\n   */\n  this.keyFunction_ = keyFunction;\n\n  /**\n   * @type {Array<T>}\n   * @private\n   */\n  this.elements_ = [];\n\n  /**\n   * @type {Array<number>}\n   * @private\n   */\n  this.priorities_ = [];\n\n  /**\n   * @type {!Object<string, boolean>}\n   * @private\n   */\n  this.queuedElements_ = {};\n\n};\n\n/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.clear = function clear$1 () {\n  this.elements_.length = 0;\n  this.priorities_.length = 0;\n  clear(this.queuedElements_);\n};\n\n\n/**\n * Remove and return the highest-priority element. O(log N).\n * @return {T} Element.\n */\nPriorityQueue.prototype.dequeue = function dequeue () {\n  var elements = this.elements_;\n  var priorities = this.priorities_;\n  var element = elements[0];\n  if (elements.length == 1) {\n    elements.length = 0;\n    priorities.length = 0;\n  } else {\n    elements[0] = elements.pop();\n    priorities[0] = priorities.pop();\n    this.siftUp_(0);\n  }\n  var elementKey = this.keyFunction_(element);\n  delete this.queuedElements_[elementKey];\n  return element;\n};\n\n\n/**\n * Enqueue an element. O(log N).\n * @param {T} element Element.\n * @return {boolean} The element was added to the queue.\n */\nPriorityQueue.prototype.enqueue = function enqueue (element) {\n  assert(!(this.keyFunction_(element) in this.queuedElements_),\n    31); // Tried to enqueue an `element` that was already added to the queue\n  var priority = this.priorityFunction_(element);\n  if (priority != DROP) {\n    this.elements_.push(element);\n    this.priorities_.push(priority);\n    this.queuedElements_[this.keyFunction_(element)] = true;\n    this.siftDown_(0, this.elements_.length - 1);\n    return true;\n  }\n  return false;\n};\n\n\n/**\n * @return {number} Count.\n */\nPriorityQueue.prototype.getCount = function getCount () {\n  return this.elements_.length;\n};\n\n\n/**\n * Gets the index of the left child of the node at the given index.\n * @param {number} index The index of the node to get the left child for.\n * @return {number} The index of the left child.\n * @private\n */\nPriorityQueue.prototype.getLeftChildIndex_ = function getLeftChildIndex_ (index) {\n  return index * 2 + 1;\n};\n\n\n/**\n * Gets the index of the right child of the node at the given index.\n * @param {number} index The index of the node to get the right child for.\n * @return {number} The index of the right child.\n * @private\n */\nPriorityQueue.prototype.getRightChildIndex_ = function getRightChildIndex_ (index) {\n  return index * 2 + 2;\n};\n\n\n/**\n * Gets the index of the parent of the node at the given index.\n * @param {number} index The index of the node to get the parent for.\n * @return {number} The index of the parent.\n * @private\n */\nPriorityQueue.prototype.getParentIndex_ = function getParentIndex_ (index) {\n  return (index - 1) >> 1;\n};\n\n\n/**\n * Make this a heap. O(N).\n * @private\n */\nPriorityQueue.prototype.heapify_ = function heapify_ () {\n  var i;\n  for (i = (this.elements_.length >> 1) - 1; i >= 0; i--) {\n    this.siftUp_(i);\n  }\n};\n\n\n/**\n * @return {boolean} Is empty.\n */\nPriorityQueue.prototype.isEmpty = function isEmpty () {\n  return this.elements_.length === 0;\n};\n\n\n/**\n * @param {string} key Key.\n * @return {boolean} Is key queued.\n */\nPriorityQueue.prototype.isKeyQueued = function isKeyQueued (key) {\n  return key in this.queuedElements_;\n};\n\n\n/**\n * @param {T} element Element.\n * @return {boolean} Is queued.\n */\nPriorityQueue.prototype.isQueued = function isQueued (element) {\n  return this.isKeyQueued(this.keyFunction_(element));\n};\n\n\n/**\n * @param {number} index The index of the node to move down.\n * @private\n */\nPriorityQueue.prototype.siftUp_ = function siftUp_ (index) {\n  var elements = this.elements_;\n  var priorities = this.priorities_;\n  var count = elements.length;\n  var element = elements[index];\n  var priority = priorities[index];\n  var startIndex = index;\n\n  while (index < (count >> 1)) {\n    var lIndex = this.getLeftChildIndex_(index);\n    var rIndex = this.getRightChildIndex_(index);\n\n    var smallerChildIndex = rIndex < count &&\n        priorities[rIndex] < priorities[lIndex] ?\n      rIndex : lIndex;\n\n    elements[index] = elements[smallerChildIndex];\n    priorities[index] = priorities[smallerChildIndex];\n    index = smallerChildIndex;\n  }\n\n  elements[index] = element;\n  priorities[index] = priority;\n  this.siftDown_(startIndex, index);\n};\n\n\n/**\n * @param {number} startIndex The index of the root.\n * @param {number} index The index of the node to move up.\n * @private\n */\nPriorityQueue.prototype.siftDown_ = function siftDown_ (startIndex, index) {\n  var elements = this.elements_;\n  var priorities = this.priorities_;\n  var element = elements[index];\n  var priority = priorities[index];\n\n  while (index > startIndex) {\n    var parentIndex = this.getParentIndex_(index);\n    if (priorities[parentIndex] > priority) {\n      elements[index] = elements[parentIndex];\n      priorities[index] = priorities[parentIndex];\n      index = parentIndex;\n    } else {\n      break;\n    }\n  }\n  elements[index] = element;\n  priorities[index] = priority;\n};\n\n\n/**\n * FIXME empty description for jsdoc\n */\nPriorityQueue.prototype.reprioritize = function reprioritize () {\n  var priorityFunction = this.priorityFunction_;\n  var elements = this.elements_;\n  var priorities = this.priorities_;\n  var index = 0;\n  var n = elements.length;\n  var element, i, priority;\n  for (i = 0; i < n; ++i) {\n    element = elements[i];\n    priority = priorityFunction(element);\n    if (priority == DROP) {\n      delete this.queuedElements_[this.keyFunction_(element)];\n    } else {\n      priorities[index] = priority;\n      elements[index++] = element;\n    }\n  }\n  elements.length = index;\n  priorities.length = index;\n  this.heapify_();\n};\n\n\nexport default PriorityQueue;\n\n//# sourceMappingURL=PriorityQueue.js.map","/**\n * @module ol/TileQueue\n */\nimport TileState from './TileState.js';\nimport {listen, unlisten} from './events.js';\nimport EventType from './events/EventType.js';\nimport PriorityQueue from './structs/PriorityQueue.js';\n\n\n/**\n * @typedef {function(import(\"./Tile.js\").default, string, import(\"./coordinate.js\").Coordinate, number): number} PriorityFunction\n */\n\n\nvar TileQueue = /*@__PURE__*/(function (PriorityQueue) {\n  function TileQueue(tilePriorityFunction, tileChangeCallback) {\n\n    PriorityQueue.call(\n      /**\n       * @param {Array} element Element.\n       * @return {number} Priority.\n       */\n      this, function(element) {\n        return tilePriorityFunction.apply(null, element);\n      },\n      /**\n       * @param {Array} element Element.\n       * @return {string} Key.\n       */\n      function(element) {\n        return (/** @type {import(\"./Tile.js\").default} */ (element[0]).getKey());\n      });\n\n    /**\n     * @private\n     * @type {function(): ?}\n     */\n    this.tileChangeCallback_ = tileChangeCallback;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tilesLoading_ = 0;\n\n    /**\n     * @private\n     * @type {!Object<string,boolean>}\n     */\n    this.tilesLoadingKeys_ = {};\n\n  }\n\n  if ( PriorityQueue ) TileQueue.__proto__ = PriorityQueue;\n  TileQueue.prototype = Object.create( PriorityQueue && PriorityQueue.prototype );\n  TileQueue.prototype.constructor = TileQueue;\n\n  /**\n   * @inheritDoc\n   */\n  TileQueue.prototype.enqueue = function enqueue (element) {\n    var added = PriorityQueue.prototype.enqueue.call(this, element);\n    if (added) {\n      var tile = element[0];\n      listen(tile, EventType.CHANGE, this.handleTileChange, this);\n    }\n    return added;\n  };\n\n  /**\n   * @return {number} Number of tiles loading.\n   */\n  TileQueue.prototype.getTilesLoading = function getTilesLoading () {\n    return this.tilesLoading_;\n  };\n\n  /**\n   * @param {import(\"./events/Event.js\").default} event Event.\n   * @protected\n   */\n  TileQueue.prototype.handleTileChange = function handleTileChange (event) {\n    var tile = /** @type {import(\"./Tile.js\").default} */ (event.target);\n    var state = tile.getState();\n    if (state === TileState.LOADED || state === TileState.ERROR ||\n        state === TileState.EMPTY || state === TileState.ABORT) {\n      unlisten(tile, EventType.CHANGE, this.handleTileChange, this);\n      var tileKey = tile.getKey();\n      if (tileKey in this.tilesLoadingKeys_) {\n        delete this.tilesLoadingKeys_[tileKey];\n        --this.tilesLoading_;\n      }\n      this.tileChangeCallback_();\n    }\n  };\n\n  /**\n   * @param {number} maxTotalLoading Maximum number tiles to load simultaneously.\n   * @param {number} maxNewLoads Maximum number of new tiles to load.\n   */\n  TileQueue.prototype.loadMoreTiles = function loadMoreTiles (maxTotalLoading, maxNewLoads) {\n    var newLoads = 0;\n    var abortedTiles = false;\n    var state, tile, tileKey;\n    while (this.tilesLoading_ < maxTotalLoading && newLoads < maxNewLoads &&\n           this.getCount() > 0) {\n      tile = /** @type {import(\"./Tile.js\").default} */ (this.dequeue()[0]);\n      tileKey = tile.getKey();\n      state = tile.getState();\n      if (state === TileState.ABORT) {\n        abortedTiles = true;\n      } else if (state === TileState.IDLE && !(tileKey in this.tilesLoadingKeys_)) {\n        this.tilesLoadingKeys_[tileKey] = true;\n        ++this.tilesLoading_;\n        ++newLoads;\n        tile.load();\n      }\n    }\n    if (newLoads === 0 && abortedTiles) {\n      // Do not stop the render loop when all wanted tiles were aborted due to\n      // a small, saturated tile cache.\n      this.tileChangeCallback_();\n    }\n  };\n\n  return TileQueue;\n}(PriorityQueue));\n\n\nexport default TileQueue;\n\n//# sourceMappingURL=TileQueue.js.map","/**\n * @module ol/tilegrid/common\n */\n\n/**\n * Default maximum zoom for default tile grids.\n * @type {number}\n */\nexport var DEFAULT_MAX_ZOOM = 42;\n\n/**\n * Default tile size.\n * @type {number}\n */\nexport var DEFAULT_TILE_SIZE = 256;\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/centerconstraint\n */\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((import(\"./coordinate.js\").Coordinate|undefined)): (import(\"./coordinate.js\").Coordinate|undefined)} Type\n */\n\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @return {Type} The constraint.\n */\nexport function createExtent(extent) {\n  return (\n    /**\n     * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n     * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n     */\n    function(center) {\n      if (center) {\n        return [\n          clamp(center[0], extent[0], extent[2]),\n          clamp(center[1], extent[1], extent[3])\n        ];\n      } else {\n        return undefined;\n      }\n    }\n  );\n}\n\n\n/**\n * @param {import(\"./coordinate.js\").Coordinate=} center Center.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} Center.\n */\nexport function none(center) {\n  return center;\n}\n\n//# sourceMappingURL=centerconstraint.js.map","/**\n * @module ol/rotationconstraint\n */\nimport {toRadians} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number): (number|undefined)} Type\n */\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function disable(rotation, delta) {\n  if (rotation !== undefined) {\n    return 0;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {number|undefined} rotation Rotation.\n * @param {number} delta Delta.\n * @return {number|undefined} Rotation.\n */\nexport function none(rotation, delta) {\n  if (rotation !== undefined) {\n    return rotation + delta;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {number} n N.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToN(n) {\n  var theta = 2 * Math.PI / n;\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {number} delta Delta.\n     * @return {number|undefined} Rotation.\n     */\n    function(rotation, delta) {\n      if (rotation !== undefined) {\n        rotation = Math.floor((rotation + delta) / theta + 0.5) * theta;\n        return rotation;\n      } else {\n        return undefined;\n      }\n    });\n}\n\n\n/**\n * @param {number=} opt_tolerance Tolerance.\n * @return {Type} Rotation constraint.\n */\nexport function createSnapToZero(opt_tolerance) {\n  var tolerance = opt_tolerance || toRadians(5);\n  return (\n    /**\n     * @param {number|undefined} rotation Rotation.\n     * @param {number} delta Delta.\n     * @return {number|undefined} Rotation.\n     */\n    function(rotation, delta) {\n      if (rotation !== undefined) {\n        if (Math.abs(rotation + delta) <= tolerance) {\n          return 0;\n        } else {\n          return rotation + delta;\n        }\n      } else {\n        return undefined;\n      }\n    });\n}\n\n//# sourceMappingURL=rotationconstraint.js.map","/**\n * @module ol/ViewHint\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  ANIMATING: 0,\n  INTERACTING: 1\n};\n\n//# sourceMappingURL=ViewHint.js.map","/**\n * @module ol/ViewProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  CENTER: 'center',\n  RESOLUTION: 'resolution',\n  ROTATION: 'rotation'\n};\n\n//# sourceMappingURL=ViewProperty.js.map","/**\n * @module ol/easing\n */\n\n\n/**\n * Start slow and speed up.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeIn(t) {\n  return Math.pow(t, 3);\n}\n\n\n/**\n * Start fast and slow down.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function easeOut(t) {\n  return 1 - easeIn(1 - t);\n}\n\n\n/**\n * Start slow, speed up, and then slow down again.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function inAndOut(t) {\n  return 3 * t * t - 2 * t * t * t;\n}\n\n\n/**\n * Maintain a constant speed over time.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function linear(t) {\n  return t;\n}\n\n\n/**\n * Start slow, speed up, and at the very end slow down again.  This has the\n * same general behavior as {@link module:ol/easing~inAndOut}, but the final\n * slowdown is delayed.\n * @param {number} t Input between 0 and 1.\n * @return {number} Output between 0 and 1.\n * @api\n */\nexport function upAndDown(t) {\n  if (t < 0.5) {\n    return inAndOut(2 * t);\n  } else {\n    return 1 - inAndOut(2 * (t - 0.5));\n  }\n}\n\n//# sourceMappingURL=easing.js.map","/**\n * @module ol/View\n */\nimport {DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {getUid} from './util.js';\nimport {VOID} from './functions.js';\nimport {createExtent, none as centerNone} from './centerconstraint.js';\nimport BaseObject from './Object.js';\nimport {createSnapToResolutions, createSnapToPower} from './resolutionconstraint.js';\nimport {createSnapToZero, createSnapToN, none as rotationNone, disable} from './rotationconstraint.js';\nimport ViewHint from './ViewHint.js';\nimport ViewProperty from './ViewProperty.js';\nimport {linearFindNearest} from './array.js';\nimport {assert} from './asserts.js';\nimport {add as addCoordinate, rotate as rotateCoordinate, equals as coordinatesEqual} from './coordinate.js';\nimport {inAndOut} from './easing.js';\nimport {getForViewAndSize, getCenter, getHeight, getWidth, isEmpty} from './extent.js';\nimport GeometryType from './geom/GeometryType.js';\nimport {fromExtent as polygonFromExtent} from './geom/Polygon.js';\nimport {clamp, modulo} from './math.js';\nimport {assign} from './obj.js';\nimport {createProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\n\n\n/**\n * An animation configuration\n *\n * @typedef {Object} Animation\n * @property {import(\"./coordinate.js\").Coordinate} [sourceCenter]\n * @property {import(\"./coordinate.js\").Coordinate} [targetCenter]\n * @property {number} [sourceResolution]\n * @property {number} [targetResolution]\n * @property {number} [sourceRotation]\n * @property {number} [targetRotation]\n * @property {import(\"./coordinate.js\").Coordinate} [anchor]\n * @property {number} start\n * @property {number} duration\n * @property {boolean} complete\n * @property {function(number):number} easing\n * @property {function(boolean)} callback\n */\n\n\n/**\n * @typedef {Object} Constraints\n * @property {import(\"./centerconstraint.js\").Type} center\n * @property {import(\"./resolutionconstraint.js\").Type} resolution\n * @property {import(\"./rotationconstraint.js\").Type} rotation\n */\n\n\n/**\n * @typedef {Object} FitOptions\n * @property {import(\"./size.js\").Size} [size] The size in pixels of the box to fit\n * the extent into. Default is the current size of the first map in the DOM that\n * uses this view, or `[100, 100]` if no such map is found.\n * @property {!Array<number>} [padding=[0, 0, 0, 0]] Padding (in pixels) to be\n * cleared inside the view. Values in the array are top, right, bottom and left\n * padding.\n * @property {boolean} [constrainResolution=true] Constrain the resolution.\n * @property {boolean} [nearest=false] If `constrainResolution` is `true`, get\n * the nearest extent instead of the closest that actually fits the view.\n * @property {number} [minResolution=0] Minimum resolution that we zoom to.\n * @property {number} [maxZoom] Maximum zoom level that we zoom to. If\n * `minResolution` is given, this property is ignored.\n * @property {number} [duration] The duration of the animation in milliseconds.\n * By default, there is no animation to the target extent.\n * @property {function(number):number} [easing] The easing function used during\n * the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n * @property {function(boolean)} [callback] Function called when the view is in\n * its final position. The callback will be called with `true` if the animation\n * series completed on its own or `false` if it was cancelled.\n */\n\n\n/**\n * @typedef {Object} ViewOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The initial center for\n * the view. The coordinate system for the center is specified with the\n * `projection` option. Layer sources will not be fetched if this is not set,\n * but the center can be set later with {@link #setCenter}.\n * @property {boolean|number} [constrainRotation=true] Rotation constraint.\n * `false` means no constraint. `true` means no constraint, but snap to zero\n * near zero. A number constrains the rotation to that number of values. For\n * example, `4` will constrain the rotation to 0, 90, 180, and 270 degrees.\n * @property {boolean} [enableRotation=true] Enable rotation.\n * If `false`, a rotation constraint that always sets the rotation to zero is\n * used. The `constrainRotation` option has no effect if `enableRotation` is\n * `false`.\n * @property {import(\"./extent.js\").Extent} [extent] The extent that constrains the\n * center, in other words, center cannot be set outside this extent.\n * @property {number} [maxResolution] The maximum resolution used to determine\n * the resolution constraint. It is used together with `minResolution` (or\n * `maxZoom`) and `zoomFactor`. If unspecified it is calculated in such a way\n * that the projection's validity extent fits in a 256x256 px tile. If the\n * projection is Spherical Mercator (the default) then `maxResolution` defaults\n * to `40075016.68557849 / 256 = 156543.03392804097`.\n * @property {number} [minResolution] The minimum resolution used to determine\n * the resolution constraint.  It is used together with `maxResolution` (or\n * `minZoom`) and `zoomFactor`.  If unspecified it is calculated assuming 29\n * zoom levels (with a factor of 2). If the projection is Spherical Mercator\n * (the default) then `minResolution` defaults to\n * `40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253`.\n * @property {number} [maxZoom=28] The maximum zoom level used to determine the\n * resolution constraint. It is used together with `minZoom` (or\n * `maxResolution`) and `zoomFactor`.  Note that if `minResolution` is also\n * provided, it is given precedence over `maxZoom`.\n * @property {number} [minZoom=0] The minimum zoom level used to determine the\n * resolution constraint. It is used together with `maxZoom` (or\n * `minResolution`) and `zoomFactor`.  Note that if `maxResolution` is also\n * provided, it is given precedence over `minZoom`.\n * @property {import(\"./proj.js\").ProjectionLike} [projection='EPSG:3857'] The\n * projection. The default is Spherical Mercator.\n * @property {number} [resolution] The initial resolution for the view. The\n * units are `projection` units per pixel (e.g. meters per pixel). An\n * alternative to setting this is to set `zoom`. Layer sources will not be\n * fetched if neither this nor `zoom` are defined, but they can be set later\n * with {@link #setZoom} or {@link #setResolution}.\n * @property {Array<number>} [resolutions] Resolutions to determine the\n * resolution constraint. If set the `maxResolution`, `minResolution`,\n * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored.\n * @property {number} [rotation=0] The initial rotation for the view in radians\n * (positive rotation clockwise, 0 means North).\n * @property {number} [zoom] Only used if `resolution` is not defined. Zoom\n * level used to calculate the initial resolution for the view. The initial\n * resolution is determined using the {@link #constrainResolution} method.\n * @property {number} [zoomFactor=2] The zoom factor used to determine the\n * resolution constraint.\n */\n\n\n/**\n * @typedef {Object} AnimationOptions\n * @property {import(\"./coordinate.js\").Coordinate} [center] The center of the view at the end of\n * the animation.\n * @property {number} [zoom] The zoom level of the view at the end of the\n * animation. This takes precedence over `resolution`.\n * @property {number} [resolution] The resolution of the view at the end\n * of the animation.  If `zoom` is also provided, this option will be ignored.\n * @property {number} [rotation] The rotation of the view at the end of\n * the animation.\n * @property {import(\"./coordinate.js\").Coordinate} [anchor] Optional anchor to remained fixed\n * during a rotation or resolution animation.\n * @property {number} [duration=1000] The duration of the animation in milliseconds.\n * @property {function(number):number} [easing] The easing function used\n * during the animation (defaults to {@link module:ol/easing~inAndOut}).\n * The function will be called for each frame with a number representing a\n * fraction of the animation's duration.  The function should return a number\n * between 0 and 1 representing the progress toward the destination state.\n */\n\n\n/**\n * @typedef {Object} State\n * @property {import(\"./coordinate.js\").Coordinate} center\n * @property {import(\"./proj/Projection.js\").default} projection\n * @property {number} resolution\n * @property {number} rotation\n * @property {number} zoom\n */\n\n\n/**\n * Default min zoom level for the map view.\n * @type {number}\n */\nvar DEFAULT_MIN_ZOOM = 0;\n\n\n/**\n * @classdesc\n * A View object represents a simple 2D view of the map.\n *\n * This is the object to act upon to change the center, resolution,\n * and rotation of the map.\n *\n * ### The view states\n *\n * An View is determined by three states: `center`, `resolution`,\n * and `rotation`. Each state has a corresponding getter and setter, e.g.\n * `getCenter` and `setCenter` for the `center` state.\n *\n * An View has a `projection`. The projection determines the\n * coordinate system of the center, and its units determine the units of the\n * resolution (projection units per pixel). The default projection is\n * Spherical Mercator (EPSG:3857).\n *\n * ### The constraints\n *\n * `setCenter`, `setResolution` and `setRotation` can be used to change the\n * states of the view. Any value can be passed to the setters. And the value\n * that is passed to a setter will effectively be the value set in the view,\n * and returned by the corresponding getter.\n *\n * But a View object also has a *resolution constraint*, a\n * *rotation constraint* and a *center constraint*.\n *\n * As said above, no constraints are applied when the setters are used to set\n * new states for the view. Applying constraints is done explicitly through\n * the use of the `constrain*` functions (`constrainResolution` and\n * `constrainRotation` and `constrainCenter`).\n *\n * The main users of the constraints are the interactions and the\n * controls. For example, double-clicking on the map changes the view to\n * the \"next\" resolution. And releasing the fingers after pinch-zooming\n * snaps to the closest resolution (with an animation).\n *\n * The *resolution constraint* snaps to specific resolutions. It is\n * determined by the following options: `resolutions`, `maxResolution`,\n * `maxZoom`, and `zoomFactor`. If `resolutions` is set, the other three\n * options are ignored. See documentation for each option for more\n * information.\n *\n * The *rotation constraint* snaps to specific angles. It is determined\n * by the following options: `enableRotation` and `constrainRotation`.\n * By default the rotation value is snapped to zero when approaching the\n * horizontal.\n *\n * The *center constraint* is determined by the `extent` option. By\n * default the center is not constrained at all.\n *\n  * @api\n */\nvar View = /*@__PURE__*/(function (BaseObject) {\n  function View(opt_options) {\n    BaseObject.call(this);\n\n    var options = assign({}, opt_options);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.hints_ = [0, 0];\n\n    /**\n     * @private\n     * @type {Array<Array<Animation>>}\n     */\n    this.animations_ = [];\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.updateAnimationKey_;\n\n    this.updateAnimations_ = this.updateAnimations_.bind(this);\n\n    /**\n     * @private\n     * @const\n     * @type {import(\"./proj/Projection.js\").default}\n     */\n    this.projection_ = createProjection(options.projection, 'EPSG:3857');\n\n    this.applyOptions_(options);\n  }\n\n  if ( BaseObject ) View.__proto__ = BaseObject;\n  View.prototype = Object.create( BaseObject && BaseObject.prototype );\n  View.prototype.constructor = View;\n\n  /**\n   * Set up the view with the given options.\n   * @param {ViewOptions} options View options.\n   */\n  View.prototype.applyOptions_ = function applyOptions_ (options) {\n\n    /**\n     * @type {Object<string, *>}\n     */\n    var properties = {};\n    properties[ViewProperty.CENTER] = options.center !== undefined ?\n      options.center : null;\n\n    var resolutionConstraintInfo = createResolutionConstraint(options);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxResolution_ = resolutionConstraintInfo.maxResolution;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minResolution_ = resolutionConstraintInfo.minResolution;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.zoomFactor_ = resolutionConstraintInfo.zoomFactor;\n\n    /**\n     * @private\n     * @type {Array<number>|undefined}\n     */\n    this.resolutions_ = options.resolutions;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minZoom_ = resolutionConstraintInfo.minZoom;\n\n    var centerConstraint = createCenterConstraint(options);\n    var resolutionConstraint = resolutionConstraintInfo.constraint;\n    var rotationConstraint = createRotationConstraint(options);\n\n    /**\n     * @private\n     * @type {Constraints}\n     */\n    this.constraints_ = {\n      center: centerConstraint,\n      resolution: resolutionConstraint,\n      rotation: rotationConstraint\n    };\n\n    if (options.resolution !== undefined) {\n      properties[ViewProperty.RESOLUTION] = options.resolution;\n    } else if (options.zoom !== undefined) {\n      properties[ViewProperty.RESOLUTION] = this.constrainResolution(\n        this.maxResolution_, options.zoom - this.minZoom_);\n\n      if (this.resolutions_) { // in case map zoom is out of min/max zoom range\n        properties[ViewProperty.RESOLUTION] = clamp(\n          Number(this.getResolution() || properties[ViewProperty.RESOLUTION]),\n          this.minResolution_, this.maxResolution_);\n      }\n    }\n    properties[ViewProperty.ROTATION] = options.rotation !== undefined ? options.rotation : 0;\n    this.setProperties(properties);\n\n    /**\n     * @private\n     * @type {ViewOptions}\n     */\n    this.options_ = options;\n\n  };\n\n  /**\n   * Get an updated version of the view options used to construct the view.  The\n   * current resolution (or zoom), center, and rotation are applied to any stored\n   * options.  The provided options can be used to apply new min/max zoom or\n   * resolution limits.\n   * @param {ViewOptions} newOptions New options to be applied.\n   * @return {ViewOptions} New options updated with the current view state.\n   */\n  View.prototype.getUpdatedOptions_ = function getUpdatedOptions_ (newOptions) {\n    var options = assign({}, this.options_);\n\n    // preserve resolution (or zoom)\n    if (options.resolution !== undefined) {\n      options.resolution = this.getResolution();\n    } else {\n      options.zoom = this.getZoom();\n    }\n\n    // preserve center\n    options.center = this.getCenter();\n\n    // preserve rotation\n    options.rotation = this.getRotation();\n\n    return assign({}, options, newOptions);\n  };\n\n  /**\n   * Animate the view.  The view's center, zoom (or resolution), and rotation\n   * can be animated for smooth transitions between view states.  For example,\n   * to animate the view to a new zoom level:\n   *\n   *     view.animate({zoom: view.getZoom() + 1});\n   *\n   * By default, the animation lasts one second and uses in-and-out easing.  You\n   * can customize this behavior by including `duration` (in milliseconds) and\n   * `easing` options (see {@link module:ol/easing}).\n   *\n   * To chain together multiple animations, call the method with multiple\n   * animation objects.  For example, to first zoom and then pan:\n   *\n   *     view.animate({zoom: 10}, {center: [0, 0]});\n   *\n   * If you provide a function as the last argument to the animate method, it\n   * will get called at the end of an animation series.  The callback will be\n   * called with `true` if the animation series completed on its own or `false`\n   * if it was cancelled.\n   *\n   * Animations are cancelled by user interactions (e.g. dragging the map) or by\n   * calling `view.setCenter()`, `view.setResolution()`, or `view.setRotation()`\n   * (or another method that calls one of these).\n   *\n   * @param {...(AnimationOptions|function(boolean))} var_args Animation\n   *     options.  Multiple animations can be run in series by passing multiple\n   *     options objects.  To run multiple animations in parallel, call the method\n   *     multiple times.  An optional callback can be provided as a final\n   *     argument.  The callback will be called with a boolean indicating whether\n   *     the animation completed without being cancelled.\n   * @api\n   */\n  View.prototype.animate = function animate (var_args) {\n    var arguments$1 = arguments;\n\n    var animationCount = arguments.length;\n    var callback;\n    if (animationCount > 1 && typeof arguments[animationCount - 1] === 'function') {\n      callback = arguments[animationCount - 1];\n      --animationCount;\n    }\n    if (!this.isDef()) {\n      // if view properties are not yet set, shortcut to the final state\n      var state = arguments[animationCount - 1];\n      if (state.center) {\n        this.setCenter(state.center);\n      }\n      if (state.zoom !== undefined) {\n        this.setZoom(state.zoom);\n      }\n      if (state.rotation !== undefined) {\n        this.setRotation(state.rotation);\n      }\n      if (callback) {\n        animationCallback(callback, true);\n      }\n      return;\n    }\n    var start = Date.now();\n    var center = this.getCenter().slice();\n    var resolution = this.getResolution();\n    var rotation = this.getRotation();\n    var series = [];\n    for (var i = 0; i < animationCount; ++i) {\n      var options = /** @type {AnimationOptions} */ (arguments$1[i]);\n\n      var animation = /** @type {Animation} */ ({\n        start: start,\n        complete: false,\n        anchor: options.anchor,\n        duration: options.duration !== undefined ? options.duration : 1000,\n        easing: options.easing || inAndOut\n      });\n\n      if (options.center) {\n        animation.sourceCenter = center;\n        animation.targetCenter = options.center;\n        center = animation.targetCenter;\n      }\n\n      if (options.zoom !== undefined) {\n        animation.sourceResolution = resolution;\n        animation.targetResolution = this.constrainResolution(\n          this.maxResolution_, options.zoom - this.minZoom_, 0);\n        resolution = animation.targetResolution;\n      } else if (options.resolution) {\n        animation.sourceResolution = resolution;\n        animation.targetResolution = options.resolution;\n        resolution = animation.targetResolution;\n      }\n\n      if (options.rotation !== undefined) {\n        animation.sourceRotation = rotation;\n        var delta = modulo(options.rotation - rotation + Math.PI, 2 * Math.PI) - Math.PI;\n        animation.targetRotation = rotation + delta;\n        rotation = animation.targetRotation;\n      }\n\n      animation.callback = callback;\n\n      // check if animation is a no-op\n      if (isNoopAnimation(animation)) {\n        animation.complete = true;\n        // we still push it onto the series for callback handling\n      } else {\n        start += animation.duration;\n      }\n      series.push(animation);\n    }\n    this.animations_.push(series);\n    this.setHint(ViewHint.ANIMATING, 1);\n    this.updateAnimations_();\n  };\n\n  /**\n   * Determine if the view is being animated.\n   * @return {boolean} The view is being animated.\n   * @api\n   */\n  View.prototype.getAnimating = function getAnimating () {\n    return this.hints_[ViewHint.ANIMATING] > 0;\n  };\n\n  /**\n   * Determine if the user is interacting with the view, such as panning or zooming.\n   * @return {boolean} The view is being interacted with.\n   * @api\n   */\n  View.prototype.getInteracting = function getInteracting () {\n    return this.hints_[ViewHint.INTERACTING] > 0;\n  };\n\n  /**\n   * Cancel any ongoing animations.\n   * @api\n   */\n  View.prototype.cancelAnimations = function cancelAnimations () {\n    this.setHint(ViewHint.ANIMATING, -this.hints_[ViewHint.ANIMATING]);\n    for (var i = 0, ii = this.animations_.length; i < ii; ++i) {\n      var series = this.animations_[i];\n      if (series[0].callback) {\n        animationCallback(series[0].callback, false);\n      }\n    }\n    this.animations_.length = 0;\n  };\n\n  /**\n   * Update all animations.\n   */\n  View.prototype.updateAnimations_ = function updateAnimations_ () {\n    if (this.updateAnimationKey_ !== undefined) {\n      cancelAnimationFrame(this.updateAnimationKey_);\n      this.updateAnimationKey_ = undefined;\n    }\n    if (!this.getAnimating()) {\n      return;\n    }\n    var now = Date.now();\n    var more = false;\n    for (var i = this.animations_.length - 1; i >= 0; --i) {\n      var series = this.animations_[i];\n      var seriesComplete = true;\n      for (var j = 0, jj = series.length; j < jj; ++j) {\n        var animation = series[j];\n        if (animation.complete) {\n          continue;\n        }\n        var elapsed = now - animation.start;\n        var fraction = animation.duration > 0 ? elapsed / animation.duration : 1;\n        if (fraction >= 1) {\n          animation.complete = true;\n          fraction = 1;\n        } else {\n          seriesComplete = false;\n        }\n        var progress = animation.easing(fraction);\n        if (animation.sourceCenter) {\n          var x0 = animation.sourceCenter[0];\n          var y0 = animation.sourceCenter[1];\n          var x1 = animation.targetCenter[0];\n          var y1 = animation.targetCenter[1];\n          var x = x0 + progress * (x1 - x0);\n          var y = y0 + progress * (y1 - y0);\n          this.set(ViewProperty.CENTER, [x, y]);\n        }\n        if (animation.sourceResolution && animation.targetResolution) {\n          var resolution = progress === 1 ?\n            animation.targetResolution :\n            animation.sourceResolution + progress * (animation.targetResolution - animation.sourceResolution);\n          if (animation.anchor) {\n            this.set(ViewProperty.CENTER,\n              this.calculateCenterZoom(resolution, animation.anchor));\n          }\n          this.set(ViewProperty.RESOLUTION, resolution);\n        }\n        if (animation.sourceRotation !== undefined && animation.targetRotation !== undefined) {\n          var rotation = progress === 1 ?\n            modulo(animation.targetRotation + Math.PI, 2 * Math.PI) - Math.PI :\n            animation.sourceRotation + progress * (animation.targetRotation - animation.sourceRotation);\n          if (animation.anchor) {\n            this.set(ViewProperty.CENTER,\n              this.calculateCenterRotate(rotation, animation.anchor));\n          }\n          this.set(ViewProperty.ROTATION, rotation);\n        }\n        more = true;\n        if (!animation.complete) {\n          break;\n        }\n      }\n      if (seriesComplete) {\n        this.animations_[i] = null;\n        this.setHint(ViewHint.ANIMATING, -1);\n        var callback = series[0].callback;\n        if (callback) {\n          animationCallback(callback, true);\n        }\n      }\n    }\n    // prune completed series\n    this.animations_ = this.animations_.filter(Boolean);\n    if (more && this.updateAnimationKey_ === undefined) {\n      this.updateAnimationKey_ = requestAnimationFrame(this.updateAnimations_);\n    }\n  };\n\n  /**\n   * @param {number} rotation Target rotation.\n   * @param {import(\"./coordinate.js\").Coordinate} anchor Rotation anchor.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for rotation and anchor.\n   */\n  View.prototype.calculateCenterRotate = function calculateCenterRotate (rotation, anchor) {\n    var center;\n    var currentCenter = this.getCenter();\n    if (currentCenter !== undefined) {\n      center = [currentCenter[0] - anchor[0], currentCenter[1] - anchor[1]];\n      rotateCoordinate(center, rotation - this.getRotation());\n      addCoordinate(center, anchor);\n    }\n    return center;\n  };\n\n  /**\n   * @param {number} resolution Target resolution.\n   * @param {import(\"./coordinate.js\").Coordinate} anchor Zoom anchor.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Center for resolution and anchor.\n   */\n  View.prototype.calculateCenterZoom = function calculateCenterZoom (resolution, anchor) {\n    var center;\n    var currentCenter = this.getCenter();\n    var currentResolution = this.getResolution();\n    if (currentCenter !== undefined && currentResolution !== undefined) {\n      var x = anchor[0] - resolution * (anchor[0] - currentCenter[0]) / currentResolution;\n      var y = anchor[1] - resolution * (anchor[1] - currentCenter[1]) / currentResolution;\n      center = [x, y];\n    }\n    return center;\n  };\n\n  /**\n   * @private\n   * @return {import(\"./size.js\").Size} Viewport size or `[100, 100]` when no viewport is found.\n   */\n  View.prototype.getSizeFromViewport_ = function getSizeFromViewport_ () {\n    var size = [100, 100];\n    var selector = '.ol-viewport[data-view=\"' + getUid(this) + '\"]';\n    var element = document.querySelector(selector);\n    if (element) {\n      var metrics = getComputedStyle(element);\n      size[0] = parseInt(metrics.width, 10);\n      size[1] = parseInt(metrics.height, 10);\n    }\n    return size;\n  };\n\n  /**\n   * Get the constrained center of this view.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} center Center.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} Constrained center.\n   * @api\n   */\n  View.prototype.constrainCenter = function constrainCenter (center) {\n    return this.constraints_.center(center);\n  };\n\n  /**\n   * Get the constrained resolution of this view.\n   * @param {number|undefined} resolution Resolution.\n   * @param {number=} opt_delta Delta. Default is `0`.\n   * @param {number=} opt_direction Direction. Default is `0`.\n   * @return {number|undefined} Constrained resolution.\n   * @api\n   */\n  View.prototype.constrainResolution = function constrainResolution (resolution, opt_delta, opt_direction) {\n    var delta = opt_delta || 0;\n    var direction = opt_direction || 0;\n    return this.constraints_.resolution(resolution, delta, direction);\n  };\n\n  /**\n   * Get the constrained rotation of this view.\n   * @param {number|undefined} rotation Rotation.\n   * @param {number=} opt_delta Delta. Default is `0`.\n   * @return {number|undefined} Constrained rotation.\n   * @api\n   */\n  View.prototype.constrainRotation = function constrainRotation (rotation, opt_delta) {\n    var delta = opt_delta || 0;\n    return this.constraints_.rotation(rotation, delta);\n  };\n\n  /**\n   * Get the view center.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The center of the view.\n   * @observable\n   * @api\n   */\n  View.prototype.getCenter = function getCenter () {\n    return (\n      /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(ViewProperty.CENTER))\n    );\n  };\n\n  /**\n   * @return {Constraints} Constraints.\n   */\n  View.prototype.getConstraints = function getConstraints () {\n    return this.constraints_;\n  };\n\n  /**\n   * @param {Array<number>=} opt_hints Destination array.\n   * @return {Array<number>} Hint.\n   */\n  View.prototype.getHints = function getHints (opt_hints) {\n    if (opt_hints !== undefined) {\n      opt_hints[0] = this.hints_[0];\n      opt_hints[1] = this.hints_[1];\n      return opt_hints;\n    } else {\n      return this.hints_.slice();\n    }\n  };\n\n  /**\n   * Calculate the extent for the current view state and the passed size.\n   * The size is the pixel dimensions of the box into which the calculated extent\n   * should fit. In most cases you want to get the extent of the entire map,\n   * that is `map.getSize()`.\n   * @param {import(\"./size.js\").Size=} opt_size Box pixel size. If not provided, the size of the\n   * first map that uses this view will be used.\n   * @return {import(\"./extent.js\").Extent} Extent.\n   * @api\n   */\n  View.prototype.calculateExtent = function calculateExtent (opt_size) {\n    var size = opt_size || this.getSizeFromViewport_();\n    var center = /** @type {!import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\n    assert(center, 1); // The view center is not defined\n    var resolution = /** @type {!number} */ (this.getResolution());\n    assert(resolution !== undefined, 2); // The view resolution is not defined\n    var rotation = /** @type {!number} */ (this.getRotation());\n    assert(rotation !== undefined, 3); // The view rotation is not defined\n\n    return getForViewAndSize(center, resolution, rotation, size);\n  };\n\n  /**\n   * Get the maximum resolution of the view.\n   * @return {number} The maximum resolution of the view.\n   * @api\n   */\n  View.prototype.getMaxResolution = function getMaxResolution () {\n    return this.maxResolution_;\n  };\n\n  /**\n   * Get the minimum resolution of the view.\n   * @return {number} The minimum resolution of the view.\n   * @api\n   */\n  View.prototype.getMinResolution = function getMinResolution () {\n    return this.minResolution_;\n  };\n\n  /**\n   * Get the maximum zoom level for the view.\n   * @return {number} The maximum zoom level.\n   * @api\n   */\n  View.prototype.getMaxZoom = function getMaxZoom () {\n    return /** @type {number} */ (this.getZoomForResolution(this.minResolution_));\n  };\n\n  /**\n   * Set a new maximum zoom level for the view.\n   * @param {number} zoom The maximum zoom level.\n   * @api\n   */\n  View.prototype.setMaxZoom = function setMaxZoom (zoom) {\n    this.applyOptions_(this.getUpdatedOptions_({maxZoom: zoom}));\n  };\n\n  /**\n   * Get the minimum zoom level for the view.\n   * @return {number} The minimum zoom level.\n   * @api\n   */\n  View.prototype.getMinZoom = function getMinZoom () {\n    return /** @type {number} */ (this.getZoomForResolution(this.maxResolution_));\n  };\n\n  /**\n   * Set a new minimum zoom level for the view.\n   * @param {number} zoom The minimum zoom level.\n   * @api\n   */\n  View.prototype.setMinZoom = function setMinZoom (zoom) {\n    this.applyOptions_(this.getUpdatedOptions_({minZoom: zoom}));\n  };\n\n  /**\n   * Get the view projection.\n   * @return {import(\"./proj/Projection.js\").default} The projection of the view.\n   * @api\n   */\n  View.prototype.getProjection = function getProjection () {\n    return this.projection_;\n  };\n\n  /**\n   * Get the view resolution.\n   * @return {number|undefined} The resolution of the view.\n   * @observable\n   * @api\n   */\n  View.prototype.getResolution = function getResolution () {\n    return /** @type {number|undefined} */ (this.get(ViewProperty.RESOLUTION));\n  };\n\n  /**\n   * Get the resolutions for the view. This returns the array of resolutions\n   * passed to the constructor of the View, or undefined if none were given.\n   * @return {Array<number>|undefined} The resolutions of the view.\n   * @api\n   */\n  View.prototype.getResolutions = function getResolutions () {\n    return this.resolutions_;\n  };\n\n  /**\n   * Get the resolution for a provided extent (in map units) and size (in pixels).\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   * @param {import(\"./size.js\").Size=} opt_size Box pixel size.\n   * @return {number} The resolution at which the provided extent will render at\n   *     the given size.\n   * @api\n   */\n  View.prototype.getResolutionForExtent = function getResolutionForExtent (extent, opt_size) {\n    var size = opt_size || this.getSizeFromViewport_();\n    var xResolution = getWidth(extent) / size[0];\n    var yResolution = getHeight(extent) / size[1];\n    return Math.max(xResolution, yResolution);\n  };\n\n  /**\n   * Return a function that returns a value between 0 and 1 for a\n   * resolution. Exponential scaling is assumed.\n   * @param {number=} opt_power Power.\n   * @return {function(number): number} Resolution for value function.\n   */\n  View.prototype.getResolutionForValueFunction = function getResolutionForValueFunction (opt_power) {\n    var power = opt_power || 2;\n    var maxResolution = this.maxResolution_;\n    var minResolution = this.minResolution_;\n    var max = Math.log(maxResolution / minResolution) / Math.log(power);\n    return (\n      /**\n       * @param {number} value Value.\n       * @return {number} Resolution.\n       */\n      function(value) {\n        var resolution = maxResolution / Math.pow(power, value * max);\n        return resolution;\n      });\n  };\n\n  /**\n   * Get the view rotation.\n   * @return {number} The rotation of the view in radians.\n   * @observable\n   * @api\n   */\n  View.prototype.getRotation = function getRotation () {\n    return /** @type {number} */ (this.get(ViewProperty.ROTATION));\n  };\n\n  /**\n   * Return a function that returns a resolution for a value between\n   * 0 and 1. Exponential scaling is assumed.\n   * @param {number=} opt_power Power.\n   * @return {function(number): number} Value for resolution function.\n   */\n  View.prototype.getValueForResolutionFunction = function getValueForResolutionFunction (opt_power) {\n    var power = opt_power || 2;\n    var maxResolution = this.maxResolution_;\n    var minResolution = this.minResolution_;\n    var max = Math.log(maxResolution / minResolution) / Math.log(power);\n    return (\n      /**\n       * @param {number} resolution Resolution.\n       * @return {number} Value.\n       */\n      function(resolution) {\n        var value = (Math.log(maxResolution / resolution) / Math.log(power)) / max;\n        return value;\n      });\n  };\n\n  /**\n   * @param {number} pixelRatio Pixel ratio for center rounding.\n   * @return {State} View state.\n   */\n  View.prototype.getState = function getState (pixelRatio) {\n    var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (this.getCenter());\n    var projection = this.getProjection();\n    var resolution = /** @type {number} */ (this.getResolution());\n    var pixelResolution = resolution / pixelRatio;\n    var rotation = this.getRotation();\n    return (\n      /** @type {State} */ ({\n        center: [\n          Math.round(center[0] / pixelResolution) * pixelResolution,\n          Math.round(center[1] / pixelResolution) * pixelResolution\n        ],\n        projection: projection !== undefined ? projection : null,\n        resolution: resolution,\n        rotation: rotation,\n        zoom: this.getZoom()\n      })\n    );\n  };\n\n  /**\n   * Get the current zoom level.  If you configured your view with a resolutions\n   * array (this is rare), this method may return non-integer zoom levels (so\n   * the zoom level is not safe to use as an index into a resolutions array).\n   * @return {number|undefined} Zoom.\n   * @api\n   */\n  View.prototype.getZoom = function getZoom () {\n    var zoom;\n    var resolution = this.getResolution();\n    if (resolution !== undefined) {\n      zoom = this.getZoomForResolution(resolution);\n    }\n    return zoom;\n  };\n\n  /**\n   * Get the zoom level for a resolution.\n   * @param {number} resolution The resolution.\n   * @return {number|undefined} The zoom level for the provided resolution.\n   * @api\n   */\n  View.prototype.getZoomForResolution = function getZoomForResolution (resolution) {\n    var offset = this.minZoom_ || 0;\n    var max, zoomFactor;\n    if (this.resolutions_) {\n      var nearest = linearFindNearest(this.resolutions_, resolution, 1);\n      offset = nearest;\n      max = this.resolutions_[nearest];\n      if (nearest == this.resolutions_.length - 1) {\n        zoomFactor = 2;\n      } else {\n        zoomFactor = max / this.resolutions_[nearest + 1];\n      }\n    } else {\n      max = this.maxResolution_;\n      zoomFactor = this.zoomFactor_;\n    }\n    return offset + Math.log(max / resolution) / Math.log(zoomFactor);\n  };\n\n  /**\n   * Get the resolution for a zoom level.\n   * @param {number} zoom Zoom level.\n   * @return {number} The view resolution for the provided zoom level.\n   * @api\n   */\n  View.prototype.getResolutionForZoom = function getResolutionForZoom (zoom) {\n    return /** @type {number} */ (this.constrainResolution(\n      this.maxResolution_, zoom - this.minZoom_, 0));\n  };\n\n  /**\n   * Fit the given geometry or extent based on the given map size and border.\n   * The size is pixel dimensions of the box to fit the extent into.\n   * In most cases you will want to use the map size, that is `map.getSize()`.\n   * Takes care of the map angle.\n   * @param {import(\"./geom/SimpleGeometry.js\").default|import(\"./extent.js\").Extent} geometryOrExtent The geometry or\n   *     extent to fit the view to.\n   * @param {FitOptions=} opt_options Options.\n   * @api\n   */\n  View.prototype.fit = function fit (geometryOrExtent, opt_options) {\n    var options = opt_options || {};\n    var size = options.size;\n    if (!size) {\n      size = this.getSizeFromViewport_();\n    }\n    /** @type {import(\"./geom/SimpleGeometry.js\").default} */\n    var geometry;\n    assert(Array.isArray(geometryOrExtent) || typeof /** @type {?} */ (geometryOrExtent).getSimplifiedGeometry === 'function',\n      24); // Invalid extent or geometry provided as `geometry`\n    if (Array.isArray(geometryOrExtent)) {\n      assert(!isEmpty(geometryOrExtent),\n        25); // Cannot fit empty extent provided as `geometry`\n      geometry = polygonFromExtent(geometryOrExtent);\n    } else if (geometryOrExtent.getType() === GeometryType.CIRCLE) {\n      geometryOrExtent = geometryOrExtent.getExtent();\n      geometry = polygonFromExtent(geometryOrExtent);\n      geometry.rotate(this.getRotation(), getCenter(geometryOrExtent));\n    } else {\n      geometry = geometryOrExtent;\n    }\n\n    var padding = options.padding !== undefined ? options.padding : [0, 0, 0, 0];\n    var constrainResolution = options.constrainResolution !== undefined ?\n      options.constrainResolution : true;\n    var nearest = options.nearest !== undefined ? options.nearest : false;\n    var minResolution;\n    if (options.minResolution !== undefined) {\n      minResolution = options.minResolution;\n    } else if (options.maxZoom !== undefined) {\n      minResolution = this.constrainResolution(\n        this.maxResolution_, options.maxZoom - this.minZoom_, 0);\n    } else {\n      minResolution = 0;\n    }\n    var coords = geometry.getFlatCoordinates();\n\n    // calculate rotated extent\n    var rotation = this.getRotation();\n    var cosAngle = Math.cos(-rotation);\n    var sinAngle = Math.sin(-rotation);\n    var minRotX = +Infinity;\n    var minRotY = +Infinity;\n    var maxRotX = -Infinity;\n    var maxRotY = -Infinity;\n    var stride = geometry.getStride();\n    for (var i = 0, ii = coords.length; i < ii; i += stride) {\n      var rotX = coords[i] * cosAngle - coords[i + 1] * sinAngle;\n      var rotY = coords[i] * sinAngle + coords[i + 1] * cosAngle;\n      minRotX = Math.min(minRotX, rotX);\n      minRotY = Math.min(minRotY, rotY);\n      maxRotX = Math.max(maxRotX, rotX);\n      maxRotY = Math.max(maxRotY, rotY);\n    }\n\n    // calculate resolution\n    var resolution = this.getResolutionForExtent(\n      [minRotX, minRotY, maxRotX, maxRotY],\n      [size[0] - padding[1] - padding[3], size[1] - padding[0] - padding[2]]);\n    resolution = isNaN(resolution) ? minResolution :\n      Math.max(resolution, minResolution);\n    if (constrainResolution) {\n      var constrainedResolution = this.constrainResolution(resolution, 0, 0);\n      if (!nearest && constrainedResolution < resolution) {\n        constrainedResolution = this.constrainResolution(\n          constrainedResolution, -1, 0);\n      }\n      resolution = constrainedResolution;\n    }\n\n    // calculate center\n    sinAngle = -sinAngle; // go back to original rotation\n    var centerRotX = (minRotX + maxRotX) / 2;\n    var centerRotY = (minRotY + maxRotY) / 2;\n    centerRotX += (padding[1] - padding[3]) / 2 * resolution;\n    centerRotY += (padding[0] - padding[2]) / 2 * resolution;\n    var centerX = centerRotX * cosAngle - centerRotY * sinAngle;\n    var centerY = centerRotY * cosAngle + centerRotX * sinAngle;\n    var center = [centerX, centerY];\n    var callback = options.callback ? options.callback : VOID;\n\n    if (options.duration !== undefined) {\n      this.animate({\n        resolution: resolution,\n        center: center,\n        duration: options.duration,\n        easing: options.easing\n      }, callback);\n    } else {\n      this.setResolution(resolution);\n      this.setCenter(center);\n      animationCallback(callback, true);\n    }\n  };\n\n  /**\n   * Center on coordinate and view position.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"./size.js\").Size} size Box pixel size.\n   * @param {import(\"./pixel.js\").Pixel} position Position on the view to center on.\n   * @api\n   */\n  View.prototype.centerOn = function centerOn (coordinate, size, position) {\n    // calculate rotated position\n    var rotation = this.getRotation();\n    var cosAngle = Math.cos(-rotation);\n    var sinAngle = Math.sin(-rotation);\n    var rotX = coordinate[0] * cosAngle - coordinate[1] * sinAngle;\n    var rotY = coordinate[1] * cosAngle + coordinate[0] * sinAngle;\n    var resolution = this.getResolution();\n    rotX += (size[0] / 2 - position[0]) * resolution;\n    rotY += (position[1] - size[1] / 2) * resolution;\n\n    // go back to original angle\n    sinAngle = -sinAngle; // go back to original rotation\n    var centerX = rotX * cosAngle - rotY * sinAngle;\n    var centerY = rotY * cosAngle + rotX * sinAngle;\n\n    this.setCenter([centerX, centerY]);\n  };\n\n  /**\n   * @return {boolean} Is defined.\n   */\n  View.prototype.isDef = function isDef () {\n    return !!this.getCenter() && this.getResolution() !== undefined;\n  };\n\n  /**\n   * Rotate the view around a given coordinate.\n   * @param {number} rotation New rotation value for the view.\n   * @param {import(\"./coordinate.js\").Coordinate=} opt_anchor The rotation center.\n   * @api\n   */\n  View.prototype.rotate = function rotate (rotation, opt_anchor) {\n    if (opt_anchor !== undefined) {\n      var center = this.calculateCenterRotate(rotation, opt_anchor);\n      this.setCenter(center);\n    }\n    this.setRotation(rotation);\n  };\n\n  /**\n   * Set the center of the current view.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} center The center of the view.\n   * @observable\n   * @api\n   */\n  View.prototype.setCenter = function setCenter (center) {\n    this.set(ViewProperty.CENTER, center);\n    if (this.getAnimating()) {\n      this.cancelAnimations();\n    }\n  };\n\n  /**\n   * @param {ViewHint} hint Hint.\n   * @param {number} delta Delta.\n   * @return {number} New value.\n   */\n  View.prototype.setHint = function setHint (hint, delta) {\n    this.hints_[hint] += delta;\n    this.changed();\n    return this.hints_[hint];\n  };\n\n  /**\n   * Set the resolution for this view.\n   * @param {number|undefined} resolution The resolution of the view.\n   * @observable\n   * @api\n   */\n  View.prototype.setResolution = function setResolution (resolution) {\n    this.set(ViewProperty.RESOLUTION, resolution);\n    if (this.getAnimating()) {\n      this.cancelAnimations();\n    }\n  };\n\n  /**\n   * Set the rotation for this view.\n   * @param {number} rotation The rotation of the view in radians.\n   * @observable\n   * @api\n   */\n  View.prototype.setRotation = function setRotation (rotation) {\n    this.set(ViewProperty.ROTATION, rotation);\n    if (this.getAnimating()) {\n      this.cancelAnimations();\n    }\n  };\n\n  /**\n   * Zoom to a specific zoom level.\n   * @param {number} zoom Zoom level.\n   * @api\n   */\n  View.prototype.setZoom = function setZoom (zoom) {\n    this.setResolution(this.getResolutionForZoom(zoom));\n  };\n\n  return View;\n}(BaseObject));\n\n\n/**\n * @param {Function} callback Callback.\n * @param {*} returnValue Return value.\n */\nfunction animationCallback(callback, returnValue) {\n  setTimeout(function() {\n    callback(returnValue);\n  }, 0);\n}\n\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./centerconstraint.js\").Type} The constraint.\n */\nexport function createCenterConstraint(options) {\n  if (options.extent !== undefined) {\n    return createExtent(options.extent);\n  } else {\n    return centerNone;\n  }\n}\n\n\n/**\n * @param {ViewOptions} options View options.\n * @return {{constraint: import(\"./resolutionconstraint.js\").Type, maxResolution: number,\n *     minResolution: number, minZoom: number, zoomFactor: number}} The constraint.\n */\nexport function createResolutionConstraint(options) {\n  var resolutionConstraint;\n  var maxResolution;\n  var minResolution;\n\n  // TODO: move these to be ol constants\n  // see https://github.com/openlayers/openlayers/issues/2076\n  var defaultMaxZoom = 28;\n  var defaultZoomFactor = 2;\n\n  var minZoom = options.minZoom !== undefined ?\n    options.minZoom : DEFAULT_MIN_ZOOM;\n\n  var maxZoom = options.maxZoom !== undefined ?\n    options.maxZoom : defaultMaxZoom;\n\n  var zoomFactor = options.zoomFactor !== undefined ?\n    options.zoomFactor : defaultZoomFactor;\n\n  if (options.resolutions !== undefined) {\n    var resolutions = options.resolutions;\n    maxResolution = resolutions[minZoom];\n    minResolution = resolutions[maxZoom] !== undefined ?\n      resolutions[maxZoom] : resolutions[resolutions.length - 1];\n    resolutionConstraint = createSnapToResolutions(\n      resolutions);\n  } else {\n    // calculate the default min and max resolution\n    var projection = createProjection(options.projection, 'EPSG:3857');\n    var extent = projection.getExtent();\n    var size = !extent ?\n      // use an extent that can fit the whole world if need be\n      360 * METERS_PER_UNIT[Units.DEGREES] /\n            projection.getMetersPerUnit() :\n      Math.max(getWidth(extent), getHeight(extent));\n\n    var defaultMaxResolution = size / DEFAULT_TILE_SIZE / Math.pow(\n      defaultZoomFactor, DEFAULT_MIN_ZOOM);\n\n    var defaultMinResolution = defaultMaxResolution / Math.pow(\n      defaultZoomFactor, defaultMaxZoom - DEFAULT_MIN_ZOOM);\n\n    // user provided maxResolution takes precedence\n    maxResolution = options.maxResolution;\n    if (maxResolution !== undefined) {\n      minZoom = 0;\n    } else {\n      maxResolution = defaultMaxResolution / Math.pow(zoomFactor, minZoom);\n    }\n\n    // user provided minResolution takes precedence\n    minResolution = options.minResolution;\n    if (minResolution === undefined) {\n      if (options.maxZoom !== undefined) {\n        if (options.maxResolution !== undefined) {\n          minResolution = maxResolution / Math.pow(zoomFactor, maxZoom);\n        } else {\n          minResolution = defaultMaxResolution / Math.pow(zoomFactor, maxZoom);\n        }\n      } else {\n        minResolution = defaultMinResolution;\n      }\n    }\n\n    // given discrete zoom levels, minResolution may be different than provided\n    maxZoom = minZoom + Math.floor(\n      Math.log(maxResolution / minResolution) / Math.log(zoomFactor));\n    minResolution = maxResolution / Math.pow(zoomFactor, maxZoom - minZoom);\n\n    resolutionConstraint = createSnapToPower(\n      zoomFactor, maxResolution, maxZoom - minZoom);\n  }\n  return {constraint: resolutionConstraint, maxResolution: maxResolution,\n    minResolution: minResolution, minZoom: minZoom, zoomFactor: zoomFactor};\n}\n\n\n/**\n * @param {ViewOptions} options View options.\n * @return {import(\"./rotationconstraint.js\").Type} Rotation constraint.\n */\nexport function createRotationConstraint(options) {\n  var enableRotation = options.enableRotation !== undefined ?\n    options.enableRotation : true;\n  if (enableRotation) {\n    var constrainRotation = options.constrainRotation;\n    if (constrainRotation === undefined || constrainRotation === true) {\n      return createSnapToZero();\n    } else if (constrainRotation === false) {\n      return rotationNone;\n    } else if (typeof constrainRotation === 'number') {\n      return createSnapToN(constrainRotation);\n    } else {\n      return rotationNone;\n    }\n  } else {\n    return disable;\n  }\n}\n\n\n/**\n * Determine if an animation involves no view change.\n * @param {Animation} animation The animation.\n * @return {boolean} The animation involves no view change.\n */\nexport function isNoopAnimation(animation) {\n  if (animation.sourceCenter && animation.targetCenter) {\n    if (!coordinatesEqual(animation.sourceCenter, animation.targetCenter)) {\n      return false;\n    }\n  }\n  if (animation.sourceResolution !== animation.targetResolution) {\n    return false;\n  }\n  if (animation.sourceRotation !== animation.targetRotation) {\n    return false;\n  }\n  return true;\n}\n\nexport default View;\n\n//# sourceMappingURL=View.js.map","/**\n * @module ol/resolutionconstraint\n */\nimport {linearFindNearest} from './array.js';\nimport {clamp} from './math.js';\n\n\n/**\n * @typedef {function((number|undefined), number, number): (number|undefined)} Type\n */\n\n\n/**\n * @param {Array<number>} resolutions Resolutions.\n * @return {Type} Zoom function.\n */\nexport function createSnapToResolutions(resolutions) {\n  return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} delta Delta.\n     * @param {number} direction Direction.\n     * @return {number|undefined} Resolution.\n     */\n    function(resolution, delta, direction) {\n      if (resolution !== undefined) {\n        var z = linearFindNearest(resolutions, resolution, direction);\n        z = clamp(z + delta, 0, resolutions.length - 1);\n        var index = Math.floor(z);\n        if (z != index && index < resolutions.length - 1) {\n          var power = resolutions[index] / resolutions[index + 1];\n          return resolutions[index] / Math.pow(power, z - index);\n        } else {\n          return resolutions[index];\n        }\n      } else {\n        return undefined;\n      }\n    }\n  );\n}\n\n\n/**\n * @param {number} power Power.\n * @param {number} maxResolution Maximum resolution.\n * @param {number=} opt_maxLevel Maximum level.\n * @return {Type} Zoom function.\n */\nexport function createSnapToPower(power, maxResolution, opt_maxLevel) {\n  return (\n    /**\n     * @param {number|undefined} resolution Resolution.\n     * @param {number} delta Delta.\n     * @param {number} direction Direction.\n     * @return {number|undefined} Resolution.\n     */\n    function(resolution, delta, direction) {\n      if (resolution !== undefined) {\n        var offset = -direction / 2 + 0.5;\n        var oldLevel = Math.floor(\n          Math.log(maxResolution / resolution) / Math.log(power) + offset);\n        var newLevel = Math.max(oldLevel + delta, 0);\n        if (opt_maxLevel !== undefined) {\n          newLevel = Math.min(newLevel, opt_maxLevel);\n        }\n        return maxResolution / Math.pow(power, newLevel);\n      } else {\n        return undefined;\n      }\n    });\n}\n\n//# sourceMappingURL=resolutionconstraint.js.map","/**\n * @module ol/dom\n */\n\n\n/**\n * Create an html canvas element and returns its 2d context.\n * @param {number=} opt_width Canvas width.\n * @param {number=} opt_height Canvas height.\n * @return {CanvasRenderingContext2D} The context.\n */\nexport function createCanvasContext2D(opt_width, opt_height) {\n  var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));\n  if (opt_width) {\n    canvas.width = opt_width;\n  }\n  if (opt_height) {\n    canvas.height = opt_height;\n  }\n  return /** @type {CanvasRenderingContext2D} */ (canvas.getContext('2d'));\n}\n\n\n/**\n * Get the current computed width for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerWidth(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The width.\n */\nexport function outerWidth(element) {\n  var width = element.offsetWidth;\n  var style = getComputedStyle(element);\n  width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);\n\n  return width;\n}\n\n\n/**\n * Get the current computed height for the given element including margin,\n * padding and border.\n * Equivalent to jQuery's `$(el).outerHeight(true)`.\n * @param {!HTMLElement} element Element.\n * @return {number} The height.\n */\nexport function outerHeight(element) {\n  var height = element.offsetHeight;\n  var style = getComputedStyle(element);\n  height += parseInt(style.marginTop, 10) + parseInt(style.marginBottom, 10);\n\n  return height;\n}\n\n/**\n * @param {Node} newNode Node to replace old node\n * @param {Node} oldNode The node to be replaced\n */\nexport function replaceNode(newNode, oldNode) {\n  var parent = oldNode.parentNode;\n  if (parent) {\n    parent.replaceChild(newNode, oldNode);\n  }\n}\n\n/**\n * @param {Node} node The node to remove.\n * @returns {Node} The node that was removed or null.\n */\nexport function removeNode(node) {\n  return node && node.parentNode ? node.parentNode.removeChild(node) : null;\n}\n\n/**\n * @param {Node} node The node to remove the children from.\n */\nexport function removeChildren(node) {\n  while (node.lastChild) {\n    node.removeChild(node.lastChild);\n  }\n}\n\n//# sourceMappingURL=dom.js.map","/**\n * @module ol/layer/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  OPACITY: 'opacity',\n  VISIBLE: 'visible',\n  EXTENT: 'extent',\n  Z_INDEX: 'zIndex',\n  MAX_RESOLUTION: 'maxResolution',\n  MIN_RESOLUTION: 'minResolution',\n  SOURCE: 'source'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/layer/Base\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport LayerProperty from './Property.js';\nimport {clamp} from '../math.js';\nimport {assign} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Note that with {@link module:ol/layer/Base} and all its subclasses, any property set in\n * the options is set as a {@link module:ol/Object} property on the layer object, so\n * is observable, and has get/set accessors.\n *\n * @api\n */\nvar BaseLayer = /*@__PURE__*/(function (BaseObject) {\n  function BaseLayer(options) {\n\n    BaseObject.call(this);\n\n    /**\n     * @type {Object<string, *>}\n     */\n    var properties = assign({}, options);\n    properties[LayerProperty.OPACITY] =\n       options.opacity !== undefined ? options.opacity : 1;\n    properties[LayerProperty.VISIBLE] =\n       options.visible !== undefined ? options.visible : true;\n    properties[LayerProperty.Z_INDEX] = options.zIndex;\n    properties[LayerProperty.MAX_RESOLUTION] =\n       options.maxResolution !== undefined ? options.maxResolution : Infinity;\n    properties[LayerProperty.MIN_RESOLUTION] =\n       options.minResolution !== undefined ? options.minResolution : 0;\n\n    this.setProperties(properties);\n\n    /**\n     * @type {import(\"./Layer.js\").State}\n     * @private\n     */\n    this.state_ = null;\n\n    /**\n     * The layer type.\n     * @type {import(\"../LayerType.js\").default}\n     * @protected;\n     */\n    this.type;\n\n  }\n\n  if ( BaseObject ) BaseLayer.__proto__ = BaseObject;\n  BaseLayer.prototype = Object.create( BaseObject && BaseObject.prototype );\n  BaseLayer.prototype.constructor = BaseLayer;\n\n  /**\n   * Get the layer type (used when creating a layer renderer).\n   * @return {import(\"../LayerType.js\").default} The layer type.\n   */\n  BaseLayer.prototype.getType = function getType () {\n    return this.type;\n  };\n\n  /**\n   * @return {import(\"./Layer.js\").State} Layer state.\n   */\n  BaseLayer.prototype.getLayerState = function getLayerState () {\n    /** @type {import(\"./Layer.js\").State} */\n    var state = this.state_ || /** @type {?} */ ({\n      layer: this,\n      managed: true\n    });\n    state.opacity = clamp(this.getOpacity(), 0, 1);\n    state.sourceState = this.getSourceState();\n    state.visible = this.getVisible();\n    state.extent = this.getExtent();\n    state.zIndex = this.getZIndex() || 0;\n    state.maxResolution = this.getMaxResolution();\n    state.minResolution = Math.max(this.getMinResolution(), 0);\n    this.state_ = state;\n\n    return state;\n  };\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").default>=} opt_array Array of layers (to be\n   *     modified in place).\n   * @return {Array<import(\"./Layer.js\").default>} Array of layers.\n   */\n  BaseLayer.prototype.getLayersArray = function getLayersArray (opt_array) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {Array<import(\"./Layer.js\").State>=} opt_states Optional list of layer\n   *     states (to be modified in place).\n   * @return {Array<import(\"./Layer.js\").State>} List of layer states.\n   */\n  BaseLayer.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n    return abstract();\n  };\n\n  /**\n   * Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it\n   * will be visible regardless of extent.\n   * @return {import(\"../extent.js\").Extent|undefined} The layer extent.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getExtent = function getExtent () {\n    return (\n      /** @type {import(\"../extent.js\").Extent|undefined} */ (this.get(LayerProperty.EXTENT))\n    );\n  };\n\n  /**\n   * Return the maximum resolution of the layer.\n   * @return {number} The maximum resolution of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getMaxResolution = function getMaxResolution () {\n    return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));\n  };\n\n  /**\n   * Return the minimum resolution of the layer.\n   * @return {number} The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getMinResolution = function getMinResolution () {\n    return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));\n  };\n\n  /**\n   * Return the opacity of the layer (between 0 and 1).\n   * @return {number} The opacity of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getOpacity = function getOpacity () {\n    return /** @type {number} */ (this.get(LayerProperty.OPACITY));\n  };\n\n  /**\n   * @abstract\n   * @return {import(\"../source/State.js\").default} Source state.\n   */\n  BaseLayer.prototype.getSourceState = function getSourceState () {\n    return abstract();\n  };\n\n  /**\n   * Return the visibility of the layer (`true` or `false`).\n   * @return {boolean} The visibility of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getVisible = function getVisible () {\n    return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));\n  };\n\n  /**\n   * Return the Z-index of the layer, which is used to order layers before\n   * rendering. The default Z-index is 0.\n   * @return {number} The Z-index of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.getZIndex = function getZIndex () {\n    return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));\n  };\n\n  /**\n   * Set the extent at which the layer is visible.  If `undefined`, the layer\n   * will be visible at all extents.\n   * @param {import(\"../extent.js\").Extent|undefined} extent The extent of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setExtent = function setExtent (extent) {\n    this.set(LayerProperty.EXTENT, extent);\n  };\n\n  /**\n   * Set the maximum resolution at which the layer is visible.\n   * @param {number} maxResolution The maximum resolution of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setMaxResolution = function setMaxResolution (maxResolution) {\n    this.set(LayerProperty.MAX_RESOLUTION, maxResolution);\n  };\n\n  /**\n   * Set the minimum resolution at which the layer is visible.\n   * @param {number} minResolution The minimum resolution of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setMinResolution = function setMinResolution (minResolution) {\n    this.set(LayerProperty.MIN_RESOLUTION, minResolution);\n  };\n\n  /**\n   * Set the opacity of the layer, allowed values range from 0 to 1.\n   * @param {number} opacity The opacity of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setOpacity = function setOpacity (opacity) {\n    this.set(LayerProperty.OPACITY, opacity);\n  };\n\n  /**\n   * Set the visibility of the layer (`true` or `false`).\n   * @param {boolean} visible The visibility of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setVisible = function setVisible (visible) {\n    this.set(LayerProperty.VISIBLE, visible);\n  };\n\n  /**\n   * Set Z-index of the layer, which is used to order layers before rendering.\n   * The default Z-index is 0.\n   * @param {number} zindex The z-index of the layer.\n   * @observable\n   * @api\n   */\n  BaseLayer.prototype.setZIndex = function setZIndex (zindex) {\n    this.set(LayerProperty.Z_INDEX, zindex);\n  };\n\n  return BaseLayer;\n}(BaseObject));\n\n\nexport default BaseLayer;\n\n//# sourceMappingURL=Base.js.map","/**\n * @module ol/source/State\n */\n\n/**\n * @enum {string}\n * State of the source, one of 'undefined', 'loading', 'ready' or 'error'.\n */\nexport default {\n  UNDEFINED: 'undefined',\n  LOADING: 'loading',\n  READY: 'ready',\n  ERROR: 'error'\n};\n\n//# sourceMappingURL=State.js.map","/**\n * @module ol/layer/Group\n */\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport {getChangeEventType} from '../Object.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getIntersection} from '../extent.js';\nimport BaseLayer from './Base.js';\nimport {assign, clear} from '../obj.js';\nimport SourceState from '../source/State.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {Array<import(\"./Base.js\").default>|import(\"../Collection.js\").default<import(\"./Base.js\").default>} [layers] Child layers.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n  LAYERS: 'layers'\n};\n\n\n/**\n * @classdesc\n * A {@link module:ol/Collection~Collection} of layers that are handled together.\n *\n * A generic `change` event is triggered when the group/Collection changes.\n *\n * @api\n */\nvar LayerGroup = /*@__PURE__*/(function (BaseLayer) {\n  function LayerGroup(opt_options) {\n\n    var options = opt_options || {};\n    var baseOptions = /** @type {Options} */ (assign({}, options));\n    delete baseOptions.layers;\n\n    var layers = options.layers;\n\n    BaseLayer.call(this, baseOptions);\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.layersListenerKeys_ = [];\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */\n    this.listenerKeys_ = {};\n\n    listen(this,\n      getChangeEventType(Property.LAYERS),\n      this.handleLayersChanged_, this);\n\n    if (layers) {\n      if (Array.isArray(layers)) {\n        layers = new Collection(layers.slice(), {unique: true});\n      } else {\n        assert(typeof /** @type {?} */ (layers).getArray === 'function',\n          43); // Expected `layers` to be an array or a `Collection`\n      }\n    } else {\n      layers = new Collection(undefined, {unique: true});\n    }\n\n    this.setLayers(layers);\n\n  }\n\n  if ( BaseLayer ) LayerGroup.__proto__ = BaseLayer;\n  LayerGroup.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n  LayerGroup.prototype.constructor = LayerGroup;\n\n  /**\n   * @private\n   */\n  LayerGroup.prototype.handleLayerChange_ = function handleLayerChange_ () {\n    this.changed();\n  };\n\n  /**\n   * @private\n   */\n  LayerGroup.prototype.handleLayersChanged_ = function handleLayersChanged_ () {\n    this.layersListenerKeys_.forEach(unlistenByKey);\n    this.layersListenerKeys_.length = 0;\n\n    var layers = this.getLayers();\n    this.layersListenerKeys_.push(\n      listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this),\n      listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this)\n    );\n\n    for (var id in this.listenerKeys_) {\n      this.listenerKeys_[id].forEach(unlistenByKey);\n    }\n    clear(this.listenerKeys_);\n\n    var layersArray = layers.getArray();\n    for (var i = 0, ii = layersArray.length; i < ii; i++) {\n      var layer = layersArray[i];\n      this.listenerKeys_[getUid(layer)] = [\n        listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n        listen(layer, EventType.CHANGE, this.handleLayerChange_, this)\n      ];\n    }\n\n    this.changed();\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n   * @private\n   */\n  LayerGroup.prototype.handleLayersAdd_ = function handleLayersAdd_ (collectionEvent) {\n    var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n    this.listenerKeys_[getUid(layer)] = [\n      listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),\n      listen(layer, EventType.CHANGE, this.handleLayerChange_, this)\n    ];\n    this.changed();\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} collectionEvent CollectionEvent.\n   * @private\n   */\n  LayerGroup.prototype.handleLayersRemove_ = function handleLayersRemove_ (collectionEvent) {\n    var layer = /** @type {import(\"./Base.js\").default} */ (collectionEvent.element);\n    var key = getUid(layer);\n    this.listenerKeys_[key].forEach(unlistenByKey);\n    delete this.listenerKeys_[key];\n    this.changed();\n  };\n\n  /**\n   * Returns the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @return {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} Collection of\n   *   {@link module:ol/layer/Base layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  LayerGroup.prototype.getLayers = function getLayers () {\n    return (\n      /** @type {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} */ (this.get(Property.LAYERS))\n    );\n  };\n\n  /**\n   * Set the {@link module:ol/Collection collection} of {@link module:ol/layer/Layer~Layer layers}\n   * in this group.\n   * @param {!import(\"../Collection.js\").default<import(\"./Base.js\").default>} layers Collection of\n   *   {@link module:ol/layer/Base layers} that are part of this group.\n   * @observable\n   * @api\n   */\n  LayerGroup.prototype.setLayers = function setLayers (layers) {\n    this.set(Property.LAYERS, layers);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LayerGroup.prototype.getLayersArray = function getLayersArray (opt_array) {\n    var array = opt_array !== undefined ? opt_array : [];\n    this.getLayers().forEach(function(layer) {\n      layer.getLayersArray(array);\n    });\n    return array;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LayerGroup.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n    var states = opt_states !== undefined ? opt_states : [];\n\n    var pos = states.length;\n\n    this.getLayers().forEach(function(layer) {\n      layer.getLayerStatesArray(states);\n    });\n\n    var ownLayerState = this.getLayerState();\n    for (var i = pos, ii = states.length; i < ii; i++) {\n      var layerState = states[i];\n      layerState.opacity *= ownLayerState.opacity;\n      layerState.visible = layerState.visible && ownLayerState.visible;\n      layerState.maxResolution = Math.min(\n        layerState.maxResolution, ownLayerState.maxResolution);\n      layerState.minResolution = Math.max(\n        layerState.minResolution, ownLayerState.minResolution);\n      if (ownLayerState.extent !== undefined) {\n        if (layerState.extent !== undefined) {\n          layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);\n        } else {\n          layerState.extent = ownLayerState.extent;\n        }\n      }\n    }\n\n    return states;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  LayerGroup.prototype.getSourceState = function getSourceState () {\n    return SourceState.READY;\n  };\n\n  return LayerGroup;\n}(BaseLayer));\n\n\nexport default LayerGroup;\n\n//# sourceMappingURL=Group.js.map","/**\n * @module ol/size\n */\n\n\n/**\n * An array of numbers representing a size: `[width, height]`.\n * @typedef {Array<number>} Size\n * @api\n */\n\n\n/**\n * Returns a buffered size.\n * @param {Size} size Size.\n * @param {number} num The amount by which to buffer.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The buffered size.\n */\nexport function buffer(size, num, opt_size) {\n  if (opt_size === undefined) {\n    opt_size = [0, 0];\n  }\n  opt_size[0] = size[0] + 2 * num;\n  opt_size[1] = size[1] + 2 * num;\n  return opt_size;\n}\n\n\n/**\n * Determines if a size has a positive area.\n * @param {Size} size The size to test.\n * @return {boolean} The size has a positive area.\n */\nexport function hasArea(size) {\n  return size[0] > 0 && size[1] > 0;\n}\n\n\n/**\n * Returns a size scaled by a ratio. The result will be an array of integers.\n * @param {Size} size Size.\n * @param {number} ratio Ratio.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} The scaled size.\n */\nexport function scale(size, ratio, opt_size) {\n  if (opt_size === undefined) {\n    opt_size = [0, 0];\n  }\n  opt_size[0] = (size[0] * ratio + 0.5) | 0;\n  opt_size[1] = (size[1] * ratio + 0.5) | 0;\n  return opt_size;\n}\n\n\n/**\n * Returns an `Size` array for the passed in number (meaning: square) or\n * `Size` array.\n * (meaning: non-square),\n * @param {number|Size} size Width and height.\n * @param {Size=} opt_size Optional reusable size array.\n * @return {Size} Size.\n * @api\n */\nexport function toSize(size, opt_size) {\n  if (Array.isArray(size)) {\n    return size;\n  } else {\n    if (opt_size === undefined) {\n      opt_size = [size, size];\n    } else {\n      opt_size[0] = opt_size[1] = /** @type {number} */ (size);\n    }\n    return opt_size;\n  }\n}\n\n//# sourceMappingURL=size.js.map","/**\n * @module ol/PluggableMap\n */\nimport {getUid} from './util.js';\nimport Collection from './Collection.js';\nimport CollectionEventType from './CollectionEventType.js';\nimport MapBrowserEvent from './MapBrowserEvent.js';\nimport MapBrowserEventHandler from './MapBrowserEventHandler.js';\nimport MapBrowserEventType from './MapBrowserEventType.js';\nimport MapEvent from './MapEvent.js';\nimport MapEventType from './MapEventType.js';\nimport MapProperty from './MapProperty.js';\nimport RenderEventType from './render/EventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport ObjectEventType from './ObjectEventType.js';\nimport TileQueue from './TileQueue.js';\nimport View from './View.js';\nimport ViewHint from './ViewHint.js';\nimport {assert} from './asserts.js';\nimport {removeNode} from './dom.js';\nimport {listen, unlistenByKey, unlisten} from './events.js';\nimport {stopPropagation} from './events/Event.js';\nimport EventType from './events/EventType.js';\nimport {createEmpty, clone, createOrUpdateEmpty, equals, getForViewAndSize, isEmpty} from './extent.js';\nimport {TRUE} from './functions.js';\nimport {DEVICE_PIXEL_RATIO, TOUCH} from './has.js';\nimport LayerGroup from './layer/Group.js';\nimport {hasArea} from './size.js';\nimport {DROP} from './structs/PriorityQueue.js';\nimport {create as createTransform, apply as applyTransform} from './transform.js';\n\n\n/**\n * State of the current frame. Only `pixelRatio`, `time` and `viewState` should\n * be used in applications.\n * @typedef {Object} FrameState\n * @property {number} pixelRatio The pixel ratio of the frame.\n * @property {number} time The time when rendering of the frame was requested.\n * @property {import(\"./View.js\").State} viewState The state of the current view.\n * @property {boolean} animate\n * @property {import(\"./transform.js\").Transform} coordinateToPixelTransform\n * @property {null|import(\"./extent.js\").Extent} extent\n * @property {import(\"./coordinate.js\").Coordinate} focus\n * @property {number} index\n * @property {Object<string, import(\"./layer/Layer.js\").State>} layerStates\n * @property {Array<import(\"./layer/Layer.js\").State>} layerStatesArray\n * @property {import(\"./transform.js\").Transform} pixelToCoordinateTransform\n * @property {Array<PostRenderFunction>} postRenderFunctions\n * @property {import(\"./size.js\").Size} size\n * @property {!Object<string, boolean>} skippedFeatureUids\n * @property {TileQueue} tileQueue\n * @property {Object<string, Object<string, import(\"./TileRange.js\").default>>} usedTiles\n * @property {Array<number>} viewHints\n * @property {!Object<string, Object<string, boolean>>} wantedTiles\n */\n\n\n/**\n * @typedef {function(PluggableMap, ?FrameState): boolean} PostRenderFunction\n */\n\n\n/**\n * @typedef {Object} AtPixelOptions\n * @property {undefined|function(import(\"./layer/Layer.js\").default): boolean} layerFilter Layer filter\n * function. The filter function will receive one argument, the\n * {@link module:ol/layer/Layer layer-candidate} and it should return a boolean value.\n * Only layers which are visible and for which this function returns `true`\n * will be tested for features. By default, all visible layers will be tested.\n * @property {number} [hitTolerance=0] Hit-detection tolerance in pixels. Pixels\n * inside the radius around the given position will be checked for features. This only\n * works for the canvas renderer and not for WebGL.\n */\n\n\n/**\n * @typedef {Object} MapOptionsInternal\n * @property {Collection<import(\"./control/Control.js\").default>} [controls]\n * @property {Collection<import(\"./interaction/Interaction.js\").default>} [interactions]\n * @property {HTMLElement|Document} keyboardEventTarget\n * @property {Collection<import(\"./Overlay.js\").default>} overlays\n * @property {Object<string, *>} values\n */\n\n\n/**\n * Object literal with config options for the map.\n * @typedef {Object} MapOptions\n * @property {Collection<import(\"./control/Control.js\").default>|Array<import(\"./control/Control.js\").default>} [controls]\n * Controls initially added to the map. If not specified,\n * {@link module:ol/control~defaults} is used.\n * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between\n * physical pixels and device-independent pixels (dips) on the device.\n * @property {Collection<import(\"./interaction/Interaction.js\").default>|Array<import(\"./interaction/Interaction.js\").default>} [interactions]\n * Interactions that are initially added to the map. If not specified,\n * {@link module:ol/interaction~defaults} is used.\n * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to\n * listen to keyboard events on. This determines when the `KeyboardPan` and\n * `KeyboardZoom` interactions trigger. For example, if this option is set to\n * `document` the keyboard interactions will always trigger. If this option is\n * not specified, the element the library listens to keyboard events on is the\n * map target (i.e. the user-provided div for the map). If this is not\n * `document`, the target element needs to be focused for key events to be\n * emitted, requiring that the target element has a `tabindex` attribute.\n * @property {Array<import(\"./layer/Base.js\").default>|Collection<import(\"./layer/Base.js\").default>|LayerGroup} [layers]\n * Layers. If this is not defined, a map with no layers will be rendered. Note\n * that layers are rendered in the order supplied, so if you want, for example,\n * a vector layer to appear on top of a tile layer, it must come after the tile\n * layer.\n * @property {number} [maxTilesLoading=16] Maximum number tiles to load\n * simultaneously.\n * @property {boolean} [loadTilesWhileAnimating=false] When set to `true`, tiles\n * will be loaded during animations. This may improve the user experience, but\n * can also make animations stutter on devices with slow memory.\n * @property {boolean} [loadTilesWhileInteracting=false] When set to `true`,\n * tiles will be loaded while interacting with the map. This may improve the\n * user experience, but can also make map panning and zooming choppy on devices\n * with slow memory.\n * @property {number} [moveTolerance=1] The minimum distance in pixels the\n * cursor must move to be detected as a map move event instead of a click.\n * Increasing this value can make it easier to click on the map.\n * @property {Collection<import(\"./Overlay.js\").default>|Array<import(\"./Overlay.js\").default>} [overlays]\n * Overlays initially added to the map. By default, no overlays are added.\n * @property {HTMLElement|string} [target] The container for the map, either the\n * element itself or the `id` of the element. If not specified at construction\n * time, {@link module:ol/Map~Map#setTarget} must be called for the map to be\n * rendered.\n * @property {View} [view] The map's view.  No layer sources will be\n * fetched unless this is specified at construction time or through\n * {@link module:ol/Map~Map#setView}.\n */\n\n\n/**\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @fires module:ol/render/Event~RenderEvent#rendercomplete\n * @api\n */\nvar PluggableMap = /*@__PURE__*/(function (BaseObject) {\n  function PluggableMap(options) {\n\n    BaseObject.call(this);\n\n    var optionsInternal = createOptionsInternal(options);\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.maxTilesLoading_ = options.maxTilesLoading !== undefined ? options.maxTilesLoading : 16;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.loadTilesWhileAnimating_ =\n        options.loadTilesWhileAnimating !== undefined ?\n          options.loadTilesWhileAnimating : false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.loadTilesWhileInteracting_ =\n        options.loadTilesWhileInteracting !== undefined ?\n          options.loadTilesWhileInteracting : false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = options.pixelRatio !== undefined ?\n      options.pixelRatio : DEVICE_PIXEL_RATIO;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.animationDelayKey_;\n\n    /**\n     * @private\n     */\n    this.animationDelay_ = function() {\n      this.animationDelayKey_ = undefined;\n      this.renderFrame_.call(this, Date.now());\n    }.bind(this);\n\n    /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */\n    this.coordinateToPixelTransform_ = createTransform();\n\n    /**\n     * @private\n     * @type {import(\"./transform.js\").Transform}\n     */\n    this.pixelToCoordinateTransform_ = createTransform();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.frameIndex_ = 0;\n\n    /**\n     * @private\n     * @type {?FrameState}\n     */\n    this.frameState_ = null;\n\n    /**\n     * The extent at the previous 'moveend' event.\n     * @private\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.previousExtent_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.viewPropertyListenerKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.viewChangeListenerKey_ = null;\n\n    /**\n     * @private\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.layerGroupPropertyListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {!HTMLElement}\n     */\n    this.viewport_ = document.createElement('div');\n    this.viewport_.className = 'ol-viewport' + (TOUCH ? ' ol-touch' : '');\n    this.viewport_.style.position = 'relative';\n    this.viewport_.style.overflow = 'hidden';\n    this.viewport_.style.width = '100%';\n    this.viewport_.style.height = '100%';\n    // prevent page zoom on IE >= 10 browsers\n    this.viewport_.style.msTouchAction = 'none';\n    this.viewport_.style.touchAction = 'none';\n\n    /**\n     * @private\n     * @type {!HTMLElement}\n     */\n    this.overlayContainer_ = document.createElement('div');\n    this.overlayContainer_.className = 'ol-overlaycontainer';\n    this.viewport_.appendChild(this.overlayContainer_);\n\n    /**\n     * @private\n     * @type {!HTMLElement}\n     */\n    this.overlayContainerStopEvent_ = document.createElement('div');\n    this.overlayContainerStopEvent_.className = 'ol-overlaycontainer-stopevent';\n    var overlayEvents = [\n      EventType.CLICK,\n      EventType.DBLCLICK,\n      EventType.MOUSEDOWN,\n      EventType.TOUCHSTART,\n      EventType.MSPOINTERDOWN,\n      MapBrowserEventType.POINTERDOWN,\n      EventType.MOUSEWHEEL,\n      EventType.WHEEL\n    ];\n    for (var i = 0, ii = overlayEvents.length; i < ii; ++i) {\n      listen(this.overlayContainerStopEvent_, overlayEvents[i], stopPropagation);\n    }\n    this.viewport_.appendChild(this.overlayContainerStopEvent_);\n\n    /**\n     * @private\n     * @type {MapBrowserEventHandler}\n     */\n    this.mapBrowserEventHandler_ = new MapBrowserEventHandler(this, options.moveTolerance);\n    for (var key in MapBrowserEventType) {\n      listen(this.mapBrowserEventHandler_, MapBrowserEventType[key],\n        this.handleMapBrowserEvent, this);\n    }\n\n    /**\n     * @private\n     * @type {HTMLElement|Document}\n     */\n    this.keyboardEventTarget_ = optionsInternal.keyboardEventTarget;\n\n    /**\n     * @private\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.keyHandlerKeys_ = null;\n\n    listen(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n    listen(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n    listen(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\n\n    /**\n     * @type {Collection<import(\"./control/Control.js\").default>}\n     * @protected\n     */\n    this.controls = optionsInternal.controls || new Collection();\n\n    /**\n     * @type {Collection<import(\"./interaction/Interaction.js\").default>}\n     * @protected\n     */\n    this.interactions = optionsInternal.interactions || new Collection();\n\n    /**\n     * @type {Collection<import(\"./Overlay.js\").default>}\n     * @private\n     */\n    this.overlays_ = optionsInternal.overlays;\n\n    /**\n     * A lookup of overlays by id.\n     * @private\n     * @type {Object<string, import(\"./Overlay.js\").default>}\n     */\n    this.overlayIdIndex_ = {};\n\n    /**\n     * @type {import(\"./renderer/Map.js\").default}\n     * @private\n     */\n    this.renderer_ = this.createRenderer();\n\n    /**\n     * @type {function(Event)|undefined}\n     * @private\n     */\n    this.handleResize_;\n\n    /**\n     * @private\n     * @type {import(\"./coordinate.js\").Coordinate}\n     */\n    this.focus_ = null;\n\n    /**\n     * @private\n     * @type {!Array<PostRenderFunction>}\n     */\n    this.postRenderFunctions_ = [];\n\n    /**\n     * @private\n     * @type {TileQueue}\n     */\n    this.tileQueue_ = new TileQueue(\n      this.getTilePriority.bind(this),\n      this.handleTileChange_.bind(this));\n\n    /**\n     * Uids of features to skip at rendering time.\n     * @type {Object<string, boolean>}\n     * @private\n     */\n    this.skippedFeatureUids_ = {};\n\n    listen(\n      this, getChangeEventType(MapProperty.LAYERGROUP),\n      this.handleLayerGroupChanged_, this);\n    listen(this, getChangeEventType(MapProperty.VIEW),\n      this.handleViewChanged_, this);\n    listen(this, getChangeEventType(MapProperty.SIZE),\n      this.handleSizeChanged_, this);\n    listen(this, getChangeEventType(MapProperty.TARGET),\n      this.handleTargetChanged_, this);\n\n    // setProperties will trigger the rendering of the map if the map\n    // is \"defined\" already.\n    this.setProperties(optionsInternal.values);\n\n    this.controls.forEach(\n      /**\n       * @param {import(\"./control/Control.js\").default} control Control.\n       * @this {PluggableMap}\n       */\n      (function(control) {\n        control.setMap(this);\n      }).bind(this));\n\n    listen(this.controls, CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        event.element.setMap(this);\n      }, this);\n\n    listen(this.controls, CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        event.element.setMap(null);\n      }, this);\n\n    this.interactions.forEach(\n      /**\n       * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction.\n       * @this {PluggableMap}\n       */\n      (function(interaction) {\n        interaction.setMap(this);\n      }).bind(this));\n\n    listen(this.interactions, CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        event.element.setMap(this);\n      }, this);\n\n    listen(this.interactions, CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        event.element.setMap(null);\n      }, this);\n\n    this.overlays_.forEach(this.addOverlayInternal_.bind(this));\n\n    listen(this.overlays_, CollectionEventType.ADD,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        this.addOverlayInternal_(/** @type {import(\"./Overlay.js\").default} */ (event.element));\n      }, this);\n\n    listen(this.overlays_, CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"./Collection.js\").CollectionEvent} event CollectionEvent.\n       */\n      function(event) {\n        var overlay = /** @type {import(\"./Overlay.js\").default} */ (event.element);\n        var id = overlay.getId();\n        if (id !== undefined) {\n          delete this.overlayIdIndex_[id.toString()];\n        }\n        event.element.setMap(null);\n      }, this);\n\n  }\n\n  if ( BaseObject ) PluggableMap.__proto__ = BaseObject;\n  PluggableMap.prototype = Object.create( BaseObject && BaseObject.prototype );\n  PluggableMap.prototype.constructor = PluggableMap;\n\n  /**\n   * @abstract\n   * @return {import(\"./renderer/Map.js\").default} The map renderer\n   */\n  PluggableMap.prototype.createRenderer = function createRenderer () {\n    throw new Error('Use a map type that has a createRenderer method');\n  };\n\n  /**\n   * Add the given control to the map.\n   * @param {import(\"./control/Control.js\").default} control Control.\n   * @api\n   */\n  PluggableMap.prototype.addControl = function addControl (control) {\n    this.getControls().push(control);\n  };\n\n  /**\n   * Add the given interaction to the map.\n   * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to add.\n   * @api\n   */\n  PluggableMap.prototype.addInteraction = function addInteraction (interaction) {\n    this.getInteractions().push(interaction);\n  };\n\n  /**\n   * Adds the given layer to the top of this map. If you want to add a layer\n   * elsewhere in the stack, use `getLayers()` and the methods available on\n   * {@link module:ol/Collection~Collection}.\n   * @param {import(\"./layer/Base.js\").default} layer Layer.\n   * @api\n   */\n  PluggableMap.prototype.addLayer = function addLayer (layer) {\n    var layers = this.getLayerGroup().getLayers();\n    layers.push(layer);\n  };\n\n  /**\n   * Add the given overlay to the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @api\n   */\n  PluggableMap.prototype.addOverlay = function addOverlay (overlay) {\n    this.getOverlays().push(overlay);\n  };\n\n  /**\n   * This deals with map's overlay collection changes.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @private\n   */\n  PluggableMap.prototype.addOverlayInternal_ = function addOverlayInternal_ (overlay) {\n    var id = overlay.getId();\n    if (id !== undefined) {\n      this.overlayIdIndex_[id.toString()] = overlay;\n    }\n    overlay.setMap(this);\n  };\n\n  /**\n   *\n   * @inheritDoc\n   */\n  PluggableMap.prototype.disposeInternal = function disposeInternal () {\n    this.mapBrowserEventHandler_.dispose();\n    unlisten(this.viewport_, EventType.CONTEXTMENU, this.handleBrowserEvent, this);\n    unlisten(this.viewport_, EventType.WHEEL, this.handleBrowserEvent, this);\n    unlisten(this.viewport_, EventType.MOUSEWHEEL, this.handleBrowserEvent, this);\n    if (this.handleResize_ !== undefined) {\n      removeEventListener(EventType.RESIZE, this.handleResize_, false);\n      this.handleResize_ = undefined;\n    }\n    if (this.animationDelayKey_) {\n      cancelAnimationFrame(this.animationDelayKey_);\n      this.animationDelayKey_ = undefined;\n    }\n    this.setTarget(null);\n    BaseObject.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * Detect features that intersect a pixel on the viewport, and execute a\n   * callback with each intersecting feature. Layers included in the detection can\n   * be configured through the `layerFilter` option in `opt_options`.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {function(this: S, import(\"./Feature.js\").FeatureLike,\n   *     import(\"./layer/Layer.js\").default): T} callback Feature callback. The callback will be\n   *     called with two arguments. The first argument is one\n   *     {@link module:ol/Feature feature} or\n   *     {@link module:ol/render/Feature render feature} at the pixel, the second is\n   *     the {@link module:ol/layer/Layer layer} of the feature and will be null for\n   *     unmanaged layers. To stop detection, callback functions can return a\n   *     truthy value.\n   * @param {AtPixelOptions=} opt_options Optional options.\n   * @return {T|undefined} Callback result, i.e. the return value of last\n   * callback execution, or the first truthy callback return value.\n   * @template S,T\n   * @api\n   */\n  PluggableMap.prototype.forEachFeatureAtPixel = function forEachFeatureAtPixel (pixel, callback, opt_options) {\n    if (!this.frameState_) {\n      return;\n    }\n    var coordinate = this.getCoordinateFromPixel(pixel);\n    opt_options = opt_options !== undefined ? opt_options :\n      /** @type {AtPixelOptions} */ ({});\n    var hitTolerance = opt_options.hitTolerance !== undefined ?\n      opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n    var layerFilter = opt_options.layerFilter !== undefined ?\n      opt_options.layerFilter : TRUE;\n    return this.renderer_.forEachFeatureAtCoordinate(\n      coordinate, this.frameState_, hitTolerance, callback, null,\n      layerFilter, null);\n  };\n\n  /**\n   * Get all features that intersect a pixel on the viewport.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions=} opt_options Optional options.\n   * @return {Array<import(\"./Feature.js\").FeatureLike>} The detected features or\n   * `null` if none were found.\n   * @api\n   */\n  PluggableMap.prototype.getFeaturesAtPixel = function getFeaturesAtPixel (pixel, opt_options) {\n    var features = null;\n    this.forEachFeatureAtPixel(pixel, function(feature) {\n      if (!features) {\n        features = [];\n      }\n      features.push(feature);\n    }, opt_options);\n    return features;\n  };\n\n  /**\n   * Detect layers that have a color value at a pixel on the viewport, and\n   * execute a callback with each matching layer. Layers included in the\n   * detection can be configured through `opt_layerFilter`.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {function(this: S, import(\"./layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback\n   *     Layer callback. This callback will receive two arguments: first is the\n   *     {@link module:ol/layer/Layer layer}, second argument is an array representing\n   *     [R, G, B, A] pixel values (0 - 255) and will be `null` for layer types\n   *     that do not currently support this argument. To stop detection, callback\n   *     functions can return a truthy value.\n   * @param {AtPixelOptions=} opt_options Configuration options.\n   * @return {T|undefined} Callback result, i.e. the return value of last\n   * callback execution, or the first truthy callback return value.\n   * @template S,T\n   * @api\n   */\n  PluggableMap.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, callback, opt_options) {\n    if (!this.frameState_) {\n      return;\n    }\n    var options = opt_options || /** @type {AtPixelOptions} */ ({});\n    var hitTolerance = options.hitTolerance !== undefined ?\n      opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n    var layerFilter = options.layerFilter || TRUE;\n    return this.renderer_.forEachLayerAtPixel(\n      pixel, this.frameState_, hitTolerance, callback, null, layerFilter, null);\n  };\n\n  /**\n   * Detect if features intersect a pixel on the viewport. Layers included in the\n   * detection can be configured through `opt_layerFilter`.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel.\n   * @param {AtPixelOptions=} opt_options Optional options.\n   * @return {boolean} Is there a feature at the given pixel?\n   * @template U\n   * @api\n   */\n  PluggableMap.prototype.hasFeatureAtPixel = function hasFeatureAtPixel (pixel, opt_options) {\n    if (!this.frameState_) {\n      return false;\n    }\n    var coordinate = this.getCoordinateFromPixel(pixel);\n    opt_options = opt_options !== undefined ? opt_options :\n      /** @type {AtPixelOptions} */ ({});\n    var layerFilter = opt_options.layerFilter !== undefined ? opt_options.layerFilter : TRUE;\n    var hitTolerance = opt_options.hitTolerance !== undefined ?\n      opt_options.hitTolerance * this.frameState_.pixelRatio : 0;\n    return this.renderer_.hasFeatureAtCoordinate(\n      coordinate, this.frameState_, hitTolerance, layerFilter, null);\n  };\n\n  /**\n   * Returns the coordinate in view projection for a browser event.\n   * @param {Event} event Event.\n   * @return {import(\"./coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  PluggableMap.prototype.getEventCoordinate = function getEventCoordinate (event) {\n    return this.getCoordinateFromPixel(this.getEventPixel(event));\n  };\n\n  /**\n   * Returns the map pixel position for a browser event relative to the viewport.\n   * @param {Event|TouchEvent} event Event.\n   * @return {import(\"./pixel.js\").Pixel} Pixel.\n   * @api\n   */\n  PluggableMap.prototype.getEventPixel = function getEventPixel (event) {\n    var viewportPosition = this.viewport_.getBoundingClientRect();\n    var eventPosition = 'changedTouches' in event ?\n      /** @type {TouchEvent} */ (event).changedTouches[0] :\n      /** @type {MouseEvent} */ (event);\n\n    return [\n      eventPosition.clientX - viewportPosition.left,\n      eventPosition.clientY - viewportPosition.top\n    ];\n  };\n\n  /**\n   * Get the target in which this map is rendered.\n   * Note that this returns what is entered as an option or in setTarget:\n   * if that was an element, it returns an element; if a string, it returns that.\n   * @return {HTMLElement|string|undefined} The Element or id of the Element that the\n   *     map is rendered in.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.getTarget = function getTarget () {\n    return /** @type {HTMLElement|string|undefined} */ (this.get(MapProperty.TARGET));\n  };\n\n  /**\n   * Get the DOM element into which this map is rendered. In contrast to\n   * `getTarget` this method always return an `Element`, or `null` if the\n   * map has no target.\n   * @return {HTMLElement} The element that the map is rendered in.\n   * @api\n   */\n  PluggableMap.prototype.getTargetElement = function getTargetElement () {\n    var target = this.getTarget();\n    if (target !== undefined) {\n      return typeof target === 'string' ? document.getElementById(target) : target;\n    } else {\n      return null;\n    }\n  };\n\n  /**\n   * Get the coordinate for a given pixel.  This returns a coordinate in the\n   * map view projection.\n   * @param {import(\"./pixel.js\").Pixel} pixel Pixel position in the map viewport.\n   * @return {import(\"./coordinate.js\").Coordinate} The coordinate for the pixel position.\n   * @api\n   */\n  PluggableMap.prototype.getCoordinateFromPixel = function getCoordinateFromPixel (pixel) {\n    var frameState = this.frameState_;\n    if (!frameState) {\n      return null;\n    } else {\n      return applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n    }\n  };\n\n  /**\n   * Get the map controls. Modifying this collection changes the controls\n   * associated with the map.\n   * @return {Collection<import(\"./control/Control.js\").default>} Controls.\n   * @api\n   */\n  PluggableMap.prototype.getControls = function getControls () {\n    return this.controls;\n  };\n\n  /**\n   * Get the map overlays. Modifying this collection changes the overlays\n   * associated with the map.\n   * @return {Collection<import(\"./Overlay.js\").default>} Overlays.\n   * @api\n   */\n  PluggableMap.prototype.getOverlays = function getOverlays () {\n    return this.overlays_;\n  };\n\n  /**\n   * Get an overlay by its identifier (the value returned by overlay.getId()).\n   * Note that the index treats string and numeric identifiers as the same. So\n   * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.\n   * @param {string|number} id Overlay identifier.\n   * @return {import(\"./Overlay.js\").default} Overlay.\n   * @api\n   */\n  PluggableMap.prototype.getOverlayById = function getOverlayById (id) {\n    var overlay = this.overlayIdIndex_[id.toString()];\n    return overlay !== undefined ? overlay : null;\n  };\n\n  /**\n   * Get the map interactions. Modifying this collection changes the interactions\n   * associated with the map.\n   *\n   * Interactions are used for e.g. pan, zoom and rotate.\n   * @return {Collection<import(\"./interaction/Interaction.js\").default>} Interactions.\n   * @api\n   */\n  PluggableMap.prototype.getInteractions = function getInteractions () {\n    return this.interactions;\n  };\n\n  /**\n   * Get the layergroup associated with this map.\n   * @return {LayerGroup} A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.getLayerGroup = function getLayerGroup () {\n    return (\n      /** @type {LayerGroup} */ (this.get(MapProperty.LAYERGROUP))\n    );\n  };\n\n  /**\n   * Get the collection of layers associated with this map.\n   * @return {!Collection<import(\"./layer/Base.js\").default>} Layers.\n   * @api\n   */\n  PluggableMap.prototype.getLayers = function getLayers () {\n    var layers = this.getLayerGroup().getLayers();\n    return layers;\n  };\n\n  /**\n   * Get the pixel for a coordinate.  This takes a coordinate in the map view\n   * projection and returns the corresponding pixel.\n   * @param {import(\"./coordinate.js\").Coordinate} coordinate A map coordinate.\n   * @return {import(\"./pixel.js\").Pixel} A pixel position in the map viewport.\n   * @api\n   */\n  PluggableMap.prototype.getPixelFromCoordinate = function getPixelFromCoordinate (coordinate) {\n    var frameState = this.frameState_;\n    if (!frameState) {\n      return null;\n    } else {\n      return applyTransform(frameState.coordinateToPixelTransform, coordinate.slice(0, 2));\n    }\n  };\n\n  /**\n   * Get the map renderer.\n   * @return {import(\"./renderer/Map.js\").default} Renderer\n   */\n  PluggableMap.prototype.getRenderer = function getRenderer () {\n    return this.renderer_;\n  };\n\n  /**\n   * Get the size of this map.\n   * @return {import(\"./size.js\").Size|undefined} The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.getSize = function getSize () {\n    return (\n      /** @type {import(\"./size.js\").Size|undefined} */ (this.get(MapProperty.SIZE))\n    );\n  };\n\n  /**\n   * Get the view associated with this map. A view manages properties such as\n   * center and resolution.\n   * @return {View} The view that controls this map.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.getView = function getView () {\n    return (\n      /** @type {View} */ (this.get(MapProperty.VIEW))\n    );\n  };\n\n  /**\n   * Get the element that serves as the map viewport.\n   * @return {HTMLElement} Viewport.\n   * @api\n   */\n  PluggableMap.prototype.getViewport = function getViewport () {\n    return this.viewport_;\n  };\n\n  /**\n   * Get the element that serves as the container for overlays.  Elements added to\n   * this container will let mousedown and touchstart events through to the map,\n   * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}\n   * events.\n   * @return {!HTMLElement} The map's overlay container.\n   */\n  PluggableMap.prototype.getOverlayContainer = function getOverlayContainer () {\n    return this.overlayContainer_;\n  };\n\n  /**\n   * Get the element that serves as a container for overlays that don't allow\n   * event propagation. Elements added to this container won't let mousedown and\n   * touchstart events through to the map, so clicks and gestures on an overlay\n   * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.\n   * @return {!HTMLElement} The map's overlay container that stops events.\n   */\n  PluggableMap.prototype.getOverlayContainerStopEvent = function getOverlayContainerStopEvent () {\n    return this.overlayContainerStopEvent_;\n  };\n\n  /**\n   * @param {import(\"./Tile.js\").default} tile Tile.\n   * @param {string} tileSourceKey Tile source key.\n   * @param {import(\"./coordinate.js\").Coordinate} tileCenter Tile center.\n   * @param {number} tileResolution Tile resolution.\n   * @return {number} Tile priority.\n   */\n  PluggableMap.prototype.getTilePriority = function getTilePriority (tile, tileSourceKey, tileCenter, tileResolution) {\n    // Filter out tiles at higher zoom levels than the current zoom level, or that\n    // are outside the visible extent.\n    var frameState = this.frameState_;\n    if (!frameState || !(tileSourceKey in frameState.wantedTiles)) {\n      return DROP;\n    }\n    if (!frameState.wantedTiles[tileSourceKey][tile.getKey()]) {\n      return DROP;\n    }\n    // Prioritize the highest zoom level tiles closest to the focus.\n    // Tiles at higher zoom levels are prioritized using Math.log(tileResolution).\n    // Within a zoom level, tiles are prioritized by the distance in pixels\n    // between the center of the tile and the focus.  The factor of 65536 means\n    // that the prioritization should behave as desired for tiles up to\n    // 65536 * Math.log(2) = 45426 pixels from the focus.\n    var deltaX = tileCenter[0] - frameState.focus[0];\n    var deltaY = tileCenter[1] - frameState.focus[1];\n    return 65536 * Math.log(tileResolution) +\n        Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n  };\n\n  /**\n   * @param {Event} browserEvent Browser event.\n   * @param {string=} opt_type Type.\n   */\n  PluggableMap.prototype.handleBrowserEvent = function handleBrowserEvent (browserEvent, opt_type) {\n    var type = opt_type || browserEvent.type;\n    var mapBrowserEvent = new MapBrowserEvent(type, this, browserEvent);\n    this.handleMapBrowserEvent(mapBrowserEvent);\n  };\n\n  /**\n   * @param {MapBrowserEvent} mapBrowserEvent The event to handle.\n   */\n  PluggableMap.prototype.handleMapBrowserEvent = function handleMapBrowserEvent (mapBrowserEvent) {\n    if (!this.frameState_) {\n      // With no view defined, we cannot translate pixels into geographical\n      // coordinates so interactions cannot be used.\n      return;\n    }\n    this.focus_ = mapBrowserEvent.coordinate;\n    mapBrowserEvent.frameState = this.frameState_;\n    var interactionsArray = this.getInteractions().getArray();\n    if (this.dispatchEvent(mapBrowserEvent) !== false) {\n      for (var i = interactionsArray.length - 1; i >= 0; i--) {\n        var interaction = interactionsArray[i];\n        if (!interaction.getActive()) {\n          continue;\n        }\n        var cont = interaction.handleEvent(mapBrowserEvent);\n        if (!cont) {\n          break;\n        }\n      }\n    }\n  };\n\n  /**\n   * @protected\n   */\n  PluggableMap.prototype.handlePostRender = function handlePostRender () {\n\n    var frameState = this.frameState_;\n\n    // Manage the tile queue\n    // Image loads are expensive and a limited resource, so try to use them\n    // efficiently:\n    // * When the view is static we allow a large number of parallel tile loads\n    //   to complete the frame as quickly as possible.\n    // * When animating or interacting, image loads can cause janks, so we reduce\n    //   the maximum number of loads per frame and limit the number of parallel\n    //   tile loads to remain reactive to view changes and to reduce the chance of\n    //   loading tiles that will quickly disappear from view.\n    var tileQueue = this.tileQueue_;\n    if (!tileQueue.isEmpty()) {\n      var maxTotalLoading = this.maxTilesLoading_;\n      var maxNewLoads = maxTotalLoading;\n      if (frameState) {\n        var hints = frameState.viewHints;\n        if (hints[ViewHint.ANIMATING]) {\n          maxTotalLoading = this.loadTilesWhileAnimating_ ? 8 : 0;\n          maxNewLoads = 2;\n        }\n        if (hints[ViewHint.INTERACTING]) {\n          maxTotalLoading = this.loadTilesWhileInteracting_ ? 8 : 0;\n          maxNewLoads = 2;\n        }\n      }\n      if (tileQueue.getTilesLoading() < maxTotalLoading) {\n        tileQueue.reprioritize(); // FIXME only call if view has changed\n        tileQueue.loadMoreTiles(maxTotalLoading, maxNewLoads);\n      }\n    }\n    if (frameState && this.hasListener(RenderEventType.RENDERCOMPLETE) && !frameState.animate &&\n        !this.tileQueue_.getTilesLoading() && !getLoading(this.getLayers().getArray())) {\n      this.renderer_.dispatchRenderEvent(RenderEventType.RENDERCOMPLETE, frameState);\n    }\n\n    var postRenderFunctions = this.postRenderFunctions_;\n    for (var i = 0, ii = postRenderFunctions.length; i < ii; ++i) {\n      postRenderFunctions[i](this, frameState);\n    }\n    postRenderFunctions.length = 0;\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleSizeChanged_ = function handleSizeChanged_ () {\n    this.render();\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleTargetChanged_ = function handleTargetChanged_ () {\n    // target may be undefined, null, a string or an Element.\n    // If it's a string we convert it to an Element before proceeding.\n    // If it's not now an Element we remove the viewport from the DOM.\n    // If it's an Element we append the viewport element to it.\n\n    var targetElement;\n    if (this.getTarget()) {\n      targetElement = this.getTargetElement();\n    }\n\n    if (this.keyHandlerKeys_) {\n      for (var i = 0, ii = this.keyHandlerKeys_.length; i < ii; ++i) {\n        unlistenByKey(this.keyHandlerKeys_[i]);\n      }\n      this.keyHandlerKeys_ = null;\n    }\n\n    if (!targetElement) {\n      this.renderer_.removeLayerRenderers();\n      removeNode(this.viewport_);\n      if (this.handleResize_ !== undefined) {\n        removeEventListener(EventType.RESIZE, this.handleResize_, false);\n        this.handleResize_ = undefined;\n      }\n    } else {\n      targetElement.appendChild(this.viewport_);\n\n      var keyboardEventTarget = !this.keyboardEventTarget_ ?\n        targetElement : this.keyboardEventTarget_;\n      this.keyHandlerKeys_ = [\n        listen(keyboardEventTarget, EventType.KEYDOWN, this.handleBrowserEvent, this),\n        listen(keyboardEventTarget, EventType.KEYPRESS, this.handleBrowserEvent, this)\n      ];\n\n      if (!this.handleResize_) {\n        this.handleResize_ = this.updateSize.bind(this);\n        window.addEventListener(EventType.RESIZE, this.handleResize_, false);\n      }\n    }\n\n    this.updateSize();\n    // updateSize calls setSize, so no need to call this.render\n    // ourselves here.\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleTileChange_ = function handleTileChange_ () {\n    this.render();\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleViewPropertyChanged_ = function handleViewPropertyChanged_ () {\n    this.render();\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleViewChanged_ = function handleViewChanged_ () {\n    if (this.viewPropertyListenerKey_) {\n      unlistenByKey(this.viewPropertyListenerKey_);\n      this.viewPropertyListenerKey_ = null;\n    }\n    if (this.viewChangeListenerKey_) {\n      unlistenByKey(this.viewChangeListenerKey_);\n      this.viewChangeListenerKey_ = null;\n    }\n    var view = this.getView();\n    if (view) {\n      this.viewport_.setAttribute('data-view', getUid(view));\n      this.viewPropertyListenerKey_ = listen(\n        view, ObjectEventType.PROPERTYCHANGE,\n        this.handleViewPropertyChanged_, this);\n      this.viewChangeListenerKey_ = listen(\n        view, EventType.CHANGE,\n        this.handleViewPropertyChanged_, this);\n    }\n    this.render();\n  };\n\n  /**\n   * @private\n   */\n  PluggableMap.prototype.handleLayerGroupChanged_ = function handleLayerGroupChanged_ () {\n    if (this.layerGroupPropertyListenerKeys_) {\n      this.layerGroupPropertyListenerKeys_.forEach(unlistenByKey);\n      this.layerGroupPropertyListenerKeys_ = null;\n    }\n    var layerGroup = this.getLayerGroup();\n    if (layerGroup) {\n      this.layerGroupPropertyListenerKeys_ = [\n        listen(\n          layerGroup, ObjectEventType.PROPERTYCHANGE,\n          this.render, this),\n        listen(\n          layerGroup, EventType.CHANGE,\n          this.render, this)\n      ];\n    }\n    this.render();\n  };\n\n  /**\n   * @return {boolean} Is rendered.\n   */\n  PluggableMap.prototype.isRendered = function isRendered () {\n    return !!this.frameState_;\n  };\n\n  /**\n   * Requests an immediate render in a synchronous manner.\n   * @api\n   */\n  PluggableMap.prototype.renderSync = function renderSync () {\n    if (this.animationDelayKey_) {\n      cancelAnimationFrame(this.animationDelayKey_);\n    }\n    this.animationDelay_();\n  };\n\n  /**\n   * Request a map rendering (at the next animation frame).\n   * @api\n   */\n  PluggableMap.prototype.render = function render () {\n    if (this.animationDelayKey_ === undefined) {\n      this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_);\n    }\n  };\n\n  /**\n   * Remove the given control from the map.\n   * @param {import(\"./control/Control.js\").default} control Control.\n   * @return {import(\"./control/Control.js\").default|undefined} The removed control (or undefined\n   *     if the control was not found).\n   * @api\n   */\n  PluggableMap.prototype.removeControl = function removeControl (control) {\n    return this.getControls().remove(control);\n  };\n\n  /**\n   * Remove the given interaction from the map.\n   * @param {import(\"./interaction/Interaction.js\").default} interaction Interaction to remove.\n   * @return {import(\"./interaction/Interaction.js\").default|undefined} The removed interaction (or\n   *     undefined if the interaction was not found).\n   * @api\n   */\n  PluggableMap.prototype.removeInteraction = function removeInteraction (interaction) {\n    return this.getInteractions().remove(interaction);\n  };\n\n  /**\n   * Removes the given layer from the map.\n   * @param {import(\"./layer/Base.js\").default} layer Layer.\n   * @return {import(\"./layer/Base.js\").default|undefined} The removed layer (or undefined if the\n   *     layer was not found).\n   * @api\n   */\n  PluggableMap.prototype.removeLayer = function removeLayer (layer) {\n    var layers = this.getLayerGroup().getLayers();\n    return layers.remove(layer);\n  };\n\n  /**\n   * Remove the given overlay from the map.\n   * @param {import(\"./Overlay.js\").default} overlay Overlay.\n   * @return {import(\"./Overlay.js\").default|undefined} The removed overlay (or undefined\n   *     if the overlay was not found).\n   * @api\n   */\n  PluggableMap.prototype.removeOverlay = function removeOverlay (overlay) {\n    return this.getOverlays().remove(overlay);\n  };\n\n  /**\n   * @param {number} time Time.\n   * @private\n   */\n  PluggableMap.prototype.renderFrame_ = function renderFrame_ (time) {\n    var viewState;\n\n    var size = this.getSize();\n    var view = this.getView();\n    var extent = createEmpty();\n    var previousFrameState = this.frameState_;\n    /** @type {?FrameState} */\n    var frameState = null;\n    if (size !== undefined && hasArea(size) && view && view.isDef()) {\n      var viewHints = view.getHints(this.frameState_ ? this.frameState_.viewHints : undefined);\n      var layerStatesArray = this.getLayerGroup().getLayerStatesArray();\n      var layerStates = {};\n      for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n        layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];\n      }\n      viewState = view.getState(this.pixelRatio_);\n      frameState = /** @type {FrameState} */ ({\n        animate: false,\n        coordinateToPixelTransform: this.coordinateToPixelTransform_,\n        extent: extent,\n        focus: this.focus_ ? this.focus_ : viewState.center,\n        index: this.frameIndex_++,\n        layerStates: layerStates,\n        layerStatesArray: layerStatesArray,\n        pixelRatio: this.pixelRatio_,\n        pixelToCoordinateTransform: this.pixelToCoordinateTransform_,\n        postRenderFunctions: [],\n        size: size,\n        skippedFeatureUids: this.skippedFeatureUids_,\n        tileQueue: this.tileQueue_,\n        time: time,\n        usedTiles: {},\n        viewState: viewState,\n        viewHints: viewHints,\n        wantedTiles: {}\n      });\n    }\n\n    if (frameState) {\n      frameState.extent = getForViewAndSize(viewState.center,\n        viewState.resolution, viewState.rotation, frameState.size, extent);\n    }\n\n    this.frameState_ = frameState;\n    this.renderer_.renderFrame(frameState);\n\n    if (frameState) {\n      if (frameState.animate) {\n        this.render();\n      }\n      Array.prototype.push.apply(this.postRenderFunctions_, frameState.postRenderFunctions);\n\n      if (previousFrameState) {\n        var moveStart = !this.previousExtent_ ||\n                    (!isEmpty(this.previousExtent_) &&\n                    !equals(frameState.extent, this.previousExtent_));\n        if (moveStart) {\n          this.dispatchEvent(\n            new MapEvent(MapEventType.MOVESTART, this, previousFrameState));\n          this.previousExtent_ = createOrUpdateEmpty(this.previousExtent_);\n        }\n      }\n\n      var idle = this.previousExtent_ &&\n          !frameState.viewHints[ViewHint.ANIMATING] &&\n          !frameState.viewHints[ViewHint.INTERACTING] &&\n          !equals(frameState.extent, this.previousExtent_);\n\n      if (idle) {\n        this.dispatchEvent(new MapEvent(MapEventType.MOVEEND, this, frameState));\n        clone(frameState.extent, this.previousExtent_);\n      }\n    }\n\n    this.dispatchEvent(new MapEvent(MapEventType.POSTRENDER, this, frameState));\n\n    setTimeout(this.handlePostRender.bind(this), 0);\n\n  };\n\n  /**\n   * Sets the layergroup of this map.\n   * @param {LayerGroup} layerGroup A layer group containing the layers in this map.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.setLayerGroup = function setLayerGroup (layerGroup) {\n    this.set(MapProperty.LAYERGROUP, layerGroup);\n  };\n\n  /**\n   * Set the size of this map.\n   * @param {import(\"./size.js\").Size|undefined} size The size in pixels of the map in the DOM.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.setSize = function setSize (size) {\n    this.set(MapProperty.SIZE, size);\n  };\n\n  /**\n   * Set the target element to render this map into.\n   * @param {HTMLElement|string|undefined} target The Element or id of the Element\n   *     that the map is rendered in.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.setTarget = function setTarget (target) {\n    this.set(MapProperty.TARGET, target);\n  };\n\n  /**\n   * Set the view for this map.\n   * @param {View} view The view that controls this map.\n   * @observable\n   * @api\n   */\n  PluggableMap.prototype.setView = function setView (view) {\n    this.set(MapProperty.VIEW, view);\n  };\n\n  /**\n   * @param {import(\"./Feature.js\").default} feature Feature.\n   */\n  PluggableMap.prototype.skipFeature = function skipFeature (feature) {\n    this.skippedFeatureUids_[getUid(feature)] = true;\n    this.render();\n  };\n\n  /**\n   * Force a recalculation of the map viewport size.  This should be called when\n   * third-party code changes the size of the map viewport.\n   * @api\n   */\n  PluggableMap.prototype.updateSize = function updateSize () {\n    var targetElement = this.getTargetElement();\n\n    if (!targetElement) {\n      this.setSize(undefined);\n    } else {\n      var computedStyle = getComputedStyle(targetElement);\n      this.setSize([\n        targetElement.offsetWidth -\n            parseFloat(computedStyle['borderLeftWidth']) -\n            parseFloat(computedStyle['paddingLeft']) -\n            parseFloat(computedStyle['paddingRight']) -\n            parseFloat(computedStyle['borderRightWidth']),\n        targetElement.offsetHeight -\n            parseFloat(computedStyle['borderTopWidth']) -\n            parseFloat(computedStyle['paddingTop']) -\n            parseFloat(computedStyle['paddingBottom']) -\n            parseFloat(computedStyle['borderBottomWidth'])\n      ]);\n    }\n  };\n\n  /**\n   * @param {import(\"./Feature.js\").default} feature Feature.\n   */\n  PluggableMap.prototype.unskipFeature = function unskipFeature (feature) {\n    delete this.skippedFeatureUids_[getUid(feature)];\n    this.render();\n  };\n\n  return PluggableMap;\n}(BaseObject));\n\n\n/**\n * @param {MapOptions} options Map options.\n * @return {MapOptionsInternal} Internal map options.\n */\nfunction createOptionsInternal(options) {\n\n  /**\n   * @type {HTMLElement|Document}\n   */\n  var keyboardEventTarget = null;\n  if (options.keyboardEventTarget !== undefined) {\n    keyboardEventTarget = typeof options.keyboardEventTarget === 'string' ?\n      document.getElementById(options.keyboardEventTarget) :\n      options.keyboardEventTarget;\n  }\n\n  /**\n   * @type {Object<string, *>}\n   */\n  var values = {};\n\n  var layerGroup = options.layers && typeof /** @type {?} */ (options.layers).getLayers === 'function' ?\n    /** @type {LayerGroup} */ (options.layers) : new LayerGroup({layers: /** @type {Collection} */ (options.layers)});\n  values[MapProperty.LAYERGROUP] = layerGroup;\n\n  values[MapProperty.TARGET] = options.target;\n\n  values[MapProperty.VIEW] = options.view !== undefined ?\n    options.view : new View();\n\n  var controls;\n  if (options.controls !== undefined) {\n    if (Array.isArray(options.controls)) {\n      controls = new Collection(options.controls.slice());\n    } else {\n      assert(typeof /** @type {?} */ (options.controls).getArray === 'function',\n        47); // Expected `controls` to be an array or an `import(\"./Collection.js\").Collection`\n      controls = /** @type {Collection} */ (options.controls);\n    }\n  }\n\n  var interactions;\n  if (options.interactions !== undefined) {\n    if (Array.isArray(options.interactions)) {\n      interactions = new Collection(options.interactions.slice());\n    } else {\n      assert(typeof /** @type {?} */ (options.interactions).getArray === 'function',\n        48); // Expected `interactions` to be an array or an `import(\"./Collection.js\").Collection`\n      interactions = /** @type {Collection} */ (options.interactions);\n    }\n  }\n\n  var overlays;\n  if (options.overlays !== undefined) {\n    if (Array.isArray(options.overlays)) {\n      overlays = new Collection(options.overlays.slice());\n    } else {\n      assert(typeof /** @type {?} */ (options.overlays).getArray === 'function',\n        49); // Expected `overlays` to be an array or an `import(\"./Collection.js\").Collection`\n      overlays = options.overlays;\n    }\n  } else {\n    overlays = new Collection();\n  }\n\n  return {\n    controls: controls,\n    interactions: interactions,\n    keyboardEventTarget: keyboardEventTarget,\n    overlays: overlays,\n    values: values\n  };\n\n}\nexport default PluggableMap;\n\n/**\n * @param  {Array<import(\"./layer/Base.js\").default>} layers Layers.\n * @return {boolean} Layers have sources that are still loading.\n */\nfunction getLoading(layers) {\n  for (var i = 0, ii = layers.length; i < ii; ++i) {\n    var layer = layers[i];\n    if (typeof /** @type {?} */ (layer).getLayers === 'function') {\n      return getLoading(/** @type {LayerGroup} */ (layer).getLayers().getArray());\n    } else {\n      var source = /** @type {import(\"./layer/Layer.js\").default} */ (\n        layer).getSource();\n      if (source && source.loading) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n//# sourceMappingURL=PluggableMap.js.map","/**\n * @module ol/control/Control\n */\nimport {VOID} from '../functions.js';\nimport MapEventType from '../MapEventType.js';\nimport BaseObject from '../Object.js';\nimport {removeNode} from '../dom.js';\nimport {listen, unlistenByKey} from '../events.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {HTMLElement} [element] The element is the control's\n * container element. This only needs to be specified if you're developing\n * a custom control.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want\n * the control to be rendered outside of the map's viewport.\n */\n\n\n/**\n * @classdesc\n * A control is a visible widget with a DOM element in a fixed position on the\n * screen. They can involve user input (buttons), or be informational only;\n * the position is determined using CSS. By default these are placed in the\n * container with CSS class name `ol-overlaycontainer-stopevent`, but can use\n * any outside DOM element.\n *\n * This is the base class for controls. You can use it for simple custom\n * controls by creating the element with listeners, creating an instance:\n * ```js\n * var myControl = new Control({element: myElement});\n * ```\n * and then adding this to the map.\n *\n * The main advantage of having this as a control rather than a simple separate\n * DOM element is that preventing propagation is handled for you. Controls\n * will also be objects in a {@link module:ol/Collection~Collection}, so you can use their methods.\n *\n * You can also extend this base for your own control class. See\n * examples/custom-controls for an example of how to do this.\n *\n * @api\n */\nvar Control = /*@__PURE__*/(function (BaseObject) {\n  function Control(options) {\n\n    BaseObject.call(this);\n\n    /**\n     * @protected\n     * @type {HTMLElement}\n     */\n    this.element = options.element ? options.element : null;\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.target_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../PluggableMap.js\").default}\n     */\n    this.map_ = null;\n\n    /**\n     * @protected\n     * @type {!Array<import(\"../events.js\").EventsKey>}\n     */\n    this.listenerKeys = [];\n\n    /**\n     * @type {function(import(\"../MapEvent.js\").default)}\n     */\n    this.render = options.render ? options.render : VOID;\n\n    if (options.target) {\n      this.setTarget(options.target);\n    }\n\n  }\n\n  if ( BaseObject ) Control.__proto__ = BaseObject;\n  Control.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Control.prototype.constructor = Control;\n\n  /**\n   * @inheritDoc\n   */\n  Control.prototype.disposeInternal = function disposeInternal () {\n    removeNode(this.element);\n    BaseObject.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * Get the map associated with this control.\n   * @return {import(\"../PluggableMap.js\").default} Map.\n   * @api\n   */\n  Control.prototype.getMap = function getMap () {\n    return this.map_;\n  };\n\n  /**\n   * Remove the control from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @api\n   */\n  Control.prototype.setMap = function setMap (map) {\n    if (this.map_) {\n      removeNode(this.element);\n    }\n    for (var i = 0, ii = this.listenerKeys.length; i < ii; ++i) {\n      unlistenByKey(this.listenerKeys[i]);\n    }\n    this.listenerKeys.length = 0;\n    this.map_ = map;\n    if (this.map_) {\n      var target = this.target_ ?\n        this.target_ : map.getOverlayContainerStopEvent();\n      target.appendChild(this.element);\n      if (this.render !== VOID) {\n        this.listenerKeys.push(listen(map,\n          MapEventType.POSTRENDER, this.render, this));\n      }\n      map.render();\n    }\n  };\n\n  /**\n   * This function is used to set a target element for the control. It has no\n   * effect if it is called after the control has been added to the map (i.e.\n   * after `setMap` is called on the control). If no `target` is set in the\n   * options passed to the control constructor and if `setTarget` is not called\n   * then the control is added to the map's overlay container.\n   * @param {HTMLElement|string} target Target.\n   * @api\n   */\n  Control.prototype.setTarget = function setTarget (target) {\n    this.target_ = typeof target === 'string' ?\n      document.getElementById(target) :\n      target;\n  };\n\n  return Control;\n}(BaseObject));\n\n\nexport default Control;\n\n//# sourceMappingURL=Control.js.map","/**\n * @module ol/css\n */\n\n\n/**\n * The CSS class for hidden feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_HIDDEN = 'ol-hidden';\n\n\n/**\n * The CSS class that we'll give the DOM elements to have them selectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_SELECTABLE = 'ol-selectable';\n\n\n/**\n * The CSS class that we'll give the DOM elements to have them unselectable.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSELECTABLE = 'ol-unselectable';\n\n\n/**\n * The CSS class for unsupported feature.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_UNSUPPORTED = 'ol-unsupported';\n\n\n/**\n * The CSS class for controls.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_CONTROL = 'ol-control';\n\n\n/**\n * The CSS class that we'll give the DOM elements that are collapsed, i.e.\n * to those elements which usually can be expanded.\n *\n * @const\n * @type {string}\n */\nexport var CLASS_COLLAPSED = 'ol-collapsed';\n\n\n/**\n * Get the list of font families from a font spec.  Note that this doesn't work\n * for font families that have commas in them.\n * @param {string} The CSS font property.\n * @return {Object<string>} The font families (or null if the input spec is invalid).\n */\nexport var getFontFamilies = (function() {\n  var style;\n  var cache = {};\n  return function(font) {\n    if (!style) {\n      style = document.createElement('div').style;\n    }\n    if (!(font in cache)) {\n      style.font = font;\n      var family = style.fontFamily;\n      style.font = '';\n      if (!family) {\n        return null;\n      }\n      cache[font] = family.split(/,\\s?/);\n    }\n    return cache[font];\n  };\n})();\n\n//# sourceMappingURL=css.js.map","/**\n * @module ol/layer/Layer\n */\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getUid} from '../util.js';\nimport {getChangeEventType} from '../Object.js';\nimport BaseLayer from './Base.js';\nimport LayerProperty from './Property.js';\nimport {assign} from '../obj.js';\nimport RenderEventType from '../render/EventType.js';\nimport SourceState from '../source/State.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {import(\"../source/Source.js\").default} [source] Source for this layer.  If not provided to the constructor,\n * the source can be set by calling {@link module:ol/layer/Layer#setSource layer.setSource(source)} after\n * construction.\n * @property {import(\"../PluggableMap.js\").default} [map] Map.\n */\n\n\n/**\n * @typedef {Object} State\n * @property {import(\"./Base.js\").default} layer\n * @property {number} opacity\n * @property {SourceState} sourceState\n * @property {boolean} visible\n * @property {boolean} managed\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {number} zIndex\n * @property {number} maxResolution\n * @property {number} minResolution\n */\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * A visual representation of raster or vector map data.\n * Layers group together those properties that pertain to how the data is to be\n * displayed, irrespective of the source of that data.\n *\n * Layers are usually added to a map with {@link module:ol/Map#addLayer}. Components\n * like {@link module:ol/interaction/Select~Select} use unmanaged layers\n * internally. These unmanaged layers are associated with the map using\n * {@link module:ol/layer/Layer~Layer#setMap} instead.\n *\n * A generic `change` event is fired when the state of the source changes.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n */\nvar Layer = /*@__PURE__*/(function (BaseLayer) {\n  function Layer(options) {\n\n    var baseOptions = assign({}, options);\n    delete baseOptions.source;\n\n    BaseLayer.call(this, baseOptions);\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapPrecomposeKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.mapRenderKey_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceChangeKey_ = null;\n\n    if (options.map) {\n      this.setMap(options.map);\n    }\n\n    listen(this,\n      getChangeEventType(LayerProperty.SOURCE),\n      this.handleSourcePropertyChange_, this);\n\n    var source = options.source ? options.source : null;\n    this.setSource(source);\n  }\n\n  if ( BaseLayer ) Layer.__proto__ = BaseLayer;\n  Layer.prototype = Object.create( BaseLayer && BaseLayer.prototype );\n  Layer.prototype.constructor = Layer;\n\n  /**\n   * @inheritDoc\n   */\n  Layer.prototype.getLayersArray = function getLayersArray (opt_array) {\n    var array = opt_array ? opt_array : [];\n    array.push(this);\n    return array;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Layer.prototype.getLayerStatesArray = function getLayerStatesArray (opt_states) {\n    var states = opt_states ? opt_states : [];\n    states.push(this.getLayerState());\n    return states;\n  };\n\n  /**\n   * Get the layer source.\n   * @return {import(\"../source/Source.js\").default} The layer source (or `null` if not yet set).\n   * @observable\n   * @api\n   */\n  Layer.prototype.getSource = function getSource () {\n    var source = this.get(LayerProperty.SOURCE);\n    return (\n      /** @type {import(\"../source/Source.js\").default} */ (source) || null\n    );\n  };\n\n  /**\n    * @inheritDoc\n    */\n  Layer.prototype.getSourceState = function getSourceState () {\n    var source = this.getSource();\n    return !source ? SourceState.UNDEFINED : source.getState();\n  };\n\n  /**\n   * @private\n   */\n  Layer.prototype.handleSourceChange_ = function handleSourceChange_ () {\n    this.changed();\n  };\n\n  /**\n   * @private\n   */\n  Layer.prototype.handleSourcePropertyChange_ = function handleSourcePropertyChange_ () {\n    if (this.sourceChangeKey_) {\n      unlistenByKey(this.sourceChangeKey_);\n      this.sourceChangeKey_ = null;\n    }\n    var source = this.getSource();\n    if (source) {\n      this.sourceChangeKey_ = listen(source,\n        EventType.CHANGE, this.handleSourceChange_, this);\n    }\n    this.changed();\n  };\n\n  /**\n   * Sets the layer to be rendered on top of other layers on a map. The map will\n   * not manage this layer in its layers collection, and the callback in\n   * {@link module:ol/Map#forEachLayerAtPixel} will receive `null` as layer. This\n   * is useful for temporary layers. To remove an unmanaged layer from the map,\n   * use `#setMap(null)`.\n   *\n   * To add the layer to a map and have it managed by the map, use\n   * {@link module:ol/Map#addLayer} instead.\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @api\n   */\n  Layer.prototype.setMap = function setMap (map) {\n    if (this.mapPrecomposeKey_) {\n      unlistenByKey(this.mapPrecomposeKey_);\n      this.mapPrecomposeKey_ = null;\n    }\n    if (!map) {\n      this.changed();\n    }\n    if (this.mapRenderKey_) {\n      unlistenByKey(this.mapRenderKey_);\n      this.mapRenderKey_ = null;\n    }\n    if (map) {\n      this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function(evt) {\n        var renderEvent = /** @type {import(\"../render/Event.js\").default} */ (evt);\n        var layerState = this.getLayerState();\n        layerState.managed = false;\n        if (this.getZIndex() === undefined) {\n          layerState.zIndex = Infinity;\n        }\n        renderEvent.frameState.layerStatesArray.push(layerState);\n        renderEvent.frameState.layerStates[getUid(this)] = layerState;\n      }, this);\n      this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);\n      this.changed();\n    }\n  };\n\n  /**\n   * Set the layer source.\n   * @param {import(\"../source/Source.js\").default} source The layer source.\n   * @observable\n   * @api\n   */\n  Layer.prototype.setSource = function setSource (source) {\n    this.set(LayerProperty.SOURCE, source);\n  };\n\n  return Layer;\n}(BaseLayer));\n\n\n/**\n * Return `true` if the layer is visible, and if the passed resolution is\n * between the layer's minResolution and maxResolution. The comparison is\n * inclusive for `minResolution` and exclusive for `maxResolution`.\n * @param {State} layerState Layer state.\n * @param {number} resolution Resolution.\n * @return {boolean} The layer is visible at the given resolution.\n */\nexport function visibleAtResolution(layerState, resolution) {\n  return layerState.visible && resolution >= layerState.minResolution &&\n      resolution < layerState.maxResolution;\n}\n\n\nexport default Layer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/control/Attribution\n */\nimport {equals} from '../array.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js';\nimport {removeChildren, replaceNode} from '../dom.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-attribution'] CSS class name.\n * @property {HTMLElement|string} [target] Specify a target if you\n * want the control to be rendered outside of the map's\n * viewport.\n * @property {boolean} [collapsible] Specify if attributions can\n * be collapsed. If not specified, sources control this behavior with their\n * `attributionsCollapsible` setting.\n * @property {boolean} [collapsed=true] Specify if attributions should\n * be collapsed at startup.\n * @property {string} [tipLabel='Attributions'] Text label to use for the button tip.\n * @property {string} [label='i'] Text label to use for the\n * collapsed attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [collapseLabel='»'] Text label to use\n * for the expanded attributions button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when\n * the control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n */\n\n\n/**\n * @classdesc\n * Control to show all the attributions associated with the layer sources\n * in the map. This control is one of the default controls included in maps.\n * By default it will show in the bottom right portion of the map, but this can\n * be changed by using a css selector for `.ol-attribution`.\n *\n * @api\n */\nvar Attribution = /*@__PURE__*/(function (Control) {\n  function Attribution(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      render: options.render || render,\n      target: options.target\n    });\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.ulElement_ = document.createElement('ul');\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overrideCollapsible_ = options.collapsible !== undefined;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.collapsible_ = options.collapsible !== undefined ?\n      options.collapsible : true;\n\n    if (!this.collapsible_) {\n      this.collapsed_ = false;\n    }\n\n    var className = options.className !== undefined ? options.className : 'ol-attribution';\n\n    var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Attributions';\n\n    var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00BB';\n\n    if (typeof collapseLabel === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.collapseLabel_ = document.createElement('span');\n      this.collapseLabel_.textContent = collapseLabel;\n    } else {\n      this.collapseLabel_ = collapseLabel;\n    }\n\n    var label = options.label !== undefined ? options.label : 'i';\n\n    if (typeof label === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.label_ = document.createElement('span');\n      this.label_.textContent = label;\n    } else {\n      this.label_ = label;\n    }\n\n\n    var activeLabel = (this.collapsible_ && !this.collapsed_) ?\n      this.collapseLabel_ : this.label_;\n    var button = document.createElement('button');\n    button.setAttribute('type', 'button');\n    button.title = tipLabel;\n    button.appendChild(activeLabel);\n\n    listen(button, EventType.CLICK, this.handleClick_, this);\n\n    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL +\n        (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n        (this.collapsible_ ? '' : ' ol-uncollapsible');\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(this.ulElement_);\n    element.appendChild(button);\n\n    /**\n     * A list of currently rendered resolutions.\n     * @type {Array<string>}\n     * @private\n     */\n    this.renderedAttributions_ = [];\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = true;\n\n  }\n\n  if ( Control ) Attribution.__proto__ = Control;\n  Attribution.prototype = Object.create( Control && Control.prototype );\n  Attribution.prototype.constructor = Attribution;\n\n  /**\n   * Collect a list of visible attributions and set the collapsible state.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {Array<string>} Attributions.\n   * @private\n   */\n  Attribution.prototype.collectSourceAttributions_ = function collectSourceAttributions_ (frameState) {\n    /**\n     * Used to determine if an attribution already exists.\n     * @type {!Object<string, boolean>}\n     */\n    var lookup = {};\n\n    /**\n     * A list of visible attributions.\n     * @type {Array<string>}\n     */\n    var visibleAttributions = [];\n\n    var layerStatesArray = frameState.layerStatesArray;\n    var resolution = frameState.viewState.resolution;\n    for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      var layerState = layerStatesArray[i];\n      if (!visibleAtResolution(layerState, resolution)) {\n        continue;\n      }\n\n      var source = /** @type {import(\"../layer/Layer.js\").default} */ (layerState.layer).getSource();\n      if (!source) {\n        continue;\n      }\n\n      var attributionGetter = source.getAttributions();\n      if (!attributionGetter) {\n        continue;\n      }\n\n      var attributions = attributionGetter(frameState);\n      if (!attributions) {\n        continue;\n      }\n\n      if (!this.overrideCollapsible_ && source.getAttributionsCollapsible() === false) {\n        this.setCollapsible(false);\n      }\n\n      if (Array.isArray(attributions)) {\n        for (var j = 0, jj = attributions.length; j < jj; ++j) {\n          if (!(attributions[j] in lookup)) {\n            visibleAttributions.push(attributions[j]);\n            lookup[attributions[j]] = true;\n          }\n        }\n      } else {\n        if (!(attributions in lookup)) {\n          visibleAttributions.push(attributions);\n          lookup[attributions] = true;\n        }\n      }\n    }\n    return visibleAttributions;\n  };\n\n  /**\n   * @private\n   * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   */\n  Attribution.prototype.updateElement_ = function updateElement_ (frameState) {\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        this.element.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    var attributions = this.collectSourceAttributions_(frameState);\n\n    var visible = attributions.length > 0;\n    if (this.renderedVisible_ != visible) {\n      this.element.style.display = visible ? '' : 'none';\n      this.renderedVisible_ = visible;\n    }\n\n    if (equals(attributions, this.renderedAttributions_)) {\n      return;\n    }\n\n    removeChildren(this.ulElement_);\n\n    // append the attributions\n    for (var i = 0, ii = attributions.length; i < ii; ++i) {\n      var element = document.createElement('li');\n      element.innerHTML = attributions[i];\n      this.ulElement_.appendChild(element);\n    }\n\n    this.renderedAttributions_ = attributions;\n  };\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  Attribution.prototype.handleClick_ = function handleClick_ (event) {\n    event.preventDefault();\n    this.handleToggle_();\n  };\n\n  /**\n   * @private\n   */\n  Attribution.prototype.handleToggle_ = function handleToggle_ () {\n    this.element.classList.toggle(CLASS_COLLAPSED);\n    if (this.collapsed_) {\n      replaceNode(this.collapseLabel_, this.label_);\n    } else {\n      replaceNode(this.label_, this.collapseLabel_);\n    }\n    this.collapsed_ = !this.collapsed_;\n  };\n\n  /**\n   * Return `true` if the attribution is collapsible, `false` otherwise.\n   * @return {boolean} True if the widget is collapsible.\n   * @api\n   */\n  Attribution.prototype.getCollapsible = function getCollapsible () {\n    return this.collapsible_;\n  };\n\n  /**\n   * Set whether the attribution should be collapsible.\n   * @param {boolean} collapsible True if the widget is collapsible.\n   * @api\n   */\n  Attribution.prototype.setCollapsible = function setCollapsible (collapsible) {\n    if (this.collapsible_ === collapsible) {\n      return;\n    }\n    this.collapsible_ = collapsible;\n    this.element.classList.toggle('ol-uncollapsible');\n    if (!collapsible && this.collapsed_) {\n      this.handleToggle_();\n    }\n  };\n\n  /**\n   * Collapse or expand the attribution according to the passed parameter. Will\n   * not do anything if the attribution isn't collapsible or if the current\n   * collapsed state is already the one requested.\n   * @param {boolean} collapsed True if the widget is collapsed.\n   * @api\n   */\n  Attribution.prototype.setCollapsed = function setCollapsed (collapsed) {\n    if (!this.collapsible_ || this.collapsed_ === collapsed) {\n      return;\n    }\n    this.handleToggle_();\n  };\n\n  /**\n   * Return `true` when the attribution is currently collapsed or `false`\n   * otherwise.\n   * @return {boolean} True if the widget is collapsed.\n   * @api\n   */\n  Attribution.prototype.getCollapsed = function getCollapsed () {\n    return this.collapsed_;\n  };\n\n  return Attribution;\n}(Control));\n\n\n/**\n * Update the attribution element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Attribution}\n * @api\n */\nexport function render(mapEvent) {\n  this.updateElement_(mapEvent.frameState);\n}\n\n\nexport default Attribution;\n\n//# sourceMappingURL=Attribution.js.map","/**\n * @module ol/control/Rotate\n */\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_HIDDEN, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-rotate'] CSS class name.\n * @property {string|HTMLElement} [label='⇧'] Text label to use for the rotate button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {boolean} [autoHide=true] Hide the control when rotation is 0.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when the control should\n * be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {function()} [resetNorth] Function called when the control is clicked.\n * This will override the default `resetNorth`.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n\n/**\n * @classdesc\n * A button control to reset rotation to 0.\n * To style this control use css selector `.ol-rotate`. A `.ol-hidden` css\n * selector is added to the button when the rotation is 0.\n *\n * @api\n */\nvar Rotate = /*@__PURE__*/(function (Control) {\n  function Rotate(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      render: options.render || render,\n      target: options.target\n    });\n\n    var className = options.className !== undefined ? options.className : 'ol-rotate';\n\n    var label = options.label !== undefined ? options.label : '\\u21E7';\n\n    /**\n     * @type {HTMLElement}\n     * @private\n     */\n    this.label_ = null;\n\n    if (typeof label === 'string') {\n      this.label_ = document.createElement('span');\n      this.label_.className = 'ol-compass';\n      this.label_.textContent = label;\n    } else {\n      this.label_ = label;\n      this.label_.classList.add('ol-compass');\n    }\n\n    var tipLabel = options.tipLabel ? options.tipLabel : 'Reset rotation';\n\n    var button = document.createElement('button');\n    button.className = className + '-reset';\n    button.setAttribute('type', 'button');\n    button.title = tipLabel;\n    button.appendChild(this.label_);\n\n    listen(button, EventType.CLICK, this.handleClick_, this);\n\n    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(button);\n\n    this.callResetNorth_ = options.resetNorth ? options.resetNorth : undefined;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.autoHide_ = options.autoHide !== undefined ? options.autoHide : true;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = undefined;\n\n    if (this.autoHide_) {\n      this.element.classList.add(CLASS_HIDDEN);\n    }\n\n  }\n\n  if ( Control ) Rotate.__proto__ = Control;\n  Rotate.prototype = Object.create( Control && Control.prototype );\n  Rotate.prototype.constructor = Rotate;\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  Rotate.prototype.handleClick_ = function handleClick_ (event) {\n    event.preventDefault();\n    if (this.callResetNorth_ !== undefined) {\n      this.callResetNorth_();\n    } else {\n      this.resetNorth_();\n    }\n  };\n\n  /**\n   * @private\n   */\n  Rotate.prototype.resetNorth_ = function resetNorth_ () {\n    var map = this.getMap();\n    var view = map.getView();\n    if (!view) {\n      // the map does not have a view, so we can't act\n      // upon it\n      return;\n    }\n    if (view.getRotation() !== undefined) {\n      if (this.duration_ > 0) {\n        view.animate({\n          rotation: 0,\n          duration: this.duration_,\n          easing: easeOut\n        });\n      } else {\n        view.setRotation(0);\n      }\n    }\n  };\n\n  return Rotate;\n}(Control));\n\n\n/**\n * Update the rotate control element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {Rotate}\n * @api\n */\nexport function render(mapEvent) {\n  var frameState = mapEvent.frameState;\n  if (!frameState) {\n    return;\n  }\n  var rotation = frameState.viewState.rotation;\n  if (rotation != this.rotation_) {\n    var transform = 'rotate(' + rotation + 'rad)';\n    if (this.autoHide_) {\n      var contains = this.element.classList.contains(CLASS_HIDDEN);\n      if (!contains && rotation === 0) {\n        this.element.classList.add(CLASS_HIDDEN);\n      } else if (contains && rotation !== 0) {\n        this.element.classList.remove(CLASS_HIDDEN);\n      }\n    }\n    this.label_.style.msTransform = transform;\n    this.label_.style.webkitTransform = transform;\n    this.label_.style.transform = transform;\n  }\n  this.rotation_ = rotation;\n}\n\nexport default Rotate;\n\n//# sourceMappingURL=Rotate.js.map","/**\n * @module ol/control/Zoom\n */\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {string} [className='ol-zoom'] CSS class name.\n * @property {string|HTMLElement} [zoomInLabel='+'] Text label to use for the zoom-in\n * button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|HTMLElement} [zoomOutLabel='-'] Text label to use for the zoom-out button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [zoomInTipLabel='Zoom in'] Text label to use for the button tip.\n * @property {string} [zoomOutTipLabel='Zoom out'] Text label to use for the button tip.\n * @property {number} [delta=1] The zoom delta applied on each click.\n * @property {HTMLElement|string} [target] Specify a target if you want the control to be\n * rendered outside of the map's viewport.\n */\n\n\n/**\n * @classdesc\n * A control with 2 buttons, one for zoom in and one for zoom out.\n * This control is one of the default controls of a map. To style this control\n * use css selectors `.ol-zoom-in` and `.ol-zoom-out`.\n *\n * @api\n */\nvar Zoom = /*@__PURE__*/(function (Control) {\n  function Zoom(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      target: options.target\n    });\n\n    var className = options.className !== undefined ? options.className : 'ol-zoom';\n\n    var delta = options.delta !== undefined ? options.delta : 1;\n\n    var zoomInLabel = options.zoomInLabel !== undefined ? options.zoomInLabel : '+';\n    var zoomOutLabel = options.zoomOutLabel !== undefined ? options.zoomOutLabel : '\\u2212';\n\n    var zoomInTipLabel = options.zoomInTipLabel !== undefined ?\n      options.zoomInTipLabel : 'Zoom in';\n    var zoomOutTipLabel = options.zoomOutTipLabel !== undefined ?\n      options.zoomOutTipLabel : 'Zoom out';\n\n    var inElement = document.createElement('button');\n    inElement.className = className + '-in';\n    inElement.setAttribute('type', 'button');\n    inElement.title = zoomInTipLabel;\n    inElement.appendChild(\n      typeof zoomInLabel === 'string' ? document.createTextNode(zoomInLabel) : zoomInLabel\n    );\n\n    listen(inElement, EventType.CLICK, this.handleClick_.bind(this, delta));\n\n    var outElement = document.createElement('button');\n    outElement.className = className + '-out';\n    outElement.setAttribute('type', 'button');\n    outElement.title = zoomOutTipLabel;\n    outElement.appendChild(\n      typeof zoomOutLabel === 'string' ? document.createTextNode(zoomOutLabel) : zoomOutLabel\n    );\n\n    listen(outElement, EventType.CLICK, this.handleClick_.bind(this, -delta));\n\n    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(inElement);\n    element.appendChild(outElement);\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n  }\n\n  if ( Control ) Zoom.__proto__ = Control;\n  Zoom.prototype = Object.create( Control && Control.prototype );\n  Zoom.prototype.constructor = Zoom;\n\n  /**\n   * @param {number} delta Zoom delta.\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  Zoom.prototype.handleClick_ = function handleClick_ (delta, event) {\n    event.preventDefault();\n    this.zoomByDelta_(delta);\n  };\n\n  /**\n   * @param {number} delta Zoom delta.\n   * @private\n   */\n  Zoom.prototype.zoomByDelta_ = function zoomByDelta_ (delta) {\n    var map = this.getMap();\n    var view = map.getView();\n    if (!view) {\n      // the map does not have a view, so we can't act\n      // upon it\n      return;\n    }\n    var currentResolution = view.getResolution();\n    if (currentResolution) {\n      var newResolution = view.constrainResolution(currentResolution, delta);\n      if (this.duration_ > 0) {\n        if (view.getAnimating()) {\n          view.cancelAnimations();\n        }\n        view.animate({\n          resolution: newResolution,\n          duration: this.duration_,\n          easing: easeOut\n        });\n      } else {\n        view.setResolution(newResolution);\n      }\n    }\n  };\n\n  return Zoom;\n}(Control));\n\n\nexport default Zoom;\n\n//# sourceMappingURL=Zoom.js.map","/**\n * @module ol/control/util\n */\nimport Collection from '../Collection.js';\nimport Attribution from './Attribution.js';\nimport Rotate from './Rotate.js';\nimport Zoom from './Zoom.js';\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [attribution=true] Include\n * {@link module:ol/control/Attribution~Attribution}.\n * @property {import(\"./Attribution.js\").Options} [attributionOptions]\n * Options for {@link module:ol/control/Attribution~Attribution}.\n * @property {boolean} [rotate=true] Include\n * {@link module:ol/control/Rotate~Rotate}.\n * @property {import(\"./Rotate.js\").Options} [rotateOptions] Options\n * for {@link module:ol/control/Rotate~Rotate}.\n * @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.\n * @property {import(\"./Zoom.js\").Options} [zoomOptions] Options for\n * {@link module:ol/control/Zoom~Zoom}.\n * @api\n */\n\n\n/**\n * Set of controls included in maps by default. Unless configured otherwise,\n * this returns a collection containing an instance of each of the following\n * controls:\n * * {@link module:ol/control/Zoom~Zoom}\n * * {@link module:ol/control/Rotate~Rotate}\n * * {@link module:ol/control/Attribution~Attribution}\n *\n * @param {DefaultsOptions=} opt_options\n * Defaults options.\n * @return {Collection<import(\"./Control.js\").default>}\n * Controls.\n * @function module:ol/control.defaults\n * @api\n */\nexport function defaults(opt_options) {\n\n  var options = opt_options ? opt_options : {};\n\n  var controls = new Collection();\n\n  var zoomControl = options.zoom !== undefined ? options.zoom : true;\n  if (zoomControl) {\n    controls.push(new Zoom(options.zoomOptions));\n  }\n\n  var rotateControl = options.rotate !== undefined ? options.rotate : true;\n  if (rotateControl) {\n    controls.push(new Rotate(options.rotateOptions));\n  }\n\n  var attributionControl = options.attribution !== undefined ?\n    options.attribution : true;\n  if (attributionControl) {\n    controls.push(new Attribution(options.attributionOptions));\n  }\n\n  return controls;\n}\n\n//# sourceMappingURL=util.js.map","/**\n * @module ol/interaction/Property\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  ACTIVE: 'active'\n};\n\n//# sourceMappingURL=Property.js.map","/**\n * @module ol/interaction/Interaction\n */\nimport BaseObject from '../Object.js';\nimport {easeOut, linear} from '../easing.js';\nimport InteractionProperty from './Property.js';\nimport {clamp} from '../math.js';\n\n\n/**\n * Object literal with config options for interactions.\n * @typedef {Object} InteractionOptions\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} handleEvent\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. If the function returns a falsy value, propagation of\n * the event to other interactions in the map's interactions chain will be\n * prevented (this includes functions with no explicit return).\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * User actions that change the state of the map. Some are similar to controls,\n * but are not associated with a DOM element.\n * For example, {@link module:ol/interaction/KeyboardZoom~KeyboardZoom} is\n * functionally the same as {@link module:ol/control/Zoom~Zoom}, but triggered\n * by a keyboard event not a button element event.\n * Although interactions do not have a DOM element, some of them do render\n * vectors and so are visible on the screen.\n * @api\n */\nvar Interaction = /*@__PURE__*/(function (BaseObject) {\n  function Interaction(options) {\n    BaseObject.call(this);\n\n    if (options.handleEvent) {\n      this.handleEvent = options.handleEvent;\n    }\n\n    /**\n     * @private\n     * @type {import(\"../PluggableMap.js\").default}\n     */\n    this.map_ = null;\n\n    this.setActive(true);\n  }\n\n  if ( BaseObject ) Interaction.__proto__ = BaseObject;\n  Interaction.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Interaction.prototype.constructor = Interaction;\n\n  /**\n   * Return whether the interaction is currently active.\n   * @return {boolean} `true` if the interaction is active, `false` otherwise.\n   * @observable\n   * @api\n   */\n  Interaction.prototype.getActive = function getActive () {\n    return /** @type {boolean} */ (this.get(InteractionProperty.ACTIVE));\n  };\n\n  /**\n   * Get the map associated with this interaction.\n   * @return {import(\"../PluggableMap.js\").default} Map.\n   * @api\n   */\n  Interaction.prototype.getMap = function getMap () {\n    return this.map_;\n  };\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent map browser event}.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n   * @return {boolean} `false` to stop event propagation.\n   * @api\n   */\n  Interaction.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n    return true;\n  };\n\n  /**\n   * Activate or deactivate the interaction.\n   * @param {boolean} active Active.\n   * @observable\n   * @api\n   */\n  Interaction.prototype.setActive = function setActive (active) {\n    this.set(InteractionProperty.ACTIVE, active);\n  };\n\n  /**\n   * Remove the interaction from its current map and attach it to the new map.\n   * Subclasses may set up event handlers to get notified about changes to\n   * the map here.\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   */\n  Interaction.prototype.setMap = function setMap (map) {\n    this.map_ = map;\n  };\n\n  return Interaction;\n}(BaseObject));\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {import(\"../coordinate.js\").Coordinate} delta Delta.\n * @param {number=} opt_duration Duration.\n */\nexport function pan(view, delta, opt_duration) {\n  var currentCenter = view.getCenter();\n  if (currentCenter) {\n    var center = view.constrainCenter(\n      [currentCenter[0] + delta[0], currentCenter[1] + delta[1]]);\n    if (opt_duration) {\n      view.animate({\n        duration: opt_duration,\n        easing: linear,\n        center: center\n      });\n    } else {\n      view.setCenter(center);\n    }\n  }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotate(view, rotation, opt_anchor, opt_duration) {\n  rotation = view.constrainRotation(rotation, 0);\n  rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} rotation Rotation.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function rotateWithoutConstraints(view, rotation, opt_anchor, opt_duration) {\n  if (rotation !== undefined) {\n    var currentRotation = view.getRotation();\n    var currentCenter = view.getCenter();\n    if (currentRotation !== undefined && currentCenter && opt_duration > 0) {\n      view.animate({\n        rotation: rotation,\n        anchor: opt_anchor,\n        duration: opt_duration,\n        easing: easeOut\n      });\n    } else {\n      view.rotate(rotation, opt_anchor);\n    }\n  }\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n * @param {number=} opt_direction Zooming direction; > 0 indicates\n *     zooming out, in which case the constraints system will select\n *     the largest nearest resolution; < 0 indicates zooming in, in\n *     which case the constraints system will select the smallest\n *     nearest resolution; == 0 indicates that the zooming direction\n *     is unknown/not relevant, in which case the constraints system\n *     will select the nearest resolution. If not defined 0 is\n *     assumed.\n */\nexport function zoom(view, resolution, opt_anchor, opt_duration, opt_direction) {\n  resolution = view.constrainResolution(resolution, 0, opt_direction);\n  zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number} delta Delta from previous zoom level.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomByDelta(view, delta, opt_anchor, opt_duration) {\n  var currentResolution = view.getResolution();\n  var resolution = view.constrainResolution(currentResolution, delta, 0);\n\n  if (resolution !== undefined) {\n    var resolutions = view.getResolutions();\n    resolution = clamp(\n      resolution,\n      view.getMinResolution() || resolutions[resolutions.length - 1],\n      view.getMaxResolution() || resolutions[0]);\n  }\n\n  // If we have a constraint on center, we need to change the anchor so that the\n  // new center is within the extent. We first calculate the new center, apply\n  // the constraint to it, and then calculate back the anchor\n  if (opt_anchor && resolution !== undefined && resolution !== currentResolution) {\n    var currentCenter = view.getCenter();\n    var center = view.calculateCenterZoom(resolution, opt_anchor);\n    center = view.constrainCenter(center);\n\n    opt_anchor = [\n      (resolution * currentCenter[0] - currentResolution * center[0]) /\n          (resolution - currentResolution),\n      (resolution * currentCenter[1] - currentResolution * center[1]) /\n          (resolution - currentResolution)\n    ];\n  }\n\n  zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration);\n}\n\n\n/**\n * @param {import(\"../View.js\").default} view View.\n * @param {number|undefined} resolution Resolution to go to.\n * @param {import(\"../coordinate.js\").Coordinate=} opt_anchor Anchor coordinate.\n * @param {number=} opt_duration Duration.\n */\nexport function zoomWithoutConstraints(view, resolution, opt_anchor, opt_duration) {\n  if (resolution) {\n    var currentResolution = view.getResolution();\n    var currentCenter = view.getCenter();\n    if (currentResolution !== undefined && currentCenter &&\n        resolution !== currentResolution && opt_duration) {\n      view.animate({\n        resolution: resolution,\n        anchor: opt_anchor,\n        duration: opt_duration,\n        easing: easeOut\n      });\n    } else {\n      if (opt_anchor) {\n        var center = view.calculateCenterZoom(resolution, opt_anchor);\n        view.setCenter(center);\n      }\n      view.setResolution(resolution);\n    }\n  }\n}\n\nexport default Interaction;\n\n//# sourceMappingURL=Interaction.js.map","/**\n * @module ol/interaction/DoubleClickZoom\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [delta=1] The zoom delta applied on each double click.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom by double-clicking on the map.\n * @api\n */\nvar DoubleClickZoom = /*@__PURE__*/(function (Interaction) {\n  function DoubleClickZoom(opt_options) {\n    Interaction.call(this, {\n      handleEvent: handleEvent\n    });\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delta_ = options.delta ? options.delta : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n  }\n\n  if ( Interaction ) DoubleClickZoom.__proto__ = Interaction;\n  DoubleClickZoom.prototype = Object.create( Interaction && Interaction.prototype );\n  DoubleClickZoom.prototype.constructor = DoubleClickZoom;\n\n  return DoubleClickZoom;\n}(Interaction));\n\n\n/**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a\n * doubleclick) and eventually zooms the map.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {DoubleClickZoom}\n */\nfunction handleEvent(mapBrowserEvent) {\n  var stopEvent = false;\n  if (mapBrowserEvent.type == MapBrowserEventType.DBLCLICK) {\n    var browserEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n    var map = mapBrowserEvent.map;\n    var anchor = mapBrowserEvent.coordinate;\n    var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;\n    var view = map.getView();\n    zoomByDelta(view, delta, anchor, this.duration_);\n    mapBrowserEvent.preventDefault();\n    stopEvent = true;\n  }\n  return !stopEvent;\n}\n\nexport default DoubleClickZoom;\n\n//# sourceMappingURL=DoubleClickZoom.js.map","/**\n * @module ol/events/condition\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {assert} from '../asserts.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport {WEBKIT, MAC} from '../has.js';\n\n\n/**\n * A function that takes an {@link module:ol/MapBrowserEvent} and returns a\n * `{boolean}`. If the condition is met, true should be returned.\n *\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default): boolean} Condition\n */\n\n\n/**\n * Return `true` if only the alt-key is pressed, `false` otherwise (e.g. when\n * additionally the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt key is pressed.\n * @api\n */\nexport var altKeyOnly = function(mapBrowserEvent) {\n  var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n  return (\n    originalEvent.altKey &&\n      !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n      !originalEvent.shiftKey);\n};\n\n\n/**\n * Return `true` if only the alt-key and shift-key is pressed, `false` otherwise\n * (e.g. when additionally the platform-modifier-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the alt and shift keys are pressed.\n * @api\n */\nexport var altShiftKeysOnly = function(mapBrowserEvent) {\n  var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n  return (\n    originalEvent.altKey &&\n      !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n      originalEvent.shiftKey);\n};\n\n\n/**\n * Return `true` if the map has the focus. This condition requires a map target\n * element with a `tabindex` attribute, e.g. `<div id=\"map\" tabindex=\"1\">`.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} The map has the focus.\n * @api\n */\nexport var focus = function(event) {\n  return event.target.getTargetElement() === document.activeElement;\n};\n\n\n/**\n * Return always true.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True.\n * @api\n */\nexport var always = TRUE;\n\n\n/**\n * Return `true` if the event is a `click` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `click` event.\n * @api\n */\nexport var click = function(mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.CLICK;\n};\n\n\n/**\n * Return `true` if the event has an \"action\"-producing mouse button.\n *\n * By definition, this includes left-click on windows/linux, and left-click\n * without the ctrl key on Macs.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} The result.\n */\nexport var mouseActionButton = function(mapBrowserEvent) {\n  var originalEvent = /** @type {MouseEvent} */ (mapBrowserEvent.originalEvent);\n  return originalEvent.button == 0 &&\n      !(WEBKIT && MAC && originalEvent.ctrlKey);\n};\n\n\n/**\n * Return always false.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} False.\n * @api\n */\nexport var never = FALSE;\n\n\n/**\n * Return `true` if the browser event is a `pointermove` event, `false`\n * otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the browser event is a `pointermove` event.\n * @api\n */\nexport var pointerMove = function(mapBrowserEvent) {\n  return mapBrowserEvent.type == 'pointermove';\n};\n\n\n/**\n * Return `true` if the event is a map `singleclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `singleclick` event.\n * @api\n */\nexport var singleClick = function(mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK;\n};\n\n\n/**\n * Return `true` if the event is a map `dblclick` event, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event is a map `dblclick` event.\n * @api\n */\nexport var doubleClick = function(mapBrowserEvent) {\n  return mapBrowserEvent.type == MapBrowserEventType.DBLCLICK;\n};\n\n\n/**\n * Return `true` if no modifier key (alt-, shift- or platform-modifier-key) is\n * pressed.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if there no modifier keys are pressed.\n * @api\n */\nexport var noModifierKeys = function(mapBrowserEvent) {\n  var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n  return (\n    !originalEvent.altKey &&\n      !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n      !originalEvent.shiftKey);\n};\n\n\n/**\n * Return `true` if only the platform-modifier-key (the meta-key on Mac,\n * ctrl-key otherwise) is pressed, `false` otherwise (e.g. when additionally\n * the shift-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the platform modifier key is pressed.\n * @api\n */\nexport var platformModifierKeyOnly = function(mapBrowserEvent) {\n  var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n  return !originalEvent.altKey &&\n    (MAC ? originalEvent.metaKey : originalEvent.ctrlKey) &&\n    !originalEvent.shiftKey;\n};\n\n\n/**\n * Return `true` if only the shift-key is pressed, `false` otherwise (e.g. when\n * additionally the alt-key is pressed).\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if only the shift key is pressed.\n * @api\n */\nexport var shiftKeyOnly = function(mapBrowserEvent) {\n  var originalEvent = /** @type {KeyboardEvent|MouseEvent|TouchEvent} */ (mapBrowserEvent.originalEvent);\n  return (\n    !originalEvent.altKey &&\n      !(originalEvent.metaKey || originalEvent.ctrlKey) &&\n      originalEvent.shiftKey);\n};\n\n\n/**\n * Return `true` if the target element is not editable, i.e. not a `<input>`-,\n * `<select>`- or `<textarea>`-element, `false` otherwise.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True only if the target element is not editable.\n * @api\n */\nexport var targetNotEditable = function(mapBrowserEvent) {\n  var target = mapBrowserEvent.originalEvent.target;\n  var tagName = /** @type {Element} */ (target).tagName;\n  return (\n    tagName !== 'INPUT' &&\n      tagName !== 'SELECT' &&\n      tagName !== 'TEXTAREA');\n};\n\n\n/**\n * Return `true` if the event originates from a mouse device.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a mouse device.\n * @api\n */\nexport var mouseOnly = function(mapBrowserEvent) {\n  var pointerEvent = /** @type {import(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\n  assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n  // see http://www.w3.org/TR/pointerevents/#widl-PointerEvent-pointerType\n  return pointerEvent.pointerType == 'mouse';\n};\n\n\n/**\n * Return `true` if the event originates from a primary pointer in\n * contact with the surface or if the left mouse button is pressed.\n * See http://www.w3.org/TR/pointerevents/#button-states.\n *\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} True if the event originates from a primary pointer.\n * @api\n */\nexport var primaryAction = function(mapBrowserEvent) {\n  var pointerEvent = /** @type {import(\"../MapBrowserPointerEvent\").default} */ (mapBrowserEvent).pointerEvent;\n  assert(pointerEvent !== undefined, 56); // mapBrowserEvent must originate from a pointer event\n  return pointerEvent.isPrimary && pointerEvent.button === 0;\n};\n\n//# sourceMappingURL=condition.js.map","/**\n * @module ol/interaction/Pointer\n */\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport Interaction from './Interaction.js';\nimport {getValues} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {function(import(\"../MapBrowserPointerEvent.js\").default):boolean} [handleDownEvent]\n * Function handling \"down\" events. If the function returns `true` then a drag\n * sequence is started.\n * @property {function(import(\"../MapBrowserPointerEvent.js\").default)} [handleDragEvent]\n * Function handling \"drag\" events. This function is called on \"move\" events\n * during a drag sequence.\n * @property {function(import(\"../MapBrowserEvent.js\").default):boolean} [handleEvent]\n * Method called by the map to notify the interaction that a browser event was\n * dispatched to the map. The function may return `false` to prevent the\n * propagation of the event to other interactions in the map's interactions\n * chain.\n * @property {function(import(\"../MapBrowserPointerEvent.js\").default)} [handleMoveEvent]\n * Function handling \"move\" events. This function is called on \"move\" events,\n * also during a drag sequence (so during a drag sequence both the\n * `handleDragEvent` function and this function are called).\n * @property {function(import(\"../MapBrowserPointerEvent.js\").default):boolean} [handleUpEvent]\n *  Function handling \"up\" events. If the function returns `false` then the\n * current drag sequence is stopped.\n * @property {function(boolean):boolean} [stopDown]\n * Should the down event be propagated to other interactions, or should be\n * stopped?\n */\n\n\n/**\n * @classdesc\n * Base class that calls user-defined functions on `down`, `move` and `up`\n * events. This class also manages \"drag sequences\".\n *\n * When the `handleDownEvent` user function returns `true` a drag sequence is\n * started. During a drag sequence the `handleDragEvent` user function is\n * called on `move` events. The drag sequence ends when the `handleUpEvent`\n * user function is called and returns `false`.\n * @api\n */\nvar PointerInteraction = /*@__PURE__*/(function (Interaction) {\n  function PointerInteraction(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\n\n    if (options.handleDownEvent) {\n      this.handleDownEvent = options.handleDownEvent;\n    }\n\n    if (options.handleDragEvent) {\n      this.handleDragEvent = options.handleDragEvent;\n    }\n\n    if (options.handleMoveEvent) {\n      this.handleMoveEvent = options.handleMoveEvent;\n    }\n\n    if (options.handleUpEvent) {\n      this.handleUpEvent = options.handleUpEvent;\n    }\n\n    if (options.stopDown) {\n      this.stopDown = options.stopDown;\n    }\n\n    /**\n     * @type {boolean}\n     * @protected\n     */\n    this.handlingDownUpSequence = false;\n\n    /**\n     * @type {!Object<string, import(\"../pointer/PointerEvent.js\").default>}\n     * @private\n     */\n    this.trackedPointers_ = {};\n\n    /**\n     * @type {Array<import(\"../pointer/PointerEvent.js\").default>}\n     * @protected\n     */\n    this.targetPointers = [];\n\n  }\n\n  if ( Interaction ) PointerInteraction.__proto__ = Interaction;\n  PointerInteraction.prototype = Object.create( Interaction && Interaction.prototype );\n  PointerInteraction.prototype.constructor = PointerInteraction;\n\n  /**\n   * Handle pointer down events.\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */\n  PointerInteraction.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    return false;\n  };\n\n  /**\n   * Handle pointer drag events.\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */\n  PointerInteraction.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {};\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent map browser event} and may call into\n   * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are\n   * detected.\n   * @override\n   * @api\n   */\n  PointerInteraction.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n    if (!(/** @type {import(\"../MapBrowserPointerEvent.js\").default} */ (mapBrowserEvent).pointerEvent)) {\n      return true;\n    }\n\n    var stopEvent = false;\n    this.updateTrackedPointers_(mapBrowserEvent);\n    if (this.handlingDownUpSequence) {\n      if (mapBrowserEvent.type == MapBrowserEventType.POINTERDRAG) {\n        this.handleDragEvent(mapBrowserEvent);\n      } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n        var handledUp = this.handleUpEvent(mapBrowserEvent);\n        this.handlingDownUpSequence = handledUp && this.targetPointers.length > 0;\n      }\n    } else {\n      if (mapBrowserEvent.type == MapBrowserEventType.POINTERDOWN) {\n        var handled = this.handleDownEvent(mapBrowserEvent);\n        if (handled) {\n          mapBrowserEvent.preventDefault();\n        }\n        this.handlingDownUpSequence = handled;\n        stopEvent = this.stopDown(handled);\n      } else if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE) {\n        this.handleMoveEvent(mapBrowserEvent);\n      }\n    }\n    return !stopEvent;\n  };\n\n  /**\n   * Handle pointer move events.\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n   * @protected\n   */\n  PointerInteraction.prototype.handleMoveEvent = function handleMoveEvent (mapBrowserEvent) {};\n\n  /**\n   * Handle pointer up events.\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n   * @return {boolean} If the event was consumed.\n   * @protected\n   */\n  PointerInteraction.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    return false;\n  };\n\n  /**\n   * This function is used to determine if \"down\" events should be propagated\n   * to other interactions or should be stopped.\n   * @param {boolean} handled Was the event handled by the interaction?\n   * @return {boolean} Should the `down` event be stopped?\n   */\n  PointerInteraction.prototype.stopDown = function stopDown (handled) {\n    return handled;\n  };\n\n  /**\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n   * @private\n   */\n  PointerInteraction.prototype.updateTrackedPointers_ = function updateTrackedPointers_ (mapBrowserEvent) {\n    if (isPointerDraggingEvent(mapBrowserEvent)) {\n      var event = mapBrowserEvent.pointerEvent;\n\n      var id = event.pointerId.toString();\n      if (mapBrowserEvent.type == MapBrowserEventType.POINTERUP) {\n        delete this.trackedPointers_[id];\n      } else if (mapBrowserEvent.type ==\n          MapBrowserEventType.POINTERDOWN) {\n        this.trackedPointers_[id] = event;\n      } else if (id in this.trackedPointers_) {\n        // update only when there was a pointerdown event for this pointer\n        this.trackedPointers_[id] = event;\n      }\n      this.targetPointers = getValues(this.trackedPointers_);\n    }\n  };\n\n  return PointerInteraction;\n}(Interaction));\n\n\n/**\n * @param {Array<import(\"../pointer/PointerEvent.js\").default>} pointerEvents List of events.\n * @return {import(\"../pixel.js\").Pixel} Centroid pixel.\n */\nexport function centroid(pointerEvents) {\n  var length = pointerEvents.length;\n  var clientX = 0;\n  var clientY = 0;\n  for (var i = 0; i < length; i++) {\n    clientX += pointerEvents[i].clientX;\n    clientY += pointerEvents[i].clientY;\n  }\n  return [clientX / length, clientY / length];\n}\n\n\n/**\n * @param {import(\"../MapBrowserPointerEvent.js\").default} mapBrowserEvent Event.\n * @return {boolean} Whether the event is a pointerdown, pointerdrag\n *     or pointerup event.\n */\nfunction isPointerDraggingEvent(mapBrowserEvent) {\n  var type = mapBrowserEvent.type;\n  return type === MapBrowserEventType.POINTERDOWN ||\n    type === MapBrowserEventType.POINTERDRAG ||\n    type === MapBrowserEventType.POINTERUP;\n}\n\n\nexport default PointerInteraction;\n\n//# sourceMappingURL=Pointer.js.map","/**\n * @module ol/interaction/DragPan\n */\nimport ViewHint from '../ViewHint.js';\nimport {scale as scaleCoordinate, rotate as rotateCoordinate, add as addCoordinate} from '../coordinate.js';\nimport {easeOut} from '../easing.js';\nimport {noModifierKeys} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~noModifierKeys}.\n * @property {import(\"../Kinetic.js\").default} [kinetic] Kinetic inertia to apply to the pan.\n */\n\n\n/**\n * @classdesc\n * Allows the user to pan the map by dragging the map.\n * @api\n */\nvar DragPan = /*@__PURE__*/(function (PointerInteraction) {\n  function DragPan(opt_options) {\n\n    PointerInteraction.call(this, {\n      stopDown: FALSE\n    });\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {import(\"../Kinetic.js\").default|undefined}\n     */\n    this.kinetic_ = options.kinetic;\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.lastCentroid = null;\n\n    /**\n     * @type {number}\n     */\n    this.lastPointersCount_;\n\n    /**\n     * @type {boolean}\n     */\n    this.panning_ = false;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.noKinetic_ = false;\n\n  }\n\n  if ( PointerInteraction ) DragPan.__proto__ = PointerInteraction;\n  DragPan.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  DragPan.prototype.constructor = DragPan;\n\n  /**\n   * @inheritDoc\n   */\n  DragPan.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    if (!this.panning_) {\n      this.panning_ = true;\n      this.getMap().getView().setHint(ViewHint.INTERACTING, 1);\n    }\n    var targetPointers = this.targetPointers;\n    var centroid = centroidFromPointers(targetPointers);\n    if (targetPointers.length == this.lastPointersCount_) {\n      if (this.kinetic_) {\n        this.kinetic_.update(centroid[0], centroid[1]);\n      }\n      if (this.lastCentroid) {\n        var deltaX = this.lastCentroid[0] - centroid[0];\n        var deltaY = centroid[1] - this.lastCentroid[1];\n        var map = mapBrowserEvent.map;\n        var view = map.getView();\n        var center = [deltaX, deltaY];\n        scaleCoordinate(center, view.getResolution());\n        rotateCoordinate(center, view.getRotation());\n        addCoordinate(center, view.getCenter());\n        center = view.constrainCenter(center);\n        view.setCenter(center);\n      }\n    } else if (this.kinetic_) {\n      // reset so we don't overestimate the kinetic energy after\n      // after one finger down, tiny drag, second finger down\n      this.kinetic_.begin();\n    }\n    this.lastCentroid = centroid;\n    this.lastPointersCount_ = targetPointers.length;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragPan.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    if (this.targetPointers.length === 0) {\n      if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {\n        var distance = this.kinetic_.getDistance();\n        var angle = this.kinetic_.getAngle();\n        var center = /** @type {!import(\"../coordinate.js\").Coordinate} */ (view.getCenter());\n        var centerpx = map.getPixelFromCoordinate(center);\n        var dest = map.getCoordinateFromPixel([\n          centerpx[0] - distance * Math.cos(angle),\n          centerpx[1] - distance * Math.sin(angle)\n        ]);\n        view.animate({\n          center: view.constrainCenter(dest),\n          duration: 500,\n          easing: easeOut\n        });\n      }\n      if (this.panning_) {\n        this.panning_ = false;\n        view.setHint(ViewHint.INTERACTING, -1);\n      }\n      return false;\n    } else {\n      if (this.kinetic_) {\n        // reset so we don't overestimate the kinetic energy after\n        // after one finger up, tiny drag, second finger up\n        this.kinetic_.begin();\n      }\n      this.lastCentroid = null;\n      return true;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragPan.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (this.targetPointers.length > 0 && this.condition_(mapBrowserEvent)) {\n      var map = mapBrowserEvent.map;\n      var view = map.getView();\n      this.lastCentroid = null;\n      // stop any current animation\n      if (view.getAnimating()) {\n        view.setCenter(mapBrowserEvent.frameState.viewState.center);\n      }\n      if (this.kinetic_) {\n        this.kinetic_.begin();\n      }\n      // No kinetic as soon as more than one pointer on the screen is\n      // detected. This is to prevent nasty pans after pinch.\n      this.noKinetic_ = this.targetPointers.length > 1;\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return DragPan;\n}(PointerInteraction));\n\nexport default DragPan;\n\n//# sourceMappingURL=DragPan.js.map","/**\n * @module ol/interaction/DragRotate\n */\nimport {disable} from '../rotationconstraint.js';\nimport ViewHint from '../ViewHint.js';\nimport {altShiftKeysOnly, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an\n * {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~altShiftKeysOnly}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n */\n\n\n/**\n * @classdesc\n * Allows the user to rotate the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the alt and shift keys are held down.\n *\n * This interaction is only supported for mouse devices.\n * @api\n */\nvar DragRotate = /*@__PURE__*/(function (PointerInteraction) {\n  function DragRotate(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    PointerInteraction.call(this, {\n      stopDown: FALSE\n    });\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : altShiftKeysOnly;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastAngle_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n  }\n\n  if ( PointerInteraction ) DragRotate.__proto__ = PointerInteraction;\n  DragRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  DragRotate.prototype.constructor = DragRotate;\n\n  /**\n   * @inheritDoc\n   */\n  DragRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return;\n    }\n\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    if (view.getConstraints().rotation === disable) {\n      return;\n    }\n    var size = map.getSize();\n    var offset = mapBrowserEvent.pixel;\n    var theta =\n        Math.atan2(size[1] / 2 - offset[1], offset[0] - size[0] / 2);\n    if (this.lastAngle_ !== undefined) {\n      var delta = theta - this.lastAngle_;\n      var rotation = view.getRotation();\n      rotateWithoutConstraints(view, rotation - delta);\n    }\n    this.lastAngle_ = theta;\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  DragRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return true;\n    }\n\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    view.setHint(ViewHint.INTERACTING, -1);\n    var rotation = view.getRotation();\n    rotate(view, rotation, undefined, this.duration_);\n    return false;\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  DragRotate.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return false;\n    }\n\n    if (mouseActionButton(mapBrowserEvent) && this.condition_(mapBrowserEvent)) {\n      var map = mapBrowserEvent.map;\n      map.getView().setHint(ViewHint.INTERACTING, 1);\n      this.lastAngle_ = undefined;\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return DragRotate;\n}(PointerInteraction));\n\nexport default DragRotate;\n\n//# sourceMappingURL=DragRotate.js.map","/**\n * @module ol/render/Box\n */\n\nimport Disposable from '../Disposable.js';\nimport Polygon from '../geom/Polygon.js';\n\nvar RenderBox = /*@__PURE__*/(function (Disposable) {\n  function RenderBox(className) {\n    Disposable.call(this);\n\n    /**\n     * @type {import(\"../geom/Polygon.js\").default}\n     * @private\n     */\n    this.geometry_ = null;\n\n    /**\n     * @type {HTMLDivElement}\n     * @private\n     */\n    this.element_ = /** @type {HTMLDivElement} */ (document.createElement('div'));\n    this.element_.style.position = 'absolute';\n    this.element_.className = 'ol-box ' + className;\n\n    /**\n     * @private\n     * @type {import(\"../PluggableMap.js\").default}\n     */\n    this.map_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.startPixel_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.endPixel_ = null;\n\n  }\n\n  if ( Disposable ) RenderBox.__proto__ = Disposable;\n  RenderBox.prototype = Object.create( Disposable && Disposable.prototype );\n  RenderBox.prototype.constructor = RenderBox;\n\n  /**\n   * @inheritDoc\n   */\n  RenderBox.prototype.disposeInternal = function disposeInternal () {\n    this.setMap(null);\n  };\n\n  /**\n   * @private\n   */\n  RenderBox.prototype.render_ = function render_ () {\n    var startPixel = this.startPixel_;\n    var endPixel = this.endPixel_;\n    var px = 'px';\n    var style = this.element_.style;\n    style.left = Math.min(startPixel[0], endPixel[0]) + px;\n    style.top = Math.min(startPixel[1], endPixel[1]) + px;\n    style.width = Math.abs(endPixel[0] - startPixel[0]) + px;\n    style.height = Math.abs(endPixel[1] - startPixel[1]) + px;\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   */\n  RenderBox.prototype.setMap = function setMap (map) {\n    if (this.map_) {\n      this.map_.getOverlayContainer().removeChild(this.element_);\n      var style = this.element_.style;\n      style.left = style.top = style.width = style.height = 'inherit';\n    }\n    this.map_ = map;\n    if (this.map_) {\n      this.map_.getOverlayContainer().appendChild(this.element_);\n    }\n  };\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} startPixel Start pixel.\n   * @param {import(\"../pixel.js\").Pixel} endPixel End pixel.\n   */\n  RenderBox.prototype.setPixels = function setPixels (startPixel, endPixel) {\n    this.startPixel_ = startPixel;\n    this.endPixel_ = endPixel;\n    this.createOrUpdateGeometry();\n    this.render_();\n  };\n\n  /**\n   * Creates or updates the cached geometry.\n   */\n  RenderBox.prototype.createOrUpdateGeometry = function createOrUpdateGeometry () {\n    var startPixel = this.startPixel_;\n    var endPixel = this.endPixel_;\n    var pixels = [\n      startPixel,\n      [startPixel[0], endPixel[1]],\n      endPixel,\n      [endPixel[0], startPixel[1]]\n    ];\n    var coordinates = pixels.map(this.map_.getCoordinateFromPixel, this.map_);\n    // close the polygon\n    coordinates[4] = coordinates[0].slice();\n    if (!this.geometry_) {\n      this.geometry_ = new Polygon([coordinates]);\n    } else {\n      this.geometry_.setCoordinates([coordinates]);\n    }\n  };\n\n  /**\n   * @return {import(\"../geom/Polygon.js\").default} Geometry.\n   */\n  RenderBox.prototype.getGeometry = function getGeometry () {\n    return this.geometry_;\n  };\n\n  return RenderBox;\n}(Disposable));\n\n\nexport default RenderBox;\n\n//# sourceMappingURL=Box.js.map","/**\n * @module ol/interaction/DragBox\n */\n// FIXME draw drag box\nimport Event from '../events/Event.js';\nimport {always, mouseOnly, mouseActionButton} from '../events/condition.js';\nimport {VOID} from '../functions.js';\nimport PointerInteraction from './Pointer.js';\nimport RenderBox from '../render/Box.js';\n\n\n/**\n * A function that takes a {@link module:ol/MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s and returns a `{boolean}`. If the condition is met,\n * true should be returned.\n * @typedef {function(this: ?, import(\"../MapBrowserEvent.js\").default, import(\"../pixel.js\").Pixel, import(\"../pixel.js\").Pixel):boolean} EndCondition\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragbox'] CSS class name for styling the box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a boolean\n * to indicate whether that event should be handled.\n * Default is {@link ol/events/condition~always}.\n * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the default\n * `boxEndCondition` function.\n * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two\n * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.\n * Default is `true` if the area of the box is bigger than the `minArea` option.\n * @property {function(this:DragBox, import(\"../MapBrowserEvent.js\").default)} onBoxEnd Code to execute just\n * before `boxend` is fired.\n */\n\n\n/**\n * @enum {string}\n */\nvar DragBoxEventType = {\n  /**\n   * Triggered upon drag box start.\n   * @event DragBoxEvent#boxstart\n   * @api\n   */\n  BOXSTART: 'boxstart',\n\n  /**\n   * Triggered on drag when box is active.\n   * @event DragBoxEvent#boxdrag\n   * @api\n   */\n  BOXDRAG: 'boxdrag',\n\n  /**\n   * Triggered upon drag box end.\n   * @event DragBoxEvent#boxend\n   * @api\n   */\n  BOXEND: 'boxend'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragBox~DragBox} instances are instances of\n * this type.\n */\nvar DragBoxEvent = /*@__PURE__*/(function (Event) {\n  function DragBoxEvent(type, coordinate, mapBrowserEvent) {\n    Event.call(this, type);\n\n    /**\n     * The coordinate of the drag event.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.coordinate = coordinate;\n\n    /**\n     * @const\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n\n  }\n\n  if ( Event ) DragBoxEvent.__proto__ = Event;\n  DragBoxEvent.prototype = Object.create( Event && Event.prototype );\n  DragBoxEvent.prototype.constructor = DragBoxEvent;\n\n  return DragBoxEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when the shift or other key is held down. This is used, for example,\n * for zooming to a specific area of the map\n * (see {@link module:ol/interaction/DragZoom~DragZoom} and\n * {@link module:ol/interaction/DragRotateAndZoom}).\n *\n * This interaction is only supported for mouse devices.\n *\n * @fires DragBoxEvent\n * @api\n */\nvar DragBox = /*@__PURE__*/(function (PointerInteraction) {\n  function DragBox(opt_options) {\n\n    PointerInteraction.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n    * @type {import(\"../render/Box.js\").default}\n    * @private\n    */\n    this.box_ = new RenderBox(options.className || 'ol-dragbox');\n\n    /**\n    * @type {number}\n    * @private\n    */\n    this.minArea_ = options.minArea !== undefined ? options.minArea : 64;\n\n    /**\n     * Function to execute just before `onboxend` is fired\n     * @type {function(this:DragBox, import(\"../MapBrowserEvent.js\").default)}\n     * @private\n     */\n    this.onBoxEnd_ = options.onBoxEnd ? options.onBoxEnd : VOID;\n\n    /**\n    * @type {import(\"../pixel.js\").Pixel}\n    * @private\n    */\n    this.startPixel_ = null;\n\n    /**\n    * @private\n    * @type {import(\"../events/condition.js\").Condition}\n    */\n    this.condition_ = options.condition ? options.condition : always;\n\n    /**\n    * @private\n    * @type {EndCondition}\n    */\n    this.boxEndCondition_ = options.boxEndCondition ?\n      options.boxEndCondition : this.defaultBoxEndCondition;\n  }\n\n  if ( PointerInteraction ) DragBox.__proto__ = PointerInteraction;\n  DragBox.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  DragBox.prototype.constructor = DragBox;\n\n  /**\n   * The default condition for determining whether the boxend event\n   * should fire.\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent The originating MapBrowserEvent\n   *     leading to the box end.\n   * @param {import(\"../pixel.js\").Pixel} startPixel The starting pixel of the box.\n   * @param {import(\"../pixel.js\").Pixel} endPixel The end pixel of the box.\n   * @return {boolean} Whether or not the boxend condition should be fired.\n   */\n  DragBox.prototype.defaultBoxEndCondition = function defaultBoxEndCondition (mapBrowserEvent, startPixel, endPixel) {\n    var width = endPixel[0] - startPixel[0];\n    var height = endPixel[1] - startPixel[1];\n    return width * width + height * height >= this.minArea_;\n  };\n\n  /**\n  * Returns geometry of last drawn box.\n  * @return {import(\"../geom/Polygon.js\").default} Geometry.\n  * @api\n  */\n  DragBox.prototype.getGeometry = function getGeometry () {\n    return this.box_.getGeometry();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragBox.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return;\n    }\n\n    this.box_.setPixels(this.startPixel_, mapBrowserEvent.pixel);\n\n    this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXDRAG,\n      mapBrowserEvent.coordinate, mapBrowserEvent));\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragBox.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return true;\n    }\n\n    this.box_.setMap(null);\n\n    if (this.boxEndCondition_(mapBrowserEvent, this.startPixel_, mapBrowserEvent.pixel)) {\n      this.onBoxEnd_(mapBrowserEvent);\n      this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXEND,\n        mapBrowserEvent.coordinate, mapBrowserEvent));\n    }\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragBox.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return false;\n    }\n\n    if (mouseActionButton(mapBrowserEvent) &&\n        this.condition_(mapBrowserEvent)) {\n      this.startPixel_ = mapBrowserEvent.pixel;\n      this.box_.setMap(mapBrowserEvent.map);\n      this.box_.setPixels(this.startPixel_, this.startPixel_);\n      this.dispatchEvent(new DragBoxEvent(DragBoxEventType.BOXSTART,\n        mapBrowserEvent.coordinate, mapBrowserEvent));\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return DragBox;\n}(PointerInteraction));\n\n\nexport default DragBox;\n\n//# sourceMappingURL=DragBox.js.map","/**\n * @module ol/interaction/DragZoom\n */\nimport {easeOut} from '../easing.js';\nimport {shiftKeyOnly} from '../events/condition.js';\nimport {createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter} from '../extent.js';\nimport DragBox from './DragBox.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-dragzoom'] CSS class name for styling the\n * box.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {boolean} [out=false] Use interaction for zooming out.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map by clicking and dragging on the map,\n * normally combined with an {@link module:ol/events/condition} that limits\n * it to when a key, shift by default, is held down.\n *\n * To change the style of the box, use CSS and the `.ol-dragzoom` selector, or\n * your custom one configured with `className`.\n * @api\n */\nvar DragZoom = /*@__PURE__*/(function (DragBox) {\n  function DragZoom(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    var condition = options.condition ? options.condition : shiftKeyOnly;\n\n    DragBox.call(this, {\n      condition: condition,\n      className: options.className || 'ol-dragzoom',\n      onBoxEnd: onBoxEnd\n    });\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.out_ = options.out !== undefined ? options.out : false;\n  }\n\n  if ( DragBox ) DragZoom.__proto__ = DragBox;\n  DragZoom.prototype = Object.create( DragBox && DragBox.prototype );\n  DragZoom.prototype.constructor = DragZoom;\n\n  return DragZoom;\n}(DragBox));\n\n\n/**\n * @this {DragZoom}\n */\nfunction onBoxEnd() {\n  var map = this.getMap();\n  var view = /** @type {!import(\"../View.js\").default} */ (map.getView());\n  var size = /** @type {!import(\"../size.js\").Size} */ (map.getSize());\n  var extent = this.getGeometry().getExtent();\n\n  if (this.out_) {\n    var mapExtent = view.calculateExtent(size);\n    var boxPixelExtent = createOrUpdateFromCoordinates([\n      map.getPixelFromCoordinate(getBottomLeft(extent)),\n      map.getPixelFromCoordinate(getTopRight(extent))]);\n    var factor = view.getResolutionForExtent(boxPixelExtent, size);\n\n    scaleFromCenter(mapExtent, 1 / factor);\n    extent = mapExtent;\n  }\n\n  var resolution = view.constrainResolution(\n    view.getResolutionForExtent(extent, size));\n\n  var center = getCenter(extent);\n  center = view.constrainCenter(center);\n\n  view.animate({\n    resolution: resolution,\n    center: center,\n    duration: this.duration_,\n    easing: easeOut\n  });\n}\n\n\nexport default DragZoom;\n\n//# sourceMappingURL=DragZoom.js.map","/**\n * @module ol/events/KeyCode\n */\n\n/**\n * @enum {number}\n * @const\n */\nexport default {\n  LEFT: 37,\n  UP: 38,\n  RIGHT: 39,\n  DOWN: 40\n};\n\n//# sourceMappingURL=KeyCode.js.map","/**\n * @module ol/interaction/KeyboardPan\n */\nimport {rotate as rotateCoordinate} from '../coordinate.js';\nimport EventType from '../events/EventType.js';\nimport KeyCode from '../events/KeyCode.js';\nimport {noModifierKeys, targetNotEditable} from '../events/condition.js';\nimport Interaction, {pan} from './Interaction.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~noModifierKeys} and\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {number} [pixelDelta=128] The amount of pixels to pan on each key\n * press.\n */\n\n\n/**\n * @classdesc\n * Allows the user to pan the map using keyboard arrows.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}.\n * @api\n */\nvar KeyboardPan = /*@__PURE__*/(function (Interaction) {\n  function KeyboardPan(opt_options) {\n\n    Interaction.call(this, {\n      handleEvent: handleEvent\n    });\n\n    var options = opt_options || {};\n\n    /**\n     * @private\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n     * @return {boolean} Combined condition result.\n     */\n    this.defaultCondition_ = function(mapBrowserEvent) {\n      return noModifierKeys(mapBrowserEvent) &&\n        targetNotEditable(mapBrowserEvent);\n    };\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition !== undefined ?\n      options.condition : this.defaultCondition_;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelDelta_ = options.pixelDelta !== undefined ?\n      options.pixelDelta : 128;\n\n  }\n\n  if ( Interaction ) KeyboardPan.__proto__ = Interaction;\n  KeyboardPan.prototype = Object.create( Interaction && Interaction.prototype );\n  KeyboardPan.prototype.constructor = KeyboardPan;\n\n  return KeyboardPan;\n}(Interaction));\n\n\n/**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides the direction to pan to (if an arrow key was\n * pressed).\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {KeyboardPan}\n */\nfunction handleEvent(mapBrowserEvent) {\n  var stopEvent = false;\n  if (mapBrowserEvent.type == EventType.KEYDOWN) {\n    var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n    var keyCode = keyEvent.keyCode;\n    if (this.condition_(mapBrowserEvent) &&\n        (keyCode == KeyCode.DOWN ||\n        keyCode == KeyCode.LEFT ||\n        keyCode == KeyCode.RIGHT ||\n        keyCode == KeyCode.UP)) {\n      var map = mapBrowserEvent.map;\n      var view = map.getView();\n      var mapUnitsDelta = view.getResolution() * this.pixelDelta_;\n      var deltaX = 0, deltaY = 0;\n      if (keyCode == KeyCode.DOWN) {\n        deltaY = -mapUnitsDelta;\n      } else if (keyCode == KeyCode.LEFT) {\n        deltaX = -mapUnitsDelta;\n      } else if (keyCode == KeyCode.RIGHT) {\n        deltaX = mapUnitsDelta;\n      } else {\n        deltaY = mapUnitsDelta;\n      }\n      var delta = [deltaX, deltaY];\n      rotateCoordinate(delta, view.getRotation());\n      pan(view, delta, this.duration_);\n      mapBrowserEvent.preventDefault();\n      stopEvent = true;\n    }\n  }\n  return !stopEvent;\n}\n\nexport default KeyboardPan;\n\n//# sourceMappingURL=KeyboardPan.js.map","/**\n * @module ol/interaction/KeyboardZoom\n */\nimport EventType from '../events/EventType.js';\nimport {targetNotEditable} from '../events/condition.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=100] Animation duration in milliseconds.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~targetNotEditable}.\n * @property {number} [delta=1] The zoom level delta on each key press.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map using keyboard + and -.\n * Note that, although this interaction is by default included in maps,\n * the keys can only be used when browser focus is on the element to which\n * the keyboard events are attached. By default, this is the map div,\n * though you can change this with the `keyboardEventTarget` in\n * {@link module:ol/Map~Map}. `document` never loses focus but, for any other\n * element, focus will have to be on, and returned to, this element if the keys\n * are to function.\n * See also {@link module:ol/interaction/KeyboardPan~KeyboardPan}.\n * @api\n */\nvar KeyboardZoom = /*@__PURE__*/(function (Interaction) {\n  function KeyboardZoom(opt_options) {\n\n    Interaction.call(this, {\n      handleEvent: handleEvent\n    });\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : targetNotEditable;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delta_ = options.delta ? options.delta : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 100;\n\n  }\n\n  if ( Interaction ) KeyboardZoom.__proto__ = Interaction;\n  KeyboardZoom.prototype = Object.create( Interaction && Interaction.prototype );\n  KeyboardZoom.prototype.constructor = KeyboardZoom;\n\n  return KeyboardZoom;\n}(Interaction));\n\n\n/**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} if it was a\n * `KeyEvent`, and decides whether to zoom in or out (depending on whether the\n * key pressed was '+' or '-').\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {KeyboardZoom}\n */\nfunction handleEvent(mapBrowserEvent) {\n  var stopEvent = false;\n  if (mapBrowserEvent.type == EventType.KEYDOWN ||\n      mapBrowserEvent.type == EventType.KEYPRESS) {\n    var keyEvent = /** @type {KeyboardEvent} */ (mapBrowserEvent.originalEvent);\n    var charCode = keyEvent.charCode;\n    if (this.condition_(mapBrowserEvent) &&\n        (charCode == '+'.charCodeAt(0) || charCode == '-'.charCodeAt(0))) {\n      var map = mapBrowserEvent.map;\n      var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;\n      var view = map.getView();\n      zoomByDelta(view, delta, undefined, this.duration_);\n      mapBrowserEvent.preventDefault();\n      stopEvent = true;\n    }\n  }\n  return !stopEvent;\n}\n\nexport default KeyboardZoom;\n\n//# sourceMappingURL=KeyboardZoom.js.map","/**\n * @module ol/interaction/MouseWheelZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {always} from '../events/condition.js';\nimport {easeOut} from '../easing.js';\nimport EventType from '../events/EventType.js';\nimport {DEVICE_PIXEL_RATIO, FIREFOX, SAFARI} from '../has.js';\nimport Interaction, {zoomByDelta} from './Interaction.js';\nimport {clamp} from '../math.js';\n\n\n/**\n * Maximum mouse wheel delta.\n * @type {number}\n */\nvar MAX_DELTA = 1;\n\n\n/**\n * @enum {string}\n */\nexport var Mode = {\n  TRACKPAD: 'trackpad',\n  WHEEL: 'wheel'\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. Default is\n * {@link module:ol/events/condition~always}.\n * @property {number} [duration=250] Animation duration in milliseconds.\n * @property {number} [timeout=80] Mouse wheel timeout duration in milliseconds.\n * @property {boolean} [constrainResolution=false] When using a trackpad or\n * magic mouse, zoom to the closest integer zoom level after the scroll gesture\n * ends.\n * @property {boolean} [useAnchor=true] Enable zooming using the mouse's\n * location as the anchor. When set to `false`, zooming in and out will zoom to\n * the center of the screen instead of zooming on the mouse's location.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map by scrolling the mouse wheel.\n * @api\n */\nvar MouseWheelZoom = /*@__PURE__*/(function (Interaction) {\n  function MouseWheelZoom(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Interaction.call(/** @type {import(\"./Interaction.js\").InteractionOptions} */ this, (options));\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.delta_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.timeout_ = options.timeout !== undefined ? options.timeout : 80;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.useAnchor_ = options.useAnchor !== undefined ? options.useAnchor : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.constrainResolution_ = options.constrainResolution || false;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : always;\n\n    /**\n     * @private\n     * @type {?import(\"../coordinate.js\").Coordinate}\n     */\n    this.lastAnchor_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.startTime_ = undefined;\n\n    /**\n     * @private\n     * @type {?}\n     */\n    this.timeoutId_;\n\n    /**\n     * @private\n     * @type {Mode|undefined}\n     */\n    this.mode_ = undefined;\n\n    /**\n     * Trackpad events separated by this delay will be considered separate\n     * interactions.\n     * @type {number}\n     */\n    this.trackpadEventGap_ = 400;\n\n    /**\n     * @type {?}\n     */\n    this.trackpadTimeoutId_;\n\n    /**\n     * The number of delta values per zoom level\n     * @private\n     * @type {number}\n     */\n    this.trackpadDeltaPerZoom_ = 300;\n\n    /**\n     * The zoom factor by which scroll zooming is allowed to exceed the limits.\n     * @private\n     * @type {number}\n     */\n    this.trackpadZoomBuffer_ = 1.5;\n\n  }\n\n  if ( Interaction ) MouseWheelZoom.__proto__ = Interaction;\n  MouseWheelZoom.prototype = Object.create( Interaction && Interaction.prototype );\n  MouseWheelZoom.prototype.constructor = MouseWheelZoom;\n\n  /**\n   * @private\n   */\n  MouseWheelZoom.prototype.decrementInteractingHint_ = function decrementInteractingHint_ () {\n    this.trackpadTimeoutId_ = undefined;\n    var view = this.getMap().getView();\n    view.setHint(ViewHint.INTERACTING, -1);\n  };\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent map browser event} (if it was a mousewheel-event) and eventually\n   * zooms the map.\n   * @override\n   */\n  MouseWheelZoom.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n    if (!this.condition_(mapBrowserEvent)) {\n      return true;\n    }\n    var type = mapBrowserEvent.type;\n    if (type !== EventType.WHEEL && type !== EventType.MOUSEWHEEL) {\n      return true;\n    }\n\n    mapBrowserEvent.preventDefault();\n\n    var map = mapBrowserEvent.map;\n    var wheelEvent = /** @type {WheelEvent} */ (mapBrowserEvent.originalEvent);\n\n    if (this.useAnchor_) {\n      this.lastAnchor_ = mapBrowserEvent.coordinate;\n    }\n\n    // Delta normalisation inspired by\n    // https://github.com/mapbox/mapbox-gl-js/blob/001c7b9/js/ui/handler/scroll_zoom.js\n    var delta;\n    if (mapBrowserEvent.type == EventType.WHEEL) {\n      delta = wheelEvent.deltaY;\n      if (FIREFOX &&\n          wheelEvent.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n        delta /= DEVICE_PIXEL_RATIO;\n      }\n      if (wheelEvent.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n        delta *= 40;\n      }\n    } else if (mapBrowserEvent.type == EventType.MOUSEWHEEL) {\n      delta = -wheelEvent.wheelDeltaY;\n      if (SAFARI) {\n        delta /= 3;\n      }\n    }\n\n    if (delta === 0) {\n      return false;\n    }\n\n    var now = Date.now();\n\n    if (this.startTime_ === undefined) {\n      this.startTime_ = now;\n    }\n\n    if (!this.mode_ || now - this.startTime_ > this.trackpadEventGap_) {\n      this.mode_ = Math.abs(delta) < 4 ?\n        Mode.TRACKPAD :\n        Mode.WHEEL;\n    }\n\n    if (this.mode_ === Mode.TRACKPAD) {\n      var view = map.getView();\n      if (this.trackpadTimeoutId_) {\n        clearTimeout(this.trackpadTimeoutId_);\n      } else {\n        view.setHint(ViewHint.INTERACTING, 1);\n      }\n      this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);\n      var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);\n      var minResolution = view.getMinResolution();\n      var maxResolution = view.getMaxResolution();\n      var rebound = 0;\n      if (resolution < minResolution) {\n        resolution = Math.max(resolution, minResolution / this.trackpadZoomBuffer_);\n        rebound = 1;\n      } else if (resolution > maxResolution) {\n        resolution = Math.min(resolution, maxResolution * this.trackpadZoomBuffer_);\n        rebound = -1;\n      }\n      if (this.lastAnchor_) {\n        var center = view.calculateCenterZoom(resolution, this.lastAnchor_);\n        view.setCenter(view.constrainCenter(center));\n      }\n      view.setResolution(resolution);\n\n      if (rebound === 0 && this.constrainResolution_) {\n        view.animate({\n          resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),\n          easing: easeOut,\n          anchor: this.lastAnchor_,\n          duration: this.duration_\n        });\n      }\n\n      if (rebound > 0) {\n        view.animate({\n          resolution: minResolution,\n          easing: easeOut,\n          anchor: this.lastAnchor_,\n          duration: 500\n        });\n      } else if (rebound < 0) {\n        view.animate({\n          resolution: maxResolution,\n          easing: easeOut,\n          anchor: this.lastAnchor_,\n          duration: 500\n        });\n      }\n      this.startTime_ = now;\n      return false;\n    }\n\n    this.delta_ += delta;\n\n    var timeLeft = Math.max(this.timeout_ - (now - this.startTime_), 0);\n\n    clearTimeout(this.timeoutId_);\n    this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, map), timeLeft);\n\n    return false;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   */\n  MouseWheelZoom.prototype.handleWheelZoom_ = function handleWheelZoom_ (map) {\n    var view = map.getView();\n    if (view.getAnimating()) {\n      view.cancelAnimations();\n    }\n    var maxDelta = MAX_DELTA;\n    var delta = clamp(this.delta_, -maxDelta, maxDelta);\n    zoomByDelta(view, -delta, this.lastAnchor_, this.duration_);\n    this.mode_ = undefined;\n    this.delta_ = 0;\n    this.lastAnchor_ = null;\n    this.startTime_ = undefined;\n    this.timeoutId_ = undefined;\n  };\n\n  /**\n   * Enable or disable using the mouse's location as an anchor when zooming\n   * @param {boolean} useAnchor true to zoom to the mouse's location, false\n   * to zoom to the center of the map\n   * @api\n   */\n  MouseWheelZoom.prototype.setMouseAnchor = function setMouseAnchor (useAnchor) {\n    this.useAnchor_ = useAnchor;\n    if (!useAnchor) {\n      this.lastAnchor_ = null;\n    }\n  };\n\n  return MouseWheelZoom;\n}(Interaction));\n\nexport default MouseWheelZoom;\n\n//# sourceMappingURL=MouseWheelZoom.js.map","/**\n * @module ol/interaction/PinchRotate\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {rotate, rotateWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\nimport {disable} from '../rotationconstraint.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=250] The duration of the animation in\n * milliseconds.\n * @property {number} [threshold=0.3] Minimal angle in radians to start a rotation.\n */\n\n\n/**\n * @classdesc\n * Allows the user to rotate the map by twisting with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchRotate = /*@__PURE__*/(function (PointerInteraction) {\n  function PinchRotate(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    PointerInteraction.call(this, pointerOptions);\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastAngle_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.rotating_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.rotationDelta_ = 0.0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.threshold_ = options.threshold !== undefined ? options.threshold : 0.3;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 250;\n\n  }\n\n  if ( PointerInteraction ) PinchRotate.__proto__ = PointerInteraction;\n  PinchRotate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  PinchRotate.prototype.constructor = PinchRotate;\n\n  /**\n   * @inheritDoc\n   */\n  PinchRotate.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    var rotationDelta = 0.0;\n\n    var touch0 = this.targetPointers[0];\n    var touch1 = this.targetPointers[1];\n\n    // angle between touches\n    var angle = Math.atan2(\n      touch1.clientY - touch0.clientY,\n      touch1.clientX - touch0.clientX);\n\n    if (this.lastAngle_ !== undefined) {\n      var delta = angle - this.lastAngle_;\n      this.rotationDelta_ += delta;\n      if (!this.rotating_ &&\n          Math.abs(this.rotationDelta_) > this.threshold_) {\n        this.rotating_ = true;\n      }\n      rotationDelta = delta;\n    }\n    this.lastAngle_ = angle;\n\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    if (view.getConstraints().rotation === disable) {\n      return;\n    }\n\n    // rotate anchor point.\n    // FIXME: should be the intersection point between the lines:\n    //     touch0,touch1 and previousTouch0,previousTouch1\n    var viewportPosition = map.getViewport().getBoundingClientRect();\n    var centroid = centroidFromPointers(this.targetPointers);\n    centroid[0] -= viewportPosition.left;\n    centroid[1] -= viewportPosition.top;\n    this.anchor_ = map.getCoordinateFromPixel(centroid);\n\n    // rotate\n    if (this.rotating_) {\n      var rotation = view.getRotation();\n      map.render();\n      rotateWithoutConstraints(view, rotation + rotationDelta, this.anchor_);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  PinchRotate.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    if (this.targetPointers.length < 2) {\n      var map = mapBrowserEvent.map;\n      var view = map.getView();\n      view.setHint(ViewHint.INTERACTING, -1);\n      if (this.rotating_) {\n        var rotation = view.getRotation();\n        rotate(view, rotation, this.anchor_, this.duration_);\n      }\n      return false;\n    } else {\n      return true;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  PinchRotate.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (this.targetPointers.length >= 2) {\n      var map = mapBrowserEvent.map;\n      this.anchor_ = null;\n      this.lastAngle_ = undefined;\n      this.rotating_ = false;\n      this.rotationDelta_ = 0.0;\n      if (!this.handlingDownUpSequence) {\n        map.getView().setHint(ViewHint.INTERACTING, 1);\n      }\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return PinchRotate;\n}(PointerInteraction));\n\nexport default PinchRotate;\n\n//# sourceMappingURL=PinchRotate.js.map","/**\n * @module ol/interaction/PinchZoom\n */\nimport ViewHint from '../ViewHint.js';\nimport {FALSE} from '../functions.js';\nimport {zoom, zoomWithoutConstraints} from './Interaction.js';\nimport PointerInteraction, {centroid as centroidFromPointers} from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [duration=400] Animation duration in milliseconds.\n * @property {boolean} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the pinch gesture ends.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom the map by pinching with two fingers\n * on a touch screen.\n * @api\n */\nvar PinchZoom = /*@__PURE__*/(function (PointerInteraction) {\n  function PinchZoom(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    PointerInteraction.call(this, pointerOptions);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.constrainResolution_ = options.constrainResolution || false;\n\n    /**\n     * @private\n     * @type {import(\"../coordinate.js\").Coordinate}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastDistance_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.lastScaleDelta_ = 1;\n\n  }\n\n  if ( PointerInteraction ) PinchZoom.__proto__ = PointerInteraction;\n  PinchZoom.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  PinchZoom.prototype.constructor = PinchZoom;\n\n  /**\n   * @inheritDoc\n   */\n  PinchZoom.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    var scaleDelta = 1.0;\n\n    var touch0 = this.targetPointers[0];\n    var touch1 = this.targetPointers[1];\n    var dx = touch0.clientX - touch1.clientX;\n    var dy = touch0.clientY - touch1.clientY;\n\n    // distance between touches\n    var distance = Math.sqrt(dx * dx + dy * dy);\n\n    if (this.lastDistance_ !== undefined) {\n      scaleDelta = this.lastDistance_ / distance;\n    }\n    this.lastDistance_ = distance;\n\n\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    var resolution = view.getResolution();\n    var maxResolution = view.getMaxResolution();\n    var minResolution = view.getMinResolution();\n    var newResolution = resolution * scaleDelta;\n    if (newResolution > maxResolution) {\n      scaleDelta = maxResolution / resolution;\n      newResolution = maxResolution;\n    } else if (newResolution < minResolution) {\n      scaleDelta = minResolution / resolution;\n      newResolution = minResolution;\n    }\n\n    if (scaleDelta != 1.0) {\n      this.lastScaleDelta_ = scaleDelta;\n    }\n\n    // scale anchor point.\n    var viewportPosition = map.getViewport().getBoundingClientRect();\n    var centroid = centroidFromPointers(this.targetPointers);\n    centroid[0] -= viewportPosition.left;\n    centroid[1] -= viewportPosition.top;\n    this.anchor_ = map.getCoordinateFromPixel(centroid);\n\n    // scale, bypass the resolution constraint\n    map.render();\n    zoomWithoutConstraints(view, newResolution, this.anchor_);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  PinchZoom.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    if (this.targetPointers.length < 2) {\n      var map = mapBrowserEvent.map;\n      var view = map.getView();\n      view.setHint(ViewHint.INTERACTING, -1);\n      var resolution = view.getResolution();\n      if (this.constrainResolution_ ||\n          resolution < view.getMinResolution() ||\n          resolution > view.getMaxResolution()) {\n        // Zoom to final resolution, with an animation, and provide a\n        // direction not to zoom out/in if user was pinching in/out.\n        // Direction is > 0 if pinching out, and < 0 if pinching in.\n        var direction = this.lastScaleDelta_ - 1;\n        zoom(view, resolution, this.anchor_, this.duration_, direction);\n      }\n      return false;\n    } else {\n      return true;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  PinchZoom.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (this.targetPointers.length >= 2) {\n      var map = mapBrowserEvent.map;\n      this.anchor_ = null;\n      this.lastDistance_ = undefined;\n      this.lastScaleDelta_ = 1;\n      if (!this.handlingDownUpSequence) {\n        map.getView().setHint(ViewHint.INTERACTING, 1);\n      }\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return PinchZoom;\n}(PointerInteraction));\n\nexport default PinchZoom;\n\n//# sourceMappingURL=PinchZoom.js.map","/**\n * @module ol/interaction\n */\nimport Collection from './Collection.js';\nimport Kinetic from './Kinetic.js';\nimport DoubleClickZoom from './interaction/DoubleClickZoom.js';\nimport DragPan from './interaction/DragPan.js';\nimport DragRotate from './interaction/DragRotate.js';\nimport DragZoom from './interaction/DragZoom.js';\nimport KeyboardPan from './interaction/KeyboardPan.js';\nimport KeyboardZoom from './interaction/KeyboardZoom.js';\nimport MouseWheelZoom from './interaction/MouseWheelZoom.js';\nimport PinchRotate from './interaction/PinchRotate.js';\nimport PinchZoom from './interaction/PinchZoom.js';\nimport {focus} from './events/condition.js';\n\nexport {default as DoubleClickZoom} from './interaction/DoubleClickZoom.js';\nexport {default as DragAndDrop} from './interaction/DragAndDrop.js';\nexport {default as DragBox} from './interaction/DragBox.js';\nexport {default as DragPan} from './interaction/DragPan.js';\nexport {default as DragRotate} from './interaction/DragRotate.js';\nexport {default as DragRotateAndZoom} from './interaction/DragRotateAndZoom.js';\nexport {default as DragZoom} from './interaction/DragZoom.js';\nexport {default as Draw} from './interaction/Draw.js';\nexport {default as Extent} from './interaction/Extent.js';\nexport {default as Interaction} from './interaction/Interaction.js';\nexport {default as KeyboardPan} from './interaction/KeyboardPan.js';\nexport {default as KeyboardZoom} from './interaction/KeyboardZoom.js';\nexport {default as Modify} from './interaction/Modify.js';\nexport {default as MouseWheelZoom} from './interaction/MouseWheelZoom.js';\nexport {default as PinchRotate} from './interaction/PinchRotate.js';\nexport {default as PinchZoom} from './interaction/PinchZoom.js';\nexport {default as Pointer} from './interaction/Pointer.js';\nexport {default as Select} from './interaction/Select.js';\nexport {default as Snap} from './interaction/Snap.js';\nexport {default as Translate} from './interaction/Translate.js';\n\n\n/**\n * @typedef {Object} DefaultsOptions\n * @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is\n * desired.\n * @property {boolean} [onFocusOnly=false] Interact only when the map has the\n * focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is\n * useful when page scroll is desired for maps that do not have the browser's\n * focus.\n * @property {boolean} [constrainResolution=false] Zoom to the closest integer\n * zoom level after the wheel/trackpad or pinch gesture ends.\n * @property {boolean} [doubleClickZoom=true] Whether double click zoom is\n * desired.\n * @property {boolean} [keyboard=true] Whether keyboard interaction is desired.\n * @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.\n * @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.\n * @property {boolean} [dragPan=true] Whether drag pan is desired.\n * @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.\n * @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.\n * @property {number} [zoomDelta] Zoom level delta when using keyboard or\n * mousewheel zoom.\n * @property {number} [zoomDuration] Duration of the zoom animation in\n * milliseconds.\n */\n\n\n/**\n * Set of interactions included in maps by default. Specific interactions can be\n * excluded by setting the appropriate option to false in the constructor\n * options, but the order of the interactions is fixed.  If you want to specify\n * a different order for interactions, you will need to create your own\n * {@link module:ol/interaction/Interaction} instances and insert\n * them into a {@link module:ol/Collection} in the order you want\n * before creating your {@link module:ol/Map~Map} instance. The default set of\n * interactions, in sequence, is:\n * * {@link module:ol/interaction/DragRotate~DragRotate}\n * * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}\n * * {@link module:ol/interaction/DragPan~DragPan}\n * * {@link module:ol/interaction/PinchRotate~PinchRotate}\n * * {@link module:ol/interaction/PinchZoom~PinchZoom}\n * * {@link module:ol/interaction/KeyboardPan~KeyboardPan}\n * * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}\n * * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}\n * * {@link module:ol/interaction/DragZoom~DragZoom}\n *\n * @param {DefaultsOptions=} opt_options Defaults options.\n * @return {import(\"./Collection.js\").default<import(\"./interaction/Interaction.js\").default>}\n * A collection of interactions to be used with the {@link module:ol/Map~Map}\n * constructor's `interactions` option.\n * @api\n */\nexport function defaults(opt_options) {\n\n  var options = opt_options ? opt_options : {};\n\n  var interactions = new Collection();\n\n  var kinetic = new Kinetic(-0.005, 0.05, 100);\n\n  var altShiftDragRotate = options.altShiftDragRotate !== undefined ?\n    options.altShiftDragRotate : true;\n  if (altShiftDragRotate) {\n    interactions.push(new DragRotate());\n  }\n\n  var doubleClickZoom = options.doubleClickZoom !== undefined ?\n    options.doubleClickZoom : true;\n  if (doubleClickZoom) {\n    interactions.push(new DoubleClickZoom({\n      delta: options.zoomDelta,\n      duration: options.zoomDuration\n    }));\n  }\n\n  var dragPan = options.dragPan !== undefined ? options.dragPan : true;\n  if (dragPan) {\n    interactions.push(new DragPan({\n      condition: options.onFocusOnly ? focus : undefined,\n      kinetic: kinetic\n    }));\n  }\n\n  var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :\n    true;\n  if (pinchRotate) {\n    interactions.push(new PinchRotate());\n  }\n\n  var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;\n  if (pinchZoom) {\n    interactions.push(new PinchZoom({\n      constrainResolution: options.constrainResolution,\n      duration: options.zoomDuration\n    }));\n  }\n\n  var keyboard = options.keyboard !== undefined ? options.keyboard : true;\n  if (keyboard) {\n    interactions.push(new KeyboardPan());\n    interactions.push(new KeyboardZoom({\n      delta: options.zoomDelta,\n      duration: options.zoomDuration\n    }));\n  }\n\n  var mouseWheelZoom = options.mouseWheelZoom !== undefined ?\n    options.mouseWheelZoom : true;\n  if (mouseWheelZoom) {\n    interactions.push(new MouseWheelZoom({\n      condition: options.onFocusOnly ? focus : undefined,\n      constrainResolution: options.constrainResolution,\n      duration: options.zoomDuration\n    }));\n  }\n\n  var shiftDragZoom = options.shiftDragZoom !== undefined ?\n    options.shiftDragZoom : true;\n  if (shiftDragZoom) {\n    interactions.push(new DragZoom({\n      duration: options.zoomDuration\n    }));\n  }\n\n  return interactions;\n\n}\n\n//# sourceMappingURL=interaction.js.map","/**\n * @module ol/reproj/common\n */\n\n/**\n * Default maximum allowed threshold  (in pixels) for reprojection\n * triangulation.\n * @type {number}\n */\nexport var ERROR_THRESHOLD = 0.5;\n\n/**\n * Enable automatic reprojection of raster sources. Default is `true`.\n * TODO: decide if we want to expose this as a build flag or remove it\n * @type {boolean}\n */\nexport var ENABLE_RASTER_REPROJECTION = true;\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/ImageBase\n */\nimport {abstract} from './util.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n/**\n * @abstract\n */\nvar ImageBase = /*@__PURE__*/(function (EventTarget) {\n  function ImageBase(extent, resolution, pixelRatio, state) {\n\n    EventTarget.call(this);\n\n    /**\n     * @protected\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.extent = extent;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @protected\n     * @type {import(\"./ImageState.js\").default}\n     */\n    this.state = state;\n\n  }\n\n  if ( EventTarget ) ImageBase.__proto__ = EventTarget;\n  ImageBase.prototype = Object.create( EventTarget && EventTarget.prototype );\n  ImageBase.prototype.constructor = ImageBase;\n\n  /**\n   * @protected\n   */\n  ImageBase.prototype.changed = function changed () {\n    this.dispatchEvent(EventType.CHANGE);\n  };\n\n  /**\n   * @return {import(\"./extent.js\").Extent} Extent.\n   */\n  ImageBase.prototype.getExtent = function getExtent () {\n    return this.extent;\n  };\n\n  /**\n   * @abstract\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   */\n  ImageBase.prototype.getImage = function getImage () {\n    return abstract();\n  };\n\n  /**\n   * @return {number} PixelRatio.\n   */\n  ImageBase.prototype.getPixelRatio = function getPixelRatio () {\n    return this.pixelRatio_;\n  };\n\n  /**\n   * @return {number} Resolution.\n   */\n  ImageBase.prototype.getResolution = function getResolution () {\n    return /** @type {number} */ (this.resolution);\n  };\n\n  /**\n   * @return {import(\"./ImageState.js\").default} State.\n   */\n  ImageBase.prototype.getState = function getState () {\n    return this.state;\n  };\n\n  /**\n   * Load not yet loaded URI.\n   * @abstract\n   */\n  ImageBase.prototype.load = function load () {\n    abstract();\n  };\n\n  return ImageBase;\n}(EventTarget));\n\n\nexport default ImageBase;\n\n//# sourceMappingURL=ImageBase.js.map","/**\n * @module ol/ImageState\n */\n\n/**\n * @enum {number}\n */\nexport default {\n  IDLE: 0,\n  LOADING: 1,\n  LOADED: 2,\n  ERROR: 3\n};\n\n//# sourceMappingURL=ImageState.js.map","/**\n * @module ol/ImageCanvas\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\n\n\n/**\n * A function that is called to trigger asynchronous canvas drawing.  It is\n * called with a \"done\" callback that should be called when drawing is done.\n * If any error occurs during drawing, the \"done\" callback should be called with\n * that error.\n *\n * @typedef {function(function(Error=))} Loader\n */\n\n\nvar ImageCanvas = /*@__PURE__*/(function (ImageBase) {\n  function ImageCanvas(extent, resolution, pixelRatio, canvas, opt_loader) {\n\n    var state = opt_loader !== undefined ? ImageState.IDLE : ImageState.LOADED;\n\n    ImageBase.call(this, extent, resolution, pixelRatio, state);\n\n    /**\n     * Optional canvas loader function.\n     * @type {?Loader}\n     * @private\n     */\n    this.loader_ = opt_loader !== undefined ? opt_loader : null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = canvas;\n\n    /**\n     * @private\n     * @type {Error}\n     */\n    this.error_ = null;\n\n  }\n\n  if ( ImageBase ) ImageCanvas.__proto__ = ImageBase;\n  ImageCanvas.prototype = Object.create( ImageBase && ImageBase.prototype );\n  ImageCanvas.prototype.constructor = ImageCanvas;\n\n  /**\n   * Get any error associated with asynchronous rendering.\n   * @return {Error} Any error that occurred during rendering.\n   */\n  ImageCanvas.prototype.getError = function getError () {\n    return this.error_;\n  };\n\n  /**\n   * Handle async drawing complete.\n   * @param {Error=} err Any error during drawing.\n   * @private\n   */\n  ImageCanvas.prototype.handleLoad_ = function handleLoad_ (err) {\n    if (err) {\n      this.error_ = err;\n      this.state = ImageState.ERROR;\n    } else {\n      this.state = ImageState.LOADED;\n    }\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ImageCanvas.prototype.load = function load () {\n    if (this.state == ImageState.IDLE) {\n      this.state = ImageState.LOADING;\n      this.changed();\n      this.loader_(this.handleLoad_.bind(this));\n    }\n  };\n\n  /**\n   * @return {HTMLCanvasElement} Canvas element.\n   */\n  ImageCanvas.prototype.getImage = function getImage () {\n    return this.canvas_;\n  };\n\n  return ImageCanvas;\n}(ImageBase));\n\n\nexport default ImageCanvas;\n\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/LayerType\n */\n\n/**\n * A layer type used when creating layer renderers.\n * @enum {string}\n */\nexport default {\n  IMAGE: 'IMAGE',\n  TILE: 'TILE',\n  VECTOR_TILE: 'VECTOR_TILE',\n  VECTOR: 'VECTOR'\n};\n\n//# sourceMappingURL=LayerType.js.map","/**\n * @module ol/layer/VectorRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector layers:\n *  * `'image'`: Vector layers are rendered as images. Great performance, but\n *    point symbols and texts are always rotated with the view and pixels are\n *    scaled during zoom animations.\n *  * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering\n *    even during animations, but slower performance.\n * @api\n */\nexport default {\n  IMAGE: 'image',\n  VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorRenderType.js.map","/**\n * @module ol/render/Event\n */\n\nimport Event from '../events/Event.js';\n\nvar RenderEvent = /*@__PURE__*/(function (Event) {\n  function RenderEvent(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {\n\n    Event.call(this, type);\n\n    /**\n     * For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.\n     * @type {import(\"./VectorContext.js\").default|undefined}\n     * @api\n     */\n    this.vectorContext = opt_vectorContext;\n\n    /**\n     * An object representing the current render frame state.\n     * @type {import(\"../PluggableMap.js\").FrameState|undefined}\n     * @api\n     */\n    this.frameState = opt_frameState;\n\n    /**\n     * Canvas context. Only available when a Canvas renderer is used, null\n     * otherwise.\n     * @type {CanvasRenderingContext2D|null|undefined}\n     * @api\n     */\n    this.context = opt_context;\n\n    /**\n     * WebGL context. Only available when a WebGL renderer is used, null\n     * otherwise.\n     * @type {import(\"../webgl/Context.js\").default|null|undefined}\n     * @api\n     */\n    this.glContext = opt_glContext;\n\n  }\n\n  if ( Event ) RenderEvent.__proto__ = Event;\n  RenderEvent.prototype = Object.create( Event && Event.prototype );\n  RenderEvent.prototype.constructor = RenderEvent;\n\n  return RenderEvent;\n}(Event));\n\nexport default RenderEvent;\n\n//# sourceMappingURL=Event.js.map","/**\n * @module ol/structs/LRUCache\n */\n\nimport {assert} from '../asserts.js';\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\n\n\n/**\n * @typedef {Object} Entry\n * @property {string} key_\n * @property {Object} newer\n * @property {Object} older\n * @property {*} value_\n */\n\n\n/**\n * @classdesc\n * Implements a Least-Recently-Used cache where the keys do not conflict with\n * Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring\n * items from the cache is the responsibility of the user.\n *\n * @fires import(\"../events/Event.js\").Event\n * @template T\n */\nvar LRUCache = /*@__PURE__*/(function (EventTarget) {\n  function LRUCache(opt_highWaterMark) {\n\n    EventTarget.call(this);\n\n    /**\n     * @type {number}\n     */\n    this.highWaterMark = opt_highWaterMark !== undefined ? opt_highWaterMark : 2048;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.count_ = 0;\n\n    /**\n     * @private\n     * @type {!Object<string, Entry>}\n     */\n    this.entries_ = {};\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.oldest_ = null;\n\n    /**\n     * @private\n     * @type {?Entry}\n     */\n    this.newest_ = null;\n\n  }\n\n  if ( EventTarget ) LRUCache.__proto__ = EventTarget;\n  LRUCache.prototype = Object.create( EventTarget && EventTarget.prototype );\n  LRUCache.prototype.constructor = LRUCache;\n\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  LRUCache.prototype.canExpireCache = function canExpireCache () {\n    return this.getCount() > this.highWaterMark;\n  };\n\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  LRUCache.prototype.clear = function clear () {\n    this.count_ = 0;\n    this.entries_ = {};\n    this.oldest_ = null;\n    this.newest_ = null;\n    this.dispatchEvent(EventType.CLEAR);\n  };\n\n\n  /**\n   * @param {string} key Key.\n   * @return {boolean} Contains key.\n   */\n  LRUCache.prototype.containsKey = function containsKey (key) {\n    return this.entries_.hasOwnProperty(key);\n  };\n\n\n  /**\n   * @param {function(this: S, T, string, LRUCache): ?} f The function\n   *     to call for every entry from the oldest to the newer. This function takes\n   *     3 arguments (the entry value, the entry key and the LRUCache object).\n   *     The return value is ignored.\n   * @param {S=} opt_this The object to use as `this` in `f`.\n   * @template S\n   */\n  LRUCache.prototype.forEach = function forEach (f, opt_this) {\n    var entry = this.oldest_;\n    while (entry) {\n      f.call(opt_this, entry.value_, entry.key_, this);\n      entry = entry.newer;\n    }\n  };\n\n\n  /**\n   * @param {string} key Key.\n   * @return {T} Value.\n   */\n  LRUCache.prototype.get = function get (key) {\n    var entry = this.entries_[key];\n    assert(entry !== undefined,\n      15); // Tried to get a value for a key that does not exist in the cache\n    if (entry === this.newest_) {\n      return entry.value_;\n    } else if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (this.oldest_.newer);\n      this.oldest_.older = null;\n    } else {\n      entry.newer.older = entry.older;\n      entry.older.newer = entry.newer;\n    }\n    entry.newer = null;\n    entry.older = this.newest_;\n    this.newest_.newer = entry;\n    this.newest_ = entry;\n    return entry.value_;\n  };\n\n\n  /**\n   * Remove an entry from the cache.\n   * @param {string} key The entry key.\n   * @return {T} The removed entry.\n   */\n  LRUCache.prototype.remove = function remove (key) {\n    var entry = this.entries_[key];\n    assert(entry !== undefined, 15); // Tried to get a value for a key that does not exist in the cache\n    if (entry === this.newest_) {\n      this.newest_ = /** @type {Entry} */ (entry.older);\n      if (this.newest_) {\n        this.newest_.newer = null;\n      }\n    } else if (entry === this.oldest_) {\n      this.oldest_ = /** @type {Entry} */ (entry.newer);\n      if (this.oldest_) {\n        this.oldest_.older = null;\n      }\n    } else {\n      entry.newer.older = entry.older;\n      entry.older.newer = entry.newer;\n    }\n    delete this.entries_[key];\n    --this.count_;\n    return entry.value_;\n  };\n\n\n  /**\n   * @return {number} Count.\n   */\n  LRUCache.prototype.getCount = function getCount () {\n    return this.count_;\n  };\n\n\n  /**\n   * @return {Array<string>} Keys.\n   */\n  LRUCache.prototype.getKeys = function getKeys () {\n    var keys = new Array(this.count_);\n    var i = 0;\n    var entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      keys[i++] = entry.key_;\n    }\n    return keys;\n  };\n\n\n  /**\n   * @return {Array<T>} Values.\n   */\n  LRUCache.prototype.getValues = function getValues () {\n    var values = new Array(this.count_);\n    var i = 0;\n    var entry;\n    for (entry = this.newest_; entry; entry = entry.older) {\n      values[i++] = entry.value_;\n    }\n    return values;\n  };\n\n\n  /**\n   * @return {T} Last value.\n   */\n  LRUCache.prototype.peekLast = function peekLast () {\n    return this.oldest_.value_;\n  };\n\n\n  /**\n   * @return {string} Last key.\n   */\n  LRUCache.prototype.peekLastKey = function peekLastKey () {\n    return this.oldest_.key_;\n  };\n\n\n  /**\n   * Get the key of the newest item in the cache.  Throws if the cache is empty.\n   * @return {string} The newest key.\n   */\n  LRUCache.prototype.peekFirstKey = function peekFirstKey () {\n    return this.newest_.key_;\n  };\n\n\n  /**\n   * @return {T} value Value.\n   */\n  LRUCache.prototype.pop = function pop () {\n    var entry = this.oldest_;\n    delete this.entries_[entry.key_];\n    if (entry.newer) {\n      entry.newer.older = null;\n    }\n    this.oldest_ = /** @type {Entry} */ (entry.newer);\n    if (!this.oldest_) {\n      this.newest_ = null;\n    }\n    --this.count_;\n    return entry.value_;\n  };\n\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  LRUCache.prototype.replace = function replace (key, value) {\n    this.get(key); // update `newest_`\n    this.entries_[key].value_ = value;\n  };\n\n\n  /**\n   * @param {string} key Key.\n   * @param {T} value Value.\n   */\n  LRUCache.prototype.set = function set (key, value) {\n    assert(!(key in this.entries_),\n      16); // Tried to set a value for a key that is used already\n    var entry = /** @type {Entry} */ ({\n      key_: key,\n      newer: null,\n      older: this.newest_,\n      value_: value\n    });\n    if (!this.newest_) {\n      this.oldest_ = entry;\n    } else {\n      this.newest_.newer = entry;\n    }\n    this.newest_ = entry;\n    this.entries_[key] = entry;\n    ++this.count_;\n  };\n\n\n  /**\n   * Set a maximum number of entries for the cache.\n   * @param {number} size Cache size.\n   * @api\n   */\n  LRUCache.prototype.setSize = function setSize (size) {\n    this.highWaterMark = size;\n  };\n\n\n  /**\n   * Prune the cache.\n   */\n  LRUCache.prototype.prune = function prune () {\n    while (this.canExpireCache()) {\n      this.pop();\n    }\n  };\n\n  return LRUCache;\n}(EventTarget));\n\nexport default LRUCache;\n\n//# sourceMappingURL=LRUCache.js.map","/**\n * @module ol/render/canvas\n */\nimport {getFontFamilies} from '../css.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {clear} from '../obj.js';\nimport LRUCache from '../structs/LRUCache.js';\nimport {create as createTransform} from '../transform.js';\n\n\n/**\n * @typedef {Object} FillState\n * @property {import(\"../colorlike.js\").ColorLike} fillStyle\n */\n\n\n/**\n * @typedef {Object} FillStrokeState\n * @property {import(\"../colorlike.js\").ColorLike} [currentFillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [currentStrokeStyle]\n * @property {string} [currentLineCap]\n * @property {Array<number>} currentLineDash\n * @property {number} [currentLineDashOffset]\n * @property {string} [currentLineJoin]\n * @property {number} [currentLineWidth]\n * @property {number} [currentMiterLimit]\n * @property {number} [lastStroke]\n * @property {import(\"../colorlike.js\").ColorLike} [fillStyle]\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {string} [lineCap]\n * @property {Array<number>} lineDash\n * @property {number} [lineDashOffset]\n * @property {string} [lineJoin]\n * @property {number} [lineWidth]\n * @property {number} [miterLimit]\n */\n\n\n/**\n * @typedef {Object} StrokeState\n * @property {string} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {string} lineJoin\n * @property {number} lineWidth\n * @property {number} miterLimit\n * @property {import(\"../colorlike.js\").ColorLike} strokeStyle\n */\n\n\n/**\n * @typedef {Object} TextState\n * @property {string} font\n * @property {string} [textAlign]\n * @property {string} textBaseline\n * @property {string} [placement]\n * @property {number} [maxAngle]\n * @property {boolean} [overflow]\n * @property {import(\"../style/Fill.js\").default} [backgroundFill]\n * @property {import(\"../style/Stroke.js\").default} [backgroundStroke]\n * @property {number} [scale]\n * @property {Array<number>} [padding]\n */\n\n\n/**\n * Container for decluttered replay instructions that need to be rendered or\n * omitted together, i.e. when styles render both an image and text, or for the\n * characters that form text along lines. The basic elements of this array are\n * `[minX, minY, maxX, maxY, count]`, where the first four entries are the\n * rendered extent of the group in pixel space. `count` is the number of styles\n * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise.\n * In addition to these four elements, declutter instruction arrays (i.e. the\n * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array.\n * @typedef {Array<*>} DeclutterGroup\n */\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultFont = '10px sans-serif';\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultFillStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineCap = 'round';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultLineDash = [];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineDashOffset = 0;\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultLineJoin = 'round';\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultMiterLimit = 10;\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var defaultStrokeStyle = [0, 0, 0, 1];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextAlign = 'center';\n\n\n/**\n * @const\n * @type {string}\n */\nexport var defaultTextBaseline = 'middle';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var defaultPadding = [0, 0, 0, 0];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var defaultLineWidth = 1;\n\n\n/**\n * The label cache for text rendering. To change the default cache size of 2048\n * entries, use {@link module:ol/structs/LRUCache#setSize}.\n * @type {LRUCache<HTMLCanvasElement>}\n * @api\n */\nexport var labelCache = new LRUCache();\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var checkedFonts = {};\n\n\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar measureContext = null;\n\n\n/**\n * @type {!Object<string, number>}\n */\nexport var textHeights = {};\n\n\n/**\n * Clears the label cache when a font becomes available.\n * @param {string} fontSpec CSS font spec.\n */\nexport var checkFont = (function() {\n  var retries = 60;\n  var checked = checkedFonts;\n  var size = '32px ';\n  var referenceFonts = ['monospace', 'serif'];\n  var len = referenceFonts.length;\n  var text = 'wmytzilWMYTZIL@#/&?$%10\\uF013';\n  var interval, referenceWidth;\n\n  function isAvailable(font) {\n    var context = getMeasureContext();\n    // Check weight ranges according to\n    // https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights\n    for (var weight = 100; weight <= 700; weight += 300) {\n      var fontWeight = weight + ' ';\n      var available = true;\n      for (var i = 0; i < len; ++i) {\n        var referenceFont = referenceFonts[i];\n        context.font = fontWeight + size + referenceFont;\n        referenceWidth = context.measureText(text).width;\n        if (font != referenceFont) {\n          context.font = fontWeight + size + font + ',' + referenceFont;\n          var width = context.measureText(text).width;\n          // If width and referenceWidth are the same, then the fallback was used\n          // instead of the font we wanted, so the font is not available.\n          available = available && width != referenceWidth;\n        }\n      }\n      if (available) {\n        // Consider font available when it is available in one weight range.\n        //FIXME With this we miss rare corner cases, so we should consider\n        //FIXME checking availability for each requested weight range.\n        return true;\n      }\n    }\n    return false;\n  }\n\n  function check() {\n    var done = true;\n    for (var font in checked) {\n      if (checked[font] < retries) {\n        if (isAvailable(font)) {\n          checked[font] = retries;\n          clear(textHeights);\n          // Make sure that loaded fonts are picked up by Safari\n          measureContext = null;\n          labelCache.clear();\n        } else {\n          ++checked[font];\n          done = false;\n        }\n      }\n    }\n    if (done) {\n      clearInterval(interval);\n      interval = undefined;\n    }\n  }\n\n  return function(fontSpec) {\n    var fontFamilies = getFontFamilies(fontSpec);\n    if (!fontFamilies) {\n      return;\n    }\n    for (var i = 0, ii = fontFamilies.length; i < ii; ++i) {\n      var fontFamily = fontFamilies[i];\n      if (!(fontFamily in checked)) {\n        checked[fontFamily] = retries;\n        if (!isAvailable(fontFamily)) {\n          checked[fontFamily] = 0;\n          if (interval === undefined) {\n            interval = setInterval(check, 32);\n          }\n        }\n      }\n    }\n  };\n})();\n\n\n/**\n * @return {CanvasRenderingContext2D} Measure context.\n */\nfunction getMeasureContext() {\n  if (!measureContext) {\n    measureContext = createCanvasContext2D(1, 1);\n  }\n  return measureContext;\n}\n\n\n/**\n * @param {string} font Font to use for measuring.\n * @return {import(\"../size.js\").Size} Measurement.\n */\nexport var measureTextHeight = (function() {\n  var span;\n  var heights = textHeights;\n  return function(font) {\n    var height = heights[font];\n    if (height == undefined) {\n      if (!span) {\n        span = document.createElement('span');\n        span.textContent = 'M';\n        span.style.margin = span.style.padding = '0 !important';\n        span.style.position = 'absolute !important';\n        span.style.left = '-99999px !important';\n      }\n      span.style.font = font;\n      document.body.appendChild(span);\n      height = heights[font] = span.offsetHeight;\n      document.body.removeChild(span);\n    }\n    return height;\n  };\n})();\n\n\n/**\n * @param {string} font Font.\n * @param {string} text Text.\n * @return {number} Width.\n */\nexport function measureTextWidth(font, text) {\n  var measureContext = getMeasureContext();\n  if (font != measureContext.font) {\n    measureContext.font = font;\n  }\n  return measureContext.measureText(text).width;\n}\n\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {number} offsetX X offset.\n * @param {number} offsetY Y offset.\n */\nexport function rotateAtOffset(context, rotation, offsetX, offsetY) {\n  if (rotation !== 0) {\n    context.translate(offsetX, offsetY);\n    context.rotate(rotation);\n    context.translate(-offsetX, -offsetY);\n  }\n}\n\n\nexport var resetTransform = createTransform();\n\n\n/**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../transform.js\").Transform|null} transform Transform.\n * @param {number} opacity Opacity.\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} w Width.\n * @param {number} h Height.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} scale Scale.\n */\nexport function drawImage(context,\n  transform, opacity, image, originX, originY, w, h, x, y, scale) {\n  var alpha;\n  if (opacity != 1) {\n    alpha = context.globalAlpha;\n    context.globalAlpha = alpha * opacity;\n  }\n  if (transform) {\n    context.setTransform.apply(context, transform);\n  }\n\n  context.drawImage(image, originX, originY, w, h, x, y, w * scale, h * scale);\n\n  if (alpha) {\n    context.globalAlpha = alpha;\n  }\n  if (transform) {\n    context.setTransform.apply(context, resetTransform);\n  }\n}\n\n//# sourceMappingURL=canvas.js.map","/**\n * @module ol/colorlike\n */\nimport {toString} from './color.js';\n\n\n/**\n * A type accepted by CanvasRenderingContext2D.fillStyle\n * or CanvasRenderingContext2D.strokeStyle.\n * Represents a color, pattern, or gradient. The origin for patterns and\n * gradients as fill style is an increment of 512 css pixels from map coordinate\n * `[0, 0]`. For seamless repeat patterns, width and height of the pattern image\n * must be a factor of two (2, 4, 8, ..., 512).\n *\n * @typedef {string|CanvasPattern|CanvasGradient} ColorLike\n * @api\n */\n\n\n/**\n * @param {import(\"./color.js\").Color|ColorLike} color Color.\n * @return {ColorLike} The color as an {@link ol/colorlike~ColorLike}.\n * @api\n */\nexport function asColorLike(color) {\n  if (Array.isArray(color)) {\n    return toString(color);\n  } else {\n    return color;\n  }\n}\n\n//# sourceMappingURL=colorlike.js.map","/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries.  A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nvar VectorContext = function VectorContext () {};\n\nVectorContext.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {};\n\n/**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\nVectorContext.prototype.drawGeometry = function drawGeometry (geometry) {};\n\n/**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\nVectorContext.prototype.setStyle = function setStyle (style) {};\n\n/**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawCircle = function drawCircle (circleGeometry, feature) {};\n\n/**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n */\nVectorContext.prototype.drawFeature = function drawFeature (feature, style) {};\n\n/**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawGeometryCollection = function drawGeometryCollection (geometryCollectionGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPoint = function drawPoint (pointGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {};\n\n/**\n * @param {import(\"../geom/Geometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").default|import(\"./Feature.js\").default} feature Feature.\n */\nVectorContext.prototype.drawText = function drawText (geometry, feature) {};\n\n/**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\nVectorContext.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {};\n\n/**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setImageStyle = function setImageStyle (imageStyle, opt_declutterGroup) {};\n\n/**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"./canvas.js\").DeclutterGroup=} opt_declutterGroup Declutter.\n */\nVectorContext.prototype.setTextStyle = function setTextStyle (textStyle, opt_declutterGroup) {};\n\nexport default VectorContext;\n\n//# sourceMappingURL=VectorContext.js.map","/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport VectorContext from '../VectorContext.js';\nimport {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nvar CanvasImmediateRenderer = /*@__PURE__*/(function (VectorContext) {\n  function CanvasImmediateRenderer(context, pixelRatio, extent, transform, viewRotation) {\n    VectorContext.call(this);\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.context_ = context;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.extent_ = extent;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.transform_ = transform;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = viewRotation;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.contextFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.contextStrokeState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.contextTextState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.fillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.strokeState_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageAnchorY_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageHeight_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOpacity_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageOriginY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.imageRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageRotation_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageScale_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.imageWidth_ = 0;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.textRotateWithView_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textScale_ = 0;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = [];\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tmpLocalTransform_ = createTransform();\n\n  }\n\n  if ( VectorContext ) CanvasImmediateRenderer.__proto__ = VectorContext;\n  CanvasImmediateRenderer.prototype = Object.create( VectorContext && VectorContext.prototype );\n  CanvasImmediateRenderer.prototype.constructor = CanvasImmediateRenderer;\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  CanvasImmediateRenderer.prototype.drawImages_ = function drawImages_ (flatCoordinates, offset, end, stride) {\n    if (!this.image_) {\n      return;\n    }\n    var pixelCoordinates = transform2D(\n      flatCoordinates, offset, end, 2, this.transform_,\n      this.pixelCoordinates_);\n    var context = this.context_;\n    var localTransform = this.tmpLocalTransform_;\n    var alpha = context.globalAlpha;\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha * this.imageOpacity_;\n    }\n    var rotation = this.imageRotation_;\n    if (this.imageRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (var i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n      var x = pixelCoordinates[i] - this.imageAnchorX_;\n      var y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n      if (rotation !== 0 || this.imageScale_ != 1) {\n        var centerX = x + this.imageAnchorX_;\n        var centerY = y + this.imageAnchorY_;\n        composeTransform(localTransform,\n          centerX, centerY,\n          this.imageScale_, this.imageScale_,\n          rotation,\n          -centerX, -centerY);\n        context.setTransform.apply(context, localTransform);\n      }\n      context.drawImage(this.image_, this.imageOriginX_, this.imageOriginY_,\n        this.imageWidth_, this.imageHeight_, x, y,\n        this.imageWidth_, this.imageHeight_);\n    }\n    if (rotation !== 0 || this.imageScale_ != 1) {\n      context.setTransform(1, 0, 0, 1, 0, 0);\n    }\n    if (this.imageOpacity_ != 1) {\n      context.globalAlpha = alpha;\n    }\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   */\n  CanvasImmediateRenderer.prototype.drawText_ = function drawText_ (flatCoordinates, offset, end, stride) {\n    if (!this.textState_ || this.text_ === '') {\n      return;\n    }\n    if (this.textFillState_) {\n      this.setContextFillState_(this.textFillState_);\n    }\n    if (this.textStrokeState_) {\n      this.setContextStrokeState_(this.textStrokeState_);\n    }\n    this.setContextTextState_(this.textState_);\n    var pixelCoordinates = transform2D(\n      flatCoordinates, offset, end, stride, this.transform_,\n      this.pixelCoordinates_);\n    var context = this.context_;\n    var rotation = this.textRotation_;\n    if (this.textRotateWithView_) {\n      rotation += this.viewRotation_;\n    }\n    for (; offset < end; offset += stride) {\n      var x = pixelCoordinates[offset] + this.textOffsetX_;\n      var y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n      if (rotation !== 0 || this.textScale_ != 1) {\n        var localTransform = composeTransform(this.tmpLocalTransform_,\n          x, y,\n          this.textScale_, this.textScale_,\n          rotation,\n          -x, -y);\n        context.setTransform.apply(context, localTransform);\n      }\n      if (this.textStrokeState_) {\n        context.strokeText(this.text_, x, y);\n      }\n      if (this.textFillState_) {\n        context.fillText(this.text_, x, y);\n      }\n    }\n    if (rotation !== 0 || this.textScale_ != 1) {\n      context.setTransform(1, 0, 0, 1, 0, 0);\n    }\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} close Close.\n   * @private\n   * @return {number} end End.\n   */\n  CanvasImmediateRenderer.prototype.moveToLineTo_ = function moveToLineTo_ (flatCoordinates, offset, end, stride, close) {\n    var context = this.context_;\n    var pixelCoordinates = transform2D(\n      flatCoordinates, offset, end, stride, this.transform_,\n      this.pixelCoordinates_);\n    context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n    var length = pixelCoordinates.length;\n    if (close) {\n      length -= 2;\n    }\n    for (var i = 2; i < length; i += 2) {\n      context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n    }\n    if (close) {\n      context.closePath();\n    }\n    return end;\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} End.\n   */\n  CanvasImmediateRenderer.prototype.drawRings_ = function drawRings_ (flatCoordinates, offset, ends, stride) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, true);\n    }\n    return offset;\n  };\n\n  /**\n   * Render a circle geometry into the canvas.  Rendering is immediate and uses\n   * the current fill and stroke styles.\n   *\n   * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n   * @override\n   * @api\n   */\n  CanvasImmediateRenderer.prototype.drawCircle = function drawCircle (geometry) {\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.fillState_ || this.strokeState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      var pixelCoordinates = transformGeom2D(\n        geometry, this.transform_, this.pixelCoordinates_);\n      var dx = pixelCoordinates[2] - pixelCoordinates[0];\n      var dy = pixelCoordinates[3] - pixelCoordinates[1];\n      var radius = Math.sqrt(dx * dx + dy * dy);\n      var context = this.context_;\n      context.beginPath();\n      context.arc(\n        pixelCoordinates[0], pixelCoordinates[1], radius, 0, 2 * Math.PI);\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      this.drawText_(geometry.getCenter(), 0, 2, 2);\n    }\n  };\n\n  /**\n   * Set the rendering style.  Note that since this is an immediate rendering API,\n   * any `zIndex` on the provided style will be ignored.\n   *\n   * @param {import(\"../../style/Style.js\").default} style The rendering style.\n   * @override\n   * @api\n   */\n  CanvasImmediateRenderer.prototype.setStyle = function setStyle (style) {\n    this.setFillStrokeStyle(style.getFill(), style.getStroke());\n    this.setImageStyle(style.getImage());\n    this.setTextStyle(style.getText());\n  };\n\n  /**\n   * Render a geometry into the canvas.  Call\n   * {@link module:ol/render/canvas/Immediate#setStyle} first to set the rendering style.\n   *\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n   * @override\n   * @api\n   */\n  CanvasImmediateRenderer.prototype.drawGeometry = function drawGeometry (geometry) {\n    var type = geometry.getType();\n    switch (type) {\n      case GeometryType.POINT:\n        this.drawPoint(/** @type {import(\"../../geom/Point.js\").default} */ (geometry));\n        break;\n      case GeometryType.LINE_STRING:\n        this.drawLineString(/** @type {import(\"../../geom/LineString.js\").default} */ (geometry));\n        break;\n      case GeometryType.POLYGON:\n        this.drawPolygon(/** @type {import(\"../../geom/Polygon.js\").default} */ (geometry));\n        break;\n      case GeometryType.MULTI_POINT:\n        this.drawMultiPoint(/** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry));\n        break;\n      case GeometryType.MULTI_LINE_STRING:\n        this.drawMultiLineString(/** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry));\n        break;\n      case GeometryType.MULTI_POLYGON:\n        this.drawMultiPolygon(/** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry));\n        break;\n      case GeometryType.GEOMETRY_COLLECTION:\n        this.drawGeometryCollection(/** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry));\n        break;\n      case GeometryType.CIRCLE:\n        this.drawCircle(/** @type {import(\"../../geom/Circle.js\").default} */ (geometry));\n        break;\n      default:\n    }\n  };\n\n  /**\n   * Render a feature into the canvas.  Note that any `zIndex` on the provided\n   * style will be ignored - features are rendered immediately in the order that\n   * this method is called.  If you need `zIndex` support, you should be using an\n   * {@link module:ol/layer/Vector~VectorLayer} instead.\n   *\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {import(\"../../style/Style.js\").default} style Style.\n   * @override\n   * @api\n   */\n  CanvasImmediateRenderer.prototype.drawFeature = function drawFeature (feature, style) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    this.setStyle(style);\n    this.drawGeometry(geometry);\n  };\n\n  /**\n   * Render a GeometryCollection to the canvas.  Rendering is immediate and\n   * uses the current styles appropriate for each geometry in the collection.\n   *\n   * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawGeometryCollection = function drawGeometryCollection (geometry) {\n    var geometries = geometry.getGeometriesArray();\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      this.drawGeometry(geometries[i]);\n    }\n  };\n\n  /**\n   * Render a Point geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawPoint = function drawPoint (geometry) {\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  };\n\n  /**\n   * Render a MultiPoint geometry  into the canvas.  Rendering is immediate and\n   * uses the current style.\n   *\n   * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawMultiPoint = function drawMultiPoint (geometry) {\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var stride = geometry.getStride();\n    if (this.image_) {\n      this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n    if (this.text_ !== '') {\n      this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  };\n\n  /**\n   * Render a LineString into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawLineString = function drawLineString (geometry) {\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      var context = this.context_;\n      var flatCoordinates = geometry.getFlatCoordinates();\n      context.beginPath();\n      this.moveToLineTo_(flatCoordinates, 0, flatCoordinates.length,\n        geometry.getStride(), false);\n      context.stroke();\n    }\n    if (this.text_ !== '') {\n      var flatMidpoint = geometry.getFlatMidpoint();\n      this.drawText_(flatMidpoint, 0, 2, 2);\n    }\n  };\n\n  /**\n   * Render a MultiLineString geometry into the canvas.  Rendering is immediate\n   * and uses the current style.\n   *\n   * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawMultiLineString = function drawMultiLineString (geometry) {\n    var geometryExtent = geometry.getExtent();\n    if (!intersects(this.extent_, geometryExtent)) {\n      return;\n    }\n    if (this.strokeState_) {\n      this.setContextStrokeState_(this.strokeState_);\n      var context = this.context_;\n      var flatCoordinates = geometry.getFlatCoordinates();\n      var offset = 0;\n      var ends = /** @type {Array<number>} */ (geometry.getEnds());\n      var stride = geometry.getStride();\n      context.beginPath();\n      for (var i = 0, ii = ends.length; i < ii; ++i) {\n        offset = this.moveToLineTo_(flatCoordinates, offset, ends[i], stride, false);\n      }\n      context.stroke();\n    }\n    if (this.text_ !== '') {\n      var flatMidpoints = geometry.getFlatMidpoints();\n      this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n    }\n  };\n\n  /**\n   * Render a Polygon geometry into the canvas.  Rendering is immediate and uses\n   * the current style.\n   *\n   * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawPolygon = function drawPolygon (geometry) {\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      var context = this.context_;\n      context.beginPath();\n      this.drawRings_(geometry.getOrientedFlatCoordinates(),\n        0, /** @type {Array<number>} */ (geometry.getEnds()), geometry.getStride());\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      var flatInteriorPoint = geometry.getFlatInteriorPoint();\n      this.drawText_(flatInteriorPoint, 0, 2, 2);\n    }\n  };\n\n  /**\n   * Render MultiPolygon geometry into the canvas.  Rendering is immediate and\n   * uses the current style.\n   * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.drawMultiPolygon = function drawMultiPolygon (geometry) {\n    if (!intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    if (this.strokeState_ || this.fillState_) {\n      if (this.fillState_) {\n        this.setContextFillState_(this.fillState_);\n      }\n      if (this.strokeState_) {\n        this.setContextStrokeState_(this.strokeState_);\n      }\n      var context = this.context_;\n      var flatCoordinates = geometry.getOrientedFlatCoordinates();\n      var offset = 0;\n      var endss = geometry.getEndss();\n      var stride = geometry.getStride();\n      context.beginPath();\n      for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var ends = endss[i];\n        offset = this.drawRings_(flatCoordinates, offset, ends, stride);\n      }\n      if (this.fillState_) {\n        context.fill();\n      }\n      if (this.strokeState_) {\n        context.stroke();\n      }\n    }\n    if (this.text_ !== '') {\n      var flatInteriorPoints = geometry.getFlatInteriorPoints();\n      this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n   * @private\n   */\n  CanvasImmediateRenderer.prototype.setContextFillState_ = function setContextFillState_ (fillState) {\n    var context = this.context_;\n    var contextFillState = this.contextFillState_;\n    if (!contextFillState) {\n      context.fillStyle = fillState.fillStyle;\n      this.contextFillState_ = {\n        fillStyle: fillState.fillStyle\n      };\n    } else {\n      if (contextFillState.fillStyle != fillState.fillStyle) {\n        contextFillState.fillStyle = context.fillStyle = fillState.fillStyle;\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n   * @private\n   */\n  CanvasImmediateRenderer.prototype.setContextStrokeState_ = function setContextStrokeState_ (strokeState) {\n    var context = this.context_;\n    var contextStrokeState = this.contextStrokeState_;\n    if (!contextStrokeState) {\n      context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n      if (CANVAS_LINE_DASH) {\n        context.setLineDash(strokeState.lineDash);\n        context.lineDashOffset = strokeState.lineDashOffset;\n      }\n      context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n      context.lineWidth = strokeState.lineWidth;\n      context.miterLimit = strokeState.miterLimit;\n      context.strokeStyle = strokeState.strokeStyle;\n      this.contextStrokeState_ = {\n        lineCap: strokeState.lineCap,\n        lineDash: strokeState.lineDash,\n        lineDashOffset: strokeState.lineDashOffset,\n        lineJoin: strokeState.lineJoin,\n        lineWidth: strokeState.lineWidth,\n        miterLimit: strokeState.miterLimit,\n        strokeStyle: strokeState.strokeStyle\n      };\n    } else {\n      if (contextStrokeState.lineCap != strokeState.lineCap) {\n        contextStrokeState.lineCap = context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n      }\n      if (CANVAS_LINE_DASH) {\n        if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n          context.setLineDash(contextStrokeState.lineDash = strokeState.lineDash);\n        }\n        if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n          contextStrokeState.lineDashOffset = context.lineDashOffset =\n              strokeState.lineDashOffset;\n        }\n      }\n      if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n        contextStrokeState.lineJoin = context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n      }\n      if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n        contextStrokeState.lineWidth = context.lineWidth = strokeState.lineWidth;\n      }\n      if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n        contextStrokeState.miterLimit = context.miterLimit =\n            strokeState.miterLimit;\n      }\n      if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n        contextStrokeState.strokeStyle = context.strokeStyle =\n            strokeState.strokeStyle;\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").TextState} textState Text state.\n   * @private\n   */\n  CanvasImmediateRenderer.prototype.setContextTextState_ = function setContextTextState_ (textState) {\n    var context = this.context_;\n    var contextTextState = this.contextTextState_;\n    var textAlign = textState.textAlign ?\n      textState.textAlign : defaultTextAlign;\n    if (!contextTextState) {\n      context.font = textState.font;\n      context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n      context.textBaseline = /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n      this.contextTextState_ = {\n        font: textState.font,\n        textAlign: textAlign,\n        textBaseline: textState.textBaseline\n      };\n    } else {\n      if (contextTextState.font != textState.font) {\n        contextTextState.font = context.font = textState.font;\n      }\n      if (contextTextState.textAlign != textAlign) {\n        contextTextState.textAlign = context.textAlign = /** @type {CanvasTextAlign} */ (textAlign);\n      }\n      if (contextTextState.textBaseline != textState.textBaseline) {\n        contextTextState.textBaseline = context.textBaseline =\n          /** @type {CanvasTextBaseline} */ (textState.textBaseline);\n      }\n    }\n  };\n\n  /**\n   * Set the fill and stroke style for subsequent draw operations.  To clear\n   * either fill or stroke styles, pass null for the appropriate parameter.\n   *\n   * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n   * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    if (!fillStyle) {\n      this.fillState_ = null;\n    } else {\n      var fillStyleColor = fillStyle.getColor();\n      this.fillState_ = {\n        fillStyle: asColorLike(fillStyleColor ?\n          fillStyleColor : defaultFillStyle)\n      };\n    }\n    if (!strokeStyle) {\n      this.strokeState_ = null;\n    } else {\n      var strokeStyleColor = strokeStyle.getColor();\n      var strokeStyleLineCap = strokeStyle.getLineCap();\n      var strokeStyleLineDash = strokeStyle.getLineDash();\n      var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      var strokeStyleLineJoin = strokeStyle.getLineJoin();\n      var strokeStyleWidth = strokeStyle.getWidth();\n      var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      this.strokeState_ = {\n        lineCap: strokeStyleLineCap !== undefined ?\n          strokeStyleLineCap : defaultLineCap,\n        lineDash: strokeStyleLineDash ?\n          strokeStyleLineDash : defaultLineDash,\n        lineDashOffset: strokeStyleLineDashOffset ?\n          strokeStyleLineDashOffset : defaultLineDashOffset,\n        lineJoin: strokeStyleLineJoin !== undefined ?\n          strokeStyleLineJoin : defaultLineJoin,\n        lineWidth: this.pixelRatio_ * (strokeStyleWidth !== undefined ?\n          strokeStyleWidth : defaultLineWidth),\n        miterLimit: strokeStyleMiterLimit !== undefined ?\n          strokeStyleMiterLimit : defaultMiterLimit,\n        strokeStyle: asColorLike(strokeStyleColor ?\n          strokeStyleColor : defaultStrokeStyle)\n      };\n    }\n  };\n\n  /**\n   * Set the image style for subsequent draw operations.  Pass null to remove\n   * the image style.\n   *\n   * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.setImageStyle = function setImageStyle (imageStyle) {\n    if (!imageStyle) {\n      this.image_ = null;\n    } else {\n      var imageAnchor = imageStyle.getAnchor();\n      // FIXME pixel ratio\n      var imageImage = imageStyle.getImage(1);\n      var imageOrigin = imageStyle.getOrigin();\n      var imageSize = imageStyle.getSize();\n      this.imageAnchorX_ = imageAnchor[0];\n      this.imageAnchorY_ = imageAnchor[1];\n      this.imageHeight_ = imageSize[1];\n      this.image_ = imageImage;\n      this.imageOpacity_ = imageStyle.getOpacity();\n      this.imageOriginX_ = imageOrigin[0];\n      this.imageOriginY_ = imageOrigin[1];\n      this.imageRotateWithView_ = imageStyle.getRotateWithView();\n      this.imageRotation_ = imageStyle.getRotation();\n      this.imageScale_ = imageStyle.getScale() * this.pixelRatio_;\n      this.imageWidth_ = imageSize[0];\n    }\n  };\n\n  /**\n   * Set the text style for subsequent draw operations.  Pass null to\n   * remove the text style.\n   *\n   * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n   * @override\n   */\n  CanvasImmediateRenderer.prototype.setTextStyle = function setTextStyle (textStyle) {\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      var textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        this.textFillState_ = null;\n      } else {\n        var textFillStyleColor = textFillStyle.getColor();\n        this.textFillState_ = {\n          fillStyle: asColorLike(textFillStyleColor ?\n            textFillStyleColor : defaultFillStyle)\n        };\n      }\n      var textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\n        this.textStrokeState_ = null;\n      } else {\n        var textStrokeStyleColor = textStrokeStyle.getColor();\n        var textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n        var textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n        var textStrokeStyleLineDashOffset = textStrokeStyle.getLineDashOffset();\n        var textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n        var textStrokeStyleWidth = textStrokeStyle.getWidth();\n        var textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n        this.textStrokeState_ = {\n          lineCap: textStrokeStyleLineCap !== undefined ?\n            textStrokeStyleLineCap : defaultLineCap,\n          lineDash: textStrokeStyleLineDash ?\n            textStrokeStyleLineDash : defaultLineDash,\n          lineDashOffset: textStrokeStyleLineDashOffset ?\n            textStrokeStyleLineDashOffset : defaultLineDashOffset,\n          lineJoin: textStrokeStyleLineJoin !== undefined ?\n            textStrokeStyleLineJoin : defaultLineJoin,\n          lineWidth: textStrokeStyleWidth !== undefined ?\n            textStrokeStyleWidth : defaultLineWidth,\n          miterLimit: textStrokeStyleMiterLimit !== undefined ?\n            textStrokeStyleMiterLimit : defaultMiterLimit,\n          strokeStyle: asColorLike(textStrokeStyleColor ?\n            textStrokeStyleColor : defaultStrokeStyle)\n        };\n      }\n      var textFont = textStyle.getFont();\n      var textOffsetX = textStyle.getOffsetX();\n      var textOffsetY = textStyle.getOffsetY();\n      var textRotateWithView = textStyle.getRotateWithView();\n      var textRotation = textStyle.getRotation();\n      var textScale = textStyle.getScale();\n      var textText = textStyle.getText();\n      var textTextAlign = textStyle.getTextAlign();\n      var textTextBaseline = textStyle.getTextBaseline();\n      this.textState_ = {\n        font: textFont !== undefined ?\n          textFont : defaultFont,\n        textAlign: textTextAlign !== undefined ?\n          textTextAlign : defaultTextAlign,\n        textBaseline: textTextBaseline !== undefined ?\n          textTextBaseline : defaultTextBaseline\n      };\n      this.text_ = textText !== undefined ? textText : '';\n      this.textOffsetX_ =\n          textOffsetX !== undefined ? (this.pixelRatio_ * textOffsetX) : 0;\n      this.textOffsetY_ =\n          textOffsetY !== undefined ? (this.pixelRatio_ * textOffsetY) : 0;\n      this.textRotateWithView_ = textRotateWithView !== undefined ? textRotateWithView : false;\n      this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n      this.textScale_ = this.pixelRatio_ * (textScale !== undefined ?\n        textScale : 1);\n    }\n  };\n\n  return CanvasImmediateRenderer;\n}(VectorContext));\n\n\nexport default CanvasImmediateRenderer;\n\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/style/IconImageCache\n */\nimport {asString} from '../color.js';\n\n/**\n * @classdesc\n * Singleton class. Available through {@link module:ol/style/IconImageCache~shared}.\n */\nvar IconImageCache = function IconImageCache() {\n\n  /**\n  * @type {!Object<string, import(\"./IconImage.js\").default>}\n  * @private\n  */\n  this.cache_ = {};\n\n  /**\n  * @type {number}\n  * @private\n  */\n  this.cacheSize_ = 0;\n\n  /**\n  * @type {number}\n  * @private\n  */\n  this.maxCacheSize_ = 32;\n};\n\n/**\n* FIXME empty description for jsdoc\n*/\nIconImageCache.prototype.clear = function clear () {\n  this.cache_ = {};\n  this.cacheSize_ = 0;\n};\n\n/**\n* FIXME empty description for jsdoc\n*/\nIconImageCache.prototype.expire = function expire () {\n  if (this.cacheSize_ > this.maxCacheSize_) {\n    var i = 0;\n    for (var key in this.cache_) {\n      var iconImage = this.cache_[key];\n      if ((i++ & 3) === 0 && !iconImage.hasListener()) {\n        delete this.cache_[key];\n        --this.cacheSize_;\n      }\n    }\n  }\n};\n\n/**\n* @param {string} src Src.\n* @param {?string} crossOrigin Cross origin.\n* @param {import(\"../color.js\").Color} color Color.\n* @return {import(\"./IconImage.js\").default} Icon image.\n*/\nIconImageCache.prototype.get = function get (src, crossOrigin, color) {\n  var key = getKey(src, crossOrigin, color);\n  return key in this.cache_ ? this.cache_[key] : null;\n};\n\n/**\n* @param {string} src Src.\n* @param {?string} crossOrigin Cross origin.\n* @param {import(\"../color.js\").Color} color Color.\n* @param {import(\"./IconImage.js\").default} iconImage Icon image.\n*/\nIconImageCache.prototype.set = function set (src, crossOrigin, color, iconImage) {\n  var key = getKey(src, crossOrigin, color);\n  this.cache_[key] = iconImage;\n  ++this.cacheSize_;\n};\n\n/**\n* Set the cache size of the icon cache. Default is `32`. Change this value when\n* your map uses more than 32 different icon images and you are not caching icon\n* styles on the application level.\n* @param {number} maxCacheSize Cache max size.\n* @api\n*/\nIconImageCache.prototype.setSize = function setSize (maxCacheSize) {\n  this.maxCacheSize_ = maxCacheSize;\n  this.expire();\n};\n\n\n/**\n * @param {string} src Src.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {string} Cache key.\n */\nfunction getKey(src, crossOrigin, color) {\n  var colorString = color ? asString(color) : 'null';\n  return crossOrigin + ':' + src + ':' + colorString;\n}\n\n\nexport default IconImageCache;\n\n\n/**\n * The {@link module:ol/style/IconImageCache~IconImageCache} for\n * {@link module:ol/style/Icon~Icon} images.\n * @api\n */\nexport var shared = new IconImageCache();\n\n//# sourceMappingURL=IconImageCache.js.map","/**\n * @module ol/renderer/Map\n */\nimport {abstract, getUid} from '../util.js';\nimport Disposable from '../Disposable.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getWidth} from '../extent.js';\nimport {TRUE} from '../functions.js';\nimport {visibleAtResolution} from '../layer/Layer.js';\nimport {shared as iconImageCache} from '../style/IconImageCache.js';\nimport {compose as composeTransform, invert as invertTransform, setFromArray as transformSetFromArray} from '../transform.js';\n\n/**\n * @abstract\n */\nvar MapRenderer = /*@__PURE__*/(function (Disposable) {\n  function MapRenderer(map) {\n    Disposable.call(this);\n\n    /**\n     * @private\n     * @type {import(\"../PluggableMap.js\").default}\n     */\n    this.map_ = map;\n\n    /**\n     * @private\n     * @type {!Object<string, import(\"./Layer.js\").default>}\n     */\n    this.layerRenderers_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, import(\"../events.js\").EventsKey>}\n     */\n    this.layerRendererListeners_ = {};\n\n    /**\n     * @private\n     * @type {Array<typeof import(\"./Layer.js\").default>}\n     */\n    this.layerRendererConstructors_ = [];\n\n  }\n\n  if ( Disposable ) MapRenderer.__proto__ = Disposable;\n  MapRenderer.prototype = Object.create( Disposable && Disposable.prototype );\n  MapRenderer.prototype.constructor = MapRenderer;\n\n  /**\n   * @abstract\n   * @param {import(\"../render/EventType.js\").default} type Event type.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   */\n  MapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n    abstract();\n  };\n\n  /**\n   * Register layer renderer constructors.\n   * @param {Array<typeof import(\"./Layer.js\").default>} constructors Layer renderers.\n   */\n  MapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n    this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_, constructors);\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n   * @protected\n   */\n  MapRenderer.prototype.calculateMatrices2D = function calculateMatrices2D (frameState) {\n    var viewState = frameState.viewState;\n    var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n    var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n\n    composeTransform(coordinateToPixelTransform,\n      frameState.size[0] / 2, frameState.size[1] / 2,\n      1 / viewState.resolution, -1 / viewState.resolution,\n      -viewState.rotation,\n      -viewState.center[0], -viewState.center[1]);\n\n    invertTransform(\n      transformSetFromArray(pixelToCoordinateTransform, coordinateToPixelTransform));\n  };\n\n  /**\n   * Removes all layer renderers.\n   */\n  MapRenderer.prototype.removeLayerRenderers = function removeLayerRenderers () {\n    for (var key in this.layerRenderers_) {\n      this.removeLayerRendererByKey_(key).dispose();\n    }\n  };\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(this: S, import(\"../Feature.js\").FeatureLike,\n   *     import(\"../layer/Layer.js\").default): T} callback Feature callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n   *     function, only layers which are visible and for which this function\n   *     returns `true` will be tested for features.  By default, all visible\n   *     layers will be tested.\n   * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n   * @return {T|undefined} Callback result.\n   * @template S,T,U\n   */\n  MapRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    thisArg,\n    layerFilter,\n    thisArg2\n  ) {\n    var result;\n    var viewState = frameState.viewState;\n    var viewResolution = viewState.resolution;\n\n    /**\n     * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n     * @param {import(\"../layer/Layer.js\").default} layer Layer.\n     * @return {?} Callback result.\n     */\n    function forEachFeatureAtCoordinate(feature, layer) {\n      var managed = frameState.layerStates[getUid(layer)].managed;\n      if (!(getUid(feature) in frameState.skippedFeatureUids && !managed)) {\n        return callback.call(thisArg, feature, managed ? layer : null);\n      }\n    }\n\n    var projection = viewState.projection;\n\n    var translatedCoordinate = coordinate;\n    if (projection.canWrapX()) {\n      var projectionExtent = projection.getExtent();\n      var worldWidth = getWidth(projectionExtent);\n      var x = coordinate[0];\n      if (x < projectionExtent[0] || x > projectionExtent[2]) {\n        var worldsAway = Math.ceil((projectionExtent[0] - x) / worldWidth);\n        translatedCoordinate = [x + worldWidth * worldsAway, coordinate[1]];\n      }\n    }\n\n    var layerStates = frameState.layerStatesArray;\n    var numLayers = layerStates.length;\n    var i;\n    for (i = numLayers - 1; i >= 0; --i) {\n      var layerState = layerStates[i];\n      var layer = layerState.layer;\n      if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n        var layerRenderer = this.getLayerRenderer(layer);\n        var source = /** @type {import(\"../layer/Layer.js\").default} */ (layer).getSource();\n        if (source) {\n          result = layerRenderer.forEachFeatureAtCoordinate(\n            source.getWrapX() ? translatedCoordinate : coordinate,\n            frameState, hitTolerance, forEachFeatureAtCoordinate);\n        }\n        if (result) {\n          return result;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(this: S, import(\"../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n   *     callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n   *     function, only layers which are visible and for which this function\n   *     returns `true` will be tested for features.  By default, all visible\n   *     layers will be tested.\n   * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n   * @return {T|undefined} Callback result.\n   * @template S,T,U\n   */\n  MapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n    return abstract();\n  };\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n   *     function, only layers which are visible and for which this function\n   *     returns `true` will be tested for features.  By default, all visible\n   *     layers will be tested.\n   * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n   * @return {boolean} Is there a feature at the given coordinate?\n   * @template U\n   */\n  MapRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState, hitTolerance, layerFilter, thisArg) {\n    var hasFeature = this.forEachFeatureAtCoordinate(\n      coordinate, frameState, hitTolerance, TRUE, this, layerFilter, thisArg);\n\n    return hasFeature !== undefined;\n  };\n\n  /**\n   * @param {import(\"../layer/Base.js\").default} layer Layer.\n   * @protected\n   * @return {import(\"./Layer.js\").default} Layer renderer.\n   */\n  MapRenderer.prototype.getLayerRenderer = function getLayerRenderer (layer) {\n    var layerKey = getUid(layer);\n    if (layerKey in this.layerRenderers_) {\n      return this.layerRenderers_[layerKey];\n    } else {\n      var renderer;\n      for (var i = 0, ii = this.layerRendererConstructors_.length; i < ii; ++i) {\n        var candidate = this.layerRendererConstructors_[i];\n        if (candidate['handles'](layer)) {\n          renderer = candidate['create'](this, layer);\n          break;\n        }\n      }\n      if (renderer) {\n        this.layerRenderers_[layerKey] = renderer;\n        this.layerRendererListeners_[layerKey] = listen(renderer,\n          EventType.CHANGE, this.handleLayerRendererChange_, this);\n      } else {\n        throw new Error('Unable to create renderer for layer: ' + layer.getType());\n      }\n      return renderer;\n    }\n  };\n\n  /**\n   * @param {string} layerKey Layer key.\n   * @protected\n   * @return {import(\"./Layer.js\").default} Layer renderer.\n   */\n  MapRenderer.prototype.getLayerRendererByKey = function getLayerRendererByKey (layerKey) {\n    return this.layerRenderers_[layerKey];\n  };\n\n  /**\n   * @protected\n   * @return {Object<string, import(\"./Layer.js\").default>} Layer renderers.\n   */\n  MapRenderer.prototype.getLayerRenderers = function getLayerRenderers () {\n    return this.layerRenderers_;\n  };\n\n  /**\n   * @return {import(\"../PluggableMap.js\").default} Map.\n   */\n  MapRenderer.prototype.getMap = function getMap () {\n    return this.map_;\n  };\n\n  /**\n   * Handle changes in a layer renderer.\n   * @private\n   */\n  MapRenderer.prototype.handleLayerRendererChange_ = function handleLayerRendererChange_ () {\n    this.map_.render();\n  };\n\n  /**\n   * @param {string} layerKey Layer key.\n   * @return {import(\"./Layer.js\").default} Layer renderer.\n   * @private\n   */\n  MapRenderer.prototype.removeLayerRendererByKey_ = function removeLayerRendererByKey_ (layerKey) {\n    var layerRenderer = this.layerRenderers_[layerKey];\n    delete this.layerRenderers_[layerKey];\n\n    unlistenByKey(this.layerRendererListeners_[layerKey]);\n    delete this.layerRendererListeners_[layerKey];\n\n    return layerRenderer;\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  MapRenderer.prototype.removeUnusedLayerRenderers_ = function removeUnusedLayerRenderers_ (map, frameState) {\n    for (var layerKey in this.layerRenderers_) {\n      if (!frameState || !(layerKey in frameState.layerStates)) {\n        this.removeLayerRendererByKey_(layerKey).dispose();\n      }\n    }\n  };\n\n  /**\n   * Render.\n   * @abstract\n   * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   */\n  MapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n    abstract();\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  MapRenderer.prototype.scheduleExpireIconCache = function scheduleExpireIconCache (frameState) {\n    frameState.postRenderFunctions.push(/** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (expireIconCache));\n  };\n\n  /**\n   * @param {!import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @protected\n   */\n  MapRenderer.prototype.scheduleRemoveUnusedLayerRenderers = function scheduleRemoveUnusedLayerRenderers (frameState) {\n    for (var layerKey in this.layerRenderers_) {\n      if (!(layerKey in frameState.layerStates)) {\n        frameState.postRenderFunctions.push(\n          /** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (this.removeUnusedLayerRenderers_.bind(this))\n        );\n        return;\n      }\n    }\n  };\n\n  return MapRenderer;\n}(Disposable));\n\n\n/**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n  iconImageCache.expire();\n}\n\n\n/**\n * @param {import(\"../layer/Layer.js\").State} state1 First layer state.\n * @param {import(\"../layer/Layer.js\").State} state2 Second layer state.\n * @return {number} The zIndex difference.\n */\nexport function sortByZIndex(state1, state2) {\n  return state1.zIndex - state2.zIndex;\n}\nexport default MapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/canvas/Map\n */\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\nimport {includes, stableSort} from '../../array.js';\nimport {CLASS_UNSELECTABLE} from '../../css.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {visibleAtResolution} from '../../layer/Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport MapRenderer, {sortByZIndex} from '../Map.js';\nimport SourceState from '../../source/State.js';\n\n\n/**\n * @type {Array<typeof import(\"../Layer.js\").default>}\n */\nexport var layerRendererConstructors = [];\n\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CanvasMapRenderer = /*@__PURE__*/(function (MapRenderer) {\n  function CanvasMapRenderer(map) {\n    MapRenderer.call(this, map);\n\n    var container = map.getViewport();\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.context_ = createCanvasContext2D();\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = this.context_.canvas;\n\n    this.canvas_.style.width = '100%';\n    this.canvas_.style.height = '100%';\n    this.canvas_.style.display = 'block';\n    this.canvas_.className = CLASS_UNSELECTABLE;\n    container.insertBefore(this.canvas_, container.childNodes[0] || null);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = true;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.transform_ = createTransform();\n\n  }\n\n  if ( MapRenderer ) CanvasMapRenderer.__proto__ = MapRenderer;\n  CanvasMapRenderer.prototype = Object.create( MapRenderer && MapRenderer.prototype );\n  CanvasMapRenderer.prototype.constructor = CanvasMapRenderer;\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   */\n  CanvasMapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n    var map = this.getMap();\n    var context = this.context_;\n    if (map.hasListener(type)) {\n      var extent = frameState.extent;\n      var pixelRatio = frameState.pixelRatio;\n      var viewState = frameState.viewState;\n      var rotation = viewState.rotation;\n\n      var transform = this.getTransform(frameState);\n\n      var vectorContext = new CanvasImmediateRenderer(context, pixelRatio,\n        extent, transform, rotation);\n      var composeEvent = new RenderEvent(type, vectorContext,\n        frameState, context, null);\n      map.dispatchEvent(composeEvent);\n    }\n  };\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */\n  CanvasMapRenderer.prototype.getTransform = function getTransform (frameState) {\n    var viewState = frameState.viewState;\n    var dx1 = this.canvas_.width / 2;\n    var dy1 = this.canvas_.height / 2;\n    var sx = frameState.pixelRatio / viewState.resolution;\n    var sy = -sx;\n    var angle = -viewState.rotation;\n    var dx2 = -viewState.center[0];\n    var dy2 = -viewState.center[1];\n    return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasMapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        this.canvas_.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    var context = this.context_;\n    var pixelRatio = frameState.pixelRatio;\n    var width = Math.round(frameState.size[0] * pixelRatio);\n    var height = Math.round(frameState.size[1] * pixelRatio);\n    if (this.canvas_.width != width || this.canvas_.height != height) {\n      this.canvas_.width = width;\n      this.canvas_.height = height;\n    } else {\n      context.clearRect(0, 0, width, height);\n    }\n\n    var rotation = frameState.viewState.rotation;\n\n    this.calculateMatrices2D(frameState);\n\n    this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n    var layerStatesArray = frameState.layerStatesArray;\n    stableSort(layerStatesArray, sortByZIndex);\n\n    if (rotation) {\n      context.save();\n      rotateAtOffset(context, rotation, width / 2, height / 2);\n    }\n\n    var viewResolution = frameState.viewState.resolution;\n    var i, ii;\n    for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      var layerState = layerStatesArray[i];\n      var layer = layerState.layer;\n      var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n      if (!visibleAtResolution(layerState, viewResolution) ||\n          layerState.sourceState != SourceState.READY) {\n        continue;\n      }\n      if (layerRenderer.prepareFrame(frameState, layerState)) {\n        layerRenderer.composeFrame(frameState, layerState, context);\n      }\n    }\n\n    if (rotation) {\n      context.restore();\n    }\n\n    this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n    if (!this.renderedVisible_) {\n      this.canvas_.style.display = '';\n      this.renderedVisible_ = true;\n    }\n\n    this.scheduleRemoveUnusedLayerRenderers(frameState);\n    this.scheduleExpireIconCache(frameState);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasMapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n    var result;\n    var viewState = frameState.viewState;\n    var viewResolution = viewState.resolution;\n\n    var layerStates = frameState.layerStatesArray;\n    var numLayers = layerStates.length;\n\n    var coordinate = applyTransform(\n      frameState.pixelToCoordinateTransform, pixel.slice());\n\n    var i;\n    for (i = numLayers - 1; i >= 0; --i) {\n      var layerState = layerStates[i];\n      var layer = layerState.layer;\n      if (visibleAtResolution(layerState, viewResolution) && layerFilter.call(thisArg2, layer)) {\n        var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n        result = layerRenderer.forEachLayerAtCoordinate(\n          coordinate, frameState, hitTolerance, callback, thisArg);\n        if (result) {\n          return result;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasMapRenderer.prototype.registerLayerRenderers = function registerLayerRenderers (constructors) {\n    MapRenderer.prototype.registerLayerRenderers.call(this, constructors);\n    for (var i = 0, ii = constructors.length; i < ii; ++i) {\n      var ctor = constructors[i];\n      if (!includes(layerRendererConstructors, ctor)) {\n        layerRendererConstructors.push(ctor);\n      }\n    }\n  };\n\n  return CanvasMapRenderer;\n}(MapRenderer));\n\n\nexport default CanvasMapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/renderer/Layer\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport SourceState from '../source/State.js';\n\nvar LayerRenderer = /*@__PURE__*/(function (Observable) {\n  function LayerRenderer(layer) {\n\n    Observable.call(this);\n\n    /**\n     * @private\n     * @type {import(\"../layer/Layer.js\").default}\n     */\n    this.layer_ = layer;\n\n  }\n\n  if ( Observable ) LayerRenderer.__proto__ = Observable;\n  LayerRenderer.prototype = Object.create( Observable && Observable.prototype );\n  LayerRenderer.prototype.constructor = LayerRenderer;\n\n  /**\n   * Create a function that adds loaded tiles to the tile lookup.\n   * @param {import(\"../source/Tile.js\").default} source Tile source.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n   * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n   * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n   *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n   * @protected\n   */\n  LayerRenderer.prototype.createLoadedTileFinder = function createLoadedTileFinder (source, projection, tiles) {\n    return (\n      /**\n       * @param {number} zoom Zoom level.\n       * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n       * @return {boolean} The tile range is fully loaded.\n       */\n      function(zoom, tileRange) {\n        /**\n         * @param {import(\"../Tile.js\").default} tile Tile.\n         */\n        function callback(tile) {\n          if (!tiles[zoom]) {\n            tiles[zoom] = {};\n          }\n          tiles[zoom][tile.tileCoord.toString()] = tile;\n        }\n        return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n      }\n    );\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default): T} callback Feature callback.\n   * @return {T|void} Callback result.\n   * @template T\n   */\n  LayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {};\n\n  /**\n   * @return {import(\"../layer/Layer.js\").default} Layer.\n   */\n  LayerRenderer.prototype.getLayer = function getLayer () {\n    return this.layer_;\n  };\n\n  /**\n   * Handle changes in image state.\n   * @param {import(\"../events/Event.js\").default} event Image change event.\n   * @private\n   */\n  LayerRenderer.prototype.handleImageChange_ = function handleImageChange_ (event) {\n    var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    if (image.getState() === ImageState.LOADED) {\n      this.renderIfReadyAndVisible();\n    }\n  };\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {boolean} Is there a feature at the given coordinate?\n   */\n  LayerRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState) {\n    return false;\n  };\n\n  /**\n   * Load the image if not already loaded, and register the image change\n   * listener if needed.\n   * @param {import(\"../ImageBase.js\").default} image Image.\n   * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n   * @protected\n   */\n  LayerRenderer.prototype.loadImage = function loadImage (image) {\n    var imageState = image.getState();\n    if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n      listen(image, EventType.CHANGE, this.handleImageChange_, this);\n    }\n    if (imageState == ImageState.IDLE) {\n      image.load();\n      imageState = image.getState();\n    }\n    return imageState == ImageState.LOADED;\n  };\n\n  /**\n   * @protected\n   */\n  LayerRenderer.prototype.renderIfReadyAndVisible = function renderIfReadyAndVisible () {\n    var layer = this.getLayer();\n    if (layer.getVisible() && layer.getSourceState() == SourceState.READY) {\n      this.changed();\n    }\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n   * @protected\n   */\n  LayerRenderer.prototype.scheduleExpireCache = function scheduleExpireCache (frameState, tileSource) {\n    if (tileSource.canExpireCache()) {\n      /**\n       * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n       * @param {import(\"../PluggableMap.js\").default} map Map.\n       * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n       */\n      var postRenderFunction = function(tileSource, map, frameState) {\n        var tileSourceKey = getUid(tileSource);\n        if (tileSourceKey in frameState.usedTiles) {\n          tileSource.expireCache(frameState.viewState.projection,\n            frameState.usedTiles[tileSourceKey]);\n        }\n      }.bind(null, tileSource);\n\n      frameState.postRenderFunctions.push(\n        /** @type {import(\"../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n      );\n    }\n  };\n\n  /**\n   * @param {!Object<string, !Object<string, import(\"../TileRange.js\").default>>} usedTiles Used tiles.\n   * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n   * @param {number} z Z.\n   * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n   * @protected\n   */\n  LayerRenderer.prototype.updateUsedTiles = function updateUsedTiles (usedTiles, tileSource, z, tileRange) {\n    // FIXME should we use tilesToDrawByZ instead?\n    var tileSourceKey = getUid(tileSource);\n    var zKey = z.toString();\n    if (tileSourceKey in usedTiles) {\n      if (zKey in usedTiles[tileSourceKey]) {\n        usedTiles[tileSourceKey][zKey].extend(tileRange);\n      } else {\n        usedTiles[tileSourceKey][zKey] = tileRange;\n      }\n    } else {\n      usedTiles[tileSourceKey] = {};\n      usedTiles[tileSourceKey][zKey] = tileRange;\n    }\n  };\n\n  /**\n   * Manage tile pyramid.\n   * This function performs a number of functions related to the tiles at the\n   * current zoom and lower zoom levels:\n   * - registers idle tiles in frameState.wantedTiles so that they are not\n   *   discarded by the tile queue\n   * - enqueues missing tiles\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../source/Tile.js\").default} tileSource Tile source.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} currentZ Current Z.\n   * @param {number} preload Load low resolution tiles up to 'preload' levels.\n   * @param {function(this: T, import(\"../Tile.js\").default)=} opt_tileCallback Tile callback.\n   * @param {T=} opt_this Object to use as `this` in `opt_tileCallback`.\n   * @protected\n   * @template T\n   */\n  LayerRenderer.prototype.manageTilePyramid = function manageTilePyramid (\n    frameState,\n    tileSource,\n    tileGrid,\n    pixelRatio,\n    projection,\n    extent,\n    currentZ,\n    preload,\n    opt_tileCallback,\n    opt_this\n  ) {\n    var tileSourceKey = getUid(tileSource);\n    if (!(tileSourceKey in frameState.wantedTiles)) {\n      frameState.wantedTiles[tileSourceKey] = {};\n    }\n    var wantedTiles = frameState.wantedTiles[tileSourceKey];\n    var tileQueue = frameState.tileQueue;\n    var minZoom = tileGrid.getMinZoom();\n    var tile, tileRange, tileResolution, x, y, z;\n    for (z = minZoom; z <= currentZ; ++z) {\n      tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n      tileResolution = tileGrid.getResolution(z);\n      for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n        for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n          if (currentZ - z <= preload) {\n            tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n            if (tile.getState() == TileState.IDLE) {\n              wantedTiles[tile.getKey()] = true;\n              if (!tileQueue.isKeyQueued(tile.getKey())) {\n                tileQueue.enqueue([tile, tileSourceKey,\n                  tileGrid.getTileCoordCenter(tile.tileCoord), tileResolution]);\n              }\n            }\n            if (opt_tileCallback !== undefined) {\n              opt_tileCallback.call(opt_this, tile);\n            }\n          } else {\n            tileSource.useTile(z, x, y, projection);\n          }\n        }\n      }\n    }\n  };\n\n  return LayerRenderer;\n}(Observable));\n\nexport default LayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/Layer\n */\nimport {abstract} from '../../util.js';\nimport {getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../../extent.js';\nimport {TRUE} from '../../functions.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {rotateAtOffset} from '../../render/canvas.js';\nimport CanvasImmediateRenderer from '../../render/canvas/Immediate.js';\nimport LayerRenderer from '../Layer.js';\nimport {create as createTransform, apply as applyTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar CanvasLayerRenderer = /*@__PURE__*/(function (LayerRenderer) {\n  function CanvasLayerRenderer(layer) {\n\n    LayerRenderer.call(this, layer);\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedResolution;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.transform_ = createTransform();\n\n  }\n\n  if ( LayerRenderer ) CanvasLayerRenderer.__proto__ = LayerRenderer;\n  CanvasLayerRenderer.prototype = Object.create( LayerRenderer && LayerRenderer.prototype );\n  CanvasLayerRenderer.prototype.constructor = CanvasLayerRenderer;\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n   * @protected\n   */\n  CanvasLayerRenderer.prototype.clip = function clip (context, frameState, extent) {\n    var pixelRatio = frameState.pixelRatio;\n    var width = frameState.size[0] * pixelRatio;\n    var height = frameState.size[1] * pixelRatio;\n    var rotation = frameState.viewState.rotation;\n    var topLeft = getTopLeft(extent);\n    var topRight = getTopRight(extent);\n    var bottomRight = getBottomRight(extent);\n    var bottomLeft = getBottomLeft(extent);\n\n    applyTransform(frameState.coordinateToPixelTransform, topLeft);\n    applyTransform(frameState.coordinateToPixelTransform, topRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n    applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n\n    context.save();\n    rotateAtOffset(context, -rotation, width / 2, height / 2);\n    context.beginPath();\n    context.moveTo(topLeft[0] * pixelRatio, topLeft[1] * pixelRatio);\n    context.lineTo(topRight[0] * pixelRatio, topRight[1] * pixelRatio);\n    context.lineTo(bottomRight[0] * pixelRatio, bottomRight[1] * pixelRatio);\n    context.lineTo(bottomLeft[0] * pixelRatio, bottomLeft[1] * pixelRatio);\n    context.clip();\n    rotateAtOffset(context, rotation, width / 2, height / 2);\n  };\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n   * @private\n   */\n  CanvasLayerRenderer.prototype.dispatchComposeEvent_ = function dispatchComposeEvent_ (type, context, frameState, opt_transform) {\n    var layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      var width = frameState.size[0] * frameState.pixelRatio;\n      var height = frameState.size[1] * frameState.pixelRatio;\n      var rotation = frameState.viewState.rotation;\n      rotateAtOffset(context, -rotation, width / 2, height / 2);\n      var transform = opt_transform !== undefined ?\n        opt_transform : this.getTransform(frameState, 0);\n      var render = new CanvasImmediateRenderer(\n        context, frameState.pixelRatio, frameState.extent, transform,\n        frameState.viewState.rotation);\n      var composeEvent = new RenderEvent(type, render, frameState,\n        context, null);\n      layer.dispatchEvent(composeEvent);\n      rotateAtOffset(context, rotation, width / 2, height / 2);\n    }\n  };\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {function(this: S, import(\"../../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n   *     callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @return {T|undefined} Callback result.\n   * @template S,T,U\n   */\n  CanvasLayerRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n    var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, TRUE);\n\n    if (hasFeature) {\n      return callback.call(thisArg, this.getLayer(), null);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n   * @protected\n   */\n  CanvasLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState, opt_transform) {\n    this.dispatchComposeEvent_(RenderEventType.POSTCOMPOSE, context, frameState, opt_transform);\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n   * @protected\n   */\n  CanvasLayerRenderer.prototype.preCompose = function preCompose (context, frameState, opt_transform) {\n    this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, context, frameState, opt_transform);\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../transform.js\").Transform=} opt_transform Transform.\n   * @protected\n   */\n  CanvasLayerRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (context, frameState, opt_transform) {\n    this.dispatchComposeEvent_(RenderEventType.RENDER, context, frameState, opt_transform);\n  };\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} offsetX Offset on the x-axis in view coordinates.\n   * @protected\n   * @return {!import(\"../../transform.js\").Transform} Transform.\n   */\n  CanvasLayerRenderer.prototype.getTransform = function getTransform (frameState, offsetX) {\n    var viewState = frameState.viewState;\n    var pixelRatio = frameState.pixelRatio;\n    var dx1 = pixelRatio * frameState.size[0] / 2;\n    var dy1 = pixelRatio * frameState.size[1] / 2;\n    var sx = pixelRatio / viewState.resolution;\n    var sy = -sx;\n    var angle = -viewState.rotation;\n    var dx2 = -viewState.center[0] + offsetX;\n    var dy2 = -viewState.center[1];\n    return composeTransform(this.transform_, dx1, dy1, sx, sy, angle, dx2, dy2);\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @param {CanvasRenderingContext2D} context Context.\n   */\n  CanvasLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n    abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @return {boolean} whether composeFrame should be called.\n   */\n  CanvasLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n    return abstract();\n  };\n\n  return CanvasLayerRenderer;\n}(LayerRenderer));\n\nexport default CanvasLayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/canvas/IntermediateCanvas\n */\nimport {abstract} from '../../util.js';\nimport {scale as scaleCoordinate} from '../../coordinate.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, intersects} from '../../extent.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {create as createTransform, apply as applyTransform} from '../../transform.js';\n\n/**\n * @abstract\n */\nvar IntermediateCanvasRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n  function IntermediateCanvasRenderer(layer) {\n\n    CanvasLayerRenderer.call(this, layer);\n\n    /**\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.coordinateToCanvasPixelTransform = createTransform();\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.hitCanvasContext_ = null;\n\n  }\n\n  if ( CanvasLayerRenderer ) IntermediateCanvasRenderer.__proto__ = CanvasLayerRenderer;\n  IntermediateCanvasRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n  IntermediateCanvasRenderer.prototype.constructor = IntermediateCanvasRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  IntermediateCanvasRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n\n    this.preCompose(context, frameState);\n\n    var image = this.getImage();\n    if (image) {\n\n      // clipped rendering if layer extent is set\n      var extent = layerState.extent;\n      var clipped = extent !== undefined &&\n          !containsExtent(extent, frameState.extent) &&\n          intersects(extent, frameState.extent);\n      if (clipped) {\n        this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (extent));\n      }\n\n      var imageTransform = this.getImageTransform();\n      // for performance reasons, context.save / context.restore is not used\n      // to save and restore the transformation matrix and the opacity.\n      // see http://jsperf.com/context-save-restore-versus-variable\n      var alpha = context.globalAlpha;\n      context.globalAlpha = layerState.opacity;\n\n      // for performance reasons, context.setTransform is only used\n      // when the view is rotated. see http://jsperf.com/canvas-transform\n      var dx = imageTransform[4];\n      var dy = imageTransform[5];\n      var dw = image.width * imageTransform[0];\n      var dh = image.height * imageTransform[3];\n      if (dw >= 0.5 && dh >= 0.5) {\n        context.drawImage(image, 0, 0, +image.width, +image.height,\n          Math.round(dx), Math.round(dy), Math.round(dw), Math.round(dh));\n      }\n      context.globalAlpha = alpha;\n\n      if (clipped) {\n        context.restore();\n      }\n    }\n\n    this.postCompose(context, frameState, layerState);\n  };\n\n  /**\n   * @abstract\n   * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Canvas.\n   */\n  IntermediateCanvasRenderer.prototype.getImage = function getImage () {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @return {!import(\"../../transform.js\").Transform} Image transform.\n   */\n  IntermediateCanvasRenderer.prototype.getImageTransform = function getImageTransform () {\n    return abstract();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  IntermediateCanvasRenderer.prototype.forEachLayerAtCoordinate = function forEachLayerAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n    if (!this.getImage()) {\n      return undefined;\n    }\n\n    var pixel = applyTransform(this.coordinateToCanvasPixelTransform, coordinate.slice());\n    scaleCoordinate(pixel, frameState.viewState.resolution / this.renderedResolution);\n\n    if (!this.hitCanvasContext_) {\n      this.hitCanvasContext_ = createCanvasContext2D(1, 1);\n    }\n\n    this.hitCanvasContext_.clearRect(0, 0, 1, 1);\n    this.hitCanvasContext_.drawImage(this.getImage(), pixel[0], pixel[1], 1, 1, 0, 0, 1, 1);\n\n    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;\n    if (imageData[3] > 0) {\n      return callback.call(thisArg, this.getLayer(), imageData);\n    } else {\n      return undefined;\n    }\n  };\n\n  return IntermediateCanvasRenderer;\n}(CanvasLayerRenderer));\n\n\nexport default IntermediateCanvasRenderer;\n\n//# sourceMappingURL=IntermediateCanvas.js.map","/**\n * @module ol/renderer/canvas/ImageLayer\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport ImageCanvas from '../../ImageCanvas.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {getHeight, getIntersection, getWidth, isEmpty} from '../../extent.js';\nimport VectorRenderType from '../../layer/VectorRenderType.js';\nimport {assign} from '../../obj.js';\nimport {layerRendererConstructors} from './Map.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for image layers.\n * @api\n */\nvar CanvasImageLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n  function CanvasImageLayerRenderer(imageLayer) {\n\n    IntermediateCanvasRenderer.call(this, imageLayer);\n\n    /**\n     * @private\n     * @type {?import(\"../../ImageBase.js\").default}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.imageTransform_ = createTransform();\n\n    /**\n     * @type {!Array<string>}\n     */\n    this.skippedFeatures_ = [];\n\n    /**\n     * @private\n     * @type {import(\"./VectorLayer.js\").default}\n     */\n    this.vectorRenderer_ = null;\n\n    if (imageLayer.getType() === LayerType.VECTOR) {\n      for (var i = 0, ii = layerRendererConstructors.length; i < ii; ++i) {\n        var ctor = layerRendererConstructors[i];\n        if (ctor !== CanvasImageLayerRenderer && ctor['handles'](imageLayer)) {\n          this.vectorRenderer_ = /** @type {import(\"./VectorLayer.js\").default} */ (new ctor(imageLayer));\n          break;\n        }\n      }\n    }\n\n  }\n\n  if ( IntermediateCanvasRenderer ) CanvasImageLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n  CanvasImageLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n  CanvasImageLayerRenderer.prototype.constructor = CanvasImageLayerRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n    if (this.vectorRenderer_) {\n      this.vectorRenderer_.dispose();\n    }\n    IntermediateCanvasRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageLayerRenderer.prototype.getImage = function getImage () {\n    return !this.image_ ? null : this.image_.getImage();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n    return this.imageTransform_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n    var pixelRatio = frameState.pixelRatio;\n    var size = frameState.size;\n    var viewState = frameState.viewState;\n    var viewCenter = viewState.center;\n    var viewResolution = viewState.resolution;\n\n    var image;\n    var imageLayer = /** @type {import(\"../../layer/Image.js\").default} */ (this.getLayer());\n    var imageSource = /** @type {import(\"../../source/Image.js\").default} */ (imageLayer.getSource());\n\n    var hints = frameState.viewHints;\n\n    var vectorRenderer = this.vectorRenderer_;\n    var renderedExtent = frameState.extent;\n    if (!vectorRenderer && layerState.extent !== undefined) {\n      renderedExtent = getIntersection(renderedExtent, layerState.extent);\n    }\n\n    if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] &&\n        !isEmpty(renderedExtent)) {\n      var projection = viewState.projection;\n      if (!ENABLE_RASTER_REPROJECTION) {\n        var sourceProjection = imageSource.getProjection();\n        if (sourceProjection) {\n          projection = sourceProjection;\n        }\n      }\n      var skippedFeatures = this.skippedFeatures_;\n      if (vectorRenderer) {\n        var context = vectorRenderer.context;\n        var imageFrameState = /** @type {import(\"../../PluggableMap.js\").FrameState} */ (assign({}, frameState, {\n          size: [\n            getWidth(renderedExtent) / viewResolution,\n            getHeight(renderedExtent) / viewResolution\n          ],\n          viewState: /** @type {import(\"../../View.js\").State} */ (assign({}, frameState.viewState, {\n            rotation: 0\n          }))\n        }));\n        var newSkippedFeatures = Object.keys(imageFrameState.skippedFeatureUids).sort();\n        image = new ImageCanvas(renderedExtent, viewResolution, pixelRatio, context.canvas, function(callback) {\n          if (vectorRenderer.prepareFrame(imageFrameState, layerState) &&\n              (vectorRenderer.replayGroupChanged ||\n              !equals(skippedFeatures, newSkippedFeatures))) {\n            context.canvas.width = imageFrameState.size[0] * pixelRatio;\n            context.canvas.height = imageFrameState.size[1] * pixelRatio;\n            vectorRenderer.compose(context, imageFrameState, layerState);\n            skippedFeatures = newSkippedFeatures;\n            callback();\n          }\n        });\n      } else {\n        image = imageSource.getImage(\n          renderedExtent, viewResolution, pixelRatio, projection);\n      }\n      if (image && this.loadImage(image)) {\n        this.image_ = image;\n        this.skippedFeatures_ = skippedFeatures;\n      }\n    }\n\n    if (this.image_) {\n      image = this.image_;\n      var imageExtent = image.getExtent();\n      var imageResolution = image.getResolution();\n      var imagePixelRatio = image.getPixelRatio();\n      var scale = pixelRatio * imageResolution /\n          (viewResolution * imagePixelRatio);\n      var transform = composeTransform(this.imageTransform_,\n        pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n        scale, scale,\n        0,\n        imagePixelRatio * (imageExtent[0] - viewCenter[0]) / imageResolution,\n        imagePixelRatio * (viewCenter[1] - imageExtent[3]) / imageResolution);\n      composeTransform(this.coordinateToCanvasPixelTransform,\n        pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n        pixelRatio / viewResolution, -pixelRatio / viewResolution,\n        0,\n        -viewCenter[0], -viewCenter[1]);\n\n      this.renderedResolution = imageResolution * pixelRatio / imagePixelRatio;\n    }\n\n    return !!this.image_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback) {\n    if (this.vectorRenderer_) {\n      return this.vectorRenderer_.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, callback);\n    } else {\n      return IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate.call(this, coordinate, frameState, hitTolerance, callback);\n    }\n  };\n\n  return CanvasImageLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasImageLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.IMAGE ||\n    layer.getType() === LayerType.VECTOR &&\n    /** @type {import(\"../../layer/Vector.js\").default} */ (layer).getRenderMode() === VectorRenderType.IMAGE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasImageLayerRenderer} The layer renderer.\n */\nCanvasImageLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new CanvasImageLayerRenderer(/** @type {import(\"../../layer/Image.js\").default} */ (layer));\n};\n\n\nexport default CanvasImageLayerRenderer;\n\n//# sourceMappingURL=ImageLayer.js.map","/**\n * @module ol/TileRange\n */\n\n/**\n * A representation of a contiguous block of tiles.  A tile range is specified\n * by its min/max tile coordinates and is inclusive of coordinates.\n */\nvar TileRange = function TileRange(minX, maxX, minY, maxY) {\n\n  /**\n   * @type {number}\n   */\n  this.minX = minX;\n\n  /**\n   * @type {number}\n   */\n  this.maxX = maxX;\n\n  /**\n   * @type {number}\n   */\n  this.minY = minY;\n\n  /**\n   * @type {number}\n   */\n  this.maxY = maxY;\n\n};\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {boolean} Contains tile coordinate.\n */\nTileRange.prototype.contains = function contains (tileCoord) {\n  return this.containsXY(tileCoord[1], tileCoord[2]);\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Contains.\n */\nTileRange.prototype.containsTileRange = function containsTileRange (tileRange) {\n  return this.minX <= tileRange.minX && tileRange.maxX <= this.maxX &&\n     this.minY <= tileRange.minY && tileRange.maxY <= this.maxY;\n};\n\n/**\n * @param {number} x Tile coordinate x.\n * @param {number} y Tile coordinate y.\n * @return {boolean} Contains coordinate.\n */\nTileRange.prototype.containsXY = function containsXY (x, y) {\n  return this.minX <= x && x <= this.maxX && this.minY <= y && y <= this.maxY;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Equals.\n */\nTileRange.prototype.equals = function equals (tileRange) {\n  return this.minX == tileRange.minX && this.minY == tileRange.minY &&\n     this.maxX == tileRange.maxX && this.maxY == tileRange.maxY;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n */\nTileRange.prototype.extend = function extend (tileRange) {\n  if (tileRange.minX < this.minX) {\n    this.minX = tileRange.minX;\n  }\n  if (tileRange.maxX > this.maxX) {\n    this.maxX = tileRange.maxX;\n  }\n  if (tileRange.minY < this.minY) {\n    this.minY = tileRange.minY;\n  }\n  if (tileRange.maxY > this.maxY) {\n    this.maxY = tileRange.maxY;\n  }\n};\n\n/**\n * @return {number} Height.\n */\nTileRange.prototype.getHeight = function getHeight () {\n  return this.maxY - this.minY + 1;\n};\n\n/**\n * @return {import(\"./size.js\").Size} Size.\n */\nTileRange.prototype.getSize = function getSize () {\n  return [this.getWidth(), this.getHeight()];\n};\n\n/**\n * @return {number} Width.\n */\nTileRange.prototype.getWidth = function getWidth () {\n  return this.maxX - this.minX + 1;\n};\n\n/**\n * @param {TileRange} tileRange Tile range.\n * @return {boolean} Intersects.\n */\nTileRange.prototype.intersects = function intersects (tileRange) {\n  return this.minX <= tileRange.maxX &&\n     this.maxX >= tileRange.minX &&\n     this.minY <= tileRange.maxY &&\n     this.maxY >= tileRange.minY;\n};\n\n\n/**\n * @param {number} minX Minimum X.\n * @param {number} maxX Maximum X.\n * @param {number} minY Minimum Y.\n * @param {number} maxY Maximum Y.\n * @param {TileRange=} tileRange TileRange.\n * @return {TileRange} Tile range.\n */\nexport function createOrUpdate(minX, maxX, minY, maxY, tileRange) {\n  if (tileRange !== undefined) {\n    tileRange.minX = minX;\n    tileRange.maxX = maxX;\n    tileRange.minY = minY;\n    tileRange.maxY = maxY;\n    return tileRange;\n  } else {\n    return new TileRange(minX, maxX, minY, maxY);\n  }\n}\n\n\nexport default TileRange;\n\n//# sourceMappingURL=TileRange.js.map","/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {containsExtent, createEmpty, equals, getIntersection, isEmpty} from '../../extent.js';\nimport IntermediateCanvasRenderer from './IntermediateCanvas.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n */\nvar CanvasTileLayerRenderer = /*@__PURE__*/(function (IntermediateCanvasRenderer) {\n  function CanvasTileLayerRenderer(tileLayer, opt_noContext) {\n\n    IntermediateCanvasRenderer.call(this, tileLayer);\n\n    /**\n     * @protected\n     * @type {CanvasRenderingContext2D}\n     */\n    this.context = opt_noContext ? null : createCanvasContext2D();\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.oversampling_;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = null;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.renderedRevision;\n\n    /**\n     * @protected\n     * @type {!Array<import(\"../../Tile.js\").default>}\n     */\n    this.renderedTiles = [];\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.newTiles_ = false;\n\n    /**\n     * @protected\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.tmpExtent = createEmpty();\n\n    /**\n     * @private\n     * @type {import(\"../../TileRange.js\").default}\n     */\n    this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.imageTransform_ = createTransform();\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.zDirection = 0;\n\n  }\n\n  if ( IntermediateCanvasRenderer ) CanvasTileLayerRenderer.__proto__ = IntermediateCanvasRenderer;\n  CanvasTileLayerRenderer.prototype = Object.create( IntermediateCanvasRenderer && IntermediateCanvasRenderer.prototype );\n  CanvasTileLayerRenderer.prototype.constructor = CanvasTileLayerRenderer;\n\n  /**\n   * @private\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @return {boolean} Tile is drawable.\n   */\n  CanvasTileLayerRenderer.prototype.isDrawableTile_ = function isDrawableTile_ (tile) {\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    var tileState = tile.getState();\n    var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n    return tileState == TileState.LOADED ||\n        tileState == TileState.EMPTY ||\n        tileState == TileState.ERROR && !useInterimTilesOnError;\n  };\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../../Tile.js\").default} Tile.\n   */\n  CanvasTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n    var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n    if (tile.getState() == TileState.ERROR) {\n      if (!tileLayer.getUseInterimTilesOnError()) {\n        // When useInterimTilesOnError is false, we consider the error tile as loaded.\n        tile.setState(TileState.LOADED);\n      } else if (tileLayer.getPreload() > 0) {\n        // Preloaded tiles for lower resolutions might have finished loading.\n        this.newTiles_ = true;\n      }\n    }\n    if (!this.isDrawableTile_(tile)) {\n      tile = tile.getInterimTile();\n    }\n    return tile;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n\n    var pixelRatio = frameState.pixelRatio;\n    var size = frameState.size;\n    var viewState = frameState.viewState;\n    var projection = viewState.projection;\n    var viewResolution = viewState.resolution;\n    var viewCenter = viewState.center;\n\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n    var sourceRevision = tileSource.getRevision();\n    var tileGrid = tileSource.getTileGridForProjection(projection);\n    var z = tileGrid.getZForResolution(viewResolution, this.zDirection);\n    var tileResolution = tileGrid.getResolution(z);\n    var oversampling = Math.round(viewResolution / tileResolution) || 1;\n    var extent = frameState.extent;\n\n    if (layerState.extent !== undefined) {\n      extent = getIntersection(extent, layerState.extent);\n    }\n    if (isEmpty(extent)) {\n      // Return false to prevent the rendering of the layer.\n      return false;\n    }\n\n    var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n    var imageExtent = tileGrid.getTileRangeExtent(z, tileRange);\n\n    var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n\n    /**\n     * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n     */\n    var tilesToDrawByZ = {};\n    tilesToDrawByZ[z] = {};\n\n    var findLoadedTiles = this.createLoadedTileFinder(\n      tileSource, projection, tilesToDrawByZ);\n\n    var hints = frameState.viewHints;\n    var animatingOrInteracting = hints[ViewHint.ANIMATING] || hints[ViewHint.INTERACTING];\n\n    var tmpExtent = this.tmpExtent;\n    var tmpTileRange = this.tmpTileRange_;\n    this.newTiles_ = false;\n    var tile, x, y;\n    for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n      for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n        if (Date.now() - frameState.time > 16 && animatingOrInteracting) {\n          continue;\n        }\n        tile = this.getTile(z, x, y, pixelRatio, projection);\n        if (this.isDrawableTile_(tile)) {\n          var uid = getUid(this);\n          if (tile.getState() == TileState.LOADED) {\n            tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n            var inTransition = tile.inTransition(uid);\n            if (!this.newTiles_ && (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n              this.newTiles_ = true;\n            }\n          }\n          if (tile.getAlpha(uid, frameState.time) === 1) {\n            // don't look for alt tiles if alpha is 1\n            continue;\n          }\n        }\n\n        var childTileRange = tileGrid.getTileCoordChildTileRange(\n          tile.tileCoord, tmpTileRange, tmpExtent);\n        var covered = false;\n        if (childTileRange) {\n          covered = findLoadedTiles(z + 1, childTileRange);\n        }\n        if (!covered) {\n          tileGrid.forEachTileCoordParentTileRange(\n            tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);\n        }\n\n      }\n    }\n\n    var renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n    if (!(this.renderedResolution && Date.now() - frameState.time > 16 && animatingOrInteracting) && (\n      this.newTiles_ ||\n          !(this.renderedExtent_ && containsExtent(this.renderedExtent_, extent)) ||\n          this.renderedRevision != sourceRevision ||\n          oversampling != this.oversampling_ ||\n          !animatingOrInteracting && renderedResolution != this.renderedResolution\n    )) {\n\n      var context = this.context;\n      if (context) {\n        var tilePixelSize = tileSource.getTilePixelSize(z, pixelRatio, projection);\n        var width = Math.round(tileRange.getWidth() * tilePixelSize[0] / oversampling);\n        var height = Math.round(tileRange.getHeight() * tilePixelSize[1] / oversampling);\n        var canvas = context.canvas;\n        if (canvas.width != width || canvas.height != height) {\n          this.oversampling_ = oversampling;\n          canvas.width = width;\n          canvas.height = height;\n        } else {\n          if ((this.renderedExtent_ && !equals(imageExtent, this.renderedExtent_)) ||\n              this.renderedRevision != sourceRevision) {\n            context.clearRect(0, 0, width, height);\n          }\n          oversampling = this.oversampling_;\n        }\n      }\n\n      this.renderedTiles.length = 0;\n      /** @type {Array<number>} */\n      var zs = Object.keys(tilesToDrawByZ).map(Number);\n      zs.sort(function(a, b) {\n        if (a === z) {\n          return 1;\n        } else if (b === z) {\n          return -1;\n        } else {\n          return a > b ? 1 : a < b ? -1 : 0;\n        }\n      });\n      var currentResolution, currentScale, currentTilePixelSize, currentZ, i, ii;\n      var tileExtent, tileGutter, tilesToDraw, w, h;\n      for (i = 0, ii = zs.length; i < ii; ++i) {\n        currentZ = zs[i];\n        currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n        currentResolution = tileGrid.getResolution(currentZ);\n        currentScale = currentResolution / tileResolution;\n        tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n        tilesToDraw = tilesToDrawByZ[currentZ];\n        for (var tileCoordKey in tilesToDraw) {\n          tile = tilesToDraw[tileCoordKey];\n          tileExtent = tileGrid.getTileCoordExtent(tile.getTileCoord(), tmpExtent);\n          x = (tileExtent[0] - imageExtent[0]) / tileResolution * tilePixelRatio / oversampling;\n          y = (imageExtent[3] - tileExtent[3]) / tileResolution * tilePixelRatio / oversampling;\n          w = currentTilePixelSize[0] * currentScale / oversampling;\n          h = currentTilePixelSize[1] * currentScale / oversampling;\n          this.drawTileImage(tile, frameState, layerState, x, y, w, h, tileGutter, z === currentZ);\n          this.renderedTiles.push(tile);\n        }\n      }\n\n      this.renderedRevision = sourceRevision;\n      this.renderedResolution = tileResolution * pixelRatio / tilePixelRatio * oversampling;\n      this.renderedExtent_ = imageExtent;\n    }\n\n    var scale = this.renderedResolution / viewResolution;\n    var transform = composeTransform(this.imageTransform_,\n      pixelRatio * size[0] / 2, pixelRatio * size[1] / 2,\n      scale, scale,\n      0,\n      (this.renderedExtent_[0] - viewCenter[0]) / this.renderedResolution * pixelRatio,\n      (viewCenter[1] - this.renderedExtent_[3]) / this.renderedResolution * pixelRatio);\n    composeTransform(this.coordinateToCanvasPixelTransform,\n      pixelRatio * size[0] / 2 - transform[4], pixelRatio * size[1] / 2 - transform[5],\n      pixelRatio / viewResolution, -pixelRatio / viewResolution,\n      0,\n      -viewCenter[0], -viewCenter[1]);\n\n\n    this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);\n    this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio,\n      projection, extent, z, tileLayer.getPreload());\n    this.scheduleExpireCache(frameState, tileSource);\n\n    return this.renderedTiles.length > 0;\n  };\n\n  /**\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @param {number} x Left of the tile.\n   * @param {number} y Top of the tile.\n   * @param {number} w Width of the tile.\n   * @param {number} h Height of the tile.\n   * @param {number} gutter Tile gutter.\n   * @param {boolean} transition Apply an alpha transition.\n   */\n  CanvasTileLayerRenderer.prototype.drawTileImage = function drawTileImage (tile, frameState, layerState, x, y, w, h, gutter, transition) {\n    var image = this.getTileImage(tile);\n    if (!image) {\n      return;\n    }\n    var uid = getUid(this);\n    var alpha = transition ? tile.getAlpha(uid, frameState.time) : 1;\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    var tileSource = /** @type {import(\"../../source/Tile.js\").default} */ (tileLayer.getSource());\n    if (alpha === 1 && !tileSource.getOpaque(frameState.viewState.projection)) {\n      this.context.clearRect(x, y, w, h);\n    }\n    var alphaChanged = alpha !== this.context.globalAlpha;\n    if (alphaChanged) {\n      this.context.save();\n      this.context.globalAlpha = alpha;\n    }\n    this.context.drawImage(image, gutter, gutter,\n      image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n\n    if (alphaChanged) {\n      this.context.restore();\n    }\n    if (alpha !== 1) {\n      frameState.animate = true;\n    } else if (transition) {\n      tile.endTransition(uid);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasTileLayerRenderer.prototype.getImage = function getImage () {\n    var context = this.context;\n    return context ? context.canvas : null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasTileLayerRenderer.prototype.getImageTransform = function getImageTransform () {\n    return this.imageTransform_;\n  };\n\n  /**\n   * Get the image from a tile.\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   * @protected\n   */\n  CanvasTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n    return /** @type {import(\"../../ImageTile.js\").default} */ (tile).getImage();\n  };\n\n  return CanvasTileLayerRenderer;\n}(IntermediateCanvasRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasTileLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasTileLayerRenderer} The layer renderer.\n */\nCanvasTileLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new CanvasTileLayerRenderer(/** @type {import(\"../../layer/Tile.js\").default} */ (layer));\n};\n\n\n/**\n * @function\n * @return {import(\"../../layer/Tile.js\").default|import(\"../../layer/VectorTile.js\").default}\n */\nCanvasTileLayerRenderer.prototype.getLayer;\n\n\nexport default CanvasTileLayerRenderer;\n\n//# sourceMappingURL=TileLayer.js.map","/**\n * @module ol/render/ReplayGroup\n */\nimport {abstract} from '../util.js';\n\n/**\n * Base class for replay groups.\n */\nvar ReplayGroup = function ReplayGroup () {};\n\nReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n  return abstract();\n};\n\n/**\n * @abstract\n * @return {boolean} Is empty.\n */\nReplayGroup.prototype.isEmpty = function isEmpty () {\n  return abstract();\n};\n\n/**\n * @abstract\n * @param {boolean} group Group with previous replay\n * @return {Array<*>} The resulting instruction group\n */\nReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n  return abstract();\n};\n\nexport default ReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/render/ReplayType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  CIRCLE: 'Circle',\n  DEFAULT: 'Default',\n  IMAGE: 'Image',\n  LINE_STRING: 'LineString',\n  POLYGON: 'Polygon',\n  TEXT: 'Text'\n};\n\n//# sourceMappingURL=ReplayType.js.map","/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {function(string):number} measure Measure function returning the\n * width of the character passed as 1st argument.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @return {Array<Array<*>>} The result array of null if `maxAngle` was\n * exceeded. Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n  flatCoordinates, offset, end, stride, text, measure, startM, maxAngle) {\n  var result = [];\n\n  // Keep text upright\n  var reverse = flatCoordinates[offset] > flatCoordinates[end - stride];\n\n  var numChars = text.length;\n\n  var x1 = flatCoordinates[offset];\n  var y1 = flatCoordinates[offset + 1];\n  offset += stride;\n  var x2 = flatCoordinates[offset];\n  var y2 = flatCoordinates[offset + 1];\n  var segmentM = 0;\n  var segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n\n  var chunk = '';\n  var chunkLength = 0;\n  var data, index, previousAngle;\n  for (var i = 0; i < numChars; ++i) {\n    index = reverse ? numChars - i - 1 : i;\n    var char = text.charAt(index);\n    chunk = reverse ? char + chunk : chunk + char;\n    var charLength = measure(chunk) - chunkLength;\n    chunkLength += charLength;\n    var charM = startM + charLength / 2;\n    while (offset < end - stride && segmentM + segmentLength < charM) {\n      x1 = x2;\n      y1 = y2;\n      offset += stride;\n      x2 = flatCoordinates[offset];\n      y2 = flatCoordinates[offset + 1];\n      segmentM += segmentLength;\n      segmentLength = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n    }\n    var segmentPos = charM - segmentM;\n    var angle = Math.atan2(y2 - y1, x2 - x1);\n    if (reverse) {\n      angle += angle > 0 ? -Math.PI : Math.PI;\n    }\n    if (previousAngle !== undefined) {\n      var delta = angle - previousAngle;\n      delta += (delta > Math.PI) ? -2 * Math.PI : (delta < -Math.PI) ? 2 * Math.PI : 0;\n      if (Math.abs(delta) > maxAngle) {\n        return null;\n      }\n    }\n    var interpolate = segmentPos / segmentLength;\n    var x = lerp(x1, x2, interpolate);\n    var y = lerp(y1, y2, interpolate);\n    if (previousAngle == angle) {\n      if (reverse) {\n        data[0] = x;\n        data[1] = y;\n        data[2] = charLength / 2;\n      }\n      data[4] = chunk;\n    } else {\n      chunk = char;\n      chunkLength = charLength;\n      data = [x, y, charLength / 2, angle, chunk];\n      if (reverse) {\n        result.unshift(data);\n      } else {\n        result.push(data);\n      }\n      previousAngle = angle;\n    }\n    startM += charLength;\n  }\n  return result;\n}\n\n//# sourceMappingURL=textpath.js.map","/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nvar Instruction = {\n  BEGIN_GEOMETRY: 0,\n  BEGIN_PATH: 1,\n  CIRCLE: 2,\n  CLOSE_PATH: 3,\n  CUSTOM: 4,\n  DRAW_CHARS: 5,\n  DRAW_IMAGE: 6,\n  END_GEOMETRY: 7,\n  FILL: 8,\n  MOVE_TO_LINE_TO: 9,\n  SET_FILL_STYLE: 10,\n  SET_STROKE_STYLE: 11,\n  STROKE: 12\n};\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var fillInstruction = [Instruction.FILL];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var strokeInstruction = [Instruction.STROKE];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var beginPathInstruction = [Instruction.BEGIN_PATH];\n\n\n/**\n * @type {Array<Instruction>}\n */\nexport var closePathInstruction = [Instruction.CLOSE_PATH];\n\n\nexport default Instruction;\n\n//# sourceMappingURL=Instruction.js.map","/**\n * @module ol/render/replay\n */\nimport ReplayType from './ReplayType.js';\n\n\n/**\n * @const\n * @type {Array<ReplayType>}\n */\nexport var ORDER = [\n  ReplayType.POLYGON,\n  ReplayType.CIRCLE,\n  ReplayType.LINE_STRING,\n  ReplayType.IMAGE,\n  ReplayType.TEXT,\n  ReplayType.DEFAULT\n];\n\n/**\n * @const\n * @enum {number}\n */\nexport var TEXT_ALIGN = {};\nTEXT_ALIGN['left'] = 0;\nTEXT_ALIGN['end'] = 0;\nTEXT_ALIGN['center'] = 0.5;\nTEXT_ALIGN['right'] = 1;\nTEXT_ALIGN['start'] = 1;\nTEXT_ALIGN['top'] = 0;\nTEXT_ALIGN['middle'] = 0.5;\nTEXT_ALIGN['hanging'] = 0.2;\nTEXT_ALIGN['alphabetic'] = 0.8;\nTEXT_ALIGN['ideographic'] = 0.8;\nTEXT_ALIGN['bottom'] = 1;\n\n//# sourceMappingURL=replay.js.map","/**\n * @module ol/render/canvas/Replay\n */\nimport {getUid} from '../../util.js';\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {buffer, clone, coordinateRelationship, createEmpty, createOrUpdate,\n  createOrUpdateEmpty, extend, extendCoordinate, intersects} from '../../extent.js';\nimport Relationship from '../../extent/Relationship.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {inflateCoordinates, inflateCoordinatesArray, inflateMultiCoordinatesArray} from '../../geom/flat/inflate.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {isEmpty} from '../../obj.js';\nimport VectorContext from '../VectorContext.js';\nimport {drawImage, resetTransform, defaultPadding, defaultFillStyle, defaultStrokeStyle,\n  defaultMiterLimit, defaultLineWidth, defaultLineJoin, defaultLineDashOffset,\n  defaultLineDash, defaultLineCap} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport {\n  create as createTransform,\n  compose as composeTransform,\n  apply as applyTransform,\n  setFromArray as transformSetFromArray\n} from '../../transform.js';\n\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nvar tmpExtent = createEmpty();\n\n\n/**\n * @type {!import(\"../../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\nvar CanvasReplay = /*@__PURE__*/(function (VectorContext) {\n  function CanvasReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n    VectorContext.call(this);\n\n    /**\n     * @type {?}\n     */\n    this.declutterTree = declutterTree;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.tolerance = tolerance;\n\n    /**\n     * @protected\n     * @const\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent = maxExtent;\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.overlaps = overlaps;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.pixelRatio = pixelRatio;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.maxLineWidth = 0;\n\n    /**\n     * @protected\n     * @const\n     * @type {number}\n     */\n    this.resolution = resolution;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.alignFill_;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction1_ = null;\n\n    /**\n     * @private\n     * @type {Array<*>}\n     */\n    this.beginGeometryInstruction2_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.bufferedMaxExtent_ = null;\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.instructions = [];\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.coordinates = [];\n\n    /**\n     * @private\n     * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n     */\n    this.coordinateCache_ = {};\n\n    /**\n     * @private\n     * @type {!import(\"../../transform.js\").Transform}\n     */\n    this.renderedTransform_ = createTransform();\n\n    /**\n     * @protected\n     * @type {Array<*>}\n     */\n    this.hitDetectionInstructions = [];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.pixelCoordinates_ = null;\n\n    /**\n     * @protected\n     * @type {import(\"../canvas.js\").FillStrokeState}\n     */\n    this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.viewRotation_ = 0;\n\n  }\n\n  if ( VectorContext ) CanvasReplay.__proto__ = VectorContext;\n  CanvasReplay.prototype = Object.create( VectorContext && VectorContext.prototype );\n  CanvasReplay.prototype.constructor = CanvasReplay;\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n   * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   */\n  CanvasReplay.prototype.replayTextBackground_ = function replayTextBackground_ (context, p1, p2, p3, p4, fillInstruction, strokeInstruction) {\n    context.beginPath();\n    context.moveTo.apply(context, p1);\n    context.lineTo.apply(context, p2);\n    context.lineTo.apply(context, p3);\n    context.lineTo.apply(context, p4);\n    context.lineTo.apply(context, p1);\n    if (fillInstruction) {\n      this.alignFill_ = /** @type {boolean} */ (fillInstruction[2]);\n      this.fill_(context);\n    }\n    if (strokeInstruction) {\n      this.setStrokeStyle_(context, /** @type {Array<*>} */ (strokeInstruction));\n      context.stroke();\n    }\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {number} x X.\n   * @param {number} y Y.\n   * @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} image Image.\n   * @param {number} anchorX Anchor X.\n   * @param {number} anchorY Anchor Y.\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   * @param {number} height Height.\n   * @param {number} opacity Opacity.\n   * @param {number} originX Origin X.\n   * @param {number} originY Origin Y.\n   * @param {number} rotation Rotation.\n   * @param {number} scale Scale.\n   * @param {boolean} snapToPixel Snap to pixel.\n   * @param {number} width Width.\n   * @param {Array<number>} padding Padding.\n   * @param {Array<*>} fillInstruction Fill instruction.\n   * @param {Array<*>} strokeInstruction Stroke instruction.\n   */\n  CanvasReplay.prototype.replayImage_ = function replayImage_ (\n    context,\n    x,\n    y,\n    image,\n    anchorX,\n    anchorY,\n    declutterGroup,\n    height,\n    opacity,\n    originX,\n    originY,\n    rotation,\n    scale,\n    snapToPixel,\n    width,\n    padding,\n    fillInstruction,\n    strokeInstruction\n  ) {\n    var fillStroke = fillInstruction || strokeInstruction;\n    anchorX *= scale;\n    anchorY *= scale;\n    x -= anchorX;\n    y -= anchorY;\n\n    var w = (width + originX > image.width) ? image.width - originX : width;\n    var h = (height + originY > image.height) ? image.height - originY : height;\n    var boxW = padding[3] + w * scale + padding[1];\n    var boxH = padding[0] + h * scale + padding[2];\n    var boxX = x - padding[3];\n    var boxY = y - padding[0];\n\n    /** @type {import(\"../../coordinate.js\").Coordinate} */\n    var p1;\n    /** @type {import(\"../../coordinate.js\").Coordinate} */\n    var p2;\n    /** @type {import(\"../../coordinate.js\").Coordinate} */\n    var p3;\n    /** @type {import(\"../../coordinate.js\").Coordinate} */\n    var p4;\n    if (fillStroke || rotation !== 0) {\n      p1 = [boxX, boxY];\n      p2 = [boxX + boxW, boxY];\n      p3 = [boxX + boxW, boxY + boxH];\n      p4 = [boxX, boxY + boxH];\n    }\n\n    var transform = null;\n    if (rotation !== 0) {\n      var centerX = x + anchorX;\n      var centerY = y + anchorY;\n      transform = composeTransform(tmpTransform, centerX, centerY, 1, 1, rotation, -centerX, -centerY);\n\n      createOrUpdateEmpty(tmpExtent);\n      extendCoordinate(tmpExtent, applyTransform(tmpTransform, p1));\n      extendCoordinate(tmpExtent, applyTransform(tmpTransform, p2));\n      extendCoordinate(tmpExtent, applyTransform(tmpTransform, p3));\n      extendCoordinate(tmpExtent, applyTransform(tmpTransform, p4));\n    } else {\n      createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);\n    }\n    var canvas = context.canvas;\n    var strokePadding = strokeInstruction ? (strokeInstruction[2] * scale / 2) : 0;\n    var intersects =\n        tmpExtent[0] - strokePadding <= canvas.width && tmpExtent[2] + strokePadding >= 0 &&\n        tmpExtent[1] - strokePadding <= canvas.height && tmpExtent[3] + strokePadding >= 0;\n\n    if (snapToPixel) {\n      x = Math.round(x);\n      y = Math.round(y);\n    }\n\n    if (declutterGroup) {\n      if (!intersects && declutterGroup[4] == 1) {\n        return;\n      }\n      extend(declutterGroup, tmpExtent);\n      var declutterArgs = intersects ?\n        [context, transform ? transform.slice(0) : null, opacity, image, originX, originY, w, h, x, y, scale] :\n        null;\n      if (declutterArgs && fillStroke) {\n        declutterArgs.push(fillInstruction, strokeInstruction, p1, p2, p3, p4);\n      }\n      declutterGroup.push(declutterArgs);\n    } else if (intersects) {\n      if (fillStroke) {\n        this.replayTextBackground_(context, p1, p2, p3, p4,\n          /** @type {Array<*>} */ (fillInstruction),\n          /** @type {Array<*>} */ (strokeInstruction));\n      }\n      drawImage(context, transform, opacity, image, originX, originY, w, h, x, y, scale);\n    }\n  };\n\n  /**\n   * @protected\n   * @param {Array<number>} dashArray Dash array.\n   * @return {Array<number>} Dash array with pixel ratio applied\n   */\n  CanvasReplay.prototype.applyPixelRatio = function applyPixelRatio (dashArray) {\n    var pixelRatio = this.pixelRatio;\n    return pixelRatio == 1 ? dashArray : dashArray.map(function(dash) {\n      return dash * pixelRatio;\n    });\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @param {boolean} closed Last input coordinate equals first.\n   * @param {boolean} skipFirst Skip first coordinate.\n   * @protected\n   * @return {number} My end.\n   */\n  CanvasReplay.prototype.appendFlatCoordinates = function appendFlatCoordinates (flatCoordinates, offset, end, stride, closed, skipFirst) {\n\n    var myEnd = this.coordinates.length;\n    var extent = this.getBufferedMaxExtent();\n    if (skipFirst) {\n      offset += stride;\n    }\n    var lastCoord = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n    var nextCoord = [NaN, NaN];\n    var skipped = true;\n\n    var i, lastRel, nextRel;\n    for (i = offset + stride; i < end; i += stride) {\n      nextCoord[0] = flatCoordinates[i];\n      nextCoord[1] = flatCoordinates[i + 1];\n      nextRel = coordinateRelationship(extent, nextCoord);\n      if (nextRel !== lastRel) {\n        if (skipped) {\n          this.coordinates[myEnd++] = lastCoord[0];\n          this.coordinates[myEnd++] = lastCoord[1];\n        }\n        this.coordinates[myEnd++] = nextCoord[0];\n        this.coordinates[myEnd++] = nextCoord[1];\n        skipped = false;\n      } else if (nextRel === Relationship.INTERSECTING) {\n        this.coordinates[myEnd++] = nextCoord[0];\n        this.coordinates[myEnd++] = nextCoord[1];\n        skipped = false;\n      } else {\n        skipped = true;\n      }\n      lastCoord[0] = nextCoord[0];\n      lastCoord[1] = nextCoord[1];\n      lastRel = nextRel;\n    }\n\n    // Last coordinate equals first or only one point to append:\n    if ((closed && skipped) || i === offset + stride) {\n      this.coordinates[myEnd++] = lastCoord[0];\n      this.coordinates[myEnd++] = lastCoord[1];\n    }\n    return myEnd;\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @param {Array<number>} replayEnds Replay ends.\n   * @return {number} Offset.\n   */\n  CanvasReplay.prototype.drawCustomCoordinates_ = function drawCustomCoordinates_ (flatCoordinates, offset, ends, stride, replayEnds) {\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      var end = ends[i];\n      var replayEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n      replayEnds.push(replayEnd);\n      offset = end;\n    }\n    return offset;\n  };\n\n  /**\n   * @inheritDoc.\n   */\n  CanvasReplay.prototype.drawCustom = function drawCustom (geometry, feature, renderer) {\n    this.beginGeometry(geometry, feature);\n    var type = geometry.getType();\n    var stride = geometry.getStride();\n    var replayBegin = this.coordinates.length;\n    var flatCoordinates, replayEnd, replayEnds, replayEndss;\n    var offset;\n    if (type == GeometryType.MULTI_POLYGON) {\n      geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry);\n      flatCoordinates = geometry.getOrientedFlatCoordinates();\n      replayEndss = [];\n      var endss = geometry.getEndss();\n      offset = 0;\n      for (var i = 0, ii = endss.length; i < ii; ++i) {\n        var myEnds = [];\n        offset = this.drawCustomCoordinates_(flatCoordinates, offset, endss[i], stride, myEnds);\n        replayEndss.push(myEnds);\n      }\n      this.instructions.push([CanvasInstruction.CUSTOM,\n        replayBegin, replayEndss, geometry, renderer, inflateMultiCoordinatesArray]);\n    } else if (type == GeometryType.POLYGON || type == GeometryType.MULTI_LINE_STRING) {\n      replayEnds = [];\n      flatCoordinates = (type == GeometryType.POLYGON) ?\n        /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getOrientedFlatCoordinates() :\n        geometry.getFlatCoordinates();\n      offset = this.drawCustomCoordinates_(flatCoordinates, 0,\n        /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (geometry).getEnds(),\n        stride, replayEnds);\n      this.instructions.push([CanvasInstruction.CUSTOM,\n        replayBegin, replayEnds, geometry, renderer, inflateCoordinatesArray]);\n    } else if (type == GeometryType.LINE_STRING || type == GeometryType.MULTI_POINT) {\n      flatCoordinates = geometry.getFlatCoordinates();\n      replayEnd = this.appendFlatCoordinates(\n        flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n      this.instructions.push([CanvasInstruction.CUSTOM,\n        replayBegin, replayEnd, geometry, renderer, inflateCoordinates]);\n    } else if (type == GeometryType.POINT) {\n      flatCoordinates = geometry.getFlatCoordinates();\n      this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n      replayEnd = this.coordinates.length;\n      this.instructions.push([CanvasInstruction.CUSTOM,\n        replayBegin, replayEnd, geometry, renderer]);\n    }\n    this.endGeometry(geometry, feature);\n  };\n\n  /**\n   * @protected\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n   */\n  CanvasReplay.prototype.beginGeometry = function beginGeometry (geometry, feature) {\n    this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n    this.instructions.push(this.beginGeometryInstruction1_);\n    this.beginGeometryInstruction2_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];\n    this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n  };\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  CanvasReplay.prototype.finish = function finish () {};\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   */\n  CanvasReplay.prototype.fill_ = function fill_ (context) {\n    if (this.alignFill_) {\n      var origin = applyTransform(this.renderedTransform_, [0, 0]);\n      var repeatSize = 512 * this.pixelRatio;\n      context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n      context.rotate(this.viewRotation_);\n    }\n    context.fill();\n    if (this.alignFill_) {\n      context.setTransform.apply(context, resetTransform);\n    }\n  };\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {Array<*>} instruction Instruction.\n   */\n  CanvasReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (context, instruction) {\n    context.strokeStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n    context.lineWidth = /** @type {number} */ (instruction[2]);\n    context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n    context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n    context.miterLimit = /** @type {number} */ (instruction[5]);\n    if (CANVAS_LINE_DASH) {\n      context.lineDashOffset = /** @type {number} */ (instruction[7]);\n      context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n   */\n  CanvasReplay.prototype.renderDeclutter_ = function renderDeclutter_ (declutterGroup, feature) {\n    if (declutterGroup && declutterGroup.length > 5) {\n      var groupCount = declutterGroup[4];\n      if (groupCount == 1 || groupCount == declutterGroup.length - 5) {\n        /** @type {import(\"../../structs/RBush.js\").Entry} */\n        var box = {\n          minX: /** @type {number} */ (declutterGroup[0]),\n          minY: /** @type {number} */ (declutterGroup[1]),\n          maxX: /** @type {number} */ (declutterGroup[2]),\n          maxY: /** @type {number} */ (declutterGroup[3]),\n          value: feature\n        };\n        if (!this.declutterTree.collides(box)) {\n          this.declutterTree.insert(box);\n          for (var j = 5, jj = declutterGroup.length; j < jj; ++j) {\n            var declutterData = /** @type {Array} */ (declutterGroup[j]);\n            if (declutterData) {\n              if (declutterData.length > 11) {\n                this.replayTextBackground_(declutterData[0],\n                  declutterData[13], declutterData[14], declutterData[15], declutterData[16],\n                  declutterData[11], declutterData[12]);\n              }\n              drawImage.apply(undefined, declutterData);\n            }\n          }\n        }\n        declutterGroup.length = 5;\n        createOrUpdateEmpty(declutterGroup);\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n   *     to skip.\n   * @param {Array<*>} instructions Instructions array.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n   *     extent.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  CanvasReplay.prototype.replay_ = function replay_ (\n    context,\n    transform,\n    skippedFeaturesHash,\n    instructions,\n    snapToPixel,\n    featureCallback,\n    opt_hitExtent\n  ) {\n    /** @type {Array<number>} */\n    var pixelCoordinates;\n    if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n      pixelCoordinates = this.pixelCoordinates_;\n    } else {\n      if (!this.pixelCoordinates_) {\n        this.pixelCoordinates_ = [];\n      }\n      pixelCoordinates = transform2D(\n        this.coordinates, 0, this.coordinates.length, 2,\n        transform, this.pixelCoordinates_);\n      transformSetFromArray(this.renderedTransform_, transform);\n    }\n    var skipFeatures = !isEmpty(skippedFeaturesHash);\n    var i = 0; // instruction index\n    var ii = instructions.length; // end of instructions\n    var d = 0; // data index\n    var dd; // end of per-instruction data\n    var anchorX, anchorY, prevX, prevY, roundX, roundY, declutterGroup, image;\n    var pendingFill = 0;\n    var pendingStroke = 0;\n    var lastFillInstruction = null;\n    var lastStrokeInstruction = null;\n    var coordinateCache = this.coordinateCache_;\n    var viewRotation = this.viewRotation_;\n\n    var state = /** @type {import(\"../../render.js\").State} */ ({\n      context: context,\n      pixelRatio: this.pixelRatio,\n      resolution: this.resolution,\n      rotation: viewRotation\n    });\n\n    // When the batch size gets too big, performance decreases. 200 is a good\n    // balance between batch size and number of fill/stroke instructions.\n    var batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;\n    var /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ feature;\n    var x, y;\n    while (i < ii) {\n      var instruction = instructions[i];\n      var type = /** @type {CanvasInstruction} */ (instruction[0]);\n      switch (type) {\n        case CanvasInstruction.BEGIN_GEOMETRY:\n          feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n          if ((skipFeatures && skippedFeaturesHash[getUid(feature)]) || !feature.getGeometry()) {\n            i = /** @type {number} */ (instruction[2]);\n          } else if (opt_hitExtent !== undefined && !intersects(\n            opt_hitExtent, feature.getGeometry().getExtent())) {\n            i = /** @type {number} */ (instruction[2]) + 1;\n          } else {\n            ++i;\n          }\n          break;\n        case CanvasInstruction.BEGIN_PATH:\n          if (pendingFill > batchSize) {\n            this.fill_(context);\n            pendingFill = 0;\n          }\n          if (pendingStroke > batchSize) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n          if (!pendingFill && !pendingStroke) {\n            context.beginPath();\n            prevX = prevY = NaN;\n          }\n          ++i;\n          break;\n        case CanvasInstruction.CIRCLE:\n          d = /** @type {number} */ (instruction[1]);\n          var x1 = pixelCoordinates[d];\n          var y1 = pixelCoordinates[d + 1];\n          var x2 = pixelCoordinates[d + 2];\n          var y2 = pixelCoordinates[d + 3];\n          var dx = x2 - x1;\n          var dy = y2 - y1;\n          var r = Math.sqrt(dx * dx + dy * dy);\n          context.moveTo(x1 + r, y1);\n          context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n          ++i;\n          break;\n        case CanvasInstruction.CLOSE_PATH:\n          context.closePath();\n          ++i;\n          break;\n        case CanvasInstruction.CUSTOM:\n          d = /** @type {number} */ (instruction[1]);\n          dd = instruction[2];\n          var geometry = /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (instruction[3]);\n          var renderer = instruction[4];\n          var fn = instruction.length == 6 ? instruction[5] : undefined;\n          state.geometry = geometry;\n          state.feature = feature;\n          if (!(i in coordinateCache)) {\n            coordinateCache[i] = [];\n          }\n          var coords = coordinateCache[i];\n          if (fn) {\n            fn(pixelCoordinates, d, dd, 2, coords);\n          } else {\n            coords[0] = pixelCoordinates[d];\n            coords[1] = pixelCoordinates[d + 1];\n            coords.length = 2;\n          }\n          renderer(coords, state);\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_IMAGE:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          image = /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */\n              (instruction[3]);\n          // Remaining arguments in DRAW_IMAGE are in alphabetical order\n          anchorX = /** @type {number} */ (instruction[4]);\n          anchorY = /** @type {number} */ (instruction[5]);\n          declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[6]);\n          var height = /** @type {number} */ (instruction[7]);\n          var opacity = /** @type {number} */ (instruction[8]);\n          var originX = /** @type {number} */ (instruction[9]);\n          var originY = /** @type {number} */ (instruction[10]);\n          var rotateWithView = /** @type {boolean} */ (instruction[11]);\n          var rotation = /** @type {number} */ (instruction[12]);\n          var scale = /** @type {number} */ (instruction[13]);\n          var width = /** @type {number} */ (instruction[14]);\n\n          var padding = (void 0), backgroundFill = (void 0), backgroundStroke = (void 0);\n          if (instruction.length > 16) {\n            padding = /** @type {Array<number>} */ (instruction[15]);\n            backgroundFill = /** @type {boolean} */ (instruction[16]);\n            backgroundStroke = /** @type {boolean} */ (instruction[17]);\n          } else {\n            padding = defaultPadding;\n            backgroundFill = backgroundStroke = false;\n          }\n\n          if (rotateWithView) {\n            rotation += viewRotation;\n          }\n          for (; d < dd; d += 2) {\n            this.replayImage_(context,\n              pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY,\n              declutterGroup, height, opacity, originX, originY, rotation, scale,\n              snapToPixel, width, padding,\n              backgroundFill ? /** @type {Array<*>} */ (lastFillInstruction) : null,\n              backgroundStroke ? /** @type {Array<*>} */ (lastStrokeInstruction) : null);\n          }\n          this.renderDeclutter_(declutterGroup, feature);\n          ++i;\n          break;\n        case CanvasInstruction.DRAW_CHARS:\n          var begin = /** @type {number} */ (instruction[1]);\n          var end = /** @type {number} */ (instruction[2]);\n          var baseline = /** @type {number} */ (instruction[3]);\n          declutterGroup = featureCallback ? null : /** @type {import(\"../canvas.js\").DeclutterGroup} */ (instruction[4]);\n          var overflow = /** @type {number} */ (instruction[5]);\n          var fillKey = /** @type {string} */ (instruction[6]);\n          var maxAngle = /** @type {number} */ (instruction[7]);\n          var measure = /** @type {function(string):number} */ (instruction[8]);\n          var offsetY = /** @type {number} */ (instruction[9]);\n          var strokeKey = /** @type {string} */ (instruction[10]);\n          var strokeWidth = /** @type {number} */ (instruction[11]);\n          var text = /** @type {string} */ (instruction[12]);\n          var textKey = /** @type {string} */ (instruction[13]);\n          var textScale = /** @type {number} */ (instruction[14]);\n\n          var pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n          var textLength = measure(text);\n          if (overflow || textLength <= pathLength) {\n            /** @type {import(\"./TextReplay.js\").default} */\n            var textReplay = /** @type {?} */ (this);\n            var textAlign = textReplay.textStates[textKey].textAlign;\n            var startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];\n            var parts = drawTextOnPath(\n              pixelCoordinates, begin, end, 2, text, measure, startM, maxAngle);\n            if (parts) {\n              var c = (void 0), cc = (void 0), chars = (void 0), label = (void 0), part = (void 0);\n              if (strokeKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = textReplay.getImage(chars, textKey, '', strokeKey);\n                  anchorX = /** @type {number} */ (part[2]) + strokeWidth;\n                  anchorY = baseline * label.height + (0.5 - baseline) * 2 * strokeWidth - offsetY;\n                  this.replayImage_(context,\n                    /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n                    anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n                    /** @type {number} */ (part[3]), textScale, false, label.width,\n                    defaultPadding, null, null);\n                }\n              }\n              if (fillKey) {\n                for (c = 0, cc = parts.length; c < cc; ++c) {\n                  part = parts[c]; // x, y, anchorX, rotation, chunk\n                  chars = /** @type {string} */ (part[4]);\n                  label = textReplay.getImage(chars, textKey, fillKey, '');\n                  anchorX = /** @type {number} */ (part[2]);\n                  anchorY = baseline * label.height - offsetY;\n                  this.replayImage_(context,\n                    /** @type {number} */ (part[0]), /** @type {number} */ (part[1]), label,\n                    anchorX, anchorY, declutterGroup, label.height, 1, 0, 0,\n                    /** @type {number} */ (part[3]), textScale, false, label.width,\n                    defaultPadding, null, null);\n                }\n              }\n            }\n          }\n          this.renderDeclutter_(declutterGroup, feature);\n          ++i;\n          break;\n        case CanvasInstruction.END_GEOMETRY:\n          if (featureCallback !== undefined) {\n            feature = /** @type {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} */ (instruction[1]);\n            var result = featureCallback(feature);\n            if (result) {\n              return result;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.FILL:\n          if (batchSize) {\n            pendingFill++;\n          } else {\n            this.fill_(context);\n          }\n          ++i;\n          break;\n        case CanvasInstruction.MOVE_TO_LINE_TO:\n          d = /** @type {number} */ (instruction[1]);\n          dd = /** @type {number} */ (instruction[2]);\n          x = pixelCoordinates[d];\n          y = pixelCoordinates[d + 1];\n          roundX = (x + 0.5) | 0;\n          roundY = (y + 0.5) | 0;\n          if (roundX !== prevX || roundY !== prevY) {\n            context.moveTo(x, y);\n            prevX = roundX;\n            prevY = roundY;\n          }\n          for (d += 2; d < dd; d += 2) {\n            x = pixelCoordinates[d];\n            y = pixelCoordinates[d + 1];\n            roundX = (x + 0.5) | 0;\n            roundY = (y + 0.5) | 0;\n            if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n              context.lineTo(x, y);\n              prevX = roundX;\n              prevY = roundY;\n            }\n          }\n          ++i;\n          break;\n        case CanvasInstruction.SET_FILL_STYLE:\n          lastFillInstruction = instruction;\n          this.alignFill_ = instruction[2];\n\n          if (pendingFill) {\n            this.fill_(context);\n            pendingFill = 0;\n            if (pendingStroke) {\n              context.stroke();\n              pendingStroke = 0;\n            }\n          }\n\n          context.fillStyle = /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n          ++i;\n          break;\n        case CanvasInstruction.SET_STROKE_STYLE:\n          lastStrokeInstruction = instruction;\n          if (pendingStroke) {\n            context.stroke();\n            pendingStroke = 0;\n          }\n          this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n          ++i;\n          break;\n        case CanvasInstruction.STROKE:\n          if (batchSize) {\n            pendingStroke++;\n          } else {\n            context.stroke();\n          }\n          ++i;\n          break;\n        default:\n          ++i; // consume the instruction anyway, to avoid an infinite loop\n          break;\n      }\n    }\n    if (pendingFill) {\n      this.fill_(context);\n    }\n    if (pendingStroke) {\n      context.stroke();\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n   *     to skip.\n   * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n   */\n  CanvasReplay.prototype.replay = function replay (context, transform, viewRotation, skippedFeaturesHash, snapToPixel) {\n    this.viewRotation_ = viewRotation;\n    this.replay_(context, transform,\n      skippedFeaturesHash, this.instructions, snapToPixel, undefined, undefined);\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n   *     to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T=} opt_featureCallback\n   *     Feature callback.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Only check features that intersect this\n   *     extent.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  CanvasReplay.prototype.replayHitDetection = function replayHitDetection (\n    context,\n    transform,\n    viewRotation,\n    skippedFeaturesHash,\n    opt_featureCallback,\n    opt_hitExtent\n  ) {\n    this.viewRotation_ = viewRotation;\n    return this.replay_(context, transform, skippedFeaturesHash,\n      this.hitDetectionInstructions, true, opt_featureCallback, opt_hitExtent);\n  };\n\n  /**\n   * Reverse the hit detection instructions.\n   */\n  CanvasReplay.prototype.reverseHitDetectionInstructions = function reverseHitDetectionInstructions () {\n    var hitDetectionInstructions = this.hitDetectionInstructions;\n    // step 1 - reverse array\n    hitDetectionInstructions.reverse();\n    // step 2 - reverse instructions within geometry blocks\n    var i;\n    var n = hitDetectionInstructions.length;\n    var instruction;\n    var type;\n    var begin = -1;\n    for (i = 0; i < n; ++i) {\n      instruction = hitDetectionInstructions[i];\n      type = /** @type {CanvasInstruction} */ (instruction[0]);\n      if (type == CanvasInstruction.END_GEOMETRY) {\n        begin = i;\n      } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n        instruction[2] = i;\n        reverseSubArray(this.hitDetectionInstructions, begin, i);\n        begin = -1;\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    var state = this.state;\n    if (fillStyle) {\n      var fillStyleColor = fillStyle.getColor();\n      state.fillStyle = asColorLike(fillStyleColor ?\n        fillStyleColor : defaultFillStyle);\n    } else {\n      state.fillStyle = undefined;\n    }\n    if (strokeStyle) {\n      var strokeStyleColor = strokeStyle.getColor();\n      state.strokeStyle = asColorLike(strokeStyleColor ?\n        strokeStyleColor : defaultStrokeStyle);\n      var strokeStyleLineCap = strokeStyle.getLineCap();\n      state.lineCap = strokeStyleLineCap !== undefined ?\n        strokeStyleLineCap : defaultLineCap;\n      var strokeStyleLineDash = strokeStyle.getLineDash();\n      state.lineDash = strokeStyleLineDash ?\n        strokeStyleLineDash.slice() : defaultLineDash;\n      var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      state.lineDashOffset = strokeStyleLineDashOffset ?\n        strokeStyleLineDashOffset : defaultLineDashOffset;\n      var strokeStyleLineJoin = strokeStyle.getLineJoin();\n      state.lineJoin = strokeStyleLineJoin !== undefined ?\n        strokeStyleLineJoin : defaultLineJoin;\n      var strokeStyleWidth = strokeStyle.getWidth();\n      state.lineWidth = strokeStyleWidth !== undefined ?\n        strokeStyleWidth : defaultLineWidth;\n      var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n      state.miterLimit = strokeStyleMiterLimit !== undefined ?\n        strokeStyleMiterLimit : defaultMiterLimit;\n\n      if (state.lineWidth > this.maxLineWidth) {\n        this.maxLineWidth = state.lineWidth;\n        // invalidate the buffered max extent cache\n        this.bufferedMaxExtent_ = null;\n      }\n    } else {\n      state.strokeStyle = undefined;\n      state.lineCap = undefined;\n      state.lineDash = null;\n      state.lineDashOffset = undefined;\n      state.lineJoin = undefined;\n      state.lineWidth = undefined;\n      state.miterLimit = undefined;\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @return {Array<*>} Fill instruction.\n   */\n  CanvasReplay.prototype.createFill = function createFill (state, geometry) {\n    var fillStyle = state.fillStyle;\n    /** @type {Array<*>} */\n    var fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n    if (typeof fillStyle !== 'string') {\n      // Fill is a pattern or gradient - align it!\n      fillInstruction.push(true);\n    }\n    return fillInstruction;\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   */\n  CanvasReplay.prototype.applyStroke = function applyStroke (state) {\n    this.instructions.push(this.createStroke(state));\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @return {Array<*>} Stroke instruction.\n   */\n  CanvasReplay.prototype.createStroke = function createStroke (state) {\n    return [\n      CanvasInstruction.SET_STROKE_STYLE,\n      state.strokeStyle, state.lineWidth * this.pixelRatio, state.lineCap,\n      state.lineJoin, state.miterLimit,\n      this.applyPixelRatio(state.lineDash), state.lineDashOffset * this.pixelRatio\n    ];\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState, (import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default)):Array<*>} createFill Create fill.\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   */\n  CanvasReplay.prototype.updateFillStyle = function updateFillStyle (state, createFill, geometry) {\n    var fillStyle = state.fillStyle;\n    if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n      if (fillStyle !== undefined) {\n        this.instructions.push(createFill.call(this, state, geometry));\n      }\n      state.currentFillStyle = fillStyle;\n    }\n  };\n\n  /**\n   * @param {import(\"../canvas.js\").FillStrokeState} state State.\n   * @param {function(this:CanvasReplay, import(\"../canvas.js\").FillStrokeState)} applyStroke Apply stroke.\n   */\n  CanvasReplay.prototype.updateStrokeStyle = function updateStrokeStyle (state, applyStroke) {\n    var strokeStyle = state.strokeStyle;\n    var lineCap = state.lineCap;\n    var lineDash = state.lineDash;\n    var lineDashOffset = state.lineDashOffset;\n    var lineJoin = state.lineJoin;\n    var lineWidth = state.lineWidth;\n    var miterLimit = state.miterLimit;\n    if (state.currentStrokeStyle != strokeStyle ||\n        state.currentLineCap != lineCap ||\n        (lineDash != state.currentLineDash && !equals(state.currentLineDash, lineDash)) ||\n        state.currentLineDashOffset != lineDashOffset ||\n        state.currentLineJoin != lineJoin ||\n        state.currentLineWidth != lineWidth ||\n        state.currentMiterLimit != miterLimit) {\n      if (strokeStyle !== undefined) {\n        applyStroke.call(this, state);\n      }\n      state.currentStrokeStyle = strokeStyle;\n      state.currentLineCap = lineCap;\n      state.currentLineDash = lineDash;\n      state.currentLineDashOffset = lineDashOffset;\n      state.currentLineJoin = lineJoin;\n      state.currentLineWidth = lineWidth;\n      state.currentMiterLimit = miterLimit;\n    }\n  };\n\n  /**\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n   */\n  CanvasReplay.prototype.endGeometry = function endGeometry (geometry, feature) {\n    this.beginGeometryInstruction1_[2] = this.instructions.length;\n    this.beginGeometryInstruction1_ = null;\n    this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n    this.beginGeometryInstruction2_ = null;\n    var endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n    this.instructions.push(endGeometryInstruction);\n    this.hitDetectionInstructions.push(endGeometryInstruction);\n  };\n\n  /**\n   * Get the buffered rendering extent.  Rendering will be clipped to the extent\n   * provided to the constructor.  To account for symbolizers that may intersect\n   * this extent, we calculate a buffered extent (e.g. based on stroke width).\n   * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n   * @protected\n   */\n  CanvasReplay.prototype.getBufferedMaxExtent = function getBufferedMaxExtent () {\n    if (!this.bufferedMaxExtent_) {\n      this.bufferedMaxExtent_ = clone(this.maxExtent);\n      if (this.maxLineWidth > 0) {\n        var width = this.resolution * (this.maxLineWidth + 1) / 2;\n        buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n      }\n    }\n    return this.bufferedMaxExtent_;\n  };\n\n  return CanvasReplay;\n}(VectorContext));\n\n\nexport default CanvasReplay;\n\n//# sourceMappingURL=Replay.js.map","/**\n * @module ol/render/canvas/ImageReplay\n */\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasImageReplay = /*@__PURE__*/(function (CanvasReplay) {\n  function CanvasImageReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n    CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterGroup}\n     */\n    this.declutterGroup_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.anchorY_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.height_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.opacity_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.originY_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.rotation_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.scale_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.width_ = undefined;\n\n  }\n\n  if ( CanvasReplay ) CanvasImageReplay.__proto__ = CanvasReplay;\n  CanvasImageReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n  CanvasImageReplay.prototype.constructor = CanvasImageReplay;\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} My end.\n   */\n  CanvasImageReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n    return this.appendFlatCoordinates(flatCoordinates, offset, end, stride, false, false);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageReplay.prototype.drawPoint = function drawPoint (pointGeometry, feature) {\n    if (!this.image_) {\n      return;\n    }\n    this.beginGeometry(pointGeometry, feature);\n    var flatCoordinates = pointGeometry.getFlatCoordinates();\n    var stride = pointGeometry.getStride();\n    var myBegin = this.coordinates.length;\n    var myEnd = this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n      this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n      this.scale_ * this.pixelRatio, this.width_\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n      this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n      this.scale_, this.width_\n    ]);\n    this.endGeometry(pointGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageReplay.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {\n    if (!this.image_) {\n      return;\n    }\n    this.beginGeometry(multiPointGeometry, feature);\n    var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n    var stride = multiPointGeometry.getStride();\n    var myBegin = this.coordinates.length;\n    var myEnd = this.drawCoordinates_(\n      flatCoordinates, 0, flatCoordinates.length, stride);\n    this.instructions.push([\n      CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.image_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n      this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n      this.scale_ * this.pixelRatio, this.width_\n    ]);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.DRAW_IMAGE, myBegin, myEnd, this.hitDetectionImage_,\n      // Remaining arguments to DRAW_IMAGE are in alphabetical order\n      this.anchorX_, this.anchorY_, this.declutterGroup_, this.height_, this.opacity_,\n      this.originX_, this.originY_, this.rotateWithView_, this.rotation_,\n      this.scale_, this.width_\n    ]);\n    this.endGeometry(multiPointGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageReplay.prototype.finish = function finish () {\n    this.reverseHitDetectionInstructions();\n    // FIXME this doesn't really protect us against further calls to draw*Geometry\n    this.anchorX_ = undefined;\n    this.anchorY_ = undefined;\n    this.hitDetectionImage_ = null;\n    this.image_ = null;\n    this.height_ = undefined;\n    this.scale_ = undefined;\n    this.opacity_ = undefined;\n    this.originX_ = undefined;\n    this.originY_ = undefined;\n    this.rotateWithView_ = undefined;\n    this.rotation_ = undefined;\n    this.width_ = undefined;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasImageReplay.prototype.setImageStyle = function setImageStyle (imageStyle, declutterGroup) {\n    var anchor = imageStyle.getAnchor();\n    var size = imageStyle.getSize();\n    var hitDetectionImage = imageStyle.getHitDetectionImage(1);\n    var image = imageStyle.getImage(1);\n    var origin = imageStyle.getOrigin();\n    this.anchorX_ = anchor[0];\n    this.anchorY_ = anchor[1];\n    this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\n    this.hitDetectionImage_ = hitDetectionImage;\n    this.image_ = image;\n    this.height_ = size[1];\n    this.opacity_ = imageStyle.getOpacity();\n    this.originX_ = origin[0];\n    this.originY_ = origin[1];\n    this.rotateWithView_ = imageStyle.getRotateWithView();\n    this.rotation_ = imageStyle.getRotation();\n    this.scale_ = imageStyle.getScale();\n    this.width_ = size[0];\n  };\n\n  return CanvasImageReplay;\n}(CanvasReplay));\n\n\nexport default CanvasImageReplay;\n\n//# sourceMappingURL=ImageReplay.js.map","/**\n * @module ol/render/canvas/LineStringReplay\n */\nimport CanvasInstruction, {strokeInstruction, beginPathInstruction} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\nvar CanvasLineStringReplay = /*@__PURE__*/(function (CanvasReplay) {\n  function CanvasLineStringReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n    CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n  }\n\n  if ( CanvasReplay ) CanvasLineStringReplay.__proto__ = CanvasReplay;\n  CanvasLineStringReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n  CanvasLineStringReplay.prototype.constructor = CanvasLineStringReplay;\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} end.\n   */\n  CanvasLineStringReplay.prototype.drawFlatCoordinates_ = function drawFlatCoordinates_ (flatCoordinates, offset, end, stride) {\n    var myBegin = this.coordinates.length;\n    var myEnd = this.appendFlatCoordinates(\n      flatCoordinates, offset, end, stride, false, false);\n    var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\n    this.instructions.push(moveToLineToInstruction);\n    this.hitDetectionInstructions.push(moveToLineToInstruction);\n    return end;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasLineStringReplay.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {\n    var state = this.state;\n    var strokeStyle = state.strokeStyle;\n    var lineWidth = state.lineWidth;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(lineStringGeometry, feature);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.SET_STROKE_STYLE,\n      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n      state.miterLimit, state.lineDash, state.lineDashOffset\n    ], beginPathInstruction);\n    var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n    var stride = lineStringGeometry.getStride();\n    this.drawFlatCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(lineStringGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasLineStringReplay.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {\n    var state = this.state;\n    var strokeStyle = state.strokeStyle;\n    var lineWidth = state.lineWidth;\n    if (strokeStyle === undefined || lineWidth === undefined) {\n      return;\n    }\n    this.updateStrokeStyle(state, this.applyStroke);\n    this.beginGeometry(multiLineStringGeometry, feature);\n    this.hitDetectionInstructions.push([\n      CanvasInstruction.SET_STROKE_STYLE,\n      state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n      state.miterLimit, state.lineDash, state.lineDashOffset\n    ], beginPathInstruction);\n    var ends = multiLineStringGeometry.getEnds();\n    var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n    var stride = multiLineStringGeometry.getStride();\n    var offset = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinates_(flatCoordinates, offset, ends[i], stride);\n    }\n    this.hitDetectionInstructions.push(strokeInstruction);\n    this.endGeometry(multiLineStringGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasLineStringReplay.prototype.finish = function finish () {\n    var state = this.state;\n    if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n      this.instructions.push(strokeInstruction);\n    }\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n  };\n\n  /**\n   * @inheritDoc.\n   */\n  CanvasLineStringReplay.prototype.applyStroke = function applyStroke (state) {\n    if (state.lastStroke != undefined && state.lastStroke != this.coordinates.length) {\n      this.instructions.push(strokeInstruction);\n      state.lastStroke = this.coordinates.length;\n    }\n    state.lastStroke = 0;\n    CanvasReplay.prototype.applyStroke.call(this, state);\n    this.instructions.push(beginPathInstruction);\n  };\n\n  return CanvasLineStringReplay;\n}(CanvasReplay));\n\n\nexport default CanvasLineStringReplay;\n\n//# sourceMappingURL=LineStringReplay.js.map","/**\n * @module ol/render/canvas/PolygonReplay\n */\nimport {asString} from '../../color.js';\nimport {snap} from '../../geom/flat/simplify.js';\nimport {defaultFillStyle} from '../canvas.js';\nimport CanvasInstruction, {\n  fillInstruction, strokeInstruction, beginPathInstruction, closePathInstruction\n} from './Instruction.js';\nimport CanvasReplay from './Replay.js';\n\n\nvar CanvasPolygonReplay = /*@__PURE__*/(function (CanvasReplay) {\n  function CanvasPolygonReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n    CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n  }\n\n  if ( CanvasReplay ) CanvasPolygonReplay.__proto__ = CanvasReplay;\n  CanvasPolygonReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n  CanvasPolygonReplay.prototype.constructor = CanvasPolygonReplay;\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {Array<number>} ends Ends.\n   * @param {number} stride Stride.\n   * @private\n   * @return {number} End.\n   */\n  CanvasPolygonReplay.prototype.drawFlatCoordinatess_ = function drawFlatCoordinatess_ (flatCoordinates, offset, ends, stride) {\n    var state = this.state;\n    var fill = state.fillStyle !== undefined;\n    var stroke = state.strokeStyle != undefined;\n    var numEnds = ends.length;\n    this.instructions.push(beginPathInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction);\n    for (var i = 0; i < numEnds; ++i) {\n      var end = ends[i];\n      var myBegin = this.coordinates.length;\n      var myEnd = this.appendFlatCoordinates(flatCoordinates, offset, end, stride, true, !stroke);\n      var moveToLineToInstruction = [CanvasInstruction.MOVE_TO_LINE_TO, myBegin, myEnd];\n      this.instructions.push(moveToLineToInstruction);\n      this.hitDetectionInstructions.push(moveToLineToInstruction);\n      if (stroke) {\n        // Performance optimization: only call closePath() when we have a stroke.\n        // Otherwise the ring is closed already (see appendFlatCoordinates above).\n        this.instructions.push(closePathInstruction);\n        this.hitDetectionInstructions.push(closePathInstruction);\n      }\n      offset = end;\n    }\n    if (fill) {\n      this.instructions.push(fillInstruction);\n      this.hitDetectionInstructions.push(fillInstruction);\n    }\n    if (stroke) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    return offset;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasPolygonReplay.prototype.drawCircle = function drawCircle (circleGeometry, feature) {\n    var state = this.state;\n    var fillStyle = state.fillStyle;\n    var strokeStyle = state.strokeStyle;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    this.setFillStrokeStyles_(circleGeometry);\n    this.beginGeometry(circleGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        asString(defaultFillStyle)\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n        state.miterLimit, state.lineDash, state.lineDashOffset\n      ]);\n    }\n    var flatCoordinates = circleGeometry.getFlatCoordinates();\n    var stride = circleGeometry.getStride();\n    var myBegin = this.coordinates.length;\n    this.appendFlatCoordinates(\n      flatCoordinates, 0, flatCoordinates.length, stride, false, false);\n    var circleInstruction = [CanvasInstruction.CIRCLE, myBegin];\n    this.instructions.push(beginPathInstruction, circleInstruction);\n    this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n    this.hitDetectionInstructions.push(fillInstruction);\n    if (state.fillStyle !== undefined) {\n      this.instructions.push(fillInstruction);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.instructions.push(strokeInstruction);\n      this.hitDetectionInstructions.push(strokeInstruction);\n    }\n    this.endGeometry(circleGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasPolygonReplay.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {\n    var state = this.state;\n    var fillStyle = state.fillStyle;\n    var strokeStyle = state.strokeStyle;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    this.setFillStrokeStyles_(polygonGeometry);\n    this.beginGeometry(polygonGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        asString(defaultFillStyle)\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n        state.miterLimit, state.lineDash, state.lineDashOffset\n      ]);\n    }\n    var ends = polygonGeometry.getEnds();\n    var flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n    var stride = polygonGeometry.getStride();\n    this.drawFlatCoordinatess_(flatCoordinates, 0, ends, stride);\n    this.endGeometry(polygonGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasPolygonReplay.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {\n    var state = this.state;\n    var fillStyle = state.fillStyle;\n    var strokeStyle = state.strokeStyle;\n    if (fillStyle === undefined && strokeStyle === undefined) {\n      return;\n    }\n    this.setFillStrokeStyles_(multiPolygonGeometry);\n    this.beginGeometry(multiPolygonGeometry, feature);\n    if (state.fillStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_FILL_STYLE,\n        asString(defaultFillStyle)\n      ]);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.hitDetectionInstructions.push([\n        CanvasInstruction.SET_STROKE_STYLE,\n        state.strokeStyle, state.lineWidth, state.lineCap, state.lineJoin,\n        state.miterLimit, state.lineDash, state.lineDashOffset\n      ]);\n    }\n    var endss = multiPolygonGeometry.getEndss();\n    var flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n    var stride = multiPolygonGeometry.getStride();\n    var offset = 0;\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n      offset = this.drawFlatCoordinatess_(flatCoordinates, offset, endss[i], stride);\n    }\n    this.endGeometry(multiPolygonGeometry, feature);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasPolygonReplay.prototype.finish = function finish () {\n    this.reverseHitDetectionInstructions();\n    this.state = null;\n    // We want to preserve topology when drawing polygons.  Polygons are\n    // simplified using quantization and point elimination. However, we might\n    // have received a mix of quantized and non-quantized geometries, so ensure\n    // that all are quantized by quantizing all coordinates in the batch.\n    var tolerance = this.tolerance;\n    if (tolerance !== 0) {\n      var coordinates = this.coordinates;\n      for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = snap(coordinates[i], tolerance);\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   */\n  CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function setFillStrokeStyles_ (geometry) {\n    var state = this.state;\n    var fillStyle = state.fillStyle;\n    if (fillStyle !== undefined) {\n      this.updateFillStyle(state, this.createFill, geometry);\n    }\n    if (state.strokeStyle !== undefined) {\n      this.updateStrokeStyle(state, this.applyStroke);\n    }\n  };\n\n  return CanvasPolygonReplay;\n}(CanvasReplay));\n\n\nexport default CanvasPolygonReplay;\n\n//# sourceMappingURL=PolygonReplay.js.map","/**\n * @module ol/geom/flat/straightchunk\n */\n\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n  var chunkStart = offset;\n  var chunkEnd = offset;\n  var chunkM = 0;\n  var m = 0;\n  var start = offset;\n  var acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n  for (i = offset; i < end; i += stride) {\n    var x2 = flatCoordinates[i];\n    var y2 = flatCoordinates[i + 1];\n    if (x1 !== undefined) {\n      x23 = x2 - x1;\n      y23 = y2 - y1;\n      m23 = Math.sqrt(x23 * x23 + y23 * y23);\n      if (x12 !== undefined) {\n        m += m12;\n        acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n        if (acos > maxAngle) {\n          if (m > chunkM) {\n            chunkM = m;\n            chunkStart = start;\n            chunkEnd = i;\n          }\n          m = 0;\n          start = i - stride;\n        }\n      }\n      m12 = m23;\n      x12 = x23;\n      y12 = y23;\n    }\n    x1 = x2;\n    y1 = y2;\n  }\n  m += m23;\n  return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n\n//# sourceMappingURL=straightchunk.js.map","/**\n * @module ol/render/canvas/TextReplay\n */\nimport {getUid} from '../../util.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {labelCache, measureTextWidth, defaultTextAlign, measureTextHeight, defaultPadding, defaultLineCap, defaultLineDashOffset, defaultLineDash, defaultLineJoin, defaultFillStyle, checkFont, defaultFont, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport CanvasReplay from './Replay.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport TextPlacement from '../../style/TextPlacement.js';\n\nvar CanvasTextReplay = /*@__PURE__*/(function (CanvasReplay) {\n  function CanvasTextReplay(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {\n    CanvasReplay.call(this, tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").DeclutterGroup}\n     */\n    this.declutterGroup_;\n\n    /**\n     * @private\n     * @type {Array<HTMLCanvasElement>}\n     */\n    this.labels_ = null;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetX_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textOffsetY_ = 0;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.textRotateWithView_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textRotation_ = 0;\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").FillState}\n     */\n    this.textFillState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").FillState>}\n     */\n    this.fillStates = {};\n\n    /**\n     * @private\n     * @type {?import(\"../canvas.js\").StrokeState}\n     */\n    this.textStrokeState_ = null;\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n     */\n    this.strokeStates = {};\n\n    /**\n     * @private\n     * @type {import(\"../canvas.js\").TextState}\n     */\n    this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n    /**\n     * @type {!Object<string, import(\"../canvas.js\").TextState>}\n     */\n    this.textStates = {};\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.textKey_ = '';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.fillKey_ = '';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.strokeKey_ = '';\n\n    /**\n     * @private\n     * @type {Object<string, Object<string, number>>}\n     */\n    this.widths_ = {};\n\n    labelCache.prune();\n\n  }\n\n  if ( CanvasReplay ) CanvasTextReplay.__proto__ = CanvasReplay;\n  CanvasTextReplay.prototype = Object.create( CanvasReplay && CanvasReplay.prototype );\n  CanvasTextReplay.prototype.constructor = CanvasTextReplay;\n\n  /**\n   * @inheritDoc\n   */\n  CanvasTextReplay.prototype.drawText = function drawText (geometry, feature) {\n    var fillState = this.textFillState_;\n    var strokeState = this.textStrokeState_;\n    var textState = this.textState_;\n    if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n      return;\n    }\n\n    var begin = this.coordinates.length;\n\n    var geometryType = geometry.getType();\n    var flatCoordinates = null;\n    var end = 2;\n    var stride = 2;\n    var i, ii;\n\n    if (textState.placement === TextPlacement.LINE) {\n      if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {\n        return;\n      }\n      var ends;\n      flatCoordinates = geometry.getFlatCoordinates();\n      stride = geometry.getStride();\n      if (geometryType == GeometryType.LINE_STRING) {\n        ends = [flatCoordinates.length];\n      } else if (geometryType == GeometryType.MULTI_LINE_STRING) {\n        ends = geometry.getEnds();\n      } else if (geometryType == GeometryType.POLYGON) {\n        ends = geometry.getEnds().slice(0, 1);\n      } else if (geometryType == GeometryType.MULTI_POLYGON) {\n        var endss = geometry.getEndss();\n        ends = [];\n        for (i = 0, ii = endss.length; i < ii; ++i) {\n          ends.push(endss[i][0]);\n        }\n      }\n      this.beginGeometry(geometry, feature);\n      var textAlign = textState.textAlign;\n      var flatOffset = 0;\n      var flatEnd;\n      for (var o = 0, oo = ends.length; o < oo; ++o) {\n        if (textAlign == undefined) {\n          var range = matchingChunk(textState.maxAngle, flatCoordinates, flatOffset, ends[o], stride);\n          flatOffset = range[0];\n          flatEnd = range[1];\n        } else {\n          flatEnd = ends[o];\n        }\n        for (i = flatOffset; i < flatEnd; i += stride) {\n          this.coordinates.push(flatCoordinates[i], flatCoordinates[i + 1]);\n        }\n        end = this.coordinates.length;\n        flatOffset = ends[o];\n        this.drawChars_(begin, end, this.declutterGroup_);\n        begin = end;\n      }\n      this.endGeometry(geometry, feature);\n\n    } else {\n      var label = this.getImage(this.text_, this.textKey_, this.fillKey_, this.strokeKey_);\n      var width = label.width / this.pixelRatio;\n      switch (geometryType) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n          flatCoordinates = geometry.getFlatCoordinates();\n          end = flatCoordinates.length;\n          break;\n        case GeometryType.LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n          break;\n        case GeometryType.CIRCLE:\n          flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n          break;\n        case GeometryType.MULTI_LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n          end = flatCoordinates.length;\n          break;\n        case GeometryType.POLYGON:\n          flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n          if (!textState.overflow && flatCoordinates[2] / this.resolution < width) {\n            return;\n          }\n          stride = 3;\n          break;\n        case GeometryType.MULTI_POLYGON:\n          var interiorPoints = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n          flatCoordinates = [];\n          for (i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n            if (textState.overflow || interiorPoints[i + 2] / this.resolution >= width) {\n              flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n            }\n          }\n          end = flatCoordinates.length;\n          if (end == 0) {\n            return;\n          }\n          break;\n        default:\n      }\n      end = this.appendFlatCoordinates(flatCoordinates, 0, end, stride, false, false);\n      if (textState.backgroundFill || textState.backgroundStroke) {\n        this.setFillStrokeStyle(textState.backgroundFill, textState.backgroundStroke);\n        if (textState.backgroundFill) {\n          this.updateFillStyle(this.state, this.createFill, geometry);\n          this.hitDetectionInstructions.push(this.createFill(this.state, geometry));\n        }\n        if (textState.backgroundStroke) {\n          this.updateStrokeStyle(this.state, this.applyStroke);\n          this.hitDetectionInstructions.push(this.createStroke(this.state));\n        }\n      }\n      this.beginGeometry(geometry, feature);\n      this.drawTextImage_(label, begin, end);\n      this.endGeometry(geometry, feature);\n    }\n  };\n\n  /**\n   * @param {string} text Text.\n   * @param {string} textKey Text style key.\n   * @param {string} fillKey Fill style key.\n   * @param {string} strokeKey Stroke style key.\n   * @return {HTMLCanvasElement} Image.\n   */\n  CanvasTextReplay.prototype.getImage = function getImage (text, textKey, fillKey, strokeKey) {\n    var label;\n    var key = strokeKey + textKey + text + fillKey + this.pixelRatio;\n\n    if (!labelCache.containsKey(key)) {\n      var strokeState = strokeKey ? this.strokeStates[strokeKey] || this.textStrokeState_ : null;\n      var fillState = fillKey ? this.fillStates[fillKey] || this.textFillState_ : null;\n      var textState = this.textStates[textKey] || this.textState_;\n      var pixelRatio = this.pixelRatio;\n      var scale = textState.scale * pixelRatio;\n      var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n      var strokeWidth = strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n      var lines = text.split('\\n');\n      var numLines = lines.length;\n      var widths = [];\n      var width = measureTextWidths(textState.font, lines, widths);\n      var lineHeight = measureTextHeight(textState.font);\n      var height = lineHeight * numLines;\n      var renderWidth = (width + strokeWidth);\n      var context = createCanvasContext2D(\n        Math.ceil(renderWidth * scale),\n        Math.ceil((height + strokeWidth) * scale));\n      label = context.canvas;\n      labelCache.set(key, label);\n      if (scale != 1) {\n        context.scale(scale, scale);\n      }\n      context.font = textState.font;\n      if (strokeKey) {\n        context.strokeStyle = strokeState.strokeStyle;\n        context.lineWidth = strokeWidth;\n        context.lineCap = /** @type {CanvasLineCap} */ (strokeState.lineCap);\n        context.lineJoin = /** @type {CanvasLineJoin} */ (strokeState.lineJoin);\n        context.miterLimit = strokeState.miterLimit;\n        if (CANVAS_LINE_DASH && strokeState.lineDash.length) {\n          context.setLineDash(strokeState.lineDash);\n          context.lineDashOffset = strokeState.lineDashOffset;\n        }\n      }\n      if (fillKey) {\n        context.fillStyle = fillState.fillStyle;\n      }\n      context.textBaseline = 'middle';\n      context.textAlign = 'center';\n      var leftRight = (0.5 - align);\n      var x = align * label.width / scale + leftRight * strokeWidth;\n      var i;\n      if (strokeKey) {\n        for (i = 0; i < numLines; ++i) {\n          context.strokeText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n        }\n      }\n      if (fillKey) {\n        for (i = 0; i < numLines; ++i) {\n          context.fillText(lines[i], x + leftRight * widths[i], 0.5 * (strokeWidth + lineHeight) + i * lineHeight);\n        }\n      }\n    }\n    return labelCache.get(key);\n  };\n\n  /**\n   * @private\n   * @param {HTMLCanvasElement} label Label.\n   * @param {number} begin Begin.\n   * @param {number} end End.\n   */\n  CanvasTextReplay.prototype.drawTextImage_ = function drawTextImage_ (label, begin, end) {\n    var textState = this.textState_;\n    var strokeState = this.textStrokeState_;\n    var pixelRatio = this.pixelRatio;\n    var align = TEXT_ALIGN[textState.textAlign || defaultTextAlign];\n    var baseline = TEXT_ALIGN[textState.textBaseline];\n    var strokeWidth = strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n    var anchorX = align * label.width / pixelRatio + 2 * (0.5 - align) * strokeWidth;\n    var anchorY = baseline * label.height / pixelRatio + 2 * (0.5 - baseline) * strokeWidth;\n    this.instructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n      label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n      this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n      1, label.width,\n      textState.padding == defaultPadding ?\n        defaultPadding : textState.padding.map(function(p) {\n          return p * pixelRatio;\n        }),\n      !!textState.backgroundFill, !!textState.backgroundStroke\n    ]);\n    this.hitDetectionInstructions.push([CanvasInstruction.DRAW_IMAGE, begin, end,\n      label, (anchorX - this.textOffsetX_) * pixelRatio, (anchorY - this.textOffsetY_) * pixelRatio,\n      this.declutterGroup_, label.height, 1, 0, 0, this.textRotateWithView_, this.textRotation_,\n      1 / pixelRatio, label.width, textState.padding,\n      !!textState.backgroundFill, !!textState.backgroundStroke\n    ]);\n  };\n\n  /**\n   * @private\n   * @param {number} begin Begin.\n   * @param {number} end End.\n   * @param {import(\"../canvas.js\").DeclutterGroup} declutterGroup Declutter group.\n   */\n  CanvasTextReplay.prototype.drawChars_ = function drawChars_ (begin, end, declutterGroup) {\n    var strokeState = this.textStrokeState_;\n    var textState = this.textState_;\n    var fillState = this.textFillState_;\n\n    var strokeKey = this.strokeKey_;\n    if (strokeState) {\n      if (!(strokeKey in this.strokeStates)) {\n        this.strokeStates[strokeKey] = /** @type {import(\"../canvas.js\").StrokeState} */ ({\n          strokeStyle: strokeState.strokeStyle,\n          lineCap: strokeState.lineCap,\n          lineDashOffset: strokeState.lineDashOffset,\n          lineWidth: strokeState.lineWidth,\n          lineJoin: strokeState.lineJoin,\n          miterLimit: strokeState.miterLimit,\n          lineDash: strokeState.lineDash\n        });\n      }\n    }\n    var textKey = this.textKey_;\n    if (!(this.textKey_ in this.textStates)) {\n      this.textStates[this.textKey_] = /** @type {import(\"../canvas.js\").TextState} */ ({\n        font: textState.font,\n        textAlign: textState.textAlign || defaultTextAlign,\n        scale: textState.scale\n      });\n    }\n    var fillKey = this.fillKey_;\n    if (fillState) {\n      if (!(fillKey in this.fillStates)) {\n        this.fillStates[fillKey] = /** @type {import(\"../canvas.js\").FillState} */ ({\n          fillStyle: fillState.fillStyle\n        });\n      }\n    }\n\n    var pixelRatio = this.pixelRatio;\n    var baseline = TEXT_ALIGN[textState.textBaseline];\n\n    var offsetY = this.textOffsetY_ * pixelRatio;\n    var text = this.text_;\n    var font = textState.font;\n    var textScale = textState.scale;\n    var strokeWidth = strokeState ? strokeState.lineWidth * textScale / 2 : 0;\n    var widths = this.widths_[font];\n    if (!widths) {\n      this.widths_[font] = widths = {};\n    }\n    this.instructions.push([CanvasInstruction.DRAW_CHARS,\n      begin, end, baseline, declutterGroup,\n      textState.overflow, fillKey, textState.maxAngle,\n      function(text) {\n        var width = widths[text];\n        if (!width) {\n          width = widths[text] = measureTextWidth(font, text);\n        }\n        return width * textScale * pixelRatio;\n      },\n      offsetY, strokeKey, strokeWidth * pixelRatio, text, textKey, 1\n    ]);\n    this.hitDetectionInstructions.push([CanvasInstruction.DRAW_CHARS,\n      begin, end, baseline, declutterGroup,\n      textState.overflow, fillKey, textState.maxAngle,\n      function(text) {\n        var width = widths[text];\n        if (!width) {\n          width = widths[text] = measureTextWidth(font, text);\n        }\n        return width * textScale;\n      },\n      offsetY, strokeKey, strokeWidth, text, textKey, 1 / pixelRatio\n    ]);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasTextReplay.prototype.setTextStyle = function setTextStyle (textStyle, declutterGroup) {\n    var textState, fillState, strokeState;\n    if (!textStyle) {\n      this.text_ = '';\n    } else {\n      this.declutterGroup_ = /** @type {import(\"../canvas.js\").DeclutterGroup} */ (declutterGroup);\n\n      var textFillStyle = textStyle.getFill();\n      if (!textFillStyle) {\n        fillState = this.textFillState_ = null;\n      } else {\n        fillState = this.textFillState_;\n        if (!fillState) {\n          fillState = this.textFillState_ = /** @type {import(\"../canvas.js\").FillState} */ ({});\n        }\n        fillState.fillStyle = asColorLike(\n          textFillStyle.getColor() || defaultFillStyle);\n      }\n\n      var textStrokeStyle = textStyle.getStroke();\n      if (!textStrokeStyle) {\n        strokeState = this.textStrokeState_ = null;\n      } else {\n        strokeState = this.textStrokeState_;\n        if (!strokeState) {\n          strokeState = this.textStrokeState_ = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n        }\n        var lineDash = textStrokeStyle.getLineDash();\n        var lineDashOffset = textStrokeStyle.getLineDashOffset();\n        var lineWidth = textStrokeStyle.getWidth();\n        var miterLimit = textStrokeStyle.getMiterLimit();\n        strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n        strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n        strokeState.lineDashOffset =\n            lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n        strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n        strokeState.lineWidth =\n            lineWidth === undefined ? defaultLineWidth : lineWidth;\n        strokeState.miterLimit =\n            miterLimit === undefined ? defaultMiterLimit : miterLimit;\n        strokeState.strokeStyle = asColorLike(\n          textStrokeStyle.getColor() || defaultStrokeStyle);\n      }\n\n      textState = this.textState_;\n      var font = textStyle.getFont() || defaultFont;\n      checkFont(font);\n      var textScale = textStyle.getScale();\n      textState.overflow = textStyle.getOverflow();\n      textState.font = font;\n      textState.maxAngle = textStyle.getMaxAngle();\n      textState.placement = textStyle.getPlacement();\n      textState.textAlign = textStyle.getTextAlign();\n      textState.textBaseline = textStyle.getTextBaseline() || defaultTextBaseline;\n      textState.backgroundFill = textStyle.getBackgroundFill();\n      textState.backgroundStroke = textStyle.getBackgroundStroke();\n      textState.padding = textStyle.getPadding() || defaultPadding;\n      textState.scale = textScale === undefined ? 1 : textScale;\n\n      var textOffsetX = textStyle.getOffsetX();\n      var textOffsetY = textStyle.getOffsetY();\n      var textRotateWithView = textStyle.getRotateWithView();\n      var textRotation = textStyle.getRotation();\n      this.text_ = textStyle.getText() || '';\n      this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n      this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n      this.textRotateWithView_ = textRotateWithView === undefined ? false : textRotateWithView;\n      this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n      this.strokeKey_ = strokeState ?\n        (typeof strokeState.strokeStyle == 'string' ? strokeState.strokeStyle : getUid(strokeState.strokeStyle)) +\n        strokeState.lineCap + strokeState.lineDashOffset + '|' + strokeState.lineWidth +\n        strokeState.lineJoin + strokeState.miterLimit + '[' + strokeState.lineDash.join() + ']' :\n        '';\n      this.textKey_ = textState.font + textState.scale + (textState.textAlign || '?');\n      this.fillKey_ = fillState ?\n        (typeof fillState.fillStyle == 'string' ? fillState.fillStyle : ('|' + getUid(fillState.fillStyle))) :\n        '';\n    }\n  };\n\n  return CanvasTextReplay;\n}(CanvasReplay));\n\n\n/**\n * @param {string} font Font to use for measuring.\n * @param {Array<string>} lines Lines to measure.\n * @param {Array<number>} widths Array will be populated with the widths of\n * each line.\n * @return {number} Width of the whole text.\n */\nexport function measureTextWidths(font, lines, widths) {\n  var numLines = lines.length;\n  var width = 0;\n  for (var i = 0; i < numLines; ++i) {\n    var currentWidth = measureTextWidth(font, lines[i]);\n    width = Math.max(width, currentWidth);\n    widths.push(currentWidth);\n  }\n  return width;\n}\n\n\nexport default CanvasTextReplay;\n\n//# sourceMappingURL=TextReplay.js.map","/**\n * @module ol/render/canvas/ReplayGroup\n */\n\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport ReplayGroup from '../ReplayGroup.js';\nimport ReplayType from '../ReplayType.js';\nimport CanvasReplay from './Replay.js';\nimport CanvasImageReplay from './ImageReplay.js';\nimport CanvasLineStringReplay from './LineStringReplay.js';\nimport CanvasPolygonReplay from './PolygonReplay.js';\nimport CanvasTextReplay from './TextReplay.js';\nimport {ORDER} from '../replay.js';\nimport {create as createTransform, compose as composeTransform} from '../../transform.js';\n\n\n/**\n * @type {Object<ReplayType, typeof CanvasReplay>}\n */\nvar BATCH_CONSTRUCTORS = {\n  'Circle': CanvasPolygonReplay,\n  'Default': CanvasReplay,\n  'Image': CanvasImageReplay,\n  'LineString': CanvasLineStringReplay,\n  'Polygon': CanvasPolygonReplay,\n  'Text': CanvasTextReplay\n};\n\n\nvar CanvasReplayGroup = /*@__PURE__*/(function (ReplayGroup) {\n  function CanvasReplayGroup(\n    tolerance,\n    maxExtent,\n    resolution,\n    pixelRatio,\n    overlaps,\n    declutterTree,\n    opt_renderBuffer\n  ) {\n    ReplayGroup.call(this);\n\n    /**\n     * Declutter tree.\n     * @private\n     */\n    this.declutterTree_ = declutterTree;\n\n    /**\n     * @type {import(\"../canvas.js\").DeclutterGroup}\n     * @private\n     */\n    this.declutterGroup_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tolerance_ = tolerance;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overlaps_ = overlaps;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.renderBuffer_ = opt_renderBuffer;\n\n    /**\n     * @private\n     * @type {!Object<string, !Object<ReplayType, CanvasReplay>>}\n     */\n    this.replaysByZIndex_ = {};\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.hitDetectionContext_ = createCanvasContext2D(1, 1);\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.hitDetectionTransform_ = createTransform();\n  }\n\n  if ( ReplayGroup ) CanvasReplayGroup.__proto__ = ReplayGroup;\n  CanvasReplayGroup.prototype = Object.create( ReplayGroup && ReplayGroup.prototype );\n  CanvasReplayGroup.prototype.constructor = CanvasReplayGroup;\n\n  /**\n   * @inheritDoc\n   */\n  CanvasReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n    var declutter = null;\n    if (this.declutterTree_) {\n      if (group) {\n        declutter = this.declutterGroup_;\n        /** @type {number} */ (declutter[4])++;\n      } else {\n        declutter = this.declutterGroup_ = createEmpty();\n        declutter.push(1);\n      }\n    }\n    return declutter;\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   */\n  CanvasReplayGroup.prototype.clip = function clip (context, transform) {\n    var flatClipCoords = this.getClipCoords(transform);\n    context.beginPath();\n    context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n    context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n    context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n    context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n    context.clip();\n  };\n\n  /**\n   * @param {Array<ReplayType>} replays Replays.\n   * @return {boolean} Has replays of the provided types.\n   */\n  CanvasReplayGroup.prototype.hasReplays = function hasReplays (replays) {\n    for (var zIndex in this.replaysByZIndex_) {\n      var candidates = this.replaysByZIndex_[zIndex];\n      for (var i = 0, ii = replays.length; i < ii; ++i) {\n        if (replays[i] in candidates) {\n          return true;\n        }\n      }\n    }\n    return false;\n  };\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  CanvasReplayGroup.prototype.finish = function finish () {\n    for (var zKey in this.replaysByZIndex_) {\n      var replays = this.replaysByZIndex_[zKey];\n      for (var replayKey in replays) {\n        replays[replayKey].finish();\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T} callback Feature callback.\n   * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>} declutterReplays Declutter replays.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n    coordinate,\n    resolution,\n    rotation,\n    hitTolerance,\n    skippedFeaturesHash,\n    callback,\n    declutterReplays\n  ) {\n\n    hitTolerance = Math.round(hitTolerance);\n    var contextSize = hitTolerance * 2 + 1;\n    var transform = composeTransform(this.hitDetectionTransform_,\n      hitTolerance + 0.5, hitTolerance + 0.5,\n      1 / resolution, -1 / resolution,\n      -rotation,\n      -coordinate[0], -coordinate[1]);\n    var context = this.hitDetectionContext_;\n\n    if (context.canvas.width !== contextSize || context.canvas.height !== contextSize) {\n      context.canvas.width = contextSize;\n      context.canvas.height = contextSize;\n    } else {\n      context.clearRect(0, 0, contextSize, contextSize);\n    }\n\n    /**\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    var hitExtent;\n    if (this.renderBuffer_ !== undefined) {\n      hitExtent = createEmpty();\n      extendCoordinate(hitExtent, coordinate);\n      buffer(hitExtent, resolution * (this.renderBuffer_ + hitTolerance), hitExtent);\n    }\n\n    var mask = getCircleArray(hitTolerance);\n    var declutteredFeatures;\n    if (this.declutterTree_) {\n      declutteredFeatures = this.declutterTree_.all().map(function(entry) {\n        return entry.value;\n      });\n    }\n\n    var replayType;\n\n    /**\n     * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n     * @return {?} Callback result.\n     */\n    function featureCallback(feature) {\n      var imageData = context.getImageData(0, 0, contextSize, contextSize).data;\n      for (var i = 0; i < contextSize; i++) {\n        for (var j = 0; j < contextSize; j++) {\n          if (mask[i][j]) {\n            if (imageData[(j * contextSize + i) * 4 + 3] > 0) {\n              var result = (void 0);\n              if (!(declutteredFeatures && (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) ||\n                  declutteredFeatures.indexOf(feature) !== -1) {\n                result = callback(feature);\n              }\n              if (result) {\n                return result;\n              } else {\n                context.clearRect(0, 0, contextSize, contextSize);\n                return undefined;\n              }\n            }\n          }\n        }\n      }\n    }\n\n    /** @type {Array<number>} */\n    var zs = Object.keys(this.replaysByZIndex_).map(Number);\n    zs.sort(numberSafeCompareFunction);\n\n    var i, j, replays, replay, result;\n    for (i = zs.length - 1; i >= 0; --i) {\n      var zIndexKey = zs[i].toString();\n      replays = this.replaysByZIndex_[zIndexKey];\n      for (j = ORDER.length - 1; j >= 0; --j) {\n        replayType = ORDER[j];\n        replay = replays[replayType];\n        if (replay !== undefined) {\n          if (declutterReplays &&\n              (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n            var declutter = declutterReplays[zIndexKey];\n            if (!declutter) {\n              declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n            } else {\n              declutter.push(replay, transform.slice(0));\n            }\n          } else {\n            result = replay.replayHitDetection(context, transform, rotation,\n              skippedFeaturesHash, featureCallback, hitExtent);\n            if (result) {\n              return result;\n            }\n          }\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @return {Array<number>} Clip coordinates.\n   */\n  CanvasReplayGroup.prototype.getClipCoords = function getClipCoords (transform) {\n    var maxExtent = this.maxExtent_;\n    var minX = maxExtent[0];\n    var minY = maxExtent[1];\n    var maxX = maxExtent[2];\n    var maxY = maxExtent[3];\n    var flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n    transform2D(\n      flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n    return flatClipCoords;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n    var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n    var replays = this.replaysByZIndex_[zIndexKey];\n    if (replays === undefined) {\n      replays = {};\n      this.replaysByZIndex_[zIndexKey] = replays;\n    }\n    var replay = replays[replayType];\n    if (replay === undefined) {\n      var Constructor = BATCH_CONSTRUCTORS[replayType];\n      replay = new Constructor(this.tolerance_, this.maxExtent_,\n        this.resolution_, this.pixelRatio_, this.overlaps_, this.declutterTree_);\n      replays[replayType] = replay;\n    }\n    return replay;\n  };\n\n  /**\n   * @return {Object<string, Object<ReplayType, CanvasReplay>>} Replays.\n   */\n  CanvasReplayGroup.prototype.getReplays = function getReplays () {\n    return this.replaysByZIndex_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasReplayGroup.prototype.isEmpty = function isEmpty$1 () {\n    return isEmpty(this.replaysByZIndex_);\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../transform.js\").Transform} transform Transform.\n   * @param {number} viewRotation View rotation.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n   * @param {Array<ReplayType>=} opt_replayTypes Ordered replay types to replay.\n   *     Default is {@link module:ol/render/replay~ORDER}\n   * @param {Object<string, import(\"../canvas.js\").DeclutterGroup>=} opt_declutterReplays Declutter replays.\n   */\n  CanvasReplayGroup.prototype.replay = function replay (\n    context,\n    transform,\n    viewRotation,\n    skippedFeaturesHash,\n    snapToPixel,\n    opt_replayTypes,\n    opt_declutterReplays\n  ) {\n\n    /** @type {Array<number>} */\n    var zs = Object.keys(this.replaysByZIndex_).map(Number);\n    zs.sort(numberSafeCompareFunction);\n\n    // setup clipping so that the parts of over-simplified geometries are not\n    // visible outside the current extent when panning\n    context.save();\n    this.clip(context, transform);\n\n    var replayTypes = opt_replayTypes ? opt_replayTypes : ORDER;\n    var i, ii, j, jj, replays, replay;\n    for (i = 0, ii = zs.length; i < ii; ++i) {\n      var zIndexKey = zs[i].toString();\n      replays = this.replaysByZIndex_[zIndexKey];\n      for (j = 0, jj = replayTypes.length; j < jj; ++j) {\n        var replayType = replayTypes[j];\n        replay = replays[replayType];\n        if (replay !== undefined) {\n          if (opt_declutterReplays &&\n              (replayType == ReplayType.IMAGE || replayType == ReplayType.TEXT)) {\n            var declutter = opt_declutterReplays[zIndexKey];\n            if (!declutter) {\n              opt_declutterReplays[zIndexKey] = [replay, transform.slice(0)];\n            } else {\n              declutter.push(replay, transform.slice(0));\n            }\n          } else {\n            replay.replay(context, transform, viewRotation, skippedFeaturesHash, snapToPixel);\n          }\n        }\n      }\n    }\n\n    context.restore();\n  };\n\n  return CanvasReplayGroup;\n}(ReplayGroup));\n\n\n/**\n * This cache is used for storing calculated pixel circles for increasing performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<Array<(boolean|undefined)>>>}\n */\nvar circleArrayCache = {\n  0: [[true]]\n};\n\n\n/**\n * This method fills a row in the array from the given coordinate to the\n * middle with `true`.\n * @param {Array<Array<(boolean|undefined)>>} array The array that will be altered.\n * @param {number} x X coordinate.\n * @param {number} y Y coordinate.\n */\nfunction fillCircleArrayRowToMiddle(array, x, y) {\n  var i;\n  var radius = Math.floor(array.length / 2);\n  if (x >= radius) {\n    for (i = radius; i < x; i++) {\n      array[i][y] = true;\n    }\n  } else if (x < radius) {\n    for (i = x + 1; i < radius; i++) {\n      array[i][y] = true;\n    }\n  }\n}\n\n\n/**\n * This methods creates a circle inside a fitting array. Points inside the\n * circle are marked by true, points on the outside are undefined.\n * It uses the midpoint circle algorithm.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @returns {Array<Array<(boolean|undefined)>>} An array with marked circle points.\n */\nexport function getCircleArray(radius) {\n  if (circleArrayCache[radius] !== undefined) {\n    return circleArrayCache[radius];\n  }\n\n  var arraySize = radius * 2 + 1;\n  var arr = new Array(arraySize);\n  for (var i = 0; i < arraySize; i++) {\n    arr[i] = new Array(arraySize);\n  }\n\n  var x = radius;\n  var y = 0;\n  var error = 0;\n\n  while (x >= y) {\n    fillCircleArrayRowToMiddle(arr, radius + x, radius + y);\n    fillCircleArrayRowToMiddle(arr, radius + y, radius + x);\n    fillCircleArrayRowToMiddle(arr, radius - y, radius + x);\n    fillCircleArrayRowToMiddle(arr, radius - x, radius + y);\n    fillCircleArrayRowToMiddle(arr, radius - x, radius - y);\n    fillCircleArrayRowToMiddle(arr, radius - y, radius - x);\n    fillCircleArrayRowToMiddle(arr, radius + y, radius - x);\n    fillCircleArrayRowToMiddle(arr, radius + x, radius - y);\n\n    y++;\n    error += 1 + 2 * y;\n    if (2 * (error - x) + 1 > 0) {\n      x -= 1;\n      error += 1 - 2 * x;\n    }\n  }\n\n  circleArrayCache[radius] = arr;\n  return arr;\n}\n\n\n/**\n * @param {!Object<string, Array<*>>} declutterReplays Declutter replays.\n * @param {CanvasRenderingContext2D} context Context.\n * @param {number} rotation Rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n */\nexport function replayDeclutter(declutterReplays, context, rotation, snapToPixel) {\n  var zs = Object.keys(declutterReplays).map(Number).sort(numberSafeCompareFunction);\n  var skippedFeatureUids = {};\n  for (var z = 0, zz = zs.length; z < zz; ++z) {\n    var replayData = declutterReplays[zs[z].toString()];\n    for (var i = 0, ii = replayData.length; i < ii;) {\n      var replay = replayData[i++];\n      var transform = replayData[i++];\n      replay.replay(context, transform, rotation, skippedFeatureUids, snapToPixel);\n    }\n  }\n}\n\n\nexport default CanvasReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/renderer/vector\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport ReplayType from '../render/ReplayType.js';\n\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default,\n *                function(import(\"../render/ReplayGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../style/Style.js\").default, Object)>}\n */\nvar GEOMETRY_RENDERERS = {\n  'Point': renderPointGeometry,\n  'LineString': renderLineStringGeometry,\n  'Polygon': renderPolygonGeometry,\n  'MultiPoint': renderMultiPointGeometry,\n  'MultiLineString': renderMultiLineStringGeometry,\n  'MultiPolygon': renderMultiPolygonGeometry,\n  'GeometryCollection': renderGeometryCollectionGeometry,\n  'Circle': renderCircleGeometry\n};\n\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n  return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n  var tolerance = getTolerance(resolution, pixelRatio);\n  return tolerance * tolerance;\n}\n\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n  return SIMPLIFY_TOLERANCE * resolution / pixelRatio;\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderCircleGeometry(replayGroup, geometry, style, feature) {\n  var fillStyle = style.getFill();\n  var strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    var circleReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.CIRCLE);\n    circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    circleReplay.drawCircle(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @return {boolean} `true` if style is loading.\n * @template T\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, thisArg) {\n  var loading = false;\n  var imageStyle = style.getImage();\n  if (imageStyle) {\n    var imageState = imageStyle.getImageState();\n    if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n      imageStyle.unlistenImageChange(listener, thisArg);\n    } else {\n      if (imageState == ImageState.IDLE) {\n        imageStyle.load();\n      }\n      imageState = imageStyle.getImageState();\n      imageStyle.listenImageChange(listener, thisArg);\n      loading = true;\n    }\n  }\n  renderFeatureInternal(replayGroup, feature, style, squaredTolerance);\n\n  return loading;\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {\n  var geometry = style.getGeometryFunction()(feature);\n  if (!geometry) {\n    return;\n  }\n  var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n  var renderer = style.getRenderer();\n  if (renderer) {\n    renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n  } else {\n    var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n    geometryRenderer(replayGroup, simplifiedGeometry, style, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n  if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n    var geometries = /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      renderGeometry(replayGroup, geometries[i], style, feature);\n    }\n    return;\n  }\n  var replay = replayGroup.getReplay(style.getZIndex(), ReplayType.DEFAULT);\n  replay.drawCustom(/** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer());\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature) {\n  var geometries = geometry.getGeometriesArray();\n  var i, ii;\n  for (i = 0, ii = geometries.length; i < ii; ++i) {\n    var geometryRenderer =\n        GEOMETRY_RENDERERS[geometries[i].getType()];\n    geometryRenderer(replayGroup, geometries[i], style, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderLineStringGeometry(replayGroup, geometry, style, feature) {\n  var strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n    lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n    lineStringReplay.drawLineString(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {\n  var strokeStyle = style.getStroke();\n  if (strokeStyle) {\n    var lineStringReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.LINE_STRING);\n    lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n    lineStringReplay.drawMultiLineString(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n */\nfunction renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {\n  var fillStyle = style.getFill();\n  var strokeStyle = style.getStroke();\n  if (strokeStyle || fillStyle) {\n    var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawMultiPolygon(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPointGeometry(replayGroup, geometry, style, feature) {\n  var imageStyle = style.getImage();\n  if (imageStyle) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n    }\n    var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n    imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n    imageReplay.drawPoint(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderMultiPointGeometry(replayGroup, geometry, style, feature) {\n  var imageStyle = style.getImage();\n  if (imageStyle) {\n    if (imageStyle.getImageState() != ImageState.LOADED) {\n      return;\n    }\n    var imageReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.IMAGE);\n    imageReplay.setImageStyle(imageStyle, replayGroup.addDeclutter(false));\n    imageReplay.drawMultiPoint(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(!!imageStyle));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n\n/**\n * @param {import(\"../render/ReplayGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderPolygonGeometry(replayGroup, geometry, style, feature) {\n  var fillStyle = style.getFill();\n  var strokeStyle = style.getStroke();\n  if (fillStyle || strokeStyle) {\n    var polygonReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.POLYGON);\n    polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n    polygonReplay.drawPolygon(geometry, feature);\n  }\n  var textStyle = style.getText();\n  if (textStyle) {\n    var textReplay = replayGroup.getReplay(style.getZIndex(), ReplayType.TEXT);\n    textReplay.setTextStyle(textStyle, replayGroup.addDeclutter(false));\n    textReplay.drawText(geometry, feature);\n  }\n}\n\n//# sourceMappingURL=vector.js.map","/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, createEmpty, containsExtent, getWidth} from '../../extent.js';\nimport RenderEventType from '../../render/EventType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup from '../../render/canvas/ReplayGroup.js';\nimport CanvasLayerRenderer from './Layer.js';\nimport {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /*@__PURE__*/(function (CanvasLayerRenderer) {\n  function CanvasVectorLayerRenderer(vectorLayer) {\n\n    CanvasLayerRenderer.call(this, vectorLayer);\n\n    /**\n     * Declutter tree.\n     * @private\n     */\n    this.declutterTree_ = vectorLayer.getDeclutter() ? rbush(9, undefined) : null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.dirty_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedResolution_ = NaN;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n     */\n    this.renderedRenderOrder_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../render/canvas/ReplayGroup.js\").default}\n     */\n    this.replayGroup_ = null;\n\n    /**\n     * A new replay group had to be created by `prepareFrame()`\n     * @type {boolean}\n     */\n    this.replayGroupChanged = true;\n\n    /**\n     * @type {CanvasRenderingContext2D}\n     */\n    this.context = createCanvasContext2D();\n\n    listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n  }\n\n  if ( CanvasLayerRenderer ) CanvasVectorLayerRenderer.__proto__ = CanvasLayerRenderer;\n  CanvasVectorLayerRenderer.prototype = Object.create( CanvasLayerRenderer && CanvasLayerRenderer.prototype );\n  CanvasVectorLayerRenderer.prototype.constructor = CanvasVectorLayerRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n    unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n    CanvasLayerRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @param {CanvasRenderingContext2D} context Context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   */\n  CanvasVectorLayerRenderer.prototype.compose = function compose (context, frameState, layerState) {\n    var extent = frameState.extent;\n    var pixelRatio = frameState.pixelRatio;\n    var skippedFeatureUids = layerState.managed ?\n      frameState.skippedFeatureUids : {};\n    var viewState = frameState.viewState;\n    var projection = viewState.projection;\n    var rotation = viewState.rotation;\n    var projectionExtent = projection.getExtent();\n    var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (this.getLayer().getSource());\n\n    var transform = this.getTransform(frameState, 0);\n\n    // clipped rendering if layer extent is set\n    var clipExtent = layerState.extent;\n    var clipped = clipExtent !== undefined;\n    if (clipped) {\n      this.clip(context, frameState, /** @type {import(\"../../extent.js\").Extent} */ (clipExtent));\n    }\n    var replayGroup = this.replayGroup_;\n    if (replayGroup && !replayGroup.isEmpty()) {\n      if (this.declutterTree_) {\n        this.declutterTree_.clear();\n      }\n      var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n      var drawOffsetX = 0;\n      var drawOffsetY = 0;\n      var replayContext;\n      var transparentLayer = layerState.opacity !== 1;\n      var hasRenderListeners = layer.hasListener(RenderEventType.RENDER);\n      if (transparentLayer || hasRenderListeners) {\n        var drawWidth = context.canvas.width;\n        var drawHeight = context.canvas.height;\n        if (rotation) {\n          var drawSize = Math.round(Math.sqrt(drawWidth * drawWidth + drawHeight * drawHeight));\n          drawOffsetX = (drawSize - drawWidth) / 2;\n          drawOffsetY = (drawSize - drawHeight) / 2;\n          drawWidth = drawHeight = drawSize;\n        }\n        // resize and clear\n        this.context.canvas.width = drawWidth;\n        this.context.canvas.height = drawHeight;\n        replayContext = this.context;\n      } else {\n        replayContext = context;\n      }\n\n      var alpha = replayContext.globalAlpha;\n      if (!transparentLayer) {\n        // for performance reasons, context.save / context.restore is not used\n        // to save and restore the transformation matrix and the opacity.\n        // see http://jsperf.com/context-save-restore-versus-variable\n        replayContext.globalAlpha = layerState.opacity;\n      }\n\n      if (replayContext != context) {\n        replayContext.translate(drawOffsetX, drawOffsetY);\n      }\n\n      var viewHints = frameState.viewHints;\n      var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n      var width = frameState.size[0] * pixelRatio;\n      var height = frameState.size[1] * pixelRatio;\n      rotateAtOffset(replayContext, -rotation,\n        width / 2, height / 2);\n      replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n      if (vectorSource.getWrapX() && projection.canWrapX() &&\n          !containsExtent(projectionExtent, extent)) {\n        var startX = extent[0];\n        var worldWidth = getWidth(projectionExtent);\n        var world = 0;\n        var offsetX;\n        while (startX < projectionExtent[0]) {\n          --world;\n          offsetX = worldWidth * world;\n          transform = this.getTransform(frameState, offsetX);\n          replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n          startX += worldWidth;\n        }\n        world = 0;\n        startX = extent[2];\n        while (startX > projectionExtent[2]) {\n          ++world;\n          offsetX = worldWidth * world;\n          transform = this.getTransform(frameState, offsetX);\n          replayGroup.replay(replayContext, transform, rotation, skippedFeatureUids, snapToPixel);\n          startX -= worldWidth;\n        }\n      }\n      rotateAtOffset(replayContext, rotation,\n        width / 2, height / 2);\n\n      if (hasRenderListeners) {\n        this.dispatchRenderEvent(replayContext, frameState, transform);\n      }\n      if (replayContext != context) {\n        if (transparentLayer) {\n          var mainContextAlpha = context.globalAlpha;\n          context.globalAlpha = layerState.opacity;\n          context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n          context.globalAlpha = mainContextAlpha;\n        } else {\n          context.drawImage(replayContext.canvas, -drawOffsetX, -drawOffsetY);\n        }\n        replayContext.translate(-drawOffsetX, -drawOffsetY);\n      }\n\n      if (!transparentLayer) {\n        replayContext.globalAlpha = alpha;\n      }\n    }\n\n    if (clipped) {\n      context.restore();\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n    var transform = this.getTransform(frameState, 0);\n    this.preCompose(context, frameState, transform);\n    this.compose(context, frameState, layerState);\n    this.postCompose(context, frameState, layerState, transform);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n    if (!this.replayGroup_) {\n      return undefined;\n    } else {\n      var resolution = frameState.viewState.resolution;\n      var rotation = frameState.viewState.rotation;\n      var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n      /** @type {!Object<string, boolean>} */\n      var features = {};\n      var result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @return {?} Callback result.\n         */\n        function(feature) {\n          var key = getUid(feature);\n          if (!(key in features)) {\n            features[key] = true;\n            return callback.call(thisArg, feature, layer);\n          }\n        }, null);\n      return result;\n    }\n  };\n\n  /**\n   * @param {import(\"../../events/Event.js\").default} event Event.\n   */\n  CanvasVectorLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n    var layer = this.getLayer();\n    if (layer.getVisible() && this.replayGroup_) {\n      layer.changed();\n    }\n  };\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n    this.renderIfReadyAndVisible();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n    var vectorLayer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (vectorLayer.getSource());\n\n    var animating = frameState.viewHints[ViewHint.ANIMATING];\n    var interacting = frameState.viewHints[ViewHint.INTERACTING];\n    var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n    var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n    if (!this.dirty_ && (!updateWhileAnimating && animating) ||\n        (!updateWhileInteracting && interacting)) {\n      return true;\n    }\n\n    var frameStateExtent = frameState.extent;\n    var viewState = frameState.viewState;\n    var projection = viewState.projection;\n    var resolution = viewState.resolution;\n    var pixelRatio = frameState.pixelRatio;\n    var vectorLayerRevision = vectorLayer.getRevision();\n    var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n    var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n    if (vectorLayerRenderOrder === undefined) {\n      vectorLayerRenderOrder = defaultRenderOrder;\n    }\n\n    var extent = buffer(frameStateExtent,\n      vectorLayerRenderBuffer * resolution);\n    var projectionExtent = viewState.projection.getExtent();\n\n    if (vectorSource.getWrapX() && viewState.projection.canWrapX() &&\n        !containsExtent(projectionExtent, frameState.extent)) {\n      // For the replay group, we need an extent that intersects the real world\n      // (-180° to +180°). To support geometries in a coordinate range from -540°\n      // to +540°, we add at least 1 world width on each side of the projection\n      // extent. If the viewport is wider than the world, we need to add half of\n      // the viewport width to make sure we cover the whole viewport.\n      var worldWidth = getWidth(projectionExtent);\n      var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n      extent[0] = projectionExtent[0] - gutter;\n      extent[2] = projectionExtent[2] + gutter;\n    }\n\n    if (!this.dirty_ &&\n        this.renderedResolution_ == resolution &&\n        this.renderedRevision_ == vectorLayerRevision &&\n        this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n        containsExtent(this.renderedExtent_, extent)) {\n      this.replayGroupChanged = false;\n      return true;\n    }\n\n    this.replayGroup_ = null;\n\n    this.dirty_ = false;\n\n    var replayGroup = new CanvasReplayGroup(\n      getRenderTolerance(resolution, pixelRatio), extent, resolution,\n      pixelRatio, vectorSource.getOverlaps(), this.declutterTree_, vectorLayer.getRenderBuffer());\n    vectorSource.loadFeatures(extent, resolution, projection);\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @this {CanvasVectorLayerRenderer}\n     */\n    var render = function(feature) {\n      var styles;\n      var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n      if (styleFunction) {\n        styles = styleFunction(feature, resolution);\n      }\n      if (styles) {\n        var dirty = this.renderFeature(\n          feature, resolution, pixelRatio, styles, replayGroup);\n        this.dirty_ = this.dirty_ || dirty;\n      }\n    }.bind(this);\n    if (vectorLayerRenderOrder) {\n      /** @type {Array<import(\"../../Feature.js\").default>} */\n      var features = [];\n      vectorSource.forEachFeatureInExtent(extent,\n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         */\n        function(feature) {\n          features.push(feature);\n        });\n      features.sort(vectorLayerRenderOrder);\n      for (var i = 0, ii = features.length; i < ii; ++i) {\n        render(features[i]);\n      }\n    } else {\n      vectorSource.forEachFeatureInExtent(extent, render);\n    }\n    replayGroup.finish();\n\n    this.renderedResolution_ = resolution;\n    this.renderedRevision_ = vectorLayerRevision;\n    this.renderedRenderOrder_ = vectorLayerRenderOrder;\n    this.renderedExtent_ = extent;\n    this.replayGroup_ = replayGroup;\n\n    this.replayGroupChanged = true;\n    return true;\n  };\n\n  /**\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n   * @param {import(\"../../render/canvas/ReplayGroup.js\").default} replayGroup Replay group.\n   * @return {boolean} `true` if an image is loading.\n   */\n  CanvasVectorLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, resolution, pixelRatio, styles, replayGroup) {\n    if (!styles) {\n      return false;\n    }\n    var loading = false;\n    if (Array.isArray(styles)) {\n      for (var i = 0, ii = styles.length; i < ii; ++i) {\n        loading = renderFeature(\n          replayGroup, feature, styles[i],\n          getSquaredRenderTolerance(resolution, pixelRatio),\n          this.handleStyleImageChange_, this) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        replayGroup, feature, styles,\n        getSquaredRenderTolerance(resolution, pixelRatio),\n        this.handleStyleImageChange_, this);\n    }\n    return loading;\n  };\n\n  return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.VECTOR;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorLayerRenderer} The layer renderer.\n */\nCanvasVectorLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new CanvasVectorLayerRenderer(/** @type {import(\"../../layer/Vector.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorLayerRenderer;\n\n//# sourceMappingURL=VectorLayer.js.map","/**\n * @module ol/layer/VectorTileRenderType\n */\n\n/**\n * @enum {string}\n * Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but\n *    point symbols and texts are always rotated with the view and pixels are\n *    scaled during zoom animations.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels\n *    are scaled during zoom animations. Point symbols and texts are accurately\n *    rendered as vectors and can stay upright on rotated views.\n *  * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering\n *    even during animations, but slower performance than the other options.\n * @api\n */\nexport default {\n  IMAGE: 'image',\n  HYBRID: 'hybrid',\n  VECTOR: 'vector'\n};\n\n//# sourceMappingURL=VectorTileRenderType.js.map","/**\n * @module ol/renderer/canvas/VectorTileLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport TileState from '../../TileState.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen, unlisten} from '../../events.js';\nimport EventType from '../../events/EventType.js';\nimport rbush from 'rbush';\nimport {buffer, containsCoordinate, equals, getIntersection, getTopLeft, intersects} from '../../extent.js';\nimport VectorTileRenderType from '../../layer/VectorTileRenderType.js';\nimport {equivalent as equivalentProjection} from '../../proj.js';\nimport Units from '../../proj/Units.js';\nimport ReplayType from '../../render/ReplayType.js';\nimport {labelCache, rotateAtOffset} from '../../render/canvas.js';\nimport CanvasReplayGroup, {replayDeclutter} from '../../render/canvas/ReplayGroup.js';\nimport {ORDER} from '../../render/replay.js';\nimport CanvasTileLayerRenderer from './TileLayer.js';\nimport {getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\nimport {\n  create as createTransform,\n  compose as composeTransform,\n  reset as resetTransform,\n  scale as scaleTransform,\n  translate as translateTransform\n} from '../../transform.js';\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar IMAGE_REPLAYS = {\n  'image': [ReplayType.POLYGON, ReplayType.CIRCLE,\n    ReplayType.LINE_STRING, ReplayType.IMAGE, ReplayType.TEXT],\n  'hybrid': [ReplayType.POLYGON, ReplayType.LINE_STRING]\n};\n\n\n/**\n * @type {!Object<string, Array<import(\"../../render/ReplayType.js\").default>>}\n */\nvar VECTOR_REPLAYS = {\n  'image': [ReplayType.DEFAULT],\n  'hybrid': [ReplayType.IMAGE, ReplayType.TEXT, ReplayType.DEFAULT],\n  'vector': ORDER\n};\n\n\n/**\n * @classdesc\n * Canvas renderer for vector tile layers.\n * @api\n */\nvar CanvasVectorTileLayerRenderer = /*@__PURE__*/(function (CanvasTileLayerRenderer) {\n  function CanvasVectorTileLayerRenderer(layer) {\n\n    CanvasTileLayerRenderer.call(this, layer, true);\n\n    /**\n     * Declutter tree.\n     * @private\n     */\n    this.declutterTree_ = layer.getDeclutter() ? rbush(9, undefined) : null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.dirty_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedLayerRevision_;\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.tmpTransform_ = createTransform();\n\n    var renderMode = layer.getRenderMode();\n\n    // Use lower resolution for pure vector rendering. Closest resolution otherwise.\n    this.zDirection = renderMode === VectorTileRenderType.VECTOR ? 1 : 0;\n\n    if (renderMode !== VectorTileRenderType.VECTOR) {\n      this.context = createCanvasContext2D();\n    }\n\n\n    listen(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n\n  }\n\n  if ( CanvasTileLayerRenderer ) CanvasVectorTileLayerRenderer.__proto__ = CanvasTileLayerRenderer;\n  CanvasVectorTileLayerRenderer.prototype = Object.create( CanvasTileLayerRenderer && CanvasTileLayerRenderer.prototype );\n  CanvasVectorTileLayerRenderer.prototype.constructor = CanvasVectorTileLayerRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n    unlisten(labelCache, EventType.CLEAR, this.handleFontsChanged_, this);\n    CanvasTileLayerRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    var tile = CanvasTileLayerRenderer.prototype.getTile.call(this, z, x, y, pixelRatio, projection);\n    if (tile.getState() === TileState.LOADED) {\n      this.createReplayGroup_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n      if (this.context) {\n        this.renderTileImage_(/** @type {import(\"../../VectorImageTile.js\").default} */ (tile), pixelRatio, projection);\n      }\n    }\n    return tile;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.getTileImage = function getTileImage (tile) {\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    return /** @type {import(\"../../VectorImageTile.js\").default} */ (tile).getImage(tileLayer);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState) {\n    var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var layerRevision = layer.getRevision();\n    if (this.renderedLayerRevision_ != layerRevision) {\n      this.renderedTiles.length = 0;\n    }\n    this.renderedLayerRevision_ = layerRevision;\n    return CanvasTileLayerRenderer.prototype.prepareFrame.call(this, frameState, layerState);\n  };\n\n  /**\n   * @param {import(\"../../VectorImageTile.js\").default} tile Tile.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @private\n   */\n  CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function createReplayGroup_ (tile, pixelRatio, projection) {\n    var this$1 = this;\n\n    var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var revision = layer.getRevision();\n    var renderOrder = /** @type {import(\"../../render.js\").OrderFunction} */ (layer.getRenderOrder()) || null;\n\n    var replayState = tile.getReplayState(layer);\n    if (!replayState.dirty && replayState.renderedRevision == revision &&\n        replayState.renderedRenderOrder == renderOrder) {\n      return;\n    }\n\n    var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n    var sourceTileGrid = source.getTileGrid();\n    var tileGrid = source.getTileGridForProjection(projection);\n    var resolution = tileGrid.getResolution(tile.tileCoord[0]);\n    var tileExtent = tile.extent;\n\n    var loop = function ( t, tt ) {\n      var sourceTile = tile.getTile(tile.tileKeys[t]);\n      if (sourceTile.getState() != TileState.LOADED) {\n        return;\n      }\n\n      var sourceTileCoord = sourceTile.tileCoord;\n      var sourceTileExtent = sourceTileGrid.getTileCoordExtent(sourceTileCoord);\n      var sharedExtent = getIntersection(tileExtent, sourceTileExtent);\n      var bufferedExtent = equals(sourceTileExtent, sharedExtent) ? null :\n        buffer(sharedExtent, layer.getRenderBuffer() * resolution, this$1.tmpExtent);\n      var tileProjection = sourceTile.getProjection();\n      var reproject = false;\n      if (!equivalentProjection(projection, tileProjection)) {\n        reproject = true;\n        sourceTile.setProjection(projection);\n      }\n      replayState.dirty = false;\n      var replayGroup = new CanvasReplayGroup(0, sharedExtent, resolution,\n        pixelRatio, source.getOverlaps(), this$1.declutterTree_, layer.getRenderBuffer());\n      var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n\n      /**\n       * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n       * @this {CanvasVectorTileLayerRenderer}\n       */\n      var render = function(feature) {\n        var styles;\n        var styleFunction = feature.getStyleFunction() || layer.getStyleFunction();\n        if (styleFunction) {\n          styles = styleFunction(feature, resolution);\n        }\n        if (styles) {\n          var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup);\n          this.dirty_ = this.dirty_ || dirty;\n          replayState.dirty = replayState.dirty || dirty;\n        }\n      };\n\n      var features = sourceTile.getFeatures();\n      if (renderOrder && renderOrder !== replayState.renderedRenderOrder) {\n        features.sort(renderOrder);\n      }\n      for (var i = 0, ii = features.length; i < ii; ++i) {\n        var feature = features[i];\n        if (reproject) {\n          if (tileProjection.getUnits() == Units.TILE_PIXELS) {\n            // projected tile extent\n            tileProjection.setWorldExtent(sourceTileExtent);\n            // tile extent in tile pixel space\n            tileProjection.setExtent(sourceTile.getExtent());\n          }\n          feature.getGeometry().transform(tileProjection, projection);\n        }\n        if (!bufferedExtent || intersects(bufferedExtent, feature.getGeometry().getExtent())) {\n          render.call(this$1, feature);\n        }\n      }\n      replayGroup.finish();\n      sourceTile.setReplayGroup(layer, tile.tileCoord.toString(), replayGroup);\n    };\n\n    for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) loop( t, tt );\n    replayState.renderedRevision = revision;\n    replayState.renderedRenderOrder = renderOrder;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n    var resolution = frameState.viewState.resolution;\n    var rotation = frameState.viewState.rotation;\n    hitTolerance = hitTolerance == undefined ? 0 : hitTolerance;\n    var layer = this.getLayer();\n    /** @type {!Object<string, boolean>} */\n    var features = {};\n\n    var renderedTiles = /** @type {Array<import(\"../../VectorImageTile.js\").default>} */ (this.renderedTiles);\n\n    var bufferedExtent, found;\n    var i, ii;\n    for (i = 0, ii = renderedTiles.length; i < ii; ++i) {\n      var tile = renderedTiles[i];\n      bufferedExtent = buffer(tile.extent, hitTolerance * resolution, bufferedExtent);\n      if (!containsCoordinate(bufferedExtent, coordinate)) {\n        continue;\n      }\n      for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n        var sourceTile = tile.getTile(tile.tileKeys[t]);\n        if (sourceTile.getState() != TileState.LOADED) {\n          continue;\n        }\n        var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n          tile.tileCoord.toString()));\n        found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},\n          /**\n           * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n           * @return {?} Callback result.\n           */\n          function(feature) {\n            var key = getUid(feature);\n            if (!(key in features)) {\n              features[key] = true;\n              return callback.call(thisArg, feature, layer);\n            }\n          }, null);\n      }\n    }\n    return found;\n  };\n\n  /**\n   * @param {import(\"../../VectorTile.js\").default} tile Tile.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @return {import(\"../../transform.js\").Transform} transform Transform.\n   * @private\n   */\n  CanvasVectorTileLayerRenderer.prototype.getReplayTransform_ = function getReplayTransform_ (tile, frameState) {\n    var layer = this.getLayer();\n    var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n    var tileGrid = source.getTileGrid();\n    var tileCoord = tile.tileCoord;\n    var tileResolution = tileGrid.getResolution(tileCoord[0]);\n    var viewState = frameState.viewState;\n    var pixelRatio = frameState.pixelRatio;\n    var renderResolution = viewState.resolution / pixelRatio;\n    var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n    var center = viewState.center;\n    var origin = getTopLeft(tileExtent);\n    var size = frameState.size;\n    var offsetX = Math.round(pixelRatio * size[0] / 2);\n    var offsetY = Math.round(pixelRatio * size[1] / 2);\n    return composeTransform(this.tmpTransform_,\n      offsetX, offsetY,\n      tileResolution / renderResolution, tileResolution / renderResolution,\n      viewState.rotation,\n      (origin[0] - center[0]) / tileResolution,\n      (center[1] - origin[1]) / tileResolution);\n  };\n\n  /**\n   * @param {import(\"../../events/Event.js\").default} event Event.\n   */\n  CanvasVectorTileLayerRenderer.prototype.handleFontsChanged_ = function handleFontsChanged_ (event) {\n    var layer = this.getLayer();\n    if (layer.getVisible() && this.renderedLayerRevision_ !== undefined) {\n      layer.changed();\n    }\n  };\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  CanvasVectorTileLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n    this.renderIfReadyAndVisible();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  CanvasVectorTileLayerRenderer.prototype.postCompose = function postCompose (context, frameState, layerState) {\n    var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var renderMode = layer.getRenderMode();\n    if (renderMode != VectorTileRenderType.IMAGE) {\n      var declutterReplays = layer.getDeclutter() ? {} : null;\n      var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n      var replayTypes = VECTOR_REPLAYS[renderMode];\n      var pixelRatio = frameState.pixelRatio;\n      var rotation = frameState.viewState.rotation;\n      var size = frameState.size;\n      var offsetX, offsetY;\n      if (rotation) {\n        offsetX = Math.round(pixelRatio * size[0] / 2);\n        offsetY = Math.round(pixelRatio * size[1] / 2);\n        rotateAtOffset(context, -rotation, offsetX, offsetY);\n      }\n      if (declutterReplays) {\n        this.declutterTree_.clear();\n      }\n      var viewHints = frameState.viewHints;\n      var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n      var tiles = this.renderedTiles;\n      var tileGrid = source.getTileGridForProjection(frameState.viewState.projection);\n      var clips = [];\n      var zs = [];\n      for (var i = tiles.length - 1; i >= 0; --i) {\n        var tile = /** @type {import(\"../../VectorImageTile.js\").default} */ (tiles[i]);\n        if (tile.getState() == TileState.ABORT) {\n          continue;\n        }\n        var tileCoord = tile.tileCoord;\n        var worldOffset = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent)[0] - tile.extent[0];\n        var transform = undefined;\n        for (var t = 0, tt = tile.tileKeys.length; t < tt; ++t) {\n          var sourceTile = tile.getTile(tile.tileKeys[t]);\n          if (sourceTile.getState() != TileState.LOADED) {\n            continue;\n          }\n          var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer, tileCoord.toString()));\n          if (!replayGroup || !replayGroup.hasReplays(replayTypes)) {\n            // sourceTile was not yet loaded when this.createReplayGroup_() was\n            // called, or it has no replays of the types we want to render\n            continue;\n          }\n          if (!transform) {\n            transform = this.getTransform(frameState, worldOffset);\n          }\n          var currentZ = sourceTile.tileCoord[0];\n          var currentClip = replayGroup.getClipCoords(transform);\n          context.save();\n          context.globalAlpha = layerState.opacity;\n          // Create a clip mask for regions in this low resolution tile that are\n          // already filled by a higher resolution tile\n          for (var j = 0, jj = clips.length; j < jj; ++j) {\n            var clip = clips[j];\n            if (currentZ < zs[j]) {\n              context.beginPath();\n              // counter-clockwise (outer ring) for current tile\n              context.moveTo(currentClip[0], currentClip[1]);\n              context.lineTo(currentClip[2], currentClip[3]);\n              context.lineTo(currentClip[4], currentClip[5]);\n              context.lineTo(currentClip[6], currentClip[7]);\n              // clockwise (inner ring) for higher resolution tile\n              context.moveTo(clip[6], clip[7]);\n              context.lineTo(clip[4], clip[5]);\n              context.lineTo(clip[2], clip[3]);\n              context.lineTo(clip[0], clip[1]);\n              context.clip();\n            }\n          }\n          replayGroup.replay(context, transform, rotation, {}, snapToPixel, replayTypes, declutterReplays);\n          context.restore();\n          clips.push(currentClip);\n          zs.push(currentZ);\n        }\n      }\n      if (declutterReplays) {\n        replayDeclutter(declutterReplays, context, rotation, snapToPixel);\n      }\n      if (rotation) {\n        rotateAtOffset(context, rotation,\n          /** @type {number} */ (offsetX), /** @type {number} */ (offsetY));\n      }\n    }\n    CanvasTileLayerRenderer.prototype.postCompose.call(this, context, frameState, layerState);\n  };\n\n  /**\n   * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n   * @param {number} squaredTolerance Squared tolerance.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n   * @param {import(\"../../render/canvas/ReplayGroup.js\").default} replayGroup Replay group.\n   * @return {boolean} `true` if an image is loading.\n   */\n  CanvasVectorTileLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, squaredTolerance, styles, replayGroup) {\n    if (!styles) {\n      return false;\n    }\n    var loading = false;\n    if (Array.isArray(styles)) {\n      for (var i = 0, ii = styles.length; i < ii; ++i) {\n        loading = renderFeature(\n          replayGroup, feature, styles[i], squaredTolerance,\n          this.handleStyleImageChange_, this) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        replayGroup, feature, styles, squaredTolerance,\n        this.handleStyleImageChange_, this);\n    }\n    return loading;\n  };\n\n  /**\n   * @param {import(\"../../VectorImageTile.js\").default} tile Tile.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n   * @private\n   */\n  CanvasVectorTileLayerRenderer.prototype.renderTileImage_ = function renderTileImage_ (tile, pixelRatio, projection) {\n    var layer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var replayState = tile.getReplayState(layer);\n    var revision = layer.getRevision();\n    var replays = IMAGE_REPLAYS[layer.getRenderMode()];\n    if (replays && replayState.renderedTileRevision !== revision) {\n      replayState.renderedTileRevision = revision;\n      var tileCoord = tile.wrappedTileCoord;\n      var z = tileCoord[0];\n      var source = /** @type {import(\"../../source/VectorTile.js\").default} */ (layer.getSource());\n      var tileGrid = source.getTileGridForProjection(projection);\n      var resolution = tileGrid.getResolution(z);\n      var context = tile.getContext(layer);\n      var size = source.getTilePixelSize(z, pixelRatio, projection);\n      context.canvas.width = size[0];\n      context.canvas.height = size[1];\n      var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent);\n      for (var i = 0, ii = tile.tileKeys.length; i < ii; ++i) {\n        var sourceTile = tile.getTile(tile.tileKeys[i]);\n        if (sourceTile.getState() != TileState.LOADED) {\n          continue;\n        }\n        var pixelScale = pixelRatio / resolution;\n        var transform = resetTransform(this.tmpTransform_);\n        scaleTransform(transform, pixelScale, -pixelScale);\n        translateTransform(transform, -tileExtent[0], -tileExtent[3]);\n        var replayGroup = /** @type {CanvasReplayGroup} */ (sourceTile.getReplayGroup(layer,\n          tile.tileCoord.toString()));\n        replayGroup.replay(context, transform, 0, {}, true, replays);\n      }\n    }\n  };\n\n  return CanvasVectorTileLayerRenderer;\n}(CanvasTileLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nCanvasVectorTileLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.VECTOR_TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {CanvasVectorTileLayerRenderer} The layer renderer.\n */\nCanvasVectorTileLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new CanvasVectorTileLayerRenderer(/** @type {import(\"../../layer/VectorTile.js\").default} */ (layer));\n};\n\n\nexport default CanvasVectorTileLayerRenderer;\n\n//# sourceMappingURL=VectorTileLayer.js.map","/**\n * @module ol/Map\n */\nimport PluggableMap from './PluggableMap.js';\nimport {defaults as defaultControls} from './control/util.js';\nimport {defaults as defaultInteractions} from './interaction.js';\nimport {assign} from './obj.js';\nimport CanvasImageLayerRenderer from './renderer/canvas/ImageLayer.js';\nimport CanvasMapRenderer from './renderer/canvas/Map.js';\nimport CanvasTileLayerRenderer from './renderer/canvas/TileLayer.js';\nimport CanvasVectorLayerRenderer from './renderer/canvas/VectorLayer.js';\nimport CanvasVectorTileLayerRenderer from './renderer/canvas/VectorTileLayer.js';\n\n/**\n * @classdesc\n * The map is the core component of OpenLayers. For a map to render, a view,\n * one or more layers, and a target container are needed:\n *\n *     import Map from 'ol/Map';\n *     import View from 'ol/View';\n *     import TileLayer from 'ol/layer/Tile';\n *     import OSM from 'ol/source/OSM';\n *\n *     var map = new Map({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new TileLayer({\n *           source: new OSM()\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`. Note that {@link module:ol/layer/Group~Group}\n * is a subclass of {@link module:ol/layer/Base}, so layers entered in the\n * options or added with `addLayer` can be groups, which can contain further\n * groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @api\n */\nvar Map = /*@__PURE__*/(function (PluggableMap) {\n  function Map(options) {\n    options = assign({}, options);\n    if (!options.controls) {\n      options.controls = defaultControls();\n    }\n    if (!options.interactions) {\n      options.interactions = defaultInteractions();\n    }\n\n    PluggableMap.call(this, options);\n  }\n\n  if ( PluggableMap ) Map.__proto__ = PluggableMap;\n  Map.prototype = Object.create( PluggableMap && PluggableMap.prototype );\n  Map.prototype.constructor = Map;\n\n  Map.prototype.createRenderer = function createRenderer () {\n    var renderer = new CanvasMapRenderer(this);\n    renderer.registerLayerRenderers([\n      CanvasImageLayerRenderer,\n      CanvasTileLayerRenderer,\n      CanvasVectorLayerRenderer,\n      CanvasVectorTileLayerRenderer\n    ]);\n    return renderer;\n  };\n\n  return Map;\n}(PluggableMap));\n\n\nexport default Map;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/OverlayPositioning\n */\n\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`,  `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n  BOTTOM_LEFT: 'bottom-left',\n  BOTTOM_CENTER: 'bottom-center',\n  BOTTOM_RIGHT: 'bottom-right',\n  CENTER_LEFT: 'center-left',\n  CENTER_CENTER: 'center-center',\n  CENTER_RIGHT: 'center-right',\n  TOP_LEFT: 'top-left',\n  TOP_CENTER: 'top-center',\n  TOP_RIGHT: 'top-right'\n};\n\n//# sourceMappingURL=OverlayPositioning.js.map","/**\n * @module ol/Overlay\n */\nimport MapEventType from './MapEventType.js';\nimport BaseObject, {getChangeEventType} from './Object.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport {CLASS_SELECTABLE} from './css.js';\nimport {removeNode, removeChildren, outerWidth, outerHeight} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {containsExtent} from './extent.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array<number>} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {OverlayPositioning} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {boolean} [autoPan=false] If set to `true` the map is panned when\n * calling `setPosition`, so that the overlay is entirely visible in the current\n * viewport.\n * @property {PanOptions} [autoPanAnimation] The\n * animation options used to pan the overlay into view. This animation is only\n * used when `autoPan` is enabled. A `duration` and `easing` may be provided to\n * customize the animation.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n\n\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n\n\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n  ELEMENT: 'element',\n  MAP: 'map',\n  OFFSET: 'offset',\n  POSITION: 'position',\n  POSITIONING: 'positioning'\n};\n\n\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location.  Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n *     import Overlay from 'ol/Overlay';\n *\n *     var popup = new Overlay({\n *       element: document.getElementById('popup')\n *     });\n *     popup.setPosition(coordinate);\n *     map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /*@__PURE__*/(function (BaseObject) {\n  function Overlay(options) {\n\n    BaseObject.call(this);\n\n    /**\n     * @protected\n     * @type {Options}\n     */\n    this.options = options;\n\n    /**\n     * @protected\n     * @type {number|string|undefined}\n     */\n    this.id = options.id;\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.insertFirst = options.insertFirst !== undefined ?\n      options.insertFirst : true;\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n\n    /**\n     * @protected\n     * @type {HTMLElement}\n     */\n    this.element = document.createElement('div');\n    this.element.className = options.className !== undefined ?\n      options.className : 'ol-overlay-container ' + CLASS_SELECTABLE;\n    this.element.style.position = 'absolute';\n\n    /**\n     * @protected\n     * @type {boolean}\n     */\n    this.autoPan = options.autoPan !== undefined ? options.autoPan : false;\n\n    /**\n     * @protected\n     * @type {PanOptions}\n     */\n    this.autoPanAnimation = options.autoPanAnimation || /** @type {PanOptions} */ ({});\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.autoPanMargin = options.autoPanMargin !== undefined ?\n      options.autoPanMargin : 20;\n\n    /**\n     * @protected\n     * @type {{bottom_: string,\n     *         left_: string,\n     *         right_: string,\n     *         top_: string,\n     *         visible: boolean}}\n     */\n    this.rendered = {\n      bottom_: '',\n      left_: '',\n      right_: '',\n      top_: '',\n      visible: true\n    };\n\n    /**\n     * @protected\n     * @type {?import(\"./events.js\").EventsKey}\n     */\n    this.mapPostrenderListenerKey = null;\n\n    listen(\n      this, getChangeEventType(Property.ELEMENT),\n      this.handleElementChanged, this);\n\n    listen(\n      this, getChangeEventType(Property.MAP),\n      this.handleMapChanged, this);\n\n    listen(\n      this, getChangeEventType(Property.OFFSET),\n      this.handleOffsetChanged, this);\n\n    listen(\n      this, getChangeEventType(Property.POSITION),\n      this.handlePositionChanged, this);\n\n    listen(\n      this, getChangeEventType(Property.POSITIONING),\n      this.handlePositioningChanged, this);\n\n    if (options.element !== undefined) {\n      this.setElement(options.element);\n    }\n\n    this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n\n    this.setPositioning(options.positioning !== undefined ?\n      /** @type {OverlayPositioning} */ (options.positioning) :\n      OverlayPositioning.TOP_LEFT);\n\n    if (options.position !== undefined) {\n      this.setPosition(options.position);\n    }\n\n  }\n\n  if ( BaseObject ) Overlay.__proto__ = BaseObject;\n  Overlay.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Overlay.prototype.constructor = Overlay;\n\n  /**\n   * Get the DOM element of this overlay.\n   * @return {HTMLElement|undefined} The Element containing the overlay.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.getElement = function getElement () {\n    return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n  };\n\n  /**\n   * Get the overlay identifier which is set on constructor.\n   * @return {number|string|undefined} Id.\n   * @api\n   */\n  Overlay.prototype.getId = function getId () {\n    return this.id;\n  };\n\n  /**\n   * Get the map associated with this overlay.\n   * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n   * overlay is part of.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.getMap = function getMap () {\n    return (\n      /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(Property.MAP))\n    );\n  };\n\n  /**\n   * Get the offset of this overlay.\n   * @return {Array<number>} The offset.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.getOffset = function getOffset () {\n    return /** @type {Array<number>} */ (this.get(Property.OFFSET));\n  };\n\n  /**\n   * Get the current position of this overlay.\n   * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n   *     anchored at.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.getPosition = function getPosition () {\n    return (\n      /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION))\n    );\n  };\n\n  /**\n   * Get the current positioning of this overlay.\n   * @return {OverlayPositioning} How the overlay is positioned\n   *     relative to its point on the map.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.getPositioning = function getPositioning () {\n    return (\n      /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING))\n    );\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.handleElementChanged = function handleElementChanged () {\n    removeChildren(this.element);\n    var element = this.getElement();\n    if (element) {\n      this.element.appendChild(element);\n    }\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.handleMapChanged = function handleMapChanged () {\n    if (this.mapPostrenderListenerKey) {\n      removeNode(this.element);\n      unlistenByKey(this.mapPostrenderListenerKey);\n      this.mapPostrenderListenerKey = null;\n    }\n    var map = this.getMap();\n    if (map) {\n      this.mapPostrenderListenerKey = listen(map,\n        MapEventType.POSTRENDER, this.render, this);\n      this.updatePixelPosition();\n      var container = this.stopEvent ?\n        map.getOverlayContainerStopEvent() : map.getOverlayContainer();\n      if (this.insertFirst) {\n        container.insertBefore(this.element, container.childNodes[0] || null);\n      } else {\n        container.appendChild(this.element);\n      }\n    }\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.render = function render () {\n    this.updatePixelPosition();\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.handleOffsetChanged = function handleOffsetChanged () {\n    this.updatePixelPosition();\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.handlePositionChanged = function handlePositionChanged () {\n    this.updatePixelPosition();\n    if (this.get(Property.POSITION) && this.autoPan) {\n      this.panIntoView();\n    }\n  };\n\n  /**\n   * @protected\n   */\n  Overlay.prototype.handlePositioningChanged = function handlePositioningChanged () {\n    this.updatePixelPosition();\n  };\n\n  /**\n   * Set the DOM element to be associated with this overlay.\n   * @param {HTMLElement|undefined} element The Element containing the overlay.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.setElement = function setElement (element) {\n    this.set(Property.ELEMENT, element);\n  };\n\n  /**\n   * Set the map to be associated with this overlay.\n   * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n   * overlay is part of.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.setMap = function setMap (map) {\n    this.set(Property.MAP, map);\n  };\n\n  /**\n   * Set the offset for this overlay.\n   * @param {Array<number>} offset Offset.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.setOffset = function setOffset (offset) {\n    this.set(Property.OFFSET, offset);\n  };\n\n  /**\n   * Set the position for this overlay. If the position is `undefined` the\n   * overlay is hidden.\n   * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n   *     is anchored at.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.setPosition = function setPosition (position) {\n    this.set(Property.POSITION, position);\n  };\n\n  /**\n   * Pan the map so that the overlay is entirely visible in the current viewport\n   * (if necessary).\n   * @protected\n   */\n  Overlay.prototype.panIntoView = function panIntoView () {\n    var map = this.getMap();\n\n    if (!map || !map.getTargetElement()) {\n      return;\n    }\n\n    var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n    var element = this.getElement();\n    var overlayRect = this.getRect(element, [outerWidth(element), outerHeight(element)]);\n\n    var margin = this.autoPanMargin;\n    if (!containsExtent(mapRect, overlayRect)) {\n      // the overlay is not completely inside the viewport, so pan the map\n      var offsetLeft = overlayRect[0] - mapRect[0];\n      var offsetRight = mapRect[2] - overlayRect[2];\n      var offsetTop = overlayRect[1] - mapRect[1];\n      var offsetBottom = mapRect[3] - overlayRect[3];\n\n      var delta = [0, 0];\n      if (offsetLeft < 0) {\n        // move map to the left\n        delta[0] = offsetLeft - margin;\n      } else if (offsetRight < 0) {\n        // move map to the right\n        delta[0] = Math.abs(offsetRight) + margin;\n      }\n      if (offsetTop < 0) {\n        // move map up\n        delta[1] = offsetTop - margin;\n      } else if (offsetBottom < 0) {\n        // move map down\n        delta[1] = Math.abs(offsetBottom) + margin;\n      }\n\n      if (delta[0] !== 0 || delta[1] !== 0) {\n        var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map.getView().getCenter());\n        var centerPx = map.getPixelFromCoordinate(center);\n        var newCenterPx = [\n          centerPx[0] + delta[0],\n          centerPx[1] + delta[1]\n        ];\n\n        map.getView().animate({\n          center: map.getCoordinateFromPixel(newCenterPx),\n          duration: this.autoPanAnimation.duration,\n          easing: this.autoPanAnimation.easing\n        });\n      }\n    }\n  };\n\n  /**\n   * Get the extent of an element relative to the document\n   * @param {HTMLElement|undefined} element The element.\n   * @param {import(\"./size.js\").Size|undefined} size The size of the element.\n   * @return {import(\"./extent.js\").Extent} The extent.\n   * @protected\n   */\n  Overlay.prototype.getRect = function getRect (element, size) {\n    var box = element.getBoundingClientRect();\n    var offsetX = box.left + window.pageXOffset;\n    var offsetY = box.top + window.pageYOffset;\n    return [\n      offsetX,\n      offsetY,\n      offsetX + size[0],\n      offsetY + size[1]\n    ];\n  };\n\n  /**\n   * Set the positioning for this overlay.\n   * @param {OverlayPositioning} positioning how the overlay is\n   *     positioned relative to its point on the map.\n   * @observable\n   * @api\n   */\n  Overlay.prototype.setPositioning = function setPositioning (positioning) {\n    this.set(Property.POSITIONING, positioning);\n  };\n\n  /**\n   * Modify the visibility of the element.\n   * @param {boolean} visible Element visibility.\n   * @protected\n   */\n  Overlay.prototype.setVisible = function setVisible (visible) {\n    if (this.rendered.visible !== visible) {\n      this.element.style.display = visible ? '' : 'none';\n      this.rendered.visible = visible;\n    }\n  };\n\n  /**\n   * Update pixel position.\n   * @protected\n   */\n  Overlay.prototype.updatePixelPosition = function updatePixelPosition () {\n    var map = this.getMap();\n    var position = this.getPosition();\n    if (!map || !map.isRendered() || !position) {\n      this.setVisible(false);\n      return;\n    }\n\n    var pixel = map.getPixelFromCoordinate(position);\n    var mapSize = map.getSize();\n    this.updateRenderedPosition(pixel, mapSize);\n  };\n\n  /**\n   * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n   * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n   * @protected\n   */\n  Overlay.prototype.updateRenderedPosition = function updateRenderedPosition (pixel, mapSize) {\n    var style = this.element.style;\n    var offset = this.getOffset();\n\n    var positioning = this.getPositioning();\n\n    this.setVisible(true);\n\n    var offsetX = offset[0];\n    var offsetY = offset[1];\n    if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n        positioning == OverlayPositioning.CENTER_RIGHT ||\n        positioning == OverlayPositioning.TOP_RIGHT) {\n      if (this.rendered.left_ !== '') {\n        this.rendered.left_ = style.left = '';\n      }\n      var right = Math.round(mapSize[0] - pixel[0] - offsetX) + 'px';\n      if (this.rendered.right_ != right) {\n        this.rendered.right_ = style.right = right;\n      }\n    } else {\n      if (this.rendered.right_ !== '') {\n        this.rendered.right_ = style.right = '';\n      }\n      if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n          positioning == OverlayPositioning.CENTER_CENTER ||\n          positioning == OverlayPositioning.TOP_CENTER) {\n        offsetX -= this.element.offsetWidth / 2;\n      }\n      var left = Math.round(pixel[0] + offsetX) + 'px';\n      if (this.rendered.left_ != left) {\n        this.rendered.left_ = style.left = left;\n      }\n    }\n    if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n        positioning == OverlayPositioning.BOTTOM_CENTER ||\n        positioning == OverlayPositioning.BOTTOM_RIGHT) {\n      if (this.rendered.top_ !== '') {\n        this.rendered.top_ = style.top = '';\n      }\n      var bottom = Math.round(mapSize[1] - pixel[1] - offsetY) + 'px';\n      if (this.rendered.bottom_ != bottom) {\n        this.rendered.bottom_ = style.bottom = bottom;\n      }\n    } else {\n      if (this.rendered.bottom_ !== '') {\n        this.rendered.bottom_ = style.bottom = '';\n      }\n      if (positioning == OverlayPositioning.CENTER_LEFT ||\n          positioning == OverlayPositioning.CENTER_CENTER ||\n          positioning == OverlayPositioning.CENTER_RIGHT) {\n        offsetY -= this.element.offsetHeight / 2;\n      }\n      var top = Math.round(pixel[1] + offsetY) + 'px';\n      if (this.rendered.top_ != top) {\n        this.rendered.top_ = style.top = top;\n      }\n    }\n  };\n\n  /**\n   * returns the options this Overlay has been created with\n   * @return {Options} overlay options\n   */\n  Overlay.prototype.getOptions = function getOptions () {\n    return this.options;\n  };\n\n  return Overlay;\n}(BaseObject));\n\n\nexport default Overlay;\n\n//# sourceMappingURL=Overlay.js.map","/**\n * @module ol/webgl\n */\n\n\n/**\n * Constants taken from goog.webgl\n */\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ONE = 1;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var SRC_ALPHA = 0x0302;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COLOR_ATTACHMENT0 = 0x8CE0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COLOR_BUFFER_BIT = 0x00004000;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TRIANGLES = 0x0004;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TRIANGLE_STRIP = 0x0005;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ONE_MINUS_SRC_ALPHA = 0x0303;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ARRAY_BUFFER = 0x8892;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var ELEMENT_ARRAY_BUFFER = 0x8893;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STREAM_DRAW = 0x88E0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STATIC_DRAW = 0x88E4;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DYNAMIC_DRAW = 0x88E8;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var CULL_FACE = 0x0B44;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var BLEND = 0x0BE2;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var STENCIL_TEST = 0x0B90;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEPTH_TEST = 0x0B71;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var SCISSOR_TEST = 0x0C11;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_BYTE = 0x1401;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_SHORT = 0x1403;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var UNSIGNED_INT = 0x1405;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FLOAT = 0x1406;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var RGBA = 0x1908;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FRAGMENT_SHADER = 0x8B30;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var VERTEX_SHADER = 0x8B31;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var LINK_STATUS = 0x8B82;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var LINEAR = 0x2601;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_MAG_FILTER = 0x2800;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_MIN_FILTER = 0x2801;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_WRAP_S = 0x2802;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_WRAP_T = 0x2803;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE_2D = 0x0DE1;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var TEXTURE0 = 0x84C0;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var CLAMP_TO_EDGE = 0x812F;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var COMPILE_STATUS = 0x8B81;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var FRAMEBUFFER = 0x8D40;\n\n\n/** end of goog.webgl constants\n */\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar CONTEXT_IDS = [\n  'experimental-webgl',\n  'webgl',\n  'webkit-3d',\n  'moz-webgl'\n];\n\n\n/**\n * @param {HTMLCanvasElement} canvas Canvas.\n * @param {Object=} opt_attributes Attributes.\n * @return {WebGLRenderingContext} WebGL rendering context.\n */\nexport function getContext(canvas, opt_attributes) {\n  var ii = CONTEXT_IDS.length;\n  for (var i = 0; i < ii; ++i) {\n    try {\n      var context = canvas.getContext(CONTEXT_IDS[i], opt_attributes);\n      if (context) {\n        return /** @type {!WebGLRenderingContext} */ (context);\n      }\n    } catch (e) {\n      // pass\n    }\n  }\n  return null;\n}\n\n\n/**\n * Include debuggable shader sources.  Default is `true`. This should be set to\n * `false` for production builds.\n * @type {boolean}\n */\nexport var DEBUG = true;\n\n\n/**\n * The maximum supported WebGL texture size in pixels. If WebGL is not\n * supported, the value is set to `undefined`.\n * @type {number|undefined}\n */\nvar MAX_TEXTURE_SIZE; // value is set below\n\n\n/**\n * List of supported WebGL extensions.\n * @type {Array<string>}\n */\nvar EXTENSIONS; // value is set below\n\n\n/**\n * True if both OpenLayers and browser support WebGL.\n * @type {boolean}\n * @api\n */\nvar HAS = false;\n\n//TODO Remove side effects\nif (typeof window !== 'undefined' && 'WebGLRenderingContext' in window) {\n  try {\n    var canvas = /** @type {HTMLCanvasElement} */ (document.createElement('canvas'));\n    var gl = getContext(canvas, {failIfMajorPerformanceCaveat: true});\n    if (gl) {\n      HAS = true;\n      MAX_TEXTURE_SIZE = /** @type {number} */ (gl.getParameter(gl.MAX_TEXTURE_SIZE));\n      EXTENSIONS = gl.getSupportedExtensions();\n    }\n  } catch (e) {\n    // pass\n  }\n}\n\nexport {HAS, MAX_TEXTURE_SIZE, EXTENSIONS};\n\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/webgl/Shader\n */\nimport {abstract} from '../util.js';\n\n/**\n * @abstract\n */\nvar WebGLShader = function WebGLShader(source) {\n\n  /**\n   * @private\n   * @type {string}\n   */\n  this.source_ = source;\n\n};\n\n/**\n * @return {boolean} Is animated?\n */\nWebGLShader.prototype.isAnimated = function isAnimated () {\n  return false;\n};\n\n/**\n * @abstract\n * @return {number} Type.\n */\nWebGLShader.prototype.getType = function getType () {\n  return abstract();\n};\n\n/**\n * @return {string} Source.\n */\nWebGLShader.prototype.getSource = function getSource () {\n  return this.source_;\n};\n\n\nexport default WebGLShader;\n\n//# sourceMappingURL=Shader.js.map","/**\n * @module ol/webgl/Fragment\n */\n\nimport {FRAGMENT_SHADER} from '../webgl.js';\nimport WebGLShader from '../webgl/Shader.js';\n\nvar WebGLFragment = /*@__PURE__*/(function (WebGLShader) {\n  function WebGLFragment(source) {\n    WebGLShader.call(this, source);\n  }\n\n  if ( WebGLShader ) WebGLFragment.__proto__ = WebGLShader;\n  WebGLFragment.prototype = Object.create( WebGLShader && WebGLShader.prototype );\n  WebGLFragment.prototype.constructor = WebGLFragment;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLFragment.prototype.getType = function getType () {\n    return FRAGMENT_SHADER;\n  };\n\n  return WebGLFragment;\n}(WebGLShader));\n\n\nexport default WebGLFragment;\n\n//# sourceMappingURL=Fragment.js.map","/**\n * @module ol/webgl/Vertex\n */\n\nimport {VERTEX_SHADER} from '../webgl.js';\nimport WebGLShader from '../webgl/Shader.js';\n\nvar WebGLVertex = /*@__PURE__*/(function (WebGLShader) {\n  function WebGLVertex(source) {\n    WebGLShader.call(this, source);\n  }\n\n  if ( WebGLShader ) WebGLVertex.__proto__ = WebGLShader;\n  WebGLVertex.prototype = Object.create( WebGLShader && WebGLShader.prototype );\n  WebGLVertex.prototype.constructor = WebGLVertex;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVertex.prototype.getType = function getType () {\n    return VERTEX_SHADER;\n  };\n\n  return WebGLVertex;\n}(WebGLShader));\n\n\nexport default WebGLVertex;\n\n//# sourceMappingURL=Vertex.js.map","/**\n * @module ol/render/webgl/circlereplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\nvarying vec2 v_center;\\nvarying vec2 v_offset;\\nvarying float v_halfWidth;\\nvarying float v_pixelRatio;\\n\\n\\n\\nuniform float u_opacity;\\nuniform vec4 u_fillColor;\\nuniform vec4 u_strokeColor;\\nuniform vec2 u_size;\\n\\nvoid main(void) {\\n  vec2 windowCenter = vec2((v_center.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\\n      (v_center.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\\n  vec2 windowOffset = vec2((v_offset.x + 1.0) / 2.0 * u_size.x * v_pixelRatio,\\n      (v_offset.y + 1.0) / 2.0 * u_size.y * v_pixelRatio);\\n  float radius = length(windowCenter - windowOffset);\\n  float dist = length(windowCenter - gl_FragCoord.xy);\\n  if (dist > radius + v_halfWidth) {\\n    if (u_strokeColor.a == 0.0) {\\n      gl_FragColor = u_fillColor;\\n    } else {\\n      gl_FragColor = u_strokeColor;\\n    }\\n    gl_FragColor.a = gl_FragColor.a - (dist - (radius + v_halfWidth));\\n  } else if (u_fillColor.a == 0.0) {\\n    // Hooray, no fill, just stroke. We can use real antialiasing.\\n    gl_FragColor = u_strokeColor;\\n    if (dist < radius - v_halfWidth) {\\n      gl_FragColor.a = gl_FragColor.a - (radius - v_halfWidth - dist);\\n    }\\n  } else {\\n    gl_FragColor = u_fillColor;\\n    float strokeDist = radius - v_halfWidth;\\n    float antialias = 2.0 * v_pixelRatio;\\n    if (dist > strokeDist) {\\n      gl_FragColor = u_strokeColor;\\n    } else if (dist >= strokeDist - antialias) {\\n      float step = smoothstep(strokeDist - antialias, strokeDist, dist);\\n      gl_FragColor = mix(u_fillColor, u_strokeColor, step);\\n    }\\n  }\\n  gl_FragColor.a = gl_FragColor.a * u_opacity;\\n  if (gl_FragColor.a <= 0.0) {\\n    discard;\\n  }\\n}\\n' :\n  'precision mediump float;varying vec2 a;varying vec2 b;varying float c;varying float d;uniform float m;uniform vec4 n;uniform vec4 o;uniform vec2 p;void main(void){vec2 windowCenter=vec2((a.x+1.0)/2.0*p.x*d,(a.y+1.0)/2.0*p.y*d);vec2 windowOffset=vec2((b.x+1.0)/2.0*p.x*d,(b.y+1.0)/2.0*p.y*d);float radius=length(windowCenter-windowOffset);float dist=length(windowCenter-gl_FragCoord.xy);if(dist>radius+c){if(o.a==0.0){gl_FragColor=n;}else{gl_FragColor=o;}gl_FragColor.a=gl_FragColor.a-(dist-(radius+c));}else if(n.a==0.0){gl_FragColor=o;if(dist<radius-c){gl_FragColor.a=gl_FragColor.a-(radius-c-dist);}} else{gl_FragColor=n;float strokeDist=radius-c;float antialias=2.0*d;if(dist>strokeDist){gl_FragColor=o;}else if(dist>=strokeDist-antialias){float step=smoothstep(strokeDist-antialias,strokeDist,dist);gl_FragColor=mix(n,o,step);}} gl_FragColor.a=gl_FragColor.a*m;if(gl_FragColor.a<=0.0){discard;}}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  'varying vec2 v_center;\\nvarying vec2 v_offset;\\nvarying float v_halfWidth;\\nvarying float v_pixelRatio;\\n\\n\\nattribute vec2 a_position;\\nattribute float a_instruction;\\nattribute float a_radius;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\nuniform float u_lineWidth;\\nuniform float u_pixelRatio;\\n\\nvoid main(void) {\\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n  v_center = vec4(u_projectionMatrix * vec4(a_position, 0.0, 1.0)).xy;\\n  v_pixelRatio = u_pixelRatio;\\n  float lineWidth = u_lineWidth * u_pixelRatio;\\n  v_halfWidth = lineWidth / 2.0;\\n  if (lineWidth == 0.0) {\\n    lineWidth = 2.0 * u_pixelRatio;\\n  }\\n  vec2 offset;\\n  // Radius with anitaliasing (roughly).\\n  float radius = a_radius + 3.0 * u_pixelRatio;\\n  // Until we get gl_VertexID in WebGL, we store an instruction.\\n  if (a_instruction == 0.0) {\\n    // Offsetting the edges of the triangle by lineWidth / 2 is necessary, however\\n    // we should also leave some space for the antialiasing, thus we offset by lineWidth.\\n    offset = vec2(-1.0, 1.0);\\n  } else if (a_instruction == 1.0) {\\n    offset = vec2(-1.0, -1.0);\\n  } else if (a_instruction == 2.0) {\\n    offset = vec2(1.0, -1.0);\\n  } else {\\n    offset = vec2(1.0, 1.0);\\n  }\\n\\n  gl_Position = u_projectionMatrix * vec4(a_position + offset * radius, 0.0, 1.0) +\\n      offsetMatrix * vec4(offset * lineWidth, 0.0, 0.0);\\n  v_offset = vec4(u_projectionMatrix * vec4(a_position.x + a_radius, a_position.y,\\n      0.0, 1.0)).xy;\\n\\n  if (distance(v_center, v_offset) > 20000.0) {\\n    gl_Position = vec4(v_center, 0.0, 1.0);\\n  }\\n}\\n\\n\\n' :\n  'varying vec2 a;varying vec2 b;varying float c;varying float d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;void main(void){mat4 offsetMatrix=i*j;a=vec4(h*vec4(e,0.0,1.0)).xy;d=l;float lineWidth=k*l;c=lineWidth/2.0;if(lineWidth==0.0){lineWidth=2.0*l;}vec2 offset;float radius=g+3.0*l;if(f==0.0){offset=vec2(-1.0,1.0);}else if(f==1.0){offset=vec2(-1.0,-1.0);}else if(f==2.0){offset=vec2(1.0,-1.0);}else{offset=vec2(1.0,1.0);}gl_Position=h*vec4(e+offset*radius,0.0,1.0)+offsetMatrix*vec4(offset*lineWidth,0.0,0.0);b=vec4(h*vec4(e.x+g,e.y,0.0,1.0)).xy;if(distance(a,b)>20000.0){gl_Position=vec4(a,0.0,1.0);}}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/circlereplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_projectionMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetScaleMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetRotateMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_lineWidth = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_pixelRatio = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_pixelRatio' : 'l');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_opacity = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_opacity' : 'm');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_fillColor = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_fillColor' : 'n');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_strokeColor = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_strokeColor' : 'o');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_size = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_size' : 'p');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'e');\n\n  /**\n   * @type {number}\n   */\n  this.a_instruction = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_instruction' : 'f');\n\n  /**\n   * @type {number}\n   */\n  this.a_radius = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_radius' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/vec/mat4\n */\n\n\n/**\n * @return {Array<number>} 4x4 matrix representing a 3D identity transform.\n */\nexport function create() {\n  return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n\n/**\n * @param {Array<number>} mat4 Flattened 4x4 matrix receiving the result.\n * @param {import(\"../transform.js\").Transform} transform Transformation matrix.\n * @return {Array<number>} 2D transformation matrix as flattened 4x4 matrix.\n */\nexport function fromTransform(mat4, transform) {\n  mat4[0] = transform[0];\n  mat4[1] = transform[1];\n  mat4[4] = transform[2];\n  mat4[5] = transform[3];\n  mat4[12] = transform[4];\n  mat4[13] = transform[5];\n  return mat4;\n}\n\n//# sourceMappingURL=mat4.js.map","/**\n * @module ol/render/webgl/Replay\n */\nimport {abstract} from '../../util.js';\nimport {getCenter} from '../../extent.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n  create as createTransform,\n  reset as resetTransform,\n  rotate as rotateTransform,\n  scale as scaleTransform,\n  translate as translateTransform\n} from '../../transform.js';\nimport {create, fromTransform} from '../../vec/mat4.js';\nimport {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,\n  UNSIGNED_INT, UNSIGNED_SHORT} from '../../webgl.js';\n\nvar WebGLReplay = /*@__PURE__*/(function (VectorContext) {\n  function WebGLReplay(tolerance, maxExtent) {\n    VectorContext.call(this);\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.tolerance = tolerance;\n\n    /**\n     * @protected\n     * @const\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.maxExtent = maxExtent;\n\n    /**\n     * The origin of the coordinate system for the point coordinates sent to\n     * the GPU. To eliminate jitter caused by precision problems in the GPU\n     * we use the \"Rendering Relative to Eye\" technique described in the \"3D\n     * Engine Design for Virtual Globes\" book.\n     * @protected\n     * @type {import(\"../../coordinate.js\").Coordinate}\n     */\n    this.origin = getCenter(maxExtent);\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.projectionMatrix_ = createTransform();\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.offsetRotateMatrix_ = createTransform();\n\n    /**\n     * @private\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.offsetScaleMatrix_ = createTransform();\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.tmpMat4_ = create();\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.indices = [];\n\n    /**\n     * @protected\n     * @type {?import(\"../../webgl/Buffer.js\").default}\n     */\n    this.indicesBuffer = null;\n\n    /**\n     * Start index per feature (the index).\n     * @protected\n     * @type {Array<number>}\n     */\n    this.startIndices = [];\n\n    /**\n     * Start index per feature (the feature).\n     * @protected\n     * @type {Array<import(\"../../Feature.js\").default|import(\"../Feature.js\").default>}\n     */\n    this.startIndicesFeature = [];\n\n    /**\n     * @protected\n     * @type {Array<number>}\n     */\n    this.vertices = [];\n\n    /**\n     * @protected\n     * @type {?import(\"../../webgl/Buffer.js\").default}\n     */\n    this.verticesBuffer = null;\n\n    /**\n     * Optional parameter for PolygonReplay instances.\n     * @protected\n     * @type {import(\"./LineStringReplay.js\").default|undefined}\n     */\n    this.lineStringReplay = undefined;\n\n  }\n\n  if ( VectorContext ) WebGLReplay.__proto__ = VectorContext;\n  WebGLReplay.prototype = Object.create( VectorContext && VectorContext.prototype );\n  WebGLReplay.prototype.constructor = WebGLReplay;\n\n  /**\n   * @abstract\n   * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n   * @return {function()} Delete resources function.\n   */\n  WebGLReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   */\n  WebGLReplay.prototype.finish = function finish (context) {\n    abstract();\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {import(\"./circlereplay/defaultshader/Locations.js\").default|\n     import(\"./linestringreplay/defaultshader/Locations.js\").default|\n     import(\"./polygonreplay/defaultshader/Locations.js\").default|\n     import(\"./texturereplay/defaultshader/Locations.js\").default} Locations.\n   */\n  WebGLReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"./circlereplay/defaultshader/Locations.js\").default|\n     import(\"./linestringreplay/defaultshader/Locations.js\").default|\n     import(\"./polygonreplay/defaultshader/Locations.js\").default|\n     import(\"./texturereplay/defaultshader/Locations.js\").default} locations Locations.\n   */\n  WebGLReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n    abstract();\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {boolean} hitDetection Hit detection mode.\n   */\n  WebGLReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n    abstract();\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n    return abstract();\n  };\n\n  /**\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplay.prototype.drawHitDetectionReplay = function drawHitDetectionReplay (gl, context, skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent) {\n    if (!oneByOne) {\n      // draw all hit-detection features in \"once\" (by texture group)\n      return this.drawHitDetectionReplayAll(gl, context,\n        skippedFeaturesHash, featureCallback);\n    } else {\n      // draw hit-detection features one by one\n      return this.drawHitDetectionReplayOneByOne(gl, context,\n        skippedFeaturesHash, featureCallback, opt_hitExtent);\n    }\n  };\n\n  /**\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplay.prototype.drawHitDetectionReplayAll = function drawHitDetectionReplayAll (gl, context, skippedFeaturesHash, featureCallback) {\n    gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n    this.drawReplay(gl, context, skippedFeaturesHash, true);\n\n    var result = featureCallback(null);\n    if (result) {\n      return result;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} opacity Global opacity.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplay.prototype.replay = function replay (\n    context,\n    center,\n    resolution,\n    rotation,\n    size,\n    pixelRatio,\n    opacity,\n    skippedFeaturesHash,\n    featureCallback,\n    oneByOne,\n    opt_hitExtent\n  ) {\n    var gl = context.getGL();\n    var tmpStencil, tmpStencilFunc, tmpStencilMaskVal, tmpStencilRef, tmpStencilMask,\n        tmpStencilOpFail, tmpStencilOpPass, tmpStencilOpZFail;\n\n    if (this.lineStringReplay) {\n      tmpStencil = gl.isEnabled(gl.STENCIL_TEST);\n      tmpStencilFunc = gl.getParameter(gl.STENCIL_FUNC);\n      tmpStencilMaskVal = gl.getParameter(gl.STENCIL_VALUE_MASK);\n      tmpStencilRef = gl.getParameter(gl.STENCIL_REF);\n      tmpStencilMask = gl.getParameter(gl.STENCIL_WRITEMASK);\n      tmpStencilOpFail = gl.getParameter(gl.STENCIL_FAIL);\n      tmpStencilOpPass = gl.getParameter(gl.STENCIL_PASS_DEPTH_PASS);\n      tmpStencilOpZFail = gl.getParameter(gl.STENCIL_PASS_DEPTH_FAIL);\n\n      gl.enable(gl.STENCIL_TEST);\n      gl.clear(gl.STENCIL_BUFFER_BIT);\n      gl.stencilMask(255);\n      gl.stencilFunc(gl.ALWAYS, 1, 255);\n      gl.stencilOp(gl.KEEP, gl.KEEP, gl.REPLACE);\n\n      this.lineStringReplay.replay(context,\n        center, resolution, rotation, size, pixelRatio,\n        opacity, skippedFeaturesHash,\n        featureCallback, oneByOne, opt_hitExtent);\n\n      gl.stencilMask(0);\n      gl.stencilFunc(gl.NOTEQUAL, 1, 255);\n    }\n\n    context.bindBuffer(ARRAY_BUFFER, this.verticesBuffer);\n\n    context.bindBuffer(ELEMENT_ARRAY_BUFFER, this.indicesBuffer);\n\n    var locations = this.setUpProgram(gl, context, size, pixelRatio);\n\n    // set the \"uniform\" values\n    var projectionMatrix = resetTransform(this.projectionMatrix_);\n    scaleTransform(projectionMatrix, 2 / (resolution * size[0]), 2 / (resolution * size[1]));\n    rotateTransform(projectionMatrix, -rotation);\n    translateTransform(projectionMatrix, -(center[0] - this.origin[0]), -(center[1] - this.origin[1]));\n\n    var offsetScaleMatrix = resetTransform(this.offsetScaleMatrix_);\n    scaleTransform(offsetScaleMatrix, 2 / size[0], 2 / size[1]);\n\n    var offsetRotateMatrix = resetTransform(this.offsetRotateMatrix_);\n    if (rotation !== 0) {\n      rotateTransform(offsetRotateMatrix, -rotation);\n    }\n\n    gl.uniformMatrix4fv(locations.u_projectionMatrix, false,\n      fromTransform(this.tmpMat4_, projectionMatrix));\n    gl.uniformMatrix4fv(locations.u_offsetScaleMatrix, false,\n      fromTransform(this.tmpMat4_, offsetScaleMatrix));\n    gl.uniformMatrix4fv(locations.u_offsetRotateMatrix, false,\n      fromTransform(this.tmpMat4_, offsetRotateMatrix));\n    gl.uniform1f(locations.u_opacity, opacity);\n\n    // draw!\n    var result;\n    if (featureCallback === undefined) {\n      this.drawReplay(gl, context, skippedFeaturesHash, false);\n    } else {\n      // draw feature by feature for the hit-detection\n      result = this.drawHitDetectionReplay(gl, context, skippedFeaturesHash,\n        featureCallback, oneByOne, opt_hitExtent);\n    }\n\n    // disable the vertex attrib arrays\n    this.shutDownProgram(gl, locations);\n\n    if (this.lineStringReplay) {\n      if (!tmpStencil) {\n        gl.disable(gl.STENCIL_TEST);\n      }\n      gl.clear(gl.STENCIL_BUFFER_BIT);\n      gl.stencilFunc(/** @type {number} */ (tmpStencilFunc),\n        /** @type {number} */ (tmpStencilRef), /** @type {number} */ (tmpStencilMaskVal));\n      gl.stencilMask(/** @type {number} */ (tmpStencilMask));\n      gl.stencilOp(/** @type {number} */ (tmpStencilOpFail),\n        /** @type {number} */ (tmpStencilOpZFail), /** @type {number} */ (tmpStencilOpPass));\n    }\n\n    return result;\n  };\n\n  /**\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {number} start Start index.\n   * @param {number} end End index.\n   */\n  WebGLReplay.prototype.drawElements = function drawElements (gl, context, start, end) {\n    var elementType = context.hasOESElementIndexUint ?\n      UNSIGNED_INT : UNSIGNED_SHORT;\n    var elementSize = context.hasOESElementIndexUint ? 4 : 2;\n\n    var numItems = end - start;\n    var offsetInBytes = start * elementSize;\n    gl.drawElements(TRIANGLES, numItems, elementType, offsetInBytes);\n  };\n\n  return WebGLReplay;\n}(VectorContext));\n\n\nexport default WebGLReplay;\n\n//# sourceMappingURL=Replay.js.map","/**\n * @module ol/render/webgl\n */\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_FONT = '10px sans-serif';\n\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var DEFAULT_FILLSTYLE = [0.0, 0.0, 0.0, 1.0];\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_LINECAP = 'round';\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nexport var DEFAULT_LINEDASH = [];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_LINEDASHOFFSET = 0;\n\n\n/**\n * @const\n * @type {string}\n */\nexport var DEFAULT_LINEJOIN = 'round';\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_MITERLIMIT = 10;\n\n/**\n * @const\n * @type {import(\"../color.js\").Color}\n */\nexport var DEFAULT_STROKESTYLE = [0.0, 0.0, 0.0, 1.0];\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_TEXTALIGN = 0.5;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_TEXTBASELINE = 0.5;\n\n\n/**\n * @const\n * @type {number}\n */\nexport var DEFAULT_LINEWIDTH = 1;\n\n/**\n * @const\n * @type {number}\n */\nexport var EPSILON = Number.EPSILON || 2.220446049250313e-16;\n\n/**\n * Calculates the orientation of a triangle based on the determinant method.\n * @param {number} x1 First X coordinate.\n * @param {number} y1 First Y coordinate.\n * @param {number} x2 Second X coordinate.\n * @param {number} y2 Second Y coordinate.\n * @param {number} x3 Third X coordinate.\n * @param {number} y3 Third Y coordinate.\n * @return {boolean|undefined} Triangle is clockwise.\n */\nexport var triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {\n  var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n  return (area <= EPSILON && area >= -EPSILON) ?\n    undefined : area > 0;\n};\n\n\n//# sourceMappingURL=webgl.js.map","/**\n * @module ol/webgl/Buffer\n */\nimport {STATIC_DRAW, STREAM_DRAW, DYNAMIC_DRAW} from '../webgl.js';\n\n/**\n * @enum {number}\n */\nvar BufferUsage = {\n  STATIC_DRAW: STATIC_DRAW,\n  STREAM_DRAW: STREAM_DRAW,\n  DYNAMIC_DRAW: DYNAMIC_DRAW\n};\n\n\nvar WebGLBuffer = function WebGLBuffer(opt_arr, opt_usage) {\n\n  /**\n   * @private\n   * @type {Array<number>}\n   */\n  this.arr_ = opt_arr !== undefined ? opt_arr : [];\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.usage_ = opt_usage !== undefined ? opt_usage : BufferUsage.STATIC_DRAW;\n\n};\n\n/**\n * @return {Array<number>} Array.\n */\nWebGLBuffer.prototype.getArray = function getArray () {\n  return this.arr_;\n};\n\n/**\n * @return {number} Usage.\n */\nWebGLBuffer.prototype.getUsage = function getUsage () {\n  return this.usage_;\n};\n\nexport default WebGLBuffer;\n\n//# sourceMappingURL=Buffer.js.map","/**\n * @module ol/render/webgl/CircleReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {fragment, vertex} from './circlereplay/defaultshader.js';\nimport Locations from './circlereplay/defaultshader/Locations.js';\nimport WebGLReplay from './Replay.js';\nimport {DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET, DEFAULT_STROKESTYLE,\n  DEFAULT_FILLSTYLE, DEFAULT_LINEWIDTH} from '../webgl.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\nvar WebGLCircleReplay = /*@__PURE__*/(function (WebGLReplay) {\n  function WebGLCircleReplay(tolerance, maxExtent) {\n    WebGLReplay.call(this, tolerance, maxExtent);\n\n    /**\n     * @private\n     * @type {import(\"./circlereplay/defaultshader/Locations.js\").default}\n     */\n    this.defaultLocations_ = null;\n\n    /**\n     * @private\n     * @type {Array<Array<Array<number>|number>>}\n     */\n    this.styles_ = [];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.styleIndices_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.radius_ = 0;\n\n    /**\n     * @private\n     * @type {{fillColor: (Array<number>|null),\n     *         strokeColor: (Array<number>|null),\n     *         lineDash: Array<number>,\n     *         lineDashOffset: (number|undefined),\n     *         lineWidth: (number|undefined),\n     *         changed: boolean}|null}\n     */\n    this.state_ = {\n      fillColor: null,\n      strokeColor: null,\n      lineDash: null,\n      lineDashOffset: undefined,\n      lineWidth: undefined,\n      changed: false\n    };\n\n  }\n\n  if ( WebGLReplay ) WebGLCircleReplay.__proto__ = WebGLReplay;\n  WebGLCircleReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n  WebGLCircleReplay.prototype.constructor = WebGLCircleReplay;\n\n  /**\n   * @private\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   */\n  WebGLCircleReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n    var numVertices = this.vertices.length;\n    var numIndices = this.indices.length;\n    var n = numVertices / 4;\n    var i, ii;\n    for (i = offset, ii = end; i < ii; i += stride) {\n      this.vertices[numVertices++] = flatCoordinates[i];\n      this.vertices[numVertices++] = flatCoordinates[i + 1];\n      this.vertices[numVertices++] = 0;\n      this.vertices[numVertices++] = this.radius_;\n\n      this.vertices[numVertices++] = flatCoordinates[i];\n      this.vertices[numVertices++] = flatCoordinates[i + 1];\n      this.vertices[numVertices++] = 1;\n      this.vertices[numVertices++] = this.radius_;\n\n      this.vertices[numVertices++] = flatCoordinates[i];\n      this.vertices[numVertices++] = flatCoordinates[i + 1];\n      this.vertices[numVertices++] = 2;\n      this.vertices[numVertices++] = this.radius_;\n\n      this.vertices[numVertices++] = flatCoordinates[i];\n      this.vertices[numVertices++] = flatCoordinates[i + 1];\n      this.vertices[numVertices++] = 3;\n      this.vertices[numVertices++] = this.radius_;\n\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = n + 1;\n      this.indices[numIndices++] = n + 2;\n\n      this.indices[numIndices++] = n + 2;\n      this.indices[numIndices++] = n + 3;\n      this.indices[numIndices++] = n;\n\n      n += 4;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.drawCircle = function drawCircle (circleGeometry, feature) {\n    var radius = circleGeometry.getRadius();\n    var stride = circleGeometry.getStride();\n    if (radius) {\n      this.startIndices.push(this.indices.length);\n      this.startIndicesFeature.push(feature);\n      if (this.state_.changed) {\n        this.styleIndices_.push(this.indices.length);\n        this.state_.changed = false;\n      }\n\n      this.radius_ = radius;\n      var flatCoordinates = circleGeometry.getFlatCoordinates();\n      flatCoordinates = translate(flatCoordinates, 0, 2,\n        stride, -this.origin[0], -this.origin[1]);\n      this.drawCoordinates_(flatCoordinates, 0, 2, stride);\n    } else {\n      if (this.state_.changed) {\n        this.styles_.pop();\n        if (this.styles_.length) {\n          var lastState = this.styles_[this.styles_.length - 1];\n          this.state_.fillColor = /** @type {Array<number>} */ (lastState[0]);\n          this.state_.strokeColor = /** @type {Array<number>} */ (lastState[1]);\n          this.state_.lineWidth = /** @type {number} */ (lastState[2]);\n          this.state_.changed = false;\n        }\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   **/\n  WebGLCircleReplay.prototype.finish = function finish (context) {\n    // create, bind, and populate the vertices buffer\n    this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n    // create, bind, and populate the indices buffer\n    this.indicesBuffer = new WebGLBuffer(this.indices);\n\n    this.startIndices.push(this.indices.length);\n\n    //Clean up, if there is nothing to draw\n    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n      this.styles_ = [];\n    }\n\n    this.vertices = null;\n    this.indices = null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    // We only delete our stuff here. The shaders and the program may\n    // be used by other CircleReplay instances (for other layers). And\n    // they will be deleted when disposing of the import(\"../../webgl/Context.js\").WebGLContext\n    // object.\n    var verticesBuffer = this.verticesBuffer;\n    var indicesBuffer = this.indicesBuffer;\n    return function() {\n      context.deleteBuffer(verticesBuffer);\n      context.deleteBuffer(indicesBuffer);\n    };\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n    // get the program\n    var program = context.getProgram(fragment, vertex);\n\n    // get the locations\n    var locations;\n    if (!this.defaultLocations_) {\n      locations = new Locations(gl, program);\n      this.defaultLocations_ = locations;\n    } else {\n      locations = this.defaultLocations_;\n    }\n\n    context.useProgram(program);\n\n    // enable the vertex attrib arrays\n    gl.enableVertexAttribArray(locations.a_position);\n    gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n      false, 16, 0);\n\n    gl.enableVertexAttribArray(locations.a_instruction);\n    gl.vertexAttribPointer(locations.a_instruction, 1, FLOAT,\n      false, 16, 8);\n\n    gl.enableVertexAttribArray(locations.a_radius);\n    gl.vertexAttribPointer(locations.a_radius, 1, FLOAT,\n      false, 16, 12);\n\n    // Enable renderer specific uniforms.\n    gl.uniform2fv(locations.u_size, size);\n    gl.uniform1f(locations.u_pixelRatio, pixelRatio);\n\n    return locations;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n    gl.disableVertexAttribArray(locations.a_position);\n    gl.disableVertexAttribArray(locations.a_instruction);\n    gl.disableVertexAttribArray(locations.a_radius);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n    if (!isEmpty(skippedFeaturesHash)) {\n      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n    } else {\n      //Draw by style groups to minimize drawElements() calls.\n      var i, start, end, nextStyle;\n      end = this.startIndices[this.startIndices.length - 1];\n      for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n        start = this.styleIndices_[i];\n        nextStyle = this.styles_[i];\n        this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n        this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n          /** @type {number} */ (nextStyle[2]));\n        this.drawElements(gl, context, start, end);\n        end = start;\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex;\n    featureIndex = this.startIndices.length - 2;\n    end = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n      this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n        /** @type {number} */ (nextStyle[2]));\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        start = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)] === undefined &&\n            feature.getGeometry() &&\n            (opt_hitExtent === undefined || intersects(\n              /** @type {Array<number>} */ (opt_hitExtent),\n              feature.getGeometry().getExtent()))) {\n          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n          this.drawElements(gl, context, start, end);\n\n          var result = featureCallback(feature);\n\n          if (result) {\n            return result;\n          }\n\n        }\n        featureIndex--;\n        end = start;\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object} skippedFeaturesHash Ids of features to skip.\n   */\n  WebGLCircleReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n    featureIndex = this.startIndices.length - 2;\n    end = start = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setFillStyle_(gl, /** @type {Array<number>} */ (nextStyle[0]));\n      this.setStrokeStyle_(gl, /** @type {Array<number>} */ (nextStyle[1]),\n        /** @type {number} */ (nextStyle[2]));\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        featureStart = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)]) {\n          if (start !== end) {\n            this.drawElements(gl, context, start, end);\n          }\n          end = featureStart;\n        }\n        featureIndex--;\n        start = featureStart;\n      }\n      if (start !== end) {\n        this.drawElements(gl, context, start, end);\n      }\n      start = end = groupStart;\n    }\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {Array<number>} color Color.\n   */\n  WebGLCircleReplay.prototype.setFillStyle_ = function setFillStyle_ (gl, color) {\n    gl.uniform4fv(this.defaultLocations_.u_fillColor, color);\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {Array<number>} color Color.\n   * @param {number} lineWidth Line width.\n   */\n  WebGLCircleReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (gl, color, lineWidth) {\n    gl.uniform4fv(this.defaultLocations_.u_strokeColor, color);\n    gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLCircleReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    var strokeStyleColor, strokeStyleWidth;\n    if (strokeStyle) {\n      var strokeStyleLineDash = strokeStyle.getLineDash();\n      this.state_.lineDash = strokeStyleLineDash ?\n        strokeStyleLineDash : DEFAULT_LINEDASH;\n      var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n      this.state_.lineDashOffset = strokeStyleLineDashOffset ?\n        strokeStyleLineDashOffset : DEFAULT_LINEDASHOFFSET;\n      strokeStyleColor = strokeStyle.getColor();\n      if (!(strokeStyleColor instanceof CanvasGradient) &&\n          !(strokeStyleColor instanceof CanvasPattern)) {\n        strokeStyleColor = asArray(strokeStyleColor).map(function(c, i) {\n          return i != 3 ? c / 255 : c;\n        }) || DEFAULT_STROKESTYLE;\n      } else {\n        strokeStyleColor = DEFAULT_STROKESTYLE;\n      }\n      strokeStyleWidth = strokeStyle.getWidth();\n      strokeStyleWidth = strokeStyleWidth !== undefined ?\n        strokeStyleWidth : DEFAULT_LINEWIDTH;\n    } else {\n      strokeStyleColor = [0, 0, 0, 0];\n      strokeStyleWidth = 0;\n    }\n    var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];\n    if (!(fillStyleColor instanceof CanvasGradient) &&\n        !(fillStyleColor instanceof CanvasPattern)) {\n      fillStyleColor = asArray(fillStyleColor).map(function(c, i) {\n        return i != 3 ? c / 255 : c;\n      }) || DEFAULT_FILLSTYLE;\n    } else {\n      fillStyleColor = DEFAULT_FILLSTYLE;\n    }\n    if (!this.state_.strokeColor || !equals(this.state_.strokeColor, strokeStyleColor) ||\n        !this.state_.fillColor || !equals(this.state_.fillColor, fillStyleColor) ||\n        this.state_.lineWidth !== strokeStyleWidth) {\n      this.state_.changed = true;\n      this.state_.fillColor = fillStyleColor;\n      this.state_.strokeColor = strokeStyleColor;\n      this.state_.lineWidth = strokeStyleWidth;\n      this.styles_.push([fillStyleColor, strokeStyleColor, strokeStyleWidth]);\n    }\n  };\n\n  return WebGLCircleReplay;\n}(WebGLReplay));\n\n\nexport default WebGLCircleReplay;\n\n//# sourceMappingURL=CircleReplay.js.map","/**\n * @module ol/render/webgl/texturereplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\nvarying vec2 v_texCoord;\\nvarying float v_opacity;\\n\\nuniform float u_opacity;\\nuniform sampler2D u_image;\\n\\nvoid main(void) {\\n  vec4 texColor = texture2D(u_image, v_texCoord);\\n  gl_FragColor.rgb = texColor.rgb;\\n  float alpha = texColor.a * v_opacity * u_opacity;\\n  if (alpha == 0.0) {\\n    discard;\\n  }\\n  gl_FragColor.a = alpha;\\n}\\n' :\n  'precision mediump float;varying vec2 a;varying float b;uniform float k;uniform sampler2D l;void main(void){vec4 texColor=texture2D(l,a);gl_FragColor.rgb=texColor.rgb;float alpha=texColor.a*b*k;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  'varying vec2 v_texCoord;\\nvarying float v_opacity;\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\nattribute vec2 a_offsets;\\nattribute float a_opacity;\\nattribute float a_rotateWithView;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\n\\nvoid main(void) {\\n  mat4 offsetMatrix = u_offsetScaleMatrix;\\n  if (a_rotateWithView == 1.0) {\\n    offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n  }\\n  vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\\n  v_texCoord = a_texCoord;\\n  v_opacity = a_opacity;\\n}\\n\\n\\n' :\n  'varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/texturereplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_projectionMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetScaleMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetRotateMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_opacity = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_opacity' : 'k');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_image = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_image' : 'l');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'c');\n\n  /**\n   * @type {number}\n   */\n  this.a_texCoord = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_texCoord' : 'd');\n\n  /**\n   * @type {number}\n   */\n  this.a_offsets = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_offsets' : 'e');\n\n  /**\n   * @type {number}\n   */\n  this.a_opacity = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_opacity' : 'f');\n\n  /**\n   * @type {number}\n   */\n  this.a_rotateWithView = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/webgl/ContextEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  LOST: 'webglcontextlost',\n  RESTORED: 'webglcontextrestored'\n};\n\n//# sourceMappingURL=ContextEventType.js.map","/**\n * @module ol/webgl/Context\n */\nimport {getUid} from '../util.js';\nimport {EXTENSIONS as WEBGL_EXTENSIONS} from '../webgl.js';\nimport Disposable from '../Disposable.js';\nimport {includes} from '../array.js';\nimport {listen, unlistenAll} from '../events.js';\nimport {clear} from '../obj.js';\nimport {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TEXTURE_2D, TEXTURE_WRAP_S, TEXTURE_WRAP_T} from '../webgl.js';\nimport ContextEventType from '../webgl/ContextEventType.js';\n\n\n/**\n * @typedef {Object} BufferCacheEntry\n * @property {import(\"./Buffer.js\").default} buf\n * @property {WebGLBuffer} buffer\n */\n\n\n/**\n * @classdesc\n * A WebGL context for accessing low-level WebGL capabilities.\n */\nvar WebGLContext = /*@__PURE__*/(function (Disposable) {\n  function WebGLContext(canvas, gl) {\n    Disposable.call(this);\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = canvas;\n\n    /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */\n    this.gl_ = gl;\n\n    /**\n     * @private\n     * @type {!Object<string, BufferCacheEntry>}\n     */\n    this.bufferCache_ = {};\n\n    /**\n     * @private\n     * @type {!Object<string, WebGLShader>}\n     */\n    this.shaderCache_ = {};\n\n    /**\n     * @private\n     * @type {!Object<string, WebGLProgram>}\n     */\n    this.programCache_ = {};\n\n    /**\n     * @private\n     * @type {WebGLProgram}\n     */\n    this.currentProgram_ = null;\n\n    /**\n     * @private\n     * @type {WebGLFramebuffer}\n     */\n    this.hitDetectionFramebuffer_ = null;\n\n    /**\n     * @private\n     * @type {WebGLTexture}\n     */\n    this.hitDetectionTexture_ = null;\n\n    /**\n     * @private\n     * @type {WebGLRenderbuffer}\n     */\n    this.hitDetectionRenderbuffer_ = null;\n\n    /**\n     * @type {boolean}\n     */\n    this.hasOESElementIndexUint = includes(WEBGL_EXTENSIONS, 'OES_element_index_uint');\n\n    // use the OES_element_index_uint extension if available\n    if (this.hasOESElementIndexUint) {\n      gl.getExtension('OES_element_index_uint');\n    }\n\n    listen(this.canvas_, ContextEventType.LOST,\n      this.handleWebGLContextLost, this);\n    listen(this.canvas_, ContextEventType.RESTORED,\n      this.handleWebGLContextRestored, this);\n\n  }\n\n  if ( Disposable ) WebGLContext.__proto__ = Disposable;\n  WebGLContext.prototype = Object.create( Disposable && Disposable.prototype );\n  WebGLContext.prototype.constructor = WebGLContext;\n\n  /**\n   * Just bind the buffer if it's in the cache. Otherwise create\n   * the WebGL buffer, bind it, populate it, and add an entry to\n   * the cache.\n   * @param {number} target Target.\n   * @param {import(\"./Buffer.js\").default} buf Buffer.\n   */\n  WebGLContext.prototype.bindBuffer = function bindBuffer (target, buf) {\n    var gl = this.getGL();\n    var arr = buf.getArray();\n    var bufferKey = getUid(buf);\n    if (bufferKey in this.bufferCache_) {\n      var bufferCacheEntry = this.bufferCache_[bufferKey];\n      gl.bindBuffer(target, bufferCacheEntry.buffer);\n    } else {\n      var buffer = gl.createBuffer();\n      gl.bindBuffer(target, buffer);\n      var /** @type {ArrayBufferView} */ arrayBuffer;\n      if (target == ARRAY_BUFFER) {\n        arrayBuffer = new Float32Array(arr);\n      } else if (target == ELEMENT_ARRAY_BUFFER) {\n        arrayBuffer = this.hasOESElementIndexUint ?\n          new Uint32Array(arr) : new Uint16Array(arr);\n      }\n      gl.bufferData(target, arrayBuffer, buf.getUsage());\n      this.bufferCache_[bufferKey] = {\n        buf: buf,\n        buffer: buffer\n      };\n    }\n  };\n\n  /**\n   * @param {import(\"./Buffer.js\").default} buf Buffer.\n   */\n  WebGLContext.prototype.deleteBuffer = function deleteBuffer (buf) {\n    var gl = this.getGL();\n    var bufferKey = getUid(buf);\n    var bufferCacheEntry = this.bufferCache_[bufferKey];\n    if (!gl.isContextLost()) {\n      gl.deleteBuffer(bufferCacheEntry.buffer);\n    }\n    delete this.bufferCache_[bufferKey];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLContext.prototype.disposeInternal = function disposeInternal () {\n    unlistenAll(this.canvas_);\n    var gl = this.getGL();\n    if (!gl.isContextLost()) {\n      for (var key in this.bufferCache_) {\n        gl.deleteBuffer(this.bufferCache_[key].buffer);\n      }\n      for (var key$1 in this.programCache_) {\n        gl.deleteProgram(this.programCache_[key$1]);\n      }\n      for (var key$2 in this.shaderCache_) {\n        gl.deleteShader(this.shaderCache_[key$2]);\n      }\n      // delete objects for hit-detection\n      gl.deleteFramebuffer(this.hitDetectionFramebuffer_);\n      gl.deleteRenderbuffer(this.hitDetectionRenderbuffer_);\n      gl.deleteTexture(this.hitDetectionTexture_);\n    }\n  };\n\n  /**\n   * @return {HTMLCanvasElement} Canvas.\n   */\n  WebGLContext.prototype.getCanvas = function getCanvas () {\n    return this.canvas_;\n  };\n\n  /**\n   * Get the WebGL rendering context\n   * @return {WebGLRenderingContext} The rendering context.\n   * @api\n   */\n  WebGLContext.prototype.getGL = function getGL () {\n    return this.gl_;\n  };\n\n  /**\n   * Get the frame buffer for hit detection.\n   * @return {WebGLFramebuffer} The hit detection frame buffer.\n   */\n  WebGLContext.prototype.getHitDetectionFramebuffer = function getHitDetectionFramebuffer () {\n    if (!this.hitDetectionFramebuffer_) {\n      this.initHitDetectionFramebuffer_();\n    }\n    return this.hitDetectionFramebuffer_;\n  };\n\n  /**\n   * Get shader from the cache if it's in the cache. Otherwise, create\n   * the WebGL shader, compile it, and add entry to cache.\n   * @param {import(\"./Shader.js\").default} shaderObject Shader object.\n   * @return {WebGLShader} Shader.\n   */\n  WebGLContext.prototype.getShader = function getShader (shaderObject) {\n    var shaderKey = getUid(shaderObject);\n    if (shaderKey in this.shaderCache_) {\n      return this.shaderCache_[shaderKey];\n    } else {\n      var gl = this.getGL();\n      var shader = gl.createShader(shaderObject.getType());\n      gl.shaderSource(shader, shaderObject.getSource());\n      gl.compileShader(shader);\n      this.shaderCache_[shaderKey] = shader;\n      return shader;\n    }\n  };\n\n  /**\n   * Get the program from the cache if it's in the cache. Otherwise create\n   * the WebGL program, attach the shaders to it, and add an entry to the\n   * cache.\n   * @param {import(\"./Fragment.js\").default} fragmentShaderObject Fragment shader.\n   * @param {import(\"./Vertex.js\").default} vertexShaderObject Vertex shader.\n   * @return {WebGLProgram} Program.\n   */\n  WebGLContext.prototype.getProgram = function getProgram (fragmentShaderObject, vertexShaderObject) {\n    var programKey = getUid(fragmentShaderObject) + '/' + getUid(vertexShaderObject);\n    if (programKey in this.programCache_) {\n      return this.programCache_[programKey];\n    } else {\n      var gl = this.getGL();\n      var program = gl.createProgram();\n      gl.attachShader(program, this.getShader(fragmentShaderObject));\n      gl.attachShader(program, this.getShader(vertexShaderObject));\n      gl.linkProgram(program);\n      this.programCache_[programKey] = program;\n      return program;\n    }\n  };\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  WebGLContext.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n    clear(this.bufferCache_);\n    clear(this.shaderCache_);\n    clear(this.programCache_);\n    this.currentProgram_ = null;\n    this.hitDetectionFramebuffer_ = null;\n    this.hitDetectionTexture_ = null;\n    this.hitDetectionRenderbuffer_ = null;\n  };\n\n  /**\n   * FIXME empty description for jsdoc\n   */\n  WebGLContext.prototype.handleWebGLContextRestored = function handleWebGLContextRestored () {\n  };\n\n  /**\n   * Creates a 1x1 pixel framebuffer for the hit-detection.\n   * @private\n   */\n  WebGLContext.prototype.initHitDetectionFramebuffer_ = function initHitDetectionFramebuffer_ () {\n    var gl = this.gl_;\n    var framebuffer = gl.createFramebuffer();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\n\n    var texture = createEmptyTexture(gl, 1, 1);\n    var renderbuffer = gl.createRenderbuffer();\n    gl.bindRenderbuffer(gl.RENDERBUFFER, renderbuffer);\n    gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_COMPONENT16, 1, 1);\n    gl.framebufferTexture2D(\n      gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n    gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_ATTACHMENT,\n      gl.RENDERBUFFER, renderbuffer);\n\n    gl.bindTexture(gl.TEXTURE_2D, null);\n    gl.bindRenderbuffer(gl.RENDERBUFFER, null);\n    gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n\n    this.hitDetectionFramebuffer_ = framebuffer;\n    this.hitDetectionTexture_ = texture;\n    this.hitDetectionRenderbuffer_ = renderbuffer;\n  };\n\n  /**\n   * Use a program.  If the program is already in use, this will return `false`.\n   * @param {WebGLProgram} program Program.\n   * @return {boolean} Changed.\n   * @api\n   */\n  WebGLContext.prototype.useProgram = function useProgram (program) {\n    if (program == this.currentProgram_) {\n      return false;\n    } else {\n      var gl = this.getGL();\n      gl.useProgram(program);\n      this.currentProgram_ = program;\n      return true;\n    }\n  };\n\n  return WebGLContext;\n}(Disposable));\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nfunction createTextureInternal(gl, opt_wrapS, opt_wrapT) {\n  var texture = gl.createTexture();\n  gl.bindTexture(gl.TEXTURE_2D, texture);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n  gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\n  if (opt_wrapS !== undefined) {\n    gl.texParameteri(\n      TEXTURE_2D, TEXTURE_WRAP_S, opt_wrapS);\n  }\n  if (opt_wrapT !== undefined) {\n    gl.texParameteri(\n      TEXTURE_2D, TEXTURE_WRAP_T, opt_wrapT);\n  }\n\n  return texture;\n}\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {number} width Width.\n * @param {number} height Height.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nexport function createEmptyTexture(gl, width, height, opt_wrapS, opt_wrapT) {\n  var texture = createTextureInternal(gl, opt_wrapS, opt_wrapT);\n  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n  return texture;\n}\n\n\n/**\n * @param {WebGLRenderingContext} gl WebGL rendering context.\n * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n * @param {number=} opt_wrapS wrapS.\n * @param {number=} opt_wrapT wrapT.\n * @return {WebGLTexture} The texture.\n */\nexport function createTexture(gl, image, opt_wrapS, opt_wrapT) {\n  var texture = createTextureInternal(gl, opt_wrapS, opt_wrapT);\n  gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);\n  return texture;\n}\n\nexport default WebGLContext;\n\n//# sourceMappingURL=Context.js.map","/**\n * @module ol/render/webgl/TextureReplay\n */\nimport {abstract, getUid} from '../../util.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {fragment, vertex} from './texturereplay/defaultshader.js';\nimport Locations from './texturereplay/defaultshader/Locations.js';\nimport WebGLReplay from './Replay.js';\nimport {CLAMP_TO_EDGE, FLOAT, TEXTURE_2D} from '../../webgl.js';\nimport {createTexture} from '../../webgl/Context.js';\n\nvar WebGLTextureReplay = /*@__PURE__*/(function (WebGLReplay) {\n  function WebGLTextureReplay(tolerance, maxExtent) {\n    WebGLReplay.call(this, tolerance, maxExtent);\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.anchorX = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.anchorY = undefined;\n\n    /**\n     * @type {Array<number>}\n     * @protected\n     */\n    this.groupIndices = [];\n\n    /**\n     * @type {Array<number>}\n     * @protected\n     */\n    this.hitDetectionGroupIndices = [];\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.height = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.imageHeight = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.imageWidth = undefined;\n\n    /**\n     * @protected\n     * @type {import(\"./texturereplay/defaultshader/Locations.js\").default}\n     */\n    this.defaultLocations = null;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.opacity = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.originX = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.originY = undefined;\n\n    /**\n     * @protected\n     * @type {boolean|undefined}\n     */\n    this.rotateWithView = undefined;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.rotation = undefined;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.scale = undefined;\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.width = undefined;\n  }\n\n  if ( WebGLReplay ) WebGLTextureReplay.__proto__ = WebGLReplay;\n  WebGLTextureReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n  WebGLTextureReplay.prototype.constructor = WebGLTextureReplay;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    var verticesBuffer = this.verticesBuffer;\n    var indicesBuffer = this.indicesBuffer;\n    var textures = this.getTextures(true);\n    var gl = context.getGL();\n    return function() {\n      if (!gl.isContextLost()) {\n        var i, ii;\n        for (i = 0, ii = textures.length; i < ii; ++i) {\n          gl.deleteTexture(textures[i]);\n        }\n      }\n      context.deleteBuffer(verticesBuffer);\n      context.deleteBuffer(indicesBuffer);\n    };\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @return {number} My end.\n   * @protected\n   */\n  WebGLTextureReplay.prototype.drawCoordinates = function drawCoordinates (flatCoordinates, offset, end, stride) {\n    var anchorX = /** @type {number} */ (this.anchorX);\n    var anchorY = /** @type {number} */ (this.anchorY);\n    var height = /** @type {number} */ (this.height);\n    var imageHeight = /** @type {number} */ (this.imageHeight);\n    var imageWidth = /** @type {number} */ (this.imageWidth);\n    var opacity = /** @type {number} */ (this.opacity);\n    var originX = /** @type {number} */ (this.originX);\n    var originY = /** @type {number} */ (this.originY);\n    var rotateWithView = this.rotateWithView ? 1.0 : 0.0;\n    // this.rotation_ is anti-clockwise, but rotation is clockwise\n    var rotation = /** @type {number} */ (-this.rotation);\n    var scale = /** @type {number} */ (this.scale);\n    var width = /** @type {number} */ (this.width);\n    var cos = Math.cos(rotation);\n    var sin = Math.sin(rotation);\n    var numIndices = this.indices.length;\n    var numVertices = this.vertices.length;\n    var i, n, offsetX, offsetY, x, y;\n    for (i = offset; i < end; i += stride) {\n      x = flatCoordinates[i] - this.origin[0];\n      y = flatCoordinates[i + 1] - this.origin[1];\n\n      // There are 4 vertices per [x, y] point, one for each corner of the\n      // rectangle we're going to draw. We'd use 1 vertex per [x, y] point if\n      // WebGL supported Geometry Shaders (which can emit new vertices), but that\n      // is not currently the case.\n      //\n      // And each vertex includes 8 values: the x and y coordinates, the x and\n      // y offsets used to calculate the position of the corner, the u and\n      // v texture coordinates for the corner, the opacity, and whether the\n      // the image should be rotated with the view (rotateWithView).\n\n      n = numVertices / 8;\n\n      // bottom-left corner\n      offsetX = -scale * anchorX;\n      offsetY = -scale * (height - anchorY);\n      this.vertices[numVertices++] = x;\n      this.vertices[numVertices++] = y;\n      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n      this.vertices[numVertices++] = originX / imageWidth;\n      this.vertices[numVertices++] = (originY + height) / imageHeight;\n      this.vertices[numVertices++] = opacity;\n      this.vertices[numVertices++] = rotateWithView;\n\n      // bottom-right corner\n      offsetX = scale * (width - anchorX);\n      offsetY = -scale * (height - anchorY);\n      this.vertices[numVertices++] = x;\n      this.vertices[numVertices++] = y;\n      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n      this.vertices[numVertices++] = (originX + width) / imageWidth;\n      this.vertices[numVertices++] = (originY + height) / imageHeight;\n      this.vertices[numVertices++] = opacity;\n      this.vertices[numVertices++] = rotateWithView;\n\n      // top-right corner\n      offsetX = scale * (width - anchorX);\n      offsetY = scale * anchorY;\n      this.vertices[numVertices++] = x;\n      this.vertices[numVertices++] = y;\n      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n      this.vertices[numVertices++] = (originX + width) / imageWidth;\n      this.vertices[numVertices++] = originY / imageHeight;\n      this.vertices[numVertices++] = opacity;\n      this.vertices[numVertices++] = rotateWithView;\n\n      // top-left corner\n      offsetX = -scale * anchorX;\n      offsetY = scale * anchorY;\n      this.vertices[numVertices++] = x;\n      this.vertices[numVertices++] = y;\n      this.vertices[numVertices++] = offsetX * cos - offsetY * sin;\n      this.vertices[numVertices++] = offsetX * sin + offsetY * cos;\n      this.vertices[numVertices++] = originX / imageWidth;\n      this.vertices[numVertices++] = originY / imageHeight;\n      this.vertices[numVertices++] = opacity;\n      this.vertices[numVertices++] = rotateWithView;\n\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = n + 1;\n      this.indices[numIndices++] = n + 2;\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = n + 2;\n      this.indices[numIndices++] = n + 3;\n    }\n\n    return numVertices;\n  };\n\n  /**\n   * @protected\n   * @param {Array<WebGLTexture>} textures Textures.\n   * @param {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>} images Images.\n   * @param {!Object<string, WebGLTexture>} texturePerImage Texture cache.\n   * @param {WebGLRenderingContext} gl Gl.\n   */\n  WebGLTextureReplay.prototype.createTextures = function createTextures (textures, images, texturePerImage, gl) {\n    var texture, image, uid, i;\n    var ii = images.length;\n    for (i = 0; i < ii; ++i) {\n      image = images[i];\n\n      uid = getUid(image);\n      if (uid in texturePerImage) {\n        texture = texturePerImage[uid];\n      } else {\n        texture = createTexture(\n          gl, image, CLAMP_TO_EDGE, CLAMP_TO_EDGE);\n        texturePerImage[uid] = texture;\n      }\n      textures[i] = texture;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n    // get the program\n    var program = context.getProgram(fragment, vertex);\n\n    // get the locations\n    var locations;\n    if (!this.defaultLocations) {\n      locations = new Locations(gl, program);\n      this.defaultLocations = locations;\n    } else {\n      locations = this.defaultLocations;\n    }\n\n    // use the program (FIXME: use the return value)\n    context.useProgram(program);\n\n    // enable the vertex attrib arrays\n    gl.enableVertexAttribArray(locations.a_position);\n    gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n      false, 32, 0);\n\n    gl.enableVertexAttribArray(locations.a_offsets);\n    gl.vertexAttribPointer(locations.a_offsets, 2, FLOAT,\n      false, 32, 8);\n\n    gl.enableVertexAttribArray(locations.a_texCoord);\n    gl.vertexAttribPointer(locations.a_texCoord, 2, FLOAT,\n      false, 32, 16);\n\n    gl.enableVertexAttribArray(locations.a_opacity);\n    gl.vertexAttribPointer(locations.a_opacity, 1, FLOAT,\n      false, 32, 24);\n\n    gl.enableVertexAttribArray(locations.a_rotateWithView);\n    gl.vertexAttribPointer(locations.a_rotateWithView, 1, FLOAT,\n      false, 32, 28);\n\n    return locations;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n    gl.disableVertexAttribArray(locations.a_position);\n    gl.disableVertexAttribArray(locations.a_offsets);\n    gl.disableVertexAttribArray(locations.a_texCoord);\n    gl.disableVertexAttribArray(locations.a_opacity);\n    gl.disableVertexAttribArray(locations.a_rotateWithView);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n    var textures = hitDetection ? this.getHitDetectionTextures() : this.getTextures();\n    var groupIndices = hitDetection ? this.hitDetectionGroupIndices : this.groupIndices;\n\n    if (!isEmpty(skippedFeaturesHash)) {\n      this.drawReplaySkipping(gl, context, skippedFeaturesHash, textures, groupIndices);\n    } else {\n      var i, ii, start;\n      for (i = 0, ii = textures.length, start = 0; i < ii; ++i) {\n        gl.bindTexture(TEXTURE_2D, textures[i]);\n        var end = groupIndices[i];\n        this.drawElements(gl, context, start, end);\n        start = end;\n      }\n    }\n  };\n\n  /**\n   * Draw the replay while paying attention to skipped features.\n   *\n   * This functions creates groups of features that can be drawn to together,\n   * so that the number of `drawElements` calls is minimized.\n   *\n   * For example given the following texture groups:\n   *\n   *    Group 1: A B C\n   *    Group 2: D [E] F G\n   *\n   * If feature E should be skipped, the following `drawElements` calls will be\n   * made:\n   *\n   *    drawElements with feature A, B and C\n   *    drawElements with feature D\n   *    drawElements with feature F and G\n   *\n   * @protected\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features\n   *  to skip.\n   * @param {Array<WebGLTexture>} textures Textures.\n   * @param {Array<number>} groupIndices Texture group indices.\n   */\n  WebGLTextureReplay.prototype.drawReplaySkipping = function drawReplaySkipping (gl, context, skippedFeaturesHash, textures, groupIndices) {\n    var featureIndex = 0;\n\n    var i, ii;\n    for (i = 0, ii = textures.length; i < ii; ++i) {\n      gl.bindTexture(TEXTURE_2D, textures[i]);\n      var groupStart = (i > 0) ? groupIndices[i - 1] : 0;\n      var groupEnd = groupIndices[i];\n\n      var start = groupStart;\n      var end = groupStart;\n      while (featureIndex < this.startIndices.length &&\n          this.startIndices[featureIndex] <= groupEnd) {\n        var feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)] !== undefined) {\n          // feature should be skipped\n          if (start !== end) {\n            // draw the features so far\n            this.drawElements(gl, context, start, end);\n          }\n          // continue with the next feature\n          start = (featureIndex === this.startIndices.length - 1) ?\n            groupEnd : this.startIndices[featureIndex + 1];\n          end = start;\n        } else {\n          // the feature is not skipped, augment the end index\n          end = (featureIndex === this.startIndices.length - 1) ?\n            groupEnd : this.startIndices[featureIndex + 1];\n        }\n        featureIndex++;\n      }\n\n      if (start !== end) {\n        // draw the remaining features (in case there was no skipped feature\n        // in this texture group, all features of a group are drawn together)\n        this.drawElements(gl, context, start, end);\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n    var i, groupStart, start, end, feature;\n    var featureIndex = this.startIndices.length - 1;\n    var hitDetectionTextures = this.getHitDetectionTextures();\n    for (i = hitDetectionTextures.length - 1; i >= 0; --i) {\n      gl.bindTexture(TEXTURE_2D, hitDetectionTextures[i]);\n      groupStart = (i > 0) ? this.hitDetectionGroupIndices[i - 1] : 0;\n      end = this.hitDetectionGroupIndices[i];\n\n      // draw all features for this texture group\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        start = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)] === undefined &&\n            feature.getGeometry() &&\n            (opt_hitExtent === undefined || intersects(\n              /** @type {Array<number>} */ (opt_hitExtent),\n              feature.getGeometry().getExtent()))) {\n          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n          this.drawElements(gl, context, start, end);\n\n          var result = featureCallback(feature);\n          if (result) {\n            return result;\n          }\n        }\n\n        end = start;\n        featureIndex--;\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextureReplay.prototype.finish = function finish (context) {\n    this.anchorX = undefined;\n    this.anchorY = undefined;\n    this.height = undefined;\n    this.imageHeight = undefined;\n    this.imageWidth = undefined;\n    this.indices = null;\n    this.opacity = undefined;\n    this.originX = undefined;\n    this.originY = undefined;\n    this.rotateWithView = undefined;\n    this.rotation = undefined;\n    this.scale = undefined;\n    this.vertices = null;\n    this.width = undefined;\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @param {boolean=} opt_all Return hit detection textures with regular ones.\n   * @return {Array<WebGLTexture>} Textures.\n   */\n  WebGLTextureReplay.prototype.getTextures = function getTextures (opt_all) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @protected\n   * @return {Array<WebGLTexture>} Textures.\n   */\n  WebGLTextureReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n    return abstract();\n  };\n\n  return WebGLTextureReplay;\n}(WebGLReplay));\n\n\nexport default WebGLTextureReplay;\n\n//# sourceMappingURL=TextureReplay.js.map","/**\n * @module ol/render/webgl/ImageReplay\n */\nimport {getUid} from '../../util.js';\nimport WebGLTextureReplay from './TextureReplay.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\nvar WebGLImageReplay = /*@__PURE__*/(function (WebGLTextureReplay) {\n  function WebGLImageReplay(tolerance, maxExtent) {\n    WebGLTextureReplay.call(this, tolerance, maxExtent);\n\n    /**\n     * @type {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}\n     * @protected\n     */\n    this.images_ = [];\n\n    /**\n     * @type {Array<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}\n     * @protected\n     */\n    this.hitDetectionImages_ = [];\n\n    /**\n     * @type {Array<WebGLTexture>}\n     * @private\n     */\n    this.textures_ = [];\n\n    /**\n     * @type {Array<WebGLTexture>}\n     * @private\n     */\n    this.hitDetectionTextures_ = [];\n\n  }\n\n  if ( WebGLTextureReplay ) WebGLImageReplay.__proto__ = WebGLTextureReplay;\n  WebGLImageReplay.prototype = Object.create( WebGLTextureReplay && WebGLTextureReplay.prototype );\n  WebGLImageReplay.prototype.constructor = WebGLImageReplay;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.drawMultiPoint = function drawMultiPoint (multiPointGeometry, feature) {\n    this.startIndices.push(this.indices.length);\n    this.startIndicesFeature.push(feature);\n    var flatCoordinates = multiPointGeometry.getFlatCoordinates();\n    var stride = multiPointGeometry.getStride();\n    this.drawCoordinates(\n      flatCoordinates, 0, flatCoordinates.length, stride);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.drawPoint = function drawPoint (pointGeometry, feature) {\n    this.startIndices.push(this.indices.length);\n    this.startIndicesFeature.push(feature);\n    var flatCoordinates = pointGeometry.getFlatCoordinates();\n    var stride = pointGeometry.getStride();\n    this.drawCoordinates(\n      flatCoordinates, 0, flatCoordinates.length, stride);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.finish = function finish (context) {\n    var gl = context.getGL();\n\n    this.groupIndices.push(this.indices.length);\n    this.hitDetectionGroupIndices.push(this.indices.length);\n\n    // create, bind, and populate the vertices buffer\n    this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n    var indices = this.indices;\n\n    // create, bind, and populate the indices buffer\n    this.indicesBuffer = new WebGLBuffer(indices);\n\n    // create textures\n    /** @type {Object<string, WebGLTexture>} */\n    var texturePerImage = {};\n\n    this.createTextures(this.textures_, this.images_, texturePerImage, gl);\n\n    this.createTextures(this.hitDetectionTextures_, this.hitDetectionImages_,\n      texturePerImage, gl);\n\n    this.images_ = null;\n    this.hitDetectionImages_ = null;\n    WebGLTextureReplay.prototype.finish.call(this, context);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.setImageStyle = function setImageStyle (imageStyle) {\n    var anchor = imageStyle.getAnchor();\n    var image = imageStyle.getImage(1);\n    var imageSize = imageStyle.getImageSize();\n    var hitDetectionImage = imageStyle.getHitDetectionImage(1);\n    var opacity = imageStyle.getOpacity();\n    var origin = imageStyle.getOrigin();\n    var rotateWithView = imageStyle.getRotateWithView();\n    var rotation = imageStyle.getRotation();\n    var size = imageStyle.getSize();\n    var scale = imageStyle.getScale();\n\n    var currentImage;\n    if (this.images_.length === 0) {\n      this.images_.push(image);\n    } else {\n      currentImage = this.images_[this.images_.length - 1];\n      if (getUid(currentImage) != getUid(image)) {\n        this.groupIndices.push(this.indices.length);\n        this.images_.push(image);\n      }\n    }\n\n    if (this.hitDetectionImages_.length === 0) {\n      this.hitDetectionImages_.push(hitDetectionImage);\n    } else {\n      currentImage =\n          this.hitDetectionImages_[this.hitDetectionImages_.length - 1];\n      if (getUid(currentImage) != getUid(hitDetectionImage)) {\n        this.hitDetectionGroupIndices.push(this.indices.length);\n        this.hitDetectionImages_.push(hitDetectionImage);\n      }\n    }\n\n    this.anchorX = anchor[0];\n    this.anchorY = anchor[1];\n    this.height = size[1];\n    this.imageHeight = imageSize[1];\n    this.imageWidth = imageSize[0];\n    this.opacity = opacity;\n    this.originX = origin[0];\n    this.originY = origin[1];\n    this.rotation = rotation;\n    this.rotateWithView = rotateWithView;\n    this.scale = scale;\n    this.width = size[0];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.getTextures = function getTextures (opt_all) {\n    return opt_all ? this.textures_.concat(this.hitDetectionTextures_) : this.textures_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n    return this.hitDetectionTextures_;\n  };\n\n  return WebGLImageReplay;\n}(WebGLTextureReplay));\n\n\nexport default WebGLImageReplay;\n\n//# sourceMappingURL=ImageReplay.js.map","/**\n * @module ol/geom/flat/topology\n */\nimport {linearRing as linearRingArea} from './area.js';\n\n/**\n * Check if the linestring is a boundary.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {boolean} The linestring is a boundary.\n */\nexport function lineStringIsClosed(flatCoordinates, offset, end, stride) {\n  var lastCoord = end - stride;\n  if (flatCoordinates[offset] === flatCoordinates[lastCoord] &&\n      flatCoordinates[offset + 1] === flatCoordinates[lastCoord + 1] && (end - offset) / stride > 3) {\n    return !!linearRingArea(flatCoordinates, offset, end, stride);\n  }\n  return false;\n}\n\n//# sourceMappingURL=topology.js.map","/**\n * @module ol/render/webgl/linestringreplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\nvarying float v_round;\\nvarying vec2 v_roundVertex;\\nvarying float v_halfWidth;\\n\\n\\n\\nuniform float u_opacity;\\nuniform vec4 u_color;\\nuniform vec2 u_size;\\nuniform float u_pixelRatio;\\n\\nvoid main(void) {\\n  if (v_round > 0.0) {\\n    vec2 windowCoords = vec2((v_roundVertex.x + 1.0) / 2.0 * u_size.x * u_pixelRatio,\\n        (v_roundVertex.y + 1.0) / 2.0 * u_size.y * u_pixelRatio);\\n    if (length(windowCoords - gl_FragCoord.xy) > v_halfWidth * u_pixelRatio) {\\n      discard;\\n    }\\n  }\\n  gl_FragColor = u_color;\\n  float alpha = u_color.a * u_opacity;\\n  if (alpha == 0.0) {\\n    discard;\\n  }\\n  gl_FragColor.a = alpha;\\n}\\n' :\n  'precision mediump float;varying float a;varying vec2 aVertex;varying float c;uniform float m;uniform vec4 n;uniform vec2 o;uniform float p;void main(void){if(a>0.0){vec2 windowCoords=vec2((aVertex.x+1.0)/2.0*o.x*p,(aVertex.y+1.0)/2.0*o.y*p);if(length(windowCoords-gl_FragCoord.xy)>c*p){discard;}} gl_FragColor=n;float alpha=n.a*m;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  'varying float v_round;\\nvarying vec2 v_roundVertex;\\nvarying float v_halfWidth;\\n\\n\\nattribute vec2 a_lastPos;\\nattribute vec2 a_position;\\nattribute vec2 a_nextPos;\\nattribute float a_direction;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\nuniform float u_lineWidth;\\nuniform float u_miterLimit;\\n\\nbool nearlyEquals(in float value, in float ref) {\\n  float epsilon = 0.000000000001;\\n  return value >= ref - epsilon && value <= ref + epsilon;\\n}\\n\\nvoid alongNormal(out vec2 offset, in vec2 nextP, in float turnDir, in float direction) {\\n  vec2 dirVect = nextP - a_position;\\n  vec2 normal = normalize(vec2(-turnDir * dirVect.y, turnDir * dirVect.x));\\n  offset = u_lineWidth / 2.0 * normal * direction;\\n}\\n\\nvoid miterUp(out vec2 offset, out float round, in bool isRound, in float direction) {\\n  float halfWidth = u_lineWidth / 2.0;\\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\\n  vec2 normal = vec2(-tangent.y, tangent.x);\\n  vec2 dirVect = a_nextPos - a_position;\\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\\n  float miterLength = abs(halfWidth / dot(normal, tmpNormal));\\n  offset = normal * direction * miterLength;\\n  round = 0.0;\\n  if (isRound) {\\n    round = 1.0;\\n  } else if (miterLength > u_miterLimit + u_lineWidth) {\\n    offset = halfWidth * tmpNormal * direction;\\n  }\\n}\\n\\nbool miterDown(out vec2 offset, in vec4 projPos, in mat4 offsetMatrix, in float direction) {\\n  bool degenerate = false;\\n  vec2 tangent = normalize(normalize(a_nextPos - a_position) + normalize(a_position - a_lastPos));\\n  vec2 normal = vec2(-tangent.y, tangent.x);\\n  vec2 dirVect = a_lastPos - a_position;\\n  vec2 tmpNormal = normalize(vec2(-dirVect.y, dirVect.x));\\n  vec2 longOffset, shortOffset, longVertex;\\n  vec4 shortProjVertex;\\n  float halfWidth = u_lineWidth / 2.0;\\n  if (length(a_nextPos - a_position) > length(a_lastPos - a_position)) {\\n    longOffset = tmpNormal * direction * halfWidth;\\n    shortOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\\n    longVertex = a_nextPos;\\n    shortProjVertex = u_projectionMatrix * vec4(a_lastPos, 0.0, 1.0);\\n  } else {\\n    shortOffset = tmpNormal * direction * halfWidth;\\n    longOffset = normalize(vec2(dirVect.y, -dirVect.x)) * direction * halfWidth;\\n    longVertex = a_lastPos;\\n    shortProjVertex = u_projectionMatrix * vec4(a_nextPos, 0.0, 1.0);\\n  }\\n  //Intersection algorithm based on theory by Paul Bourke (http://paulbourke.net/geometry/pointlineplane/).\\n  vec4 p1 = u_projectionMatrix * vec4(longVertex, 0.0, 1.0) + offsetMatrix * vec4(longOffset, 0.0, 0.0);\\n  vec4 p2 = projPos + offsetMatrix * vec4(longOffset, 0.0, 0.0);\\n  vec4 p3 = shortProjVertex + offsetMatrix * vec4(-shortOffset, 0.0, 0.0);\\n  vec4 p4 = shortProjVertex + offsetMatrix * vec4(shortOffset, 0.0, 0.0);\\n  float denom = (p4.y - p3.y) * (p2.x - p1.x) - (p4.x - p3.x) * (p2.y - p1.y);\\n  float firstU = ((p4.x - p3.x) * (p1.y - p3.y) - (p4.y - p3.y) * (p1.x - p3.x)) / denom;\\n  float secondU = ((p2.x - p1.x) * (p1.y - p3.y) - (p2.y - p1.y) * (p1.x - p3.x)) / denom;\\n  float epsilon = 0.000000000001;\\n  if (firstU > epsilon && firstU < 1.0 - epsilon && secondU > epsilon && secondU < 1.0 - epsilon) {\\n    shortProjVertex.x = p1.x + firstU * (p2.x - p1.x);\\n    shortProjVertex.y = p1.y + firstU * (p2.y - p1.y);\\n    offset = shortProjVertex.xy;\\n    degenerate = true;\\n  } else {\\n    float miterLength = abs(halfWidth / dot(normal, tmpNormal));\\n    offset = normal * direction * miterLength;\\n  }\\n  return degenerate;\\n}\\n\\nvoid squareCap(out vec2 offset, out float round, in bool isRound, in vec2 nextP,\\n    in float turnDir, in float direction) {\\n  round = 0.0;\\n  vec2 dirVect = a_position - nextP;\\n  vec2 firstNormal = normalize(dirVect);\\n  vec2 secondNormal = vec2(turnDir * firstNormal.y * direction, -turnDir * firstNormal.x * direction);\\n  vec2 hypotenuse = normalize(firstNormal - secondNormal);\\n  vec2 normal = vec2(turnDir * hypotenuse.y * direction, -turnDir * hypotenuse.x * direction);\\n  float length = sqrt(v_halfWidth * v_halfWidth * 2.0);\\n  offset = normal * length;\\n  if (isRound) {\\n    round = 1.0;\\n  }\\n}\\n\\nvoid main(void) {\\n  bool degenerate = false;\\n  float direction = float(sign(a_direction));\\n  mat4 offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\\n  vec2 offset;\\n  vec4 projPos = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\\n  bool round = nearlyEquals(mod(a_direction, 2.0), 0.0);\\n\\n  v_round = 0.0;\\n  v_halfWidth = u_lineWidth / 2.0;\\n  v_roundVertex = projPos.xy;\\n\\n  if (nearlyEquals(mod(a_direction, 3.0), 0.0) || nearlyEquals(mod(a_direction, 17.0), 0.0)) {\\n    alongNormal(offset, a_nextPos, 1.0, direction);\\n  } else if (nearlyEquals(mod(a_direction, 5.0), 0.0) || nearlyEquals(mod(a_direction, 13.0), 0.0)) {\\n    alongNormal(offset, a_lastPos, -1.0, direction);\\n  } else if (nearlyEquals(mod(a_direction, 23.0), 0.0)) {\\n    miterUp(offset, v_round, round, direction);\\n  } else if (nearlyEquals(mod(a_direction, 19.0), 0.0)) {\\n    degenerate = miterDown(offset, projPos, offsetMatrix, direction);\\n  } else if (nearlyEquals(mod(a_direction, 7.0), 0.0)) {\\n    squareCap(offset, v_round, round, a_nextPos, 1.0, direction);\\n  } else if (nearlyEquals(mod(a_direction, 11.0), 0.0)) {\\n    squareCap(offset, v_round, round, a_lastPos, -1.0, direction);\\n  }\\n  if (!degenerate) {\\n    vec4 offsets = offsetMatrix * vec4(offset, 0.0, 0.0);\\n    gl_Position = projPos + offsets;\\n  } else {\\n    gl_Position = vec4(offset, 0.0, 1.0);\\n  }\\n}\\n\\n\\n' :\n  'varying float a;varying vec2 aVertex;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;aVertex=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/linestringreplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_projectionMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetScaleMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetRotateMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_lineWidth = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_lineWidth' : 'k');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_miterLimit = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_miterLimit' : 'l');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_opacity = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_opacity' : 'm');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_color = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_color' : 'n');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_size = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_size' : 'o');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_pixelRatio = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_pixelRatio' : 'p');\n\n  /**\n   * @type {number}\n   */\n  this.a_lastPos = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_lastPos' : 'd');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'e');\n\n  /**\n   * @type {number}\n   */\n  this.a_nextPos = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_nextPos' : 'f');\n\n  /**\n   * @type {number}\n   */\n  this.a_direction = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_direction' : 'g');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/render/webgl/LineStringReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {linearRingIsClockwise} from '../../geom/flat/orient.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {lineStringIsClosed} from '../../geom/flat/topology.js';\nimport {isEmpty} from '../../obj.js';\nimport {DEFAULT_LINECAP, DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET,\n  DEFAULT_LINEJOIN, DEFAULT_LINEWIDTH, DEFAULT_MITERLIMIT, DEFAULT_STROKESTYLE,\n  triangleIsCounterClockwise} from '../webgl.js';\nimport WebGLReplay from './Replay.js';\nimport {fragment, vertex} from './linestringreplay/defaultshader.js';\nimport Locations from './linestringreplay/defaultshader/Locations.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n\n/**\n * @enum {number}\n */\nvar Instruction = {\n  ROUND: 2,\n  BEGIN_LINE: 3,\n  END_LINE: 5,\n  BEGIN_LINE_CAP: 7,\n  END_LINE_CAP: 11,\n  BEVEL_FIRST: 13,\n  BEVEL_SECOND: 17,\n  MITER_BOTTOM: 19,\n  MITER_TOP: 23\n};\n\n\nvar WebGLLineStringReplay = /*@__PURE__*/(function (WebGLReplay) {\n  function WebGLLineStringReplay(tolerance, maxExtent) {\n    WebGLReplay.call(this, tolerance, maxExtent);\n\n    /**\n     * @private\n     * @type {import(\"./linestringreplay/defaultshader/Locations.js\").default}\n     */\n    this.defaultLocations_ = null;\n\n    /**\n     * @private\n     * @type {Array<Array<?>>}\n     */\n    this.styles_ = [];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.styleIndices_ = [];\n\n    /**\n     * @private\n     * @type {{strokeColor: (Array<number>|null),\n     *         lineCap: (string|undefined),\n     *         lineDash: Array<number>,\n     *         lineDashOffset: (number|undefined),\n     *         lineJoin: (string|undefined),\n     *         lineWidth: (number|undefined),\n     *         miterLimit: (number|undefined),\n     *         changed: boolean}|null}\n     */\n    this.state_ = {\n      strokeColor: null,\n      lineCap: undefined,\n      lineDash: null,\n      lineDashOffset: undefined,\n      lineJoin: undefined,\n      lineWidth: undefined,\n      miterLimit: undefined,\n      changed: false\n    };\n\n  }\n\n  if ( WebGLReplay ) WebGLLineStringReplay.__proto__ = WebGLReplay;\n  WebGLLineStringReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n  WebGLLineStringReplay.prototype.constructor = WebGLLineStringReplay;\n\n  /**\n   * Draw one segment.\n   * @private\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   */\n  WebGLLineStringReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, offset, end, stride) {\n\n    var i, ii;\n    var numVertices = this.vertices.length;\n    var numIndices = this.indices.length;\n    //To save a vertex, the direction of a point is a product of the sign (1 or -1), a prime from\n    //Instruction, and a rounding factor (1 or 2). If the product is even,\n    //we round it. If it is odd, we don't.\n    var lineJoin = this.state_.lineJoin === 'bevel' ? 0 :\n      this.state_.lineJoin === 'miter' ? 1 : 2;\n    var lineCap = this.state_.lineCap === 'butt' ? 0 :\n      this.state_.lineCap === 'square' ? 1 : 2;\n    var closed = lineStringIsClosed(flatCoordinates, offset, end, stride);\n    var startCoords, sign, n;\n    var lastIndex = numIndices;\n    var lastSign = 1;\n    //We need the adjacent vertices to define normals in joins. p0 = last, p1 = current, p2 = next.\n    var p0, p1, p2;\n\n    for (i = offset, ii = end; i < ii; i += stride) {\n\n      n = numVertices / 7;\n\n      p0 = p1;\n      p1 = p2 || [flatCoordinates[i], flatCoordinates[i + 1]];\n      //First vertex.\n      if (i === offset) {\n        p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];\n        if (end - offset === stride * 2 && equals(p1, p2)) {\n          break;\n        }\n        if (closed) {\n          //A closed line! Complete the circle.\n          p0 = [flatCoordinates[end - stride * 2],\n            flatCoordinates[end - stride * 2 + 1]];\n\n          startCoords = p2;\n        } else {\n          //Add the first two/four vertices.\n\n          if (lineCap) {\n            numVertices = this.addVertices_([0, 0], p1, p2,\n              lastSign * Instruction.BEGIN_LINE_CAP * lineCap, numVertices);\n\n            numVertices = this.addVertices_([0, 0], p1, p2,\n              -lastSign * Instruction.BEGIN_LINE_CAP * lineCap, numVertices);\n\n            this.indices[numIndices++] = n + 2;\n            this.indices[numIndices++] = n;\n            this.indices[numIndices++] = n + 1;\n\n            this.indices[numIndices++] = n + 1;\n            this.indices[numIndices++] = n + 3;\n            this.indices[numIndices++] = n + 2;\n\n          }\n\n          numVertices = this.addVertices_([0, 0], p1, p2,\n            lastSign * Instruction.BEGIN_LINE * (lineCap || 1), numVertices);\n\n          numVertices = this.addVertices_([0, 0], p1, p2,\n            -lastSign * Instruction.BEGIN_LINE * (lineCap || 1), numVertices);\n\n          lastIndex = numVertices / 7 - 1;\n\n          continue;\n        }\n      } else if (i === end - stride) {\n        //Last vertex.\n        if (closed) {\n          //Same as the first vertex.\n          p2 = startCoords;\n          break;\n        } else {\n          p0 = p0 || [0, 0];\n\n          numVertices = this.addVertices_(p0, p1, [0, 0],\n            lastSign * Instruction.END_LINE * (lineCap || 1), numVertices);\n\n          numVertices = this.addVertices_(p0, p1, [0, 0],\n            -lastSign * Instruction.END_LINE * (lineCap || 1), numVertices);\n\n          this.indices[numIndices++] = n;\n          this.indices[numIndices++] = lastIndex - 1;\n          this.indices[numIndices++] = lastIndex;\n\n          this.indices[numIndices++] = lastIndex;\n          this.indices[numIndices++] = n + 1;\n          this.indices[numIndices++] = n;\n\n          if (lineCap) {\n            numVertices = this.addVertices_(p0, p1, [0, 0],\n              lastSign * Instruction.END_LINE_CAP * lineCap, numVertices);\n\n            numVertices = this.addVertices_(p0, p1, [0, 0],\n              -lastSign * Instruction.END_LINE_CAP * lineCap, numVertices);\n\n            this.indices[numIndices++] = n + 2;\n            this.indices[numIndices++] = n;\n            this.indices[numIndices++] = n + 1;\n\n            this.indices[numIndices++] = n + 1;\n            this.indices[numIndices++] = n + 3;\n            this.indices[numIndices++] = n + 2;\n\n          }\n\n          break;\n        }\n      } else {\n        p2 = [flatCoordinates[i + stride], flatCoordinates[i + stride + 1]];\n      }\n\n      // We group CW and straight lines, thus the not so inituitive CCW checking function.\n      sign = triangleIsCounterClockwise(p0[0], p0[1], p1[0], p1[1], p2[0], p2[1])\n        ? -1 : 1;\n\n      numVertices = this.addVertices_(p0, p1, p2,\n        sign * Instruction.BEVEL_FIRST * (lineJoin || 1), numVertices);\n\n      numVertices = this.addVertices_(p0, p1, p2,\n        sign * Instruction.BEVEL_SECOND * (lineJoin || 1), numVertices);\n\n      numVertices = this.addVertices_(p0, p1, p2,\n        -sign * Instruction.MITER_BOTTOM * (lineJoin || 1), numVertices);\n\n      if (i > offset) {\n        this.indices[numIndices++] = n;\n        this.indices[numIndices++] = lastIndex - 1;\n        this.indices[numIndices++] = lastIndex;\n\n        this.indices[numIndices++] = n + 2;\n        this.indices[numIndices++] = n;\n        this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;\n      }\n\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = n + 2;\n      this.indices[numIndices++] = n + 1;\n\n      lastIndex = n + 2;\n      lastSign = sign;\n\n      //Add miter\n      if (lineJoin) {\n        numVertices = this.addVertices_(p0, p1, p2,\n          sign * Instruction.MITER_TOP * lineJoin, numVertices);\n\n        this.indices[numIndices++] = n + 1;\n        this.indices[numIndices++] = n + 3;\n        this.indices[numIndices++] = n;\n      }\n    }\n\n    if (closed) {\n      n = n || numVertices / 7;\n      sign = linearRingIsClockwise([p0[0], p0[1], p1[0], p1[1], p2[0], p2[1]], 0, 6, 2)\n        ? 1 : -1;\n\n      numVertices = this.addVertices_(p0, p1, p2,\n        sign * Instruction.BEVEL_FIRST * (lineJoin || 1), numVertices);\n\n      numVertices = this.addVertices_(p0, p1, p2,\n        -sign * Instruction.MITER_BOTTOM * (lineJoin || 1), numVertices);\n\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = lastIndex - 1;\n      this.indices[numIndices++] = lastIndex;\n\n      this.indices[numIndices++] = n + 1;\n      this.indices[numIndices++] = n;\n      this.indices[numIndices++] = lastSign * sign > 0 ? lastIndex : lastIndex - 1;\n    }\n  };\n\n  /**\n   * @param {Array<number>} p0 Last coordinates.\n   * @param {Array<number>} p1 Current coordinates.\n   * @param {Array<number>} p2 Next coordinates.\n   * @param {number} product Sign, instruction, and rounding product.\n   * @param {number} numVertices Vertex counter.\n   * @return {number} Vertex counter.\n   * @private\n   */\n  WebGLLineStringReplay.prototype.addVertices_ = function addVertices_ (p0, p1, p2, product, numVertices) {\n    this.vertices[numVertices++] = p0[0];\n    this.vertices[numVertices++] = p0[1];\n    this.vertices[numVertices++] = p1[0];\n    this.vertices[numVertices++] = p1[1];\n    this.vertices[numVertices++] = p2[0];\n    this.vertices[numVertices++] = p2[1];\n    this.vertices[numVertices++] = product;\n\n    return numVertices;\n  };\n\n  /**\n   * Check if the linestring can be drawn (i. e. valid).\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   * @return {boolean} The linestring can be drawn.\n   * @private\n   */\n  WebGLLineStringReplay.prototype.isValid_ = function isValid_ (flatCoordinates, offset, end, stride) {\n    var range = end - offset;\n    if (range < stride * 2) {\n      return false;\n    } else if (range === stride * 2) {\n      var firstP = [flatCoordinates[offset], flatCoordinates[offset + 1]];\n      var lastP = [flatCoordinates[offset + stride], flatCoordinates[offset + stride + 1]];\n      return !equals(firstP, lastP);\n    }\n\n    return true;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.drawLineString = function drawLineString (lineStringGeometry, feature) {\n    var flatCoordinates = lineStringGeometry.getFlatCoordinates();\n    var stride = lineStringGeometry.getStride();\n    if (this.isValid_(flatCoordinates, 0, flatCoordinates.length, stride)) {\n      flatCoordinates = translate(flatCoordinates, 0, flatCoordinates.length,\n        stride, -this.origin[0], -this.origin[1]);\n      if (this.state_.changed) {\n        this.styleIndices_.push(this.indices.length);\n        this.state_.changed = false;\n      }\n      this.startIndices.push(this.indices.length);\n      this.startIndicesFeature.push(feature);\n      this.drawCoordinates_(\n        flatCoordinates, 0, flatCoordinates.length, stride);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.drawMultiLineString = function drawMultiLineString (multiLineStringGeometry, feature) {\n    var indexCount = this.indices.length;\n    var ends = multiLineStringGeometry.getEnds();\n    ends.unshift(0);\n    var flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n    var stride = multiLineStringGeometry.getStride();\n    var i, ii;\n    if (ends.length > 1) {\n      for (i = 1, ii = ends.length; i < ii; ++i) {\n        if (this.isValid_(flatCoordinates, ends[i - 1], ends[i], stride)) {\n          var lineString = translate(flatCoordinates, ends[i - 1], ends[i],\n            stride, -this.origin[0], -this.origin[1]);\n          this.drawCoordinates_(\n            lineString, 0, lineString.length, stride);\n        }\n      }\n    }\n    if (this.indices.length > indexCount) {\n      this.startIndices.push(indexCount);\n      this.startIndicesFeature.push(feature);\n      if (this.state_.changed) {\n        this.styleIndices_.push(indexCount);\n        this.state_.changed = false;\n      }\n    }\n  };\n\n  /**\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {Array<Array<number>>} holeFlatCoordinates Hole flat coordinates.\n   * @param {number} stride Stride.\n   */\n  WebGLLineStringReplay.prototype.drawPolygonCoordinates = function drawPolygonCoordinates (flatCoordinates, holeFlatCoordinates, stride) {\n    if (!lineStringIsClosed(flatCoordinates, 0, flatCoordinates.length, stride)) {\n      flatCoordinates.push(flatCoordinates[0]);\n      flatCoordinates.push(flatCoordinates[1]);\n    }\n    this.drawCoordinates_(flatCoordinates, 0, flatCoordinates.length, stride);\n    if (holeFlatCoordinates.length) {\n      var i, ii;\n      for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {\n        if (!lineStringIsClosed(holeFlatCoordinates[i], 0, holeFlatCoordinates[i].length, stride)) {\n          holeFlatCoordinates[i].push(holeFlatCoordinates[i][0]);\n          holeFlatCoordinates[i].push(holeFlatCoordinates[i][1]);\n        }\n        this.drawCoordinates_(holeFlatCoordinates[i], 0,\n          holeFlatCoordinates[i].length, stride);\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n   * @param {number=} opt_index Index count.\n   */\n  WebGLLineStringReplay.prototype.setPolygonStyle = function setPolygonStyle (feature, opt_index) {\n    var index = opt_index === undefined ? this.indices.length : opt_index;\n    this.startIndices.push(index);\n    this.startIndicesFeature.push(feature);\n    if (this.state_.changed) {\n      this.styleIndices_.push(index);\n      this.state_.changed = false;\n    }\n  };\n\n  /**\n   * @return {number} Current index.\n   */\n  WebGLLineStringReplay.prototype.getCurrentIndex = function getCurrentIndex () {\n    return this.indices.length;\n  };\n\n  /**\n   * @inheritDoc\n   **/\n  WebGLLineStringReplay.prototype.finish = function finish (context) {\n    // create, bind, and populate the vertices buffer\n    this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n    // create, bind, and populate the indices buffer\n    this.indicesBuffer = new WebGLBuffer(this.indices);\n\n    this.startIndices.push(this.indices.length);\n\n    //Clean up, if there is nothing to draw\n    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n      this.styles_ = [];\n    }\n\n    this.vertices = null;\n    this.indices = null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    var verticesBuffer = this.verticesBuffer;\n    var indicesBuffer = this.indicesBuffer;\n    return function() {\n      context.deleteBuffer(verticesBuffer);\n      context.deleteBuffer(indicesBuffer);\n    };\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n    // get the program\n    var program = context.getProgram(fragment, vertex);\n\n    // get the locations\n    var locations;\n    if (!this.defaultLocations_) {\n      locations = new Locations(gl, program);\n      this.defaultLocations_ = locations;\n    } else {\n      locations = this.defaultLocations_;\n    }\n\n    context.useProgram(program);\n\n    // enable the vertex attrib arrays\n    gl.enableVertexAttribArray(locations.a_lastPos);\n    gl.vertexAttribPointer(locations.a_lastPos, 2, FLOAT,\n      false, 28, 0);\n\n    gl.enableVertexAttribArray(locations.a_position);\n    gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n      false, 28, 8);\n\n    gl.enableVertexAttribArray(locations.a_nextPos);\n    gl.vertexAttribPointer(locations.a_nextPos, 2, FLOAT,\n      false, 28, 16);\n\n    gl.enableVertexAttribArray(locations.a_direction);\n    gl.vertexAttribPointer(locations.a_direction, 1, FLOAT,\n      false, 28, 24);\n\n    // Enable renderer specific uniforms.\n    gl.uniform2fv(locations.u_size, size);\n    gl.uniform1f(locations.u_pixelRatio, pixelRatio);\n\n    return locations;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n    gl.disableVertexAttribArray(locations.a_lastPos);\n    gl.disableVertexAttribArray(locations.a_position);\n    gl.disableVertexAttribArray(locations.a_nextPos);\n    gl.disableVertexAttribArray(locations.a_direction);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n    //Save GL parameters.\n    var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));\n    var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));\n\n    if (!hitDetection) {\n      gl.enable(gl.DEPTH_TEST);\n      gl.depthMask(true);\n      gl.depthFunc(gl.NOTEQUAL);\n    }\n\n    if (!isEmpty(skippedFeaturesHash)) {\n      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n    } else {\n      //Draw by style groups to minimize drawElements() calls.\n      var i, start, end, nextStyle;\n      end = this.startIndices[this.startIndices.length - 1];\n      for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n        start = this.styleIndices_[i];\n        nextStyle = this.styles_[i];\n        this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n        this.drawElements(gl, context, start, end);\n        gl.clear(gl.DEPTH_BUFFER_BIT);\n        end = start;\n      }\n    }\n    if (!hitDetection) {\n      gl.disable(gl.DEPTH_TEST);\n      gl.clear(gl.DEPTH_BUFFER_BIT);\n      //Restore GL parameters.\n      gl.depthMask(tmpDepthMask);\n      gl.depthFunc(tmpDepthFunc);\n    }\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object} skippedFeaturesHash Ids of features to skip.\n   */\n  WebGLLineStringReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n    featureIndex = this.startIndices.length - 2;\n    end = start = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        featureStart = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)]) {\n          if (start !== end) {\n            this.drawElements(gl, context, start, end);\n            gl.clear(gl.DEPTH_BUFFER_BIT);\n          }\n          end = featureStart;\n        }\n        featureIndex--;\n        start = featureStart;\n      }\n      if (start !== end) {\n        this.drawElements(gl, context, start, end);\n        gl.clear(gl.DEPTH_BUFFER_BIT);\n      }\n      start = end = groupStart;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex;\n    featureIndex = this.startIndices.length - 2;\n    end = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setStrokeStyle_(gl, nextStyle[0], nextStyle[1], nextStyle[2]);\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        start = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)] === undefined &&\n            feature.getGeometry() &&\n            (opt_hitExtent === undefined || intersects(\n              /** @type {Array<number>} */ (opt_hitExtent),\n              feature.getGeometry().getExtent()))) {\n          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n          this.drawElements(gl, context, start, end);\n\n          var result = featureCallback(feature);\n\n          if (result) {\n            return result;\n          }\n\n        }\n        featureIndex--;\n        end = start;\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {Array<number>} color Color.\n   * @param {number} lineWidth Line width.\n   * @param {number} miterLimit Miter limit.\n   */\n  WebGLLineStringReplay.prototype.setStrokeStyle_ = function setStrokeStyle_ (gl, color, lineWidth, miterLimit) {\n    gl.uniform4fv(this.defaultLocations_.u_color, color);\n    gl.uniform1f(this.defaultLocations_.u_lineWidth, lineWidth);\n    gl.uniform1f(this.defaultLocations_.u_miterLimit, miterLimit);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLLineStringReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    var strokeStyleLineCap = strokeStyle.getLineCap();\n    this.state_.lineCap = strokeStyleLineCap !== undefined ?\n      strokeStyleLineCap : DEFAULT_LINECAP;\n    var strokeStyleLineDash = strokeStyle.getLineDash();\n    this.state_.lineDash = strokeStyleLineDash ?\n      strokeStyleLineDash : DEFAULT_LINEDASH;\n    var strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n    this.state_.lineDashOffset = strokeStyleLineDashOffset ?\n      strokeStyleLineDashOffset : DEFAULT_LINEDASHOFFSET;\n    var strokeStyleLineJoin = strokeStyle.getLineJoin();\n    this.state_.lineJoin = strokeStyleLineJoin !== undefined ?\n      strokeStyleLineJoin : DEFAULT_LINEJOIN;\n    var strokeStyleColor = strokeStyle.getColor();\n    if (!(strokeStyleColor instanceof CanvasGradient) &&\n        !(strokeStyleColor instanceof CanvasPattern)) {\n      strokeStyleColor = asArray(strokeStyleColor).map(function(c, i) {\n        return i != 3 ? c / 255 : c;\n      }) || DEFAULT_STROKESTYLE;\n    } else {\n      strokeStyleColor = DEFAULT_STROKESTYLE;\n    }\n    var strokeStyleWidth = strokeStyle.getWidth();\n    strokeStyleWidth = strokeStyleWidth !== undefined ?\n      strokeStyleWidth : DEFAULT_LINEWIDTH;\n    var strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n    strokeStyleMiterLimit = strokeStyleMiterLimit !== undefined ?\n      strokeStyleMiterLimit : DEFAULT_MITERLIMIT;\n    if (!this.state_.strokeColor || !equals(this.state_.strokeColor, strokeStyleColor) ||\n        this.state_.lineWidth !== strokeStyleWidth || this.state_.miterLimit !== strokeStyleMiterLimit) {\n      this.state_.changed = true;\n      this.state_.strokeColor = strokeStyleColor;\n      this.state_.lineWidth = strokeStyleWidth;\n      this.state_.miterLimit = strokeStyleMiterLimit;\n      this.styles_.push([strokeStyleColor, strokeStyleWidth, strokeStyleMiterLimit]);\n    }\n  };\n\n  return WebGLLineStringReplay;\n}(WebGLReplay));\n\n\nexport default WebGLLineStringReplay;\n\n//# sourceMappingURL=LineStringReplay.js.map","/**\n * @module ol/render/webgl/polygonreplay/defaultshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\nimport WebGLFragment from '../../../webgl/Fragment.js';\nimport WebGLVertex from '../../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\n\\n\\n\\nuniform vec4 u_color;\\nuniform float u_opacity;\\n\\nvoid main(void) {\\n  gl_FragColor = u_color;\\n  float alpha = u_color.a * u_opacity;\\n  if (alpha == 0.0) {\\n    discard;\\n  }\\n  gl_FragColor.a = alpha;\\n}\\n' :\n  'precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  '\\n\\nattribute vec2 a_position;\\n\\nuniform mat4 u_projectionMatrix;\\nuniform mat4 u_offsetScaleMatrix;\\nuniform mat4 u_offsetRotateMatrix;\\n\\nvoid main(void) {\\n  gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0);\\n}\\n\\n\\n' :\n  'attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}');\n\n//# sourceMappingURL=defaultshader.js.map","/**\n * @module ol/render/webgl/polygonreplay/defaultshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_projectionMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'b');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetScaleMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'c');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_offsetRotateMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'd');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_color = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_color' : 'e');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_opacity = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_opacity' : 'f');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'a');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/structs/LinkedList\n */\n\n\n/**\n * @typedef {Object} Item\n * @property {Item} [prev]\n * @property {Item} [next]\n * @property {?} data\n */\n\n/**\n * @classdesc\n * Creates an empty linked list structure.\n */\nvar LinkedList = function LinkedList(opt_circular) {\n\n  /**\n   * @private\n   * @type {Item|undefined}\n   */\n  this.first_;\n\n  /**\n   * @private\n   * @type {Item|undefined}\n   */\n  this.last_;\n\n  /**\n   * @private\n   * @type {Item|undefined}\n   */\n  this.head_;\n\n  /**\n   * @private\n   * @type {boolean}\n   */\n  this.circular_ = opt_circular === undefined ? true : opt_circular;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.length_ = 0;\n\n};\n\n/**\n * Inserts an item into the linked list right after the current one.\n *\n * @param {?} data Item data.\n */\nLinkedList.prototype.insertItem = function insertItem (data) {\n\n  /** @type {Item} */\n  var item = {\n    prev: undefined,\n    next: undefined,\n    data: data\n  };\n\n  var head = this.head_;\n\n  //Initialize the list.\n  if (!head) {\n    this.first_ = item;\n    this.last_ = item;\n    if (this.circular_) {\n      item.next = item;\n      item.prev = item;\n    }\n  } else {\n    //Link the new item to the adjacent ones.\n    var next = head.next;\n    item.prev = head;\n    item.next = next;\n    head.next = item;\n    if (next) {\n      next.prev = item;\n    }\n\n    if (head === this.last_) {\n      this.last_ = item;\n    }\n  }\n  this.head_ = item;\n  this.length_++;\n};\n\n/**\n * Removes the current item from the list. Sets the cursor to the next item,\n * if possible.\n */\nLinkedList.prototype.removeItem = function removeItem () {\n  var head = this.head_;\n  if (head) {\n    var next = head.next;\n    var prev = head.prev;\n    if (next) {\n      next.prev = prev;\n    }\n    if (prev) {\n      prev.next = next;\n    }\n    this.head_ = next || prev;\n\n    if (this.first_ === this.last_) {\n      this.head_ = undefined;\n      this.first_ = undefined;\n      this.last_ = undefined;\n    } else if (this.first_ === head) {\n      this.first_ = this.head_;\n    } else if (this.last_ === head) {\n      this.last_ = prev ? this.head_.prev : this.head_;\n    }\n    this.length_--;\n  }\n};\n\n/**\n * Sets the cursor to the first item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.firstItem = function firstItem () {\n  this.head_ = this.first_;\n  if (this.head_) {\n    return this.head_.data;\n  }\n  return undefined;\n};\n\n/**\n* Sets the cursor to the last item, and returns the associated data.\n*\n* @return {?} Item data.\n*/\nLinkedList.prototype.lastItem = function lastItem () {\n  this.head_ = this.last_;\n  if (this.head_) {\n    return this.head_.data;\n  }\n  return undefined;\n};\n\n/**\n * Sets the cursor to the next item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.nextItem = function nextItem () {\n  if (this.head_ && this.head_.next) {\n    this.head_ = this.head_.next;\n    return this.head_.data;\n  }\n  return undefined;\n};\n\n/**\n * Returns the next item's data without moving the cursor.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getNextItem = function getNextItem () {\n  if (this.head_ && this.head_.next) {\n    return this.head_.next.data;\n  }\n  return undefined;\n};\n\n/**\n * Sets the cursor to the previous item, and returns the associated data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.prevItem = function prevItem () {\n  if (this.head_ && this.head_.prev) {\n    this.head_ = this.head_.prev;\n    return this.head_.data;\n  }\n  return undefined;\n};\n\n/**\n * Returns the previous item's data without moving the cursor.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getPrevItem = function getPrevItem () {\n  if (this.head_ && this.head_.prev) {\n    return this.head_.prev.data;\n  }\n  return undefined;\n};\n\n/**\n * Returns the current item's data.\n *\n * @return {?} Item data.\n */\nLinkedList.prototype.getCurrItem = function getCurrItem () {\n  if (this.head_) {\n    return this.head_.data;\n  }\n  return undefined;\n};\n\n/**\n * Sets the first item of the list. This only works for circular lists, and sets\n * the last item accordingly.\n */\nLinkedList.prototype.setFirstItem = function setFirstItem () {\n  if (this.circular_ && this.head_) {\n    this.first_ = this.head_;\n    this.last_ = this.head_.prev;\n  }\n};\n\n/**\n * Concatenates two lists.\n * @param {LinkedList} list List to merge into the current list.\n */\nLinkedList.prototype.concat = function concat (list) {\n  if (list.head_) {\n    if (this.head_) {\n      var end = this.head_.next;\n      this.head_.next = list.first_;\n      list.first_.prev = this.head_;\n      end.prev = list.last_;\n      list.last_.next = end;\n      this.length_ += list.length_;\n    } else {\n      this.head_ = list.head_;\n      this.first_ = list.first_;\n      this.last_ = list.last_;\n      this.length_ = list.length_;\n    }\n    list.head_ = undefined;\n    list.first_ = undefined;\n    list.last_ = undefined;\n    list.length_ = 0;\n  }\n};\n\n/**\n * Returns the current length of the list.\n *\n * @return {number} Length.\n */\nLinkedList.prototype.getLength = function getLength () {\n  return this.length_;\n};\n\n\nexport default LinkedList;\n\n//# sourceMappingURL=LinkedList.js.map","/**\n * @module ol/structs/RBush\n */\nimport {getUid} from '../util.js';\nimport rbush from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {isEmpty} from '../obj.js';\n\n/**\n * @typedef {Object} Entry\n * @property {number} minX\n * @property {number} minY\n * @property {number} maxX\n * @property {number} maxY\n * @property {Object} [value]\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template T\n */\nvar RBush = function RBush(opt_maxEntries) {\n\n  /**\n   * @private\n   */\n  this.rbush_ = rbush(opt_maxEntries, undefined);\n\n  /**\n   * A mapping between the objects added to this rbush wrapper\n   * and the objects that are actually added to the internal rbush.\n   * @private\n   * @type {Object<string, Entry>}\n   */\n  this.items_ = {};\n\n};\n\n/**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\nRBush.prototype.insert = function insert (extent, value) {\n  /** @type {Entry} */\n  var item = {\n    minX: extent[0],\n    minY: extent[1],\n    maxX: extent[2],\n    maxY: extent[3],\n    value: value\n  };\n\n  this.rbush_.insert(item);\n  this.items_[getUid(value)] = item;\n};\n\n\n/**\n * Bulk-insert values into the RBush.\n * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n * @param {Array<T>} values Values.\n */\nRBush.prototype.load = function load (extents, values) {\n  var items = new Array(values.length);\n  for (var i = 0, l = values.length; i < l; i++) {\n    var extent = extents[i];\n    var value = values[i];\n\n    /** @type {Entry} */\n    var item = {\n      minX: extent[0],\n      minY: extent[1],\n      maxX: extent[2],\n      maxY: extent[3],\n      value: value\n    };\n    items[i] = item;\n    this.items_[getUid(value)] = item;\n  }\n  this.rbush_.load(items);\n};\n\n\n/**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\nRBush.prototype.remove = function remove (value) {\n  var uid = getUid(value);\n\n  // get the object in which the value was wrapped when adding to the\n  // internal rbush. then use that object to do the removal.\n  var item = this.items_[uid];\n  delete this.items_[uid];\n  return this.rbush_.remove(item) !== null;\n};\n\n\n/**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\nRBush.prototype.update = function update (extent, value) {\n  var item = this.items_[getUid(value)];\n  var bbox = [item.minX, item.minY, item.maxX, item.maxY];\n  if (!equals(bbox, extent)) {\n    this.remove(value);\n    this.insert(extent, value);\n  }\n};\n\n\n/**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\nRBush.prototype.getAll = function getAll () {\n  var items = this.rbush_.all();\n  return items.map(function(item) {\n    return item.value;\n  });\n};\n\n\n/**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<T>} All in extent.\n */\nRBush.prototype.getInExtent = function getInExtent (extent) {\n  /** @type {Entry} */\n  var bbox = {\n    minX: extent[0],\n    minY: extent[1],\n    maxX: extent[2],\n    maxY: extent[3]\n  };\n  var items = this.rbush_.search(bbox);\n  return items.map(function(item) {\n    return item.value;\n  });\n};\n\n\n/**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEach = function forEach (callback, opt_this) {\n  return this.forEach_(this.getAll(), callback, opt_this);\n};\n\n\n/**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEachInExtent = function forEachInExtent (extent, callback, opt_this) {\n  return this.forEach_(this.getInExtent(extent), callback, opt_this);\n};\n\n\n/**\n * @param {Array<T>} values Values.\n * @param {function(this: S, T): *} callback Callback.\n * @param {S=} opt_this The object to use as `this` in `callback`.\n * @private\n * @return {*} Callback return value.\n * @template S\n */\nRBush.prototype.forEach_ = function forEach_ (values, callback, opt_this) {\n  var result;\n  for (var i = 0, l = values.length; i < l; i++) {\n    result = callback.call(opt_this, values[i]);\n    if (result) {\n      return result;\n    }\n  }\n  return result;\n};\n\n\n/**\n * @return {boolean} Is empty.\n */\nRBush.prototype.isEmpty = function isEmpty$1 () {\n  return isEmpty(this.items_);\n};\n\n\n/**\n * Remove all values from the RBush.\n */\nRBush.prototype.clear = function clear () {\n  this.rbush_.clear();\n  this.items_ = {};\n};\n\n\n/**\n * @param {import(\"../extent.js\").Extent=} opt_extent Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\nRBush.prototype.getExtent = function getExtent (opt_extent) {\n  var data = this.rbush_.toJSON();\n  return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, opt_extent);\n};\n\n\n/**\n * @param {RBush} rbush R-Tree.\n */\nRBush.prototype.concat = function concat (rbush) {\n  this.rbush_.load(rbush.rbush_.all());\n  for (var i in rbush.items_) {\n    this.items_[i] = rbush.items_[i];\n  }\n};\n\n\nexport default RBush;\n\n//# sourceMappingURL=RBush.js.map","/**\n * @module ol/render/webgl/PolygonReplay\n */\nimport {getUid} from '../../util.js';\nimport {equals} from '../../array.js';\nimport {asArray} from '../../color.js';\nimport {intersects} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {linearRingContainsXY} from '../../geom/flat/contains.js';\nimport {linearRingIsClockwise} from '../../geom/flat/orient.js';\nimport {translate} from '../../geom/flat/transform.js';\nimport {fragment, vertex} from './polygonreplay/defaultshader.js';\nimport Locations from './polygonreplay/defaultshader/Locations.js';\nimport WebGLLineStringReplay from './LineStringReplay.js';\nimport WebGLReplay from './Replay.js';\nimport {triangleIsCounterClockwise, EPSILON, DEFAULT_FILLSTYLE} from '../webgl.js';\nimport Stroke from '../../style/Stroke.js';\nimport LinkedList from '../../structs/LinkedList.js';\nimport RBush from '../../structs/RBush.js';\nimport {FLOAT} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n\n/**\n * @typedef {Object} PolygonVertex\n * @property {number} x\n * @property {number} y\n * @property {number} i\n * @property {boolean} [reflex]\n */\n\n/**\n * @typedef {Object} PolygonSegment\n * @property {PolygonVertex} p0\n * @property {PolygonVertex} p1\n */\n\n\nvar WebGLPolygonReplay = /*@__PURE__*/(function (WebGLReplay) {\n  function WebGLPolygonReplay(tolerance, maxExtent) {\n    WebGLReplay.call(this, tolerance, maxExtent);\n\n    this.lineStringReplay = new WebGLLineStringReplay(\n      tolerance, maxExtent);\n\n    /**\n     * @private\n     * @type {import(\"./polygonreplay/defaultshader/Locations.js\").default}\n     */\n    this.defaultLocations_ = null;\n\n    /**\n     * @private\n     * @type {Array<Array<number>>}\n     */\n    this.styles_ = [];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.styleIndices_ = [];\n\n    /**\n     * @private\n     * @type {{fillColor: (Array<number>|null),\n     *         changed: boolean}|null}\n     */\n    this.state_ = {\n      fillColor: null,\n      changed: false\n    };\n\n  }\n\n  if ( WebGLReplay ) WebGLPolygonReplay.__proto__ = WebGLReplay;\n  WebGLPolygonReplay.prototype = Object.create( WebGLReplay && WebGLReplay.prototype );\n  WebGLPolygonReplay.prototype.constructor = WebGLPolygonReplay;\n\n  /**\n   * Draw one polygon.\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {Array<Array<number>>} holeFlatCoordinates Hole flat coordinates.\n   * @param {number} stride Stride.\n   * @private\n   */\n  WebGLPolygonReplay.prototype.drawCoordinates_ = function drawCoordinates_ (flatCoordinates, holeFlatCoordinates, stride) {\n    // Triangulate the polygon\n    var outerRing = new LinkedList();\n    var rtree = new RBush();\n    // Initialize the outer ring\n    this.processFlatCoordinates_(flatCoordinates, stride, outerRing, rtree, true);\n    var maxCoords = this.getMaxCoords_(outerRing);\n\n    // Eliminate holes, if there are any\n    if (holeFlatCoordinates.length) {\n      var i, ii;\n      var holeLists = [];\n      for (i = 0, ii = holeFlatCoordinates.length; i < ii; ++i) {\n        var holeList = {\n          list: new LinkedList(),\n          maxCoords: undefined,\n          rtree: new RBush()\n        };\n        holeLists.push(holeList);\n        this.processFlatCoordinates_(holeFlatCoordinates[i],\n          stride, holeList.list, holeList.rtree, false);\n        this.classifyPoints_(holeList.list, holeList.rtree, true);\n        holeList.maxCoords = this.getMaxCoords_(holeList.list);\n      }\n      holeLists.sort(function(a, b) {\n        return b.maxCoords[0] === a.maxCoords[0] ?\n          a.maxCoords[1] - b.maxCoords[1] : b.maxCoords[0] - a.maxCoords[0];\n      });\n      for (i = 0; i < holeLists.length; ++i) {\n        var currList = holeLists[i].list;\n        var start = currList.firstItem();\n        var currItem = start;\n        var intersection = (void 0);\n        do {\n          //TODO: Triangulate holes when they intersect the outer ring.\n          if (this.getIntersections_(currItem, rtree).length) {\n            intersection = true;\n            break;\n          }\n          currItem = currList.nextItem();\n        } while (start !== currItem);\n        if (!intersection) {\n          if (this.bridgeHole_(currList, holeLists[i].maxCoords[0], outerRing, maxCoords[0], rtree)) {\n            rtree.concat(holeLists[i].rtree);\n            this.classifyPoints_(outerRing, rtree, false);\n          }\n        }\n      }\n    } else {\n      this.classifyPoints_(outerRing, rtree, false);\n    }\n    this.triangulate_(outerRing, rtree);\n  };\n\n  /**\n   * Inserts flat coordinates in a linked list and adds them to the vertex buffer.\n   * @private\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} stride Stride.\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean} clockwise Coordinate order should be clockwise.\n   */\n  WebGLPolygonReplay.prototype.processFlatCoordinates_ = function processFlatCoordinates_ (flatCoordinates, stride, list, rtree, clockwise) {\n    var isClockwise = linearRingIsClockwise(flatCoordinates,\n      0, flatCoordinates.length, stride);\n    var i, ii;\n    var n = this.vertices.length / 2;\n    /** @type {PolygonVertex} */\n    var start;\n    /** @type {PolygonVertex} */\n    var p0;\n    /** @type {PolygonVertex} */\n    var p1;\n    var extents = [];\n    var segments = [];\n    if (clockwise === isClockwise) {\n      start = this.createPoint_(flatCoordinates[0], flatCoordinates[1], n++);\n      p0 = start;\n      for (i = stride, ii = flatCoordinates.length; i < ii; i += stride) {\n        p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);\n        segments.push(this.insertItem_(p0, p1, list));\n        extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n          Math.max(p0.y, p1.y)]);\n        p0 = p1;\n      }\n      segments.push(this.insertItem_(p1, start, list));\n      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n        Math.max(p0.y, p1.y)]);\n    } else {\n      var end = flatCoordinates.length - stride;\n      start = this.createPoint_(flatCoordinates[end], flatCoordinates[end + 1], n++);\n      p0 = start;\n      for (i = end - stride, ii = 0; i >= ii; i -= stride) {\n        p1 = this.createPoint_(flatCoordinates[i], flatCoordinates[i + 1], n++);\n        segments.push(this.insertItem_(p0, p1, list));\n        extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n          Math.max(p0.y, p1.y)]);\n        p0 = p1;\n      }\n      segments.push(this.insertItem_(p1, start, list));\n      extents.push([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y), Math.max(p0.x, p1.x),\n        Math.max(p0.y, p1.y)]);\n    }\n    rtree.load(extents, segments);\n  };\n\n  /**\n   * Returns the rightmost coordinates of a polygon on the X axis.\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Polygons ring.\n   * @return {Array<number>} Max X coordinates.\n   */\n  WebGLPolygonReplay.prototype.getMaxCoords_ = function getMaxCoords_ (list) {\n    var start = list.firstItem();\n    var seg = start;\n    var maxCoords = [seg.p0.x, seg.p0.y];\n\n    do {\n      seg = list.nextItem();\n      if (seg.p0.x > maxCoords[0]) {\n        maxCoords = [seg.p0.x, seg.p0.y];\n      }\n    } while (seg !== start);\n\n    return maxCoords;\n  };\n\n  /**\n   * Classifies the points of a polygon list as convex, reflex. Removes collinear vertices.\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean} ccw The orientation of the polygon is counter-clockwise.\n   * @return {boolean} There were reclassified points.\n   */\n  WebGLPolygonReplay.prototype.classifyPoints_ = function classifyPoints_ (list, rtree, ccw) {\n    var start = list.firstItem();\n    var s0 = start;\n    var s1 = list.nextItem();\n    var pointsReclassified = false;\n    do {\n      var reflex = ccw ? triangleIsCounterClockwise(s1.p1.x,\n        s1.p1.y, s0.p1.x, s0.p1.y, s0.p0.x, s0.p0.y) :\n        triangleIsCounterClockwise(s0.p0.x, s0.p0.y, s0.p1.x,\n          s0.p1.y, s1.p1.x, s1.p1.y);\n      if (reflex === undefined) {\n        this.removeItem_(s0, s1, list, rtree);\n        pointsReclassified = true;\n        if (s1 === start) {\n          start = list.getNextItem();\n        }\n        s1 = s0;\n        list.prevItem();\n      } else if (s0.p1.reflex !== reflex) {\n        s0.p1.reflex = reflex;\n        pointsReclassified = true;\n      }\n      s0 = s1;\n      s1 = list.nextItem();\n    } while (s0 !== start);\n    return pointsReclassified;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} hole Linked list of the hole.\n   * @param {number} holeMaxX Maximum X value of the hole.\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {number} listMaxX Maximum X value of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @return {boolean} Bridging was successful.\n   */\n  WebGLPolygonReplay.prototype.bridgeHole_ = function bridgeHole_ (hole, holeMaxX, list, listMaxX, rtree) {\n    var seg = hole.firstItem();\n    while (seg.p1.x !== holeMaxX) {\n      seg = hole.nextItem();\n    }\n\n    var p1 = seg.p1;\n    /** @type {PolygonVertex} */\n    var p2 = {x: listMaxX, y: p1.y, i: -1};\n    var minDist = Infinity;\n    var i, ii, bestPoint;\n    /** @type {PolygonVertex} */\n    var p5;\n\n    var intersectingSegments = this.getIntersections_({p0: p1, p1: p2}, rtree, true);\n    for (i = 0, ii = intersectingSegments.length; i < ii; ++i) {\n      var currSeg = intersectingSegments[i];\n      var intersection = this.calculateIntersection_(p1, p2, currSeg.p0,\n        currSeg.p1, true);\n      var dist = Math.abs(p1.x - intersection[0]);\n      if (dist < minDist && triangleIsCounterClockwise(p1.x, p1.y,\n        currSeg.p0.x, currSeg.p0.y, currSeg.p1.x, currSeg.p1.y) !== undefined) {\n        minDist = dist;\n        p5 = {x: intersection[0], y: intersection[1], i: -1};\n        seg = currSeg;\n      }\n    }\n    if (minDist === Infinity) {\n      return false;\n    }\n    bestPoint = seg.p1;\n\n    if (minDist > 0) {\n      var pointsInTriangle = this.getPointsInTriangle_(p1, p5, seg.p1, rtree);\n      if (pointsInTriangle.length) {\n        var theta = Infinity;\n        for (i = 0, ii = pointsInTriangle.length; i < ii; ++i) {\n          var currPoint = pointsInTriangle[i];\n          var currTheta = Math.atan2(p1.y - currPoint.y, p2.x - currPoint.x);\n          if (currTheta < theta || (currTheta === theta && currPoint.x < bestPoint.x)) {\n            theta = currTheta;\n            bestPoint = currPoint;\n          }\n        }\n      }\n    }\n\n    seg = list.firstItem();\n    while (seg.p1.x !== bestPoint.x || seg.p1.y !== bestPoint.y) {\n      seg = list.nextItem();\n    }\n\n    //We clone the bridge points as they can have different convexity.\n    var p0Bridge = {x: p1.x, y: p1.y, i: p1.i, reflex: undefined};\n    var p1Bridge = {x: seg.p1.x, y: seg.p1.y, i: seg.p1.i, reflex: undefined};\n\n    hole.getNextItem().p0 = p0Bridge;\n    this.insertItem_(p1, seg.p1, hole, rtree);\n    this.insertItem_(p1Bridge, p0Bridge, hole, rtree);\n    seg.p1 = p1Bridge;\n    hole.setFirstItem();\n    list.concat(hole);\n\n    return true;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   */\n  WebGLPolygonReplay.prototype.triangulate_ = function triangulate_ (list, rtree) {\n    var ccw = false;\n    var simple = this.isSimple_(list, rtree);\n\n    // Start clipping ears\n    while (list.getLength() > 3) {\n      if (simple) {\n        if (!this.clipEars_(list, rtree, simple, ccw)) {\n          if (!this.classifyPoints_(list, rtree, ccw)) {\n            // Due to the behavior of OL's PIP algorithm, the ear clipping cannot\n            // introduce touching segments. However, the original data may have some.\n            if (!this.resolveSelfIntersections_(list, rtree, true)) {\n              break;\n            }\n          }\n        }\n      } else {\n        if (!this.clipEars_(list, rtree, simple, ccw)) {\n          // We ran out of ears, try to reclassify.\n          if (!this.classifyPoints_(list, rtree, ccw)) {\n            // We have a bad polygon, try to resolve local self-intersections.\n            if (!this.resolveSelfIntersections_(list, rtree)) {\n              simple = this.isSimple_(list, rtree);\n              if (!simple) {\n                // We have a really bad polygon, try more time consuming methods.\n                this.splitPolygon_(list, rtree);\n                break;\n              } else {\n                ccw = !this.isClockwise_(list);\n                this.classifyPoints_(list, rtree, ccw);\n              }\n            }\n          }\n        }\n      }\n    }\n    if (list.getLength() === 3) {\n      var numIndices = this.indices.length;\n      this.indices[numIndices++] = list.getPrevItem().p0.i;\n      this.indices[numIndices++] = list.getCurrItem().p0.i;\n      this.indices[numIndices++] = list.getNextItem().p0.i;\n    }\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean} simple The polygon is simple.\n   * @param {boolean} ccw Orientation of the polygon is counter-clockwise.\n   * @return {boolean} There were processed ears.\n   */\n  WebGLPolygonReplay.prototype.clipEars_ = function clipEars_ (list, rtree, simple, ccw) {\n    var numIndices = this.indices.length;\n    var start = list.firstItem();\n    var s0 = list.getPrevItem();\n    var s1 = start;\n    var s2 = list.nextItem();\n    var s3 = list.getNextItem();\n    var p0, p1, p2;\n    var processedEars = false;\n    do {\n      p0 = s1.p0;\n      p1 = s1.p1;\n      p2 = s2.p1;\n      if (p1.reflex === false) {\n        // We might have a valid ear\n        var variableCriterion = (void 0);\n        if (simple) {\n          variableCriterion = this.getPointsInTriangle_(p0, p1, p2, rtree, true).length === 0;\n        } else {\n          variableCriterion = ccw ? this.diagonalIsInside_(s3.p1, p2, p1, p0,\n            s0.p0) : this.diagonalIsInside_(s0.p0, p0, p1, p2, s3.p1);\n        }\n        if ((simple || this.getIntersections_({p0: p0, p1: p2}, rtree).length === 0) &&\n            variableCriterion) {\n          //The diagonal is completely inside the polygon\n          if (simple || p0.reflex === false || p2.reflex === false ||\n              linearRingIsClockwise([s0.p0.x, s0.p0.y, p0.x,\n                p0.y, p1.x, p1.y, p2.x, p2.y, s3.p1.x, s3.p1.y], 0, 10, 2) === !ccw) {\n            //The diagonal is persumably valid, we have an ear\n            this.indices[numIndices++] = p0.i;\n            this.indices[numIndices++] = p1.i;\n            this.indices[numIndices++] = p2.i;\n            this.removeItem_(s1, s2, list, rtree);\n            if (s2 === start) {\n              start = s3;\n            }\n            processedEars = true;\n          }\n        }\n      }\n      // Else we have a reflex point.\n      s0 = list.getPrevItem();\n      s1 = list.getCurrItem();\n      s2 = list.nextItem();\n      s3 = list.getNextItem();\n    } while (s1 !== start && list.getLength() > 3);\n\n    return processedEars;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean=} opt_touch Resolve touching segments.\n   * @return {boolean} There were resolved intersections.\n  */\n  WebGLPolygonReplay.prototype.resolveSelfIntersections_ = function resolveSelfIntersections_ (list, rtree, opt_touch) {\n    var start = list.firstItem();\n    list.nextItem();\n    var s0 = start;\n    var s1 = list.nextItem();\n    var resolvedIntersections = false;\n\n    do {\n      var intersection = this.calculateIntersection_(s0.p0, s0.p1, s1.p0, s1.p1,\n        opt_touch);\n      if (intersection) {\n        var breakCond = false;\n        var numVertices = this.vertices.length;\n        var numIndices = this.indices.length;\n        var n = numVertices / 2;\n        var seg = list.prevItem();\n        list.removeItem();\n        rtree.remove(seg);\n        breakCond = (seg === start);\n        var p = (void 0);\n        if (opt_touch) {\n          if (intersection[0] === s0.p0.x && intersection[1] === s0.p0.y) {\n            list.prevItem();\n            p = s0.p0;\n            s1.p0 = p;\n            rtree.remove(s0);\n            breakCond = breakCond || (s0 === start);\n          } else {\n            p = s1.p1;\n            s0.p1 = p;\n            rtree.remove(s1);\n            breakCond = breakCond || (s1 === start);\n          }\n          list.removeItem();\n        } else {\n          p = this.createPoint_(intersection[0], intersection[1], n);\n          s0.p1 = p;\n          s1.p0 = p;\n          rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),\n            Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);\n          rtree.update([Math.min(s1.p0.x, s1.p1.x), Math.min(s1.p0.y, s1.p1.y),\n            Math.max(s1.p0.x, s1.p1.x), Math.max(s1.p0.y, s1.p1.y)], s1);\n        }\n\n        this.indices[numIndices++] = seg.p0.i;\n        this.indices[numIndices++] = seg.p1.i;\n        this.indices[numIndices++] = p.i;\n\n        resolvedIntersections = true;\n        if (breakCond) {\n          break;\n        }\n      }\n\n      s0 = list.getPrevItem();\n      s1 = list.nextItem();\n    } while (s0 !== start);\n    return resolvedIntersections;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @return {boolean} The polygon is simple.\n   */\n  WebGLPolygonReplay.prototype.isSimple_ = function isSimple_ (list, rtree) {\n    var start = list.firstItem();\n    var seg = start;\n    do {\n      if (this.getIntersections_(seg, rtree).length) {\n        return false;\n      }\n      seg = list.nextItem();\n    } while (seg !== start);\n    return true;\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @return {boolean} Orientation is clockwise.\n   */\n  WebGLPolygonReplay.prototype.isClockwise_ = function isClockwise_ (list) {\n    var length = list.getLength() * 2;\n    var flatCoordinates = new Array(length);\n    var start = list.firstItem();\n    var seg = start;\n    var i = 0;\n    do {\n      flatCoordinates[i++] = seg.p0.x;\n      flatCoordinates[i++] = seg.p0.y;\n      seg = list.nextItem();\n    } while (seg !== start);\n    return linearRingIsClockwise(flatCoordinates, 0, length, 2);\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../structs/LinkedList.js\").default} list Linked list of the polygon.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   */\n  WebGLPolygonReplay.prototype.splitPolygon_ = function splitPolygon_ (list, rtree) {\n    var start = list.firstItem();\n    var s0 = start;\n    do {\n      var intersections = this.getIntersections_(s0, rtree);\n      if (intersections.length) {\n        var s1 = intersections[0];\n        var n = this.vertices.length / 2;\n        var intersection = this.calculateIntersection_(s0.p0,\n          s0.p1, s1.p0, s1.p1);\n        var p = this.createPoint_(intersection[0], intersection[1], n);\n        var newPolygon = new LinkedList();\n        var newRtree = new RBush();\n        this.insertItem_(p, s0.p1, newPolygon, newRtree);\n        s0.p1 = p;\n        rtree.update([Math.min(s0.p0.x, p.x), Math.min(s0.p0.y, p.y),\n          Math.max(s0.p0.x, p.x), Math.max(s0.p0.y, p.y)], s0);\n        var currItem = list.nextItem();\n        while (currItem !== s1) {\n          this.insertItem_(currItem.p0, currItem.p1, newPolygon, newRtree);\n          rtree.remove(currItem);\n          list.removeItem();\n          currItem = list.getCurrItem();\n        }\n        this.insertItem_(s1.p0, p, newPolygon, newRtree);\n        s1.p0 = p;\n        rtree.update([Math.min(s1.p1.x, p.x), Math.min(s1.p1.y, p.y),\n          Math.max(s1.p1.x, p.x), Math.max(s1.p1.y, p.y)], s1);\n        this.classifyPoints_(list, rtree, false);\n        this.triangulate_(list, rtree);\n        this.classifyPoints_(newPolygon, newRtree, false);\n        this.triangulate_(newPolygon, newRtree);\n        break;\n      }\n      s0 = list.nextItem();\n    } while (s0 !== start);\n  };\n\n  /**\n   * @private\n   * @param {number} x X coordinate.\n   * @param {number} y Y coordinate.\n   * @param {number} i Index.\n   * @return {PolygonVertex} List item.\n   */\n  WebGLPolygonReplay.prototype.createPoint_ = function createPoint_ (x, y, i) {\n    var numVertices = this.vertices.length;\n    this.vertices[numVertices++] = x;\n    this.vertices[numVertices++] = y;\n    /** @type {PolygonVertex} */\n    var p = {\n      x: x,\n      y: y,\n      i: i,\n      reflex: undefined\n    };\n    return p;\n  };\n\n  /**\n   * @private\n   * @param {PolygonVertex} p0 First point of segment.\n   * @param {PolygonVertex} p1 Second point of segment.\n   * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n   * @param {import(\"../../structs/RBush.js\").default=} opt_rtree Insert the segment into the R-Tree.\n   * @return {PolygonSegment} segment.\n   */\n  WebGLPolygonReplay.prototype.insertItem_ = function insertItem_ (p0, p1, list, opt_rtree) {\n    var seg = {\n      p0: p0,\n      p1: p1\n    };\n    list.insertItem(seg);\n    if (opt_rtree) {\n      opt_rtree.insert([Math.min(p0.x, p1.x), Math.min(p0.y, p1.y),\n        Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)], seg);\n    }\n    return seg;\n  };\n\n  /**\n    * @private\n    * @param {PolygonSegment} s0 Segment before the remove candidate.\n    * @param {PolygonSegment} s1 Remove candidate segment.\n    * @param {import(\"../../structs/LinkedList.js\").default} list Polygon ring.\n    * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n    */\n  WebGLPolygonReplay.prototype.removeItem_ = function removeItem_ (s0, s1, list, rtree) {\n    if (list.getCurrItem() === s1) {\n      list.removeItem();\n      s0.p1 = s1.p1;\n      rtree.remove(s1);\n      rtree.update([Math.min(s0.p0.x, s0.p1.x), Math.min(s0.p0.y, s0.p1.y),\n        Math.max(s0.p0.x, s0.p1.x), Math.max(s0.p0.y, s0.p1.y)], s0);\n    }\n  };\n\n  /**\n   * @private\n   * @param {PolygonVertex} p0 First point.\n   * @param {PolygonVertex} p1 Second point.\n   * @param {PolygonVertex} p2 Third point.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean=} opt_reflex Only include reflex points.\n   * @return {Array<PolygonVertex>} Points in the triangle.\n   */\n  WebGLPolygonReplay.prototype.getPointsInTriangle_ = function getPointsInTriangle_ (p0, p1, p2, rtree, opt_reflex) {\n    var result = [];\n    var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x, p2.x),\n      Math.min(p0.y, p1.y, p2.y), Math.max(p0.x, p1.x, p2.x), Math.max(p0.y,\n        p1.y, p2.y)]);\n    for (var i = 0, ii = segmentsInExtent.length; i < ii; ++i) {\n      for (var j in segmentsInExtent[i]) {\n        var p = segmentsInExtent[i][j];\n        if (typeof p === 'object' && (!opt_reflex || p.reflex)) {\n          if ((p.x !== p0.x || p.y !== p0.y) && (p.x !== p1.x || p.y !== p1.y) &&\n              (p.x !== p2.x || p.y !== p2.y) && result.indexOf(p) === -1 &&\n              linearRingContainsXY([p0.x, p0.y, p1.x, p1.y, p2.x, p2.y], 0, 6, 2, p.x, p.y)) {\n            result.push(p);\n          }\n        }\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @private\n   * @param {PolygonSegment} segment Segment.\n   * @param {import(\"../../structs/RBush.js\").default} rtree R-Tree of the polygon.\n   * @param {boolean=} opt_touch Touching segments should be considered an intersection.\n   * @return {Array<PolygonSegment>} Intersecting segments.\n   */\n  WebGLPolygonReplay.prototype.getIntersections_ = function getIntersections_ (segment, rtree, opt_touch) {\n    var p0 = segment.p0;\n    var p1 = segment.p1;\n    var segmentsInExtent = rtree.getInExtent([Math.min(p0.x, p1.x),\n      Math.min(p0.y, p1.y), Math.max(p0.x, p1.x), Math.max(p0.y, p1.y)]);\n    var result = [];\n    for (var i = 0, ii = segmentsInExtent.length; i < ii; ++i) {\n      var currSeg = segmentsInExtent[i];\n      if (segment !== currSeg && (opt_touch || currSeg.p0 !== p1 || currSeg.p1 !== p0) &&\n          this.calculateIntersection_(p0, p1, currSeg.p0, currSeg.p1, opt_touch)) {\n        result.push(currSeg);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * Line intersection algorithm by Paul Bourke.\n   * See http://paulbourke.net/geometry/pointlineplane/.\n   *\n   * @private\n   * @param {PolygonVertex} p0 First point.\n   * @param {PolygonVertex} p1 Second point.\n   * @param {PolygonVertex} p2 Third point.\n   * @param {PolygonVertex} p3 Fourth point.\n   * @param {boolean=} opt_touch Touching segments should be considered an intersection.\n   * @return {Array<number>|undefined} Intersection coordinates.\n   */\n  WebGLPolygonReplay.prototype.calculateIntersection_ = function calculateIntersection_ (p0, p1, p2, p3, opt_touch) {\n    var denom = (p3.y - p2.y) * (p1.x - p0.x) - (p3.x - p2.x) * (p1.y - p0.y);\n    if (denom !== 0) {\n      var ua = ((p3.x - p2.x) * (p0.y - p2.y) - (p3.y - p2.y) * (p0.x - p2.x)) / denom;\n      var ub = ((p1.x - p0.x) * (p0.y - p2.y) - (p1.y - p0.y) * (p0.x - p2.x)) / denom;\n      if ((!opt_touch && ua > EPSILON && ua < 1 - EPSILON &&\n          ub > EPSILON && ub < 1 - EPSILON) || (opt_touch &&\n          ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1)) {\n        return [p0.x + ua * (p1.x - p0.x), p0.y + ua * (p1.y - p0.y)];\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @private\n   * @param {PolygonVertex} p0 Point before the start of the diagonal.\n   * @param {PolygonVertex} p1 Start point of the diagonal.\n   * @param {PolygonVertex} p2 Ear candidate.\n   * @param {PolygonVertex} p3 End point of the diagonal.\n   * @param {PolygonVertex} p4 Point after the end of the diagonal.\n   * @return {boolean} Diagonal is inside the polygon.\n   */\n  WebGLPolygonReplay.prototype.diagonalIsInside_ = function diagonalIsInside_ (p0, p1, p2, p3, p4) {\n    if (p1.reflex === undefined || p3.reflex === undefined) {\n      return false;\n    }\n    var p1IsLeftOf = (p2.x - p3.x) * (p1.y - p3.y) > (p2.y - p3.y) * (p1.x - p3.x);\n    var p1IsRightOf = (p4.x - p3.x) * (p1.y - p3.y) < (p4.y - p3.y) * (p1.x - p3.x);\n    var p3IsLeftOf = (p0.x - p1.x) * (p3.y - p1.y) > (p0.y - p1.y) * (p3.x - p1.x);\n    var p3IsRightOf = (p2.x - p1.x) * (p3.y - p1.y) < (p2.y - p1.y) * (p3.x - p1.x);\n    var p1InCone = p3.reflex ? p1IsRightOf || p1IsLeftOf : p1IsRightOf && p1IsLeftOf;\n    var p3InCone = p1.reflex ? p3IsRightOf || p3IsLeftOf : p3IsRightOf && p3IsLeftOf;\n    return p1InCone && p3InCone;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.drawMultiPolygon = function drawMultiPolygon (multiPolygonGeometry, feature) {\n    var endss = multiPolygonGeometry.getEndss();\n    var stride = multiPolygonGeometry.getStride();\n    var currIndex = this.indices.length;\n    var currLineIndex = this.lineStringReplay.getCurrentIndex();\n    var flatCoordinates = multiPolygonGeometry.getFlatCoordinates();\n    var i, ii, j, jj;\n    var start = 0;\n    for (i = 0, ii = endss.length; i < ii; ++i) {\n      var ends = endss[i];\n      if (ends.length > 0) {\n        var outerRing = translate(flatCoordinates, start, ends[0],\n          stride, -this.origin[0], -this.origin[1]);\n        if (outerRing.length) {\n          var holes = [];\n          var holeFlatCoords = (void 0);\n          for (j = 1, jj = ends.length; j < jj; ++j) {\n            if (ends[j] !== ends[j - 1]) {\n              holeFlatCoords = translate(flatCoordinates, ends[j - 1],\n                ends[j], stride, -this.origin[0], -this.origin[1]);\n              holes.push(holeFlatCoords);\n            }\n          }\n          this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);\n          this.drawCoordinates_(outerRing, holes, stride);\n        }\n      }\n      start = ends[ends.length - 1];\n    }\n    if (this.indices.length > currIndex) {\n      this.startIndices.push(currIndex);\n      this.startIndicesFeature.push(feature);\n      if (this.state_.changed) {\n        this.styleIndices_.push(currIndex);\n        this.state_.changed = false;\n      }\n    }\n    if (this.lineStringReplay.getCurrentIndex() > currLineIndex) {\n      this.lineStringReplay.setPolygonStyle(feature, currLineIndex);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.drawPolygon = function drawPolygon (polygonGeometry, feature) {\n    var ends = polygonGeometry.getEnds();\n    var stride = polygonGeometry.getStride();\n    if (ends.length > 0) {\n      var flatCoordinates = polygonGeometry.getFlatCoordinates().map(Number);\n      var outerRing = translate(flatCoordinates, 0, ends[0],\n        stride, -this.origin[0], -this.origin[1]);\n      if (outerRing.length) {\n        var holes = [];\n        var i, ii, holeFlatCoords;\n        for (i = 1, ii = ends.length; i < ii; ++i) {\n          if (ends[i] !== ends[i - 1]) {\n            holeFlatCoords = translate(flatCoordinates, ends[i - 1],\n              ends[i], stride, -this.origin[0], -this.origin[1]);\n            holes.push(holeFlatCoords);\n          }\n        }\n\n        this.startIndices.push(this.indices.length);\n        this.startIndicesFeature.push(feature);\n        if (this.state_.changed) {\n          this.styleIndices_.push(this.indices.length);\n          this.state_.changed = false;\n        }\n        this.lineStringReplay.setPolygonStyle(feature);\n\n        this.lineStringReplay.drawPolygonCoordinates(outerRing, holes, stride);\n        this.drawCoordinates_(outerRing, holes, stride);\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   **/\n  WebGLPolygonReplay.prototype.finish = function finish (context) {\n    // create, bind, and populate the vertices buffer\n    this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n    // create, bind, and populate the indices buffer\n    this.indicesBuffer = new WebGLBuffer(this.indices);\n\n    this.startIndices.push(this.indices.length);\n\n    this.lineStringReplay.finish(context);\n\n    //Clean up, if there is nothing to draw\n    if (this.styleIndices_.length === 0 && this.styles_.length > 0) {\n      this.styles_ = [];\n    }\n\n    this.vertices = null;\n    this.indices = null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    var verticesBuffer = this.verticesBuffer;\n    var indicesBuffer = this.indicesBuffer;\n    var lineDeleter = this.lineStringReplay.getDeleteResourcesFunction(context);\n    return function() {\n      context.deleteBuffer(verticesBuffer);\n      context.deleteBuffer(indicesBuffer);\n      lineDeleter();\n    };\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.setUpProgram = function setUpProgram (gl, context, size, pixelRatio) {\n    // get the program\n    var program = context.getProgram(fragment, vertex);\n\n    // get the locations\n    var locations;\n    if (!this.defaultLocations_) {\n      locations = new Locations(gl, program);\n      this.defaultLocations_ = locations;\n    } else {\n      locations = this.defaultLocations_;\n    }\n\n    context.useProgram(program);\n\n    // enable the vertex attrib arrays\n    gl.enableVertexAttribArray(locations.a_position);\n    gl.vertexAttribPointer(locations.a_position, 2, FLOAT,\n      false, 8, 0);\n\n    return locations;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.shutDownProgram = function shutDownProgram (gl, locations) {\n    gl.disableVertexAttribArray(locations.a_position);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.drawReplay = function drawReplay (gl, context, skippedFeaturesHash, hitDetection) {\n    //Save GL parameters.\n    var tmpDepthFunc = /** @type {number} */ (gl.getParameter(gl.DEPTH_FUNC));\n    var tmpDepthMask = /** @type {boolean} */ (gl.getParameter(gl.DEPTH_WRITEMASK));\n\n    if (!hitDetection) {\n      gl.enable(gl.DEPTH_TEST);\n      gl.depthMask(true);\n      gl.depthFunc(gl.NOTEQUAL);\n    }\n\n    if (!isEmpty(skippedFeaturesHash)) {\n      this.drawReplaySkipping_(gl, context, skippedFeaturesHash);\n    } else {\n      //Draw by style groups to minimize drawElements() calls.\n      var i, start, end, nextStyle;\n      end = this.startIndices[this.startIndices.length - 1];\n      for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n        start = this.styleIndices_[i];\n        nextStyle = this.styles_[i];\n        this.setFillStyle_(gl, nextStyle);\n        this.drawElements(gl, context, start, end);\n        end = start;\n      }\n    }\n    if (!hitDetection) {\n      gl.disable(gl.DEPTH_TEST);\n      gl.clear(gl.DEPTH_BUFFER_BIT);\n      //Restore GL parameters.\n      gl.depthMask(tmpDepthMask);\n      gl.depthFunc(tmpDepthFunc);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.drawHitDetectionReplayOneByOne = function drawHitDetectionReplayOneByOne (gl, context, skippedFeaturesHash, featureCallback, opt_hitExtent) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex;\n    featureIndex = this.startIndices.length - 2;\n    end = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setFillStyle_(gl, nextStyle);\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        start = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)] === undefined &&\n            feature.getGeometry() &&\n            (opt_hitExtent === undefined || intersects(\n              /** @type {Array<number>} */ (opt_hitExtent),\n              feature.getGeometry().getExtent()))) {\n          gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);\n          this.drawElements(gl, context, start, end);\n\n          var result = featureCallback(feature);\n\n          if (result) {\n            return result;\n          }\n\n        }\n        featureIndex--;\n        end = start;\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {Object} skippedFeaturesHash Ids of features to skip.\n   */\n  WebGLPolygonReplay.prototype.drawReplaySkipping_ = function drawReplaySkipping_ (gl, context, skippedFeaturesHash) {\n    var i, start, end, nextStyle, groupStart, feature, featureIndex, featureStart;\n    featureIndex = this.startIndices.length - 2;\n    end = start = this.startIndices[featureIndex + 1];\n    for (i = this.styleIndices_.length - 1; i >= 0; --i) {\n      nextStyle = this.styles_[i];\n      this.setFillStyle_(gl, nextStyle);\n      groupStart = this.styleIndices_[i];\n\n      while (featureIndex >= 0 &&\n          this.startIndices[featureIndex] >= groupStart) {\n        featureStart = this.startIndices[featureIndex];\n        feature = this.startIndicesFeature[featureIndex];\n\n        if (skippedFeaturesHash[getUid(feature)]) {\n          if (start !== end) {\n            this.drawElements(gl, context, start, end);\n            gl.clear(gl.DEPTH_BUFFER_BIT);\n          }\n          end = featureStart;\n        }\n        featureIndex--;\n        start = featureStart;\n      }\n      if (start !== end) {\n        this.drawElements(gl, context, start, end);\n        gl.clear(gl.DEPTH_BUFFER_BIT);\n      }\n      start = end = groupStart;\n    }\n  };\n\n  /**\n   * @private\n   * @param {WebGLRenderingContext} gl gl.\n   * @param {Array<number>} color Color.\n   */\n  WebGLPolygonReplay.prototype.setFillStyle_ = function setFillStyle_ (gl, color) {\n    gl.uniform4fv(this.defaultLocations_.u_color, color);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLPolygonReplay.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    var fillStyleColor = fillStyle ? fillStyle.getColor() : [0, 0, 0, 0];\n    if (!(fillStyleColor instanceof CanvasGradient) &&\n        !(fillStyleColor instanceof CanvasPattern)) {\n      fillStyleColor = asArray(fillStyleColor).map(function(c, i) {\n        return i != 3 ? c / 255 : c;\n      }) || DEFAULT_FILLSTYLE;\n    } else {\n      fillStyleColor = DEFAULT_FILLSTYLE;\n    }\n    if (!this.state_.fillColor || !equals(fillStyleColor, this.state_.fillColor)) {\n      this.state_.fillColor = fillStyleColor;\n      this.state_.changed = true;\n      this.styles_.push(fillStyleColor);\n    }\n    //Provide a null stroke style, if no strokeStyle is provided. Required for the draw interaction to work.\n    if (strokeStyle) {\n      this.lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n    } else {\n      var nullStrokeStyle = new Stroke({\n        color: [0, 0, 0, 0],\n        width: 0\n      });\n      this.lineStringReplay.setFillStrokeStyle(null, nullStrokeStyle);\n    }\n  };\n\n  return WebGLPolygonReplay;\n}(WebGLReplay));\n\n\nexport default WebGLPolygonReplay;\n\n//# sourceMappingURL=PolygonReplay.js.map","/**\n * @module ol/style/Atlas\n */\nimport {createCanvasContext2D} from '../dom.js';\n\n\n/**\n * @typedef {Object} AtlasBlock\n * @property {number} x\n * @property {number} y\n * @property {number} width\n * @property {number} height\n */\n\n/**\n * Provides information for an image inside an atlas.\n * `offsetX` and `offsetY` are the position of the image inside the atlas image `image`.\n * @typedef {Object} AtlasInfo\n * @property {number} offsetX\n * @property {number} offsetY\n * @property {HTMLCanvasElement} image\n */\n\n\n/**\n * @classesc\n * This class facilitates the creation of image atlases.\n *\n * Images added to an atlas will be rendered onto a single\n * atlas canvas. The distribution of images on the canvas is\n * managed with the bin packing algorithm described in:\n * http://www.blackpawn.com/texts/lightmaps/\n *\n * @param {number} size The size in pixels of the sprite image.\n * @param {number} space The space in pixels between images.\n *    Because texture coordinates are float values, the edges of\n *    images might not be completely correct (in a way that the\n *    edges overlap when being rendered). To avoid this we add a\n *    padding around each image.\n */\nvar Atlas = function Atlas(size, space) {\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.space_ = space;\n\n  /**\n   * @private\n   * @type {Array<AtlasBlock>}\n   */\n  this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}];\n\n  /**\n   * @private\n   * @type {Object<string, AtlasInfo>}\n   */\n  this.entries_ = {};\n\n  /**\n   * @private\n   * @type {CanvasRenderingContext2D}\n   */\n  this.context_ = createCanvasContext2D(size, size);\n\n  /**\n   * @private\n   * @type {HTMLCanvasElement}\n   */\n  this.canvas_ = this.context_.canvas;\n};\n\n/**\n * @param {string} id The identifier of the entry to check.\n * @return {?AtlasInfo} The atlas info.\n */\nAtlas.prototype.get = function get (id) {\n  return this.entries_[id] || null;\n};\n\n/**\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n *  Called to render the new image onto an atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n *  `renderCallback`.\n * @return {?AtlasInfo} The position and atlas image for the entry.\n */\nAtlas.prototype.add = function add (id, width, height, renderCallback, opt_this) {\n  for (var i = 0, ii = this.emptyBlocks_.length; i < ii; ++i) {\n    var block = this.emptyBlocks_[i];\n    if (block.width >= width + this.space_ &&\n        block.height >= height + this.space_) {\n      // we found a block that is big enough for our entry\n      var entry = {\n        offsetX: block.x + this.space_,\n        offsetY: block.y + this.space_,\n        image: this.canvas_\n      };\n      this.entries_[id] = entry;\n\n      // render the image on the atlas image\n      renderCallback.call(opt_this, this.context_,\n        block.x + this.space_, block.y + this.space_);\n\n      // split the block after the insertion, either horizontally or vertically\n      this.split_(i, block, width + this.space_, height + this.space_);\n\n      return entry;\n    }\n  }\n\n  // there is no space for the new entry in this atlas\n  return null;\n};\n\n/**\n * @private\n * @param {number} index The index of the block.\n * @param {AtlasBlock} block The block to split.\n * @param {number} width The width of the entry to insert.\n * @param {number} height The height of the entry to insert.\n */\nAtlas.prototype.split_ = function split_ (index, block, width, height) {\n  var deltaWidth = block.width - width;\n  var deltaHeight = block.height - height;\n\n  /** @type {AtlasBlock} */\n  var newBlock1;\n  /** @type {AtlasBlock} */\n  var newBlock2;\n\n  if (deltaWidth > deltaHeight) {\n    // split vertically\n    // block right of the inserted entry\n    newBlock1 = {\n      x: block.x + width,\n      y: block.y,\n      width: block.width - width,\n      height: block.height\n    };\n\n    // block below the inserted entry\n    newBlock2 = {\n      x: block.x,\n      y: block.y + height,\n      width: width,\n      height: block.height - height\n    };\n    this.updateBlocks_(index, newBlock1, newBlock2);\n  } else {\n    // split horizontally\n    // block right of the inserted entry\n    newBlock1 = {\n      x: block.x + width,\n      y: block.y,\n      width: block.width - width,\n      height: height\n    };\n\n    // block below the inserted entry\n    newBlock2 = {\n      x: block.x,\n      y: block.y + height,\n      width: block.width,\n      height: block.height - height\n    };\n    this.updateBlocks_(index, newBlock1, newBlock2);\n  }\n};\n\n/**\n * Remove the old block and insert new blocks at the same array position.\n * The new blocks are inserted at the same position, so that splitted\n * blocks (that are potentially smaller) are filled first.\n * @private\n * @param {number} index The index of the block to remove.\n * @param {AtlasBlock} newBlock1 The 1st block to add.\n * @param {AtlasBlock} newBlock2 The 2nd block to add.\n */\nAtlas.prototype.updateBlocks_ = function updateBlocks_ (index, newBlock1, newBlock2) {\n  var args = /** @type {Array<*>} */ ([index, 1]);\n  if (newBlock1.width > 0 && newBlock1.height > 0) {\n    args.push(newBlock1);\n  }\n  if (newBlock2.width > 0 && newBlock2.height > 0) {\n    args.push(newBlock2);\n  }\n  this.emptyBlocks_.splice.apply(this.emptyBlocks_, args);\n};\n\nexport default Atlas;\n\n//# sourceMappingURL=Atlas.js.map","/**\n * @module ol/style/AtlasManager\n */\nimport {MAX_TEXTURE_SIZE as WEBGL_MAX_TEXTURE_SIZE} from '../webgl.js';\nimport {VOID} from '../functions.js';\nimport Atlas from './Atlas.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [initialSize=256] The size in pixels of the first atlas image.\n * @property {number} [maxSize] The maximum size in pixels of atlas images. Default is\n * `webgl/MAX_TEXTURE_SIZE` or 2048 if WebGL is not supported.\n * @property {number} [space=1] The space in pixels between images.\n */\n\n\n/**\n * Provides information for an image inside an atlas manager.\n * `offsetX` and `offsetY` is the position of the image inside\n * the atlas image `image` and the position of the hit-detection image\n * inside the hit-detection atlas image `hitImage`.\n * @typedef {Object} AtlasManagerInfo\n * @property {number} offsetX\n * @property {number} offsetY\n * @property {HTMLCanvasElement} image\n * @property {HTMLCanvasElement} hitImage\n */\n\n\n/**\n * The size in pixels of the first atlas image.\n * @type {number}\n */\nvar INITIAL_ATLAS_SIZE = 256;\n\n/**\n * The maximum size in pixels of atlas images.\n * @type {number}\n */\nvar MAX_ATLAS_SIZE = -1;\n\n\n/**\n * @classdesc\n * Manages the creation of image atlases.\n *\n * Images added to this manager will be inserted into an atlas, which\n * will be used for rendering.\n * The `size` given in the constructor is the size for the first\n * atlas. After that, when new atlases are created, they will have\n * twice the size as the latest atlas (until `maxSize` is reached).\n *\n * If an application uses many images or very large images, it is recommended\n * to set a higher `size` value to avoid the creation of too many atlases.\n * @api\n */\nvar AtlasManager = function AtlasManager(opt_options) {\n\n  var options = opt_options || {};\n\n  /**\n   * The size in pixels of the latest atlas image.\n   * @private\n   * @type {number}\n   */\n  this.currentSize_ = options.initialSize !== undefined ?\n    options.initialSize : INITIAL_ATLAS_SIZE;\n\n  /**\n   * The maximum size in pixels of atlas images.\n   * @private\n   * @type {number}\n   */\n  this.maxSize_ = options.maxSize !== undefined ?\n    options.maxSize : MAX_ATLAS_SIZE != -1 ?\n      MAX_ATLAS_SIZE : WEBGL_MAX_TEXTURE_SIZE !== undefined ?\n        WEBGL_MAX_TEXTURE_SIZE : 2048;\n\n  /**\n   * The size in pixels between images.\n   * @private\n   * @type {number}\n   */\n  this.space_ = options.space !== undefined ? options.space : 1;\n\n  /**\n   * @private\n   * @type {Array<import(\"./Atlas.js\").default>}\n   */\n  this.atlases_ = [new Atlas(this.currentSize_, this.space_)];\n\n  /**\n   * The size in pixels of the latest atlas image for hit-detection images.\n   * @private\n   * @type {number}\n   */\n  this.currentHitSize_ = this.currentSize_;\n\n  /**\n   * @private\n   * @type {Array<import(\"./Atlas.js\").default>}\n   */\n  this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)];\n};\n\n/**\n * @param {string} id The identifier of the entry to check.\n * @return {?AtlasManagerInfo} The position and atlas image for the\n *  entry, or `null` if the entry is not part of the atlas manager.\n */\nAtlasManager.prototype.getInfo = function getInfo (id) {\n  /** @type {?import(\"./Atlas.js\").AtlasInfo} */\n  var info = this.getInfo_(this.atlases_, id);\n\n  if (!info) {\n    return null;\n  }\n  var hitInfo = /** @type {import(\"./Atlas.js\").AtlasInfo} */ (this.getInfo_(this.hitAtlases_, id));\n\n  return this.mergeInfos_(info, hitInfo);\n};\n\n/**\n * @private\n * @param {Array<import(\"./Atlas.js\").default>} atlases The atlases to search.\n * @param {string} id The identifier of the entry to check.\n * @return {?import(\"./Atlas.js\").AtlasInfo} The position and atlas image for the entry,\n *  or `null` if the entry is not part of the atlases.\n */\nAtlasManager.prototype.getInfo_ = function getInfo_ (atlases, id) {\n  for (var i = 0, ii = atlases.length; i < ii; ++i) {\n    var atlas = atlases[i];\n    var info = atlas.get(id);\n    if (info) {\n      return info;\n    }\n  }\n  return null;\n};\n\n/**\n * @private\n * @param {import(\"./Atlas.js\").AtlasInfo} info The info for the real image.\n * @param {import(\"./Atlas.js\").AtlasInfo} hitInfo The info for the hit-detection\n *  image.\n * @return {?AtlasManagerInfo} The position and atlas image for the\n *  entry, or `null` if the entry is not part of the atlases.\n */\nAtlasManager.prototype.mergeInfos_ = function mergeInfos_ (info, hitInfo) {\n  return (\n    /** @type {AtlasManagerInfo} */ ({\n      offsetX: info.offsetX,\n      offsetY: info.offsetY,\n      image: info.image,\n      hitImage: hitInfo.image\n    })\n  );\n};\n\n/**\n * Add an image to the atlas manager.\n *\n * If an entry for the given id already exists, the entry will\n * be overridden (but the space on the atlas graphic will not be freed).\n *\n * If `renderHitCallback` is provided, the image (or the hit-detection version\n * of the image) will be rendered into a separate hit-detection atlas image.\n *\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n *  Called to render the new image onto an atlas image.\n * @param {function(CanvasRenderingContext2D, number, number)=} opt_renderHitCallback Called to render a hit-detection image onto a hit\n *  detection atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n *  `renderCallback` and `renderHitCallback`.\n * @return {?AtlasManagerInfo}The position and atlas image for the\n *  entry, or `null` if the image is too big.\n */\nAtlasManager.prototype.add = function add (id, width, height, renderCallback, opt_renderHitCallback, opt_this) {\n  if (width + this.space_ > this.maxSize_ ||\n      height + this.space_ > this.maxSize_) {\n    return null;\n  }\n\n  /** @type {?import(\"./Atlas.js\").AtlasInfo} */\n  var info = this.add_(false, id, width, height, renderCallback, opt_this);\n  if (!info) {\n    return null;\n  }\n\n  // even if no hit-detection entry is requested, we insert a fake entry into\n  // the hit-detection atlas, to make sure that the offset is the same for\n  // the original image and the hit-detection image.\n  var renderHitCallback = opt_renderHitCallback !== undefined ?\n    opt_renderHitCallback : VOID;\n\n  var hitInfo = /** @type {import(\"./Atlas.js\").AtlasInfo} */ (this.add_(true,\n    id, width, height, renderHitCallback, opt_this));\n\n  return this.mergeInfos_(info, hitInfo);\n};\n\n/**\n * @private\n * @param {boolean} isHitAtlas If the hit-detection atlases are used.\n * @param {string} id The identifier of the entry to add.\n * @param {number} width The width.\n * @param {number} height The height.\n * @param {function(CanvasRenderingContext2D, number, number)} renderCallback\n *  Called to render the new image onto an atlas image.\n * @param {Object=} opt_this Value to use as `this` when executing\n *  `renderCallback` and `renderHitCallback`.\n * @return {?import(\"./Atlas.js\").AtlasInfo}The position and atlas image for the entry,\n *  or `null` if the image is too big.\n */\nAtlasManager.prototype.add_ = function add_ (isHitAtlas, id, width, height, renderCallback, opt_this) {\n  var atlases = (isHitAtlas) ? this.hitAtlases_ : this.atlases_;\n  var atlas, info, i, ii;\n  for (i = 0, ii = atlases.length; i < ii; ++i) {\n    atlas = atlases[i];\n    info = atlas.add(id, width, height, renderCallback, opt_this);\n    if (info) {\n      return info;\n    } else if (!info && i === ii - 1) {\n      // the entry could not be added to one of the existing atlases,\n      // create a new atlas that is twice as big and try to add to this one.\n      var size = (void 0);\n      if (isHitAtlas) {\n        size = Math.min(this.currentHitSize_ * 2, this.maxSize_);\n        this.currentHitSize_ = size;\n      } else {\n        size = Math.min(this.currentSize_ * 2, this.maxSize_);\n        this.currentSize_ = size;\n      }\n      atlas = new Atlas(size, this.space_);\n      atlases.push(atlas);\n      // run the loop another time\n      ++ii;\n    }\n  }\n  return null;\n};\n\nexport default AtlasManager;\n\n//# sourceMappingURL=AtlasManager.js.map","/**\n * @module ol/render/webgl/ReplayGroup\n */\n\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {buffer, createOrUpdateFromCoordinate} from '../../extent.js';\nimport {isEmpty} from '../../obj.js';\nimport {ORDER} from '../replay.js';\nimport ReplayGroup from '../ReplayGroup.js';\nimport WebGLCircleReplay from './CircleReplay.js';\nimport WebGLImageReplay from './ImageReplay.js';\nimport WebGLLineStringReplay from './LineStringReplay.js';\nimport WebGLPolygonReplay from './PolygonReplay.js';\nimport WebGLTextReplay from './TextReplay.js';\n\n/**\n * @type {Array<number>}\n */\nvar HIT_DETECTION_SIZE = [1, 1];\n\n/**\n * @type {Object<import(\"../ReplayType.js\").default, typeof import(\"./Replay.js\").default>}\n */\nvar BATCH_CONSTRUCTORS = {\n  'Circle': WebGLCircleReplay,\n  'Image': WebGLImageReplay,\n  'LineString': WebGLLineStringReplay,\n  'Polygon': WebGLPolygonReplay,\n  'Text': WebGLTextReplay\n};\n\n\nvar WebGLReplayGroup = /*@__PURE__*/(function (ReplayGroup) {\n  function WebGLReplayGroup(tolerance, maxExtent, opt_renderBuffer) {\n    ReplayGroup.call(this);\n\n    /**\n     * @type {import(\"../../extent.js\").Extent}\n     * @private\n     */\n    this.maxExtent_ = maxExtent;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.tolerance_ = tolerance;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.renderBuffer_ = opt_renderBuffer;\n\n    /**\n     * @private\n     * @type {!Object<string,\n     *        Object<import(\"../ReplayType.js\").default, import(\"./Replay.js\").default>>}\n     */\n    this.replaysByZIndex_ = {};\n\n  }\n\n  if ( ReplayGroup ) WebGLReplayGroup.__proto__ = ReplayGroup;\n  WebGLReplayGroup.prototype = Object.create( ReplayGroup && ReplayGroup.prototype );\n  WebGLReplayGroup.prototype.constructor = WebGLReplayGroup;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLReplayGroup.prototype.addDeclutter = function addDeclutter (group) {\n    return [];\n  };\n\n  /**\n   * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n   * @return {function()} Delete resources function.\n   */\n  WebGLReplayGroup.prototype.getDeleteResourcesFunction = function getDeleteResourcesFunction (context) {\n    var functions = [];\n    var zKey;\n    for (zKey in this.replaysByZIndex_) {\n      var replays = this.replaysByZIndex_[zKey];\n      for (var replayKey in replays) {\n        functions.push(\n          replays[replayKey].getDeleteResourcesFunction(context));\n      }\n    }\n    return function() {\n      var arguments$1 = arguments;\n\n      var length = functions.length;\n      var result;\n      for (var i = 0; i < length; i++) {\n        result = functions[i].apply(this, arguments$1);\n      }\n      return result;\n    };\n  };\n\n  /**\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   */\n  WebGLReplayGroup.prototype.finish = function finish (context) {\n    var zKey;\n    for (zKey in this.replaysByZIndex_) {\n      var replays = this.replaysByZIndex_[zKey];\n      for (var replayKey in replays) {\n        replays[replayKey].finish(context);\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLReplayGroup.prototype.getReplay = function getReplay (zIndex, replayType) {\n    var zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n    var replays = this.replaysByZIndex_[zIndexKey];\n    if (replays === undefined) {\n      replays = {};\n      this.replaysByZIndex_[zIndexKey] = replays;\n    }\n    var replay = replays[replayType];\n    if (replay === undefined) {\n      var Constructor = BATCH_CONSTRUCTORS[replayType];\n      replay = new Constructor(this.tolerance_, this.maxExtent_);\n      replays[replayType] = replay;\n    }\n    return replay;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLReplayGroup.prototype.isEmpty = function isEmpty$1 () {\n    return isEmpty(this.replaysByZIndex_);\n  };\n\n  /**\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} opacity Global opacity.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   */\n  WebGLReplayGroup.prototype.replay = function replay (\n    context,\n    center,\n    resolution,\n    rotation,\n    size,\n    pixelRatio,\n    opacity,\n    skippedFeaturesHash\n  ) {\n    /** @type {Array<number>} */\n    var zs = Object.keys(this.replaysByZIndex_).map(Number);\n    zs.sort(numberSafeCompareFunction);\n\n    var i, ii, j, jj, replays, replay;\n    for (i = 0, ii = zs.length; i < ii; ++i) {\n      replays = this.replaysByZIndex_[zs[i].toString()];\n      for (j = 0, jj = ORDER.length; j < jj; ++j) {\n        replay = replays[ORDER[j]];\n        if (replay !== undefined) {\n          replay.replay(context,\n            center, resolution, rotation, size, pixelRatio,\n            opacity, skippedFeaturesHash,\n            undefined, false);\n        }\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} opacity Global opacity.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} featureCallback Feature callback.\n   * @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.\n   * @param {import(\"../../extent.js\").Extent=} opt_hitExtent Hit extent: Only features intersecting\n   *  this extent are checked.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplayGroup.prototype.replayHitDetection_ = function replayHitDetection_ (\n    context,\n    center,\n    resolution,\n    rotation,\n    size,\n    pixelRatio,\n    opacity,\n    skippedFeaturesHash,\n    featureCallback,\n    oneByOne,\n    opt_hitExtent\n  ) {\n    /** @type {Array<number>} */\n    var zs = Object.keys(this.replaysByZIndex_).map(Number);\n    zs.sort(function(a, b) {\n      return b - a;\n    });\n\n    var i, ii, j, replays, replay, result;\n    for (i = 0, ii = zs.length; i < ii; ++i) {\n      replays = this.replaysByZIndex_[zs[i].toString()];\n      for (j = ORDER.length - 1; j >= 0; --j) {\n        replay = replays[ORDER[j]];\n        if (replay !== undefined) {\n          result = replay.replay(context,\n            center, resolution, rotation, size, pixelRatio, opacity,\n            skippedFeaturesHash, featureCallback, oneByOne, opt_hitExtent);\n          if (result) {\n            return result;\n          }\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} opacity Global opacity.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @param {function((import(\"../../Feature.js\").default|import(\"../Feature.js\").default)): T|undefined} callback Feature callback.\n   * @return {T|undefined} Callback result.\n   * @template T\n   */\n  WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n    coordinate,\n    context,\n    center,\n    resolution,\n    rotation,\n    size,\n    pixelRatio,\n    opacity,\n    skippedFeaturesHash,\n    callback\n  ) {\n    var gl = context.getGL();\n    gl.bindFramebuffer(\n      gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());\n\n\n    /**\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    var hitExtent;\n    if (this.renderBuffer_ !== undefined) {\n      // build an extent around the coordinate, so that only features that\n      // intersect this extent are checked\n      hitExtent = buffer(createOrUpdateFromCoordinate(coordinate), resolution * this.renderBuffer_);\n    }\n\n    return this.replayHitDetection_(context,\n      coordinate, resolution, rotation, HIT_DETECTION_SIZE,\n      pixelRatio, opacity, skippedFeaturesHash,\n      /**\n       * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n       * @return {?} Callback result.\n       */\n      function(feature) {\n        var imageData = new Uint8Array(4);\n        gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n\n        if (imageData[3] > 0) {\n          var result = callback(feature);\n          if (result) {\n            return result;\n          }\n        }\n      }, true, hitExtent);\n  };\n\n  /**\n   * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n   * @param {number} resolution Resolution.\n   * @param {number} rotation Rotation.\n   * @param {import(\"../../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {number} opacity Global opacity.\n   * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.\n   * @return {boolean} Is there a feature at the given coordinate?\n   */\n  WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (\n    coordinate,\n    context,\n    center,\n    resolution,\n    rotation,\n    size,\n    pixelRatio,\n    opacity,\n    skippedFeaturesHash\n  ) {\n    var gl = context.getGL();\n    gl.bindFramebuffer(\n      gl.FRAMEBUFFER, context.getHitDetectionFramebuffer());\n\n    var hasFeature = this.replayHitDetection_(context,\n      coordinate, resolution, rotation, HIT_DETECTION_SIZE,\n      pixelRatio, opacity, skippedFeaturesHash,\n      /**\n       * @param {import(\"../../Feature.js\").default|import(\"../Feature.js\").default} feature Feature.\n       * @return {boolean} Is there a feature?\n       */\n      function(feature) {\n        var imageData = new Uint8Array(4);\n        gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n        return imageData[3] > 0;\n      }, false);\n\n    return hasFeature !== undefined;\n  };\n\n  return WebGLReplayGroup;\n}(ReplayGroup));\n\n\nexport default WebGLReplayGroup;\n\n//# sourceMappingURL=ReplayGroup.js.map","/**\n * @module ol/render/webgl/TextReplay\n */\nimport {getUid} from '../../util.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport {CANVAS_LINE_DASH} from '../../has.js';\nimport {TEXT_ALIGN} from '../replay.js';\nimport {DEFAULT_FILLSTYLE, DEFAULT_FONT, DEFAULT_LINECAP, DEFAULT_LINEDASH,\n  DEFAULT_LINEDASHOFFSET, DEFAULT_LINEJOIN, DEFAULT_LINEWIDTH, DEFAULT_MITERLIMIT,\n  DEFAULT_STROKESTYLE, DEFAULT_TEXTALIGN, DEFAULT_TEXTBASELINE} from '../webgl.js';\nimport WebGLTextureReplay from './TextureReplay.js';\nimport AtlasManager from '../../style/AtlasManager.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n/**\n * @typedef {Object} GlyphAtlas\n * @property {import(\"../../style/AtlasManager.js\").default} atlas\n * @property {Object<string, number>} width\n * @property {number} height\n */\n\n\nvar WebGLTextReplay = /*@__PURE__*/(function (WebGLTextureReplay) {\n  function WebGLTextReplay(tolerance, maxExtent) {\n    WebGLTextureReplay.call(this, tolerance, maxExtent);\n\n    /**\n     * @private\n     * @type {Array<HTMLCanvasElement>}\n     */\n    this.images_ = [];\n\n    /**\n     * @private\n     * @type {Array<WebGLTexture>}\n     */\n    this.textures_ = [];\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.measureCanvas_ = createCanvasContext2D(0, 0).canvas;\n\n    /**\n     * @private\n     * @type {{strokeColor: (import(\"../../colorlike.js\").ColorLike|null),\n     *         lineCap: (string|undefined),\n     *         lineDash: Array<number>,\n     *         lineDashOffset: (number|undefined),\n     *         lineJoin: (string|undefined),\n     *         lineWidth: number,\n     *         miterLimit: (number|undefined),\n     *         fillColor: (import(\"../../colorlike.js\").ColorLike|null),\n     *         font: (string|undefined),\n     *         scale: (number|undefined)}}\n     */\n    this.state_ = {\n      strokeColor: null,\n      lineCap: undefined,\n      lineDash: null,\n      lineDashOffset: undefined,\n      lineJoin: undefined,\n      lineWidth: 0,\n      miterLimit: undefined,\n      fillColor: null,\n      font: undefined,\n      scale: undefined\n    };\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.text_ = '';\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.textAlign_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.textBaseline_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.offsetX_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.offsetY_ = undefined;\n\n    /**\n     * @private\n     * @type {Object<string, GlyphAtlas>}\n     */\n    this.atlases_ = {};\n\n    /**\n     * @private\n     * @type {GlyphAtlas|undefined}\n     */\n    this.currAtlas_ = undefined;\n\n    this.scale = 1;\n\n    this.opacity = 1;\n\n  }\n\n  if ( WebGLTextureReplay ) WebGLTextReplay.__proto__ = WebGLTextureReplay;\n  WebGLTextReplay.prototype = Object.create( WebGLTextureReplay && WebGLTextureReplay.prototype );\n  WebGLTextReplay.prototype.constructor = WebGLTextReplay;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextReplay.prototype.drawText = function drawText (geometry, feature) {\n    if (this.text_) {\n      var flatCoordinates = null;\n      var offset = 0;\n      var end = 2;\n      var stride = 2;\n      switch (geometry.getType()) {\n        case GeometryType.POINT:\n        case GeometryType.MULTI_POINT:\n          flatCoordinates = geometry.getFlatCoordinates();\n          end = flatCoordinates.length;\n          stride = geometry.getStride();\n          break;\n        case GeometryType.CIRCLE:\n          flatCoordinates = /** @type {import(\"../../geom/Circle.js\").default} */ (geometry).getCenter();\n          break;\n        case GeometryType.LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/LineString.js\").default} */ (geometry).getFlatMidpoint();\n          break;\n        case GeometryType.MULTI_LINE_STRING:\n          flatCoordinates = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry).getFlatMidpoints();\n          end = flatCoordinates.length;\n          break;\n        case GeometryType.POLYGON:\n          flatCoordinates = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry).getFlatInteriorPoint();\n          break;\n        case GeometryType.MULTI_POLYGON:\n          flatCoordinates = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry).getFlatInteriorPoints();\n          end = flatCoordinates.length;\n          break;\n        default:\n      }\n      this.startIndices.push(this.indices.length);\n      this.startIndicesFeature.push(feature);\n\n      var glyphAtlas = this.currAtlas_;\n      var lines = this.text_.split('\\n');\n      var textSize = this.getTextSize_(lines);\n      var i, ii, j, jj, currX, currY, charArr, charInfo;\n      var anchorX = Math.round(textSize[0] * this.textAlign_ - this.offsetX_);\n      var anchorY = Math.round(textSize[1] * this.textBaseline_ - this.offsetY_);\n      var lineWidth = (this.state_.lineWidth / 2) * this.state_.scale;\n\n      for (i = 0, ii = lines.length; i < ii; ++i) {\n        currX = 0;\n        currY = glyphAtlas.height * i;\n        charArr = lines[i].split('');\n\n        for (j = 0, jj = charArr.length; j < jj; ++j) {\n          charInfo = glyphAtlas.atlas.getInfo(charArr[j]);\n\n          if (charInfo) {\n            var image = charInfo.image;\n\n            this.anchorX = anchorX - currX;\n            this.anchorY = anchorY - currY;\n            this.originX = j === 0 ? charInfo.offsetX - lineWidth : charInfo.offsetX;\n            this.originY = charInfo.offsetY;\n            this.height = glyphAtlas.height;\n            this.width = j === 0 || j === charArr.length - 1 ?\n              glyphAtlas.width[charArr[j]] + lineWidth : glyphAtlas.width[charArr[j]];\n            this.imageHeight = image.height;\n            this.imageWidth = image.width;\n\n            if (this.images_.length === 0) {\n              this.images_.push(image);\n            } else {\n              var currentImage = this.images_[this.images_.length - 1];\n              if (getUid(currentImage) != getUid(image)) {\n                this.groupIndices.push(this.indices.length);\n                this.images_.push(image);\n              }\n            }\n\n            this.drawText_(flatCoordinates, offset, end, stride);\n          }\n          currX += this.width;\n        }\n      }\n    }\n  };\n\n  /**\n   * @private\n   * @param {Array<string>} lines Label to draw split to lines.\n   * @return {Array<number>} Size of the label in pixels.\n   */\n  WebGLTextReplay.prototype.getTextSize_ = function getTextSize_ (lines) {\n    var self = this;\n    var glyphAtlas = this.currAtlas_;\n    var textHeight = lines.length * glyphAtlas.height;\n    //Split every line to an array of chars, sum up their width, and select the longest.\n    var textWidth = lines.map(function(str) {\n      var sum = 0;\n      for (var i = 0, ii = str.length; i < ii; ++i) {\n        var curr = str[i];\n        if (!glyphAtlas.width[curr]) {\n          self.addCharToAtlas_(curr);\n        }\n        sum += glyphAtlas.width[curr] ? glyphAtlas.width[curr] : 0;\n      }\n      return sum;\n    }).reduce(function(max, curr) {\n      return Math.max(max, curr);\n    });\n\n    return [textWidth, textHeight];\n  };\n\n  /**\n   * @private\n   * @param {Array<number>} flatCoordinates Flat coordinates.\n   * @param {number} offset Offset.\n   * @param {number} end End.\n   * @param {number} stride Stride.\n   */\n  WebGLTextReplay.prototype.drawText_ = function drawText_ (flatCoordinates, offset, end, stride) {\n    for (var i = offset, ii = end; i < ii; i += stride) {\n      this.drawCoordinates(flatCoordinates, offset, end, stride);\n    }\n  };\n\n  /**\n   * @private\n   * @param {string} char Character.\n   */\n  WebGLTextReplay.prototype.addCharToAtlas_ = function addCharToAtlas_ (char) {\n    if (char.length === 1) {\n      var glyphAtlas = this.currAtlas_;\n      var state = this.state_;\n      var mCtx = this.measureCanvas_.getContext('2d');\n      mCtx.font = state.font;\n      var width = Math.ceil(mCtx.measureText(char).width * state.scale);\n\n      var info = glyphAtlas.atlas.add(char, width, glyphAtlas.height,\n        function(ctx, x, y) {\n          //Parameterize the canvas\n          ctx.font = /** @type {string} */ (state.font);\n          ctx.fillStyle = state.fillColor;\n          ctx.strokeStyle = state.strokeColor;\n          ctx.lineWidth = state.lineWidth;\n          ctx.lineCap = /** @type {CanvasLineCap} */ (state.lineCap);\n          ctx.lineJoin = /** @type {CanvasLineJoin} */ (state.lineJoin);\n          ctx.miterLimit = /** @type {number} */ (state.miterLimit);\n          ctx.textAlign = 'left';\n          ctx.textBaseline = 'top';\n          if (CANVAS_LINE_DASH && state.lineDash) {\n            //FIXME: use pixelRatio\n            ctx.setLineDash(state.lineDash);\n            ctx.lineDashOffset = /** @type {number} */ (state.lineDashOffset);\n          }\n          if (state.scale !== 1) {\n            //FIXME: use pixelRatio\n            ctx.setTransform(/** @type {number} */ (state.scale), 0, 0,\n              /** @type {number} */ (state.scale), 0, 0);\n          }\n\n          //Draw the character on the canvas\n          if (state.strokeColor) {\n            ctx.strokeText(char, x, y);\n          }\n          if (state.fillColor) {\n            ctx.fillText(char, x, y);\n          }\n        });\n\n      if (info) {\n        glyphAtlas.width[char] = width;\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextReplay.prototype.finish = function finish (context) {\n    var gl = context.getGL();\n\n    this.groupIndices.push(this.indices.length);\n    this.hitDetectionGroupIndices = this.groupIndices;\n\n    // create, bind, and populate the vertices buffer\n    this.verticesBuffer = new WebGLBuffer(this.vertices);\n\n    // create, bind, and populate the indices buffer\n    this.indicesBuffer = new WebGLBuffer(this.indices);\n\n    // create textures\n    /** @type {Object<string, WebGLTexture>} */\n    var texturePerImage = {};\n\n    this.createTextures(this.textures_, this.images_, texturePerImage, gl);\n\n    this.state_ = {\n      strokeColor: null,\n      lineCap: undefined,\n      lineDash: null,\n      lineDashOffset: undefined,\n      lineJoin: undefined,\n      lineWidth: 0,\n      miterLimit: undefined,\n      fillColor: null,\n      font: undefined,\n      scale: undefined\n    };\n    this.text_ = '';\n    this.textAlign_ = undefined;\n    this.textBaseline_ = undefined;\n    this.offsetX_ = undefined;\n    this.offsetY_ = undefined;\n    this.images_ = null;\n    this.atlases_ = {};\n    this.currAtlas_ = undefined;\n    WebGLTextureReplay.prototype.finish.call(this, context);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextReplay.prototype.setTextStyle = function setTextStyle (textStyle) {\n    var state = this.state_;\n    var textFillStyle = textStyle.getFill();\n    var textStrokeStyle = textStyle.getStroke();\n    if (!textStyle || !textStyle.getText() || (!textFillStyle && !textStrokeStyle)) {\n      this.text_ = '';\n    } else {\n      if (!textFillStyle) {\n        state.fillColor = null;\n      } else {\n        var textFillStyleColor = textFillStyle.getColor();\n        state.fillColor = asColorLike(textFillStyleColor ?\n          textFillStyleColor : DEFAULT_FILLSTYLE);\n      }\n      if (!textStrokeStyle) {\n        state.strokeColor = null;\n        state.lineWidth = 0;\n      } else {\n        var textStrokeStyleColor = textStrokeStyle.getColor();\n        state.strokeColor = asColorLike(textStrokeStyleColor ?\n          textStrokeStyleColor : DEFAULT_STROKESTYLE);\n        state.lineWidth = textStrokeStyle.getWidth() || DEFAULT_LINEWIDTH;\n        state.lineCap = textStrokeStyle.getLineCap() || DEFAULT_LINECAP;\n        state.lineDashOffset = textStrokeStyle.getLineDashOffset() || DEFAULT_LINEDASHOFFSET;\n        state.lineJoin = textStrokeStyle.getLineJoin() || DEFAULT_LINEJOIN;\n        state.miterLimit = textStrokeStyle.getMiterLimit() || DEFAULT_MITERLIMIT;\n        var lineDash = textStrokeStyle.getLineDash();\n        state.lineDash = lineDash ? lineDash.slice() : DEFAULT_LINEDASH;\n      }\n      state.font = textStyle.getFont() || DEFAULT_FONT;\n      state.scale = textStyle.getScale() || 1;\n      this.text_ = /** @type {string} */ (textStyle.getText());\n      var textAlign = TEXT_ALIGN[textStyle.getTextAlign()];\n      var textBaseline = TEXT_ALIGN[textStyle.getTextBaseline()];\n      this.textAlign_ = textAlign === undefined ?\n        DEFAULT_TEXTALIGN : textAlign;\n      this.textBaseline_ = textBaseline === undefined ?\n        DEFAULT_TEXTBASELINE : textBaseline;\n      this.offsetX_ = textStyle.getOffsetX() || 0;\n      this.offsetY_ = textStyle.getOffsetY() || 0;\n      this.rotateWithView = !!textStyle.getRotateWithView();\n      this.rotation = textStyle.getRotation() || 0;\n\n      this.currAtlas_ = this.getAtlas_(state);\n    }\n  };\n\n  /**\n   * @private\n   * @param {Object} state Font attributes.\n   * @return {GlyphAtlas} Glyph atlas.\n   */\n  WebGLTextReplay.prototype.getAtlas_ = function getAtlas_ (state) {\n    var params = [];\n    for (var i in state) {\n      if (state[i] || state[i] === 0) {\n        if (Array.isArray(state[i])) {\n          params = params.concat(state[i]);\n        } else {\n          params.push(state[i]);\n        }\n      }\n    }\n    var hash = this.calculateHash_(params);\n    if (!this.atlases_[hash]) {\n      var mCtx = this.measureCanvas_.getContext('2d');\n      mCtx.font = state.font;\n      var height = Math.ceil((mCtx.measureText('M').width * 1.5 +\n          state.lineWidth / 2) * state.scale);\n\n      this.atlases_[hash] = {\n        atlas: new AtlasManager({\n          space: state.lineWidth + 1\n        }),\n        width: {},\n        height: height\n      };\n    }\n    return this.atlases_[hash];\n  };\n\n  /**\n   * @private\n   * @param {Array<string|number>} params Array of parameters.\n   * @return {string} Hash string.\n   */\n  WebGLTextReplay.prototype.calculateHash_ = function calculateHash_ (params) {\n    //TODO: Create a more performant, reliable, general hash function.\n    var hash = '';\n    for (var i = 0, ii = params.length; i < ii; ++i) {\n      hash += params[i];\n    }\n    return hash;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextReplay.prototype.getTextures = function getTextures (opt_all) {\n    return this.textures_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTextReplay.prototype.getHitDetectionTextures = function getHitDetectionTextures () {\n    return this.textures_;\n  };\n\n  return WebGLTextReplay;\n}(WebGLTextureReplay));\n\n\nexport default WebGLTextReplay;\n\n//# sourceMappingURL=TextReplay.js.map","/**\n * @module ol/render/webgl/Immediate\n */\n\nimport {intersects} from '../../extent.js';\nimport GeometryType from '../../geom/GeometryType.js';\nimport ReplayType from '../ReplayType.js';\nimport VectorContext from '../VectorContext.js';\nimport WebGLReplayGroup from './ReplayGroup.js';\n\nvar WebGLImmediateRenderer = /*@__PURE__*/(function (VectorContext) {\n  function WebGLImmediateRenderer(context, center, resolution, rotation, size, extent, pixelRatio) {\n    VectorContext.call(this);\n\n    /**\n     * @private\n     */\n    this.context_ = context;\n\n    /**\n     * @private\n     */\n    this.center_ = center;\n\n    /**\n     * @private\n     */\n    this.extent_ = extent;\n\n    /**\n     * @private\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     */\n    this.size_ = size;\n\n    /**\n     * @private\n     */\n    this.rotation_ = rotation;\n\n    /**\n     * @private\n     */\n    this.resolution_ = resolution;\n\n    /**\n     * @private\n     * @type {import(\"../../style/Image.js\").default}\n     */\n    this.imageStyle_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../style/Fill.js\").default}\n     */\n    this.fillStyle_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../style/Stroke.js\").default}\n     */\n    this.strokeStyle_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../style/Text.js\").default}\n     */\n    this.textStyle_ = null;\n\n  }\n\n  if ( VectorContext ) WebGLImmediateRenderer.__proto__ = VectorContext;\n  WebGLImmediateRenderer.prototype = Object.create( VectorContext && VectorContext.prototype );\n  WebGLImmediateRenderer.prototype.constructor = WebGLImmediateRenderer;\n\n  /**\n   * @param {import(\"./ReplayGroup.js\").default} replayGroup Replay group.\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n   * @private\n   */\n  WebGLImmediateRenderer.prototype.drawText_ = function drawText_ (replayGroup, geometry) {\n    var context = this.context_;\n    var replay = /** @type {import(\"./TextReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.TEXT));\n    replay.setTextStyle(this.textStyle_);\n    replay.drawText(geometry, null);\n    replay.finish(context);\n    // default colors\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n  };\n\n  /**\n   * Set the rendering style.  Note that since this is an immediate rendering API,\n   * any `zIndex` on the provided style will be ignored.\n   *\n   * @param {import(\"../../style/Style.js\").default} style The rendering style.\n   * @override\n   * @api\n   */\n  WebGLImmediateRenderer.prototype.setStyle = function setStyle (style) {\n    this.setFillStrokeStyle(style.getFill(), style.getStroke());\n    this.setImageStyle(style.getImage());\n    this.setTextStyle(style.getText());\n  };\n\n  /**\n   * Render a geometry into the canvas.  Call\n   * {@link ol/render/webgl/Immediate#setStyle} first to set the rendering style.\n   *\n   * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n   * @override\n   * @api\n   */\n  WebGLImmediateRenderer.prototype.drawGeometry = function drawGeometry (geometry) {\n    var type = geometry.getType();\n    switch (type) {\n      case GeometryType.POINT:\n        this.drawPoint(/** @type {import(\"../../geom/Point.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.LINE_STRING:\n        this.drawLineString(/** @type {import(\"../../geom/LineString.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.POLYGON:\n        this.drawPolygon(/** @type {import(\"../../geom/Polygon.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.MULTI_POINT:\n        this.drawMultiPoint(/** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.MULTI_LINE_STRING:\n        this.drawMultiLineString(/** @type {import(\"../../geom/MultiLineString.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.MULTI_POLYGON:\n        this.drawMultiPolygon(/** @type {import(\"../../geom/MultiPolygon.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.GEOMETRY_COLLECTION:\n        this.drawGeometryCollection(/** @type {import(\"../../geom/GeometryCollection.js\").default} */ (geometry), null);\n        break;\n      case GeometryType.CIRCLE:\n        this.drawCircle(/** @type {import(\"../../geom/Circle.js\").default} */ (geometry), null);\n        break;\n      default:\n        // pass\n    }\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  WebGLImmediateRenderer.prototype.drawFeature = function drawFeature (feature, style) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry || !intersects(this.extent_, geometry.getExtent())) {\n      return;\n    }\n    this.setStyle(style);\n    this.drawGeometry(geometry);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawGeometryCollection = function drawGeometryCollection (geometry, data) {\n    var geometries = geometry.getGeometriesArray();\n    var i, ii;\n    for (i = 0, ii = geometries.length; i < ii; ++i) {\n      this.drawGeometry(geometries[i]);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawPoint = function drawPoint (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./ImageReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.IMAGE));\n    replay.setImageStyle(this.imageStyle_);\n    replay.drawPoint(geometry, data);\n    replay.finish(context);\n    // default colors\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawMultiPoint = function drawMultiPoint (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./ImageReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.IMAGE));\n    replay.setImageStyle(this.imageStyle_);\n    replay.drawMultiPoint(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawLineString = function drawLineString (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./LineStringReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.LINE_STRING));\n    replay.setFillStrokeStyle(null, this.strokeStyle_);\n    replay.drawLineString(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawMultiLineString = function drawMultiLineString (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./LineStringReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.LINE_STRING));\n    replay.setFillStrokeStyle(null, this.strokeStyle_);\n    replay.drawMultiLineString(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawPolygon = function drawPolygon (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./PolygonReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.POLYGON));\n    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n    replay.drawPolygon(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawMultiPolygon = function drawMultiPolygon (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./PolygonReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.POLYGON));\n    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n    replay.drawMultiPolygon(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.drawCircle = function drawCircle (geometry, data) {\n    var context = this.context_;\n    var replayGroup = new WebGLReplayGroup(1, this.extent_);\n    var replay = /** @type {import(\"./CircleReplay.js\").default} */ (\n      replayGroup.getReplay(0, ReplayType.CIRCLE));\n    replay.setFillStrokeStyle(this.fillStyle_, this.strokeStyle_);\n    replay.drawCircle(geometry, data);\n    replay.finish(context);\n    var opacity = 1;\n    /** @type {Object<string, boolean>} */\n    var skippedFeatures = {};\n    var featureCallback;\n    var oneByOne = false;\n    replay.replay(this.context_, this.center_, this.resolution_, this.rotation_,\n      this.size_, this.pixelRatio_, opacity, skippedFeatures, featureCallback,\n      oneByOne);\n    replay.getDeleteResourcesFunction(context)();\n\n    if (this.textStyle_) {\n      this.drawText_(replayGroup, geometry);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.setImageStyle = function setImageStyle (imageStyle) {\n    this.imageStyle_ = imageStyle;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.setFillStrokeStyle = function setFillStrokeStyle (fillStyle, strokeStyle) {\n    this.fillStyle_ = fillStyle;\n    this.strokeStyle_ = strokeStyle;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImmediateRenderer.prototype.setTextStyle = function setTextStyle (textStyle) {\n    this.textStyle_ = textStyle;\n  };\n\n  return WebGLImmediateRenderer;\n}(VectorContext));\n\n\nexport default WebGLImmediateRenderer;\n\n//# sourceMappingURL=Immediate.js.map","/**\n * @module ol/renderer/webgl/defaultmapshader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../webgl.js';\nimport WebGLFragment from '../../webgl/Fragment.js';\nimport WebGLVertex from '../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\nvarying vec2 v_texCoord;\\n\\n\\nuniform float u_opacity;\\nuniform sampler2D u_texture;\\n\\nvoid main(void) {\\n  vec4 texColor = texture2D(u_texture, v_texCoord);\\n  gl_FragColor.rgb = texColor.rgb;\\n  gl_FragColor.a = texColor.a * u_opacity;\\n}\\n' :\n  'precision mediump float;varying vec2 a;uniform float f;uniform sampler2D g;void main(void){vec4 texColor=texture2D(g,a);gl_FragColor.rgb=texColor.rgb;gl_FragColor.a=texColor.a*f;}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  'varying vec2 v_texCoord;\\n\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\n\\nuniform mat4 u_texCoordMatrix;\\nuniform mat4 u_projectionMatrix;\\n\\nvoid main(void) {\\n  gl_Position = u_projectionMatrix * vec4(a_position, 0., 1.);\\n  v_texCoord = (u_texCoordMatrix * vec4(a_texCoord, 0., 1.)).st;\\n}\\n\\n\\n' :\n  'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform mat4 d;uniform mat4 e;void main(void){gl_Position=e*vec4(b,0.,1.);a=(d*vec4(c,0.,1.)).st;}');\n\n//# sourceMappingURL=defaultmapshader.js.map","/**\n * @module ol/renderer/webgl/defaultmapshader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_texCoordMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_texCoordMatrix' : 'd');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_projectionMatrix = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'e');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_opacity = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_opacity' : 'f');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_texture = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_texture' : 'g');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'b');\n\n  /**\n   * @type {number}\n   */\n  this.a_texCoord = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_texCoord' : 'c');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/renderer/webgl/Layer\n */\nimport {abstract} from '../../util.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLImmediateRenderer from '../../render/webgl/Immediate.js';\nimport LayerRenderer from '../Layer.js';\nimport {fragment, vertex} from './defaultmapshader.js';\nimport Locations from './defaultmapshader/Locations.js';\nimport {create as createTransform} from '../../transform.js';\nimport {create, fromTransform} from '../../vec/mat4.js';\nimport {ARRAY_BUFFER, FRAMEBUFFER, FLOAT, TEXTURE_2D,\n  TRIANGLE_STRIP, COLOR_ATTACHMENT0} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\nimport {createEmptyTexture} from '../../webgl/Context.js';\n\n/**\n * @abstract\n */\nvar WebGLLayerRenderer = /*@__PURE__*/(function (LayerRenderer) {\n  function WebGLLayerRenderer(mapRenderer, layer) {\n\n    LayerRenderer.call(this, layer);\n\n    /**\n     * @protected\n     * @type {import(\"./Map.js\").default}\n     */\n    this.mapRenderer = mapRenderer;\n\n    /**\n     * @private\n     * @type {import(\"../../webgl/Buffer.js\").default}\n     */\n    this.arrayBuffer_ = new WebGLBuffer([\n      -1, -1, 0, 0,\n      1, -1, 1, 0,\n      -1, 1, 0, 1,\n      1, 1, 1, 1\n    ]);\n\n    /**\n     * @protected\n     * @type {WebGLTexture}\n     */\n    this.texture = null;\n\n    /**\n     * @protected\n     * @type {WebGLFramebuffer}\n     */\n    this.framebuffer = null;\n\n    /**\n     * @protected\n     * @type {number|undefined}\n     */\n    this.framebufferDimension = undefined;\n\n    /**\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.texCoordMatrix = createTransform();\n\n    /**\n     * @protected\n     * @type {import(\"../../transform.js\").Transform}\n     */\n    this.projectionMatrix = createTransform();\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.tmpMat4_ = create();\n\n    /**\n     * @private\n     * @type {import(\"./defaultmapshader/Locations.js\").default}\n     */\n    this.defaultLocations_ = null;\n\n  }\n\n  if ( LayerRenderer ) WebGLLayerRenderer.__proto__ = LayerRenderer;\n  WebGLLayerRenderer.prototype = Object.create( LayerRenderer && LayerRenderer.prototype );\n  WebGLLayerRenderer.prototype.constructor = WebGLLayerRenderer;\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {number} framebufferDimension Framebuffer dimension.\n   * @protected\n   */\n  WebGLLayerRenderer.prototype.bindFramebuffer = function bindFramebuffer (frameState, framebufferDimension) {\n\n    var gl = this.mapRenderer.getGL();\n\n    if (this.framebufferDimension === undefined ||\n        this.framebufferDimension != framebufferDimension) {\n      /**\n       * @param {WebGLRenderingContext} gl GL.\n       * @param {WebGLFramebuffer} framebuffer Framebuffer.\n       * @param {WebGLTexture} texture Texture.\n       */\n      var postRenderFunction = function(gl, framebuffer, texture) {\n        if (!gl.isContextLost()) {\n          gl.deleteFramebuffer(framebuffer);\n          gl.deleteTexture(texture);\n        }\n      }.bind(null, gl, this.framebuffer, this.texture);\n\n      frameState.postRenderFunctions.push(\n        /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n      );\n\n      var texture = createEmptyTexture(\n        gl, framebufferDimension, framebufferDimension);\n\n      var framebuffer = gl.createFramebuffer();\n      gl.bindFramebuffer(FRAMEBUFFER, framebuffer);\n      gl.framebufferTexture2D(FRAMEBUFFER,\n        COLOR_ATTACHMENT0, TEXTURE_2D, texture, 0);\n\n      this.texture = texture;\n      this.framebuffer = framebuffer;\n      this.framebufferDimension = framebufferDimension;\n\n    } else {\n      gl.bindFramebuffer(FRAMEBUFFER, this.framebuffer);\n    }\n\n  };\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   */\n  WebGLLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n\n    this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, context, frameState);\n\n    context.bindBuffer(ARRAY_BUFFER, this.arrayBuffer_);\n\n    var gl = context.getGL();\n\n    var program = context.getProgram(fragment, vertex);\n\n    var locations;\n    if (!this.defaultLocations_) {\n      locations = new Locations(gl, program);\n      this.defaultLocations_ = locations;\n    } else {\n      locations = this.defaultLocations_;\n    }\n\n    if (context.useProgram(program)) {\n      gl.enableVertexAttribArray(locations.a_position);\n      gl.vertexAttribPointer(\n        locations.a_position, 2, FLOAT, false, 16, 0);\n      gl.enableVertexAttribArray(locations.a_texCoord);\n      gl.vertexAttribPointer(\n        locations.a_texCoord, 2, FLOAT, false, 16, 8);\n      gl.uniform1i(locations.u_texture, 0);\n    }\n\n    gl.uniformMatrix4fv(locations.u_texCoordMatrix, false,\n      fromTransform(this.tmpMat4_, this.getTexCoordMatrix()));\n    gl.uniformMatrix4fv(locations.u_projectionMatrix, false,\n      fromTransform(this.tmpMat4_, this.getProjectionMatrix()));\n    gl.uniform1f(locations.u_opacity, layerState.opacity);\n    gl.bindTexture(TEXTURE_2D, this.getTexture());\n    gl.drawArrays(TRIANGLE_STRIP, 0, 4);\n\n    this.dispatchComposeEvent_(RenderEventType.POSTCOMPOSE, context, frameState);\n  };\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {import(\"../../webgl/Context.js\").default} context WebGL context.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  WebGLLayerRenderer.prototype.dispatchComposeEvent_ = function dispatchComposeEvent_ (type, context, frameState) {\n    var layer = this.getLayer();\n    if (layer.hasListener(type)) {\n      var viewState = frameState.viewState;\n      var resolution = viewState.resolution;\n      var pixelRatio = frameState.pixelRatio;\n      var extent = frameState.extent;\n      var center = viewState.center;\n      var rotation = viewState.rotation;\n      var size = frameState.size;\n\n      var render = new WebGLImmediateRenderer(\n        context, center, resolution, rotation, size, extent, pixelRatio);\n      var composeEvent = new RenderEvent(\n        type, render, frameState, null, context);\n      layer.dispatchEvent(composeEvent);\n    }\n  };\n\n  /**\n   * @return {!import(\"../../transform.js\").Transform} Matrix.\n   */\n  WebGLLayerRenderer.prototype.getTexCoordMatrix = function getTexCoordMatrix () {\n    return this.texCoordMatrix;\n  };\n\n  /**\n   * @return {WebGLTexture} Texture.\n   */\n  WebGLLayerRenderer.prototype.getTexture = function getTexture () {\n    return this.texture;\n  };\n\n  /**\n   * @return {!import(\"../../transform.js\").Transform} Matrix.\n   */\n  WebGLLayerRenderer.prototype.getProjectionMatrix = function getProjectionMatrix () {\n    return this.projectionMatrix;\n  };\n\n  /**\n   * Handle webglcontextlost.\n   */\n  WebGLLayerRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n    this.texture = null;\n    this.framebuffer = null;\n    this.framebufferDimension = undefined;\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @param {import(\"../../layer/Layer.js\").State} layerState Layer state.\n   * @param {import(\"../../webgl/Context.js\").default} context Context.\n   * @return {boolean} whether composeFrame should be called.\n   */\n  WebGLLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n   * @param {function(this: S, import(\"../../layer/Layer.js\").default, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n   *     callback.\n   * @param {S} thisArg Value to use as `this` when executing `callback`.\n   * @return {T|undefined} Callback result.\n   * @template S,T,U\n   */\n  WebGLLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n    return abstract();\n  };\n\n  return WebGLLayerRenderer;\n}(LayerRenderer));\n\n\nexport default WebGLLayerRenderer;\n\n//# sourceMappingURL=Layer.js.map","/**\n * @module ol/renderer/webgl/ImageLayer\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../../reproj/common.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {getIntersection, isEmpty} from '../../extent.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {\n  create as createTransform,\n  rotate as rotateTransform,\n  translate as translateTransform,\n  scale as scaleTransform,\n  reset as resetTransform,\n  apply as applyTransform,\n  invert as invertTransform,\n  multiply as multiplyTransform\n} from '../../transform.js';\nimport {CLAMP_TO_EDGE} from '../../webgl.js';\nimport {createTexture} from '../../webgl/Context.js';\n\n/**\n * @classdesc\n * WebGL renderer for image layers.\n * @api\n */\nvar WebGLImageLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n  function WebGLImageLayerRenderer(mapRenderer, imageLayer) {\n\n    WebGLLayerRenderer.call(this, mapRenderer, imageLayer);\n\n    /**\n     * The last rendered image.\n     * @private\n     * @type {?import(\"../../ImageBase.js\").default}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.hitCanvasContext_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../../transform.js\").Transform}\n     */\n    this.hitTransformationMatrix_ = null;\n\n  }\n\n  if ( WebGLLayerRenderer ) WebGLImageLayerRenderer.__proto__ = WebGLLayerRenderer;\n  WebGLImageLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n  WebGLImageLayerRenderer.prototype.constructor = WebGLImageLayerRenderer;\n\n  /**\n   * @param {import(\"../../ImageBase.js\").default} image Image.\n   * @private\n   * @return {WebGLTexture} Texture.\n   */\n  WebGLImageLayerRenderer.prototype.createTexture_ = function createTexture_ (image) {\n\n    // We meet the conditions to work with non-power of two textures.\n    // http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences#Non-Power_of_Two_Texture_Support\n    // http://learningwebgl.com/blog/?p=2101\n\n    var imageElement = image.getImage();\n    var gl = this.mapRenderer.getGL();\n\n    return createTexture(\n      gl, imageElement, CLAMP_TO_EDGE, CLAMP_TO_EDGE);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n\n    var gl = this.mapRenderer.getGL();\n\n    var pixelRatio = frameState.pixelRatio;\n    var viewState = frameState.viewState;\n    var viewCenter = viewState.center;\n    var viewResolution = viewState.resolution;\n    var viewRotation = viewState.rotation;\n\n    var image = this.image_;\n    var texture = this.texture;\n    var imageLayer = /** @type {import(\"../../layer/Image.js\").default} */ (this.getLayer());\n    var imageSource = /** @type {import(\"../../source/Image.js\").default} */ (imageLayer.getSource());\n\n    var hints = frameState.viewHints;\n\n    var renderedExtent = frameState.extent;\n    if (layerState.extent !== undefined) {\n      renderedExtent = getIntersection(renderedExtent, layerState.extent);\n    }\n    if (!hints[ViewHint.ANIMATING] && !hints[ViewHint.INTERACTING] &&\n        !isEmpty(renderedExtent)) {\n      var projection = viewState.projection;\n      if (!ENABLE_RASTER_REPROJECTION) {\n        var sourceProjection = imageSource.getProjection();\n        if (sourceProjection) {\n          projection = sourceProjection;\n        }\n      }\n      var image_ = imageSource.getImage(renderedExtent, viewResolution,\n        pixelRatio, projection);\n      if (image_) {\n        var loaded = this.loadImage(image_);\n        if (loaded) {\n          image = image_;\n          texture = this.createTexture_(image_);\n          if (this.texture) {\n            /**\n             * @param {WebGLRenderingContext} gl GL.\n             * @param {WebGLTexture} texture Texture.\n             */\n            var postRenderFunction = function(gl, texture) {\n              if (!gl.isContextLost()) {\n                gl.deleteTexture(texture);\n              }\n            }.bind(null, gl, this.texture);\n            frameState.postRenderFunctions.push(\n              /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction)\n            );\n          }\n        }\n      }\n    }\n\n    if (image) {\n      var canvas = this.mapRenderer.getContext().getCanvas();\n\n      this.updateProjectionMatrix_(canvas.width, canvas.height,\n        pixelRatio, viewCenter, viewResolution, viewRotation,\n        image.getExtent());\n      this.hitTransformationMatrix_ = null;\n\n      // Translate and scale to flip the Y coord.\n      var texCoordMatrix = this.texCoordMatrix;\n      resetTransform(texCoordMatrix);\n      scaleTransform(texCoordMatrix, 1, -1);\n      translateTransform(texCoordMatrix, 0, -1);\n\n      this.image_ = image;\n      this.texture = texture;\n    }\n\n    return !!image;\n  };\n\n  /**\n   * @param {number} canvasWidth Canvas width.\n   * @param {number} canvasHeight Canvas height.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../coordinate.js\").Coordinate} viewCenter View center.\n   * @param {number} viewResolution View resolution.\n   * @param {number} viewRotation View rotation.\n   * @param {import(\"../../extent.js\").Extent} imageExtent Image extent.\n   * @private\n   */\n  WebGLImageLayerRenderer.prototype.updateProjectionMatrix_ = function updateProjectionMatrix_ (\n    canvasWidth,\n    canvasHeight,\n    pixelRatio,\n    viewCenter,\n    viewResolution,\n    viewRotation,\n    imageExtent\n  ) {\n\n    var canvasExtentWidth = canvasWidth * viewResolution;\n    var canvasExtentHeight = canvasHeight * viewResolution;\n\n    var projectionMatrix = this.projectionMatrix;\n    resetTransform(projectionMatrix);\n    scaleTransform(projectionMatrix,\n      pixelRatio * 2 / canvasExtentWidth,\n      pixelRatio * 2 / canvasExtentHeight);\n    rotateTransform(projectionMatrix, -viewRotation);\n    translateTransform(projectionMatrix,\n      imageExtent[0] - viewCenter[0],\n      imageExtent[1] - viewCenter[1]);\n    scaleTransform(projectionMatrix,\n      (imageExtent[2] - imageExtent[0]) / 2,\n      (imageExtent[3] - imageExtent[1]) / 2);\n    translateTransform(projectionMatrix, 1, 1);\n\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLImageLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n    if (!this.image_ || !this.image_.getImage()) {\n      return undefined;\n    }\n\n    var imageSize =\n        [this.image_.getImage().width, this.image_.getImage().height];\n\n    if (!this.hitTransformationMatrix_) {\n      this.hitTransformationMatrix_ = this.getHitTransformationMatrix_(\n        frameState.size, imageSize);\n    }\n\n    var pixelOnFrameBuffer = applyTransform(\n      this.hitTransformationMatrix_, pixel.slice());\n\n    if (pixelOnFrameBuffer[0] < 0 || pixelOnFrameBuffer[0] > imageSize[0] ||\n        pixelOnFrameBuffer[1] < 0 || pixelOnFrameBuffer[1] > imageSize[1]) {\n      // outside the image, no need to check\n      return undefined;\n    }\n\n    if (!this.hitCanvasContext_) {\n      this.hitCanvasContext_ = createCanvasContext2D(1, 1);\n    }\n\n    this.hitCanvasContext_.clearRect(0, 0, 1, 1);\n    this.hitCanvasContext_.drawImage(this.image_.getImage(),\n      pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1, 0, 0, 1, 1);\n\n    var imageData = this.hitCanvasContext_.getImageData(0, 0, 1, 1).data;\n    if (imageData[3] > 0) {\n      return callback.call(thisArg, this.getLayer(), imageData);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * The transformation matrix to get the pixel on the image for a\n   * pixel on the map.\n   * @param {import(\"../../size.js\").Size} mapSize The map size.\n   * @param {import(\"../../size.js\").Size} imageSize The image size.\n   * @return {import(\"../../transform.js\").Transform} The transformation matrix.\n   * @private\n   */\n  WebGLImageLayerRenderer.prototype.getHitTransformationMatrix_ = function getHitTransformationMatrix_ (mapSize, imageSize) {\n    // the first matrix takes a map pixel, flips the y-axis and scales to\n    // a range between -1 ... 1\n    var mapCoordTransform = createTransform();\n    translateTransform(mapCoordTransform, -1, -1);\n    scaleTransform(mapCoordTransform, 2 / mapSize[0], 2 / mapSize[1]);\n    translateTransform(mapCoordTransform, 0, mapSize[1]);\n    scaleTransform(mapCoordTransform, 1, -1);\n\n    // the second matrix is the inverse of the projection matrix used in the\n    // shader for drawing\n    var projectionMatrixInv = invertTransform(this.projectionMatrix.slice());\n\n    // the third matrix scales to the image dimensions and flips the y-axis again\n    var transform = createTransform();\n    translateTransform(transform, 0, imageSize[1]);\n    scaleTransform(transform, 1, -1);\n    scaleTransform(transform, imageSize[0] / 2, imageSize[1] / 2);\n    translateTransform(transform, 1, 1);\n\n    multiplyTransform(transform, projectionMatrixInv);\n    multiplyTransform(transform, mapCoordTransform);\n\n    return transform;\n  };\n\n  return WebGLImageLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLImageLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.IMAGE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLImageLayerRenderer} The layer renderer.\n */\nWebGLImageLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new WebGLImageLayerRenderer(\n    /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n    /** @type {import(\"../../layer/Image.js\").default} */ (layer)\n  );\n};\n\n\nexport default WebGLImageLayerRenderer;\n\n//# sourceMappingURL=ImageLayer.js.map","/**\n * @module ol/renderer/webgl/Map\n */\n\nimport {stableSort} from '../../array.js';\nimport {CLASS_UNSELECTABLE} from '../../css.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {listen} from '../../events.js';\nimport {visibleAtResolution} from '../../layer/Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport WebGLImmediateRenderer from '../../render/webgl/Immediate.js';\nimport MapRenderer, {sortByZIndex} from '../Map.js';\nimport SourceState from '../../source/State.js';\nimport LRUCache from '../../structs/LRUCache.js';\nimport PriorityQueue from '../../structs/PriorityQueue.js';\nimport {BLEND, CLAMP_TO_EDGE, COLOR_BUFFER_BIT, CULL_FACE, DEPTH_TEST, FRAMEBUFFER,\n  getContext, LINEAR, ONE, ONE_MINUS_SRC_ALPHA, RGBA, SCISSOR_TEST, SRC_ALPHA,\n  STENCIL_TEST, TEXTURE0, TEXTURE_2D, TEXTURE_MAG_FILTER, TEXTURE_MIN_FILTER,\n  TEXTURE_WRAP_S, TEXTURE_WRAP_T, UNSIGNED_BYTE} from '../../webgl.js';\nimport WebGLContext from '../../webgl/Context.js';\nimport ContextEventType from '../../webgl/ContextEventType.js';\n\n\n/**\n * @typedef {Object} TextureCacheEntry\n * @property {number} magFilter\n * @property {number} minFilter\n * @property {WebGLTexture} texture\n */\n\n\n/**\n * Texture cache high water mark.\n * @type {number}\n */\nvar WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK = 1024;\n\n\n/**\n * @classdesc\n * WebGL map renderer.\n * @api\n */\nvar WebGLMapRenderer = /*@__PURE__*/(function (MapRenderer) {\n  function WebGLMapRenderer(map) {\n    MapRenderer.call(this, map);\n\n    var container = map.getViewport();\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = /** @type {HTMLCanvasElement} */\n      (document.createElement('canvas'));\n    this.canvas_.style.width = '100%';\n    this.canvas_.style.height = '100%';\n    this.canvas_.style.display = 'block';\n    this.canvas_.className = CLASS_UNSELECTABLE;\n    container.insertBefore(this.canvas_, container.childNodes[0] || null);\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.clipTileCanvasWidth_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.clipTileCanvasHeight_ = 0;\n\n    /**\n     * @private\n     * @type {CanvasRenderingContext2D}\n     */\n    this.clipTileContext_ = createCanvasContext2D();\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = true;\n\n    /**\n     * @private\n     * @type {WebGLRenderingContext}\n     */\n    this.gl_ = getContext(this.canvas_, {\n      antialias: true,\n      depth: true,\n      failIfMajorPerformanceCaveat: true,\n      preserveDrawingBuffer: false,\n      stencil: true\n    });\n\n    /**\n     * @private\n     * @type {import(\"../../webgl/Context.js\").default}\n     */\n    this.context_ = new WebGLContext(this.canvas_, this.gl_);\n\n    listen(this.canvas_, ContextEventType.LOST,\n      this.handleWebGLContextLost, this);\n    listen(this.canvas_, ContextEventType.RESTORED,\n      this.handleWebGLContextRestored, this);\n\n    /**\n     * @private\n     * @type {import(\"../../structs/LRUCache.js\").default<TextureCacheEntry|null>}\n     */\n    this.textureCache_ = new LRUCache();\n\n    /**\n     * @private\n     * @type {import(\"../../coordinate.js\").Coordinate}\n     */\n    this.focus_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../structs/PriorityQueue.js\").default<Array>}\n     */\n    this.tileTextureQueue_ = new PriorityQueue(\n      /**\n       * @param {Array<*>} element Element.\n       * @return {number} Priority.\n       * @this {WebGLMapRenderer}\n       */\n      (function(element) {\n        var tileCenter = /** @type {import(\"../../coordinate.js\").Coordinate} */ (element[1]);\n        var tileResolution = /** @type {number} */ (element[2]);\n        var deltaX = tileCenter[0] - this.focus_[0];\n        var deltaY = tileCenter[1] - this.focus_[1];\n        return 65536 * Math.log(tileResolution) +\n              Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution;\n      }).bind(this),\n      /**\n       * @param {Array<*>} element Element.\n       * @return {string} Key.\n       */\n      function(element) {\n        return (\n          /** @type {import(\"../../Tile.js\").default} */ (element[0]).getKey()\n        );\n      });\n\n\n    /**\n     * @param {import(\"../../PluggableMap.js\").default} map Map.\n     * @param {?import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} false.\n     * @this {WebGLMapRenderer}\n     */\n    this.loadNextTileTexture_ =\n        function(map, frameState) {\n          if (!this.tileTextureQueue_.isEmpty()) {\n            this.tileTextureQueue_.reprioritize();\n            var element = this.tileTextureQueue_.dequeue();\n            var tile = /** @type {import(\"../../Tile.js\").default} */ (element[0]);\n            var tileSize = /** @type {import(\"../../size.js\").Size} */ (element[3]);\n            var tileGutter = /** @type {number} */ (element[4]);\n            this.bindTileTexture(\n              tile, tileSize, tileGutter, LINEAR, LINEAR);\n          }\n          return false;\n        }.bind(this);\n\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.textureCacheFrameMarkerCount_ = 0;\n\n    this.initializeGL_();\n  }\n\n  if ( MapRenderer ) WebGLMapRenderer.__proto__ = MapRenderer;\n  WebGLMapRenderer.prototype = Object.create( MapRenderer && MapRenderer.prototype );\n  WebGLMapRenderer.prototype.constructor = WebGLMapRenderer;\n\n  /**\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @param {import(\"../../size.js\").Size} tileSize Tile size.\n   * @param {number} tileGutter Tile gutter.\n   * @param {number} magFilter Mag filter.\n   * @param {number} minFilter Min filter.\n   */\n  WebGLMapRenderer.prototype.bindTileTexture = function bindTileTexture (tile, tileSize, tileGutter, magFilter, minFilter) {\n    var gl = this.getGL();\n    var tileKey = tile.getKey();\n    if (this.textureCache_.containsKey(tileKey)) {\n      var textureCacheEntry = this.textureCache_.get(tileKey);\n      gl.bindTexture(TEXTURE_2D, textureCacheEntry.texture);\n      if (textureCacheEntry.magFilter != magFilter) {\n        gl.texParameteri(\n          TEXTURE_2D, TEXTURE_MAG_FILTER, magFilter);\n        textureCacheEntry.magFilter = magFilter;\n      }\n      if (textureCacheEntry.minFilter != minFilter) {\n        gl.texParameteri(\n          TEXTURE_2D, TEXTURE_MIN_FILTER, minFilter);\n        textureCacheEntry.minFilter = minFilter;\n      }\n    } else {\n      var texture = gl.createTexture();\n      var imageTile = /** @type {import(\"../../ImageTile.js\").default} */ (tile);\n      gl.bindTexture(TEXTURE_2D, texture);\n      if (tileGutter > 0) {\n        var clipTileCanvas = this.clipTileContext_.canvas;\n        var clipTileContext = this.clipTileContext_;\n        if (this.clipTileCanvasWidth_ !== tileSize[0] ||\n            this.clipTileCanvasHeight_ !== tileSize[1]) {\n          clipTileCanvas.width = tileSize[0];\n          clipTileCanvas.height = tileSize[1];\n          this.clipTileCanvasWidth_ = tileSize[0];\n          this.clipTileCanvasHeight_ = tileSize[1];\n        } else {\n          clipTileContext.clearRect(0, 0, tileSize[0], tileSize[1]);\n        }\n        clipTileContext.drawImage(imageTile.getImage(), tileGutter, tileGutter,\n          tileSize[0], tileSize[1], 0, 0, tileSize[0], tileSize[1]);\n        gl.texImage2D(TEXTURE_2D, 0,\n          RGBA, RGBA,\n          UNSIGNED_BYTE, clipTileCanvas);\n      } else {\n        gl.texImage2D(TEXTURE_2D, 0,\n          RGBA, RGBA,\n          UNSIGNED_BYTE, imageTile.getImage());\n      }\n      gl.texParameteri(\n        TEXTURE_2D, TEXTURE_MAG_FILTER, magFilter);\n      gl.texParameteri(\n        TEXTURE_2D, TEXTURE_MIN_FILTER, minFilter);\n      gl.texParameteri(TEXTURE_2D, TEXTURE_WRAP_S,\n        CLAMP_TO_EDGE);\n      gl.texParameteri(TEXTURE_2D, TEXTURE_WRAP_T,\n        CLAMP_TO_EDGE);\n      this.textureCache_.set(tileKey, {\n        texture: texture,\n        magFilter: magFilter,\n        minFilter: minFilter\n      });\n    }\n  };\n\n  /**\n   * @param {import(\"../../render/EventType.js\").default} type Event type.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   */\n  WebGLMapRenderer.prototype.dispatchRenderEvent = function dispatchRenderEvent (type, frameState) {\n    var map = this.getMap();\n    if (map.hasListener(type)) {\n      var context = this.context_;\n\n      var extent = frameState.extent;\n      var size = frameState.size;\n      var viewState = frameState.viewState;\n      var pixelRatio = frameState.pixelRatio;\n\n      var resolution = viewState.resolution;\n      var center = viewState.center;\n      var rotation = viewState.rotation;\n\n      var vectorContext = new WebGLImmediateRenderer(context,\n        center, resolution, rotation, size, extent, pixelRatio);\n      var composeEvent = new RenderEvent(type, vectorContext,\n        frameState, null, context);\n      map.dispatchEvent(composeEvent);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLMapRenderer.prototype.disposeInternal = function disposeInternal () {\n    var gl = this.getGL();\n    if (!gl.isContextLost()) {\n      this.textureCache_.forEach(\n        /**\n         * @param {?TextureCacheEntry} textureCacheEntry\n         *     Texture cache entry.\n         */\n        function(textureCacheEntry) {\n          if (textureCacheEntry) {\n            gl.deleteTexture(textureCacheEntry.texture);\n          }\n        });\n    }\n    this.context_.dispose();\n    MapRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @param {import(\"../../PluggableMap.js\").default} map Map.\n   * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n   * @private\n   */\n  WebGLMapRenderer.prototype.expireCache_ = function expireCache_ (map, frameState) {\n    var gl = this.getGL();\n    var textureCacheEntry;\n    while (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >\n        WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {\n      textureCacheEntry = this.textureCache_.peekLast();\n      if (!textureCacheEntry) {\n        if (+this.textureCache_.peekLastKey() == frameState.index) {\n          break;\n        } else {\n          --this.textureCacheFrameMarkerCount_;\n        }\n      } else {\n        gl.deleteTexture(textureCacheEntry.texture);\n      }\n      this.textureCache_.pop();\n    }\n  };\n\n  /**\n   * @return {import(\"../../webgl/Context.js\").default} The context.\n   */\n  WebGLMapRenderer.prototype.getContext = function getContext () {\n    return this.context_;\n  };\n\n  /**\n   * @return {WebGLRenderingContext} GL.\n   */\n  WebGLMapRenderer.prototype.getGL = function getGL () {\n    return this.gl_;\n  };\n\n  /**\n   * @return {import(\"../../structs/PriorityQueue.js\").default<Array>} Tile texture queue.\n   */\n  WebGLMapRenderer.prototype.getTileTextureQueue = function getTileTextureQueue () {\n    return this.tileTextureQueue_;\n  };\n\n  /**\n   * @param {import(\"../../events/Event.js\").default} event Event.\n   * @protected\n   */\n  WebGLMapRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost (event) {\n    event.preventDefault();\n    this.textureCache_.clear();\n    this.textureCacheFrameMarkerCount_ = 0;\n\n    var renderers = this.getLayerRenderers();\n    for (var id in renderers) {\n      var renderer = /** @type {import(\"./Layer.js\").default} */ (renderers[id]);\n      renderer.handleWebGLContextLost();\n    }\n  };\n\n  /**\n   * @protected\n   */\n  WebGLMapRenderer.prototype.handleWebGLContextRestored = function handleWebGLContextRestored () {\n    this.initializeGL_();\n    this.getMap().render();\n  };\n\n  /**\n   * @private\n   */\n  WebGLMapRenderer.prototype.initializeGL_ = function initializeGL_ () {\n    var gl = this.gl_;\n    gl.activeTexture(TEXTURE0);\n    gl.blendFuncSeparate(\n      SRC_ALPHA, ONE_MINUS_SRC_ALPHA,\n      ONE, ONE_MINUS_SRC_ALPHA);\n    gl.disable(CULL_FACE);\n    gl.disable(DEPTH_TEST);\n    gl.disable(SCISSOR_TEST);\n    gl.disable(STENCIL_TEST);\n  };\n\n  /**\n   * @param {import(\"../../Tile.js\").default} tile Tile.\n   * @return {boolean} Is tile texture loaded.\n   */\n  WebGLMapRenderer.prototype.isTileTextureLoaded = function isTileTextureLoaded (tile) {\n    return this.textureCache_.containsKey(tile.getKey());\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLMapRenderer.prototype.renderFrame = function renderFrame (frameState) {\n\n    var context = this.getContext();\n    var gl = this.getGL();\n\n    if (gl.isContextLost()) {\n      return false;\n    }\n\n    if (!frameState) {\n      if (this.renderedVisible_) {\n        this.canvas_.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return false;\n    }\n\n    this.focus_ = frameState.focus;\n\n    this.textureCache_.set((-frameState.index).toString(), null);\n    ++this.textureCacheFrameMarkerCount_;\n\n    this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n\n    /** @type {Array<import(\"../../layer/Layer.js\").State>} */\n    var layerStatesToDraw = [];\n    var layerStatesArray = frameState.layerStatesArray;\n    stableSort(layerStatesArray, sortByZIndex);\n\n    var viewResolution = frameState.viewState.resolution;\n    var i, ii;\n    for (i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      var layerState = layerStatesArray[i];\n      if (visibleAtResolution(layerState, viewResolution) &&\n          layerState.sourceState == SourceState.READY) {\n        var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layerState.layer));\n        if (layerRenderer.prepareFrame(frameState, layerState, context)) {\n          layerStatesToDraw.push(layerState);\n        }\n      }\n    }\n\n    var width = frameState.size[0] * frameState.pixelRatio;\n    var height = frameState.size[1] * frameState.pixelRatio;\n    if (this.canvas_.width != width || this.canvas_.height != height) {\n      this.canvas_.width = width;\n      this.canvas_.height = height;\n    }\n\n    gl.bindFramebuffer(FRAMEBUFFER, null);\n\n    gl.clearColor(0, 0, 0, 0);\n    gl.clear(COLOR_BUFFER_BIT);\n    gl.enable(BLEND);\n    gl.viewport(0, 0, this.canvas_.width, this.canvas_.height);\n\n    for (i = 0, ii = layerStatesToDraw.length; i < ii; ++i) {\n      var layerState$1 = layerStatesToDraw[i];\n      var layerRenderer$1 = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layerState$1.layer));\n      layerRenderer$1.composeFrame(frameState, layerState$1, context);\n    }\n\n    if (!this.renderedVisible_) {\n      this.canvas_.style.display = '';\n      this.renderedVisible_ = true;\n    }\n\n    this.calculateMatrices2D(frameState);\n\n    if (this.textureCache_.getCount() - this.textureCacheFrameMarkerCount_ >\n        WEBGL_TEXTURE_CACHE_HIGH_WATER_MARK) {\n      frameState.postRenderFunctions.push(\n        /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (this.expireCache_.bind(this))\n      );\n    }\n\n    if (!this.tileTextureQueue_.isEmpty()) {\n      frameState.postRenderFunctions.push(this.loadNextTileTexture_);\n      frameState.animate = true;\n    }\n\n    this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n\n    this.scheduleRemoveUnusedLayerRenderers(frameState);\n    this.scheduleExpireIconCache(frameState);\n\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLMapRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (\n    coordinate,\n    frameState,\n    hitTolerance,\n    callback,\n    thisArg,\n    layerFilter,\n    thisArg2\n  ) {\n    var result;\n\n    if (this.getGL().isContextLost()) {\n      return false;\n    }\n\n    var viewState = frameState.viewState;\n\n    var layerStates = frameState.layerStatesArray;\n    var numLayers = layerStates.length;\n    var i;\n    for (i = numLayers - 1; i >= 0; --i) {\n      var layerState = layerStates[i];\n      var layer = layerState.layer;\n      if (visibleAtResolution(layerState, viewState.resolution) &&\n          layerFilter.call(thisArg2, layer)) {\n        var layerRenderer = this.getLayerRenderer(layer);\n        result = layerRenderer.forEachFeatureAtCoordinate(\n          coordinate, frameState, hitTolerance, callback);\n        if (result) {\n          return result;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLMapRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState, hitTolerance, layerFilter, thisArg) {\n    var hasFeature = false;\n\n    if (this.getGL().isContextLost()) {\n      return false;\n    }\n\n    var viewState = frameState.viewState;\n\n    var layerStates = frameState.layerStatesArray;\n    var numLayers = layerStates.length;\n    var i;\n    for (i = numLayers - 1; i >= 0; --i) {\n      var layerState = layerStates[i];\n      var layer = layerState.layer;\n      if (visibleAtResolution(layerState, viewState.resolution) &&\n          layerFilter.call(thisArg, layer)) {\n        var layerRenderer = this.getLayerRenderer(layer);\n        hasFeature =\n            layerRenderer.hasFeatureAtCoordinate(coordinate, frameState);\n        if (hasFeature) {\n          return true;\n        }\n      }\n    }\n    return hasFeature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLMapRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, hitTolerance, callback, thisArg, layerFilter, thisArg2) {\n    if (this.getGL().isContextLost()) {\n      return false;\n    }\n\n    var viewState = frameState.viewState;\n    var result;\n\n    var layerStates = frameState.layerStatesArray;\n    var numLayers = layerStates.length;\n    var i;\n    for (i = numLayers - 1; i >= 0; --i) {\n      var layerState = layerStates[i];\n      var layer = layerState.layer;\n      if (visibleAtResolution(layerState, viewState.resolution) &&\n          layerFilter.call(thisArg, layer)) {\n        var layerRenderer = /** @type {import(\"./Layer.js\").default} */ (this.getLayerRenderer(layer));\n        result = layerRenderer.forEachLayerAtPixel(\n          pixel, frameState, callback, thisArg);\n        if (result) {\n          return result;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  return WebGLMapRenderer;\n}(MapRenderer));\n\n\nexport default WebGLMapRenderer;\n\n//# sourceMappingURL=Map.js.map","/**\n * @module ol/Tile\n */\nimport TileState from './TileState.js';\nimport {easeIn} from './easing.js';\nimport EventTarget from './events/Target.js';\nimport EventType from './events/EventType.js';\n\n\n/**\n * A function that takes an {@link module:ol/Tile} for the tile and a\n * `{string}` for the url as arguments. The default is\n * ```js\n * source.setTileLoadFunction(function(tile, src) {\n *   tile.getImage().src = src;\n * });\n * ```\n * For more fine grained control, the load function can use fetch or XMLHttpRequest and involve\n * error handling:\n *\n * ```js\n * import TileState from 'ol/TileState';\n *\n * source.setTileLoadFunction(function(tile, src) {\n *   var xhr = new XMLHttpRequest();\n *   xhr.responseType = 'blob';\n *   xhr.addEventListener('loadend', function (evt) {\n *     var data = this.response;\n *     if (data !== undefined) {\n *       tile.getImage().src = URL.createObjectURL(data);\n *     } else {\n *       tile.setState(TileState.ERROR);\n *     }\n *   });\n *   xhr.addEventListener('error', function () {\n *     tile.setState(TileState.ERROR);\n *   });\n *   xhr.open('GET', src);\n *   xhr.send();\n * });\n * ```\n *\n * @typedef {function(Tile, string)} LoadFunction\n * @api\n */\n\n/**\n * {@link module:ol/source/Tile~Tile} sources use a function of this type to get\n * the url that provides a tile for a given tile coordinate.\n *\n * This function takes an {@link module:ol/tilecoord~TileCoord} for the tile\n * coordinate, a `{number}` representing the pixel ratio and a\n * {@link module:ol/proj/Projection} for the projection  as arguments\n * and returns a `{string}` representing the tile URL, or undefined if no tile\n * should be requested for the passed tile coordinate.\n *\n * @typedef {function(import(\"./tilecoord.js\").TileCoord, number,\n *           import(\"./proj/Projection.js\").default): (string|undefined)} UrlFunction\n * @api\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [transition=250] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @api\n */\n\n\n/**\n * @classdesc\n * Base class for tiles.\n *\n * @abstract\n */\nvar Tile = /*@__PURE__*/(function (EventTarget) {\n  function Tile(tileCoord, state, opt_options) {\n    EventTarget.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @type {import(\"./tilecoord.js\").TileCoord}\n     */\n    this.tileCoord = tileCoord;\n\n    /**\n     * @protected\n     * @type {TileState}\n     */\n    this.state = state;\n\n    /**\n     * An \"interim\" tile for this tile. The interim tile may be used while this\n     * one is loading, for \"smooth\" transitions when changing params/dimensions\n     * on the source.\n     * @type {Tile}\n     */\n    this.interimTile = null;\n\n    /**\n     * A key assigned to the tile. This is used by the tile source to determine\n     * if this tile can effectively be used, or if a new tile should be created\n     * and this one be used as an interim tile for this new tile.\n     * @type {string}\n     */\n    this.key = '';\n\n    /**\n     * The duration for the opacity transition.\n     * @type {number}\n     */\n    this.transition_ = options.transition === undefined ? 250 : options.transition;\n\n    /**\n     * Lookup of start times for rendering transitions.  If the start time is\n     * equal to -1, the transition is complete.\n     * @type {Object<string, number>}\n     */\n    this.transitionStarts_ = {};\n\n  }\n\n  if ( EventTarget ) Tile.__proto__ = EventTarget;\n  Tile.prototype = Object.create( EventTarget && EventTarget.prototype );\n  Tile.prototype.constructor = Tile;\n\n  /**\n   * @protected\n   */\n  Tile.prototype.changed = function changed () {\n    this.dispatchEvent(EventType.CHANGE);\n  };\n\n  /**\n   * @return {string} Key.\n   */\n  Tile.prototype.getKey = function getKey () {\n    return this.key + '/' + this.tileCoord;\n  };\n\n  /**\n   * Get the interim tile most suitable for rendering using the chain of interim\n   * tiles. This corresponds to the  most recent tile that has been loaded, if no\n   * such tile exists, the original tile is returned.\n   * @return {!Tile} Best tile for rendering.\n   */\n  Tile.prototype.getInterimTile = function getInterimTile () {\n    if (!this.interimTile) {\n      //empty chain\n      return this;\n    }\n    var tile = this.interimTile;\n\n    // find the first loaded tile and return it. Since the chain is sorted in\n    // decreasing order of creation time, there is no need to search the remainder\n    // of the list (all those tiles correspond to older requests and will be\n    // cleaned up by refreshInterimChain)\n    do {\n      if (tile.getState() == TileState.LOADED) {\n        return tile;\n      }\n      tile = tile.interimTile;\n    } while (tile);\n\n    // we can not find a better tile\n    return this;\n  };\n\n  /**\n   * Goes through the chain of interim tiles and discards sections of the chain\n   * that are no longer relevant.\n   */\n  Tile.prototype.refreshInterimChain = function refreshInterimChain () {\n    if (!this.interimTile) {\n      return;\n    }\n\n    var tile = this.interimTile;\n    var prev = /** @type {Tile} */ (this);\n\n    do {\n      if (tile.getState() == TileState.LOADED) {\n        //we have a loaded tile, we can discard the rest of the list\n        //we would could abort any LOADING tile request\n        //older than this tile (i.e. any LOADING tile following this entry in the chain)\n        tile.interimTile = null;\n        break;\n      } else if (tile.getState() == TileState.LOADING) {\n        //keep this LOADING tile any loaded tiles later in the chain are\n        //older than this tile, so we're still interested in the request\n        prev = tile;\n      } else if (tile.getState() == TileState.IDLE) {\n        //the head of the list is the most current tile, we don't need\n        //to start any other requests for this chain\n        prev.interimTile = tile.interimTile;\n      } else {\n        prev = tile;\n      }\n      tile = prev.interimTile;\n    } while (tile);\n  };\n\n  /**\n   * Get the tile coordinate for this tile.\n   * @return {import(\"./tilecoord.js\").TileCoord} The tile coordinate.\n   * @api\n   */\n  Tile.prototype.getTileCoord = function getTileCoord () {\n    return this.tileCoord;\n  };\n\n  /**\n   * @return {TileState} State.\n   */\n  Tile.prototype.getState = function getState () {\n    return this.state;\n  };\n\n  /**\n   * Sets the state of this tile. If you write your own {@link module:ol/Tile~LoadFunction tileLoadFunction} ,\n   * it is important to set the state correctly to {@link module:ol/TileState~ERROR}\n   * when the tile cannot be loaded. Otherwise the tile cannot be removed from\n   * the tile queue and will block other requests.\n   * @param {TileState} state State.\n   * @api\n   */\n  Tile.prototype.setState = function setState (state) {\n    this.state = state;\n    this.changed();\n  };\n\n  /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   * @abstract\n   * @api\n   */\n  Tile.prototype.load = function load () {};\n\n  /**\n   * Get the alpha value for rendering.\n   * @param {string} id An id for the renderer.\n   * @param {number} time The render frame time.\n   * @return {number} A number between 0 and 1.\n   */\n  Tile.prototype.getAlpha = function getAlpha (id, time) {\n    if (!this.transition_) {\n      return 1;\n    }\n\n    var start = this.transitionStarts_[id];\n    if (!start) {\n      start = time;\n      this.transitionStarts_[id] = start;\n    } else if (start === -1) {\n      return 1;\n    }\n\n    var delta = time - start + (1000 / 60); // avoid rendering at 0\n    if (delta >= this.transition_) {\n      return 1;\n    }\n    return easeIn(delta / this.transition_);\n  };\n\n  /**\n   * Determine if a tile is in an alpha transition.  A tile is considered in\n   * transition if tile.getAlpha() has not yet been called or has been called\n   * and returned 1.\n   * @param {string} id An id for the renderer.\n   * @return {boolean} The tile is in transition.\n   */\n  Tile.prototype.inTransition = function inTransition (id) {\n    if (!this.transition_) {\n      return false;\n    }\n    return this.transitionStarts_[id] !== -1;\n  };\n\n  /**\n   * Mark a transition as complete.\n   * @param {string} id An id for the renderer.\n   */\n  Tile.prototype.endTransition = function endTransition (id) {\n    if (this.transition_) {\n      this.transitionStarts_[id] = -1;\n    }\n  };\n\n  return Tile;\n}(EventTarget));\n\n\nexport default Tile;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/ImageTile\n */\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\n\n\nvar ImageTile = /*@__PURE__*/(function (Tile) {\n  function ImageTile(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n\n    Tile.call(this, tileCoord, state, opt_options);\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ = crossOrigin;\n\n    /**\n     * Image URI\n     *\n     * @private\n     * @type {string}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    this.image_ = new Image();\n    if (crossOrigin !== null) {\n      this.image_.crossOrigin = crossOrigin;\n    }\n\n    /**\n     * @private\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.imageListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./Tile.js\").LoadFunction}\n     */\n    this.tileLoadFunction_ = tileLoadFunction;\n\n  }\n\n  if ( Tile ) ImageTile.__proto__ = Tile;\n  ImageTile.prototype = Object.create( Tile && Tile.prototype );\n  ImageTile.prototype.constructor = ImageTile;\n\n  /**\n   * @inheritDoc\n   */\n  ImageTile.prototype.disposeInternal = function disposeInternal () {\n    if (this.state == TileState.LOADING) {\n      this.unlistenImage_();\n      this.image_ = getBlankImage();\n    }\n    if (this.interimTile) {\n      this.interimTile.dispose();\n    }\n    this.state = TileState.ABORT;\n    this.changed();\n    Tile.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * Get the HTML image element for this tile (may be a Canvas, Image, or Video).\n   * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n   * @api\n   */\n  ImageTile.prototype.getImage = function getImage () {\n    return this.image_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ImageTile.prototype.getKey = function getKey () {\n    return this.src_;\n  };\n\n  /**\n   * Tracks loading or read errors.\n   *\n   * @private\n   */\n  ImageTile.prototype.handleImageError_ = function handleImageError_ () {\n    this.state = TileState.ERROR;\n    this.unlistenImage_();\n    this.image_ = getBlankImage();\n    this.changed();\n  };\n\n  /**\n   * Tracks successful image load.\n   *\n   * @private\n   */\n  ImageTile.prototype.handleImageLoad_ = function handleImageLoad_ () {\n    var image = /** @type {HTMLImageElement} */ (this.image_);\n    if (image.naturalWidth && image.naturalHeight) {\n      this.state = TileState.LOADED;\n    } else {\n      this.state = TileState.EMPTY;\n    }\n    this.unlistenImage_();\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  ImageTile.prototype.load = function load () {\n    if (this.state == TileState.ERROR) {\n      this.state = TileState.IDLE;\n      this.image_ = new Image();\n      if (this.crossOrigin_ !== null) {\n        this.image_.crossOrigin = this.crossOrigin_;\n      }\n    }\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n      this.imageListenerKeys_ = [\n        listenOnce(this.image_, EventType.ERROR,\n          this.handleImageError_, this),\n        listenOnce(this.image_, EventType.LOAD,\n          this.handleImageLoad_, this)\n      ];\n      this.tileLoadFunction_(this, this.src_);\n    }\n  };\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\n  ImageTile.prototype.unlistenImage_ = function unlistenImage_ () {\n    this.imageListenerKeys_.forEach(unlistenByKey);\n    this.imageListenerKeys_ = null;\n  };\n\n  return ImageTile;\n}(Tile));\n\n\n/**\n * Get a 1-pixel blank image.\n * @return {HTMLCanvasElement} Blank image.\n */\nfunction getBlankImage() {\n  var ctx = createCanvasContext2D(1, 1);\n  ctx.fillStyle = 'rgba(0,0,0,0)';\n  ctx.fillRect(0, 0, 1, 1);\n  return ctx.canvas;\n}\n\nexport default ImageTile;\n\n//# sourceMappingURL=ImageTile.js.map","/**\n * @module ol/tilecoord\n */\n\n\n/**\n * An array of three numbers representing the location of a tile in a tile\n * grid. The order is `z`, `x`, and `y`. `z` is the zoom level.\n * @typedef {Array<number>} TileCoord\n * @api\n */\n\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {TileCoord=} opt_tileCoord Tile coordinate.\n * @return {TileCoord} Tile coordinate.\n */\nexport function createOrUpdate(z, x, y, opt_tileCoord) {\n  if (opt_tileCoord !== undefined) {\n    opt_tileCoord[0] = z;\n    opt_tileCoord[1] = x;\n    opt_tileCoord[2] = y;\n    return opt_tileCoord;\n  } else {\n    return [z, x, y];\n  }\n}\n\n\n/**\n * @param {number} z Z.\n * @param {number} x X.\n * @param {number} y Y.\n * @return {string} Key.\n */\nexport function getKeyZXY(z, x, y) {\n  return z + '/' + x + '/' + y;\n}\n\n\n/**\n * Get the key for a tile coord.\n * @param {TileCoord} tileCoord The tile coord.\n * @return {string} Key.\n */\nexport function getKey(tileCoord) {\n  return getKeyZXY(tileCoord[0], tileCoord[1], tileCoord[2]);\n}\n\n\n/**\n * Get a tile coord given a key.\n * @param {string} key The tile coord key.\n * @return {TileCoord} The tile coord.\n */\nexport function fromKey(key) {\n  return key.split('/').map(Number);\n}\n\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {number} Hash.\n */\nexport function hash(tileCoord) {\n  return (tileCoord[1] << tileCoord[0]) + tileCoord[2];\n}\n\n\n/**\n * @param {TileCoord} tileCoord Tile coord.\n * @return {string} Quad key.\n */\nexport function quadKey(tileCoord) {\n  var z = tileCoord[0];\n  var digits = new Array(z);\n  var mask = 1 << (z - 1);\n  var i, charCode;\n  for (i = 0; i < z; ++i) {\n    // 48 is charCode for 0 - '0'.charCodeAt(0)\n    charCode = 48;\n    if (tileCoord[1] & mask) {\n      charCode += 1;\n    }\n    if (tileCoord[2] & mask) {\n      charCode += 2;\n    }\n    digits[i] = String.fromCharCode(charCode);\n    mask >>= 1;\n  }\n  return digits.join('');\n}\n\n\n/**\n * @param {TileCoord} tileCoord Tile coordinate.\n * @param {!import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {boolean} Tile coordinate is within extent and zoom level range.\n */\nexport function withinExtentAndZ(tileCoord, tileGrid) {\n  var z = tileCoord[0];\n  var x = tileCoord[1];\n  var y = tileCoord[2];\n\n  if (tileGrid.getMinZoom() > z || z > tileGrid.getMaxZoom()) {\n    return false;\n  }\n  var extent = tileGrid.getExtent();\n  var tileRange;\n  if (!extent) {\n    tileRange = tileGrid.getFullTileRange(z);\n  } else {\n    tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n  }\n  if (!tileRange) {\n    return true;\n  } else {\n    return tileRange.containsXY(x, y);\n  }\n}\n\n//# sourceMappingURL=tilecoord.js.map","/**\n * @module ol/TileCache\n */\nimport LRUCache from './structs/LRUCache.js';\nimport {fromKey, getKey} from './tilecoord.js';\n\nvar TileCache = /*@__PURE__*/(function (LRUCache) {\n  function TileCache(opt_highWaterMark) {\n\n    LRUCache.call(this, opt_highWaterMark);\n\n  }\n\n  if ( LRUCache ) TileCache.__proto__ = LRUCache;\n  TileCache.prototype = Object.create( LRUCache && LRUCache.prototype );\n  TileCache.prototype.constructor = TileCache;\n\n  /**\n   * @param {!Object<string, import(\"./TileRange.js\").default>} usedTiles Used tiles.\n   */\n  TileCache.prototype.expireCache = function expireCache (usedTiles) {\n    while (this.canExpireCache()) {\n      var tile = this.peekLast();\n      var zKey = tile.tileCoord[0].toString();\n      if (zKey in usedTiles && usedTiles[zKey].contains(tile.tileCoord)) {\n        break;\n      } else {\n        this.pop().dispose();\n      }\n    }\n  };\n\n  /**\n   * Prune all tiles from the cache that don't have the same z as the newest tile.\n   */\n  TileCache.prototype.pruneExceptNewestZ = function pruneExceptNewestZ () {\n    if (this.getCount() === 0) {\n      return;\n    }\n    var key = this.peekFirstKey();\n    var tileCoord = fromKey(key);\n    var z = tileCoord[0];\n    this.forEach(function(tile) {\n      if (tile.tileCoord[0] !== z) {\n        this.remove(getKey(tile.tileCoord));\n        tile.dispose();\n      }\n    }, this);\n  };\n\n  return TileCache;\n}(LRUCache));\n\n\nexport default TileCache;\n\n//# sourceMappingURL=TileCache.js.map","/**\n * @module ol/source/Source\n */\nimport {abstract} from '../util.js';\nimport BaseObject from '../Object.js';\nimport {get as getProjection} from '../proj.js';\nimport SourceState from './State.js';\n\n\n/**\n * A function that returns a string or an array of strings representing source\n * attributions.\n *\n * @typedef {function(import(\"../PluggableMap.js\").FrameState): (string|Array<string>)} Attribution\n */\n\n\n/**\n * A type that can be used to provide attribution information for data sources.\n *\n * It represents either\n * * a simple string (e.g. `'© Acme Inc.'`)\n * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)\n * * a function that returns a string or array of strings (`{@link module:ol/source/Source~Attribution}`)\n *\n * @typedef {string|Array<string>|Attribution} AttributionLike\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {import(\"../proj.js\").ProjectionLike} projection\n * @property {SourceState} [state='ready']\n * @property {boolean} [wrapX=false]\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for {@link module:ol/layer/Layer~Layer} sources.\n *\n * A generic `change` event is triggered when the state of the source changes.\n * @abstract\n * @api\n */\nvar Source = /*@__PURE__*/(function (BaseObject) {\n  function Source(options) {\n\n    BaseObject.call(this);\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.projection_ = getProjection(options.projection);\n\n    /**\n     * @private\n     * @type {?Attribution}\n     */\n    this.attributions_ = adaptAttributions(options.attributions);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.attributionsCollapsible_ = options.attributionsCollapsible !== undefined ?\n      options.attributionsCollapsible : true;\n\n    /**\n     * This source is currently loading data. Sources that defer loading to the\n     * map's tile queue never set this to `true`.\n     * @type {boolean}\n     */\n    this.loading = false;\n\n    /**\n     * @private\n     * @type {SourceState}\n     */\n    this.state_ = options.state !== undefined ?\n      options.state : SourceState.READY;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.wrapX_ = options.wrapX !== undefined ? options.wrapX : false;\n\n  }\n\n  if ( BaseObject ) Source.__proto__ = BaseObject;\n  Source.prototype = Object.create( BaseObject && BaseObject.prototype );\n  Source.prototype.constructor = Source;\n\n  /**\n   * Get the attribution function for the source.\n   * @return {?Attribution} Attribution function.\n   */\n  Source.prototype.getAttributions = function getAttributions () {\n    return this.attributions_;\n  };\n\n  /**\n   * @return {boolean} Aattributions are collapsible.\n   */\n  Source.prototype.getAttributionsCollapsible = function getAttributionsCollapsible () {\n    return this.attributionsCollapsible_;\n  };\n\n  /**\n   * Get the projection of the source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  Source.prototype.getProjection = function getProjection () {\n    return this.projection_;\n  };\n\n  /**\n   * @abstract\n   * @return {Array<number>|undefined} Resolutions.\n   */\n  Source.prototype.getResolutions = function getResolutions () {\n    return abstract();\n  };\n\n  /**\n   * Get the state of the source, see {@link module:ol/source/State~State} for possible states.\n   * @return {SourceState} State.\n   * @api\n   */\n  Source.prototype.getState = function getState () {\n    return this.state_;\n  };\n\n  /**\n   * @return {boolean|undefined} Wrap X.\n   */\n  Source.prototype.getWrapX = function getWrapX () {\n    return this.wrapX_;\n  };\n\n  /**\n   * Refreshes the source and finally dispatches a 'change' event.\n   * @api\n   */\n  Source.prototype.refresh = function refresh () {\n    this.changed();\n  };\n\n  /**\n   * Set the attributions of the source.\n   * @param {AttributionLike|undefined} attributions Attributions.\n   *     Can be passed as `string`, `Array<string>`, `{@link module:ol/source/Source~Attribution}`,\n   *     or `undefined`.\n   * @api\n   */\n  Source.prototype.setAttributions = function setAttributions (attributions) {\n    this.attributions_ = adaptAttributions(attributions);\n    this.changed();\n  };\n\n  /**\n   * Set the state of the source.\n   * @param {SourceState} state State.\n   * @protected\n   */\n  Source.prototype.setState = function setState (state) {\n    this.state_ = state;\n    this.changed();\n  };\n\n  return Source;\n}(BaseObject));\n\n\n/**\n * Turns the attributions option into an attributions function.\n * @param {AttributionLike|undefined} attributionLike The attribution option.\n * @return {?Attribution} An attribution function (or null).\n */\nfunction adaptAttributions(attributionLike) {\n  if (!attributionLike) {\n    return null;\n  }\n  if (Array.isArray(attributionLike)) {\n    return function(frameState) {\n      return attributionLike;\n    };\n  }\n\n  if (typeof attributionLike === 'function') {\n    return attributionLike;\n  }\n\n  return function(frameState) {\n    return [attributionLike];\n  };\n}\n\n\nexport default Source;\n\n//# sourceMappingURL=Source.js.map","/**\n * @module ol/tilegrid/TileGrid\n */\nimport {DEFAULT_TILE_SIZE} from './common.js';\nimport {assert} from '../asserts.js';\nimport TileRange, {createOrUpdate as createOrUpdateTileRange} from '../TileRange.js';\nimport {isSorted, linearFindNearest} from '../array.js';\nimport {createOrUpdate, getTopLeft} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {toSize} from '../size.js';\nimport {createOrUpdate as createOrUpdateTileCoord} from '../tilecoord.js';\n\n\n/**\n * @private\n * @type {import(\"../tilecoord.js\").TileCoord}\n */\nvar tmpTileCoord = [0, 0, 0];\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles outside this\n * extent will be requested by {@link module:ol/source/Tile} sources. When no `origin` or\n * `origins` are configured, the `origin` will be set to the top-left corner of the extent.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e. where the `x`\n * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and upwards. If not\n * specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins, i.e. where\n * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * origin. Tile coordinates increase left to right and upwards. If not specified, `extent` or\n * `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each resolution needs\n * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions\n * array will have a length of `maxZoom + 1`.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Sizes.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * Default is `[256, 256]`.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. If given, the array length\n * should match the length of the `resolutions` array, i.e. each resolution can have a different\n * tile size.\n */\n\n\n/**\n * @classdesc\n * Base class for setting the grid pattern for sources accessing tiled-image\n * servers.\n * @api\n */\nvar TileGrid = function TileGrid(options) {\n\n  /**\n   * @protected\n   * @type {number}\n   */\n  this.minZoom = options.minZoom !== undefined ? options.minZoom : 0;\n\n  /**\n   * @private\n   * @type {!Array<number>}\n   */\n  this.resolutions_ = options.resolutions;\n  assert(isSorted(this.resolutions_, function(a, b) {\n    return b - a;\n  }, true), 17); // `resolutions` must be sorted in descending order\n\n\n  // check if we've got a consistent zoom factor and origin\n  var zoomFactor;\n  if (!options.origins) {\n    for (var i = 0, ii = this.resolutions_.length - 1; i < ii; ++i) {\n      if (!zoomFactor) {\n        zoomFactor = this.resolutions_[i] / this.resolutions_[i + 1];\n      } else {\n        if (this.resolutions_[i] / this.resolutions_[i + 1] !== zoomFactor) {\n          zoomFactor = undefined;\n          break;\n        }\n      }\n    }\n  }\n\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.zoomFactor_ = zoomFactor;\n\n\n  /**\n   * @protected\n   * @type {number}\n   */\n  this.maxZoom = this.resolutions_.length - 1;\n\n  /**\n   * @private\n   * @type {import(\"../coordinate.js\").Coordinate}\n   */\n  this.origin_ = options.origin !== undefined ? options.origin : null;\n\n  /**\n   * @private\n   * @type {Array<import(\"../coordinate.js\").Coordinate>}\n   */\n  this.origins_ = null;\n  if (options.origins !== undefined) {\n    this.origins_ = options.origins;\n    assert(this.origins_.length == this.resolutions_.length,\n      20); // Number of `origins` and `resolutions` must be equal\n  }\n\n  var extent = options.extent;\n\n  if (extent !== undefined &&\n      !this.origin_ && !this.origins_) {\n    this.origin_ = getTopLeft(extent);\n  }\n\n  assert(\n    (!this.origin_ && this.origins_) || (this.origin_ && !this.origins_),\n    18); // Either `origin` or `origins` must be configured, never both\n\n  /**\n   * @private\n   * @type {Array<number|import(\"../size.js\").Size>}\n   */\n  this.tileSizes_ = null;\n  if (options.tileSizes !== undefined) {\n    this.tileSizes_ = options.tileSizes;\n    assert(this.tileSizes_.length == this.resolutions_.length,\n      19); // Number of `tileSizes` and `resolutions` must be equal\n  }\n\n  /**\n   * @private\n   * @type {number|import(\"../size.js\").Size}\n   */\n  this.tileSize_ = options.tileSize !== undefined ?\n    options.tileSize :\n    !this.tileSizes_ ? DEFAULT_TILE_SIZE : null;\n  assert(\n    (!this.tileSize_ && this.tileSizes_) ||\n      (this.tileSize_ && !this.tileSizes_),\n    22); // Either `tileSize` or `tileSizes` must be configured, never both\n\n  /**\n   * @private\n   * @type {import(\"../extent.js\").Extent}\n   */\n  this.extent_ = extent !== undefined ? extent : null;\n\n\n  /**\n   * @private\n   * @type {Array<import(\"../TileRange.js\").default>}\n   */\n  this.fullTileRanges_ = null;\n\n  /**\n   * @private\n   * @type {import(\"../size.js\").Size}\n   */\n  this.tmpSize_ = [0, 0];\n\n  if (options.sizes !== undefined) {\n    this.fullTileRanges_ = options.sizes.map(function(size, z) {\n      var tileRange = new TileRange(\n        Math.min(0, size[0]), Math.max(size[0] - 1, -1),\n        Math.min(0, size[1]), Math.max(size[1] - 1, -1));\n      return tileRange;\n    }, this);\n  } else if (extent) {\n    this.calculateTileRanges_(extent);\n  }\n\n};\n\n/**\n * Call a function with each tile coordinate for a given extent and zoom level.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} zoom Integer zoom level.\n * @param {function(import(\"../tilecoord.js\").TileCoord)} callback Function called with each tile coordinate.\n * @api\n */\nTileGrid.prototype.forEachTileCoord = function forEachTileCoord (extent, zoom, callback) {\n  var tileRange = this.getTileRangeForExtentAndZ(extent, zoom);\n  for (var i = tileRange.minX, ii = tileRange.maxX; i <= ii; ++i) {\n    for (var j = tileRange.minY, jj = tileRange.maxY; j <= jj; ++j) {\n      callback([zoom, i, j]);\n    }\n  }\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {function(this: T, number, import(\"../TileRange.js\").default): boolean} callback Callback.\n * @param {T=} opt_this The object to use as `this` in `callback`.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {boolean} Callback succeeded.\n * @template T\n */\nTileGrid.prototype.forEachTileCoordParentTileRange = function forEachTileCoordParentTileRange (tileCoord, callback, opt_this, opt_tileRange, opt_extent) {\n  var tileRange, x, y;\n  var tileCoordExtent = null;\n  var z = tileCoord[0] - 1;\n  if (this.zoomFactor_ === 2) {\n    x = tileCoord[1];\n    y = tileCoord[2];\n  } else {\n    tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n  }\n  while (z >= this.minZoom) {\n    if (this.zoomFactor_ === 2) {\n      x = Math.floor(x / 2);\n      y = Math.floor(y / 2);\n      tileRange = createOrUpdateTileRange(x, x, y, y, opt_tileRange);\n    } else {\n      tileRange = this.getTileRangeForExtentAndZ(tileCoordExtent, z, opt_tileRange);\n    }\n    if (callback.call(opt_this, z, tileRange)) {\n      return true;\n    }\n    --z;\n  }\n  return false;\n};\n\n/**\n * Get the extent for this tile grid, if it was configured.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\nTileGrid.prototype.getExtent = function getExtent () {\n  return this.extent_;\n};\n\n/**\n * Get the maximum zoom level for the grid.\n * @return {number} Max zoom.\n * @api\n */\nTileGrid.prototype.getMaxZoom = function getMaxZoom () {\n  return this.maxZoom;\n};\n\n/**\n * Get the minimum zoom level for the grid.\n * @return {number} Min zoom.\n * @api\n */\nTileGrid.prototype.getMinZoom = function getMinZoom () {\n  return this.minZoom;\n};\n\n/**\n * Get the origin for the grid at the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {import(\"../coordinate.js\").Coordinate} Origin.\n * @api\n */\nTileGrid.prototype.getOrigin = function getOrigin (z) {\n  if (this.origin_) {\n    return this.origin_;\n  } else {\n    return this.origins_[z];\n  }\n};\n\n/**\n * Get the resolution for the given zoom level.\n * @param {number} z Integer zoom level.\n * @return {number} Resolution.\n * @api\n */\nTileGrid.prototype.getResolution = function getResolution (z) {\n  return this.resolutions_[z];\n};\n\n/**\n * Get the list of resolutions for the tile grid.\n * @return {Array<number>} Resolutions.\n * @api\n */\nTileGrid.prototype.getResolutions = function getResolutions () {\n  return this.resolutions_;\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary import(\"../TileRange.js\").default object.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../TileRange.js\").default} Tile range.\n */\nTileGrid.prototype.getTileCoordChildTileRange = function getTileCoordChildTileRange (tileCoord, opt_tileRange, opt_extent) {\n  if (tileCoord[0] < this.maxZoom) {\n    if (this.zoomFactor_ === 2) {\n      var minX = tileCoord[1] * 2;\n      var minY = tileCoord[2] * 2;\n      return createOrUpdateTileRange(minX, minX + 1, minY, minY + 1, opt_tileRange);\n    }\n    var tileCoordExtent = this.getTileCoordExtent(tileCoord, opt_extent);\n    return this.getTileRangeForExtentAndZ(\n      tileCoordExtent, tileCoord[0] + 1, opt_tileRange);\n  }\n  return null;\n};\n\n/**\n * Get the extent for a tile range.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary import(\"../extent.js\").Extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\nTileGrid.prototype.getTileRangeExtent = function getTileRangeExtent (z, tileRange, opt_extent) {\n  var origin = this.getOrigin(z);\n  var resolution = this.getResolution(z);\n  var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n  var minX = origin[0] + tileRange.minX * tileSize[0] * resolution;\n  var maxX = origin[0] + (tileRange.maxX + 1) * tileSize[0] * resolution;\n  var minY = origin[1] + tileRange.minY * tileSize[1] * resolution;\n  var maxY = origin[1] + (tileRange.maxY + 1) * tileSize[1] * resolution;\n  return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n};\n\n/**\n * Get a tile range for the given extent and integer zoom level.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} z Integer zoom level.\n * @param {import(\"../TileRange.js\").default=} opt_tileRange Temporary tile range object.\n * @return {import(\"../TileRange.js\").default} Tile range.\n */\nTileGrid.prototype.getTileRangeForExtentAndZ = function getTileRangeForExtentAndZ (extent, z, opt_tileRange) {\n  var tileCoord = tmpTileCoord;\n  this.getTileCoordForXYAndZ_(extent[0], extent[1], z, false, tileCoord);\n  var minX = tileCoord[1];\n  var minY = tileCoord[2];\n  this.getTileCoordForXYAndZ_(extent[2], extent[3], z, true, tileCoord);\n  return createOrUpdateTileRange(minX, tileCoord[1], minY, tileCoord[2], opt_tileRange);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {import(\"../coordinate.js\").Coordinate} Tile center.\n */\nTileGrid.prototype.getTileCoordCenter = function getTileCoordCenter (tileCoord) {\n  var origin = this.getOrigin(tileCoord[0]);\n  var resolution = this.getResolution(tileCoord[0]);\n  var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n  return [\n    origin[0] + (tileCoord[1] + 0.5) * tileSize[0] * resolution,\n    origin[1] + (tileCoord[2] + 0.5) * tileSize[1] * resolution\n  ];\n};\n\n/**\n * Get the extent of a tile coordinate.\n *\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"../extent.js\").Extent=} opt_extent Temporary extent object.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\nTileGrid.prototype.getTileCoordExtent = function getTileCoordExtent (tileCoord, opt_extent) {\n  var origin = this.getOrigin(tileCoord[0]);\n  var resolution = this.getResolution(tileCoord[0]);\n  var tileSize = toSize(this.getTileSize(tileCoord[0]), this.tmpSize_);\n  var minX = origin[0] + tileCoord[1] * tileSize[0] * resolution;\n  var minY = origin[1] + tileCoord[2] * tileSize[1] * resolution;\n  var maxX = minX + tileSize[0] * resolution;\n  var maxY = minY + tileSize[1] * resolution;\n  return createOrUpdate(minX, minY, maxX, maxY, opt_extent);\n};\n\n/**\n * Get the tile coordinate for the given map coordinate and resolution.This\n * method considers that coordinates that intersect tile boundaries should be\n * assigned the higher tile coordinate.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\nTileGrid.prototype.getTileCoordForCoordAndResolution = function getTileCoordForCoordAndResolution (coordinate, resolution, opt_tileCoord) {\n  return this.getTileCoordForXYAndResolution_(\n    coordinate[0], coordinate[1], resolution, false, opt_tileCoord);\n};\n\n/**\n * Note that this method should not be called for resolutions that correspond\n * to an integer zoom level.Instead call the `getTileCoordForXYAndZ_` method.\n * @param {number} x X.\n * @param {number} y Y.\n * @param {number} resolution Resolution (for a non-integer zoom level).\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n *   intersections go to the higher tile coordinate, let edge intersections\n *   go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\nTileGrid.prototype.getTileCoordForXYAndResolution_ = function getTileCoordForXYAndResolution_ (x, y, resolution, reverseIntersectionPolicy, opt_tileCoord) {\n  var z = this.getZForResolution(resolution);\n  var scale = resolution / this.getResolution(z);\n  var origin = this.getOrigin(z);\n  var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n  var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n  var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n  var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n  var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n  var tileCoordX = scale * xFromOrigin / tileSize[0];\n  var tileCoordY = scale * yFromOrigin / tileSize[1];\n\n  if (reverseIntersectionPolicy) {\n    tileCoordX = Math.ceil(tileCoordX) - 1;\n    tileCoordY = Math.ceil(tileCoordY) - 1;\n  } else {\n    tileCoordX = Math.floor(tileCoordX);\n    tileCoordY = Math.floor(tileCoordY);\n  }\n\n  return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n};\n\n/**\n * Although there is repetition between this method and `getTileCoordForXYAndResolution_`,\n * they should have separate implementations.This method is for integer zoom\n * levels.The other method should only be called for resolutions corresponding\n * to non-integer zoom levels.\n * @param {number} x Map x coordinate.\n * @param {number} y Map y coordinate.\n * @param {number} z Integer zoom level.\n * @param {boolean} reverseIntersectionPolicy Instead of letting edge\n *   intersections go to the higher tile coordinate, let edge intersections\n *   go to the lower tile coordinate.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Temporary import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @private\n */\nTileGrid.prototype.getTileCoordForXYAndZ_ = function getTileCoordForXYAndZ_ (x, y, z, reverseIntersectionPolicy, opt_tileCoord) {\n  var origin = this.getOrigin(z);\n  var resolution = this.getResolution(z);\n  var tileSize = toSize(this.getTileSize(z), this.tmpSize_);\n\n  var adjustX = reverseIntersectionPolicy ? 0.5 : 0;\n  var adjustY = reverseIntersectionPolicy ? 0 : 0.5;\n  var xFromOrigin = Math.floor((x - origin[0]) / resolution + adjustX);\n  var yFromOrigin = Math.floor((y - origin[1]) / resolution + adjustY);\n  var tileCoordX = xFromOrigin / tileSize[0];\n  var tileCoordY = yFromOrigin / tileSize[1];\n\n  if (reverseIntersectionPolicy) {\n    tileCoordX = Math.ceil(tileCoordX) - 1;\n    tileCoordY = Math.ceil(tileCoordY) - 1;\n  } else {\n    tileCoordX = Math.floor(tileCoordX);\n    tileCoordY = Math.floor(tileCoordY);\n  }\n\n  return createOrUpdateTileCoord(z, tileCoordX, tileCoordY, opt_tileCoord);\n};\n\n/**\n * Get a tile coordinate given a map coordinate and zoom level.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} z Zoom level.\n * @param {import(\"../tilecoord.js\").TileCoord=} opt_tileCoord Destination import(\"../tilecoord.js\").TileCoord object.\n * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate.\n * @api\n */\nTileGrid.prototype.getTileCoordForCoordAndZ = function getTileCoordForCoordAndZ (coordinate, z, opt_tileCoord) {\n  return this.getTileCoordForXYAndZ_(\n    coordinate[0], coordinate[1], z, false, opt_tileCoord);\n};\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @return {number} Tile resolution.\n */\nTileGrid.prototype.getTileCoordResolution = function getTileCoordResolution (tileCoord) {\n  return this.resolutions_[tileCoord[0]];\n};\n\n/**\n * Get the tile size for a zoom level. The type of the return value matches the\n * `tileSize` or `tileSizes` that the tile grid was configured with. To always\n * get an `import(\"../size.js\").Size`, run the result through `import(\"../size.js\").Size.toSize()`.\n * @param {number} z Z.\n * @return {number|import(\"../size.js\").Size} Tile size.\n * @api\n */\nTileGrid.prototype.getTileSize = function getTileSize (z) {\n  if (this.tileSize_) {\n    return this.tileSize_;\n  } else {\n    return this.tileSizes_[z];\n  }\n};\n\n/**\n * @param {number} z Zoom level.\n * @return {import(\"../TileRange.js\").default} Extent tile range for the specified zoom level.\n */\nTileGrid.prototype.getFullTileRange = function getFullTileRange (z) {\n  if (!this.fullTileRanges_) {\n    return null;\n  } else {\n    return this.fullTileRanges_[z];\n  }\n};\n\n/**\n * @param {number} resolution Resolution.\n * @param {number=} opt_direction If 0, the nearest resolution will be used.\n *   If 1, the nearest lower resolution will be used. If -1, the nearest\n *   higher resolution will be used. Default is 0.\n * @return {number} Z.\n * @api\n */\nTileGrid.prototype.getZForResolution = function getZForResolution (resolution, opt_direction) {\n  var z = linearFindNearest(this.resolutions_, resolution, opt_direction || 0);\n  return clamp(z, this.minZoom, this.maxZoom);\n};\n\n/**\n * @param {!import(\"../extent.js\").Extent} extent Extent for this tile grid.\n * @private\n */\nTileGrid.prototype.calculateTileRanges_ = function calculateTileRanges_ (extent) {\n  var length = this.resolutions_.length;\n  var fullTileRanges = new Array(length);\n  for (var z = this.minZoom; z < length; ++z) {\n    fullTileRanges[z] = this.getTileRangeForExtentAndZ(extent, z);\n  }\n  this.fullTileRanges_ = fullTileRanges;\n};\n\n\nexport default TileGrid;\n\n//# sourceMappingURL=TileGrid.js.map","/**\n * @module ol/tilegrid\n */\nimport {DEFAULT_MAX_ZOOM, DEFAULT_TILE_SIZE} from './tilegrid/common.js';\nimport {toSize} from './size.js';\nimport {containsCoordinate, createOrUpdate, getCorner, getHeight, getWidth} from './extent.js';\nimport Corner from './extent/Corner.js';\nimport {get as getProjection, METERS_PER_UNIT} from './proj.js';\nimport Units from './proj/Units.js';\nimport TileGrid from './tilegrid/TileGrid.js';\n\n\n/**\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {!TileGrid} Default tile grid for the\n * passed projection.\n */\nexport function getForProjection(projection) {\n  var tileGrid = projection.getDefaultTileGrid();\n  if (!tileGrid) {\n    tileGrid = createForProjection(projection);\n    projection.setDefaultTileGrid(tileGrid);\n  }\n  return tileGrid;\n}\n\n\n/**\n * @param {TileGrid} tileGrid Tile grid.\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {import(\"./tilecoord.js\").TileCoord} Tile coordinate.\n */\nexport function wrapX(tileGrid, tileCoord, projection) {\n  var z = tileCoord[0];\n  var center = tileGrid.getTileCoordCenter(tileCoord);\n  var projectionExtent = extentFromProjection(projection);\n  if (!containsCoordinate(projectionExtent, center)) {\n    var worldWidth = getWidth(projectionExtent);\n    var worldsAway = Math.ceil((projectionExtent[0] - center[0]) / worldWidth);\n    center[0] += worldWidth * worldsAway;\n    return tileGrid.getTileCoordForCoordAndZ(center, z);\n  } else {\n    return tileCoord;\n  }\n}\n\n\n/**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {Corner=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {\n  var corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT;\n\n  var resolutions = resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize);\n\n  return new TileGrid({\n    extent: extent,\n    origin: getCorner(extent, corner),\n    resolutions: resolutions,\n    tileSize: opt_tileSize\n  });\n}\n\n\n/**\n * @typedef {Object} XYZOptions\n * @property {import(\"./extent.js\").Extent} [extent] Extent for the tile grid. The origin for an XYZ tile grid is the\n * top-left corner of the extent. The zero level of the grid is defined by the resolution at which one tile fits in the\n * provided extent. If not provided, the extent of the EPSG:3857 projection is used.\n * @property {number} [maxZoom] Maximum zoom. The default is `42`. This determines the number of levels\n * in the grid set. For example, a `maxZoom` of 21 means there are 22 levels in the grid set.\n * @property {number} [minZoom=0] Minimum zoom.\n * @property {number|import(\"./size.js\").Size} [tileSize=[256, 256]] Tile size in pixels.\n */\n\n\n/**\n * Creates a tile grid with a standard XYZ tiling scheme.\n * @param {XYZOptions=} opt_options Tile grid options.\n * @return {!TileGrid} Tile grid instance.\n * @api\n */\nexport function createXYZ(opt_options) {\n  /** @type {XYZOptions} */\n  var xyzOptions = opt_options || {};\n\n  var extent = xyzOptions.extent || getProjection('EPSG:3857').getExtent();\n\n  /** @type {import(\"./tilegrid/TileGrid.js\").Options} */\n  var gridOptions = {\n    extent: extent,\n    minZoom: xyzOptions.minZoom,\n    tileSize: xyzOptions.tileSize,\n    resolutions: resolutionsFromExtent(\n      extent,\n      xyzOptions.maxZoom,\n      xyzOptions.tileSize\n    )\n  };\n  return new TileGrid(gridOptions);\n}\n\n\n/**\n * Create a resolutions array from an extent.  A zoom factor of 2 is assumed.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @return {!Array<number>} Resolutions array.\n */\nfunction resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) {\n  var maxZoom = opt_maxZoom !== undefined ?\n    opt_maxZoom : DEFAULT_MAX_ZOOM;\n\n  var height = getHeight(extent);\n  var width = getWidth(extent);\n\n  var tileSize = toSize(opt_tileSize !== undefined ?\n    opt_tileSize : DEFAULT_TILE_SIZE);\n  var maxResolution = Math.max(\n    width / tileSize[0], height / tileSize[1]);\n\n  var length = maxZoom + 1;\n  var resolutions = new Array(length);\n  for (var z = 0; z < length; ++z) {\n    resolutions[z] = maxResolution / Math.pow(2, z);\n  }\n  return resolutions;\n}\n\n\n/**\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @param {number=} opt_maxZoom Maximum zoom level (default is\n *     DEFAULT_MAX_ZOOM).\n * @param {number|import(\"./size.js\").Size=} opt_tileSize Tile size (default uses\n *     DEFAULT_TILE_SIZE).\n * @param {Corner=} opt_corner Extent corner (default is `'top-left'`).\n * @return {!TileGrid} TileGrid instance.\n */\nexport function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {\n  var extent = extentFromProjection(projection);\n  return createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner);\n}\n\n\n/**\n * Generate a tile grid extent from a projection.  If the projection has an\n * extent, it is used.  If not, a global extent is assumed.\n * @param {import(\"./proj.js\").ProjectionLike} projection Projection.\n * @return {import(\"./extent.js\").Extent} Extent.\n */\nexport function extentFromProjection(projection) {\n  projection = getProjection(projection);\n  var extent = projection.getExtent();\n  if (!extent) {\n    var half = 180 * METERS_PER_UNIT[Units.DEGREES] / projection.getMetersPerUnit();\n    extent = createOrUpdate(-half, -half, half, half);\n  }\n  return extent;\n}\n\n//# sourceMappingURL=tilegrid.js.map","/**\n * @module ol/source/Tile\n */\nimport {abstract} from '../util.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport Event from '../events/Event.js';\nimport {equivalent} from '../proj.js';\nimport {toSize, scale as scaleSize} from '../size.js';\nimport Source from './Source.js';\nimport {getKeyZXY, withinExtentAndZ} from '../tilecoord.js';\nimport {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque]\n * @property {number} [tilePixelRatio]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing images divided into a tile grid.\n * @abstract\n * @api\n */\nvar TileSource = /*@__PURE__*/(function (Source) {\n  function TileSource(options) {\n\n    Source.call(this, {\n      attributions: options.attributions,\n      attributionsCollapsible: options.attributionsCollapsible,\n      projection: options.projection,\n      state: options.state,\n      wrapX: options.wrapX\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.opaque_ = options.opaque !== undefined ? options.opaque : false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.tilePixelRatio_ = options.tilePixelRatio !== undefined ?\n      options.tilePixelRatio : 1;\n\n    /**\n     * @protected\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.tileGrid = options.tileGrid !== undefined ? options.tileGrid : null;\n\n    /**\n     * @protected\n     * @type {import(\"../TileCache.js\").default}\n     */\n    this.tileCache = new TileCache(options.cacheSize);\n\n    /**\n     * @protected\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tmpSize = [0, 0];\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.key_ = options.key || '';\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").Options}\n     */\n    this.tileOptions = {transition: options.transition};\n\n  }\n\n  if ( Source ) TileSource.__proto__ = Source;\n  TileSource.prototype = Object.create( Source && Source.prototype );\n  TileSource.prototype.constructor = TileSource;\n\n  /**\n   * @return {boolean} Can expire cache.\n   */\n  TileSource.prototype.canExpireCache = function canExpireCache () {\n    return this.tileCache.canExpireCache();\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {!Object<string, import(\"../TileRange.js\").default>} usedTiles Used tiles.\n   */\n  TileSource.prototype.expireCache = function expireCache (projection, usedTiles) {\n    var tileCache = this.getTileCacheForProjection(projection);\n    if (tileCache) {\n      tileCache.expireCache(usedTiles);\n    }\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {number} z Zoom level.\n   * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n   * @param {function(import(\"../Tile.js\").default):(boolean|void)} callback Called with each\n   *     loaded tile.  If the callback returns `false`, the tile will not be\n   *     considered loaded.\n   * @return {boolean} The tile range is fully covered with loaded tiles.\n   */\n  TileSource.prototype.forEachLoadedTile = function forEachLoadedTile (projection, z, tileRange, callback) {\n    var tileCache = this.getTileCacheForProjection(projection);\n    if (!tileCache) {\n      return false;\n    }\n\n    var covered = true;\n    var tile, tileCoordKey, loaded;\n    for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n      for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n        tileCoordKey = getKeyZXY(z, x, y);\n        loaded = false;\n        if (tileCache.containsKey(tileCoordKey)) {\n          tile = /** @type {!import(\"../Tile.js\").default} */ (tileCache.get(tileCoordKey));\n          loaded = tile.getState() === TileState.LOADED;\n          if (loaded) {\n            loaded = (callback(tile) !== false);\n          }\n        }\n        if (!loaded) {\n          covered = false;\n        }\n      }\n    }\n    return covered;\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {number} Gutter.\n   */\n  TileSource.prototype.getGutterForProjection = function getGutterForProjection (projection) {\n    return 0;\n  };\n\n  /**\n   * Return the key to be used for all tiles in the source.\n   * @return {string} The key for all tiles.\n   * @protected\n   */\n  TileSource.prototype.getKey = function getKey () {\n    return this.key_;\n  };\n\n  /**\n   * Set the value to be used as the key for all tiles in the source.\n   * @param {string} key The key for tiles.\n   * @protected\n   */\n  TileSource.prototype.setKey = function setKey (key) {\n    if (this.key_ !== key) {\n      this.key_ = key;\n      this.changed();\n    }\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {boolean} Opaque.\n   */\n  TileSource.prototype.getOpaque = function getOpaque (projection) {\n    return this.opaque_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileSource.prototype.getResolutions = function getResolutions () {\n    return this.tileGrid.getResolutions();\n  };\n\n  /**\n   * @abstract\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../Tile.js\").default} Tile.\n   */\n  TileSource.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    return abstract();\n  };\n\n  /**\n   * Return the tile grid of the tile source.\n   * @return {import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   * @api\n   */\n  TileSource.prototype.getTileGrid = function getTileGrid () {\n    return this.tileGrid;\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../tilegrid/TileGrid.js\").default} Tile grid.\n   */\n  TileSource.prototype.getTileGridForProjection = function getTileGridForProjection$1 (projection) {\n    if (!this.tileGrid) {\n      return getTileGridForProjection(projection);\n    } else {\n      return this.tileGrid;\n    }\n  };\n\n  /**\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../TileCache.js\").default} Tile cache.\n   * @protected\n   */\n  TileSource.prototype.getTileCacheForProjection = function getTileCacheForProjection (projection) {\n    var thisProj = this.getProjection();\n    if (thisProj && !equivalent(thisProj, projection)) {\n      return null;\n    } else {\n      return this.tileCache;\n    }\n  };\n\n  /**\n   * Get the tile pixel ratio for this source. Subclasses may override this\n   * method, which is meant to return a supported pixel ratio that matches the\n   * provided `pixelRatio` as close as possible.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {number} Tile pixel ratio.\n   */\n  TileSource.prototype.getTilePixelRatio = function getTilePixelRatio (pixelRatio) {\n    return this.tilePixelRatio_;\n  };\n\n  /**\n   * @param {number} z Z.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../size.js\").Size} Tile size.\n   */\n  TileSource.prototype.getTilePixelSize = function getTilePixelSize (z, pixelRatio, projection) {\n    var tileGrid = this.getTileGridForProjection(projection);\n    var tilePixelRatio = this.getTilePixelRatio(pixelRatio);\n    var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n    if (tilePixelRatio == 1) {\n      return tileSize;\n    } else {\n      return scaleSize(tileSize, tilePixelRatio, this.tmpSize);\n    }\n  };\n\n  /**\n   * Returns a tile coordinate wrapped around the x-axis. When the tile coordinate\n   * is outside the resolution and extent range of the tile grid, `null` will be\n   * returned.\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../proj/Projection.js\").default=} opt_projection Projection.\n   * @return {import(\"../tilecoord.js\").TileCoord} Tile coordinate to be passed to the tileUrlFunction or\n   *     null if no tile URL should be created for the passed `tileCoord`.\n   */\n  TileSource.prototype.getTileCoordForTileUrlFunction = function getTileCoordForTileUrlFunction (tileCoord, opt_projection) {\n    var projection = opt_projection !== undefined ?\n      opt_projection : this.getProjection();\n    var tileGrid = this.getTileGridForProjection(projection);\n    if (this.getWrapX() && projection.isGlobal()) {\n      tileCoord = wrapX(tileGrid, tileCoord, projection);\n    }\n    return withinExtentAndZ(tileCoord, tileGrid) ? tileCoord : null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileSource.prototype.refresh = function refresh () {\n    this.tileCache.clear();\n    this.changed();\n  };\n\n  /**\n   * Marks a tile coord as being used, without triggering a load.\n   * @abstract\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   */\n  TileSource.prototype.useTile = function useTile (z, x, y, projection) {};\n\n  return TileSource;\n}(Source));\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this\n * type.\n */\nexport var TileSourceEvent = /*@__PURE__*/(function (Event) {\n  function TileSourceEvent(type, tile) {\n\n    Event.call(this, type);\n\n    /**\n     * The tile related to the event.\n     * @type {import(\"../Tile.js\").default}\n     * @api\n     */\n    this.tile = tile;\n\n  }\n\n  if ( Event ) TileSourceEvent.__proto__ = Event;\n  TileSourceEvent.prototype = Object.create( Event && Event.prototype );\n  TileSourceEvent.prototype.constructor = TileSourceEvent;\n\n  return TileSourceEvent;\n}(Event));\n\nexport default TileSource;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/renderer/webgl/tilelayershader\n */\n// This file is automatically generated, do not edit.\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../webgl.js';\nimport WebGLFragment from '../../webgl/Fragment.js';\nimport WebGLVertex from '../../webgl/Vertex.js';\n\nexport var fragment = new WebGLFragment(DEBUG_WEBGL ?\n  'precision mediump float;\\nvarying vec2 v_texCoord;\\n\\n\\nuniform sampler2D u_texture;\\n\\nvoid main(void) {\\n  gl_FragColor = texture2D(u_texture, v_texCoord);\\n}\\n' :\n  'precision mediump float;varying vec2 a;uniform sampler2D e;void main(void){gl_FragColor=texture2D(e,a);}');\n\nexport var vertex = new WebGLVertex(DEBUG_WEBGL ?\n  'varying vec2 v_texCoord;\\n\\n\\nattribute vec2 a_position;\\nattribute vec2 a_texCoord;\\nuniform vec4 u_tileOffset;\\n\\nvoid main(void) {\\n  gl_Position = vec4(a_position * u_tileOffset.xy + u_tileOffset.zw, 0., 1.);\\n  v_texCoord = a_texCoord;\\n}\\n\\n\\n' :\n  'varying vec2 a;attribute vec2 b;attribute vec2 c;uniform vec4 d;void main(void){gl_Position=vec4(b*d.xy+d.zw,0.,1.);a=c;}');\n\n//# sourceMappingURL=tilelayershader.js.map","/**\n * @module ol/renderer/webgl/tilelayershader/Locations\n */\n// This file is automatically generated, do not edit\n// Run `make shaders` to generate, and commit the result.\n\nimport {DEBUG as DEBUG_WEBGL} from '../../../webgl.js';\n\nvar Locations = function Locations(gl, program) {\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_tileOffset = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_tileOffset' : 'd');\n\n  /**\n   * @type {WebGLUniformLocation}\n   */\n  this.u_texture = gl.getUniformLocation(\n    program, DEBUG_WEBGL ? 'u_texture' : 'e');\n\n  /**\n   * @type {number}\n   */\n  this.a_position = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_position' : 'b');\n\n  /**\n   * @type {number}\n   */\n  this.a_texCoord = gl.getAttribLocation(\n    program, DEBUG_WEBGL ? 'a_texCoord' : 'c');\n\n};\n\nexport default Locations;\n\n//# sourceMappingURL=Locations.js.map","/**\n * @module ol/renderer/webgl/TileLayer\n */\n// FIXME large resolutions lead to too large framebuffers :-(\n// FIXME animated shaders! check in redraw\n\nimport LayerType from '../../LayerType.js';\nimport ImageTile from '../../ImageTile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport TileSource from '../../source/Tile.js';\nimport {numberSafeCompareFunction} from '../../array.js';\nimport {createEmpty, intersects} from '../../extent.js';\nimport {roundUpToPowerOfTwo} from '../../math.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {fragment, vertex} from './tilelayershader.js';\nimport Locations from './tilelayershader/Locations.js';\nimport {toSize} from '../../size.js';\nimport {\n  reset as resetTransform,\n  rotate as rotateTransform,\n  scale as scaleTransform,\n  translate as translateTransform,\n  apply as applyTransform\n} from '../../transform.js';\nimport {COLOR_BUFFER_BIT, BLEND, ARRAY_BUFFER, FLOAT, LINEAR, TRIANGLE_STRIP} from '../../webgl.js';\nimport WebGLBuffer from '../../webgl/Buffer.js';\n\n/**\n * @classdesc\n * WebGL renderer for tile layers.\n * @api\n */\nvar WebGLTileLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n  function WebGLTileLayerRenderer(mapRenderer, tileLayer) {\n\n    WebGLLayerRenderer.call(this, mapRenderer, tileLayer);\n\n    /**\n     * @private\n     * @type {import(\"../../webgl/Fragment.js\").default}\n     */\n    this.fragmentShader_ = fragment;\n\n    /**\n     * @private\n     * @type {import(\"../../webgl/Vertex.js\").default}\n     */\n    this.vertexShader_ = vertex;\n\n    /**\n     * @private\n     * @type {import(\"./tilelayershader/Locations.js\").default}\n     */\n    this.locations_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../webgl/Buffer.js\").default}\n     */\n    this.renderArrayBuffer_ = new WebGLBuffer([\n      0, 0, 0, 1,\n      1, 0, 1, 1,\n      0, 1, 0, 0,\n      1, 1, 1, 0\n    ]);\n\n    /**\n     * @private\n     * @type {import(\"../../TileRange.js\").default}\n     */\n    this.renderedTileRange_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedFramebufferExtent_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {import(\"../../size.js\").Size}\n     */\n    this.tmpSize_ = [0, 0];\n\n  }\n\n  if ( WebGLLayerRenderer ) WebGLTileLayerRenderer.__proto__ = WebGLLayerRenderer;\n  WebGLTileLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n  WebGLTileLayerRenderer.prototype.constructor = WebGLTileLayerRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTileLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n    var context = this.mapRenderer.getContext();\n    context.deleteBuffer(this.renderArrayBuffer_);\n    WebGLLayerRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTileLayerRenderer.prototype.createLoadedTileFinder = function createLoadedTileFinder (source, projection, tiles) {\n    var mapRenderer = this.mapRenderer;\n\n    return (\n      /**\n       * @param {number} zoom Zoom level.\n       * @param {import(\"../../TileRange.js\").default} tileRange Tile range.\n       * @return {boolean} The tile range is fully loaded.\n       */\n      function(zoom, tileRange) {\n        function callback(tile) {\n          var loaded = mapRenderer.isTileTextureLoaded(tile);\n          if (loaded) {\n            if (!tiles[zoom]) {\n              tiles[zoom] = {};\n            }\n            tiles[zoom][tile.tileCoord.toString()] = tile;\n          }\n          return loaded;\n        }\n        return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n      }\n    );\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTileLayerRenderer.prototype.handleWebGLContextLost = function handleWebGLContextLost () {\n    WebGLLayerRenderer.prototype.handleWebGLContextLost.call(this);\n    this.locations_ = null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTileLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n\n    var mapRenderer = this.mapRenderer;\n    var gl = context.getGL();\n\n    var viewState = frameState.viewState;\n    var projection = viewState.projection;\n\n    var tileLayer = /** @type {import(\"../../layer/Tile.js\").default} */ (this.getLayer());\n    var tileSource = tileLayer.getSource();\n    if (!(tileSource instanceof TileSource)) {\n      return true;\n    }\n\n    var tileGrid = tileSource.getTileGridForProjection(projection);\n    var z = tileGrid.getZForResolution(viewState.resolution);\n    var tileResolution = tileGrid.getResolution(z);\n\n    var tilePixelSize =\n        tileSource.getTilePixelSize(z, frameState.pixelRatio, projection);\n    var pixelRatio = tilePixelSize[0] /\n        toSize(tileGrid.getTileSize(z), this.tmpSize_)[0];\n    var tilePixelResolution = tileResolution / pixelRatio;\n    var tileGutter = tileSource.getTilePixelRatio(pixelRatio) * tileSource.getGutterForProjection(projection);\n\n    var center = viewState.center;\n    var extent = frameState.extent;\n    var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n\n    var framebufferExtent;\n    if (this.renderedTileRange_ &&\n        this.renderedTileRange_.equals(tileRange) &&\n        this.renderedRevision_ == tileSource.getRevision()) {\n      framebufferExtent = this.renderedFramebufferExtent_;\n    } else {\n\n      var tileRangeSize = tileRange.getSize();\n\n      var maxDimension = Math.max(\n        tileRangeSize[0] * tilePixelSize[0],\n        tileRangeSize[1] * tilePixelSize[1]);\n      var framebufferDimension = roundUpToPowerOfTwo(maxDimension);\n      var framebufferExtentDimension = tilePixelResolution * framebufferDimension;\n      var origin = tileGrid.getOrigin(z);\n      var minX = origin[0] +\n          tileRange.minX * tilePixelSize[0] * tilePixelResolution;\n      var minY = origin[1] +\n          tileRange.minY * tilePixelSize[1] * tilePixelResolution;\n      framebufferExtent = [\n        minX, minY,\n        minX + framebufferExtentDimension, minY + framebufferExtentDimension\n      ];\n\n      this.bindFramebuffer(frameState, framebufferDimension);\n      gl.viewport(0, 0, framebufferDimension, framebufferDimension);\n\n      gl.clearColor(0, 0, 0, 0);\n      gl.clear(COLOR_BUFFER_BIT);\n      gl.disable(BLEND);\n\n      var program = context.getProgram(this.fragmentShader_, this.vertexShader_);\n      context.useProgram(program);\n      if (!this.locations_) {\n        this.locations_ = new Locations(gl, program);\n      }\n\n      context.bindBuffer(ARRAY_BUFFER, this.renderArrayBuffer_);\n      gl.enableVertexAttribArray(this.locations_.a_position);\n      gl.vertexAttribPointer(\n        this.locations_.a_position, 2, FLOAT, false, 16, 0);\n      gl.enableVertexAttribArray(this.locations_.a_texCoord);\n      gl.vertexAttribPointer(\n        this.locations_.a_texCoord, 2, FLOAT, false, 16, 8);\n      gl.uniform1i(this.locations_.u_texture, 0);\n\n      /**\n       * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n       */\n      var tilesToDrawByZ = {};\n      tilesToDrawByZ[z] = {};\n\n      var findLoadedTiles = this.createLoadedTileFinder(\n        tileSource, projection, tilesToDrawByZ);\n\n      var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n      var allTilesLoaded = true;\n      var tmpExtent = createEmpty();\n      var tmpTileRange = new TileRange(0, 0, 0, 0);\n      var childTileRange, drawable, fullyLoaded, tile, tileState;\n      var x, y, tileExtent;\n      for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n        for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n\n          tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n          if (layerState.extent !== undefined) {\n            // ignore tiles outside layer extent\n            tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);\n            if (!intersects(tileExtent, layerState.extent)) {\n              continue;\n            }\n          }\n          tileState = tile.getState();\n          drawable = tileState == TileState.LOADED ||\n              tileState == TileState.EMPTY ||\n              tileState == TileState.ERROR && !useInterimTilesOnError;\n          if (!drawable) {\n            tile = tile.getInterimTile();\n          }\n          tileState = tile.getState();\n          if (tileState == TileState.LOADED) {\n            if (mapRenderer.isTileTextureLoaded(tile)) {\n              tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n              continue;\n            }\n          } else if (tileState == TileState.EMPTY ||\n                     (tileState == TileState.ERROR &&\n                      !useInterimTilesOnError)) {\n            continue;\n          }\n\n          allTilesLoaded = false;\n          fullyLoaded = tileGrid.forEachTileCoordParentTileRange(\n            tile.tileCoord, findLoadedTiles, null, tmpTileRange, tmpExtent);\n          if (!fullyLoaded) {\n            childTileRange = tileGrid.getTileCoordChildTileRange(\n              tile.tileCoord, tmpTileRange, tmpExtent);\n            if (childTileRange) {\n              findLoadedTiles(z + 1, childTileRange);\n            }\n          }\n\n        }\n\n      }\n\n      /** @type {Array<number>} */\n      var zs = Object.keys(tilesToDrawByZ).map(Number);\n      zs.sort(numberSafeCompareFunction);\n      var u_tileOffset = new Float32Array(4);\n      for (var i = 0, ii = zs.length; i < ii; ++i) {\n        var tilesToDraw = tilesToDrawByZ[zs[i]];\n        for (var tileKey in tilesToDraw) {\n          tile = tilesToDraw[tileKey];\n\n          if (!(tile instanceof ImageTile)) {\n            continue;\n          }\n\n          tileExtent = tileGrid.getTileCoordExtent(tile.tileCoord, tmpExtent);\n          u_tileOffset[0] = 2 * (tileExtent[2] - tileExtent[0]) /\n              framebufferExtentDimension;\n          u_tileOffset[1] = 2 * (tileExtent[3] - tileExtent[1]) /\n              framebufferExtentDimension;\n          u_tileOffset[2] = 2 * (tileExtent[0] - framebufferExtent[0]) /\n              framebufferExtentDimension - 1;\n          u_tileOffset[3] = 2 * (tileExtent[1] - framebufferExtent[1]) /\n              framebufferExtentDimension - 1;\n          gl.uniform4fv(this.locations_.u_tileOffset, u_tileOffset);\n          mapRenderer.bindTileTexture(tile, tilePixelSize,\n            tileGutter * pixelRatio, LINEAR, LINEAR);\n          gl.drawArrays(TRIANGLE_STRIP, 0, 4);\n        }\n      }\n\n      if (allTilesLoaded) {\n        this.renderedTileRange_ = tileRange;\n        this.renderedFramebufferExtent_ = framebufferExtent;\n        this.renderedRevision_ = tileSource.getRevision();\n      } else {\n        this.renderedTileRange_ = null;\n        this.renderedFramebufferExtent_ = null;\n        this.renderedRevision_ = -1;\n        frameState.animate = true;\n      }\n\n    }\n\n    this.updateUsedTiles(frameState.usedTiles, tileSource, z, tileRange);\n    var tileTextureQueue = mapRenderer.getTileTextureQueue();\n    this.manageTilePyramid(\n      frameState, tileSource, tileGrid, pixelRatio, projection, extent, z,\n      tileLayer.getPreload(),\n      /**\n       * @param {import(\"../../Tile.js\").default} tile Tile.\n       */\n      function(tile) {\n        if (tile.getState() == TileState.LOADED &&\n              !mapRenderer.isTileTextureLoaded(tile) &&\n              !tileTextureQueue.isKeyQueued(tile.getKey())) {\n          tileTextureQueue.enqueue([\n            tile,\n            tileGrid.getTileCoordCenter(tile.tileCoord),\n            tileGrid.getResolution(tile.tileCoord[0]),\n            tilePixelSize, tileGutter * pixelRatio\n          ]);\n        }\n      }, this);\n    this.scheduleExpireCache(frameState, tileSource);\n\n    var texCoordMatrix = this.texCoordMatrix;\n    resetTransform(texCoordMatrix);\n    translateTransform(texCoordMatrix,\n      (Math.round(center[0] / tileResolution) * tileResolution - framebufferExtent[0]) /\n            (framebufferExtent[2] - framebufferExtent[0]),\n      (Math.round(center[1] / tileResolution) * tileResolution - framebufferExtent[1]) /\n            (framebufferExtent[3] - framebufferExtent[1]));\n    if (viewState.rotation !== 0) {\n      rotateTransform(texCoordMatrix, viewState.rotation);\n    }\n    scaleTransform(texCoordMatrix,\n      frameState.size[0] * viewState.resolution /\n            (framebufferExtent[2] - framebufferExtent[0]),\n      frameState.size[1] * viewState.resolution /\n            (framebufferExtent[3] - framebufferExtent[1]));\n    translateTransform(texCoordMatrix, -0.5, -0.5);\n\n    return true;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLTileLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n    if (!this.framebuffer) {\n      return undefined;\n    }\n\n    var pixelOnMapScaled = [\n      pixel[0] / frameState.size[0],\n      (frameState.size[1] - pixel[1]) / frameState.size[1]];\n\n    var pixelOnFrameBufferScaled = applyTransform(\n      this.texCoordMatrix, pixelOnMapScaled.slice());\n    var pixelOnFrameBuffer = [\n      pixelOnFrameBufferScaled[0] * this.framebufferDimension,\n      pixelOnFrameBufferScaled[1] * this.framebufferDimension];\n\n    var gl = this.mapRenderer.getContext().getGL();\n    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer);\n    var imageData = new Uint8Array(4);\n    gl.readPixels(pixelOnFrameBuffer[0], pixelOnFrameBuffer[1], 1, 1,\n      gl.RGBA, gl.UNSIGNED_BYTE, imageData);\n\n    if (imageData[3] > 0) {\n      return callback.call(thisArg, this.getLayer(), imageData);\n    } else {\n      return undefined;\n    }\n  };\n\n  return WebGLTileLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLTileLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.TILE;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLTileLayerRenderer} The layer renderer.\n */\nWebGLTileLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new WebGLTileLayerRenderer(\n    /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n    /** @type {import(\"../../layer/Tile.js\").default} */ (layer)\n  );\n};\n\n\nexport default WebGLTileLayerRenderer;\n\n//# sourceMappingURL=TileLayer.js.map","/**\n * @module ol/renderer/webgl/VectorLayer\n */\nimport {getUid} from '../../util.js';\nimport LayerType from '../../LayerType.js';\nimport ViewHint from '../../ViewHint.js';\nimport {buffer, containsExtent, createEmpty} from '../../extent.js';\nimport WebGLReplayGroup from '../../render/webgl/ReplayGroup.js';\nimport {defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature} from '../vector.js';\nimport WebGLLayerRenderer from './Layer.js';\nimport {apply as applyTransform} from '../../transform.js';\n\n\n/**\n * @classdesc\n * WebGL renderer for vector layers.\n * @api\n */\nvar WebGLVectorLayerRenderer = /*@__PURE__*/(function (WebGLLayerRenderer) {\n  function WebGLVectorLayerRenderer(mapRenderer, vectorLayer) {\n\n    WebGLLayerRenderer.call(this, mapRenderer, vectorLayer);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.dirty_ = false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedResolution_ = NaN;\n\n    /**\n     * @private\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.renderedExtent_ = createEmpty();\n\n    /**\n     * @private\n     * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n     */\n    this.renderedRenderOrder_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../../render/webgl/ReplayGroup.js\").default}\n     */\n    this.replayGroup_ = null;\n\n    /**\n     * The last layer state.\n     * @private\n     * @type {?import(\"../../layer/Layer.js\").State}\n     */\n    this.layerState_ = null;\n\n  }\n\n  if ( WebGLLayerRenderer ) WebGLVectorLayerRenderer.__proto__ = WebGLLayerRenderer;\n  WebGLVectorLayerRenderer.prototype = Object.create( WebGLLayerRenderer && WebGLLayerRenderer.prototype );\n  WebGLVectorLayerRenderer.prototype.constructor = WebGLVectorLayerRenderer;\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.composeFrame = function composeFrame (frameState, layerState, context) {\n    this.layerState_ = layerState;\n    var viewState = frameState.viewState;\n    var replayGroup = this.replayGroup_;\n    var size = frameState.size;\n    var pixelRatio = frameState.pixelRatio;\n    var gl = this.mapRenderer.getGL();\n    if (replayGroup && !replayGroup.isEmpty()) {\n      gl.enable(gl.SCISSOR_TEST);\n      gl.scissor(0, 0, size[0] * pixelRatio, size[1] * pixelRatio);\n      replayGroup.replay(context,\n        viewState.center, viewState.resolution, viewState.rotation,\n        size, pixelRatio, layerState.opacity,\n        layerState.managed ? frameState.skippedFeatureUids : {});\n      gl.disable(gl.SCISSOR_TEST);\n    }\n\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.disposeInternal = function disposeInternal () {\n    var replayGroup = this.replayGroup_;\n    if (replayGroup) {\n      var context = this.mapRenderer.getContext();\n      replayGroup.getDeleteResourcesFunction(context)();\n      this.replayGroup_ = null;\n    }\n    WebGLLayerRenderer.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function forEachFeatureAtCoordinate (coordinate, frameState, hitTolerance, callback, thisArg) {\n    if (!this.replayGroup_ || !this.layerState_) {\n      return undefined;\n    } else {\n      var context = this.mapRenderer.getContext();\n      var viewState = frameState.viewState;\n      var layer = this.getLayer();\n      var layerState = this.layerState_;\n      /** @type {!Object<string, boolean>} */\n      var features = {};\n      return this.replayGroup_.forEachFeatureAtCoordinate(coordinate,\n        context, viewState.center, viewState.resolution, viewState.rotation,\n        frameState.size, frameState.pixelRatio, layerState.opacity,\n        {},\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @return {?} Callback result.\n         */\n        function(feature) {\n          var key = getUid(feature);\n          if (!(key in features)) {\n            features[key] = true;\n            return callback.call(thisArg, feature, layer);\n          }\n        });\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.hasFeatureAtCoordinate = function hasFeatureAtCoordinate (coordinate, frameState) {\n    if (!this.replayGroup_ || !this.layerState_) {\n      return false;\n    } else {\n      var context = this.mapRenderer.getContext();\n      var viewState = frameState.viewState;\n      var layerState = this.layerState_;\n      return this.replayGroup_.hasFeatureAtCoordinate(coordinate,\n        context, viewState.center, viewState.resolution, viewState.rotation,\n        frameState.size, frameState.pixelRatio, layerState.opacity,\n        frameState.skippedFeatureUids);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.forEachLayerAtPixel = function forEachLayerAtPixel (pixel, frameState, callback, thisArg) {\n    var coordinate = applyTransform(\n      frameState.pixelToCoordinateTransform, pixel.slice());\n    var hasFeature = this.hasFeatureAtCoordinate(coordinate, frameState);\n\n    if (hasFeature) {\n      return callback.call(thisArg, this.getLayer(), null);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * Handle changes in image style state.\n   * @param {import(\"../../events/Event.js\").default} event Image style change event.\n   * @private\n   */\n  WebGLVectorLayerRenderer.prototype.handleStyleImageChange_ = function handleStyleImageChange_ (event) {\n    this.renderIfReadyAndVisible();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WebGLVectorLayerRenderer.prototype.prepareFrame = function prepareFrame (frameState, layerState, context) {\n    var vectorLayer = /** @type {import(\"../../layer/Vector.js\").default} */ (this.getLayer());\n    var vectorSource = /** @type {import(\"../../source/Vector.js\").default} */ (vectorLayer.getSource());\n\n    var animating = frameState.viewHints[ViewHint.ANIMATING];\n    var interacting = frameState.viewHints[ViewHint.INTERACTING];\n    var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n    var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n    if (!this.dirty_ && (!updateWhileAnimating && animating) ||\n        (!updateWhileInteracting && interacting)) {\n      return true;\n    }\n\n    var frameStateExtent = frameState.extent;\n    var viewState = frameState.viewState;\n    var projection = viewState.projection;\n    var resolution = viewState.resolution;\n    var pixelRatio = frameState.pixelRatio;\n    var vectorLayerRevision = vectorLayer.getRevision();\n    var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n    var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n    if (vectorLayerRenderOrder === undefined) {\n      vectorLayerRenderOrder = defaultRenderOrder;\n    }\n\n    var extent = buffer(frameStateExtent,\n      vectorLayerRenderBuffer * resolution);\n\n    if (!this.dirty_ &&\n        this.renderedResolution_ == resolution &&\n        this.renderedRevision_ == vectorLayerRevision &&\n        this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n        containsExtent(this.renderedExtent_, extent)) {\n      return true;\n    }\n\n    if (this.replayGroup_) {\n      frameState.postRenderFunctions.push(\n        this.replayGroup_.getDeleteResourcesFunction(context));\n    }\n\n    this.dirty_ = false;\n\n    var replayGroup = new WebGLReplayGroup(\n      getRenderTolerance(resolution, pixelRatio),\n      extent, vectorLayer.getRenderBuffer());\n    vectorSource.loadFeatures(extent, resolution, projection);\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @this {WebGLVectorLayerRenderer}\n     */\n    var render = function(feature) {\n      var styles;\n      var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n      if (styleFunction) {\n        styles = styleFunction(feature, resolution);\n      }\n      if (styles) {\n        var dirty = this.renderFeature(\n          feature, resolution, pixelRatio, styles, replayGroup);\n        this.dirty_ = this.dirty_ || dirty;\n      }\n    }.bind(this);\n    if (vectorLayerRenderOrder) {\n      /** @type {Array<import(\"../../Feature.js\").default>} */\n      var features = [];\n      vectorSource.forEachFeatureInExtent(extent,\n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         */\n        function(feature) {\n          features.push(feature);\n        });\n      features.sort(vectorLayerRenderOrder);\n      features.forEach(render.bind(this));\n    } else {\n      vectorSource.forEachFeatureInExtent(extent, render);\n    }\n    replayGroup.finish(context);\n\n    this.renderedResolution_ = resolution;\n    this.renderedRevision_ = vectorLayerRevision;\n    this.renderedRenderOrder_ = vectorLayerRenderOrder;\n    this.renderedExtent_ = extent;\n    this.replayGroup_ = replayGroup;\n\n    return true;\n  };\n\n  /**\n   * @param {import(\"../../Feature.js\").default} feature Feature.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of\n   *     styles.\n   * @param {import(\"../../render/webgl/ReplayGroup.js\").default} replayGroup Replay group.\n   * @return {boolean} `true` if an image is loading.\n   */\n  WebGLVectorLayerRenderer.prototype.renderFeature = function renderFeature$1 (feature, resolution, pixelRatio, styles, replayGroup) {\n    if (!styles) {\n      return false;\n    }\n    var loading = false;\n    if (Array.isArray(styles)) {\n      for (var i = styles.length - 1, ii = 0; i >= ii; --i) {\n        loading = renderFeature(\n          replayGroup, feature, styles[i],\n          getSquaredRenderTolerance(resolution, pixelRatio),\n          this.handleStyleImageChange_, this) || loading;\n      }\n    } else {\n      loading = renderFeature(\n        replayGroup, feature, styles,\n        getSquaredRenderTolerance(resolution, pixelRatio),\n        this.handleStyleImageChange_, this) || loading;\n    }\n    return loading;\n  };\n\n  return WebGLVectorLayerRenderer;\n}(WebGLLayerRenderer));\n\n\n/**\n * Determine if this renderer handles the provided layer.\n * @param {import(\"../../layer/Layer.js\").default} layer The candidate layer.\n * @return {boolean} The renderer can render the layer.\n */\nWebGLVectorLayerRenderer['handles'] = function(layer) {\n  return layer.getType() === LayerType.VECTOR;\n};\n\n\n/**\n * Create a layer renderer.\n * @param {import(\"../Map.js\").default} mapRenderer The map renderer.\n * @param {import(\"../../layer/Layer.js\").default} layer The layer to be rendererd.\n * @return {WebGLVectorLayerRenderer} The layer renderer.\n */\nWebGLVectorLayerRenderer['create'] = function(mapRenderer, layer) {\n  return new WebGLVectorLayerRenderer(\n    /** @type {import(\"./Map.js\").default} */ (mapRenderer),\n    /** @type {import(\"../../layer/Vector.js\").default} */ (layer)\n  );\n};\n\n\nexport default WebGLVectorLayerRenderer;\n\n//# sourceMappingURL=VectorLayer.js.map","/**\n * @module ol/WebGLMap\n */\nimport PluggableMap from './PluggableMap.js';\nimport {defaults as defaultControls} from './control.js';\nimport {defaults as defaultInteractions} from './interaction.js';\nimport {assign} from './obj.js';\nimport WebGLImageLayerRenderer from './renderer/webgl/ImageLayer.js';\nimport WebGLMapRenderer from './renderer/webgl/Map.js';\nimport WebGLTileLayerRenderer from './renderer/webgl/TileLayer.js';\nimport WebGLVectorLayerRenderer from './renderer/webgl/VectorLayer.js';\n\n\n/**\n * @classdesc\n * The WebGLMap uses WebGL for rendering map layers.  This renderer has limited\n * support for vector data and no support for vector tiles.\n *\n *     import WebGLMap from 'ol/WebGLMap';\n *     import TileLayer from 'ol/layer/Tile';\n *     import OSM from 'ol/source/OSM';\n *     import View from 'ol/View';\n *\n *     var map = new WebGLMap({\n *       view: new View({\n *         center: [0, 0],\n *         zoom: 1\n *       }),\n *       layers: [\n *         new TileLayer({\n *           source: new OSM()\n *         })\n *       ],\n *       target: 'map'\n *     });\n *\n * The above snippet creates a map using a {@link module:ol/layer/Tile~Tile} to\n * display {@link module:ol/source/OSM~OSM} OSM data and render it to a DOM\n * element with the id `map`.\n *\n * The constructor places a viewport container (with CSS class name\n * `ol-viewport`) in the target element (see `getViewport()`), and then two\n * further elements within the viewport: one with CSS class name\n * `ol-overlaycontainer-stopevent` for controls and some overlays, and one with\n * CSS class name `ol-overlaycontainer` for other overlays (see the `stopEvent`\n * option of {@link module:ol/Overlay~Overlay} for the difference). The map\n * itself is placed in a further element within the viewport.\n *\n * Layers are stored as a {@link module:ol/Collection~Collection} in\n * layerGroups. A top-level group is provided by the library. This is what is\n * accessed by `getLayerGroup` and `setLayerGroup`. Layers entered in the\n * options are added to this group, and `addLayer` and `removeLayer` change the\n * layer collection in the group. `getLayers` is a convenience function for\n * `getLayerGroup().getLayers()`.\n * Note that {@link module:ol/layer/Group~Group} is a subclass of\n * {@link module:ol/layer/Base}, so layers entered in the options or added\n * with `addLayer` can be groups, which can contain further groups, and so on.\n *\n * @fires import(\"./MapBrowserEvent.js\").MapBrowserEvent\n * @fires import(\"./MapEvent.js\").MapEvent\n * @fires module:ol/render/Event~RenderEvent#postcompose\n * @fires module:ol/render/Event~RenderEvent#precompose\n * @api\n */\nvar WebGLMap = /*@__PURE__*/(function (PluggableMap) {\n  function WebGLMap(options) {\n    options = assign({}, options);\n    if (!options.controls) {\n      options.controls = defaultControls();\n    }\n    if (!options.interactions) {\n      options.interactions = defaultInteractions();\n    }\n\n    PluggableMap.call(this, options);\n  }\n\n  if ( PluggableMap ) WebGLMap.__proto__ = PluggableMap;\n  WebGLMap.prototype = Object.create( PluggableMap && PluggableMap.prototype );\n  WebGLMap.prototype.constructor = WebGLMap;\n\n  WebGLMap.prototype.createRenderer = function createRenderer () {\n    var renderer = new WebGLMapRenderer(this);\n    renderer.registerLayerRenderers([\n      WebGLImageLayerRenderer,\n      WebGLTileLayerRenderer,\n      WebGLVectorLayerRenderer\n    ]);\n    return renderer;\n  };\n\n  return WebGLMap;\n}(PluggableMap));\n\n\nexport default WebGLMap;\n\n//# sourceMappingURL=WebGLMap.js.map","/**\n * @module ol/format/FormatType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  ARRAY_BUFFER: 'arraybuffer',\n  JSON: 'json',\n  TEXT: 'text',\n  XML: 'xml'\n};\n\n//# sourceMappingURL=FormatType.js.map","/**\n * @module ol/featureloader\n */\nimport {VOID} from './functions.js';\nimport FormatType from './format/FormatType.js';\n\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * load features.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area to be loaded,\n * a `{number}` representing the resolution (map units per pixel) and an\n * {@link module:ol/proj/Projection} for the projection  as\n * arguments. `this` within the function is bound to the\n * {@link module:ol/source/Vector} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n * @typedef {function(this:(import(\"./source/Vector\").default|import(\"./VectorTile.js\").default), import(\"./extent.js\").Extent, number,\n *                    import(\"./proj/Projection.js\").default)} FeatureLoader\n * @api\n */\n\n\n/**\n * {@link module:ol/source/Vector} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection} for the projection  as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n\n/**\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @param {function(this:import(\"./VectorTile.js\").default, Array<import(\"./Feature.js\").default>, import(\"./proj/Projection.js\").default, import(\"./extent.js\").Extent)|function(this:import(\"./source/Vector\").default, Array<import(\"./Feature.js\").default>)} success\n *     Function called with the loaded features and optionally with the data\n *     projection. Called with the vector tile or source as `this`.\n * @param {function(this:import(\"./VectorTile.js\").default)|function(this:import(\"./source/Vector\").default)} failure\n *     Function called when loading failed. Called with the vector tile or\n *     source as `this`.\n * @return {FeatureLoader} The feature loader.\n */\nexport function loadFeaturesXhr(url, format, success, failure) {\n  return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n     */\n    function(extent, resolution, projection) {\n      var xhr = new XMLHttpRequest();\n      xhr.open('GET',\n        typeof url === 'function' ? url(extent, resolution, projection) : url,\n        true);\n      if (format.getType() == FormatType.ARRAY_BUFFER) {\n        xhr.responseType = 'arraybuffer';\n      }\n      /**\n       * @param {Event} event Event.\n       * @private\n       */\n      xhr.onload = function(event) {\n        // status will be 0 for file:// urls\n        if (!xhr.status || xhr.status >= 200 && xhr.status < 300) {\n          var type = format.getType();\n          /** @type {Document|Node|Object|string|undefined} */\n          var source;\n          if (type == FormatType.JSON || type == FormatType.TEXT) {\n            source = xhr.responseText;\n          } else if (type == FormatType.XML) {\n            source = xhr.responseXML;\n            if (!source) {\n              source = new DOMParser().parseFromString(xhr.responseText, 'application/xml');\n            }\n          } else if (type == FormatType.ARRAY_BUFFER) {\n            source = /** @type {ArrayBuffer} */ (xhr.response);\n          }\n          if (source) {\n            success.call(this, format.readFeatures(source,\n              {featureProjection: projection}),\n            format.readProjection(source), format.getLastExtent());\n          } else {\n            failure.call(this);\n          }\n        } else {\n          failure.call(this);\n        }\n      }.bind(this);\n      /**\n       * @private\n       */\n      xhr.onerror = function() {\n        failure.call(this);\n      }.bind(this);\n      xhr.send();\n    }\n  );\n}\n\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default} format Feature format.\n * @return {FeatureLoader} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n  return loadFeaturesXhr(url, format,\n    /**\n     * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n     * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n     * projection.\n     * @this {import(\"./source/Vector\").default|import(\"./VectorTile.js\").default}\n     */\n    function(features, dataProjection) {\n      var sourceOrTile = /** @type {?} */ (this);\n      if (typeof sourceOrTile.addFeatures === 'function') {\n        /** @type {import(\"./source/Vector\").default} */ (sourceOrTile).addFeatures(features);\n      }\n    }, /* FIXME handle error */ VOID);\n}\n\n//# sourceMappingURL=featureloader.js.map","/**\n * @module ol/loadingstrategy\n */\n\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n  return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n  return [extent];\n}\n\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n  return (\n    /**\n     * @param {import(\"./extent.js\").Extent} extent Extent.\n     * @param {number} resolution Resolution.\n     * @return {Array<import(\"./extent.js\").Extent>} Extents.\n     */\n    function(extent, resolution) {\n      var z = tileGrid.getZForResolution(resolution);\n      var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n      /** @type {Array<import(\"./extent.js\").Extent>} */\n      var extents = [];\n      /** @type {import(\"./tilecoord.js\").TileCoord} */\n      var tileCoord = [z, 0, 0];\n      for (tileCoord[1] = tileRange.minX; tileCoord[1] <= tileRange.maxX; ++tileCoord[1]) {\n        for (tileCoord[2] = tileRange.minY; tileCoord[2] <= tileRange.maxY; ++tileCoord[2]) {\n          extents.push(tileGrid.getTileCoordExtent(tileCoord));\n        }\n      }\n      return extents;\n    }\n  );\n}\n\n//# sourceMappingURL=loadingstrategy.js.map","/**\n * @module ol/xml\n */\nimport {extend} from './array.js';\n\n\n/**\n * When using {@link module:ol/xml~makeChildAppender} or\n * {@link module:ol/xml~makeSimpleNodeFactory}, the top `objectStack` item needs\n * to have this structure.\n * @typedef {Object} NodeStackItem\n * @property {Node} node\n */\n\n\n/**\n * @typedef {function(Element, Array<*>)} Parser\n */\n\n\n/**\n * @typedef {function(Element, *, Array<*>)} Serializer\n */\n\n\n/**\n * This document should be used when creating nodes for XML serializations. This\n * document is also used by {@link module:ol/xml~createElementNS}\n * @const\n * @type {Document}\n */\nexport var DOCUMENT = document.implementation.createDocument('', '', null);\n\n\n/**\n * @type {string}\n */\nexport var XML_SCHEMA_INSTANCE_URI = 'http://www.w3.org/2001/XMLSchema-instance';\n\n\n/**\n * @param {string} namespaceURI Namespace URI.\n * @param {string} qualifiedName Qualified name.\n * @return {Element} Node.\n */\nexport function createElementNS(namespaceURI, qualifiedName) {\n  return DOCUMENT.createElementNS(namespaceURI, qualifiedName);\n}\n\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @return {string} All text content.\n * @api\n */\nexport function getAllTextContent(node, normalizeWhitespace) {\n  return getAllTextContent_(node, normalizeWhitespace, []).join('');\n}\n\n\n/**\n * Recursively grab all text content of child nodes into a single string.\n * @param {Node} node Node.\n * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line\n * breaks.\n * @param {Array<string>} accumulator Accumulator.\n * @private\n * @return {Array<string>} Accumulator.\n */\nexport function getAllTextContent_(node, normalizeWhitespace, accumulator) {\n  if (node.nodeType == Node.CDATA_SECTION_NODE ||\n      node.nodeType == Node.TEXT_NODE) {\n    if (normalizeWhitespace) {\n      accumulator.push(String(node.nodeValue).replace(/(\\r\\n|\\r|\\n)/g, ''));\n    } else {\n      accumulator.push(node.nodeValue);\n    }\n  } else {\n    var n;\n    for (n = node.firstChild; n; n = n.nextSibling) {\n      getAllTextContent_(n, normalizeWhitespace, accumulator);\n    }\n  }\n  return accumulator;\n}\n\n\n/**\n * @param {Object} object Object.\n * @return {boolean} Is a document.\n */\nexport function isDocument(object) {\n  return 'documentElement' in object;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {?string} namespaceURI Namespace URI.\n * @param {string} name Attribute name.\n * @return {string} Value\n */\nexport function getAttributeNS(node, namespaceURI, name) {\n  return node.getAttributeNS(namespaceURI, name) || '';\n}\n\n\n/**\n * Parse an XML string to an XML Document.\n * @param {string} xml XML.\n * @return {Document} Document.\n * @api\n */\nexport function parse(xml) {\n  return new DOMParser().parseFromString(xml, 'application/xml');\n}\n\n\n/**\n * Make an array extender function for extending the array at the top of the\n * object stack.\n * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayExtender(valueReader, opt_this) {\n  return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function(node, objectStack) {\n      var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n      if (value !== undefined) {\n        var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n        extend(array, value);\n      }\n    }\n  );\n}\n\n\n/**\n * Make an array pusher function for pushing to the array at the top of the\n * object stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeArrayPusher(valueReader, opt_this) {\n  return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function(node, objectStack) {\n      var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n      if (value !== undefined) {\n        var array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]);\n        array.push(value);\n      }\n    });\n}\n\n\n/**\n * Make an object stack replacer function for replacing the object at the\n * top of the stack.\n * @param {function(this: T, Node, Array<*>): *} valueReader Value reader.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeReplacer(valueReader, opt_this) {\n  return (\n    /**\n     * @param {Node} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function(node, objectStack) {\n      var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n      if (value !== undefined) {\n        objectStack[objectStack.length - 1] = value;\n      }\n    });\n}\n\n\n/**\n * Make an object property pusher function for adding a property to the\n * object at the top of the stack.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertyPusher(valueReader, opt_property, opt_this) {\n  return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function(node, objectStack) {\n      var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n      if (value !== undefined) {\n        var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var property = opt_property !== undefined ? opt_property : node.localName;\n        var array;\n        if (property in object) {\n          array = object[property];\n        } else {\n          array = object[property] = [];\n        }\n        array.push(value);\n      }\n    });\n}\n\n\n/**\n * Make an object property setter function.\n * @param {function(this: T, Element, Array<*>): *} valueReader Value reader.\n * @param {string=} opt_property Property.\n * @param {T=} opt_this The object to use as `this` in `valueReader`.\n * @return {Parser} Parser.\n * @template T\n */\nexport function makeObjectPropertySetter(valueReader, opt_property, opt_this) {\n  return (\n    /**\n     * @param {Element} node Node.\n     * @param {Array<*>} objectStack Object stack.\n     */\n    function(node, objectStack) {\n      var value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack);\n      if (value !== undefined) {\n        var object = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n        var property = opt_property !== undefined ? opt_property : node.localName;\n        object[property] = value;\n      }\n    });\n}\n\n\n/**\n * Create a serializer that appends nodes written by its `nodeWriter` to its\n * designated parent. The parent is the `node` of the\n * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`.\n * @param {function(this: T, Node, V, Array<*>)} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeChildAppender(nodeWriter, opt_this) {\n  return function(node, value, objectStack) {\n    nodeWriter.call(opt_this !== undefined ? opt_this : this, node, value, objectStack);\n    var parent = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n    var parentNode = parent.node;\n    parentNode.appendChild(node);\n  };\n}\n\n\n/**\n * Create a serializer that calls the provided `nodeWriter` from\n * {@link module:ol/xml~serialize}. This can be used by the parent writer to have the\n * 'nodeWriter' called with an array of values when the `nodeWriter` was\n * designed to serialize a single item. An example would be a LineString\n * geometry writer, which could be reused for writing MultiLineString\n * geometries.\n * @param {function(this: T, Element, V, Array<*>)} nodeWriter Node writer.\n * @param {T=} opt_this The object to use as `this` in `nodeWriter`.\n * @return {Serializer} Serializer.\n * @template T, V\n */\nexport function makeArraySerializer(nodeWriter, opt_this) {\n  var serializersNS, nodeFactory;\n  return function(node, value, objectStack) {\n    if (serializersNS === undefined) {\n      serializersNS = {};\n      var serializers = {};\n      serializers[node.localName] = nodeWriter;\n      serializersNS[node.namespaceURI] = serializers;\n      nodeFactory = makeSimpleNodeFactory(node.localName);\n    }\n    serialize(serializersNS, nodeFactory, value, objectStack);\n  };\n}\n\n\n/**\n * Create a node factory which can use the `opt_keys` passed to\n * {@link module:ol/xml~serialize} or {@link module:ol/xml~pushSerializeAndPop} as node names,\n * or a fixed node name. The namespace of the created nodes can either be fixed,\n * or the parent namespace will be used.\n * @param {string=} opt_nodeName Fixed node name which will be used for all\n *     created nodes. If not provided, the 3rd argument to the resulting node\n *     factory needs to be provided and will be the nodeName.\n * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for\n *     all created nodes. If not provided, the namespace of the parent node will\n *     be used.\n * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory.\n */\nexport function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) {\n  var fixedNodeName = opt_nodeName;\n  return (\n    /**\n     * @param {*} value Value.\n     * @param {Array<*>} objectStack Object stack.\n     * @param {string=} opt_nodeName Node name.\n     * @return {Node} Node.\n     */\n    function(value, objectStack, opt_nodeName) {\n      var context = /** @type {NodeStackItem} */ (objectStack[objectStack.length - 1]);\n      var node = context.node;\n      var nodeName = fixedNodeName;\n      if (nodeName === undefined) {\n        nodeName = opt_nodeName;\n      }\n\n      var namespaceURI = opt_namespaceURI !== undefined ? opt_namespaceURI : node.namespaceURI;\n      return createElementNS(namespaceURI, /** @type {string} */ (nodeName));\n    }\n  );\n}\n\n\n/**\n * A node factory that creates a node using the parent's `namespaceURI` and the\n * `nodeName` passed by {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop} to the node factory.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nexport var OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory();\n\n\n/**\n * Create an array of `values` to be used with {@link module:ol/xml~serialize} or\n * {@link module:ol/xml~pushSerializeAndPop}, where `orderedKeys` has to be provided as\n * `opt_key` argument.\n * @param {Object<string, V>} object Key-value pairs for the sequence. Keys can\n *     be a subset of the `orderedKeys`.\n * @param {Array<string>} orderedKeys Keys in the order of the sequence.\n * @return {Array<V>} Values in the order of the sequence. The resulting array\n *     has the same length as the `orderedKeys` array. Values that are not\n *     present in `object` will be `undefined` in the resulting array.\n * @template V\n */\nexport function makeSequence(object, orderedKeys) {\n  var length = orderedKeys.length;\n  var sequence = new Array(length);\n  for (var i = 0; i < length; ++i) {\n    sequence[i] = object[orderedKeys[i]];\n  }\n  return sequence;\n}\n\n\n/**\n * Create a namespaced structure, using the same values for each namespace.\n * This can be used as a starting point for versioned parsers, when only a few\n * values are version specific.\n * @param {Array<string>} namespaceURIs Namespace URIs.\n * @param {T} structure Structure.\n * @param {Object<string, T>=} opt_structureNS Namespaced structure to add to.\n * @return {Object<string, T>} Namespaced structure.\n * @template T\n */\nexport function makeStructureNS(namespaceURIs, structure, opt_structureNS) {\n  /**\n   * @type {Object<string, T>}\n   */\n  var structureNS = opt_structureNS !== undefined ? opt_structureNS : {};\n  var i, ii;\n  for (i = 0, ii = namespaceURIs.length; i < ii; ++i) {\n    structureNS[namespaceURIs[i]] = structure;\n  }\n  return structureNS;\n}\n\n\n/**\n * Parse a node using the parsers and object stack.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n */\nexport function parseNode(parsersNS, node, objectStack, opt_this) {\n  var n;\n  for (n = node.firstElementChild; n; n = n.nextElementSibling) {\n    var parsers = parsersNS[n.namespaceURI];\n    if (parsers !== undefined) {\n      var parser = parsers[n.localName];\n      if (parser !== undefined) {\n        parser.call(opt_this, n, objectStack);\n      }\n    }\n  }\n}\n\n\n/**\n * Push an object on top of the stack, parse and return the popped object.\n * @param {T} object Object.\n * @param {Object<string, Object<string, Parser>>} parsersNS\n *     Parsers by namespace.\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @param {*=} opt_this The object to use as `this`.\n * @return {T} Object.\n * @template T\n */\nexport function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) {\n  objectStack.push(object);\n  parseNode(parsersNS, node, objectStack, opt_this);\n  return /** @type {T} */ (objectStack.pop());\n}\n\n\n/**\n * Walk through an array of `values` and call a serializer for each value.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @template T\n */\nexport function serialize(\n  serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n  var length = (opt_keys !== undefined ? opt_keys : values).length;\n  var value, node;\n  for (var i = 0; i < length; ++i) {\n    value = values[i];\n    if (value !== undefined) {\n      node = nodeFactory.call(opt_this !== undefined ? opt_this : this, value, objectStack,\n        opt_keys !== undefined ? opt_keys[i] : undefined);\n      if (node !== undefined) {\n        serializersNS[node.namespaceURI][node.localName]\n          .call(opt_this, node, value, objectStack);\n      }\n    }\n  }\n}\n\n\n/**\n * @param {O} object Object.\n * @param {Object<string, Object<string, Serializer>>} serializersNS\n *     Namespaced serializers.\n * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory\n *     Node factory. The `nodeFactory` creates the node whose namespace and name\n *     will be used to choose a node writer from `serializersNS`. This\n *     separation allows us to decide what kind of node to create, depending on\n *     the value we want to serialize. An example for this would be different\n *     geometry writers based on the geometry type.\n * @param {Array<*>} values Values to serialize. An example would be an array\n *     of {@link module:ol/Feature~Feature} instances.\n * @param {Array<*>} objectStack Node stack.\n * @param {Array<string>=} opt_keys Keys of the `values`. Will be passed to the\n *     `nodeFactory`. This is used for serializing object literals where the\n *     node name relates to the property key. The array length of `opt_keys` has\n *     to match the length of `values`. For serializing a sequence, `opt_keys`\n *     determines the order of the sequence.\n * @param {T=} opt_this The object to use as `this` for the node factory and\n *     serializers.\n * @return {O|undefined} Object.\n * @template O, T\n */\nexport function pushSerializeAndPop(object, serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this) {\n  objectStack.push(object);\n  serialize(serializersNS, nodeFactory, values, objectStack, opt_keys, opt_this);\n  return /** @type {O|undefined} */ (objectStack.pop());\n}\n\n//# sourceMappingURL=xml.js.map","/**\n * @module ol/tilegrid/WMTS\n */\n\nimport {find} from '../array.js';\nimport {get as getProjection} from '../proj.js';\nimport TileGrid from './TileGrid.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the tile grid. No tiles\n * outside this extent will be requested by {@link module:ol/source/Tile} sources.\n * When no `origin` or `origins` are configured, the `origin` will be set to the\n * top-left corner of the extent.\n * @property {import(\"../coordinate.js\").Coordinate} [origin] The tile grid origin, i.e.\n * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left\n * to right and upwards. If not specified, `extent` or `origins` must be provided.\n * @property {Array<import(\"../coordinate.js\").Coordinate>} [origins] Tile grid origins,\n * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If\n * given, the array length should match the length of the `resolutions` array, i.e.\n * each resolution can have a different origin. Tile coordinates increase left to\n * right and upwards. If not specified, `extent` or `origin` must be provided.\n * @property {!Array<number>} resolutions Resolutions. The array index of each\n * resolution needs to match the zoom level. This means that even if a `minZoom`\n * is configured, the resolutions array will have a length of `maxZoom + 1`\n * @property {!Array<string>} matrixIds matrix IDs. The length of this array needs\n * to match the length of the `resolutions` array.\n * @property {Array<import(\"../size.js\").Size>} [sizes] Number of tile rows and columns\n * of the grid for each zoom level. The values here are the `TileMatrixWidth` and\n * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and\n * define the grid's extent together with the `origin`.\n * An `extent` can be configured in addition, and will further limit the extent for\n * which tile requests are made by sources. Note that when the top-left corner of\n * the `extent` is used as `origin` or `origins`, then the `y` value must be\n * negative because OpenLayers tile coordinates increase upwards.\n * @property {number|import(\"../size.js\").Size} [tileSize] Tile size.\n * @property {Array<import(\"../size.js\").Size>} [tileSizes] Tile sizes. The length of\n * this array needs to match the length of the `resolutions` array.\n * @property {Array<number>} [widths] Number of tile columns that cover the grid's\n * extent for each zoom level. Only required when used with a source that has `wrapX`\n * set to `true`, and only when the grid's origin differs from the one of the\n * projection's extent. The array length has to match the length of the `resolutions`\n * array, i.e. each resolution will have a matching entry here.\n */\n\n\n/**\n * @classdesc\n * Set the grid pattern for sources accessing WMTS tiled-image servers.\n * @api\n */\nvar WMTSTileGrid = /*@__PURE__*/(function (TileGrid) {\n  function WMTSTileGrid(options) {\n    TileGrid.call(this, {\n      extent: options.extent,\n      origin: options.origin,\n      origins: options.origins,\n      resolutions: options.resolutions,\n      tileSize: options.tileSize,\n      tileSizes: options.tileSizes,\n      sizes: options.sizes\n    });\n\n    /**\n     * @private\n     * @type {!Array<string>}\n     */\n    this.matrixIds_ = options.matrixIds;\n  }\n\n  if ( TileGrid ) WMTSTileGrid.__proto__ = TileGrid;\n  WMTSTileGrid.prototype = Object.create( TileGrid && TileGrid.prototype );\n  WMTSTileGrid.prototype.constructor = WMTSTileGrid;\n\n  /**\n   * @param {number} z Z.\n   * @return {string} MatrixId..\n   */\n  WMTSTileGrid.prototype.getMatrixId = function getMatrixId (z) {\n    return this.matrixIds_[z];\n  };\n\n  /**\n   * Get the list of matrix identifiers.\n   * @return {Array<string>} MatrixIds.\n   * @api\n   */\n  WMTSTileGrid.prototype.getMatrixIds = function getMatrixIds () {\n    return this.matrixIds_;\n  };\n\n  return WMTSTileGrid;\n}(TileGrid));\n\n\nexport default WMTSTileGrid;\n\n/**\n * Create a tile grid from a WMTS capabilities matrix set and an\n * optional TileMatrixSetLimits.\n * @param {Object} matrixSet An object representing a matrixSet in the\n *     capabilities document.\n * @param {import(\"../extent.js\").Extent=} opt_extent An optional extent to restrict the tile\n *     ranges the server provides.\n * @param {Array<Object>=} opt_matrixLimits An optional object representing\n *     the available matrices for tileGrid.\n * @return {WMTSTileGrid} WMTS tileGrid instance.\n * @api\n */\nexport function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) {\n\n  /** @type {!Array<number>} */\n  var resolutions = [];\n  /** @type {!Array<string>} */\n  var matrixIds = [];\n  /** @type {!Array<import(\"../coordinate.js\").Coordinate>} */\n  var origins = [];\n  /** @type {!Array<import(\"../size.js\").Size>} */\n  var tileSizes = [];\n  /** @type {!Array<import(\"../size.js\").Size>} */\n  var sizes = [];\n\n  var matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : [];\n\n  var supportedCRSPropName = 'SupportedCRS';\n  var matrixIdsPropName = 'TileMatrix';\n  var identifierPropName = 'Identifier';\n  var scaleDenominatorPropName = 'ScaleDenominator';\n  var topLeftCornerPropName = 'TopLeftCorner';\n  var tileWidthPropName = 'TileWidth';\n  var tileHeightPropName = 'TileHeight';\n\n  var code = matrixSet[supportedCRSPropName];\n  var projection = getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) ||\n      getProjection(code);\n  var metersPerUnit = projection.getMetersPerUnit();\n  // swap origin x and y coordinates if axis orientation is lat/long\n  var switchOriginXY = projection.getAxisOrientation().substr(0, 2) == 'ne';\n\n  matrixSet[matrixIdsPropName].sort(function(a, b) {\n    return b[scaleDenominatorPropName] - a[scaleDenominatorPropName];\n  });\n\n  matrixSet[matrixIdsPropName].forEach(function(elt) {\n\n    var matrixAvailable;\n    // use of matrixLimits to filter TileMatrices from GetCapabilities\n    // TileMatrixSet from unavailable matrix levels.\n    if (matrixLimits.length > 0) {\n      matrixAvailable = find(matrixLimits, function(elt_ml) {\n        if (elt[identifierPropName] == elt_ml[matrixIdsPropName]) {\n          return true;\n        }\n        // Fallback for tileMatrix identifiers that don't get prefixed\n        // by their tileMatrixSet identifiers.\n        if (elt[identifierPropName].indexOf(':') === -1) {\n          return matrixSet[identifierPropName] + ':' + elt[identifierPropName] === elt_ml[matrixIdsPropName];\n        }\n        return false;\n      });\n    } else {\n      matrixAvailable = true;\n    }\n\n    if (matrixAvailable) {\n      matrixIds.push(elt[identifierPropName]);\n      var resolution = elt[scaleDenominatorPropName] * 0.28E-3 / metersPerUnit;\n      var tileWidth = elt[tileWidthPropName];\n      var tileHeight = elt[tileHeightPropName];\n      if (switchOriginXY) {\n        origins.push([elt[topLeftCornerPropName][1],\n          elt[topLeftCornerPropName][0]]);\n      } else {\n        origins.push(elt[topLeftCornerPropName]);\n      }\n      resolutions.push(resolution);\n      tileSizes.push(tileWidth == tileHeight ?\n        tileWidth : [tileWidth, tileHeight]);\n      // top-left origin, so height is negative\n      sizes.push([elt['MatrixWidth'], -elt['MatrixHeight']]);\n    }\n  });\n\n  return new WMTSTileGrid({\n    extent: opt_extent,\n    origins: origins,\n    resolutions: resolutions,\n    matrixIds: matrixIds,\n    tileSizes: tileSizes,\n    sizes: sizes\n  });\n}\n\n//# sourceMappingURL=WMTS.js.map","/**\n * @module ol/style/Image\n */\nimport {abstract} from '../util.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} opacity\n * @property {boolean} rotateWithView\n * @property {number} rotation\n * @property {number} scale\n */\n\n\n/**\n * @classdesc\n * A base class used for creating subclasses and not instantiated in\n * apps. Base class for {@link module:ol/style/Icon~Icon}, {@link module:ol/style/Circle~CircleStyle} and\n * {@link module:ol/style/RegularShape~RegularShape}.\n * @abstract\n * @api\n */\nvar ImageStyle = function ImageStyle(options) {\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.opacity_ = options.opacity;\n\n  /**\n   * @private\n   * @type {boolean}\n   */\n  this.rotateWithView_ = options.rotateWithView;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.rotation_ = options.rotation;\n\n  /**\n   * @private\n   * @type {number}\n   */\n  this.scale_ = options.scale;\n\n};\n\n/**\n * Clones the style.\n * @return {ImageStyle} The cloned style.\n * @api\n */\nImageStyle.prototype.clone = function clone () {\n  return new ImageStyle({\n    opacity: this.getOpacity(),\n    scale: this.getScale(),\n    rotation: this.getRotation(),\n    rotateWithView: this.getRotateWithView()\n  });\n};\n\n/**\n * Get the symbolizer opacity.\n * @return {number} Opacity.\n * @api\n */\nImageStyle.prototype.getOpacity = function getOpacity () {\n  return this.opacity_;\n};\n\n/**\n * Determine whether the symbolizer rotates with the map.\n * @return {boolean} Rotate with map.\n * @api\n */\nImageStyle.prototype.getRotateWithView = function getRotateWithView () {\n  return this.rotateWithView_;\n};\n\n/**\n * Get the symoblizer rotation.\n * @return {number} Rotation.\n * @api\n */\nImageStyle.prototype.getRotation = function getRotation () {\n  return this.rotation_;\n};\n\n/**\n * Get the symbolizer scale.\n * @return {number} Scale.\n * @api\n */\nImageStyle.prototype.getScale = function getScale () {\n  return this.scale_;\n};\n\n/**\n * This method is deprecated and always returns false.\n * @return {boolean} false.\n * @deprecated\n * @api\n */\nImageStyle.prototype.getSnapToPixel = function getSnapToPixel () {\n  return false;\n};\n\n/**\n * Get the anchor point in pixels. The anchor determines the center point for the\n * symbolizer.\n * @abstract\n * @return {Array<number>} Anchor.\n */\nImageStyle.prototype.getAnchor = function getAnchor () {\n  return abstract();\n};\n\n/**\n * Get the image element for the symbolizer.\n * @abstract\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\nImageStyle.prototype.getImage = function getImage (pixelRatio) {\n  return abstract();\n};\n\n/**\n * @abstract\n * @param {number} pixelRatio Pixel ratio.\n * @return {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} Image element.\n */\nImageStyle.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n  return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../ImageState.js\").default} Image state.\n */\nImageStyle.prototype.getImageState = function getImageState () {\n  return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../size.js\").Size} Image size.\n */\nImageStyle.prototype.getImageSize = function getImageSize () {\n  return abstract();\n};\n\n/**\n * @abstract\n * @return {import(\"../size.js\").Size} Size of the hit-detection image.\n */\nImageStyle.prototype.getHitDetectionImageSize = function getHitDetectionImageSize () {\n  return abstract();\n};\n\n/**\n * Get the origin of the symbolizer.\n * @abstract\n * @return {Array<number>} Origin.\n */\nImageStyle.prototype.getOrigin = function getOrigin () {\n  return abstract();\n};\n\n/**\n * Get the size of the symbolizer (in pixels).\n * @abstract\n * @return {import(\"../size.js\").Size} Size.\n */\nImageStyle.prototype.getSize = function getSize () {\n  return abstract();\n};\n\n/**\n * Set the opacity.\n *\n * @param {number} opacity Opacity.\n * @api\n */\nImageStyle.prototype.setOpacity = function setOpacity (opacity) {\n  this.opacity_ = opacity;\n};\n\n/**\n * Set whether to rotate the style with the view.\n *\n * @param {boolean} rotateWithView Rotate with map.\n * @api\n */\nImageStyle.prototype.setRotateWithView = function setRotateWithView (rotateWithView) {\n  this.rotateWithView_ = rotateWithView;\n};\n\n/**\n * Set the rotation.\n *\n * @param {number} rotation Rotation.\n * @api\n */\nImageStyle.prototype.setRotation = function setRotation (rotation) {\n  this.rotation_ = rotation;\n};\n/**\n * Set the scale.\n *\n * @param {number} scale Scale.\n * @api\n */\nImageStyle.prototype.setScale = function setScale (scale) {\n  this.scale_ = scale;\n};\n\n/**\n * This method is deprecated and does nothing.\n * @param {boolean} snapToPixel Snap to pixel?\n * @deprecated\n * @api\n */\nImageStyle.prototype.setSnapToPixel = function setSnapToPixel (snapToPixel) {};\n\n/**\n * @abstract\n * @param {function(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @return {import(\"../events.js\").EventsKey|undefined} Listener key.\n * @template T\n */\nImageStyle.prototype.listenImageChange = function listenImageChange (listener, thisArg) {\n  return abstract();\n};\n\n/**\n * Load not yet loaded URI.\n * @abstract\n */\nImageStyle.prototype.load = function load () {\n  abstract();\n};\n\n/**\n * @abstract\n * @param {function(this: T, import(\"../events/Event.js\").default)} listener Listener function.\n * @param {T} thisArg Value to use as `this` when executing `listener`.\n * @template T\n */\nImageStyle.prototype.unlistenImageChange = function unlistenImageChange (listener, thisArg) {\n  abstract();\n};\n\nexport default ImageStyle;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/style/RegularShape\n */\n\nimport {asString} from '../color.js';\nimport {asColorLike} from '../colorlike.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {CANVAS_LINE_DASH} from '../has.js';\nimport ImageState from '../ImageState.js';\nimport {defaultStrokeStyle, defaultFillStyle, defaultLineCap, defaultLineWidth, defaultLineJoin, defaultMiterLimit} from '../render/canvas.js';\nimport ImageStyle from './Image.js';\n\n\n/**\n * Specify radius for regular polygons, or radius1 and radius2 for stars.\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} points Number of points for stars and regular polygons. In case of a polygon, the number of points\n * is the number of sides.\n * @property {number} [radius] Radius of a regular polygon.\n * @property {number} [radius1] Outer radius of a star.\n * @property {number} [radius2] Inner radius of a star.\n * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.\n * @property {import(\"./AtlasManager.js\").default} [atlasManager] The atlas manager to use for this symbol. When\n * using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given, the\n * symbol is added to an atlas. By default no atlas manager is used.\n */\n\n\n/**\n * @typedef {Object} RenderOptions\n * @property {import(\"../colorlike.js\").ColorLike} [strokeStyle]\n * @property {number} strokeWidth\n * @property {number} size\n * @property {string} lineCap\n * @property {Array<number>} lineDash\n * @property {number} lineDashOffset\n * @property {string} lineJoin\n * @property {number} miterLimit\n */\n\n\n/**\n * @classdesc\n * Set regular shape style for vector features. The resulting shape will be\n * a regular polygon when `radius` is provided, or a star when `radius1` and\n * `radius2` are provided.\n * @api\n */\nvar RegularShape = /*@__PURE__*/(function (ImageStyle) {\n  function RegularShape(options) {\n    /**\n     * @type {boolean}\n     */\n    var rotateWithView = options.rotateWithView !== undefined ?\n      options.rotateWithView : false;\n\n    ImageStyle.call(this, {\n      opacity: 1,\n      rotateWithView: rotateWithView,\n      rotation: options.rotation !== undefined ? options.rotation : 0,\n      scale: 1\n    });\n\n    /**\n     * @private\n     * @type {Array<string|number>}\n     */\n    this.checksums_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.hitDetectionCanvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./Fill.js\").default}\n     */\n    this.fill_ = options.fill !== undefined ? options.fill : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.points_ = options.points;\n\n    /**\n     * @protected\n     * @type {number}\n     */\n    this.radius_ = /** @type {number} */ (options.radius !== undefined ?\n      options.radius : options.radius1);\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.radius2_ = options.radius2;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.angle_ = options.angle !== undefined ? options.angle : 0;\n\n    /**\n     * @private\n     * @type {import(\"./Stroke.js\").default}\n     */\n    this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.anchor_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.imageSize_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.hitDetectionImageSize_ = null;\n\n    /**\n     * @protected\n     * @type {import(\"./AtlasManager.js\").default|undefined}\n     */\n    this.atlasManager_ = options.atlasManager;\n\n    this.render_(this.atlasManager_);\n\n  }\n\n  if ( ImageStyle ) RegularShape.__proto__ = ImageStyle;\n  RegularShape.prototype = Object.create( ImageStyle && ImageStyle.prototype );\n  RegularShape.prototype.constructor = RegularShape;\n\n  /**\n   * Clones the style. If an atlasmanager was provided to the original style it will be used in the cloned style, too.\n   * @return {RegularShape} The cloned style.\n   * @api\n   */\n  RegularShape.prototype.clone = function clone () {\n    var style = new RegularShape({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      points: this.getPoints(),\n      radius: this.getRadius(),\n      radius2: this.getRadius2(),\n      angle: this.getAngle(),\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView(),\n      atlasManager: this.atlasManager_\n    });\n    style.setOpacity(this.getOpacity());\n    style.setScale(this.getScale());\n    return style;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  RegularShape.prototype.getAnchor = function getAnchor () {\n    return this.anchor_;\n  };\n\n  /**\n   * Get the angle used in generating the shape.\n   * @return {number} Shape's rotation in radians.\n   * @api\n   */\n  RegularShape.prototype.getAngle = function getAngle () {\n    return this.angle_;\n  };\n\n  /**\n   * Get the fill style for the shape.\n   * @return {import(\"./Fill.js\").default} Fill style.\n   * @api\n   */\n  RegularShape.prototype.getFill = function getFill () {\n    return this.fill_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n    return this.hitDetectionCanvas_;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  RegularShape.prototype.getImage = function getImage (pixelRatio) {\n    return this.canvas_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.getImageSize = function getImageSize () {\n    return this.imageSize_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.getHitDetectionImageSize = function getHitDetectionImageSize () {\n    return this.hitDetectionImageSize_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.getImageState = function getImageState () {\n    return ImageState.LOADED;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  RegularShape.prototype.getOrigin = function getOrigin () {\n    return this.origin_;\n  };\n\n  /**\n   * Get the number of points for generating the shape.\n   * @return {number} Number of points for stars and regular polygons.\n   * @api\n   */\n  RegularShape.prototype.getPoints = function getPoints () {\n    return this.points_;\n  };\n\n  /**\n   * Get the (primary) radius for the shape.\n   * @return {number} Radius.\n   * @api\n   */\n  RegularShape.prototype.getRadius = function getRadius () {\n    return this.radius_;\n  };\n\n  /**\n   * Get the secondary radius for the shape.\n   * @return {number|undefined} Radius2.\n   * @api\n   */\n  RegularShape.prototype.getRadius2 = function getRadius2 () {\n    return this.radius2_;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  RegularShape.prototype.getSize = function getSize () {\n    return this.size_;\n  };\n\n  /**\n   * Get the stroke style for the shape.\n   * @return {import(\"./Stroke.js\").default} Stroke style.\n   * @api\n   */\n  RegularShape.prototype.getStroke = function getStroke () {\n    return this.stroke_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.listenImageChange = function listenImageChange (listener, thisArg) {\n    return undefined;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.load = function load () {};\n\n  /**\n   * @inheritDoc\n   */\n  RegularShape.prototype.unlistenImageChange = function unlistenImageChange (listener, thisArg) {};\n\n  /**\n   * @protected\n   * @param {import(\"./AtlasManager.js\").default|undefined} atlasManager An atlas manager.\n   */\n  RegularShape.prototype.render_ = function render_ (atlasManager) {\n    var imageSize;\n    var lineCap = '';\n    var lineJoin = '';\n    var miterLimit = 0;\n    var lineDash = null;\n    var lineDashOffset = 0;\n    var strokeStyle;\n    var strokeWidth = 0;\n\n    if (this.stroke_) {\n      strokeStyle = this.stroke_.getColor();\n      if (strokeStyle === null) {\n        strokeStyle = defaultStrokeStyle;\n      }\n      strokeStyle = asColorLike(strokeStyle);\n      strokeWidth = this.stroke_.getWidth();\n      if (strokeWidth === undefined) {\n        strokeWidth = defaultLineWidth;\n      }\n      lineDash = this.stroke_.getLineDash();\n      lineDashOffset = this.stroke_.getLineDashOffset();\n      if (!CANVAS_LINE_DASH) {\n        lineDash = null;\n        lineDashOffset = 0;\n      }\n      lineJoin = this.stroke_.getLineJoin();\n      if (lineJoin === undefined) {\n        lineJoin = defaultLineJoin;\n      }\n      lineCap = this.stroke_.getLineCap();\n      if (lineCap === undefined) {\n        lineCap = defaultLineCap;\n      }\n      miterLimit = this.stroke_.getMiterLimit();\n      if (miterLimit === undefined) {\n        miterLimit = defaultMiterLimit;\n      }\n    }\n\n    var size = 2 * (this.radius_ + strokeWidth) + 1;\n\n    /** @type {RenderOptions} */\n    var renderOptions = {\n      strokeStyle: strokeStyle,\n      strokeWidth: strokeWidth,\n      size: size,\n      lineCap: lineCap,\n      lineDash: lineDash,\n      lineDashOffset: lineDashOffset,\n      lineJoin: lineJoin,\n      miterLimit: miterLimit\n    };\n\n    if (atlasManager === undefined) {\n      // no atlas manager is used, create a new canvas\n      var context = createCanvasContext2D(size, size);\n      this.canvas_ = context.canvas;\n\n      // canvas.width and height are rounded to the closest integer\n      size = this.canvas_.width;\n      imageSize = size;\n\n      this.draw_(renderOptions, context, 0, 0);\n\n      this.createHitDetectionCanvas_(renderOptions);\n    } else {\n      // an atlas manager is used, add the symbol to an atlas\n      size = Math.round(size);\n\n      var hasCustomHitDetectionImage = !this.fill_;\n      var renderHitDetectionCallback;\n      if (hasCustomHitDetectionImage) {\n        // render the hit-detection image into a separate atlas image\n        renderHitDetectionCallback =\n            this.drawHitDetectionCanvas_.bind(this, renderOptions);\n      }\n\n      var id = this.getChecksum();\n      var info = atlasManager.add(\n        id, size, size, this.draw_.bind(this, renderOptions),\n        renderHitDetectionCallback);\n\n      this.canvas_ = info.image;\n      this.origin_ = [info.offsetX, info.offsetY];\n      imageSize = info.image.width;\n\n      if (hasCustomHitDetectionImage) {\n        this.hitDetectionCanvas_ = info.hitImage;\n        this.hitDetectionImageSize_ =\n            [info.hitImage.width, info.hitImage.height];\n      } else {\n        this.hitDetectionCanvas_ = this.canvas_;\n        this.hitDetectionImageSize_ = [imageSize, imageSize];\n      }\n    }\n\n    this.anchor_ = [size / 2, size / 2];\n    this.size_ = [size, size];\n    this.imageSize_ = [imageSize, imageSize];\n  };\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D} context The rendering context.\n   * @param {number} x The origin for the symbol (x).\n   * @param {number} y The origin for the symbol (y).\n   */\n  RegularShape.prototype.draw_ = function draw_ (renderOptions, context, x, y) {\n    var i, angle0, radiusC;\n    // reset transform\n    context.setTransform(1, 0, 0, 1, 0, 0);\n\n    // then move to (x, y)\n    context.translate(x, y);\n\n    context.beginPath();\n\n    var points = this.points_;\n    if (points === Infinity) {\n      context.arc(\n        renderOptions.size / 2, renderOptions.size / 2,\n        this.radius_, 0, 2 * Math.PI, true);\n    } else {\n      var radius2 = (this.radius2_ !== undefined) ? this.radius2_\n        : this.radius_;\n      if (radius2 !== this.radius_) {\n        points = 2 * points;\n      }\n      for (i = 0; i <= points; i++) {\n        angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;\n        radiusC = i % 2 === 0 ? this.radius_ : radius2;\n        context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),\n          renderOptions.size / 2 + radiusC * Math.sin(angle0));\n      }\n    }\n\n\n    if (this.fill_) {\n      var color = this.fill_.getColor();\n      if (color === null) {\n        color = defaultFillStyle;\n      }\n      context.fillStyle = asColorLike(color);\n      context.fill();\n    }\n    if (this.stroke_) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.lineCap = /** @type {CanvasLineCap} */ (renderOptions.lineCap);\n      context.lineJoin = /** @type {CanvasLineJoin} */ (renderOptions.lineJoin);\n      context.miterLimit = renderOptions.miterLimit;\n      context.stroke();\n    }\n    context.closePath();\n  };\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   */\n  RegularShape.prototype.createHitDetectionCanvas_ = function createHitDetectionCanvas_ (renderOptions) {\n    this.hitDetectionImageSize_ = [renderOptions.size, renderOptions.size];\n    if (this.fill_) {\n      this.hitDetectionCanvas_ = this.canvas_;\n      return;\n    }\n\n    // if no fill style is set, create an extra hit-detection image with a\n    // default fill style\n    var context = createCanvasContext2D(renderOptions.size, renderOptions.size);\n    this.hitDetectionCanvas_ = context.canvas;\n\n    this.drawHitDetectionCanvas_(renderOptions, context, 0, 0);\n  };\n\n  /**\n   * @private\n   * @param {RenderOptions} renderOptions Render options.\n   * @param {CanvasRenderingContext2D} context The context.\n   * @param {number} x The origin for the symbol (x).\n   * @param {number} y The origin for the symbol (y).\n   */\n  RegularShape.prototype.drawHitDetectionCanvas_ = function drawHitDetectionCanvas_ (renderOptions, context, x, y) {\n    // reset transform\n    context.setTransform(1, 0, 0, 1, 0, 0);\n\n    // then move to (x, y)\n    context.translate(x, y);\n\n    context.beginPath();\n\n    var points = this.points_;\n    if (points === Infinity) {\n      context.arc(\n        renderOptions.size / 2, renderOptions.size / 2,\n        this.radius_, 0, 2 * Math.PI, true);\n    } else {\n      var radius2 = (this.radius2_ !== undefined) ? this.radius2_\n        : this.radius_;\n      if (radius2 !== this.radius_) {\n        points = 2 * points;\n      }\n      var i, radiusC, angle0;\n      for (i = 0; i <= points; i++) {\n        angle0 = i * 2 * Math.PI / points - Math.PI / 2 + this.angle_;\n        radiusC = i % 2 === 0 ? this.radius_ : radius2;\n        context.lineTo(renderOptions.size / 2 + radiusC * Math.cos(angle0),\n          renderOptions.size / 2 + radiusC * Math.sin(angle0));\n      }\n    }\n\n    context.fillStyle = asString(defaultFillStyle);\n    context.fill();\n    if (this.stroke_) {\n      context.strokeStyle = renderOptions.strokeStyle;\n      context.lineWidth = renderOptions.strokeWidth;\n      if (renderOptions.lineDash) {\n        context.setLineDash(renderOptions.lineDash);\n        context.lineDashOffset = renderOptions.lineDashOffset;\n      }\n      context.stroke();\n    }\n    context.closePath();\n  };\n\n  /**\n   * @return {string} The checksum.\n   */\n  RegularShape.prototype.getChecksum = function getChecksum () {\n    var strokeChecksum = this.stroke_ ?\n      this.stroke_.getChecksum() : '-';\n    var fillChecksum = this.fill_ ?\n      this.fill_.getChecksum() : '-';\n\n    var recalculate = !this.checksums_ ||\n        (strokeChecksum != this.checksums_[1] ||\n        fillChecksum != this.checksums_[2] ||\n        this.radius_ != this.checksums_[3] ||\n        this.radius2_ != this.checksums_[4] ||\n        this.angle_ != this.checksums_[5] ||\n        this.points_ != this.checksums_[6]);\n\n    if (recalculate) {\n      var checksum = 'r' + strokeChecksum + fillChecksum +\n          (this.radius_ !== undefined ? this.radius_.toString() : '-') +\n          (this.radius2_ !== undefined ? this.radius2_.toString() : '-') +\n          (this.angle_ !== undefined ? this.angle_.toString() : '-') +\n          (this.points_ !== undefined ? this.points_.toString() : '-');\n      this.checksums_ = [checksum, strokeChecksum, fillChecksum,\n        this.radius_, this.radius2_, this.angle_, this.points_];\n    }\n\n    return /** @type {string} */ (this.checksums_[0]);\n  };\n\n  return RegularShape;\n}(ImageStyle));\n\n\nexport default RegularShape;\n\n//# sourceMappingURL=RegularShape.js.map","/**\n * @module ol/style/Circle\n */\n\nimport RegularShape from './RegularShape.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {number} radius Circle radius.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./AtlasManager.js\").default} [atlasManager] The atlas manager to use for this circle.\n * When using WebGL it is recommended to use an atlas manager to avoid texture switching. If an atlas manager is given,\n * the circle is added to an atlas. By default no atlas manager is used.\n */\n\n\n/**\n * @classdesc\n * Set circle style for vector features.\n * @api\n */\nvar CircleStyle = /*@__PURE__*/(function (RegularShape) {\n  function CircleStyle(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    RegularShape.call(this, {\n      points: Infinity,\n      fill: options.fill,\n      radius: options.radius,\n      stroke: options.stroke,\n      atlasManager: options.atlasManager\n    });\n\n  }\n\n  if ( RegularShape ) CircleStyle.__proto__ = RegularShape;\n  CircleStyle.prototype = Object.create( RegularShape && RegularShape.prototype );\n  CircleStyle.prototype.constructor = CircleStyle;\n\n  /**\n  * Clones the style.  If an atlasmanager was provided to the original style it will be used in the cloned style, too.\n  * @return {CircleStyle} The cloned style.\n  * @override\n  * @api\n  */\n  CircleStyle.prototype.clone = function clone () {\n    var style = new CircleStyle({\n      fill: this.getFill() ? this.getFill().clone() : undefined,\n      stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n      radius: this.getRadius(),\n      atlasManager: this.atlasManager_\n    });\n    style.setOpacity(this.getOpacity());\n    style.setScale(this.getScale());\n    return style;\n  };\n\n  /**\n  * Set the circle radius.\n  *\n  * @param {number} radius Circle radius.\n  * @api\n  */\n  CircleStyle.prototype.setRadius = function setRadius (radius) {\n    this.radius_ = radius;\n    this.render_(this.atlasManager_);\n  };\n\n  return CircleStyle;\n}(RegularShape));\n\n\nexport default CircleStyle;\n\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/style/IconAnchorUnits\n */\n\n/**\n * Icon anchor units. One of 'fraction', 'pixels'.\n * @enum {string}\n */\nexport default {\n  FRACTION: 'fraction',\n  PIXELS: 'pixels'\n};\n\n//# sourceMappingURL=IconAnchorUnits.js.map","/**\n * @module ol/style/IconImage\n */\n\nimport {createCanvasContext2D} from '../dom.js';\nimport {listenOnce, unlistenByKey} from '../events.js';\nimport EventTarget from '../events/Target.js';\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport {shared as iconImageCache} from './IconImageCache.js';\n\nvar IconImage = /*@__PURE__*/(function (EventTarget) {\n  function IconImage(image, src, size, crossOrigin, imageState, color) {\n\n    EventTarget.call(this);\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    this.hitDetectionImage_ = null;\n\n    /**\n     * @private\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    this.image_ = !image ? new Image() : image;\n\n    if (crossOrigin !== null) {\n      /** @type {HTMLImageElement} */ (this.image_).crossOrigin = crossOrigin;\n    }\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = color ?\n      /** @type {HTMLCanvasElement} */ (document.createElement('canvas')) :\n      null;\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color}\n     */\n    this.color_ = color;\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.imageListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../ImageState.js\").default}\n     */\n    this.imageState_ = imageState;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = size;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     * @type {boolean|undefined}\n     */\n    this.tainted_;\n\n  }\n\n  if ( EventTarget ) IconImage.__proto__ = EventTarget;\n  IconImage.prototype = Object.create( EventTarget && EventTarget.prototype );\n  IconImage.prototype.constructor = IconImage;\n\n  /**\n   * @private\n   * @return {boolean} The image canvas is tainted.\n   */\n  IconImage.prototype.isTainted_ = function isTainted_ () {\n    if (this.tainted_ === undefined && this.imageState_ === ImageState.LOADED) {\n      this.tainted_ = false;\n      var context = createCanvasContext2D(1, 1);\n      try {\n        context.drawImage(this.image_, 0, 0);\n        context.getImageData(0, 0, 1, 1);\n      } catch (e) {\n        this.tainted_ = true;\n      }\n    }\n    return this.tainted_ === true;\n  };\n\n  /**\n   * @private\n   */\n  IconImage.prototype.dispatchChangeEvent_ = function dispatchChangeEvent_ () {\n    this.dispatchEvent(EventType.CHANGE);\n  };\n\n  /**\n   * @private\n   */\n  IconImage.prototype.handleImageError_ = function handleImageError_ () {\n    this.imageState_ = ImageState.ERROR;\n    this.unlistenImage_();\n    this.dispatchChangeEvent_();\n  };\n\n  /**\n   * @private\n   */\n  IconImage.prototype.handleImageLoad_ = function handleImageLoad_ () {\n    this.imageState_ = ImageState.LOADED;\n    if (this.size_) {\n      this.image_.width = this.size_[0];\n      this.image_.height = this.size_[1];\n    }\n    this.size_ = [this.image_.width, this.image_.height];\n    this.unlistenImage_();\n    this.replaceColor_();\n    this.dispatchChangeEvent_();\n  };\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n   */\n  IconImage.prototype.getImage = function getImage (pixelRatio) {\n    return this.canvas_ ? this.canvas_ : this.image_;\n  };\n\n  /**\n   * @return {import(\"../ImageState.js\").default} Image state.\n   */\n  IconImage.prototype.getImageState = function getImageState () {\n    return this.imageState_;\n  };\n\n  /**\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image element.\n   */\n  IconImage.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n    if (!this.hitDetectionImage_) {\n      if (this.isTainted_()) {\n        var width = this.size_[0];\n        var height = this.size_[1];\n        var context = createCanvasContext2D(width, height);\n        context.fillRect(0, 0, width, height);\n        this.hitDetectionImage_ = context.canvas;\n      } else {\n        this.hitDetectionImage_ = this.image_;\n      }\n    }\n    return this.hitDetectionImage_;\n  };\n\n  /**\n   * @return {import(\"../size.js\").Size} Image size.\n   */\n  IconImage.prototype.getSize = function getSize () {\n    return this.size_;\n  };\n\n  /**\n   * @return {string|undefined} Image src.\n   */\n  IconImage.prototype.getSrc = function getSrc () {\n    return this.src_;\n  };\n\n  /**\n   * Load not yet loaded URI.\n   */\n  IconImage.prototype.load = function load () {\n    if (this.imageState_ == ImageState.IDLE) {\n      this.imageState_ = ImageState.LOADING;\n      this.imageListenerKeys_ = [\n        listenOnce(this.image_, EventType.ERROR,\n          this.handleImageError_, this),\n        listenOnce(this.image_, EventType.LOAD,\n          this.handleImageLoad_, this)\n      ];\n      try {\n        /** @type {HTMLImageElement} */ (this.image_).src = this.src_;\n      } catch (e) {\n        this.handleImageError_();\n      }\n    }\n  };\n\n  /**\n   * @private\n   */\n  IconImage.prototype.replaceColor_ = function replaceColor_ () {\n    if (!this.color_ || this.isTainted_()) {\n      return;\n    }\n\n    this.canvas_.width = this.image_.width;\n    this.canvas_.height = this.image_.height;\n\n    var ctx = this.canvas_.getContext('2d');\n    ctx.drawImage(this.image_, 0, 0);\n\n    var imgData = ctx.getImageData(0, 0, this.image_.width, this.image_.height);\n    var data = imgData.data;\n    var r = this.color_[0] / 255.0;\n    var g = this.color_[1] / 255.0;\n    var b = this.color_[2] / 255.0;\n\n    for (var i = 0, ii = data.length; i < ii; i += 4) {\n      data[i] *= r;\n      data[i + 1] *= g;\n      data[i + 2] *= b;\n    }\n    ctx.putImageData(imgData, 0, 0);\n  };\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\n  IconImage.prototype.unlistenImage_ = function unlistenImage_ () {\n    this.imageListenerKeys_.forEach(unlistenByKey);\n    this.imageListenerKeys_ = null;\n  };\n\n  return IconImage;\n}(EventTarget));\n\n\n/**\n * @param {HTMLImageElement|HTMLCanvasElement} image Image.\n * @param {string} src Src.\n * @param {import(\"../size.js\").Size} size Size.\n * @param {?string} crossOrigin Cross origin.\n * @param {import(\"../ImageState.js\").default} imageState Image state.\n * @param {import(\"../color.js\").Color} color Color.\n * @return {IconImage} Icon image.\n */\nexport function get(image, src, size, crossOrigin, imageState, color) {\n  var iconImage = iconImageCache.get(src, crossOrigin, color);\n  if (!iconImage) {\n    iconImage = new IconImage(image, src, size, crossOrigin, imageState, color);\n    iconImageCache.set(src, crossOrigin, color, iconImage);\n  }\n  return iconImage;\n}\n\n\nexport default IconImage;\n\n//# sourceMappingURL=IconImage.js.map","/**\n * @module ol/style/IconOrigin\n */\n\n/**\n * Icon origin. One of 'bottom-left', 'bottom-right', 'top-left', 'top-right'.\n * @enum {string}\n */\nexport default {\n  BOTTOM_LEFT: 'bottom-left',\n  BOTTOM_RIGHT: 'bottom-right',\n  TOP_LEFT: 'top-left',\n  TOP_RIGHT: 'top-right'\n};\n\n//# sourceMappingURL=IconOrigin.js.map","/**\n * @module ol/style/Icon\n */\nimport {getUid} from '../util.js';\nimport ImageState from '../ImageState.js';\nimport {assert} from '../asserts.js';\nimport {asArray} from '../color.js';\nimport {listen, unlisten} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport IconAnchorUnits from './IconAnchorUnits.js';\nimport {get as getIconImage} from './IconImage.js';\nimport IconOrigin from './IconOrigin.js';\nimport ImageStyle from './Image.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {Array<number>} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center.\n * @property {import(\"./IconOrigin.js\").default} [anchorOrigin] Origin of the anchor: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. Default is `top-left`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorXUnits] Units in which the anchor x value is\n * specified. A value of `'fraction'` indicates the x value is a fraction of the icon. A value of `'pixels'` indicates\n * the x value in pixels. Default is `'fraction'`.\n * @property {import(\"./IconAnchorUnits.js\").default} [anchorYUnits] Units in which the anchor y value is\n * specified. A value of `'fraction'` indicates the y value is a fraction of the icon. A value of `'pixels'` indicates\n * the y value in pixels. Default is `'fraction'`.\n * @property {import(\"../color.js\").Color|string} [color] Color to tint the icon. If not specified,\n * the icon will be left as is.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images. Note that you must provide a\n * `crossOrigin` value if you are using the WebGL renderer or if you want to access pixel data with the Canvas renderer.\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the\n * provided image must already be loaded. And in that case, it is required\n * to provide the size of the image, with the `imgSize` option.\n * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the\n * sub-rectangle to use from the original icon image.\n * @property {import(\"./IconOrigin.js\").default} [offsetOrigin] Origin of the offset: `bottom-left`, `bottom-right`,\n * `top-left` or `top-right`. Default is `top-left`.\n * @property {number} [opacity=1] Opacity of the icon.\n * @property {number} [scale=1] Scale.\n * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.\n * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).\n * @property {import(\"../size.js\").Size} [size] Icon size in pixel. Can be used together with `offset` to define the\n * sub-rectangle to use from the origin (sprite) icon image.\n * @property {import(\"../size.js\").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not, and\n * for SVG images in Internet Explorer 11. The provided `imgSize` needs to match the actual size of the image.\n * @property {string} [src] Image source URI.\n */\n\n\n/**\n * @classdesc\n * Set icon style for vector features.\n * @api\n */\nvar Icon = /*@__PURE__*/(function (ImageStyle) {\n  function Icon(opt_options) {\n    var options = opt_options || {};\n\n    /**\n     * @type {number}\n     */\n    var opacity = options.opacity !== undefined ? options.opacity : 1;\n\n    /**\n     * @type {number}\n     */\n    var rotation = options.rotation !== undefined ? options.rotation : 0;\n\n    /**\n     * @type {number}\n     */\n    var scale = options.scale !== undefined ? options.scale : 1;\n\n    /**\n     * @type {boolean}\n     */\n    var rotateWithView = options.rotateWithView !== undefined ?\n      options.rotateWithView : false;\n\n    ImageStyle.call(this, {\n      opacity: opacity,\n      rotation: rotation,\n      scale: scale,\n      rotateWithView: rotateWithView\n    });\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5];\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.normalizedAnchor_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./IconOrigin.js\").default}\n     */\n    this.anchorOrigin_ = options.anchorOrigin !== undefined ?\n      options.anchorOrigin : IconOrigin.TOP_LEFT;\n\n    /**\n     * @private\n     * @type {import(\"./IconAnchorUnits.js\").default}\n     */\n    this.anchorXUnits_ = options.anchorXUnits !== undefined ?\n      options.anchorXUnits : IconAnchorUnits.FRACTION;\n\n    /**\n     * @private\n     * @type {import(\"./IconAnchorUnits.js\").default}\n     */\n    this.anchorYUnits_ = options.anchorYUnits !== undefined ?\n      options.anchorYUnits : IconAnchorUnits.FRACTION;\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n        options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @type {HTMLImageElement|HTMLCanvasElement}\n     */\n    var image = options.img !== undefined ? options.img : null;\n\n    /**\n     * @type {import(\"../size.js\").Size}\n     */\n    var imgSize = options.imgSize !== undefined ? options.imgSize : null;\n\n    /**\n     * @type {string|undefined}\n     */\n    var src = options.src;\n\n    assert(!(src !== undefined && image),\n      4); // `image` and `src` cannot be provided at the same time\n    assert(!image || (image && imgSize),\n      5); // `imgSize` must be set when `image` is provided\n\n    if ((src === undefined || src.length === 0) && image) {\n      src = /** @type {HTMLImageElement} */ (image).src || getUid(image);\n    }\n    assert(src !== undefined && src.length > 0,\n      6); // A defined and non-empty `src` or `image` must be provided\n\n    /**\n     * @type {import(\"../ImageState.js\").default}\n     */\n    var imageState = options.src !== undefined ?\n      ImageState.IDLE : ImageState.LOADED;\n\n    /**\n     * @private\n     * @type {import(\"../color.js\").Color}\n     */\n    this.color_ = options.color !== undefined ? asArray(options.color) : null;\n\n    /**\n     * @private\n     * @type {import(\"./IconImage.js\").default}\n     */\n    this.iconImage_ = getIconImage(\n      image, /** @type {string} */ (src), imgSize, this.crossOrigin_, imageState, this.color_);\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.offset_ = options.offset !== undefined ? options.offset : [0, 0];\n\n    /**\n     * @private\n     * @type {import(\"./IconOrigin.js\").default}\n     */\n    this.offsetOrigin_ = options.offsetOrigin !== undefined ?\n      options.offsetOrigin : IconOrigin.TOP_LEFT;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.origin_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.size_ = options.size !== undefined ? options.size : null;\n\n  }\n\n  if ( ImageStyle ) Icon.__proto__ = ImageStyle;\n  Icon.prototype = Object.create( ImageStyle && ImageStyle.prototype );\n  Icon.prototype.constructor = Icon;\n\n  /**\n   * Clones the style. The underlying Image/HTMLCanvasElement is not cloned.\n   * @return {Icon} The cloned style.\n   * @api\n   */\n  Icon.prototype.clone = function clone () {\n    return new Icon({\n      anchor: this.anchor_.slice(),\n      anchorOrigin: this.anchorOrigin_,\n      anchorXUnits: this.anchorXUnits_,\n      anchorYUnits: this.anchorYUnits_,\n      crossOrigin: this.crossOrigin_,\n      color: (this.color_ && this.color_.slice) ? this.color_.slice() : this.color_ || undefined,\n      src: this.getSrc(),\n      offset: this.offset_.slice(),\n      offsetOrigin: this.offsetOrigin_,\n      size: this.size_ !== null ? this.size_.slice() : undefined,\n      opacity: this.getOpacity(),\n      scale: this.getScale(),\n      rotation: this.getRotation(),\n      rotateWithView: this.getRotateWithView()\n    });\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Icon.prototype.getAnchor = function getAnchor () {\n    if (this.normalizedAnchor_) {\n      return this.normalizedAnchor_;\n    }\n    var anchor = this.anchor_;\n    var size = this.getSize();\n    if (this.anchorXUnits_ == IconAnchorUnits.FRACTION ||\n        this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n      if (!size) {\n        return null;\n      }\n      anchor = this.anchor_.slice();\n      if (this.anchorXUnits_ == IconAnchorUnits.FRACTION) {\n        anchor[0] *= size[0];\n      }\n      if (this.anchorYUnits_ == IconAnchorUnits.FRACTION) {\n        anchor[1] *= size[1];\n      }\n    }\n\n    if (this.anchorOrigin_ != IconOrigin.TOP_LEFT) {\n      if (!size) {\n        return null;\n      }\n      if (anchor === this.anchor_) {\n        anchor = this.anchor_.slice();\n      }\n      if (this.anchorOrigin_ == IconOrigin.TOP_RIGHT ||\n          this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n        anchor[0] = -anchor[0] + size[0];\n      }\n      if (this.anchorOrigin_ == IconOrigin.BOTTOM_LEFT ||\n          this.anchorOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n        anchor[1] = -anchor[1] + size[1];\n      }\n    }\n    this.normalizedAnchor_ = anchor;\n    return this.normalizedAnchor_;\n  };\n\n  /**\n   * Set the anchor point. The anchor determines the center point for the\n   * symbolizer.\n   *\n   * @param {Array<number>} anchor Anchor.\n   * @api\n   */\n  Icon.prototype.setAnchor = function setAnchor (anchor) {\n    this.anchor_ = anchor;\n    this.normalizedAnchor_ = null;\n  };\n\n  /**\n   * Get the icon color.\n   * @return {import(\"../color.js\").Color} Color.\n   * @api\n   */\n  Icon.prototype.getColor = function getColor () {\n    return this.color_;\n  };\n\n  /**\n   * Get the image icon.\n   * @param {number} pixelRatio Pixel ratio.\n   * @return {HTMLImageElement|HTMLCanvasElement} Image or Canvas element.\n   * @override\n   * @api\n   */\n  Icon.prototype.getImage = function getImage (pixelRatio) {\n    return this.iconImage_.getImage(pixelRatio);\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.getImageSize = function getImageSize () {\n    return this.iconImage_.getSize();\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.getHitDetectionImageSize = function getHitDetectionImageSize () {\n    return this.getImageSize();\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.getImageState = function getImageState () {\n    return this.iconImage_.getImageState();\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.getHitDetectionImage = function getHitDetectionImage (pixelRatio) {\n    return this.iconImage_.getHitDetectionImage(pixelRatio);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Icon.prototype.getOrigin = function getOrigin () {\n    if (this.origin_) {\n      return this.origin_;\n    }\n    var offset = this.offset_;\n\n    if (this.offsetOrigin_ != IconOrigin.TOP_LEFT) {\n      var size = this.getSize();\n      var iconImageSize = this.iconImage_.getSize();\n      if (!size || !iconImageSize) {\n        return null;\n      }\n      offset = offset.slice();\n      if (this.offsetOrigin_ == IconOrigin.TOP_RIGHT ||\n          this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n        offset[0] = iconImageSize[0] - size[0] - offset[0];\n      }\n      if (this.offsetOrigin_ == IconOrigin.BOTTOM_LEFT ||\n          this.offsetOrigin_ == IconOrigin.BOTTOM_RIGHT) {\n        offset[1] = iconImageSize[1] - size[1] - offset[1];\n      }\n    }\n    this.origin_ = offset;\n    return this.origin_;\n  };\n\n  /**\n   * Get the image URL.\n   * @return {string|undefined} Image src.\n   * @api\n   */\n  Icon.prototype.getSrc = function getSrc () {\n    return this.iconImage_.getSrc();\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Icon.prototype.getSize = function getSize () {\n    return !this.size_ ? this.iconImage_.getSize() : this.size_;\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.listenImageChange = function listenImageChange (listener, thisArg) {\n    return listen(this.iconImage_, EventType.CHANGE,\n      listener, thisArg);\n  };\n\n  /**\n   * Load not yet loaded URI.\n   * When rendering a feature with an icon style, the vector renderer will\n   * automatically call this method. However, you might want to call this\n   * method yourself for preloading or other purposes.\n   * @override\n   * @api\n   */\n  Icon.prototype.load = function load () {\n    this.iconImage_.load();\n  };\n\n  /**\n   * @override\n   */\n  Icon.prototype.unlistenImageChange = function unlistenImageChange (listener, thisArg) {\n    unlisten(this.iconImage_, EventType.CHANGE,\n      listener, thisArg);\n  };\n\n  return Icon;\n}(ImageStyle));\n\n\nexport default Icon;\n\n//# sourceMappingURL=Icon.js.map","/**\n * @module ol/style/Style\n */\n\n/**\n * Feature styles.\n *\n * If no style is defined, the following default style is used:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *\n *  var fill = new Fill({\n *    color: 'rgba(255,255,255,0.4)'\n *  });\n *  var stroke = new Stroke({\n *    color: '#3399CC',\n *    width: 1.25\n *  });\n *  var styles = [\n *    new Style({\n *      image: new Circle({\n *        fill: fill,\n *        stroke: stroke,\n *        radius: 5\n *      }),\n *      fill: fill,\n *      stroke: stroke\n *    })\n *  ];\n * ```\n *\n * A separate editing style has the following defaults:\n * ```js\n *  import {Fill, Stroke, Circle, Style} from 'ol/style';\n *  import GeometryType from 'ol/geom/GeometryType';\n *\n *  var white = [255, 255, 255, 1];\n *  var blue = [0, 153, 255, 1];\n *  var width = 3;\n *  styles[GeometryType.POLYGON] = [\n *    new Style({\n *      fill: new Fill({\n *        color: [255, 255, 255, 0.5]\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POLYGON] =\n *      styles[GeometryType.POLYGON];\n *  styles[GeometryType.LINE_STRING] = [\n *    new Style({\n *      stroke: new Stroke({\n *        color: white,\n *        width: width + 2\n *      })\n *    }),\n *    new Style({\n *      stroke: new Stroke({\n *        color: blue,\n *        width: width\n *      })\n *    })\n *  ];\n *  styles[GeometryType.MULTI_LINE_STRING] =\n *      styles[GeometryType.LINE_STRING];\n *  styles[GeometryType.POINT] = [\n *    new Style({\n *      image: new Circle({\n *        radius: width * 2,\n *        fill: new Fill({\n *          color: blue\n *        }),\n *        stroke: new Stroke({\n *          color: white,\n *          width: width / 2\n *        })\n *      }),\n *      zIndex: Infinity\n *    })\n *  ];\n *  styles[GeometryType.MULTI_POINT] =\n *      styles[GeometryType.POINT];\n *  styles[GeometryType.GEOMETRY_COLLECTION] =\n *      styles[GeometryType.POLYGON].concat(\n *          styles[GeometryType.LINE_STRING],\n *          styles[GeometryType.POINT]\n *      );\n * ```\n */\nimport {assert} from '../asserts.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport CircleStyle from './Circle.js';\nimport Fill from './Fill.js';\nimport Stroke from './Stroke.js';\n\n\n/**\n * A function that takes an {@link module:ol/Feature} and a `{number}`\n * representing the view's resolution. The function should return a\n * {@link module:ol/style/Style} or an array of them. This way e.g. a\n * vector layer can be styled.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike, number):(Style|Array<Style>)} StyleFunction\n */\n\n/**\n * A {@link Style}, an array of {@link Style}, or a {@link StyleFunction}.\n * @typedef {Style|Array<Style>|StyleFunction} StyleLike\n */\n\n/**\n * A function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Geometry} that will be rendered and styled for the feature.\n *\n * @typedef {function(import(\"../Feature.js\").FeatureLike):\n *     (import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined)} GeometryFunction\n */\n\n\n/**\n * Custom renderer function. Takes two arguments:\n *\n * 1. The pixel coordinates of the geometry in GeoJSON notation.\n * 2. The {@link module:ol/render~State} of the layer renderer.\n *\n * @typedef {function((import(\"../coordinate.js\").Coordinate|Array<import(\"../coordinate.js\").Coordinate>|Array<Array<import(\"../coordinate.js\").Coordinate>>),import(\"../render.js\").State)}\n * RenderFunction\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {string|import(\"../geom/Geometry.js\").default|GeometryFunction} [geometry] Feature property or geometry\n * or function returning a geometry to render for this style.\n * @property {import(\"./Fill.js\").default} [fill] Fill style.\n * @property {import(\"./Image.js\").default} [image] Image style.\n * @property {RenderFunction} [renderer] Custom renderer. When configured, `fill`, `stroke` and `image` will be\n * ignored, and the provided function will be called with each render frame for each geometry.\n * @property {import(\"./Stroke.js\").default} [stroke] Stroke style.\n * @property {import(\"./Text.js\").default} [text] Text style.\n * @property {number} [zIndex] Z index.\n */\n\n/**\n * @classdesc\n * Container for vector feature rendering styles. Any changes made to the style\n * or its children through `set*()` methods will not take effect until the\n * feature or layer that uses the style is re-rendered.\n * @api\n */\nvar Style = function Style(opt_options) {\n\n  var options = opt_options || {};\n\n  /**\n   * @private\n   * @type {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n   */\n  this.geometry_ = null;\n\n  /**\n   * @private\n   * @type {!GeometryFunction}\n   */\n  this.geometryFunction_ = defaultGeometryFunction;\n\n  if (options.geometry !== undefined) {\n    this.setGeometry(options.geometry);\n  }\n\n  /**\n   * @private\n   * @type {import(\"./Fill.js\").default}\n   */\n  this.fill_ = options.fill !== undefined ? options.fill : null;\n\n  /**\n     * @private\n     * @type {import(\"./Image.js\").default}\n     */\n  this.image_ = options.image !== undefined ? options.image : null;\n\n  /**\n   * @private\n   * @type {RenderFunction|null}\n   */\n  this.renderer_ = options.renderer !== undefined ? options.renderer : null;\n\n  /**\n   * @private\n   * @type {import(\"./Stroke.js\").default}\n   */\n  this.stroke_ = options.stroke !== undefined ? options.stroke : null;\n\n  /**\n   * @private\n   * @type {import(\"./Text.js\").default}\n   */\n  this.text_ = options.text !== undefined ? options.text : null;\n\n  /**\n   * @private\n   * @type {number|undefined}\n   */\n  this.zIndex_ = options.zIndex;\n\n};\n\n/**\n * Clones the style.\n * @return {Style} The cloned style.\n * @api\n */\nStyle.prototype.clone = function clone () {\n  var geometry = this.getGeometry();\n  if (geometry && typeof geometry === 'object') {\n    geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (geometry).clone();\n  }\n  return new Style({\n    geometry: geometry,\n    fill: this.getFill() ? this.getFill().clone() : undefined,\n    image: this.getImage() ? this.getImage().clone() : undefined,\n    stroke: this.getStroke() ? this.getStroke().clone() : undefined,\n    text: this.getText() ? this.getText().clone() : undefined,\n    zIndex: this.getZIndex()\n  });\n};\n\n/**\n * Get the custom renderer function that was configured with\n * {@link #setRenderer} or the `renderer` constructor option.\n * @return {RenderFunction|null} Custom renderer function.\n * @api\n */\nStyle.prototype.getRenderer = function getRenderer () {\n  return this.renderer_;\n};\n\n/**\n * Sets a custom renderer function for this style. When set, `fill`, `stroke`\n * and `image` options of the style will be ignored.\n * @param {RenderFunction|null} renderer Custom renderer function.\n * @api\n */\nStyle.prototype.setRenderer = function setRenderer (renderer) {\n  this.renderer_ = renderer;\n};\n\n/**\n * Get the geometry to be rendered.\n * @return {string|import(\"../geom/Geometry.js\").default|GeometryFunction}\n * Feature property or geometry or function that returns the geometry that will\n * be rendered with this style.\n * @api\n */\nStyle.prototype.getGeometry = function getGeometry () {\n  return this.geometry_;\n};\n\n/**\n * Get the function used to generate a geometry for rendering.\n * @return {!GeometryFunction} Function that is called with a feature\n * and returns the geometry to render instead of the feature's geometry.\n * @api\n */\nStyle.prototype.getGeometryFunction = function getGeometryFunction () {\n  return this.geometryFunction_;\n};\n\n/**\n * Get the fill style.\n * @return {import(\"./Fill.js\").default} Fill style.\n * @api\n */\nStyle.prototype.getFill = function getFill () {\n  return this.fill_;\n};\n\n/**\n * Set the fill style.\n * @param {import(\"./Fill.js\").default} fill Fill style.\n * @api\n */\nStyle.prototype.setFill = function setFill (fill) {\n  this.fill_ = fill;\n};\n\n/**\n * Get the image style.\n * @return {import(\"./Image.js\").default} Image style.\n * @api\n */\nStyle.prototype.getImage = function getImage () {\n  return this.image_;\n};\n\n/**\n * Set the image style.\n * @param {import(\"./Image.js\").default} image Image style.\n * @api\n */\nStyle.prototype.setImage = function setImage (image) {\n  this.image_ = image;\n};\n\n/**\n * Get the stroke style.\n * @return {import(\"./Stroke.js\").default} Stroke style.\n * @api\n */\nStyle.prototype.getStroke = function getStroke () {\n  return this.stroke_;\n};\n\n/**\n * Set the stroke style.\n * @param {import(\"./Stroke.js\").default} stroke Stroke style.\n * @api\n */\nStyle.prototype.setStroke = function setStroke (stroke) {\n  this.stroke_ = stroke;\n};\n\n/**\n * Get the text style.\n * @return {import(\"./Text.js\").default} Text style.\n * @api\n */\nStyle.prototype.getText = function getText () {\n  return this.text_;\n};\n\n/**\n * Set the text style.\n * @param {import(\"./Text.js\").default} text Text style.\n * @api\n */\nStyle.prototype.setText = function setText (text) {\n  this.text_ = text;\n};\n\n/**\n * Get the z-index for the style.\n * @return {number|undefined} ZIndex.\n * @api\n */\nStyle.prototype.getZIndex = function getZIndex () {\n  return this.zIndex_;\n};\n\n/**\n * Set a geometry that is rendered instead of the feature's geometry.\n *\n * @param {string|import(\"../geom/Geometry.js\").default|GeometryFunction} geometry\n *   Feature property or geometry or function returning a geometry to render\n *   for this style.\n * @api\n */\nStyle.prototype.setGeometry = function setGeometry (geometry) {\n  if (typeof geometry === 'function') {\n    this.geometryFunction_ = geometry;\n  } else if (typeof geometry === 'string') {\n    this.geometryFunction_ = function(feature) {\n      return (\n        /** @type {import(\"../geom/Geometry.js\").default} */ (feature.get(geometry))\n      );\n    };\n  } else if (!geometry) {\n    this.geometryFunction_ = defaultGeometryFunction;\n  } else if (geometry !== undefined) {\n    this.geometryFunction_ = function() {\n      return (\n        /** @type {import(\"../geom/Geometry.js\").default} */ (geometry)\n      );\n    };\n  }\n  this.geometry_ = geometry;\n};\n\n/**\n * Set the z-index.\n *\n * @param {number|undefined} zIndex ZIndex.\n * @api\n */\nStyle.prototype.setZIndex = function setZIndex (zIndex) {\n  this.zIndex_ = zIndex;\n};\n\n\n/**\n * Convert the provided object into a style function.  Functions passed through\n * unchanged.  Arrays of Style or single style objects wrapped in a\n * new style function.\n * @param {StyleFunction|Array<Style>|Style} obj\n *     A style function, a single style, or an array of styles.\n * @return {StyleFunction} A style function.\n */\nexport function toFunction(obj) {\n  var styleFunction;\n\n  if (typeof obj === 'function') {\n    styleFunction = obj;\n  } else {\n    /**\n     * @type {Array<Style>}\n     */\n    var styles;\n    if (Array.isArray(obj)) {\n      styles = obj;\n    } else {\n      assert(typeof /** @type {?} */ (obj).getZIndex === 'function',\n        41); // Expected an `Style` or an array of `Style`\n      var style = /** @type {Style} */ (obj);\n      styles = [style];\n    }\n    styleFunction = function() {\n      return styles;\n    };\n  }\n  return styleFunction;\n}\n\n\n/**\n * @type {Array<Style>}\n */\nvar defaultStyles = null;\n\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} resolution Resolution.\n * @return {Array<Style>} Style.\n */\nexport function createDefaultStyle(feature, resolution) {\n  // We don't use an immediately-invoked function\n  // and a closure so we don't get an error at script evaluation time in\n  // browsers that do not support Canvas. (import(\"./Circle.js\").CircleStyle does\n  // canvas.getContext('2d') at construction time, which will cause an.error\n  // in such browsers.)\n  if (!defaultStyles) {\n    var fill = new Fill({\n      color: 'rgba(255,255,255,0.4)'\n    });\n    var stroke = new Stroke({\n      color: '#3399CC',\n      width: 1.25\n    });\n    defaultStyles = [\n      new Style({\n        image: new CircleStyle({\n          fill: fill,\n          stroke: stroke,\n          radius: 5\n        }),\n        fill: fill,\n        stroke: stroke\n      })\n    ];\n  }\n  return defaultStyles;\n}\n\n\n/**\n * Default styles for editing features.\n * @return {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} Styles\n */\nexport function createEditingStyle() {\n  /** @type {Object<import(\"../geom/GeometryType.js\").default, Array<Style>>} */\n  var styles = {};\n  var white = [255, 255, 255, 1];\n  var blue = [0, 153, 255, 1];\n  var width = 3;\n  styles[GeometryType.POLYGON] = [\n    new Style({\n      fill: new Fill({\n        color: [255, 255, 255, 0.5]\n      })\n    })\n  ];\n  styles[GeometryType.MULTI_POLYGON] =\n      styles[GeometryType.POLYGON];\n\n  styles[GeometryType.LINE_STRING] = [\n    new Style({\n      stroke: new Stroke({\n        color: white,\n        width: width + 2\n      })\n    }),\n    new Style({\n      stroke: new Stroke({\n        color: blue,\n        width: width\n      })\n    })\n  ];\n  styles[GeometryType.MULTI_LINE_STRING] =\n      styles[GeometryType.LINE_STRING];\n\n  styles[GeometryType.CIRCLE] =\n      styles[GeometryType.POLYGON].concat(\n        styles[GeometryType.LINE_STRING]\n      );\n\n\n  styles[GeometryType.POINT] = [\n    new Style({\n      image: new CircleStyle({\n        radius: width * 2,\n        fill: new Fill({\n          color: blue\n        }),\n        stroke: new Stroke({\n          color: white,\n          width: width / 2\n        })\n      }),\n      zIndex: Infinity\n    })\n  ];\n  styles[GeometryType.MULTI_POINT] =\n      styles[GeometryType.POINT];\n\n  styles[GeometryType.GEOMETRY_COLLECTION] =\n      styles[GeometryType.POLYGON].concat(\n        styles[GeometryType.LINE_STRING],\n        styles[GeometryType.POINT]\n      );\n\n  return styles;\n}\n\n\n/**\n * Function that is called with a feature and returns its default geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature to get the geometry for.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default|undefined} Geometry to render.\n */\nfunction defaultGeometryFunction(feature) {\n  return feature.getGeometry();\n}\n\nexport default Style;\n\n//# sourceMappingURL=Style.js.map","/**\n * @module ol/tileurlfunction\n */\nimport {assert} from './asserts.js';\nimport {modulo} from './math.js';\nimport {hash as tileCoordHash} from './tilecoord.js';\n\n\n/**\n * @param {string} template Template.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplate(template, tileGrid) {\n  var zRegEx = /\\{z\\}/g;\n  var xRegEx = /\\{x\\}/g;\n  var yRegEx = /\\{y\\}/g;\n  var dashYRegEx = /\\{-y\\}/g;\n  return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function(tileCoord, pixelRatio, projection) {\n      if (!tileCoord) {\n        return undefined;\n      } else {\n        return template.replace(zRegEx, tileCoord[0].toString())\n          .replace(xRegEx, tileCoord[1].toString())\n          .replace(yRegEx, function() {\n            var y = -tileCoord[2] - 1;\n            return y.toString();\n          })\n          .replace(dashYRegEx, function() {\n            var z = tileCoord[0];\n            var range = tileGrid.getFullTileRange(z);\n            assert(range, 55); // The {-y} placeholder requires a tile grid with extent\n            var y = range.getHeight() + tileCoord[2];\n            return y.toString();\n          });\n      }\n    }\n  );\n}\n\n\n/**\n * @param {Array<string>} templates Templates.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTemplates(templates, tileGrid) {\n  var len = templates.length;\n  var tileUrlFunctions = new Array(len);\n  for (var i = 0; i < len; ++i) {\n    tileUrlFunctions[i] = createFromTemplate(templates[i], tileGrid);\n  }\n  return createFromTileUrlFunctions(tileUrlFunctions);\n}\n\n\n/**\n * @param {Array<import(\"./Tile.js\").UrlFunction>} tileUrlFunctions Tile URL Functions.\n * @return {import(\"./Tile.js\").UrlFunction} Tile URL function.\n */\nexport function createFromTileUrlFunctions(tileUrlFunctions) {\n  if (tileUrlFunctions.length === 1) {\n    return tileUrlFunctions[0];\n  }\n  return (\n    /**\n     * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"./proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function(tileCoord, pixelRatio, projection) {\n      if (!tileCoord) {\n        return undefined;\n      } else {\n        var h = tileCoordHash(tileCoord);\n        var index = modulo(h, tileUrlFunctions.length);\n        return tileUrlFunctions[index](tileCoord, pixelRatio, projection);\n      }\n    }\n  );\n}\n\n\n/**\n * @param {import(\"./tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @return {string|undefined} Tile URL.\n */\nexport function nullTileUrlFunction(tileCoord, pixelRatio, projection) {\n  return undefined;\n}\n\n\n/**\n * @param {string} url URL.\n * @return {Array<string>} Array of urls.\n */\nexport function expandUrl(url) {\n  var urls = [];\n  var match = /\\{([a-z])-([a-z])\\}/.exec(url);\n  if (match) {\n    // char range\n    var startCharCode = match[1].charCodeAt(0);\n    var stopCharCode = match[2].charCodeAt(0);\n    var charCode;\n    for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) {\n      urls.push(url.replace(match[0], String.fromCharCode(charCode)));\n    }\n    return urls;\n  }\n  match = match = /\\{(\\d+)-(\\d+)\\}/.exec(url);\n  if (match) {\n    // number range\n    var stop = parseInt(match[2], 10);\n    for (var i = parseInt(match[1], 10); i <= stop; i++) {\n      urls.push(url.replace(match[0], i.toString()));\n    }\n    return urls;\n  }\n  urls.push(url);\n  return urls;\n}\n\n//# sourceMappingURL=tileurlfunction.js.map","/**\n * @module ol/net\n */\nimport {getUid} from './util.js';\n\n\n/**\n * Simple JSONP helper. Supports error callbacks and a custom callback param.\n * The error callback will be called when no JSONP is executed after 10 seconds.\n *\n * @param {string} url Request url. A 'callback' query parameter will be\n *     appended.\n * @param {Function} callback Callback on success.\n * @param {function()=} opt_errback Callback on error.\n * @param {string=} opt_callbackParam Custom query parameter for the JSONP\n *     callback. Default is 'callback'.\n */\nexport function jsonp(url, callback, opt_errback, opt_callbackParam) {\n  var script = document.createElement('script');\n  var key = 'olc_' + getUid(callback);\n  function cleanup() {\n    delete window[key];\n    script.parentNode.removeChild(script);\n  }\n  script.async = true;\n  script.src = url + (url.indexOf('?') == -1 ? '?' : '&') +\n      (opt_callbackParam || 'callback') + '=' + key;\n  var timer = setTimeout(function() {\n    cleanup();\n    if (opt_errback) {\n      opt_errback();\n    }\n  }, 10000);\n  window[key] = function(data) {\n    clearTimeout(timer);\n    cleanup();\n    callback(data);\n  };\n  document.getElementsByTagName('head')[0].appendChild(script);\n}\n\n//# sourceMappingURL=net.js.map","/**\n * @module ol/reproj\n */\nimport {createCanvasContext2D} from './dom.js';\nimport {containsCoordinate, createEmpty, extend, getHeight, getTopLeft, getWidth} from './extent.js';\nimport {solveLinearSystem} from './math.js';\nimport {getPointResolution, transform} from './proj.js';\n\n\n/**\n * Calculates ideal resolution to use from the source in order to achieve\n * pixel mapping as close as possible to 1:1 during reprojection.\n * The resolution is calculated regardless of what resolutions\n * are actually available in the dataset (TileGrid, Image, ...).\n *\n * @param {import(\"./proj/Projection.js\").default} sourceProj Source projection.\n * @param {import(\"./proj/Projection.js\").default} targetProj Target projection.\n * @param {import(\"./coordinate.js\").Coordinate} targetCenter Target center.\n * @param {number} targetResolution Target resolution.\n * @return {number} The best resolution to use. Can be +-Infinity, NaN or 0.\n */\nexport function calculateSourceResolution(sourceProj, targetProj,\n  targetCenter, targetResolution) {\n\n  var sourceCenter = transform(targetCenter, targetProj, sourceProj);\n\n  // calculate the ideal resolution of the source data\n  var sourceResolution = getPointResolution(targetProj, targetResolution, targetCenter);\n\n  var targetMetersPerUnit = targetProj.getMetersPerUnit();\n  if (targetMetersPerUnit !== undefined) {\n    sourceResolution *= targetMetersPerUnit;\n  }\n  var sourceMetersPerUnit = sourceProj.getMetersPerUnit();\n  if (sourceMetersPerUnit !== undefined) {\n    sourceResolution /= sourceMetersPerUnit;\n  }\n\n  // Based on the projection properties, the point resolution at the specified\n  // coordinates may be slightly different. We need to reverse-compensate this\n  // in order to achieve optimal results.\n\n  var sourceExtent = sourceProj.getExtent();\n  if (!sourceExtent || containsCoordinate(sourceExtent, sourceCenter)) {\n    var compensationFactor = getPointResolution(sourceProj, sourceResolution, sourceCenter) /\n        sourceResolution;\n    if (isFinite(compensationFactor) && compensationFactor > 0) {\n      sourceResolution /= compensationFactor;\n    }\n  }\n\n  return sourceResolution;\n}\n\n\n/**\n * Enlarge the clipping triangle point by 1 pixel to ensure the edges overlap\n * in order to mask gaps caused by antialiasing.\n *\n * @param {number} centroidX Centroid of the triangle (x coordinate in pixels).\n * @param {number} centroidY Centroid of the triangle (y coordinate in pixels).\n * @param {number} x X coordinate of the point (in pixels).\n * @param {number} y Y coordinate of the point (in pixels).\n * @return {import(\"./coordinate.js\").Coordinate} New point 1 px farther from the centroid.\n */\nfunction enlargeClipPoint(centroidX, centroidY, x, y) {\n  var dX = x - centroidX;\n  var dY = y - centroidY;\n  var distance = Math.sqrt(dX * dX + dY * dY);\n  return [Math.round(x + dX / distance), Math.round(y + dY / distance)];\n}\n\n\n/**\n * Renders the source data into new canvas based on the triangulation.\n *\n * @param {number} width Width of the canvas.\n * @param {number} height Height of the canvas.\n * @param {number} pixelRatio Pixel ratio.\n * @param {number} sourceResolution Source resolution.\n * @param {import(\"./extent.js\").Extent} sourceExtent Extent of the data source.\n * @param {number} targetResolution Target resolution.\n * @param {import(\"./extent.js\").Extent} targetExtent Target extent.\n * @param {import(\"./reproj/Triangulation.js\").default} triangulation\n * Calculated triangulation.\n * @param {Array<{extent: import(\"./extent.js\").Extent,\n *                 image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources\n * Array of sources.\n * @param {number} gutter Gutter of the sources.\n * @param {boolean=} opt_renderEdges Render reprojection edges.\n * @return {HTMLCanvasElement} Canvas with reprojected data.\n */\nexport function render(width, height, pixelRatio,\n  sourceResolution, sourceExtent, targetResolution, targetExtent,\n  triangulation, sources, gutter, opt_renderEdges) {\n\n  var context = createCanvasContext2D(Math.round(pixelRatio * width),\n    Math.round(pixelRatio * height));\n\n  if (sources.length === 0) {\n    return context.canvas;\n  }\n\n  context.scale(pixelRatio, pixelRatio);\n\n  var sourceDataExtent = createEmpty();\n  sources.forEach(function(src, i, arr) {\n    extend(sourceDataExtent, src.extent);\n  });\n\n  var canvasWidthInUnits = getWidth(sourceDataExtent);\n  var canvasHeightInUnits = getHeight(sourceDataExtent);\n  var stitchContext = createCanvasContext2D(\n    Math.round(pixelRatio * canvasWidthInUnits / sourceResolution),\n    Math.round(pixelRatio * canvasHeightInUnits / sourceResolution));\n\n  var stitchScale = pixelRatio / sourceResolution;\n\n  sources.forEach(function(src, i, arr) {\n    var xPos = src.extent[0] - sourceDataExtent[0];\n    var yPos = -(src.extent[3] - sourceDataExtent[3]);\n    var srcWidth = getWidth(src.extent);\n    var srcHeight = getHeight(src.extent);\n\n    stitchContext.drawImage(\n      src.image,\n      gutter, gutter,\n      src.image.width - 2 * gutter, src.image.height - 2 * gutter,\n      xPos * stitchScale, yPos * stitchScale,\n      srcWidth * stitchScale, srcHeight * stitchScale);\n  });\n\n  var targetTopLeft = getTopLeft(targetExtent);\n\n  triangulation.getTriangles().forEach(function(triangle, i, arr) {\n    /* Calculate affine transform (src -> dst)\n     * Resulting matrix can be used to transform coordinate\n     * from `sourceProjection` to destination pixels.\n     *\n     * To optimize number of context calls and increase numerical stability,\n     * we also do the following operations:\n     * trans(-topLeftExtentCorner), scale(1 / targetResolution), scale(1, -1)\n     * here before solving the linear system so [ui, vi] are pixel coordinates.\n     *\n     * Src points: xi, yi\n     * Dst points: ui, vi\n     * Affine coefficients: aij\n     *\n     * | x0 y0 1  0  0 0 |   |a00|   |u0|\n     * | x1 y1 1  0  0 0 |   |a01|   |u1|\n     * | x2 y2 1  0  0 0 | x |a02| = |u2|\n     * |  0  0 0 x0 y0 1 |   |a10|   |v0|\n     * |  0  0 0 x1 y1 1 |   |a11|   |v1|\n     * |  0  0 0 x2 y2 1 |   |a12|   |v2|\n     */\n    var source = triangle.source;\n    var target = triangle.target;\n    var x0 = source[0][0], y0 = source[0][1];\n    var x1 = source[1][0], y1 = source[1][1];\n    var x2 = source[2][0], y2 = source[2][1];\n    var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n    var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n    var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n    var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n    var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n    var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n    // Shift all the source points to improve numerical stability\n    // of all the subsequent calculations. The [x0, y0] is used here.\n    // This is also used to simplify the linear system.\n    var sourceNumericalShiftX = x0;\n    var sourceNumericalShiftY = y0;\n    x0 = 0;\n    y0 = 0;\n    x1 -= sourceNumericalShiftX;\n    y1 -= sourceNumericalShiftY;\n    x2 -= sourceNumericalShiftX;\n    y2 -= sourceNumericalShiftY;\n\n    var augmentedMatrix = [\n      [x1, y1, 0, 0, u1 - u0],\n      [x2, y2, 0, 0, u2 - u0],\n      [0, 0, x1, y1, v1 - v0],\n      [0, 0, x2, y2, v2 - v0]\n    ];\n    var affineCoefs = solveLinearSystem(augmentedMatrix);\n    if (!affineCoefs) {\n      return;\n    }\n\n    context.save();\n    context.beginPath();\n    var centroidX = (u0 + u1 + u2) / 3;\n    var centroidY = (v0 + v1 + v2) / 3;\n    var p0 = enlargeClipPoint(centroidX, centroidY, u0, v0);\n    var p1 = enlargeClipPoint(centroidX, centroidY, u1, v1);\n    var p2 = enlargeClipPoint(centroidX, centroidY, u2, v2);\n\n    context.moveTo(p1[0], p1[1]);\n    context.lineTo(p0[0], p0[1]);\n    context.lineTo(p2[0], p2[1]);\n    context.clip();\n\n    context.transform(\n      affineCoefs[0], affineCoefs[2], affineCoefs[1], affineCoefs[3], u0, v0);\n\n    context.translate(sourceDataExtent[0] - sourceNumericalShiftX,\n      sourceDataExtent[3] - sourceNumericalShiftY);\n\n    context.scale(sourceResolution / pixelRatio,\n      -sourceResolution / pixelRatio);\n\n    context.drawImage(stitchContext.canvas, 0, 0);\n    context.restore();\n  });\n\n  if (opt_renderEdges) {\n    context.save();\n\n    context.strokeStyle = 'black';\n    context.lineWidth = 1;\n\n    triangulation.getTriangles().forEach(function(triangle, i, arr) {\n      var target = triangle.target;\n      var u0 = (target[0][0] - targetTopLeft[0]) / targetResolution;\n      var v0 = -(target[0][1] - targetTopLeft[1]) / targetResolution;\n      var u1 = (target[1][0] - targetTopLeft[0]) / targetResolution;\n      var v1 = -(target[1][1] - targetTopLeft[1]) / targetResolution;\n      var u2 = (target[2][0] - targetTopLeft[0]) / targetResolution;\n      var v2 = -(target[2][1] - targetTopLeft[1]) / targetResolution;\n\n      context.beginPath();\n      context.moveTo(u1, v1);\n      context.lineTo(u0, v0);\n      context.lineTo(u2, v2);\n      context.closePath();\n      context.stroke();\n    });\n\n    context.restore();\n  }\n  return context.canvas;\n}\n\n//# sourceMappingURL=reproj.js.map","/**\n * @module ol/reproj/Triangulation\n */\nimport {boundingExtent, createEmpty, extendCoordinate, getBottomLeft, getBottomRight,\n  getTopLeft, getTopRight, getWidth, intersects} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {getTransform} from '../proj.js';\n\n\n/**\n * Single triangle; consists of 3 source points and 3 target points.\n * @typedef {Object} Triangle\n * @property {Array<import(\"../coordinate.js\").Coordinate>} source\n * @property {Array<import(\"../coordinate.js\").Coordinate>} target\n */\n\n\n/**\n * Maximum number of subdivision steps during raster reprojection triangulation.\n * Prevents high memory usage and large number of proj4 calls (for certain\n * transformations and areas). At most `2*(2^this)` triangles are created for\n * each triangulated extent (tile/image).\n * @type {number}\n */\nvar MAX_SUBDIVISION = 10;\n\n\n/**\n * Maximum allowed size of triangle relative to world width. When transforming\n * corners of world extent between certain projections, the resulting\n * triangulation seems to have zero error and no subdivision is performed. If\n * the triangle width is more than this (relative to world width; 0-1),\n * subdivison is forced (up to `MAX_SUBDIVISION`). Default is `0.25`.\n * @type {number}\n */\nvar MAX_TRIANGLE_WIDTH = 0.25;\n\n\n/**\n * @classdesc\n * Class containing triangulation of the given target extent.\n * Used for determining source data and the reprojection itself.\n */\nvar Triangulation = function Triangulation(sourceProj, targetProj, targetExtent, maxSourceExtent, errorThreshold) {\n\n  /**\n   * @type {import(\"../proj/Projection.js\").default}\n   * @private\n   */\n  this.sourceProj_ = sourceProj;\n\n  /**\n   * @type {import(\"../proj/Projection.js\").default}\n   * @private\n   */\n  this.targetProj_ = targetProj;\n\n  /** @type {!Object<string, import(\"../coordinate.js\").Coordinate>} */\n  var transformInvCache = {};\n  var transformInv = getTransform(this.targetProj_, this.sourceProj_);\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} c A coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate} Transformed coordinate.\n   * @private\n   */\n  this.transformInv_ = function(c) {\n    var key = c[0] + '/' + c[1];\n    if (!transformInvCache[key]) {\n      transformInvCache[key] = transformInv(c);\n    }\n    return transformInvCache[key];\n  };\n\n  /**\n   * @type {import(\"../extent.js\").Extent}\n   * @private\n   */\n  this.maxSourceExtent_ = maxSourceExtent;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.errorThresholdSquared_ = errorThreshold * errorThreshold;\n\n  /**\n   * @type {Array<Triangle>}\n   * @private\n   */\n  this.triangles_ = [];\n\n  /**\n   * Indicates that the triangulation crosses edge of the source projection.\n   * @type {boolean}\n   * @private\n   */\n  this.wrapsXInSource_ = false;\n\n  /**\n   * @type {boolean}\n   * @private\n   */\n  this.canWrapXInSource_ = this.sourceProj_.canWrapX() &&\n      !!maxSourceExtent &&\n      !!this.sourceProj_.getExtent() &&\n      (getWidth(maxSourceExtent) == getWidth(this.sourceProj_.getExtent()));\n\n  /**\n   * @type {?number}\n   * @private\n   */\n  this.sourceWorldWidth_ = this.sourceProj_.getExtent() ?\n    getWidth(this.sourceProj_.getExtent()) : null;\n\n  /**\n   * @type {?number}\n   * @private\n   */\n  this.targetWorldWidth_ = this.targetProj_.getExtent() ?\n    getWidth(this.targetProj_.getExtent()) : null;\n\n  var destinationTopLeft = getTopLeft(targetExtent);\n  var destinationTopRight = getTopRight(targetExtent);\n  var destinationBottomRight = getBottomRight(targetExtent);\n  var destinationBottomLeft = getBottomLeft(targetExtent);\n  var sourceTopLeft = this.transformInv_(destinationTopLeft);\n  var sourceTopRight = this.transformInv_(destinationTopRight);\n  var sourceBottomRight = this.transformInv_(destinationBottomRight);\n  var sourceBottomLeft = this.transformInv_(destinationBottomLeft);\n\n  this.addQuad_(\n    destinationTopLeft, destinationTopRight,\n    destinationBottomRight, destinationBottomLeft,\n    sourceTopLeft, sourceTopRight, sourceBottomRight, sourceBottomLeft,\n    MAX_SUBDIVISION);\n\n  if (this.wrapsXInSource_) {\n    var leftBound = Infinity;\n    this.triangles_.forEach(function(triangle, i, arr) {\n      leftBound = Math.min(leftBound,\n        triangle.source[0][0], triangle.source[1][0], triangle.source[2][0]);\n    });\n\n    // Shift triangles to be as close to `leftBound` as possible\n    // (if the distance is more than `worldWidth / 2` it can be closer.\n    this.triangles_.forEach(function(triangle) {\n      if (Math.max(triangle.source[0][0], triangle.source[1][0],\n        triangle.source[2][0]) - leftBound > this.sourceWorldWidth_ / 2) {\n        var newTriangle = [[triangle.source[0][0], triangle.source[0][1]],\n          [triangle.source[1][0], triangle.source[1][1]],\n          [triangle.source[2][0], triangle.source[2][1]]];\n        if ((newTriangle[0][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n          newTriangle[0][0] -= this.sourceWorldWidth_;\n        }\n        if ((newTriangle[1][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n          newTriangle[1][0] -= this.sourceWorldWidth_;\n        }\n        if ((newTriangle[2][0] - leftBound) > this.sourceWorldWidth_ / 2) {\n          newTriangle[2][0] -= this.sourceWorldWidth_;\n        }\n\n        // Rarely (if the extent contains both the dateline and prime meridian)\n        // the shift can in turn break some triangles.\n        // Detect this here and don't shift in such cases.\n        var minX = Math.min(\n          newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n        var maxX = Math.max(\n          newTriangle[0][0], newTriangle[1][0], newTriangle[2][0]);\n        if ((maxX - minX) < this.sourceWorldWidth_ / 2) {\n          triangle.source = newTriangle;\n        }\n      }\n    }.bind(this));\n  }\n\n  transformInvCache = {};\n};\n\n/**\n * Adds triangle to the triangulation.\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @private\n */\nTriangulation.prototype.addTriangle_ = function addTriangle_ (a, b, c, aSrc, bSrc, cSrc) {\n  this.triangles_.push({\n    source: [aSrc, bSrc, cSrc],\n    target: [a, b, c]\n  });\n};\n\n/**\n * Adds quad (points in clock-wise order) to the triangulation\n * (and reprojects the vertices) if valid.\n * Performs quad subdivision if needed to increase precision.\n *\n * @param {import(\"../coordinate.js\").Coordinate} a The target a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} b The target b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} c The target c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} d The target d coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} aSrc The source a coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} bSrc The source b coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} cSrc The source c coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} dSrc The source d coordinate.\n * @param {number} maxSubdivision Maximal allowed subdivision of the quad.\n * @private\n */\nTriangulation.prototype.addQuad_ = function addQuad_ (a, b, c, d, aSrc, bSrc, cSrc, dSrc, maxSubdivision) {\n\n  var sourceQuadExtent = boundingExtent([aSrc, bSrc, cSrc, dSrc]);\n  var sourceCoverageX = this.sourceWorldWidth_ ?\n    getWidth(sourceQuadExtent) / this.sourceWorldWidth_ : null;\n  var sourceWorldWidth = /** @type {number} */ (this.sourceWorldWidth_);\n\n  // when the quad is wrapped in the source projection\n  // it covers most of the projection extent, but not fully\n  var wrapsX = this.sourceProj_.canWrapX() &&\n               sourceCoverageX > 0.5 && sourceCoverageX < 1;\n\n  var needsSubdivision = false;\n\n  if (maxSubdivision > 0) {\n    if (this.targetProj_.isGlobal() && this.targetWorldWidth_) {\n      var targetQuadExtent = boundingExtent([a, b, c, d]);\n      var targetCoverageX = getWidth(targetQuadExtent) / this.targetWorldWidth_;\n      needsSubdivision = targetCoverageX > MAX_TRIANGLE_WIDTH ||\n        needsSubdivision;\n    }\n    if (!wrapsX && this.sourceProj_.isGlobal() && sourceCoverageX) {\n      needsSubdivision = sourceCoverageX > MAX_TRIANGLE_WIDTH ||\n          needsSubdivision;\n    }\n  }\n\n  if (!needsSubdivision && this.maxSourceExtent_) {\n    if (!intersects(sourceQuadExtent, this.maxSourceExtent_)) {\n      // whole quad outside source projection extent -> ignore\n      return;\n    }\n  }\n\n  if (!needsSubdivision) {\n    if (!isFinite(aSrc[0]) || !isFinite(aSrc[1]) ||\n        !isFinite(bSrc[0]) || !isFinite(bSrc[1]) ||\n        !isFinite(cSrc[0]) || !isFinite(cSrc[1]) ||\n        !isFinite(dSrc[0]) || !isFinite(dSrc[1])) {\n      if (maxSubdivision > 0) {\n        needsSubdivision = true;\n      } else {\n        return;\n      }\n    }\n  }\n\n  if (maxSubdivision > 0) {\n    if (!needsSubdivision) {\n      var center = [(a[0] + c[0]) / 2, (a[1] + c[1]) / 2];\n      var centerSrc = this.transformInv_(center);\n\n      var dx;\n      if (wrapsX) {\n        var centerSrcEstimX =\n            (modulo(aSrc[0], sourceWorldWidth) +\n             modulo(cSrc[0], sourceWorldWidth)) / 2;\n        dx = centerSrcEstimX -\n            modulo(centerSrc[0], sourceWorldWidth);\n      } else {\n        dx = (aSrc[0] + cSrc[0]) / 2 - centerSrc[0];\n      }\n      var dy = (aSrc[1] + cSrc[1]) / 2 - centerSrc[1];\n      var centerSrcErrorSquared = dx * dx + dy * dy;\n      needsSubdivision = centerSrcErrorSquared > this.errorThresholdSquared_;\n    }\n    if (needsSubdivision) {\n      if (Math.abs(a[0] - c[0]) <= Math.abs(a[1] - c[1])) {\n        // split horizontally (top & bottom)\n        var bc = [(b[0] + c[0]) / 2, (b[1] + c[1]) / 2];\n        var bcSrc = this.transformInv_(bc);\n        var da = [(d[0] + a[0]) / 2, (d[1] + a[1]) / 2];\n        var daSrc = this.transformInv_(da);\n\n        this.addQuad_(\n          a, b, bc, da, aSrc, bSrc, bcSrc, daSrc, maxSubdivision - 1);\n        this.addQuad_(\n          da, bc, c, d, daSrc, bcSrc, cSrc, dSrc, maxSubdivision - 1);\n      } else {\n        // split vertically (left & right)\n        var ab = [(a[0] + b[0]) / 2, (a[1] + b[1]) / 2];\n        var abSrc = this.transformInv_(ab);\n        var cd = [(c[0] + d[0]) / 2, (c[1] + d[1]) / 2];\n        var cdSrc = this.transformInv_(cd);\n\n        this.addQuad_(\n          a, ab, cd, d, aSrc, abSrc, cdSrc, dSrc, maxSubdivision - 1);\n        this.addQuad_(\n          ab, b, c, cd, abSrc, bSrc, cSrc, cdSrc, maxSubdivision - 1);\n      }\n      return;\n    }\n  }\n\n  if (wrapsX) {\n    if (!this.canWrapXInSource_) {\n      return;\n    }\n    this.wrapsXInSource_ = true;\n  }\n\n  this.addTriangle_(a, c, d, aSrc, cSrc, dSrc);\n  this.addTriangle_(a, b, c, aSrc, bSrc, cSrc);\n};\n\n/**\n * Calculates extent of the 'source' coordinates from all the triangles.\n *\n * @return {import(\"../extent.js\").Extent} Calculated extent.\n */\nTriangulation.prototype.calculateSourceExtent = function calculateSourceExtent () {\n  var extent = createEmpty();\n\n  this.triangles_.forEach(function(triangle, i, arr) {\n    var src = triangle.source;\n    extendCoordinate(extent, src[0]);\n    extendCoordinate(extent, src[1]);\n    extendCoordinate(extent, src[2]);\n  });\n\n  return extent;\n};\n\n/**\n * @return {Array<Triangle>} Array of the calculated triangles.\n */\nTriangulation.prototype.getTriangles = function getTriangles () {\n  return this.triangles_;\n};\n\nexport default Triangulation;\n\n//# sourceMappingURL=Triangulation.js.map","/**\n * @module ol/reproj/Tile\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getArea, getCenter, getIntersection} from '../extent.js';\nimport {clamp} from '../math.js';\nimport {calculateSourceResolution, render as renderReprojected} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\n\n\n/**\n * @typedef {function(number, number, number, number) : import(\"../Tile.js\").default} FunctionType\n */\n\n\n/**\n * @classdesc\n * Class encapsulating single reprojected tile.\n * See {@link module:ol/source/TileImage~TileImage}.\n *\n */\nvar ReprojTile = /*@__PURE__*/(function (Tile) {\n  function ReprojTile(\n    sourceProj,\n    sourceTileGrid,\n    targetProj,\n    targetTileGrid,\n    tileCoord,\n    wrappedTileCoord,\n    pixelRatio,\n    gutter,\n    getTileFunction,\n    opt_errorThreshold,\n    opt_renderEdges\n  ) {\n    Tile.call(this, tileCoord, TileState.IDLE);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.pixelRatio_ = pixelRatio;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = gutter;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.sourceTileGrid_ = sourceTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilegrid/TileGrid.js\").default}\n     */\n    this.targetTileGrid_ = targetTileGrid;\n\n    /**\n     * @private\n     * @type {import(\"../tilecoord.js\").TileCoord}\n     */\n    this.wrappedTileCoord_ = wrappedTileCoord ? wrappedTileCoord : tileCoord;\n\n    /**\n     * @private\n     * @type {!Array<import(\"../Tile.js\").default>}\n     */\n    this.sourceTiles_ = [];\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.sourcesListenerKeys_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourceZ_ = 0;\n\n    var targetExtent = targetTileGrid.getTileCoordExtent(this.wrappedTileCoord_);\n    var maxTargetExtent = this.targetTileGrid_.getExtent();\n    var maxSourceExtent = this.sourceTileGrid_.getExtent();\n\n    var limitedTargetExtent = maxTargetExtent ?\n      getIntersection(targetExtent, maxTargetExtent) : targetExtent;\n\n    if (getArea(limitedTargetExtent) === 0) {\n      // Tile is completely outside range -> EMPTY\n      // TODO: is it actually correct that the source even creates the tile ?\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    var sourceProjExtent = sourceProj.getExtent();\n    if (sourceProjExtent) {\n      if (!maxSourceExtent) {\n        maxSourceExtent = sourceProjExtent;\n      } else {\n        maxSourceExtent = getIntersection(maxSourceExtent, sourceProjExtent);\n      }\n    }\n\n    var targetResolution = targetTileGrid.getResolution(\n      this.wrappedTileCoord_[0]);\n\n    var targetCenter = getCenter(limitedTargetExtent);\n    var sourceResolution = calculateSourceResolution(\n      sourceProj, targetProj, targetCenter, targetResolution);\n\n    if (!isFinite(sourceResolution) || sourceResolution <= 0) {\n      // invalid sourceResolution -> EMPTY\n      // probably edges of the projections when no extent is defined\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    var errorThresholdInPixels = opt_errorThreshold !== undefined ?\n      opt_errorThreshold : ERROR_THRESHOLD;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = new Triangulation(\n      sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,\n      sourceResolution * errorThresholdInPixels);\n\n    if (this.triangulation_.getTriangles().length === 0) {\n      // no valid triangles -> EMPTY\n      this.state = TileState.EMPTY;\n      return;\n    }\n\n    this.sourceZ_ = sourceTileGrid.getZForResolution(sourceResolution);\n    var sourceExtent = this.triangulation_.calculateSourceExtent();\n\n    if (maxSourceExtent) {\n      if (sourceProj.canWrapX()) {\n        sourceExtent[1] = clamp(\n          sourceExtent[1], maxSourceExtent[1], maxSourceExtent[3]);\n        sourceExtent[3] = clamp(\n          sourceExtent[3], maxSourceExtent[1], maxSourceExtent[3]);\n      } else {\n        sourceExtent = getIntersection(sourceExtent, maxSourceExtent);\n      }\n    }\n\n    if (!getArea(sourceExtent)) {\n      this.state = TileState.EMPTY;\n    } else {\n      var sourceRange = sourceTileGrid.getTileRangeForExtentAndZ(\n        sourceExtent, this.sourceZ_);\n\n      for (var srcX = sourceRange.minX; srcX <= sourceRange.maxX; srcX++) {\n        for (var srcY = sourceRange.minY; srcY <= sourceRange.maxY; srcY++) {\n          var tile = getTileFunction(this.sourceZ_, srcX, srcY, pixelRatio);\n          if (tile) {\n            this.sourceTiles_.push(tile);\n          }\n        }\n      }\n\n      if (this.sourceTiles_.length === 0) {\n        this.state = TileState.EMPTY;\n      }\n    }\n  }\n\n  if ( Tile ) ReprojTile.__proto__ = Tile;\n  ReprojTile.prototype = Object.create( Tile && Tile.prototype );\n  ReprojTile.prototype.constructor = ReprojTile;\n\n  /**\n   * @inheritDoc\n   */\n  ReprojTile.prototype.disposeInternal = function disposeInternal () {\n    if (this.state == TileState.LOADING) {\n      this.unlistenSources_();\n    }\n    Tile.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * Get the HTML Canvas element for this tile.\n   * @return {HTMLCanvasElement} Canvas.\n   */\n  ReprojTile.prototype.getImage = function getImage () {\n    return this.canvas_;\n  };\n\n  /**\n   * @private\n   */\n  ReprojTile.prototype.reproject_ = function reproject_ () {\n    var sources = [];\n    this.sourceTiles_.forEach(function(tile, i, arr) {\n      if (tile && tile.getState() == TileState.LOADED) {\n        sources.push({\n          extent: this.sourceTileGrid_.getTileCoordExtent(tile.tileCoord),\n          image: tile.getImage()\n        });\n      }\n    }.bind(this));\n    this.sourceTiles_.length = 0;\n\n    if (sources.length === 0) {\n      this.state = TileState.ERROR;\n    } else {\n      var z = this.wrappedTileCoord_[0];\n      var size = this.targetTileGrid_.getTileSize(z);\n      var width = typeof size === 'number' ? size : size[0];\n      var height = typeof size === 'number' ? size : size[1];\n      var targetResolution = this.targetTileGrid_.getResolution(z);\n      var sourceResolution = this.sourceTileGrid_.getResolution(this.sourceZ_);\n\n      var targetExtent = this.targetTileGrid_.getTileCoordExtent(\n        this.wrappedTileCoord_);\n      this.canvas_ = renderReprojected(width, height, this.pixelRatio_,\n        sourceResolution, this.sourceTileGrid_.getExtent(),\n        targetResolution, targetExtent, this.triangulation_, sources,\n        this.gutter_, this.renderEdges_);\n\n      this.state = TileState.LOADED;\n    }\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ReprojTile.prototype.load = function load () {\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      this.changed();\n\n      var leftToLoad = 0;\n\n      this.sourcesListenerKeys_ = [];\n      this.sourceTiles_.forEach(function(tile, i, arr) {\n        var state = tile.getState();\n        if (state == TileState.IDLE || state == TileState.LOADING) {\n          leftToLoad++;\n\n          var sourceListenKey = listen(tile, EventType.CHANGE,\n            function(e) {\n              var state = tile.getState();\n              if (state == TileState.LOADED ||\n                    state == TileState.ERROR ||\n                    state == TileState.EMPTY) {\n                unlistenByKey(sourceListenKey);\n                leftToLoad--;\n                if (leftToLoad === 0) {\n                  this.unlistenSources_();\n                  this.reproject_();\n                }\n              }\n            }, this);\n          this.sourcesListenerKeys_.push(sourceListenKey);\n        }\n      }.bind(this));\n\n      this.sourceTiles_.forEach(function(tile, i, arr) {\n        var state = tile.getState();\n        if (state == TileState.IDLE) {\n          tile.load();\n        }\n      });\n\n      if (leftToLoad === 0) {\n        setTimeout(this.reproject_.bind(this), 0);\n      }\n    }\n  };\n\n  /**\n   * @private\n   */\n  ReprojTile.prototype.unlistenSources_ = function unlistenSources_ () {\n    this.sourcesListenerKeys_.forEach(unlistenByKey);\n    this.sourcesListenerKeys_ = null;\n  };\n\n  return ReprojTile;\n}(Tile));\n\n\nexport default ReprojTile;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/source/TileEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n\n  /**\n   * Triggered when a tile starts loading.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadstart\n   * @api\n   */\n  TILELOADSTART: 'tileloadstart',\n\n  /**\n   * Triggered when a tile finishes loading, either when its data is loaded,\n   * or when loading was aborted because the tile is no longer needed.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloadend\n   * @api\n   */\n  TILELOADEND: 'tileloadend',\n\n  /**\n   * Triggered if tile loading results in an error.\n   * @event module:ol/source/Tile.TileSourceEvent#tileloaderror\n   * @api\n   */\n  TILELOADERROR: 'tileloaderror'\n\n};\n\n//# sourceMappingURL=TileEventType.js.map","/**\n * @module ol/source/UrlTile\n */\nimport {getUid} from '../util.js';\nimport TileState from '../TileState.js';\nimport {expandUrl, createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport TileSource, {TileSourceEvent} from './Tile.js';\nimport TileEventType from './TileEventType.js';\nimport {getKeyZXY} from '../tilecoord.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize]\n * @property {boolean} [opaque]\n * @property {import(\"../proj.js\").ProjectionLike} [projection]\n * @property {import(\"./State.js\").default} [state]\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid]\n * @property {import(\"../Tile.js\").LoadFunction} tileLoadFunction\n * @property {number} [tilePixelRatio]\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction]\n * @property {string} [url]\n * @property {Array<string>} [urls]\n * @property {boolean} [wrapX=true]\n * @property {number} [transition]\n * @property {string} [key]\n */\n\n\n/**\n * @classdesc\n * Base class for sources providing tiles divided into a tile grid over http.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n */\nvar UrlTile = /*@__PURE__*/(function (TileSource) {\n  function UrlTile(options) {\n\n    TileSource.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      opaque: options.opaque,\n      projection: options.projection,\n      state: options.state,\n      tileGrid: options.tileGrid,\n      tilePixelRatio: options.tilePixelRatio,\n      wrapX: options.wrapX,\n      transition: options.transition,\n      key: options.key,\n      attributionsCollapsible: options.attributionsCollapsible\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.generateTileUrlFunction_ = !options.tileUrlFunction;\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").LoadFunction}\n     */\n    this.tileLoadFunction = options.tileLoadFunction;\n\n    /**\n     * @protected\n     * @type {import(\"../Tile.js\").UrlFunction}\n     */\n    this.tileUrlFunction = options.tileUrlFunction ? options.tileUrlFunction.bind(this) : nullTileUrlFunction;\n\n    /**\n     * @protected\n     * @type {!Array<string>|null}\n     */\n    this.urls = null;\n\n    if (options.urls) {\n      this.setUrls(options.urls);\n    } else if (options.url) {\n      this.setUrl(options.url);\n    }\n\n    if (options.tileUrlFunction) {\n      this.setTileUrlFunction(options.tileUrlFunction, this.key_);\n    }\n\n    /**\n     * @private\n     * @type {!Object<string, boolean>}\n     */\n    this.tileLoadingKeys_ = {};\n\n  }\n\n  if ( TileSource ) UrlTile.__proto__ = TileSource;\n  UrlTile.prototype = Object.create( TileSource && TileSource.prototype );\n  UrlTile.prototype.constructor = UrlTile;\n\n  /**\n   * Return the tile load function of the source.\n   * @return {import(\"../Tile.js\").LoadFunction} TileLoadFunction\n   * @api\n   */\n  UrlTile.prototype.getTileLoadFunction = function getTileLoadFunction () {\n    return this.tileLoadFunction;\n  };\n\n  /**\n   * Return the tile URL function of the source.\n   * @return {import(\"../Tile.js\").UrlFunction} TileUrlFunction\n   * @api\n   */\n  UrlTile.prototype.getTileUrlFunction = function getTileUrlFunction () {\n    return this.tileUrlFunction;\n  };\n\n  /**\n   * Return the URLs used for this source.\n   * When a tileUrlFunction is used instead of url or urls,\n   * null will be returned.\n   * @return {!Array<string>|null} URLs.\n   * @api\n   */\n  UrlTile.prototype.getUrls = function getUrls () {\n    return this.urls;\n  };\n\n  /**\n   * Handle tile change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   * @protected\n   */\n  UrlTile.prototype.handleTileChange = function handleTileChange (event) {\n    var tile = /** @type {import(\"../Tile.js\").default} */ (event.target);\n    var uid = getUid(tile);\n    var tileState = tile.getState();\n    var type;\n    if (tileState == TileState.LOADING) {\n      this.tileLoadingKeys_[uid] = true;\n      type = TileEventType.TILELOADSTART;\n    } else if (uid in this.tileLoadingKeys_) {\n      delete this.tileLoadingKeys_[uid];\n      type = tileState == TileState.ERROR ? TileEventType.TILELOADERROR :\n        (tileState == TileState.LOADED || tileState == TileState.ABORT) ?\n          TileEventType.TILELOADEND : undefined;\n    }\n    if (type != undefined) {\n      this.dispatchEvent(new TileSourceEvent(type, tile));\n    }\n  };\n\n  /**\n   * Set the tile load function of the source.\n   * @param {import(\"../Tile.js\").LoadFunction} tileLoadFunction Tile load function.\n   * @api\n   */\n  UrlTile.prototype.setTileLoadFunction = function setTileLoadFunction (tileLoadFunction) {\n    this.tileCache.clear();\n    this.tileLoadFunction = tileLoadFunction;\n    this.changed();\n  };\n\n  /**\n   * Set the tile URL function of the source.\n   * @param {import(\"../Tile.js\").UrlFunction} tileUrlFunction Tile URL function.\n   * @param {string=} key Optional new tile key for the source.\n   * @api\n   */\n  UrlTile.prototype.setTileUrlFunction = function setTileUrlFunction (tileUrlFunction, key) {\n    this.tileUrlFunction = tileUrlFunction;\n    this.tileCache.pruneExceptNewestZ();\n    if (typeof key !== 'undefined') {\n      this.setKey(key);\n    } else {\n      this.changed();\n    }\n  };\n\n  /**\n   * Set the URL to use for requests.\n   * @param {string} url URL.\n   * @api\n   */\n  UrlTile.prototype.setUrl = function setUrl (url) {\n    var urls = this.urls = expandUrl(url);\n    this.setUrls(urls);\n  };\n\n  /**\n   * Set the URLs to use for requests.\n   * @param {Array<string>} urls URLs.\n   * @api\n   */\n  UrlTile.prototype.setUrls = function setUrls (urls) {\n    this.urls = urls;\n    var key = urls.join('\\n');\n    if (this.generateTileUrlFunction_) {\n      this.setTileUrlFunction(createFromTemplates(urls, this.tileGrid), key);\n    } else {\n      this.setKey(key);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  UrlTile.prototype.useTile = function useTile (z, x, y) {\n    var tileCoordKey = getKeyZXY(z, x, y);\n    if (this.tileCache.containsKey(tileCoordKey)) {\n      this.tileCache.get(tileCoordKey);\n    }\n  };\n\n  return UrlTile;\n}(TileSource));\n\n\nexport default UrlTile;\n\n//# sourceMappingURL=UrlTile.js.map","/**\n * @module ol/source/TileImage\n */\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport {getUid} from '../util.js';\nimport ImageTile from '../ImageTile.js';\nimport TileCache from '../TileCache.js';\nimport TileState from '../TileState.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {equivalent, get as getProjection} from '../proj.js';\nimport ReprojTile from '../reproj/Tile.js';\nimport UrlTile from './UrlTile.js';\nimport {getKey, getKeyZXY} from '../tilecoord.js';\nimport {getForProjection as getTileGridForProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service. For example, if the tile\n * service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to\n * request out-of-bounds tiles from the server. When set to `false`, only one\n * world will be rendered. When set to `true`, tiles will be requested for one\n * world only, but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {string} [key] Optional tile key for proper cache fetching\n */\n\n\n/**\n * @classdesc\n * Base class for sources providing images divided into a tile grid.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar TileImage = /*@__PURE__*/(function (UrlTile) {\n  function TileImage(options) {\n\n    UrlTile.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      opaque: options.opaque,\n      projection: options.projection,\n      state: options.state,\n      tileGrid: options.tileGrid,\n      tileLoadFunction: options.tileLoadFunction ?\n        options.tileLoadFunction : defaultTileLoadFunction,\n      tilePixelRatio: options.tilePixelRatio,\n      tileUrlFunction: options.tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX,\n      transition: options.transition,\n      key: options.key,\n      attributionsCollapsible: options.attributionsCollapsible\n    });\n\n    /**\n     * @protected\n     * @type {?string}\n     */\n    this.crossOrigin =\n        options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @protected\n     * @type {typeof ImageTile}\n     */\n    this.tileClass = options.tileClass !== undefined ?\n      options.tileClass : ImageTile;\n\n    /**\n     * @protected\n     * @type {!Object<string, TileCache>}\n     */\n    this.tileCacheForProjection = {};\n\n    /**\n     * @protected\n     * @type {!Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n     */\n    this.tileGridForProjection = {};\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.reprojectionErrorThreshold_ = options.reprojectionErrorThreshold;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderReprojectionEdges_ = false;\n  }\n\n  if ( UrlTile ) TileImage.__proto__ = UrlTile;\n  TileImage.prototype = Object.create( UrlTile && UrlTile.prototype );\n  TileImage.prototype.constructor = TileImage;\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.canExpireCache = function canExpireCache () {\n    if (!ENABLE_RASTER_REPROJECTION) {\n      return UrlTile.prototype.canExpireCache.call(this);\n    }\n    if (this.tileCache.canExpireCache()) {\n      return true;\n    } else {\n      for (var key in this.tileCacheForProjection) {\n        if (this.tileCacheForProjection[key].canExpireCache()) {\n          return true;\n        }\n      }\n    }\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.expireCache = function expireCache (projection, usedTiles) {\n    if (!ENABLE_RASTER_REPROJECTION) {\n      UrlTile.prototype.expireCache.call(this, projection, usedTiles);\n      return;\n    }\n    var usedTileCache = this.getTileCacheForProjection(projection);\n\n    this.tileCache.expireCache(this.tileCache == usedTileCache ? usedTiles : {});\n    for (var id in this.tileCacheForProjection) {\n      var tileCache = this.tileCacheForProjection[id];\n      tileCache.expireCache(tileCache == usedTileCache ? usedTiles : {});\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.getGutterForProjection = function getGutterForProjection (projection) {\n    if (ENABLE_RASTER_REPROJECTION &&\n        this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n      return 0;\n    } else {\n      return this.getGutter();\n    }\n  };\n\n  /**\n   * @return {number} Gutter.\n   */\n  TileImage.prototype.getGutter = function getGutter () {\n    return 0;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.getOpaque = function getOpaque (projection) {\n    if (ENABLE_RASTER_REPROJECTION &&\n        this.getProjection() && projection && !equivalent(this.getProjection(), projection)) {\n      return false;\n    } else {\n      return UrlTile.prototype.getOpaque.call(this, projection);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.getTileGridForProjection = function getTileGridForProjection$1 (projection) {\n    if (!ENABLE_RASTER_REPROJECTION) {\n      return UrlTile.prototype.getTileGridForProjection.call(this, projection);\n    }\n    var thisProj = this.getProjection();\n    if (this.tileGrid && (!thisProj || equivalent(thisProj, projection))) {\n      return this.tileGrid;\n    } else {\n      var projKey = getUid(projection);\n      if (!(projKey in this.tileGridForProjection)) {\n        this.tileGridForProjection[projKey] = getTileGridForProjection(projection);\n      }\n      return (\n        /** @type {!import(\"../tilegrid/TileGrid.js\").default} */ (this.tileGridForProjection[projKey])\n      );\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.getTileCacheForProjection = function getTileCacheForProjection (projection) {\n    if (!ENABLE_RASTER_REPROJECTION) {\n      return UrlTile.prototype.getTileCacheForProjection.call(this, projection);\n    }\n    var thisProj = this.getProjection(); if (!thisProj || equivalent(thisProj, projection)) {\n      return this.tileCache;\n    } else {\n      var projKey = getUid(projection);\n      if (!(projKey in this.tileCacheForProjection)) {\n        this.tileCacheForProjection[projKey] = new TileCache(this.tileCache.highWaterMark);\n      }\n      return this.tileCacheForProjection[projKey];\n    }\n  };\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {string} key The key set on the tile.\n   * @return {!import(\"../Tile.js\").default} Tile.\n   * @private\n   */\n  TileImage.prototype.createTile_ = function createTile_ (z, x, y, pixelRatio, projection, key) {\n    var tileCoord = [z, x, y];\n    var urlTileCoord = this.getTileCoordForTileUrlFunction(\n      tileCoord, projection);\n    var tileUrl = urlTileCoord ?\n      this.tileUrlFunction(urlTileCoord, pixelRatio, projection) : undefined;\n    var tile = new this.tileClass(\n      tileCoord,\n      tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n      tileUrl !== undefined ? tileUrl : '',\n      this.crossOrigin,\n      this.tileLoadFunction,\n      this.tileOptions);\n    tile.key = key;\n    listen(tile, EventType.CHANGE,\n      this.handleTileChange, this);\n    return tile;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileImage.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    var sourceProjection = /** @type {!import(\"../proj/Projection.js\").default} */ (this.getProjection());\n    if (!ENABLE_RASTER_REPROJECTION ||\n        !sourceProjection || !projection || equivalent(sourceProjection, projection)) {\n      return this.getTileInternal(z, x, y, pixelRatio, sourceProjection || projection);\n    } else {\n      var cache = this.getTileCacheForProjection(projection);\n      var tileCoord = [z, x, y];\n      var tile;\n      var tileCoordKey = getKey(tileCoord);\n      if (cache.containsKey(tileCoordKey)) {\n        tile = /** @type {!import(\"../Tile.js\").default} */ (cache.get(tileCoordKey));\n      }\n      var key = this.getKey();\n      if (tile && tile.key == key) {\n        return tile;\n      } else {\n        var sourceTileGrid = this.getTileGridForProjection(sourceProjection);\n        var targetTileGrid = this.getTileGridForProjection(projection);\n        var wrappedTileCoord =\n            this.getTileCoordForTileUrlFunction(tileCoord, projection);\n        var newTile = new ReprojTile(\n          sourceProjection, sourceTileGrid,\n          projection, targetTileGrid,\n          tileCoord, wrappedTileCoord, this.getTilePixelRatio(pixelRatio),\n          this.getGutter(),\n          function(z, x, y, pixelRatio) {\n            return this.getTileInternal(z, x, y, pixelRatio, sourceProjection);\n          }.bind(this), this.reprojectionErrorThreshold_,\n          this.renderReprojectionEdges_);\n        newTile.key = key;\n\n        if (tile) {\n          newTile.interimTile = tile;\n          newTile.refreshInterimChain();\n          cache.replace(tileCoordKey, newTile);\n        } else {\n          cache.set(tileCoordKey, newTile);\n        }\n        return newTile;\n      }\n    }\n  };\n\n  /**\n   * @param {number} z Tile coordinate z.\n   * @param {number} x Tile coordinate x.\n   * @param {number} y Tile coordinate y.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {!import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {!import(\"../Tile.js\").default} Tile.\n   * @protected\n   */\n  TileImage.prototype.getTileInternal = function getTileInternal (z, x, y, pixelRatio, projection) {\n    var tile = null;\n    var tileCoordKey = getKeyZXY(z, x, y);\n    var key = this.getKey();\n    if (!this.tileCache.containsKey(tileCoordKey)) {\n      tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n      this.tileCache.set(tileCoordKey, tile);\n    } else {\n      tile = this.tileCache.get(tileCoordKey);\n      if (tile.key != key) {\n        // The source's params changed. If the tile has an interim tile and if we\n        // can use it then we use it. Otherwise we create a new tile.  In both\n        // cases we attempt to assign an interim tile to the new tile.\n        var interimTile = tile;\n        tile = this.createTile_(z, x, y, pixelRatio, projection, key);\n\n        //make the new tile the head of the list,\n        if (interimTile.getState() == TileState.IDLE) {\n          //the old tile hasn't begun loading yet, and is now outdated, so we can simply discard it\n          tile.interimTile = interimTile.interimTile;\n        } else {\n          tile.interimTile = interimTile;\n        }\n        tile.refreshInterimChain();\n        this.tileCache.replace(tileCoordKey, tile);\n      }\n    }\n    return tile;\n  };\n\n  /**\n   * Sets whether to render reprojection edges or not (usually for debugging).\n   * @param {boolean} render Render the edges.\n   * @api\n   */\n  TileImage.prototype.setRenderReprojectionEdges = function setRenderReprojectionEdges (render) {\n    if (!ENABLE_RASTER_REPROJECTION ||\n        this.renderReprojectionEdges_ == render) {\n      return;\n    }\n    this.renderReprojectionEdges_ = render;\n    for (var id in this.tileCacheForProjection) {\n      this.tileCacheForProjection[id].clear();\n    }\n    this.changed();\n  };\n\n  /**\n   * Sets the tile grid to use when reprojecting the tiles to the given\n   * projection instead of the default tile grid for the projection.\n   *\n   * This can be useful when the default tile grid cannot be created\n   * (e.g. projection has no extent defined) or\n   * for optimization reasons (custom tile size, resolutions, ...).\n   *\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {import(\"../tilegrid/TileGrid.js\").default} tilegrid Tile grid to use for the projection.\n   * @api\n   */\n  TileImage.prototype.setTileGridForProjection = function setTileGridForProjection (projection, tilegrid) {\n    if (ENABLE_RASTER_REPROJECTION) {\n      var proj = getProjection(projection);\n      if (proj) {\n        var projKey = getUid(proj);\n        if (!(projKey in this.tileGridForProjection)) {\n          this.tileGridForProjection[projKey] = tilegrid;\n        }\n      }\n    }\n  };\n\n  return TileImage;\n}(UrlTile));\n\n\n/**\n * @param {ImageTile} imageTile Image tile.\n * @param {string} src Source.\n */\nfunction defaultTileLoadFunction(imageTile, src) {\n  /** @type {HTMLImageElement|HTMLVideoElement} */ (imageTile.getImage()).src = src;\n}\n\nexport default TileImage;\n\n//# sourceMappingURL=TileImage.js.map","/**\n * @module ol/source/BingMaps\n */\n\nimport {createFromTileUrlFunctions} from '../tileurlfunction.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {jsonp as requestJSONP} from '../net.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport {createOrUpdate, quadKey} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n\n/**\n * The attribution containing a link to the Microsoft® Bing™ Maps Platform APIs’\n * Terms Of Use.\n * @const\n * @type {string}\n */\nvar TOS_ATTRIBUTION = '<a class=\"ol-attribution-bing-tos\" ' +\n      'href=\"https://www.microsoft.com/maps/product/terms.html\">' +\n      'Terms of Use</a>';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize=2048] Cache size.\n * @property {boolean} [hidpi=false] If `true` hidpi tiles will be requested.\n * @property {string} [culture='en-us'] Culture code.\n * @property {string} key Bing Maps API key. Get yours at http://www.bingmapsportal.com/.\n * @property {string} imagerySet Type of imagery.\n * @property {number} [maxZoom=21] Max zoom. Default is what's advertized by the BingMaps service.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n\n/**\n * @typedef {Object} BingMapsImageryMetadataResponse\n * @property {number} statusCode The response status code\n * @property {string} statusDescription The response status description\n * @property {string} authenticationResultCode The authentication result code\n * @property {Array<ResourceSet>} resourceSets The array of resource sets\n */\n\n\n/**\n * @typedef {Object} ResourceSet\n * @property {Array<Resource>} resources\n */\n\n\n/**\n * @typedef {Object} Resource\n * @property {number} imageHeight The image height\n * @property {number} imageWidth The image width\n * @property {number} zoomMin The minimum zoom level\n * @property {number} zoomMax The maximum zoom level\n * @property {string} imageUrl The image URL\n * @property {Array<string>} imageUrlSubdomains The image URL subdomains for rotation\n * @property {Array<ImageryProvider>} [imageryProviders] The array of ImageryProviders\n */\n\n\n/**\n * @typedef {Object} ImageryProvider\n * @property {Array<CoverageArea>} coverageAreas The coverage areas\n * @property {string} [attribution] The attribution\n */\n\n\n/**\n * @typedef {Object} CoverageArea\n * @property {number} zoomMin The minimum zoom\n * @property {number} zoomMax The maximum zoom\n * @property {Array<number>} bbox The coverage bounding box\n */\n\n\n/**\n * @classdesc\n * Layer source for Bing Maps tile data.\n * @api\n */\nvar BingMaps = /*@__PURE__*/(function (TileImage) {\n  function BingMaps(options) {\n\n    var hidpi = options.hidpi !== undefined ? options.hidpi : false;\n\n    TileImage.call(this, {\n      cacheSize: options.cacheSize,\n      crossOrigin: 'anonymous',\n      opaque: true,\n      projection: getProjection('EPSG:3857'),\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      state: SourceState.LOADING,\n      tileLoadFunction: options.tileLoadFunction,\n      tilePixelRatio: hidpi ? 2 : 1,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = hidpi;\n\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.culture_ = options.culture !== undefined ? options.culture : 'en-us';\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxZoom_ = options.maxZoom !== undefined ? options.maxZoom : -1;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.apiKey_ = options.key;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.imagerySet_ = options.imagerySet;\n\n    var url = 'https://dev.virtualearth.net/REST/v1/Imagery/Metadata/' +\n        this.imagerySet_ +\n        '?uriScheme=https&include=ImageryProviders&key=' + this.apiKey_ +\n        '&c=' + this.culture_;\n\n    requestJSONP(url, this.handleImageryMetadataResponse.bind(this), undefined,\n      'jsonp');\n\n  }\n\n  if ( TileImage ) BingMaps.__proto__ = TileImage;\n  BingMaps.prototype = Object.create( TileImage && TileImage.prototype );\n  BingMaps.prototype.constructor = BingMaps;\n\n  /**\n   * Get the api key used for this source.\n   *\n   * @return {string} The api key.\n   * @api\n   */\n  BingMaps.prototype.getApiKey = function getApiKey () {\n    return this.apiKey_;\n  };\n\n  /**\n   * Get the imagery set associated with this source.\n   *\n   * @return {string} The imagery set.\n   * @api\n   */\n  BingMaps.prototype.getImagerySet = function getImagerySet () {\n    return this.imagerySet_;\n  };\n\n  /**\n   * @param {BingMapsImageryMetadataResponse} response Response.\n   */\n  BingMaps.prototype.handleImageryMetadataResponse = function handleImageryMetadataResponse (response) {\n    if (response.statusCode != 200 ||\n        response.statusDescription != 'OK' ||\n        response.authenticationResultCode != 'ValidCredentials' ||\n        response.resourceSets.length != 1 ||\n        response.resourceSets[0].resources.length != 1) {\n      this.setState(SourceState.ERROR);\n      return;\n    }\n\n    var resource = response.resourceSets[0].resources[0];\n    var maxZoom = this.maxZoom_ == -1 ? resource.zoomMax : this.maxZoom_;\n\n    var sourceProjection = this.getProjection();\n    var extent = extentFromProjection(sourceProjection);\n    var scale = this.hidpi_ ? 2 : 1;\n    var tileSize = resource.imageWidth == resource.imageHeight ?\n      resource.imageWidth / scale :\n      [resource.imageWidth / scale, resource.imageHeight / scale];\n\n    var tileGrid = createXYZ({\n      extent: extent,\n      minZoom: resource.zoomMin,\n      maxZoom: maxZoom,\n      tileSize: tileSize\n    });\n    this.tileGrid = tileGrid;\n\n    var culture = this.culture_;\n    var hidpi = this.hidpi_;\n    this.tileUrlFunction = createFromTileUrlFunctions(\n      resource.imageUrlSubdomains.map(function(subdomain) {\n        var quadKeyTileCoord = [0, 0, 0];\n        var imageUrl = resource.imageUrl\n          .replace('{subdomain}', subdomain)\n          .replace('{culture}', culture);\n        return (\n          /**\n           * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n           * @param {number} pixelRatio Pixel ratio.\n           * @param {import(\"../proj/Projection.js\").default} projection Projection.\n           * @return {string|undefined} Tile URL.\n           */\n          function(tileCoord, pixelRatio, projection) {\n            if (!tileCoord) {\n              return undefined;\n            } else {\n              createOrUpdate(tileCoord[0], tileCoord[1], -tileCoord[2] - 1, quadKeyTileCoord);\n              var url = imageUrl;\n              if (hidpi) {\n                url += '&dpi=d1&device=mobile';\n              }\n              return url.replace('{quadkey}', quadKey(quadKeyTileCoord));\n            }\n          }\n        );\n      }));\n\n    if (resource.imageryProviders) {\n      var transform = getTransformFromProjections(\n        getProjection('EPSG:4326'), this.getProjection());\n\n      this.setAttributions(function(frameState) {\n        var attributions = [];\n        var viewState = frameState.viewState;\n        var tileGrid = this.getTileGrid();\n        var tileCoord = tileGrid.getTileCoordForCoordAndResolution(viewState.center, viewState.resolution);\n        var zoom = tileCoord[0];\n        resource.imageryProviders.map(function(imageryProvider) {\n          var intersecting = false;\n          var coverageAreas = imageryProvider.coverageAreas;\n          for (var i = 0, ii = coverageAreas.length; i < ii; ++i) {\n            var coverageArea = coverageAreas[i];\n            if (zoom >= coverageArea.zoomMin && zoom <= coverageArea.zoomMax) {\n              var bbox = coverageArea.bbox;\n              var epsg4326Extent = [bbox[1], bbox[0], bbox[3], bbox[2]];\n              var extent = applyTransform(epsg4326Extent, transform);\n              if (intersects(extent, frameState.extent)) {\n                intersecting = true;\n                break;\n              }\n            }\n          }\n          if (intersecting) {\n            attributions.push(imageryProvider.attribution);\n          }\n        });\n\n        attributions.push(TOS_ATTRIBUTION);\n        return attributions;\n      }.bind(this));\n    }\n\n    this.setState(SourceState.READY);\n  };\n\n  return BingMaps;\n}(TileImage));\n\nexport default BingMaps;\n\n//# sourceMappingURL=BingMaps.js.map","/**\n * @module ol/source/XYZ\n */\n\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {number} [maxZoom=18] Optional max zoom level.\n * @property {number} [minZoom=0] Optional min zoom level.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {number|import(\"../size.js\").Size} [tileSize=[256, 256]] The tile size used by the tile service.\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get\n * tile URL given a tile coordinate and the projection.\n * Required if url or urls are not provided.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`,\n * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`,\n * may be used instead of defining each one separately in the `urls` option.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data with URLs in a set XYZ format that are\n * defined in a URL template. By default, this follows the widely-used\n * Google grid where `x` 0 and `y` 0 are in the top left. Grids like\n * TMS where `x` 0 and `y` 0 are in the bottom left can be used by\n * using the `{-y}` placeholder in the URL template, so long as the\n * source does not have a custom tile grid. In this case,\n * {@link module:ol/source/TileImage} can be used with a `tileUrlFunction`\n * such as:\n *\n *  tileUrlFunction: function(coordinate) {\n *    return 'http://mapserver.com/' + coordinate[0] + '/' +\n *        coordinate[1] + '/' + coordinate[2] + '.png';\n *    }\n *\n * @api\n */\nvar XYZ = /*@__PURE__*/(function (TileImage) {\n  function XYZ(opt_options) {\n    var options = opt_options || {};\n    var projection = options.projection !== undefined ?\n      options.projection : 'EPSG:3857';\n\n    var tileGrid = options.tileGrid !== undefined ? options.tileGrid :\n      createXYZ({\n        extent: extentFromProjection(projection),\n        maxZoom: options.maxZoom,\n        minZoom: options.minZoom,\n        tileSize: options.tileSize\n      });\n\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      opaque: options.opaque,\n      projection: projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileGrid: tileGrid,\n      tileLoadFunction: options.tileLoadFunction,\n      tilePixelRatio: options.tilePixelRatio,\n      tileUrlFunction: options.tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition,\n      attributionsCollapsible: options.attributionsCollapsible\n    });\n\n  }\n\n  if ( TileImage ) XYZ.__proto__ = TileImage;\n  XYZ.prototype = Object.create( TileImage && TileImage.prototype );\n  XYZ.prototype.constructor = XYZ;\n\n  return XYZ;\n}(TileImage));\n\nexport default XYZ;\n\n//# sourceMappingURL=XYZ.js.map","/**\n * @module ol/source/CartoDB\n */\n\nimport {assign} from '../obj.js';\nimport SourceState from './State.js';\nimport XYZ from './XYZ.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection='EPSG:3857'] Projection.\n * @property {number} [maxZoom=18] Max zoom.\n * @property {number} [minZoom] Minimum zoom.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {Object} [config] If using anonymous maps, the CartoDB config to use. See\n * http://docs.cartodb.com/cartodb-platform/maps-api/anonymous-maps/\n * for more detail.\n * If using named maps, a key-value lookup with the template parameters.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} [map] If using named maps, this will be the name of the template to load.\n * See http://docs.cartodb.com/cartodb-platform/maps-api/named-maps/\n * for more detail.\n * @property {string} account If using named maps, this will be the name of the template to load.\n */\n\n\n/**\n * @typedef {Object} CartoDBLayerInfo\n * @property {string} layergroupid The layer group ID\n * @property {{https: string}} cdn_url The CDN URL\n */\n\n/**\n * @classdesc\n * Layer source for the CartoDB Maps API.\n * @api\n */\nvar CartoDB = /*@__PURE__*/(function (XYZ) {\n  function CartoDB(options) {\n    XYZ.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      maxZoom: options.maxZoom !== undefined ? options.maxZoom : 18,\n      minZoom: options.minZoom,\n      projection: options.projection,\n      wrapX: options.wrapX\n    });\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.account_ = options.account;\n\n    /**\n     * @type {string}\n     * @private\n     */\n    this.mapId_ = options.map || '';\n\n    /**\n     * @type {!Object}\n     * @private\n     */\n    this.config_ = options.config || {};\n\n    /**\n     * @type {!Object<string, CartoDBLayerInfo>}\n     * @private\n     */\n    this.templateCache_ = {};\n\n    this.initializeMap_();\n  }\n\n  if ( XYZ ) CartoDB.__proto__ = XYZ;\n  CartoDB.prototype = Object.create( XYZ && XYZ.prototype );\n  CartoDB.prototype.constructor = CartoDB;\n\n  /**\n   * Returns the current config.\n   * @return {!Object} The current configuration.\n   * @api\n   */\n  CartoDB.prototype.getConfig = function getConfig () {\n    return this.config_;\n  };\n\n  /**\n   * Updates the carto db config.\n   * @param {Object} config a key-value lookup. Values will replace current values\n   *     in the config.\n   * @api\n   */\n  CartoDB.prototype.updateConfig = function updateConfig (config) {\n    assign(this.config_, config);\n    this.initializeMap_();\n  };\n\n  /**\n   * Sets the CartoDB config\n   * @param {Object} config In the case of anonymous maps, a CartoDB configuration\n   *     object.\n   * If using named maps, a key-value lookup with the template parameters.\n   * @api\n   */\n  CartoDB.prototype.setConfig = function setConfig (config) {\n    this.config_ = config || {};\n    this.initializeMap_();\n  };\n\n  /**\n   * Issue a request to initialize the CartoDB map.\n   * @private\n   */\n  CartoDB.prototype.initializeMap_ = function initializeMap_ () {\n    var paramHash = JSON.stringify(this.config_);\n    if (this.templateCache_[paramHash]) {\n      this.applyTemplate_(this.templateCache_[paramHash]);\n      return;\n    }\n    var mapUrl = 'https://' + this.account_ + '.carto.com/api/v1/map';\n\n    if (this.mapId_) {\n      mapUrl += '/named/' + this.mapId_;\n    }\n\n    var client = new XMLHttpRequest();\n    client.addEventListener('load', this.handleInitResponse_.bind(this, paramHash));\n    client.addEventListener('error', this.handleInitError_.bind(this));\n    client.open('POST', mapUrl);\n    client.setRequestHeader('Content-type', 'application/json');\n    client.send(JSON.stringify(this.config_));\n  };\n\n  /**\n   * Handle map initialization response.\n   * @param {string} paramHash a hash representing the parameter set that was used\n   *     for the request\n   * @param {Event} event Event.\n   * @private\n   */\n  CartoDB.prototype.handleInitResponse_ = function handleInitResponse_ (paramHash, event) {\n    var client = /** @type {XMLHttpRequest} */ (event.target);\n    // status will be 0 for file:// urls\n    if (!client.status || client.status >= 200 && client.status < 300) {\n      var response;\n      try {\n        response = /** @type {CartoDBLayerInfo} */(JSON.parse(client.responseText));\n      } catch (err) {\n        this.setState(SourceState.ERROR);\n        return;\n      }\n      this.applyTemplate_(response);\n      this.templateCache_[paramHash] = response;\n      this.setState(SourceState.READY);\n    } else {\n      this.setState(SourceState.ERROR);\n    }\n  };\n\n  /**\n   * @private\n   * @param {Event} event Event.\n   */\n  CartoDB.prototype.handleInitError_ = function handleInitError_ (event) {\n    this.setState(SourceState.ERROR);\n  };\n\n  /**\n   * Apply the new tile urls returned by carto db\n   * @param {CartoDBLayerInfo} data Result of carto db call.\n   * @private\n   */\n  CartoDB.prototype.applyTemplate_ = function applyTemplate_ (data) {\n    var tilesUrl = 'https://' + data.cdn_url.https + '/' + this.account_ +\n        '/api/v1/map/' + data.layergroupid + '/{z}/{x}/{y}.png';\n    this.setUrl(tilesUrl);\n  };\n\n  return CartoDB;\n}(XYZ));\n\n\nexport default CartoDB;\n\n//# sourceMappingURL=CartoDB.js.map","/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  /**\n   * Triggered when a feature is added to the source.\n   * @event ol/source/Vector.VectorSourceEvent#addfeature\n   * @api\n   */\n  ADDFEATURE: 'addfeature',\n\n  /**\n   * Triggered when a feature is updated.\n   * @event ol/source/Vector.VectorSourceEvent#changefeature\n   * @api\n   */\n  CHANGEFEATURE: 'changefeature',\n\n  /**\n   * Triggered when the clear method is called on the source.\n   * @event ol/source/Vector.VectorSourceEvent#clear\n   * @api\n   */\n  CLEAR: 'clear',\n\n  /**\n   * Triggered when a feature is removed from the source.\n   * See {@link module:ol/source/Vector#clear source.clear()} for exceptions.\n   * @event ol/source/Vector.VectorSourceEvent#removefeature\n   * @api\n   */\n  REMOVEFEATURE: 'removefeature'\n};\n\n//# sourceMappingURL=VectorEventType.js.map","/**\n * @module ol/source/Vector\n */\n\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {extend} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, equals} from '../extent.js';\nimport {xhr} from '../featureloader.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {isEmpty, getValues} from '../obj.js';\nimport Source from './Source.js';\nimport SourceState from './State.js';\nimport VectorEventType from './VectorEventType.js';\nimport RBush from '../structs/RBush.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector} instances are instances of this\n * type.\n */\nexport var VectorSourceEvent = /*@__PURE__*/(function (Event) {\n  function VectorSourceEvent(type, opt_feature) {\n\n    Event.call(this, type);\n\n    /**\n     * The feature being added or removed.\n     * @type {import(\"../Feature.js\").default|undefined}\n     * @api\n     */\n    this.feature = opt_feature;\n\n  }\n\n  if ( Event ) VectorSourceEvent.__proto__ = Event;\n  VectorSourceEvent.prototype = Object.create( Event && Event.prototype );\n  VectorSourceEvent.prototype.constructor = VectorSourceEvent;\n\n  return VectorSourceEvent;\n}(Event));\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<import(\"../Feature.js\").default>|Collection<import(\"../Feature.js\").default>} [features]\n * Features. If provided as {@link module:ol/Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader.\n *\n * Example:\n *\n * ```js\n * import {Vector} from 'ol/source';\n * import {GeoJSON} from 'ol/format';\n * import {bbox} from 'ol/loadingstrategy';\n *\n * var vectorSource = new Vector({\n *   format: new GeoJSON(),\n *   loader: function(extent, resolution, projection) {\n *      var proj = projection.getCode();\n *      var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n *          'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n *          'outputFormat=application/json&srsname=' + proj + '&' +\n *          'bbox=' + extent.join(',') + ',' + proj;\n *      var xhr = new XMLHttpRequest();\n *      xhr.open('GET', url);\n *      var onError = function() {\n *        vectorSource.removeLoadedExtent(extent);\n *      }\n *      xhr.onerror = onError;\n *      xhr.onload = function() {\n *        if (xhr.status == 200) {\n *          vectorSource.addFeatures(\n *              vectorSource.getFormat().readFeatures(xhr.responseText));\n *        } else {\n *          onError();\n *        }\n *      }\n *      xhr.send();\n *    },\n *    strategy: bbox\n *  });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy~all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader~xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy~all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180° and 180° meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires ol/source/Vector.VectorSourceEvent\n * @api\n */\nvar VectorSource = /*@__PURE__*/(function (Source) {\n  function VectorSource(opt_options) {\n\n    var options = opt_options || {};\n\n    Source.call(this, {\n      attributions: options.attributions,\n      projection: undefined,\n      state: SourceState.READY,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true\n    });\n\n    /**\n     * @private\n     * @type {import(\"../featureloader.js\").FeatureLoader}\n     */\n    this.loader_ = VOID;\n\n    /**\n     * @private\n     * @type {import(\"../format/Feature.js\").default|undefined}\n     */\n    this.format_ = options.format;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n\n    /**\n     * @private\n     * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n     */\n    this.url_ = options.url;\n\n    if (options.loader !== undefined) {\n      this.loader_ = options.loader;\n    } else if (this.url_ !== undefined) {\n      assert(this.format_, 7); // `format` must be set when `url` is set\n      // create a XHR feature loader for \"url\" and \"format\"\n      this.loader_ = xhr(this.url_, /** @type {import(\"../format/Feature.js\").default} */ (this.format_));\n    }\n\n    /**\n     * @private\n     * @type {LoadingStrategy}\n     */\n    this.strategy_ = options.strategy !== undefined ? options.strategy : allStrategy;\n\n    var useSpatialIndex =\n        options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n    /**\n     * @private\n     * @type {RBush<import(\"../Feature.js\").default>}\n     */\n    this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n    /**\n     * @private\n     * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n     */\n    this.loadedExtentsRtree_ = new RBush();\n\n    /**\n     * @private\n     * @type {!Object<string, import(\"../Feature.js\").default>}\n     */\n    this.nullGeometryFeatures_ = {};\n\n    /**\n     * A lookup of features by id (the return from feature.getId()).\n     * @private\n     * @type {!Object<string, import(\"../Feature.js\").default>}\n     */\n    this.idIndex_ = {};\n\n    /**\n     * A lookup of features without id (keyed by getUid(feature)).\n     * @private\n     * @type {!Object<string, import(\"../Feature.js\").default>}\n     */\n    this.undefIdIndex_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n     */\n    this.featureChangeKeys_ = {};\n\n    /**\n     * @private\n     * @type {Collection<import(\"../Feature.js\").default>}\n     */\n    this.featuresCollection_ = null;\n\n    var collection, features;\n    if (Array.isArray(options.features)) {\n      features = options.features;\n    } else if (options.features) {\n      collection = options.features;\n      features = collection.getArray();\n    }\n    if (!useSpatialIndex && collection === undefined) {\n      collection = new Collection(features);\n    }\n    if (features !== undefined) {\n      this.addFeaturesInternal(features);\n    }\n    if (collection !== undefined) {\n      this.bindFeaturesCollection_(collection);\n    }\n\n  }\n\n  if ( Source ) VectorSource.__proto__ = Source;\n  VectorSource.prototype = Object.create( Source && Source.prototype );\n  VectorSource.prototype.constructor = VectorSource;\n\n  /**\n   * Add a single feature to the source.  If you want to add a batch of features\n   * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n   * instead. A feature will not be added to the source if feature with\n   * the same id is already there. The reason for this behavior is to avoid\n   * feature duplication when using bbox or tile loading strategies.\n   * @param {import(\"../Feature.js\").default} feature Feature to add.\n   * @api\n   */\n  VectorSource.prototype.addFeature = function addFeature (feature) {\n    this.addFeatureInternal(feature);\n    this.changed();\n  };\n\n\n  /**\n   * Add a feature without firing a `change` event.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @protected\n   */\n  VectorSource.prototype.addFeatureInternal = function addFeatureInternal (feature) {\n    var featureKey = getUid(feature);\n\n    if (!this.addToIndex_(featureKey, feature)) {\n      return;\n    }\n\n    this.setupChangeEvents_(featureKey, feature);\n\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      var extent = geometry.getExtent();\n      if (this.featuresRtree_) {\n        this.featuresRtree_.insert(extent, feature);\n      }\n    } else {\n      this.nullGeometryFeatures_[featureKey] = feature;\n    }\n\n    this.dispatchEvent(\n      new VectorSourceEvent(VectorEventType.ADDFEATURE, feature));\n  };\n\n\n  /**\n   * @param {string} featureKey Unique identifier for the feature.\n   * @param {import(\"../Feature.js\").default} feature The feature.\n   * @private\n   */\n  VectorSource.prototype.setupChangeEvents_ = function setupChangeEvents_ (featureKey, feature) {\n    this.featureChangeKeys_[featureKey] = [\n      listen(feature, EventType.CHANGE,\n        this.handleFeatureChange_, this),\n      listen(feature, ObjectEventType.PROPERTYCHANGE,\n        this.handleFeatureChange_, this)\n    ];\n  };\n\n\n  /**\n   * @param {string} featureKey Unique identifier for the feature.\n   * @param {import(\"../Feature.js\").default} feature The feature.\n   * @return {boolean} The feature is \"valid\", in the sense that it is also a\n   *     candidate for insertion into the Rtree.\n   * @private\n   */\n  VectorSource.prototype.addToIndex_ = function addToIndex_ (featureKey, feature) {\n    var valid = true;\n    var id = feature.getId();\n    if (id !== undefined) {\n      if (!(id.toString() in this.idIndex_)) {\n        this.idIndex_[id.toString()] = feature;\n      } else {\n        valid = false;\n      }\n    } else {\n      assert(!(featureKey in this.undefIdIndex_),\n        30); // The passed `feature` was already added to the source\n      this.undefIdIndex_[featureKey] = feature;\n    }\n    return valid;\n  };\n\n\n  /**\n   * Add a batch of features to the source.\n   * @param {Array<import(\"../Feature.js\").default>} features Features to add.\n   * @api\n   */\n  VectorSource.prototype.addFeatures = function addFeatures (features) {\n    this.addFeaturesInternal(features);\n    this.changed();\n  };\n\n\n  /**\n   * Add features without firing a `change` event.\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @protected\n   */\n  VectorSource.prototype.addFeaturesInternal = function addFeaturesInternal (features) {\n    var extents = [];\n    var newFeatures = [];\n    var geometryFeatures = [];\n\n    for (var i = 0, length = features.length; i < length; i++) {\n      var feature = features[i];\n      var featureKey = getUid(feature);\n      if (this.addToIndex_(featureKey, feature)) {\n        newFeatures.push(feature);\n      }\n    }\n\n    for (var i$1 = 0, length$1 = newFeatures.length; i$1 < length$1; i$1++) {\n      var feature$1 = newFeatures[i$1];\n      var featureKey$1 = getUid(feature$1);\n      this.setupChangeEvents_(featureKey$1, feature$1);\n\n      var geometry = feature$1.getGeometry();\n      if (geometry) {\n        var extent = geometry.getExtent();\n        extents.push(extent);\n        geometryFeatures.push(feature$1);\n      } else {\n        this.nullGeometryFeatures_[featureKey$1] = feature$1;\n      }\n    }\n    if (this.featuresRtree_) {\n      this.featuresRtree_.load(extents, geometryFeatures);\n    }\n\n    for (var i$2 = 0, length$2 = newFeatures.length; i$2 < length$2; i$2++) {\n      this.dispatchEvent(new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i$2]));\n    }\n  };\n\n\n  /**\n   * @param {!Collection<import(\"../Feature.js\").default>} collection Collection.\n   * @private\n   */\n  VectorSource.prototype.bindFeaturesCollection_ = function bindFeaturesCollection_ (collection) {\n    var modifyingCollection = false;\n    listen(this, VectorEventType.ADDFEATURE,\n      /**\n       * @param {VectorSourceEvent} evt The vector source event\n       */\n      function(evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          collection.push(evt.feature);\n          modifyingCollection = false;\n        }\n      });\n    listen(this, VectorEventType.REMOVEFEATURE,\n      /**\n       * @param {VectorSourceEvent} evt The vector source event\n       */\n      function(evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          collection.remove(evt.feature);\n          modifyingCollection = false;\n        }\n      });\n    listen(collection, CollectionEventType.ADD,\n      /**\n       * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n       */\n      function(evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          this.addFeature(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n          modifyingCollection = false;\n        }\n      }, this);\n    listen(collection, CollectionEventType.REMOVE,\n      /**\n       * @param {import(\"../Collection.js\").CollectionEvent} evt The collection event\n       */\n      function(evt) {\n        if (!modifyingCollection) {\n          modifyingCollection = true;\n          this.removeFeature(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n          modifyingCollection = false;\n        }\n      }, this);\n    this.featuresCollection_ = collection;\n  };\n\n\n  /**\n   * Remove all features from the source.\n   * @param {boolean=} opt_fast Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#removefeature} events.\n   * @api\n   */\n  VectorSource.prototype.clear = function clear (opt_fast) {\n    if (opt_fast) {\n      for (var featureId in this.featureChangeKeys_) {\n        var keys = this.featureChangeKeys_[featureId];\n        keys.forEach(unlistenByKey);\n      }\n      if (!this.featuresCollection_) {\n        this.featureChangeKeys_ = {};\n        this.idIndex_ = {};\n        this.undefIdIndex_ = {};\n      }\n    } else {\n      if (this.featuresRtree_) {\n        this.featuresRtree_.forEach(this.removeFeatureInternal, this);\n        for (var id in this.nullGeometryFeatures_) {\n          this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n        }\n      }\n    }\n    if (this.featuresCollection_) {\n      this.featuresCollection_.clear();\n    }\n\n    if (this.featuresRtree_) {\n      this.featuresRtree_.clear();\n    }\n    this.loadedExtentsRtree_.clear();\n    this.nullGeometryFeatures_ = {};\n\n    var clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n    this.dispatchEvent(clearEvent);\n    this.changed();\n  };\n\n\n  /**\n   * Iterate through all features on the source, calling the provided callback\n   * with each one.  If the callback returns any \"truthy\" value, iteration will\n   * stop and the function will return the same value.\n   * Note: this function only iterate through the feature that have a defined geometry.\n   *\n   * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n   *     on the source.  Return a truthy value to stop iteration.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  VectorSource.prototype.forEachFeature = function forEachFeature (callback) {\n    if (this.featuresRtree_) {\n      return this.featuresRtree_.forEach(callback);\n    } else if (this.featuresCollection_) {\n      this.featuresCollection_.forEach(callback);\n    }\n  };\n\n\n  /**\n   * Iterate through all features whose geometries contain the provided\n   * coordinate, calling the callback with each feature.  If the callback returns\n   * a \"truthy\" value, iteration will stop and the function will return the same\n   * value.\n   *\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n   *     whose goemetry contains the provided coordinate.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   */\n  VectorSource.prototype.forEachFeatureAtCoordinateDirect = function forEachFeatureAtCoordinateDirect (coordinate, callback) {\n    var extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n    return this.forEachFeatureInExtent(extent, function(feature) {\n      var geometry = feature.getGeometry();\n      if (geometry.intersectsCoordinate(coordinate)) {\n        return callback(feature);\n      } else {\n        return undefined;\n      }\n    });\n  };\n\n\n  /**\n   * Iterate through all features whose bounding box intersects the provided\n   * extent (note that the feature's geometry may not intersect the extent),\n   * calling the callback with each feature.  If the callback returns a \"truthy\"\n   * value, iteration will stop and the function will return the same value.\n   *\n   * If you are interested in features whose geometry intersects an extent, call\n   * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n   *\n   * When `useSpatialIndex` is set to false, this method will loop through all\n   * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n   *     whose bounding box intersects the provided extent.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  VectorSource.prototype.forEachFeatureInExtent = function forEachFeatureInExtent (extent, callback) {\n    if (this.featuresRtree_) {\n      return this.featuresRtree_.forEachInExtent(extent, callback);\n    } else if (this.featuresCollection_) {\n      this.featuresCollection_.forEach(callback);\n    }\n  };\n\n\n  /**\n   * Iterate through all features whose geometry intersects the provided extent,\n   * calling the callback with each feature.  If the callback returns a \"truthy\"\n   * value, iteration will stop and the function will return the same value.\n   *\n   * If you only want to test for bounding box intersection, call the\n   * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {function(import(\"../Feature.js\").default): T} callback Called with each feature\n   *     whose geometry intersects the provided extent.\n   * @return {T|undefined} The return value from the last call to the callback.\n   * @template T\n   * @api\n   */\n  VectorSource.prototype.forEachFeatureIntersectingExtent = function forEachFeatureIntersectingExtent (extent, callback) {\n    return this.forEachFeatureInExtent(extent,\n      /**\n       * @param {import(\"../Feature.js\").default} feature Feature.\n       * @return {T|undefined} The return value from the last call to the callback.\n       */\n      function(feature) {\n        var geometry = feature.getGeometry();\n        if (geometry.intersectsExtent(extent)) {\n          var result = callback(feature);\n          if (result) {\n            return result;\n          }\n        }\n      });\n  };\n\n\n  /**\n   * Get the features collection associated with this source. Will be `null`\n   * unless the source was configured with `useSpatialIndex` set to `false`, or\n   * with an {@link module:ol/Collection} as `features`.\n   * @return {Collection<import(\"../Feature.js\").default>} The collection of features.\n   * @api\n   */\n  VectorSource.prototype.getFeaturesCollection = function getFeaturesCollection () {\n    return this.featuresCollection_;\n  };\n\n\n  /**\n   * Get all features on the source in random order.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  VectorSource.prototype.getFeatures = function getFeatures () {\n    var features;\n    if (this.featuresCollection_) {\n      features = this.featuresCollection_.getArray();\n    } else if (this.featuresRtree_) {\n      features = this.featuresRtree_.getAll();\n      if (!isEmpty(this.nullGeometryFeatures_)) {\n        extend(features, getValues(this.nullGeometryFeatures_));\n      }\n    }\n    return (\n      /** @type {Array<import(\"../Feature.js\").default>} */ (features)\n    );\n  };\n\n\n  /**\n   * Get all features whose geometry intersects the provided coordinate.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  VectorSource.prototype.getFeaturesAtCoordinate = function getFeaturesAtCoordinate (coordinate) {\n    var features = [];\n    this.forEachFeatureAtCoordinateDirect(coordinate, function(feature) {\n      features.push(feature);\n    });\n    return features;\n  };\n\n\n  /**\n   * Get all features in the provided extent.  Note that this returns an array of\n   * all features intersecting the given extent in random order (so it may include\n   * features whose geometries do not intersect the extent).\n   *\n   * This method is not available when the source is configured with\n   * `useSpatialIndex` set to `false`.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  VectorSource.prototype.getFeaturesInExtent = function getFeaturesInExtent (extent) {\n    return this.featuresRtree_.getInExtent(extent);\n  };\n\n\n  /**\n   * Get the closest feature to the provided coordinate.\n   *\n   * This method is not available when the source is configured with\n   * `useSpatialIndex` set to `false`.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {function(import(\"../Feature.js\").default):boolean=} opt_filter Feature filter function.\n   *     The filter function will receive one argument, the {@link module:ol/Feature feature}\n   *     and it should return a boolean value. By default, no filtering is made.\n   * @return {import(\"../Feature.js\").default} Closest feature.\n   * @api\n   */\n  VectorSource.prototype.getClosestFeatureToCoordinate = function getClosestFeatureToCoordinate (coordinate, opt_filter) {\n    // Find the closest feature using branch and bound.  We start searching an\n    // infinite extent, and find the distance from the first feature found.  This\n    // becomes the closest feature.  We then compute a smaller extent which any\n    // closer feature must intersect.  We continue searching with this smaller\n    // extent, trying to find a closer feature.  Every time we find a closer\n    // feature, we update the extent being searched so that any even closer\n    // feature must intersect it.  We continue until we run out of features.\n    var x = coordinate[0];\n    var y = coordinate[1];\n    var closestFeature = null;\n    var closestPoint = [NaN, NaN];\n    var minSquaredDistance = Infinity;\n    var extent = [-Infinity, -Infinity, Infinity, Infinity];\n    var filter = opt_filter ? opt_filter : TRUE;\n    this.featuresRtree_.forEachInExtent(extent,\n      /**\n       * @param {import(\"../Feature.js\").default} feature Feature.\n       */\n      function(feature) {\n        if (filter(feature)) {\n          var geometry = feature.getGeometry();\n          var previousMinSquaredDistance = minSquaredDistance;\n          minSquaredDistance = geometry.closestPointXY(\n            x, y, closestPoint, minSquaredDistance);\n          if (minSquaredDistance < previousMinSquaredDistance) {\n            closestFeature = feature;\n            // This is sneaky.  Reduce the extent that it is currently being\n            // searched while the R-Tree traversal using this same extent object\n            // is still in progress.  This is safe because the new extent is\n            // strictly contained by the old extent.\n            var minDistance = Math.sqrt(minSquaredDistance);\n            extent[0] = x - minDistance;\n            extent[1] = y - minDistance;\n            extent[2] = x + minDistance;\n            extent[3] = y + minDistance;\n          }\n        }\n      });\n    return closestFeature;\n  };\n\n\n  /**\n   * Get the extent of the features currently in the source.\n   *\n   * This method is not available when the source is configured with\n   * `useSpatialIndex` set to `false`.\n   * @param {import(\"../extent.js\").Extent=} opt_extent Destination extent. If provided, no new extent\n   *     will be created. Instead, that extent's coordinates will be overwritten.\n   * @return {import(\"../extent.js\").Extent} Extent.\n   * @api\n   */\n  VectorSource.prototype.getExtent = function getExtent (opt_extent) {\n    return this.featuresRtree_.getExtent(opt_extent);\n  };\n\n\n  /**\n   * Get a feature by its identifier (the value returned by feature.getId()).\n   * Note that the index treats string and numeric identifiers as the same.  So\n   * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n   *\n   * @param {string|number} id Feature identifier.\n   * @return {import(\"../Feature.js\").default} The feature (or `null` if not found).\n   * @api\n   */\n  VectorSource.prototype.getFeatureById = function getFeatureById (id) {\n    var feature = this.idIndex_[id.toString()];\n    return feature !== undefined ? feature : null;\n  };\n\n\n  /**\n   * Get the format associated with this source.\n   *\n   * @return {import(\"../format/Feature.js\").default|undefined} The feature format.\n   * @api\n   */\n  VectorSource.prototype.getFormat = function getFormat () {\n    return this.format_;\n  };\n\n\n  /**\n   * @return {boolean} The source can have overlapping geometries.\n   */\n  VectorSource.prototype.getOverlaps = function getOverlaps () {\n    return this.overlaps_;\n  };\n\n\n  /**\n   * Get the url associated with this source.\n   *\n   * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n   * @api\n   */\n  VectorSource.prototype.getUrl = function getUrl () {\n    return this.url_;\n  };\n\n\n  /**\n   * @param {Event} event Event.\n   * @private\n   */\n  VectorSource.prototype.handleFeatureChange_ = function handleFeatureChange_ (event) {\n    var feature = /** @type {import(\"../Feature.js\").default} */ (event.target);\n    var featureKey = getUid(feature);\n    var geometry = feature.getGeometry();\n    if (!geometry) {\n      if (!(featureKey in this.nullGeometryFeatures_)) {\n        if (this.featuresRtree_) {\n          this.featuresRtree_.remove(feature);\n        }\n        this.nullGeometryFeatures_[featureKey] = feature;\n      }\n    } else {\n      var extent = geometry.getExtent();\n      if (featureKey in this.nullGeometryFeatures_) {\n        delete this.nullGeometryFeatures_[featureKey];\n        if (this.featuresRtree_) {\n          this.featuresRtree_.insert(extent, feature);\n        }\n      } else {\n        if (this.featuresRtree_) {\n          this.featuresRtree_.update(extent, feature);\n        }\n      }\n    }\n    var id = feature.getId();\n    if (id !== undefined) {\n      var sid = id.toString();\n      if (featureKey in this.undefIdIndex_) {\n        delete this.undefIdIndex_[featureKey];\n        this.idIndex_[sid] = feature;\n      } else {\n        if (this.idIndex_[sid] !== feature) {\n          this.removeFromIdIndex_(feature);\n          this.idIndex_[sid] = feature;\n        }\n      }\n    } else {\n      if (!(featureKey in this.undefIdIndex_)) {\n        this.removeFromIdIndex_(feature);\n        this.undefIdIndex_[featureKey] = feature;\n      }\n    }\n    this.changed();\n    this.dispatchEvent(new VectorSourceEvent(\n      VectorEventType.CHANGEFEATURE, feature));\n  };\n\n  /**\n   * Returns true if the feature is contained within the source.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @return {boolean} Has feature.\n   * @api\n   */\n  VectorSource.prototype.hasFeature = function hasFeature (feature) {\n    var id = feature.getId();\n    if (id !== undefined) {\n      return id in this.idIndex_;\n    } else {\n      return getUid(feature) in this.undefIdIndex_;\n    }\n  };\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  VectorSource.prototype.isEmpty = function isEmpty$1 () {\n    return this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_);\n  };\n\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   */\n  VectorSource.prototype.loadFeatures = function loadFeatures (extent, resolution, projection) {\n    var this$1 = this;\n\n    var loadedExtentsRtree = this.loadedExtentsRtree_;\n    var extentsToLoad = this.strategy_(extent, resolution);\n    this.loading = false;\n    var loop = function ( i, ii ) {\n      var extentToLoad = extentsToLoad[i];\n      var alreadyLoaded = loadedExtentsRtree.forEachInExtent(extentToLoad,\n        /**\n         * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n         * @return {boolean} Contains.\n         */\n        function(object) {\n          return containsExtent(object.extent, extentToLoad);\n        });\n      if (!alreadyLoaded) {\n        this$1.loader_.call(this$1, extentToLoad, resolution, projection);\n        loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n        this$1.loading = this$1.loader_ !== VOID;\n      }\n    };\n\n    for (var i = 0, ii = extentsToLoad.length; i < ii; ++i) loop( i, ii );\n  };\n\n\n  /**\n   * Remove an extent from the list of loaded extents.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @api\n   */\n  VectorSource.prototype.removeLoadedExtent = function removeLoadedExtent (extent) {\n    var loadedExtentsRtree = this.loadedExtentsRtree_;\n    var obj;\n    loadedExtentsRtree.forEachInExtent(extent, function(object) {\n      if (equals(object.extent, extent)) {\n        obj = object;\n        return true;\n      }\n    });\n    if (obj) {\n      loadedExtentsRtree.remove(obj);\n    }\n  };\n\n\n  /**\n   * Remove a single feature from the source.  If you want to remove all features\n   * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n   * instead.\n   * @param {import(\"../Feature.js\").default} feature Feature to remove.\n   * @api\n   */\n  VectorSource.prototype.removeFeature = function removeFeature (feature) {\n    var featureKey = getUid(feature);\n    if (featureKey in this.nullGeometryFeatures_) {\n      delete this.nullGeometryFeatures_[featureKey];\n    } else {\n      if (this.featuresRtree_) {\n        this.featuresRtree_.remove(feature);\n      }\n    }\n    this.removeFeatureInternal(feature);\n    this.changed();\n  };\n\n\n  /**\n   * Remove feature without firing a `change` event.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @protected\n   */\n  VectorSource.prototype.removeFeatureInternal = function removeFeatureInternal (feature) {\n    var featureKey = getUid(feature);\n    this.featureChangeKeys_[featureKey].forEach(unlistenByKey);\n    delete this.featureChangeKeys_[featureKey];\n    var id = feature.getId();\n    if (id !== undefined) {\n      delete this.idIndex_[id.toString()];\n    } else {\n      delete this.undefIdIndex_[featureKey];\n    }\n    this.dispatchEvent(new VectorSourceEvent(\n      VectorEventType.REMOVEFEATURE, feature));\n  };\n\n\n  /**\n   * Remove a feature from the id index.  Called internally when the feature id\n   * may have changed.\n   * @param {import(\"../Feature.js\").default} feature The feature.\n   * @return {boolean} Removed the feature from the index.\n   * @private\n   */\n  VectorSource.prototype.removeFromIdIndex_ = function removeFromIdIndex_ (feature) {\n    var removed = false;\n    for (var id in this.idIndex_) {\n      if (this.idIndex_[id] === feature) {\n        delete this.idIndex_[id];\n        removed = true;\n        break;\n      }\n    }\n    return removed;\n  };\n\n\n  /**\n   * Set the new loader of the source. The next loadFeatures call will use the\n   * new loader.\n   * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n   * @api\n   */\n  VectorSource.prototype.setLoader = function setLoader (loader) {\n    this.loader_ = loader;\n  };\n\n  return VectorSource;\n}(Source));\n\n\nexport default VectorSource;\n\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/source/Cluster\n */\n\nimport {getUid} from '../util.js';\nimport {assert} from '../asserts.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport {scale as scaleCoordinate, add as addCoordinate} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {buffer, createEmpty, createOrUpdateFromCoordinate} from '../extent.js';\nimport Point from '../geom/Point.js';\nimport VectorSource from './Vector.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [distance=20] Minimum distance in pixels between clusters.\n * @property {function(Feature):Point} [geometryFunction]\n * Function that takes an {@link module:ol/Feature} as argument and returns an\n * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a\n * feature should not be considered for clustering, the function should return\n * `null`. The default, which works when the underyling source contains point\n * features only, is\n * ```js\n * function(feature) {\n *   return feature.getGeometry();\n * }\n * ```\n * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster\n * calculation point for polygons.\n * @property {VectorSource} source Source.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n\n/**\n * @classdesc\n * Layer source to cluster vector data. Works out of the box with point\n * geometries. For other geometry types, or if not all geometries should be\n * considered for clustering, a custom `geometryFunction` can be defined.\n * @api\n */\nvar Cluster = /*@__PURE__*/(function (VectorSource) {\n  function Cluster(options) {\n    VectorSource.call(this, {\n      attributions: options.attributions,\n      wrapX: options.wrapX\n    });\n\n    /**\n     * @type {number|undefined}\n     * @protected\n     */\n    this.resolution = undefined;\n\n    /**\n     * @type {number}\n     * @protected\n     */\n    this.distance = options.distance !== undefined ? options.distance : 20;\n\n    /**\n     * @type {Array<Feature>}\n     * @protected\n     */\n    this.features = [];\n\n    /**\n     * @param {Feature} feature Feature.\n     * @return {Point} Cluster calculation point.\n     * @protected\n     */\n    this.geometryFunction = options.geometryFunction || function(feature) {\n      var geometry = /** @type {Point} */ (feature.getGeometry());\n      assert(geometry.getType() == GeometryType.POINT,\n        10); // The default `geometryFunction` can only handle `Point` geometries\n      return geometry;\n    };\n\n    /**\n     * @type {VectorSource}\n     * @protected\n     */\n    this.source = options.source;\n\n    listen(this.source, EventType.CHANGE, this.refresh, this);\n  }\n\n  if ( VectorSource ) Cluster.__proto__ = VectorSource;\n  Cluster.prototype = Object.create( VectorSource && VectorSource.prototype );\n  Cluster.prototype.constructor = Cluster;\n\n  /**\n   * Get the distance in pixels between clusters.\n   * @return {number} Distance.\n   * @api\n   */\n  Cluster.prototype.getDistance = function getDistance () {\n    return this.distance;\n  };\n\n  /**\n   * Get a reference to the wrapped source.\n   * @return {VectorSource} Source.\n   * @api\n   */\n  Cluster.prototype.getSource = function getSource () {\n    return this.source;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Cluster.prototype.loadFeatures = function loadFeatures (extent, resolution, projection) {\n    this.source.loadFeatures(extent, resolution, projection);\n    if (resolution !== this.resolution) {\n      this.clear();\n      this.resolution = resolution;\n      this.cluster();\n      this.addFeatures(this.features);\n    }\n  };\n\n  /**\n   * Set the distance in pixels between clusters.\n   * @param {number} distance The distance in pixels.\n   * @api\n   */\n  Cluster.prototype.setDistance = function setDistance (distance) {\n    this.distance = distance;\n    this.refresh();\n  };\n\n  /**\n   * handle the source changing\n   * @override\n   */\n  Cluster.prototype.refresh = function refresh () {\n    this.clear();\n    this.cluster();\n    this.addFeatures(this.features);\n    VectorSource.prototype.refresh.call(this);\n  };\n\n  /**\n   * @protected\n   */\n  Cluster.prototype.cluster = function cluster () {\n    if (this.resolution === undefined) {\n      return;\n    }\n    this.features.length = 0;\n    var extent = createEmpty();\n    var mapDistance = this.distance * this.resolution;\n    var features = this.source.getFeatures();\n\n    /**\n     * @type {!Object<string, boolean>}\n     */\n    var clustered = {};\n\n    for (var i = 0, ii = features.length; i < ii; i++) {\n      var feature = features[i];\n      if (!(getUid(feature) in clustered)) {\n        var geometry = this.geometryFunction(feature);\n        if (geometry) {\n          var coordinates = geometry.getCoordinates();\n          createOrUpdateFromCoordinate(coordinates, extent);\n          buffer(extent, mapDistance, extent);\n\n          var neighbors = this.source.getFeaturesInExtent(extent);\n          neighbors = neighbors.filter(function(neighbor) {\n            var uid = getUid(neighbor);\n            if (!(uid in clustered)) {\n              clustered[uid] = true;\n              return true;\n            } else {\n              return false;\n            }\n          });\n          this.features.push(this.createCluster(neighbors));\n        }\n      }\n    }\n  };\n\n  /**\n   * @param {Array<Feature>} features Features\n   * @return {Feature} The cluster feature.\n   * @protected\n   */\n  Cluster.prototype.createCluster = function createCluster (features) {\n    var centroid = [0, 0];\n    for (var i = features.length - 1; i >= 0; --i) {\n      var geometry = this.geometryFunction(features[i]);\n      if (geometry) {\n        addCoordinate(centroid, geometry.getCoordinates());\n      } else {\n        features.splice(i, 1);\n      }\n    }\n    scaleCoordinate(centroid, 1 / features.length);\n\n    var cluster = new Feature(new Point(centroid));\n    cluster.set('features', features);\n    return cluster;\n  };\n\n  return Cluster;\n}(VectorSource));\n\n\nexport default Cluster;\n\n//# sourceMappingURL=Cluster.js.map","/**\n * @module ol/reproj/Image\n */\nimport {ERROR_THRESHOLD} from './common.js';\n\nimport ImageBase from '../ImageBase.js';\nimport ImageState from '../ImageState.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getCenter, getIntersection, getHeight, getWidth} from '../extent.js';\nimport {calculateSourceResolution, render as renderReprojected} from '../reproj.js';\nimport Triangulation from './Triangulation.js';\n\n\n/**\n * @typedef {function(import(\"../extent.js\").Extent, number, number) : import(\"../ImageBase.js\").default} FunctionType\n */\n\n\n/**\n * @classdesc\n * Class encapsulating single reprojected image.\n * See {@link module:ol/source/Image~ImageSource}.\n */\nvar ReprojImage = /*@__PURE__*/(function (ImageBase) {\n  function ReprojImage(sourceProj, targetProj, targetExtent, targetResolution, pixelRatio, getImageFunction) {\n    var maxSourceExtent = sourceProj.getExtent();\n    var maxTargetExtent = targetProj.getExtent();\n\n    var limitedTargetExtent = maxTargetExtent ?\n      getIntersection(targetExtent, maxTargetExtent) : targetExtent;\n\n    var targetCenter = getCenter(limitedTargetExtent);\n    var sourceResolution = calculateSourceResolution(\n      sourceProj, targetProj, targetCenter, targetResolution);\n\n    var errorThresholdInPixels = ERROR_THRESHOLD;\n\n    var triangulation = new Triangulation(\n      sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,\n      sourceResolution * errorThresholdInPixels);\n\n    var sourceExtent = triangulation.calculateSourceExtent();\n    var sourceImage = getImageFunction(sourceExtent, sourceResolution, pixelRatio);\n    var state = ImageState.LOADED;\n    if (sourceImage) {\n      state = ImageState.IDLE;\n    }\n    var sourcePixelRatio = sourceImage ? sourceImage.getPixelRatio() : 1;\n\n    ImageBase.call(this, targetExtent, targetResolution, sourcePixelRatio, state);\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.targetProj_ = targetProj;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.maxSourceExtent_ = maxSourceExtent;\n\n    /**\n     * @private\n     * @type {!import(\"./Triangulation.js\").default}\n     */\n    this.triangulation_ = triangulation;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.targetResolution_ = targetResolution;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.targetExtent_ = targetExtent;\n\n    /**\n     * @private\n     * @type {import(\"../ImageBase.js\").default}\n     */\n    this.sourceImage_ = sourceImage;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.sourcePixelRatio_ = sourcePixelRatio;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement}\n     */\n    this.canvas_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../events.js\").EventsKey}\n     */\n    this.sourceListenerKey_ = null;\n  }\n\n  if ( ImageBase ) ReprojImage.__proto__ = ImageBase;\n  ReprojImage.prototype = Object.create( ImageBase && ImageBase.prototype );\n  ReprojImage.prototype.constructor = ReprojImage;\n\n  /**\n   * @inheritDoc\n   */\n  ReprojImage.prototype.disposeInternal = function disposeInternal () {\n    if (this.state == ImageState.LOADING) {\n      this.unlistenSource_();\n    }\n    ImageBase.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ReprojImage.prototype.getImage = function getImage () {\n    return this.canvas_;\n  };\n\n  /**\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  ReprojImage.prototype.getProjection = function getProjection () {\n    return this.targetProj_;\n  };\n\n  /**\n   * @private\n   */\n  ReprojImage.prototype.reproject_ = function reproject_ () {\n    var sourceState = this.sourceImage_.getState();\n    if (sourceState == ImageState.LOADED) {\n      var width = getWidth(this.targetExtent_) / this.targetResolution_;\n      var height = getHeight(this.targetExtent_) / this.targetResolution_;\n\n      this.canvas_ = renderReprojected(width, height, this.sourcePixelRatio_,\n        this.sourceImage_.getResolution(), this.maxSourceExtent_,\n        this.targetResolution_, this.targetExtent_, this.triangulation_, [{\n          extent: this.sourceImage_.getExtent(),\n          image: this.sourceImage_.getImage()\n        }], 0);\n    }\n    this.state = sourceState;\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ReprojImage.prototype.load = function load () {\n    if (this.state == ImageState.IDLE) {\n      this.state = ImageState.LOADING;\n      this.changed();\n\n      var sourceState = this.sourceImage_.getState();\n      if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n        this.reproject_();\n      } else {\n        this.sourceListenerKey_ = listen(this.sourceImage_,\n          EventType.CHANGE, function(e) {\n            var sourceState = this.sourceImage_.getState();\n            if (sourceState == ImageState.LOADED || sourceState == ImageState.ERROR) {\n              this.unlistenSource_();\n              this.reproject_();\n            }\n          }, this);\n        this.sourceImage_.load();\n      }\n    }\n  };\n\n  /**\n   * @private\n   */\n  ReprojImage.prototype.unlistenSource_ = function unlistenSource_ () {\n    unlistenByKey(/** @type {!import(\"../events.js\").EventsKey} */ (this.sourceListenerKey_));\n    this.sourceListenerKey_ = null;\n  };\n\n  return ReprojImage;\n}(ImageBase));\n\n\nexport default ReprojImage;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/source/Image\n */\nimport {abstract} from '../util.js';\nimport {ENABLE_RASTER_REPROJECTION} from '../reproj/common.js';\nimport ImageState from '../ImageState.js';\nimport {linearFindNearest} from '../array.js';\nimport Event from '../events/Event.js';\nimport {equals} from '../extent.js';\nimport {equivalent} from '../proj.js';\nimport ReprojImage from '../reproj/Image.js';\nimport Source from './Source.js';\n\n\n/**\n * @enum {string}\n */\nvar ImageSourceEventType = {\n\n  /**\n   * Triggered when an image starts loading.\n   * @event ol/source/Image~ImageSourceEvent#imageloadstart\n   * @api\n   */\n  IMAGELOADSTART: 'imageloadstart',\n\n  /**\n   * Triggered when an image finishes loading.\n   * @event ol/source/Image~ImageSourceEvent#imageloadend\n   * @api\n   */\n  IMAGELOADEND: 'imageloadend',\n\n  /**\n   * Triggered if image loading results in an error.\n   * @event ol/source/Image~ImageSourceEvent#imageloaderror\n   * @api\n   */\n  IMAGELOADERROR: 'imageloaderror'\n\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this\n * type.\n */\nvar ImageSourceEvent = /*@__PURE__*/(function (Event) {\n  function ImageSourceEvent(type, image) {\n\n    Event.call(this, type);\n\n    /**\n     * The image related to the event.\n     * @type {import(\"../Image.js\").default}\n     * @api\n     */\n    this.image = image;\n\n  }\n\n  if ( Event ) ImageSourceEvent.__proto__ = Event;\n  ImageSourceEvent.prototype = Object.create( Event && Event.prototype );\n  ImageSourceEvent.prototype.constructor = ImageSourceEvent;\n\n  return ImageSourceEvent;\n}(Event));\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions]\n * @property {import(\"../proj.js\").ProjectionLike} projection\n * @property {Array<number>} [resolutions]\n * @property {import(\"./State.js\").default} [state]\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for sources providing a single image.\n * @abstract\n * @api\n */\nvar ImageSource = /*@__PURE__*/(function (Source) {\n  function ImageSource(options) {\n    Source.call(this, {\n      attributions: options.attributions,\n      projection: options.projection,\n      state: options.state\n    });\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.resolutions_ = options.resolutions !== undefined ?\n      options.resolutions : null;\n\n\n    /**\n     * @private\n     * @type {import(\"../reproj/Image.js\").default}\n     */\n    this.reprojectedImage_ = null;\n\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.reprojectedRevision_ = 0;\n  }\n\n  if ( Source ) ImageSource.__proto__ = Source;\n  ImageSource.prototype = Object.create( Source && Source.prototype );\n  ImageSource.prototype.constructor = ImageSource;\n\n  /**\n   * @return {Array<number>} Resolutions.\n   * @override\n   */\n  ImageSource.prototype.getResolutions = function getResolutions () {\n    return this.resolutions_;\n  };\n\n  /**\n   * @protected\n   * @param {number} resolution Resolution.\n   * @return {number} Resolution.\n   */\n  ImageSource.prototype.findNearestResolution = function findNearestResolution (resolution) {\n    if (this.resolutions_) {\n      var idx = linearFindNearest(this.resolutions_, resolution, 0);\n      resolution = this.resolutions_[idx];\n    }\n    return resolution;\n  };\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../ImageBase.js\").default} Single image.\n   */\n  ImageSource.prototype.getImage = function getImage (extent, resolution, pixelRatio, projection) {\n    var sourceProjection = this.getProjection();\n    if (!ENABLE_RASTER_REPROJECTION ||\n        !sourceProjection ||\n        !projection ||\n        equivalent(sourceProjection, projection)) {\n      if (sourceProjection) {\n        projection = sourceProjection;\n      }\n      return this.getImageInternal(extent, resolution, pixelRatio, projection);\n    } else {\n      if (this.reprojectedImage_) {\n        if (this.reprojectedRevision_ == this.getRevision() &&\n            equivalent(\n              this.reprojectedImage_.getProjection(), projection) &&\n            this.reprojectedImage_.getResolution() == resolution &&\n            equals(this.reprojectedImage_.getExtent(), extent)) {\n          return this.reprojectedImage_;\n        }\n        this.reprojectedImage_.dispose();\n        this.reprojectedImage_ = null;\n      }\n\n      this.reprojectedImage_ = new ReprojImage(\n        sourceProjection, projection, extent, resolution, pixelRatio,\n        function(extent, resolution, pixelRatio) {\n          return this.getImageInternal(extent, resolution,\n            pixelRatio, sourceProjection);\n        }.bind(this));\n      this.reprojectedRevision_ = this.getRevision();\n\n      return this.reprojectedImage_;\n    }\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {number} resolution Resolution.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {import(\"../ImageBase.js\").default} Single image.\n   * @protected\n   */\n  ImageSource.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n    return abstract();\n  };\n\n  /**\n   * Handle image change events.\n   * @param {import(\"../events/Event.js\").default} event Event.\n   * @protected\n   */\n  ImageSource.prototype.handleImageChange = function handleImageChange (event) {\n    var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n    switch (image.getState()) {\n      case ImageState.LOADING:\n        this.loading = true;\n        this.dispatchEvent(\n          new ImageSourceEvent(ImageSourceEventType.IMAGELOADSTART,\n            image));\n        break;\n      case ImageState.LOADED:\n        this.loading = false;\n        this.dispatchEvent(\n          new ImageSourceEvent(ImageSourceEventType.IMAGELOADEND,\n            image));\n        break;\n      case ImageState.ERROR:\n        this.loading = false;\n        this.dispatchEvent(\n          new ImageSourceEvent(ImageSourceEventType.IMAGELOADERROR,\n            image));\n        break;\n      default:\n        // pass\n    }\n  };\n\n  return ImageSource;\n}(Source));\n\n\n/**\n * Default image load function for image sources that use import(\"../Image.js\").Image image\n * instances.\n * @param {import(\"../Image.js\").default} image Image.\n * @param {string} src Source.\n */\nexport function defaultImageLoadFunction(image, src) {\n  /** @type {HTMLImageElement|HTMLVideoElement} */ (image.getImage()).src = src;\n}\n\n\nexport default ImageSource;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/Image\n */\nimport ImageBase from './ImageBase.js';\nimport ImageState from './ImageState.js';\nimport {listenOnce, unlistenByKey} from './events.js';\nimport EventType from './events/EventType.js';\nimport {getHeight} from './extent.js';\n\n\n/**\n * A function that takes an {@link module:ol/Image~Image} for the image and a\n * `{string}` for the src as arguments. It is supposed to make it so the\n * underlying image {@link module:ol/Image~Image#getImage} is assigned the\n * content specified by the src. If not specified, the default is\n *\n *     function(image, src) {\n *       image.getImage().src = src;\n *     }\n *\n * Providing a custom `imageLoadFunction` can be useful to load images with\n * post requests or - in general - through XHR requests, where the src of the\n * image element would be set to a data URI when the content is loaded.\n *\n * @typedef {function(ImageWrapper, string)} LoadFunction\n * @api\n */\n\n\nvar ImageWrapper = /*@__PURE__*/(function (ImageBase) {\n  function ImageWrapper(extent, resolution, pixelRatio, src, crossOrigin, imageLoadFunction) {\n\n    ImageBase.call(this, extent, resolution, pixelRatio, ImageState.IDLE);\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n     */\n    this.image_ = new Image();\n    if (crossOrigin !== null) {\n      this.image_.crossOrigin = crossOrigin;\n    }\n\n    /**\n     * @private\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.imageListenerKeys_ = null;\n\n    /**\n     * @protected\n     * @type {ImageState}\n     */\n    this.state = ImageState.IDLE;\n\n    /**\n     * @private\n     * @type {LoadFunction}\n     */\n    this.imageLoadFunction_ = imageLoadFunction;\n\n  }\n\n  if ( ImageBase ) ImageWrapper.__proto__ = ImageBase;\n  ImageWrapper.prototype = Object.create( ImageBase && ImageBase.prototype );\n  ImageWrapper.prototype.constructor = ImageWrapper;\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  ImageWrapper.prototype.getImage = function getImage () {\n    return this.image_;\n  };\n\n  /**\n   * Tracks loading or read errors.\n   *\n   * @private\n   */\n  ImageWrapper.prototype.handleImageError_ = function handleImageError_ () {\n    this.state = ImageState.ERROR;\n    this.unlistenImage_();\n    this.changed();\n  };\n\n  /**\n   * Tracks successful image load.\n   *\n   * @private\n   */\n  ImageWrapper.prototype.handleImageLoad_ = function handleImageLoad_ () {\n    if (this.resolution === undefined) {\n      this.resolution = getHeight(this.extent) / this.image_.height;\n    }\n    this.state = ImageState.LOADED;\n    this.unlistenImage_();\n    this.changed();\n  };\n\n  /**\n   * Load the image or retry if loading previously failed.\n   * Loading is taken care of by the tile queue, and calling this method is\n   * only needed for preloading or for reloading in case of an error.\n   * @override\n   * @api\n   */\n  ImageWrapper.prototype.load = function load () {\n    if (this.state == ImageState.IDLE || this.state == ImageState.ERROR) {\n      this.state = ImageState.LOADING;\n      this.changed();\n      this.imageListenerKeys_ = [\n        listenOnce(this.image_, EventType.ERROR,\n          this.handleImageError_, this),\n        listenOnce(this.image_, EventType.LOAD,\n          this.handleImageLoad_, this)\n      ];\n      this.imageLoadFunction_(this, this.src_);\n    }\n  };\n\n  /**\n   * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n   */\n  ImageWrapper.prototype.setImage = function setImage (image) {\n    this.image_ = image;\n  };\n\n  /**\n   * Discards event handlers which listen for load completion or errors.\n   *\n   * @private\n   */\n  ImageWrapper.prototype.unlistenImage_ = function unlistenImage_ () {\n    this.imageListenerKeys_.forEach(unlistenByKey);\n    this.imageListenerKeys_ = null;\n  };\n\n  return ImageWrapper;\n}(ImageBase));\n\n\nexport default ImageWrapper;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/uri\n */\n\n\n/**\n * Appends query parameters to a URI.\n *\n * @param {string} uri The original URI, which may already have query data.\n * @param {!Object} params An object where keys are URI-encoded parameter keys,\n *     and the values are arbitrary types or arrays.\n * @return {string} The new URI.\n */\nexport function appendParams(uri, params) {\n  var keyParams = [];\n  // Skip any null or undefined parameter values\n  Object.keys(params).forEach(function(k) {\n    if (params[k] !== null && params[k] !== undefined) {\n      keyParams.push(k + '=' + encodeURIComponent(params[k]));\n    }\n  });\n  var qs = keyParams.join('&');\n  // remove any trailing ? or &\n  uri = uri.replace(/[?&]$/, '');\n  // append ? or & depending on whether uri has existing parameters\n  uri = uri.indexOf('?') === -1 ? uri + '?' : uri + '&';\n  return uri + qs;\n}\n\n//# sourceMappingURL=uri.js.map","/**\n * @module ol/source/ImageArcGISRest\n */\n\nimport ImageWrapper from '../Image.js';\nimport {assert} from '../asserts.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, getHeight, getWidth} from '../extent.js';\nimport {assign} from '../obj.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport {appendParams} from '../uri.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image} for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting the image from\n * the remote server.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given\n * a URL.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service\n * defaults will be used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is\n * `IMAGE` by default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`, and `IMAGESR`\n * will be set dynamically. Set `LAYERS` to override the default service layer visibility. See\n * {@link http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/}\n * for further reference.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport,\n * `2` means twice the size of the map viewport, and so on.\n * @property {Array<number>} [resolutions] Resolutions. If specified, requests will be made for\n * these resolutions only.\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url\n * should include /MapServer or /ImageServer.\n */\n\n\n/**\n * @classdesc\n * Source for data from ArcGIS Rest services providing single, untiled images.\n * Useful when underlying map service has labels.\n *\n * If underlying map service is not using labels,\n * take advantage of ol image caching and use\n * {@link module:ol/source/TileArcGISRest} data source.\n *\n * @fires ol/source/Image~ImageSourceEvent\n * @api\n */\nvar ImageArcGISRest = /*@__PURE__*/(function (ImageSource) {\n  function ImageArcGISRest(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    ImageSource.call(this, {\n      attributions: options.attributions,\n      projection: options.projection,\n      resolutions: options.resolutions\n    });\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n        options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.url_ = options.url;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").LoadFunction}\n     */\n    this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?\n      options.imageLoadFunction : defaultImageLoadFunction;\n\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.params_ = options.params || {};\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.imageSize_ = [0, 0];\n\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n\n  }\n\n  if ( ImageSource ) ImageArcGISRest.__proto__ = ImageSource;\n  ImageArcGISRest.prototype = Object.create( ImageSource && ImageSource.prototype );\n  ImageArcGISRest.prototype.constructor = ImageArcGISRest;\n\n  /**\n   * Get the user-provided params, i.e. those passed to the constructor through\n   * the \"params\" option, and possibly updated using the updateParams method.\n   * @return {Object} Params.\n   * @api\n   */\n  ImageArcGISRest.prototype.getParams = function getParams () {\n    return this.params_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ImageArcGISRest.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n\n    if (this.url_ === undefined) {\n      return null;\n    }\n\n    resolution = this.findNearestResolution(resolution);\n    pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n    var image = this.image_;\n    if (image &&\n        this.renderedRevision_ == this.getRevision() &&\n        image.getResolution() == resolution &&\n        image.getPixelRatio() == pixelRatio &&\n        containsExtent(image.getExtent(), extent)) {\n      return image;\n    }\n\n    var params = {\n      'F': 'image',\n      'FORMAT': 'PNG32',\n      'TRANSPARENT': true\n    };\n    assign(params, this.params_);\n\n    extent = extent.slice();\n    var centerX = (extent[0] + extent[2]) / 2;\n    var centerY = (extent[1] + extent[3]) / 2;\n    if (this.ratio_ != 1) {\n      var halfWidth = this.ratio_ * getWidth(extent) / 2;\n      var halfHeight = this.ratio_ * getHeight(extent) / 2;\n      extent[0] = centerX - halfWidth;\n      extent[1] = centerY - halfHeight;\n      extent[2] = centerX + halfWidth;\n      extent[3] = centerY + halfHeight;\n    }\n\n    var imageResolution = resolution / pixelRatio;\n\n    // Compute an integer width and height.\n    var width = Math.ceil(getWidth(extent) / imageResolution);\n    var height = Math.ceil(getHeight(extent) / imageResolution);\n\n    // Modify the extent to match the integer width and height.\n    extent[0] = centerX - imageResolution * width / 2;\n    extent[2] = centerX + imageResolution * width / 2;\n    extent[1] = centerY - imageResolution * height / 2;\n    extent[3] = centerY + imageResolution * height / 2;\n\n    this.imageSize_[0] = width;\n    this.imageSize_[1] = height;\n\n    var url = this.getRequestUrl_(extent, this.imageSize_, pixelRatio,\n      projection, params);\n\n    this.image_ = new ImageWrapper(extent, resolution, pixelRatio,\n      url, this.crossOrigin_, this.imageLoadFunction_);\n\n    this.renderedRevision_ = this.getRevision();\n\n    listen(this.image_, EventType.CHANGE,\n      this.handleImageChange, this);\n\n    return this.image_;\n\n  };\n\n  /**\n   * Return the image load function of the source.\n   * @return {import(\"../Image.js\").LoadFunction} The image load function.\n   * @api\n   */\n  ImageArcGISRest.prototype.getImageLoadFunction = function getImageLoadFunction () {\n    return this.imageLoadFunction_;\n  };\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {import(\"../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {Object} params Params.\n   * @return {string} Request URL.\n   * @private\n   */\n  ImageArcGISRest.prototype.getRequestUrl_ = function getRequestUrl_ (extent, size, pixelRatio, projection, params) {\n    // ArcGIS Server only wants the numeric portion of the projection ID.\n    var srid = projection.getCode().split(':').pop();\n\n    params['SIZE'] = size[0] + ',' + size[1];\n    params['BBOX'] = extent.join(',');\n    params['BBOXSR'] = srid;\n    params['IMAGESR'] = srid;\n    params['DPI'] = Math.round(90 * pixelRatio);\n\n    var url = this.url_;\n\n    var modifiedUrl = url\n      .replace(/MapServer\\/?$/, 'MapServer/export')\n      .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n    if (modifiedUrl == url) {\n      assert(false, 50); // `options.featureTypes` should be an Array\n    }\n    return appendParams(modifiedUrl, params);\n  };\n\n  /**\n   * Return the URL used for this ArcGIS source.\n   * @return {string|undefined} URL.\n   * @api\n   */\n  ImageArcGISRest.prototype.getUrl = function getUrl () {\n    return this.url_;\n  };\n\n  /**\n   * Set the image load function of the source.\n   * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n   * @api\n   */\n  ImageArcGISRest.prototype.setImageLoadFunction = function setImageLoadFunction (imageLoadFunction) {\n    this.image_ = null;\n    this.imageLoadFunction_ = imageLoadFunction;\n    this.changed();\n  };\n\n  /**\n   * Set the URL to use for requests.\n   * @param {string|undefined} url URL.\n   * @api\n   */\n  ImageArcGISRest.prototype.setUrl = function setUrl (url) {\n    if (url != this.url_) {\n      this.url_ = url;\n      this.image_ = null;\n      this.changed();\n    }\n  };\n\n  /**\n   * Update the user-provided params.\n   * @param {Object} params Params.\n   * @api\n   */\n  ImageArcGISRest.prototype.updateParams = function updateParams (params) {\n    assign(this.params_, params);\n    this.image_ = null;\n    this.changed();\n  };\n\n  return ImageArcGISRest;\n}(ImageSource));\n\n\nexport default ImageArcGISRest;\n\n//# sourceMappingURL=ImageArcGISRest.js.map","/**\n * @module ol/source/ImageCanvas\n */\n\nimport ImageCanvas from '../ImageCanvas.js';\nimport {containsExtent, getHeight, getWidth, scaleFromCenter} from '../extent.js';\nimport ImageSource from './Image.js';\n\n\n/**\n * A function returning the canvas element (`{HTMLCanvasElement}`)\n * used by the source as an image. The arguments passed to the function are:\n * {@link module:ol/extent~Extent} the image extent, `{number}` the image resolution,\n * `{number}` the device pixel ratio, {@link module:ol/size~Size} the image size, and\n * {@link module:ol/proj/Projection} the image projection. The canvas returned by\n * this function is cached by the source. The this keyword inside the function\n * references the {@link module:ol/source/ImageCanvas}.\n *\n * @typedef {function(this:import(\"../ImageCanvas.js\").default, import(\"../extent.js\").Extent, number,\n *     number, import(\"../size.js\").Size, import(\"../proj/Projection.js\").default): HTMLCanvasElement} FunctionType\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {FunctionType} [canvasFunction] Canvas function.\n * The function returning the canvas element used by the source\n * as an image. The arguments passed to the function are: `{import(\"../extent.js\").Extent}` the\n * image extent, `{number}` the image resolution, `{number}` the device pixel\n * ratio, `{import(\"../size.js\").Size}` the image size, and `{import(\"../proj/Projection.js\").Projection}` the image\n * projection. The canvas returned by this function is cached by the source. If\n * the value returned by the function is later changed then\n * `changed` should be called on the source for the source to\n * invalidate the current cached image. See: {@link module:ol/Observable~Observable#changed}\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the\n * width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, new canvases will be created for these resolutions\n * @property {import(\"./State.js\").default} [state] Source state.\n */\n\n\n/**\n * @classdesc\n * Base class for image sources where a canvas element is the image.\n * @api\n */\nvar ImageCanvasSource = /*@__PURE__*/(function (ImageSource) {\n  function ImageCanvasSource(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    ImageSource.call(this, {\n      attributions: options.attributions,\n      projection: options.projection,\n      resolutions: options.resolutions,\n      state: options.state\n    });\n\n    /**\n    * @private\n    * @type {FunctionType}\n    */\n    this.canvasFunction_ = options.canvasFunction;\n\n    /**\n    * @private\n    * @type {import(\"../ImageCanvas.js\").default}\n    */\n    this.canvas_ = null;\n\n    /**\n    * @private\n    * @type {number}\n    */\n    this.renderedRevision_ = 0;\n\n    /**\n    * @private\n    * @type {number}\n    */\n    this.ratio_ = options.ratio !== undefined ?\n      options.ratio : 1.5;\n\n  }\n\n  if ( ImageSource ) ImageCanvasSource.__proto__ = ImageSource;\n  ImageCanvasSource.prototype = Object.create( ImageSource && ImageSource.prototype );\n  ImageCanvasSource.prototype.constructor = ImageCanvasSource;\n\n  /**\n  * @inheritDoc\n  */\n  ImageCanvasSource.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n    resolution = this.findNearestResolution(resolution);\n\n    var canvas = this.canvas_;\n    if (canvas &&\n       this.renderedRevision_ == this.getRevision() &&\n       canvas.getResolution() == resolution &&\n       canvas.getPixelRatio() == pixelRatio &&\n       containsExtent(canvas.getExtent(), extent)) {\n      return canvas;\n    }\n\n    extent = extent.slice();\n    scaleFromCenter(extent, this.ratio_);\n    var width = getWidth(extent) / resolution;\n    var height = getHeight(extent) / resolution;\n    var size = [width * pixelRatio, height * pixelRatio];\n\n    var canvasElement = this.canvasFunction_.call(\n      this, extent, resolution, pixelRatio, size, projection);\n    if (canvasElement) {\n      canvas = new ImageCanvas(extent, resolution, pixelRatio, canvasElement);\n    }\n    this.canvas_ = canvas;\n    this.renderedRevision_ = this.getRevision();\n\n    return canvas;\n  };\n\n  return ImageCanvasSource;\n}(ImageSource));\n\n\nexport default ImageCanvasSource;\n\n//# sourceMappingURL=ImageCanvas.js.map","/**\n * @module ol/source/ImageMapGuide\n */\n\nimport ImageWrapper from '../Image.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, getCenter, getHeight, getWidth, scaleFromCenter} from '../extent.js';\nimport {assign} from '../obj.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport {appendParams} from '../uri.js';\n\n/**\n * @typedef {Object} Options\n * @property {string} [url] The mapagent url.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [displayDpi=96] The display resolution.\n * @property {number} [metersPerUnit=1] The meters-per-unit value.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {boolean} [useOverlay] If `true`, will use `GETDYNAMICMAPOVERLAYIMAGE`.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {Object} [params] Additional parameters.\n */\n\n\n/**\n * @classdesc\n * Source for images from Mapguide servers\n *\n * @fires ol/source/Image~ImageSourceEvent\n * @api\n */\nvar ImageMapGuide = /*@__PURE__*/(function (ImageSource) {\n  function ImageMapGuide(options) {\n\n    ImageSource.call(this, {\n      projection: options.projection,\n      resolutions: options.resolutions\n    });\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n        options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.displayDpi_ = options.displayDpi !== undefined ?\n      options.displayDpi : 96;\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.params_ = options.params || {};\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.url_ = options.url;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").LoadFunction}\n     */\n    this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?\n      options.imageLoadFunction : defaultImageLoadFunction;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.metersPerUnit_ = options.metersPerUnit !== undefined ?\n      options.metersPerUnit : 1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.ratio_ = options.ratio !== undefined ? options.ratio : 1;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.useOverlay_ = options.useOverlay !== undefined ?\n      options.useOverlay : false;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = 0;\n\n  }\n\n  if ( ImageSource ) ImageMapGuide.__proto__ = ImageSource;\n  ImageMapGuide.prototype = Object.create( ImageSource && ImageSource.prototype );\n  ImageMapGuide.prototype.constructor = ImageMapGuide;\n\n  /**\n   * Get the user-provided params, i.e. those passed to the constructor through\n   * the \"params\" option, and possibly updated using the updateParams method.\n   * @return {Object} Params.\n   * @api\n   */\n  ImageMapGuide.prototype.getParams = function getParams () {\n    return this.params_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ImageMapGuide.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n    resolution = this.findNearestResolution(resolution);\n    pixelRatio = this.hidpi_ ? pixelRatio : 1;\n\n    var image = this.image_;\n    if (image &&\n        this.renderedRevision_ == this.getRevision() &&\n        image.getResolution() == resolution &&\n        image.getPixelRatio() == pixelRatio &&\n        containsExtent(image.getExtent(), extent)) {\n      return image;\n    }\n\n    if (this.ratio_ != 1) {\n      extent = extent.slice();\n      scaleFromCenter(extent, this.ratio_);\n    }\n    var width = getWidth(extent) / resolution;\n    var height = getHeight(extent) / resolution;\n    var size = [width * pixelRatio, height * pixelRatio];\n\n    if (this.url_ !== undefined) {\n      var imageUrl = this.getUrl(this.url_, this.params_, extent, size,\n        projection);\n      image = new ImageWrapper(extent, resolution, pixelRatio,\n        imageUrl, this.crossOrigin_,\n        this.imageLoadFunction_);\n      listen(image, EventType.CHANGE,\n        this.handleImageChange, this);\n    } else {\n      image = null;\n    }\n    this.image_ = image;\n    this.renderedRevision_ = this.getRevision();\n\n    return image;\n  };\n\n  /**\n   * Return the image load function of the source.\n   * @return {import(\"../Image.js\").LoadFunction} The image load function.\n   * @api\n   */\n  ImageMapGuide.prototype.getImageLoadFunction = function getImageLoadFunction () {\n    return this.imageLoadFunction_;\n  };\n\n  /**\n   * Update the user-provided params.\n   * @param {Object} params Params.\n   * @api\n   */\n  ImageMapGuide.prototype.updateParams = function updateParams (params) {\n    assign(this.params_, params);\n    this.changed();\n  };\n\n  /**\n   * @param {string} baseUrl The mapagent url.\n   * @param {Object<string, string|number>} params Request parameters.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {import(\"../size.js\").Size} size Size.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @return {string} The mapagent map image request URL.\n   */\n  ImageMapGuide.prototype.getUrl = function getUrl (baseUrl, params, extent, size, projection) {\n    var scale = getScale(extent, size,\n      this.metersPerUnit_, this.displayDpi_);\n    var center = getCenter(extent);\n    var baseParams = {\n      'OPERATION': this.useOverlay_ ? 'GETDYNAMICMAPOVERLAYIMAGE' : 'GETMAPIMAGE',\n      'VERSION': '2.0.0',\n      'LOCALE': 'en',\n      'CLIENTAGENT': 'ol/source/ImageMapGuide source',\n      'CLIP': '1',\n      'SETDISPLAYDPI': this.displayDpi_,\n      'SETDISPLAYWIDTH': Math.round(size[0]),\n      'SETDISPLAYHEIGHT': Math.round(size[1]),\n      'SETVIEWSCALE': scale,\n      'SETVIEWCENTERX': center[0],\n      'SETVIEWCENTERY': center[1]\n    };\n    assign(baseParams, params);\n    return appendParams(baseUrl, baseParams);\n  };\n\n  /**\n   * Set the image load function of the MapGuide source.\n   * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n   * @api\n   */\n  ImageMapGuide.prototype.setImageLoadFunction = function setImageLoadFunction (imageLoadFunction) {\n    this.image_ = null;\n    this.imageLoadFunction_ = imageLoadFunction;\n    this.changed();\n  };\n\n  return ImageMapGuide;\n}(ImageSource));\n\n\n/**\n * @param {import(\"../extent.js\").Extent} extent The map extents.\n * @param {import(\"../size.js\").Size} size The viewport size.\n * @param {number} metersPerUnit The meters-per-unit value.\n * @param {number} dpi The display resolution.\n * @return {number} The computed map scale.\n */\nfunction getScale(extent, size, metersPerUnit, dpi) {\n  var mcsW = getWidth(extent);\n  var mcsH = getHeight(extent);\n  var devW = size[0];\n  var devH = size[1];\n  var mpp = 0.0254 / dpi;\n  if (devH * mcsW > devW * mcsH) {\n    return mcsW * metersPerUnit / (devW * mpp); // width limited\n  } else {\n    return mcsH * metersPerUnit / (devH * mpp); // height limited\n  }\n}\n\n\nexport default ImageMapGuide;\n\n//# sourceMappingURL=ImageMapGuide.js.map","/**\n * @module ol/source/ImageStatic\n */\n\nimport ImageWrapper from '../Image.js';\nimport ImageState from '../ImageState.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {intersects, getHeight, getWidth} from '../extent.js';\nimport {get as getProjection} from '../proj.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../extent.js\").Extent} [imageExtent] Extent of the image in map coordinates.\n * This is the [left, bottom, right, top] map coordinates of your image.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {import(\"../size.js\").Size} [imageSize] Size of the image in pixels. Usually the image size is auto-detected, so this\n * only needs to be set if auto-detection fails for some reason.\n * @property {string} url Image URL.\n */\n\n\n/**\n * @classdesc\n * A layer source for displaying a single, static image.\n * @api\n */\nvar Static = /*@__PURE__*/(function (ImageSource) {\n  function Static(options) {\n    var crossOrigin = options.crossOrigin !== undefined ?\n      options.crossOrigin : null;\n\n    var /** @type {import(\"../Image.js\").LoadFunction} */ imageLoadFunction =\n        options.imageLoadFunction !== undefined ?\n          options.imageLoadFunction : defaultImageLoadFunction;\n\n    ImageSource.call(this, {\n      attributions: options.attributions,\n      projection: getProjection(options.projection)\n    });\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.url_ = options.url;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.imageExtent_ = options.imageExtent;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default}\n     */\n    this.image_ = new ImageWrapper(this.imageExtent_, undefined, 1, this.url_, crossOrigin, imageLoadFunction);\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.imageSize_ = options.imageSize ? options.imageSize : null;\n\n    listen(this.image_, EventType.CHANGE,\n      this.handleImageChange, this);\n\n  }\n\n  if ( ImageSource ) Static.__proto__ = ImageSource;\n  Static.prototype = Object.create( ImageSource && ImageSource.prototype );\n  Static.prototype.constructor = Static;\n\n  /**\n   * Returns the image extent\n   * @return {import(\"../extent.js\").Extent} image extent.\n   * @api\n   */\n  Static.prototype.getImageExtent = function getImageExtent () {\n    return this.imageExtent_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Static.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n    if (intersects(extent, this.image_.getExtent())) {\n      return this.image_;\n    }\n    return null;\n  };\n\n  /**\n   * Return the URL used for this image source.\n   * @return {string} URL.\n   * @api\n   */\n  Static.prototype.getUrl = function getUrl () {\n    return this.url_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Static.prototype.handleImageChange = function handleImageChange (evt) {\n    if (this.image_.getState() == ImageState.LOADED) {\n      var imageExtent = this.image_.getExtent();\n      var image = this.image_.getImage();\n      var imageWidth, imageHeight;\n      if (this.imageSize_) {\n        imageWidth = this.imageSize_[0];\n        imageHeight = this.imageSize_[1];\n      } else {\n        imageWidth = image.width;\n        imageHeight = image.height;\n      }\n      var resolution = getHeight(imageExtent) / imageHeight;\n      var targetWidth = Math.ceil(getWidth(imageExtent) / resolution);\n      if (targetWidth != imageWidth) {\n        var context = createCanvasContext2D(targetWidth, imageHeight);\n        var canvas = context.canvas;\n        context.drawImage(image, 0, 0, imageWidth, imageHeight,\n          0, 0, canvas.width, canvas.height);\n        this.image_.setImage(canvas);\n      }\n    }\n    ImageSource.prototype.handleImageChange.call(this, evt);\n  };\n\n  return Static;\n}(ImageSource));\n\n\nexport default Static;\n\n//# sourceMappingURL=ImageStatic.js.map","/**\n * @module ol/source/common\n */\n\n/**\n * Default WMS version.\n * @type {string}\n */\nexport var DEFAULT_WMS_VERSION = '1.3.0';\n\n//# sourceMappingURL=common.js.map","/**\n * @module ol/source/WMSServerType\n */\n\n/**\n * Available server types: `'carmentaserver'`, `'geoserver'`, `'mapserver'`,\n *     `'qgis'`. These are servers that have vendor parameters beyond the WMS\n *     specification that OpenLayers can make use of.\n * @enum {string}\n */\nexport default {\n  CARMENTA_SERVER: 'carmentaserver',\n  GEOSERVER: 'geoserver',\n  MAPSERVER: 'mapserver',\n  QGIS: 'qgis'\n};\n\n//# sourceMappingURL=WMSServerType.js.map","/**\n * @module ol/source/ImageWMS\n */\n\nimport {DEFAULT_WMS_VERSION} from './common.js';\n\nimport ImageWrapper from '../Image.js';\nimport {assert} from '../asserts.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, getCenter, getForViewAndSize, getHeight, getWidth} from '../extent.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection, transform} from '../proj.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport ImageSource, {defaultImageLoadFunction} from './Image.js';\nimport WMSServerType from './WMSServerType.js';\nimport {compareVersions} from '../string.js';\nimport {appendParams} from '../uri.js';\n\n\n/**\n * @const\n * @type {import(\"../size.js\").Size}\n */\nvar GETFEATUREINFO_IMAGE_SIZE = [101, 101];\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"./WMSServerType.js\").default|string} [serverType] The type of\n * the remote WMS server: `mapserver`, `geoserver` or `qgis`. Only needed if `hidpi` is `true`.\n * @property {import(\"../Image.js\").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means\n * twice the width and height of the map viewport, and so on. Must be `1` or\n * higher.\n * @property {Array<number>} [resolutions] Resolutions.\n * If specified, requests will be made for these resolutions only.\n * @property {string} url WMS service URL.\n */\n\n\n/**\n * @classdesc\n * Source for WMS servers providing single, untiled images.\n *\n * @fires ol/source/Image~ImageSourceEvent\n * @api\n */\nvar ImageWMS = /*@__PURE__*/(function (ImageSource) {\n  function ImageWMS(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    ImageSource.call(this, {\n      attributions: options.attributions,\n      projection: options.projection,\n      resolutions: options.resolutions\n    });\n\n    /**\n     * @private\n     * @type {?string}\n     */\n    this.crossOrigin_ =\n        options.crossOrigin !== undefined ? options.crossOrigin : null;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.url_ = options.url;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").LoadFunction}\n     */\n    this.imageLoadFunction_ = options.imageLoadFunction !== undefined ?\n      options.imageLoadFunction : defaultImageLoadFunction;\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.params_ = options.params || {};\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.v13_ = true;\n    this.updateV13_();\n\n    /**\n     * @private\n     * @type {import(\"./WMSServerType.js\").default|undefined}\n     */\n    this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n    /**\n     * @private\n     * @type {import(\"../Image.js\").default}\n     */\n    this.image_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.imageSize_ = [0, 0];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.renderedRevision_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.ratio_ = options.ratio !== undefined ? options.ratio : 1.5;\n\n  }\n\n  if ( ImageSource ) ImageWMS.__proto__ = ImageSource;\n  ImageWMS.prototype = Object.create( ImageSource && ImageSource.prototype );\n  ImageWMS.prototype.constructor = ImageWMS;\n\n  /**\n   * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n   * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n   * constructed.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n   *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n   *     in the `LAYERS` parameter will be used. `VERSION` should not be\n   *     specified here.\n   * @return {string|undefined} GetFeatureInfo URL.\n   * @api\n   */\n  ImageWMS.prototype.getGetFeatureInfoUrl = function getGetFeatureInfoUrl (coordinate, resolution, projection, params) {\n    if (this.url_ === undefined) {\n      return undefined;\n    }\n    var projectionObj = getProjection(projection);\n    var sourceProjectionObj = this.getProjection();\n\n    if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n      resolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, resolution);\n      coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n    }\n\n    var extent = getForViewAndSize(coordinate, resolution, 0,\n      GETFEATUREINFO_IMAGE_SIZE);\n\n    var baseParams = {\n      'SERVICE': 'WMS',\n      'VERSION': DEFAULT_WMS_VERSION,\n      'REQUEST': 'GetFeatureInfo',\n      'FORMAT': 'image/png',\n      'TRANSPARENT': true,\n      'QUERY_LAYERS': this.params_['LAYERS']\n    };\n    assign(baseParams, this.params_, params);\n\n    var x = Math.floor((coordinate[0] - extent[0]) / resolution);\n    var y = Math.floor((extent[3] - coordinate[1]) / resolution);\n    baseParams[this.v13_ ? 'I' : 'X'] = x;\n    baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n    return this.getRequestUrl_(\n      extent, GETFEATUREINFO_IMAGE_SIZE,\n      1, sourceProjectionObj || projectionObj, baseParams);\n  };\n\n  /**\n   * Get the user-provided params, i.e. those passed to the constructor through\n   * the \"params\" option, and possibly updated using the updateParams method.\n   * @return {Object} Params.\n   * @api\n   */\n  ImageWMS.prototype.getParams = function getParams () {\n    return this.params_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ImageWMS.prototype.getImageInternal = function getImageInternal (extent, resolution, pixelRatio, projection) {\n\n    if (this.url_ === undefined) {\n      return null;\n    }\n\n    resolution = this.findNearestResolution(resolution);\n\n    if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n      pixelRatio = 1;\n    }\n\n    var imageResolution = resolution / pixelRatio;\n\n    var center = getCenter(extent);\n    var viewWidth = Math.ceil(getWidth(extent) / imageResolution);\n    var viewHeight = Math.ceil(getHeight(extent) / imageResolution);\n    var viewExtent = getForViewAndSize(center, imageResolution, 0,\n      [viewWidth, viewHeight]);\n    var requestWidth = Math.ceil(this.ratio_ * getWidth(extent) / imageResolution);\n    var requestHeight = Math.ceil(this.ratio_ * getHeight(extent) / imageResolution);\n    var requestExtent = getForViewAndSize(center, imageResolution, 0,\n      [requestWidth, requestHeight]);\n\n    var image = this.image_;\n    if (image &&\n        this.renderedRevision_ == this.getRevision() &&\n        image.getResolution() == resolution &&\n        image.getPixelRatio() == pixelRatio &&\n        containsExtent(image.getExtent(), viewExtent)) {\n      return image;\n    }\n\n    var params = {\n      'SERVICE': 'WMS',\n      'VERSION': DEFAULT_WMS_VERSION,\n      'REQUEST': 'GetMap',\n      'FORMAT': 'image/png',\n      'TRANSPARENT': true\n    };\n    assign(params, this.params_);\n\n    this.imageSize_[0] = Math.round(getWidth(requestExtent) / imageResolution);\n    this.imageSize_[1] = Math.round(getHeight(requestExtent) / imageResolution);\n\n    var url = this.getRequestUrl_(requestExtent, this.imageSize_, pixelRatio,\n      projection, params);\n\n    this.image_ = new ImageWrapper(requestExtent, resolution, pixelRatio,\n      url, this.crossOrigin_, this.imageLoadFunction_);\n\n    this.renderedRevision_ = this.getRevision();\n\n    listen(this.image_, EventType.CHANGE,\n      this.handleImageChange, this);\n\n    return this.image_;\n\n  };\n\n  /**\n   * Return the image load function of the source.\n   * @return {import(\"../Image.js\").LoadFunction} The image load function.\n   * @api\n   */\n  ImageWMS.prototype.getImageLoadFunction = function getImageLoadFunction () {\n    return this.imageLoadFunction_;\n  };\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {import(\"../size.js\").Size} size Size.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {Object} params Params.\n   * @return {string} Request URL.\n   * @private\n   */\n  ImageWMS.prototype.getRequestUrl_ = function getRequestUrl_ (extent, size, pixelRatio, projection, params) {\n\n    assert(this.url_ !== undefined, 9); // `url` must be configured or set using `#setUrl()`\n\n    params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n    if (!('STYLES' in this.params_)) {\n      params['STYLES'] = '';\n    }\n\n    if (pixelRatio != 1) {\n      switch (this.serverType_) {\n        case WMSServerType.GEOSERVER:\n          var dpi = (90 * pixelRatio + 0.5) | 0;\n          if ('FORMAT_OPTIONS' in params) {\n            params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n          } else {\n            params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n          }\n          break;\n        case WMSServerType.MAPSERVER:\n          params['MAP_RESOLUTION'] = 90 * pixelRatio;\n          break;\n        case WMSServerType.CARMENTA_SERVER:\n        case WMSServerType.QGIS:\n          params['DPI'] = 90 * pixelRatio;\n          break;\n        default:\n          assert(false, 8); // Unknown `serverType` configured\n          break;\n      }\n    }\n\n    params['WIDTH'] = size[0];\n    params['HEIGHT'] = size[1];\n\n    var axisOrientation = projection.getAxisOrientation();\n    var bbox;\n    if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n      bbox = [extent[1], extent[0], extent[3], extent[2]];\n    } else {\n      bbox = extent;\n    }\n    params['BBOX'] = bbox.join(',');\n\n    return appendParams(/** @type {string} */ (this.url_), params);\n  };\n\n  /**\n   * Return the URL used for this WMS source.\n   * @return {string|undefined} URL.\n   * @api\n   */\n  ImageWMS.prototype.getUrl = function getUrl () {\n    return this.url_;\n  };\n\n  /**\n   * Set the image load function of the source.\n   * @param {import(\"../Image.js\").LoadFunction} imageLoadFunction Image load function.\n   * @api\n   */\n  ImageWMS.prototype.setImageLoadFunction = function setImageLoadFunction (imageLoadFunction) {\n    this.image_ = null;\n    this.imageLoadFunction_ = imageLoadFunction;\n    this.changed();\n  };\n\n  /**\n   * Set the URL to use for requests.\n   * @param {string|undefined} url URL.\n   * @api\n   */\n  ImageWMS.prototype.setUrl = function setUrl (url) {\n    if (url != this.url_) {\n      this.url_ = url;\n      this.image_ = null;\n      this.changed();\n    }\n  };\n\n  /**\n   * Update the user-provided params.\n   * @param {Object} params Params.\n   * @api\n   */\n  ImageWMS.prototype.updateParams = function updateParams (params) {\n    assign(this.params_, params);\n    this.updateV13_();\n    this.image_ = null;\n    this.changed();\n  };\n\n  /**\n   * @private\n   */\n  ImageWMS.prototype.updateV13_ = function updateV13_ () {\n    var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n    this.v13_ = compareVersions(version, '1.3') >= 0;\n  };\n\n  return ImageWMS;\n}(ImageSource));\n\n\nexport default ImageWMS;\n\n//# sourceMappingURL=ImageWMS.js.map","/**\n * @module ol/source/OSM\n */\n\nimport XYZ from './XYZ.js';\n\n\n/**\n * The attribution containing a link to the OpenStreetMap Copyright and License\n * page.\n * @const\n * @type {string}\n * @api\n */\nexport var ATTRIBUTION = '&#169; ' +\n      '<a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> ' +\n      'contributors.';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {number} [maxZoom=19] Max zoom.\n * @property {boolean} [opaque=true] Whether the layer is opaque.\n * @property {number} [reprojectionErrorThreshold=1.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url='https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'] URL template.\n * Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n\n/**\n * @classdesc\n * Layer source for the OpenStreetMap tile server.\n * @api\n */\nvar OSM = /*@__PURE__*/(function (XYZ) {\n  function OSM(opt_options) {\n\n    var options = opt_options || {};\n\n    var attributions;\n    if (options.attributions !== undefined) {\n      attributions = options.attributions;\n    } else {\n      attributions = [ATTRIBUTION];\n    }\n\n    var crossOrigin = options.crossOrigin !== undefined ?\n      options.crossOrigin : 'anonymous';\n\n    var url = options.url !== undefined ?\n      options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';\n\n    XYZ.call(this, {\n      attributions: attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: crossOrigin,\n      opaque: options.opaque !== undefined ? options.opaque : true,\n      maxZoom: options.maxZoom !== undefined ? options.maxZoom : 19,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileLoadFunction: options.tileLoadFunction,\n      url: url,\n      wrapX: options.wrapX,\n      attributionsCollapsible: false\n    });\n\n  }\n\n  if ( XYZ ) OSM.__proto__ = XYZ;\n  OSM.prototype = Object.create( XYZ && XYZ.prototype );\n  OSM.prototype.constructor = OSM;\n\n  return OSM;\n}(XYZ));\n\nexport default OSM;\n\n//# sourceMappingURL=OSM.js.map","/**\n * @module ol/layer/Image\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {import(\"../source/Image.js\").default} [source] Source for this layer.\n */\n\n\n/**\n * @classdesc\n * Server-rendered images that are available for arbitrary extents and\n * resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar ImageLayer = /*@__PURE__*/(function (Layer) {\n  function ImageLayer(opt_options) {\n    var options = opt_options ? opt_options : {};\n    Layer.call(this, options);\n\n    /**\n     * The layer type.\n     * @protected\n     * @type {import(\"../LayerType.js\").default}\n     */\n    this.type = LayerType.IMAGE;\n\n  }\n\n  if ( Layer ) ImageLayer.__proto__ = Layer;\n  ImageLayer.prototype = Object.create( Layer && Layer.prototype );\n  ImageLayer.prototype.constructor = ImageLayer;\n\n  return ImageLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Image source} of the image layer.\n * @function\n * @return {import(\"../source/Image.js\").default} Source.\n * @api\n */\nImageLayer.prototype.getSource;\nexport default ImageLayer;\n\n//# sourceMappingURL=Image.js.map","/**\n * @module ol/layer/TileProperty\n */\n\n/**\n * @enum {string}\n */\nexport default {\n  PRELOAD: 'preload',\n  USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError'\n};\n\n//# sourceMappingURL=TileProperty.js.map","/**\n * @module ol/layer/Tile\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\nimport TileProperty from './TileProperty.js';\nimport {assign} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {import(\"../source/Tile.js\").default} [source] Source for this layer.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n/**\n * @classdesc\n * For layer sources that provide pre-rendered, tiled images in grids that are\n * organized by zoom levels for specific resolutions.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar TileLayer = /*@__PURE__*/(function (Layer) {\n  function TileLayer(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    var baseOptions = assign({}, options);\n\n    delete baseOptions.preload;\n    delete baseOptions.useInterimTilesOnError;\n    Layer.call(this, baseOptions);\n\n    this.setPreload(options.preload !== undefined ? options.preload : 0);\n    this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?\n      options.useInterimTilesOnError : true);\n\n    /**\n    * The layer type.\n    * @protected\n    * @type {import(\"../LayerType.js\").default}\n    */\n    this.type = LayerType.TILE;\n\n  }\n\n  if ( Layer ) TileLayer.__proto__ = Layer;\n  TileLayer.prototype = Object.create( Layer && Layer.prototype );\n  TileLayer.prototype.constructor = TileLayer;\n\n  /**\n  * Return the level as number to which we will preload tiles up to.\n  * @return {number} The level to preload tiles up to.\n  * @observable\n  * @api\n  */\n  TileLayer.prototype.getPreload = function getPreload () {\n    return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n  };\n\n  /**\n  * Set the level as number to which we will preload tiles up to.\n  * @param {number} preload The level to preload tiles up to.\n  * @observable\n  * @api\n  */\n  TileLayer.prototype.setPreload = function setPreload (preload) {\n    this.set(TileProperty.PRELOAD, preload);\n  };\n\n  /**\n  * Whether we use interim tiles on error.\n  * @return {boolean} Use interim tiles on error.\n  * @observable\n  * @api\n  */\n  TileLayer.prototype.getUseInterimTilesOnError = function getUseInterimTilesOnError () {\n    return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n  };\n\n  /**\n  * Set whether we use interim tiles on error.\n  * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n  * @observable\n  * @api\n  */\n  TileLayer.prototype.setUseInterimTilesOnError = function setUseInterimTilesOnError (useInterimTilesOnError) {\n    this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n  };\n\n  return TileLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Tile tilesource} of the layer.\n * @function\n * @return {import(\"../source/Tile.js\").default} Source.\n * @api\n */\nTileLayer.prototype.getSource;\n\n\nexport default TileLayer;\n\n//# sourceMappingURL=Tile.js.map","/**\n * @module ol/source/Raster\n */\nimport {getUid} from '../util.js';\nimport ImageCanvas from '../ImageCanvas.js';\nimport TileQueue from '../TileQueue.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {listen} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {Processor} from 'pixelworks/lib/index';\nimport {equals, getCenter, getHeight, getWidth} from '../extent.js';\nimport LayerType from '../LayerType.js';\nimport ImageLayer from '../layer/Image.js';\nimport TileLayer from '../layer/Tile.js';\nimport {assign} from '../obj.js';\nimport CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';\nimport CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';\nimport ImageSource from './Image.js';\nimport SourceState from './State.js';\nimport {create as createTransform} from '../transform.js';\n\n\n/**\n * A function that takes an array of input data, performs some operation, and\n * returns an array of output data.\n * For `pixel` type operations, the function will be called with an array of\n * pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the\n * range of 0 - 255. It should return a single pixel array.\n * For `'image'` type operations, functions will be called with an array of\n * {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}\n * and should return a single {@link ImageData\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageData}.  The operations\n * are called with a second \"data\" argument, which can be used for storage.  The\n * data object is accessible from raster events, where it can be initialized in\n * \"beforeoperations\" and accessed again in \"afteroperations\".\n *\n * @typedef {function((Array<Array<number>>|Array<ImageData>), Object):\n *     (Array<number>|ImageData)} Operation\n */\n\n\n/**\n * @enum {string}\n */\nvar RasterEventType = {\n  /**\n   * Triggered before operations are run.\n   * @event ol/source/Raster~RasterSourceEvent#beforeoperations\n   * @api\n   */\n  BEFOREOPERATIONS: 'beforeoperations',\n\n  /**\n   * Triggered after operations are run.\n   * @event ol/source/Raster~RasterSourceEvent#afteroperations\n   * @api\n   */\n  AFTEROPERATIONS: 'afteroperations'\n};\n\n\n/**\n * Raster operation type. Supported values are `'pixel'` and `'image'`.\n * @enum {string}\n */\nvar RasterOperationType = {\n  PIXEL: 'pixel',\n  IMAGE: 'image'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Raster} instances are instances of this\n * type.\n */\nvar RasterSourceEvent = /*@__PURE__*/(function (Event) {\n  function RasterSourceEvent(type, frameState, data) {\n    Event.call(this, type);\n\n    /**\n     * The raster extent.\n     * @type {import(\"../extent.js\").Extent}\n     * @api\n     */\n    this.extent = frameState.extent;\n\n    /**\n     * The pixel resolution (map units per pixel).\n     * @type {number}\n     * @api\n     */\n    this.resolution = frameState.viewState.resolution / frameState.pixelRatio;\n\n    /**\n     * An object made available to all operations.  This can be used by operations\n     * as a storage object (e.g. for calculating statistics).\n     * @type {Object}\n     * @api\n     */\n    this.data = data;\n\n  }\n\n  if ( Event ) RasterSourceEvent.__proto__ = Event;\n  RasterSourceEvent.prototype = Object.create( Event && Event.prototype );\n  RasterSourceEvent.prototype.constructor = RasterSourceEvent;\n\n  return RasterSourceEvent;\n}(Event));\n\n/**\n * @typedef {Object} Options\n * @property {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources Input\n * sources or layers. Vector layers must be configured with `renderMode: 'image'`.\n * @property {Operation} [operation] Raster operation.\n * The operation will be called with data from input sources\n * and the output will be assigned to the raster source.\n * @property {Object} [lib] Functions that will be made available to operations run in a worker.\n * @property {number} [threads] By default, operations will be run in a single worker thread.\n * To avoid using workers altogether, set `threads: 0`.  For pixel operations, operations can\n * be run in multiple worker threads.  Note that there is additional overhead in\n * transferring data to multiple workers, and that depending on the user's\n * system, it may not be possible to parallelize the work.\n * @property {RasterOperationType} [operationType='pixel'] Operation type.\n * Supported values are `'pixel'` and `'image'`.  By default,\n * `'pixel'` operations are assumed, and operations will be called with an\n * array of pixels from input sources.  If set to `'image'`, operations will\n * be called with an array of ImageData objects from input sources.\n */\n\n\n/**\n * @classdesc\n * A source that transforms data from any number of input sources using an\n * {@link module:ol/source/Raster~Operation} function to transform input pixel values into\n * output pixel values.\n *\n * @fires ol/source/Raster~RasterSourceEvent\n * @api\n */\nvar RasterSource = /*@__PURE__*/(function (ImageSource) {\n  function RasterSource(options) {\n    ImageSource.call(this, {\n      projection: null\n    });\n\n    /**\n     * @private\n     * @type {*}\n     */\n    this.worker_ = null;\n\n    /**\n     * @private\n     * @type {RasterOperationType}\n     */\n    this.operationType_ = options.operationType !== undefined ?\n      options.operationType : RasterOperationType.PIXEL;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.threads_ = options.threads !== undefined ? options.threads : 1;\n\n    /**\n     * @private\n     * @type {Array<import(\"../renderer/canvas/Layer.js\").default>}\n     */\n    this.renderers_ = createRenderers(options.sources);\n\n    for (var r = 0, rr = this.renderers_.length; r < rr; ++r) {\n      listen(this.renderers_[r], EventType.CHANGE,\n        this.changed, this);\n    }\n\n    /**\n     * @private\n     * @type {import(\"../TileQueue.js\").default}\n     */\n    this.tileQueue_ = new TileQueue(\n      function() {\n        return 1;\n      },\n      this.changed.bind(this));\n\n    var layerStatesArray = getLayerStatesArray(this.renderers_);\n\n    /**\n     * @type {Object<string, import(\"../layer/Layer.js\").State>}\n     */\n    var layerStates = {};\n    for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n      layerStates[getUid(layerStatesArray[i].layer)] = layerStatesArray[i];\n    }\n\n    /**\n     * The most recently requested frame state.\n     * @type {import(\"../PluggableMap.js\").FrameState}\n     * @private\n     */\n    this.requestedFrameState_;\n\n    /**\n     * The most recently rendered image canvas.\n     * @type {import(\"../ImageCanvas.js\").default}\n     * @private\n     */\n    this.renderedImageCanvas_ = null;\n\n    /**\n     * The most recently rendered revision.\n     * @type {number}\n     */\n    this.renderedRevision_;\n\n    /**\n     * @private\n     * @type {import(\"../PluggableMap.js\").FrameState}\n     */\n    this.frameState_ = {\n      animate: false,\n      coordinateToPixelTransform: createTransform(),\n      extent: null,\n      focus: null,\n      index: 0,\n      layerStates: layerStates,\n      layerStatesArray: layerStatesArray,\n      pixelRatio: 1,\n      pixelToCoordinateTransform: createTransform(),\n      postRenderFunctions: [],\n      size: [0, 0],\n      skippedFeatureUids: {},\n      tileQueue: this.tileQueue_,\n      time: Date.now(),\n      usedTiles: {},\n      viewState: /** @type {import(\"../View.js\").State} */ ({\n        rotation: 0\n      }),\n      viewHints: [],\n      wantedTiles: {}\n    };\n\n    if (options.operation !== undefined) {\n      this.setOperation(options.operation, options.lib);\n    }\n\n  }\n\n  if ( ImageSource ) RasterSource.__proto__ = ImageSource;\n  RasterSource.prototype = Object.create( ImageSource && ImageSource.prototype );\n  RasterSource.prototype.constructor = RasterSource;\n\n  /**\n   * Set the operation.\n   * @param {Operation} operation New operation.\n   * @param {Object=} opt_lib Functions that will be available to operations run\n   *     in a worker.\n   * @api\n   */\n  RasterSource.prototype.setOperation = function setOperation (operation, opt_lib) {\n    this.worker_ = new Processor({\n      operation: operation,\n      imageOps: this.operationType_ === RasterOperationType.IMAGE,\n      queue: 1,\n      lib: opt_lib,\n      threads: this.threads_\n    });\n    this.changed();\n  };\n\n  /**\n   * Update the stored frame state.\n   * @param {import(\"../extent.js\").Extent} extent The view extent (in map units).\n   * @param {number} resolution The view resolution.\n   * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n   * @return {import(\"../PluggableMap.js\").FrameState} The updated frame state.\n   * @private\n   */\n  RasterSource.prototype.updateFrameState_ = function updateFrameState_ (extent, resolution, projection) {\n\n    var frameState = /** @type {import(\"../PluggableMap.js\").FrameState} */ (assign({}, this.frameState_));\n\n    frameState.viewState = /** @type {import(\"../View.js\").State} */ (assign({}, frameState.viewState));\n\n    var center = getCenter(extent);\n\n    frameState.extent = extent.slice();\n    frameState.focus = center;\n    frameState.size[0] = Math.round(getWidth(extent) / resolution);\n    frameState.size[1] = Math.round(getHeight(extent) / resolution);\n    frameState.time = Date.now();\n    frameState.animate = false;\n\n    var viewState = frameState.viewState;\n    viewState.center = center;\n    viewState.projection = projection;\n    viewState.resolution = resolution;\n    return frameState;\n  };\n\n  /**\n   * Determine if all sources are ready.\n   * @return {boolean} All sources are ready.\n   * @private\n   */\n  RasterSource.prototype.allSourcesReady_ = function allSourcesReady_ () {\n    var ready = true;\n    var source;\n    for (var i = 0, ii = this.renderers_.length; i < ii; ++i) {\n      source = this.renderers_[i].getLayer().getSource();\n      if (source.getState() !== SourceState.READY) {\n        ready = false;\n        break;\n      }\n    }\n    return ready;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  RasterSource.prototype.getImage = function getImage (extent, resolution, pixelRatio, projection) {\n    if (!this.allSourcesReady_()) {\n      return null;\n    }\n\n    var frameState = this.updateFrameState_(extent, resolution, projection);\n    this.requestedFrameState_ = frameState;\n\n    // check if we can't reuse the existing ol/ImageCanvas\n    if (this.renderedImageCanvas_) {\n      var renderedResolution = this.renderedImageCanvas_.getResolution();\n      var renderedExtent = this.renderedImageCanvas_.getExtent();\n      if (resolution !== renderedResolution || !equals(extent, renderedExtent)) {\n        this.renderedImageCanvas_ = null;\n      }\n    }\n\n    if (!this.renderedImageCanvas_ || this.getRevision() !== this.renderedRevision_) {\n      this.processSources_();\n    }\n\n    frameState.tileQueue.loadMoreTiles(16, 16);\n\n    if (frameState.animate) {\n      requestAnimationFrame(this.changed.bind(this));\n    }\n\n    return this.renderedImageCanvas_;\n  };\n\n  /**\n   * Start processing source data.\n   * @private\n   */\n  RasterSource.prototype.processSources_ = function processSources_ () {\n    var frameState = this.requestedFrameState_;\n    var len = this.renderers_.length;\n    var imageDatas = new Array(len);\n    for (var i = 0; i < len; ++i) {\n      var imageData = getImageData(\n        this.renderers_[i], frameState, frameState.layerStatesArray[i]);\n      if (imageData) {\n        imageDatas[i] = imageData;\n      } else {\n        return;\n      }\n    }\n\n    var data = {};\n    this.dispatchEvent(new RasterSourceEvent(RasterEventType.BEFOREOPERATIONS, frameState, data));\n    this.worker_.process(imageDatas, data, this.onWorkerComplete_.bind(this, frameState));\n  };\n\n  /**\n   * Called when pixel processing is complete.\n   * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n   * @param {Error} err Any error during processing.\n   * @param {ImageData} output The output image data.\n   * @param {Object} data The user data.\n   * @private\n   */\n  RasterSource.prototype.onWorkerComplete_ = function onWorkerComplete_ (frameState, err, output, data) {\n    if (err || !output) {\n      return;\n    }\n\n    // do nothing if extent or resolution changed\n    var extent = frameState.extent;\n    var resolution = frameState.viewState.resolution;\n    if (resolution !== this.requestedFrameState_.viewState.resolution ||\n        !equals(extent, this.requestedFrameState_.extent)) {\n      return;\n    }\n\n    var context;\n    if (this.renderedImageCanvas_) {\n      context = this.renderedImageCanvas_.getImage().getContext('2d');\n    } else {\n      var width = Math.round(getWidth(extent) / resolution);\n      var height = Math.round(getHeight(extent) / resolution);\n      context = createCanvasContext2D(width, height);\n      this.renderedImageCanvas_ = new ImageCanvas(extent, resolution, 1, context.canvas);\n    }\n    context.putImageData(output, 0, 0);\n\n    this.changed();\n    this.renderedRevision_ = this.getRevision();\n\n    this.dispatchEvent(new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data));\n  };\n\n  /**\n   * @override\n   */\n  RasterSource.prototype.getImageInternal = function getImageInternal () {\n    return null; // not implemented\n  };\n\n  return RasterSource;\n}(ImageSource));\n\n\n/**\n * A reusable canvas context.\n * @type {CanvasRenderingContext2D}\n * @private\n */\nvar sharedContext = null;\n\n\n/**\n * Get image data from a renderer.\n * @param {import(\"../renderer/canvas/Layer.js\").default} renderer Layer renderer.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState The frame state.\n * @param {import(\"../layer/Layer.js\").State} layerState The layer state.\n * @return {ImageData} The image data.\n */\nfunction getImageData(renderer, frameState, layerState) {\n  if (!renderer.prepareFrame(frameState, layerState)) {\n    return null;\n  }\n  var width = frameState.size[0];\n  var height = frameState.size[1];\n  if (!sharedContext) {\n    sharedContext = createCanvasContext2D(width, height);\n  } else {\n    var canvas = sharedContext.canvas;\n    if (canvas.width !== width || canvas.height !== height) {\n      sharedContext = createCanvasContext2D(width, height);\n    } else {\n      sharedContext.clearRect(0, 0, width, height);\n    }\n  }\n  renderer.composeFrame(frameState, layerState, sharedContext);\n  return sharedContext.getImageData(0, 0, width, height);\n}\n\n\n/**\n * Get a list of layer states from a list of renderers.\n * @param {Array<import(\"../renderer/canvas/Layer.js\").default>} renderers Layer renderers.\n * @return {Array<import(\"../layer/Layer.js\").State>} The layer states.\n */\nfunction getLayerStatesArray(renderers) {\n  return renderers.map(function(renderer) {\n    return renderer.getLayer().getLayerState();\n  });\n}\n\n\n/**\n * Create renderers for all sources.\n * @param {Array<import(\"./Source.js\").default|import(\"../layer/Layer.js\").default>} sources The sources.\n * @return {Array<import(\"../renderer/canvas/Layer.js\").default>} Array of layer renderers.\n */\nfunction createRenderers(sources) {\n  var len = sources.length;\n  var renderers = new Array(len);\n  for (var i = 0; i < len; ++i) {\n    renderers[i] = createRenderer(sources[i]);\n  }\n  return renderers;\n}\n\n\n/**\n * Create a renderer for the provided source.\n * @param {import(\"./Source.js\").default|import(\"../layer/Layer.js\").default} layerOrSource The layer or source.\n * @return {import(\"../renderer/canvas/Layer.js\").default} The renderer.\n */\nfunction createRenderer(layerOrSource) {\n  var tileSource = /** @type {import(\"./Tile.js\").default} */ (layerOrSource);\n  var imageSource = /** @type {import(\"./Image.js\").default} */ (layerOrSource);\n  var layer = /** @type {import(\"../layer/Layer.js\").default} */ (layerOrSource);\n  var renderer = null;\n  if (typeof tileSource.getTile === 'function') {\n    renderer = createTileRenderer(tileSource);\n  } else if (typeof imageSource.getImage === 'function') {\n    renderer = createImageRenderer(imageSource);\n  } else if (layer.getType() === LayerType.TILE) {\n    renderer = new CanvasTileLayerRenderer(/** @type {import(\"../layer/Tile.js\").default} */ (layer));\n  } else if (layer.getType() == LayerType.IMAGE || layer.getType() == LayerType.VECTOR) {\n    renderer = new CanvasImageLayerRenderer(/** @type {import(\"../layer/Image.js\").default} */ (layer));\n  }\n  return renderer;\n}\n\n\n/**\n * Create an image renderer for the provided source.\n * @param {import(\"./Image.js\").default} source The source.\n * @return {import(\"../renderer/canvas/Layer.js\").default} The renderer.\n */\nfunction createImageRenderer(source) {\n  var layer = new ImageLayer({source: source});\n  return new CanvasImageLayerRenderer(layer);\n}\n\n\n/**\n * Create a tile renderer for the provided source.\n * @param {import(\"./Tile.js\").default} source The source.\n * @return {import(\"../renderer/canvas/Layer.js\").default} The renderer.\n */\nfunction createTileRenderer(source) {\n  var layer = new TileLayer({source: source});\n  return new CanvasTileLayerRenderer(layer);\n}\n\n\nexport default RasterSource;\n\n//# sourceMappingURL=Raster.js.map","/**\n * @module ol/source/Stamen\n */\n\nimport {ATTRIBUTION as OSM_ATTRIBUTION} from './OSM.js';\nimport XYZ from './XYZ.js';\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar ATTRIBUTIONS = [\n  'Map tiles by <a href=\"https://stamen.com/\">Stamen Design</a>, ' +\n        'under <a href=\"https://creativecommons.org/licenses/by/3.0/\">CC BY' +\n        ' 3.0</a>.',\n  OSM_ATTRIBUTION\n];\n\n\n/**\n * @type {Object<string, {extension: string, opaque: boolean}>}\n */\nvar LayerConfig = {\n  'terrain': {\n    extension: 'jpg',\n    opaque: true\n  },\n  'terrain-background': {\n    extension: 'jpg',\n    opaque: true\n  },\n  'terrain-labels': {\n    extension: 'png',\n    opaque: false\n  },\n  'terrain-lines': {\n    extension: 'png',\n    opaque: false\n  },\n  'toner-background': {\n    extension: 'png',\n    opaque: true\n  },\n  'toner': {\n    extension: 'png',\n    opaque: true\n  },\n  'toner-hybrid': {\n    extension: 'png',\n    opaque: false\n  },\n  'toner-labels': {\n    extension: 'png',\n    opaque: false\n  },\n  'toner-lines': {\n    extension: 'png',\n    opaque: false\n  },\n  'toner-lite': {\n    extension: 'png',\n    opaque: true\n  },\n  'watercolor': {\n    extension: 'jpg',\n    opaque: true\n  }\n};\n\n\n/**\n * @type {Object<string, {minZoom: number, maxZoom: number}>}\n */\nvar ProviderConfig = {\n  'terrain': {\n    minZoom: 4,\n    maxZoom: 18\n  },\n  'toner': {\n    minZoom: 0,\n    maxZoom: 20\n  },\n  'watercolor': {\n    minZoom: 1,\n    maxZoom: 16\n  }\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [cacheSize=2048] Cache size.\n * @property {string} layer Layer name.\n * @property {number} [minZoom] Minimum zoom.\n * @property {number} [maxZoom] Maximum zoom.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n\n/**\n * @classdesc\n * Layer source for the Stamen tile server.\n * @api\n */\nvar Stamen = /*@__PURE__*/(function (XYZ) {\n  function Stamen(options) {\n    var i = options.layer.indexOf('-');\n    var provider = i == -1 ? options.layer : options.layer.slice(0, i);\n    var providerConfig = ProviderConfig[provider];\n\n    var layerConfig = LayerConfig[options.layer];\n\n    var url = options.url !== undefined ? options.url :\n      'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +\n        '/{z}/{x}/{y}.' + layerConfig.extension;\n\n    XYZ.call(this, {\n      attributions: ATTRIBUTIONS,\n      cacheSize: options.cacheSize,\n      crossOrigin: 'anonymous',\n      maxZoom: options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,\n      minZoom: options.minZoom != undefined ? options.minZoom : providerConfig.minZoom,\n      opaque: layerConfig.opaque,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileLoadFunction: options.tileLoadFunction,\n      url: url,\n      wrapX: options.wrapX\n    });\n\n  }\n\n  if ( XYZ ) Stamen.__proto__ = XYZ;\n  Stamen.prototype = Object.create( XYZ && XYZ.prototype );\n  Stamen.prototype.constructor = Stamen;\n\n  return Stamen;\n}(XYZ));\n\nexport default Stamen;\n\n//# sourceMappingURL=Stamen.js.map","/**\n * @module ol/source/TileArcGISRest\n */\n\nimport {createEmpty} from '../extent.js';\nimport {modulo} from '../math.js';\nimport {assign} from '../obj.js';\nimport {toSize, scale as scaleSize} from '../size.js';\nimport TileImage from './TileImage.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\nimport {appendParams} from '../uri.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.\n * Note that you must provide a `crossOrigin` value if you are using the WebGL renderer\n * or if you want to access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image\n * for more detail.\n * @property {Object<string,*>} [params] ArcGIS Rest parameters. This field is optional. Service defaults will be\n * used for any fields not specified. `FORMAT` is `PNG32` by default. `F` is `IMAGE` by\n * default. `TRANSPARENT` is `true` by default.  `BBOX`, `SIZE`, `BBOXSR`,\n * and `IMAGESR` will be set dynamically. Set `LAYERS` to\n * override the default service layer visibility. See\n * http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Export_Map/02r3000000v7000000/\n * for further reference.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL.\n * The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The\n * url should include /MapServer or /ImageServer.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.  To disable the opacity\n * transition, pass `transition: 0`.\n * @property {Array<string>} urls ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS\n * Service supports multiple urls for export requests.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data from ArcGIS Rest services. Map and Image\n * Services are supported.\n *\n * For cached ArcGIS services, better performance is available using the\n * {@link module:ol/source/XYZ~XYZ} data source.\n * @api\n */\nvar TileArcGISRest = /*@__PURE__*/(function (TileImage) {\n  function TileArcGISRest(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      projection: options.projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileGrid: options.tileGrid,\n      tileLoadFunction: options.tileLoadFunction,\n      tileUrlFunction: tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition\n    });\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.params_ = options.params || {};\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.tmpExtent_ = createEmpty();\n\n    this.setKey(this.getKeyForParams_());\n  }\n\n  if ( TileImage ) TileArcGISRest.__proto__ = TileImage;\n  TileArcGISRest.prototype = Object.create( TileImage && TileImage.prototype );\n  TileArcGISRest.prototype.constructor = TileArcGISRest;\n\n  /**\n   * @private\n   * @return {string} The key for the current params.\n   */\n  TileArcGISRest.prototype.getKeyForParams_ = function getKeyForParams_ () {\n    var i = 0;\n    var res = [];\n    for (var key in this.params_) {\n      res[i++] = key + '-' + this.params_[key];\n    }\n    return res.join('/');\n  };\n\n  /**\n   * Get the user-provided params, i.e. those passed to the constructor through\n   * the \"params\" option, and possibly updated using the updateParams method.\n   * @return {Object} Params.\n   * @api\n   */\n  TileArcGISRest.prototype.getParams = function getParams () {\n    return this.params_;\n  };\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../size.js\").Size} tileSize Tile size.\n   * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {Object} params Params.\n   * @return {string|undefined} Request URL.\n   * @private\n   */\n  TileArcGISRest.prototype.getRequestUrl_ = function getRequestUrl_ (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n\n    var urls = this.urls;\n    if (!urls) {\n      return undefined;\n    }\n\n    // ArcGIS Server only wants the numeric portion of the projection ID.\n    var srid = projection.getCode().split(':').pop();\n\n    params['SIZE'] = tileSize[0] + ',' + tileSize[1];\n    params['BBOX'] = tileExtent.join(',');\n    params['BBOXSR'] = srid;\n    params['IMAGESR'] = srid;\n    params['DPI'] = Math.round(\n      params['DPI'] ? params['DPI'] * pixelRatio : 90 * pixelRatio\n    );\n\n    var url;\n    if (urls.length == 1) {\n      url = urls[0];\n    } else {\n      var index = modulo(tileCoordHash(tileCoord), urls.length);\n      url = urls[index];\n    }\n\n    var modifiedUrl = url\n      .replace(/MapServer\\/?$/, 'MapServer/export')\n      .replace(/ImageServer\\/?$/, 'ImageServer/exportImage');\n    return appendParams(modifiedUrl, params);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileArcGISRest.prototype.getTilePixelRatio = function getTilePixelRatio (pixelRatio) {\n    return /** @type {number} */ (pixelRatio);\n  };\n\n  /**\n   * Update the user-provided params.\n   * @param {Object} params Params.\n   * @api\n   */\n  TileArcGISRest.prototype.updateParams = function updateParams (params) {\n    assign(this.params_, params);\n    this.setKey(this.getKeyForParams_());\n  };\n\n  return TileArcGISRest;\n}(TileImage));\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @this {TileArcGISRest}\n */\nfunction tileUrlFunction(tileCoord, pixelRatio, projection) {\n\n  var tileGrid = this.getTileGrid();\n  if (!tileGrid) {\n    tileGrid = this.getTileGridForProjection(projection);\n  }\n\n  if (tileGrid.getResolutions().length <= tileCoord[0]) {\n    return undefined;\n  }\n\n  var tileExtent = tileGrid.getTileCoordExtent(\n    tileCoord, this.tmpExtent_);\n  var tileSize = toSize(\n    tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n  if (pixelRatio != 1) {\n    tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n  }\n\n  // Apply default params and override with user specified values.\n  var baseParams = {\n    'F': 'image',\n    'FORMAT': 'PNG32',\n    'TRANSPARENT': true\n  };\n  assign(baseParams, this.params_);\n\n  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,\n    pixelRatio, projection, baseParams);\n}\n\n\nexport default TileArcGISRest;\n\n//# sourceMappingURL=TileArcGISRest.js.map","/**\n * @module ol/source/TileDebug\n */\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {toSize} from '../size.js';\nimport TileSource from './Tile.js';\nimport {getKeyZXY} from '../tilecoord.js';\n\n\nvar LabeledTile = /*@__PURE__*/(function (Tile) {\n  function LabeledTile(tileCoord, tileSize, text) {\n\n    Tile.call(this, tileCoord, TileState.LOADED);\n\n    /**\n    * @private\n    * @type {import(\"../size.js\").Size}\n    */\n    this.tileSize_ = tileSize;\n\n    /**\n    * @private\n    * @type {string}\n    */\n    this.text_ = text;\n\n    /**\n    * @private\n    * @type {HTMLCanvasElement}\n    */\n    this.canvas_ = null;\n\n  }\n\n  if ( Tile ) LabeledTile.__proto__ = Tile;\n  LabeledTile.prototype = Object.create( Tile && Tile.prototype );\n  LabeledTile.prototype.constructor = LabeledTile;\n\n  /**\n  * Get the image element for this tile.\n  * @return {HTMLCanvasElement} Image.\n  */\n  LabeledTile.prototype.getImage = function getImage () {\n    if (this.canvas_) {\n      return this.canvas_;\n    } else {\n      var tileSize = this.tileSize_;\n      var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n\n      context.strokeStyle = 'black';\n      context.strokeRect(0.5, 0.5, tileSize[0] + 0.5, tileSize[1] + 0.5);\n\n      context.fillStyle = 'black';\n      context.textAlign = 'center';\n      context.textBaseline = 'middle';\n      context.font = '24px sans-serif';\n      context.fillText(this.text_, tileSize[0] / 2, tileSize[1] / 2);\n\n      this.canvas_ = context.canvas;\n      return context.canvas;\n    }\n  };\n\n  /**\n  * @override\n  */\n  LabeledTile.prototype.load = function load () {};\n\n  return LabeledTile;\n}(Tile));\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n */\n\n\n/**\n * @classdesc\n * A pseudo tile source, which does not fetch tiles from a server, but renders\n * a grid outline for the tile grid/projection along with the coordinates for\n * each tile. See examples/canvas-tiles for an example.\n *\n * Uses Canvas context2d, so requires Canvas support.\n * @api\n */\nvar TileDebug = /*@__PURE__*/(function (TileSource) {\n  function TileDebug(options) {\n\n    TileSource.call(this, {\n      opaque: false,\n      projection: options.projection,\n      tileGrid: options.tileGrid,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true\n    });\n\n  }\n\n  if ( TileSource ) TileDebug.__proto__ = TileSource;\n  TileDebug.prototype = Object.create( TileSource && TileSource.prototype );\n  TileDebug.prototype.constructor = TileDebug;\n\n  /**\n  * @inheritDoc\n  */\n  TileDebug.prototype.getTile = function getTile (z, x, y) {\n    var tileCoordKey = getKeyZXY(z, x, y);\n    if (this.tileCache.containsKey(tileCoordKey)) {\n      return /** @type {!LabeledTile} */ (this.tileCache.get(tileCoordKey));\n    } else {\n      var tileSize = toSize(this.tileGrid.getTileSize(z));\n      var tileCoord = [z, x, y];\n      var textTileCoord = this.getTileCoordForTileUrlFunction(tileCoord);\n      var text = !textTileCoord ? '' :\n        this.getTileCoordForTileUrlFunction(textTileCoord).toString();\n      var tile = new LabeledTile(tileCoord, tileSize, text);\n      this.tileCache.set(tileCoordKey, tile);\n      return tile;\n    }\n  };\n\n  return TileDebug;\n}(TileSource));\n\n\nexport default TileDebug;\n\n//# sourceMappingURL=TileDebug.js.map","/**\n * @module ol/source/TileJSON\n */\n// FIXME check order of async callbacks\n\n/**\n * See http://mapbox.com/developers/api/.\n */\n\n\nimport {createFromTemplates} from '../tileurlfunction.js';\nimport {assert} from '../asserts.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {jsonp as requestJSONP} from '../net.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport SourceState from './State.js';\nimport TileImage from './TileImage.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n\n/**\n * @typedef {Object} Config\n * @property {string} [name] The name.\n * @property {string} [description] The description.\n * @property {string} [version] The version.\n * @property {string} [attribution] The attribution.\n * @property {string} [template] The template.\n * @property {string} [legend] The legend.\n * @property {string} [scheme] The scheme.\n * @property {Array<string>} tiles The tile URL templates.\n * @property {Array<string>} [grids] Optional grids.\n * @property {number} [minzoom] Minimum zoom level.\n * @property {number} [maxzoom] Maximum zoom level.\n * @property {Array<number>} [bounds] Optional bounds.\n * @property {Array<number>} [center] Optional center.\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] URL to the TileJSON file. If not provided, `tileJSON` must be configured.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data in TileJSON format.\n * @api\n */\nvar TileJSON = /*@__PURE__*/(function (TileImage) {\n  function TileJSON(options) {\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      projection: getProjection('EPSG:3857'),\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      state: SourceState.LOADING,\n      tileLoadFunction: options.tileLoadFunction,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition\n    });\n\n    /**\n     * @type {Config}\n     * @private\n     */\n    this.tileJSON_ = null;\n\n\n    if (options.url) {\n      if (options.jsonp) {\n        requestJSONP(options.url, this.handleTileJSONResponse.bind(this),\n          this.handleTileJSONError.bind(this));\n      } else {\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.onXHRLoad_.bind(this));\n        client.addEventListener('error', this.onXHRError_.bind(this));\n        client.open('GET', options.url);\n        client.send();\n      }\n    } else if (options.tileJSON) {\n      this.handleTileJSONResponse(options.tileJSON);\n    } else {\n      assert(false, 51); // Either `url` or `tileJSON` options must be provided\n    }\n\n  }\n\n  if ( TileImage ) TileJSON.__proto__ = TileImage;\n  TileJSON.prototype = Object.create( TileImage && TileImage.prototype );\n  TileJSON.prototype.constructor = TileJSON;\n\n  /**\n   * @private\n   * @param {Event} event The load event.\n   */\n  TileJSON.prototype.onXHRLoad_ = function onXHRLoad_ (event) {\n    var client = /** @type {XMLHttpRequest} */ (event.target);\n    // status will be 0 for file:// urls\n    if (!client.status || client.status >= 200 && client.status < 300) {\n      var response;\n      try {\n        response = /** @type {TileJSON} */(JSON.parse(client.responseText));\n      } catch (err) {\n        this.handleTileJSONError();\n        return;\n      }\n      this.handleTileJSONResponse(response);\n    } else {\n      this.handleTileJSONError();\n    }\n  };\n\n  /**\n   * @private\n   * @param {Event} event The error event.\n   */\n  TileJSON.prototype.onXHRError_ = function onXHRError_ (event) {\n    this.handleTileJSONError();\n  };\n\n  /**\n   * @return {Config} The tilejson object.\n   * @api\n   */\n  TileJSON.prototype.getTileJSON = function getTileJSON () {\n    return this.tileJSON_;\n  };\n\n  /**\n   * @protected\n   * @param {Config} tileJSON Tile JSON.\n   */\n  TileJSON.prototype.handleTileJSONResponse = function handleTileJSONResponse (tileJSON) {\n\n    var epsg4326Projection = getProjection('EPSG:4326');\n\n    var sourceProjection = this.getProjection();\n    var extent;\n    if (tileJSON['bounds'] !== undefined) {\n      var transform = getTransformFromProjections(\n        epsg4326Projection, sourceProjection);\n      extent = applyTransform(tileJSON['bounds'], transform);\n    }\n\n    var minZoom = tileJSON['minzoom'] || 0;\n    var maxZoom = tileJSON['maxzoom'] || 22;\n    var tileGrid = createXYZ({\n      extent: extentFromProjection(sourceProjection),\n      maxZoom: maxZoom,\n      minZoom: minZoom\n    });\n    this.tileGrid = tileGrid;\n\n    this.tileUrlFunction = createFromTemplates(tileJSON['tiles'], tileGrid);\n\n    if (tileJSON['attribution'] !== undefined && !this.getAttributions()) {\n      var attributionExtent = extent !== undefined ?\n        extent : epsg4326Projection.getExtent();\n\n      this.setAttributions(function(frameState) {\n        if (intersects(attributionExtent, frameState.extent)) {\n          return [tileJSON['attribution']];\n        }\n        return null;\n      });\n\n    }\n    this.tileJSON_ = tileJSON;\n    this.setState(SourceState.READY);\n\n  };\n\n  /**\n   * @protected\n   */\n  TileJSON.prototype.handleTileJSONError = function handleTileJSONError () {\n    this.setState(SourceState.ERROR);\n  };\n\n  return TileJSON;\n}(TileImage));\n\n\nexport default TileJSON;\n\n//# sourceMappingURL=TileJSON.js.map","/**\n * @module ol/source/TileWMS\n */\n\nimport {DEFAULT_WMS_VERSION} from './common.js';\n\nimport {assert} from '../asserts.js';\nimport {buffer, createEmpty} from '../extent.js';\nimport {assign} from '../obj.js';\nimport {modulo} from '../math.js';\nimport {get as getProjection, transform, transformExtent} from '../proj.js';\nimport {calculateSourceResolution} from '../reproj.js';\nimport {toSize, buffer as bufferSize, scale as scaleSize} from '../size.js';\nimport TileImage from './TileImage.js';\nimport WMSServerType from './WMSServerType.js';\nimport {hash as tileCoordHash} from '../tilecoord.js';\nimport {compareVersions} from '../string.js';\nimport {appendParams} from '../uri.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {Object<string,*>} params WMS request parameters.\n * At least a `LAYERS` param is required. `STYLES` is\n * `''` by default. `VERSION` is `1.3.0` by default. `WIDTH`, `HEIGHT`, `BBOX`\n * and `CRS` (`SRS` for WMS version < 1.3.0) will be set dynamically.\n * @property {number} [gutter=0]\n * The size in pixels of the gutter around image tiles to ignore. By setting\n * this property to a non-zero value, images will be requested that are wider\n * and taller than the tile size by a value of `2 x gutter`.\n * Using a non-zero value allows artifacts of rendering at tile edges to be\n * ignored. If you control the WMS service it is recommended to address\n * \"artifacts at tile edges\" issues by properly configuring the WMS service. For\n * example, MapServer has a `tile_map_edge_buffer` configuration parameter for\n * this. See http://mapserver.org/output/tile_mode.html.\n * @property {boolean} [hidpi=true] Use the `ol/Map#pixelRatio` value when requesting\n * the image from the remote server.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid. Base this on the resolutions,\n * tilesize and extent supported by the server.\n * If this is not defined, a default grid will be used: if there is a projection\n * extent, the grid will be based on that; if not, a grid based on a global\n * extent with origin at 0,0 will be used..\n * @property {import(\"./WMSServerType.js\").default|string} [serverType]\n * The type of the remote WMS server. Currently only used when `hidpi` is\n * `true`.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {string} [url] WMS service URL.\n * @property {Array<string>} [urls] WMS service urls.\n * Use this instead of `url` when the WMS supports multiple urls for GetMap requests.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When `true`, tiles will be requested for one world only,\n * but they will be wrapped horizontally to render multiple worlds.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data from WMS servers.\n * @api\n */\nvar TileWMS = /*@__PURE__*/(function (TileImage) {\n  function TileWMS(opt_options) {\n\n    var options = opt_options || /** @type {Options} */ ({});\n\n    var params = options.params || {};\n\n    var transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;\n\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      opaque: !transparent,\n      projection: options.projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileClass: options.tileClass,\n      tileGrid: options.tileGrid,\n      tileLoadFunction: options.tileLoadFunction,\n      tileUrlFunction: tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX !== undefined ? options.wrapX : true,\n      transition: options.transition\n    });\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.gutter_ = options.gutter !== undefined ? options.gutter : 0;\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.params_ = params;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.v13_ = true;\n\n    /**\n     * @private\n     * @type {import(\"./WMSServerType.js\").default|undefined}\n     */\n    this.serverType_ = /** @type {import(\"./WMSServerType.js\").default|undefined} */ (options.serverType);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hidpi_ = options.hidpi !== undefined ? options.hidpi : true;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.tmpExtent_ = createEmpty();\n\n    this.updateV13_();\n    this.setKey(this.getKeyForParams_());\n\n  }\n\n  if ( TileImage ) TileWMS.__proto__ = TileImage;\n  TileWMS.prototype = Object.create( TileImage && TileImage.prototype );\n  TileWMS.prototype.constructor = TileWMS;\n\n  /**\n   * Return the GetFeatureInfo URL for the passed coordinate, resolution, and\n   * projection. Return `undefined` if the GetFeatureInfo URL cannot be\n   * constructed.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {import(\"../proj.js\").ProjectionLike} projection Projection.\n   * @param {!Object} params GetFeatureInfo params. `INFO_FORMAT` at least should\n   *     be provided. If `QUERY_LAYERS` is not provided then the layers specified\n   *     in the `LAYERS` parameter will be used. `VERSION` should not be\n   *     specified here.\n   * @return {string|undefined} GetFeatureInfo URL.\n   * @api\n   */\n  TileWMS.prototype.getGetFeatureInfoUrl = function getGetFeatureInfoUrl (coordinate, resolution, projection, params) {\n    var projectionObj = getProjection(projection);\n    var sourceProjectionObj = this.getProjection();\n\n    var tileGrid = this.getTileGrid();\n    if (!tileGrid) {\n      tileGrid = this.getTileGridForProjection(projectionObj);\n    }\n\n    var tileCoord = tileGrid.getTileCoordForCoordAndResolution(coordinate, resolution);\n\n    if (tileGrid.getResolutions().length <= tileCoord[0]) {\n      return undefined;\n    }\n\n    var tileResolution = tileGrid.getResolution(tileCoord[0]);\n    var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n    var tileSize = toSize(tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n\n    var gutter = this.gutter_;\n    if (gutter !== 0) {\n      tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n      tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n    }\n\n    if (sourceProjectionObj && sourceProjectionObj !== projectionObj) {\n      tileResolution = calculateSourceResolution(sourceProjectionObj, projectionObj, coordinate, tileResolution);\n      tileExtent = transformExtent(tileExtent, projectionObj, sourceProjectionObj);\n      coordinate = transform(coordinate, projectionObj, sourceProjectionObj);\n    }\n\n    var baseParams = {\n      'SERVICE': 'WMS',\n      'VERSION': DEFAULT_WMS_VERSION,\n      'REQUEST': 'GetFeatureInfo',\n      'FORMAT': 'image/png',\n      'TRANSPARENT': true,\n      'QUERY_LAYERS': this.params_['LAYERS']\n    };\n    assign(baseParams, this.params_, params);\n\n    var x = Math.floor((coordinate[0] - tileExtent[0]) / tileResolution);\n    var y = Math.floor((tileExtent[3] - coordinate[1]) / tileResolution);\n\n    baseParams[this.v13_ ? 'I' : 'X'] = x;\n    baseParams[this.v13_ ? 'J' : 'Y'] = y;\n\n    return this.getRequestUrl_(tileCoord, tileSize, tileExtent,\n      1, sourceProjectionObj || projectionObj, baseParams);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileWMS.prototype.getGutter = function getGutter () {\n    return this.gutter_;\n  };\n\n  /**\n   * Get the user-provided params, i.e. those passed to the constructor through\n   * the \"params\" option, and possibly updated using the updateParams method.\n   * @return {Object} Params.\n   * @api\n   */\n  TileWMS.prototype.getParams = function getParams () {\n    return this.params_;\n  };\n\n  /**\n   * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n   * @param {import(\"../size.js\").Size} tileSize Tile size.\n   * @param {import(\"../extent.js\").Extent} tileExtent Tile extent.\n   * @param {number} pixelRatio Pixel ratio.\n   * @param {import(\"../proj/Projection.js\").default} projection Projection.\n   * @param {Object} params Params.\n   * @return {string|undefined} Request URL.\n   * @private\n   */\n  TileWMS.prototype.getRequestUrl_ = function getRequestUrl_ (tileCoord, tileSize, tileExtent, pixelRatio, projection, params) {\n\n    var urls = this.urls;\n    if (!urls) {\n      return undefined;\n    }\n\n    params['WIDTH'] = tileSize[0];\n    params['HEIGHT'] = tileSize[1];\n\n    params[this.v13_ ? 'CRS' : 'SRS'] = projection.getCode();\n\n    if (!('STYLES' in this.params_)) {\n      params['STYLES'] = '';\n    }\n\n    if (pixelRatio != 1) {\n      switch (this.serverType_) {\n        case WMSServerType.GEOSERVER:\n          var dpi = (90 * pixelRatio + 0.5) | 0;\n          if ('FORMAT_OPTIONS' in params) {\n            params['FORMAT_OPTIONS'] += ';dpi:' + dpi;\n          } else {\n            params['FORMAT_OPTIONS'] = 'dpi:' + dpi;\n          }\n          break;\n        case WMSServerType.MAPSERVER:\n          params['MAP_RESOLUTION'] = 90 * pixelRatio;\n          break;\n        case WMSServerType.CARMENTA_SERVER:\n        case WMSServerType.QGIS:\n          params['DPI'] = 90 * pixelRatio;\n          break;\n        default:\n          assert(false, 52); // Unknown `serverType` configured\n          break;\n      }\n    }\n\n    var axisOrientation = projection.getAxisOrientation();\n    var bbox = tileExtent;\n    if (this.v13_ && axisOrientation.substr(0, 2) == 'ne') {\n      var tmp;\n      tmp = tileExtent[0];\n      bbox[0] = tileExtent[1];\n      bbox[1] = tmp;\n      tmp = tileExtent[2];\n      bbox[2] = tileExtent[3];\n      bbox[3] = tmp;\n    }\n    params['BBOX'] = bbox.join(',');\n\n    var url;\n    if (urls.length == 1) {\n      url = urls[0];\n    } else {\n      var index = modulo(tileCoordHash(tileCoord), urls.length);\n      url = urls[index];\n    }\n    return appendParams(url, params);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TileWMS.prototype.getTilePixelRatio = function getTilePixelRatio (pixelRatio) {\n    return (!this.hidpi_ || this.serverType_ === undefined) ? 1 :\n    /** @type {number} */ (pixelRatio);\n  };\n\n  /**\n   * @private\n   * @return {string} The key for the current params.\n   */\n  TileWMS.prototype.getKeyForParams_ = function getKeyForParams_ () {\n    var i = 0;\n    var res = [];\n    for (var key in this.params_) {\n      res[i++] = key + '-' + this.params_[key];\n    }\n    return res.join('/');\n  };\n\n  /**\n   * Update the user-provided params.\n   * @param {Object} params Params.\n   * @api\n   */\n  TileWMS.prototype.updateParams = function updateParams (params) {\n    assign(this.params_, params);\n    this.updateV13_();\n    this.setKey(this.getKeyForParams_());\n  };\n\n  /**\n   * @private\n   */\n  TileWMS.prototype.updateV13_ = function updateV13_ () {\n    var version = this.params_['VERSION'] || DEFAULT_WMS_VERSION;\n    this.v13_ = compareVersions(version, '1.3') >= 0;\n  };\n\n  return TileWMS;\n}(TileImage));\n\n/**\n * @param {import(\"../tilecoord.js\").TileCoord} tileCoord The tile coordinate\n * @param {number} pixelRatio The pixel ratio\n * @param {import(\"../proj/Projection.js\").default} projection The projection\n * @return {string|undefined} The tile URL\n * @this {TileWMS}\n */\nfunction tileUrlFunction(tileCoord, pixelRatio, projection) {\n\n  var tileGrid = this.getTileGrid();\n  if (!tileGrid) {\n    tileGrid = this.getTileGridForProjection(projection);\n  }\n\n  if (tileGrid.getResolutions().length <= tileCoord[0]) {\n    return undefined;\n  }\n\n  if (pixelRatio != 1 && (!this.hidpi_ || this.serverType_ === undefined)) {\n    pixelRatio = 1;\n  }\n\n  var tileResolution = tileGrid.getResolution(tileCoord[0]);\n  var tileExtent = tileGrid.getTileCoordExtent(tileCoord, this.tmpExtent_);\n  var tileSize = toSize(\n    tileGrid.getTileSize(tileCoord[0]), this.tmpSize);\n\n  var gutter = this.gutter_;\n  if (gutter !== 0) {\n    tileSize = bufferSize(tileSize, gutter, this.tmpSize);\n    tileExtent = buffer(tileExtent, tileResolution * gutter, tileExtent);\n  }\n\n  if (pixelRatio != 1) {\n    tileSize = scaleSize(tileSize, pixelRatio, this.tmpSize);\n  }\n\n  var baseParams = {\n    'SERVICE': 'WMS',\n    'VERSION': DEFAULT_WMS_VERSION,\n    'REQUEST': 'GetMap',\n    'FORMAT': 'image/png',\n    'TRANSPARENT': true\n  };\n  assign(baseParams, this.params_);\n\n  return this.getRequestUrl_(tileCoord, tileSize, tileExtent,\n    pixelRatio, projection, baseParams);\n}\n\n\nexport default TileWMS;\n\n//# sourceMappingURL=TileWMS.js.map","/**\n * @module ol/source/UTFGrid\n */\n\nimport Tile from '../Tile.js';\nimport TileState from '../TileState.js';\nimport {createFromTemplates, nullTileUrlFunction} from '../tileurlfunction.js';\nimport {assert} from '../asserts.js';\nimport {listenOnce} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {applyTransform, intersects} from '../extent.js';\nimport {jsonp as requestJSONP} from '../net.js';\nimport {get as getProjection, getTransformFromProjections} from '../proj.js';\nimport SourceState from './State.js';\nimport TileSource from './Tile.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} UTFGridJSON\n * @property {Array<string>} grid The grid.\n * @property {Array<string>} keys The keys.\n * @property {Object<string, Object>} [data] Optional data.\n */\n\n\nexport var CustomTile = /*@__PURE__*/(function (Tile) {\n  function CustomTile(tileCoord, state, src, extent, preemptive, jsonp) {\n\n    Tile.call(this, tileCoord, state);\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.src_ = src;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = extent;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.preemptive_ = preemptive;\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.grid_ = null;\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.keys_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, Object>|undefined}\n     */\n    this.data_ = null;\n\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.jsonp_ = jsonp;\n\n  }\n\n  if ( Tile ) CustomTile.__proto__ = Tile;\n  CustomTile.prototype = Object.create( Tile && Tile.prototype );\n  CustomTile.prototype.constructor = CustomTile;\n\n  /**\n   * Get the image element for this tile.\n   * @return {HTMLImageElement} Image.\n   */\n  CustomTile.prototype.getImage = function getImage () {\n    return null;\n  };\n\n\n  /**\n   * Synchronously returns data at given coordinate (if available).\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {*} The data.\n   */\n  CustomTile.prototype.getData = function getData (coordinate) {\n    if (!this.grid_ || !this.keys_) {\n      return null;\n    }\n    var xRelative = (coordinate[0] - this.extent_[0]) /\n        (this.extent_[2] - this.extent_[0]);\n    var yRelative = (coordinate[1] - this.extent_[1]) /\n        (this.extent_[3] - this.extent_[1]);\n\n    var row = this.grid_[Math.floor((1 - yRelative) * this.grid_.length)];\n\n    if (typeof row !== 'string') {\n      return null;\n    }\n\n    var code = row.charCodeAt(Math.floor(xRelative * row.length));\n    if (code >= 93) {\n      code--;\n    }\n    if (code >= 35) {\n      code--;\n    }\n    code -= 32;\n\n    var data = null;\n    if (code in this.keys_) {\n      var id = this.keys_[code];\n      if (this.data_ && id in this.data_) {\n        data = this.data_[id];\n      } else {\n        data = id;\n      }\n    }\n    return data;\n  };\n\n\n  /**\n   * Calls the callback (synchronously by default) with the available data\n   * for given coordinate (or `null` if not yet loaded).\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {function(this: T, *)} callback Callback.\n   * @param {T=} opt_this The object to use as `this` in the callback.\n   * @param {boolean=} opt_request If `true` the callback is always async.\n   *                               The tile data is requested if not yet loaded.\n   * @template T\n   */\n  CustomTile.prototype.forDataAtCoordinate = function forDataAtCoordinate (coordinate, callback, opt_this, opt_request) {\n    if (this.state == TileState.IDLE && opt_request === true) {\n      listenOnce(this, EventType.CHANGE, function(e) {\n        callback.call(opt_this, this.getData(coordinate));\n      }, this);\n      this.loadInternal_();\n    } else {\n      if (opt_request === true) {\n        setTimeout(function() {\n          callback.call(opt_this, this.getData(coordinate));\n        }.bind(this), 0);\n      } else {\n        callback.call(opt_this, this.getData(coordinate));\n      }\n    }\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  CustomTile.prototype.getKey = function getKey () {\n    return this.src_;\n  };\n\n\n  /**\n   * @private\n   */\n  CustomTile.prototype.handleError_ = function handleError_ () {\n    this.state = TileState.ERROR;\n    this.changed();\n  };\n\n\n  /**\n   * @param {!UTFGridJSON} json UTFGrid data.\n   * @private\n   */\n  CustomTile.prototype.handleLoad_ = function handleLoad_ (json) {\n    this.grid_ = json['grid'];\n    this.keys_ = json['keys'];\n    this.data_ = json['data'];\n\n    this.state = TileState.EMPTY;\n    this.changed();\n  };\n\n\n  /**\n   * @private\n   */\n  CustomTile.prototype.loadInternal_ = function loadInternal_ () {\n    if (this.state == TileState.IDLE) {\n      this.state = TileState.LOADING;\n      if (this.jsonp_) {\n        requestJSONP(this.src_, this.handleLoad_.bind(this),\n          this.handleError_.bind(this));\n      } else {\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.onXHRLoad_.bind(this));\n        client.addEventListener('error', this.onXHRError_.bind(this));\n        client.open('GET', this.src_);\n        client.send();\n      }\n    }\n  };\n\n\n  /**\n   * @private\n   * @param {Event} event The load event.\n   */\n  CustomTile.prototype.onXHRLoad_ = function onXHRLoad_ (event) {\n    var client = /** @type {XMLHttpRequest} */ (event.target);\n    // status will be 0 for file:// urls\n    if (!client.status || client.status >= 200 && client.status < 300) {\n      var response;\n      try {\n        response = /** @type {!UTFGridJSON} */(JSON.parse(client.responseText));\n      } catch (err) {\n        this.handleError_();\n        return;\n      }\n      this.handleLoad_(response);\n    } else {\n      this.handleError_();\n    }\n  };\n\n\n  /**\n   * @private\n   * @param {Event} event The error event.\n   */\n  CustomTile.prototype.onXHRError_ = function onXHRError_ (event) {\n    this.handleError_();\n  };\n\n\n  /**\n   * @override\n   */\n  CustomTile.prototype.load = function load () {\n    if (this.preemptive_) {\n      this.loadInternal_();\n    }\n  };\n\n  return CustomTile;\n}(Tile));\n\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [preemptive=true]\n * If `true` the UTFGrid source loads the tiles based on their \"visibility\".\n * This improves the speed of response, but increases traffic.\n * Note that if set to `false`, you need to pass `true` as `opt_request`\n * to the `forDataAtCoordinateAndResolution` method otherwise no data\n * will ever be loaded.\n * @property {boolean} [jsonp=false] Use JSONP with callback to load the TileJSON.\n * Useful when the server does not support CORS..\n * @property {import(\"./TileJSON.js\").Config} [tileJSON] TileJSON configuration for this source.\n * If not provided, `url` must be configured.\n * @property {string} [url] TileJSON endpoint that provides the configuration for this source.\n * Request will be made through JSONP. If not provided, `tileJSON` must be configured.\n */\n\n\n/**\n * @classdesc\n * Layer source for UTFGrid interaction data loaded from TileJSON format.\n * @api\n */\nvar UTFGrid = /*@__PURE__*/(function (TileSource) {\n  function UTFGrid(options) {\n    TileSource.call(this, {\n      projection: getProjection('EPSG:3857'),\n      state: SourceState.LOADING\n    });\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.preemptive_ = options.preemptive !== undefined ?\n      options.preemptive : true;\n\n    /**\n     * @private\n     * @type {!import(\"../Tile.js\").UrlFunction}\n     */\n    this.tileUrlFunction_ = nullTileUrlFunction;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.template_ = undefined;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.jsonp_ = options.jsonp || false;\n\n    if (options.url) {\n      if (this.jsonp_) {\n        requestJSONP(options.url, this.handleTileJSONResponse.bind(this),\n          this.handleTileJSONError.bind(this));\n      } else {\n        var client = new XMLHttpRequest();\n        client.addEventListener('load', this.onXHRLoad_.bind(this));\n        client.addEventListener('error', this.onXHRError_.bind(this));\n        client.open('GET', options.url);\n        client.send();\n      }\n    } else if (options.tileJSON) {\n      this.handleTileJSONResponse(options.tileJSON);\n    } else {\n      assert(false, 51); // Either `url` or `tileJSON` options must be provided\n    }\n\n  }\n\n  if ( TileSource ) UTFGrid.__proto__ = TileSource;\n  UTFGrid.prototype = Object.create( TileSource && TileSource.prototype );\n  UTFGrid.prototype.constructor = UTFGrid;\n\n\n  /**\n   * @private\n   * @param {Event} event The load event.\n   */\n  UTFGrid.prototype.onXHRLoad_ = function onXHRLoad_ (event) {\n    var client = /** @type {XMLHttpRequest} */ (event.target);\n    // status will be 0 for file:// urls\n    if (!client.status || client.status >= 200 && client.status < 300) {\n      var response;\n      try {\n        response = /** @type {import(\"./TileJSON.js\").Config} */(JSON.parse(client.responseText));\n      } catch (err) {\n        this.handleTileJSONError();\n        return;\n      }\n      this.handleTileJSONResponse(response);\n    } else {\n      this.handleTileJSONError();\n    }\n  };\n\n\n  /**\n   * @private\n   * @param {Event} event The error event.\n   */\n  UTFGrid.prototype.onXHRError_ = function onXHRError_ (event) {\n    this.handleTileJSONError();\n  };\n\n\n  /**\n   * Return the template from TileJSON.\n   * @return {string|undefined} The template from TileJSON.\n   * @api\n   */\n  UTFGrid.prototype.getTemplate = function getTemplate () {\n    return this.template_;\n  };\n\n\n  /**\n   * Calls the callback (synchronously by default) with the available data\n   * for given coordinate and resolution (or `null` if not yet loaded or\n   * in case of an error).\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @param {number} resolution Resolution.\n   * @param {function(*)} callback Callback.\n   * @param {boolean=} opt_request If `true` the callback is always async.\n   *                               The tile data is requested if not yet loaded.\n   * @api\n   */\n  UTFGrid.prototype.forDataAtCoordinateAndResolution = function forDataAtCoordinateAndResolution (\n    coordinate, resolution, callback, opt_request) {\n    if (this.tileGrid) {\n      var tileCoord = this.tileGrid.getTileCoordForCoordAndResolution(\n        coordinate, resolution);\n      var tile = /** @type {!CustomTile} */(this.getTile(\n        tileCoord[0], tileCoord[1], tileCoord[2], 1, this.getProjection()));\n      tile.forDataAtCoordinate(coordinate, callback, null, opt_request);\n    } else {\n      if (opt_request === true) {\n        setTimeout(function() {\n          callback(null);\n        }, 0);\n      } else {\n        callback(null);\n      }\n    }\n  };\n\n\n  /**\n   * @protected\n   */\n  UTFGrid.prototype.handleTileJSONError = function handleTileJSONError () {\n    this.setState(SourceState.ERROR);\n  };\n\n\n  /**\n   * TODO: very similar to ol/source/TileJSON#handleTileJSONResponse\n   * @protected\n   * @param {import(\"./TileJSON.js\").Config} tileJSON Tile JSON.\n   */\n  UTFGrid.prototype.handleTileJSONResponse = function handleTileJSONResponse (tileJSON) {\n\n    var epsg4326Projection = getProjection('EPSG:4326');\n\n    var sourceProjection = this.getProjection();\n    var extent;\n    if (tileJSON['bounds'] !== undefined) {\n      var transform = getTransformFromProjections(\n        epsg4326Projection, sourceProjection);\n      extent = applyTransform(tileJSON['bounds'], transform);\n    }\n\n    var minZoom = tileJSON['minzoom'] || 0;\n    var maxZoom = tileJSON['maxzoom'] || 22;\n    var tileGrid = createXYZ({\n      extent: extentFromProjection(sourceProjection),\n      maxZoom: maxZoom,\n      minZoom: minZoom\n    });\n    this.tileGrid = tileGrid;\n\n    this.template_ = tileJSON['template'];\n\n    var grids = tileJSON['grids'];\n    if (!grids) {\n      this.setState(SourceState.ERROR);\n      return;\n    }\n\n    this.tileUrlFunction_ = createFromTemplates(grids, tileGrid);\n\n    if (tileJSON['attribution'] !== undefined) {\n      var attributionExtent = extent !== undefined ?\n        extent : epsg4326Projection.getExtent();\n\n      this.setAttributions(function(frameState) {\n        if (intersects(attributionExtent, frameState.extent)) {\n          return [tileJSON['attribution']];\n        }\n        return null;\n      });\n    }\n\n    this.setState(SourceState.READY);\n\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  UTFGrid.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    var tileCoordKey = getKeyZXY(z, x, y);\n    if (this.tileCache.containsKey(tileCoordKey)) {\n      return (\n        /** @type {!import(\"../Tile.js\").default} */ (this.tileCache.get(tileCoordKey))\n      );\n    } else {\n      var tileCoord = [z, x, y];\n      var urlTileCoord =\n          this.getTileCoordForTileUrlFunction(tileCoord, projection);\n      var tileUrl = this.tileUrlFunction_(urlTileCoord, pixelRatio, projection);\n      var tile = new CustomTile(\n        tileCoord,\n        tileUrl !== undefined ? TileState.IDLE : TileState.EMPTY,\n        tileUrl !== undefined ? tileUrl : '',\n        this.tileGrid.getTileCoordExtent(tileCoord),\n        this.preemptive_,\n        this.jsonp_);\n      this.tileCache.set(tileCoordKey, tile);\n      return tile;\n    }\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  UTFGrid.prototype.useTile = function useTile (z, x, y) {\n    var tileCoordKey = getKeyZXY(z, x, y);\n    if (this.tileCache.containsKey(tileCoordKey)) {\n      this.tileCache.get(tileCoordKey);\n    }\n  };\n\n  return UTFGrid;\n}(TileSource));\n\n\nexport default UTFGrid;\n\n//# sourceMappingURL=UTFGrid.js.map","/**\n * @module ol/VectorImageTile\n */\nimport {getUid} from './util.js';\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\nimport {createCanvasContext2D} from './dom.js';\nimport {listen, unlistenByKey} from './events.js';\nimport {getHeight, getIntersection, getWidth} from './extent.js';\nimport EventType from './events/EventType.js';\nimport {loadFeaturesXhr} from './featureloader.js';\nimport {VOID} from './functions.js';\n\n\n/**\n * @typedef {Object} ReplayState\n * @property {boolean} dirty\n * @property {null|import(\"./render.js\").OrderFunction} renderedRenderOrder\n * @property {number} renderedTileRevision\n * @property {number} renderedRevision\n */\n\n\nvar VectorImageTile = /*@__PURE__*/(function (Tile) {\n  function VectorImageTile(tileCoord, state, sourceRevision, format, tileLoadFunction,\n    urlTileCoord, tileUrlFunction, sourceTileGrid, tileGrid, sourceTiles,\n    pixelRatio, projection, tileClass, handleTileChange, zoom) {\n\n    Tile.call(this, tileCoord, state, {transition: 0});\n\n    /**\n     * @private\n     * @type {!Object<string, CanvasRenderingContext2D>}\n     */\n    this.context_ = {};\n\n    /**\n     * @private\n     * @type {import(\"./featureloader.js\").FeatureLoader}\n     */\n    this.loader_;\n\n    /**\n     * @private\n     * @type {!Object<string, ReplayState>}\n     */\n    this.replayState_ = {};\n\n    /**\n     * @private\n     * @type {Object<string, import(\"./VectorTile.js\").default>}\n     */\n    this.sourceTiles_ = sourceTiles;\n\n    /**\n     * Keys of source tiles used by this tile. Use with {@link #getTile}.\n     * @type {Array<string>}\n     */\n    this.tileKeys = [];\n\n    /**\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.extent = null;\n\n    /**\n     * @type {number}\n     */\n    this.sourceRevision_ = sourceRevision;\n\n    /**\n     * @type {import(\"./tilecoord.js\").TileCoord}\n     */\n    this.wrappedTileCoord = urlTileCoord;\n\n    /**\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.loadListenerKeys_ = [];\n\n    /**\n     * @type {Array<import(\"./events.js\").EventsKey>}\n     */\n    this.sourceTileListenerKeys_ = [];\n\n    if (urlTileCoord) {\n      var extent = this.extent = tileGrid.getTileCoordExtent(urlTileCoord);\n      var resolution = tileGrid.getResolution(zoom);\n      var sourceZ = sourceTileGrid.getZForResolution(resolution);\n      var useLoadedOnly = zoom != tileCoord[0];\n      var loadCount = 0;\n      sourceTileGrid.forEachTileCoord(extent, sourceZ, function(sourceTileCoord) {\n        var sharedExtent = getIntersection(extent,\n          sourceTileGrid.getTileCoordExtent(sourceTileCoord));\n        var sourceExtent = sourceTileGrid.getExtent();\n        if (sourceExtent) {\n          sharedExtent = getIntersection(sharedExtent, sourceExtent, sharedExtent);\n        }\n        if (getWidth(sharedExtent) / resolution >= 0.5 &&\n            getHeight(sharedExtent) / resolution >= 0.5) {\n          // only include source tile if overlap is at least 1 pixel\n          ++loadCount;\n          var sourceTileKey = sourceTileCoord.toString();\n          var sourceTile = sourceTiles[sourceTileKey];\n          if (!sourceTile && !useLoadedOnly) {\n            var tileUrl = tileUrlFunction(sourceTileCoord, pixelRatio, projection);\n            sourceTile = sourceTiles[sourceTileKey] = new tileClass(sourceTileCoord,\n              tileUrl == undefined ? TileState.EMPTY : TileState.IDLE,\n              tileUrl == undefined ? '' : tileUrl,\n              format, tileLoadFunction);\n            this.sourceTileListenerKeys_.push(\n              listen(sourceTile, EventType.CHANGE, handleTileChange));\n          }\n          if (sourceTile && (!useLoadedOnly || sourceTile.getState() == TileState.LOADED)) {\n            sourceTile.consumers++;\n            this.tileKeys.push(sourceTileKey);\n          }\n        }\n      }.bind(this));\n\n      if (useLoadedOnly && loadCount == this.tileKeys.length) {\n        this.finishLoading_();\n      }\n\n      if (zoom <= tileCoord[0] && this.state != TileState.LOADED) {\n        while (zoom > tileGrid.getMinZoom()) {\n          var tile = new VectorImageTile(tileCoord, state, sourceRevision,\n            format, tileLoadFunction, urlTileCoord, tileUrlFunction,\n            sourceTileGrid, tileGrid, sourceTiles, pixelRatio, projection,\n            tileClass, VOID, --zoom);\n          if (tile.state == TileState.LOADED) {\n            this.interimTile = tile;\n            break;\n          }\n        }\n      }\n    }\n\n  }\n\n  if ( Tile ) VectorImageTile.__proto__ = Tile;\n  VectorImageTile.prototype = Object.create( Tile && Tile.prototype );\n  VectorImageTile.prototype.constructor = VectorImageTile;\n\n  /**\n   * @inheritDoc\n   */\n  VectorImageTile.prototype.disposeInternal = function disposeInternal () {\n    this.state = TileState.ABORT;\n    this.changed();\n    if (this.interimTile) {\n      this.interimTile.dispose();\n    }\n\n    for (var i = 0, ii = this.tileKeys.length; i < ii; ++i) {\n      var sourceTileKey = this.tileKeys[i];\n      var sourceTile = this.getTile(sourceTileKey);\n      sourceTile.consumers--;\n      if (sourceTile.consumers == 0) {\n        delete this.sourceTiles_[sourceTileKey];\n        sourceTile.dispose();\n      }\n    }\n    this.tileKeys.length = 0;\n    this.sourceTiles_ = null;\n    this.loadListenerKeys_.forEach(unlistenByKey);\n    this.loadListenerKeys_.length = 0;\n    this.sourceTileListenerKeys_.forEach(unlistenByKey);\n    this.sourceTileListenerKeys_.length = 0;\n    Tile.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @param {import(\"./layer/Layer.js\").default} layer Layer.\n   * @return {CanvasRenderingContext2D} The rendering context.\n   */\n  VectorImageTile.prototype.getContext = function getContext (layer) {\n    var key = getUid(layer);\n    if (!(key in this.context_)) {\n      this.context_[key] = createCanvasContext2D();\n    }\n    return this.context_[key];\n  };\n\n  /**\n   * Get the Canvas for this tile.\n   * @param {import(\"./layer/Layer.js\").default} layer Layer.\n   * @return {HTMLCanvasElement} Canvas.\n   */\n  VectorImageTile.prototype.getImage = function getImage (layer) {\n    return this.getReplayState(layer).renderedTileRevision == -1 ?\n      null : this.getContext(layer).canvas;\n  };\n\n  /**\n   * @param {import(\"./layer/Layer.js\").default} layer Layer.\n   * @return {ReplayState} The replay state.\n   */\n  VectorImageTile.prototype.getReplayState = function getReplayState (layer) {\n    var key = getUid(layer);\n    if (!(key in this.replayState_)) {\n      this.replayState_[key] = {\n        dirty: false,\n        renderedRenderOrder: null,\n        renderedRevision: -1,\n        renderedTileRevision: -1\n      };\n    }\n    return this.replayState_[key];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  VectorImageTile.prototype.getKey = function getKey () {\n    return this.tileKeys.join('/') + '-' + this.sourceRevision_;\n  };\n\n  /**\n   * @param {string} tileKey Key (tileCoord) of the source tile.\n   * @return {import(\"./VectorTile.js\").default} Source tile.\n   */\n  VectorImageTile.prototype.getTile = function getTile (tileKey) {\n    return this.sourceTiles_[tileKey];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  VectorImageTile.prototype.load = function load () {\n    // Source tiles with LOADED state - we just count them because once they are\n    // loaded, we're no longer listening to state changes.\n    var leftToLoad = 0;\n    // Source tiles with ERROR state - we track them because they can still have\n    // an ERROR state after another load attempt.\n    var errorSourceTiles = {};\n\n    if (this.state == TileState.IDLE) {\n      this.setState(TileState.LOADING);\n    }\n    if (this.state == TileState.LOADING) {\n      this.tileKeys.forEach(function(sourceTileKey) {\n        var sourceTile = this.getTile(sourceTileKey);\n        if (sourceTile.state == TileState.IDLE) {\n          sourceTile.setLoader(this.loader_);\n          sourceTile.load();\n        }\n        if (sourceTile.state == TileState.LOADING) {\n          var key = listen(sourceTile, EventType.CHANGE, function(e) {\n            var state = sourceTile.getState();\n            if (state == TileState.LOADED ||\n                state == TileState.ERROR) {\n              var uid = getUid(sourceTile);\n              if (state == TileState.ERROR) {\n                errorSourceTiles[uid] = true;\n              } else {\n                --leftToLoad;\n                delete errorSourceTiles[uid];\n              }\n              if (leftToLoad - Object.keys(errorSourceTiles).length == 0) {\n                this.finishLoading_();\n              }\n            }\n          }.bind(this));\n          this.loadListenerKeys_.push(key);\n          ++leftToLoad;\n        }\n      }.bind(this));\n    }\n    if (leftToLoad - Object.keys(errorSourceTiles).length == 0) {\n      setTimeout(this.finishLoading_.bind(this), 0);\n    }\n  };\n\n  /**\n   * @private\n   */\n  VectorImageTile.prototype.finishLoading_ = function finishLoading_ () {\n    var loaded = this.tileKeys.length;\n    var empty = 0;\n    for (var i = loaded - 1; i >= 0; --i) {\n      var state = this.getTile(this.tileKeys[i]).getState();\n      if (state != TileState.LOADED) {\n        --loaded;\n      }\n      if (state == TileState.EMPTY) {\n        ++empty;\n      }\n    }\n    if (loaded == this.tileKeys.length) {\n      this.loadListenerKeys_.forEach(unlistenByKey);\n      this.loadListenerKeys_.length = 0;\n      this.setState(TileState.LOADED);\n    } else {\n      this.setState(empty == this.tileKeys.length ? TileState.EMPTY : TileState.ERROR);\n    }\n  };\n\n  return VectorImageTile;\n}(Tile));\n\n\nexport default VectorImageTile;\n\n/**\n * Sets the loader for a tile.\n * @param {import(\"./VectorTile.js\").default} tile Vector tile.\n * @param {string} url URL.\n */\nexport function defaultLoadFunction(tile, url) {\n  var loader = loadFeaturesXhr(url, tile.getFormat(), tile.onLoad.bind(tile), tile.onError.bind(tile));\n  tile.setLoader(loader);\n}\n\n//# sourceMappingURL=VectorImageTile.js.map","/**\n * @module ol/VectorTile\n */\nimport {getUid} from './util.js';\nimport Tile from './Tile.js';\nimport TileState from './TileState.js';\n\n/**\n * @const\n * @type {import(\"./extent.js\").Extent}\n */\nvar DEFAULT_EXTENT = [0, 0, 4096, 4096];\n\n\nvar VectorTile = /*@__PURE__*/(function (Tile) {\n  function VectorTile(tileCoord, state, src, format, tileLoadFunction, opt_options) {\n\n    Tile.call(this, tileCoord, state, opt_options);\n\n    /**\n     * @type {number}\n     */\n    this.consumers = 0;\n\n    /**\n     * @private\n     * @type {import(\"./extent.js\").Extent}\n     */\n    this.extent_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./format/Feature.js\").default}\n     */\n    this.format_ = format;\n\n    /**\n     * @private\n     * @type {Array<import(\"./Feature.js\").default>}\n     */\n    this.features_ = null;\n\n    /**\n     * @private\n     * @type {import(\"./featureloader.js\").FeatureLoader}\n     */\n    this.loader_;\n\n    /**\n     * Data projection\n     * @private\n     * @type {import(\"./proj/Projection.js\").default}\n     */\n    this.projection_ = null;\n\n    /**\n     * @private\n     * @type {Object<string, import(\"./render/ReplayGroup.js\").default>}\n     */\n    this.replayGroups_ = {};\n\n    /**\n     * @private\n     * @type {import(\"./Tile.js\").LoadFunction}\n     */\n    this.tileLoadFunction_ = tileLoadFunction;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.url_ = src;\n\n  }\n\n  if ( Tile ) VectorTile.__proto__ = Tile;\n  VectorTile.prototype = Object.create( Tile && Tile.prototype );\n  VectorTile.prototype.constructor = VectorTile;\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.disposeInternal = function disposeInternal () {\n    this.features_ = null;\n    this.replayGroups_ = {};\n    this.state = TileState.ABORT;\n    this.changed();\n    Tile.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * Gets the extent of the vector tile.\n   * @return {import(\"./extent.js\").Extent} The extent.\n   * @api\n   */\n  VectorTile.prototype.getExtent = function getExtent () {\n    return this.extent_ || DEFAULT_EXTENT;\n  };\n\n  /**\n   * Get the feature format assigned for reading this tile's features.\n   * @return {import(\"./format/Feature.js\").default} Feature format.\n   * @api\n   */\n  VectorTile.prototype.getFormat = function getFormat () {\n    return this.format_;\n  };\n\n  /**\n   * Get the features for this tile. Geometries will be in the projection returned\n   * by {@link module:ol/VectorTile~VectorTile#getProjection}.\n   * @return {Array<import(\"./Feature.js\").FeatureLike>} Features.\n   * @api\n   */\n  VectorTile.prototype.getFeatures = function getFeatures () {\n    return this.features_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.getKey = function getKey () {\n    return this.url_;\n  };\n\n  /**\n   * Get the feature projection of features returned by\n   * {@link module:ol/VectorTile~VectorTile#getFeatures}.\n   * @return {import(\"./proj/Projection.js\").default} Feature projection.\n   * @api\n   */\n  VectorTile.prototype.getProjection = function getProjection () {\n    return this.projection_;\n  };\n\n  /**\n   * @param {import(\"./layer/Layer.js\").default} layer Layer.\n   * @param {string} key Key.\n   * @return {import(\"./render/ReplayGroup.js\").default} Replay group.\n   */\n  VectorTile.prototype.getReplayGroup = function getReplayGroup (layer, key) {\n    return this.replayGroups_[getUid(layer) + ',' + key];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.load = function load () {\n    if (this.state == TileState.IDLE) {\n      this.setState(TileState.LOADING);\n      this.tileLoadFunction_(this, this.url_);\n      this.loader_(null, NaN, null);\n    }\n  };\n\n  /**\n   * Handler for successful tile load.\n   * @param {Array<import(\"./Feature.js\").default>} features The loaded features.\n   * @param {import(\"./proj/Projection.js\").default} dataProjection Data projection.\n   * @param {import(\"./extent.js\").Extent} extent Extent.\n   */\n  VectorTile.prototype.onLoad = function onLoad (features, dataProjection, extent) {\n    this.setProjection(dataProjection);\n    this.setFeatures(features);\n    this.setExtent(extent);\n  };\n\n  /**\n   * Handler for tile load errors.\n   */\n  VectorTile.prototype.onError = function onError () {\n    this.setState(TileState.ERROR);\n  };\n\n  /**\n   * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s\n   * `tileLoadFunction`. Sets the extent of the vector tile. This is only required\n   * for tiles in projections with `tile-pixels` as units. The extent should be\n   * set to `[0, 0, tilePixelSize, tilePixelSize]`, where `tilePixelSize` is\n   * calculated by multiplying the tile size with the tile pixel ratio. For\n   * sources using {@link module:ol/format/MVT~MVT} as feature format, the\n   * {@link module:ol/format/MVT~MVT#getLastExtent} method will return the correct\n   * extent. The default is `[0, 0, 4096, 4096]`.\n   * @param {import(\"./extent.js\").Extent} extent The extent.\n   * @api\n   */\n  VectorTile.prototype.setExtent = function setExtent (extent) {\n    this.extent_ = extent;\n  };\n\n  /**\n   * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n   * Sets the features for the tile.\n   * @param {Array<import(\"./Feature.js\").default>} features Features.\n   * @api\n   */\n  VectorTile.prototype.setFeatures = function setFeatures (features) {\n    this.features_ = features;\n    this.setState(TileState.LOADED);\n  };\n\n  /**\n   * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`.\n   * Sets the projection of the features that were added with\n   * {@link module:ol/VectorTile~VectorTile#setFeatures}.\n   * @param {import(\"./proj/Projection.js\").default} projection Feature projection.\n   * @api\n   */\n  VectorTile.prototype.setProjection = function setProjection (projection) {\n    this.projection_ = projection;\n  };\n\n  /**\n   * @param {import(\"./layer/Layer.js\").default} layer Layer.\n   * @param {string} key Key.\n   * @param {import(\"./render/ReplayGroup.js\").default} replayGroup Replay group.\n   */\n  VectorTile.prototype.setReplayGroup = function setReplayGroup (layer, key, replayGroup) {\n    this.replayGroups_[getUid(layer) + ',' + key] = replayGroup;\n  };\n\n  /**\n   * Set the feature loader for reading this tile's features.\n   * @param {import(\"./featureloader.js\").FeatureLoader} loader Feature loader.\n   * @api\n   */\n  VectorTile.prototype.setLoader = function setLoader (loader) {\n    this.loader_ = loader;\n  };\n\n  return VectorTile;\n}(Tile));\n\nexport default VectorTile;\n\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/source/VectorTile\n */\n\nimport TileState from '../TileState.js';\nimport VectorImageTile, {defaultLoadFunction} from '../VectorImageTile.js';\nimport Tile from '../VectorTile.js';\nimport {toSize} from '../size.js';\nimport UrlTile from './UrlTile.js';\nimport {getKeyZXY} from '../tilecoord.js';\nimport {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=128] Cache size.\n * @property {import(\"../extent.js\").Extent} [extent]\n * @property {import(\"../format/Feature.js\").default} [format] Feature format for tiles. Used and required by the default.\n * @property {boolean} [overlaps=true] This source may have overlapping geometries. Setting this\n * to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {import(\"./State.js\").default} [state] Source state.\n * @property {typeof import(\"../VectorTile.js\").default} [tileClass] Class used to instantiate image tiles.\n * Default is {@link module:ol/VectorTile}.\n * @property {number} [maxZoom=22] Optional max zoom level.\n * @property {number} [minZoom] Optional min zoom level.\n * @property {number|import(\"../size.js\").Size} [tileSize=512] Optional tile size.\n * @property {import(\"../tilegrid/TileGrid.js\").default} [tileGrid] Tile grid.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction]\n * Optional function to load a tile given a URL. Could look like this:\n * ```js\n * function(tile, url) {\n *   tile.setLoader(function() {\n *     var data = // ... fetch data\n *     var format = tile.getFormat();\n *     tile.setProjection(format.readProjection(data));\n *     tile.setFeatures(format.readFeatures(data, {\n *       // featureProjection is not required for ol/format/MVT\n *       featureProjection: map.getView().getProjection()\n *     }));\n *     // the line below is only required for ol/format/MVT\n *     tile.setExtent(format.getLastExtent());\n *   }\n * });\n * ```\n * @property {import(\"../Tile.js\").UrlFunction} [tileUrlFunction] Optional function to get tile URL given a tile coordinate and the projection.\n * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {number} [transition] A duration for tile opacity\n * transitions in milliseconds. A duration of 0 disables the opacity transition.\n * @property {Array<string>} [urls] An array of URL templates.\n * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.\n * When set to `false`, only one world\n * will be rendered. When set to `true`, tiles will be wrapped horizontally to\n * render multiple worlds.\n */\n\n\n/**\n * @classdesc\n * Class for layer sources providing vector data divided into a tile grid, to be\n * used with {@link module:ol/layer/VectorTile~VectorTile}. Although this source receives tiles\n * with vector features from the server, it is not meant for feature editing.\n * Features are optimized for rendering, their geometries are clipped at or near\n * tile boundaries and simplified for a view resolution. See\n * {@link module:ol/source/Vector} for vector sources that are suitable for feature\n * editing.\n *\n * @fires import(\"./Tile.js\").TileSourceEvent\n * @api\n */\nvar VectorTile = /*@__PURE__*/(function (UrlTile) {\n  function VectorTile(options) {\n    var projection = options.projection || 'EPSG:3857';\n\n    var extent = options.extent || extentFromProjection(projection);\n\n    var tileGrid = options.tileGrid || createXYZ({\n      extent: extent,\n      maxZoom: options.maxZoom || 22,\n      minZoom: options.minZoom,\n      tileSize: options.tileSize || 512\n    });\n\n    UrlTile.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,\n      opaque: false,\n      projection: projection,\n      state: options.state,\n      tileGrid: tileGrid,\n      tileLoadFunction: options.tileLoadFunction ? options.tileLoadFunction : defaultLoadFunction,\n      tileUrlFunction: options.tileUrlFunction,\n      url: options.url,\n      urls: options.urls,\n      wrapX: options.wrapX === undefined ? true : options.wrapX,\n      transition: options.transition\n    });\n\n    /**\n     * @private\n     * @type {import(\"../format/Feature.js\").default}\n     */\n    this.format_ = options.format ? options.format : null;\n\n    /**\n       * @private\n       * @type {Object<string, Tile>}\n       */\n    this.sourceTiles_ = {};\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.overlaps_ = options.overlaps == undefined ? true : options.overlaps;\n\n    /**\n     * @protected\n     * @type {typeof import(\"../VectorTile.js\").default}\n     */\n    this.tileClass = options.tileClass ? options.tileClass : Tile;\n\n    /**\n     * @private\n     * @type {Object<string, import(\"../tilegrid/TileGrid.js\").default>}\n     */\n    this.tileGrids_ = {};\n\n  }\n\n  if ( UrlTile ) VectorTile.__proto__ = UrlTile;\n  VectorTile.prototype = Object.create( UrlTile && UrlTile.prototype );\n  VectorTile.prototype.constructor = VectorTile;\n\n  /**\n   * @return {boolean} The source can have overlapping geometries.\n   */\n  VectorTile.prototype.getOverlaps = function getOverlaps () {\n    return this.overlaps_;\n  };\n\n  /**\n   * clear {@link module:ol/TileCache~TileCache} and delete all source tiles\n   * @api\n   */\n  VectorTile.prototype.clear = function clear () {\n    this.tileCache.clear();\n    this.sourceTiles_ = {};\n  };\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.getTile = function getTile (z, x, y, pixelRatio, projection) {\n    var tileCoordKey = getKeyZXY(z, x, y);\n    if (this.tileCache.containsKey(tileCoordKey)) {\n      return (\n        /** @type {!import(\"../Tile.js\").default} */ (this.tileCache.get(tileCoordKey))\n      );\n    } else {\n      var tileCoord = [z, x, y];\n      var urlTileCoord = this.getTileCoordForTileUrlFunction(\n        tileCoord, projection);\n      var tile = new VectorImageTile(\n        tileCoord,\n        urlTileCoord !== null ? TileState.IDLE : TileState.EMPTY,\n        this.getRevision(),\n        this.format_, this.tileLoadFunction, urlTileCoord, this.tileUrlFunction,\n        this.tileGrid, this.getTileGridForProjection(projection),\n        this.sourceTiles_, pixelRatio, projection, this.tileClass,\n        this.handleTileChange.bind(this), tileCoord[0]);\n\n      this.tileCache.set(tileCoordKey, tile);\n      return tile;\n    }\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.getTileGridForProjection = function getTileGridForProjection (projection) {\n    var code = projection.getCode();\n    var tileGrid = this.tileGrids_[code];\n    if (!tileGrid) {\n      // A tile grid that matches the tile size of the source tile grid is more\n      // likely to have 1:1 relationships between source tiles and rendered tiles.\n      var sourceTileGrid = this.tileGrid;\n      tileGrid = this.tileGrids_[code] = createForProjection(projection, undefined,\n        sourceTileGrid ? sourceTileGrid.getTileSize(sourceTileGrid.getMinZoom()) : undefined);\n    }\n    return tileGrid;\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.getTilePixelRatio = function getTilePixelRatio (pixelRatio) {\n    return pixelRatio;\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  VectorTile.prototype.getTilePixelSize = function getTilePixelSize (z, pixelRatio, projection) {\n    var tileGrid = this.getTileGridForProjection(projection);\n    var tileSize = toSize(tileGrid.getTileSize(z), this.tmpSize);\n    return [Math.round(tileSize[0] * pixelRatio), Math.round(tileSize[1] * pixelRatio)];\n  };\n\n  return VectorTile;\n}(UrlTile));\n\n\nexport default VectorTile;\n\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/source/WMTSRequestEncoding\n */\n\n/**\n * Request encoding. One of 'KVP', 'REST'.\n * @enum {string}\n */\nexport default {\n  KVP: 'KVP', // see spec §8\n  REST: 'REST' // see spec §10\n};\n\n//# sourceMappingURL=WMTSRequestEncoding.js.map","/**\n * @module ol/source/WMTS\n */\n\nimport {expandUrl, createFromTileUrlFunctions, nullTileUrlFunction} from '../tileurlfunction.js';\nimport {find, findIndex, includes} from '../array.js';\nimport {containsExtent} from '../extent.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection, equivalent, transformExtent} from '../proj.js';\nimport TileImage from './TileImage.js';\nimport WMTSRequestEncoding from './WMTSRequestEncoding.js';\nimport {createFromCapabilitiesMatrixSet} from '../tilegrid/WMTS.js';\nimport {appendParams} from '../uri.js';\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../tilegrid/WMTS.js\").default} tileGrid Tile grid.\n * @property {import(\"../proj.js\").ProjectionLike} projection Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {import(\"./WMTSRequestEncoding.js\").default|string} [requestEncoding='KVP'] Request encoding.\n * @property {string} layer Layer name as advertised in the WMTS capabilities.\n * @property {string} style Style name as advertised in the WMTS capabilities.\n * @property {typeof import(\"../ImageTile.js\").default} [tileClass]  Class used to instantiate image tiles. Default is {@link module:ol/ImageTile~ImageTile}.\n * @property {number} [tilePixelRatio=1] The pixel ratio used by the tile service.\n * For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px\n * by 512px images (for retina/hidpi devices) then `tilePixelRatio`\n * should be set to `2`.\n * @property {string} [format='image/jpeg'] Image format. Only used when `requestEncoding` is `'KVP'`.\n * @property {string} [version='1.0.0'] WMTS version.\n * @property {string} matrixSet Matrix set.\n * @property {!Object} [dimensions] Additional \"dimensions\" for tile requests.\n * This is an object with properties named like the advertised WMTS dimensions.\n * @property {string} [url]  A URL for the service.\n * For the RESTful request encoding, this is a URL\n * template.  For KVP encoding, it is normal URL. A `{?-?}` template pattern,\n * for example `subdomain{a-f}.domain.com`, may be used instead of defining\n * each one separately in the `urls` option.\n * @property {import(\"../Tile.js\").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is\n * ```js\n * function(imageTile, src) {\n *   imageTile.getImage().src = src;\n * };\n * ```\n * @property {Array<string>} [urls] An array of URLs.\n * Requests will be distributed among the URLs in this array.\n * @property {boolean} [wrapX=false] Whether to wrap the world horizontally.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data from WMTS servers.\n * @api\n */\nvar WMTS = /*@__PURE__*/(function (TileImage) {\n  function WMTS(options) {\n\n    // TODO: add support for TileMatrixLimits\n\n    var requestEncoding = options.requestEncoding !== undefined ?\n      /** @type {import(\"./WMTSRequestEncoding.js\").default} */ (options.requestEncoding) :\n      WMTSRequestEncoding.KVP;\n\n    // FIXME: should we create a default tileGrid?\n    // we could issue a getCapabilities xhr to retrieve missing configuration\n    var tileGrid = options.tileGrid;\n\n    var urls = options.urls;\n    if (urls === undefined && options.url !== undefined) {\n      urls = expandUrl(options.url);\n    }\n\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      projection: options.projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileClass: options.tileClass,\n      tileGrid: tileGrid,\n      tileLoadFunction: options.tileLoadFunction,\n      tilePixelRatio: options.tilePixelRatio,\n      tileUrlFunction: nullTileUrlFunction,\n      urls: urls,\n      wrapX: options.wrapX !== undefined ? options.wrapX : false,\n      transition: options.transition\n    });\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.version_ = options.version !== undefined ? options.version : '1.0.0';\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.format_ = options.format !== undefined ? options.format : 'image/jpeg';\n\n    /**\n     * @private\n     * @type {!Object}\n     */\n    this.dimensions_ = options.dimensions !== undefined ? options.dimensions : {};\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.layer_ = options.layer;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.matrixSet_ = options.matrixSet;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.style_ = options.style;\n\n    // FIXME: should we guess this requestEncoding from options.url(s)\n    //        structure? that would mean KVP only if a template is not provided.\n\n    /**\n     * @private\n     * @type {import(\"./WMTSRequestEncoding.js\").default}\n     */\n    this.requestEncoding_ = requestEncoding;\n\n    this.setKey(this.getKeyForDimensions_());\n\n    if (urls && urls.length > 0) {\n      this.tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromWMTSTemplate.bind(this)));\n    }\n\n  }\n\n  if ( TileImage ) WMTS.__proto__ = TileImage;\n  WMTS.prototype = Object.create( TileImage && TileImage.prototype );\n  WMTS.prototype.constructor = WMTS;\n\n  /**\n   * Set the URLs to use for requests.\n   * URLs may contain OCG conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.\n   * @override\n   */\n  WMTS.prototype.setUrls = function setUrls (urls) {\n    this.urls = urls;\n    var key = urls.join('\\n');\n    this.setTileUrlFunction(createFromTileUrlFunctions(urls.map(createFromWMTSTemplate.bind(this))), key);\n  };\n\n  /**\n   * Get the dimensions, i.e. those passed to the constructor through the\n   * \"dimensions\" option, and possibly updated using the updateDimensions\n   * method.\n   * @return {!Object} Dimensions.\n   * @api\n   */\n  WMTS.prototype.getDimensions = function getDimensions () {\n    return this.dimensions_;\n  };\n\n\n  /**\n   * Return the image format of the WMTS source.\n   * @return {string} Format.\n   * @api\n   */\n  WMTS.prototype.getFormat = function getFormat () {\n    return this.format_;\n  };\n\n\n  /**\n   * Return the layer of the WMTS source.\n   * @return {string} Layer.\n   * @api\n   */\n  WMTS.prototype.getLayer = function getLayer () {\n    return this.layer_;\n  };\n\n\n  /**\n   * Return the matrix set of the WMTS source.\n   * @return {string} MatrixSet.\n   * @api\n   */\n  WMTS.prototype.getMatrixSet = function getMatrixSet () {\n    return this.matrixSet_;\n  };\n\n\n  /**\n   * Return the request encoding, either \"KVP\" or \"REST\".\n   * @return {import(\"./WMTSRequestEncoding.js\").default} Request encoding.\n   * @api\n   */\n  WMTS.prototype.getRequestEncoding = function getRequestEncoding () {\n    return this.requestEncoding_;\n  };\n\n\n  /**\n   * Return the style of the WMTS source.\n   * @return {string} Style.\n   * @api\n   */\n  WMTS.prototype.getStyle = function getStyle () {\n    return this.style_;\n  };\n\n\n  /**\n   * Return the version of the WMTS source.\n   * @return {string} Version.\n   * @api\n   */\n  WMTS.prototype.getVersion = function getVersion () {\n    return this.version_;\n  };\n\n\n  /**\n   * @private\n   * @return {string} The key for the current dimensions.\n   */\n  WMTS.prototype.getKeyForDimensions_ = function getKeyForDimensions_ () {\n    var i = 0;\n    var res = [];\n    for (var key in this.dimensions_) {\n      res[i++] = key + '-' + this.dimensions_[key];\n    }\n    return res.join('/');\n  };\n\n\n  /**\n   * Update the dimensions.\n   * @param {Object} dimensions Dimensions.\n   * @api\n   */\n  WMTS.prototype.updateDimensions = function updateDimensions (dimensions) {\n    assign(this.dimensions_, dimensions);\n    this.setKey(this.getKeyForDimensions_());\n  };\n\n  return WMTS;\n}(TileImage));\n\nexport default WMTS;\n\n/**\n * Generate source options from a capabilities object.\n * @param {Object} wmtsCap An object representing the capabilities document.\n * @param {!Object} config Configuration properties for the layer.  Defaults for\n *                  the layer will apply if not provided.\n *\n * Required config properties:\n *  - layer - {string} The layer identifier.\n *\n * Optional config properties:\n *  - matrixSet - {string} The matrix set identifier, required if there is\n *       more than one matrix set in the layer capabilities.\n *  - projection - {string} The desired CRS when no matrixSet is specified.\n *       eg: \"EPSG:3857\". If the desired projection is not available,\n *       an error is thrown.\n *  - requestEncoding - {string} url encoding format for the layer. Default is\n *       the first tile url format found in the GetCapabilities response.\n *  - style - {string} The name of the style\n *  - format - {string} Image format for the layer. Default is the first\n *       format returned in the GetCapabilities response.\n *  - crossOrigin - {string|null|undefined} Cross origin. Default is `undefined`.\n * @return {?Options} WMTS source options object or `null` if the layer was not found.\n * @api\n */\nexport function optionsFromCapabilities(wmtsCap, config) {\n  var layers = wmtsCap['Contents']['Layer'];\n  var l = find(layers, function(elt, index, array) {\n    return elt['Identifier'] == config['layer'];\n  });\n  if (l === null) {\n    return null;\n  }\n  var tileMatrixSets = wmtsCap['Contents']['TileMatrixSet'];\n  var idx;\n  if (l['TileMatrixSetLink'].length > 1) {\n    if ('projection' in config) {\n      idx = findIndex(l['TileMatrixSetLink'],\n        function(elt, index, array) {\n          var tileMatrixSet = find(tileMatrixSets, function(el) {\n            return el['Identifier'] == elt['TileMatrixSet'];\n          });\n          var supportedCRS = tileMatrixSet['SupportedCRS'];\n          var proj1 = getProjection(supportedCRS.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) ||\n                getProjection(supportedCRS);\n          var proj2 = getProjection(config['projection']);\n          if (proj1 && proj2) {\n            return equivalent(proj1, proj2);\n          } else {\n            return supportedCRS == config['projection'];\n          }\n        });\n    } else {\n      idx = findIndex(l['TileMatrixSetLink'],\n        function(elt, index, array) {\n          return elt['TileMatrixSet'] == config['matrixSet'];\n        });\n    }\n  } else {\n    idx = 0;\n  }\n  if (idx < 0) {\n    idx = 0;\n  }\n  var matrixSet = /** @type {string} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSet']);\n  var matrixLimits = /** @type {Array<Object>} */\n    (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']);\n\n  var format = /** @type {string} */ (l['Format'][0]);\n  if ('format' in config) {\n    format = config['format'];\n  }\n  idx = findIndex(l['Style'], function(elt, index, array) {\n    if ('style' in config) {\n      return elt['Title'] == config['style'];\n    } else {\n      return elt['isDefault'];\n    }\n  });\n  if (idx < 0) {\n    idx = 0;\n  }\n  var style = /** @type {string} */ (l['Style'][idx]['Identifier']);\n\n  var dimensions = {};\n  if ('Dimension' in l) {\n    l['Dimension'].forEach(function(elt, index, array) {\n      var key = elt['Identifier'];\n      var value = elt['Default'];\n      if (value === undefined) {\n        value = elt['Value'][0];\n      }\n      dimensions[key] = value;\n    });\n  }\n\n  var matrixSets = wmtsCap['Contents']['TileMatrixSet'];\n  var matrixSetObj = find(matrixSets, function(elt, index, array) {\n    return elt['Identifier'] == matrixSet;\n  });\n\n  var projection;\n  var code = matrixSetObj['SupportedCRS'];\n  if (code) {\n    projection = getProjection(code.replace(/urn:ogc:def:crs:(\\w+):(.*:)?(\\w+)$/, '$1:$3')) ||\n        getProjection(code);\n  }\n  if ('projection' in config) {\n    var projConfig = getProjection(config['projection']);\n    if (projConfig) {\n      if (!projection || equivalent(projConfig, projection)) {\n        projection = projConfig;\n      }\n    }\n  }\n\n  var wgs84BoundingBox = l['WGS84BoundingBox'];\n  var extent, wrapX;\n  if (wgs84BoundingBox !== undefined) {\n    var wgs84ProjectionExtent = getProjection('EPSG:4326').getExtent();\n    wrapX = (wgs84BoundingBox[0] == wgs84ProjectionExtent[0] &&\n        wgs84BoundingBox[2] == wgs84ProjectionExtent[2]);\n    extent = transformExtent(\n      wgs84BoundingBox, 'EPSG:4326', projection);\n    var projectionExtent = projection.getExtent();\n    if (projectionExtent) {\n      // If possible, do a sanity check on the extent - it should never be\n      // bigger than the validity extent of the projection of a matrix set.\n      if (!containsExtent(projectionExtent, extent)) {\n        extent = undefined;\n      }\n    }\n  }\n\n  var tileGrid = createFromCapabilitiesMatrixSet(matrixSetObj, extent, matrixLimits);\n\n  /** @type {!Array<string>} */\n  var urls = [];\n  var requestEncoding = config['requestEncoding'];\n  requestEncoding = requestEncoding !== undefined ? requestEncoding : '';\n\n  if ('OperationsMetadata' in wmtsCap && 'GetTile' in wmtsCap['OperationsMetadata']) {\n    var gets = wmtsCap['OperationsMetadata']['GetTile']['DCP']['HTTP']['Get'];\n\n    for (var i = 0, ii = gets.length; i < ii; ++i) {\n      if (gets[i]['Constraint']) {\n        var constraint = find(gets[i]['Constraint'], function(element) {\n          return element['name'] == 'GetEncoding';\n        });\n        var encodings = constraint['AllowedValues']['Value'];\n\n        if (requestEncoding === '') {\n          // requestEncoding not provided, use the first encoding from the list\n          requestEncoding = encodings[0];\n        }\n        if (requestEncoding === WMTSRequestEncoding.KVP) {\n          if (includes(encodings, WMTSRequestEncoding.KVP)) {\n            urls.push(/** @type {string} */ (gets[i]['href']));\n          }\n        } else {\n          break;\n        }\n      } else if (gets[i]['href']) {\n        requestEncoding = WMTSRequestEncoding.KVP;\n        urls.push(/** @type {string} */ (gets[i]['href']));\n      }\n    }\n  }\n  if (urls.length === 0) {\n    requestEncoding = WMTSRequestEncoding.REST;\n    l['ResourceURL'].forEach(function(element) {\n      if (element['resourceType'] === 'tile') {\n        format = element['format'];\n        urls.push(/** @type {string} */ (element['template']));\n      }\n    });\n  }\n\n  return {\n    urls: urls,\n    layer: config['layer'],\n    matrixSet: matrixSet,\n    format: format,\n    projection: projection,\n    requestEncoding: requestEncoding,\n    tileGrid: tileGrid,\n    style: style,\n    dimensions: dimensions,\n    wrapX: wrapX,\n    crossOrigin: config['crossOrigin']\n  };\n}\n\n/**\n * @param {string} template Template.\n * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n * @this {WMTS}\n */\nfunction createFromWMTSTemplate(template) {\n  var requestEncoding = this.requestEncoding_;\n\n  // context property names are lower case to allow for a case insensitive\n  // replacement as some services use different naming conventions\n  var context = {\n    'layer': this.layer_,\n    'style': this.style_,\n    'tilematrixset': this.matrixSet_\n  };\n\n  if (requestEncoding == WMTSRequestEncoding.KVP) {\n    assign(context, {\n      'Service': 'WMTS',\n      'Request': 'GetTile',\n      'Version': this.version_,\n      'Format': this.format_\n    });\n  }\n\n  // TODO: we may want to create our own appendParams function so that params\n  // order conforms to wmts spec guidance, and so that we can avoid to escape\n  // special template params\n\n  template = (requestEncoding == WMTSRequestEncoding.KVP) ?\n    appendParams(template, context) :\n    template.replace(/\\{(\\w+?)\\}/g, function(m, p) {\n      return (p.toLowerCase() in context) ? context[p.toLowerCase()] : m;\n    });\n\n  var tileGrid = /** @type {import(\"../tilegrid/WMTS.js\").default} */ (\n    this.tileGrid);\n  var dimensions = this.dimensions_;\n\n  return (\n    /**\n     * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile coordinate.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection.\n     * @return {string|undefined} Tile URL.\n     */\n    function(tileCoord, pixelRatio, projection) {\n      if (!tileCoord) {\n        return undefined;\n      } else {\n        var localContext = {\n          'TileMatrix': tileGrid.getMatrixId(tileCoord[0]),\n          'TileCol': tileCoord[1],\n          'TileRow': -tileCoord[2] - 1\n        };\n        assign(localContext, dimensions);\n        var url = template;\n        if (requestEncoding == WMTSRequestEncoding.KVP) {\n          url = appendParams(url, localContext);\n        } else {\n          url = url.replace(/\\{(\\w+?)\\}/g, function(m, p) {\n            return localContext[p];\n          });\n        }\n        return url;\n      }\n    }\n  );\n}\n\n//# sourceMappingURL=WMTS.js.map","/**\n * @module ol/source/Zoomify\n */\nimport {DEFAULT_TILE_SIZE} from '../tilegrid/common.js';\n\nimport ImageTile from '../ImageTile.js';\nimport TileState from '../TileState.js';\nimport {expandUrl, createFromTileUrlFunctions} from '../tileurlfunction.js';\nimport {assert} from '../asserts.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport {getTopLeft} from '../extent.js';\nimport {toSize} from '../size.js';\nimport TileImage from './TileImage.js';\nimport TileGrid from '../tilegrid/TileGrid.js';\n\n\n/**\n * @enum {string}\n */\nvar TierSizeCalculation = {\n  DEFAULT: 'default',\n  TRUNCATED: 'truncated'\n};\n\n\nexport var CustomTile = /*@__PURE__*/(function (ImageTile) {\n  function CustomTile(tileGrid, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {\n\n    ImageTile.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);\n\n    /**\n     * @private\n     * @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement}\n     */\n    this.zoomifyImage_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../size.js\").Size}\n     */\n    this.tileSize_ = toSize(tileGrid.getTileSize(tileCoord[0]));\n\n  }\n\n  if ( ImageTile ) CustomTile.__proto__ = ImageTile;\n  CustomTile.prototype = Object.create( ImageTile && ImageTile.prototype );\n  CustomTile.prototype.constructor = CustomTile;\n\n  /**\n   * @inheritDoc\n   */\n  CustomTile.prototype.getImage = function getImage () {\n    if (this.zoomifyImage_) {\n      return this.zoomifyImage_;\n    }\n    var image = ImageTile.prototype.getImage.call(this);\n    if (this.state == TileState.LOADED) {\n      var tileSize = this.tileSize_;\n      if (image.width == tileSize[0] && image.height == tileSize[1]) {\n        this.zoomifyImage_ = image;\n        return image;\n      } else {\n        var context = createCanvasContext2D(tileSize[0], tileSize[1]);\n        context.drawImage(image, 0, 0);\n        this.zoomifyImage_ = context.canvas;\n        return context.canvas;\n      }\n    } else {\n      return image;\n    }\n  };\n\n  return CustomTile;\n}(ImageTile));\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {number} [cacheSize=2048] Cache size.\n * @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.  Note that\n * you must provide a `crossOrigin` value if you are using the WebGL renderer or if you want to\n * access pixel data with the Canvas renderer.  See\n * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection.\n * @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).\n * Higher values can increase reprojection performance, but decrease precision.\n * @property {string} [url] URL template or base URL of the Zoomify service.\n * A base URL is the fixed part\n * of the URL, excluding the tile group, z, x, and y folder structure, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/`. A URL template must include\n * `{TileGroup}`, `{x}`, `{y}`, and `{z}` placeholders, e.g.\n * `http://my.zoomify.info/IMAGE.TIF/{TileGroup}/{z}-{x}-{y}.jpg`.\n * Internet Imaging Protocol (IIP) with JTL extension can be also used with\n * `{tileIndex}` and `{z}` placeholders, e.g.\n * `http://my.zoomify.info?FIF=IMAGE.TIF&JTL={z},{tileIndex}`.\n * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be\n * used instead of defining each one separately in the `urls` option.\n * @property {string} [tierSizeCalculation] Tier size calculation method: `default` or `truncated`.\n * @property {import(\"../size.js\").Size} [size] Size of the image.\n * @property {import(\"../extent.js\").Extent} [extent] Extent for the TileGrid that is created.\n * Default sets the TileGrid in the\n * fourth quadrant, meaning extent is `[0, -height, width, 0]`. To change the\n * extent to the first quadrant (the default for OpenLayers 2) set the extent\n * as `[0, 0, width, height]`.\n * @property {number} [transition] Duration of the opacity transition for rendering.\n * To disable the opacity transition, pass `transition: 0`.\n * @property {number} [tileSize=256] Tile size. Same tile size is used for all zoom levels.\n */\n\n\n/**\n * @classdesc\n * Layer source for tile data in Zoomify format (both Zoomify and Internet\n * Imaging Protocol are supported).\n * @api\n */\nvar Zoomify = /*@__PURE__*/(function (TileImage) {\n  function Zoomify(opt_options) {\n\n    var options = opt_options || {};\n\n    var size = options.size;\n    var tierSizeCalculation = options.tierSizeCalculation !== undefined ?\n      options.tierSizeCalculation :\n      TierSizeCalculation.DEFAULT;\n\n    var imageWidth = size[0];\n    var imageHeight = size[1];\n    var extent = options.extent || [0, -size[1], size[0], 0];\n    var tierSizeInTiles = [];\n    var tileSize = options.tileSize || DEFAULT_TILE_SIZE;\n    var tileSizeForTierSizeCalculation = tileSize;\n\n    switch (tierSizeCalculation) {\n      case TierSizeCalculation.DEFAULT:\n        while (imageWidth > tileSizeForTierSizeCalculation || imageHeight > tileSizeForTierSizeCalculation) {\n          tierSizeInTiles.push([\n            Math.ceil(imageWidth / tileSizeForTierSizeCalculation),\n            Math.ceil(imageHeight / tileSizeForTierSizeCalculation)\n          ]);\n          tileSizeForTierSizeCalculation += tileSizeForTierSizeCalculation;\n        }\n        break;\n      case TierSizeCalculation.TRUNCATED:\n        var width = imageWidth;\n        var height = imageHeight;\n        while (width > tileSizeForTierSizeCalculation || height > tileSizeForTierSizeCalculation) {\n          tierSizeInTiles.push([\n            Math.ceil(width / tileSizeForTierSizeCalculation),\n            Math.ceil(height / tileSizeForTierSizeCalculation)\n          ]);\n          width >>= 1;\n          height >>= 1;\n        }\n        break;\n      default:\n        assert(false, 53); // Unknown `tierSizeCalculation` configured\n        break;\n    }\n\n    tierSizeInTiles.push([1, 1]);\n    tierSizeInTiles.reverse();\n\n    var resolutions = [1];\n    var tileCountUpToTier = [0];\n    for (var i = 1, ii = tierSizeInTiles.length; i < ii; i++) {\n      resolutions.push(1 << i);\n      tileCountUpToTier.push(\n        tierSizeInTiles[i - 1][0] * tierSizeInTiles[i - 1][1] +\n          tileCountUpToTier[i - 1]\n      );\n    }\n    resolutions.reverse();\n\n    var tileGrid = new TileGrid({\n      tileSize: tileSize,\n      extent: extent,\n      origin: getTopLeft(extent),\n      resolutions: resolutions\n    });\n\n    var url = options.url;\n    if (url && url.indexOf('{TileGroup}') == -1 && url.indexOf('{tileIndex}') == -1) {\n      url += '{TileGroup}/{z}-{x}-{y}.jpg';\n    }\n    var urls = expandUrl(url);\n\n    /**\n     * @param {string} template Template.\n     * @return {import(\"../Tile.js\").UrlFunction} Tile URL function.\n     */\n    function createFromTemplate(template) {\n\n      return (\n        /**\n         * @param {import(\"../tilecoord.js\").TileCoord} tileCoord Tile Coordinate.\n         * @param {number} pixelRatio Pixel ratio.\n         * @param {import(\"../proj/Projection.js\").default} projection Projection.\n         * @return {string|undefined} Tile URL.\n         */\n        function(tileCoord, pixelRatio, projection) {\n          if (!tileCoord) {\n            return undefined;\n          } else {\n            var tileCoordZ = tileCoord[0];\n            var tileCoordX = tileCoord[1];\n            var tileCoordY = -tileCoord[2] - 1;\n            var tileIndex =\n                tileCoordX +\n                tileCoordY * tierSizeInTiles[tileCoordZ][0];\n            var tileSize = tileGrid.getTileSize(tileCoordZ);\n            var tileWidth = Array.isArray(tileSize) ? tileSize[0] : tileSize;\n            var tileGroup = ((tileIndex + tileCountUpToTier[tileCoordZ]) / tileWidth) | 0;\n            var localContext = {\n              'z': tileCoordZ,\n              'x': tileCoordX,\n              'y': tileCoordY,\n              'tileIndex': tileIndex,\n              'TileGroup': 'TileGroup' + tileGroup\n            };\n            return template.replace(/\\{(\\w+?)\\}/g, function(m, p) {\n              return localContext[p];\n            });\n          }\n        }\n      );\n    }\n\n    var tileUrlFunction = createFromTileUrlFunctions(urls.map(createFromTemplate));\n\n    var ZoomifyTileClass = CustomTile.bind(null, tileGrid);\n\n    TileImage.call(this, {\n      attributions: options.attributions,\n      cacheSize: options.cacheSize,\n      crossOrigin: options.crossOrigin,\n      projection: options.projection,\n      reprojectionErrorThreshold: options.reprojectionErrorThreshold,\n      tileClass: ZoomifyTileClass,\n      tileGrid: tileGrid,\n      tileUrlFunction: tileUrlFunction,\n      transition: options.transition\n    });\n\n  }\n\n  if ( TileImage ) Zoomify.__proto__ = TileImage;\n  Zoomify.prototype = Object.create( TileImage && TileImage.prototype );\n  Zoomify.prototype.constructor = Zoomify;\n\n  return Zoomify;\n}(TileImage));\n\nexport default Zoomify;\n\n//# sourceMappingURL=Zoomify.js.map","/**\n * @module ol/layer/Vector\n */\nimport LayerType from '../LayerType.js';\nimport Layer from './Layer.js';\nimport VectorRenderType from './VectorRenderType.js';\nimport {assign} from '../obj.js';\nimport {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {import(\"./VectorRenderType.js\").default|string} [renderMode='vector'] Render mode for vector layers:\n *  * `'image'`: Vector layers are rendered as images. Great performance, but point symbols and\n *    texts are always rotated with the view and pixels are scaled during zoom animations.\n *  * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during\n *    animations, but slower performance.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles, and the priority is defined by the z-index of the style. Lower z-index\n * means higher priority.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true` and `renderMode`\n * is `vector`, feature batches will be recreated during animations. This means that no\n * vectors will be shown clipped, but the setting will have a performance impact for large\n * amounts of vector data. When set to `false`, batches will be recreated when no animation\n * is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true` and `renderMode`\n * is `vector`, feature batches will be recreated during interactions. See also\n * `updateWhileAnimating`.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n  RENDER_ORDER: 'renderOrder'\n};\n\n\n/**\n * @classdesc\n * Vector data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @api\n */\nvar VectorLayer = /*@__PURE__*/(function (Layer) {\n  function VectorLayer(opt_options) {\n    var options = opt_options ?\n      opt_options : /** @type {Options} */ ({});\n\n    var baseOptions = assign({}, options);\n\n    delete baseOptions.style;\n    delete baseOptions.renderBuffer;\n    delete baseOptions.updateWhileAnimating;\n    delete baseOptions.updateWhileInteracting;\n    Layer.call(this, baseOptions);\n\n    /**\n    * @private\n    * @type {boolean}\n    */\n    this.declutter_ = options.declutter !== undefined ? options.declutter : false;\n\n    /**\n    * @type {number}\n    * @private\n    */\n    this.renderBuffer_ = options.renderBuffer !== undefined ?\n      options.renderBuffer : 100;\n\n    /**\n    * User provided style.\n    * @type {import(\"../style/Style.js\").StyleLike}\n    * @private\n    */\n    this.style_ = null;\n\n    /**\n    * Style function for use within the library.\n    * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n    * @private\n    */\n    this.styleFunction_ = undefined;\n\n    this.setStyle(options.style);\n\n    /**\n    * @type {boolean}\n    * @private\n    */\n    this.updateWhileAnimating_ = options.updateWhileAnimating !== undefined ?\n      options.updateWhileAnimating : false;\n\n    /**\n    * @type {boolean}\n    * @private\n    */\n    this.updateWhileInteracting_ = options.updateWhileInteracting !== undefined ?\n      options.updateWhileInteracting : false;\n\n    /**\n    * @private\n    * @type {import(\"./VectorTileRenderType.js\").default|string}\n    */\n    this.renderMode_ = options.renderMode || VectorRenderType.VECTOR;\n\n    /**\n    * The layer type.\n    * @protected\n    * @type {import(\"../LayerType.js\").default}\n    */\n    this.type = LayerType.VECTOR;\n\n  }\n\n  if ( Layer ) VectorLayer.__proto__ = Layer;\n  VectorLayer.prototype = Object.create( Layer && Layer.prototype );\n  VectorLayer.prototype.constructor = VectorLayer;\n\n  /**\n  * @return {boolean} Declutter.\n  */\n  VectorLayer.prototype.getDeclutter = function getDeclutter () {\n    return this.declutter_;\n  };\n\n  /**\n  * @param {boolean} declutter Declutter.\n  */\n  VectorLayer.prototype.setDeclutter = function setDeclutter (declutter) {\n    this.declutter_ = declutter;\n  };\n\n  /**\n  * @return {number|undefined} Render buffer.\n  */\n  VectorLayer.prototype.getRenderBuffer = function getRenderBuffer () {\n    return this.renderBuffer_;\n  };\n\n  /**\n  * @return {function(import(\"../Feature.js\").default, import(\"../Feature.js\").default): number|null|undefined} Render\n  *     order.\n  */\n  VectorLayer.prototype.getRenderOrder = function getRenderOrder () {\n    return (\n    /** @type {import(\"../render.js\").OrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER))\n    );\n  };\n\n  /**\n  * Get the style for features.  This returns whatever was passed to the `style`\n  * option at construction or to the `setStyle` method.\n  * @return {import(\"../style/Style.js\").StyleLike}\n  *     Layer style.\n  * @api\n  */\n  VectorLayer.prototype.getStyle = function getStyle () {\n    return this.style_;\n  };\n\n  /**\n  * Get the style function.\n  * @return {import(\"../style/Style.js\").StyleFunction|undefined} Layer style function.\n  * @api\n  */\n  VectorLayer.prototype.getStyleFunction = function getStyleFunction () {\n    return this.styleFunction_;\n  };\n\n  /**\n  * @return {boolean} Whether the rendered layer should be updated while\n  *     animating.\n  */\n  VectorLayer.prototype.getUpdateWhileAnimating = function getUpdateWhileAnimating () {\n    return this.updateWhileAnimating_;\n  };\n\n  /**\n  * @return {boolean} Whether the rendered layer should be updated while\n  *     interacting.\n  */\n  VectorLayer.prototype.getUpdateWhileInteracting = function getUpdateWhileInteracting () {\n    return this.updateWhileInteracting_;\n  };\n\n  /**\n  * @param {import(\"../render.js\").OrderFunction|null|undefined} renderOrder\n  *     Render order.\n  */\n  VectorLayer.prototype.setRenderOrder = function setRenderOrder (renderOrder) {\n    this.set(Property.RENDER_ORDER, renderOrder);\n  };\n\n  /**\n  * Set the style for features.  This can be a single style object, an array\n  * of styles, or a function that takes a feature and resolution and returns\n  * an array of styles. If it is `undefined` the default style is used. If\n  * it is `null` the layer has no style (a `null` style), so only features\n  * that have their own styles will be rendered in the layer. See\n  * {@link module:ol/style} for information on the default style.\n  * @param {import(\"../style/Style.js\").default|Array<import(\"../style/Style.js\").default>|import(\"../style/Style.js\").StyleFunction|null|undefined} style Layer style.\n  * @api\n  */\n  VectorLayer.prototype.setStyle = function setStyle (style) {\n    this.style_ = style !== undefined ? style : createDefaultStyle;\n    this.styleFunction_ = style === null ?\n      undefined : toStyleFunction(this.style_);\n    this.changed();\n  };\n\n  /**\n  * @return {import(\"./VectorRenderType.js\").default|string} The render mode.\n  */\n  VectorLayer.prototype.getRenderMode = function getRenderMode () {\n    return this.renderMode_;\n  };\n\n  return VectorLayer;\n}(Layer));\n\n\n/**\n * Return the associated {@link module:ol/source/Vector vectorsource} of the layer.\n * @function\n * @return {import(\"../source/Vector.js\").default} Source.\n * @api\n */\nVectorLayer.prototype.getSource;\n\n\nexport default VectorLayer;\n\n//# sourceMappingURL=Vector.js.map","/**\n * @module ol/layer/Heatmap\n */\nimport {listen} from '../events.js';\nimport {getChangeEventType} from '../Object.js';\nimport {createCanvasContext2D} from '../dom.js';\nimport VectorLayer from './Vector.js';\nimport {clamp} from '../math.js';\nimport {assign} from '../obj.js';\nimport RenderEventType from '../render/EventType.js';\nimport Icon from '../style/Icon.js';\nimport Style from '../style/Style.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient\n * of the heatmap, specified as an array of CSS color strings.\n * @property {number} [radius=8] Radius size in pixels.\n * @property {number} [blur=15] Blur size in pixels.\n * @property {number} [shadow=250] Shadow size in pixels.\n * @property {string|function(import(\"../Feature.js\").default):number} [weight='weight'] The feature\n * attribute to use for the weight or a function that returns a weight from a feature. Weight values\n * should range from 0 to 1 (and values outside will be clamped to that range).\n * @property {import(\"./VectorRenderType.js\").default|string} [renderMode='vector'] Render mode for vector layers:\n *  * `'image'`: Vector layers are rendered as images. Great performance, but point symbols and\n *    texts are always rotated with the view and pixels are scaled during zoom animations.\n *  * `'vector'`: Vector layers are rendered as vectors. Most accurate rendering even during\n *    animations, but slower performance.\n * @property {import(\"../source/Vector.js\").default} [source] Source.\n */\n\n\n/**\n * @enum {string}\n * @private\n */\nvar Property = {\n  BLUR: 'blur',\n  GRADIENT: 'gradient',\n  RADIUS: 'radius'\n};\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];\n\n\n/**\n * @classdesc\n * Layer for rendering vector data as a heatmap.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @fires import(\"../render/Event.js\").RenderEvent\n * @api\n */\nvar Heatmap = /*@__PURE__*/(function (VectorLayer) {\n  function Heatmap(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    var baseOptions = assign({}, options);\n\n    delete baseOptions.gradient;\n    delete baseOptions.radius;\n    delete baseOptions.blur;\n    delete baseOptions.shadow;\n    delete baseOptions.weight;\n    VectorLayer.call(this, baseOptions);\n\n    /**\n     * @private\n     * @type {Uint8ClampedArray}\n     */\n    this.gradient_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.shadow_ = options.shadow !== undefined ? options.shadow : 250;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.circleImage_ = undefined;\n\n    /**\n     * @private\n     * @type {Array<Array<import(\"../style/Style.js\").default>>}\n     */\n    this.styleCache_ = null;\n\n    listen(this,\n      getChangeEventType(Property.GRADIENT),\n      this.handleGradientChanged_, this);\n\n    this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);\n\n    this.setBlur(options.blur !== undefined ? options.blur : 15);\n\n    this.setRadius(options.radius !== undefined ? options.radius : 8);\n\n    listen(this,\n      getChangeEventType(Property.BLUR),\n      this.handleStyleChanged_, this);\n    listen(this,\n      getChangeEventType(Property.RADIUS),\n      this.handleStyleChanged_, this);\n\n    this.handleStyleChanged_();\n\n    var weight = options.weight ? options.weight : 'weight';\n    var weightFunction;\n    if (typeof weight === 'string') {\n      weightFunction = function(feature) {\n        return feature.get(weight);\n      };\n    } else {\n      weightFunction = weight;\n    }\n\n    this.setStyle(function(feature, resolution) {\n      var weight = weightFunction(feature);\n      var opacity = weight !== undefined ? clamp(weight, 0, 1) : 1;\n      // cast to 8 bits\n      var index = (255 * opacity) | 0;\n      var style = this.styleCache_[index];\n      if (!style) {\n        style = [\n          new Style({\n            image: new Icon({\n              opacity: opacity,\n              src: this.circleImage_\n            })\n          })\n        ];\n        this.styleCache_[index] = style;\n      }\n      return style;\n    }.bind(this));\n\n    // For performance reasons, don't sort the features before rendering.\n    // The render order is not relevant for a heatmap representation.\n    this.setRenderOrder(null);\n\n    listen(this, RenderEventType.RENDER, this.handleRender_, this);\n  }\n\n  if ( VectorLayer ) Heatmap.__proto__ = VectorLayer;\n  Heatmap.prototype = Object.create( VectorLayer && VectorLayer.prototype );\n  Heatmap.prototype.constructor = Heatmap;\n\n  /**\n   * @return {string} Data URL for a circle.\n   * @private\n   */\n  Heatmap.prototype.createCircle_ = function createCircle_ () {\n    var radius = this.getRadius();\n    var blur = this.getBlur();\n    var halfSize = radius + blur + 1;\n    var size = 2 * halfSize;\n    var context = createCanvasContext2D(size, size);\n    context.shadowOffsetX = context.shadowOffsetY = this.shadow_;\n    context.shadowBlur = blur;\n    context.shadowColor = '#000';\n    context.beginPath();\n    var center = halfSize - this.shadow_;\n    context.arc(center, center, radius, 0, Math.PI * 2, true);\n    context.fill();\n    return context.canvas.toDataURL();\n  };\n\n  /**\n   * Return the blur size in pixels.\n   * @return {number} Blur size in pixels.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.getBlur = function getBlur () {\n    return /** @type {number} */ (this.get(Property.BLUR));\n  };\n\n  /**\n   * Return the gradient colors as array of strings.\n   * @return {Array<string>} Colors.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.getGradient = function getGradient () {\n    return /** @type {Array<string>} */ (this.get(Property.GRADIENT));\n  };\n\n  /**\n   * Return the size of the radius in pixels.\n   * @return {number} Radius size in pixel.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.getRadius = function getRadius () {\n    return /** @type {number} */ (this.get(Property.RADIUS));\n  };\n\n  /**\n   * @private\n   */\n  Heatmap.prototype.handleGradientChanged_ = function handleGradientChanged_ () {\n    this.gradient_ = createGradient(this.getGradient());\n  };\n\n  /**\n   * @private\n   */\n  Heatmap.prototype.handleStyleChanged_ = function handleStyleChanged_ () {\n    this.circleImage_ = this.createCircle_();\n    this.styleCache_ = new Array(256);\n    this.changed();\n  };\n\n  /**\n   * @param {import(\"../render/Event.js\").default} event Post compose event\n   * @private\n   */\n  Heatmap.prototype.handleRender_ = function handleRender_ (event) {\n    var context = event.context;\n    var canvas = context.canvas;\n    var image = context.getImageData(0, 0, canvas.width, canvas.height);\n    var view8 = image.data;\n    for (var i = 0, ii = view8.length; i < ii; i += 4) {\n      var alpha = view8[i + 3] * 4;\n      if (alpha) {\n        view8[i] = this.gradient_[alpha];\n        view8[i + 1] = this.gradient_[alpha + 1];\n        view8[i + 2] = this.gradient_[alpha + 2];\n      }\n    }\n    context.putImageData(image, 0, 0);\n  };\n\n  /**\n   * Set the blur size in pixels.\n   * @param {number} blur Blur size in pixels.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.setBlur = function setBlur (blur) {\n    this.set(Property.BLUR, blur);\n  };\n\n  /**\n   * Set the gradient colors as array of strings.\n   * @param {Array<string>} colors Gradient.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.setGradient = function setGradient (colors) {\n    this.set(Property.GRADIENT, colors);\n  };\n\n  /**\n   * Set the size of the radius in pixels.\n   * @param {number} radius Radius size in pixel.\n   * @api\n   * @observable\n   */\n  Heatmap.prototype.setRadius = function setRadius (radius) {\n    this.set(Property.RADIUS, radius);\n  };\n\n  return Heatmap;\n}(VectorLayer));\n\n\n/**\n * @param {Array<string>} colors A list of colored.\n * @return {Uint8ClampedArray} An array.\n */\nfunction createGradient(colors) {\n  var width = 1;\n  var height = 256;\n  var context = createCanvasContext2D(width, height);\n\n  var gradient = context.createLinearGradient(0, 0, width, height);\n  var step = 1 / (colors.length - 1);\n  for (var i = 0, ii = colors.length; i < ii; ++i) {\n    gradient.addColorStop(i * step, colors[i]);\n  }\n\n  context.fillStyle = gradient;\n  context.fillRect(0, 0, width, height);\n\n  return context.getImageData(0, 0, width, height).data;\n}\n\n\nexport default Heatmap;\n\n//# sourceMappingURL=Heatmap.js.map","/**\n * @module ol/layer/VectorTile\n */\nimport LayerType from '../LayerType.js';\nimport {assert} from '../asserts.js';\nimport TileProperty from './TileProperty.js';\nimport VectorLayer from './Vector.js';\nimport VectorTileRenderType from './VectorTileRenderType.js';\nimport {assign} from '../obj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering.  The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering.  At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the\n * renderer when getting features from the vector tile for the rendering or hit-detection.\n * Recommended value: Vector tiles are usually generated with a buffer, so this value should match\n * the largest possible buffer of the used tiles. It should be at least the size of the largest\n * point symbol or line width.\n * @property {import(\"./VectorTileRenderType.js\").default|string} [renderMode='hybrid'] Render mode for vector tiles:\n *  * `'image'`: Vector tiles are rendered as images. Great performance, but point symbols and texts\n *    are always rotated with the view and pixels are scaled during zoom animations.\n *  * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom\n *    animations. Point symbols and texts are accurately rendered as vectors and can stay upright on\n *    rotated views.\n *  * `'vector'`: Vector tiles are rendered as vectors. Most accurate rendering even during\n *    animations, but slower performance than the other options.\n *\n * When `declutter` is set to `true`, `'hybrid'` will be used instead of `'image'`.\n * @property {import(\"../source/VectorTile.js\").default} [source] Source.\n * @property {import(\"../PluggableMap.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use {@link module:ol/Map#addLayer}.\n * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all\n * image and text styles, and the priority is defined by the z-index of the style. Lower z-index\n * means higher priority. When set to `true`, a `renderMode` of `'image'` will be overridden with\n * `'hybrid'`.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be\n * recreated during animations. This means that no vectors will be shown clipped, but the setting\n * will have a performance impact for large amounts of vector data. When set to `false`, batches\n * will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be\n * recreated during interactions. See also `updateWhileAnimating`.\n * @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`\n * means no preloading.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created.\n * @property {import(\"../style/Style.js\").StyleLike} [style] Layer style. See\n * {@link module:ol/style} for default style which will be used if this is not defined.\n * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.\n */\n\n\n/**\n * @classdesc\n * Layer for vector tile data that is rendered client-side.\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @param {Options=} opt_options Options.\n * @api\n */\nvar VectorTileLayer = /*@__PURE__*/(function (VectorLayer) {\n  function VectorTileLayer(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    var renderMode = options.renderMode || VectorTileRenderType.HYBRID;\n    assert(renderMode == undefined ||\n       renderMode == VectorTileRenderType.IMAGE ||\n       renderMode == VectorTileRenderType.HYBRID ||\n       renderMode == VectorTileRenderType.VECTOR,\n    28); // `renderMode` must be `'image'`, `'hybrid'` or `'vector'`\n    if (options.declutter && renderMode == VectorTileRenderType.IMAGE) {\n      renderMode = VectorTileRenderType.HYBRID;\n    }\n    options.renderMode = renderMode;\n\n    var baseOptions = /** @type {Object} */ (assign({}, options));\n    delete baseOptions.preload;\n    delete baseOptions.useInterimTilesOnError;\n\n    VectorLayer.call(/** @type {import(\"./Vector.js\").Options} */ this, (baseOptions));\n\n    this.setPreload(options.preload ? options.preload : 0);\n    this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?\n      options.useInterimTilesOnError : true);\n\n    /**\n    * The layer type.\n    * @protected\n    * @type {import(\"../LayerType.js\").default}\n    */\n    this.type = LayerType.VECTOR_TILE;\n\n  }\n\n  if ( VectorLayer ) VectorTileLayer.__proto__ = VectorLayer;\n  VectorTileLayer.prototype = Object.create( VectorLayer && VectorLayer.prototype );\n  VectorTileLayer.prototype.constructor = VectorTileLayer;\n\n  /**\n  * Return the level as number to which we will preload tiles up to.\n  * @return {number} The level to preload tiles up to.\n  * @observable\n  * @api\n  */\n  VectorTileLayer.prototype.getPreload = function getPreload () {\n    return /** @type {number} */ (this.get(TileProperty.PRELOAD));\n  };\n\n  /**\n  * Whether we use interim tiles on error.\n  * @return {boolean} Use interim tiles on error.\n  * @observable\n  * @api\n  */\n  VectorTileLayer.prototype.getUseInterimTilesOnError = function getUseInterimTilesOnError () {\n    return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));\n  };\n\n  /**\n  * Set the level as number to which we will preload tiles up to.\n  * @param {number} preload The level to preload tiles up to.\n  * @observable\n  * @api\n  */\n  VectorTileLayer.prototype.setPreload = function setPreload (preload) {\n    this.set(TileProperty.PRELOAD, preload);\n  };\n\n  /**\n  * Set whether we use interim tiles on error.\n  * @param {boolean} useInterimTilesOnError Use interim tiles on error.\n  * @observable\n  * @api\n  */\n  VectorTileLayer.prototype.setUseInterimTilesOnError = function setUseInterimTilesOnError (useInterimTilesOnError) {\n    this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);\n  };\n\n  return VectorTileLayer;\n}(VectorLayer));\n\n\n/**\n * Return the associated {@link module:ol/source/VectorTile vectortilesource} of the layer.\n * @function\n * @return {import(\"../source/VectorTile.js\").default} Source.\n * @api\n */\nVectorTileLayer.prototype.getSource;\nexport default VectorTileLayer;\n\n//# sourceMappingURL=VectorTile.js.map","/**\n * @module ol/interaction/DragAndDrop\n */\n// FIXME should handle all geo-referenced data, not just vector data\n\nimport {TRUE} from '../functions.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Interaction from './Interaction.js';\nimport {get as getProjection} from '../proj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {Array<typeof import(\"../format/Feature.js\").default>} [formatConstructors] Format constructors.\n * @property {import(\"../source/Vector.js\").default} [source] Optional vector source where features will be added.  If a source is provided\n * all existing features will be removed and new features will be added when\n * they are dropped on the target.  If you want to add features to a vector\n * source without removing the existing features (append only), instead of\n * providing the source option listen for the \"addfeatures\" event.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.\n * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.\n */\n\n\n/**\n * @enum {string}\n */\nvar DragAndDropEventType = {\n  /**\n   * Triggered when features are added\n   * @event DragAndDropEvent#addfeatures\n   * @api\n   */\n  ADD_FEATURES: 'addfeatures'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances\n * of this type.\n */\nvar DragAndDropEvent = /*@__PURE__*/(function (Event) {\n  function DragAndDropEvent(type, file, opt_features, opt_projection) {\n\n    Event.call(this, type);\n\n    /**\n     * The features parsed from dropped data.\n     * @type {Array<import(\"../Feature.js\").FeatureLike>|undefined}\n     * @api\n     */\n    this.features = opt_features;\n\n    /**\n     * The dropped file.\n     * @type {File}\n     * @api\n     */\n    this.file = file;\n\n    /**\n     * The feature projection.\n     * @type {import(\"../proj/Projection.js\").default|undefined}\n     * @api\n     */\n    this.projection = opt_projection;\n\n  }\n\n  if ( Event ) DragAndDropEvent.__proto__ = Event;\n  DragAndDropEvent.prototype = Object.create( Event && Event.prototype );\n  DragAndDropEvent.prototype.constructor = DragAndDropEvent;\n\n  return DragAndDropEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Handles input of vector data by drag and drop.\n * @api\n *\n * @fires DragAndDropEvent\n */\nvar DragAndDrop = /*@__PURE__*/(function (Interaction) {\n  function DragAndDrop(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Interaction.call(this, {\n      handleEvent: TRUE\n    });\n\n    /**\n     * @private\n     * @type {Array<typeof import(\"../format/Feature.js\").default>}\n     */\n    this.formatConstructors_ = options.formatConstructors ?\n      options.formatConstructors : [];\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.projection_ = options.projection ?\n      getProjection(options.projection) : null;\n\n    /**\n     * @private\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     */\n    this.dropListenKeys_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../source/Vector.js\").default}\n     */\n    this.source_ = options.source || null;\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.target = options.target ? options.target : null;\n\n  }\n\n  if ( Interaction ) DragAndDrop.__proto__ = Interaction;\n  DragAndDrop.prototype = Object.create( Interaction && Interaction.prototype );\n  DragAndDrop.prototype.constructor = DragAndDrop;\n\n  /**\n   * @param {File} file File.\n   * @param {Event} event Load event.\n   * @private\n   */\n  DragAndDrop.prototype.handleResult_ = function handleResult_ (file, event) {\n    var result = event.target.result;\n    var map = this.getMap();\n    var projection = this.projection_;\n    if (!projection) {\n      var view = map.getView();\n      projection = view.getProjection();\n    }\n\n    var formatConstructors = this.formatConstructors_;\n    var features = [];\n    for (var i = 0, ii = formatConstructors.length; i < ii; ++i) {\n      var format = new formatConstructors[i]();\n      features = this.tryReadFeatures_(format, result, {\n        featureProjection: projection\n      });\n      if (features && features.length > 0) {\n        break;\n      }\n    }\n    if (this.source_) {\n      this.source_.clear();\n      this.source_.addFeatures(features);\n    }\n    this.dispatchEvent(\n      new DragAndDropEvent(\n        DragAndDropEventType.ADD_FEATURES, file,\n        features, projection));\n  };\n\n  /**\n   * @private\n   */\n  DragAndDrop.prototype.registerListeners_ = function registerListeners_ () {\n    var map = this.getMap();\n    if (map) {\n      var dropArea = this.target ? this.target : map.getViewport();\n      this.dropListenKeys_ = [\n        listen(dropArea, EventType.DROP, handleDrop, this),\n        listen(dropArea, EventType.DRAGENTER, handleStop, this),\n        listen(dropArea, EventType.DRAGOVER, handleStop, this),\n        listen(dropArea, EventType.DROP, handleStop, this)\n      ];\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragAndDrop.prototype.setActive = function setActive (active) {\n    Interaction.prototype.setActive.call(this, active);\n    if (active) {\n      this.registerListeners_();\n    } else {\n      this.unregisterListeners_();\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragAndDrop.prototype.setMap = function setMap (map) {\n    this.unregisterListeners_();\n    Interaction.prototype.setMap.call(this, map);\n    if (this.getActive()) {\n      this.registerListeners_();\n    }\n  };\n\n  /**\n   * @param {import(\"../format/Feature.js\").default} format Format.\n   * @param {string} text Text.\n   * @param {import(\"../format/Feature.js\").ReadOptions} options Read options.\n   * @private\n   * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n   */\n  DragAndDrop.prototype.tryReadFeatures_ = function tryReadFeatures_ (format, text, options) {\n    try {\n      return format.readFeatures(text, options);\n    } catch (e) {\n      return null;\n    }\n  };\n\n  /**\n   * @private\n   */\n  DragAndDrop.prototype.unregisterListeners_ = function unregisterListeners_ () {\n    if (this.dropListenKeys_) {\n      this.dropListenKeys_.forEach(unlistenByKey);\n      this.dropListenKeys_ = null;\n    }\n  };\n\n  return DragAndDrop;\n}(Interaction));\n\n\n/**\n * @param {DragEvent} event Event.\n * @this {DragAndDrop}\n */\nfunction handleDrop(event) {\n  var files = event.dataTransfer.files;\n  for (var i = 0, ii = files.length; i < ii; ++i) {\n    var file = files.item(i);\n    var reader = new FileReader();\n    reader.addEventListener(EventType.LOAD, this.handleResult_.bind(this, file));\n    reader.readAsText(file);\n  }\n}\n\n\n/**\n * @param {DragEvent} event Event.\n */\nfunction handleStop(event) {\n  event.stopPropagation();\n  event.preventDefault();\n  event.dataTransfer.dropEffect = 'copy';\n}\n\n\nexport default DragAndDrop;\n\n//# sourceMappingURL=DragAndDrop.js.map","/**\n * @module ol/interaction/DragRotateAndZoom\n */\nimport {disable} from '../rotationconstraint.js';\nimport ViewHint from '../ViewHint.js';\nimport {shiftKeyOnly, mouseOnly} from '../events/condition.js';\nimport {rotate, rotateWithoutConstraints, zoom, zoomWithoutConstraints} from './Interaction.js';\nimport PointerInteraction from './Pointer.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * Default is {@link module:ol/events/condition~shiftKeyOnly}.\n * @property {number} [duration=400] Animation duration in milliseconds.\n */\n\n\n/**\n * @classdesc\n * Allows the user to zoom and rotate the map by clicking and dragging\n * on the map.  By default, this interaction is limited to when the shift\n * key is held down.\n *\n * This interaction is only supported for mouse devices.\n *\n * And this interaction is not included in the default interactions.\n * @api\n */\nvar DragRotateAndZoom = /*@__PURE__*/(function (PointerInteraction) {\n  function DragRotateAndZoom(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    PointerInteraction.call(/** @type {import(\"./Pointer.js\").Options} */ this, (options));\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : shiftKeyOnly;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastAngle_ = undefined;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.lastMagnitude_ = undefined;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.lastScaleDelta_ = 0;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 400;\n\n  }\n\n  if ( PointerInteraction ) DragRotateAndZoom.__proto__ = PointerInteraction;\n  DragRotateAndZoom.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  DragRotateAndZoom.prototype.constructor = DragRotateAndZoom;\n\n  /**\n   * @inheritDoc\n   */\n  DragRotateAndZoom.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return;\n    }\n\n    var map = mapBrowserEvent.map;\n    var size = map.getSize();\n    var offset = mapBrowserEvent.pixel;\n    var deltaX = offset[0] - size[0] / 2;\n    var deltaY = size[1] / 2 - offset[1];\n    var theta = Math.atan2(deltaY, deltaX);\n    var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n    var view = map.getView();\n    if (view.getConstraints().rotation !== disable && this.lastAngle_ !== undefined) {\n      var angleDelta = theta - this.lastAngle_;\n      rotateWithoutConstraints(view, view.getRotation() - angleDelta);\n    }\n    this.lastAngle_ = theta;\n    if (this.lastMagnitude_ !== undefined) {\n      var resolution = this.lastMagnitude_ * (view.getResolution() / magnitude);\n      zoomWithoutConstraints(view, resolution);\n    }\n    if (this.lastMagnitude_ !== undefined) {\n      this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;\n    }\n    this.lastMagnitude_ = magnitude;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragRotateAndZoom.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return true;\n    }\n\n    var map = mapBrowserEvent.map;\n    var view = map.getView();\n    view.setHint(ViewHint.INTERACTING, -1);\n    var direction = this.lastScaleDelta_ - 1;\n    rotate(view, view.getRotation());\n    zoom(view, view.getResolution(), undefined, this.duration_, direction);\n    this.lastScaleDelta_ = 0;\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  DragRotateAndZoom.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    if (!mouseOnly(mapBrowserEvent)) {\n      return false;\n    }\n\n    if (this.condition_(mapBrowserEvent)) {\n      mapBrowserEvent.map.getView().setHint(ViewHint.INTERACTING, 1);\n      this.lastAngle_ = undefined;\n      this.lastMagnitude_ = undefined;\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n  return DragRotateAndZoom;\n}(PointerInteraction));\n\nexport default DragRotateAndZoom;\n\n//# sourceMappingURL=DragRotateAndZoom.js.map","/**\n * @module ol/geom/Circle\n */\nimport {createOrUpdate, forEachCorner, intersects} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinate} from './flat/deflate.js';\n\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /*@__PURE__*/(function (SimpleGeometry) {\n  function Circle(center, opt_radius, opt_layout) {\n    SimpleGeometry.call(this);\n    if (opt_layout !== undefined && opt_radius === undefined) {\n      this.setFlatCoordinates(opt_layout, center);\n    } else {\n      var radius = opt_radius ? opt_radius : 0;\n      this.setCenterAndRadius(center, radius, opt_layout);\n    }\n  }\n\n  if ( SimpleGeometry ) Circle.__proto__ = SimpleGeometry;\n  Circle.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  Circle.prototype.constructor = Circle;\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!Circle} Clone.\n   * @override\n   * @api\n   */\n  Circle.prototype.clone = function clone () {\n    return new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Circle.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    var flatCoordinates = this.flatCoordinates;\n    var dx = x - flatCoordinates[0];\n    var dy = y - flatCoordinates[1];\n    var squaredDistance = dx * dx + dy * dy;\n    if (squaredDistance < minSquaredDistance) {\n      if (squaredDistance === 0) {\n        for (var i = 0; i < this.stride; ++i) {\n          closestPoint[i] = flatCoordinates[i];\n        }\n      } else {\n        var delta = this.getRadius() / Math.sqrt(squaredDistance);\n        closestPoint[0] = flatCoordinates[0] + delta * dx;\n        closestPoint[1] = flatCoordinates[1] + delta * dy;\n        for (var i$1 = 2; i$1 < this.stride; ++i$1) {\n          closestPoint[i$1] = flatCoordinates[i$1];\n        }\n      }\n      closestPoint.length = this.stride;\n      return squaredDistance;\n    } else {\n      return minSquaredDistance;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Circle.prototype.containsXY = function containsXY (x, y) {\n    var flatCoordinates = this.flatCoordinates;\n    var dx = x - flatCoordinates[0];\n    var dy = y - flatCoordinates[1];\n    return dx * dx + dy * dy <= this.getRadiusSquared_();\n  };\n\n  /**\n   * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n   * @return {import(\"../coordinate.js\").Coordinate} Center.\n   * @api\n   */\n  Circle.prototype.getCenter = function getCenter () {\n    return this.flatCoordinates.slice(0, this.stride);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Circle.prototype.computeExtent = function computeExtent (extent) {\n    var flatCoordinates = this.flatCoordinates;\n    var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n    return createOrUpdate(\n      flatCoordinates[0] - radius, flatCoordinates[1] - radius,\n      flatCoordinates[0] + radius, flatCoordinates[1] + radius,\n      extent);\n  };\n\n  /**\n   * Return the radius of the circle.\n   * @return {number} Radius.\n   * @api\n   */\n  Circle.prototype.getRadius = function getRadius () {\n    return Math.sqrt(this.getRadiusSquared_());\n  };\n\n  /**\n   * @private\n   * @return {number} Radius squared.\n   */\n  Circle.prototype.getRadiusSquared_ = function getRadiusSquared_ () {\n    var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n    var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n    return dx * dx + dy * dy;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Circle.prototype.getType = function getType () {\n    return GeometryType.CIRCLE;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  Circle.prototype.intersectsExtent = function intersectsExtent (extent) {\n    var circleExtent = this.getExtent();\n    if (intersects(extent, circleExtent)) {\n      var center = this.getCenter();\n\n      if (extent[0] <= center[0] && extent[2] >= center[0]) {\n        return true;\n      }\n      if (extent[1] <= center[1] && extent[3] >= center[1]) {\n        return true;\n      }\n\n      return forEachCorner(extent, this.intersectsCoordinate, this);\n    }\n    return false;\n\n  };\n\n  /**\n   * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n   * @param {import(\"../coordinate.js\").Coordinate} center Center.\n   * @api\n   */\n  Circle.prototype.setCenter = function setCenter (center) {\n    var stride = this.stride;\n    var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n    var flatCoordinates = center.slice();\n    flatCoordinates[stride] = flatCoordinates[0] + radius;\n    for (var i = 1; i < stride; ++i) {\n      flatCoordinates[stride + i] = center[i];\n    }\n    this.setFlatCoordinates(this.layout, flatCoordinates);\n    this.changed();\n  };\n\n  /**\n   * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n   * number) of the circle.\n   * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n   * @param {number} radius Radius.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @api\n   */\n  Circle.prototype.setCenterAndRadius = function setCenterAndRadius (center, radius, opt_layout) {\n    this.setLayout(opt_layout, center, 0);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    /** @type {Array<number>} */\n    var flatCoordinates = this.flatCoordinates;\n    var offset = deflateCoordinate(\n      flatCoordinates, 0, center, this.stride);\n    flatCoordinates[offset++] = flatCoordinates[0] + radius;\n    for (var i = 1, ii = this.stride; i < ii; ++i) {\n      flatCoordinates[offset++] = flatCoordinates[i];\n    }\n    flatCoordinates.length = offset;\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Circle.prototype.getCoordinates = function getCoordinates () {\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Circle.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {};\n\n  /**\n   * Set the radius of the circle. The radius is in the units of the projection.\n   * @param {number} radius Radius.\n   * @api\n   */\n  Circle.prototype.setRadius = function setRadius (radius) {\n    this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n    this.changed();\n  };\n\n  return Circle;\n}(SimpleGeometry));\n\n\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.  Can be a\n *     string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry.  Note that original geometry is\n *     modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n\n//# sourceMappingURL=Circle.js.map","/**\n * @module ol/geom/MultiLineString\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport LineString from './LineString.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {assignClosestArrayPoint, arrayMaxSquaredDelta} from './flat/closest.js';\nimport {deflateCoordinatesArray} from './flat/deflate.js';\nimport {inflateCoordinatesArray} from './flat/inflate.js';\nimport {interpolatePoint, lineStringsCoordinateAtM} from './flat/interpolate.js';\nimport {intersectsLineStringArray} from './flat/intersectsextent.js';\nimport {douglasPeuckerArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-linestring geometry.\n *\n * @api\n */\nvar MultiLineString = /*@__PURE__*/(function (SimpleGeometry) {\n  function MultiLineString(coordinates, opt_layout, opt_ends) {\n\n    SimpleGeometry.call(this);\n\n    /**\n     * @type {Array<number>}\n     * @private\n     */\n    this.ends_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    if (Array.isArray(coordinates[0])) {\n      this.setCoordinates(/** @type {Array<Array<import(\"../coordinate.js\").Coordinate>>} */ (coordinates), opt_layout);\n    } else if (opt_layout !== undefined && opt_ends) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n      this.ends_ = opt_ends;\n    } else {\n      var layout = this.getLayout();\n      var lineStrings = /** @type {Array<LineString>} */ (coordinates);\n      var flatCoordinates = [];\n      var ends = [];\n      for (var i = 0, ii = lineStrings.length; i < ii; ++i) {\n        var lineString = lineStrings[i];\n        if (i === 0) {\n          layout = lineString.getLayout();\n        }\n        extend(flatCoordinates, lineString.getFlatCoordinates());\n        ends.push(flatCoordinates.length);\n      }\n      this.setFlatCoordinates(layout, flatCoordinates);\n      this.ends_ = ends;\n    }\n\n  }\n\n  if ( SimpleGeometry ) MultiLineString.__proto__ = SimpleGeometry;\n  MultiLineString.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  MultiLineString.prototype.constructor = MultiLineString;\n\n  /**\n   * Append the passed linestring to the multilinestring.\n   * @param {LineString} lineString LineString.\n   * @api\n   */\n  MultiLineString.prototype.appendLineString = function appendLineString (lineString) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = lineString.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());\n    }\n    this.ends_.push(this.flatCoordinates.length);\n    this.changed();\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiLineString} Clone.\n   * @override\n   * @api\n   */\n  MultiLineString.prototype.clone = function clone () {\n    return new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiLineString.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(\n        this.flatCoordinates, 0, this.ends_, this.stride, 0));\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestArrayPoint(\n      this.flatCoordinates, 0, this.ends_, this.stride,\n      this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);\n  };\n\n  /**\n   * Returns the coordinate at `m` using linear interpolation, or `null` if no\n   * such coordinate exists.\n   *\n   * `opt_extrapolate` controls extrapolation beyond the range of Ms in the\n   * MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first\n   * M will return the first coordinate and Ms greater than the last M will\n   * return the last coordinate.\n   *\n   * `opt_interpolate` controls interpolation between consecutive LineStrings\n   * within the MultiLineString. If `opt_interpolate` is `true` the coordinates\n   * will be linearly interpolated between the last coordinate of one LineString\n   * and the first coordinate of the next LineString.  If `opt_interpolate` is\n   * `false` then the function will return `null` for Ms falling between\n   * LineStrings.\n   *\n   * @param {number} m M.\n   * @param {boolean=} opt_extrapolate Extrapolate. Default is `false`.\n   * @param {boolean=} opt_interpolate Interpolate. Default is `false`.\n   * @return {import(\"../coordinate.js\").Coordinate} Coordinate.\n   * @api\n   */\n  MultiLineString.prototype.getCoordinateAtM = function getCoordinateAtM (m, opt_extrapolate, opt_interpolate) {\n    if ((this.layout != GeometryLayout.XYM &&\n         this.layout != GeometryLayout.XYZM) ||\n        this.flatCoordinates.length === 0) {\n      return null;\n    }\n    var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;\n    var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;\n    return lineStringsCoordinateAtM(this.flatCoordinates, 0,\n      this.ends_, this.stride, m, extrapolate, interpolate);\n  };\n\n  /**\n   * Return the coordinates of the multilinestring.\n   * @return {Array<Array<import(\"../coordinate.js\").Coordinate>>} Coordinates.\n   * @override\n   * @api\n   */\n  MultiLineString.prototype.getCoordinates = function getCoordinates () {\n    return inflateCoordinatesArray(\n      this.flatCoordinates, 0, this.ends_, this.stride);\n  };\n\n  /**\n   * @return {Array<number>} Ends.\n   */\n  MultiLineString.prototype.getEnds = function getEnds () {\n    return this.ends_;\n  };\n\n  /**\n   * Return the linestring at the specified index.\n   * @param {number} index Index.\n   * @return {LineString} LineString.\n   * @api\n   */\n  MultiLineString.prototype.getLineString = function getLineString (index) {\n    if (index < 0 || this.ends_.length <= index) {\n      return null;\n    }\n    return new LineString(this.flatCoordinates.slice(\n      index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);\n  };\n\n  /**\n   * Return the linestrings of this multilinestring.\n   * @return {Array<LineString>} LineStrings.\n   * @api\n   */\n  MultiLineString.prototype.getLineStrings = function getLineStrings () {\n    var flatCoordinates = this.flatCoordinates;\n    var ends = this.ends_;\n    var layout = this.layout;\n    /** @type {Array<LineString>} */\n    var lineStrings = [];\n    var offset = 0;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      var end = ends[i];\n      var lineString = new LineString(flatCoordinates.slice(offset, end), layout);\n      lineStrings.push(lineString);\n      offset = end;\n    }\n    return lineStrings;\n  };\n\n  /**\n   * @return {Array<number>} Flat midpoints.\n   */\n  MultiLineString.prototype.getFlatMidpoints = function getFlatMidpoints () {\n    var midpoints = [];\n    var flatCoordinates = this.flatCoordinates;\n    var offset = 0;\n    var ends = this.ends_;\n    var stride = this.stride;\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      var end = ends[i];\n      var midpoint = interpolatePoint(\n        flatCoordinates, offset, end, stride, 0.5);\n      extend(midpoints, midpoint);\n      offset = end;\n    }\n    return midpoints;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiLineString.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    var simplifiedFlatCoordinates = [];\n    var simplifiedEnds = [];\n    simplifiedFlatCoordinates.length = douglasPeuckerArray(\n      this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance,\n      simplifiedFlatCoordinates, 0, simplifiedEnds);\n    return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiLineString.prototype.getType = function getType () {\n    return GeometryType.MULTI_LINE_STRING;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiLineString.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return intersectsLineStringArray(\n      this.flatCoordinates, 0, this.ends_, this.stride, extent);\n  };\n\n  /**\n   * Set the coordinates of the multilinestring.\n   * @param {!Array<Array<import(\"../coordinate.js\").Coordinate>>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  MultiLineString.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 2);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    var ends = deflateCoordinatesArray(\n      this.flatCoordinates, 0, coordinates, this.stride, this.ends_);\n    this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];\n    this.changed();\n  };\n\n  return MultiLineString;\n}(SimpleGeometry));\n\n\nexport default MultiLineString;\n\n//# sourceMappingURL=MultiLineString.js.map","/**\n * @module ol/geom/MultiPoint\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport GeometryType from './GeometryType.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\nimport {squaredDistance as squaredDx} from '../math.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nvar MultiPoint = /*@__PURE__*/(function (SimpleGeometry) {\n  function MultiPoint(coordinates, opt_layout) {\n    SimpleGeometry.call(this);\n    if (opt_layout && !Array.isArray(coordinates[0])) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n    } else {\n      this.setCoordinates(/** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (coordinates), opt_layout);\n    }\n  }\n\n  if ( SimpleGeometry ) MultiPoint.__proto__ = SimpleGeometry;\n  MultiPoint.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  MultiPoint.prototype.constructor = MultiPoint;\n\n  /**\n   * Append the passed point to this multipoint.\n   * @param {Point} point Point.\n   * @api\n   */\n  MultiPoint.prototype.appendPoint = function appendPoint (point) {\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = point.getFlatCoordinates().slice();\n    } else {\n      extend(this.flatCoordinates, point.getFlatCoordinates());\n    }\n    this.changed();\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPoint} Clone.\n   * @override\n   * @api\n   */\n  MultiPoint.prototype.clone = function clone () {\n    var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);\n    return multiPoint;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiPoint.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    var flatCoordinates = this.flatCoordinates;\n    var stride = this.stride;\n    for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      var squaredDistance = squaredDx(\n        x, y, flatCoordinates[i], flatCoordinates[i + 1]);\n      if (squaredDistance < minSquaredDistance) {\n        minSquaredDistance = squaredDistance;\n        for (var j = 0; j < stride; ++j) {\n          closestPoint[j] = flatCoordinates[i + j];\n        }\n        closestPoint.length = stride;\n      }\n    }\n    return minSquaredDistance;\n  };\n\n  /**\n   * Return the coordinates of the multipoint.\n   * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n   * @override\n   * @api\n   */\n  MultiPoint.prototype.getCoordinates = function getCoordinates () {\n    return inflateCoordinates(\n      this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);\n  };\n\n  /**\n   * Return the point at the specified index.\n   * @param {number} index Index.\n   * @return {Point} Point.\n   * @api\n   */\n  MultiPoint.prototype.getPoint = function getPoint (index) {\n    var n = !this.flatCoordinates ? 0 : this.flatCoordinates.length / this.stride;\n    if (index < 0 || n <= index) {\n      return null;\n    }\n    return new Point(this.flatCoordinates.slice(\n      index * this.stride, (index + 1) * this.stride), this.layout);\n  };\n\n  /**\n   * Return the points of this multipoint.\n   * @return {Array<Point>} Points.\n   * @api\n   */\n  MultiPoint.prototype.getPoints = function getPoints () {\n    var flatCoordinates = this.flatCoordinates;\n    var layout = this.layout;\n    var stride = this.stride;\n    /** @type {Array<Point>} */\n    var points = [];\n    for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      var point = new Point(flatCoordinates.slice(i, i + stride), layout);\n      points.push(point);\n    }\n    return points;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiPoint.prototype.getType = function getType () {\n    return GeometryType.MULTI_POINT;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiPoint.prototype.intersectsExtent = function intersectsExtent (extent) {\n    var flatCoordinates = this.flatCoordinates;\n    var stride = this.stride;\n    for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n      var x = flatCoordinates[i];\n      var y = flatCoordinates[i + 1];\n      if (containsXY(extent, x, y)) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * Set the coordinates of the multipoint.\n   * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n   * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  MultiPoint.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 1);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    this.flatCoordinates.length = deflateCoordinates(\n      this.flatCoordinates, 0, coordinates, this.stride);\n    this.changed();\n  };\n\n  return MultiPoint;\n}(SimpleGeometry));\n\n\nexport default MultiPoint;\n\n//# sourceMappingURL=MultiPoint.js.map","/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n  var flatCenters = [];\n  var extent = createEmpty();\n  for (var i = 0, ii = endss.length; i < ii; ++i) {\n    var ends = endss[i];\n    extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);\n    flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n    offset = ends[ends.length - 1];\n  }\n  return flatCenters;\n}\n\n//# sourceMappingURL=center.js.map","/**\n * @module ol/geom/MultiPolygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport GeometryLayout from './GeometryLayout.js';\nimport GeometryType from './GeometryType.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta} from './flat/closest.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingMultiArray} from './flat/intersectsextent.js';\nimport {linearRingsAreOriented, orientLinearRingsArray} from './flat/orient.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nvar MultiPolygon = /*@__PURE__*/(function (SimpleGeometry) {\n  function MultiPolygon(coordinates, opt_layout, opt_endss) {\n\n    SimpleGeometry.call(this);\n\n    /**\n     * @type {Array<Array<number>>}\n     * @private\n     */\n    this.endss_ = [];\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.flatInteriorPointsRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.flatInteriorPoints_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDelta_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.maxDeltaRevision_ = -1;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.orientedRevision_ = -1;\n\n    /**\n     * @private\n     * @type {Array<number>}\n     */\n    this.orientedFlatCoordinates_ = null;\n\n    if (!opt_endss && !Array.isArray(coordinates[0])) {\n      var layout = this.getLayout();\n      var polygons = /** @type {Array<Polygon>} */ (coordinates);\n      var flatCoordinates = [];\n      var endss = [];\n      for (var i = 0, ii = polygons.length; i < ii; ++i) {\n        var polygon = polygons[i];\n        if (i === 0) {\n          layout = polygon.getLayout();\n        }\n        var offset = flatCoordinates.length;\n        var ends = polygon.getEnds();\n        for (var j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] += offset;\n        }\n        extend(flatCoordinates, polygon.getFlatCoordinates());\n        endss.push(ends);\n      }\n      opt_layout = layout;\n      coordinates = flatCoordinates;\n      opt_endss = endss;\n    }\n    if (opt_layout !== undefined && opt_endss) {\n      this.setFlatCoordinates(opt_layout, /** @type {Array<number>} */ (coordinates));\n      this.endss_ = opt_endss;\n    } else {\n      this.setCoordinates(/** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (coordinates),\n        opt_layout);\n    }\n\n  }\n\n  if ( SimpleGeometry ) MultiPolygon.__proto__ = SimpleGeometry;\n  MultiPolygon.prototype = Object.create( SimpleGeometry && SimpleGeometry.prototype );\n  MultiPolygon.prototype.constructor = MultiPolygon;\n\n  /**\n   * Append the passed polygon to this multipolygon.\n   * @param {Polygon} polygon Polygon.\n   * @api\n   */\n  MultiPolygon.prototype.appendPolygon = function appendPolygon (polygon) {\n    /** @type {Array<number>} */\n    var ends;\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = polygon.getFlatCoordinates().slice();\n      ends = polygon.getEnds().slice();\n      this.endss_.push();\n    } else {\n      var offset = this.flatCoordinates.length;\n      extend(this.flatCoordinates, polygon.getFlatCoordinates());\n      ends = polygon.getEnds().slice();\n      for (var i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] += offset;\n      }\n    }\n    this.endss_.push(ends);\n    this.changed();\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!MultiPolygon} Clone.\n   * @override\n   * @api\n   */\n  MultiPolygon.prototype.clone = function clone () {\n    var len = this.endss_.length;\n    var newEndss = new Array(len);\n    for (var i = 0; i < len; ++i) {\n      newEndss[i] = this.endss_[i].slice();\n    }\n\n    return new MultiPolygon(\n      this.flatCoordinates.slice(), this.layout, newEndss);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiPolygon.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    if (this.maxDeltaRevision_ != this.getRevision()) {\n      this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(\n        this.flatCoordinates, 0, this.endss_, this.stride, 0));\n      this.maxDeltaRevision_ = this.getRevision();\n    }\n    return assignClosestMultiArrayPoint(\n      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,\n      this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiPolygon.prototype.containsXY = function containsXY (x, y) {\n    return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);\n  };\n\n  /**\n   * Return the area of the multipolygon on projected plane.\n   * @return {number} Area (on projected plane).\n   * @api\n   */\n  MultiPolygon.prototype.getArea = function getArea () {\n    return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);\n  };\n\n  /**\n   * Get the coordinate array for this geometry.  This array has the structure\n   * of a GeoJSON coordinate array for multi-polygons.\n   *\n   * @param {boolean=} opt_right Orient coordinates according to the right-hand\n   *     rule (counter-clockwise for exterior and clockwise for interior rings).\n   *     If `false`, coordinates will be oriented according to the left-hand rule\n   *     (clockwise for exterior and counter-clockwise for interior rings).\n   *     By default, coordinate orientation will depend on how the geometry was\n   *     constructed.\n   * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n   * @override\n   * @api\n   */\n  MultiPolygon.prototype.getCoordinates = function getCoordinates (opt_right) {\n    var flatCoordinates;\n    if (opt_right !== undefined) {\n      flatCoordinates = this.getOrientedFlatCoordinates().slice();\n      orientLinearRingsArray(\n        flatCoordinates, 0, this.endss_, this.stride, opt_right);\n    } else {\n      flatCoordinates = this.flatCoordinates;\n    }\n\n    return inflateMultiCoordinatesArray(\n      flatCoordinates, 0, this.endss_, this.stride);\n  };\n\n  /**\n   * @return {Array<Array<number>>} Endss.\n   */\n  MultiPolygon.prototype.getEndss = function getEndss () {\n    return this.endss_;\n  };\n\n  /**\n   * @return {Array<number>} Flat interior points.\n   */\n  MultiPolygon.prototype.getFlatInteriorPoints = function getFlatInteriorPoints () {\n    if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n      var flatCenters = linearRingssCenter(\n        this.flatCoordinates, 0, this.endss_, this.stride);\n      this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n        this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride,\n        flatCenters);\n      this.flatInteriorPointsRevision_ = this.getRevision();\n    }\n    return this.flatInteriorPoints_;\n  };\n\n  /**\n   * Return the interior points as {@link module:ol/geom/MultiPoint multipoint}.\n   * @return {MultiPoint} Interior points as XYM coordinates, where M is\n   * the length of the horizontal intersection that the point belongs to.\n   * @api\n   */\n  MultiPolygon.prototype.getInteriorPoints = function getInteriorPoints () {\n    return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);\n  };\n\n  /**\n   * @return {Array<number>} Oriented flat coordinates.\n   */\n  MultiPolygon.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n    if (this.orientedRevision_ != this.getRevision()) {\n      var flatCoordinates = this.flatCoordinates;\n      if (linearRingsAreOriented(\n        flatCoordinates, 0, this.endss_, this.stride)) {\n        this.orientedFlatCoordinates_ = flatCoordinates;\n      } else {\n        this.orientedFlatCoordinates_ = flatCoordinates.slice();\n        this.orientedFlatCoordinates_.length =\n            orientLinearRingsArray(\n              this.orientedFlatCoordinates_, 0, this.endss_, this.stride);\n      }\n      this.orientedRevision_ = this.getRevision();\n    }\n    return this.orientedFlatCoordinates_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MultiPolygon.prototype.getSimplifiedGeometryInternal = function getSimplifiedGeometryInternal (squaredTolerance) {\n    var simplifiedFlatCoordinates = [];\n    var simplifiedEndss = [];\n    simplifiedFlatCoordinates.length = quantizeMultiArray(\n      this.flatCoordinates, 0, this.endss_, this.stride,\n      Math.sqrt(squaredTolerance),\n      simplifiedFlatCoordinates, 0, simplifiedEndss);\n    return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);\n  };\n\n  /**\n   * Return the polygon at the specified index.\n   * @param {number} index Index.\n   * @return {Polygon} Polygon.\n   * @api\n   */\n  MultiPolygon.prototype.getPolygon = function getPolygon (index) {\n    if (index < 0 || this.endss_.length <= index) {\n      return null;\n    }\n    var offset;\n    if (index === 0) {\n      offset = 0;\n    } else {\n      var prevEnds = this.endss_[index - 1];\n      offset = prevEnds[prevEnds.length - 1];\n    }\n    var ends = this.endss_[index].slice();\n    var end = ends[ends.length - 1];\n    if (offset !== 0) {\n      for (var i = 0, ii = ends.length; i < ii; ++i) {\n        ends[i] -= offset;\n      }\n    }\n    return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);\n  };\n\n  /**\n   * Return the polygons of this multipolygon.\n   * @return {Array<Polygon>} Polygons.\n   * @api\n   */\n  MultiPolygon.prototype.getPolygons = function getPolygons () {\n    var layout = this.layout;\n    var flatCoordinates = this.flatCoordinates;\n    var endss = this.endss_;\n    var polygons = [];\n    var offset = 0;\n    for (var i = 0, ii = endss.length; i < ii; ++i) {\n      var ends = endss[i].slice();\n      var end = ends[ends.length - 1];\n      if (offset !== 0) {\n        for (var j = 0, jj = ends.length; j < jj; ++j) {\n          ends[j] -= offset;\n        }\n      }\n      var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);\n      polygons.push(polygon);\n      offset = end;\n    }\n    return polygons;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiPolygon.prototype.getType = function getType () {\n    return GeometryType.MULTI_POLYGON;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MultiPolygon.prototype.intersectsExtent = function intersectsExtent (extent) {\n    return intersectsLinearRingMultiArray(\n      this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);\n  };\n\n  /**\n   * Set the coordinates of the multipolygon.\n   * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n   * @param {GeometryLayout=} opt_layout Layout.\n   * @override\n   * @api\n   */\n  MultiPolygon.prototype.setCoordinates = function setCoordinates (coordinates, opt_layout) {\n    this.setLayout(opt_layout, coordinates, 3);\n    if (!this.flatCoordinates) {\n      this.flatCoordinates = [];\n    }\n    var endss = deflateMultiCoordinatesArray(\n      this.flatCoordinates, 0, coordinates, this.stride, this.endss_);\n    if (endss.length === 0) {\n      this.flatCoordinates.length = 0;\n    } else {\n      var lastEnds = endss[endss.length - 1];\n      this.flatCoordinates.length = lastEnds.length === 0 ?\n        0 : lastEnds[lastEnds.length - 1];\n    }\n    this.changed();\n  };\n\n  return MultiPolygon;\n}(SimpleGeometry));\n\n\nexport default MultiPolygon;\n\n//# sourceMappingURL=MultiPolygon.js.map","/**\n * @module ol/interaction/Draw\n */\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MapBrowserPointerEvent from '../MapBrowserPointerEvent.js';\nimport {getChangeEventType} from '../Object.js';\nimport {squaredDistance as squaredCoordinateDistance} from '../coordinate.js';\nimport {listen} from '../events.js';\nimport Event from '../events/Event.js';\nimport {noModifierKeys, always, shiftKeyOnly} from '../events/condition.js';\nimport {boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight} from '../extent.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport Circle from '../geom/Circle.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport {POINTER_TYPE} from '../pointer/MouseSource.js';\nimport Point from '../geom/Point.js';\nimport Polygon, {fromCircle, makeRegular} from '../geom/Polygon.js';\nimport PointerInteraction from './Pointer.js';\nimport InteractionProperty from './Property.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {GeometryType} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn.  The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default<Feature>} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition~noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles.  This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition~shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n\n\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n\n\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array<import(\"../coordinate.js\").Coordinate>} LineCoordType\n */\n\n\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array<Array<import(\"../coordinate.js\").Coordinate>>} PolyCoordType\n */\n\n\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n\n\n/**\n * Function that takes an array of coordinates and an optional existing geometry as\n * arguments, and returns a geometry. The optional existing geometry is the\n * geometry that is returned when the function is called without a second\n * argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default=):\n *     import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n\n\n/**\n * Draw mode.  This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n  POINT: 'Point',\n  LINE_STRING: 'LineString',\n  POLYGON: 'Polygon',\n  CIRCLE: 'Circle'\n};\n\n\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n  /**\n   * Triggered upon feature draw start\n   * @event DrawEvent#drawstart\n   * @api\n   */\n  DRAWSTART: 'drawstart',\n  /**\n   * Triggered upon feature draw end\n   * @event DrawEvent#drawend\n   * @api\n   */\n  DRAWEND: 'drawend'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /*@__PURE__*/(function (Event) {\n  function DrawEvent(type, feature) {\n\n    Event.call(this, type);\n\n    /**\n     * The feature being drawn.\n     * @type {Feature}\n     * @api\n     */\n    this.feature = feature;\n\n  }\n\n  if ( Event ) DrawEvent.__proto__ = Event;\n  DrawEvent.prototype = Object.create( Event && Event.prototype );\n  DrawEvent.prototype.constructor = DrawEvent;\n\n  return DrawEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /*@__PURE__*/(function (PointerInteraction) {\n  function Draw(options) {\n\n    var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    PointerInteraction.call(this, pointerOptions);\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.shouldHandle_ = false;\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     * @private\n     */\n    this.downPx_ = null;\n\n    /**\n     * @type {?}\n     * @private\n     */\n    this.downTimeout_;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.lastDragTime_;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.freehand_ = false;\n\n    /**\n     * Target source for drawn features.\n     * @type {VectorSource}\n     * @private\n     */\n    this.source_ = options.source ? options.source : null;\n\n    /**\n     * Target collection for drawn features.\n     * @type {import(\"../Collection.js\").default<Feature>}\n     * @private\n     */\n    this.features_ = options.features ? options.features : null;\n\n    /**\n     * Pixel distance for snapping.\n     * @type {number}\n     * @private\n     */\n    this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n\n    /**\n     * Geometry type.\n     * @type {GeometryType}\n     * @private\n     */\n    this.type_ = /** @type {GeometryType} */ (options.type);\n\n    /**\n     * Drawing mode (derived from geometry type.\n     * @type {Mode}\n     * @private\n     */\n    this.mode_ = getMode(this.type_);\n\n    /**\n     * Stop click, singleclick, and doubleclick events from firing during drawing.\n     * Default is `false`.\n     * @type {boolean}\n     * @private\n     */\n    this.stopClick_ = !!options.stopClick;\n\n    /**\n     * The number of points that must be drawn before a polygon ring or line\n     * string can be finished.  The default is 3 for polygon rings and 2 for\n     * line strings.\n     * @type {number}\n     * @private\n     */\n    this.minPoints_ = options.minPoints ?\n      options.minPoints :\n      (this.mode_ === Mode.POLYGON ? 3 : 2);\n\n    /**\n     * The number of points that can be drawn before a polygon ring or line string\n     * is finished. The default is no restriction.\n     * @type {number}\n     * @private\n     */\n    this.maxPoints_ = options.maxPoints ? options.maxPoints : Infinity;\n\n    /**\n     * A function to decide if a potential finish coordinate is permissible\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.finishCondition_ = options.finishCondition ? options.finishCondition : TRUE;\n\n    var geometryFunction = options.geometryFunction;\n    if (!geometryFunction) {\n      if (this.type_ === GeometryType.CIRCLE) {\n        /**\n         * @param {!LineCoordType} coordinates The coordinates.\n         * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n         * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n         */\n        geometryFunction = function(coordinates, opt_geometry) {\n          var circle = opt_geometry ? /** @type {Circle} */ (opt_geometry) :\n            new Circle([NaN, NaN]);\n          var squaredLength = squaredCoordinateDistance(\n            coordinates[0], coordinates[1]);\n          circle.setCenterAndRadius(coordinates[0], Math.sqrt(squaredLength));\n          return circle;\n        };\n      } else {\n        var Constructor;\n        var mode = this.mode_;\n        if (mode === Mode.POINT) {\n          Constructor = Point;\n        } else if (mode === Mode.LINE_STRING) {\n          Constructor = LineString;\n        } else if (mode === Mode.POLYGON) {\n          Constructor = Polygon;\n        }\n        /**\n         * @param {!LineCoordType} coordinates The coordinates.\n         * @param {import(\"../geom/SimpleGeometry.js\").default=} opt_geometry Optional geometry.\n         * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n         */\n        geometryFunction = function(coordinates, opt_geometry) {\n          var geometry = opt_geometry;\n          if (geometry) {\n            if (mode === Mode.POLYGON) {\n              if (coordinates[0].length) {\n                // Add a closing coordinate to match the first\n                geometry.setCoordinates([coordinates[0].concat([coordinates[0][0]])]);\n              } else {\n                geometry.setCoordinates([]);\n              }\n            } else {\n              geometry.setCoordinates(coordinates);\n            }\n          } else {\n            geometry = new Constructor(coordinates);\n          }\n          return geometry;\n        };\n      }\n    }\n\n    /**\n     * @type {GeometryFunction}\n     * @private\n     */\n    this.geometryFunction_ = geometryFunction;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.dragVertexDelay_ = options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n\n    /**\n     * Finish coordinate for the feature (first point for polygons, last point for\n     * linestrings).\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.finishCoordinate_ = null;\n\n    /**\n     * Sketch feature.\n     * @type {Feature}\n     * @private\n     */\n    this.sketchFeature_ = null;\n\n    /**\n     * Sketch point.\n     * @type {Feature}\n     * @private\n     */\n    this.sketchPoint_ = null;\n\n    /**\n     * Sketch coordinates. Used when drawing a line or polygon.\n     * @type {SketchCoordType}\n     * @private\n     */\n    this.sketchCoords_ = null;\n\n    /**\n     * Sketch line. Used when drawing polygon.\n     * @type {Feature}\n     * @private\n     */\n    this.sketchLine_ = null;\n\n    /**\n     * Sketch line coordinates. Used when drawing a polygon or circle.\n     * @type {LineCoordType}\n     * @private\n     */\n    this.sketchLineCoords_ = null;\n\n    /**\n     * Squared tolerance for handling up events.  If the squared distance\n     * between a down and up event is greater than this tolerance, up events\n     * will not be handled.\n     * @type {number}\n     * @private\n     */\n    this.squaredClickTolerance_ = options.clickTolerance ?\n      options.clickTolerance * options.clickTolerance : 36;\n\n    /**\n     * Draw overlay where our sketch features are drawn.\n     * @type {VectorLayer}\n     * @private\n     */\n    this.overlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: options.wrapX ? options.wrapX : false\n      }),\n      style: options.style ? options.style :\n        getDefaultStyleFunction(),\n      updateWhileInteracting: true\n    });\n\n    /**\n     * Name of the geometry attribute for newly created features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : noModifierKeys;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.freehandCondition_;\n    if (options.freehand) {\n      this.freehandCondition_ = always;\n    } else {\n      this.freehandCondition_ = options.freehandCondition ?\n        options.freehandCondition : shiftKeyOnly;\n    }\n\n    listen(this,\n      getChangeEventType(InteractionProperty.ACTIVE),\n      this.updateState_, this);\n\n  }\n\n  if ( PointerInteraction ) Draw.__proto__ = PointerInteraction;\n  Draw.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  Draw.prototype.constructor = Draw;\n\n  /**\n   * @inheritDoc\n   */\n  Draw.prototype.setMap = function setMap (map) {\n    PointerInteraction.prototype.setMap.call(this, map);\n    this.updateState_();\n  };\n\n  /**\n   * Get the overlay layer that this interaction renders sketch features to.\n   * @return {VectorLayer} Overlay layer.\n   * @api\n   */\n  Draw.prototype.getOverlay = function getOverlay () {\n    return this.overlay_;\n  };\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n   * @override\n   * @api\n   */\n  Draw.prototype.handleEvent = function handleEvent (event) {\n    if (event.originalEvent.type === EventType.CONTEXTMENU) {\n      // Avoid context menu for long taps when drawing on mobile\n      event.preventDefault();\n    }\n    this.freehand_ = this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n    var move = event.type === MapBrowserEventType.POINTERMOVE;\n    var pass = true;\n    if (!this.freehand_ && this.lastDragTime_ && event.type === MapBrowserEventType.POINTERDRAG) {\n      var now = Date.now();\n      if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n        this.downPx_ = event.pixel;\n        this.shouldHandle_ = !this.freehand_;\n        move = true;\n      } else {\n        this.lastDragTime_ = undefined;\n      }\n      if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n        clearTimeout(this.downTimeout_);\n        this.downTimeout_ = undefined;\n      }\n    }\n    if (this.freehand_ &&\n        event.type === MapBrowserEventType.POINTERDRAG &&\n        this.sketchFeature_ !== null) {\n      this.addToDrawing_(event);\n      pass = false;\n    } else if (this.freehand_ &&\n        event.type === MapBrowserEventType.POINTERDOWN) {\n      pass = false;\n    } else if (move) {\n      pass = event.type === MapBrowserEventType.POINTERMOVE;\n      if (pass && this.freehand_) {\n        pass = this.handlePointerMove_(event);\n      } else if (/** @type {MapBrowserPointerEvent} */ (event).pointerEvent.pointerType == POINTER_TYPE ||\n          (event.type === MapBrowserEventType.POINTERDRAG && this.downTimeout_ === undefined)) {\n        this.handlePointerMove_(event);\n      }\n    } else if (event.type === MapBrowserEventType.DBLCLICK) {\n      pass = false;\n    }\n\n    return PointerInteraction.prototype.handleEvent.call(this, event) && pass;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Draw.prototype.handleDownEvent = function handleDownEvent (event) {\n    this.shouldHandle_ = !this.freehand_;\n\n    if (this.freehand_) {\n      this.downPx_ = event.pixel;\n      if (!this.finishCoordinate_) {\n        this.startDrawing_(event);\n      }\n      return true;\n    } else if (this.condition_(event)) {\n      this.lastDragTime_ = Date.now();\n      this.downTimeout_ = setTimeout(function() {\n        this.handlePointerMove_(new MapBrowserPointerEvent(\n          MapBrowserEventType.POINTERMOVE, event.map, event.pointerEvent, false, event.frameState));\n      }.bind(this), this.dragVertexDelay_);\n      this.downPx_ = event.pixel;\n      return true;\n    } else {\n      return false;\n    }\n  };\n\n\n  /**\n   * @inheritDoc\n   */\n  Draw.prototype.handleUpEvent = function handleUpEvent (event) {\n    var pass = true;\n\n    if (this.downTimeout_) {\n      clearTimeout(this.downTimeout_);\n      this.downTimeout_ = undefined;\n    }\n\n    this.handlePointerMove_(event);\n\n    var circleMode = this.mode_ === Mode.CIRCLE;\n\n    if (this.shouldHandle_) {\n      if (!this.finishCoordinate_) {\n        this.startDrawing_(event);\n        if (this.mode_ === Mode.POINT) {\n          this.finishDrawing();\n        }\n      } else if (this.freehand_ || circleMode) {\n        this.finishDrawing();\n      } else if (this.atFinish_(event)) {\n        if (this.finishCondition_(event)) {\n          this.finishDrawing();\n        }\n      } else {\n        this.addToDrawing_(event);\n      }\n      pass = false;\n    } else if (this.freehand_) {\n      this.finishCoordinate_ = null;\n      this.abortDrawing_();\n    }\n    if (!pass && this.stopClick_) {\n      event.stopPropagation();\n    }\n    return pass;\n  };\n\n  /**\n   * Handle move events.\n   * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n   * @return {boolean} Pass the event to other interactions.\n   * @private\n   */\n  Draw.prototype.handlePointerMove_ = function handlePointerMove_ (event) {\n    if (this.downPx_ &&\n        ((!this.freehand_ && this.shouldHandle_) ||\n        (this.freehand_ && !this.shouldHandle_))) {\n      var downPx = this.downPx_;\n      var clickPx = event.pixel;\n      var dx = downPx[0] - clickPx[0];\n      var dy = downPx[1] - clickPx[1];\n      var squaredDistance = dx * dx + dy * dy;\n      this.shouldHandle_ = this.freehand_ ?\n        squaredDistance > this.squaredClickTolerance_ :\n        squaredDistance <= this.squaredClickTolerance_;\n      if (!this.shouldHandle_) {\n        return true;\n      }\n    }\n\n    if (this.finishCoordinate_) {\n      this.modifyDrawing_(event);\n    } else {\n      this.createOrUpdateSketchPoint_(event);\n    }\n    return true;\n  };\n\n  /**\n   * Determine if an event is within the snapping tolerance of the start coord.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @return {boolean} The event is within the snapping tolerance of the start.\n   * @private\n   */\n  Draw.prototype.atFinish_ = function atFinish_ (event) {\n    var at = false;\n    if (this.sketchFeature_) {\n      var potentiallyDone = false;\n      var potentiallyFinishCoordinates = [this.finishCoordinate_];\n      if (this.mode_ === Mode.LINE_STRING) {\n        potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n      } else if (this.mode_ === Mode.POLYGON) {\n        var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n        potentiallyDone = sketchCoords[0].length > this.minPoints_;\n        potentiallyFinishCoordinates = [sketchCoords[0][0], sketchCoords[0][sketchCoords[0].length - 2]];\n      }\n      if (potentiallyDone) {\n        var map = event.map;\n        for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n          var finishCoordinate = potentiallyFinishCoordinates[i];\n          var finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n          var pixel = event.pixel;\n          var dx = pixel[0] - finishPixel[0];\n          var dy = pixel[1] - finishPixel[1];\n          var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n          at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n          if (at) {\n            this.finishCoordinate_ = finishCoordinate;\n            break;\n          }\n        }\n      }\n    }\n    return at;\n  };\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  Draw.prototype.createOrUpdateSketchPoint_ = function createOrUpdateSketchPoint_ (event) {\n    var coordinates = event.coordinate.slice();\n    if (!this.sketchPoint_) {\n      this.sketchPoint_ = new Feature(new Point(coordinates));\n      this.updateSketchFeatures_();\n    } else {\n      var sketchPointGeom = /** @type {Point} */ (this.sketchPoint_.getGeometry());\n      sketchPointGeom.setCoordinates(coordinates);\n    }\n  };\n\n  /**\n   * Start the drawing.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  Draw.prototype.startDrawing_ = function startDrawing_ (event) {\n    var start = event.coordinate;\n    this.finishCoordinate_ = start;\n    if (this.mode_ === Mode.POINT) {\n      this.sketchCoords_ = start.slice();\n    } else if (this.mode_ === Mode.POLYGON) {\n      this.sketchCoords_ = [[start.slice(), start.slice()]];\n      this.sketchLineCoords_ = this.sketchCoords_[0];\n    } else {\n      this.sketchCoords_ = [start.slice(), start.slice()];\n    }\n    if (this.sketchLineCoords_) {\n      this.sketchLine_ = new Feature(\n        new LineString(this.sketchLineCoords_));\n    }\n    var geometry = this.geometryFunction_(this.sketchCoords_);\n    this.sketchFeature_ = new Feature();\n    if (this.geometryName_) {\n      this.sketchFeature_.setGeometryName(this.geometryName_);\n    }\n    this.sketchFeature_.setGeometry(geometry);\n    this.updateSketchFeatures_();\n    this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n  };\n\n  /**\n   * Modify the drawing.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  Draw.prototype.modifyDrawing_ = function modifyDrawing_ (event) {\n    var coordinate = event.coordinate;\n    var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n    var coordinates, last;\n    if (this.mode_ === Mode.POINT) {\n      last = this.sketchCoords_;\n    } else if (this.mode_ === Mode.POLYGON) {\n      coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n      last = coordinates[coordinates.length - 1];\n      if (this.atFinish_(event)) {\n        // snap to finish\n        coordinate = this.finishCoordinate_.slice();\n      }\n    } else {\n      coordinates = this.sketchCoords_;\n      last = coordinates[coordinates.length - 1];\n    }\n    last[0] = coordinate[0];\n    last[1] = coordinate[1];\n    this.geometryFunction_(/** @type {!LineCoordType} */ (this.sketchCoords_), geometry);\n    if (this.sketchPoint_) {\n      var sketchPointGeom = /** @type {Point} */ (this.sketchPoint_.getGeometry());\n      sketchPointGeom.setCoordinates(coordinate);\n    }\n    /** @type {LineString} */\n    var sketchLineGeom;\n    if (geometry.getType() == GeometryType.POLYGON &&\n        this.mode_ !== Mode.POLYGON) {\n      if (!this.sketchLine_) {\n        this.sketchLine_ = new Feature();\n      }\n      var ring = /** @type {Polygon} */ (geometry).getLinearRing(0);\n      sketchLineGeom = /** @type {LineString} */ (this.sketchLine_.getGeometry());\n      if (!sketchLineGeom) {\n        sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n        this.sketchLine_.setGeometry(sketchLineGeom);\n      } else {\n        sketchLineGeom.setFlatCoordinates(\n          ring.getLayout(), ring.getFlatCoordinates());\n        sketchLineGeom.changed();\n      }\n    } else if (this.sketchLineCoords_) {\n      sketchLineGeom = /** @type {LineString} */ (this.sketchLine_.getGeometry());\n      sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n    }\n    this.updateSketchFeatures_();\n  };\n\n  /**\n   * Add a new coordinate to the drawing.\n   * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n   * @private\n   */\n  Draw.prototype.addToDrawing_ = function addToDrawing_ (event) {\n    var coordinate = event.coordinate;\n    var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n    var done;\n    var coordinates;\n    if (this.mode_ === Mode.LINE_STRING) {\n      this.finishCoordinate_ = coordinate.slice();\n      coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n      if (coordinates.length >= this.maxPoints_) {\n        if (this.freehand_) {\n          coordinates.pop();\n        } else {\n          done = true;\n        }\n      }\n      coordinates.push(coordinate.slice());\n      this.geometryFunction_(coordinates, geometry);\n    } else if (this.mode_ === Mode.POLYGON) {\n      coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n      if (coordinates.length >= this.maxPoints_) {\n        if (this.freehand_) {\n          coordinates.pop();\n        } else {\n          done = true;\n        }\n      }\n      coordinates.push(coordinate.slice());\n      if (done) {\n        this.finishCoordinate_ = coordinates[0];\n      }\n      this.geometryFunction_(this.sketchCoords_, geometry);\n    }\n    this.updateSketchFeatures_();\n    if (done) {\n      this.finishDrawing();\n    }\n  };\n\n  /**\n   * Remove last point of the feature currently being drawn.\n   * @api\n   */\n  Draw.prototype.removeLastPoint = function removeLastPoint () {\n    if (!this.sketchFeature_) {\n      return;\n    }\n    var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (this.sketchFeature_.getGeometry());\n    var coordinates;\n    /** @type {LineString} */\n    var sketchLineGeom;\n    if (this.mode_ === Mode.LINE_STRING) {\n      coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n      coordinates.splice(-2, 1);\n      this.geometryFunction_(coordinates, geometry);\n      if (coordinates.length >= 2) {\n        this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n      }\n    } else if (this.mode_ === Mode.POLYGON) {\n      coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n      coordinates.splice(-2, 1);\n      sketchLineGeom = /** @type {LineString} */ (this.sketchLine_.getGeometry());\n      sketchLineGeom.setCoordinates(coordinates);\n      this.geometryFunction_(this.sketchCoords_, geometry);\n    }\n\n    if (coordinates.length === 0) {\n      this.finishCoordinate_ = null;\n    }\n\n    this.updateSketchFeatures_();\n  };\n\n  /**\n   * Stop drawing and add the sketch feature to the target layer.\n   * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n   * dispatched before inserting the feature.\n   * @api\n   */\n  Draw.prototype.finishDrawing = function finishDrawing () {\n    var sketchFeature = this.abortDrawing_();\n    if (!sketchFeature) {\n      return;\n    }\n    var coordinates = this.sketchCoords_;\n    var geometry = /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (sketchFeature.getGeometry());\n    if (this.mode_ === Mode.LINE_STRING) {\n      // remove the redundant last point\n      coordinates.pop();\n      this.geometryFunction_(coordinates, geometry);\n    } else if (this.mode_ === Mode.POLYGON) {\n      // remove the redundant last point in ring\n      /** @type {PolyCoordType} */ (coordinates)[0].pop();\n      this.geometryFunction_(coordinates, geometry);\n      coordinates = geometry.getCoordinates();\n    }\n\n    // cast multi-part geometries\n    if (this.type_ === GeometryType.MULTI_POINT) {\n      sketchFeature.setGeometry(new MultiPoint([/** @type {PointCoordType} */(coordinates)]));\n    } else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n      sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */(coordinates)]));\n    } else if (this.type_ === GeometryType.MULTI_POLYGON) {\n      sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */(coordinates)]));\n    }\n\n    // First dispatch event to allow full set up of feature\n    this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n\n    // Then insert feature\n    if (this.features_) {\n      this.features_.push(sketchFeature);\n    }\n    if (this.source_) {\n      this.source_.addFeature(sketchFeature);\n    }\n  };\n\n  /**\n   * Stop drawing without adding the sketch feature to the target layer.\n   * @return {Feature} The sketch feature (or null if none).\n   * @private\n   */\n  Draw.prototype.abortDrawing_ = function abortDrawing_ () {\n    this.finishCoordinate_ = null;\n    var sketchFeature = this.sketchFeature_;\n    if (sketchFeature) {\n      this.sketchFeature_ = null;\n      this.sketchPoint_ = null;\n      this.sketchLine_ = null;\n      /** @type {VectorSource} */ (this.overlay_.getSource()).clear(true);\n    }\n    return sketchFeature;\n  };\n\n  /**\n   * Extend an existing geometry by adding additional points. This only works\n   * on features with `LineString` geometries, where the interaction will\n   * extend lines by adding points to the end of the coordinates array.\n   * @param {!Feature} feature Feature to be extended.\n   * @api\n   */\n  Draw.prototype.extend = function extend (feature) {\n    var geometry = feature.getGeometry();\n    var lineString = /** @type {LineString} */ (geometry);\n    this.sketchFeature_ = feature;\n    this.sketchCoords_ = lineString.getCoordinates();\n    var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n    this.finishCoordinate_ = last.slice();\n    this.sketchCoords_.push(last.slice());\n    this.updateSketchFeatures_();\n    this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n  };\n\n  /**\n   * Redraw the sketch features.\n   * @private\n   */\n  Draw.prototype.updateSketchFeatures_ = function updateSketchFeatures_ () {\n    var sketchFeatures = [];\n    if (this.sketchFeature_) {\n      sketchFeatures.push(this.sketchFeature_);\n    }\n    if (this.sketchLine_) {\n      sketchFeatures.push(this.sketchLine_);\n    }\n    if (this.sketchPoint_) {\n      sketchFeatures.push(this.sketchPoint_);\n    }\n    var overlaySource = /** @type {VectorSource} */ (this.overlay_.getSource());\n    overlaySource.clear(true);\n    overlaySource.addFeatures(sketchFeatures);\n  };\n\n  /**\n   * @private\n   */\n  Draw.prototype.updateState_ = function updateState_ () {\n    var map = this.getMap();\n    var active = this.getActive();\n    if (!map || !active) {\n      this.abortDrawing_();\n    }\n    this.overlay_.setMap(active ? map : null);\n  };\n\n  return Draw;\n}(PointerInteraction));\n\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  var styles = createEditingStyle();\n  return function(feature, resolution) {\n    return styles[feature.getGeometry().getType()];\n  };\n}\n\n\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of an\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon. Default is\n *     32.\n * @param {number=} opt_angle Angle of the first point in radians. 0 means East.\n *     Default is the angle defined by the heading from the center of the\n *     regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a\n *     polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n  return function(coordinates, opt_geometry) {\n    var center = /** @type {LineCoordType} */ (coordinates)[0];\n    var end = /** @type {LineCoordType} */ (coordinates)[1];\n    var radius = Math.sqrt(\n      squaredCoordinateDistance(center, end));\n    var geometry = opt_geometry ? /** @type {Polygon} */ (opt_geometry) :\n      fromCircle(new Circle(center), opt_sides);\n    var angle = opt_angle;\n    if (!opt_angle) {\n      var x = end[0] - center[0];\n      var y = end[1] - center[1];\n      angle = Math.atan(y / x) - (x < 0 ? Math.PI : 0);\n    }\n    makeRegular(geometry, center, radius, angle);\n    return geometry;\n  };\n}\n\n\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes).  Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n  return (\n    function(coordinates, opt_geometry) {\n      var extent = boundingExtent(/** @type {LineCoordType} */ (coordinates));\n      var boxCoordinates = [[\n        getBottomLeft(extent),\n        getBottomRight(extent),\n        getTopRight(extent),\n        getTopLeft(extent),\n        getBottomLeft(extent)\n      ]];\n      var geometry = opt_geometry;\n      if (geometry) {\n        geometry.setCoordinates(boxCoordinates);\n      } else {\n        geometry = new Polygon(boxCoordinates);\n      }\n      return geometry;\n    }\n  );\n}\n\n\n/**\n * Get the drawing mode.  The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {GeometryType} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n  var mode;\n  if (type === GeometryType.POINT ||\n      type === GeometryType.MULTI_POINT) {\n    mode = Mode.POINT;\n  } else if (type === GeometryType.LINE_STRING ||\n      type === GeometryType.MULTI_LINE_STRING) {\n    mode = Mode.LINE_STRING;\n  } else if (type === GeometryType.POLYGON ||\n      type === GeometryType.MULTI_POLYGON) {\n    mode = Mode.POLYGON;\n  } else if (type === GeometryType.CIRCLE) {\n    mode = Mode.CIRCLE;\n  }\n  return (\n    /** @type {!Mode} */ (mode)\n  );\n}\n\n\nexport default Draw;\n\n//# sourceMappingURL=Draw.js.map","/**\n * @module ol/interaction/Extent\n */\nimport Feature from '../Feature.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {squaredDistanceToSegment, closestOnSegment, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance} from '../coordinate.js';\nimport Event from '../events/Event.js';\nimport {boundingExtent, getArea} from '../extent.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport {fromExtent as polygonFromExtent} from '../geom/Polygon.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../extent.js\").Extent} [extent] Initial extent. Defaults to no\n * initial extent.\n * @property {import(\"../style/Style.js\").StyleLike} [boxStyle]\n * Style for the drawn extent box. Defaults to\n * {@link module:ol/style/Style~createEditing()['Polygon']}\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [pointerStyle]\n * Style for the cursor used to draw the extent. Defaults to\n * {@link module:ol/style/Style~createEditing()['Point']}\n * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps\n * in the X direction? Only affects visuals, not functionality.\n */\n\n\n/**\n * @enum {string}\n */\nvar ExtentEventType = {\n  /**\n   * Triggered after the extent is changed\n   * @event ExtentEventType#extentchanged\n   * @api\n   */\n  EXTENTCHANGED: 'extentchanged'\n};\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Extent~ExtentInteraction} instances are\n * instances of this type.\n */\nvar ExtentInteractionEvent = /*@__PURE__*/(function (Event) {\n  function ExtentInteractionEvent(extent) {\n    Event.call(this, ExtentEventType.EXTENTCHANGED);\n\n    /**\n     * The current extent.\n     * @type {import(\"../extent.js\").Extent}\n     * @api\n     */\n    this.extent = extent;\n  }\n\n  if ( Event ) ExtentInteractionEvent.__proto__ = Event;\n  ExtentInteractionEvent.prototype = Object.create( Event && Event.prototype );\n  ExtentInteractionEvent.prototype.constructor = ExtentInteractionEvent;\n\n  return ExtentInteractionEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Allows the user to draw a vector box by clicking and dragging on the map.\n * Once drawn, the vector box can be modified by dragging its vertices or edges.\n * This interaction is only supported for mouse devices.\n *\n * @fires Event\n * @api\n */\nvar ExtentInteraction = /*@__PURE__*/(function (PointerInteraction) {\n  function ExtentInteraction(opt_options) {\n\n    var options = opt_options || {};\n\n    PointerInteraction.call(/** @type {import(\"./Pointer.js\").Options} */ this, (options));\n\n    /**\n     * Extent of the drawn box\n     * @type {import(\"../extent.js\").Extent}\n     * @private\n     */\n    this.extent_ = null;\n\n    /**\n     * Handler for pointer move events\n     * @type {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null}\n     * @private\n     */\n    this.pointerHandler_ = null;\n\n    /**\n     * Pixel threshold to snap to extent\n     * @type {number}\n     * @private\n     */\n    this.pixelTolerance_ = options.pixelTolerance !== undefined ?\n      options.pixelTolerance : 10;\n\n    /**\n     * Is the pointer snapped to an extent vertex\n     * @type {boolean}\n     * @private\n     */\n    this.snappedToVertex_ = false;\n\n    /**\n     * Feature for displaying the visible extent\n     * @type {Feature}\n     * @private\n     */\n    this.extentFeature_ = null;\n\n    /**\n     * Feature for displaying the visible pointer\n     * @type {Feature}\n     * @private\n     */\n    this.vertexFeature_ = null;\n\n    if (!opt_options) {\n      opt_options = {};\n    }\n\n    /**\n     * Layer for the extentFeature\n     * @type {VectorLayer}\n     * @private\n     */\n    this.extentOverlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: !!opt_options.wrapX\n      }),\n      style: opt_options.boxStyle ? opt_options.boxStyle : getDefaultExtentStyleFunction(),\n      updateWhileAnimating: true,\n      updateWhileInteracting: true\n    });\n\n    /**\n     * Layer for the vertexFeature\n     * @type {VectorLayer}\n     * @private\n     */\n    this.vertexOverlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: !!opt_options.wrapX\n      }),\n      style: opt_options.pointerStyle ? opt_options.pointerStyle : getDefaultPointerStyleFunction(),\n      updateWhileAnimating: true,\n      updateWhileInteracting: true\n    });\n\n    if (opt_options.extent) {\n      this.setExtent(opt_options.extent);\n    }\n  }\n\n  if ( PointerInteraction ) ExtentInteraction.__proto__ = PointerInteraction;\n  ExtentInteraction.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  ExtentInteraction.prototype.constructor = ExtentInteraction;\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel cursor location\n   * @param {import(\"../PluggableMap.js\").default} map map\n   * @returns {import(\"../coordinate.js\").Coordinate|null} snapped vertex on extent\n   * @private\n   */\n  ExtentInteraction.prototype.snapToVertex_ = function snapToVertex_ (pixel, map) {\n    var pixelCoordinate = map.getCoordinateFromPixel(pixel);\n    var sortByDistance = function(a, b) {\n      return squaredDistanceToSegment(pixelCoordinate, a) -\n          squaredDistanceToSegment(pixelCoordinate, b);\n    };\n    var extent = this.getExtent();\n    if (extent) {\n      //convert extents to line segments and find the segment closest to pixelCoordinate\n      var segments = getSegments(extent);\n      segments.sort(sortByDistance);\n      var closestSegment = segments[0];\n\n      var vertex = (closestOnSegment(pixelCoordinate,\n        closestSegment));\n      var vertexPixel = map.getPixelFromCoordinate(vertex);\n\n      //if the distance is within tolerance, snap to the segment\n      if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n        //test if we should further snap to a vertex\n        var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n        var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n        var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n        var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n        var dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n        this.snappedToVertex_ = dist <= this.pixelTolerance_;\n        if (this.snappedToVertex_) {\n          vertex = squaredDist1 > squaredDist2 ?\n            closestSegment[1] : closestSegment[0];\n        }\n        return vertex;\n      }\n    }\n    return null;\n  };\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent pointer move event\n   * @private\n   */\n  ExtentInteraction.prototype.handlePointerMove_ = function handlePointerMove_ (mapBrowserEvent) {\n    var pixel = mapBrowserEvent.pixel;\n    var map = mapBrowserEvent.map;\n\n    var vertex = this.snapToVertex_(pixel, map);\n    if (!vertex) {\n      vertex = map.getCoordinateFromPixel(pixel);\n    }\n    this.createOrUpdatePointerFeature_(vertex);\n  };\n\n  /**\n   * @param {import(\"../extent.js\").Extent} extent extent\n   * @returns {Feature} extent as featrue\n   * @private\n   */\n  ExtentInteraction.prototype.createOrUpdateExtentFeature_ = function createOrUpdateExtentFeature_ (extent) {\n    var extentFeature = this.extentFeature_;\n\n    if (!extentFeature) {\n      if (!extent) {\n        extentFeature = new Feature({});\n      } else {\n        extentFeature = new Feature(polygonFromExtent(extent));\n      }\n      this.extentFeature_ = extentFeature;\n      /** @type {VectorSource} */ (this.extentOverlay_.getSource()).addFeature(extentFeature);\n    } else {\n      if (!extent) {\n        extentFeature.setGeometry(undefined);\n      } else {\n        extentFeature.setGeometry(polygonFromExtent(extent));\n      }\n    }\n    return extentFeature;\n  };\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} vertex location of feature\n   * @returns {Feature} vertex as feature\n   * @private\n   */\n  ExtentInteraction.prototype.createOrUpdatePointerFeature_ = function createOrUpdatePointerFeature_ (vertex) {\n    var vertexFeature = this.vertexFeature_;\n    if (!vertexFeature) {\n      vertexFeature = new Feature(new Point(vertex));\n      this.vertexFeature_ = vertexFeature;\n      /** @type {VectorSource} */ (this.vertexOverlay_.getSource()).addFeature(vertexFeature);\n    } else {\n      var geometry = /** @type {Point} */ (vertexFeature.getGeometry());\n      geometry.setCoordinates(vertex);\n    }\n    return vertexFeature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ExtentInteraction.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n    if (!(/** @type {import(\"../MapBrowserPointerEvent.js\").default} */ (mapBrowserEvent).pointerEvent)) {\n      return true;\n    }\n    //display pointer (if not dragging)\n    if (mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE && !this.handlingDownUpSequence) {\n      this.handlePointerMove_(mapBrowserEvent);\n    }\n    //call pointer to determine up/down/drag\n    PointerInteraction.prototype.handleEvent.call(this, mapBrowserEvent);\n    //return false to stop propagation\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ExtentInteraction.prototype.handleDownEvent = function handleDownEvent (mapBrowserEvent) {\n    var pixel = mapBrowserEvent.pixel;\n    var map = mapBrowserEvent.map;\n\n    var extent = this.getExtent();\n    var vertex = this.snapToVertex_(pixel, map);\n\n    //find the extent corner opposite the passed corner\n    var getOpposingPoint = function(point) {\n      var x_ = null;\n      var y_ = null;\n      if (point[0] == extent[0]) {\n        x_ = extent[2];\n      } else if (point[0] == extent[2]) {\n        x_ = extent[0];\n      }\n      if (point[1] == extent[1]) {\n        y_ = extent[3];\n      } else if (point[1] == extent[3]) {\n        y_ = extent[1];\n      }\n      if (x_ !== null && y_ !== null) {\n        return [x_, y_];\n      }\n      return null;\n    };\n    if (vertex && extent) {\n      var x = (vertex[0] == extent[0] || vertex[0] == extent[2]) ? vertex[0] : null;\n      var y = (vertex[1] == extent[1] || vertex[1] == extent[3]) ? vertex[1] : null;\n\n      //snap to point\n      if (x !== null && y !== null) {\n        this.pointerHandler_ = getPointHandler(getOpposingPoint(vertex));\n      //snap to edge\n      } else if (x !== null) {\n        this.pointerHandler_ = getEdgeHandler(\n          getOpposingPoint([x, extent[1]]),\n          getOpposingPoint([x, extent[3]])\n        );\n      } else if (y !== null) {\n        this.pointerHandler_ = getEdgeHandler(\n          getOpposingPoint([extent[0], y]),\n          getOpposingPoint([extent[2], y])\n        );\n      }\n    //no snap - new bbox\n    } else {\n      vertex = map.getCoordinateFromPixel(pixel);\n      this.setExtent([vertex[0], vertex[1], vertex[0], vertex[1]]);\n      this.pointerHandler_ = getPointHandler(vertex);\n    }\n    return true; //event handled; start downup sequence\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ExtentInteraction.prototype.handleDragEvent = function handleDragEvent (mapBrowserEvent) {\n    if (this.pointerHandler_) {\n      var pixelCoordinate = mapBrowserEvent.coordinate;\n      this.setExtent(this.pointerHandler_(pixelCoordinate));\n      this.createOrUpdatePointerFeature_(pixelCoordinate);\n    }\n    return true;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ExtentInteraction.prototype.handleUpEvent = function handleUpEvent (mapBrowserEvent) {\n    this.pointerHandler_ = null;\n    //If bbox is zero area, set to null;\n    var extent = this.getExtent();\n    if (!extent || getArea(extent) === 0) {\n      this.setExtent(null);\n    }\n    return false; //Stop handling downup sequence\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ExtentInteraction.prototype.setMap = function setMap (map) {\n    this.extentOverlay_.setMap(map);\n    this.vertexOverlay_.setMap(map);\n    PointerInteraction.prototype.setMap.call(this, map);\n  };\n\n  /**\n   * Returns the current drawn extent in the view projection\n   *\n   * @return {import(\"../extent.js\").Extent} Drawn extent in the view projection.\n   * @api\n   */\n  ExtentInteraction.prototype.getExtent = function getExtent () {\n    return this.extent_;\n  };\n\n  /**\n   * Manually sets the drawn extent, using the view projection.\n   *\n   * @param {import(\"../extent.js\").Extent} extent Extent\n   * @api\n   */\n  ExtentInteraction.prototype.setExtent = function setExtent (extent) {\n    //Null extent means no bbox\n    this.extent_ = extent ? extent : null;\n    this.createOrUpdateExtentFeature_(extent);\n    this.dispatchEvent(new ExtentInteractionEvent(this.extent_));\n  };\n\n  return ExtentInteraction;\n}(PointerInteraction));\n\n/**\n * Returns the default style for the drawn bbox\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default Extent style\n */\nfunction getDefaultExtentStyleFunction() {\n  var style = createEditingStyle();\n  return function(feature, resolution) {\n    return style[GeometryType.POLYGON];\n  };\n}\n\n/**\n * Returns the default style for the pointer\n *\n * @return {import(\"../style/Style.js\").StyleFunction} Default pointer style\n */\nfunction getDefaultPointerStyleFunction() {\n  var style = createEditingStyle();\n  return function(feature, resolution) {\n    return style[GeometryType.POINT];\n  };\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedPoint corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent} event handler\n */\nfunction getPointHandler(fixedPoint) {\n  return function(point) {\n    return boundingExtent([fixedPoint, point]);\n  };\n}\n\n/**\n * @param {import(\"../coordinate.js\").Coordinate} fixedP1 first corner that will be unchanged in the new extent\n * @param {import(\"../coordinate.js\").Coordinate} fixedP2 second corner that will be unchanged in the new extent\n * @returns {function (import(\"../coordinate.js\").Coordinate): import(\"../extent.js\").Extent|null} event handler\n */\nfunction getEdgeHandler(fixedP1, fixedP2) {\n  if (fixedP1[0] == fixedP2[0]) {\n    return function(point) {\n      return boundingExtent([fixedP1, [point[0], fixedP2[1]]]);\n    };\n  } else if (fixedP1[1] == fixedP2[1]) {\n    return function(point) {\n      return boundingExtent([fixedP1, [fixedP2[0], point[1]]]);\n    };\n  } else {\n    return null;\n  }\n}\n\n/**\n * @param {import(\"../extent.js\").Extent} extent extent\n * @returns {Array<Array<import(\"../coordinate.js\").Coordinate>>} extent line segments\n */\nfunction getSegments(extent) {\n  return [\n    [[extent[0], extent[1]], [extent[0], extent[3]]],\n    [[extent[0], extent[3]], [extent[2], extent[3]]],\n    [[extent[2], extent[3]], [extent[2], extent[1]]],\n    [[extent[2], extent[1]], [extent[0], extent[1]]]\n  ];\n}\n\n\nexport default ExtentInteraction;\n\n//# sourceMappingURL=Extent.js.map","/**\n * @module ol/interaction/Modify\n */\nimport {getUid} from '../util.js';\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport Feature from '../Feature.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport {equals} from '../array.js';\nimport {equals as coordinatesEqual, distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, squaredDistanceToSegment, closestOnSegment} from '../coordinate.js';\nimport {listen, unlisten} from '../events.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {always, primaryAction, altKeyOnly, singleClick} from '../events/condition.js';\nimport {boundingExtent, buffer, createOrUpdateFromCoordinate} from '../extent.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport RBush from '../structs/RBush.js';\nimport {createEditingStyle} from '../style/Style.js';\n\n\n/**\n * The segment index assigned to a circle's center when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CENTER_INDEX = 0;\n\n/**\n * The segment index assigned to a circle's circumference when\n * breaking up a circle into ModifySegmentDataType segments.\n * @type {number}\n */\nvar CIRCLE_CIRCUMFERENCE_INDEX = 1;\n\n\n/**\n * @enum {string}\n */\nvar ModifyEventType = {\n  /**\n   * Triggered upon feature modification start\n   * @event ModifyEvent#modifystart\n   * @api\n   */\n  MODIFYSTART: 'modifystart',\n  /**\n   * Triggered upon feature modification end\n   * @event ModifyEvent#modifyend\n   * @api\n   */\n  MODIFYEND: 'modifyend'\n};\n\n\n/**\n * @typedef {Object} SegmentData\n * @property {Array<number>} [depth]\n * @property {Feature} feature\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry\n * @property {number} [index]\n * @property {Array<import(\"../extent.js\").Extent>} segment\n * @property {Array<SegmentData>} [featureSegments]\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event will be considered to add or move a\n * vertex to the sketch. Default is\n * {@link module:ol/events/condition~primaryAction}.\n * @property {import(\"../events/condition.js\").Condition} [deleteCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. By default,\n * {@link module:ol/events/condition~singleClick} with\n * {@link module:ol/events/condition~altKeyOnly} results in a vertex deletion.\n * @property {import(\"../events/condition.js\").Condition} [insertVertexCondition] A\n * function that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether a new vertex can be added to the sketch\n * features. Default is {@link module:ol/events/condition~always}.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the\n * pointer close enough to a segment or vertex for editing.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style used for the features being modified. By default the default edit\n * style is used (see {@link module:ol/style}).\n * @property {VectorSource} [source] The vector source with\n * features to modify.  If a vector source is not provided, a feature collection\n * must be provided with the features option.\n * @property {Collection<Feature>} [features]\n * The features the interaction works on.  If a feature collection is not\n * provided, a vector source must be provided with the source option.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Modify~Modify} instances are\n * instances of this type.\n */\nexport var ModifyEvent = /*@__PURE__*/(function (Event) {\n  function ModifyEvent(type, features, mapBrowserPointerEvent) {\n    Event.call(this, type);\n\n    /**\n     * The features being modified.\n     * @type {Collection<Feature>}\n     * @api\n     */\n    this.features = features;\n\n    /**\n     * Associated {@link module:ol/MapBrowserEvent}.\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserPointerEvent;\n\n  }\n\n  if ( Event ) ModifyEvent.__proto__ = Event;\n  ModifyEvent.prototype = Object.create( Event && Event.prototype );\n  ModifyEvent.prototype.constructor = ModifyEvent;\n\n  return ModifyEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Interaction for modifying feature geometries.  To modify features that have\n * been added to an existing source, construct the modify interaction with the\n * `source` option.  If you want to modify features in a collection (for example,\n * the collection used by a select interaction), construct the interaction with\n * the `features` option.  The interaction must be constructed with either a\n * `source` or `features` option.\n *\n * By default, the interaction will allow deletion of vertices when the `alt`\n * key is pressed.  To configure the interaction with a different condition\n * for deletion, use the `deleteCondition` option.\n * @fires ModifyEvent\n * @api\n */\nvar Modify = /*@__PURE__*/(function (PointerInteraction) {\n  function Modify(options) {\n\n    PointerInteraction.call(/** @type {import(\"./Pointer.js\").Options} */ this, (options));\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : primaryAction;\n\n    /**\n     * @private\n     * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Browser event.\n     * @return {boolean} Combined condition result.\n     */\n    this.defaultDeleteCondition_ = function(mapBrowserEvent) {\n      return altKeyOnly(mapBrowserEvent) && singleClick(mapBrowserEvent);\n    };\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.deleteCondition_ = options.deleteCondition ?\n      options.deleteCondition : this.defaultDeleteCondition_;\n\n    /**\n     * @type {import(\"../events/condition.js\").Condition}\n     * @private\n     */\n    this.insertVertexCondition_ = options.insertVertexCondition ?\n      options.insertVertexCondition : always;\n\n    /**\n     * Editing vertex.\n     * @type {Feature}\n     * @private\n     */\n    this.vertexFeature_ = null;\n\n    /**\n     * Segments intersecting {@link this.vertexFeature_} by segment uid.\n     * @type {Object<string, boolean>}\n     * @private\n     */\n    this.vertexSegments_ = null;\n\n    /**\n     * @type {import(\"../pixel.js\").Pixel}\n     * @private\n     */\n    this.lastPixel_ = [0, 0];\n\n    /**\n     * Tracks if the next `singleclick` event should be ignored to prevent\n     * accidental deletion right after vertex creation.\n     * @type {boolean}\n     * @private\n     */\n    this.ignoreNextSingleClick_ = false;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.modified_ = false;\n\n    /**\n     * Segment RTree for each layer\n     * @type {RBush<SegmentData>}\n     * @private\n     */\n    this.rBush_ = new RBush();\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.pixelTolerance_ = options.pixelTolerance !== undefined ?\n      options.pixelTolerance : 10;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.snappedToVertex_ = false;\n\n    /**\n     * Indicate whether the interaction is currently changing a feature's\n     * coordinates.\n     * @type {boolean}\n     * @private\n     */\n    this.changingFeature_ = false;\n\n    /**\n     * @type {Array}\n     * @private\n     */\n    this.dragSegments_ = [];\n\n    /**\n     * Draw overlay where sketch features are drawn.\n     * @type {VectorLayer}\n     * @private\n     */\n    this.overlay_ = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        wrapX: !!options.wrapX\n      }),\n      style: options.style ? options.style :\n        getDefaultStyleFunction(),\n      updateWhileAnimating: true,\n      updateWhileInteracting: true\n    });\n\n    /**\n     * @const\n     * @private\n     * @type {!Object<string, function(Feature, import(\"../geom/Geometry.js\").default)>}\n     */\n    this.SEGMENT_WRITERS_ = {\n      'Point': this.writePointGeometry_,\n      'LineString': this.writeLineStringGeometry_,\n      'LinearRing': this.writeLineStringGeometry_,\n      'Polygon': this.writePolygonGeometry_,\n      'MultiPoint': this.writeMultiPointGeometry_,\n      'MultiLineString': this.writeMultiLineStringGeometry_,\n      'MultiPolygon': this.writeMultiPolygonGeometry_,\n      'Circle': this.writeCircleGeometry_,\n      'GeometryCollection': this.writeGeometryCollectionGeometry_\n    };\n\n\n    /**\n     * @type {VectorSource}\n     * @private\n     */\n    this.source_ = null;\n\n    var features;\n    if (options.source) {\n      this.source_ = options.source;\n      features = new Collection(this.source_.getFeatures());\n      listen(this.source_, VectorEventType.ADDFEATURE,\n        this.handleSourceAdd_, this);\n      listen(this.source_, VectorEventType.REMOVEFEATURE,\n        this.handleSourceRemove_, this);\n    } else {\n      features = options.features;\n    }\n    if (!features) {\n      throw new Error('The modify interaction requires features or a source');\n    }\n\n    /**\n     * @type {Collection<Feature>}\n     * @private\n     */\n    this.features_ = features;\n\n    this.features_.forEach(this.addFeature_.bind(this));\n    listen(this.features_, CollectionEventType.ADD,\n      this.handleFeatureAdd_, this);\n    listen(this.features_, CollectionEventType.REMOVE,\n      this.handleFeatureRemove_, this);\n\n    /**\n     * @type {import(\"../MapBrowserPointerEvent.js\").default}\n     * @private\n     */\n    this.lastPointerEvent_ = null;\n\n  }\n\n  if ( PointerInteraction ) Modify.__proto__ = PointerInteraction;\n  Modify.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  Modify.prototype.constructor = Modify;\n\n  /**\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  Modify.prototype.addFeature_ = function addFeature_ (feature) {\n    var geometry = feature.getGeometry();\n    if (geometry && geometry.getType() in this.SEGMENT_WRITERS_) {\n      this.SEGMENT_WRITERS_[geometry.getType()].call(this, feature, geometry);\n    }\n    var map = this.getMap();\n    if (map && map.isRendered() && this.getActive()) {\n      this.handlePointerAtPixel_(this.lastPixel_, map);\n    }\n    listen(feature, EventType.CHANGE,\n      this.handleFeatureChange_, this);\n  };\n\n  /**\n   * @param {import(\"../MapBrowserPointerEvent.js\").default} evt Map browser event\n   * @private\n   */\n  Modify.prototype.willModifyFeatures_ = function willModifyFeatures_ (evt) {\n    if (!this.modified_) {\n      this.modified_ = true;\n      this.dispatchEvent(new ModifyEvent(\n        ModifyEventType.MODIFYSTART, this.features_, evt));\n    }\n  };\n\n  /**\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  Modify.prototype.removeFeature_ = function removeFeature_ (feature) {\n    this.removeFeatureSegmentData_(feature);\n    // Remove the vertex feature if the collection of canditate features\n    // is empty.\n    if (this.vertexFeature_ && this.features_.getLength() === 0) {\n      /** @type {VectorSource} */ (this.overlay_.getSource()).removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n    unlisten(feature, EventType.CHANGE,\n      this.handleFeatureChange_, this);\n  };\n\n  /**\n   * @param {Feature} feature Feature.\n   * @private\n   */\n  Modify.prototype.removeFeatureSegmentData_ = function removeFeatureSegmentData_ (feature) {\n    var rBush = this.rBush_;\n    var /** @type {Array<SegmentData>} */ nodesToRemove = [];\n    rBush.forEach(\n      /**\n       * @param {SegmentData} node RTree node.\n       */\n      function(node) {\n        if (feature === node.feature) {\n          nodesToRemove.push(node);\n        }\n      });\n    for (var i = nodesToRemove.length - 1; i >= 0; --i) {\n      rBush.remove(nodesToRemove[i]);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Modify.prototype.setActive = function setActive (active) {\n    if (this.vertexFeature_ && !active) {\n      /** @type {VectorSource} */ (this.overlay_.getSource()).removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n    PointerInteraction.prototype.setActive.call(this, active);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Modify.prototype.setMap = function setMap (map) {\n    this.overlay_.setMap(map);\n    PointerInteraction.prototype.setMap.call(this, map);\n  };\n\n  /**\n   * Get the overlay layer that this interaction renders sketch features to.\n   * @return {VectorLayer} Overlay layer.\n   * @api\n   */\n  Modify.prototype.getOverlay = function getOverlay () {\n    return this.overlay_;\n  };\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n   * @private\n   */\n  Modify.prototype.handleSourceAdd_ = function handleSourceAdd_ (event) {\n    if (event.feature) {\n      this.features_.push(event.feature);\n    }\n  };\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent} event Event.\n   * @private\n   */\n  Modify.prototype.handleSourceRemove_ = function handleSourceRemove_ (event) {\n    if (event.feature) {\n      this.features_.remove(event.feature);\n    }\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Modify.prototype.handleFeatureAdd_ = function handleFeatureAdd_ (evt) {\n    this.addFeature_(/** @type {Feature} */ (evt.element));\n  };\n\n  /**\n   * @param {import(\"../events/Event.js\").default} evt Event.\n   * @private\n   */\n  Modify.prototype.handleFeatureChange_ = function handleFeatureChange_ (evt) {\n    if (!this.changingFeature_) {\n      var feature = /** @type {Feature} */ (evt.target);\n      this.removeFeature_(feature);\n      this.addFeature_(feature);\n    }\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Modify.prototype.handleFeatureRemove_ = function handleFeatureRemove_ (evt) {\n    var feature = /** @type {Feature} */ (evt.element);\n    this.removeFeature_(feature);\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {Point} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writePointGeometry_ = function writePointGeometry_ (feature, geometry) {\n    var coordinates = geometry.getCoordinates();\n    var segmentData = /** @type {SegmentData} */ ({\n      feature: feature,\n      geometry: geometry,\n      segment: [coordinates, coordinates]\n    });\n    this.rBush_.insert(geometry.getExtent(), segmentData);\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeMultiPointGeometry_ = function writeMultiPointGeometry_ (feature, geometry) {\n    var points = geometry.getCoordinates();\n    for (var i = 0, ii = points.length; i < ii; ++i) {\n      var coordinates = points[i];\n      var segmentData = /** @type {SegmentData} */ ({\n        feature: feature,\n        geometry: geometry,\n        depth: [i],\n        index: i,\n        segment: [coordinates, coordinates]\n      });\n      this.rBush_.insert(geometry.getExtent(), segmentData);\n    }\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeLineStringGeometry_ = function writeLineStringGeometry_ (feature, geometry) {\n    var coordinates = geometry.getCoordinates();\n    for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n      var segment = coordinates.slice(i, i + 2);\n      var segmentData = /** @type {SegmentData} */ ({\n        feature: feature,\n        geometry: geometry,\n        index: i,\n        segment: segment\n      });\n      this.rBush_.insert(boundingExtent(segment), segmentData);\n    }\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeMultiLineStringGeometry_ = function writeMultiLineStringGeometry_ (feature, geometry) {\n    var lines = geometry.getCoordinates();\n    for (var j = 0, jj = lines.length; j < jj; ++j) {\n      var coordinates = lines[j];\n      for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        var segment = coordinates.slice(i, i + 2);\n        var segmentData = /** @type {SegmentData} */ ({\n          feature: feature,\n          geometry: geometry,\n          depth: [j],\n          index: i,\n          segment: segment\n        });\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writePolygonGeometry_ = function writePolygonGeometry_ (feature, geometry) {\n    var rings = geometry.getCoordinates();\n    for (var j = 0, jj = rings.length; j < jj; ++j) {\n      var coordinates = rings[j];\n      for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        var segment = coordinates.slice(i, i + 2);\n        var segmentData = /** @type {SegmentData} */ ({\n          feature: feature,\n          geometry: geometry,\n          depth: [j],\n          index: i,\n          segment: segment\n        });\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeMultiPolygonGeometry_ = function writeMultiPolygonGeometry_ (feature, geometry) {\n    var polygons = geometry.getCoordinates();\n    for (var k = 0, kk = polygons.length; k < kk; ++k) {\n      var rings = polygons[k];\n      for (var j = 0, jj = rings.length; j < jj; ++j) {\n        var coordinates = rings[j];\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n          var segment = coordinates.slice(i, i + 2);\n          var segmentData = /** @type {SegmentData} */ ({\n            feature: feature,\n            geometry: geometry,\n            depth: [j, k],\n            index: i,\n            segment: segment\n          });\n          this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n      }\n    }\n  };\n\n  /**\n   * We convert a circle into two segments.  The segment at index\n   * {@link CIRCLE_CENTER_INDEX} is the\n   * circle's center (a point).  The segment at index\n   * {@link CIRCLE_CIRCUMFERENCE_INDEX} is\n   * the circumference, and is not a line segment.\n   *\n   * @param {Feature} feature Feature.\n   * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeCircleGeometry_ = function writeCircleGeometry_ (feature, geometry) {\n    var coordinates = geometry.getCenter();\n    var centerSegmentData = /** @type {SegmentData} */ ({\n      feature: feature,\n      geometry: geometry,\n      index: CIRCLE_CENTER_INDEX,\n      segment: [coordinates, coordinates]\n    });\n    var circumferenceSegmentData = /** @type {SegmentData} */ ({\n      feature: feature,\n      geometry: geometry,\n      index: CIRCLE_CIRCUMFERENCE_INDEX,\n      segment: [coordinates, coordinates]\n    });\n    var featureSegments = [centerSegmentData, circumferenceSegmentData];\n    centerSegmentData.featureSegments = circumferenceSegmentData.featureSegments = featureSegments;\n    this.rBush_.insert(createOrUpdateFromCoordinate(coordinates), centerSegmentData);\n    this.rBush_.insert(geometry.getExtent(), circumferenceSegmentData);\n  };\n\n  /**\n   * @param {Feature} feature Feature\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n   * @private\n   */\n  Modify.prototype.writeGeometryCollectionGeometry_ = function writeGeometryCollectionGeometry_ (feature, geometry) {\n    var geometries = geometry.getGeometriesArray();\n    for (var i = 0; i < geometries.length; ++i) {\n      this.SEGMENT_WRITERS_[geometries[i].getType()].call(this, feature, geometries[i]);\n    }\n  };\n\n  /**\n   * @param {import(\"../coordinate.js\").Coordinate} coordinates Coordinates.\n   * @return {Feature} Vertex feature.\n   * @private\n   */\n  Modify.prototype.createOrUpdateVertexFeature_ = function createOrUpdateVertexFeature_ (coordinates) {\n    var vertexFeature = this.vertexFeature_;\n    if (!vertexFeature) {\n      vertexFeature = new Feature(new Point(coordinates));\n      this.vertexFeature_ = vertexFeature;\n      /** @type {VectorSource} */ (this.overlay_.getSource()).addFeature(vertexFeature);\n    } else {\n      var geometry = /** @type {Point} */ (vertexFeature.getGeometry());\n      geometry.setCoordinates(coordinates);\n    }\n    return vertexFeature;\n  };\n\n  /**\n   * Handles the {@link module:ol/MapBrowserEvent map browser event} and may modify the geometry.\n   * @override\n   */\n  Modify.prototype.handleEvent = function handleEvent (mapBrowserEvent) {\n    if (!(/** @type {import(\"../MapBrowserPointerEvent.js\").default} */ (mapBrowserEvent).pointerEvent)) {\n      return true;\n    }\n    this.lastPointerEvent_ = mapBrowserEvent;\n\n    var handled;\n    if (!mapBrowserEvent.map.getView().getInteracting() &&\n        mapBrowserEvent.type == MapBrowserEventType.POINTERMOVE &&\n        !this.handlingDownUpSequence) {\n      this.handlePointerMove_(mapBrowserEvent);\n    }\n    if (this.vertexFeature_ && this.deleteCondition_(mapBrowserEvent)) {\n      if (mapBrowserEvent.type != MapBrowserEventType.SINGLECLICK || !this.ignoreNextSingleClick_) {\n        handled = this.removePoint();\n      } else {\n        handled = true;\n      }\n    }\n\n    if (mapBrowserEvent.type == MapBrowserEventType.SINGLECLICK) {\n      this.ignoreNextSingleClick_ = false;\n    }\n\n    return PointerInteraction.prototype.handleEvent.call(this, mapBrowserEvent) && !handled;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Modify.prototype.handleDragEvent = function handleDragEvent (evt) {\n    this.ignoreNextSingleClick_ = false;\n    this.willModifyFeatures_(evt);\n\n    var vertex = evt.coordinate;\n    for (var i = 0, ii = this.dragSegments_.length; i < ii; ++i) {\n      var dragSegment = this.dragSegments_[i];\n      var segmentData = dragSegment[0];\n      var depth = segmentData.depth;\n      var geometry = segmentData.geometry;\n      var coordinates = (void 0);\n      var segment = segmentData.segment;\n      var index = dragSegment[1];\n\n      while (vertex.length < geometry.getStride()) {\n        vertex.push(segment[index][vertex.length]);\n      }\n\n      switch (geometry.getType()) {\n        case GeometryType.POINT:\n          coordinates = vertex;\n          segment[0] = segment[1] = vertex;\n          break;\n        case GeometryType.MULTI_POINT:\n          coordinates = geometry.getCoordinates();\n          coordinates[segmentData.index] = vertex;\n          segment[0] = segment[1] = vertex;\n          break;\n        case GeometryType.LINE_STRING:\n          coordinates = geometry.getCoordinates();\n          coordinates[segmentData.index + index] = vertex;\n          segment[index] = vertex;\n          break;\n        case GeometryType.MULTI_LINE_STRING:\n          coordinates = geometry.getCoordinates();\n          coordinates[depth[0]][segmentData.index + index] = vertex;\n          segment[index] = vertex;\n          break;\n        case GeometryType.POLYGON:\n          coordinates = geometry.getCoordinates();\n          coordinates[depth[0]][segmentData.index + index] = vertex;\n          segment[index] = vertex;\n          break;\n        case GeometryType.MULTI_POLYGON:\n          coordinates = geometry.getCoordinates();\n          coordinates[depth[1]][depth[0]][segmentData.index + index] = vertex;\n          segment[index] = vertex;\n          break;\n        case GeometryType.CIRCLE:\n          segment[0] = segment[1] = vertex;\n          if (segmentData.index === CIRCLE_CENTER_INDEX) {\n            this.changingFeature_ = true;\n            geometry.setCenter(vertex);\n            this.changingFeature_ = false;\n          } else { // We're dragging the circle's circumference:\n            this.changingFeature_ = true;\n            geometry.setRadius(coordinateDistance(geometry.getCenter(), vertex));\n            this.changingFeature_ = false;\n          }\n          break;\n        default:\n          // pass\n      }\n\n      if (coordinates) {\n        this.setGeometryCoordinates_(geometry, coordinates);\n      }\n    }\n    this.createOrUpdateVertexFeature_(vertex);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Modify.prototype.handleDownEvent = function handleDownEvent (evt) {\n    if (!this.condition_(evt)) {\n      return false;\n    }\n    this.handlePointerAtPixel_(evt.pixel, evt.map);\n    var pixelCoordinate = evt.map.getCoordinateFromPixel(evt.pixel);\n    this.dragSegments_.length = 0;\n    this.modified_ = false;\n    var vertexFeature = this.vertexFeature_;\n    if (vertexFeature) {\n      var insertVertices = [];\n      var geometry = /** @type {Point} */ (vertexFeature.getGeometry());\n      var vertex = geometry.getCoordinates();\n      var vertexExtent = boundingExtent([vertex]);\n      var segmentDataMatches = this.rBush_.getInExtent(vertexExtent);\n      var componentSegments = {};\n      segmentDataMatches.sort(compareIndexes);\n      for (var i = 0, ii = segmentDataMatches.length; i < ii; ++i) {\n        var segmentDataMatch = segmentDataMatches[i];\n        var segment = segmentDataMatch.segment;\n        var uid = getUid(segmentDataMatch.feature);\n        var depth = segmentDataMatch.depth;\n        if (depth) {\n          uid += '-' + depth.join('-'); // separate feature components\n        }\n        if (!componentSegments[uid]) {\n          componentSegments[uid] = new Array(2);\n        }\n        if (segmentDataMatch.geometry.getType() === GeometryType.CIRCLE &&\n        segmentDataMatch.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n\n          var closestVertex = closestOnSegmentData(pixelCoordinate, segmentDataMatch);\n          if (coordinatesEqual(closestVertex, vertex) && !componentSegments[uid][0]) {\n            this.dragSegments_.push([segmentDataMatch, 0]);\n            componentSegments[uid][0] = segmentDataMatch;\n          }\n        } else if (coordinatesEqual(segment[0], vertex) &&\n            !componentSegments[uid][0]) {\n          this.dragSegments_.push([segmentDataMatch, 0]);\n          componentSegments[uid][0] = segmentDataMatch;\n        } else if (coordinatesEqual(segment[1], vertex) &&\n            !componentSegments[uid][1]) {\n\n          // prevent dragging closed linestrings by the connecting node\n          if ((segmentDataMatch.geometry.getType() ===\n              GeometryType.LINE_STRING ||\n              segmentDataMatch.geometry.getType() ===\n              GeometryType.MULTI_LINE_STRING) &&\n              componentSegments[uid][0] &&\n              componentSegments[uid][0].index === 0) {\n            continue;\n          }\n\n          this.dragSegments_.push([segmentDataMatch, 1]);\n          componentSegments[uid][1] = segmentDataMatch;\n        } else if (this.insertVertexCondition_(evt) && getUid(segment) in this.vertexSegments_ &&\n            (!componentSegments[uid][0] && !componentSegments[uid][1])) {\n          insertVertices.push([segmentDataMatch, vertex]);\n        }\n      }\n      if (insertVertices.length) {\n        this.willModifyFeatures_(evt);\n      }\n      for (var j = insertVertices.length - 1; j >= 0; --j) {\n        this.insertVertex_.apply(this, insertVertices[j]);\n      }\n    }\n    return !!this.vertexFeature_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Modify.prototype.handleUpEvent = function handleUpEvent (evt) {\n    for (var i = this.dragSegments_.length - 1; i >= 0; --i) {\n      var segmentData = this.dragSegments_[i][0];\n      var geometry = segmentData.geometry;\n      if (geometry.getType() === GeometryType.CIRCLE) {\n        // Update a circle object in the R* bush:\n        var coordinates = geometry.getCenter();\n        var centerSegmentData = segmentData.featureSegments[0];\n        var circumferenceSegmentData = segmentData.featureSegments[1];\n        centerSegmentData.segment[0] = centerSegmentData.segment[1] = coordinates;\n        circumferenceSegmentData.segment[0] = circumferenceSegmentData.segment[1] = coordinates;\n        this.rBush_.update(createOrUpdateFromCoordinate(coordinates), centerSegmentData);\n        this.rBush_.update(geometry.getExtent(), circumferenceSegmentData);\n      } else {\n        this.rBush_.update(boundingExtent(segmentData.segment), segmentData);\n      }\n    }\n    if (this.modified_) {\n      this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n      this.modified_ = false;\n    }\n    return false;\n  };\n\n  /**\n   * @param {import(\"../MapBrowserEvent.js\").default} evt Event.\n   * @private\n   */\n  Modify.prototype.handlePointerMove_ = function handlePointerMove_ (evt) {\n    this.lastPixel_ = evt.pixel;\n    this.handlePointerAtPixel_(evt.pixel, evt.map);\n  };\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @private\n   */\n  Modify.prototype.handlePointerAtPixel_ = function handlePointerAtPixel_ (pixel, map) {\n    var pixelCoordinate = map.getCoordinateFromPixel(pixel);\n    var sortByDistance = function(a, b) {\n      return pointDistanceToSegmentDataSquared(pixelCoordinate, a) -\n          pointDistanceToSegmentDataSquared(pixelCoordinate, b);\n    };\n\n    var box = buffer(createOrUpdateFromCoordinate(pixelCoordinate),\n      map.getView().getResolution() * this.pixelTolerance_);\n\n    var rBush = this.rBush_;\n    var nodes = rBush.getInExtent(box);\n    if (nodes.length > 0) {\n      nodes.sort(sortByDistance);\n      var node = nodes[0];\n      var closestSegment = node.segment;\n      var vertex = closestOnSegmentData(pixelCoordinate, node);\n      var vertexPixel = map.getPixelFromCoordinate(vertex);\n      var dist = coordinateDistance(pixel, vertexPixel);\n      if (dist <= this.pixelTolerance_) {\n        /** @type {Object<string, boolean>} */\n        var vertexSegments = {};\n\n        if (node.geometry.getType() === GeometryType.CIRCLE &&\n        node.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n\n          this.snappedToVertex_ = true;\n          this.createOrUpdateVertexFeature_(vertex);\n        } else {\n          var pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n          var pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n          var squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n          var squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n          dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n          this.snappedToVertex_ = dist <= this.pixelTolerance_;\n          if (this.snappedToVertex_) {\n            vertex = squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n          }\n          this.createOrUpdateVertexFeature_(vertex);\n          for (var i = 1, ii = nodes.length; i < ii; ++i) {\n            var segment = nodes[i].segment;\n            if ((coordinatesEqual(closestSegment[0], segment[0]) &&\n                coordinatesEqual(closestSegment[1], segment[1]) ||\n                (coordinatesEqual(closestSegment[0], segment[1]) &&\n                coordinatesEqual(closestSegment[1], segment[0])))) {\n              vertexSegments[getUid(segment)] = true;\n            } else {\n              break;\n            }\n          }\n        }\n\n        vertexSegments[getUid(closestSegment)] = true;\n        this.vertexSegments_ = vertexSegments;\n        return;\n      }\n    }\n    if (this.vertexFeature_) {\n      /** @type {VectorSource} */ (this.overlay_.getSource()).removeFeature(this.vertexFeature_);\n      this.vertexFeature_ = null;\n    }\n  };\n\n  /**\n   * @param {SegmentData} segmentData Segment data.\n   * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n   * @private\n   */\n  Modify.prototype.insertVertex_ = function insertVertex_ (segmentData, vertex) {\n    var segment = segmentData.segment;\n    var feature = segmentData.feature;\n    var geometry = segmentData.geometry;\n    var depth = segmentData.depth;\n    var index = /** @type {number} */ (segmentData.index);\n    var coordinates;\n\n    while (vertex.length < geometry.getStride()) {\n      vertex.push(0);\n    }\n\n    switch (geometry.getType()) {\n      case GeometryType.MULTI_LINE_STRING:\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case GeometryType.POLYGON:\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case GeometryType.MULTI_POLYGON:\n        coordinates = geometry.getCoordinates();\n        coordinates[depth[1]][depth[0]].splice(index + 1, 0, vertex);\n        break;\n      case GeometryType.LINE_STRING:\n        coordinates = geometry.getCoordinates();\n        coordinates.splice(index + 1, 0, vertex);\n        break;\n      default:\n        return;\n    }\n\n    this.setGeometryCoordinates_(geometry, coordinates);\n    var rTree = this.rBush_;\n    rTree.remove(segmentData);\n    this.updateSegmentIndices_(geometry, index, depth, 1);\n    var newSegmentData = /** @type {SegmentData} */ ({\n      segment: [segment[0], vertex],\n      feature: feature,\n      geometry: geometry,\n      depth: depth,\n      index: index\n    });\n    rTree.insert(boundingExtent(newSegmentData.segment),\n      newSegmentData);\n    this.dragSegments_.push([newSegmentData, 1]);\n\n    var newSegmentData2 = /** @type {SegmentData} */ ({\n      segment: [vertex, segment[1]],\n      feature: feature,\n      geometry: geometry,\n      depth: depth,\n      index: index + 1\n    });\n    rTree.insert(boundingExtent(newSegmentData2.segment), newSegmentData2);\n    this.dragSegments_.push([newSegmentData2, 0]);\n    this.ignoreNextSingleClick_ = true;\n  };\n\n  /**\n   * Removes the vertex currently being pointed.\n   * @return {boolean} True when a vertex was removed.\n   * @api\n   */\n  Modify.prototype.removePoint = function removePoint () {\n    if (this.lastPointerEvent_ && this.lastPointerEvent_.type != MapBrowserEventType.POINTERDRAG) {\n      var evt = this.lastPointerEvent_;\n      this.willModifyFeatures_(evt);\n      this.removeVertex_();\n      this.dispatchEvent(new ModifyEvent(ModifyEventType.MODIFYEND, this.features_, evt));\n      this.modified_ = false;\n      return true;\n    }\n    return false;\n  };\n\n  /**\n   * Removes a vertex from all matching features.\n   * @return {boolean} True when a vertex was removed.\n   * @private\n   */\n  Modify.prototype.removeVertex_ = function removeVertex_ () {\n    var dragSegments = this.dragSegments_;\n    var segmentsByFeature = {};\n    var deleted = false;\n    var component, coordinates, dragSegment, geometry, i, index, left;\n    var newIndex, right, segmentData, uid;\n    for (i = dragSegments.length - 1; i >= 0; --i) {\n      dragSegment = dragSegments[i];\n      segmentData = dragSegment[0];\n      uid = getUid(segmentData.feature);\n      if (segmentData.depth) {\n        // separate feature components\n        uid += '-' + segmentData.depth.join('-');\n      }\n      if (!(uid in segmentsByFeature)) {\n        segmentsByFeature[uid] = {};\n      }\n      if (dragSegment[1] === 0) {\n        segmentsByFeature[uid].right = segmentData;\n        segmentsByFeature[uid].index = segmentData.index;\n      } else if (dragSegment[1] == 1) {\n        segmentsByFeature[uid].left = segmentData;\n        segmentsByFeature[uid].index = segmentData.index + 1;\n      }\n\n    }\n    for (uid in segmentsByFeature) {\n      right = segmentsByFeature[uid].right;\n      left = segmentsByFeature[uid].left;\n      index = segmentsByFeature[uid].index;\n      newIndex = index - 1;\n      if (left !== undefined) {\n        segmentData = left;\n      } else {\n        segmentData = right;\n      }\n      if (newIndex < 0) {\n        newIndex = 0;\n      }\n      geometry = segmentData.geometry;\n      coordinates = geometry.getCoordinates();\n      component = coordinates;\n      deleted = false;\n      switch (geometry.getType()) {\n        case GeometryType.MULTI_LINE_STRING:\n          if (coordinates[segmentData.depth[0]].length > 2) {\n            coordinates[segmentData.depth[0]].splice(index, 1);\n            deleted = true;\n          }\n          break;\n        case GeometryType.LINE_STRING:\n          if (coordinates.length > 2) {\n            coordinates.splice(index, 1);\n            deleted = true;\n          }\n          break;\n        case GeometryType.MULTI_POLYGON:\n          component = component[segmentData.depth[1]];\n          /* falls through */\n        case GeometryType.POLYGON:\n          component = component[segmentData.depth[0]];\n          if (component.length > 4) {\n            if (index == component.length - 1) {\n              index = 0;\n            }\n            component.splice(index, 1);\n            deleted = true;\n            if (index === 0) {\n              // close the ring again\n              component.pop();\n              component.push(component[0]);\n              newIndex = component.length - 1;\n            }\n          }\n          break;\n        default:\n          // pass\n      }\n\n      if (deleted) {\n        this.setGeometryCoordinates_(geometry, coordinates);\n        var segments = [];\n        if (left !== undefined) {\n          this.rBush_.remove(left);\n          segments.push(left.segment[0]);\n        }\n        if (right !== undefined) {\n          this.rBush_.remove(right);\n          segments.push(right.segment[1]);\n        }\n        if (left !== undefined && right !== undefined) {\n          var newSegmentData = /** @type {SegmentData} */ ({\n            depth: segmentData.depth,\n            feature: segmentData.feature,\n            geometry: segmentData.geometry,\n            index: newIndex,\n            segment: segments\n          });\n          this.rBush_.insert(boundingExtent(newSegmentData.segment),\n            newSegmentData);\n        }\n        this.updateSegmentIndices_(geometry, index, segmentData.depth, -1);\n        if (this.vertexFeature_) {\n          /** @type {VectorSource} */ (this.overlay_.getSource()).removeFeature(this.vertexFeature_);\n          this.vertexFeature_ = null;\n        }\n        dragSegments.length = 0;\n      }\n\n    }\n    return deleted;\n  };\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {Array} coordinates Coordinates.\n   * @private\n   */\n  Modify.prototype.setGeometryCoordinates_ = function setGeometryCoordinates_ (geometry, coordinates) {\n    this.changingFeature_ = true;\n    geometry.setCoordinates(coordinates);\n    this.changingFeature_ = false;\n  };\n\n  /**\n   * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n   * @param {number} index Index.\n   * @param {Array<number>|undefined} depth Depth.\n   * @param {number} delta Delta (1 or -1).\n   * @private\n   */\n  Modify.prototype.updateSegmentIndices_ = function updateSegmentIndices_ (geometry, index, depth, delta) {\n    this.rBush_.forEachInExtent(geometry.getExtent(), function(segmentDataMatch) {\n      if (segmentDataMatch.geometry === geometry &&\n          (depth === undefined || segmentDataMatch.depth === undefined ||\n          equals(segmentDataMatch.depth, depth)) &&\n          segmentDataMatch.index > index) {\n        segmentDataMatch.index += delta;\n      }\n    });\n  };\n\n  return Modify;\n}(PointerInteraction));\n\n\n/**\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in indexes.\n */\nfunction compareIndexes(a, b) {\n  return a.index - b.index;\n}\n\n\n/**\n * Returns the distance from a point to a line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The coordinates of the point from\n *        which to calculate the distance.\n * @param {SegmentData} segmentData The object describing the line\n *        segment we are calculating the distance to.\n * @return {number} The square of the distance between a point and a line segment.\n */\nfunction pointDistanceToSegmentDataSquared(pointCoordinates, segmentData) {\n  var geometry = segmentData.geometry;\n\n  if (geometry.getType() === GeometryType.CIRCLE) {\n    var circleGeometry = /** @type {import(\"../geom/Circle.js\").default} */ (geometry);\n\n    if (segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n      var distanceToCenterSquared =\n            squaredCoordinateDistance(circleGeometry.getCenter(), pointCoordinates);\n      var distanceToCircumference =\n            Math.sqrt(distanceToCenterSquared) - circleGeometry.getRadius();\n      return distanceToCircumference * distanceToCircumference;\n    }\n  }\n  return squaredDistanceToSegment(pointCoordinates, segmentData.segment);\n}\n\n/**\n * Returns the point closest to a given line segment.\n *\n * @param {import(\"../coordinate.js\").Coordinate} pointCoordinates The point to which a closest point\n *        should be found.\n * @param {SegmentData} segmentData The object describing the line\n *        segment which should contain the closest point.\n * @return {import(\"../coordinate.js\").Coordinate} The point closest to the specified line segment.\n */\nfunction closestOnSegmentData(pointCoordinates, segmentData) {\n  var geometry = segmentData.geometry;\n\n  if (geometry.getType() === GeometryType.CIRCLE &&\n  segmentData.index === CIRCLE_CIRCUMFERENCE_INDEX) {\n    return geometry.getClosestPoint(pointCoordinates);\n  }\n  return closestOnSegment(pointCoordinates, segmentData.segment);\n}\n\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  var style = createEditingStyle();\n  return function(feature, resolution) {\n    return style[GeometryType.POINT];\n  };\n}\n\n\nexport default Modify;\n\n//# sourceMappingURL=Modify.js.map","/**\n * @module ol/interaction/Select\n */\nimport {getUid} from '../util.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport {extend, includes} from '../array.js';\nimport {listen} from '../events.js';\nimport Event from '../events/Event.js';\nimport {singleClick, never, shiftKeyOnly, pointerMove} from '../events/condition.js';\nimport {TRUE} from '../functions.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport Interaction from './Interaction.js';\nimport VectorLayer from '../layer/Vector.js';\nimport {clear} from '../obj.js';\nimport VectorSource from '../source/Vector.js';\nimport {createEditingStyle} from '../style/Style.js';\n\n\n/**\n * @enum {string}\n */\nvar SelectEventType = {\n  /**\n   * Triggered when feature(s) has been (de)selected.\n   * @event SelectEvent#select\n   * @api\n   */\n  SELECT: 'select'\n};\n\n\n/**\n * A function that takes an {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default):boolean} FilterFunction\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../events/condition.js\").Condition} [addCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is the event\n * for the selected features as a whole. By default, this is\n * {@link module:ol/events/condition~singleClick}. Clicking on a feature selects that\n * feature and removes any that were in the selection. Clicking outside any\n * feature removes all from the selection.\n * See `toggle`, `add`, `remove` options for adding/removing extra features to/\n * from the selection.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers]\n * A list of layers from which features should be selected. Alternatively, a\n * filter function can be provided. The function will be called for each layer\n * in the map and should return `true` for layers that you want to be\n * selectable. If the option is absent, all visible layers will be considered\n * selectable.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for the selected features. By default the default edit style is used\n * (see {@link module:ol/style}).\n * @property {import(\"../events/condition.js\").Condition} [removeCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default, this is {@link module:ol/events/condition~never}. Use this if you\n * want to use different events for add and remove instead of `toggle`.\n * @property {import(\"../events/condition.js\").Condition} [toggleCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled. This is in addition\n * to the `condition` event. By default,\n * {@link module:ol/events/condition~shiftKeyOnly}, i.e. pressing `shift` as\n * well as the `condition` event, adds that feature to the current selection if\n * it is not currently selected, and removes it if it is. See `add` and `remove`\n * if you want to use different events instead of a toggle.\n * @property {boolean} [multi=false] A boolean that determines if the default\n * behaviour should select only single features or all (overlapping) features at\n * the clicked map position. The default of `false` means single select.\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features]\n * Collection where the interaction will place selected features. Optional. If\n * not set the interaction will create a collection. In any case the collection\n * used by the interaction is returned by\n * {@link module:ol/interaction/Select~Select#getFeatures}.\n * @property {FilterFunction} [filter] A function\n * that takes an {@link module:ol/Feature} and an\n * {@link module:ol/layer/Layer} and returns `true` if the feature may be\n * selected or `false` otherwise.\n * @property {boolean} [wrapX=true] Wrap the world horizontally on the selection\n * overlay.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside\n * the radius around the given position will be checked for features. This only\n * works for the canvas renderer and not for WebGL.\n */\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Select~Select} instances are instances of\n * this type.\n */\nvar SelectEvent = /*@__PURE__*/(function (Event) {\n  function SelectEvent(type, selected, deselected, mapBrowserEvent) {\n    Event.call(this, type);\n\n    /**\n     * Selected features array.\n     * @type {Array<import(\"../Feature.js\").default>}\n     * @api\n     */\n    this.selected = selected;\n\n    /**\n     * Deselected features array.\n     * @type {Array<import(\"../Feature.js\").default>}\n     * @api\n     */\n    this.deselected = deselected;\n\n    /**\n     * Associated {@link module:ol/MapBrowserEvent}.\n     * @type {import(\"../MapBrowserEvent.js\").default}\n     * @api\n     */\n    this.mapBrowserEvent = mapBrowserEvent;\n\n  }\n\n  if ( Event ) SelectEvent.__proto__ = Event;\n  SelectEvent.prototype = Object.create( Event && Event.prototype );\n  SelectEvent.prototype.constructor = SelectEvent;\n\n  return SelectEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Interaction for selecting vector features. By default, selected features are\n * styled differently, so this interaction can be used for visual highlighting,\n * as well as selecting features for other actions, such as modification or\n * output. There are three ways of controlling which features are selected:\n * using the browser event as defined by the `condition` and optionally the\n * `toggle`, `add`/`remove`, and `multi` options; a `layers` filter; and a\n * further feature filter using the `filter` option.\n *\n * Selected features are added to an internal unmanaged layer.\n *\n * @fires SelectEvent\n * @api\n */\nvar Select = /*@__PURE__*/(function (Interaction) {\n  function Select(opt_options) {\n\n    Interaction.call(this, {\n      handleEvent: handleEvent\n    });\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.condition_ = options.condition ? options.condition : singleClick;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.addCondition_ = options.addCondition ? options.addCondition : never;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.removeCondition_ = options.removeCondition ? options.removeCondition : never;\n\n    /**\n     * @private\n     * @type {import(\"../events/condition.js\").Condition}\n     */\n    this.toggleCondition_ = options.toggleCondition ? options.toggleCondition : shiftKeyOnly;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.multi_ = options.multi ? options.multi : false;\n\n    /**\n     * @private\n     * @type {FilterFunction}\n     */\n    this.filter_ = options.filter ? options.filter : TRUE;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n    var featureOverlay = new VectorLayer({\n      source: new VectorSource({\n        useSpatialIndex: false,\n        features: options.features,\n        wrapX: options.wrapX\n      }),\n      style: options.style ? options.style :\n        getDefaultStyleFunction(),\n      updateWhileAnimating: true,\n      updateWhileInteracting: true\n    });\n\n    /**\n     * @private\n     * @type {VectorLayer}\n     */\n    this.featureOverlay_ = featureOverlay;\n\n    /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n    var layerFilter;\n    if (options.layers) {\n      if (typeof options.layers === 'function') {\n        layerFilter = options.layers;\n      } else {\n        var layers = options.layers;\n        layerFilter = function(layer) {\n          return includes(layers, layer);\n        };\n      }\n    } else {\n      layerFilter = TRUE;\n    }\n\n    /**\n     * @private\n     * @type {function(import(\"../layer/Layer.js\").default): boolean}\n     */\n    this.layerFilter_ = layerFilter;\n\n    /**\n     * An association between selected feature (key)\n     * and layer (value)\n     * @private\n     * @type {Object<string, import(\"../layer/Layer.js\").default>}\n     */\n    this.featureLayerAssociation_ = {};\n\n    var features = this.getFeatures();\n    listen(features, CollectionEventType.ADD,\n      this.addFeature_, this);\n    listen(features, CollectionEventType.REMOVE,\n      this.removeFeature_, this);\n  }\n\n  if ( Interaction ) Select.__proto__ = Interaction;\n  Select.prototype = Object.create( Interaction && Interaction.prototype );\n  Select.prototype.constructor = Select;\n\n  /**\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @param {import(\"../layer/Layer.js\").default} layer Layer.\n   * @private\n   */\n  Select.prototype.addFeatureLayerAssociation_ = function addFeatureLayerAssociation_ (feature, layer) {\n    this.featureLayerAssociation_[getUid(feature)] = layer;\n  };\n\n  /**\n   * Get the selected features.\n   * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} Features collection.\n   * @api\n   */\n  Select.prototype.getFeatures = function getFeatures () {\n    return /** @type {VectorSource} */ (this.featureOverlay_.getSource()).getFeaturesCollection();\n  };\n\n  /**\n   * Returns the Hit-detection tolerance.\n   * @returns {number} Hit tolerance in pixels.\n   * @api\n   */\n  Select.prototype.getHitTolerance = function getHitTolerance () {\n    return this.hitTolerance_;\n  };\n\n  /**\n   * Returns the associated {@link module:ol/layer/Vector~Vector vectorlayer} of\n   * the (last) selected feature. Note that this will not work with any\n   * programmatic method like pushing features to\n   * {@link module:ol/interaction/Select~Select#getFeatures collection}.\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature\n   * @return {VectorLayer} Layer.\n   * @api\n   */\n  Select.prototype.getLayer = function getLayer (feature) {\n    return (\n      /** @type {VectorLayer} */ (this.featureLayerAssociation_[getUid(feature)])\n    );\n  };\n\n  /**\n   * Get the overlay layer that this interaction renders selected features to.\n   * @return {VectorLayer} Overlay layer.\n   * @api\n   */\n  Select.prototype.getOverlay = function getOverlay () {\n    return this.featureOverlay_;\n  };\n\n  /**\n   * Hit-detection tolerance. Pixels inside the radius around the given position\n   * will be checked for features. This only works for the canvas renderer and\n   * not for WebGL.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @api\n   */\n  Select.prototype.setHitTolerance = function setHitTolerance (hitTolerance) {\n    this.hitTolerance_ = hitTolerance;\n  };\n\n  /**\n   * Remove the interaction from its current map, if any,  and attach it to a new\n   * map, if any. Pass `null` to just remove the interaction from the current map.\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @override\n   * @api\n   */\n  Select.prototype.setMap = function setMap (map) {\n    var currentMap = this.getMap();\n    var selectedFeatures = this.getFeatures();\n    if (currentMap) {\n      selectedFeatures.forEach(currentMap.unskipFeature.bind(currentMap));\n    }\n    Interaction.prototype.setMap.call(this, map);\n    this.featureOverlay_.setMap(map);\n    if (map) {\n      selectedFeatures.forEach(map.skipFeature.bind(map));\n    }\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Select.prototype.addFeature_ = function addFeature_ (evt) {\n    var map = this.getMap();\n    if (map) {\n      map.skipFeature(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n    }\n  };\n\n  /**\n   * @param {import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Select.prototype.removeFeature_ = function removeFeature_ (evt) {\n    var map = this.getMap();\n    if (map) {\n      map.unskipFeature(/** @type {import(\"../Feature.js\").default} */ (evt.element));\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n   * @private\n   */\n  Select.prototype.removeFeatureLayerAssociation_ = function removeFeatureLayerAssociation_ (feature) {\n    delete this.featureLayerAssociation_[getUid(feature)];\n  };\n\n  return Select;\n}(Interaction));\n\n\n/**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may change the\n * selected state of features.\n * @param {import(\"../MapBrowserEvent.js\").default} mapBrowserEvent Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @this {Select}\n */\nfunction handleEvent(mapBrowserEvent) {\n  if (!this.condition_(mapBrowserEvent)) {\n    return true;\n  }\n  var add = this.addCondition_(mapBrowserEvent);\n  var remove = this.removeCondition_(mapBrowserEvent);\n  var toggle = this.toggleCondition_(mapBrowserEvent);\n  var set = !add && !remove && !toggle;\n  var map = mapBrowserEvent.map;\n  var features = this.getFeatures();\n  var deselected = [];\n  var selected = [];\n  if (set) {\n    // Replace the currently selected feature(s) with the feature(s) at the\n    // pixel, or clear the selected feature(s) if there is no feature at\n    // the pixel.\n    clear(this.featureLayerAssociation_);\n    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,\n      (\n        /**\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @return {boolean|undefined} Continue to iterate over the features.\n         */\n        function(feature, layer) {\n          if (this.filter_(feature, layer)) {\n            selected.push(feature);\n            this.addFeatureLayerAssociation_(feature, layer);\n            return !this.multi_;\n          }\n        }).bind(this), {\n        layerFilter: this.layerFilter_,\n        hitTolerance: this.hitTolerance_\n      });\n    for (var i = features.getLength() - 1; i >= 0; --i) {\n      var feature = features.item(i);\n      var index = selected.indexOf(feature);\n      if (index > -1) {\n        // feature is already selected\n        selected.splice(index, 1);\n      } else {\n        features.remove(feature);\n        deselected.push(feature);\n      }\n    }\n    if (selected.length !== 0) {\n      features.extend(selected);\n    }\n  } else {\n    // Modify the currently selected feature(s).\n    map.forEachFeatureAtPixel(mapBrowserEvent.pixel,\n      (\n        /**\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @return {boolean|undefined} Continue to iterate over the features.\n         */\n        function(feature, layer) {\n          if (this.filter_(feature, layer)) {\n            if ((add || toggle) && !includes(features.getArray(), feature)) {\n              selected.push(feature);\n              this.addFeatureLayerAssociation_(feature, layer);\n            } else if ((remove || toggle) && includes(features.getArray(), feature)) {\n              deselected.push(feature);\n              this.removeFeatureLayerAssociation_(feature);\n            }\n            return !this.multi_;\n          }\n        }).bind(this), {\n        layerFilter: this.layerFilter_,\n        hitTolerance: this.hitTolerance_\n      });\n    for (var j = deselected.length - 1; j >= 0; --j) {\n      features.remove(deselected[j]);\n    }\n    features.extend(selected);\n  }\n  if (selected.length > 0 || deselected.length > 0) {\n    this.dispatchEvent(\n      new SelectEvent(SelectEventType.SELECT,\n        selected, deselected, mapBrowserEvent));\n  }\n  return pointerMove(mapBrowserEvent);\n}\n\n\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n  var styles = createEditingStyle();\n  extend(styles[GeometryType.POLYGON], styles[GeometryType.LINE_STRING]);\n  extend(styles[GeometryType.GEOMETRY_COLLECTION], styles[GeometryType.LINE_STRING]);\n\n  return function(feature, resolution) {\n    if (!feature.getGeometry()) {\n      return null;\n    }\n    return styles[feature.getGeometry().getType()];\n  };\n}\n\n\nexport default Select;\n\n//# sourceMappingURL=Select.js.map","/**\n * @module ol/interaction/Snap\n */\nimport {getUid} from '../util.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport {distance as coordinateDistance, squaredDistance as squaredCoordinateDistance, closestOnCircle, closestOnSegment, squaredDistanceToSegment} from '../coordinate.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {boundingExtent, createEmpty} from '../extent.js';\nimport {TRUE, FALSE} from '../functions.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport {fromCircle} from '../geom/Polygon.js';\nimport PointerInteraction from './Pointer.js';\nimport {getValues} from '../obj.js';\nimport VectorEventType from '../source/VectorEventType.js';\nimport RBush from '../structs/RBush.js';\n\n\n/**\n * @typedef {Object} Result\n * @property {boolean} snapped\n * @property {import(\"../coordinate.js\").Coordinate|null} vertex\n * @property {import(\"../pixel.js\").Pixel|null} vertexPixel\n */\n\n\n/**\n * @typedef {Object} SegmentData\n * @property {import(\"../Feature.js\").default} feature\n * @property {Array<import(\"../coordinate.js\").Coordinate>} segment\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../Collection.js\").default<import(\"../Feature.js\").default>} [features] Snap to these features. Either this option or source should be provided.\n * @property {boolean} [edge=true] Snap to edges.\n * @property {boolean} [vertex=true] Snap to vertices.\n * @property {number} [pixelTolerance=10] Pixel tolerance for considering the pointer close enough to a segment or\n * vertex for snapping.\n * @property {import(\"../source/Vector.js\").default} [source] Snap to features from this source. Either this option or features should be provided\n */\n\n\n/**\n * @param  {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n * @return {import(\"../Feature.js\").default} Feature.\n */\nfunction getFeatureFromEvent(evt) {\n  if (/** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature) {\n    return /** @type {import(\"../source/Vector.js\").VectorSourceEvent} */ (evt).feature;\n  } else if (/** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element) {\n    return /** @type {import(\"../Feature.js\").default} */ (/** @type {import(\"../Collection.js\").CollectionEvent} */ (evt).element);\n  }\n\n}\n\n/**\n * @classdesc\n * Handles snapping of vector features while modifying or drawing them.  The\n * features can come from a {@link module:ol/source/Vector} or {@link module:ol/Collection~Collection}\n * Any interaction object that allows the user to interact\n * with the features using the mouse can benefit from the snapping, as long\n * as it is added before.\n *\n * The snap interaction modifies map browser event `coordinate` and `pixel`\n * properties to force the snap to occur to any interaction that them.\n *\n * Example:\n *\n *     import Snap from 'ol/interaction/Snap';\n *\n *     var snap = new Snap({\n *       source: source\n *     });\n *\n * @api\n */\nvar Snap = /*@__PURE__*/(function (PointerInteraction) {\n  function Snap(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n\n    if (!pointerOptions.handleDownEvent) {\n      pointerOptions.handleDownEvent = TRUE;\n    }\n\n    if (!pointerOptions.stopDown) {\n      pointerOptions.stopDown = FALSE;\n    }\n\n    PointerInteraction.call(this, pointerOptions);\n\n    /**\n     * @type {import(\"../source/Vector.js\").default}\n     * @private\n     */\n    this.source_ = options.source ? options.source : null;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.vertex_ = options.vertex !== undefined ? options.vertex : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.edge_ = options.edge !== undefined ? options.edge : true;\n\n    /**\n     * @type {import(\"../Collection.js\").default<import(\"../Feature.js\").default>}\n     * @private\n     */\n    this.features_ = options.features ? options.features : null;\n\n    /**\n     * @type {Array<import(\"../events.js\").EventsKey>}\n     * @private\n     */\n    this.featuresListenerKeys_ = [];\n\n    /**\n     * @type {Object<string, import(\"../events.js\").EventsKey>}\n     * @private\n     */\n    this.featureChangeListenerKeys_ = {};\n\n    /**\n     * Extents are preserved so indexed segment can be quickly removed\n     * when its feature geometry changes\n     * @type {Object<string, import(\"../extent.js\").Extent>}\n     * @private\n     */\n    this.indexedFeaturesExtents_ = {};\n\n    /**\n     * If a feature geometry changes while a pointer drag|move event occurs, the\n     * feature doesn't get updated right away.  It will be at the next 'pointerup'\n     * event fired.\n     * @type {!Object<string, import(\"../Feature.js\").default>}\n     * @private\n     */\n    this.pendingFeatures_ = {};\n\n    /**\n     * Used for distance sorting in sortByDistance_\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.pixelCoordinate_ = null;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.pixelTolerance_ = options.pixelTolerance !== undefined ?\n      options.pixelTolerance : 10;\n\n    /**\n     * @type {function(SegmentData, SegmentData): number}\n     * @private\n     */\n    this.sortByDistance_ = sortByDistance.bind(this);\n\n\n    /**\n    * Segment RTree for each layer\n    * @type {import(\"../structs/RBush.js\").default<SegmentData>}\n    * @private\n    */\n    this.rBush_ = new RBush();\n\n\n    /**\n    * @const\n    * @private\n    * @type {Object<string, function(import(\"../Feature.js\").default, import(\"../geom/Geometry.js\").default)>}\n    */\n    this.SEGMENT_WRITERS_ = {\n      'Point': this.writePointGeometry_,\n      'LineString': this.writeLineStringGeometry_,\n      'LinearRing': this.writeLineStringGeometry_,\n      'Polygon': this.writePolygonGeometry_,\n      'MultiPoint': this.writeMultiPointGeometry_,\n      'MultiLineString': this.writeMultiLineStringGeometry_,\n      'MultiPolygon': this.writeMultiPolygonGeometry_,\n      'GeometryCollection': this.writeGeometryCollectionGeometry_,\n      'Circle': this.writeCircleGeometry_\n    };\n  }\n\n  if ( PointerInteraction ) Snap.__proto__ = PointerInteraction;\n  Snap.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  Snap.prototype.constructor = Snap;\n\n  /**\n   * Add a feature to the collection of features that we may snap to.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {boolean=} opt_listen Whether to listen to the feature change or not\n   *     Defaults to `true`.\n   * @api\n   */\n  Snap.prototype.addFeature = function addFeature (feature, opt_listen) {\n    var register = opt_listen !== undefined ? opt_listen : true;\n    var feature_uid = getUid(feature);\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      var segmentWriter = this.SEGMENT_WRITERS_[geometry.getType()];\n      if (segmentWriter) {\n        this.indexedFeaturesExtents_[feature_uid] = geometry.getExtent(createEmpty());\n        segmentWriter.call(this, feature, geometry);\n      }\n    }\n\n    if (register) {\n      this.featureChangeListenerKeys_[feature_uid] = listen(\n        feature,\n        EventType.CHANGE,\n        this.handleFeatureChange_, this);\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @private\n   */\n  Snap.prototype.forEachFeatureAdd_ = function forEachFeatureAdd_ (feature) {\n    this.addFeature(feature);\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @private\n   */\n  Snap.prototype.forEachFeatureRemove_ = function forEachFeatureRemove_ (feature) {\n    this.removeFeature(feature);\n  };\n\n  /**\n   * @return {import(\"../Collection.js\").default<import(\"../Feature.js\").default>|Array<import(\"../Feature.js\").default>} Features.\n   * @private\n   */\n  Snap.prototype.getFeatures_ = function getFeatures_ () {\n    var features;\n    if (this.features_) {\n      features = this.features_;\n    } else if (this.source_) {\n      features = this.source_.getFeatures();\n    }\n    return features;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Snap.prototype.handleEvent = function handleEvent (evt) {\n    var result = this.snapTo(evt.pixel, evt.coordinate, evt.map);\n    if (result.snapped) {\n      evt.coordinate = result.vertex.slice(0, 2);\n      evt.pixel = result.vertexPixel;\n    }\n    return PointerInteraction.prototype.handleEvent.call(this, evt);\n  };\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Snap.prototype.handleFeatureAdd_ = function handleFeatureAdd_ (evt) {\n    var feature = getFeatureFromEvent(evt);\n    this.addFeature(feature);\n  };\n\n  /**\n   * @param {import(\"../source/Vector.js\").VectorSourceEvent|import(\"../Collection.js\").CollectionEvent} evt Event.\n   * @private\n   */\n  Snap.prototype.handleFeatureRemove_ = function handleFeatureRemove_ (evt) {\n    var feature = getFeatureFromEvent(evt);\n    this.removeFeature(feature);\n  };\n\n  /**\n   * @param {import(\"../events/Event.js\").default} evt Event.\n   * @private\n   */\n  Snap.prototype.handleFeatureChange_ = function handleFeatureChange_ (evt) {\n    var feature = /** @type {import(\"../Feature.js\").default} */ (evt.target);\n    if (this.handlingDownUpSequence) {\n      var uid = getUid(feature);\n      if (!(uid in this.pendingFeatures_)) {\n        this.pendingFeatures_[uid] = feature;\n      }\n    } else {\n      this.updateFeature_(feature);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Snap.prototype.handleUpEvent = function handleUpEvent (evt) {\n    var featuresToUpdate = getValues(this.pendingFeatures_);\n    if (featuresToUpdate.length) {\n      featuresToUpdate.forEach(this.updateFeature_.bind(this));\n      this.pendingFeatures_ = {};\n    }\n    return false;\n  };\n\n  /**\n   * Remove a feature from the collection of features that we may snap to.\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {boolean=} opt_unlisten Whether to unlisten to the feature change\n   *     or not. Defaults to `true`.\n   * @api\n   */\n  Snap.prototype.removeFeature = function removeFeature (feature, opt_unlisten) {\n    var unregister = opt_unlisten !== undefined ? opt_unlisten : true;\n    var feature_uid = getUid(feature);\n    var extent = this.indexedFeaturesExtents_[feature_uid];\n    if (extent) {\n      var rBush = this.rBush_;\n      var nodesToRemove = [];\n      rBush.forEachInExtent(extent, function(node) {\n        if (feature === node.feature) {\n          nodesToRemove.push(node);\n        }\n      });\n      for (var i = nodesToRemove.length - 1; i >= 0; --i) {\n        rBush.remove(nodesToRemove[i]);\n      }\n    }\n\n    if (unregister) {\n      unlistenByKey(this.featureChangeListenerKeys_[feature_uid]);\n      delete this.featureChangeListenerKeys_[feature_uid];\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Snap.prototype.setMap = function setMap (map) {\n    var currentMap = this.getMap();\n    var keys = this.featuresListenerKeys_;\n    var features = /** @type {Array<import(\"../Feature.js\").default>} */ (this.getFeatures_());\n\n    if (currentMap) {\n      keys.forEach(unlistenByKey);\n      keys.length = 0;\n      features.forEach(this.forEachFeatureRemove_.bind(this));\n    }\n    PointerInteraction.prototype.setMap.call(this, map);\n\n    if (map) {\n      if (this.features_) {\n        keys.push(\n          listen(this.features_, CollectionEventType.ADD,\n            this.handleFeatureAdd_, this),\n          listen(this.features_, CollectionEventType.REMOVE,\n            this.handleFeatureRemove_, this)\n        );\n      } else if (this.source_) {\n        keys.push(\n          listen(this.source_, VectorEventType.ADDFEATURE,\n            this.handleFeatureAdd_, this),\n          listen(this.source_, VectorEventType.REMOVEFEATURE,\n            this.handleFeatureRemove_, this)\n        );\n      }\n      features.forEach(this.forEachFeatureAdd_.bind(this));\n    }\n  };\n\n  /**\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel\n   * @param {import(\"../coordinate.js\").Coordinate} pixelCoordinate Coordinate\n   * @param {import(\"../PluggableMap.js\").default} map Map.\n   * @return {Result} Snap result\n   */\n  Snap.prototype.snapTo = function snapTo (pixel, pixelCoordinate, map) {\n\n    var lowerLeft = map.getCoordinateFromPixel(\n      [pixel[0] - this.pixelTolerance_, pixel[1] + this.pixelTolerance_]);\n    var upperRight = map.getCoordinateFromPixel(\n      [pixel[0] + this.pixelTolerance_, pixel[1] - this.pixelTolerance_]);\n    var box = boundingExtent([lowerLeft, upperRight]);\n\n    var segments = this.rBush_.getInExtent(box);\n\n    // If snapping on vertices only, don't consider circles\n    if (this.vertex_ && !this.edge_) {\n      segments = segments.filter(function(segment) {\n        return segment.feature.getGeometry().getType() !==\n            GeometryType.CIRCLE;\n      });\n    }\n\n    var snappedToVertex = false;\n    var snapped = false;\n    var vertex = null;\n    var vertexPixel = null;\n    var dist, pixel1, pixel2, squaredDist1, squaredDist2;\n    if (segments.length > 0) {\n      this.pixelCoordinate_ = pixelCoordinate;\n      segments.sort(this.sortByDistance_);\n      var closestSegment = segments[0].segment;\n      var isCircle = segments[0].feature.getGeometry().getType() ===\n          GeometryType.CIRCLE;\n      if (this.vertex_ && !this.edge_) {\n        pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n        pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n        squaredDist1 = squaredCoordinateDistance(pixel, pixel1);\n        squaredDist2 = squaredCoordinateDistance(pixel, pixel2);\n        dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n        snappedToVertex = dist <= this.pixelTolerance_;\n        if (snappedToVertex) {\n          snapped = true;\n          vertex = squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n          vertexPixel = map.getPixelFromCoordinate(vertex);\n        }\n      } else if (this.edge_) {\n        if (isCircle) {\n          vertex = closestOnCircle(pixelCoordinate,\n            /** @type {import(\"../geom/Circle.js\").default} */ (segments[0].feature.getGeometry()));\n        } else {\n          vertex = closestOnSegment(pixelCoordinate, closestSegment);\n        }\n        vertexPixel = map.getPixelFromCoordinate(vertex);\n        if (coordinateDistance(pixel, vertexPixel) <= this.pixelTolerance_) {\n          snapped = true;\n          if (this.vertex_ && !isCircle) {\n            pixel1 = map.getPixelFromCoordinate(closestSegment[0]);\n            pixel2 = map.getPixelFromCoordinate(closestSegment[1]);\n            squaredDist1 = squaredCoordinateDistance(vertexPixel, pixel1);\n            squaredDist2 = squaredCoordinateDistance(vertexPixel, pixel2);\n            dist = Math.sqrt(Math.min(squaredDist1, squaredDist2));\n            snappedToVertex = dist <= this.pixelTolerance_;\n            if (snappedToVertex) {\n              vertex = squaredDist1 > squaredDist2 ? closestSegment[1] : closestSegment[0];\n              vertexPixel = map.getPixelFromCoordinate(vertex);\n            }\n          }\n        }\n      }\n      if (snapped) {\n        vertexPixel = [Math.round(vertexPixel[0]), Math.round(vertexPixel[1])];\n      }\n    }\n    return (\n      /** @type {Result} */ ({\n        snapped: snapped,\n        vertex: vertex,\n        vertexPixel: vertexPixel\n      })\n    );\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @private\n   */\n  Snap.prototype.updateFeature_ = function updateFeature_ (feature) {\n    this.removeFeature(feature, false);\n    this.addFeature(feature, false);\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeCircleGeometry_ = function writeCircleGeometry_ (feature, geometry) {\n    var polygon = fromCircle(geometry);\n    var coordinates = polygon.getCoordinates()[0];\n    for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n      var segment = coordinates.slice(i, i + 2);\n      var segmentData = /** @type {SegmentData} */ ({\n        feature: feature,\n        segment: segment\n      });\n      this.rBush_.insert(boundingExtent(segment), segmentData);\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeGeometryCollectionGeometry_ = function writeGeometryCollectionGeometry_ (feature, geometry) {\n    var geometries = geometry.getGeometriesArray();\n    for (var i = 0; i < geometries.length; ++i) {\n      var segmentWriter = this.SEGMENT_WRITERS_[geometries[i].getType()];\n      if (segmentWriter) {\n        segmentWriter.call(this, feature, geometries[i]);\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/LineString.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeLineStringGeometry_ = function writeLineStringGeometry_ (feature, geometry) {\n    var coordinates = geometry.getCoordinates();\n    for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n      var segment = coordinates.slice(i, i + 2);\n      var segmentData = /** @type {SegmentData} */ ({\n        feature: feature,\n        segment: segment\n      });\n      this.rBush_.insert(boundingExtent(segment), segmentData);\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/MultiLineString.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeMultiLineStringGeometry_ = function writeMultiLineStringGeometry_ (feature, geometry) {\n    var lines = geometry.getCoordinates();\n    for (var j = 0, jj = lines.length; j < jj; ++j) {\n      var coordinates = lines[j];\n      for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        var segment = coordinates.slice(i, i + 2);\n        var segmentData = /** @type {SegmentData} */ ({\n          feature: feature,\n          segment: segment\n        });\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeMultiPointGeometry_ = function writeMultiPointGeometry_ (feature, geometry) {\n    var points = geometry.getCoordinates();\n    for (var i = 0, ii = points.length; i < ii; ++i) {\n      var coordinates = points[i];\n      var segmentData = /** @type {SegmentData} */ ({\n        feature: feature,\n        segment: [coordinates, coordinates]\n      });\n      this.rBush_.insert(geometry.getExtent(), segmentData);\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writeMultiPolygonGeometry_ = function writeMultiPolygonGeometry_ (feature, geometry) {\n    var polygons = geometry.getCoordinates();\n    for (var k = 0, kk = polygons.length; k < kk; ++k) {\n      var rings = polygons[k];\n      for (var j = 0, jj = rings.length; j < jj; ++j) {\n        var coordinates = rings[j];\n        for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n          var segment = coordinates.slice(i, i + 2);\n          var segmentData = /** @type {SegmentData} */ ({\n            feature: feature,\n            segment: segment\n          });\n          this.rBush_.insert(boundingExtent(segment), segmentData);\n        }\n      }\n    }\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/Point.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writePointGeometry_ = function writePointGeometry_ (feature, geometry) {\n    var coordinates = geometry.getCoordinates();\n    var segmentData = /** @type {SegmentData} */ ({\n      feature: feature,\n      segment: [coordinates, coordinates]\n    });\n    this.rBush_.insert(geometry.getExtent(), segmentData);\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature\n   * @param {import(\"../geom/Polygon.js\").default} geometry Geometry.\n   * @private\n   */\n  Snap.prototype.writePolygonGeometry_ = function writePolygonGeometry_ (feature, geometry) {\n    var rings = geometry.getCoordinates();\n    for (var j = 0, jj = rings.length; j < jj; ++j) {\n      var coordinates = rings[j];\n      for (var i = 0, ii = coordinates.length - 1; i < ii; ++i) {\n        var segment = coordinates.slice(i, i + 2);\n        var segmentData = /** @type {SegmentData} */ ({\n          feature: feature,\n          segment: segment\n        });\n        this.rBush_.insert(boundingExtent(segment), segmentData);\n      }\n    }\n  };\n\n  return Snap;\n}(PointerInteraction));\n\n\n/**\n * Sort segments by distance, helper function\n * @param {SegmentData} a The first segment data.\n * @param {SegmentData} b The second segment data.\n * @return {number} The difference in distance.\n * @this {Snap}\n */\nfunction sortByDistance(a, b) {\n  var deltaA = squaredDistanceToSegment(this.pixelCoordinate_, a.segment);\n  var deltaB = squaredDistanceToSegment(this.pixelCoordinate_, b.segment);\n  return deltaA - deltaB;\n}\n\nexport default Snap;\n\n//# sourceMappingURL=Snap.js.map","/**\n * @module ol/interaction/Translate\n */\nimport Collection from '../Collection.js';\nimport {getChangeEventType} from '../Object.js';\nimport {listen} from '../events.js';\nimport Event from '../events/Event.js';\nimport {TRUE} from '../functions.js';\nimport {includes} from '../array.js';\nimport PointerInteraction from './Pointer.js';\nimport InteractionProperty from './Property.js';\n\n\n/**\n * @enum {string}\n */\nvar TranslateEventType = {\n  /**\n   * Triggered upon feature translation start.\n   * @event TranslateEvent#translatestart\n   * @api\n   */\n  TRANSLATESTART: 'translatestart',\n  /**\n   * Triggered upon feature translation.\n   * @event TranslateEvent#translating\n   * @api\n   */\n  TRANSLATING: 'translating',\n  /**\n   * Triggered upon feature translation end.\n   * @event TranslateEvent#translateend\n   * @api\n   */\n  TRANSLATEEND: 'translateend'\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {Collection<import(\"../Feature.js\").default>} [features] Only features contained in this collection will be able to be translated. If\n * not specified, all features on the map will be able to be translated.\n * @property {Array<import(\"../layer/Layer.js\").default>|function(import(\"../layer/Layer.js\").default): boolean} [layers] A list of layers from which features should be\n * translated. Alternatively, a filter function can be provided. The\n * function will be called for each layer in the map and should return\n * `true` for layers that you want to be translatable. If the option is\n * absent, all visible layers will be considered translatable.\n * @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside the radius around the given position\n * will be checked for features. This only works for the canvas renderer and\n * not for WebGL.\n */\n\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Translate~Translate} instances\n * are instances of this type.\n */\nexport var TranslateEvent = /*@__PURE__*/(function (Event) {\n  function TranslateEvent(type, features, coordinate) {\n\n    Event.call(this, type);\n\n    /**\n     * The features being translated.\n     * @type {Collection<import(\"../Feature.js\").default>}\n     * @api\n     */\n    this.features = features;\n\n    /**\n     * The coordinate of the drag event.\n     * @const\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @api\n     */\n    this.coordinate = coordinate;\n\n  }\n\n  if ( Event ) TranslateEvent.__proto__ = Event;\n  TranslateEvent.prototype = Object.create( Event && Event.prototype );\n  TranslateEvent.prototype.constructor = TranslateEvent;\n\n  return TranslateEvent;\n}(Event));\n\n\n/**\n * @classdesc\n * Interaction for translating (moving) features.\n *\n * @fires TranslateEvent\n * @api\n */\nvar Translate = /*@__PURE__*/(function (PointerInteraction) {\n  function Translate(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    PointerInteraction.call(/** @type {import(\"./Pointer.js\").Options} */ this, (options));\n\n    /**\n     * The last position we translated to.\n     * @type {import(\"../coordinate.js\").Coordinate}\n     * @private\n     */\n    this.lastCoordinate_ = null;\n\n\n    /**\n     * @type {Collection<import(\"../Feature.js\").default>}\n     * @private\n     */\n    this.features_ = options.features !== undefined ? options.features : null;\n\n    /** @type {function(import(\"../layer/Layer.js\").default): boolean} */\n    var layerFilter;\n    if (options.layers) {\n      if (typeof options.layers === 'function') {\n        layerFilter = options.layers;\n      } else {\n        var layers = options.layers;\n        layerFilter = function(layer) {\n          return includes(layers, layer);\n        };\n      }\n    } else {\n      layerFilter = TRUE;\n    }\n\n    /**\n     * @private\n     * @type {function(import(\"../layer/Layer.js\").default): boolean}\n     */\n    this.layerFilter_ = layerFilter;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.hitTolerance_ = options.hitTolerance ? options.hitTolerance : 0;\n\n    /**\n     * @type {import(\"../Feature.js\").default}\n     * @private\n     */\n    this.lastFeature_ = null;\n\n    listen(this,\n      getChangeEventType(InteractionProperty.ACTIVE),\n      this.handleActiveChanged_, this);\n\n  }\n\n  if ( PointerInteraction ) Translate.__proto__ = PointerInteraction;\n  Translate.prototype = Object.create( PointerInteraction && PointerInteraction.prototype );\n  Translate.prototype.constructor = Translate;\n\n  /**\n   * @inheritDoc\n   */\n  Translate.prototype.handleDownEvent = function handleDownEvent (event) {\n    this.lastFeature_ = this.featuresAtPixel_(event.pixel, event.map);\n    if (!this.lastCoordinate_ && this.lastFeature_) {\n      this.lastCoordinate_ = event.coordinate;\n      this.handleMoveEvent(event);\n\n      var features = this.features_ || new Collection([this.lastFeature_]);\n\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATESTART, features,\n          event.coordinate));\n      return true;\n    }\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Translate.prototype.handleUpEvent = function handleUpEvent (event) {\n    if (this.lastCoordinate_) {\n      this.lastCoordinate_ = null;\n      this.handleMoveEvent(event);\n\n      var features = this.features_ || new Collection([this.lastFeature_]);\n\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATEEND, features,\n          event.coordinate));\n      return true;\n    }\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Translate.prototype.handleDragEvent = function handleDragEvent (event) {\n    if (this.lastCoordinate_) {\n      var newCoordinate = event.coordinate;\n      var deltaX = newCoordinate[0] - this.lastCoordinate_[0];\n      var deltaY = newCoordinate[1] - this.lastCoordinate_[1];\n\n      var features = this.features_ || new Collection([this.lastFeature_]);\n\n      features.forEach(function(feature) {\n        var geom = feature.getGeometry();\n        geom.translate(deltaX, deltaY);\n        feature.setGeometry(geom);\n      });\n\n      this.lastCoordinate_ = newCoordinate;\n      this.dispatchEvent(\n        new TranslateEvent(\n          TranslateEventType.TRANSLATING, features,\n          newCoordinate));\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Translate.prototype.handleMoveEvent = function handleMoveEvent (event) {\n    var elem = event.map.getViewport();\n\n    // Change the cursor to grab/grabbing if hovering any of the features managed\n    // by the interaction\n    if (this.featuresAtPixel_(event.pixel, event.map)) {\n      elem.classList.remove(this.lastCoordinate_ ? 'ol-grab' : 'ol-grabbing');\n      elem.classList.add(this.lastCoordinate_ ? 'ol-grabbing' : 'ol-grab');\n    } else {\n      elem.classList.remove('ol-grab', 'ol-grabbing');\n    }\n  };\n\n  /**\n   * Tests to see if the given coordinates intersects any of our selected\n   * features.\n   * @param {import(\"../pixel.js\").Pixel} pixel Pixel coordinate to test for intersection.\n   * @param {import(\"../PluggableMap.js\").default} map Map to test the intersection on.\n   * @return {import(\"../Feature.js\").default} Returns the feature found at the specified pixel\n   * coordinates.\n   * @private\n   */\n  Translate.prototype.featuresAtPixel_ = function featuresAtPixel_ (pixel, map) {\n    return map.forEachFeatureAtPixel(pixel,\n      function(feature) {\n        if (!this.features_ || includes(this.features_.getArray(), feature)) {\n          return feature;\n        }\n      }.bind(this), {\n        layerFilter: this.layerFilter_,\n        hitTolerance: this.hitTolerance_\n      });\n  };\n\n  /**\n   * Returns the Hit-detection tolerance.\n   * @returns {number} Hit tolerance in pixels.\n   * @api\n   */\n  Translate.prototype.getHitTolerance = function getHitTolerance () {\n    return this.hitTolerance_;\n  };\n\n  /**\n   * Hit-detection tolerance. Pixels inside the radius around the given position\n   * will be checked for features. This only works for the canvas renderer and\n   * not for WebGL.\n   * @param {number} hitTolerance Hit tolerance in pixels.\n   * @api\n   */\n  Translate.prototype.setHitTolerance = function setHitTolerance (hitTolerance) {\n    this.hitTolerance_ = hitTolerance;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Translate.prototype.setMap = function setMap (map) {\n    var oldMap = this.getMap();\n    PointerInteraction.prototype.setMap.call(this, map);\n    this.updateState_(oldMap);\n  };\n\n  /**\n   * @private\n   */\n  Translate.prototype.handleActiveChanged_ = function handleActiveChanged_ () {\n    this.updateState_(null);\n  };\n\n  /**\n   * @param {import(\"../PluggableMap.js\").default} oldMap Old map.\n   * @private\n   */\n  Translate.prototype.updateState_ = function updateState_ (oldMap) {\n    var map = this.getMap();\n    var active = this.getActive();\n    if (!map || !active) {\n      map = map || oldMap;\n      if (map) {\n        var elem = map.getViewport();\n        elem.classList.remove('ol-grab', 'ol-grabbing');\n      }\n    }\n  };\n\n  return Translate;\n}(PointerInteraction));\n\nexport default Translate;\n\n//# sourceMappingURL=Translate.js.map","/**\n * @module ol/geom/GeometryCollection\n */\nimport {listen, unlisten} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {createOrUpdateEmpty, closestSquaredDistanceXY, extend, getCenter} from '../extent.js';\nimport Geometry from './Geometry.js';\nimport GeometryType from './GeometryType.js';\nimport {clear} from '../obj.js';\n\n/**\n * @classdesc\n * An array of {@link module:ol/geom/Geometry} objects.\n *\n * @api\n */\nvar GeometryCollection = /*@__PURE__*/(function (Geometry) {\n  function GeometryCollection(opt_geometries) {\n\n    Geometry.call(this);\n\n    /**\n     * @private\n     * @type {Array<Geometry>}\n     */\n    this.geometries_ = opt_geometries ? opt_geometries : null;\n\n    this.listenGeometriesChange_();\n  }\n\n  if ( Geometry ) GeometryCollection.__proto__ = Geometry;\n  GeometryCollection.prototype = Object.create( Geometry && Geometry.prototype );\n  GeometryCollection.prototype.constructor = GeometryCollection;\n\n  /**\n   * @private\n   */\n  GeometryCollection.prototype.unlistenGeometriesChange_ = function unlistenGeometriesChange_ () {\n    if (!this.geometries_) {\n      return;\n    }\n    for (var i = 0, ii = this.geometries_.length; i < ii; ++i) {\n      unlisten(\n        this.geometries_[i], EventType.CHANGE,\n        this.changed, this);\n    }\n  };\n\n  /**\n   * @private\n   */\n  GeometryCollection.prototype.listenGeometriesChange_ = function listenGeometriesChange_ () {\n    if (!this.geometries_) {\n      return;\n    }\n    for (var i = 0, ii = this.geometries_.length; i < ii; ++i) {\n      listen(\n        this.geometries_[i], EventType.CHANGE,\n        this.changed, this);\n    }\n  };\n\n  /**\n   * Make a complete copy of the geometry.\n   * @return {!GeometryCollection} Clone.\n   * @override\n   * @api\n   */\n  GeometryCollection.prototype.clone = function clone () {\n    var geometryCollection = new GeometryCollection(null);\n    geometryCollection.setGeometries(this.geometries_);\n    return geometryCollection;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeometryCollection.prototype.closestPointXY = function closestPointXY (x, y, closestPoint, minSquaredDistance) {\n    if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n      return minSquaredDistance;\n    }\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      minSquaredDistance = geometries[i].closestPointXY(\n        x, y, closestPoint, minSquaredDistance);\n    }\n    return minSquaredDistance;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeometryCollection.prototype.containsXY = function containsXY (x, y) {\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].containsXY(x, y)) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeometryCollection.prototype.computeExtent = function computeExtent (extent) {\n    createOrUpdateEmpty(extent);\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      extend(extent, geometries[i].getExtent());\n    }\n    return extent;\n  };\n\n  /**\n   * Return the geometries that make up this geometry collection.\n   * @return {Array<Geometry>} Geometries.\n   * @api\n   */\n  GeometryCollection.prototype.getGeometries = function getGeometries () {\n    return cloneGeometries(this.geometries_);\n  };\n\n  /**\n   * @return {Array<Geometry>} Geometries.\n   */\n  GeometryCollection.prototype.getGeometriesArray = function getGeometriesArray () {\n    return this.geometries_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeometryCollection.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n    if (this.simplifiedGeometryRevision != this.getRevision()) {\n      clear(this.simplifiedGeometryCache);\n      this.simplifiedGeometryMaxMinSquaredTolerance = 0;\n      this.simplifiedGeometryRevision = this.getRevision();\n    }\n    if (squaredTolerance < 0 ||\n        (this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&\n         squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {\n      return this;\n    }\n    var key = squaredTolerance.toString();\n    if (this.simplifiedGeometryCache.hasOwnProperty(key)) {\n      return this.simplifiedGeometryCache[key];\n    } else {\n      var simplifiedGeometries = [];\n      var geometries = this.geometries_;\n      var simplified = false;\n      for (var i = 0, ii = geometries.length; i < ii; ++i) {\n        var geometry = geometries[i];\n        var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);\n        simplifiedGeometries.push(simplifiedGeometry);\n        if (simplifiedGeometry !== geometry) {\n          simplified = true;\n        }\n      }\n      if (simplified) {\n        var simplifiedGeometryCollection = new GeometryCollection(null);\n        simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);\n        this.simplifiedGeometryCache[key] = simplifiedGeometryCollection;\n        return simplifiedGeometryCollection;\n      } else {\n        this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;\n        return this;\n      }\n    }\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.getType = function getType () {\n    return GeometryType.GEOMETRY_COLLECTION;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.intersectsExtent = function intersectsExtent (extent) {\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      if (geometries[i].intersectsExtent(extent)) {\n        return true;\n      }\n    }\n    return false;\n  };\n\n  /**\n   * @return {boolean} Is empty.\n   */\n  GeometryCollection.prototype.isEmpty = function isEmpty () {\n    return this.geometries_.length === 0;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.rotate = function rotate (angle, anchor) {\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].rotate(angle, anchor);\n    }\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.scale = function scale (sx, opt_sy, opt_anchor) {\n    var anchor = opt_anchor;\n    if (!anchor) {\n      anchor = getCenter(this.getExtent());\n    }\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].scale(sx, opt_sy, anchor);\n    }\n    this.changed();\n  };\n\n  /**\n   * Set the geometries that make up this geometry collection.\n   * @param {Array<Geometry>} geometries Geometries.\n   * @api\n   */\n  GeometryCollection.prototype.setGeometries = function setGeometries (geometries) {\n    this.setGeometriesArray(cloneGeometries(geometries));\n  };\n\n  /**\n   * @param {Array<Geometry>} geometries Geometries.\n   */\n  GeometryCollection.prototype.setGeometriesArray = function setGeometriesArray (geometries) {\n    this.unlistenGeometriesChange_();\n    this.geometries_ = geometries;\n    this.listenGeometriesChange_();\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.applyTransform = function applyTransform (transformFn) {\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].applyTransform(transformFn);\n    }\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  GeometryCollection.prototype.translate = function translate (deltaX, deltaY) {\n    var geometries = this.geometries_;\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      geometries[i].translate(deltaX, deltaY);\n    }\n    this.changed();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeometryCollection.prototype.disposeInternal = function disposeInternal () {\n    this.unlistenGeometriesChange_();\n    Geometry.prototype.disposeInternal.call(this);\n  };\n\n  return GeometryCollection;\n}(Geometry));\n\n\n/**\n * @param {Array<Geometry>} geometries Geometries.\n * @return {Array<Geometry>} Cloned geometries.\n */\nfunction cloneGeometries(geometries) {\n  var clonedGeometries = [];\n  for (var i = 0, ii = geometries.length; i < ii; ++i) {\n    clonedGeometries.push(geometries[i].clone());\n  }\n  return clonedGeometries;\n}\n\n\nexport default GeometryCollection;\n\n//# sourceMappingURL=GeometryCollection.js.map","/**\n * @module ol/format/Feature\n */\nimport {assign} from '../obj.js';\nimport {abstract} from '../util.js';\nimport {get as getProjection, equivalent as equivalentProjection, transformExtent} from '../proj.js';\n\n\n/**\n * @typedef {Object} ReadOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are reading.\n * If not provided, the projection will be derived from the data (where possible) or\n * the `dataProjection` of the format is assigned (where set). If the projection\n * can not be derived from the data and if no `dataProjection` is set for a format,\n * the features will not be reprojected.\n * @property {import(\"../extent.js\").Extent} [extent] Tile extent of the tile being read. This is only used and\n * required for {@link module:ol/format/MVT}.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * created by the format reader. If not provided, features will be returned in the\n * `dataProjection`.\n */\n\n\n/**\n * @typedef {Object} WriteOptions\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection] Projection of the data we are writing.\n * If not provided, the `dataProjection` of the format is assigned (where set).\n * If no `dataProjection` is set for a format, the features will be returned\n * in the `featureProjection`.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection of the feature geometries\n * that will be serialized by the format writer. If not provided, geometries are assumed\n * to be in the `dataProjection` if that is set; in other words, they are not transformed.\n * @property {boolean} [rightHanded] When writing geometries, follow the right-hand\n * rule for linear ring orientation.  This means that polygons will have counter-clockwise\n * exterior rings and clockwise interior rings.  By default, coordinates are serialized\n * as they are provided at construction.  If `true`, the right-hand rule will\n * be applied.  If `false`, the left-hand rule will be applied (clockwise for\n * exterior and counter-clockwise for interior rings).  Note that not all\n * formats support this.  The GeoJSON format does use this property when writing\n * geometries.\n * @property {number} [decimals] Maximum number of decimal places for coordinates.\n * Coordinates are stored internally as floats, but floating-point arithmetic can create\n * coordinates with a large number of decimal places, not generally wanted on output.\n * Set a number here to round coordinates. Can also be used to ensure that\n * coordinates read in can be written back out with the same number of decimals.\n * Default is no rounding.\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for feature formats.\n * {FeatureFormat} subclasses provide the ability to decode and encode\n * {@link module:ol/Feature~Feature} objects from a variety of commonly used geospatial\n * file formats.  See the documentation for each format for more details.\n *\n * @abstract\n * @api\n */\nvar FeatureFormat = function FeatureFormat() {\n\n  /**\n   * @protected\n   * @type {import(\"../proj/Projection.js\").default}\n   */\n  this.dataProjection = null;\n\n  /**\n   * @protected\n   * @type {import(\"../proj/Projection.js\").default}\n   */\n  this.defaultFeatureProjection = null;\n\n};\n\n/**\n * Adds the data projection to the read options.\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Options.\n * @return {ReadOptions|undefined} Options.\n * @protected\n */\nFeatureFormat.prototype.getReadOptions = function getReadOptions (source, opt_options) {\n  var options;\n  if (opt_options) {\n    options = {\n      dataProjection: opt_options.dataProjection ?\n        opt_options.dataProjection : this.readProjection(source),\n      featureProjection: opt_options.featureProjection\n    };\n  }\n  return this.adaptOptions(options);\n};\n\n/**\n * Sets the `dataProjection` on the options, if no `dataProjection`\n * is set.\n * @param {WriteOptions|ReadOptions|undefined} options\n *   Options.\n * @protected\n * @return {WriteOptions|ReadOptions|undefined}\n *   Updated options.\n */\nFeatureFormat.prototype.adaptOptions = function adaptOptions (options) {\n  return assign({\n    dataProjection: this.dataProjection,\n    featureProjection: this.defaultFeatureProjection\n  }, options);\n};\n\n/**\n * Get the extent from the source of the last {@link readFeatures} call.\n * @return {import(\"../extent.js\").Extent} Tile extent.\n */\nFeatureFormat.prototype.getLastExtent = function getLastExtent () {\n  return null;\n};\n\n/**\n * @abstract\n * @return {import(\"./FormatType.js\").default} Format.\n */\nFeatureFormat.prototype.getType = function getType () {\n  return abstract();\n};\n\n/**\n * Read a single feature from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../Feature.js\").FeatureLike} Feature.\n */\nFeatureFormat.prototype.readFeature = function readFeature (source, opt_options) {\n  return abstract();\n};\n\n/**\n * Read all features from a source.\n *\n * @abstract\n * @param {Document|Node|ArrayBuffer|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {Array<import(\"../Feature.js\").FeatureLike>} Features.\n */\nFeatureFormat.prototype.readFeatures = function readFeatures (source, opt_options) {\n  return abstract();\n};\n\n/**\n * Read a single geometry from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @param {ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nFeatureFormat.prototype.readGeometry = function readGeometry (source, opt_options) {\n  return abstract();\n};\n\n/**\n * Read the projection from a source.\n *\n * @abstract\n * @param {Document|Node|Object|string} source Source.\n * @return {import(\"../proj/Projection.js\").default} Projection.\n */\nFeatureFormat.prototype.readProjection = function readProjection (source) {\n  return abstract();\n};\n\n/**\n * Encode a feature in this format.\n *\n * @abstract\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\nFeatureFormat.prototype.writeFeature = function writeFeature (feature, opt_options) {\n  return abstract();\n};\n\n/**\n * Encode an array of features in this format.\n *\n * @abstract\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\nFeatureFormat.prototype.writeFeatures = function writeFeatures (features, opt_options) {\n  return abstract();\n};\n\n/**\n * Write a single geometry in this format.\n *\n * @abstract\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {WriteOptions=} opt_options Write options.\n * @return {string} Result.\n */\nFeatureFormat.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n  return abstract();\n};\n\nexport default FeatureFormat;\n\n/**\n * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n * @param {boolean} write Set to true for writing, false for reading.\n * @param {(WriteOptions|ReadOptions)=} opt_options Options.\n * @return {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} Transformed geometry.\n */\nexport function transformWithOptions(geometry, write, opt_options) {\n  var featureProjection = opt_options ?\n    getProjection(opt_options.featureProjection) : null;\n  var dataProjection = opt_options ?\n    getProjection(opt_options.dataProjection) : null;\n  /**\n   * @type {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent}\n   */\n  var transformed;\n  if (featureProjection && dataProjection &&\n      !equivalentProjection(featureProjection, dataProjection)) {\n    if (Array.isArray(geometry)) {\n      // FIXME this is necessary because GML treats extents\n      // as geometries\n      transformed = transformExtent(\n        geometry,\n        dataProjection,\n        featureProjection);\n    } else {\n      transformed = (write ? /** @type {import(\"../geom/Geometry\").default} */ (geometry).clone() : geometry).transform(\n        write ? featureProjection : dataProjection,\n        write ? dataProjection : featureProjection);\n    }\n  } else {\n    transformed = geometry;\n  }\n  if (write && opt_options && /** @type {WriteOptions} */ (opt_options).decimals !== undefined &&\n    !Array.isArray(transformed)) {\n    var power = Math.pow(10, /** @type {WriteOptions} */ (opt_options).decimals);\n    // if decimals option on write, round each coordinate appropriately\n    /**\n     * @param {Array<number>} coordinates Coordinates.\n     * @return {Array<number>} Transformed coordinates.\n     */\n    var transform = function(coordinates) {\n      for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n        coordinates[i] = Math.round(coordinates[i] * power) / power;\n      }\n      return coordinates;\n    };\n    if (transformed === geometry) {\n      transformed = /** @type {import(\"../geom/Geometry\").default} */ (geometry).clone();\n    }\n    transformed.applyTransform(transform);\n  }\n  return transformed;\n}\n\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/format/JSONFeature\n */\nimport {abstract} from '../util.js';\nimport FeatureFormat from './Feature.js';\nimport FormatType from './FormatType.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for JSON feature formats.\n *\n * @abstract\n */\nvar JSONFeature = /*@__PURE__*/(function (FeatureFormat) {\n  function JSONFeature() {\n    FeatureFormat.call(this);\n  }\n\n  if ( FeatureFormat ) JSONFeature.__proto__ = FeatureFormat;\n  JSONFeature.prototype = Object.create( FeatureFormat && FeatureFormat.prototype );\n  JSONFeature.prototype.constructor = JSONFeature;\n\n  /**\n   * @inheritDoc\n   */\n  JSONFeature.prototype.getType = function getType () {\n    return FormatType.JSON;\n  };\n\n  /**\n   * Read a feature.  Only works for a single feature. Use `readFeatures` to\n   * read a feature collection.\n   *\n   * @param {ArrayBuffer|Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   * @api\n   */\n  JSONFeature.prototype.readFeature = function readFeature (source, opt_options) {\n    return this.readFeatureFromObject(\n      getObject(source), this.getReadOptions(source, opt_options));\n  };\n\n  /**\n   * Read all features.  Works with both a single feature and a feature\n   * collection.\n   *\n   * @param {ArrayBuffer|Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  JSONFeature.prototype.readFeatures = function readFeatures (source, opt_options) {\n    return this.readFeaturesFromObject(\n      getObject(source), this.getReadOptions(source, opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  JSONFeature.prototype.readFeatureFromObject = function readFeatureFromObject (object, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   */\n  JSONFeature.prototype.readFeaturesFromObject = function readFeaturesFromObject (object, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Read a geometry.\n   *\n   * @param {ArrayBuffer|Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   * @api\n   */\n  JSONFeature.prototype.readGeometry = function readGeometry (source, opt_options) {\n    return this.readGeometryFromObject(\n      getObject(source), this.getReadOptions(source, opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  JSONFeature.prototype.readGeometryFromObject = function readGeometryFromObject (object, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Read the projection.\n   *\n   * @param {ArrayBuffer|Document|Node|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  JSONFeature.prototype.readProjection = function readProjection (source) {\n    return this.readProjectionFromObject(getObject(source));\n  };\n\n  /**\n   * @abstract\n   * @param {Object} object Object.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  JSONFeature.prototype.readProjectionFromObject = function readProjectionFromObject (object) {\n    return abstract();\n  };\n\n  /**\n   * Encode a feature as string.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded feature.\n   * @api\n   */\n  JSONFeature.prototype.writeFeature = function writeFeature (feature, opt_options) {\n    return JSON.stringify(this.writeFeatureObject(feature, opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  JSONFeature.prototype.writeFeatureObject = function writeFeatureObject (feature, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Encode an array of features as string.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded features.\n   * @api\n   */\n  JSONFeature.prototype.writeFeatures = function writeFeatures (features, opt_options) {\n    return JSON.stringify(this.writeFeaturesObject(features, opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  JSONFeature.prototype.writeFeaturesObject = function writeFeaturesObject (features, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Encode a geometry as string.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded geometry.\n   * @api\n   */\n  JSONFeature.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n    return JSON.stringify(this.writeGeometryObject(geometry, opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   */\n  JSONFeature.prototype.writeGeometryObject = function writeGeometryObject (geometry, opt_options) {\n    return abstract();\n  };\n\n  return JSONFeature;\n}(FeatureFormat));\n\n\n/**\n * @param {Document|Node|Object|string} source Source.\n * @return {Object} Object.\n */\nfunction getObject(source) {\n  if (typeof source === 'string') {\n    var object = JSON.parse(source);\n    return object ? /** @type {Object} */ (object) : null;\n  } else if (source !== null) {\n    return source;\n  } else {\n    return null;\n  }\n}\n\n\nexport default JSONFeature;\n\n//# sourceMappingURL=JSONFeature.js.map","/**\n * @module ol/format/EsriJSON\n */\nimport Feature from '../Feature.js';\nimport {assert} from '../asserts.js';\nimport {containsExtent} from '../extent.js';\nimport {transformWithOptions} from './Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {deflateCoordinates} from '../geom/flat/deflate.js';\nimport {linearRingIsClockwise} from '../geom/flat/orient.js';\nimport {isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {import(\"arcgis-rest-api\").Feature} EsriJSONFeature\n * @typedef {import(\"arcgis-rest-api\").FeatureSet} EsriJSONFeatureSet\n * @typedef {import(\"arcgis-rest-api\").Geometry} EsriJSONGeometry\n * @typedef {import(\"arcgis-rest-api\").Point} EsriJSONPoint\n * @typedef {import(\"arcgis-rest-api\").Polyline} EsriJSONPolyline\n * @typedef {import(\"arcgis-rest-api\").Polygon} EsriJSONPolygon\n * @typedef {import(\"arcgis-rest-api\").Multipoint} EsriJSONMultipoint\n * @typedef {import(\"arcgis-rest-api\").HasZM} EsriJSONHasZM\n * @typedef {import(\"arcgis-rest-api\").Position} EsriJSONPosition\n * @typedef {import(\"arcgis-rest-api\").SpatialReferenceWkid} EsriJSONSpatialReferenceWkid\n */\n\n\n/**\n * @typedef {Object} EsriJSONMultiPolygon\n * @property {Array<Array<Array<Array<number>>>>} rings Rings for the MultiPolygon.\n * @property {boolean} [hasM] If the polygon coordinates have an M value.\n * @property {boolean} [hasZ] If the polygon coordinates have a Z value.\n * @property {EsriJSONSpatialReferenceWkid} [spatialReference] The coordinate reference system.\n */\n\n\n/**\n * @const\n * @type {Object<import(\"../geom/GeometryType.js\").default, function(EsriJSONGeometry): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {};\nGEOMETRY_READERS[GeometryType.POINT] = readPointGeometry;\nGEOMETRY_READERS[GeometryType.LINE_STRING] = readLineStringGeometry;\nGEOMETRY_READERS[GeometryType.POLYGON] = readPolygonGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POINT] = readMultiPointGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_LINE_STRING] = readMultiLineStringGeometry;\nGEOMETRY_READERS[GeometryType.MULTI_POLYGON] = readMultiPolygonGeometry;\n\n\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default, import(\"./Feature.js\").WriteOptions=): (EsriJSONGeometry)>}\n */\nvar GEOMETRY_WRITERS = {};\nGEOMETRY_WRITERS[GeometryType.POINT] = writePointGeometry;\nGEOMETRY_WRITERS[GeometryType.LINE_STRING] = writeLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.POLYGON] = writePolygonGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POINT] = writeMultiPointGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_LINE_STRING] = writeMultiLineStringGeometry;\nGEOMETRY_WRITERS[GeometryType.MULTI_POLYGON] = writeMultiPolygonGeometry;\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [geometryName] Geometry name to use when creating features.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the EsriJSON format.\n *\n * @api\n */\nvar EsriJSON = /*@__PURE__*/(function (JSONFeature) {\n  function EsriJSON(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    JSONFeature.call(this);\n\n    /**\n     * Name of the geometry attribute for features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n  }\n\n  if ( JSONFeature ) EsriJSON.__proto__ = JSONFeature;\n  EsriJSON.prototype = Object.create( JSONFeature && JSONFeature.prototype );\n  EsriJSON.prototype.constructor = EsriJSON;\n\n  /**\n   * @inheritDoc\n   */\n  EsriJSON.prototype.readFeatureFromObject = function readFeatureFromObject (object, opt_options) {\n    var esriJSONFeature = /** @type {EsriJSONFeature} */ (object);\n    var geometry = readGeometry(esriJSONFeature.geometry, opt_options);\n    var feature = new Feature();\n    if (this.geometryName_) {\n      feature.setGeometryName(this.geometryName_);\n    }\n    feature.setGeometry(geometry);\n    if (opt_options && opt_options.idField &&\n      esriJSONFeature.attributes[opt_options.idField]) {\n      feature.setId(/** @type {number} */(esriJSONFeature.attributes[opt_options.idField]));\n    }\n    if (esriJSONFeature.attributes) {\n      feature.setProperties(esriJSONFeature.attributes);\n    }\n    return feature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  EsriJSON.prototype.readFeaturesFromObject = function readFeaturesFromObject (object, opt_options) {\n    var options = opt_options ? opt_options : {};\n    if (object['features']) {\n      var esriJSONFeatureSet = /** @type {EsriJSONFeatureSet} */ (object);\n      /** @type {Array<import(\"../Feature.js\").default>} */\n      var features = [];\n      var esriJSONFeatures = esriJSONFeatureSet.features;\n      options.idField = object.objectIdFieldName;\n      for (var i = 0, ii = esriJSONFeatures.length; i < ii; ++i) {\n        features.push(this.readFeatureFromObject(esriJSONFeatures[i], options));\n      }\n      return features;\n    } else {\n      return [this.readFeatureFromObject(object, options)];\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  EsriJSON.prototype.readGeometryFromObject = function readGeometryFromObject (object, opt_options) {\n    return readGeometry(/** @type {EsriJSONGeometry} */(object), opt_options);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  EsriJSON.prototype.readProjectionFromObject = function readProjectionFromObject (object) {\n    if (object['spatialReference'] && object['spatialReference']['wkid'] !== undefined) {\n      var spatialReference = /** @type {EsriJSONSpatialReferenceWkid} */ (object['spatialReference']);\n      var crs = spatialReference.wkid;\n      return getProjection('EPSG:' + crs);\n    } else {\n      return null;\n    }\n  };\n\n  /**\n   * Encode a geometry as a EsriJSON object.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {EsriJSONGeometry} Object.\n   * @override\n   * @api\n   */\n  EsriJSON.prototype.writeGeometryObject = function writeGeometryObject (geometry, opt_options) {\n    return writeGeometry(geometry, this.adaptOptions(opt_options));\n  };\n\n  /**\n   * Encode a feature as a esriJSON Feature object.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} Object.\n   * @override\n   * @api\n   */\n  EsriJSON.prototype.writeFeatureObject = function writeFeatureObject (feature, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var object = {};\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      object['geometry'] = writeGeometry(geometry, opt_options);\n      if (opt_options && opt_options.featureProjection) {\n        object['geometry']['spatialReference'] = /** @type {EsriJSONSpatialReferenceWkid} */({\n          wkid: Number(getProjection(opt_options.featureProjection).getCode().split(':').pop())\n        });\n      }\n    }\n    var properties = feature.getProperties();\n    delete properties[feature.getGeometryName()];\n    if (!isEmpty(properties)) {\n      object['attributes'] = properties;\n    } else {\n      object['attributes'] = {};\n    }\n    return object;\n  };\n\n  /**\n   * Encode an array of features as a EsriJSON object.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {Object} EsriJSON Object.\n   * @override\n   * @api\n   */\n  EsriJSON.prototype.writeFeaturesObject = function writeFeaturesObject (features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var objects = [];\n    for (var i = 0, ii = features.length; i < ii; ++i) {\n      objects.push(this.writeFeatureObject(features[i], opt_options));\n    }\n    return /** @type {EsriJSONFeatureSet} */ ({\n      'features': objects\n    });\n  };\n\n  return EsriJSON;\n}(JSONFeature));\n\n\n/**\n * @param {EsriJSONGeometry} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n  if (!object) {\n    return null;\n  }\n  /** @type {import(\"../geom/GeometryType.js\").default} */\n  var type;\n  if (typeof object['x'] === 'number' && typeof object['y'] === 'number') {\n    type = GeometryType.POINT;\n  } else if (object['points']) {\n    type = GeometryType.MULTI_POINT;\n  } else if (object['paths']) {\n    var esriJSONPolyline = /** @type {EsriJSONPolyline} */ (object);\n    if (esriJSONPolyline.paths.length === 1) {\n      type = GeometryType.LINE_STRING;\n    } else {\n      type = GeometryType.MULTI_LINE_STRING;\n    }\n  } else if (object['rings']) {\n    var esriJSONPolygon = /** @type {EsriJSONPolygon} */ (object);\n    var layout = getGeometryLayout(esriJSONPolygon);\n    var rings = convertRings(esriJSONPolygon.rings, layout);\n    if (rings.length === 1) {\n      type = GeometryType.POLYGON;\n      object['rings'] = rings[0];\n    } else {\n      type = GeometryType.MULTI_POLYGON;\n      object['rings'] = rings;\n    }\n  }\n  var geometryReader = GEOMETRY_READERS[type];\n  return (\n    /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometryReader(object), false, opt_options))\n  );\n}\n\n\n/**\n * Determines inner and outer rings.\n * Checks if any polygons in this array contain any other polygons in this\n * array. It is used for checking for holes.\n * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser\n * @param {Array<!Array<!Array<number>>>} rings Rings.\n * @param {import(\"../geom/GeometryLayout.js\").default} layout Geometry layout.\n * @return {Array<!Array<!Array<!Array<number>>>>} Transformed rings.\n */\nfunction convertRings(rings, layout) {\n  var flatRing = [];\n  var outerRings = [];\n  var holes = [];\n  var i, ii;\n  for (i = 0, ii = rings.length; i < ii; ++i) {\n    flatRing.length = 0;\n    deflateCoordinates(flatRing, 0, rings[i], layout.length);\n    // is this ring an outer ring? is it clockwise?\n    var clockwise = linearRingIsClockwise(flatRing, 0,\n      flatRing.length, layout.length);\n    if (clockwise) {\n      outerRings.push([rings[i]]);\n    } else {\n      holes.push(rings[i]);\n    }\n  }\n  while (holes.length) {\n    var hole = holes.shift();\n    var matched = false;\n    // loop over all outer rings and see if they contain our hole.\n    for (i = outerRings.length - 1; i >= 0; i--) {\n      var outerRing = outerRings[i][0];\n      var containsHole = containsExtent(\n        new LinearRing(outerRing).getExtent(),\n        new LinearRing(hole).getExtent()\n      );\n      if (containsHole) {\n        // the hole is contained push it into our polygon\n        outerRings[i].push(hole);\n        matched = true;\n        break;\n      }\n    }\n    if (!matched) {\n      // no outer rings contain this hole turn it into and outer\n      // ring (reverse it)\n      outerRings.push([hole.reverse()]);\n    }\n  }\n  return outerRings;\n}\n\n\n/**\n * @param {EsriJSONPoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Point.\n */\nfunction readPointGeometry(object) {\n  var point;\n  if (object.m !== undefined && object.z !== undefined) {\n    point = new Point([object.x, object.y, object.z, object.m],\n      GeometryLayout.XYZM);\n  } else if (object.z !== undefined) {\n    point = new Point([object.x, object.y, object.z],\n      GeometryLayout.XYZ);\n  } else if (object.m !== undefined) {\n    point = new Point([object.x, object.y, object.m],\n      GeometryLayout.XYM);\n  } else {\n    point = new Point([object.x, object.y]);\n  }\n  return point;\n}\n\n\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} LineString.\n */\nfunction readLineStringGeometry(object) {\n  var layout = getGeometryLayout(object);\n  return new LineString(object.paths[0], layout);\n}\n\n\n/**\n * @param {EsriJSONPolyline} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n  var layout = getGeometryLayout(object);\n  return new MultiLineString(object.paths, layout);\n}\n\n\n/**\n * @param {EsriJSONHasZM} object Object.\n * @return {import(\"../geom/GeometryLayout.js\").default} The geometry layout to use.\n */\nfunction getGeometryLayout(object) {\n  var layout = GeometryLayout.XY;\n  if (object.hasZ === true && object.hasM === true) {\n    layout = GeometryLayout.XYZM;\n  } else if (object.hasZ === true) {\n    layout = GeometryLayout.XYZ;\n  } else if (object.hasM === true) {\n    layout = GeometryLayout.XYM;\n  }\n  return layout;\n}\n\n\n/**\n * @param {EsriJSONMultipoint} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n  var layout = getGeometryLayout(object);\n  return new MultiPoint(object.points, layout);\n}\n\n\n/**\n * @param {EsriJSONMultiPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n  var layout = getGeometryLayout(object);\n  return new MultiPolygon(object.rings, layout);\n}\n\n\n/**\n * @param {EsriJSONPolygon} object Object.\n * @return {import(\"../geom/Geometry.js\").default} Polygon.\n */\nfunction readPolygonGeometry(object) {\n  var layout = getGeometryLayout(object);\n  return new Polygon(object.rings, layout);\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONGeometry} EsriJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n  var coordinates = /** @type {import(\"../geom/Point.js\").default} */ (geometry).getCoordinates();\n  var esriJSON;\n  var layout = /** @type {import(\"../geom/Point.js\").default} */ (geometry).getLayout();\n  if (layout === GeometryLayout.XYZ) {\n    esriJSON = /** @type {EsriJSONPoint} */ ({\n      x: coordinates[0],\n      y: coordinates[1],\n      z: coordinates[2]\n    });\n  } else if (layout === GeometryLayout.XYM) {\n    esriJSON = /** @type {EsriJSONPoint} */ ({\n      x: coordinates[0],\n      y: coordinates[1],\n      m: coordinates[2]\n    });\n  } else if (layout === GeometryLayout.XYZM) {\n    esriJSON = /** @type {EsriJSONPoint} */ ({\n      x: coordinates[0],\n      y: coordinates[1],\n      z: coordinates[2],\n      m: coordinates[3]\n    });\n  } else if (layout === GeometryLayout.XY) {\n    esriJSON = /** @type {EsriJSONPoint} */ ({\n      x: coordinates[0],\n      y: coordinates[1]\n    });\n  } else {\n    assert(false, 34); // Invalid geometry layout\n  }\n  return /** @type {EsriJSONGeometry} */ (esriJSON);\n}\n\n\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @return {Object} Object with boolean hasZ and hasM keys.\n */\nfunction getHasZM(geometry) {\n  var layout = geometry.getLayout();\n  return {\n    hasZ: (layout === GeometryLayout.XYZ ||\n      layout === GeometryLayout.XYZM),\n    hasM: (layout === GeometryLayout.XYM ||\n      layout === GeometryLayout.XYZM)\n  };\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n  var lineString = /** @type {import(\"../geom/LineString.js\").default} */ (geometry);\n  var hasZM = getHasZM(lineString);\n  return (\n    /** @type {EsriJSONPolyline} */ {\n      hasZ: hasZM.hasZ,\n      hasM: hasZM.hasM,\n      paths: [\n        /** @type {Array<EsriJSONPosition>} */ (lineString.getCoordinates())\n      ]\n    }\n  );\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n  var polygon = /** @type {import(\"../geom/Polygon.js\").default} */ (geometry);\n  // Esri geometries use the left-hand rule\n  var hasZM = getHasZM(polygon);\n  return (\n    /** @type {EsriJSONPolygon} */ {\n      hasZ: hasZM.hasZ,\n      hasM: hasZM.hasM,\n      rings: /** @type {Array<Array<EsriJSONPosition>>} */ (polygon.getCoordinates(false))\n    }\n  );\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolyline} EsriJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n  var multiLineString = /** @type {import(\"../geom/MultiLineString.js\").default} */ (geometry);\n  var hasZM = getHasZM(multiLineString);\n  return (\n    /** @type {EsriJSONPolyline} */ {\n      hasZ: hasZM.hasZ,\n      hasM: hasZM.hasM,\n      paths: /** @type {Array<Array<EsriJSONPosition>>} */ (multiLineString.getCoordinates())\n    }\n  );\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONMultipoint} EsriJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n  var multiPoint = /** @type {import(\"../geom/MultiPoint.js\").default} */ (geometry);\n  var hasZM = getHasZM(multiPoint);\n  return (\n    /** @type {EsriJSONMultipoint} */ {\n      hasZ: hasZM.hasZ,\n      hasM: hasZM.hasM,\n      points: /** @type {Array<EsriJSONPosition>} */ (multiPoint.getCoordinates())\n    }\n  );\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONPolygon} EsriJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n  var hasZM = getHasZM(/** @type {import(\"../geom/MultiPolygon.js\").default} */(geometry));\n  var coordinates = /** @type {import(\"../geom/MultiPolygon.js\").default} */ (geometry).getCoordinates(false);\n  var output = [];\n  for (var i = 0; i < coordinates.length; i++) {\n    for (var x = coordinates[i].length - 1; x >= 0; x--) {\n      output.push(coordinates[i][x]);\n    }\n  }\n  return /** @type {EsriJSONPolygon} */ ({\n    hasZ: hasZM.hasZ,\n    hasM: hasZM.hasM,\n    rings: output\n  });\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {EsriJSONGeometry} EsriJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n  var geometryWriter = GEOMETRY_WRITERS[geometry.getType()];\n  return geometryWriter(/** @type {import(\"../geom/Geometry.js\").default} */(\n    transformWithOptions(geometry, true, opt_options)), opt_options);\n}\n\n\nexport default EsriJSON;\n\n//# sourceMappingURL=EsriJSON.js.map","/**\n * @module ol/format/XMLFeature\n */\nimport {abstract} from '../util.js';\nimport {extend} from '../array.js';\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\nimport {isDocument, parse} from '../xml.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for XML feature formats.\n *\n * @abstract\n */\nvar XMLFeature = /*@__PURE__*/(function (FeatureFormat) {\n  function XMLFeature() {\n    FeatureFormat.call(this);\n\n    /**\n     * @type {XMLSerializer}\n     * @private\n     */\n    this.xmlSerializer_ = new XMLSerializer();\n  }\n\n  if ( FeatureFormat ) XMLFeature.__proto__ = FeatureFormat;\n  XMLFeature.prototype = Object.create( FeatureFormat && FeatureFormat.prototype );\n  XMLFeature.prototype.constructor = XMLFeature;\n\n  /**\n   * @inheritDoc\n   */\n  XMLFeature.prototype.getType = function getType () {\n    return FormatType.XML;\n  };\n\n  /**\n   * Read a single feature.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   * @api\n   */\n  XMLFeature.prototype.readFeature = function readFeature (source, opt_options) {\n    if (!source) {\n      return null;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readFeatureFromDocument(doc, opt_options);\n    } else if (isDocument(source)) {\n      return this.readFeatureFromDocument(/** @type {Document} */ (source), opt_options);\n    } else {\n      return this.readFeatureFromNode(/** @type {Node} */ (source), opt_options);\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  XMLFeature.prototype.readFeatureFromDocument = function readFeatureFromDocument (doc, opt_options) {\n    var features = this.readFeaturesFromDocument(doc, opt_options);\n    if (features.length > 0) {\n      return features[0];\n    } else {\n      return null;\n    }\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  XMLFeature.prototype.readFeatureFromNode = function readFeatureFromNode (node, opt_options) {\n    return null; // not implemented\n  };\n\n  /**\n   * Read all features from a feature collection.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  XMLFeature.prototype.readFeatures = function readFeatures (source, opt_options) {\n    if (!source) {\n      return [];\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readFeaturesFromDocument(doc, opt_options);\n    } else if (isDocument(source)) {\n      return this.readFeaturesFromDocument(\n        /** @type {Document} */ (source), opt_options);\n    } else {\n      return this.readFeaturesFromNode(/** @type {Node} */ (source), opt_options);\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @protected\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   */\n  XMLFeature.prototype.readFeaturesFromDocument = function readFeaturesFromDocument (doc, opt_options) {\n    /** @type {Array<import(\"../Feature.js\").default>} */\n    var features = [];\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        extend(features, this.readFeaturesFromNode(n, opt_options));\n      }\n    }\n    return features;\n  };\n\n  /**\n   * @abstract\n   * @param {Node} node Node.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @protected\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   */\n  XMLFeature.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  XMLFeature.prototype.readGeometry = function readGeometry (source, opt_options) {\n    if (!source) {\n      return null;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readGeometryFromDocument(doc, opt_options);\n    } else if (isDocument(source)) {\n      return this.readGeometryFromDocument(\n        /** @type {Document} */ (source), opt_options);\n    } else {\n      return this.readGeometryFromNode(/** @type {Node} */ (source), opt_options);\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  XMLFeature.prototype.readGeometryFromDocument = function readGeometryFromDocument (doc, opt_options) {\n    return null; // not implemented\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  XMLFeature.prototype.readGeometryFromNode = function readGeometryFromNode (node, opt_options) {\n    return null; // not implemented\n  };\n\n  /**\n   * Read the projection from the source.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  XMLFeature.prototype.readProjection = function readProjection (source) {\n    if (!source) {\n      return null;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readProjectionFromDocument(doc);\n    } else if (isDocument(source)) {\n      return this.readProjectionFromDocument(/** @type {Document} */ (source));\n    } else {\n      return this.readProjectionFromNode(/** @type {Node} */ (source));\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  XMLFeature.prototype.readProjectionFromDocument = function readProjectionFromDocument (doc) {\n    return this.dataProjection;\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  XMLFeature.prototype.readProjectionFromNode = function readProjectionFromNode (node) {\n    return this.dataProjection;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  XMLFeature.prototype.writeFeature = function writeFeature (feature, opt_options) {\n    var node = this.writeFeatureNode(feature, opt_options);\n    return this.xmlSerializer_.serializeToString(node);\n  };\n\n  /**\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @protected\n   * @return {Node} Node.\n   */\n  XMLFeature.prototype.writeFeatureNode = function writeFeatureNode (feature, opt_options) {\n    return null; // not implemented\n  };\n\n  /**\n   * Encode an array of features as string.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Result.\n   * @api\n   */\n  XMLFeature.prototype.writeFeatures = function writeFeatures (features, opt_options) {\n    var node = this.writeFeaturesNode(features, opt_options);\n    return this.xmlSerializer_.serializeToString(node);\n  };\n\n  /**\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Node} Node.\n   */\n  XMLFeature.prototype.writeFeaturesNode = function writeFeaturesNode (features, opt_options) {\n    return null; // not implemented\n  };\n\n  /**\n   * @inheritDoc\n   */\n  XMLFeature.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n    var node = this.writeGeometryNode(geometry, opt_options);\n    return this.xmlSerializer_.serializeToString(node);\n  };\n\n  /**\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Node} Node.\n   */\n  XMLFeature.prototype.writeGeometryNode = function writeGeometryNode (geometry, opt_options) {\n    return null; // not implemented\n  };\n\n  return XMLFeature;\n}(FeatureFormat));\n\n\nexport default XMLFeature;\n\n//# sourceMappingURL=XMLFeature.js.map","/**\n * @module ol/format/GMLBase\n */\n// FIXME Envelopes should not be treated as geometries! readEnvelope_ is part\n// of GEOMETRY_PARSERS_ and methods using GEOMETRY_PARSERS_ do not expect\n// envelopes/extents, only geometries!\nimport {extend} from '../array.js';\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport XMLFeature from './XMLFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport LinearRing from '../geom/LinearRing.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {getAllTextContent, getAttributeNS, makeArrayPusher, makeReplacer, parseNode, pushParseAndPop} from '../xml.js';\n\n\n/**\n * @const\n * @type {string}\n */\nexport var GMLNS = 'http://www.opengis.net/gml';\n\n\n/**\n * A regular expression that matches if a string only contains whitespace\n * characters. It will e.g. match `''`, `' '`, `'\\n'` etc. The non-breaking\n * space (0xa0) is explicitly included as IE doesn't include it in its\n * definition of `\\s`.\n *\n * Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160\n *\n * @const\n * @type {RegExp}\n */\nvar ONLY_WHITESPACE_RE = /^[\\s\\xa0]*$/;\n\n\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] Feature\n * namespace. If not defined will be derived from GML. If multiple\n * feature types have been configured which come from different feature\n * namespaces, this will be an object with the keys being the prefixes used\n * in the entries of featureType array. The values of the object will be the\n * feature namespaces themselves. So for instance there might be a featureType\n * item `topp:states` in the `featureType` array and then there will be a key\n * `topp` in the featureNS object with value `http://www.openplans.org/topp`.\n * @property {Array<string>|string} [featureType] Feature type(s) to parse.\n * If multiple feature types need to be configured\n * which come from different feature namespaces, `featureNS` will be an object\n * with the keys being the prefixes used in the entries of featureType array.\n * The values of the object will be the feature namespaces themselves.\n * So for instance there might be a featureType item `topp:states` and then\n * there will be a key named `topp` in the featureNS object with value\n * `http://www.openplans.org/topp`.\n * @property {string} srsName srsName to use when writing geometries.\n * @property {boolean} [surface=false] Write gml:Surface instead of gml:Polygon\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [curve=false] Write gml:Curve instead of gml:LineString\n * elements. This also affects the elements in multi-part geometries.\n * @property {boolean} [multiCurve=true] Write gml:MultiCurve instead of gml:MultiLineString.\n * Since the latter is deprecated in GML 3.\n * @property {boolean} [multiSurface=true] Write gml:multiSurface instead of\n * gml:MultiPolygon. Since the latter is deprecated in GML 3.\n * @property {string} [schemaLocation] Optional schemaLocation to use when\n * writing out the GML, this will override the default provided.\n * @property {boolean} [hasZ=false] If coordinates have a Z value.\n */\n\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Feature base format for reading and writing data in the GML format.\n * This class cannot be instantiated, it contains only base content that\n * is shared with versioned format classes GML2 and GML3.\n *\n * @abstract\n */\nvar GMLBase = /*@__PURE__*/(function (XMLFeature) {\n  function GMLBase(opt_options) {\n    XMLFeature.call(this);\n\n    var options = /** @type {Options} */ (opt_options ? opt_options : {});\n\n    /**\n     * @protected\n     * @type {Array<string>|string|undefined}\n     */\n    this.featureType = options.featureType;\n\n    /**\n     * @protected\n     * @type {Object<string, string>|string|undefined}\n     */\n    this.featureNS = options.featureNS;\n\n    /**\n     * @protected\n     * @type {string}\n     */\n    this.srsName = options.srsName;\n\n    /**\n     * @protected\n     * @type {string}\n     */\n    this.schemaLocation = '';\n\n    /**\n     * @type {Object<string, Object<string, Object>>}\n     */\n    this.FEATURE_COLLECTION_PARSERS = {};\n    this.FEATURE_COLLECTION_PARSERS[this.namespace] = {\n      'featureMember': makeArrayPusher(this.readFeaturesInternal),\n      'featureMembers': makeReplacer(this.readFeaturesInternal)\n    };\n  }\n\n  if ( XMLFeature ) GMLBase.__proto__ = XMLFeature;\n  GMLBase.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  GMLBase.prototype.constructor = GMLBase;\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {Array<Feature> | undefined} Features.\n   */\n  GMLBase.prototype.readFeaturesInternal = function readFeaturesInternal (node, objectStack) {\n    var localName = node.localName;\n    var features = null;\n    if (localName == 'FeatureCollection') {\n      features = pushParseAndPop([],\n        this.FEATURE_COLLECTION_PARSERS, node,\n        objectStack, this);\n    } else if (localName == 'featureMembers' || localName == 'featureMember') {\n      var context = objectStack[0];\n      var featureType = context['featureType'];\n      var featureNS = context['featureNS'];\n      var prefix = 'p';\n      var defaultPrefix = 'p0';\n      if (!featureType && node.childNodes) {\n        featureType = [], featureNS = {};\n        for (var i = 0, ii = node.childNodes.length; i < ii; ++i) {\n          var child = node.childNodes[i];\n          if (child.nodeType === 1) {\n            var ft = child.nodeName.split(':').pop();\n            if (featureType.indexOf(ft) === -1) {\n              var key = '';\n              var count = 0;\n              var uri = child.namespaceURI;\n              for (var candidate in featureNS) {\n                if (featureNS[candidate] === uri) {\n                  key = candidate;\n                  break;\n                }\n                ++count;\n              }\n              if (!key) {\n                key = prefix + count;\n                featureNS[key] = uri;\n              }\n              featureType.push(key + ':' + ft);\n            }\n          }\n        }\n        if (localName != 'featureMember') {\n          // recheck featureType for each featureMember\n          context['featureType'] = featureType;\n          context['featureNS'] = featureNS;\n        }\n      }\n      if (typeof featureNS === 'string') {\n        var ns = featureNS;\n        featureNS = {};\n        featureNS[defaultPrefix] = ns;\n      }\n      /** @type {Object<string, Object<string, import(\"../xml.js\").Parser>>} */\n      var parsersNS = {};\n      var featureTypes = Array.isArray(featureType) ? featureType : [featureType];\n      for (var p in featureNS) {\n        /** @type {Object<string, import(\"../xml.js\").Parser>} */\n        var parsers = {};\n        for (var i$1 = 0, ii$1 = featureTypes.length; i$1 < ii$1; ++i$1) {\n          var featurePrefix = featureTypes[i$1].indexOf(':') === -1 ?\n            defaultPrefix : featureTypes[i$1].split(':')[0];\n          if (featurePrefix === p) {\n            parsers[featureTypes[i$1].split(':').pop()] =\n                (localName == 'featureMembers') ?\n                  makeArrayPusher(this.readFeatureElement, this) :\n                  makeReplacer(this.readFeatureElement, this);\n          }\n        }\n        parsersNS[featureNS[p]] = parsers;\n      }\n      if (localName == 'featureMember') {\n        features = pushParseAndPop(undefined, parsersNS, node, objectStack);\n      } else {\n        features = pushParseAndPop([], parsersNS, node, objectStack);\n      }\n    }\n    if (features === null) {\n      features = [];\n    }\n    return features;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {import(\"../geom/Geometry.js\").default|undefined} Geometry.\n   */\n  GMLBase.prototype.readGeometryElement = function readGeometryElement (node, objectStack) {\n    var context = /** @type {Object} */ (objectStack[0]);\n    context['srsName'] = node.firstElementChild.getAttribute('srsName');\n    context['srsDimension'] = node.firstElementChild.getAttribute('srsDimension');\n    /** @type {import(\"../geom/Geometry.js\").default} */\n    var geometry = pushParseAndPop(null, this.GEOMETRY_PARSERS, node, objectStack, this);\n    if (geometry) {\n      return (\n        /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometry, false, context))\n      );\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {boolean} asFeature whether result should be wrapped as a feature.\n   * @return {Feature|Object} Feature\n   */\n  GMLBase.prototype.readFeatureElementInternal = function readFeatureElementInternal (node, objectStack, asFeature) {\n    var geometryName;\n    var values = {};\n    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n      var value = (void 0);\n      var localName = n.localName;\n      // first, check if it is simple attribute\n      if (n.childNodes.length === 0\n              || (n.childNodes.length === 1 && (n.firstChild.nodeType === 3 || n.firstChild.nodeType === 4))) {\n        value = getAllTextContent(n, false);\n        if (ONLY_WHITESPACE_RE.test(value)) {\n          value = undefined;\n        }\n      } else {\n        if (asFeature) {\n          //if feature, try it as a geometry\n          value = this.readGeometryElement(n, objectStack);\n        }\n        if (!value) { //if not a geometry or not a feature, treat it as a complex attribute\n          value = this.readFeatureElementInternal(n, objectStack, false);\n        } else if (localName !== 'boundedBy') {\n          // boundedBy is an extent and must not be considered as a geometry\n          geometryName = localName;\n        }\n      }\n\n      if (values[localName]) {\n        if (!(values[localName] instanceof Array)) {\n          values[localName] = [values[localName]];\n        }\n        values[localName].push(value);\n      } else {\n        values[localName] = value;\n      }\n\n      var len = n.attributes.length;\n      if (len > 0) {\n        values[localName] = {_content_: values[localName]};\n        for (var i = 0; i < len; i++) {\n          var attName = n.attributes[i].name;\n          values[localName][attName] = n.attributes[i].value;\n        }\n      }\n    }\n    if (!asFeature) {\n      return values;\n    } else {\n      var feature = new Feature(values);\n      if (geometryName) {\n        feature.setGeometryName(geometryName);\n      }\n      var fid = node.getAttribute('fid') ||\n           getAttributeNS(node, this.namespace, 'id');\n      if (fid) {\n        feature.setId(fid);\n      }\n      return feature;\n    }\n  };\n\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {Feature} Feature.\n   */\n  GMLBase.prototype.readFeatureElement = function readFeatureElement (node, objectStack) {\n    return this.readFeatureElementInternal(node, objectStack, true);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {Point|undefined} Point.\n   */\n  GMLBase.prototype.readPoint = function readPoint (node, objectStack) {\n    var flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);\n    if (flatCoordinates) {\n      return new Point(flatCoordinates, GeometryLayout.XYZ);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {MultiPoint|undefined} MultiPoint.\n   */\n  GMLBase.prototype.readMultiPoint = function readMultiPoint (node, objectStack) {\n    /** @type {Array<Array<number>>} */\n    var coordinates = pushParseAndPop([],\n      this.MULTIPOINT_PARSERS_, node, objectStack, this);\n    if (coordinates) {\n      return new MultiPoint(coordinates);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {MultiLineString|undefined} MultiLineString.\n   */\n  GMLBase.prototype.readMultiLineString = function readMultiLineString (node, objectStack) {\n    /** @type {Array<LineString>} */\n    var lineStrings = pushParseAndPop([],\n      this.MULTILINESTRING_PARSERS_, node, objectStack, this);\n    if (lineStrings) {\n      return new MultiLineString(lineStrings);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {MultiPolygon|undefined} MultiPolygon.\n   */\n  GMLBase.prototype.readMultiPolygon = function readMultiPolygon (node, objectStack) {\n    /** @type {Array<Polygon>} */\n    var polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this);\n    if (polygons) {\n      return new MultiPolygon(polygons);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GMLBase.prototype.pointMemberParser_ = function pointMemberParser_ (node, objectStack) {\n    parseNode(this.POINTMEMBER_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GMLBase.prototype.lineStringMemberParser_ = function lineStringMemberParser_ (node, objectStack) {\n    parseNode(this.LINESTRINGMEMBER_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GMLBase.prototype.polygonMemberParser_ = function polygonMemberParser_ (node, objectStack) {\n    parseNode(this.POLYGONMEMBER_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {LineString|undefined} LineString.\n   */\n  GMLBase.prototype.readLineString = function readLineString (node, objectStack) {\n    var flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);\n    if (flatCoordinates) {\n      var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n      return lineString;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} LinearRing flat coordinates.\n   */\n  GMLBase.prototype.readFlatLinearRing_ = function readFlatLinearRing_ (node, objectStack) {\n    var ring = pushParseAndPop(null,\n      this.GEOMETRY_FLAT_COORDINATES_PARSERS, node,\n      objectStack, this);\n    if (ring) {\n      return ring;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {LinearRing|undefined} LinearRing.\n   */\n  GMLBase.prototype.readLinearRing = function readLinearRing (node, objectStack) {\n    var flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);\n    if (flatCoordinates) {\n      return new LinearRing(flatCoordinates, GeometryLayout.XYZ);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {Polygon|undefined} Polygon.\n   */\n  GMLBase.prototype.readPolygon = function readPolygon (node, objectStack) {\n    /** @type {Array<Array<number>>} */\n    var flatLinearRings = pushParseAndPop([null],\n      this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n    if (flatLinearRings && flatLinearRings[0]) {\n      var flatCoordinates = flatLinearRings[0];\n      var ends = [flatCoordinates.length];\n      var i, ii;\n      for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n        extend(flatCoordinates, flatLinearRings[i]);\n        ends.push(flatCoordinates.length);\n      }\n      return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>} Flat coordinates.\n   */\n  GMLBase.prototype.readFlatCoordinatesFromNode_ = function readFlatCoordinatesFromNode_ (node, objectStack) {\n    return pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack, this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GMLBase.prototype.readGeometryFromNode = function readGeometryFromNode (node, opt_options) {\n    var geometry = this.readGeometryElement(node,\n      [this.getReadOptions(node, opt_options ? opt_options : {})]);\n    return geometry ? geometry : null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GMLBase.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    var options = {\n      featureType: this.featureType,\n      featureNS: this.featureNS\n    };\n    if (opt_options) {\n      assign(options, this.getReadOptions(node, opt_options));\n    }\n    var features = this.readFeaturesInternal(node, [options]);\n    return features || [];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GMLBase.prototype.readProjectionFromNode = function readProjectionFromNode (node) {\n    return getProjection(this.srsName ? this.srsName : node.firstElementChild.getAttribute('srsName'));\n  };\n\n  return GMLBase;\n}(XMLFeature));\n\n\nGMLBase.prototype.namespace = GMLNS;\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGMLBase.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n  'http://www.opengis.net/gml': {}\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGMLBase.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n  'http://www.opengis.net/gml': {}\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGMLBase.prototype.GEOMETRY_PARSERS = {\n  'http://www.opengis.net/gml': {}\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.MULTIPOINT_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'pointMember': makeArrayPusher(GMLBase.prototype.pointMemberParser_),\n    'pointMembers': makeArrayPusher(GMLBase.prototype.pointMemberParser_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.MULTILINESTRING_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'lineStringMember': makeArrayPusher(GMLBase.prototype.lineStringMemberParser_),\n    'lineStringMembers': makeArrayPusher(GMLBase.prototype.lineStringMemberParser_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.MULTIPOLYGON_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'polygonMember': makeArrayPusher(GMLBase.prototype.polygonMemberParser_),\n    'polygonMembers': makeArrayPusher(GMLBase.prototype.polygonMemberParser_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.POINTMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'Point': makeArrayPusher(GMLBase.prototype.readFlatCoordinatesFromNode_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.LINESTRINGMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'LineString': makeArrayPusher(GMLBase.prototype.readLineString)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGMLBase.prototype.POLYGONMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGMLBase.prototype.RING_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'LinearRing': makeReplacer(GMLBase.prototype.readFlatLinearRing_)\n  }\n};\n\nexport default GMLBase;\n\n//# sourceMappingURL=GMLBase.js.map","/**\n * @module ol/format/xsd\n */\nimport {getAllTextContent, DOCUMENT} from '../xml.js';\nimport {padNumber} from '../string.js';\n\n\n/**\n * @param {Node} node Node.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBoolean(node) {\n  var s = getAllTextContent(node, false);\n  return readBooleanString(s);\n}\n\n\n/**\n * @param {string} string String.\n * @return {boolean|undefined} Boolean.\n */\nexport function readBooleanString(string) {\n  var m = /^\\s*(true|1)|(false|0)\\s*$/.exec(string);\n  if (m) {\n    return m[1] !== undefined || false;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {number|undefined} DateTime in seconds.\n */\nexport function readDateTime(node) {\n  var s = getAllTextContent(node, false);\n  var dateTime = Date.parse(s);\n  return isNaN(dateTime) ? undefined : dateTime / 1000;\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimal(node) {\n  var s = getAllTextContent(node, false);\n  return readDecimalString(s);\n}\n\n\n/**\n * @param {string} string String.\n * @return {number|undefined} Decimal.\n */\nexport function readDecimalString(string) {\n  // FIXME check spec\n  var m = /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*$/i.exec(string);\n  if (m) {\n    return parseFloat(m[1]);\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeInteger(node) {\n  var s = getAllTextContent(node, false);\n  return readNonNegativeIntegerString(s);\n}\n\n\n/**\n * @param {string} string String.\n * @return {number|undefined} Non negative integer.\n */\nexport function readNonNegativeIntegerString(string) {\n  var m = /^\\s*(\\d+)\\s*$/.exec(string);\n  if (m) {\n    return parseInt(m[1], 10);\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {string|undefined} String.\n */\nexport function readString(node) {\n  return getAllTextContent(node, false).trim();\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the boolean to.\n * @param {boolean} bool Boolean.\n */\nexport function writeBooleanTextNode(node, bool) {\n  writeStringTextNode(node, (bool) ? '1' : '0');\n}\n\n\n/**\n * @param {Node} node Node to append a CDATA Section with the string to.\n * @param {string} string String.\n */\nexport function writeCDATASection(node, string) {\n  node.appendChild(DOCUMENT.createCDATASection(string));\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the dateTime to.\n * @param {number} dateTime DateTime in seconds.\n */\nexport function writeDateTimeTextNode(node, dateTime) {\n  var date = new Date(dateTime * 1000);\n  var string = date.getUTCFullYear() + '-' +\n      padNumber(date.getUTCMonth() + 1, 2) + '-' +\n      padNumber(date.getUTCDate(), 2) + 'T' +\n      padNumber(date.getUTCHours(), 2) + ':' +\n      padNumber(date.getUTCMinutes(), 2) + ':' +\n      padNumber(date.getUTCSeconds(), 2) + 'Z';\n  node.appendChild(DOCUMENT.createTextNode(string));\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} decimal Decimal.\n */\nexport function writeDecimalTextNode(node, decimal) {\n  var string = decimal.toPrecision();\n  node.appendChild(DOCUMENT.createTextNode(string));\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the decimal to.\n * @param {number} nonNegativeInteger Non negative integer.\n */\nexport function writeNonNegativeIntegerTextNode(node, nonNegativeInteger) {\n  var string = nonNegativeInteger.toString();\n  node.appendChild(DOCUMENT.createTextNode(string));\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the string to.\n * @param {string} string String.\n */\nexport function writeStringTextNode(node, string) {\n  node.appendChild(DOCUMENT.createTextNode(string));\n}\n\n//# sourceMappingURL=xsd.js.map","/**\n * @module ol/format/GML3\n */\nimport {extend} from '../array.js';\nimport {createOrUpdate} from '../extent.js';\nimport {transformWithOptions} from './Feature.js';\nimport GMLBase, {GMLNS} from './GMLBase.js';\nimport {readNonNegativeIntegerString, writeStringTextNode} from './xsd.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Polygon from '../geom/Polygon.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection, transformExtent} from '../proj.js';\nimport {createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender,\n  makeReplacer, makeSimpleNodeFactory, OBJECT_PROPERTY_NODE_FACTORY, parseNode,\n  pushParseAndPop, pushSerializeAndPop, XML_SCHEMA_INSTANCE_URI} from '../xml.js';\n\n\n/**\n * @const\n * @type {string}\n * @private\n */\nvar schemaLocation = GMLNS +\n    ' http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +\n    '1.0.0/gmlsf.xsd';\n\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n  'MultiLineString': 'lineStringMember',\n  'MultiCurve': 'curveMember',\n  'MultiPolygon': 'polygonMember',\n  'MultiSurface': 'surfaceMember'\n};\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @api\n */\nvar GML3 = /*@__PURE__*/(function (GMLBase) {\n  function GML3(opt_options) {\n    var options = /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n\n    GMLBase.call(this, options);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.surface_ = options.surface !== undefined ? options.surface : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.curve_ = options.curve !== undefined ? options.curve : false;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.multiCurve_ = options.multiCurve !== undefined ?\n      options.multiCurve : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.multiSurface_ = options.multiSurface !== undefined ?\n      options.multiSurface : true;\n\n    /**\n     * @inheritDoc\n     */\n    this.schemaLocation = options.schemaLocation ?\n      options.schemaLocation : schemaLocation;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.hasZ = options.hasZ !== undefined ?\n      options.hasZ : false;\n\n  }\n\n  if ( GMLBase ) GML3.__proto__ = GMLBase;\n  GML3.prototype = Object.create( GMLBase && GMLBase.prototype );\n  GML3.prototype.constructor = GML3;\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {MultiLineString|undefined} MultiLineString.\n   */\n  GML3.prototype.readMultiCurve_ = function readMultiCurve_ (node, objectStack) {\n    /** @type {Array<LineString>} */\n    var lineStrings = pushParseAndPop([],\n      this.MULTICURVE_PARSERS_, node, objectStack, this);\n    if (lineStrings) {\n      var multiLineString = new MultiLineString(lineStrings);\n      return multiLineString;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {MultiPolygon|undefined} MultiPolygon.\n   */\n  GML3.prototype.readMultiSurface_ = function readMultiSurface_ (node, objectStack) {\n    /** @type {Array<Polygon>} */\n    var polygons = pushParseAndPop([],\n      this.MULTISURFACE_PARSERS_, node, objectStack, this);\n    if (polygons) {\n      return new MultiPolygon(polygons);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML3.prototype.curveMemberParser_ = function curveMemberParser_ (node, objectStack) {\n    parseNode(this.CURVEMEMBER_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML3.prototype.surfaceMemberParser_ = function surfaceMemberParser_ (node, objectStack) {\n    parseNode(this.SURFACEMEMBER_PARSERS_,\n      node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<(Array<number>)>|undefined} flat coordinates.\n   */\n  GML3.prototype.readPatch_ = function readPatch_ (node, objectStack) {\n    return pushParseAndPop([null],\n      this.PATCHES_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} flat coordinates.\n   */\n  GML3.prototype.readSegment_ = function readSegment_ (node, objectStack) {\n    return pushParseAndPop([null],\n      this.SEGMENTS_PARSERS_, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<(Array<number>)>|undefined} flat coordinates.\n   */\n  GML3.prototype.readPolygonPatch_ = function readPolygonPatch_ (node, objectStack) {\n    return pushParseAndPop([null],\n      this.FLAT_LINEAR_RINGS_PARSERS, node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} flat coordinates.\n   */\n  GML3.prototype.readLineStringSegment_ = function readLineStringSegment_ (node, objectStack) {\n    return pushParseAndPop([null],\n      this.GEOMETRY_FLAT_COORDINATES_PARSERS,\n      node, objectStack, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML3.prototype.interiorParser_ = function interiorParser_ (node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined,\n      this.RING_PARSERS, node, objectStack, this);\n    if (flatLinearRing) {\n      var flatLinearRings = /** @type {Array<Array<number>>} */\n          (objectStack[objectStack.length - 1]);\n      flatLinearRings.push(flatLinearRing);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML3.prototype.exteriorParser_ = function exteriorParser_ (node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined,\n      this.RING_PARSERS, node, objectStack, this);\n    if (flatLinearRing) {\n      var flatLinearRings = /** @type {Array<Array<number>>} */\n          (objectStack[objectStack.length - 1]);\n      flatLinearRings[0] = flatLinearRing;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Polygon|undefined} Polygon.\n   */\n  GML3.prototype.readSurface_ = function readSurface_ (node, objectStack) {\n    /** @type {Array<Array<number>>} */\n    var flatLinearRings = pushParseAndPop([null],\n      this.SURFACE_PARSERS_, node, objectStack, this);\n    if (flatLinearRings && flatLinearRings[0]) {\n      var flatCoordinates = flatLinearRings[0];\n      var ends = [flatCoordinates.length];\n      var i, ii;\n      for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n        extend(flatCoordinates, flatLinearRings[i]);\n        ends.push(flatCoordinates.length);\n      }\n      return new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {LineString|undefined} LineString.\n   */\n  GML3.prototype.readCurve_ = function readCurve_ (node, objectStack) {\n    /** @type {Array<number>} */\n    var flatCoordinates = pushParseAndPop([null],\n      this.CURVE_PARSERS_, node, objectStack, this);\n    if (flatCoordinates) {\n      var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n      return lineString;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n   */\n  GML3.prototype.readEnvelope_ = function readEnvelope_ (node, objectStack) {\n    /** @type {Array<number>} */\n    var flatCoordinates = pushParseAndPop([null],\n      this.ENVELOPE_PARSERS_, node, objectStack, this);\n    return createOrUpdate(flatCoordinates[1][0],\n      flatCoordinates[1][1], flatCoordinates[2][0],\n      flatCoordinates[2][1]);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} Flat coordinates.\n   */\n  GML3.prototype.readFlatPos_ = function readFlatPos_ (node, objectStack) {\n    var s = getAllTextContent(node, false);\n    var re = /^\\s*([+\\-]?\\d*\\.?\\d+(?:[eE][+\\-]?\\d+)?)\\s*/;\n    /** @type {Array<number>} */\n    var flatCoordinates = [];\n    var m;\n    while ((m = re.exec(s))) {\n      flatCoordinates.push(parseFloat(m[1]));\n      s = s.substr(m[0].length);\n    }\n    if (s !== '') {\n      return undefined;\n    }\n    var context = objectStack[0];\n    var containerSrs = context['srsName'];\n    var axisOrientation = 'enu';\n    if (containerSrs) {\n      var proj = getProjection(containerSrs);\n      axisOrientation = proj.getAxisOrientation();\n    }\n    if (axisOrientation === 'neu') {\n      var i, ii;\n      for (i = 0, ii = flatCoordinates.length; i < ii; i += 3) {\n        var y = flatCoordinates[i];\n        var x = flatCoordinates[i + 1];\n        flatCoordinates[i] = x;\n        flatCoordinates[i + 1] = y;\n      }\n    }\n    var len = flatCoordinates.length;\n    if (len == 2) {\n      flatCoordinates.push(0);\n    }\n    if (len === 0) {\n      return undefined;\n    }\n    return flatCoordinates;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} Flat coordinates.\n   */\n  GML3.prototype.readFlatPosList_ = function readFlatPosList_ (node, objectStack) {\n    var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n    var context = objectStack[0];\n    var containerSrs = context['srsName'];\n    var contextDimension = context['srsDimension'];\n    var axisOrientation = 'enu';\n    if (containerSrs) {\n      var proj = getProjection(containerSrs);\n      axisOrientation = proj.getAxisOrientation();\n    }\n    var coords = s.split(/\\s+/);\n    // The \"dimension\" attribute is from the GML 3.0.1 spec.\n    var dim = 2;\n    if (node.getAttribute('srsDimension')) {\n      dim = readNonNegativeIntegerString(\n        node.getAttribute('srsDimension'));\n    } else if (node.getAttribute('dimension')) {\n      dim = readNonNegativeIntegerString(\n        node.getAttribute('dimension'));\n    } else if (/** @type {Element} */ (node.parentNode).getAttribute('srsDimension')) {\n      dim = readNonNegativeIntegerString(\n        /** @type {Element} */ (node.parentNode).getAttribute('srsDimension'));\n    } else if (contextDimension) {\n      dim = readNonNegativeIntegerString(contextDimension);\n    }\n    var x, y, z;\n    var flatCoordinates = [];\n    for (var i = 0, ii = coords.length; i < ii; i += dim) {\n      x = parseFloat(coords[i]);\n      y = parseFloat(coords[i + 1]);\n      z = (dim === 3) ? parseFloat(coords[i + 2]) : 0;\n      if (axisOrientation.substr(0, 2) === 'en') {\n        flatCoordinates.push(x, y, z);\n      } else {\n        flatCoordinates.push(y, x, z);\n      }\n    }\n    return flatCoordinates;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/Point.js\").default} value Point geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writePos_ = function writePos_ (node, value, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsDimension = hasZ ? '3' : '2';\n    node.setAttribute('srsDimension', srsDimension);\n    var srsName = context['srsName'];\n    var axisOrientation = 'enu';\n    if (srsName) {\n      axisOrientation = getProjection(srsName).getAxisOrientation();\n    }\n    var point = value.getCoordinates();\n    var coords;\n    // only 2d for simple features profile\n    if (axisOrientation.substr(0, 2) === 'en') {\n      coords = (point[0] + ' ' + point[1]);\n    } else {\n      coords = (point[1] + ' ' + point[0]);\n    }\n    if (hasZ) {\n      // For newly created points, Z can be undefined.\n      var z = point[2] || 0;\n      coords += ' ' + z;\n    }\n    writeStringTextNode(node, coords);\n  };\n\n  /**\n   * @param {Array<number>} point Point geometry.\n   * @param {string=} opt_srsName Optional srsName\n   * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n   * @return {string} The coords string.\n   * @private\n   */\n  GML3.prototype.getCoords_ = function getCoords_ (point, opt_srsName, opt_hasZ) {\n    var axisOrientation = 'enu';\n    if (opt_srsName) {\n      axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n    }\n    var coords = ((axisOrientation.substr(0, 2) === 'en') ?\n      point[0] + ' ' + point[1] :\n      point[1] + ' ' + point[0]);\n    if (opt_hasZ) {\n      // For newly created points, Z can be undefined.\n      var z = point[2] || 0;\n      coords += ' ' + z;\n    }\n\n    return coords;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {LineString|import(\"../geom/LinearRing.js\").default} value Geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writePosList_ = function writePosList_ (node, value, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsDimension = hasZ ? '3' : '2';\n    node.setAttribute('srsDimension', srsDimension);\n    var srsName = context['srsName'];\n    // only 2d for simple features profile\n    var points = value.getCoordinates();\n    var len = points.length;\n    var parts = new Array(len);\n    var point;\n    for (var i = 0; i < len; ++i) {\n      point = points[i];\n      parts[i] = this.getCoords_(point, srsName, hasZ);\n    }\n    writeStringTextNode(node, parts.join(' '));\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writePoint_ = function writePoint_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var pos = createElementNS(node.namespaceURI, 'pos');\n    node.appendChild(pos);\n    this.writePos_(pos, geometry, objectStack);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {Array<*>} objectStack Node stack.\n   */\n  GML3.prototype.writeEnvelope = function writeEnvelope (node, extent, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var keys = ['lowerCorner', 'upperCorner'];\n    var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      ({node: node}), this.ENVELOPE_SERIALIZERS_,\n      OBJECT_PROPERTY_NODE_FACTORY,\n      values,\n      objectStack, keys, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeLinearRing_ = function writeLinearRing_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var posList = createElementNS(node.namespaceURI, 'posList');\n    node.appendChild(posList);\n    this.writePosList_(posList, geometry, objectStack);\n  };\n\n  /**\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Node} Node.\n   * @private\n   */\n  GML3.prototype.RING_NODE_FACTORY_ = function RING_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var context = objectStack[objectStack.length - 1];\n    var parentNode = context.node;\n    var exteriorWritten = context['exteriorWritten'];\n    if (exteriorWritten === undefined) {\n      context['exteriorWritten'] = true;\n    }\n    return createElementNS(parentNode.namespaceURI,\n      exteriorWritten !== undefined ? 'interior' : 'exterior');\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Polygon} geometry Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeSurfaceOrPolygon_ = function writeSurfaceOrPolygon_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    if (node.nodeName !== 'PolygonPatch' && srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n      var rings = geometry.getLinearRings();\n      pushSerializeAndPop(\n        {node: node, hasZ: hasZ, srsName: srsName},\n        this.RING_SERIALIZERS_,\n        this.RING_NODE_FACTORY_,\n        rings, objectStack, undefined, this);\n    } else if (node.nodeName === 'Surface') {\n      var patches = createElementNS(node.namespaceURI, 'patches');\n      node.appendChild(patches);\n      this.writeSurfacePatches_(\n        patches, geometry, objectStack);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {LineString} geometry LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeCurveOrLineString_ = function writeCurveOrLineString_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (node.nodeName !== 'LineStringSegment' && srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    if (node.nodeName === 'LineString' ||\n        node.nodeName === 'LineStringSegment') {\n      var posList = createElementNS(node.namespaceURI, 'posList');\n      node.appendChild(posList);\n      this.writePosList_(posList, geometry, objectStack);\n    } else if (node.nodeName === 'Curve') {\n      var segments = createElementNS(node.namespaceURI, 'segments');\n      node.appendChild(segments);\n      this.writeCurveSegments_(segments,\n        geometry, objectStack);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {MultiPolygon} geometry MultiPolygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeMultiSurfaceOrPolygon_ = function writeMultiSurfaceOrPolygon_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    var surface = context['surface'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var polygons = geometry.getPolygons();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},\n      this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,\n      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeMultiPoint_ = function writeMultiPoint_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    var hasZ = context['hasZ'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var points = geometry.getPoints();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},\n      this.POINTMEMBER_SERIALIZERS_,\n      makeSimpleNodeFactory('pointMember'), points,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {MultiLineString} geometry MultiLineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeMultiCurveOrLineString_ = function writeMultiCurveOrLineString_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    var curve = context['curve'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var lines = geometry.getLineStrings();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},\n      this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,\n      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeRing_ = function writeRing_ (node, ring, objectStack) {\n    var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n    node.appendChild(linearRing);\n    this.writeLinearRing_(linearRing, ring, objectStack);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {Polygon} polygon Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeSurfaceOrPolygonMember_ = function writeSurfaceOrPolygonMember_ (node, polygon, objectStack) {\n    var child = this.GEOMETRY_NODE_FACTORY_(\n      polygon, objectStack);\n    if (child) {\n      node.appendChild(child);\n      this.writeSurfaceOrPolygon_(child, polygon, objectStack);\n    }\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Point.js\").default} point Point geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writePointMember_ = function writePointMember_ (node, point, objectStack) {\n    var child = createElementNS(node.namespaceURI, 'Point');\n    node.appendChild(child);\n    this.writePoint_(child, point, objectStack);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {LineString} line LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeLineStringOrCurveMember_ = function writeLineStringOrCurveMember_ (node, line, objectStack) {\n    var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n    if (child) {\n      node.appendChild(child);\n      this.writeCurveOrLineString_(child, line, objectStack);\n    }\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {Polygon} polygon Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeSurfacePatches_ = function writeSurfacePatches_ (node, polygon, objectStack) {\n    var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n    node.appendChild(child);\n    this.writeSurfaceOrPolygon_(child, polygon, objectStack);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {LineString} line LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeCurveSegments_ = function writeCurveSegments_ (node, line, objectStack) {\n    var child = createElementNS(node.namespaceURI,\n      'LineStringSegment');\n    node.appendChild(child);\n    this.writeCurveOrLineString_(child, line, objectStack);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n   * @param {Array<*>} objectStack Node stack.\n   */\n  GML3.prototype.writeGeometryElement = function writeGeometryElement (node, geometry, objectStack) {\n    var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n    var item = assign({}, context);\n    item['node'] = node;\n    var value;\n    if (Array.isArray(geometry)) {\n      if (context.dataProjection) {\n        value = transformExtent(\n          geometry, context.featureProjection, context.dataProjection);\n      } else {\n        value = geometry;\n      }\n    } else {\n      value = transformWithOptions(/** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n    }\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      (item), this.GEOMETRY_SERIALIZERS_,\n      this.GEOMETRY_NODE_FACTORY_, [value],\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {Array<*>} objectStack Node stack.\n   */\n  GML3.prototype.writeFeatureElement = function writeFeatureElement (node, feature, objectStack) {\n    var fid = feature.getId();\n    if (fid) {\n      node.setAttribute('fid', /** @type {string} */ (fid));\n    }\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var featureNS = context['featureNS'];\n    var geometryName = feature.getGeometryName();\n    if (!context.serializers) {\n      context.serializers = {};\n      context.serializers[featureNS] = {};\n    }\n    var properties = feature.getProperties();\n    var keys = [];\n    var values = [];\n    for (var key in properties) {\n      var value = properties[key];\n      if (value !== null) {\n        keys.push(key);\n        values.push(value);\n        if (key == geometryName || typeof /** @type {?} */ (value).getSimplifiedGeometry === 'function') {\n          if (!(key in context.serializers[featureNS])) {\n            context.serializers[featureNS][key] = makeChildAppender(\n              this.writeGeometryElement, this);\n          }\n        } else {\n          if (!(key in context.serializers[featureNS])) {\n            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n          }\n        }\n      }\n    }\n    var item = assign({}, context);\n    item.node = node;\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      (item), context.serializers,\n      makeSimpleNodeFactory(undefined, featureNS),\n      values,\n      objectStack, keys);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML3.prototype.writeFeatureMembers_ = function writeFeatureMembers_ (node, features, objectStack) {\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var featureType = context['featureType'];\n    var featureNS = context['featureNS'];\n    /** @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>} */\n    var serializers = {};\n    serializers[featureNS] = {};\n    serializers[featureNS][featureType] = makeChildAppender(\n      this.writeFeatureElement, this);\n    var item = assign({}, context);\n    item.node = node;\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      (item),\n      serializers,\n      makeSimpleNodeFactory(featureType, featureNS), features,\n      objectStack);\n  };\n\n  /**\n   * @const\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Node|undefined} Node.\n   * @private\n   */\n  GML3.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function MULTIGEOMETRY_MEMBER_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS(this.namespace,\n      MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n  };\n\n  /**\n   * @const\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Element|undefined} Node.\n   * @private\n   */\n  GML3.prototype.GEOMETRY_NODE_FACTORY_ = function GEOMETRY_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var context = objectStack[objectStack.length - 1];\n    var multiSurface = context['multiSurface'];\n    var surface = context['surface'];\n    var curve = context['curve'];\n    var multiCurve = context['multiCurve'];\n    var nodeName;\n    if (!Array.isArray(value)) {\n      nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n      if (nodeName === 'MultiPolygon' && multiSurface === true) {\n        nodeName = 'MultiSurface';\n      } else if (nodeName === 'Polygon' && surface === true) {\n        nodeName = 'Surface';\n      } else if (nodeName === 'LineString' && curve === true) {\n        nodeName = 'Curve';\n      } else if (nodeName === 'MultiLineString' && multiCurve === true) {\n        nodeName = 'MultiCurve';\n      }\n    } else {\n      nodeName = 'Envelope';\n    }\n    return createElementNS(this.namespace,\n      nodeName);\n  };\n\n  /**\n   * Encode a geometry in GML 3.1.1 Simple Features.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Node} Node.\n   * @override\n   * @api\n   */\n  GML3.prototype.writeGeometryNode = function writeGeometryNode (geometry, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var geom = createElementNS(this.namespace, 'geom');\n    var context = {node: geom, hasZ: this.hasZ, srsName: this.srsName,\n      curve: this.curve_, surface: this.surface_,\n      multiSurface: this.multiSurface_, multiCurve: this.multiCurve_};\n    if (opt_options) {\n      assign(context, opt_options);\n    }\n    this.writeGeometryElement(geom, geometry, [context]);\n    return geom;\n  };\n\n  /**\n   * Encode an array of features in the GML 3.1.1 format as an XML node.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Element} Node.\n   * @override\n   * @api\n   */\n  GML3.prototype.writeFeaturesNode = function writeFeaturesNode (features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var node = createElementNS(this.namespace, 'featureMembers');\n    node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation);\n    var context = {\n      srsName: this.srsName,\n      hasZ: this.hasZ,\n      curve: this.curve_,\n      surface: this.surface_,\n      multiSurface: this.multiSurface_,\n      multiCurve: this.multiCurve_,\n      featureNS: this.featureNS,\n      featureType: this.featureType\n    };\n    if (opt_options) {\n      assign(context, opt_options);\n    }\n    this.writeFeatureMembers_(node, features, [context]);\n    return node;\n  };\n\n  return GML3;\n}(GMLBase));\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML3.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'pos': makeReplacer(GML3.prototype.readFlatPos_),\n    'posList': makeReplacer(GML3.prototype.readFlatPosList_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML3.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'interior': GML3.prototype.interiorParser_,\n    'exterior': GML3.prototype.exteriorParser_\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML3.prototype.GEOMETRY_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'Point': makeReplacer(GMLBase.prototype.readPoint),\n    'MultiPoint': makeReplacer(\n      GMLBase.prototype.readMultiPoint),\n    'LineString': makeReplacer(\n      GMLBase.prototype.readLineString),\n    'MultiLineString': makeReplacer(\n      GMLBase.prototype.readMultiLineString),\n    'LinearRing': makeReplacer(\n      GMLBase.prototype.readLinearRing),\n    'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n    'MultiPolygon': makeReplacer(\n      GMLBase.prototype.readMultiPolygon),\n    'Surface': makeReplacer(GML3.prototype.readSurface_),\n    'MultiSurface': makeReplacer(\n      GML3.prototype.readMultiSurface_),\n    'Curve': makeReplacer(GML3.prototype.readCurve_),\n    'MultiCurve': makeReplacer(\n      GML3.prototype.readMultiCurve_),\n    'Envelope': makeReplacer(GML3.prototype.readEnvelope_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.MULTICURVE_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'curveMember': makeArrayPusher(\n      GML3.prototype.curveMemberParser_),\n    'curveMembers': makeArrayPusher(\n      GML3.prototype.curveMemberParser_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.MULTISURFACE_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'surfaceMember': makeArrayPusher(\n      GML3.prototype.surfaceMemberParser_),\n    'surfaceMembers': makeArrayPusher(\n      GML3.prototype.surfaceMemberParser_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.CURVEMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'LineString': makeArrayPusher(\n      GMLBase.prototype.readLineString),\n    'Curve': makeArrayPusher(GML3.prototype.readCurve_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.SURFACEMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    'Surface': makeArrayPusher(GML3.prototype.readSurface_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.SURFACE_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'patches': makeReplacer(GML3.prototype.readPatch_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.CURVE_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'segments': makeReplacer(GML3.prototype.readSegment_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.ENVELOPE_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'lowerCorner': makeArrayPusher(\n      GML3.prototype.readFlatPosList_),\n    'upperCorner': makeArrayPusher(\n      GML3.prototype.readFlatPosList_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.PATCHES_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'PolygonPatch': makeReplacer(\n      GML3.prototype.readPolygonPatch_)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML3.prototype.SEGMENTS_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'LineStringSegment': makeReplacer(\n      GML3.prototype.readLineStringSegment_)\n  }\n};\n\n\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML3.prototype.writeFeatures;\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.RING_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'exterior': makeChildAppender(GML3.prototype.writeRing_),\n    'interior': makeChildAppender(GML3.prototype.writeRing_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.ENVELOPE_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'lowerCorner': makeChildAppender(writeStringTextNode),\n    'upperCorner': makeChildAppender(writeStringTextNode)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'surfaceMember': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygonMember_),\n    'polygonMember': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygonMember_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.POINTMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'pointMember': makeChildAppender(\n      GML3.prototype.writePointMember_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'lineStringMember': makeChildAppender(\n      GML3.prototype.writeLineStringOrCurveMember_),\n    'curveMember': makeChildAppender(\n      GML3.prototype.writeLineStringOrCurveMember_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML3.prototype.GEOMETRY_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'Curve': makeChildAppender(\n      GML3.prototype.writeCurveOrLineString_),\n    'MultiCurve': makeChildAppender(\n      GML3.prototype.writeMultiCurveOrLineString_),\n    'Point': makeChildAppender(GML3.prototype.writePoint_),\n    'MultiPoint': makeChildAppender(\n      GML3.prototype.writeMultiPoint_),\n    'LineString': makeChildAppender(\n      GML3.prototype.writeCurveOrLineString_),\n    'MultiLineString': makeChildAppender(\n      GML3.prototype.writeMultiCurveOrLineString_),\n    'LinearRing': makeChildAppender(\n      GML3.prototype.writeLinearRing_),\n    'Polygon': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygon_),\n    'MultiPolygon': makeChildAppender(\n      GML3.prototype.writeMultiSurfaceOrPolygon_),\n    'Surface': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygon_),\n    'MultiSurface': makeChildAppender(\n      GML3.prototype.writeMultiSurfaceOrPolygon_),\n    'Envelope': makeChildAppender(\n      GML3.prototype.writeEnvelope)\n  }\n};\n\nexport default GML3;\n\n//# sourceMappingURL=GML3.js.map","/**\n * @module ol/format/GML\n */\nimport GML3 from './GML3.js';\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format\n * version 3.1.1.\n * Currently only supports GML 3.1.1 Simple Features profile.\n *\n * @param {import(\"./GMLBase.js\").Options=} opt_options\n *     Optional configuration object.\n * @api\n */\nvar GML = GML3;\n\n\n/**\n * Encode an array of features in GML 3.1.1 Simple Features.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {string} Result.\n * @api\n */\nGML.prototype.writeFeatures;\n\n\n/**\n * Encode an array of features in the GML 3.1.1 format as an XML node.\n *\n * @function\n * @param {Array<import(\"../Feature.js\").default>} features Features.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n * @return {Node} Node.\n * @api\n */\nGML.prototype.writeFeaturesNode;\n\nexport default GML;\n\n//# sourceMappingURL=GML.js.map","/**\n * @module ol/format/GML2\n */\nimport {createOrUpdate} from '../extent.js';\nimport {transformWithOptions} from './Feature.js';\nimport GMLBase, {GMLNS} from './GMLBase.js';\nimport {writeStringTextNode} from './xsd.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection, transformExtent} from '../proj.js';\nimport {createElementNS, getAllTextContent, makeArrayPusher, makeChildAppender,\n  makeReplacer, makeSimpleNodeFactory, OBJECT_PROPERTY_NODE_FACTORY, pushParseAndPop, pushSerializeAndPop} from '../xml.js';\n\n\n/**\n * @const\n * @type {string}\n */\nvar schemaLocation = GMLNS + ' http://schemas.opengis.net/gml/2.1.2/feature.xsd';\n\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar MULTIGEOMETRY_TO_MEMBER_NODENAME = {\n  'MultiLineString': 'lineStringMember',\n  'MultiCurve': 'curveMember',\n  'MultiPolygon': 'polygonMember',\n  'MultiSurface': 'surfaceMember'\n};\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GML format,\n * version 2.1.2.\n *\n * @api\n */\nvar GML2 = /*@__PURE__*/(function (GMLBase) {\n  function GML2(opt_options) {\n    var options = /** @type {import(\"./GMLBase.js\").Options} */\n        (opt_options ? opt_options : {});\n\n    GMLBase.call(this, options);\n\n    this.FEATURE_COLLECTION_PARSERS[GMLNS][\n      'featureMember'] =\n        makeArrayPusher(this.readFeaturesInternal);\n\n    /**\n     * @inheritDoc\n     */\n    this.schemaLocation = options.schemaLocation ?\n      options.schemaLocation : schemaLocation;\n\n  }\n\n  if ( GMLBase ) GML2.__proto__ = GMLBase;\n  GML2.prototype = Object.create( GMLBase && GMLBase.prototype );\n  GML2.prototype.constructor = GML2;\n\n  /**\n   * @param {Node} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<number>|undefined} Flat coordinates.\n   */\n  GML2.prototype.readFlatCoordinates_ = function readFlatCoordinates_ (node, objectStack) {\n    var s = getAllTextContent(node, false).replace(/^\\s*|\\s*$/g, '');\n    var context = /** @type {import(\"../xml.js\").NodeStackItem} */ (objectStack[0]);\n    var containerSrs = context['srsName'];\n    var axisOrientation = 'enu';\n    if (containerSrs) {\n      var proj = getProjection(containerSrs);\n      if (proj) {\n        axisOrientation = proj.getAxisOrientation();\n      }\n    }\n    var coordsGroups = s.trim().split(/\\s+/);\n    var flatCoordinates = [];\n    for (var i = 0, ii = coordsGroups.length; i < ii; i++) {\n      var coords = coordsGroups[i].split(/,+/);\n      var x = parseFloat(coords[0]);\n      var y = parseFloat(coords[1]);\n      var z = (coords.length === 3) ? parseFloat(coords[2]) : 0;\n      if (axisOrientation.substr(0, 2) === 'en') {\n        flatCoordinates.push(x, y, z);\n      } else {\n        flatCoordinates.push(y, x, z);\n      }\n    }\n    return flatCoordinates;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {import(\"../extent.js\").Extent|undefined} Envelope.\n   */\n  GML2.prototype.readBox_ = function readBox_ (node, objectStack) {\n    /** @type {Array<number>} */\n    var flatCoordinates = pushParseAndPop([null],\n      this.BOX_PARSERS_, node, objectStack, this);\n    return createOrUpdate(flatCoordinates[1][0],\n      flatCoordinates[1][1], flatCoordinates[1][3],\n      flatCoordinates[1][4]);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML2.prototype.innerBoundaryIsParser_ = function innerBoundaryIsParser_ (node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined,\n      this.RING_PARSERS, node, objectStack, this);\n    if (flatLinearRing) {\n      var flatLinearRings = /** @type {Array<Array<number>>} */\n          (objectStack[objectStack.length - 1]);\n      flatLinearRings.push(flatLinearRing);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  GML2.prototype.outerBoundaryIsParser_ = function outerBoundaryIsParser_ (node, objectStack) {\n    /** @type {Array<number>|undefined} */\n    var flatLinearRing = pushParseAndPop(undefined,\n      this.RING_PARSERS, node, objectStack, this);\n    if (flatLinearRing) {\n      var flatLinearRings = /** @type {Array<Array<number>>} */\n          (objectStack[objectStack.length - 1]);\n      flatLinearRings[0] = flatLinearRing;\n    }\n  };\n\n  /**\n   * @const\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Element|undefined} Node.\n   * @private\n   */\n  GML2.prototype.GEOMETRY_NODE_FACTORY_ = function GEOMETRY_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var context = objectStack[objectStack.length - 1];\n    var multiSurface = context['multiSurface'];\n    var surface = context['surface'];\n    var multiCurve = context['multiCurve'];\n    var nodeName;\n    if (!Array.isArray(value)) {\n      nodeName = /** @type {import(\"../geom/Geometry.js\").default} */ (value).getType();\n      if (nodeName === 'MultiPolygon' && multiSurface === true) {\n        nodeName = 'MultiSurface';\n      } else if (nodeName === 'Polygon' && surface === true) {\n        nodeName = 'Surface';\n      } else if (nodeName === 'MultiLineString' && multiCurve === true) {\n        nodeName = 'MultiCurve';\n      }\n    } else {\n      nodeName = 'Envelope';\n    }\n    return createElementNS('http://www.opengis.net/gml',\n      nodeName);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {Array<*>} objectStack Node stack.\n   */\n  GML2.prototype.writeFeatureElement = function writeFeatureElement (node, feature, objectStack) {\n    var fid = feature.getId();\n    if (fid) {\n      node.setAttribute('fid', /** @type {string} */ (fid));\n    }\n    var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    var featureNS = context['featureNS'];\n    var geometryName = feature.getGeometryName();\n    if (!context.serializers) {\n      context.serializers = {};\n      context.serializers[featureNS] = {};\n    }\n    var properties = feature.getProperties();\n    var keys = [];\n    var values = [];\n    for (var key in properties) {\n      var value = properties[key];\n      if (value !== null) {\n        keys.push(key);\n        values.push(value);\n        if (key == geometryName || typeof /** @type {?} */ (value).getSimplifiedGeometry === 'function') {\n          if (!(key in context.serializers[featureNS])) {\n            context.serializers[featureNS][key] = makeChildAppender(\n              this.writeGeometryElement, this);\n          }\n        } else {\n          if (!(key in context.serializers[featureNS])) {\n            context.serializers[featureNS][key] = makeChildAppender(writeStringTextNode);\n          }\n        }\n      }\n    }\n    var item = assign({}, context);\n    item.node = node;\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      (item), context.serializers,\n      makeSimpleNodeFactory(undefined, featureNS),\n      values,\n      objectStack, keys);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/LineString.js\").default} geometry LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeCurveOrLineString_ = function writeCurveOrLineString_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (node.nodeName !== 'LineStringSegment' && srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    if (node.nodeName === 'LineString' ||\n        node.nodeName === 'LineStringSegment') {\n      var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n      node.appendChild(coordinates);\n      this.writeCoordinates_(coordinates, geometry, objectStack);\n    } else if (node.nodeName === 'Curve') {\n      var segments = createElementNS(node.namespaceURI, 'segments');\n      node.appendChild(segments);\n      this.writeCurveSegments_(segments,\n        geometry, objectStack);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeLineStringOrCurveMember_ = function writeLineStringOrCurveMember_ (node, line, objectStack) {\n    var child = this.GEOMETRY_NODE_FACTORY_(line, objectStack);\n    if (child) {\n      node.appendChild(child);\n      this.writeCurveOrLineString_(child, line, objectStack);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/MultiLineString.js\").default} geometry MultiLineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeMultiCurveOrLineString_ = function writeMultiCurveOrLineString_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    var curve = context['curve'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var lines = geometry.getLineStrings();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, curve: curve},\n      this.LINESTRINGORCURVEMEMBER_SERIALIZERS_,\n      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, lines,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Geometry.js\").default|import(\"../extent.js\").Extent} geometry Geometry.\n   * @param {Array<*>} objectStack Node stack.\n   */\n  GML2.prototype.writeGeometryElement = function writeGeometryElement (node, geometry, objectStack) {\n    var context = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[objectStack.length - 1]);\n    var item = assign({}, context);\n    item['node'] = node;\n    var value;\n    if (Array.isArray(geometry)) {\n      if (context.dataProjection) {\n        value = transformExtent(\n          geometry, context.featureProjection, context.dataProjection);\n      } else {\n        value = geometry;\n      }\n    } else {\n      value = transformWithOptions(/** @type {import(\"../geom/Geometry.js\").default} */ (geometry), true, context);\n    }\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      (item), this.GEOMETRY_SERIALIZERS_,\n      this.GEOMETRY_NODE_FACTORY_, [value],\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {string} namespaceURI XML namespace.\n   * @returns {Element} coordinates node.\n   * @private\n   */\n  GML2.prototype.createCoordinatesNode_ = function createCoordinatesNode_ (namespaceURI) {\n    var coordinates = createElementNS(namespaceURI, 'coordinates');\n    coordinates.setAttribute('decimal', '.');\n    coordinates.setAttribute('cs', ',');\n    coordinates.setAttribute('ts', ' ');\n\n    return coordinates;\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/LineString.js\").default|import(\"../geom/LinearRing.js\").default} value Geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeCoordinates_ = function writeCoordinates_ (node, value, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    // only 2d for simple features profile\n    var points = value.getCoordinates();\n    var len = points.length;\n    var parts = new Array(len);\n    for (var i = 0; i < len; ++i) {\n      var point = points[i];\n      parts[i] = this.getCoords_(point, srsName, hasZ);\n    }\n    writeStringTextNode(node, parts.join(' '));\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/LineString.js\").default} line LineString geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeCurveSegments_ = function writeCurveSegments_ (node, line, objectStack) {\n    var child = createElementNS(node.namespaceURI, 'LineStringSegment');\n    node.appendChild(child);\n    this.writeCurveOrLineString_(child, line, objectStack);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeSurfaceOrPolygon_ = function writeSurfaceOrPolygon_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    if (node.nodeName !== 'PolygonPatch' && srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    if (node.nodeName === 'Polygon' || node.nodeName === 'PolygonPatch') {\n      var rings = geometry.getLinearRings();\n      pushSerializeAndPop(\n        {node: node, hasZ: hasZ, srsName: srsName},\n        this.RING_SERIALIZERS_,\n        this.RING_NODE_FACTORY_,\n        rings, objectStack, undefined, this);\n    } else if (node.nodeName === 'Surface') {\n      var patches = createElementNS(node.namespaceURI, 'patches');\n      node.appendChild(patches);\n      this.writeSurfacePatches_(\n        patches, geometry, objectStack);\n    }\n  };\n\n  /**\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Node} Node.\n   * @private\n   */\n  GML2.prototype.RING_NODE_FACTORY_ = function RING_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var context = objectStack[objectStack.length - 1];\n    var parentNode = context.node;\n    var exteriorWritten = context['exteriorWritten'];\n    if (exteriorWritten === undefined) {\n      context['exteriorWritten'] = true;\n    }\n    return createElementNS(parentNode.namespaceURI,\n      exteriorWritten !== undefined ? 'innerBoundaryIs' : 'outerBoundaryIs');\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeSurfacePatches_ = function writeSurfacePatches_ (node, polygon, objectStack) {\n    var child = createElementNS(node.namespaceURI, 'PolygonPatch');\n    node.appendChild(child);\n    this.writeSurfaceOrPolygon_(child, polygon, objectStack);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/LinearRing.js\").default} ring LinearRing geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeRing_ = function writeRing_ (node, ring, objectStack) {\n    var linearRing = createElementNS(node.namespaceURI, 'LinearRing');\n    node.appendChild(linearRing);\n    this.writeLinearRing_(linearRing, ring, objectStack);\n  };\n\n  /**\n   * @param {Array<number>} point Point geometry.\n   * @param {string=} opt_srsName Optional srsName\n   * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not.\n   * @return {string} The coords string.\n   * @private\n   */\n  GML2.prototype.getCoords_ = function getCoords_ (point, opt_srsName, opt_hasZ) {\n    var axisOrientation = 'enu';\n    if (opt_srsName) {\n      axisOrientation = getProjection(opt_srsName).getAxisOrientation();\n    }\n    var coords = ((axisOrientation.substr(0, 2) === 'en') ?\n      point[0] + ',' + point[1] :\n      point[1] + ',' + point[0]);\n    if (opt_hasZ) {\n      // For newly created points, Z can be undefined.\n      var z = point[2] || 0;\n      coords += ',' + z;\n    }\n\n    return coords;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/Point.js\").default} geometry Point geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writePoint_ = function writePoint_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n    node.appendChild(coordinates);\n    var point = geometry.getCoordinates();\n    var coord = this.getCoords_(point, srsName, hasZ);\n    writeStringTextNode(coordinates, coord);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/MultiPoint.js\").default} geometry MultiPoint geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeMultiPoint_ = function writeMultiPoint_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var points = geometry.getPoints();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName},\n      this.POINTMEMBER_SERIALIZERS_,\n      makeSimpleNodeFactory('pointMember'), points,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Point.js\").default} point Point geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writePointMember_ = function writePointMember_ (node, point, objectStack) {\n    var child = createElementNS(node.namespaceURI, 'Point');\n    node.appendChild(child);\n    this.writePoint_(child, point, objectStack);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/LinearRing.js\").default} geometry LinearRing geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeLinearRing_ = function writeLinearRing_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var coordinates = this.createCoordinatesNode_(node.namespaceURI);\n    node.appendChild(coordinates);\n    this.writeCoordinates_(coordinates, geometry, objectStack);\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeMultiSurfaceOrPolygon_ = function writeMultiSurfaceOrPolygon_ (node, geometry, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var hasZ = context['hasZ'];\n    var srsName = context['srsName'];\n    var surface = context['surface'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var polygons = geometry.getPolygons();\n    pushSerializeAndPop({node: node, hasZ: hasZ, srsName: srsName, surface: surface},\n      this.SURFACEORPOLYGONMEMBER_SERIALIZERS_,\n      this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, polygons,\n      objectStack, undefined, this);\n  };\n\n  /**\n   * @param {Node} node Node.\n   * @param {import(\"../geom/Polygon.js\").default} polygon Polygon geometry.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeSurfaceOrPolygonMember_ = function writeSurfaceOrPolygonMember_ (node, polygon, objectStack) {\n    var child = this.GEOMETRY_NODE_FACTORY_(\n      polygon, objectStack);\n    if (child) {\n      node.appendChild(child);\n      this.writeSurfaceOrPolygon_(child, polygon, objectStack);\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {import(\"../extent.js\").Extent} extent Extent.\n   * @param {Array<*>} objectStack Node stack.\n   * @private\n   */\n  GML2.prototype.writeEnvelope = function writeEnvelope (node, extent, objectStack) {\n    var context = objectStack[objectStack.length - 1];\n    var srsName = context['srsName'];\n    if (srsName) {\n      node.setAttribute('srsName', srsName);\n    }\n    var keys = ['lowerCorner', 'upperCorner'];\n    var values = [extent[0] + ' ' + extent[1], extent[2] + ' ' + extent[3]];\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      ({node: node}), this.ENVELOPE_SERIALIZERS_,\n      OBJECT_PROPERTY_NODE_FACTORY,\n      values,\n      objectStack, keys, this);\n  };\n\n  /**\n   * @const\n   * @param {*} value Value.\n   * @param {Array<*>} objectStack Object stack.\n   * @param {string=} opt_nodeName Node name.\n   * @return {Node|undefined} Node.\n   * @private\n   */\n  GML2.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_ = function MULTIGEOMETRY_MEMBER_NODE_FACTORY_ (value, objectStack, opt_nodeName) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS('http://www.opengis.net/gml',\n      MULTIGEOMETRY_TO_MEMBER_NODENAME[parentNode.nodeName]);\n  };\n\n  return GML2;\n}(GMLBase));\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML2.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'coordinates': makeReplacer(GML2.prototype.readFlatCoordinates_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML2.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'innerBoundaryIs': GML2.prototype.innerBoundaryIsParser_,\n    'outerBoundaryIs': GML2.prototype.outerBoundaryIsParser_\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML2.prototype.BOX_PARSERS_ = {\n  'http://www.opengis.net/gml': {\n    'coordinates': makeArrayPusher(\n      GML2.prototype.readFlatCoordinates_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML2.prototype.GEOMETRY_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'Point': makeReplacer(GMLBase.prototype.readPoint),\n    'MultiPoint': makeReplacer(\n      GMLBase.prototype.readMultiPoint),\n    'LineString': makeReplacer(\n      GMLBase.prototype.readLineString),\n    'MultiLineString': makeReplacer(\n      GMLBase.prototype.readMultiLineString),\n    'LinearRing': makeReplacer(\n      GMLBase.prototype.readLinearRing),\n    'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n    'MultiPolygon': makeReplacer(\n      GMLBase.prototype.readMultiPolygon),\n    'Box': makeReplacer(GML2.prototype.readBox_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.GEOMETRY_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'Curve': makeChildAppender(\n      GML2.prototype.writeCurveOrLineString_),\n    'MultiCurve': makeChildAppender(\n      GML2.prototype.writeMultiCurveOrLineString_),\n    'Point': makeChildAppender(GML2.prototype.writePoint_),\n    'MultiPoint': makeChildAppender(\n      GML2.prototype.writeMultiPoint_),\n    'LineString': makeChildAppender(\n      GML2.prototype.writeCurveOrLineString_),\n    'MultiLineString': makeChildAppender(\n      GML2.prototype.writeMultiCurveOrLineString_),\n    'LinearRing': makeChildAppender(\n      GML2.prototype.writeLinearRing_),\n    'Polygon': makeChildAppender(\n      GML2.prototype.writeSurfaceOrPolygon_),\n    'MultiPolygon': makeChildAppender(\n      GML2.prototype.writeMultiSurfaceOrPolygon_),\n    'Surface': makeChildAppender(\n      GML2.prototype.writeSurfaceOrPolygon_),\n    'MultiSurface': makeChildAppender(\n      GML2.prototype.writeMultiSurfaceOrPolygon_),\n    'Envelope': makeChildAppender(\n      GML2.prototype.writeEnvelope)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'lineStringMember': makeChildAppender(\n      GML2.prototype.writeLineStringOrCurveMember_),\n    'curveMember': makeChildAppender(\n      GML2.prototype.writeLineStringOrCurveMember_)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.RING_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'outerBoundaryIs': makeChildAppender(GML2.prototype.writeRing_),\n    'innerBoundaryIs': makeChildAppender(GML2.prototype.writeRing_)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.POINTMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'pointMember': makeChildAppender(\n      GML2.prototype.writePointMember_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'surfaceMember': makeChildAppender(\n      GML2.prototype.writeSurfaceOrPolygonMember_),\n    'polygonMember': makeChildAppender(\n      GML2.prototype.writeSurfaceOrPolygonMember_)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML2.prototype.ENVELOPE_SERIALIZERS_ = {\n  'http://www.opengis.net/gml': {\n    'lowerCorner': makeChildAppender(writeStringTextNode),\n    'upperCorner': makeChildAppender(writeStringTextNode)\n  }\n};\n\nexport default GML2;\n\n//# sourceMappingURL=GML2.js.map","/**\n * @module ol/format/GML32\n */\nimport GML3 from './GML3.js';\nimport GMLBase from './GMLBase.js';\nimport {makeArrayPusher, makeReplacer, makeChildAppender} from '../xml.js';\nimport {writeStringTextNode} from '../format/xsd.js';\n\n/**\n * @classdesc Feature format for reading and writing data in the GML format\n *            version 3.2.1.\n * @api\n */\nvar GML32 = /*@__PURE__*/(function (GML3) {\n  function GML32(opt_options) {\n    var options = /** @type {import(\"./GMLBase.js\").Options} */ (opt_options ? opt_options : {});\n\n    GML3.call(this, options);\n\n    /**\n     * @inheritDoc\n     */\n    this.schemaLocation = options.schemaLocation ?\n      options.schemaLocation : this.namespace + ' http://schemas.opengis.net/gml/3.2.1/gml.xsd';\n\n  }\n\n  if ( GML3 ) GML32.__proto__ = GML3;\n  GML32.prototype = Object.create( GML3 && GML3.prototype );\n  GML32.prototype.constructor = GML32;\n\n  return GML32;\n}(GML3));\n\nGML32.prototype.namespace = 'http://www.opengis.net/gml/3.2';\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML32.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = {\n  'http://www.opengis.net/gml/3.2': {\n    'pos': makeReplacer(GML3.prototype.readFlatPos_),\n    'posList': makeReplacer(GML3.prototype.readFlatPosList_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML32.prototype.FLAT_LINEAR_RINGS_PARSERS = {\n  'http://www.opengis.net/gml/3.2': {\n    'interior': GML3.prototype.interiorParser_,\n    'exterior': GML3.prototype.exteriorParser_\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML32.prototype.GEOMETRY_PARSERS = {\n  'http://www.opengis.net/gml/3.2': {\n    'Point': makeReplacer(GMLBase.prototype.readPoint),\n    'MultiPoint': makeReplacer(\n      GMLBase.prototype.readMultiPoint),\n    'LineString': makeReplacer(\n      GMLBase.prototype.readLineString),\n    'MultiLineString': makeReplacer(\n      GMLBase.prototype.readMultiLineString),\n    'LinearRing': makeReplacer(\n      GMLBase.prototype.readLinearRing),\n    'Polygon': makeReplacer(GMLBase.prototype.readPolygon),\n    'MultiPolygon': makeReplacer(\n      GMLBase.prototype.readMultiPolygon),\n    'Surface': makeReplacer(GML32.prototype.readSurface_),\n    'MultiSurface': makeReplacer(\n      GML3.prototype.readMultiSurface_),\n    'Curve': makeReplacer(GML32.prototype.readCurve_),\n    'MultiCurve': makeReplacer(\n      GML3.prototype.readMultiCurve_),\n    'Envelope': makeReplacer(GML32.prototype.readEnvelope_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.MULTICURVE_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'curveMember': makeArrayPusher(\n      GML3.prototype.curveMemberParser_),\n    'curveMembers': makeArrayPusher(\n      GML3.prototype.curveMemberParser_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.MULTISURFACE_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'surfaceMember': makeArrayPusher(\n      GML3.prototype.surfaceMemberParser_),\n    'surfaceMembers': makeArrayPusher(\n      GML3.prototype.surfaceMemberParser_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.CURVEMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'LineString': makeArrayPusher(\n      GMLBase.prototype.readLineString),\n    'Curve': makeArrayPusher(GML3.prototype.readCurve_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.SURFACEMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'Polygon': makeArrayPusher(GMLBase.prototype.readPolygon),\n    'Surface': makeArrayPusher(GML3.prototype.readSurface_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.SURFACE_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'patches': makeReplacer(GML3.prototype.readPatch_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.CURVE_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'segments': makeReplacer(GML3.prototype.readSegment_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.ENVELOPE_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'lowerCorner': makeArrayPusher(\n      GML3.prototype.readFlatPosList_),\n    'upperCorner': makeArrayPusher(\n      GML3.prototype.readFlatPosList_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.PATCHES_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'PolygonPatch': makeReplacer(\n      GML3.prototype.readPolygonPatch_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.SEGMENTS_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'LineStringSegment': makeReplacer(\n      GML3.prototype.readLineStringSegment_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.MULTIPOINT_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'pointMember': makeArrayPusher(\n      GMLBase.prototype.pointMemberParser_),\n    'pointMembers': makeArrayPusher(\n      GMLBase.prototype.pointMemberParser_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.MULTILINESTRING_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'lineStringMember': makeArrayPusher(\n      GMLBase.prototype.lineStringMemberParser_),\n    'lineStringMembers': makeArrayPusher(\n      GMLBase.prototype.lineStringMemberParser_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.MULTIPOLYGON_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'polygonMember': makeArrayPusher(\n      GMLBase.prototype.polygonMemberParser_),\n    'polygonMembers': makeArrayPusher(\n      GMLBase.prototype.polygonMemberParser_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.POINTMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'Point': makeArrayPusher(\n      GMLBase.prototype.readFlatCoordinatesFromNode_)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.LINESTRINGMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'LineString': makeArrayPusher(\n      GMLBase.prototype.readLineString)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @private\n */\nGML32.prototype.POLYGONMEMBER_PARSERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'Polygon': makeArrayPusher(\n      GMLBase.prototype.readPolygon)\n  }\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n * @protected\n */\nGML32.prototype.RING_PARSERS = {\n  'http://www.opengis.net/gml/3.2': {\n    'LinearRing': makeReplacer(\n      GMLBase.prototype.readFlatLinearRing_)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.RING_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'exterior': makeChildAppender(GML3.prototype.writeRing_),\n    'interior': makeChildAppender(GML3.prototype.writeRing_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.ENVELOPE_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'lowerCorner': makeChildAppender(writeStringTextNode),\n    'upperCorner': makeChildAppender(writeStringTextNode)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'surfaceMember': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygonMember_),\n    'polygonMember': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygonMember_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.POINTMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'pointMember': makeChildAppender(\n      GML3.prototype.writePointMember_)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'lineStringMember': makeChildAppender(\n      GML3.prototype.writeLineStringOrCurveMember_),\n    'curveMember': makeChildAppender(\n      GML3.prototype.writeLineStringOrCurveMember_)\n  }\n};\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n * @private\n */\nGML32.prototype.GEOMETRY_SERIALIZERS_ = {\n  'http://www.opengis.net/gml/3.2': {\n    'Curve': makeChildAppender(\n      GML3.prototype.writeCurveOrLineString_),\n    'MultiCurve': makeChildAppender(\n      GML3.prototype.writeMultiCurveOrLineString_),\n    'Point': makeChildAppender(GML32.prototype.writePoint_),\n    'MultiPoint': makeChildAppender(\n      GML3.prototype.writeMultiPoint_),\n    'LineString': makeChildAppender(\n      GML3.prototype.writeCurveOrLineString_),\n    'MultiLineString': makeChildAppender(\n      GML3.prototype.writeMultiCurveOrLineString_),\n    'LinearRing': makeChildAppender(\n      GML3.prototype.writeLinearRing_),\n    'Polygon': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygon_),\n    'MultiPolygon': makeChildAppender(\n      GML3.prototype.writeMultiSurfaceOrPolygon_),\n    'Surface': makeChildAppender(\n      GML3.prototype.writeSurfaceOrPolygon_),\n    'MultiSurface': makeChildAppender(\n      GML3.prototype.writeMultiSurfaceOrPolygon_),\n    'Envelope': makeChildAppender(\n      GML3.prototype.writeEnvelope)\n  }\n};\n\nexport default GML32;\n\n//# sourceMappingURL=GML32.js.map","/**\n * @module ol/format/GPX\n */\nimport Feature from '../Feature.js';\nimport {includes} from '../array.js';\nimport {transformWithOptions} from './Feature.js';\nimport XMLFeature from './XMLFeature.js';\nimport {readString, readDecimal, readNonNegativeInteger, readDateTime, writeStringTextNode, writeNonNegativeIntegerTextNode, writeDecimalTextNode, writeDateTimeTextNode} from './xsd.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport Point from '../geom/Point.js';\nimport {get as getProjection} from '../proj.js';\nimport {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender,\n  makeObjectPropertySetter, makeSequence, makeSimpleNodeFactory, makeStructureNS,\n  OBJECT_PROPERTY_NODE_FACTORY, parseNode, pushParseAndPop, pushSerializeAndPop,\n  XML_SCHEMA_INSTANCE_URI} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n  null,\n  'http://www.topografix.com/GPX/1/0',\n  'http://www.topografix.com/GPX/1/1'\n];\n\n\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +\n    'http://www.topografix.com/GPX/1/1/gpx.xsd';\n\n\n/**\n * @const\n * @type {Object<string, function(Node, Array<*>): (Feature|undefined)>}\n */\nvar FEATURE_READER = {\n  'rte': readRte,\n  'trk': readTrk,\n  'wpt': readWpt\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar GPX_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'rte': makeArrayPusher(readRte),\n    'trk': makeArrayPusher(readTrk),\n    'wpt': makeArrayPusher(readWpt)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LINK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'text': makeObjectPropertySetter(readString, 'linkText'),\n    'type': makeObjectPropertySetter(readString, 'linkType')\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar GPX_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'rte': makeChildAppender(writeRte),\n    'trk': makeChildAppender(writeTrk),\n    'wpt': makeChildAppender(writeWpt)\n  });\n\n\n/**\n * @typedef {Object} Options\n * @property {function(Feature, Node)} [readExtensions] Callback function\n * to process `extensions` nodes. To prevent memory leaks, this callback function must\n * not store any references to the node. Note that the `extensions`\n * node is not allowed in GPX 1.0. Moreover, only `extensions`\n * nodes from `wpt`, `rte` and `trk` can be processed, as those are\n * directly mapped to a feature.\n */\n\n/**\n * @typedef {Object} LayoutOptions\n * @property {boolean} [hasZ]\n * @property {boolean} [hasM]\n */\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GPX format.\n *\n * Note that {@link module:ol/format/GPX~GPX#readFeature} only reads the first\n * feature of the source.\n *\n * When reading, routes (`<rte>`) are converted into LineString geometries, and\n * tracks (`<trk>`) into MultiLineString. Any properties on route and track\n * waypoints are ignored.\n *\n * When writing, LineString geometries are output as routes (`<rte>`), and\n * MultiLineString as tracks (`<trk>`).\n *\n * @api\n */\nvar GPX = /*@__PURE__*/(function (XMLFeature) {\n  function GPX(opt_options) {\n    XMLFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection('EPSG:4326');\n\n    /**\n     * @type {function(Feature, Node)|undefined}\n     * @private\n     */\n    this.readExtensions_ = options.readExtensions;\n  }\n\n  if ( XMLFeature ) GPX.__proto__ = XMLFeature;\n  GPX.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  GPX.prototype.constructor = GPX;\n\n  /**\n   * @param {Array<Feature>} features List of features.\n   * @private\n   */\n  GPX.prototype.handleReadExtensions_ = function handleReadExtensions_ (features) {\n    if (!features) {\n      features = [];\n    }\n    for (var i = 0, ii = features.length; i < ii; ++i) {\n      var feature = features[i];\n      if (this.readExtensions_) {\n        var extensionsNode = feature.get('extensionsNode_') || null;\n        this.readExtensions_(feature, extensionsNode);\n      }\n      feature.set('extensionsNode_', undefined);\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GPX.prototype.readFeatureFromNode = function readFeatureFromNode (node, opt_options) {\n    if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n      return null;\n    }\n    var featureReader = FEATURE_READER[node.localName];\n    if (!featureReader) {\n      return null;\n    }\n    var feature = featureReader(node, [this.getReadOptions(node, opt_options)]);\n    if (!feature) {\n      return null;\n    }\n    this.handleReadExtensions_([feature]);\n    return feature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GPX.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n      return [];\n    }\n    if (node.localName == 'gpx') {\n      /** @type {Array<Feature>} */\n      var features = pushParseAndPop([], GPX_PARSERS,\n        node, [this.getReadOptions(node, opt_options)]);\n      if (features) {\n        this.handleReadExtensions_(features);\n        return features;\n      } else {\n        return [];\n      }\n    }\n    return [];\n  };\n\n  /**\n   * Encode an array of features in the GPX format as an XML node.\n   * LineString geometries are output as routes (`<rte>`), and MultiLineString\n   * as tracks (`<trk>`).\n   *\n   * @param {Array<Feature>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Node} Node.\n   * @override\n   * @api\n   */\n  GPX.prototype.writeFeaturesNode = function writeFeaturesNode (features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    //FIXME Serialize metadata\n    var gpx = createElementNS('http://www.topografix.com/GPX/1/1', 'gpx');\n    var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n    gpx.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n    gpx.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n    gpx.setAttribute('version', '1.1');\n    gpx.setAttribute('creator', 'OpenLayers');\n\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n      ({node: gpx}), GPX_SERIALIZERS, GPX_NODE_FACTORY, features, [opt_options]);\n    return gpx;\n  };\n\n  return GPX;\n}(XMLFeature));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar RTE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions,\n    'type': makeObjectPropertySetter(readString),\n    'rtept': parseRtePt\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar RTEPT_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'number': makeObjectPropertySetter(readNonNegativeInteger),\n    'type': makeObjectPropertySetter(readString),\n    'extensions': parseExtensions,\n    'trkseg': parseTrkSeg\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRKSEG_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'trkpt': parseTrkPt\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRKPT_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar WPT_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ele': makeObjectPropertySetter(readDecimal),\n    'time': makeObjectPropertySetter(readDateTime),\n    'magvar': makeObjectPropertySetter(readDecimal),\n    'geoidheight': makeObjectPropertySetter(readDecimal),\n    'name': makeObjectPropertySetter(readString),\n    'cmt': makeObjectPropertySetter(readString),\n    'desc': makeObjectPropertySetter(readString),\n    'src': makeObjectPropertySetter(readString),\n    'link': parseLink,\n    'sym': makeObjectPropertySetter(readString),\n    'type': makeObjectPropertySetter(readString),\n    'fix': makeObjectPropertySetter(readString),\n    'sat': makeObjectPropertySetter(readNonNegativeInteger),\n    'hdop': makeObjectPropertySetter(readDecimal),\n    'vdop': makeObjectPropertySetter(readDecimal),\n    'pdop': makeObjectPropertySetter(readDecimal),\n    'ageofdgpsdata': makeObjectPropertySetter(readDecimal),\n    'dgpsid': makeObjectPropertySetter(readNonNegativeInteger),\n    'extensions': parseExtensions\n  });\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar LINK_SEQUENCE = ['text', 'type'];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar LINK_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'text': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar RTE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'rtept'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar RTE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'rtept': makeArraySerializer(makeChildAppender(writeWptType))\n  });\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar RTEPT_TYPE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'ele', 'time'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar TRK_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'name', 'cmt', 'desc', 'src', 'link', 'number', 'type', 'trkseg'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRK_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'number': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'trkseg': makeArraySerializer(makeChildAppender(writeTrkSeg))\n  });\n\n\n/**\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar TRKSEG_NODE_FACTORY = makeSimpleNodeFactory('trkpt');\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRKSEG_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'trkpt': makeChildAppender(writeWptType)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar WPT_TYPE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'ele', 'time', 'magvar', 'geoidheight', 'name', 'cmt', 'desc', 'src',\n    'link', 'sym', 'type', 'fix', 'sat', 'hdop', 'vdop', 'pdop',\n    'ageofdgpsdata', 'dgpsid'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar WPT_TYPE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ele': makeChildAppender(writeDecimalTextNode),\n    'time': makeChildAppender(writeDateTimeTextNode),\n    'magvar': makeChildAppender(writeDecimalTextNode),\n    'geoidheight': makeChildAppender(writeDecimalTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'cmt': makeChildAppender(writeStringTextNode),\n    'desc': makeChildAppender(writeStringTextNode),\n    'src': makeChildAppender(writeStringTextNode),\n    'link': makeChildAppender(writeLink),\n    'sym': makeChildAppender(writeStringTextNode),\n    'type': makeChildAppender(writeStringTextNode),\n    'fix': makeChildAppender(writeStringTextNode),\n    'sat': makeChildAppender(writeNonNegativeIntegerTextNode),\n    'hdop': makeChildAppender(writeDecimalTextNode),\n    'vdop': makeChildAppender(writeDecimalTextNode),\n    'pdop': makeChildAppender(writeDecimalTextNode),\n    'ageofdgpsdata': makeChildAppender(writeDecimalTextNode),\n    'dgpsid': makeChildAppender(writeNonNegativeIntegerTextNode)\n  });\n\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n  'Point': 'wpt',\n  'LineString': 'rte',\n  'MultiLineString': 'trk'\n};\n\n\n/**\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nfunction GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {\n  var geometry = /** @type {Feature} */ (value).getGeometry();\n  if (geometry) {\n    var nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];\n    if (nodeName) {\n      var parentNode = objectStack[objectStack.length - 1].node;\n      return createElementNS(parentNode.namespaceURI, nodeName);\n    }\n  }\n}\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Element} node Node.\n * @param {!Object} values Values.\n * @return {Array<number>} Flat coordinates.\n */\nfunction appendCoordinate(flatCoordinates, layoutOptions, node, values) {\n  flatCoordinates.push(\n    parseFloat(node.getAttribute('lon')),\n    parseFloat(node.getAttribute('lat')));\n  if ('ele' in values) {\n    flatCoordinates.push(/** @type {number} */ (values['ele']));\n    delete values['ele'];\n    layoutOptions.hasZ = true;\n  } else {\n    flatCoordinates.push(0);\n  }\n  if ('time' in values) {\n    flatCoordinates.push(/** @type {number} */ (values['time']));\n    delete values['time'];\n    layoutOptions.hasM = true;\n  } else {\n    flatCoordinates.push(0);\n  }\n  return flatCoordinates;\n}\n\n\n/**\n * Choose GeometryLayout based on flags in layoutOptions and adjust flatCoordinates\n * and ends arrays by shrinking them accordingly (removing unused zero entries).\n *\n * @param {LayoutOptions} layoutOptions Layout options.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {Array<number>=} ends Ends.\n * @return {GeometryLayout} Layout.\n */\nfunction applyLayoutOptions(layoutOptions, flatCoordinates, ends) {\n  var layout = GeometryLayout.XY;\n  var stride = 2;\n  if (layoutOptions.hasZ && layoutOptions.hasM) {\n    layout = GeometryLayout.XYZM;\n    stride = 4;\n  } else if (layoutOptions.hasZ) {\n    layout = GeometryLayout.XYZ;\n    stride = 3;\n  } else if (layoutOptions.hasM) {\n    layout = GeometryLayout.XYM;\n    stride = 3;\n  }\n  if (stride !== 4) {\n    for (var i = 0, ii = flatCoordinates.length / 4; i < ii; i++) {\n      flatCoordinates[i * stride] = flatCoordinates[i * 4];\n      flatCoordinates[i * stride + 1] = flatCoordinates[i * 4 + 1];\n      if (layoutOptions.hasZ) {\n        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 2];\n      }\n      if (layoutOptions.hasM) {\n        flatCoordinates[i * stride + 2] = flatCoordinates[i * 4 + 3];\n      }\n    }\n    flatCoordinates.length = flatCoordinates.length / 4 * stride;\n    if (ends) {\n      for (var i$1 = 0, ii$1 = ends.length; i$1 < ii$1; i$1++) {\n        ends[i$1] = ends[i$1] / 4 * stride;\n      }\n    }\n  }\n  return layout;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseLink(node, objectStack) {\n  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var href = node.getAttribute('href');\n  if (href !== null) {\n    values['link'] = href;\n  }\n  parseNode(LINK_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseExtensions(node, objectStack) {\n  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  values['extensionsNode_'] = node;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseRtePt(node, objectStack) {\n  var values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack);\n  if (values) {\n    var rteValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n    var flatCoordinates = /** @type {Array<number>} */ (rteValues['flatCoordinates']);\n    var layoutOptions = /** @type {LayoutOptions} */ (rteValues['layoutOptions']);\n    appendCoordinate(flatCoordinates, layoutOptions, node, values);\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkPt(node, objectStack) {\n  var values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack);\n  if (values) {\n    var trkValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]);\n    var flatCoordinates = /** @type {Array<number>} */ (trkValues['flatCoordinates']);\n    var layoutOptions = /** @type {LayoutOptions} */ (trkValues['layoutOptions']);\n    appendCoordinate(flatCoordinates, layoutOptions, node, values);\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction parseTrkSeg(node, objectStack) {\n  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  parseNode(TRKSEG_PARSERS, node, objectStack);\n  var flatCoordinates = /** @type {Array<number>} */\n      (values['flatCoordinates']);\n  var ends = /** @type {Array<number>} */ (values['ends']);\n  ends.push(flatCoordinates.length);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readRte(node, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n  var values = pushParseAndPop({\n    'flatCoordinates': [],\n    'layoutOptions': {}\n  }, RTE_PARSERS, node, objectStack);\n  if (!values) {\n    return undefined;\n  }\n  var flatCoordinates = /** @type {Array<number>} */\n      (values['flatCoordinates']);\n  delete values['flatCoordinates'];\n  var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n  delete values['layoutOptions'];\n  var layout = applyLayoutOptions(layoutOptions, flatCoordinates);\n  var geometry = new LineString(flatCoordinates, layout);\n  transformWithOptions(geometry, false, options);\n  var feature = new Feature(geometry);\n  feature.setProperties(values);\n  return feature;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Track.\n */\nfunction readTrk(node, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n  var values = pushParseAndPop({\n    'flatCoordinates': [],\n    'ends': [],\n    'layoutOptions': {}\n  }, TRK_PARSERS, node, objectStack);\n  if (!values) {\n    return undefined;\n  }\n  var flatCoordinates = /** @type {Array<number>} */\n      (values['flatCoordinates']);\n  delete values['flatCoordinates'];\n  var ends = /** @type {Array<number>} */ (values['ends']);\n  delete values['ends'];\n  var layoutOptions = /** @type {LayoutOptions} */ (values['layoutOptions']);\n  delete values['layoutOptions'];\n  var layout = applyLayoutOptions(layoutOptions, flatCoordinates, ends);\n  var geometry = new MultiLineString(flatCoordinates, layout, ends);\n  transformWithOptions(geometry, false, options);\n  var feature = new Feature(geometry);\n  feature.setProperties(values);\n  return feature;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Feature|undefined} Waypoint.\n */\nfunction readWpt(node, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n  var values = pushParseAndPop({}, WPT_PARSERS, node, objectStack);\n  if (!values) {\n    return undefined;\n  }\n  var layoutOptions = /** @type {LayoutOptions} */ ({});\n  var coordinates = appendCoordinate([], layoutOptions, node, values);\n  var layout = applyLayoutOptions(layoutOptions, coordinates);\n  var geometry = new Point(coordinates, layout);\n  transformWithOptions(geometry, false, options);\n  var feature = new Feature(geometry);\n  feature.setProperties(values);\n  return feature;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {string} value Value for the link's `href` attribute.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLink(node, value, objectStack) {\n  node.setAttribute('href', value);\n  var context = objectStack[objectStack.length - 1];\n  var properties = context['properties'];\n  var link = [\n    properties['linkText'],\n    properties['linkType']\n  ];\n  pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */ ({node: node}),\n    LINK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY,\n    link, objectStack, LINK_SEQUENCE);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWptType(node, coordinate, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  var parentNode = context.node;\n  var namespaceURI = parentNode.namespaceURI;\n  var properties = context['properties'];\n  //FIXME Projection handling\n  node.setAttributeNS(null, 'lat', String(coordinate[1]));\n  node.setAttributeNS(null, 'lon', String(coordinate[0]));\n  var geometryLayout = context['geometryLayout'];\n  switch (geometryLayout) {\n    case GeometryLayout.XYZM:\n      if (coordinate[3] !== 0) {\n        properties['time'] = coordinate[3];\n      }\n      // fall through\n    case GeometryLayout.XYZ:\n      if (coordinate[2] !== 0) {\n        properties['ele'] = coordinate[2];\n      }\n      break;\n    case GeometryLayout.XYM:\n      if (coordinate[2] !== 0) {\n        properties['time'] = coordinate[2];\n      }\n      break;\n    default:\n      // pass\n  }\n  var orderedKeys = (node.nodeName == 'rtept') ?\n    RTEPT_TYPE_SEQUENCE[namespaceURI] :\n    WPT_TYPE_SEQUENCE[namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */\n    ({node: node, 'properties': properties}),\n    WPT_TYPE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY,\n    values, objectStack, orderedKeys);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeRte(node, feature, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n  var properties = feature.getProperties();\n  var context = {node: node};\n  context['properties'] = properties;\n  var geometry = feature.getGeometry();\n  if (geometry.getType() == GeometryType.LINE_STRING) {\n    var lineString = /** @type {LineString} */ (transformWithOptions(geometry, true, options));\n    context['geometryLayout'] = lineString.getLayout();\n    properties['rtept'] = lineString.getCoordinates();\n  }\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = RTE_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context,\n    RTE_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY,\n    values, objectStack, orderedKeys);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrk(node, feature, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n  var properties = feature.getProperties();\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var context = {node: node};\n  context['properties'] = properties;\n  var geometry = feature.getGeometry();\n  if (geometry.getType() == GeometryType.MULTI_LINE_STRING) {\n    var multiLineString = /** @type {MultiLineString} */ (transformWithOptions(geometry, true, options));\n    properties['trkseg'] = multiLineString.getLineStrings();\n  }\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = TRK_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context,\n    TRK_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY,\n    values, objectStack, orderedKeys);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {LineString} lineString LineString.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeTrkSeg(node, lineString, objectStack) {\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var context = {node: node};\n  context['geometryLayout'] = lineString.getLayout();\n  context['properties'] = {};\n  pushSerializeAndPop(context,\n    TRKSEG_SERIALIZERS, TRKSEG_NODE_FACTORY,\n    lineString.getCoordinates(), objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeWpt(node, feature, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n  var context = objectStack[objectStack.length - 1];\n  context['properties'] = feature.getProperties();\n  var geometry = feature.getGeometry();\n  if (geometry.getType() == GeometryType.POINT) {\n    var point = /** @type {Point} */ (transformWithOptions(geometry, true, options));\n    context['geometryLayout'] = point.getLayout();\n    writeWptType(node, point.getCoordinates(), objectStack);\n  }\n}\n\n\nexport default GPX;\n\n//# sourceMappingURL=GPX.js.map","/**\n * @module ol/format/GeoJSON\n */\n\nimport {assert} from '../asserts.js';\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {assign, isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport GeometryType from '../geom/GeometryType.js';\n\n/**\n * @typedef {import(\"geojson\").GeoJSON} GeoJSONObject\n * @typedef {import(\"geojson\").Feature} GeoJSONFeature\n * @typedef {import(\"geojson\").FeatureCollection} GeoJSONFeatureCollection\n * @typedef {import(\"geojson\").Geometry} GeoJSONGeometry\n * @typedef {import(\"geojson\").Point} GeoJSONPoint\n * @typedef {import(\"geojson\").LineString} GeoJSONLineString\n * @typedef {import(\"geojson\").Polygon} GeoJSONPolygon\n * @typedef {import(\"geojson\").MultiPoint} GeoJSONMultiPoint\n * @typedef {import(\"geojson\").MultiLineString} GeoJSONMultiLineString\n * @typedef {import(\"geojson\").MultiPolygon} GeoJSONMultiPolygon\n * @typedef {import(\"geojson\").GeometryCollection} GeoJSONGeometryCollection\n */\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {import(\"../proj.js\").ProjectionLike} [featureProjection] Projection for features read or\n * written by the format.  Options passed to read or write methods will take precedence.\n * @property {string} [geometryName] Geometry name to use when creating features.\n * @property {boolean} [extractGeometryName=false] Certain GeoJSON providers include\n * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader\n * will look for that field to set the geometry name. If both this field is set to `true`\n * and a `geometryName` is provided, the `geometryName` will take precedence.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the GeoJSON format.\n *\n  * @api\n */\nvar GeoJSON = /*@__PURE__*/(function (JSONFeature) {\n  function GeoJSON(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    JSONFeature.call(this);\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection(\n      options.dataProjection ?\n        options.dataProjection : 'EPSG:4326');\n\n    if (options.featureProjection) {\n      this.defaultFeatureProjection = getProjection(options.featureProjection);\n    }\n\n    /**\n     * Name of the geometry attribute for features.\n     * @type {string|undefined}\n     * @private\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * Look for the geometry name in the feature GeoJSON\n     * @type {boolean|undefined}\n     * @private\n     */\n    this.extractGeometryName_ = options.extractGeometryName;\n\n  }\n\n  if ( JSONFeature ) GeoJSON.__proto__ = JSONFeature;\n  GeoJSON.prototype = Object.create( JSONFeature && JSONFeature.prototype );\n  GeoJSON.prototype.constructor = GeoJSON;\n\n  /**\n   * @inheritDoc\n   */\n  GeoJSON.prototype.readFeatureFromObject = function readFeatureFromObject (object, opt_options) {\n    /**\n     * @type {GeoJSONFeature}\n     */\n    var geoJSONFeature = null;\n    if (object['type'] === 'Feature') {\n      geoJSONFeature = /** @type {GeoJSONFeature} */ (object);\n    } else {\n      geoJSONFeature = {\n        'type': 'Feature',\n        'geometry': /** @type {GeoJSONGeometry} */ (object),\n        'properties': null\n      };\n    }\n\n    var geometry = readGeometry(geoJSONFeature['geometry'], opt_options);\n    var feature = new Feature();\n    if (this.geometryName_) {\n      feature.setGeometryName(this.geometryName_);\n    } else if (this.extractGeometryName_ && 'geometry_name' in geoJSONFeature !== undefined) {\n      feature.setGeometryName(geoJSONFeature['geometry_name']);\n    }\n    feature.setGeometry(geometry);\n\n    if ('id' in geoJSONFeature) {\n      feature.setId(geoJSONFeature['id']);\n    }\n\n    if (geoJSONFeature['properties']) {\n      feature.setProperties(geoJSONFeature['properties']);\n    }\n    return feature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeoJSON.prototype.readFeaturesFromObject = function readFeaturesFromObject (object, opt_options) {\n    var geoJSONObject = /** @type {GeoJSONObject} */ (object);\n    /** @type {Array<import(\"../Feature.js\").default>} */\n    var features = null;\n    if (geoJSONObject['type'] === 'FeatureCollection') {\n      var geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object);\n      features = [];\n      var geoJSONFeatures = geoJSONFeatureCollection['features'];\n      for (var i = 0, ii = geoJSONFeatures.length; i < ii; ++i) {\n        features.push(this.readFeatureFromObject(geoJSONFeatures[i], opt_options));\n      }\n    } else {\n      features = [this.readFeatureFromObject(object, opt_options)];\n    }\n    return features;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeoJSON.prototype.readGeometryFromObject = function readGeometryFromObject (object, opt_options) {\n    return readGeometry(/** @type {GeoJSONGeometry} */ (object), opt_options);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  GeoJSON.prototype.readProjectionFromObject = function readProjectionFromObject (object) {\n    var crs = object['crs'];\n    var projection;\n    if (crs) {\n      if (crs['type'] == 'name') {\n        projection = getProjection(crs['properties']['name']);\n      } else {\n        assert(false, 36); // Unknown SRS type\n      }\n    } else {\n      projection = this.dataProjection;\n    }\n    return (\n      /** @type {import(\"../proj/Projection.js\").default} */ (projection)\n    );\n  };\n\n  /**\n   * Encode a feature as a GeoJSON Feature object.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {GeoJSONFeature} Object.\n   * @override\n   * @api\n   */\n  GeoJSON.prototype.writeFeatureObject = function writeFeatureObject (feature, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n\n    /** @type {GeoJSONFeature} */\n    var object = {\n      'type': 'Feature',\n      geometry: null,\n      properties: null\n    };\n\n    var id = feature.getId();\n    if (id !== undefined) {\n      object.id = id;\n    }\n\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      object.geometry = writeGeometry(geometry, opt_options);\n    }\n\n    var properties = feature.getProperties();\n    delete properties[feature.getGeometryName()];\n    if (!isEmpty(properties)) {\n      object.properties = properties;\n    }\n    return object;\n  };\n\n  /**\n   * Encode an array of features as a GeoJSON object.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {GeoJSONFeatureCollection} GeoJSON Object.\n   * @override\n   * @api\n   */\n  GeoJSON.prototype.writeFeaturesObject = function writeFeaturesObject (features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var objects = [];\n    for (var i = 0, ii = features.length; i < ii; ++i) {\n      objects.push(this.writeFeatureObject(features[i], opt_options));\n    }\n    return {\n      type: 'FeatureCollection',\n      features: objects\n    };\n  };\n\n  /**\n   * Encode a geometry as a GeoJSON object.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {GeoJSONGeometry|GeoJSONGeometryCollection} Object.\n   * @override\n   * @api\n   */\n  GeoJSON.prototype.writeGeometryObject = function writeGeometryObject (geometry, opt_options) {\n    return writeGeometry(geometry, this.adaptOptions(opt_options));\n  };\n\n  return GeoJSON;\n}(JSONFeature));\n\n\n/**\n * @param {GeoJSONGeometry|GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readGeometry(object, opt_options) {\n  if (!object) {\n    return null;\n  }\n\n  /**\n   * @type {import(\"../geom/Geometry.js\").default}\n   */\n  var geometry;\n  switch (object['type']) {\n    case GeometryType.POINT: {\n      geometry = readPointGeometry(/** @type {GeoJSONPoint} */ (object));\n      break;\n    }\n    case GeometryType.LINE_STRING: {\n      geometry = readLineStringGeometry(/** @type {GeoJSONLineString} */ (object));\n      break;\n    }\n    case GeometryType.POLYGON: {\n      geometry = readPolygonGeometry(/** @type {GeoJSONPolygon} */ (object));\n      break;\n    }\n    case GeometryType.MULTI_POINT: {\n      geometry = readMultiPointGeometry(/** @type {GeoJSONMultiPoint} */ (object));\n      break;\n    }\n    case GeometryType.MULTI_LINE_STRING: {\n      geometry = readMultiLineStringGeometry(/** @type {GeoJSONMultiLineString} */ (object));\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      geometry = readMultiPolygonGeometry(/** @type {GeoJSONMultiPolygon} */ (object));\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      geometry = readGeometryCollectionGeometry(/** @type {GeoJSONGeometryCollection} */ (object));\n      break;\n    }\n    default: {\n      throw new Error('Unsupported GeoJSON type: ' + object.type);\n    }\n  }\n  return /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometry, false, opt_options));\n}\n\n\n/**\n * @param {GeoJSONGeometryCollection} object Object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {GeometryCollection} Geometry collection.\n */\nfunction readGeometryCollectionGeometry(object, opt_options) {\n  var geometries = object['geometries'].map(\n    /**\n     * @param {GeoJSONGeometry} geometry Geometry.\n     * @return {import(\"../geom/Geometry.js\").default} geometry Geometry.\n     */\n    function(geometry) {\n      return readGeometry(geometry, opt_options);\n    });\n  return new GeometryCollection(geometries);\n}\n\n\n/**\n * @param {GeoJSONPoint} object Object.\n * @return {Point} Point.\n */\nfunction readPointGeometry(object) {\n  return new Point(object['coordinates']);\n}\n\n\n/**\n * @param {GeoJSONLineString} object Object.\n * @return {LineString} LineString.\n */\nfunction readLineStringGeometry(object) {\n  return new LineString(object['coordinates']);\n}\n\n\n/**\n * @param {GeoJSONMultiLineString} object Object.\n * @return {MultiLineString} MultiLineString.\n */\nfunction readMultiLineStringGeometry(object) {\n  return new MultiLineString(object['coordinates']);\n}\n\n\n/**\n * @param {GeoJSONMultiPoint} object Object.\n * @return {MultiPoint} MultiPoint.\n */\nfunction readMultiPointGeometry(object) {\n  return new MultiPoint(object['coordinates']);\n}\n\n\n/**\n * @param {GeoJSONMultiPolygon} object Object.\n * @return {MultiPolygon} MultiPolygon.\n */\nfunction readMultiPolygonGeometry(object) {\n  return new MultiPolygon(object['coordinates']);\n}\n\n\n/**\n * @param {GeoJSONPolygon} object Object.\n * @return {Polygon} Polygon.\n */\nfunction readPolygonGeometry(object) {\n  return new Polygon(object['coordinates']);\n}\n\n\n/**\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeGeometry(geometry, opt_options) {\n  geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometry, true, opt_options));\n  var type = geometry.getType();\n\n  /** @type {GeoJSONGeometry} */\n  var geoJSON;\n  switch (type) {\n    case GeometryType.POINT: {\n      geoJSON = writePointGeometry(/** @type {Point} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.LINE_STRING: {\n      geoJSON = writeLineStringGeometry(/** @type {LineString} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.POLYGON: {\n      geoJSON = writePolygonGeometry(/** @type {Polygon} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.MULTI_POINT: {\n      geoJSON = writeMultiPointGeometry(/** @type {MultiPoint} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.MULTI_LINE_STRING: {\n      geoJSON = writeMultiLineStringGeometry(/** @type {MultiLineString} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.MULTI_POLYGON: {\n      geoJSON = writeMultiPolygonGeometry(/** @type {MultiPolygon} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.GEOMETRY_COLLECTION: {\n      geoJSON = writeGeometryCollectionGeometry(/** @type {GeometryCollection} */ (geometry), opt_options);\n      break;\n    }\n    case GeometryType.CIRCLE: {\n      geoJSON = {\n        type: 'GeometryCollection',\n        geometries: []\n      };\n      break;\n    }\n    default: {\n      throw new Error('Unsupported geometry type: ' + type);\n    }\n  }\n  return geoJSON;\n}\n\n\n/**\n * @param {GeometryCollection} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometryCollection} GeoJSON geometry collection.\n */\nfunction writeGeometryCollectionGeometry(geometry, opt_options) {\n  var geometries = geometry.getGeometriesArray().map(function(geometry) {\n    var options = assign({}, opt_options);\n    delete options.featureProjection;\n    return writeGeometry(geometry, options);\n  });\n  return {\n    type: 'GeometryCollection',\n    geometries: geometries\n  };\n}\n\n\n/**\n * @param {LineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeLineStringGeometry(geometry, opt_options) {\n  return {\n    type: 'LineString',\n    coordinates: geometry.getCoordinates()\n  };\n}\n\n\n/**\n * @param {MultiLineString} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiLineStringGeometry(geometry, opt_options) {\n  return {\n    type: 'MultiLineString',\n    coordinates: geometry.getCoordinates()\n  };\n}\n\n\n/**\n * @param {MultiPoint} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPointGeometry(geometry, opt_options) {\n  return {\n    type: 'MultiPoint',\n    coordinates: geometry.getCoordinates()\n  };\n}\n\n\n/**\n * @param {MultiPolygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writeMultiPolygonGeometry(geometry, opt_options) {\n  var right;\n  if (opt_options) {\n    right = opt_options.rightHanded;\n  }\n  return {\n    type: 'MultiPolygon',\n    coordinates: geometry.getCoordinates(right)\n  };\n}\n\n\n/**\n * @param {Point} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePointGeometry(geometry, opt_options) {\n  return {\n    type: 'Point',\n    coordinates: geometry.getCoordinates()\n  };\n}\n\n\n/**\n * @param {Polygon} geometry Geometry.\n * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n * @return {GeoJSONGeometry} GeoJSON geometry.\n */\nfunction writePolygonGeometry(geometry, opt_options) {\n  var right;\n  if (opt_options) {\n    right = opt_options.rightHanded;\n  }\n  return {\n    type: 'Polygon',\n    coordinates: geometry.getCoordinates(right)\n  };\n}\n\n\nexport default GeoJSON;\n\n//# sourceMappingURL=GeoJSON.js.map","/**\n * @module ol/format/TextFeature\n */\nimport {abstract} from '../util.js';\nimport FeatureFormat from '../format/Feature.js';\nimport FormatType from '../format/FormatType.js';\n\n/**\n * @classdesc\n * Abstract base class; normally only used for creating subclasses and not\n * instantiated in apps.\n * Base class for text feature formats.\n *\n * @abstract\n */\nvar TextFeature = /*@__PURE__*/(function (FeatureFormat) {\n  function TextFeature() {\n    FeatureFormat.call(this);\n  }\n\n  if ( FeatureFormat ) TextFeature.__proto__ = FeatureFormat;\n  TextFeature.prototype = Object.create( FeatureFormat && FeatureFormat.prototype );\n  TextFeature.prototype.constructor = TextFeature;\n\n  /**\n   * @inheritDoc\n   */\n  TextFeature.prototype.getType = function getType () {\n    return FormatType.TEXT;\n  };\n\n  /**\n   * Read the feature from the source.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../Feature.js\").default} Feature.\n   * @api\n   */\n  TextFeature.prototype.readFeature = function readFeature (source, opt_options) {\n    return this.readFeatureFromText(getText(source), this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {string} text Text.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../Feature.js\").default} Feature.\n   */\n  TextFeature.prototype.readFeatureFromText = function readFeatureFromText (text, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Read the features from the source.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @api\n   */\n  TextFeature.prototype.readFeatures = function readFeatures (source, opt_options) {\n    return this.readFeaturesFromText(getText(source), this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {string} text Text.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   */\n  TextFeature.prototype.readFeaturesFromText = function readFeaturesFromText (text, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Read the geometry from the source.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   * @api\n   */\n  TextFeature.prototype.readGeometry = function readGeometry (source, opt_options) {\n    return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {string} text Text.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @protected\n   * @return {import(\"../geom/Geometry.js\").default} Geometry.\n   */\n  TextFeature.prototype.readGeometryFromText = function readGeometryFromText (text, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Read the projection from the source.\n   *\n   * @param {Document|Node|Object|string} source Source.\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   * @api\n   */\n  TextFeature.prototype.readProjection = function readProjection (source) {\n    return this.readProjectionFromText(getText(source));\n  };\n\n  /**\n   * @param {string} text Text.\n   * @protected\n   * @return {import(\"../proj/Projection.js\").default} Projection.\n   */\n  TextFeature.prototype.readProjectionFromText = function readProjectionFromText (text) {\n    return this.dataProjection;\n  };\n\n  /**\n   * Encode a feature as a string.\n   *\n   * @param {import(\"../Feature.js\").default} feature Feature.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded feature.\n   * @api\n   */\n  TextFeature.prototype.writeFeature = function writeFeature (feature, opt_options) {\n    return this.writeFeatureText(feature, this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../Feature.js\").default} feature Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @protected\n   * @return {string} Text.\n   */\n  TextFeature.prototype.writeFeatureText = function writeFeatureText (feature, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Encode an array of features as string.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Encoded features.\n   * @api\n   */\n  TextFeature.prototype.writeFeatures = function writeFeatures (features, opt_options) {\n    return this.writeFeaturesText(features, this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {Array<import(\"../Feature.js\").default>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @protected\n   * @return {string} Text.\n   */\n  TextFeature.prototype.writeFeaturesText = function writeFeaturesText (features, opt_options) {\n    return abstract();\n  };\n\n  /**\n   * Write a single geometry.\n   *\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @return {string} Geometry.\n   * @api\n   */\n  TextFeature.prototype.writeGeometry = function writeGeometry (geometry, opt_options) {\n    return this.writeGeometryText(geometry, this.adaptOptions(opt_options));\n  };\n\n  /**\n   * @abstract\n   * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Write options.\n   * @protected\n   * @return {string} Text.\n   */\n  TextFeature.prototype.writeGeometryText = function writeGeometryText (geometry, opt_options) {\n    return abstract();\n  };\n\n  return TextFeature;\n}(FeatureFormat));\n\n\n/**\n * @param {Document|Node|Object|string} source Source.\n * @return {string} Text.\n */\nfunction getText(source) {\n  if (typeof source === 'string') {\n    return source;\n  } else {\n    return '';\n  }\n}\n\n\nexport default TextFeature;\n\n//# sourceMappingURL=TextFeature.js.map","/**\n * @module ol/format/KML\n */\nimport Feature from '../Feature.js';\nimport {extend, includes} from '../array.js';\nimport {assert} from '../asserts.js';\nimport {asArray} from '../color.js';\nimport {transformWithOptions} from './Feature.js';\nimport XMLFeature from './XMLFeature.js';\nimport {readDecimal, readBoolean, readString, writeStringTextNode, writeCDATASection, writeDecimalTextNode, writeBooleanTextNode} from './xsd.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {toRadians} from '../math.js';\nimport {get as getProjection} from '../proj.js';\nimport Fill from '../style/Fill.js';\nimport Icon from '../style/Icon.js';\nimport IconAnchorUnits from '../style/IconAnchorUnits.js';\nimport IconOrigin from '../style/IconOrigin.js';\nimport Stroke from '../style/Stroke.js';\nimport Style from '../style/Style.js';\nimport Text from '../style/Text.js';\nimport {createElementNS, getAllTextContent, isDocument, makeArrayExtender,\n  makeArrayPusher, makeChildAppender, makeObjectPropertySetter,\n  makeReplacer, makeSequence, makeSimpleNodeFactory, makeStructureNS,\n  OBJECT_PROPERTY_NODE_FACTORY, parse, parseNode, pushParseAndPop,\n  pushSerializeAndPop, XML_SCHEMA_INSTANCE_URI} from '../xml.js';\n\n/**\n * @typedef {Object} Vec2\n * @property {number} x\n * @property {IconAnchorUnits} xunits\n * @property {number} y\n * @property {IconAnchorUnits} yunits\n * @property {IconOrigin} origin\n */\n\n/**\n * @typedef {Object} GxTrackObject\n * @property {Array<number>} flatCoordinates\n * @property {Array<number>} whens\n */\n\n\n/**\n * @const\n * @type {Array<string>}\n */\nvar GX_NAMESPACE_URIS = [\n  'http://www.google.com/kml/ext/2.2'\n];\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n  null,\n  'http://earth.google.com/kml/2.0',\n  'http://earth.google.com/kml/2.1',\n  'http://earth.google.com/kml/2.2',\n  'http://www.opengis.net/kml/2.2'\n];\n\n\n/**\n * @const\n * @type {string}\n */\nvar SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +\n    'https://developers.google.com/kml/schema/kml22gx.xsd';\n\n\n/**\n * @type {Object<string, IconAnchorUnits>}\n */\nvar ICON_ANCHOR_UNITS_MAP = {\n  'fraction': IconAnchorUnits.FRACTION,\n  'pixels': IconAnchorUnits.PIXELS,\n  'insetPixels': IconAnchorUnits.PIXELS\n};\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PLACEMARK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'MultiGeometry': makeObjectPropertySetter(\n      readMultiGeometry, 'geometry'),\n    'LineString': makeObjectPropertySetter(\n      readLineString, 'geometry'),\n    'LinearRing': makeObjectPropertySetter(\n      readLinearRing, 'geometry'),\n    'Point': makeObjectPropertySetter(\n      readPoint, 'geometry'),\n    'Polygon': makeObjectPropertySetter(\n      readPolygon, 'geometry'),\n    'Style': makeObjectPropertySetter(readStyle),\n    'StyleMap': placemarkStyleMapParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI),\n    'visibility': makeObjectPropertySetter(readBoolean)\n  }, makeStructureNS(\n    GX_NAMESPACE_URIS, {\n      'MultiTrack': makeObjectPropertySetter(\n        readGxMultiTrack, 'geometry'),\n      'Track': makeObjectPropertySetter(\n        readGxTrack, 'geometry')\n    }\n  ));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar NETWORK_LINK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ExtendedData': extendedDataParser,\n    'Region': regionParser,\n    'Link': linkParser,\n    'address': makeObjectPropertySetter(readString),\n    'description': makeObjectPropertySetter(readString),\n    'name': makeObjectPropertySetter(readString),\n    'open': makeObjectPropertySetter(readBoolean),\n    'phoneNumber': makeObjectPropertySetter(readString),\n    'visibility': makeObjectPropertySetter(readBoolean)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LINK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar REGION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LatLonAltBox': latLonAltBoxParser,\n    'Lod': lodParser\n  });\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar KML_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'Document', 'Placemark'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar KML_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Document': makeChildAppender(writeDocument),\n    'Placemark': makeChildAppender(writePlacemark)\n  });\n\n\n/**\n * @type {import(\"../color.js\").Color}\n */\nvar DEFAULT_COLOR;\n\n/**\n * @type {Fill}\n */\nvar DEFAULT_FILL_STYLE = null;\n\n/**\n * Get the default fill style (or null if not yet set).\n * @return {Fill} The default fill style.\n */\nexport function getDefaultFillStyle() {\n  return DEFAULT_FILL_STYLE;\n}\n\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR;\n\n/**\n * @type {IconAnchorUnits}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n\n/**\n * @type {IconAnchorUnits}\n */\nvar DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n\n/**\n * @type {import(\"../size.js\").Size}\n */\nvar DEFAULT_IMAGE_STYLE_SIZE;\n\n/**\n * @type {string}\n */\nvar DEFAULT_IMAGE_STYLE_SRC;\n\n/**\n * @type {number}\n */\nvar DEFAULT_IMAGE_SCALE_MULTIPLIER;\n\n/**\n * @type {import(\"../style/Image.js\").default}\n */\nvar DEFAULT_IMAGE_STYLE = null;\n\n/**\n * Get the default image style (or null if not yet set).\n * @return {import(\"../style/Image.js\").default} The default image style.\n */\nexport function getDefaultImageStyle() {\n  return DEFAULT_IMAGE_STYLE;\n}\n\n/**\n * @type {string}\n */\nvar DEFAULT_NO_IMAGE_STYLE;\n\n/**\n * @type {Stroke}\n */\nvar DEFAULT_STROKE_STYLE = null;\n\n/**\n * Get the default stroke style (or null if not yet set).\n * @return {Stroke} The default stroke style.\n */\nexport function getDefaultStrokeStyle() {\n  return DEFAULT_STROKE_STYLE;\n}\n\n/**\n * @type {Stroke}\n */\nvar DEFAULT_TEXT_STROKE_STYLE;\n\n/**\n * @type {Text}\n */\nvar DEFAULT_TEXT_STYLE = null;\n\n/**\n * Get the default text style (or null if not yet set).\n * @return {Text} The default text style.\n */\nexport function getDefaultTextStyle() {\n  return DEFAULT_TEXT_STYLE;\n}\n\n/**\n * @type {Style}\n */\nvar DEFAULT_STYLE = null;\n\n/**\n * Get the default style (or null if not yet set).\n * @return {Style} The default style.\n */\nexport function getDefaultStyle() {\n  return DEFAULT_STYLE;\n}\n\n/**\n * @type {Array<Style>}\n */\nvar DEFAULT_STYLE_ARRAY = null;\n\n/**\n * Get the default style array (or null if not yet set).\n * @return {Array<Style>} The default style.\n */\nexport function getDefaultStyleArray() {\n  return DEFAULT_STYLE_ARRAY;\n}\n\n\nfunction createStyleDefaults() {\n\n  DEFAULT_COLOR = [255, 255, 255, 1];\n\n  DEFAULT_FILL_STYLE = new Fill({\n    color: DEFAULT_COLOR\n  });\n\n  DEFAULT_IMAGE_STYLE_ANCHOR = [20, 2]; // FIXME maybe [8, 32] ?\n\n  DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS = IconAnchorUnits.PIXELS;\n\n  DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS = IconAnchorUnits.PIXELS;\n\n  DEFAULT_IMAGE_STYLE_SIZE = [64, 64];\n\n  DEFAULT_IMAGE_STYLE_SRC =\n      'https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png';\n\n  DEFAULT_IMAGE_SCALE_MULTIPLIER = 0.5;\n\n  DEFAULT_IMAGE_STYLE = new Icon({\n    anchor: DEFAULT_IMAGE_STYLE_ANCHOR,\n    anchorOrigin: IconOrigin.BOTTOM_LEFT,\n    anchorXUnits: DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS,\n    anchorYUnits: DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS,\n    crossOrigin: 'anonymous',\n    rotation: 0,\n    scale: DEFAULT_IMAGE_SCALE_MULTIPLIER,\n    size: DEFAULT_IMAGE_STYLE_SIZE,\n    src: DEFAULT_IMAGE_STYLE_SRC\n  });\n\n  DEFAULT_NO_IMAGE_STYLE = 'NO_IMAGE';\n\n  DEFAULT_STROKE_STYLE = new Stroke({\n    color: DEFAULT_COLOR,\n    width: 1\n  });\n\n  DEFAULT_TEXT_STROKE_STYLE = new Stroke({\n    color: [51, 51, 51, 1],\n    width: 2\n  });\n\n  DEFAULT_TEXT_STYLE = new Text({\n    font: 'bold 16px Helvetica',\n    fill: DEFAULT_FILL_STYLE,\n    stroke: DEFAULT_TEXT_STROKE_STYLE,\n    scale: 0.8\n  });\n\n  DEFAULT_STYLE = new Style({\n    fill: DEFAULT_FILL_STYLE,\n    image: DEFAULT_IMAGE_STYLE,\n    text: DEFAULT_TEXT_STYLE,\n    stroke: DEFAULT_STROKE_STYLE,\n    zIndex: 0\n  });\n\n  DEFAULT_STYLE_ARRAY = [DEFAULT_STYLE];\n\n}\n\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [extractStyles=true] Extract styles from the KML.\n * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.\n * @property {Array<Style>} [defaultStyle] Default style. The\n * default default style is the same as Google Earth.\n * @property {boolean} [writeStyles=true] Write styles into KML.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the KML format.\n *\n * {@link module:ol/format/KML~KML#readFeature} will read the first feature from\n * a KML source.\n *\n * MultiGeometries are converted into GeometryCollections if they are a mix of\n * geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are\n * all of the same type.\n *\n * Note that the KML format uses the URL() constructor. Older browsers such as IE\n * which do not support this will need a URL polyfill to be loaded before use.\n *\n * @api\n */\nvar KML = /*@__PURE__*/(function (XMLFeature) {\n  function KML(opt_options) {\n    XMLFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    if (!DEFAULT_STYLE_ARRAY) {\n      createStyleDefaults();\n    }\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection('EPSG:4326');\n\n    /**\n     * @private\n     * @type {Array<Style>}\n     */\n    this.defaultStyle_ = options.defaultStyle ?\n      options.defaultStyle : DEFAULT_STYLE_ARRAY;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.extractStyles_ = options.extractStyles !== undefined ?\n      options.extractStyles : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.writeStyles_ = options.writeStyles !== undefined ?\n      options.writeStyles : true;\n\n    /**\n     * @private\n     * @type {!Object<string, (Array<Style>|string)>}\n     */\n    this.sharedStyles_ = {};\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.showPointNames_ = options.showPointNames !== undefined ?\n      options.showPointNames : true;\n\n  }\n\n  if ( XMLFeature ) KML.__proto__ = XMLFeature;\n  KML.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  KML.prototype.constructor = KML;\n\n  /**\n   * @param {Node} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Array<Feature>|undefined} Features.\n   */\n  KML.prototype.readDocumentOrFolder_ = function readDocumentOrFolder_ (node, objectStack) {\n    // FIXME use scope somehow\n    var parsersNS = makeStructureNS(\n      NAMESPACE_URIS, {\n        'Document': makeArrayExtender(this.readDocumentOrFolder_, this),\n        'Folder': makeArrayExtender(this.readDocumentOrFolder_, this),\n        'Placemark': makeArrayPusher(this.readPlacemark_, this),\n        'Style': this.readSharedStyle_.bind(this),\n        'StyleMap': this.readSharedStyleMap_.bind(this)\n      });\n    /** @type {Array<Feature>} */\n    var features = pushParseAndPop([], parsersNS, node, objectStack, this);\n    if (features) {\n      return features;\n    } else {\n      return undefined;\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   * @return {Feature|undefined} Feature.\n   */\n  KML.prototype.readPlacemark_ = function readPlacemark_ (node, objectStack) {\n    var object = pushParseAndPop({'geometry': null},\n      PLACEMARK_PARSERS, node, objectStack);\n    if (!object) {\n      return undefined;\n    }\n    var feature = new Feature();\n    var id = node.getAttribute('id');\n    if (id !== null) {\n      feature.setId(id);\n    }\n    var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n\n    var geometry = object['geometry'];\n    if (geometry) {\n      transformWithOptions(geometry, false, options);\n    }\n    feature.setGeometry(geometry);\n    delete object['geometry'];\n\n    if (this.extractStyles_) {\n      var style = object['Style'];\n      var styleUrl = object['styleUrl'];\n      var styleFunction = createFeatureStyleFunction(\n        style, styleUrl, this.defaultStyle_, this.sharedStyles_,\n        this.showPointNames_);\n      feature.setStyle(styleFunction);\n    }\n    delete object['Style'];\n    // we do not remove the styleUrl property from the object, so it\n    // gets stored on feature when setProperties is called\n\n    feature.setProperties(object);\n\n    return feature;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  KML.prototype.readSharedStyle_ = function readSharedStyle_ (node, objectStack) {\n    var id = node.getAttribute('id');\n    if (id !== null) {\n      var style = readStyle(node, objectStack);\n      if (style) {\n        var styleUri;\n        var baseURI = node.baseURI;\n        if (!baseURI || baseURI == 'about:blank') {\n          baseURI = window.location.href;\n        }\n        if (baseURI) {\n          var url = new URL('#' + id, baseURI);\n          styleUri = url.href;\n        } else {\n          styleUri = '#' + id;\n        }\n        this.sharedStyles_[styleUri] = style;\n      }\n    }\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @private\n   */\n  KML.prototype.readSharedStyleMap_ = function readSharedStyleMap_ (node, objectStack) {\n    var id = node.getAttribute('id');\n    if (id === null) {\n      return;\n    }\n    var styleMapValue = readStyleMapValue(node, objectStack);\n    if (!styleMapValue) {\n      return;\n    }\n    var styleUri;\n    var baseURI = node.baseURI;\n    if (!baseURI || baseURI == 'about:blank') {\n      baseURI = window.location.href;\n    }\n    if (baseURI) {\n      var url = new URL('#' + id, baseURI);\n      styleUri = url.href;\n    } else {\n      styleUri = '#' + id;\n    }\n    this.sharedStyles_[styleUri] = styleMapValue;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  KML.prototype.readFeatureFromNode = function readFeatureFromNode (node, opt_options) {\n    if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n      return null;\n    }\n    var feature = this.readPlacemark_(\n      node, [this.getReadOptions(node, opt_options)]);\n    if (feature) {\n      return feature;\n    } else {\n      return null;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  KML.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    if (!includes(NAMESPACE_URIS, node.namespaceURI)) {\n      return [];\n    }\n    var features;\n    var localName = node.localName;\n    if (localName == 'Document' || localName == 'Folder') {\n      features = this.readDocumentOrFolder_(\n        node, [this.getReadOptions(node, opt_options)]);\n      if (features) {\n        return features;\n      } else {\n        return [];\n      }\n    } else if (localName == 'Placemark') {\n      var feature = this.readPlacemark_(\n        node, [this.getReadOptions(node, opt_options)]);\n      if (feature) {\n        return [feature];\n      } else {\n        return [];\n      }\n    } else if (localName == 'kml') {\n      features = [];\n      for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n        var fs = this.readFeaturesFromNode(n, opt_options);\n        if (fs) {\n          extend(features, fs);\n        }\n      }\n      return features;\n    } else {\n      return [];\n    }\n  };\n\n  /**\n   * Read the name of the KML.\n   *\n   * @param {Document|Element|string} source Source.\n   * @return {string|undefined} Name.\n   * @api\n   */\n  KML.prototype.readName = function readName (source) {\n    if (!source) {\n      return undefined;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readNameFromDocument(doc);\n    } else if (isDocument(source)) {\n      return this.readNameFromDocument(/** @type {Document} */ (source));\n    } else {\n      return this.readNameFromNode(/** @type {Element} */ (source));\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @return {string|undefined} Name.\n   */\n  KML.prototype.readNameFromDocument = function readNameFromDocument (doc) {\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        var name = this.readNameFromNode(/** @type {Element} */ (n));\n        if (name) {\n          return name;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @return {string|undefined} Name.\n   */\n  KML.prototype.readNameFromNode = function readNameFromNode (node) {\n    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n      if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n          n.localName == 'name') {\n        return readString(n);\n      }\n    }\n    for (var n$1 = node.firstElementChild; n$1; n$1 = n$1.nextElementSibling) {\n      var localName = n$1.localName;\n      if (includes(NAMESPACE_URIS, n$1.namespaceURI) &&\n          (localName == 'Document' ||\n           localName == 'Folder' ||\n           localName == 'Placemark' ||\n           localName == 'kml')) {\n        var name = this.readNameFromNode(n$1);\n        if (name) {\n          return name;\n        }\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * Read the network links of the KML.\n   *\n   * @param {Document|Element|string} source Source.\n   * @return {Array<Object>} Network links.\n   * @api\n   */\n  KML.prototype.readNetworkLinks = function readNetworkLinks (source) {\n    var networkLinks = [];\n    if (typeof source === 'string') {\n      var doc = parse(source);\n      extend(networkLinks, this.readNetworkLinksFromDocument(doc));\n    } else if (isDocument(source)) {\n      extend(networkLinks, this.readNetworkLinksFromDocument(\n        /** @type {Document} */ (source)));\n    } else {\n      extend(networkLinks, this.readNetworkLinksFromNode(\n        /** @type {Element} */ (source)));\n    }\n    return networkLinks;\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @return {Array<Object>} Network links.\n   */\n  KML.prototype.readNetworkLinksFromDocument = function readNetworkLinksFromDocument (doc) {\n    var networkLinks = [];\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        extend(networkLinks, this.readNetworkLinksFromNode(/** @type {Element} */ (n)));\n      }\n    }\n    return networkLinks;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @return {Array<Object>} Network links.\n   */\n  KML.prototype.readNetworkLinksFromNode = function readNetworkLinksFromNode (node) {\n    var networkLinks = [];\n    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n      if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n          n.localName == 'NetworkLink') {\n        var obj = pushParseAndPop({}, NETWORK_LINK_PARSERS,\n          n, []);\n        networkLinks.push(obj);\n      }\n    }\n    for (var n$1 = node.firstElementChild; n$1; n$1 = n$1.nextElementSibling) {\n      var localName = n$1.localName;\n      if (includes(NAMESPACE_URIS, n$1.namespaceURI) &&\n          (localName == 'Document' ||\n           localName == 'Folder' ||\n           localName == 'kml')) {\n        extend(networkLinks, this.readNetworkLinksFromNode(n$1));\n      }\n    }\n    return networkLinks;\n  };\n\n  /**\n   * Read the regions of the KML.\n   *\n   * @param {Document|Element|string} source Source.\n   * @return {Array<Object>} Regions.\n   * @api\n   */\n  KML.prototype.readRegion = function readRegion (source) {\n    var regions = [];\n    if (typeof source === 'string') {\n      var doc = parse(source);\n      extend(regions, this.readRegionFromDocument(doc));\n    } else if (isDocument(source)) {\n      extend(regions, this.readRegionFromDocument(\n        /** @type {Document} */ (source)));\n    } else {\n      extend(regions, this.readRegionFromNode(\n        /** @type {Element} */ (source)));\n    }\n    return regions;\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @return {Array<Object>} Region.\n   */\n  KML.prototype.readRegionFromDocument = function readRegionFromDocument (doc) {\n    var regions = [];\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        extend(regions, this.readRegionFromNode(/** @type {Element} */ (n)));\n      }\n    }\n    return regions;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @return {Array<Object>} Region.\n   * @api\n   */\n  KML.prototype.readRegionFromNode = function readRegionFromNode (node) {\n    var regions = [];\n    for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n      if (includes(NAMESPACE_URIS, n.namespaceURI) &&\n          n.localName == 'Region') {\n        var obj = pushParseAndPop({}, REGION_PARSERS,\n          n, []);\n        regions.push(obj);\n      }\n    }\n    for (var n$1 = node.firstElementChild; n$1; n$1 = n$1.nextElementSibling) {\n      var localName = n$1.localName;\n      if (includes(NAMESPACE_URIS, n$1.namespaceURI) &&\n          (localName == 'Document' ||\n           localName == 'Folder' ||\n           localName == 'kml')) {\n        extend(regions, this.readRegionFromNode(n$1));\n      }\n    }\n    return regions;\n  };\n\n  /**\n   * Encode an array of features in the KML format as an XML node. GeometryCollections,\n   * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.\n   *\n   * @param {Array<Feature>} features Features.\n   * @param {import(\"./Feature.js\").WriteOptions=} opt_options Options.\n   * @return {Node} Node.\n   * @override\n   * @api\n   */\n  KML.prototype.writeFeaturesNode = function writeFeaturesNode (features, opt_options) {\n    opt_options = this.adaptOptions(opt_options);\n    var kml = createElementNS(NAMESPACE_URIS[4], 'kml');\n    var xmlnsUri = 'http://www.w3.org/2000/xmlns/';\n    kml.setAttributeNS(xmlnsUri, 'xmlns:gx', GX_NAMESPACE_URIS[0]);\n    kml.setAttributeNS(xmlnsUri, 'xmlns:xsi', XML_SCHEMA_INSTANCE_URI);\n    kml.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', SCHEMA_LOCATION);\n\n    var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: kml};\n    /** @type {!Object<string, (Array<Feature>|Feature|undefined)>} */\n    var properties = {};\n    if (features.length > 1) {\n      properties['Document'] = features;\n    } else if (features.length == 1) {\n      properties['Placemark'] = features[0];\n    }\n    var orderedKeys = KML_SEQUENCE[kml.namespaceURI];\n    var values = makeSequence(properties, orderedKeys);\n    pushSerializeAndPop(context, KML_SERIALIZERS,\n      OBJECT_PROPERTY_NODE_FACTORY, values, [opt_options], orderedKeys,\n      this);\n    return kml;\n  };\n\n  return KML;\n}(XMLFeature));\n\n\n/**\n * @param {Style|undefined} foundStyle Style.\n * @param {string} name Name.\n * @return {Style} style Style.\n */\nfunction createNameStyleFunction(foundStyle, name) {\n  var textStyle = null;\n  var textOffset = [0, 0];\n  var textAlign = 'start';\n  if (foundStyle.getImage()) {\n    var imageSize = foundStyle.getImage().getImageSize();\n    if (imageSize === null) {\n      imageSize = DEFAULT_IMAGE_STYLE_SIZE;\n    }\n    if (imageSize.length == 2) {\n      var imageScale = foundStyle.getImage().getScale();\n      // Offset the label to be centered to the right of the icon, if there is\n      // one.\n      textOffset[0] = imageScale * imageSize[0] / 2;\n      textOffset[1] = -imageScale * imageSize[1] / 2;\n      textAlign = 'left';\n    }\n  }\n  if (foundStyle.getText() !== null) {\n    // clone the text style, customizing it with name, alignments and offset.\n    // Note that kml does not support many text options that OpenLayers does (rotation, textBaseline).\n    var foundText = foundStyle.getText();\n    textStyle = foundText.clone();\n    textStyle.setFont(foundText.getFont() || DEFAULT_TEXT_STYLE.getFont());\n    textStyle.setScale(foundText.getScale() || DEFAULT_TEXT_STYLE.getScale());\n    textStyle.setFill(foundText.getFill() || DEFAULT_TEXT_STYLE.getFill());\n    textStyle.setStroke(foundText.getStroke() || DEFAULT_TEXT_STROKE_STYLE);\n  } else {\n    textStyle = DEFAULT_TEXT_STYLE.clone();\n  }\n  textStyle.setText(name);\n  textStyle.setOffsetX(textOffset[0]);\n  textStyle.setOffsetY(textOffset[1]);\n  textStyle.setTextAlign(textAlign);\n\n  var nameStyle = new Style({\n    text: textStyle\n  });\n  return nameStyle;\n}\n\n\n/**\n * @param {Array<Style>|undefined} style Style.\n * @param {string} styleUrl Style URL.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles Shared styles.\n * @param {boolean|undefined} showPointNames true to show names for point placemarks.\n * @return {import(\"../style/Style.js\").StyleFunction} Feature style function.\n */\nfunction createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, showPointNames) {\n\n  return (\n    /**\n     * @param {Feature} feature feature.\n     * @param {number} resolution Resolution.\n     * @return {Array<Style>} Style.\n     */\n    function(feature, resolution) {\n      var drawName = showPointNames;\n      /** @type {Style|undefined} */\n      var nameStyle;\n      var name = '';\n      if (drawName) {\n        var geometry = feature.getGeometry();\n        if (geometry) {\n          drawName = geometry.getType() === GeometryType.POINT;\n        }\n      }\n\n      if (drawName) {\n        name = /** @type {string} */ (feature.get('name'));\n        drawName = drawName && !!name;\n      }\n\n      if (style) {\n        if (drawName) {\n          nameStyle = createNameStyleFunction(style[0], name);\n          return style.concat(nameStyle);\n        }\n        return style;\n      }\n      if (styleUrl) {\n        var foundStyle = findStyle(styleUrl, defaultStyle, sharedStyles);\n        if (drawName) {\n          nameStyle = createNameStyleFunction(foundStyle[0], name);\n          return foundStyle.concat(nameStyle);\n        }\n        return foundStyle;\n      }\n      if (drawName) {\n        nameStyle = createNameStyleFunction(defaultStyle[0], name);\n        return defaultStyle.concat(nameStyle);\n      }\n      return defaultStyle;\n    }\n  );\n}\n\n\n/**\n * @param {Array<Style>|string|undefined} styleValue Style value.\n * @param {Array<Style>} defaultStyle Default style.\n * @param {!Object<string, (Array<Style>|string)>} sharedStyles\n * Shared styles.\n * @return {Array<Style>} Style.\n */\nfunction findStyle(styleValue, defaultStyle, sharedStyles) {\n  if (Array.isArray(styleValue)) {\n    return styleValue;\n  } else if (typeof styleValue === 'string') {\n    // KML files in the wild occasionally forget the leading `#` on styleUrls\n    // defined in the same document.  Add a leading `#` if it enables to find\n    // a style.\n    if (!(styleValue in sharedStyles) && ('#' + styleValue in sharedStyles)) {\n      styleValue = '#' + styleValue;\n    }\n    return findStyle(sharedStyles[styleValue], defaultStyle, sharedStyles);\n  } else {\n    return defaultStyle;\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {import(\"../color.js\").Color|undefined} Color.\n */\nfunction readColor(node) {\n  var s = getAllTextContent(node, false);\n  // The KML specification states that colors should not include a leading `#`\n  // but we tolerate them.\n  var m = /^\\s*#?\\s*([0-9A-Fa-f]{8})\\s*$/.exec(s);\n  if (m) {\n    var hexColor = m[1];\n    return [\n      parseInt(hexColor.substr(6, 2), 16),\n      parseInt(hexColor.substr(4, 2), 16),\n      parseInt(hexColor.substr(2, 2), 16),\n      parseInt(hexColor.substr(0, 2), 16) / 255\n    ];\n\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {Array<number>|undefined} Flat coordinates.\n */\nexport function readFlatCoordinates(node) {\n  var s = getAllTextContent(node, false);\n  var flatCoordinates = [];\n  // The KML specification states that coordinate tuples should not include\n  // spaces, but we tolerate them.\n  var re =\n      /^\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?)(?:\\s*,\\s*([+\\-]?\\d*\\.?\\d+(?:e[+\\-]?\\d+)?))?\\s*/i;\n  var m;\n  while ((m = re.exec(s))) {\n    var x = parseFloat(m[1]);\n    var y = parseFloat(m[2]);\n    var z = m[3] ? parseFloat(m[3]) : 0;\n    flatCoordinates.push(x, y, z);\n    s = s.substr(m[0].length);\n  }\n  if (s !== '') {\n    return undefined;\n  }\n  return flatCoordinates;\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {string} URI.\n */\nfunction readURI(node) {\n  var s = getAllTextContent(node, false).trim();\n  var baseURI = node.baseURI;\n  if (!baseURI || baseURI == 'about:blank') {\n    baseURI = window.location.href;\n  }\n  if (baseURI) {\n    var url = new URL(s, baseURI);\n    return url.href;\n  } else {\n    return s;\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @return {Vec2} Vec2.\n */\nfunction readVec2(node) {\n  var xunits = node.getAttribute('xunits');\n  var yunits = node.getAttribute('yunits');\n  var origin;\n  if (xunits !== 'insetPixels') {\n    if (yunits !== 'insetPixels') {\n      origin = IconOrigin.BOTTOM_LEFT;\n    } else {\n      origin = IconOrigin.TOP_LEFT;\n    }\n  } else {\n    if (yunits !== 'insetPixels') {\n      origin = IconOrigin.BOTTOM_RIGHT;\n    } else {\n      origin = IconOrigin.TOP_RIGHT;\n    }\n  }\n  return {\n    x: parseFloat(node.getAttribute('x')),\n    xunits: ICON_ANCHOR_UNITS_MAP[xunits],\n    y: parseFloat(node.getAttribute('y')),\n    yunits: ICON_ANCHOR_UNITS_MAP[yunits],\n    origin: origin\n  };\n}\n\n\n/**\n * @param {Node} node Node.\n * @return {number|undefined} Scale.\n */\nfunction readScale(node) {\n  return readDecimal(node);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar STYLE_MAP_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Pair': pairDataParser\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>|string|undefined} StyleMap.\n */\nfunction readStyleMapValue(node, objectStack) {\n  return pushParseAndPop(undefined,\n    STYLE_MAP_PARSERS, node, objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar ICON_STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Icon': makeObjectPropertySetter(readIcon),\n    'heading': makeObjectPropertySetter(readDecimal),\n    'hotSpot': makeObjectPropertySetter(readVec2),\n    'scale': makeObjectPropertySetter(readScale)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction iconStyleParser(node, objectStack) {\n  // FIXME refreshMode\n  // FIXME refreshInterval\n  // FIXME viewRefreshTime\n  // FIXME viewBoundScale\n  // FIXME viewFormat\n  // FIXME httpQuery\n  var object = pushParseAndPop(\n    {}, ICON_STYLE_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var styleObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var IconObject = 'Icon' in object ? object['Icon'] : {};\n  var drawIcon = (!('Icon' in object) || Object.keys(IconObject).length > 0);\n  var src;\n  var href = /** @type {string|undefined} */\n      (IconObject['href']);\n  if (href) {\n    src = href;\n  } else if (drawIcon) {\n    src = DEFAULT_IMAGE_STYLE_SRC;\n  }\n  var anchor, anchorXUnits, anchorYUnits;\n  var anchorOrigin = IconOrigin.BOTTOM_LEFT;\n  var hotSpot = /** @type {Vec2|undefined} */\n      (object['hotSpot']);\n  if (hotSpot) {\n    anchor = [hotSpot.x, hotSpot.y];\n    anchorXUnits = hotSpot.xunits;\n    anchorYUnits = hotSpot.yunits;\n    anchorOrigin = hotSpot.origin;\n  } else if (src === DEFAULT_IMAGE_STYLE_SRC) {\n    anchor = DEFAULT_IMAGE_STYLE_ANCHOR;\n    anchorXUnits = DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;\n    anchorYUnits = DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;\n  } else if (/^http:\\/\\/maps\\.(?:google|gstatic)\\.com\\//.test(src)) {\n    anchor = [0.5, 0];\n    anchorXUnits = IconAnchorUnits.FRACTION;\n    anchorYUnits = IconAnchorUnits.FRACTION;\n  }\n\n  var offset;\n  var x = /** @type {number|undefined} */\n      (IconObject['x']);\n  var y = /** @type {number|undefined} */\n      (IconObject['y']);\n  if (x !== undefined && y !== undefined) {\n    offset = [x, y];\n  }\n\n  var size;\n  var w = /** @type {number|undefined} */\n      (IconObject['w']);\n  var h = /** @type {number|undefined} */\n      (IconObject['h']);\n  if (w !== undefined && h !== undefined) {\n    size = [w, h];\n  }\n\n  var rotation;\n  var heading = /** @type {number} */\n      (object['heading']);\n  if (heading !== undefined) {\n    rotation = toRadians(heading);\n  }\n\n  var scale = /** @type {number|undefined} */\n      (object['scale']);\n\n  if (drawIcon) {\n    if (src == DEFAULT_IMAGE_STYLE_SRC) {\n      size = DEFAULT_IMAGE_STYLE_SIZE;\n      if (scale === undefined) {\n        scale = DEFAULT_IMAGE_SCALE_MULTIPLIER;\n      }\n    }\n\n    var imageStyle = new Icon({\n      anchor: anchor,\n      anchorOrigin: anchorOrigin,\n      anchorXUnits: anchorXUnits,\n      anchorYUnits: anchorYUnits,\n      crossOrigin: 'anonymous', // FIXME should this be configurable?\n      offset: offset,\n      offsetOrigin: IconOrigin.BOTTOM_LEFT,\n      rotation: rotation,\n      scale: scale,\n      size: size,\n      src: src\n    });\n    styleObject['imageStyle'] = imageStyle;\n  } else {\n    // handle the case when we explicitly want to draw no icon.\n    styleObject['imageStyle'] = DEFAULT_NO_IMAGE_STYLE;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LABEL_STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'scale': makeObjectPropertySetter(readScale)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction labelStyleParser(node, objectStack) {\n  // FIXME colorMode\n  var object = pushParseAndPop(\n    {}, LABEL_STYLE_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var styleObject = objectStack[objectStack.length - 1];\n  var textStyle = new Text({\n    fill: new Fill({\n      color: /** @type {import(\"../color.js\").Color} */\n          ('color' in object ? object['color'] : DEFAULT_COLOR)\n    }),\n    scale: /** @type {number|undefined} */\n        (object['scale'])\n  });\n  styleObject['textStyle'] = textStyle;\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LINE_STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'width': makeObjectPropertySetter(readDecimal)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lineStyleParser(node, objectStack) {\n  // FIXME colorMode\n  // FIXME gx:outerColor\n  // FIXME gx:outerWidth\n  // FIXME gx:physicalWidth\n  // FIXME gx:labelVisibility\n  var object = pushParseAndPop(\n    {}, LINE_STYLE_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var styleObject = objectStack[objectStack.length - 1];\n  var strokeStyle = new Stroke({\n    color: /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR),\n    width: /** @type {number} */ ('width' in object ? object['width'] : 1)\n  });\n  styleObject['strokeStyle'] = strokeStyle;\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar POLY_STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeObjectPropertySetter(readColor),\n    'fill': makeObjectPropertySetter(readBoolean),\n    'outline': makeObjectPropertySetter(readBoolean)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction polyStyleParser(node, objectStack) {\n  // FIXME colorMode\n  var object = pushParseAndPop(\n    {}, POLY_STYLE_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var styleObject = objectStack[objectStack.length - 1];\n  var fillStyle = new Fill({\n    color: /** @type {import(\"../color.js\").Color} */\n        ('color' in object ? object['color'] : DEFAULT_COLOR)\n  });\n  styleObject['fillStyle'] = fillStyle;\n  var fill = /** @type {boolean|undefined} */ (object['fill']);\n  if (fill !== undefined) {\n    styleObject['fill'] = fill;\n  }\n  var outline = /** @type {boolean|undefined} */ (object['outline']);\n  if (outline !== undefined) {\n    styleObject['outline'] = outline;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FLAT_LINEAR_RING_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} LinearRing flat coordinates.\n */\nfunction readFlatLinearRing(node, objectStack) {\n  return pushParseAndPop(null,\n    FLAT_LINEAR_RING_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction gxCoordParser(node, objectStack) {\n  var gxTrackObject = /** @type {GxTrackObject} */\n      (objectStack[objectStack.length - 1]);\n  var flatCoordinates = gxTrackObject.flatCoordinates;\n  var s = getAllTextContent(node, false);\n  var re =\n      /^\\s*([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s+([+\\-]?\\d+(?:\\.\\d*)?(?:e[+\\-]?\\d*)?)\\s*$/i;\n  var m = re.exec(s);\n  if (m) {\n    var x = parseFloat(m[1]);\n    var y = parseFloat(m[2]);\n    var z = parseFloat(m[3]);\n    flatCoordinates.push(x, y, z, 0);\n  } else {\n    flatCoordinates.push(0, 0, 0, 0);\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(\n  GX_NAMESPACE_URIS, {\n    'Track': makeArrayPusher(readGxTrack)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {MultiLineString|undefined} MultiLineString.\n */\nfunction readGxMultiTrack(node, objectStack) {\n  var lineStrings = pushParseAndPop([],\n    GX_MULTITRACK_GEOMETRY_PARSERS, node, objectStack);\n  if (!lineStrings) {\n    return undefined;\n  }\n  return new MultiLineString(lineStrings);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar GX_TRACK_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'when': whenParser\n  }, makeStructureNS(\n    GX_NAMESPACE_URIS, {\n      'coord': gxCoordParser\n    }));\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readGxTrack(node, objectStack) {\n  var gxTrackObject = pushParseAndPop(\n    /** @type {GxTrackObject} */ ({\n      flatCoordinates: [],\n      whens: []\n    }), GX_TRACK_PARSERS, node, objectStack);\n  if (!gxTrackObject) {\n    return undefined;\n  }\n  var flatCoordinates = gxTrackObject.flatCoordinates;\n  var whens = gxTrackObject.whens;\n  for (var i = 0, ii = Math.min(flatCoordinates.length, whens.length); i < ii; ++i) {\n    flatCoordinates[4 * i + 3] = whens[i];\n  }\n  return new LineString(flatCoordinates, GeometryLayout.XYZM);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar ICON_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'href': makeObjectPropertySetter(readURI)\n  }, makeStructureNS(\n    GX_NAMESPACE_URIS, {\n      'x': makeObjectPropertySetter(readDecimal),\n      'y': makeObjectPropertySetter(readDecimal),\n      'w': makeObjectPropertySetter(readDecimal),\n      'h': makeObjectPropertySetter(readDecimal)\n    }));\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Icon object.\n */\nfunction readIcon(node, objectStack) {\n  var iconObject = pushParseAndPop(\n    {}, ICON_PARSERS, node, objectStack);\n  if (iconObject) {\n    return iconObject;\n  } else {\n    return null;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar GEOMETRY_FLAT_COORDINATES_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'coordinates': makeReplacer(readFlatCoordinates)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<number>} Flat coordinates.\n */\nfunction readFlatCoordinatesFromNode(node, objectStack) {\n  return pushParseAndPop(null,\n    GEOMETRY_FLAT_COORDINATES_PARSERS, node, objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'extrude': makeObjectPropertySetter(readBoolean),\n    'tessellate': makeObjectPropertySetter(readBoolean),\n    'altitudeMode': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {LineString|undefined} LineString.\n */\nfunction readLineString(node, objectStack) {\n  var properties = pushParseAndPop({},\n    EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node,\n    objectStack);\n  var flatCoordinates =\n      readFlatCoordinatesFromNode(node, objectStack);\n  if (flatCoordinates) {\n    var lineString = new LineString(flatCoordinates, GeometryLayout.XYZ);\n    lineString.setProperties(properties);\n    return lineString;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readLinearRing(node, objectStack) {\n  var properties = pushParseAndPop({},\n    EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node,\n    objectStack);\n  var flatCoordinates =\n      readFlatCoordinatesFromNode(node, objectStack);\n  if (flatCoordinates) {\n    var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, [flatCoordinates.length]);\n    polygon.setProperties(properties);\n    return polygon;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar MULTI_GEOMETRY_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LineString': makeArrayPusher(readLineString),\n    'LinearRing': makeArrayPusher(readLinearRing),\n    'MultiGeometry': makeArrayPusher(readMultiGeometry),\n    'Point': makeArrayPusher(readPoint),\n    'Polygon': makeArrayPusher(readPolygon)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../geom/Geometry.js\").default} Geometry.\n */\nfunction readMultiGeometry(node, objectStack) {\n  var geometries = pushParseAndPop([],\n    MULTI_GEOMETRY_PARSERS, node, objectStack);\n  if (!geometries) {\n    return null;\n  }\n  if (geometries.length === 0) {\n    return new GeometryCollection(geometries);\n  }\n  var multiGeometry;\n  var homogeneous = true;\n  var type = geometries[0].getType();\n  var geometry;\n  for (var i = 1, ii = geometries.length; i < ii; ++i) {\n    geometry = geometries[i];\n    if (geometry.getType() != type) {\n      homogeneous = false;\n      break;\n    }\n  }\n  if (homogeneous) {\n    var layout;\n    var flatCoordinates;\n    if (type == GeometryType.POINT) {\n      var point = geometries[0];\n      layout = point.getLayout();\n      flatCoordinates = point.getFlatCoordinates();\n      for (var i$1 = 1, ii$1 = geometries.length; i$1 < ii$1; ++i$1) {\n        geometry = geometries[i$1];\n        extend(flatCoordinates, geometry.getFlatCoordinates());\n      }\n      multiGeometry = new MultiPoint(flatCoordinates, layout);\n      setCommonGeometryProperties(multiGeometry, geometries);\n    } else if (type == GeometryType.LINE_STRING) {\n      multiGeometry = new MultiLineString(geometries);\n      setCommonGeometryProperties(multiGeometry, geometries);\n    } else if (type == GeometryType.POLYGON) {\n      multiGeometry = new MultiPolygon(geometries);\n      setCommonGeometryProperties(multiGeometry, geometries);\n    } else if (type == GeometryType.GEOMETRY_COLLECTION) {\n      multiGeometry = new GeometryCollection(geometries);\n    } else {\n      assert(false, 37); // Unknown geometry type found\n    }\n  } else {\n    multiGeometry = new GeometryCollection(geometries);\n  }\n  return (\n    /** @type {import(\"../geom/Geometry.js\").default} */ (multiGeometry)\n  );\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Point|undefined} Point.\n */\nfunction readPoint(node, objectStack) {\n  var properties = pushParseAndPop({},\n    EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node,\n    objectStack);\n  var flatCoordinates =\n      readFlatCoordinatesFromNode(node, objectStack);\n  if (flatCoordinates) {\n    var point = new Point(flatCoordinates, GeometryLayout.XYZ);\n    point.setProperties(properties);\n    return point;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'innerBoundaryIs': innerBoundaryIsParser,\n    'outerBoundaryIs': outerBoundaryIsParser\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Polygon|undefined} Polygon.\n */\nfunction readPolygon(node, objectStack) {\n  var properties = pushParseAndPop(/** @type {Object<string,*>} */ ({}),\n    EXTRUDE_AND_ALTITUDE_MODE_PARSERS, node,\n    objectStack);\n  var flatLinearRings = pushParseAndPop([null],\n    FLAT_LINEAR_RINGS_PARSERS, node, objectStack);\n  if (flatLinearRings && flatLinearRings[0]) {\n    var flatCoordinates = flatLinearRings[0];\n    var ends = [flatCoordinates.length];\n    for (var i = 1, ii = flatLinearRings.length; i < ii; ++i) {\n      extend(flatCoordinates, flatLinearRings[i]);\n      ends.push(flatCoordinates.length);\n    }\n    var polygon = new Polygon(flatCoordinates, GeometryLayout.XYZ, ends);\n    polygon.setProperties(properties);\n    return polygon;\n  } else {\n    return undefined;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'IconStyle': iconStyleParser,\n    'LabelStyle': labelStyleParser,\n    'LineStyle': lineStyleParser,\n    'PolyStyle': polyStyleParser\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<Style>} Style.\n */\nfunction readStyle(node, objectStack) {\n  var styleObject = pushParseAndPop(\n    {}, STYLE_PARSERS, node, objectStack);\n  if (!styleObject) {\n    return null;\n  }\n  var fillStyle = /** @type {Fill} */\n      ('fillStyle' in styleObject ?\n        styleObject['fillStyle'] : DEFAULT_FILL_STYLE);\n  var fill = /** @type {boolean|undefined} */ (styleObject['fill']);\n  if (fill !== undefined && !fill) {\n    fillStyle = null;\n  }\n  var imageStyle;\n  if ('imageStyle' in styleObject) {\n    if (styleObject['imageStyle'] != DEFAULT_NO_IMAGE_STYLE) {\n      imageStyle = styleObject['imageStyle'];\n    }\n  } else {\n    imageStyle = DEFAULT_IMAGE_STYLE;\n  }\n  var textStyle = /** @type {Text} */\n      ('textStyle' in styleObject ?\n        styleObject['textStyle'] : DEFAULT_TEXT_STYLE);\n  var strokeStyle = /** @type {Stroke} */\n      ('strokeStyle' in styleObject ?\n        styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE);\n  var outline = /** @type {boolean|undefined} */\n      (styleObject['outline']);\n  if (outline !== undefined && !outline) {\n    strokeStyle = null;\n  }\n  return [new Style({\n    fill: fillStyle,\n    image: imageStyle,\n    stroke: strokeStyle,\n    text: textStyle,\n    zIndex: undefined // FIXME\n  })];\n}\n\n\n/**\n * Reads an array of geometries and creates arrays for common geometry\n * properties. Then sets them to the multi geometry.\n * @param {MultiPoint|MultiLineString|MultiPolygon} multiGeometry A multi-geometry.\n * @param {Array<import(\"../geom/Geometry.js\").default>} geometries List of geometries.\n */\nfunction setCommonGeometryProperties(multiGeometry, geometries) {\n  var ii = geometries.length;\n  var extrudes = new Array(geometries.length);\n  var tessellates = new Array(geometries.length);\n  var altitudeModes = new Array(geometries.length);\n  var hasExtrude, hasTessellate, hasAltitudeMode;\n  hasExtrude = hasTessellate = hasAltitudeMode = false;\n  for (var i = 0; i < ii; ++i) {\n    var geometry = geometries[i];\n    extrudes[i] = geometry.get('extrude');\n    tessellates[i] = geometry.get('tessellate');\n    altitudeModes[i] = geometry.get('altitudeMode');\n    hasExtrude = hasExtrude || extrudes[i] !== undefined;\n    hasTessellate = hasTessellate || tessellates[i] !== undefined;\n    hasAltitudeMode = hasAltitudeMode || altitudeModes[i];\n  }\n  if (hasExtrude) {\n    multiGeometry.set('extrude', extrudes);\n  }\n  if (hasTessellate) {\n    multiGeometry.set('tessellate', tessellates);\n  }\n  if (hasAltitudeMode) {\n    multiGeometry.set('altitudeMode', altitudeModes);\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar DATA_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'displayName': makeObjectPropertySetter(readString),\n    'value': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction dataParser(node, objectStack) {\n  var name = node.getAttribute('name');\n  parseNode(DATA_PARSERS, node, objectStack);\n  var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  if (name !== null) {\n    featureObject[name] = featureObject.value;\n  } else if (featureObject.displayName !== null) {\n    featureObject[featureObject.displayName] = featureObject.value;\n  }\n  delete featureObject['value'];\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar EXTENDED_DATA_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Data': dataParser,\n    'SchemaData': schemaDataParser\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction extendedDataParser(node, objectStack) {\n  parseNode(EXTENDED_DATA_PARSERS, node, objectStack);\n}\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction regionParser(node, objectStack) {\n  parseNode(REGION_PARSERS, node, objectStack);\n}\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PAIR_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Style': makeObjectPropertySetter(readStyle),\n    'key': makeObjectPropertySetter(readString),\n    'styleUrl': makeObjectPropertySetter(readURI)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction pairDataParser(node, objectStack) {\n  var pairObject = pushParseAndPop(\n    {}, PAIR_PARSERS, node, objectStack);\n  if (!pairObject) {\n    return;\n  }\n  var key = /** @type {string|undefined} */\n      (pairObject['key']);\n  if (key && key == 'normal') {\n    var styleUrl = /** @type {string|undefined} */\n        (pairObject['styleUrl']);\n    if (styleUrl) {\n      objectStack[objectStack.length - 1] = styleUrl;\n    }\n    var style = /** @type {Style} */\n        (pairObject['Style']);\n    if (style) {\n      objectStack[objectStack.length - 1] = style;\n    }\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction placemarkStyleMapParser(node, objectStack) {\n  var styleMapValue = readStyleMapValue(node, objectStack);\n  if (!styleMapValue) {\n    return;\n  }\n  var placemarkObject = objectStack[objectStack.length - 1];\n  if (Array.isArray(styleMapValue)) {\n    placemarkObject['Style'] = styleMapValue;\n  } else if (typeof styleMapValue === 'string') {\n    placemarkObject['styleUrl'] = styleMapValue;\n  } else {\n    assert(false, 38); // `styleMapValue` has an unknown type\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar SCHEMA_DATA_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'SimpleData': simpleDataParser\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction schemaDataParser(node, objectStack) {\n  parseNode(SCHEMA_DATA_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction simpleDataParser(node, objectStack) {\n  var name = node.getAttribute('name');\n  if (name !== null) {\n    var data = readString(node);\n    var featureObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n    featureObject[name] = data;\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LAT_LON_ALT_BOX_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'altitudeMode': makeObjectPropertySetter(readString),\n    'minAltitude': makeObjectPropertySetter(readDecimal),\n    'maxAltitude': makeObjectPropertySetter(readDecimal),\n    'north': makeObjectPropertySetter(readDecimal),\n    'south': makeObjectPropertySetter(readDecimal),\n    'east': makeObjectPropertySetter(readDecimal),\n    'west': makeObjectPropertySetter(readDecimal)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction latLonAltBoxParser(node, objectStack) {\n  var object = pushParseAndPop({}, LAT_LON_ALT_BOX_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var regionObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var extent = [\n    parseFloat(object['west']),\n    parseFloat(object['south']),\n    parseFloat(object['east']),\n    parseFloat(object['north'])\n  ];\n  regionObject['extent'] = extent;\n  regionObject['altitudeMode'] = object['altitudeMode'];\n  regionObject['minAltitude'] = parseFloat(object['minAltitude']);\n  regionObject['maxAltitude'] = parseFloat(object['maxAltitude']);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LOD_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'minLodPixels': makeObjectPropertySetter(readDecimal),\n    'maxLodPixels': makeObjectPropertySetter(readDecimal),\n    'minFadeExtent': makeObjectPropertySetter(readDecimal),\n    'maxFadeExtent': makeObjectPropertySetter(readDecimal)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction lodParser(node, objectStack) {\n  var object = pushParseAndPop({}, LOD_PARSERS, node, objectStack);\n  if (!object) {\n    return;\n  }\n  var lodObject = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  lodObject['minLodPixels'] = parseFloat(object['minLodPixels']);\n  lodObject['maxLodPixels'] = parseFloat(object['maxLodPixels']);\n  lodObject['minFadeExtent'] = parseFloat(object['minFadeExtent']);\n  lodObject['maxFadeExtent'] = parseFloat(object['maxFadeExtent']);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar INNER_BOUNDARY_IS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction innerBoundaryIsParser(node, objectStack) {\n  /** @type {Array<number>|undefined} */\n  var flatLinearRing = pushParseAndPop(undefined,\n    INNER_BOUNDARY_IS_PARSERS, node, objectStack);\n  if (flatLinearRing) {\n    var flatLinearRings = /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n    flatLinearRings.push(flatLinearRing);\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OUTER_BOUNDARY_IS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LinearRing': makeReplacer(readFlatLinearRing)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction outerBoundaryIsParser(node, objectStack) {\n  /** @type {Array<number>|undefined} */\n  var flatLinearRing = pushParseAndPop(undefined,\n    OUTER_BOUNDARY_IS_PARSERS, node, objectStack);\n  if (flatLinearRing) {\n    var flatLinearRings = /** @type {Array<Array<number>>} */\n        (objectStack[objectStack.length - 1]);\n    flatLinearRings[0] = flatLinearRing;\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction linkParser(node, objectStack) {\n  parseNode(LINK_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction whenParser(node, objectStack) {\n  var gxTrackObject = /** @type {GxTrackObject} */\n      (objectStack[objectStack.length - 1]);\n  var whens = gxTrackObject.whens;\n  var s = getAllTextContent(node, false);\n  var when = Date.parse(s);\n  whens.push(isNaN(when) ? 0 : when);\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the color to.\n * @param {import(\"../color.js\").Color|string} color Color.\n */\nfunction writeColorTextNode(node, color) {\n  var rgba = asArray(color);\n  var opacity = (rgba.length == 4) ? rgba[3] : 1;\n  /** @type {Array<string|number>} */\n  var abgr = [opacity * 255, rgba[2], rgba[1], rgba[0]];\n  for (var i = 0; i < 4; ++i) {\n    var hex = Math.floor(/** @type {number} */ (abgr[i])).toString(16);\n    abgr[i] = (hex.length == 1) ? '0' + hex : hex;\n  }\n  writeStringTextNode(node, abgr.join(''));\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the coordinates to.\n * @param {Array<number>} coordinates Coordinates.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeCoordinatesTextNode(node, coordinates, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n\n  var layout = context['layout'];\n  var stride = context['stride'];\n\n  var dimension;\n  if (layout == GeometryLayout.XY ||\n      layout == GeometryLayout.XYM) {\n    dimension = 2;\n  } else if (layout == GeometryLayout.XYZ ||\n      layout == GeometryLayout.XYZM) {\n    dimension = 3;\n  } else {\n    assert(false, 34); // Invalid geometry layout\n  }\n\n  var ii = coordinates.length;\n  var text = '';\n  if (ii > 0) {\n    text += coordinates[0];\n    for (var d = 1; d < dimension; ++d) {\n      text += ',' + coordinates[d];\n    }\n    for (var i = stride; i < ii; i += stride) {\n      text += ' ' + coordinates[i];\n      for (var d$1 = 1; d$1 < dimension; ++d$1) {\n        text += ',' + coordinates[i + d$1];\n      }\n    }\n  }\n  writeStringTextNode(node, text);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar EXTENDEDDATA_NODE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Data': makeChildAppender(writeDataNode),\n    'value': makeChildAppender(writeDataNodeValue),\n    'displayName': makeChildAppender(writeDataNodeName)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {{name: *, value: *}} pair Name value pair.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeDataNode(node, pair, objectStack) {\n  node.setAttribute('name', pair.name);\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var value = pair.value;\n\n  if (typeof value == 'object') {\n    if (value !== null && value.displayName) {\n      pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS,\n        OBJECT_PROPERTY_NODE_FACTORY, [value.displayName], objectStack, ['displayName']);\n    }\n\n    if (value !== null && value.value) {\n      pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS,\n        OBJECT_PROPERTY_NODE_FACTORY, [value.value], objectStack, ['value']);\n    }\n  } else {\n    pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS,\n      OBJECT_PROPERTY_NODE_FACTORY, [value], objectStack, ['value']);\n  }\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the name to.\n * @param {string} name DisplayName.\n */\nfunction writeDataNodeName(node, name) {\n  writeCDATASection(node, name);\n}\n\n\n/**\n * @param {Node} node Node to append a CDATA Section with the value to.\n * @param {string} value Value.\n */\nfunction writeDataNodeValue(node, value) {\n  writeStringTextNode(node, value);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar DOCUMENT_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Placemark': makeChildAppender(writePlacemark)\n  });\n\n\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {\n  var parentNode = objectStack[objectStack.length - 1].node;\n  return createElementNS(parentNode.namespaceURI, 'Placemark');\n};\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<Feature>} features Features.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writeDocument(node, features, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  pushSerializeAndPop(context, DOCUMENT_SERIALIZERS,\n    DOCUMENT_NODE_FACTORY, features, objectStack, undefined,\n    this);\n}\n\n\n/**\n * A factory for creating Data nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar DATA_NODE_FACTORY = makeSimpleNodeFactory('Data');\n\n\n/**\n * @param {Node} node Node.\n * @param {{names: Array<string>, values: (Array<*>)}} namesAndValues Names and values.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeExtendedData(node, namesAndValues, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var names = namesAndValues.names;\n  var values = namesAndValues.values;\n  var length = names.length;\n\n  for (var i = 0; i < length; i++) {\n    pushSerializeAndPop(context, EXTENDEDDATA_NODE_SERIALIZERS,\n      DATA_NODE_FACTORY, [{name: names[i], value: values[i]}], objectStack);\n  }\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar ICON_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'href'\n  ],\n  makeStructureNS(GX_NAMESPACE_URIS, [\n    'x', 'y', 'w', 'h'\n  ]));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar ICON_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'href': makeChildAppender(writeStringTextNode)\n  }, makeStructureNS(\n    GX_NAMESPACE_URIS, {\n      'x': makeChildAppender(writeDecimalTextNode),\n      'y': makeChildAppender(writeDecimalTextNode),\n      'w': makeChildAppender(writeDecimalTextNode),\n      'h': makeChildAppender(writeDecimalTextNode)\n    }));\n\n\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GX_NODE_FACTORY = function(value, objectStack, opt_nodeName) {\n  return createElementNS(GX_NAMESPACE_URIS[0],\n    'gx:' + opt_nodeName);\n};\n\n\n/**\n * @param {Node} node Node.\n * @param {Object} icon Icon object.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIcon(node, icon, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = ICON_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(icon, orderedKeys);\n  pushSerializeAndPop(context,\n    ICON_SERIALIZERS, OBJECT_PROPERTY_NODE_FACTORY,\n    values, objectStack, orderedKeys);\n  orderedKeys =\n      ICON_SEQUENCE[GX_NAMESPACE_URIS[0]];\n  values = makeSequence(icon, orderedKeys);\n  pushSerializeAndPop(context, ICON_SERIALIZERS,\n    GX_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar ICON_STYLE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'scale', 'heading', 'Icon', 'hotSpot'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar ICON_STYLE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Icon': makeChildAppender(writeIcon),\n    'heading': makeChildAppender(writeDecimalTextNode),\n    'hotSpot': makeChildAppender(writeVec2),\n    'scale': makeChildAppender(writeScaleTextNode)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"../style/Icon.js\").default} style Icon style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeIconStyle(node, style, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var properties = {};\n  var src = style.getSrc();\n  var size = style.getSize();\n  var iconImageSize = style.getImageSize();\n  var iconProperties = {\n    'href': src\n  };\n\n  if (size) {\n    iconProperties['w'] = size[0];\n    iconProperties['h'] = size[1];\n    var anchor = style.getAnchor(); // top-left\n    var origin = style.getOrigin(); // top-left\n\n    if (origin && iconImageSize && origin[0] !== 0 && origin[1] !== size[1]) {\n      iconProperties['x'] = origin[0];\n      iconProperties['y'] = iconImageSize[1] - (origin[1] + size[1]);\n    }\n\n    if (anchor && (anchor[0] !== size[0] / 2 || anchor[1] !== size[1] / 2)) {\n      var /** @type {Vec2} */ hotSpot = {\n        x: anchor[0],\n        xunits: IconAnchorUnits.PIXELS,\n        y: size[1] - anchor[1],\n        yunits: IconAnchorUnits.PIXELS\n      };\n      properties['hotSpot'] = hotSpot;\n    }\n  }\n\n  properties['Icon'] = iconProperties;\n\n  var scale = style.getScale();\n  if (scale !== 1) {\n    properties['scale'] = scale;\n  }\n\n  var rotation = style.getRotation();\n  if (rotation !== 0) {\n    properties['heading'] = rotation; // 0-360\n  }\n\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = ICON_STYLE_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, ICON_STYLE_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar LABEL_STYLE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'color', 'scale'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar LABEL_STYLE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'scale': makeChildAppender(writeScaleTextNode)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {Text} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLabelStyle(node, style, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var properties = {};\n  var fill = style.getFill();\n  if (fill) {\n    properties['color'] = fill.getColor();\n  }\n  var scale = style.getScale();\n  if (scale && scale !== 1) {\n    properties['scale'] = scale;\n  }\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys =\n      LABEL_STYLE_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, LABEL_STYLE_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar LINE_STYLE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'color', 'width'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar LINE_STYLE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode),\n    'width': makeChildAppender(writeDecimalTextNode)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {Stroke} style style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeLineStyle(node, style, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var properties = {\n    'color': style.getColor(),\n    'width': style.getWidth()\n  };\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = LINE_STYLE_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, LINE_STYLE_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar GEOMETRY_TYPE_TO_NODENAME = {\n  'Point': 'Point',\n  'LineString': 'LineString',\n  'LinearRing': 'LinearRing',\n  'Polygon': 'Polygon',\n  'MultiPoint': 'MultiGeometry',\n  'MultiLineString': 'MultiGeometry',\n  'MultiPolygon': 'MultiGeometry',\n  'GeometryCollection': 'MultiGeometry'\n};\n\n\n/**\n * @const\n * @param {*} value Value.\n * @param {Array<*>} objectStack Object stack.\n * @param {string=} opt_nodeName Node name.\n * @return {Node|undefined} Node.\n */\nvar GEOMETRY_NODE_FACTORY = function(value, objectStack, opt_nodeName) {\n  if (value) {\n    var parentNode = objectStack[objectStack.length - 1].node;\n    return createElementNS(parentNode.namespaceURI,\n      GEOMETRY_TYPE_TO_NODENAME[/** @type {import(\"../geom/Geometry.js\").default} */ (value).getType()]);\n  }\n};\n\n\n/**\n * A factory for creating Point nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POINT_NODE_FACTORY = makeSimpleNodeFactory('Point');\n\n\n/**\n * A factory for creating LineString nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINE_STRING_NODE_FACTORY = makeSimpleNodeFactory('LineString');\n\n\n/**\n * A factory for creating LinearRing nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing');\n\n\n/**\n * A factory for creating Polygon nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar POLYGON_NODE_FACTORY = makeSimpleNodeFactory('Polygon');\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar MULTI_GEOMETRY_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LineString': makeChildAppender(\n      writePrimitiveGeometry),\n    'Point': makeChildAppender(\n      writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'GeometryCollection': makeChildAppender(\n      writeMultiGeometry)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeMultiGeometry(node, geometry, objectStack) {\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var context = {node: node};\n  var type = geometry.getType();\n  /** @type {Array<import(\"../geom/Geometry.js\").default>} */\n  var geometries;\n  /** @type {function(*, Array<*>, string=): (Node|undefined)} */\n  var factory;\n  if (type == GeometryType.GEOMETRY_COLLECTION) {\n    geometries = /** @type {GeometryCollection} */ (geometry).getGeometries();\n    factory = GEOMETRY_NODE_FACTORY;\n  } else if (type == GeometryType.MULTI_POINT) {\n    geometries = /** @type {MultiPoint} */ (geometry).getPoints();\n    factory = POINT_NODE_FACTORY;\n  } else if (type == GeometryType.MULTI_LINE_STRING) {\n    geometries =\n        (/** @type {MultiLineString} */ (geometry)).getLineStrings();\n    factory = LINE_STRING_NODE_FACTORY;\n  } else if (type == GeometryType.MULTI_POLYGON) {\n    geometries =\n        (/** @type {MultiPolygon} */ (geometry)).getPolygons();\n    factory = POLYGON_NODE_FACTORY;\n  } else {\n    assert(false, 39); // Unknown geometry type\n  }\n  pushSerializeAndPop(context,\n    MULTI_GEOMETRY_SERIALIZERS, factory,\n    geometries, objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar BOUNDARY_IS_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LinearRing': makeChildAppender(\n      writePrimitiveGeometry)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/LinearRing.js\").default} linearRing Linear ring.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeBoundaryIs(node, linearRing, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  pushSerializeAndPop(context,\n    BOUNDARY_IS_SERIALIZERS,\n    LINEAR_RING_NODE_FACTORY, [linearRing], objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar PLACEMARK_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ExtendedData': makeChildAppender(writeExtendedData),\n    'MultiGeometry': makeChildAppender(writeMultiGeometry),\n    'LineString': makeChildAppender(writePrimitiveGeometry),\n    'LinearRing': makeChildAppender(writePrimitiveGeometry),\n    'Point': makeChildAppender(writePrimitiveGeometry),\n    'Polygon': makeChildAppender(writePolygon),\n    'Style': makeChildAppender(writeStyle),\n    'address': makeChildAppender(writeStringTextNode),\n    'description': makeChildAppender(writeStringTextNode),\n    'name': makeChildAppender(writeStringTextNode),\n    'open': makeChildAppender(writeBooleanTextNode),\n    'phoneNumber': makeChildAppender(writeStringTextNode),\n    'styleUrl': makeChildAppender(writeStringTextNode),\n    'visibility': makeChildAppender(writeBooleanTextNode)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar PLACEMARK_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'name', 'open', 'visibility', 'address', 'phoneNumber', 'description',\n    'styleUrl', 'Style'\n  ]);\n\n\n/**\n * A factory for creating ExtendedData nodes.\n * @const\n * @type {function(*, Array<*>): (Node|undefined)}\n */\nvar EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');\n\n\n/**\n * FIXME currently we do serialize arbitrary/custom feature properties\n * (ExtendedData).\n * @param {Element} node Node.\n * @param {Feature} feature Feature.\n * @param {Array<*>} objectStack Object stack.\n * @this {KML}\n */\nfunction writePlacemark(node, feature, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n\n  // set id\n  if (feature.getId()) {\n    node.setAttribute('id', /** @type {string} */ (feature.getId()));\n  }\n\n  // serialize properties (properties unknown to KML are not serialized)\n  var properties = feature.getProperties();\n\n  // don't export these to ExtendedData\n  var filter = {'address': 1, 'description': 1, 'name': 1, 'open': 1,\n    'phoneNumber': 1, 'styleUrl': 1, 'visibility': 1};\n  filter[feature.getGeometryName()] = 1;\n  var keys = Object.keys(properties || {}).sort().filter(function(v) {\n    return !filter[v];\n  });\n\n  if (keys.length > 0) {\n    var sequence = makeSequence(properties, keys);\n    var namesAndValues = {names: keys, values: sequence};\n    pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,\n      EXTENDEDDATA_NODE_FACTORY, [namesAndValues], objectStack);\n  }\n\n  var styleFunction = feature.getStyleFunction();\n  if (styleFunction) {\n    // FIXME the styles returned by the style function are supposed to be\n    // resolution-independent here\n    var styles = styleFunction(feature, 0);\n    if (styles) {\n      var style = Array.isArray(styles) ? styles[0] : styles;\n      if (this.writeStyles_) {\n        properties['Style'] = style;\n      }\n      var textStyle = style.getText();\n      if (textStyle) {\n        properties['name'] = textStyle.getText();\n      }\n    }\n  }\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = PLACEMARK_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n\n  // serialize geometry\n  var options = /** @type {import(\"./Feature.js\").WriteOptions} */ (objectStack[0]);\n  var geometry = feature.getGeometry();\n  if (geometry) {\n    geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometry, true, options));\n  }\n  pushSerializeAndPop(context, PLACEMARK_SERIALIZERS,\n    GEOMETRY_NODE_FACTORY, [geometry], objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar PRIMITIVE_GEOMETRY_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'extrude', 'tessellate', 'altitudeMode', 'coordinates'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'extrude': makeChildAppender(writeBooleanTextNode),\n    'tessellate': makeChildAppender(writeBooleanTextNode),\n    'altitudeMode': makeChildAppender(writeStringTextNode),\n    'coordinates': makeChildAppender(writeCoordinatesTextNode)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePrimitiveGeometry(node, geometry, objectStack) {\n  var flatCoordinates = geometry.getFlatCoordinates();\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  context['layout'] = geometry.getLayout();\n  context['stride'] = geometry.getStride();\n\n  // serialize properties (properties unknown to KML are not serialized)\n  var properties = geometry.getProperties();\n  properties.coordinates = flatCoordinates;\n\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = PRIMITIVE_GEOMETRY_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, PRIMITIVE_GEOMETRY_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar POLYGON_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'outerBoundaryIs': makeChildAppender(\n      writeBoundaryIs),\n    'innerBoundaryIs': makeChildAppender(\n      writeBoundaryIs)\n  });\n\n\n/**\n * A factory for creating innerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs');\n\n\n/**\n * A factory for creating outerBoundaryIs nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');\n\n\n/**\n * @param {Node} node Node.\n * @param {Polygon} polygon Polygon.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolygon(node, polygon, objectStack) {\n  var linearRings = polygon.getLinearRings();\n  var outerRing = linearRings.shift();\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  // inner rings\n  pushSerializeAndPop(context,\n    POLYGON_SERIALIZERS,\n    INNER_BOUNDARY_NODE_FACTORY,\n    linearRings, objectStack);\n  // outer ring\n  pushSerializeAndPop(context,\n    POLYGON_SERIALIZERS,\n    OUTER_BOUNDARY_NODE_FACTORY,\n    [outerRing], objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar POLY_STYLE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'color': makeChildAppender(writeColorTextNode)\n  });\n\n\n/**\n * A factory for creating coordinates nodes.\n * @const\n * @type {function(*, Array<*>, string=): (Node|undefined)}\n */\nvar COLOR_NODE_FACTORY = makeSimpleNodeFactory('color');\n\n\n/**\n * @param {Node} node Node.\n * @param {Fill} style Style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writePolyStyle(node, style, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  pushSerializeAndPop(context, POLY_STYLE_SERIALIZERS,\n    COLOR_NODE_FACTORY, [style.getColor()], objectStack);\n}\n\n\n/**\n * @param {Node} node Node to append a TextNode with the scale to.\n * @param {number|undefined} scale Scale.\n */\nfunction writeScaleTextNode(node, scale) {\n  // the Math is to remove any excess decimals created by float arithmetic\n  writeDecimalTextNode(node,\n    Math.round(scale * 1e6) / 1e6);\n}\n\n\n/**\n * @const\n * @type {Object<string, Array<string>>}\n */\nvar STYLE_SEQUENCE = makeStructureNS(\n  NAMESPACE_URIS, [\n    'IconStyle', 'LabelStyle', 'LineStyle', 'PolyStyle'\n  ]);\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar STYLE_SERIALIZERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'IconStyle': makeChildAppender(writeIconStyle),\n    'LabelStyle': makeChildAppender(writeLabelStyle),\n    'LineStyle': makeChildAppender(writeLineStyle),\n    'PolyStyle': makeChildAppender(writePolyStyle)\n  });\n\n\n/**\n * @param {Node} node Node.\n * @param {Style} style Style.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction writeStyle(node, style, objectStack) {\n  var /** @type {import(\"../xml.js\").NodeStackItem} */ context = {node: node};\n  var properties = {};\n  var fillStyle = style.getFill();\n  var strokeStyle = style.getStroke();\n  var imageStyle = style.getImage();\n  var textStyle = style.getText();\n  if (imageStyle && typeof /** @type {?} */ (imageStyle).getSrc === 'function') {\n    properties['IconStyle'] = imageStyle;\n  }\n  if (textStyle) {\n    properties['LabelStyle'] = textStyle;\n  }\n  if (strokeStyle) {\n    properties['LineStyle'] = strokeStyle;\n  }\n  if (fillStyle) {\n    properties['PolyStyle'] = fillStyle;\n  }\n  var parentNode = objectStack[objectStack.length - 1].node;\n  var orderedKeys = STYLE_SEQUENCE[parentNode.namespaceURI];\n  var values = makeSequence(properties, orderedKeys);\n  pushSerializeAndPop(context, STYLE_SERIALIZERS,\n    OBJECT_PROPERTY_NODE_FACTORY, values, objectStack, orderedKeys);\n}\n\n\n/**\n * @param {Element} node Node to append a TextNode with the Vec2 to.\n * @param {Vec2} vec2 Vec2.\n */\nfunction writeVec2(node, vec2) {\n  node.setAttribute('x', String(vec2.x));\n  node.setAttribute('y', String(vec2.y));\n  node.setAttribute('xunits', vec2.xunits);\n  node.setAttribute('yunits', vec2.yunits);\n}\n\n\nexport default KML;\n\n//# sourceMappingURL=KML.js.map","/**\n * @module ol/format/IGC\n */\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport TextFeature from './TextFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * IGC altitude/z. One of 'barometric', 'gps', 'none'.\n * @enum {string}\n */\nvar IGCZ = {\n  BAROMETRIC: 'barometric',\n  GPS: 'gps',\n  NONE: 'none'\n};\n\n/**\n * @const\n * @type {RegExp}\n */\nvar B_RECORD_RE =\n    /^B(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{5})([NS])(\\d{3})(\\d{5})([EW])([AV])(\\d{5})(\\d{5})/;\n\n\n/**\n * @const\n * @type {RegExp}\n */\nvar H_RECORD_RE = /^H.([A-Z]{3}).*?:(.*)/;\n\n\n/**\n * @const\n * @type {RegExp}\n */\nvar HFDTE_RECORD_RE = /^HFDTE(\\d{2})(\\d{2})(\\d{2})/;\n\n\n/**\n * A regular expression matching the newline characters `\\r\\n`, `\\r` and `\\n`.\n *\n * @const\n * @type {RegExp}\n */\nvar NEWLINE_RE = /\\r\\n|\\r|\\n/;\n\n\n/**\n * @typedef {Object} Options\n * @property {IGCZ|string} [altitudeMode='none'] Altitude mode. Possible\n * values are `'barometric'`, `'gps'`, and `'none'`.\n */\n\n\n/**\n * @classdesc\n * Feature format for `*.igc` flight recording files.\n *\n * As IGC sources contain a single feature,\n * {@link module:ol/format/IGC~IGC#readFeatures} will return the feature in an\n * array\n *\n * @api\n */\nvar IGC = /*@__PURE__*/(function (TextFeature) {\n  function IGC(opt_options) {\n    TextFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection('EPSG:4326');\n\n    /**\n     * @private\n     * @type {IGCZ}\n     */\n    this.altitudeMode_ = options.altitudeMode ? options.altitudeMode : IGCZ.NONE;\n  }\n\n  if ( TextFeature ) IGC.__proto__ = TextFeature;\n  IGC.prototype = Object.create( TextFeature && TextFeature.prototype );\n  IGC.prototype.constructor = IGC;\n\n  /**\n   * @inheritDoc\n   */\n  IGC.prototype.readFeatureFromText = function readFeatureFromText (text, opt_options) {\n    var altitudeMode = this.altitudeMode_;\n    var lines = text.split(NEWLINE_RE);\n    /** @type {Object<string, string>} */\n    var properties = {};\n    var flatCoordinates = [];\n    var year = 2000;\n    var month = 0;\n    var day = 1;\n    var lastDateTime = -1;\n    var i, ii;\n    for (i = 0, ii = lines.length; i < ii; ++i) {\n      var line = lines[i];\n      var m = (void 0);\n      if (line.charAt(0) == 'B') {\n        m = B_RECORD_RE.exec(line);\n        if (m) {\n          var hour = parseInt(m[1], 10);\n          var minute = parseInt(m[2], 10);\n          var second = parseInt(m[3], 10);\n          var y = parseInt(m[4], 10) + parseInt(m[5], 10) / 60000;\n          if (m[6] == 'S') {\n            y = -y;\n          }\n          var x = parseInt(m[7], 10) + parseInt(m[8], 10) / 60000;\n          if (m[9] == 'W') {\n            x = -x;\n          }\n          flatCoordinates.push(x, y);\n          if (altitudeMode != IGCZ.NONE) {\n            var z = (void 0);\n            if (altitudeMode == IGCZ.GPS) {\n              z = parseInt(m[11], 10);\n            } else if (altitudeMode == IGCZ.BAROMETRIC) {\n              z = parseInt(m[12], 10);\n            } else {\n              z = 0;\n            }\n            flatCoordinates.push(z);\n          }\n          var dateTime = Date.UTC(year, month, day, hour, minute, second);\n          // Detect UTC midnight wrap around.\n          if (dateTime < lastDateTime) {\n            dateTime = Date.UTC(year, month, day + 1, hour, minute, second);\n          }\n          flatCoordinates.push(dateTime / 1000);\n          lastDateTime = dateTime;\n        }\n      } else if (line.charAt(0) == 'H') {\n        m = HFDTE_RECORD_RE.exec(line);\n        if (m) {\n          day = parseInt(m[1], 10);\n          month = parseInt(m[2], 10) - 1;\n          year = 2000 + parseInt(m[3], 10);\n        } else {\n          m = H_RECORD_RE.exec(line);\n          if (m) {\n            properties[m[1]] = m[2].trim();\n          }\n        }\n      }\n    }\n    if (flatCoordinates.length === 0) {\n      return null;\n    }\n    var layout = altitudeMode == IGCZ.NONE ? GeometryLayout.XYM : GeometryLayout.XYZM;\n    var lineString = new LineString(flatCoordinates, layout);\n    var feature = new Feature(transformWithOptions(lineString, false, opt_options));\n    feature.setProperties(properties);\n    return feature;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  IGC.prototype.readFeaturesFromText = function readFeaturesFromText (text, opt_options) {\n    var feature = this.readFeatureFromText(text, opt_options);\n    if (feature) {\n      return [feature];\n    } else {\n      return [];\n    }\n  };\n\n  return IGC;\n}(TextFeature));\n\nexport default IGC;\n\n//# sourceMappingURL=IGC.js.map","/**\n * @module ol/render/Feature\n */\nimport {extend} from '../array.js';\nimport {createOrUpdateFromCoordinate, createOrUpdateFromFlatCoordinates, getCenter, getHeight} from '../extent.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {getInteriorPointOfArray, getInteriorPointsOfMultiArray} from '../geom/flat/interiorpoint.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {get as getProjection} from '../proj.js';\nimport {transform2D} from '../geom/flat/transform.js';\nimport {create as createTransform, compose as composeTransform} from '../transform.js';\n\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nvar tmpTransform = createTransform();\n\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n *\n * @param {GeometryType} type Geometry type.\n * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n *     to be right-handed for polygons.\n * @param {Array<number>|Array<Array<number>>} ends Ends or Endss.\n * @param {Object<string, *>} properties Properties.\n * @param {number|string|undefined} id Feature id.\n */\nvar RenderFeature = function RenderFeature(type, flatCoordinates, ends, properties, id) {\n  /**\n  * @private\n  * @type {import(\"../extent.js\").Extent|undefined}\n  */\n  this.extent_;\n\n  /**\n  * @private\n  * @type {number|string|undefined}\n  */\n  this.id_ = id;\n\n  /**\n  * @private\n  * @type {GeometryType}\n  */\n  this.type_ = type;\n\n  /**\n  * @private\n  * @type {Array<number>}\n  */\n  this.flatCoordinates_ = flatCoordinates;\n\n  /**\n  * @private\n  * @type {Array<number>}\n  */\n  this.flatInteriorPoints_ = null;\n\n  /**\n  * @private\n  * @type {Array<number>}\n  */\n  this.flatMidpoints_ = null;\n\n  /**\n  * @private\n  * @type {Array<number>|Array<Array<number>>}\n  */\n  this.ends_ = ends;\n\n  /**\n  * @private\n  * @type {Object<string, *>}\n  */\n  this.properties_ = properties;\n\n};\n\n/**\n* Get a feature property by its key.\n* @param {string} key Key\n* @return {*} Value for the requested key.\n* @api\n*/\nRenderFeature.prototype.get = function get (key) {\n  return this.properties_[key];\n};\n\n/**\n* Get the extent of this feature's geometry.\n* @return {import(\"../extent.js\").Extent} Extent.\n* @api\n*/\nRenderFeature.prototype.getExtent = function getExtent () {\n  if (!this.extent_) {\n    this.extent_ = this.type_ === GeometryType.POINT ?\n      createOrUpdateFromCoordinate(this.flatCoordinates_) :\n      createOrUpdateFromFlatCoordinates(\n        this.flatCoordinates_, 0, this.flatCoordinates_.length, 2);\n\n  }\n  return this.extent_;\n};\n\n/**\n* @return {Array<number>} Flat interior points.\n*/\nRenderFeature.prototype.getFlatInteriorPoint = function getFlatInteriorPoint () {\n  if (!this.flatInteriorPoints_) {\n    var flatCenter = getCenter(this.getExtent());\n    this.flatInteriorPoints_ = getInteriorPointOfArray(\n      this.flatCoordinates_, 0, /** @type {Array<number>} */ (this.ends_), 2, flatCenter, 0);\n  }\n  return this.flatInteriorPoints_;\n};\n\n/**\n* @return {Array<number>} Flat interior points.\n*/\nRenderFeature.prototype.getFlatInteriorPoints = function getFlatInteriorPoints () {\n  if (!this.flatInteriorPoints_) {\n    var flatCenters = linearRingssCenter(\n      this.flatCoordinates_, 0, /** @type {Array<Array<number>>} */ (this.ends_), 2);\n    this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n      this.flatCoordinates_, 0, /** @type {Array<Array<number>>} */ (this.ends_), 2, flatCenters);\n  }\n  return this.flatInteriorPoints_;\n};\n\n/**\n* @return {Array<number>} Flat midpoint.\n*/\nRenderFeature.prototype.getFlatMidpoint = function getFlatMidpoint () {\n  if (!this.flatMidpoints_) {\n    this.flatMidpoints_ = interpolatePoint(\n      this.flatCoordinates_, 0, this.flatCoordinates_.length, 2, 0.5);\n  }\n  return this.flatMidpoints_;\n};\n\n/**\n* @return {Array<number>} Flat midpoints.\n*/\nRenderFeature.prototype.getFlatMidpoints = function getFlatMidpoints () {\n  if (!this.flatMidpoints_) {\n    this.flatMidpoints_ = [];\n    var flatCoordinates = this.flatCoordinates_;\n    var offset = 0;\n    var ends = /** @type {Array<number>} */ (this.ends_);\n    for (var i = 0, ii = ends.length; i < ii; ++i) {\n      var end = ends[i];\n      var midpoint = interpolatePoint(\n        flatCoordinates, offset, end, 2, 0.5);\n      extend(this.flatMidpoints_, midpoint);\n      offset = end;\n    }\n  }\n  return this.flatMidpoints_;\n};\n\n/**\n* Get the feature identifier.This is a stable identifier for the feature and\n* is set when reading data from a remote source.\n* @return {number|string|undefined} Id.\n* @api\n*/\nRenderFeature.prototype.getId = function getId () {\n  return this.id_;\n};\n\n/**\n* @return {Array<number>} Flat coordinates.\n*/\nRenderFeature.prototype.getOrientedFlatCoordinates = function getOrientedFlatCoordinates () {\n  return this.flatCoordinates_;\n};\n\n/**\n* For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n* determining the geometry type in style function (see {@link #getType}).\n* @return {RenderFeature} Feature.\n* @api\n*/\nRenderFeature.prototype.getGeometry = function getGeometry () {\n  return this;\n};\n\n/**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {RenderFeature} Simplified geometry.\n */\nRenderFeature.prototype.getSimplifiedGeometry = function getSimplifiedGeometry (squaredTolerance) {\n  return this;\n};\n\n/**\n* Get the feature properties.\n* @return {Object<string, *>} Feature properties.\n* @api\n*/\nRenderFeature.prototype.getProperties = function getProperties () {\n  return this.properties_;\n};\n\n/**\n* @return {number} Stride.\n*/\nRenderFeature.prototype.getStride = function getStride () {\n  return 2;\n};\n\n/**\n * @return {undefined}\n */\nRenderFeature.prototype.getStyleFunction = function getStyleFunction () {\n  return undefined;\n};\n\n/**\n* Get the type of this feature's geometry.\n* @return {GeometryType} Geometry type.\n* @api\n*/\nRenderFeature.prototype.getType = function getType () {\n  return this.type_;\n};\n\n/**\n* Transform geometry coordinates from tile pixel space to projected.\n* The SRS of the source and destination are expected to be the same.\n*\n* @param {import(\"../proj.js\").ProjectionLike} source The current projection\n* @param {import(\"../proj.js\").ProjectionLike} destination The desired projection.\n*/\nRenderFeature.prototype.transform = function transform (source, destination) {\n  source = getProjection(source);\n  var pixelExtent = source.getExtent();\n  var projectedExtent = source.getWorldExtent();\n  var scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n  composeTransform(tmpTransform,\n    projectedExtent[0], projectedExtent[3],\n    scale, -scale, 0,\n    0, 0);\n  transform2D(this.flatCoordinates_, 0, this.flatCoordinates_.length, 2,\n    tmpTransform, this.flatCoordinates_);\n};\n\n\n/**\n * @return {Array<number>|Array<Array<number>>} Ends or endss.\n */\nRenderFeature.prototype.getEnds =\nRenderFeature.prototype.getEndss = function() {\n  return this.ends_;\n};\n\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n    RenderFeature.prototype.getOrientedFlatCoordinates;\n\n\nexport default RenderFeature;\n\n//# sourceMappingURL=Feature.js.map","/**\n * @module ol/format/MVT\n */\n//FIXME Implement projection handling\n\nimport {assert} from '../asserts.js';\nimport PBF from 'pbf';\nimport FeatureFormat, {transformWithOptions} from './Feature.js';\nimport FormatType from './FormatType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {linearRingIsClockwise} from '../geom/flat/orient.js';\nimport Projection from '../proj/Projection.js';\nimport Units from '../proj/Units.js';\nimport RenderFeature from '../render/Feature.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../Feature.js\").FeatureClass} [featureClass] Class for features returned by\n * {@link module:ol/format/MVT#readFeatures}. Set to {@link module:ol/Feature~Feature} to get full editing and geometry\n * support at the cost of decreased rendering performance. The default is\n * {@link module:ol/render/Feature~RenderFeature}, which is optimized for rendering and hit detection.\n * @property {string} [geometryName='geometry'] Geometry name to use when creating features.\n * @property {string} [layerName='layer'] Name of the feature attribute that holds the layer name.\n * @property {Array<string>} [layers] Layers to read features from. If not provided, features will be read from all\n * layers.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading data in the Mapbox MVT format.\n *\n * @param {Options=} opt_options Options.\n * @api\n */\nvar MVT = /*@__PURE__*/(function (FeatureFormat) {\n  function MVT(opt_options) {\n    FeatureFormat.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @type {Projection}\n     */\n    this.dataProjection = new Projection({\n      code: '',\n      units: Units.TILE_PIXELS\n    });\n\n    /**\n     * @private\n     * @type {import(\"../Feature.js\").FeatureClass}\n     */\n    this.featureClass_ = options.featureClass ? options.featureClass : RenderFeature;\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.geometryName_ = options.geometryName;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.layerName_ = options.layerName ? options.layerName : 'layer';\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.layers_ = options.layers ? options.layers : null;\n\n    /**\n     * @private\n     * @type {import(\"../extent.js\").Extent}\n     */\n    this.extent_ = null;\n\n  }\n\n  if ( FeatureFormat ) MVT.__proto__ = FeatureFormat;\n  MVT.prototype = Object.create( FeatureFormat && FeatureFormat.prototype );\n  MVT.prototype.constructor = MVT;\n\n  /**\n   * Read the raw geometry from the pbf offset stored in a raw feature's geometry\n   * property.\n   * @suppress {missingProperties}\n   * @param {Object} pbf PBF.\n   * @param {Object} feature Raw feature.\n   * @param {Array<number>} flatCoordinates Array to store flat coordinates in.\n   * @param {Array<number>} ends Array to store ends in.\n   * @private\n   */\n  MVT.prototype.readRawGeometry_ = function readRawGeometry_ (pbf, feature, flatCoordinates, ends) {\n    pbf.pos = feature.geometry;\n\n    var end = pbf.readVarint() + pbf.pos;\n    var cmd = 1;\n    var length = 0;\n    var x = 0;\n    var y = 0;\n    var coordsLen = 0;\n    var currentEnd = 0;\n\n    while (pbf.pos < end) {\n      if (!length) {\n        var cmdLen = pbf.readVarint();\n        cmd = cmdLen & 0x7;\n        length = cmdLen >> 3;\n      }\n\n      length--;\n\n      if (cmd === 1 || cmd === 2) {\n        x += pbf.readSVarint();\n        y += pbf.readSVarint();\n\n        if (cmd === 1) { // moveTo\n          if (coordsLen > currentEnd) {\n            ends.push(coordsLen);\n            currentEnd = coordsLen;\n          }\n        }\n\n        flatCoordinates.push(x, y);\n        coordsLen += 2;\n\n      } else if (cmd === 7) {\n\n        if (coordsLen > currentEnd) {\n          // close polygon\n          flatCoordinates.push(\n            flatCoordinates[currentEnd], flatCoordinates[currentEnd + 1]);\n          coordsLen += 2;\n        }\n\n      } else {\n        assert(false, 59); // Invalid command found in the PBF\n      }\n    }\n\n    if (coordsLen > currentEnd) {\n      ends.push(coordsLen);\n      currentEnd = coordsLen;\n    }\n\n  };\n\n  /**\n   * @private\n   * @param {Object} pbf PBF\n   * @param {Object} rawFeature Raw Mapbox feature.\n   * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n   * @return {import(\"../Feature.js\").FeatureLike} Feature.\n   */\n  MVT.prototype.createFeature_ = function createFeature_ (pbf, rawFeature, opt_options) {\n    var type = rawFeature.type;\n    if (type === 0) {\n      return null;\n    }\n\n    var feature;\n    var id = rawFeature.id;\n    var values = rawFeature.properties;\n    values[this.layerName_] = rawFeature.layer.name;\n\n    var flatCoordinates = [];\n    var ends = [];\n    this.readRawGeometry_(pbf, rawFeature, flatCoordinates, ends);\n\n    var geometryType = getGeometryType(type, ends.length);\n\n    if (this.featureClass_ === RenderFeature) {\n      feature = new this.featureClass_(geometryType, flatCoordinates, ends, values, id);\n    } else {\n      var geom;\n      if (geometryType == GeometryType.POLYGON) {\n        var endss = [];\n        var offset = 0;\n        var prevEndIndex = 0;\n        for (var i = 0, ii = ends.length; i < ii; ++i) {\n          var end = ends[i];\n          if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {\n            endss.push(ends.slice(prevEndIndex, i));\n            prevEndIndex = i;\n          }\n          offset = end;\n        }\n        if (endss.length > 1) {\n          geom = new MultiPolygon(flatCoordinates, GeometryLayout.XY, endss);\n        } else {\n          geom = new Polygon(flatCoordinates, GeometryLayout.XY, ends);\n        }\n      } else {\n        geom = geometryType === GeometryType.POINT ? new Point(flatCoordinates, GeometryLayout.XY) :\n          geometryType === GeometryType.LINE_STRING ? new LineString(flatCoordinates, GeometryLayout.XY) :\n            geometryType === GeometryType.POLYGON ? new Polygon(flatCoordinates, GeometryLayout.XY, ends) :\n              geometryType === GeometryType.MULTI_POINT ? new MultiPoint(flatCoordinates, GeometryLayout.XY) :\n                geometryType === GeometryType.MULTI_LINE_STRING ? new MultiLineString(flatCoordinates, GeometryLayout.XY, ends) :\n                  null;\n      }\n      var ctor = /** @type {typeof import(\"../Feature.js\").default} */ (this.featureClass_);\n      feature = new ctor();\n      if (this.geometryName_) {\n        feature.setGeometryName(this.geometryName_);\n      }\n      var geometry = /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geom, false,\n        this.adaptOptions(opt_options)));\n      feature.setGeometry(geometry);\n      feature.setId(id);\n      feature.setProperties(values);\n    }\n\n    return feature;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MVT.prototype.getLastExtent = function getLastExtent () {\n    return this.extent_;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  MVT.prototype.getType = function getType () {\n    return FormatType.ARRAY_BUFFER;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MVT.prototype.readFeatures = function readFeatures (source, opt_options) {\n    var layers = this.layers_;\n\n    var pbf = new PBF(/** @type {ArrayBuffer} */ (source));\n    var pbfLayers = pbf.readFields(layersPBFReader, {});\n    /** @type {Array<import(\"../Feature.js\").FeatureLike>} */\n    var features = [];\n    for (var name in pbfLayers) {\n      if (layers && layers.indexOf(name) == -1) {\n        continue;\n      }\n      var pbfLayer = pbfLayers[name];\n\n      for (var i = 0, ii = pbfLayer.length; i < ii; ++i) {\n        var rawFeature = readRawFeature(pbf, pbfLayer, i);\n        features.push(this.createFeature_(pbf, rawFeature));\n      }\n      this.extent_ = pbfLayer ? [0, 0, pbfLayer.extent, pbfLayer.extent] : null;\n    }\n\n    return features;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MVT.prototype.readProjection = function readProjection (source) {\n    return this.dataProjection;\n  };\n\n  /**\n   * Sets the layers that features will be read from.\n   * @param {Array<string>} layers Layers.\n   * @api\n   */\n  MVT.prototype.setLayers = function setLayers (layers) {\n    this.layers_ = layers;\n  };\n\n  return MVT;\n}(FeatureFormat));\n\n\n/**\n * Reader callback for parsing layers.\n * @param {number} tag The tag.\n * @param {Object} layers The layers object.\n * @param {Object} pbf The PBF.\n */\nfunction layersPBFReader(tag, layers, pbf) {\n  if (tag === 3) {\n    var layer = {\n      keys: [],\n      values: [],\n      features: []\n    };\n    var end = pbf.readVarint() + pbf.pos;\n    pbf.readFields(layerPBFReader, layer, end);\n    layer.length = layer.features.length;\n    if (layer.length) {\n      layers[layer.name] = layer;\n    }\n  }\n}\n\n/**\n * Reader callback for parsing layer.\n * @param {number} tag The tag.\n * @param {Object} layer The layer object.\n * @param {Object} pbf The PBF.\n */\nfunction layerPBFReader(tag, layer, pbf) {\n  if (tag === 15) {\n    layer.version = pbf.readVarint();\n  } else if (tag === 1) {\n    layer.name = pbf.readString();\n  } else if (tag === 5) {\n    layer.extent = pbf.readVarint();\n  } else if (tag === 2) {\n    layer.features.push(pbf.pos);\n  } else if (tag === 3) {\n    layer.keys.push(pbf.readString());\n  } else if (tag === 4) {\n    var value = null;\n    var end = pbf.readVarint() + pbf.pos;\n    while (pbf.pos < end) {\n      tag = pbf.readVarint() >> 3;\n      value = tag === 1 ? pbf.readString() :\n        tag === 2 ? pbf.readFloat() :\n          tag === 3 ? pbf.readDouble() :\n            tag === 4 ? pbf.readVarint64() :\n              tag === 5 ? pbf.readVarint() :\n                tag === 6 ? pbf.readSVarint() :\n                  tag === 7 ? pbf.readBoolean() : null;\n    }\n    layer.values.push(value);\n  }\n}\n\n/**\n * Reader callback for parsing feature.\n * @param {number} tag The tag.\n * @param {Object} feature The feature object.\n * @param {Object} pbf The PBF.\n */\nfunction featurePBFReader(tag, feature, pbf) {\n  if (tag == 1) {\n    feature.id = pbf.readVarint();\n  } else if (tag == 2) {\n    var end = pbf.readVarint() + pbf.pos;\n    while (pbf.pos < end) {\n      var key = feature.layer.keys[pbf.readVarint()];\n      var value = feature.layer.values[pbf.readVarint()];\n      feature.properties[key] = value;\n    }\n  } else if (tag == 3) {\n    feature.type = pbf.readVarint();\n  } else if (tag == 4) {\n    feature.geometry = pbf.pos;\n  }\n}\n\n\n/**\n * Read a raw feature from the pbf offset stored at index `i` in the raw layer.\n * @suppress {missingProperties}\n * @param {Object} pbf PBF.\n * @param {Object} layer Raw layer.\n * @param {number} i Index of the feature in the raw layer's `features` array.\n * @return {Object} Raw feature.\n */\nfunction readRawFeature(pbf, layer, i) {\n  pbf.pos = layer.features[i];\n  var end = pbf.readVarint() + pbf.pos;\n\n  var feature = {\n    layer: layer,\n    type: 0,\n    properties: {}\n  };\n  pbf.readFields(featurePBFReader, feature, end);\n  return feature;\n}\n\n\n/**\n * @suppress {missingProperties}\n * @param {number} type The raw feature's geometry type\n * @param {number} numEnds Number of ends of the flat coordinates of the\n * geometry.\n * @return {GeometryType} The geometry type.\n */\nfunction getGeometryType(type, numEnds) {\n  /** @type {GeometryType} */\n  var geometryType;\n  if (type === 1) {\n    geometryType = numEnds === 1 ?\n      GeometryType.POINT : GeometryType.MULTI_POINT;\n  } else if (type === 2) {\n    geometryType = numEnds === 1 ?\n      GeometryType.LINE_STRING :\n      GeometryType.MULTI_LINE_STRING;\n  } else if (type === 3) {\n    geometryType = GeometryType.POLYGON;\n    // MultiPolygon not relevant for rendering - winding order determines\n    // outer rings of polygons.\n  }\n  return geometryType;\n}\n\nexport default MVT;\n\n//# sourceMappingURL=MVT.js.map","/**\n * @module ol/format/OSMXML\n */\n// FIXME add typedef for stack state objects\nimport {extend} from '../array.js';\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport XMLFeature from './XMLFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {isEmpty} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {pushParseAndPop, makeStructureNS} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null>}\n */\nvar NAMESPACE_URIS = [null];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar WAY_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'nd': readNd,\n    'tag': readTag\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'node': readNode,\n    'way': readWay\n  });\n\n\n/**\n * @classdesc\n * Feature format for reading data in the\n * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML).\n *\n * @api\n */\nvar OSMXML = /*@__PURE__*/(function (XMLFeature) {\n  function OSMXML() {\n    XMLFeature.call(this);\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection('EPSG:4326');\n  }\n\n  if ( XMLFeature ) OSMXML.__proto__ = XMLFeature;\n  OSMXML.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  OSMXML.prototype.constructor = OSMXML;\n\n  /**\n   * @inheritDoc\n   */\n  OSMXML.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    var options = this.getReadOptions(node, opt_options);\n    if (node.localName == 'osm') {\n      var state = pushParseAndPop({\n        nodes: {},\n        ways: [],\n        features: []\n      }, PARSERS, node, [options]);\n      // parse nodes in ways\n      for (var j = 0; j < state.ways.length; j++) {\n        var values = /** @type {Object} */ (state.ways[j]);\n        /** @type {Array<number>} */\n        var flatCoordinates = [];\n        for (var i = 0, ii = values.ndrefs.length; i < ii; i++) {\n          var point = state.nodes[values.ndrefs[i]];\n          extend(flatCoordinates, point);\n        }\n        var geometry = (void 0);\n        if (values.ndrefs[0] == values.ndrefs[values.ndrefs.length - 1]) {\n          // closed way\n          geometry = new Polygon(flatCoordinates, GeometryLayout.XY, [flatCoordinates.length]);\n        } else {\n          geometry = new LineString(flatCoordinates, GeometryLayout.XY);\n        }\n        transformWithOptions(geometry, false, options);\n        var feature = new Feature(geometry);\n        feature.setId(values.id);\n        feature.setProperties(values.tags);\n        state.features.push(feature);\n      }\n      if (state.features) {\n        return state.features;\n      }\n    }\n    return [];\n  };\n\n  return OSMXML;\n}(XMLFeature));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar NODE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'tag': readTag\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNode(node, objectStack) {\n  var options = /** @type {import(\"./Feature.js\").ReadOptions} */ (objectStack[0]);\n  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var id = node.getAttribute('id');\n  /** @type {import(\"../coordinate.js\").Coordinate} */\n  var coordinates = [\n    parseFloat(node.getAttribute('lon')),\n    parseFloat(node.getAttribute('lat'))\n  ];\n  state.nodes[id] = coordinates;\n\n  var values = pushParseAndPop({\n    tags: {}\n  }, NODE_PARSERS, node, objectStack);\n  if (!isEmpty(values.tags)) {\n    var geometry = new Point(coordinates);\n    transformWithOptions(geometry, false, options);\n    var feature = new Feature(geometry);\n    feature.setId(id);\n    feature.setProperties(values.tags);\n    state.features.push(feature);\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readWay(node, objectStack) {\n  var id = node.getAttribute('id');\n  var values = pushParseAndPop({\n    id: id,\n    ndrefs: [],\n    tags: {}\n  }, WAY_PARSERS, node, objectStack);\n  var state = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  state.ways.push(values);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readNd(node, objectStack) {\n  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  values.ndrefs.push(node.getAttribute('ref'));\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction readTag(node, objectStack) {\n  var values = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  values.tags[node.getAttribute('k')] = node.getAttribute('v');\n}\n\n\nexport default OSMXML;\n\n//# sourceMappingURL=OSMXML.js.map","/**\n * @module ol/geom/flat/flip\n */\n\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {Array<number>=} opt_dest Destination.\n * @param {number=} opt_destOffset Destination offset.\n * @return {Array<number>} Flat coordinates.\n */\nexport function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {\n  var dest, destOffset;\n  if (opt_dest !== undefined) {\n    dest = opt_dest;\n    destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;\n  } else {\n    dest = [];\n    destOffset = 0;\n  }\n  var j = offset;\n  while (j < end) {\n    var x = flatCoordinates[j++];\n    dest[destOffset++] = flatCoordinates[j++];\n    dest[destOffset++] = x;\n    for (var k = 2; k < stride; ++k) {\n      dest[destOffset++] = flatCoordinates[j++];\n    }\n  }\n  dest.length = destOffset;\n  return dest;\n}\n\n//# sourceMappingURL=flip.js.map","/**\n * @module ol/format/Polyline\n */\nimport {assert} from '../asserts.js';\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport TextFeature from './TextFeature.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport {getStrideForLayout} from '../geom/SimpleGeometry.js';\nimport {flipXY} from '../geom/flat/flip.js';\nimport {inflateCoordinates} from '../geom/flat/inflate.js';\nimport {get as getProjection} from '../proj.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.\n * @property {GeometryLayout} [geometryLayout='XY'] Layout of the\n * feature geometries created by the format reader.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the Encoded\n * Polyline Algorithm Format.\n *\n * When reading features, the coordinates are assumed to be in two dimensions\n * and in [latitude, longitude] order.\n *\n * As Polyline sources contain a single feature,\n * {@link module:ol/format/Polyline~Polyline#readFeatures} will return the\n * feature in an array.\n *\n * @api\n */\nvar Polyline = /*@__PURE__*/(function (TextFeature) {\n  function Polyline(opt_options) {\n    TextFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection('EPSG:4326');\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.factor_ = options.factor ? options.factor : 1e5;\n\n    /**\n     * @private\n     * @type {GeometryLayout}\n     */\n    this.geometryLayout_ = options.geometryLayout ?\n      options.geometryLayout : GeometryLayout.XY;\n  }\n\n  if ( TextFeature ) Polyline.__proto__ = TextFeature;\n  Polyline.prototype = Object.create( TextFeature && TextFeature.prototype );\n  Polyline.prototype.constructor = Polyline;\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.readFeatureFromText = function readFeatureFromText (text, opt_options) {\n    var geometry = this.readGeometryFromText(text, opt_options);\n    return new Feature(geometry);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.readFeaturesFromText = function readFeaturesFromText (text, opt_options) {\n    var feature = this.readFeatureFromText(text, opt_options);\n    return [feature];\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.readGeometryFromText = function readGeometryFromText (text, opt_options) {\n    var stride = getStrideForLayout(this.geometryLayout_);\n    var flatCoordinates = decodeDeltas(text, stride, this.factor_);\n    flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n    var coordinates = inflateCoordinates(flatCoordinates, 0, flatCoordinates.length, stride);\n\n    return (\n      /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(\n        new LineString(coordinates, this.geometryLayout_),\n        false,\n        this.adaptOptions(opt_options)\n      ))\n    );\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.writeFeatureText = function writeFeatureText (feature, opt_options) {\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      return this.writeGeometryText(geometry, opt_options);\n    } else {\n      assert(false, 40); // Expected `feature` to have a geometry\n      return '';\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.writeFeaturesText = function writeFeaturesText (features, opt_options) {\n    return this.writeFeatureText(features[0], opt_options);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  Polyline.prototype.writeGeometryText = function writeGeometryText (geometry, opt_options) {\n    geometry = /** @type {LineString} */\n      (transformWithOptions(geometry, true, this.adaptOptions(opt_options)));\n    var flatCoordinates = geometry.getFlatCoordinates();\n    var stride = geometry.getStride();\n    flipXY(flatCoordinates, 0, flatCoordinates.length, stride, flatCoordinates);\n    return encodeDeltas(flatCoordinates, stride, this.factor_);\n  };\n\n  return Polyline;\n}(TextFeature));\n\n\n/**\n * Encode a list of n-dimensional points and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of n-dimensional points.\n * @param {number} stride The number of dimension of the points in the list.\n * @param {number=} opt_factor The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeDeltas(numbers, stride, opt_factor) {\n  var factor = opt_factor ? opt_factor : 1e5;\n  var d;\n\n  var lastNumbers = new Array(stride);\n  for (d = 0; d < stride; ++d) {\n    lastNumbers[d] = 0;\n  }\n\n  for (var i = 0, ii = numbers.length; i < ii;) {\n    for (d = 0; d < stride; ++d, ++i) {\n      var num = numbers[i];\n      var delta = num - lastNumbers[d];\n      lastNumbers[d] = num;\n\n      numbers[i] = delta;\n    }\n  }\n\n  return encodeFloats(numbers, factor);\n}\n\n\n/**\n * Decode a list of n-dimensional points from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number} stride The number of dimension of the points in the\n *     encoded string.\n * @param {number=} opt_factor The factor by which the resulting numbers will\n *     be divided. Default is `1e5`.\n * @return {Array<number>} A list of n-dimensional points.\n * @api\n */\nexport function decodeDeltas(encoded, stride, opt_factor) {\n  var factor = opt_factor ? opt_factor : 1e5;\n  var d;\n\n  /** @type {Array<number>} */\n  var lastNumbers = new Array(stride);\n  for (d = 0; d < stride; ++d) {\n    lastNumbers[d] = 0;\n  }\n\n  var numbers = decodeFloats(encoded, factor);\n\n  for (var i = 0, ii = numbers.length; i < ii;) {\n    for (d = 0; d < stride; ++d, ++i) {\n      lastNumbers[d] += numbers[i];\n\n      numbers[i] = lastNumbers[d];\n    }\n  }\n\n  return numbers;\n}\n\n\n/**\n * Encode a list of floating point numbers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of floating point numbers.\n * @param {number=} opt_factor The factor by which the numbers will be\n *     multiplied. The remaining decimal places will get rounded away.\n *     Default is `1e5`.\n * @return {string} The encoded string.\n * @api\n */\nexport function encodeFloats(numbers, opt_factor) {\n  var factor = opt_factor ? opt_factor : 1e5;\n  for (var i = 0, ii = numbers.length; i < ii; ++i) {\n    numbers[i] = Math.round(numbers[i] * factor);\n  }\n\n  return encodeSignedIntegers(numbers);\n}\n\n\n/**\n * Decode a list of floating point numbers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @param {number=} opt_factor The factor by which the result will be divided.\n *     Default is `1e5`.\n * @return {Array<number>} A list of floating point numbers.\n * @api\n */\nexport function decodeFloats(encoded, opt_factor) {\n  var factor = opt_factor ? opt_factor : 1e5;\n  var numbers = decodeSignedIntegers(encoded);\n  for (var i = 0, ii = numbers.length; i < ii; ++i) {\n    numbers[i] /= factor;\n  }\n  return numbers;\n}\n\n\n/**\n * Encode a list of signed integers and return an encoded string\n *\n * Attention: This function will modify the passed array!\n *\n * @param {Array<number>} numbers A list of signed integers.\n * @return {string} The encoded string.\n */\nexport function encodeSignedIntegers(numbers) {\n  for (var i = 0, ii = numbers.length; i < ii; ++i) {\n    var num = numbers[i];\n    numbers[i] = (num < 0) ? ~(num << 1) : (num << 1);\n  }\n  return encodeUnsignedIntegers(numbers);\n}\n\n\n/**\n * Decode a list of signed integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of signed integers.\n */\nexport function decodeSignedIntegers(encoded) {\n  var numbers = decodeUnsignedIntegers(encoded);\n  for (var i = 0, ii = numbers.length; i < ii; ++i) {\n    var num = numbers[i];\n    numbers[i] = (num & 1) ? ~(num >> 1) : (num >> 1);\n  }\n  return numbers;\n}\n\n\n/**\n * Encode a list of unsigned integers and return an encoded string\n *\n * @param {Array<number>} numbers A list of unsigned integers.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedIntegers(numbers) {\n  var encoded = '';\n  for (var i = 0, ii = numbers.length; i < ii; ++i) {\n    encoded += encodeUnsignedInteger(numbers[i]);\n  }\n  return encoded;\n}\n\n\n/**\n * Decode a list of unsigned integers from an encoded string\n *\n * @param {string} encoded An encoded string.\n * @return {Array<number>} A list of unsigned integers.\n */\nexport function decodeUnsignedIntegers(encoded) {\n  var numbers = [];\n  var current = 0;\n  var shift = 0;\n  for (var i = 0, ii = encoded.length; i < ii; ++i) {\n    var b = encoded.charCodeAt(i) - 63;\n    current |= (b & 0x1f) << shift;\n    if (b < 0x20) {\n      numbers.push(current);\n      current = 0;\n      shift = 0;\n    } else {\n      shift += 5;\n    }\n  }\n  return numbers;\n}\n\n\n/**\n * Encode one single unsigned integer and return an encoded string\n *\n * @param {number} num Unsigned integer that should be encoded.\n * @return {string} The encoded string.\n */\nexport function encodeUnsignedInteger(num) {\n  var value, encoded = '';\n  while (num >= 0x20) {\n    value = (0x20 | (num & 0x1f)) + 63;\n    encoded += String.fromCharCode(value);\n    num >>= 5;\n  }\n  value = num + 63;\n  encoded += String.fromCharCode(value);\n  return encoded;\n}\n\n\nexport default Polyline;\n\n//# sourceMappingURL=Polyline.js.map","/**\n * @module ol/format/TopoJSON\n */\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport JSONFeature from './JSONFeature.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\nimport {get as getProjection} from '../proj.js';\n\n/**\n * @typedef {import(\"topojson-specification\").Topology} TopoJSONTopology\n * @typedef {import(\"topojson-specification\").GeometryCollection} TopoJSONGeometryCollection\n * @typedef {import(\"topojson-specification\").GeometryObject} TopoJSONGeometry\n * @typedef {import(\"topojson-specification\").Point} TopoJSONPoint\n * @typedef {import(\"topojson-specification\").MultiPoint} TopoJSONMultiPoint\n * @typedef {import(\"topojson-specification\").LineString} TopoJSONLineString\n * @typedef {import(\"topojson-specification\").MultiLineString} TopoJSONMultiLineString\n * @typedef {import(\"topojson-specification\").Polygon} TopoJSONPolygon\n * @typedef {import(\"topojson-specification\").MultiPolygon} TopoJSONMultiPolygon\n */\n\n/**\n * @typedef {Object} Options\n * @property {import(\"../proj.js\").ProjectionLike} [dataProjection='EPSG:4326'] Default data projection.\n * @property {string} [layerName] Set the name of the TopoJSON topology\n * `objects`'s children as feature property with the specified name. This means\n * that when set to `'layer'`, a topology like\n * ```\n * {\n *   \"type\": \"Topology\",\n *   \"objects\": {\n *     \"example\": {\n *       \"type\": \"GeometryCollection\",\n *       \"geometries\": []\n *     }\n *   }\n * }\n * ```\n * will result in features that have a property `'layer'` set to `'example'`.\n * When not set, no property will be added to features.\n * @property {Array<string>} [layers] Names of the TopoJSON topology's\n * `objects`'s children to read features from.  If not provided, features will\n * be read from all children.\n */\n\n\n/**\n * @classdesc\n * Feature format for reading data in the TopoJSON format.\n *\n * @api\n */\nvar TopoJSON = /*@__PURE__*/(function (JSONFeature) {\n  function TopoJSON(opt_options) {\n    JSONFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {string|undefined}\n     */\n    this.layerName_ = options.layerName;\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.layers_ = options.layers ? options.layers : null;\n\n    /**\n     * @inheritDoc\n     */\n    this.dataProjection = getProjection(\n      options.dataProjection ?\n        options.dataProjection : 'EPSG:4326');\n\n  }\n\n  if ( JSONFeature ) TopoJSON.__proto__ = JSONFeature;\n  TopoJSON.prototype = Object.create( JSONFeature && JSONFeature.prototype );\n  TopoJSON.prototype.constructor = TopoJSON;\n\n  /**\n   * @inheritDoc\n   */\n  TopoJSON.prototype.readFeaturesFromObject = function readFeaturesFromObject (object, opt_options) {\n    if (object.type == 'Topology') {\n      var topoJSONTopology = /** @type {TopoJSONTopology} */ (object);\n      var transform, scale = null, translate = null;\n      if (topoJSONTopology['transform']) {\n        transform = topoJSONTopology['transform'];\n        scale = transform['scale'];\n        translate = transform['translate'];\n      }\n      var arcs = topoJSONTopology['arcs'];\n      if (transform) {\n        transformArcs(arcs, scale, translate);\n      }\n      /** @type {Array<Feature>} */\n      var features = [];\n      var topoJSONFeatures = topoJSONTopology['objects'];\n      var property = this.layerName_;\n      var feature;\n      for (var objectName in topoJSONFeatures) {\n        if (this.layers_ && this.layers_.indexOf(objectName) == -1) {\n          continue;\n        }\n        if (topoJSONFeatures[objectName].type === 'GeometryCollection') {\n          feature = /** @type {TopoJSONGeometryCollection} */ (topoJSONFeatures[objectName]);\n          features.push.apply(features, readFeaturesFromGeometryCollection(\n            feature, arcs, scale, translate, property, objectName, opt_options));\n        } else {\n          feature = /** @type {TopoJSONGeometry} */ (topoJSONFeatures[objectName]);\n          features.push(readFeatureFromGeometry(\n            feature, arcs, scale, translate, property, objectName, opt_options));\n        }\n      }\n      return features;\n    } else {\n      return [];\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  TopoJSON.prototype.readProjectionFromObject = function readProjectionFromObject (object) {\n    return this.dataProjection;\n  };\n\n  return TopoJSON;\n}(JSONFeature));\n\n\n/**\n * @const\n * @type {Object<string, function(TopoJSONGeometry, Array, ...Array=): import(\"../geom/Geometry.js\").default>}\n */\nvar GEOMETRY_READERS = {\n  'Point': readPointGeometry,\n  'LineString': readLineStringGeometry,\n  'Polygon': readPolygonGeometry,\n  'MultiPoint': readMultiPointGeometry,\n  'MultiLineString': readMultiLineStringGeometry,\n  'MultiPolygon': readMultiPolygonGeometry\n};\n\n\n/**\n * Concatenate arcs into a coordinate array.\n * @param {Array<number>} indices Indices of arcs to concatenate.  Negative\n *     values indicate arcs need to be reversed.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs (already\n *     transformed).\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates array.\n */\nfunction concatenateArcs(indices, arcs) {\n  /** @type {Array<import(\"../coordinate.js\").Coordinate>} */\n  var coordinates = [];\n  var index, arc;\n  for (var i = 0, ii = indices.length; i < ii; ++i) {\n    index = indices[i];\n    if (i > 0) {\n      // splicing together arcs, discard last point\n      coordinates.pop();\n    }\n    if (index >= 0) {\n      // forward arc\n      arc = arcs[index];\n    } else {\n      // reverse arc\n      arc = arcs[~index].slice().reverse();\n    }\n    coordinates.push.apply(coordinates, arc);\n  }\n  // provide fresh copies of coordinate arrays\n  for (var j = 0, jj = coordinates.length; j < jj; ++j) {\n    coordinates[j] = coordinates[j].slice();\n  }\n  return coordinates;\n}\n\n\n/**\n * Create a point from a TopoJSON geometry object.\n *\n * @param {TopoJSONPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {Point} Geometry.\n */\nfunction readPointGeometry(object, scale, translate) {\n  var coordinates = object['coordinates'];\n  if (scale && translate) {\n    transformVertex(coordinates, scale, translate);\n  }\n  return new Point(coordinates);\n}\n\n\n/**\n * Create a multi-point from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPoint} object TopoJSON object.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @return {MultiPoint} Geometry.\n */\nfunction readMultiPointGeometry(object, scale, translate) {\n  var coordinates = object['coordinates'];\n  if (scale && translate) {\n    for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n      transformVertex(coordinates[i], scale, translate);\n    }\n  }\n  return new MultiPoint(coordinates);\n}\n\n\n/**\n * Create a linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {LineString} Geometry.\n */\nfunction readLineStringGeometry(object, arcs) {\n  var coordinates = concatenateArcs(object['arcs'], arcs);\n  return new LineString(coordinates);\n}\n\n\n/**\n * Create a multi-linestring from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiLineString} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiLineString} Geometry.\n */\nfunction readMultiLineStringGeometry(object, arcs) {\n  var coordinates = [];\n  for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n    coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n  }\n  return new MultiLineString(coordinates);\n}\n\n\n/**\n * Create a polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {Polygon} Geometry.\n */\nfunction readPolygonGeometry(object, arcs) {\n  var coordinates = [];\n  for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n    coordinates[i] = concatenateArcs(object['arcs'][i], arcs);\n  }\n  return new Polygon(coordinates);\n}\n\n\n/**\n * Create a multi-polygon from a TopoJSON geometry object.\n *\n * @param {TopoJSONMultiPolygon} object TopoJSON object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @return {MultiPolygon} Geometry.\n */\nfunction readMultiPolygonGeometry(object, arcs) {\n  var coordinates = [];\n  for (var i = 0, ii = object['arcs'].length; i < ii; ++i) {\n    // for each polygon\n    var polyArray = object['arcs'][i];\n    var ringCoords = [];\n    for (var j = 0, jj = polyArray.length; j < jj; ++j) {\n      // for each ring\n      ringCoords[j] = concatenateArcs(polyArray[j], arcs);\n    }\n    coordinates[i] = ringCoords;\n  }\n  return new MultiPolygon(coordinates);\n}\n\n\n/**\n * Create features from a TopoJSON GeometryCollection object.\n *\n * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry\n *     object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Array<Feature>} Array of features.\n */\nfunction readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {\n  var geometries = collection['geometries'];\n  var features = [];\n  for (var i = 0, ii = geometries.length; i < ii; ++i) {\n    features[i] = readFeatureFromGeometry(\n      geometries[i], arcs, scale, translate, property, name, opt_options);\n  }\n  return features;\n}\n\n\n/**\n * Create a feature from a TopoJSON geometry object.\n *\n * @param {TopoJSONGeometry} object TopoJSON geometry object.\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n * @param {string|undefined} property Property to set the `GeometryCollection`'s parent\n *     object to.\n * @param {string} name Name of the `Topology`'s child object.\n * @param {import(\"./Feature.js\").ReadOptions=} opt_options Read options.\n * @return {Feature} Feature.\n */\nfunction readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {\n  var geometry;\n  var type = object.type;\n  var geometryReader = GEOMETRY_READERS[type];\n  if ((type === 'Point') || (type === 'MultiPoint')) {\n    geometry = geometryReader(object, scale, translate);\n  } else {\n    geometry = geometryReader(object, arcs);\n  }\n  var feature = new Feature();\n  feature.setGeometry(/** @type {import(\"../geom/Geometry.js\").default} */ (\n    transformWithOptions(geometry, false, opt_options)));\n  if (object.id !== undefined) {\n    feature.setId(object.id);\n  }\n  var properties = object.properties;\n  if (property) {\n    if (!properties) {\n      properties = {};\n    }\n    properties[property] = name;\n  }\n  if (properties) {\n    feature.setProperties(properties);\n  }\n  return feature;\n}\n\n\n/**\n * Apply a linear transform to array of arcs.  The provided array of arcs is\n * modified in place.\n *\n * @param {Array<Array<import(\"../coordinate.js\").Coordinate>>} arcs Array of arcs.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArcs(arcs, scale, translate) {\n  for (var i = 0, ii = arcs.length; i < ii; ++i) {\n    transformArc(arcs[i], scale, translate);\n  }\n}\n\n\n/**\n * Apply a linear transform to an arc.  The provided arc is modified in place.\n *\n * @param {Array<import(\"../coordinate.js\").Coordinate>} arc Arc.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformArc(arc, scale, translate) {\n  var x = 0;\n  var y = 0;\n  for (var i = 0, ii = arc.length; i < ii; ++i) {\n    var vertex = arc[i];\n    x += vertex[0];\n    y += vertex[1];\n    vertex[0] = x;\n    vertex[1] = y;\n    transformVertex(vertex, scale, translate);\n  }\n}\n\n\n/**\n * Apply a linear transform to a vertex.  The provided vertex is modified in\n * place.\n *\n * @param {import(\"../coordinate.js\").Coordinate} vertex Vertex.\n * @param {Array<number>} scale Scale for each dimension.\n * @param {Array<number>} translate Translation for each dimension.\n */\nfunction transformVertex(vertex, scale, translate) {\n  vertex[0] = vertex[0] * scale[0] + translate[0];\n  vertex[1] = vertex[1] * scale[1] + translate[1];\n}\n\n\nexport default TopoJSON;\n\n//# sourceMappingURL=TopoJSON.js.map","/**\n * @module ol/format/filter/Filter\n */\n\n\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature filters.\n *\n * @abstract\n */\nvar Filter = function Filter(tagName) {\n\n  /**\n   * @private\n   * @type {!string}\n   */\n  this.tagName_ = tagName;\n};\n\n/**\n * The XML tag name for a filter.\n * @returns {!string} Name.\n */\nFilter.prototype.getTagName = function getTagName () {\n  return this.tagName_;\n};\n\nexport default Filter;\n\n//# sourceMappingURL=Filter.js.map","/**\n * @module ol/format/filter/LogicalNary\n */\nimport {assert} from '../../asserts.js';\nimport Filter from './Filter.js';\n\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature n-ary logical filters.\n *\n * @abstract\n */\nvar LogicalNary = /*@__PURE__*/(function (Filter) {\n  function LogicalNary(tagName, conditions) {\n\n    Filter.call(this, tagName);\n\n    /**\n     * @type {Array<import(\"./Filter.js\").default>}\n     */\n    this.conditions = conditions;\n    assert(this.conditions.length >= 2, 57); // At least 2 conditions are required.\n  }\n\n  if ( Filter ) LogicalNary.__proto__ = Filter;\n  LogicalNary.prototype = Object.create( Filter && Filter.prototype );\n  LogicalNary.prototype.constructor = LogicalNary;\n\n  return LogicalNary;\n}(Filter));\n\nexport default LogicalNary;\n\n//# sourceMappingURL=LogicalNary.js.map","/**\n * @module ol/format/filter/And\n */\nimport LogicalNary from './LogicalNary.js';\n\n/**\n * @classdesc\n * Represents a logical `<And>` operator between two or more filter conditions.\n *\n * @abstract\n */\nvar And = /*@__PURE__*/(function (LogicalNary) {\n  function And(conditions) {\n    LogicalNary.call(this, 'And', Array.prototype.slice.call(arguments));\n  }\n\n  if ( LogicalNary ) And.__proto__ = LogicalNary;\n  And.prototype = Object.create( LogicalNary && LogicalNary.prototype );\n  And.prototype.constructor = And;\n\n  return And;\n}(LogicalNary));\n\nexport default And;\n\n//# sourceMappingURL=And.js.map","/**\n * @module ol/format/filter/Bbox\n */\nimport Filter from './Filter.js';\n\n/**\n * @classdesc\n * Represents a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @api\n */\nvar Bbox = /*@__PURE__*/(function (Filter) {\n  function Bbox(geometryName, extent, opt_srsName) {\n\n    Filter.call(this, 'BBOX');\n\n    /**\n     * @type {!string}\n     */\n    this.geometryName = geometryName;\n\n    /**\n     * @type {import(\"../../extent.js\").Extent}\n     */\n    this.extent = extent;\n\n    /**\n     * @type {string|undefined}\n     */\n    this.srsName = opt_srsName;\n  }\n\n  if ( Filter ) Bbox.__proto__ = Filter;\n  Bbox.prototype = Object.create( Filter && Filter.prototype );\n  Bbox.prototype.constructor = Bbox;\n\n  return Bbox;\n}(Filter));\n\nexport default Bbox;\n\n//# sourceMappingURL=Bbox.js.map","/**\n * @module ol/format/filter/Spatial\n */\nimport Filter from './Filter.js';\n\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Represents a spatial operator to test whether a geometry-valued property\n * relates to a given geometry.\n *\n * @abstract\n */\nvar Spatial = /*@__PURE__*/(function (Filter) {\n  function Spatial(tagName, geometryName, geometry, opt_srsName) {\n\n    Filter.call(this, tagName);\n\n    /**\n     * @type {!string}\n     */\n    this.geometryName = geometryName || 'the_geom';\n\n    /**\n     * @type {import(\"../../geom/Geometry.js\").default}\n     */\n    this.geometry = geometry;\n\n    /**\n     * @type {string|undefined}\n     */\n    this.srsName = opt_srsName;\n  }\n\n  if ( Filter ) Spatial.__proto__ = Filter;\n  Spatial.prototype = Object.create( Filter && Filter.prototype );\n  Spatial.prototype.constructor = Spatial;\n\n  return Spatial;\n}(Filter));\n\nexport default Spatial;\n\n//# sourceMappingURL=Spatial.js.map","/**\n * @module ol/format/filter/Contains\n */\nimport Spatial from './Spatial.js';\n\n/**\n * @classdesc\n * Represents a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n * @api\n */\nvar Contains = /*@__PURE__*/(function (Spatial) {\n  function Contains(geometryName, geometry, opt_srsName) {\n\n    Spatial.call(this, 'Contains', geometryName, geometry, opt_srsName);\n\n  }\n\n  if ( Spatial ) Contains.__proto__ = Spatial;\n  Contains.prototype = Object.create( Spatial && Spatial.prototype );\n  Contains.prototype.constructor = Contains;\n\n  return Contains;\n}(Spatial));\n\nexport default Contains;\n\n//# sourceMappingURL=Contains.js.map","/**\n * @module ol/format/filter/Comparison\n */\nimport Filter from './Filter.js';\n\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property comparison filters.\n *\n * @abstract\n */\nvar Comparison = /*@__PURE__*/(function (Filter) {\n  function Comparison(tagName, propertyName) {\n\n    Filter.call(this, tagName);\n\n    /**\n     * @type {!string}\n     */\n    this.propertyName = propertyName;\n  }\n\n  if ( Filter ) Comparison.__proto__ = Filter;\n  Comparison.prototype = Object.create( Filter && Filter.prototype );\n  Comparison.prototype.constructor = Comparison;\n\n  return Comparison;\n}(Filter));\n\nexport default Comparison;\n\n//# sourceMappingURL=Comparison.js.map","/**\n * @module ol/format/filter/During\n */\nimport Comparison from './Comparison.js';\n\n/**\n * @classdesc\n * Represents a `<During>` comparison operator.\n * @api\n */\nvar During = /*@__PURE__*/(function (Comparison) {\n  function During(propertyName, begin, end) {\n    Comparison.call(this, 'During', propertyName);\n\n    /**\n     * @type {!string}\n     */\n    this.begin = begin;\n\n    /**\n     * @type {!string}\n     */\n    this.end = end;\n  }\n\n  if ( Comparison ) During.__proto__ = Comparison;\n  During.prototype = Object.create( Comparison && Comparison.prototype );\n  During.prototype.constructor = During;\n\n  return During;\n}(Comparison));\n\nexport default During;\n\n//# sourceMappingURL=During.js.map","/**\n * @module ol/format/filter/ComparisonBinary\n */\nimport Comparison from './Comparison.js';\n\n/**\n * @classdesc\n * Abstract class; normally only used for creating subclasses and not instantiated in apps.\n * Base class for WFS GetFeature property binary comparison filters.\n *\n * @abstract\n */\nvar ComparisonBinary = /*@__PURE__*/(function (Comparison) {\n  function ComparisonBinary(tagName, propertyName, expression, opt_matchCase) {\n\n    Comparison.call(this, tagName, propertyName);\n\n    /**\n     * @type {!(string|number)}\n     */\n    this.expression = expression;\n\n    /**\n     * @type {boolean|undefined}\n     */\n    this.matchCase = opt_matchCase;\n  }\n\n  if ( Comparison ) ComparisonBinary.__proto__ = Comparison;\n  ComparisonBinary.prototype = Object.create( Comparison && Comparison.prototype );\n  ComparisonBinary.prototype.constructor = ComparisonBinary;\n\n  return ComparisonBinary;\n}(Comparison));\n\nexport default ComparisonBinary;\n\n//# sourceMappingURL=ComparisonBinary.js.map","/**\n * @module ol/format/filter/EqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsEqualTo>` comparison operator.\n * @api\n */\nvar EqualTo = /*@__PURE__*/(function (ComparisonBinary) {\n  function EqualTo(propertyName, expression, opt_matchCase) {\n    ComparisonBinary.call(this, 'PropertyIsEqualTo', propertyName, expression, opt_matchCase);\n  }\n\n  if ( ComparisonBinary ) EqualTo.__proto__ = ComparisonBinary;\n  EqualTo.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  EqualTo.prototype.constructor = EqualTo;\n\n  return EqualTo;\n}(ComparisonBinary));\n\nexport default EqualTo;\n\n//# sourceMappingURL=EqualTo.js.map","/**\n * @module ol/format/filter/GreaterThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThan>` comparison operator.\n * @api\n */\nvar GreaterThan = /*@__PURE__*/(function (ComparisonBinary) {\n  function GreaterThan(propertyName, expression) {\n    ComparisonBinary.call(this, 'PropertyIsGreaterThan', propertyName, expression);\n  }\n\n  if ( ComparisonBinary ) GreaterThan.__proto__ = ComparisonBinary;\n  GreaterThan.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  GreaterThan.prototype.constructor = GreaterThan;\n\n  return GreaterThan;\n}(ComparisonBinary));\n\nexport default GreaterThan;\n\n//# sourceMappingURL=GreaterThan.js.map","/**\n * @module ol/format/filter/GreaterThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n * @api\n */\nvar GreaterThanOrEqualTo = /*@__PURE__*/(function (ComparisonBinary) {\n  function GreaterThanOrEqualTo(propertyName, expression) {\n    ComparisonBinary.call(this, 'PropertyIsGreaterThanOrEqualTo', propertyName, expression);\n  }\n\n  if ( ComparisonBinary ) GreaterThanOrEqualTo.__proto__ = ComparisonBinary;\n  GreaterThanOrEqualTo.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  GreaterThanOrEqualTo.prototype.constructor = GreaterThanOrEqualTo;\n\n  return GreaterThanOrEqualTo;\n}(ComparisonBinary));\n\nexport default GreaterThanOrEqualTo;\n\n//# sourceMappingURL=GreaterThanOrEqualTo.js.map","/**\n * @module ol/format/filter/Intersects\n */\nimport Spatial from './Spatial.js';\n\n/**\n * @classdesc\n * Represents a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n * @api\n */\nvar Intersects = /*@__PURE__*/(function (Spatial) {\n  function Intersects(geometryName, geometry, opt_srsName) {\n    Spatial.call(this, 'Intersects', geometryName, geometry, opt_srsName);\n  }\n\n  if ( Spatial ) Intersects.__proto__ = Spatial;\n  Intersects.prototype = Object.create( Spatial && Spatial.prototype );\n  Intersects.prototype.constructor = Intersects;\n\n  return Intersects;\n}(Spatial));\n\nexport default Intersects;\n\n//# sourceMappingURL=Intersects.js.map","/**\n * @module ol/format/filter/IsBetween\n */\nimport Comparison from './Comparison.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsBetween>` comparison operator.\n * @api\n */\nvar IsBetween = /*@__PURE__*/(function (Comparison) {\n  function IsBetween(propertyName, lowerBoundary, upperBoundary) {\n    Comparison.call(this, 'PropertyIsBetween', propertyName);\n\n    /**\n     * @type {!number}\n     */\n    this.lowerBoundary = lowerBoundary;\n\n    /**\n     * @type {!number}\n     */\n    this.upperBoundary = upperBoundary;\n\n  }\n\n  if ( Comparison ) IsBetween.__proto__ = Comparison;\n  IsBetween.prototype = Object.create( Comparison && Comparison.prototype );\n  IsBetween.prototype.constructor = IsBetween;\n\n  return IsBetween;\n}(Comparison));\n\nexport default IsBetween;\n\n//# sourceMappingURL=IsBetween.js.map","/**\n * @module ol/format/filter/IsLike\n */\nimport Comparison from './Comparison.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsLike>` comparison operator.\n * @api\n */\nvar IsLike = /*@__PURE__*/(function (Comparison) {\n  function IsLike(propertyName, pattern, opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n    Comparison.call(this, 'PropertyIsLike', propertyName);\n\n    /**\n     * @type {!string}\n     */\n    this.pattern = pattern;\n\n    /**\n     * @type {!string}\n     */\n    this.wildCard = (opt_wildCard !== undefined) ? opt_wildCard : '*';\n\n    /**\n     * @type {!string}\n     */\n    this.singleChar = (opt_singleChar !== undefined) ? opt_singleChar : '.';\n\n    /**\n     * @type {!string}\n     */\n    this.escapeChar = (opt_escapeChar !== undefined) ? opt_escapeChar : '!';\n\n    /**\n     * @type {boolean|undefined}\n     */\n    this.matchCase = opt_matchCase;\n\n  }\n\n  if ( Comparison ) IsLike.__proto__ = Comparison;\n  IsLike.prototype = Object.create( Comparison && Comparison.prototype );\n  IsLike.prototype.constructor = IsLike;\n\n  return IsLike;\n}(Comparison));\n\nexport default IsLike;\n\n//# sourceMappingURL=IsLike.js.map","/**\n * @module ol/format/filter/IsNull\n */\nimport Comparison from './Comparison.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsNull>` comparison operator.\n * @api\n */\nvar IsNull = /*@__PURE__*/(function (Comparison) {\n  function IsNull(propertyName) {\n    Comparison.call(this, 'PropertyIsNull', propertyName);\n  }\n\n  if ( Comparison ) IsNull.__proto__ = Comparison;\n  IsNull.prototype = Object.create( Comparison && Comparison.prototype );\n  IsNull.prototype.constructor = IsNull;\n\n  return IsNull;\n}(Comparison));\n\nexport default IsNull;\n\n//# sourceMappingURL=IsNull.js.map","/**\n * @module ol/format/filter/LessThan\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThan>` comparison operator.\n * @api\n */\nvar LessThan = /*@__PURE__*/(function (ComparisonBinary) {\n  function LessThan(propertyName, expression) {\n    ComparisonBinary.call(this, 'PropertyIsLessThan', propertyName, expression);\n  }\n\n  if ( ComparisonBinary ) LessThan.__proto__ = ComparisonBinary;\n  LessThan.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  LessThan.prototype.constructor = LessThan;\n\n  return LessThan;\n}(ComparisonBinary));\n\nexport default LessThan;\n\n//# sourceMappingURL=LessThan.js.map","/**\n * @module ol/format/filter/LessThanOrEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n * @api\n */\nvar LessThanOrEqualTo = /*@__PURE__*/(function (ComparisonBinary) {\n  function LessThanOrEqualTo(propertyName, expression) {\n    ComparisonBinary.call(this, 'PropertyIsLessThanOrEqualTo', propertyName, expression);\n  }\n\n  if ( ComparisonBinary ) LessThanOrEqualTo.__proto__ = ComparisonBinary;\n  LessThanOrEqualTo.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  LessThanOrEqualTo.prototype.constructor = LessThanOrEqualTo;\n\n  return LessThanOrEqualTo;\n}(ComparisonBinary));\n\nexport default LessThanOrEqualTo;\n\n//# sourceMappingURL=LessThanOrEqualTo.js.map","/**\n * @module ol/format/filter/Not\n */\nimport Filter from './Filter.js';\n\n/**\n * @classdesc\n * Represents a logical `<Not>` operator for a filter condition.\n * @api\n */\nvar Not = /*@__PURE__*/(function (Filter) {\n  function Not(condition) {\n\n    Filter.call(this, 'Not');\n\n    /**\n     * @type {!import(\"./Filter.js\").default}\n     */\n    this.condition = condition;\n\n  }\n\n  if ( Filter ) Not.__proto__ = Filter;\n  Not.prototype = Object.create( Filter && Filter.prototype );\n  Not.prototype.constructor = Not;\n\n  return Not;\n}(Filter));\n\nexport default Not;\n\n//# sourceMappingURL=Not.js.map","/**\n * @module ol/format/filter/NotEqualTo\n */\nimport ComparisonBinary from './ComparisonBinary.js';\n\n/**\n * @classdesc\n * Represents a `<PropertyIsNotEqualTo>` comparison operator.\n * @api\n */\nvar NotEqualTo = /*@__PURE__*/(function (ComparisonBinary) {\n  function NotEqualTo(propertyName, expression, opt_matchCase) {\n    ComparisonBinary.call(this, 'PropertyIsNotEqualTo', propertyName, expression, opt_matchCase);\n  }\n\n  if ( ComparisonBinary ) NotEqualTo.__proto__ = ComparisonBinary;\n  NotEqualTo.prototype = Object.create( ComparisonBinary && ComparisonBinary.prototype );\n  NotEqualTo.prototype.constructor = NotEqualTo;\n\n  return NotEqualTo;\n}(ComparisonBinary));\n\nexport default NotEqualTo;\n\n//# sourceMappingURL=NotEqualTo.js.map","/**\n * @module ol/format/filter/Or\n */\nimport LogicalNary from './LogicalNary.js';\n\n/**\n * @classdesc\n * Represents a logical `<Or>` operator between two ore more filter conditions.\n * @api\n */\nvar Or = /*@__PURE__*/(function (LogicalNary) {\n  function Or(conditions) {\n    LogicalNary.call(this, 'Or', Array.prototype.slice.call(arguments));\n  }\n\n  if ( LogicalNary ) Or.__proto__ = LogicalNary;\n  Or.prototype = Object.create( LogicalNary && LogicalNary.prototype );\n  Or.prototype.constructor = Or;\n\n  return Or;\n}(LogicalNary));\n\nexport default Or;\n\n//# sourceMappingURL=Or.js.map","/**\n * @module ol/format/filter/Within\n */\nimport Spatial from './Spatial.js';\n\n/**\n * @classdesc\n * Represents a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n * @api\n */\nvar Within = /*@__PURE__*/(function (Spatial) {\n  function Within(geometryName, geometry, opt_srsName) {\n    Spatial.call(this, 'Within', geometryName, geometry, opt_srsName);\n  }\n\n  if ( Spatial ) Within.__proto__ = Spatial;\n  Within.prototype = Object.create( Spatial && Spatial.prototype );\n  Within.prototype.constructor = Within;\n\n  return Within;\n}(Spatial));\n\nexport default Within;\n\n//# sourceMappingURL=Within.js.map","/**\n * @module ol/format/filter\n */\nimport And from './filter/And.js';\nimport Bbox from './filter/Bbox.js';\nimport Contains from './filter/Contains.js';\nimport During from './filter/During.js';\nimport EqualTo from './filter/EqualTo.js';\nimport GreaterThan from './filter/GreaterThan.js';\nimport GreaterThanOrEqualTo from './filter/GreaterThanOrEqualTo.js';\nimport Intersects from './filter/Intersects.js';\nimport IsBetween from './filter/IsBetween.js';\nimport IsLike from './filter/IsLike.js';\nimport IsNull from './filter/IsNull.js';\nimport LessThan from './filter/LessThan.js';\nimport LessThanOrEqualTo from './filter/LessThanOrEqualTo.js';\nimport Not from './filter/Not.js';\nimport NotEqualTo from './filter/NotEqualTo.js';\nimport Or from './filter/Or.js';\nimport Within from './filter/Within.js';\n\n\n/**\n * Create a logical `<And>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!And} `<And>` operator.\n * @api\n */\nexport function and(conditions) {\n  var params = [null].concat(Array.prototype.slice.call(arguments));\n  return new (Function.prototype.bind.apply(And, params));\n}\n\n\n/**\n * Create a logical `<Or>` operator between two or more filter conditions.\n *\n * @param {...import(\"./filter/Filter.js\").default} conditions Filter conditions.\n * @returns {!Or} `<Or>` operator.\n * @api\n */\nexport function or(conditions) {\n  var params = [null].concat(Array.prototype.slice.call(arguments));\n  return new (Function.prototype.bind.apply(Or, params));\n}\n\n\n/**\n * Represents a logical `<Not>` operator for a filter condition.\n *\n * @param {!import(\"./filter/Filter.js\").default} condition Filter condition.\n * @returns {!Not} `<Not>` operator.\n * @api\n */\nexport function not(condition) {\n  return new Not(condition);\n}\n\n\n/**\n * Create a `<BBOX>` operator to test whether a geometry-valued property\n * intersects a fixed bounding box\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../extent.js\").Extent} extent Extent.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Bbox} `<BBOX>` operator.\n * @api\n */\nexport function bbox(geometryName, extent, opt_srsName) {\n  return new Bbox(geometryName, extent, opt_srsName);\n}\n\n/**\n * Create a `<Contains>` operator to test whether a geometry-valued property\n * contains a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Contains} `<Contains>` operator.\n * @api\n */\nexport function contains(geometryName, geometry, opt_srsName) {\n  return new Contains(geometryName, geometry, opt_srsName);\n}\n\n/**\n * Create a `<Intersects>` operator to test whether a geometry-valued property\n * intersects a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Intersects} `<Intersects>` operator.\n * @api\n */\nexport function intersects(geometryName, geometry, opt_srsName) {\n  return new Intersects(geometryName, geometry, opt_srsName);\n}\n\n/**\n * Create a `<Within>` operator to test whether a geometry-valued property\n * is within a given geometry.\n *\n * @param {!string} geometryName Geometry name to use.\n * @param {!import(\"../geom/Geometry.js\").default} geometry Geometry.\n * @param {string=} opt_srsName SRS name. No srsName attribute will be\n *    set on geometries when this is not provided.\n * @returns {!Within} `<Within>` operator.\n * @api\n */\nexport function within(geometryName, geometry, opt_srsName) {\n  return new Within(geometryName, geometry, opt_srsName);\n}\n\n\n/**\n * Creates a `<PropertyIsEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!EqualTo} `<PropertyIsEqualTo>` operator.\n * @api\n */\nexport function equalTo(propertyName, expression, opt_matchCase) {\n  return new EqualTo(propertyName, expression, opt_matchCase);\n}\n\n\n/**\n * Creates a `<PropertyIsNotEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!(string|number)} expression The value to compare.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.\n * @api\n */\nexport function notEqualTo(propertyName, expression, opt_matchCase) {\n  return new NotEqualTo(propertyName, expression, opt_matchCase);\n}\n\n\n/**\n * Creates a `<PropertyIsLessThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThan} `<PropertyIsLessThan>` operator.\n * @api\n */\nexport function lessThan(propertyName, expression) {\n  return new LessThan(propertyName, expression);\n}\n\n\n/**\n * Creates a `<PropertyIsLessThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.\n * @api\n */\nexport function lessThanOrEqualTo(propertyName, expression) {\n  return new LessThanOrEqualTo(propertyName, expression);\n}\n\n\n/**\n * Creates a `<PropertyIsGreaterThan>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThan} `<PropertyIsGreaterThan>` operator.\n * @api\n */\nexport function greaterThan(propertyName, expression) {\n  return new GreaterThan(propertyName, expression);\n}\n\n\n/**\n * Creates a `<PropertyIsGreaterThanOrEqualTo>` comparison operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} expression The value to compare.\n * @returns {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.\n * @api\n */\nexport function greaterThanOrEqualTo(propertyName, expression) {\n  return new GreaterThanOrEqualTo(propertyName, expression);\n}\n\n\n/**\n * Creates a `<PropertyIsNull>` comparison operator to test whether a property value\n * is null.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @returns {!IsNull} `<PropertyIsNull>` operator.\n * @api\n */\nexport function isNull(propertyName) {\n  return new IsNull(propertyName);\n}\n\n\n/**\n * Creates a `<PropertyIsBetween>` comparison operator to test whether an expression\n * value lies within a range given by a lower and upper bound (inclusive).\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!number} lowerBoundary The lower bound of the range.\n * @param {!number} upperBoundary The upper bound of the range.\n * @returns {!IsBetween} `<PropertyIsBetween>` operator.\n * @api\n */\nexport function between(propertyName, lowerBoundary, upperBoundary) {\n  return new IsBetween(propertyName, lowerBoundary, upperBoundary);\n}\n\n\n/**\n * Represents a `<PropertyIsLike>` comparison operator that matches a string property\n * value against a text pattern.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} pattern Text pattern.\n * @param {string=} opt_wildCard Pattern character which matches any sequence of\n *    zero or more string characters. Default is '*'.\n * @param {string=} opt_singleChar pattern character which matches any single\n *    string character. Default is '.'.\n * @param {string=} opt_escapeChar Escape character which can be used to escape\n *    the pattern characters. Default is '!'.\n * @param {boolean=} opt_matchCase Case-sensitive?\n * @returns {!IsLike} `<PropertyIsLike>` operator.\n * @api\n */\nexport function like(propertyName, pattern,\n  opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase) {\n  return new IsLike(propertyName, pattern,\n    opt_wildCard, opt_singleChar, opt_escapeChar, opt_matchCase);\n}\n\n\n/**\n * Create a `<During>` temporal operator.\n *\n * @param {!string} propertyName Name of the context property to compare.\n * @param {!string} begin The begin date in ISO-8601 format.\n * @param {!string} end The end date in ISO-8601 format.\n * @returns {!During} `<During>` operator.\n * @api\n */\nexport function during(propertyName, begin, end) {\n  return new During(propertyName, begin, end);\n}\n\n//# sourceMappingURL=filter.js.map","/**\n * @module ol/format/WFS\n */\nimport {assert} from '../asserts.js';\nimport GML2 from './GML2.js';\nimport GML3 from './GML3.js';\nimport GMLBase, {GMLNS} from './GMLBase.js';\nimport {and as andFilter, bbox as bboxFilter} from './filter.js';\nimport XMLFeature from './XMLFeature.js';\nimport {readNonNegativeIntegerString, readNonNegativeInteger, writeStringTextNode} from './xsd.js';\nimport {assign} from '../obj.js';\nimport {get as getProjection} from '../proj.js';\nimport {createElementNS, isDocument, makeArrayPusher, makeChildAppender,\n  makeObjectPropertySetter, makeSimpleNodeFactory, parse, parseNode,\n  pushParseAndPop, pushSerializeAndPop, XML_SCHEMA_INSTANCE_URI} from '../xml.js';\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FEATURE_COLLECTION_PARSERS = {\n  'http://www.opengis.net/gml': {\n    'boundedBy': makeObjectPropertySetter(\n      GMLBase.prototype.readGeometryElement, 'bounds')\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_SUMMARY_PARSERS = {\n  'http://www.opengis.net/wfs': {\n    'totalInserted': makeObjectPropertySetter(readNonNegativeInteger),\n    'totalUpdated': makeObjectPropertySetter(readNonNegativeInteger),\n    'totalDeleted': makeObjectPropertySetter(readNonNegativeInteger)\n  }\n};\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TRANSACTION_RESPONSE_PARSERS = {\n  'http://www.opengis.net/wfs': {\n    'TransactionSummary': makeObjectPropertySetter(\n      readTransactionSummary, 'transactionSummary'),\n    'InsertResults': makeObjectPropertySetter(\n      readInsertResults, 'insertIds')\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar QUERY_SERIALIZERS = {\n  'http://www.opengis.net/wfs': {\n    'PropertyName': makeChildAppender(writeStringTextNode)\n  }\n};\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar TRANSACTION_SERIALIZERS = {\n  'http://www.opengis.net/wfs': {\n    'Insert': makeChildAppender(writeFeature),\n    'Update': makeChildAppender(writeUpdate),\n    'Delete': makeChildAppender(writeDelete),\n    'Property': makeChildAppender(writeProperty),\n    'Native': makeChildAppender(writeNative)\n  }\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {Object<string, string>|string} [featureNS] The namespace URI used for features.\n * @property {Array<string>|string} [featureType] The feature type to parse. Only used for read operations.\n * @property {GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.\n * @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.\n */\n\n\n/**\n * @typedef {Object} WriteGetFeatureOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {Array<string>} featureTypes The feature type names.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {string} [outputFormat] Output format.\n * @property {number} [maxFeatures] Maximum number of features to fetch.\n * @property {string} [geometryName] Geometry name to use in a BBOX filter.\n * @property {Array<string>} [propertyNames] Optional list of property names to serialize.\n * @property {string} [viewParams] viewParams GeoServer vendor parameter.\n * @property {number} [startIndex] Start index to use for WFS paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services.\n * @property {number} [count] Number of features to retrieve when paging. This is a\n * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. Please note that some\n * Web Feature Services have repurposed `maxfeatures` instead.\n * @property {import(\"../extent.js\").Extent} [bbox] Extent to use for the BBOX filter.\n * @property {import(\"./filter/Filter.js\").default} [filter] Filter condition. See\n * {@link module:ol/format/Filter} for more information.\n * @property {string} [resultType] Indicates what response should be returned,\n * E.g. `hits` only includes the `numberOfFeatures` attribute in the response and no features.\n */\n\n\n/**\n * @typedef {Object} WriteTransactionOptions\n * @property {string} featureNS The namespace URI used for features.\n * @property {string} featurePrefix The prefix for the feature namespace.\n * @property {string} featureType The feature type name.\n * @property {string} [srsName] SRS name. No srsName attribute will be set on\n * geometries when this is not provided.\n * @property {string} [handle] Handle.\n * @property {boolean} [hasZ] Must be set to true if the transaction is for\n * a 3D layer. This will allow the Z coordinate to be included in the transaction.\n * @property {Array<Object>} nativeElements Native elements. Currently not supported.\n * @property {import(\"./GMLBase.js\").Options} [gmlOptions] GML options for the WFS transaction writer.\n * @property {string} [version='1.1.0'] WFS version to use for the transaction. Can be either `1.0.0` or `1.1.0`.\n */\n\n\n/**\n * Number of features; bounds/extent.\n * @typedef {Object} FeatureCollectionMetadata\n * @property {number} numberOfFeatures\n * @property {import(\"../extent.js\").Extent} bounds\n */\n\n\n/**\n * Total deleted; total inserted; total updated; array of insert ids.\n * @typedef {Object} TransactionResponse\n * @property {number} totalDeleted\n * @property {number} totalInserted\n * @property {number} totalUpdated\n * @property {Array<string>} insertIds\n */\n\n\n/**\n * @type {string}\n */\nvar FEATURE_PREFIX = 'feature';\n\n\n/**\n * @type {string}\n */\nvar XMLNS = 'http://www.w3.org/2000/xmlns/';\n\n\n/**\n * @type {string}\n */\nvar OGCNS = 'http://www.opengis.net/ogc';\n\n\n/**\n * @type {string}\n */\nvar WFSNS = 'http://www.opengis.net/wfs';\n\n\n/**\n * @type {string}\n */\nvar FESNS = 'http://www.opengis.net/fes';\n\n\n/**\n * @type {Object<string, string>}\n */\nvar SCHEMA_LOCATIONS = {\n  '1.1.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd',\n  '1.0.0': 'http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'\n};\n\n\n/**\n * @const\n * @type {string}\n */\nvar DEFAULT_VERSION = '1.1.0';\n\n\n/**\n * @classdesc\n * Feature format for reading and writing data in the WFS format.\n * By default, supports WFS version 1.1.0. You can pass a GML format\n * as option if you want to read a WFS that contains GML2 (WFS 1.0.0).\n * Also see {@link module:ol/format/GMLBase~GMLBase} which is used by this format.\n *\n * @api\n */\nvar WFS = /*@__PURE__*/(function (XMLFeature) {\n  function WFS(opt_options) {\n    XMLFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {Array<string>|string|undefined}\n     */\n    this.featureType_ = options.featureType;\n\n    /**\n     * @private\n     * @type {Object<string, string>|string|undefined}\n     */\n    this.featureNS_ = options.featureNS;\n\n    /**\n     * @private\n     * @type {GMLBase}\n     */\n    this.gmlFormat_ = options.gmlFormat ?\n      options.gmlFormat : new GML3();\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.schemaLocation_ = options.schemaLocation ?\n      options.schemaLocation : SCHEMA_LOCATIONS[DEFAULT_VERSION];\n  }\n\n  if ( XMLFeature ) WFS.__proto__ = XMLFeature;\n  WFS.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  WFS.prototype.constructor = WFS;\n\n  /**\n   * @return {Array<string>|string|undefined} featureType\n   */\n  WFS.prototype.getFeatureType = function getFeatureType () {\n    return this.featureType_;\n  };\n\n  /**\n   * @param {Array<string>|string|undefined} featureType Feature type(s) to parse.\n   */\n  WFS.prototype.setFeatureType = function setFeatureType (featureType) {\n    this.featureType_ = featureType;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WFS.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = {\n      node: node\n    };\n    assign(context, {\n      'featureType': this.featureType_,\n      'featureNS': this.featureNS_\n    });\n\n    assign(context, this.getReadOptions(node, opt_options ? opt_options : {}));\n    var objectStack = [context];\n    this.gmlFormat_.FEATURE_COLLECTION_PARSERS[GMLNS][\n      'featureMember'] =\n        makeArrayPusher(GMLBase.prototype.readFeaturesInternal);\n    var features = pushParseAndPop([],\n      this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,\n      objectStack, this.gmlFormat_);\n    if (!features) {\n      features = [];\n    }\n    return features;\n  };\n\n  /**\n   * Read transaction response of the source.\n   *\n   * @param {Document|Element|Object|string} source Source.\n   * @return {TransactionResponse|undefined} Transaction response.\n   * @api\n   */\n  WFS.prototype.readTransactionResponse = function readTransactionResponse (source) {\n    if (!source) {\n      return undefined;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readTransactionResponseFromDocument(doc);\n    } else if (isDocument(source)) {\n      return this.readTransactionResponseFromDocument(\n        /** @type {Document} */ (source));\n    } else {\n      return this.readTransactionResponseFromNode(/** @type {Element} */ (source));\n    }\n  };\n\n  /**\n   * Read feature collection metadata of the source.\n   *\n   * @param {Document|Element|Object|string} source Source.\n   * @return {FeatureCollectionMetadata|undefined}\n   *     FeatureCollection metadata.\n   * @api\n   */\n  WFS.prototype.readFeatureCollectionMetadata = function readFeatureCollectionMetadata (source) {\n    if (!source) {\n      return undefined;\n    } else if (typeof source === 'string') {\n      var doc = parse(source);\n      return this.readFeatureCollectionMetadataFromDocument(doc);\n    } else if (isDocument(source)) {\n      return this.readFeatureCollectionMetadataFromDocument(\n        /** @type {Document} */ (source));\n    } else {\n      return this.readFeatureCollectionMetadataFromNode(\n        /** @type {Element} */ (source));\n    }\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @return {FeatureCollectionMetadata|undefined}\n   *     FeatureCollection metadata.\n   */\n  WFS.prototype.readFeatureCollectionMetadataFromDocument = function readFeatureCollectionMetadataFromDocument (doc) {\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readFeatureCollectionMetadataFromNode(/** @type {Element} */ (n));\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @return {FeatureCollectionMetadata|undefined}\n   *     FeatureCollection metadata.\n   */\n  WFS.prototype.readFeatureCollectionMetadataFromNode = function readFeatureCollectionMetadataFromNode (node) {\n    var result = {};\n    var value = readNonNegativeIntegerString(\n      node.getAttribute('numberOfFeatures'));\n    result['numberOfFeatures'] = value;\n    return pushParseAndPop(\n      /** @type {FeatureCollectionMetadata} */ (result),\n      FEATURE_COLLECTION_PARSERS, node, [], this.gmlFormat_);\n  };\n\n  /**\n   * @param {Document} doc Document.\n   * @return {TransactionResponse|undefined} Transaction response.\n   */\n  WFS.prototype.readTransactionResponseFromDocument = function readTransactionResponseFromDocument (doc) {\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readTransactionResponseFromNode(/** @type {Element} */ (n));\n      }\n    }\n    return undefined;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @return {TransactionResponse|undefined} Transaction response.\n   */\n  WFS.prototype.readTransactionResponseFromNode = function readTransactionResponseFromNode (node) {\n    return pushParseAndPop(\n      /** @type {TransactionResponse} */({}),\n      TRANSACTION_RESPONSE_PARSERS, node, []);\n  };\n\n  /**\n   * Encode format as WFS `GetFeature` and return the Node.\n   *\n   * @param {WriteGetFeatureOptions} options Options.\n   * @return {Node} Result.\n   * @api\n   */\n  WFS.prototype.writeGetFeature = function writeGetFeature$1 (options) {\n    var node = createElementNS(WFSNS, 'GetFeature');\n    node.setAttribute('service', 'WFS');\n    node.setAttribute('version', '1.1.0');\n    var filter;\n    if (options) {\n      if (options.handle) {\n        node.setAttribute('handle', options.handle);\n      }\n      if (options.outputFormat) {\n        node.setAttribute('outputFormat', options.outputFormat);\n      }\n      if (options.maxFeatures !== undefined) {\n        node.setAttribute('maxFeatures', String(options.maxFeatures));\n      }\n      if (options.resultType) {\n        node.setAttribute('resultType', options.resultType);\n      }\n      if (options.startIndex !== undefined) {\n        node.setAttribute('startIndex', String(options.startIndex));\n      }\n      if (options.count !== undefined) {\n        node.setAttribute('count', String(options.count));\n      }\n      if (options.viewParams !== undefined) {\n        node.setAttribute('viewParams ', options.viewParams);\n      }\n      filter = options.filter;\n      if (options.bbox) {\n        assert(options.geometryName,\n          12); // `options.geometryName` must also be provided when `options.bbox` is set\n        var bbox = bboxFilter(\n          /** @type {string} */ (options.geometryName), options.bbox, options.srsName);\n        if (filter) {\n          // if bbox and filter are both set, combine the two into a single filter\n          filter = andFilter(filter, bbox);\n        } else {\n          filter = bbox;\n        }\n      }\n    }\n    node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', this.schemaLocation_);\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var context = {\n      node: node\n    };\n    assign(context, {\n      'srsName': options.srsName,\n      'featureNS': options.featureNS ? options.featureNS : this.featureNS_,\n      'featurePrefix': options.featurePrefix,\n      'geometryName': options.geometryName,\n      'filter': filter,\n      'propertyNames': options.propertyNames ? options.propertyNames : []\n    });\n\n    assert(Array.isArray(options.featureTypes),\n      11); // `options.featureTypes` should be an Array\n    writeGetFeature(node, /** @type {!Array<string>} */ (options.featureTypes), [context]);\n    return node;\n  };\n\n  /**\n   * Encode format as WFS `Transaction` and return the Node.\n   *\n   * @param {Array<import(\"../Feature.js\").default>} inserts The features to insert.\n   * @param {Array<import(\"../Feature.js\").default>} updates The features to update.\n   * @param {Array<import(\"../Feature.js\").default>} deletes The features to delete.\n   * @param {WriteTransactionOptions} options Write options.\n   * @return {Node} Result.\n   * @api\n   */\n  WFS.prototype.writeTransaction = function writeTransaction (inserts, updates, deletes, options) {\n    var objectStack = [];\n    var node = createElementNS(WFSNS, 'Transaction');\n    var version = options.version ? options.version : DEFAULT_VERSION;\n    var gmlVersion = version === '1.0.0' ? 2 : 3;\n    node.setAttribute('service', 'WFS');\n    node.setAttribute('version', version);\n    var baseObj;\n    /** @type {import(\"../xml.js\").NodeStackItem} */\n    var obj;\n    if (options) {\n      baseObj = options.gmlOptions ? options.gmlOptions : {};\n      if (options.handle) {\n        node.setAttribute('handle', options.handle);\n      }\n    }\n    var schemaLocation = SCHEMA_LOCATIONS[version];\n    node.setAttributeNS(XML_SCHEMA_INSTANCE_URI, 'xsi:schemaLocation', schemaLocation);\n    var featurePrefix = options.featurePrefix ? options.featurePrefix : FEATURE_PREFIX;\n    if (inserts) {\n      obj = assign({node: node}, {'featureNS': options.featureNS,\n        'featureType': options.featureType, 'featurePrefix': featurePrefix,\n        'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName});\n      assign(obj, baseObj);\n      pushSerializeAndPop(obj,\n        TRANSACTION_SERIALIZERS,\n        makeSimpleNodeFactory('Insert'), inserts,\n        objectStack);\n    }\n    if (updates) {\n      obj = assign({node: node}, {'featureNS': options.featureNS,\n        'featureType': options.featureType, 'featurePrefix': featurePrefix,\n        'gmlVersion': gmlVersion, 'hasZ': options.hasZ, 'srsName': options.srsName});\n      assign(obj, baseObj);\n      pushSerializeAndPop(obj,\n        TRANSACTION_SERIALIZERS,\n        makeSimpleNodeFactory('Update'), updates,\n        objectStack);\n    }\n    if (deletes) {\n      pushSerializeAndPop({node: node, 'featureNS': options.featureNS,\n        'featureType': options.featureType, 'featurePrefix': featurePrefix,\n        'gmlVersion': gmlVersion, 'srsName': options.srsName},\n      TRANSACTION_SERIALIZERS,\n      makeSimpleNodeFactory('Delete'), deletes,\n      objectStack);\n    }\n    if (options.nativeElements) {\n      pushSerializeAndPop({node: node, 'featureNS': options.featureNS,\n        'featureType': options.featureType, 'featurePrefix': featurePrefix,\n        'gmlVersion': gmlVersion, 'srsName': options.srsName},\n      TRANSACTION_SERIALIZERS,\n      makeSimpleNodeFactory('Native'), options.nativeElements,\n      objectStack);\n    }\n    return node;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WFS.prototype.readProjectionFromDocument = function readProjectionFromDocument (doc) {\n    for (var n = /** @type {Node} */ (doc.firstChild); n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readProjectionFromNode(n);\n      }\n    }\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WFS.prototype.readProjectionFromNode = function readProjectionFromNode (node) {\n    if (node.firstElementChild &&\n        node.firstElementChild.firstElementChild) {\n      node = node.firstElementChild.firstElementChild;\n      for (var n = node.firstElementChild; n; n = n.nextElementSibling) {\n        if (!(n.childNodes.length === 0 ||\n            (n.childNodes.length === 1 &&\n            n.firstChild.nodeType === 3))) {\n          var objectStack = [{}];\n          this.gmlFormat_.readGeometryElement(n, objectStack);\n          return getProjection(objectStack.pop().srsName);\n        }\n      }\n    }\n\n    return null;\n  };\n\n  return WFS;\n}(XMLFeature));\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Transaction Summary.\n */\nfunction readTransactionSummary(node, objectStack) {\n  return pushParseAndPop(\n    {}, TRANSACTION_SUMMARY_PARSERS, node, objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OGC_FID_PARSERS = {\n  'http://www.opengis.net/ogc': {\n    'FeatureId': makeArrayPusher(function(node, objectStack) {\n      return node.getAttribute('fid');\n    })\n  }\n};\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n */\nfunction fidParser(node, objectStack) {\n  parseNode(OGC_FID_PARSERS, node, objectStack);\n}\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar INSERT_RESULTS_PARSERS = {\n  'http://www.opengis.net/wfs': {\n    'Feature': fidParser\n  }\n};\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Insert results.\n */\nfunction readInsertResults(node, objectStack) {\n  return pushParseAndPop(\n    [], INSERT_RESULTS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFeature(node, feature, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  var featureType = context['featureType'];\n  var featureNS = context['featureNS'];\n  var gmlVersion = context['gmlVersion'];\n  var child = createElementNS(featureNS, featureType);\n  node.appendChild(child);\n  if (gmlVersion === 2) {\n    GML2.prototype.writeFeatureElement(child, feature, objectStack);\n  } else {\n    GML3.prototype.writeFeatureElement(child, feature, objectStack);\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {number|string} fid Feature identifier.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeOgcFidFilter(node, fid, objectStack) {\n  var filter = createElementNS(OGCNS, 'Filter');\n  var child = createElementNS(OGCNS, 'FeatureId');\n  filter.appendChild(child);\n  child.setAttribute('fid', /** @type {string} */ (fid));\n  node.appendChild(filter);\n}\n\n\n/**\n * @param {string|undefined} featurePrefix The prefix of the feature.\n * @param {string} featureType The type of the feature.\n * @returns {string} The value of the typeName property.\n */\nfunction getTypeName(featurePrefix, featureType) {\n  featurePrefix = featurePrefix ? featurePrefix : FEATURE_PREFIX;\n  var prefix = featurePrefix + ':';\n  // The featureType already contains the prefix.\n  if (featureType.indexOf(prefix) === 0) {\n    return featureType;\n  } else {\n    return prefix + featureType;\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDelete(node, feature, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  assert(feature.getId() !== undefined, 26); // Features must have an id set\n  var featureType = context['featureType'];\n  var featurePrefix = context['featurePrefix'];\n  var featureNS = context['featureNS'];\n  var typeName = getTypeName(featurePrefix, featureType);\n  node.setAttribute('typeName', typeName);\n  node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n  var fid = feature.getId();\n  if (fid !== undefined) {\n    writeOgcFidFilter(node, fid, objectStack);\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeUpdate(node, feature, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  assert(feature.getId() !== undefined, 27); // Features must have an id set\n  var featureType = context['featureType'];\n  var featurePrefix = context['featurePrefix'];\n  var featureNS = context['featureNS'];\n  var typeName = getTypeName(featurePrefix, featureType);\n  var geometryName = feature.getGeometryName();\n  node.setAttribute('typeName', typeName);\n  node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n  var fid = feature.getId();\n  if (fid !== undefined) {\n    var keys = feature.getKeys();\n    var values = [];\n    for (var i = 0, ii = keys.length; i < ii; i++) {\n      var value = feature.get(keys[i]);\n      if (value !== undefined) {\n        var name = keys[i];\n        if (value && typeof /** @type {?} */ (value).getSimplifiedGeometry === 'function') {\n          name = geometryName;\n        }\n        values.push({name: name, value: value});\n      }\n    }\n    pushSerializeAndPop(/** @type {import(\"../xml.js\").NodeStackItem} */ (\n      {'gmlVersion': context['gmlVersion'], node: node,\n        'hasZ': context['hasZ'], 'srsName': context['srsName']}),\n    TRANSACTION_SERIALIZERS,\n    makeSimpleNodeFactory('Property'), values,\n    objectStack);\n    writeOgcFidFilter(node, fid, objectStack);\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Object} pair Property name and value.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeProperty(node, pair, objectStack) {\n  var name = createElementNS(WFSNS, 'Name');\n  var context = objectStack[objectStack.length - 1];\n  var gmlVersion = context['gmlVersion'];\n  node.appendChild(name);\n  writeStringTextNode(name, pair.name);\n  if (pair.value !== undefined && pair.value !== null) {\n    var value = createElementNS(WFSNS, 'Value');\n    node.appendChild(value);\n    if (pair.value && typeof /** @type {?} */ (pair.value).getSimplifiedGeometry === 'function') {\n      if (gmlVersion === 2) {\n        GML2.prototype.writeGeometryElement(value,\n          pair.value, objectStack);\n      } else {\n        GML3.prototype.writeGeometryElement(value,\n          pair.value, objectStack);\n      }\n    } else {\n      writeStringTextNode(value, pair.value);\n    }\n  }\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {{vendorId: string, safeToIgnore: boolean, value: string}} nativeElement The native element.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNative(node, nativeElement, objectStack) {\n  if (nativeElement.vendorId) {\n    node.setAttribute('vendorId', nativeElement.vendorId);\n  }\n  if (nativeElement.safeToIgnore !== undefined) {\n    node.setAttribute('safeToIgnore', String(nativeElement.safeToIgnore));\n  }\n  if (nativeElement.value !== undefined) {\n    writeStringTextNode(node, nativeElement.value);\n  }\n}\n\n\n/**\n * @type {Object<string, Object<string, import(\"../xml.js\").Serializer>>}\n */\nvar GETFEATURE_SERIALIZERS = {\n  'http://www.opengis.net/wfs': {\n    'Query': makeChildAppender(writeQuery)\n  },\n  'http://www.opengis.net/ogc': {\n    'During': makeChildAppender(writeDuringFilter),\n    'And': makeChildAppender(writeLogicalFilter),\n    'Or': makeChildAppender(writeLogicalFilter),\n    'Not': makeChildAppender(writeNotFilter),\n    'BBOX': makeChildAppender(writeBboxFilter),\n    'Contains': makeChildAppender(writeContainsFilter),\n    'Intersects': makeChildAppender(writeIntersectsFilter),\n    'Within': makeChildAppender(writeWithinFilter),\n    'PropertyIsEqualTo': makeChildAppender(writeComparisonFilter),\n    'PropertyIsNotEqualTo': makeChildAppender(writeComparisonFilter),\n    'PropertyIsLessThan': makeChildAppender(writeComparisonFilter),\n    'PropertyIsLessThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n    'PropertyIsGreaterThan': makeChildAppender(writeComparisonFilter),\n    'PropertyIsGreaterThanOrEqualTo': makeChildAppender(writeComparisonFilter),\n    'PropertyIsNull': makeChildAppender(writeIsNullFilter),\n    'PropertyIsBetween': makeChildAppender(writeIsBetweenFilter),\n    'PropertyIsLike': makeChildAppender(writeIsLikeFilter)\n  }\n};\n\n\n/**\n * @param {Element} node Node.\n * @param {string} featureType Feature type.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeQuery(node, featureType, objectStack) {\n  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var featurePrefix = context['featurePrefix'];\n  var featureNS = context['featureNS'];\n  var propertyNames = context['propertyNames'];\n  var srsName = context['srsName'];\n  var typeName;\n  // If feature prefix is not defined, we must not use the default prefix.\n  if (featurePrefix) {\n    typeName = getTypeName(featurePrefix, featureType);\n  } else {\n    typeName = featureType;\n  }\n  node.setAttribute('typeName', typeName);\n  if (srsName) {\n    node.setAttribute('srsName', srsName);\n  }\n  if (featureNS) {\n    node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);\n  }\n  var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n  item.node = node;\n  pushSerializeAndPop(item,\n    QUERY_SERIALIZERS,\n    makeSimpleNodeFactory('PropertyName'), propertyNames,\n    objectStack);\n  var filter = context['filter'];\n  if (filter) {\n    var child = createElementNS(OGCNS, 'Filter');\n    node.appendChild(child);\n    writeFilterCondition(child, filter, objectStack);\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeFilterCondition(node, filter, objectStack) {\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var item = {node: node};\n  pushSerializeAndPop(item,\n    GETFEATURE_SERIALIZERS,\n    makeSimpleNodeFactory(filter.getTagName()),\n    [filter], objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Bbox.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeBboxFilter(node, filter, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  context['srsName'] = filter.srsName;\n\n  writeOgcPropertyName(node, filter.geometryName);\n  GML3.prototype.writeGeometryElement(node, filter.extent, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Contains.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeContainsFilter(node, filter, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  context['srsName'] = filter.srsName;\n\n  writeOgcPropertyName(node, filter.geometryName);\n  GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Intersects.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIntersectsFilter(node, filter, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  context['srsName'] = filter.srsName;\n\n  writeOgcPropertyName(node, filter.geometryName);\n  GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Within.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeWithinFilter(node, filter, objectStack) {\n  var context = objectStack[objectStack.length - 1];\n  context['srsName'] = filter.srsName;\n\n  writeOgcPropertyName(node, filter.geometryName);\n  GML3.prototype.writeGeometryElement(node, filter.geometry, objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/During.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeDuringFilter(node, filter, objectStack) {\n\n  var valueReference = createElementNS(FESNS, 'ValueReference');\n  writeStringTextNode(valueReference, filter.propertyName);\n  node.appendChild(valueReference);\n\n  var timePeriod = createElementNS(GMLNS, 'TimePeriod');\n\n  node.appendChild(timePeriod);\n\n  var begin = createElementNS(GMLNS, 'begin');\n  timePeriod.appendChild(begin);\n  writeTimeInstant(begin, filter.begin);\n\n  var end = createElementNS(GMLNS, 'end');\n  timePeriod.appendChild(end);\n  writeTimeInstant(end, filter.end);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/LogicalNary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeLogicalFilter(node, filter, objectStack) {\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var item = {node: node};\n  var conditions = filter.conditions;\n  for (var i = 0, ii = conditions.length; i < ii; ++i) {\n    var condition = conditions[i];\n    pushSerializeAndPop(item,\n      GETFEATURE_SERIALIZERS,\n      makeSimpleNodeFactory(condition.getTagName()),\n      [condition], objectStack);\n  }\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/Not.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeNotFilter(node, filter, objectStack) {\n  /** @type {import(\"../xml.js\").NodeStackItem} */\n  var item = {node: node};\n  var condition = filter.condition;\n  pushSerializeAndPop(item,\n    GETFEATURE_SERIALIZERS,\n    makeSimpleNodeFactory(condition.getTagName()),\n    [condition], objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/ComparisonBinary.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeComparisonFilter(node, filter, objectStack) {\n  if (filter.matchCase !== undefined) {\n    node.setAttribute('matchCase', filter.matchCase.toString());\n  }\n  writeOgcPropertyName(node, filter.propertyName);\n  writeOgcLiteral(node, '' + filter.expression);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsNull.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsNullFilter(node, filter, objectStack) {\n  writeOgcPropertyName(node, filter.propertyName);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {import(\"./filter/IsBetween.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsBetweenFilter(node, filter, objectStack) {\n  writeOgcPropertyName(node, filter.propertyName);\n\n  var lowerBoundary = createElementNS(OGCNS, 'LowerBoundary');\n  node.appendChild(lowerBoundary);\n  writeOgcLiteral(lowerBoundary, '' + filter.lowerBoundary);\n\n  var upperBoundary = createElementNS(OGCNS, 'UpperBoundary');\n  node.appendChild(upperBoundary);\n  writeOgcLiteral(upperBoundary, '' + filter.upperBoundary);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {import(\"./filter/IsLike.js\").default} filter Filter.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeIsLikeFilter(node, filter, objectStack) {\n  node.setAttribute('wildCard', filter.wildCard);\n  node.setAttribute('singleChar', filter.singleChar);\n  node.setAttribute('escapeChar', filter.escapeChar);\n  if (filter.matchCase !== undefined) {\n    node.setAttribute('matchCase', filter.matchCase.toString());\n  }\n  writeOgcPropertyName(node, filter.propertyName);\n  writeOgcLiteral(node, '' + filter.pattern);\n}\n\n\n/**\n * @param {string} tagName Tag name.\n * @param {Node} node Node.\n * @param {string} value Value.\n */\nfunction writeOgcExpression(tagName, node, value) {\n  var property = createElementNS(OGCNS, tagName);\n  writeStringTextNode(property, value);\n  node.appendChild(property);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcPropertyName(node, value) {\n  writeOgcExpression('PropertyName', node, value);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {string} value PropertyName value.\n */\nfunction writeOgcLiteral(node, value) {\n  writeOgcExpression('Literal', node, value);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {string} time PropertyName value.\n */\nfunction writeTimeInstant(node, time) {\n  var timeInstant = createElementNS(GMLNS, 'TimeInstant');\n  node.appendChild(timeInstant);\n\n  var timePosition = createElementNS(GMLNS, 'timePosition');\n  timeInstant.appendChild(timePosition);\n  writeStringTextNode(timePosition, time);\n}\n\n\n/**\n * Encode filter as WFS `Filter` and return the Node.\n *\n * @param {import(\"./filter/Filter.js\").default} filter Filter.\n * @return {Node} Result.\n * @api\n */\nexport function writeFilter(filter) {\n  var child = createElementNS(OGCNS, 'Filter');\n  writeFilterCondition(child, filter, []);\n  return child;\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<string>} featureTypes Feature types.\n * @param {Array<*>} objectStack Node stack.\n */\nfunction writeGetFeature(node, featureTypes, objectStack) {\n  var context = /** @type {Object} */ (objectStack[objectStack.length - 1]);\n  var item = /** @type {import(\"../xml.js\").NodeStackItem} */ (assign({}, context));\n  item.node = node;\n  pushSerializeAndPop(item,\n    GETFEATURE_SERIALIZERS,\n    makeSimpleNodeFactory('Query'), featureTypes,\n    objectStack);\n}\n\n\nexport default WFS;\n\n//# sourceMappingURL=WFS.js.map","/**\n * @module ol/format/WKT\n */\nimport Feature from '../Feature.js';\nimport {transformWithOptions} from './Feature.js';\nimport TextFeature from './TextFeature.js';\nimport GeometryCollection from '../geom/GeometryCollection.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport GeometryLayout from '../geom/GeometryLayout.js';\nimport LineString from '../geom/LineString.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport Polygon from '../geom/Polygon.js';\n\n\n/**\n * Geometry constructors\n * @enum {function (new:import(\"../geom/Geometry.js\").default, Array, GeometryLayout)}\n */\nvar GeometryConstructor = {\n  'POINT': Point,\n  'LINESTRING': LineString,\n  'POLYGON': Polygon,\n  'MULTIPOINT': MultiPoint,\n  'MULTILINESTRING': MultiLineString,\n  'MULTIPOLYGON': MultiPolygon\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {boolean} [splitCollection=false] Whether to split GeometryCollections into\n * multiple features on reading.\n */\n\n/**\n * @typedef {Object} Token\n * @property {number} type\n * @property {number|string} [value]\n * @property {number} position\n */\n\n/**\n * @const\n * @type {string}\n */\nvar EMPTY = 'EMPTY';\n\n\n/**\n * @const\n * @type {string}\n */\nvar Z = 'Z';\n\n\n/**\n * @const\n * @type {string}\n */\nvar M = 'M';\n\n\n/**\n * @const\n * @type {string}\n */\nvar ZM = 'ZM';\n\n\n/**\n * @const\n * @enum {number}\n */\nvar TokenType = {\n  TEXT: 1,\n  LEFT_PAREN: 2,\n  RIGHT_PAREN: 3,\n  NUMBER: 4,\n  COMMA: 5,\n  EOF: 6\n};\n\n/**\n * @const\n * @type {Object<string, string>}\n */\nvar WKTGeometryType = {};\nfor (var type in GeometryType) {\n  WKTGeometryType[type] = GeometryType[type].toUpperCase();\n}\n\n\n/**\n * Class to tokenize a WKT string.\n */\nvar Lexer = function Lexer(wkt) {\n\n  /**\n   * @type {string}\n   */\n  this.wkt = wkt;\n\n  /**\n   * @type {number}\n   * @private\n   */\n  this.index_ = -1;\n};\n\n/**\n * @param {string} c Character.\n * @return {boolean} Whether the character is alphabetic.\n * @private\n */\nLexer.prototype.isAlpha_ = function isAlpha_ (c) {\n  return c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z';\n};\n\n/**\n * @param {string} c Character.\n * @param {boolean=} opt_decimal Whether the string number\n *   contains a dot, i.e. is a decimal number.\n * @return {boolean} Whether the character is numeric.\n * @private\n */\nLexer.prototype.isNumeric_ = function isNumeric_ (c, opt_decimal) {\n  var decimal = opt_decimal !== undefined ? opt_decimal : false;\n  return c >= '0' && c <= '9' || c == '.' && !decimal;\n};\n\n/**\n * @param {string} c Character.\n * @return {boolean} Whether the character is whitespace.\n * @private\n */\nLexer.prototype.isWhiteSpace_ = function isWhiteSpace_ (c) {\n  return c == ' ' || c == '\\t' || c == '\\r' || c == '\\n';\n};\n\n/**\n * @return {string} Next string character.\n * @private\n */\nLexer.prototype.nextChar_ = function nextChar_ () {\n  return this.wkt.charAt(++this.index_);\n};\n\n/**\n * Fetch and return the next token.\n * @return {!Token} Next string token.\n */\nLexer.prototype.nextToken = function nextToken () {\n  var c = this.nextChar_();\n  var position = this.index_;\n  /** @type {number|string} */\n  var value = c;\n  var type;\n\n  if (c == '(') {\n    type = TokenType.LEFT_PAREN;\n  } else if (c == ',') {\n    type = TokenType.COMMA;\n  } else if (c == ')') {\n    type = TokenType.RIGHT_PAREN;\n  } else if (this.isNumeric_(c) || c == '-') {\n    type = TokenType.NUMBER;\n    value = this.readNumber_();\n  } else if (this.isAlpha_(c)) {\n    type = TokenType.TEXT;\n    value = this.readText_();\n  } else if (this.isWhiteSpace_(c)) {\n    return this.nextToken();\n  } else if (c === '') {\n    type = TokenType.EOF;\n  } else {\n    throw new Error('Unexpected character: ' + c);\n  }\n\n  return {position: position, value: value, type: type};\n};\n\n/**\n * @return {number} Numeric token value.\n * @private\n */\nLexer.prototype.readNumber_ = function readNumber_ () {\n  var c;\n  var index = this.index_;\n  var decimal = false;\n  var scientificNotation = false;\n  do {\n    if (c == '.') {\n      decimal = true;\n    } else if (c == 'e' || c == 'E') {\n      scientificNotation = true;\n    }\n    c = this.nextChar_();\n  } while (\n    this.isNumeric_(c, decimal) ||\n      // if we haven't detected a scientific number before, 'e' or 'E'\n      // hint that we should continue to read\n      !scientificNotation && (c == 'e' || c == 'E') ||\n      // once we know that we have a scientific number, both '-' and '+'\n      // are allowed\n      scientificNotation && (c == '-' || c == '+')\n  );\n  return parseFloat(this.wkt.substring(index, this.index_--));\n};\n\n/**\n * @return {string} String token value.\n * @private\n */\nLexer.prototype.readText_ = function readText_ () {\n  var c;\n  var index = this.index_;\n  do {\n    c = this.nextChar_();\n  } while (this.isAlpha_(c));\n  return this.wkt.substring(index, this.index_--).toUpperCase();\n};\n\n/**\n * Class to parse the tokens from the WKT string.\n */\nvar Parser = function Parser(lexer) {\n\n  /**\n   * @type {Lexer}\n   * @private\n   */\n  this.lexer_ = lexer;\n\n  /**\n   * @type {Token}\n   * @private\n   */\n  this.token_;\n\n  /**\n   * @type {GeometryLayout}\n   * @private\n   */\n  this.layout_ = GeometryLayout.XY;\n};\n\n/**\n * Fetch the next token form the lexer and replace the active token.\n * @private\n */\nParser.prototype.consume_ = function consume_ () {\n  this.token_ = this.lexer_.nextToken();\n};\n\n/**\n * Tests if the given type matches the type of the current token.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\nParser.prototype.isTokenType = function isTokenType (type) {\n  var isMatch = this.token_.type == type;\n  return isMatch;\n};\n\n/**\n * If the given type matches the current token, consume it.\n * @param {TokenType} type Token type.\n * @return {boolean} Whether the token matches the given type.\n */\nParser.prototype.match = function match (type) {\n  var isMatch = this.isTokenType(type);\n  if (isMatch) {\n    this.consume_();\n  }\n  return isMatch;\n};\n\n/**\n * Try to parse the tokens provided by the lexer.\n * @return {import(\"../geom/Geometry.js\").default} The geometry.\n */\nParser.prototype.parse = function parse () {\n  this.consume_();\n  var geometry = this.parseGeometry_();\n  return geometry;\n};\n\n/**\n * Try to parse the dimensional info.\n * @return {GeometryLayout} The layout.\n * @private\n */\nParser.prototype.parseGeometryLayout_ = function parseGeometryLayout_ () {\n  var layout = GeometryLayout.XY;\n  var dimToken = this.token_;\n  if (this.isTokenType(TokenType.TEXT)) {\n    var dimInfo = dimToken.value;\n    if (dimInfo === Z) {\n      layout = GeometryLayout.XYZ;\n    } else if (dimInfo === M) {\n      layout = GeometryLayout.XYM;\n    } else if (dimInfo === ZM) {\n      layout = GeometryLayout.XYZM;\n    }\n    if (layout !== GeometryLayout.XY) {\n      this.consume_();\n    }\n  }\n  return layout;\n};\n\n/**\n * @return {!Array<import(\"../geom/Geometry.js\").default>} A collection of geometries.\n * @private\n */\nParser.prototype.parseGeometryCollectionText_ = function parseGeometryCollectionText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var geometries = [];\n    do {\n      geometries.push(this.parseGeometry_());\n    } while (this.match(TokenType.COMMA));\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return geometries;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {Array<number>} All values in a point.\n * @private\n */\nParser.prototype.parsePointText_ = function parsePointText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates = this.parsePoint_();\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return null;\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<number>>} All points in a linestring.\n * @private\n */\nParser.prototype.parseLineStringText_ = function parseLineStringText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates = this.parsePointList_();\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<!Array<number>>>} All points in a polygon.\n * @private\n */\nParser.prototype.parsePolygonText_ = function parsePolygonText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates = this.parseLineStringTextList_();\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<number>>} All points in a multipoint.\n * @private\n */\nParser.prototype.parseMultiPointText_ = function parseMultiPointText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates;\n    if (this.token_.type == TokenType.LEFT_PAREN) {\n      coordinates = this.parsePointTextList_();\n    } else {\n      coordinates = this.parsePointList_();\n    }\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<!Array<number>>>} All linestring points\n *                                        in a multilinestring.\n * @private\n */\nParser.prototype.parseMultiLineStringText_ = function parseMultiLineStringText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates = this.parseLineStringTextList_();\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<!Array<!Array<number>>>>} All polygon points in a multipolygon.\n * @private\n */\nParser.prototype.parseMultiPolygonText_ = function parseMultiPolygonText_ () {\n  if (this.match(TokenType.LEFT_PAREN)) {\n    var coordinates = this.parsePolygonTextList_();\n    if (this.match(TokenType.RIGHT_PAREN)) {\n      return coordinates;\n    }\n  } else if (this.isEmptyGeometry_()) {\n    return [];\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<number>} A point.\n * @private\n */\nParser.prototype.parsePoint_ = function parsePoint_ () {\n  var coordinates = [];\n  var dimensions = this.layout_.length;\n  for (var i = 0; i < dimensions; ++i) {\n    var token = this.token_;\n    if (this.match(TokenType.NUMBER)) {\n      coordinates.push(/** @type {number} */ (token.value));\n    } else {\n      break;\n    }\n  }\n  if (coordinates.length == dimensions) {\n    return coordinates;\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n/**\n * @return {!Array<!Array<number>>} An array of points.\n * @private\n */\nParser.prototype.parsePointList_ = function parsePointList_ () {\n  var coordinates = [this.parsePoint_()];\n  while (this.match(TokenType.COMMA)) {\n    coordinates.push(this.parsePoint_());\n  }\n  return coordinates;\n};\n\n/**\n * @return {!Array<!Array<number>>} An array of points.\n * @private\n */\nParser.prototype.parsePointTextList_ = function parsePointTextList_ () {\n  var coordinates = [this.parsePointText_()];\n  while (this.match(TokenType.COMMA)) {\n    coordinates.push(this.parsePointText_());\n  }\n  return coordinates;\n};\n\n/**\n * @return {!Array<!Array<!Array<number>>>} An array of points.\n * @private\n */\nParser.prototype.parseLineStringTextList_ = function parseLineStringTextList_ () {\n  var coordinates = [this.parseLineStringText_()];\n  while (this.match(TokenType.COMMA)) {\n    coordinates.push(this.parseLineStringText_());\n  }\n  return coordinates;\n};\n\n/**\n * @return {!Array<!Array<!Array<!Array<number>>>>} An array of points.\n * @private\n */\nParser.prototype.parsePolygonTextList_ = function parsePolygonTextList_ () {\n  var coordinates = [this.parsePolygonText_()];\n  while (this.match(TokenType.COMMA)) {\n    coordinates.push(this.parsePolygonText_());\n  }\n  return coordinates;\n};\n\n/**\n * @return {boolean} Whether the token implies an empty geometry.\n * @private\n */\nParser.prototype.isEmptyGeometry_ = function isEmptyGeometry_ () {\n  var isEmpty = this.isTokenType(TokenType.TEXT) &&\n      this.token_.value == EMPTY;\n  if (isEmpty) {\n    this.consume_();\n  }\n  return isEmpty;\n};\n\n/**\n * Create an error message for an unexpected token error.\n * @return {string} Error message.\n * @private\n */\nParser.prototype.formatErrorMessage_ = function formatErrorMessage_ () {\n  return 'Unexpected `' + this.token_.value + '` at position ' +\n      this.token_.position + ' in `' + this.lexer_.wkt + '`';\n};\n\n/**\n * @return {!import(\"../geom/Geometry.js\").default} The geometry.\n * @private\n */\nParser.prototype.parseGeometry_ = function parseGeometry_ () {\n  var token = this.token_;\n  if (this.match(TokenType.TEXT)) {\n    var geomType = token.value;\n    this.layout_ = this.parseGeometryLayout_();\n    if (geomType == 'GEOMETRYCOLLECTION') {\n      var geometries = this.parseGeometryCollectionText_();\n      return new GeometryCollection(geometries);\n    } else {\n      var ctor = GeometryConstructor[geomType];\n      if (!ctor) {\n        throw new Error('Invalid geometry type: ' + geomType);\n      }\n\n      var coordinates;\n      switch (geomType) {\n        case 'POINT': {\n          coordinates = this.parsePointText_();\n          break;\n        }\n        case 'LINESTRING': {\n          coordinates = this.parseLineStringText_();\n          break;\n        }\n        case 'POLYGON': {\n          coordinates = this.parsePolygonText_();\n          break;\n        }\n        case 'MULTIPOINT': {\n          coordinates = this.parseMultiPointText_();\n          break;\n        }\n        case 'MULTILINESTRING': {\n          coordinates = this.parseMultiLineStringText_();\n          break;\n        }\n        case 'MULTIPOLYGON': {\n          coordinates = this.parseMultiPolygonText_();\n          break;\n        }\n        default: {\n          throw new Error('Invalid geometry type: ' + geomType);\n        }\n      }\n\n      if (!coordinates) {\n        if (ctor === GeometryConstructor['POINT']) {\n          coordinates = [NaN, NaN];\n        } else {\n          coordinates = [];\n        }\n      }\n      return new ctor(coordinates, this.layout_);\n    }\n  }\n  throw new Error(this.formatErrorMessage_());\n};\n\n\n/**\n * @classdesc\n * Geometry format for reading and writing data in the `WellKnownText` (WKT)\n * format.\n *\n * @api\n */\nvar WKT = /*@__PURE__*/(function (TextFeature) {\n  function WKT(opt_options) {\n    TextFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n\n    /**\n     * Split GeometryCollection into multiple features.\n     * @type {boolean}\n     * @private\n     */\n    this.splitCollection_ = options.splitCollection !== undefined ?\n      options.splitCollection : false;\n\n  }\n\n  if ( TextFeature ) WKT.__proto__ = TextFeature;\n  WKT.prototype = Object.create( TextFeature && TextFeature.prototype );\n  WKT.prototype.constructor = WKT;\n\n  /**\n   * Parse a WKT string.\n   * @param {string} wkt WKT string.\n   * @return {import(\"../geom/Geometry.js\").default|undefined}\n   *     The geometry created.\n   * @private\n   */\n  WKT.prototype.parse_ = function parse_ (wkt) {\n    var lexer = new Lexer(wkt);\n    var parser = new Parser(lexer);\n    return parser.parse();\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.readFeatureFromText = function readFeatureFromText (text, opt_options) {\n    var geom = this.readGeometryFromText(text, opt_options);\n    if (geom) {\n      var feature = new Feature();\n      feature.setGeometry(geom);\n      return feature;\n    }\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.readFeaturesFromText = function readFeaturesFromText (text, opt_options) {\n    var geometries = [];\n    var geometry = this.readGeometryFromText(text, opt_options);\n    if (this.splitCollection_ &&\n        geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {\n      geometries = (/** @type {GeometryCollection} */ (geometry))\n        .getGeometriesArray();\n    } else {\n      geometries = [geometry];\n    }\n    var features = [];\n    for (var i = 0, ii = geometries.length; i < ii; ++i) {\n      var feature = new Feature();\n      feature.setGeometry(geometries[i]);\n      features.push(feature);\n    }\n    return features;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.readGeometryFromText = function readGeometryFromText (text, opt_options) {\n    var geometry = this.parse_(text);\n    if (geometry) {\n      return (\n        /** @type {import(\"../geom/Geometry.js\").default} */ (transformWithOptions(geometry, false, opt_options))\n      );\n    } else {\n      return null;\n    }\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.writeFeatureText = function writeFeatureText (feature, opt_options) {\n    var geometry = feature.getGeometry();\n    if (geometry) {\n      return this.writeGeometryText(geometry, opt_options);\n    }\n    return '';\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.writeFeaturesText = function writeFeaturesText (features, opt_options) {\n    if (features.length == 1) {\n      return this.writeFeatureText(features[0], opt_options);\n    }\n    var geometries = [];\n    for (var i = 0, ii = features.length; i < ii; ++i) {\n      geometries.push(features[i].getGeometry());\n    }\n    var collection = new GeometryCollection(geometries);\n    return this.writeGeometryText(collection, opt_options);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WKT.prototype.writeGeometryText = function writeGeometryText (geometry, opt_options) {\n    return encode(/** @type {import(\"../geom/Geometry.js\").default} */ (\n      transformWithOptions(geometry, true, opt_options)));\n  };\n\n  return WKT;\n}(TextFeature));\n\n\n/**\n * @param {Point} geom Point geometry.\n * @return {string} Coordinates part of Point as WKT.\n */\nfunction encodePointGeometry(geom) {\n  var coordinates = geom.getCoordinates();\n  if (coordinates.length === 0) {\n    return '';\n  }\n  return coordinates.join(' ');\n}\n\n\n/**\n * @param {MultiPoint} geom MultiPoint geometry.\n * @return {string} Coordinates part of MultiPoint as WKT.\n */\nfunction encodeMultiPointGeometry(geom) {\n  var array = [];\n  var components = geom.getPoints();\n  for (var i = 0, ii = components.length; i < ii; ++i) {\n    array.push('(' + encodePointGeometry(components[i]) + ')');\n  }\n  return array.join(',');\n}\n\n\n/**\n * @param {GeometryCollection} geom GeometryCollection geometry.\n * @return {string} Coordinates part of GeometryCollection as WKT.\n */\nfunction encodeGeometryCollectionGeometry(geom) {\n  var array = [];\n  var geoms = geom.getGeometries();\n  for (var i = 0, ii = geoms.length; i < ii; ++i) {\n    array.push(encode(geoms[i]));\n  }\n  return array.join(',');\n}\n\n\n/**\n * @param {LineString|import(\"../geom/LinearRing.js\").default} geom LineString geometry.\n * @return {string} Coordinates part of LineString as WKT.\n */\nfunction encodeLineStringGeometry(geom) {\n  var coordinates = geom.getCoordinates();\n  var array = [];\n  for (var i = 0, ii = coordinates.length; i < ii; ++i) {\n    array.push(coordinates[i].join(' '));\n  }\n  return array.join(',');\n}\n\n\n/**\n * @param {MultiLineString} geom MultiLineString geometry.\n * @return {string} Coordinates part of MultiLineString as WKT.\n */\nfunction encodeMultiLineStringGeometry(geom) {\n  var array = [];\n  var components = geom.getLineStrings();\n  for (var i = 0, ii = components.length; i < ii; ++i) {\n    array.push('(' + encodeLineStringGeometry(components[i]) + ')');\n  }\n  return array.join(',');\n}\n\n\n/**\n * @param {Polygon} geom Polygon geometry.\n * @return {string} Coordinates part of Polygon as WKT.\n */\nfunction encodePolygonGeometry(geom) {\n  var array = [];\n  var rings = geom.getLinearRings();\n  for (var i = 0, ii = rings.length; i < ii; ++i) {\n    array.push('(' + encodeLineStringGeometry(rings[i]) + ')');\n  }\n  return array.join(',');\n}\n\n\n/**\n * @param {MultiPolygon} geom MultiPolygon geometry.\n * @return {string} Coordinates part of MultiPolygon as WKT.\n */\nfunction encodeMultiPolygonGeometry(geom) {\n  var array = [];\n  var components = geom.getPolygons();\n  for (var i = 0, ii = components.length; i < ii; ++i) {\n    array.push('(' + encodePolygonGeometry(components[i]) + ')');\n  }\n  return array.join(',');\n}\n\n/**\n * @param {import(\"../geom/SimpleGeometry.js\").default} geom SimpleGeometry geometry.\n * @return {string} Potential dimensional information for WKT type.\n */\nfunction encodeGeometryLayout(geom) {\n  var layout = geom.getLayout();\n  var dimInfo = '';\n  if (layout === GeometryLayout.XYZ || layout === GeometryLayout.XYZM) {\n    dimInfo += Z;\n  }\n  if (layout === GeometryLayout.XYM || layout === GeometryLayout.XYZM) {\n    dimInfo += M;\n  }\n  return dimInfo;\n}\n\n\n/**\n * @const\n * @type {Object<string, function(import(\"../geom/Geometry.js\").default): string>}\n */\nvar GeometryEncoder = {\n  'Point': encodePointGeometry,\n  'LineString': encodeLineStringGeometry,\n  'Polygon': encodePolygonGeometry,\n  'MultiPoint': encodeMultiPointGeometry,\n  'MultiLineString': encodeMultiLineStringGeometry,\n  'MultiPolygon': encodeMultiPolygonGeometry,\n  'GeometryCollection': encodeGeometryCollectionGeometry\n};\n\n\n/**\n * Encode a geometry as WKT.\n * @param {!import(\"../geom/Geometry.js\").default} geom The geometry to encode.\n * @return {string} WKT string for the geometry.\n */\nfunction encode(geom) {\n  var type = geom.getType();\n  var geometryEncoder = GeometryEncoder[type];\n  var enc = geometryEncoder(geom);\n  type = type.toUpperCase();\n  if (typeof /** @type {?} */ (geom).getFlatCoordinates === 'function') {\n    var dimInfo = encodeGeometryLayout(/** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geom));\n    if (dimInfo.length > 0) {\n      type += ' ' + dimInfo;\n    }\n  }\n  if (enc.length === 0) {\n    return type + ' ' + EMPTY;\n  }\n  return type + '(' + enc + ')';\n}\n\n\nexport default WKT;\n\n//# sourceMappingURL=WKT.js.map","/**\n * @module ol/format/XLink\n */\n\n\n/**\n * @const\n * @type {string}\n */\nvar NAMESPACE_URI = 'http://www.w3.org/1999/xlink';\n\n\n/**\n * @param {Element} node Node.\n * @return {string|undefined} href.\n */\nexport function readHref(node) {\n  return node.getAttributeNS(NAMESPACE_URI, 'href');\n}\n\n//# sourceMappingURL=XLink.js.map","/**\n * @module ol/format/XML\n */\nimport {isDocument, parse} from '../xml.js';\n\n/**\n * @classdesc\n * Generic format for reading non-feature XML data\n *\n * @abstract\n */\nvar XML = function XML () {};\n\nXML.prototype.read = function read (source) {\n  if (!source) {\n    return null;\n  } else if (typeof source === 'string') {\n    var doc = parse(source);\n    return this.readFromDocument(doc);\n  } else if (isDocument(source)) {\n    return this.readFromDocument(/** @type {Document} */ (source));\n  } else {\n    return this.readFromNode(/** @type {Element} */ (source));\n  }\n};\n\n/**\n * @abstract\n * @param {Document} doc Document.\n * @return {Object} Object\n */\nXML.prototype.readFromDocument = function readFromDocument (doc) {};\n\n/**\n * @abstract\n * @param {Element} node Node.\n * @return {Object} Object\n */\nXML.prototype.readFromNode = function readFromNode (node) {};\n\nexport default XML;\n\n//# sourceMappingURL=XML.js.map","/**\n * @module ol/format/WMSCapabilities\n */\nimport {readHref} from './XLink.js';\nimport XML from './XML.js';\nimport {readDecimalString, readString, readNonNegativeInteger, readDecimal, readBooleanString, readNonNegativeIntegerString} from './xsd.js';\nimport {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter,\n  makeStructureNS, pushParseAndPop} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n  null,\n  'http://www.opengis.net/wms'\n];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Service': makeObjectPropertySetter(readService),\n    'Capability': makeObjectPropertySetter(readCapability)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CAPABILITY_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Request': makeObjectPropertySetter(readRequest),\n    'Exception': makeObjectPropertySetter(readException),\n    'Layer': makeObjectPropertySetter(readCapabilityLayer)\n  });\n\n\n/**\n * @classdesc\n * Format for reading WMS capabilities data\n *\n * @api\n */\nvar WMSCapabilities = /*@__PURE__*/(function (XML) {\n  function WMSCapabilities() {\n    XML.call(this);\n\n    /**\n     * @type {string|undefined}\n     */\n    this.version = undefined;\n  }\n\n  if ( XML ) WMSCapabilities.__proto__ = XML;\n  WMSCapabilities.prototype = Object.create( XML && XML.prototype );\n  WMSCapabilities.prototype.constructor = WMSCapabilities;\n\n  /**\n   * @inheritDoc\n   */\n  WMSCapabilities.prototype.readFromDocument = function readFromDocument (doc) {\n    for (var n = doc.firstChild; n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readFromNode(n);\n      }\n    }\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WMSCapabilities.prototype.readFromNode = function readFromNode (node) {\n    this.version = node.getAttribute('version').trim();\n    var wmsCapabilityObject = pushParseAndPop({\n      'version': this.version\n    }, PARSERS, node, []);\n    return wmsCapabilityObject ? wmsCapabilityObject : null;\n  };\n\n  return WMSCapabilities;\n}(XML));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar SERVICE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'ContactInformation': makeObjectPropertySetter(readContactInformation),\n    'Fees': makeObjectPropertySetter(readString),\n    'AccessConstraints': makeObjectPropertySetter(readString),\n    'LayerLimit': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxHeight': makeObjectPropertySetter(readNonNegativeInteger)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONTACT_INFORMATION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ContactPersonPrimary': makeObjectPropertySetter(readContactPersonPrimary),\n    'ContactPosition': makeObjectPropertySetter(readString),\n    'ContactAddress': makeObjectPropertySetter(readContactAddress),\n    'ContactVoiceTelephone': makeObjectPropertySetter(readString),\n    'ContactFacsimileTelephone': makeObjectPropertySetter(readString),\n    'ContactElectronicMailAddress': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONTACT_PERSON_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ContactPerson': makeObjectPropertySetter(readString),\n    'ContactOrganization': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONTACT_ADDRESS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'AddressType': makeObjectPropertySetter(readString),\n    'Address': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'StateOrProvince': makeObjectPropertySetter(readString),\n    'PostCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar EXCEPTION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Format': makeArrayPusher(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LAYER_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'KeywordList': makeObjectPropertySetter(readKeywordList),\n    'CRS': makeObjectPropertyPusher(readString),\n    'EX_GeographicBoundingBox': makeObjectPropertySetter(readEXGeographicBoundingBox),\n    'BoundingBox': makeObjectPropertyPusher(readBoundingBox),\n    'Dimension': makeObjectPropertyPusher(readDimension),\n    'Attribution': makeObjectPropertySetter(readAttribution),\n    'AuthorityURL': makeObjectPropertyPusher(readAuthorityURL),\n    'Identifier': makeObjectPropertyPusher(readString),\n    'MetadataURL': makeObjectPropertyPusher(readMetadataURL),\n    'DataURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'FeatureListURL': makeObjectPropertyPusher(readFormatOnlineresource),\n    'Style': makeObjectPropertyPusher(readStyle),\n    'MinScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'MaxScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'Layer': makeObjectPropertyPusher(readLayer)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar ATTRIBUTION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'OnlineResource': makeObjectPropertySetter(readHref),\n    'LogoURL': makeObjectPropertySetter(readSizedFormatOnlineresource)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS =\n    makeStructureNS(NAMESPACE_URIS, {\n      'westBoundLongitude': makeObjectPropertySetter(readDecimal),\n      'eastBoundLongitude': makeObjectPropertySetter(readDecimal),\n      'southBoundLatitude': makeObjectPropertySetter(readDecimal),\n      'northBoundLatitude': makeObjectPropertySetter(readDecimal)\n    });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar REQUEST_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'GetCapabilities': makeObjectPropertySetter(readOperationType),\n    'GetMap': makeObjectPropertySetter(readOperationType),\n    'GetFeatureInfo': makeObjectPropertySetter(readOperationType)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OPERATIONTYPE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Format': makeObjectPropertyPusher(readString),\n    'DCPType': makeObjectPropertyPusher(readDCPType)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar DCPTYPE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHTTP)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar HTTP_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Get': makeObjectPropertySetter(readFormatOnlineresource),\n    'Post': makeObjectPropertySetter(readFormatOnlineresource)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Name': makeObjectPropertySetter(readString),\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'LegendURL': makeObjectPropertyPusher(readSizedFormatOnlineresource),\n    'StyleSheetURL': makeObjectPropertySetter(readFormatOnlineresource),\n    'StyleURL': makeObjectPropertySetter(readFormatOnlineresource)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar FORMAT_ONLINERESOURCE_PARSERS =\n    makeStructureNS(NAMESPACE_URIS, {\n      'Format': makeObjectPropertySetter(readString),\n      'OnlineResource': makeObjectPropertySetter(readHref)\n    });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar KEYWORDLIST_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Keyword': makeArrayPusher(readString)\n  });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readAttribution(node, objectStack) {\n  return pushParseAndPop({}, ATTRIBUTION_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Bounding box object.\n */\nfunction readBoundingBox(node, objectStack) {\n  var extent = [\n    readDecimalString(node.getAttribute('minx')),\n    readDecimalString(node.getAttribute('miny')),\n    readDecimalString(node.getAttribute('maxx')),\n    readDecimalString(node.getAttribute('maxy'))\n  ];\n\n  var resolutions = [\n    readDecimalString(node.getAttribute('resx')),\n    readDecimalString(node.getAttribute('resy'))\n  ];\n\n  return {\n    'crs': node.getAttribute('CRS'),\n    'extent': extent,\n    'res': resolutions\n  };\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {import(\"../extent.js\").Extent|undefined} Bounding box object.\n */\nfunction readEXGeographicBoundingBox(node, objectStack) {\n  var geographicBoundingBox = pushParseAndPop(\n    {},\n    EX_GEOGRAPHIC_BOUNDING_BOX_PARSERS,\n    node, objectStack);\n  if (!geographicBoundingBox) {\n    return undefined;\n  }\n  var westBoundLongitude = /** @type {number|undefined} */\n        (geographicBoundingBox['westBoundLongitude']);\n  var southBoundLatitude = /** @type {number|undefined} */\n        (geographicBoundingBox['southBoundLatitude']);\n  var eastBoundLongitude = /** @type {number|undefined} */\n        (geographicBoundingBox['eastBoundLongitude']);\n  var northBoundLatitude = /** @type {number|undefined} */\n        (geographicBoundingBox['northBoundLatitude']);\n  if (westBoundLongitude === undefined || southBoundLatitude === undefined ||\n        eastBoundLongitude === undefined || northBoundLatitude === undefined) {\n    return undefined;\n  }\n  return [\n    westBoundLongitude, southBoundLatitude,\n    eastBoundLongitude, northBoundLatitude\n  ];\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Capability object.\n */\nfunction readCapability(node, objectStack) {\n  return pushParseAndPop({}, CAPABILITY_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Service object.\n */\nfunction readService(node, objectStack) {\n  return pushParseAndPop({}, SERVICE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact information object.\n */\nfunction readContactInformation(node, objectStack) {\n  return pushParseAndPop({}, CONTACT_INFORMATION_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact person object.\n */\nfunction readContactPersonPrimary(node, objectStack) {\n  return pushParseAndPop({}, CONTACT_PERSON_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Contact address object.\n */\nfunction readContactAddress(node, objectStack) {\n  return pushParseAndPop({}, CONTACT_ADDRESS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Format array.\n */\nfunction readException(node, objectStack) {\n  return pushParseAndPop([], EXCEPTION_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readCapabilityLayer(node, objectStack) {\n  return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layer object.\n */\nfunction readLayer(node, objectStack) {\n  var parentLayerObject = /**  @type {!Object<string,*>} */ (objectStack[objectStack.length - 1]);\n\n  var layerObject = pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n\n  if (!layerObject) {\n    return undefined;\n  }\n  var queryable = readBooleanString(node.getAttribute('queryable'));\n  if (queryable === undefined) {\n    queryable = parentLayerObject['queryable'];\n  }\n  layerObject['queryable'] = queryable !== undefined ? queryable : false;\n\n  var cascaded = readNonNegativeIntegerString(\n    node.getAttribute('cascaded'));\n  if (cascaded === undefined) {\n    cascaded = parentLayerObject['cascaded'];\n  }\n  layerObject['cascaded'] = cascaded;\n\n  var opaque = readBooleanString(node.getAttribute('opaque'));\n  if (opaque === undefined) {\n    opaque = parentLayerObject['opaque'];\n  }\n  layerObject['opaque'] = opaque !== undefined ? opaque : false;\n\n  var noSubsets = readBooleanString(node.getAttribute('noSubsets'));\n  if (noSubsets === undefined) {\n    noSubsets = parentLayerObject['noSubsets'];\n  }\n  layerObject['noSubsets'] = noSubsets !== undefined ? noSubsets : false;\n\n  var fixedWidth = readDecimalString(node.getAttribute('fixedWidth'));\n  if (!fixedWidth) {\n    fixedWidth = parentLayerObject['fixedWidth'];\n  }\n  layerObject['fixedWidth'] = fixedWidth;\n\n  var fixedHeight = readDecimalString(node.getAttribute('fixedHeight'));\n  if (!fixedHeight) {\n    fixedHeight = parentLayerObject['fixedHeight'];\n  }\n  layerObject['fixedHeight'] = fixedHeight;\n\n  // See 7.2.4.8\n  var addKeys = ['Style', 'CRS', 'AuthorityURL'];\n  addKeys.forEach(function(key) {\n    if (key in parentLayerObject) {\n      var childValue = layerObject[key] || [];\n      layerObject[key] = childValue.concat(parentLayerObject[key]);\n    }\n  });\n\n  var replaceKeys = ['EX_GeographicBoundingBox', 'BoundingBox', 'Dimension',\n    'Attribution', 'MinScaleDenominator', 'MaxScaleDenominator'];\n  replaceKeys.forEach(function(key) {\n    if (!(key in layerObject)) {\n      var parentValue = parentLayerObject[key];\n      layerObject[key] = parentValue;\n    }\n  });\n\n  return layerObject;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object} Dimension object.\n */\nfunction readDimension(node, objectStack) {\n  var dimensionObject = {\n    'name': node.getAttribute('name'),\n    'units': node.getAttribute('units'),\n    'unitSymbol': node.getAttribute('unitSymbol'),\n    'default': node.getAttribute('default'),\n    'multipleValues': readBooleanString(node.getAttribute('multipleValues')),\n    'nearestValue': readBooleanString(node.getAttribute('nearestValue')),\n    'current': readBooleanString(node.getAttribute('current')),\n    'values': readString(node)\n  };\n  return dimensionObject;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readFormatOnlineresource(node, objectStack) {\n  return pushParseAndPop({}, FORMAT_ONLINERESOURCE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Request object.\n */\nfunction readRequest(node, objectStack) {\n  return pushParseAndPop({}, REQUEST_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} DCP type object.\n */\nfunction readDCPType(node, objectStack) {\n  return pushParseAndPop({}, DCPTYPE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} HTTP object.\n */\nfunction readHTTP(node, objectStack) {\n  return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Operation type object.\n */\nfunction readOperationType(node, objectStack) {\n  return pushParseAndPop({}, OPERATIONTYPE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Online resource object.\n */\nfunction readSizedFormatOnlineresource(node, objectStack) {\n  var formatOnlineresource = readFormatOnlineresource(node, objectStack);\n  if (formatOnlineresource) {\n    var size = [\n      readNonNegativeIntegerString(node.getAttribute('width')),\n      readNonNegativeIntegerString(node.getAttribute('height'))\n    ];\n    formatOnlineresource['size'] = size;\n    return formatOnlineresource;\n  }\n  return undefined;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Authority URL object.\n */\nfunction readAuthorityURL(node, objectStack) {\n  var authorityObject = readFormatOnlineresource(node, objectStack);\n  if (authorityObject) {\n    authorityObject['name'] = node.getAttribute('name');\n    return authorityObject;\n  }\n  return undefined;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Metadata URL object.\n */\nfunction readMetadataURL(node, objectStack) {\n  var metadataObject = readFormatOnlineresource(node, objectStack);\n  if (metadataObject) {\n    metadataObject['type'] = node.getAttribute('type');\n    return metadataObject;\n  }\n  return undefined;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n  return pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Array<string>|undefined} Keyword list.\n */\nfunction readKeywordList(node, objectStack) {\n  return pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack);\n}\n\n\nexport default WMSCapabilities;\n\n//# sourceMappingURL=WMSCapabilities.js.map","/**\n * @module ol/format/WMSGetFeatureInfo\n */\nimport {extend, includes} from '../array.js';\nimport GML2 from './GML2.js';\nimport XMLFeature from './XMLFeature.js';\nimport {assign} from '../obj.js';\nimport {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {Array<string>} [layers] If set, only features of the given layers will be returned by the format when read.\n */\n\n\n/**\n * @const\n * @type {string}\n */\nvar featureIdentifier = '_feature';\n\n\n/**\n * @const\n * @type {string}\n */\nvar layerIdentifier = '_layer';\n\n\n/**\n * @classdesc\n * Format for reading WMSGetFeatureInfo format. It uses\n * {@link module:ol/format/GML2~GML2} to read features.\n *\n * @api\n */\nvar WMSGetFeatureInfo = /*@__PURE__*/(function (XMLFeature) {\n  function WMSGetFeatureInfo(opt_options) {\n    XMLFeature.call(this);\n\n    var options = opt_options ? opt_options : {};\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.featureNS_ = 'http://mapserver.gis.umn.edu/mapserver';\n\n\n    /**\n     * @private\n     * @type {GML2}\n     */\n    this.gmlFormat_ = new GML2();\n\n\n    /**\n     * @private\n     * @type {Array<string>}\n     */\n    this.layers_ = options.layers ? options.layers : null;\n  }\n\n  if ( XMLFeature ) WMSGetFeatureInfo.__proto__ = XMLFeature;\n  WMSGetFeatureInfo.prototype = Object.create( XMLFeature && XMLFeature.prototype );\n  WMSGetFeatureInfo.prototype.constructor = WMSGetFeatureInfo;\n\n  /**\n   * @return {Array<string>} layers\n   */\n  WMSGetFeatureInfo.prototype.getLayers = function getLayers () {\n    return this.layers_;\n  };\n\n  /**\n   * @param {Array<string>} layers Layers to parse.\n   */\n  WMSGetFeatureInfo.prototype.setLayers = function setLayers (layers) {\n    this.layers_ = layers;\n  };\n\n  /**\n   * @param {Element} node Node.\n   * @param {Array<*>} objectStack Object stack.\n   * @return {Array<import(\"../Feature.js\").default>} Features.\n   * @private\n   */\n  WMSGetFeatureInfo.prototype.readFeatures_ = function readFeatures_ (node, objectStack) {\n    node.setAttribute('namespaceURI', this.featureNS_);\n    var localName = node.localName;\n    /** @type {Array<import(\"../Feature.js\").default>} */\n    var features = [];\n    if (node.childNodes.length === 0) {\n      return features;\n    }\n    if (localName == 'msGMLOutput') {\n      for (var i = 0, ii = node.childNodes.length; i < ii; i++) {\n        var layer = node.childNodes[i];\n        if (layer.nodeType !== Node.ELEMENT_NODE) {\n          continue;\n        }\n\n        var layerElement = /** @type {Element} */ (layer);\n        var context = objectStack[0];\n\n        var toRemove = layerIdentifier;\n        var layerName = layerElement.localName.replace(toRemove, '');\n\n        if (this.layers_ && !includes(this.layers_, layerName)) {\n          continue;\n        }\n\n        var featureType = layerName +\n            featureIdentifier;\n\n        context['featureType'] = featureType;\n        context['featureNS'] = this.featureNS_;\n\n        /** @type {Object<string, import(\"../xml.js\").Parser>} */\n        var parsers = {};\n        parsers[featureType] = makeArrayPusher(\n          this.gmlFormat_.readFeatureElement, this.gmlFormat_);\n        var parsersNS = makeStructureNS(\n          [context['featureNS'], null], parsers);\n        layerElement.setAttribute('namespaceURI', this.featureNS_);\n        var layerFeatures = pushParseAndPop(\n          [], parsersNS, layerElement, objectStack, this.gmlFormat_);\n        if (layerFeatures) {\n          extend(features, layerFeatures);\n        }\n      }\n    }\n    if (localName == 'FeatureCollection') {\n      var gmlFeatures = pushParseAndPop([],\n        this.gmlFormat_.FEATURE_COLLECTION_PARSERS, node,\n        [{}], this.gmlFormat_);\n      if (gmlFeatures) {\n        features = gmlFeatures;\n      }\n    }\n    return features;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WMSGetFeatureInfo.prototype.readFeaturesFromNode = function readFeaturesFromNode (node, opt_options) {\n    var options = {};\n    if (opt_options) {\n      assign(options, this.getReadOptions(node, opt_options));\n    }\n    return this.readFeatures_(node, [options]);\n  };\n\n  return WMSGetFeatureInfo;\n}(XMLFeature));\n\n\nexport default WMSGetFeatureInfo;\n\n//# sourceMappingURL=WMSGetFeatureInfo.js.map","/**\n * @module ol/format/OWS\n */\nimport {readHref} from './XLink.js';\nimport XML from './XML.js';\nimport {readString} from './xsd.js';\nimport {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pushParseAndPop} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1'];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'ServiceIdentification': makeObjectPropertySetter(readServiceIdentification),\n    'ServiceProvider': makeObjectPropertySetter(readServiceProvider),\n    'OperationsMetadata': makeObjectPropertySetter(readOperationsMetadata)\n  });\n\n\nvar OWS = /*@__PURE__*/(function (XML) {\n  function OWS() {\n    XML.call(this);\n  }\n\n  if ( XML ) OWS.__proto__ = XML;\n  OWS.prototype = Object.create( XML && XML.prototype );\n  OWS.prototype.constructor = OWS;\n\n  /**\n   * @inheritDoc\n   */\n  OWS.prototype.readFromDocument = function readFromDocument (doc) {\n    for (var n = doc.firstChild; n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readFromNode(n);\n      }\n    }\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  OWS.prototype.readFromNode = function readFromNode (node) {\n    var owsObject = pushParseAndPop({},\n      PARSERS, node, []);\n    return owsObject ? owsObject : null;\n  };\n\n  return OWS;\n}(XML));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar ADDRESS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'DeliveryPoint': makeObjectPropertySetter(readString),\n    'City': makeObjectPropertySetter(readString),\n    'AdministrativeArea': makeObjectPropertySetter(readString),\n    'PostalCode': makeObjectPropertySetter(readString),\n    'Country': makeObjectPropertySetter(readString),\n    'ElectronicMailAddress': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar ALLOWED_VALUES_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Value': makeObjectPropertyPusher(readValue)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONSTRAINT_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'AllowedValues': makeObjectPropertySetter(readAllowedValues)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONTACT_INFO_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Phone': makeObjectPropertySetter(readPhone),\n    'Address': makeObjectPropertySetter(readAddress)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar DCP_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'HTTP': makeObjectPropertySetter(readHttp)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar HTTP_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Get': makeObjectPropertyPusher(readGet),\n    'Post': undefined // TODO\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OPERATION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'DCP': makeObjectPropertySetter(readDcp)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar OPERATIONS_METADATA_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Operation': readOperation\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PHONE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Voice': makeObjectPropertySetter(readString),\n    'Facsimile': makeObjectPropertySetter(readString)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar REQUEST_METHOD_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Constraint': makeObjectPropertyPusher(readConstraint)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar SERVICE_CONTACT_PARSERS =\n    makeStructureNS(\n      NAMESPACE_URIS, {\n        'IndividualName': makeObjectPropertySetter(readString),\n        'PositionName': makeObjectPropertySetter(readString),\n        'ContactInfo': makeObjectPropertySetter(readContactInfo)\n      });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar SERVICE_IDENTIFICATION_PARSERS =\n    makeStructureNS(\n      NAMESPACE_URIS, {\n        'Abstract': makeObjectPropertySetter(readString),\n        'AccessConstraints': makeObjectPropertySetter(readString),\n        'Fees': makeObjectPropertySetter(readString),\n        'Title': makeObjectPropertySetter(readString),\n        'ServiceTypeVersion': makeObjectPropertySetter(readString),\n        'ServiceType': makeObjectPropertySetter(readString)\n      });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar SERVICE_PROVIDER_PARSERS =\n    makeStructureNS(\n      NAMESPACE_URIS, {\n        'ProviderName': makeObjectPropertySetter(readString),\n        'ProviderSite': makeObjectPropertySetter(readHref),\n        'ServiceContact': makeObjectPropertySetter(readServiceContact)\n      });\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The address.\n */\nfunction readAddress(node, objectStack) {\n  return pushParseAndPop({},\n    ADDRESS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The values.\n */\nfunction readAllowedValues(node, objectStack) {\n  return pushParseAndPop({},\n    ALLOWED_VALUES_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The constraint.\n */\nfunction readConstraint(node, objectStack) {\n  var name = node.getAttribute('name');\n  if (!name) {\n    return undefined;\n  }\n  return pushParseAndPop({'name': name},\n    CONSTRAINT_PARSERS, node,\n    objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The contact info.\n */\nfunction readContactInfo(node, objectStack) {\n  return pushParseAndPop({},\n    CONTACT_INFO_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The DCP.\n */\nfunction readDcp(node, objectStack) {\n  return pushParseAndPop({},\n    DCP_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The GET object.\n */\nfunction readGet(node, objectStack) {\n  var href = readHref(node);\n  if (!href) {\n    return undefined;\n  }\n  return pushParseAndPop({'href': href},\n    REQUEST_METHOD_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The HTTP object.\n */\nfunction readHttp(node, objectStack) {\n  return pushParseAndPop({}, HTTP_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operation.\n */\nfunction readOperation(node, objectStack) {\n  var name = node.getAttribute('name');\n  var value = pushParseAndPop({},\n    OPERATION_PARSERS, node, objectStack);\n  if (!value) {\n    return undefined;\n  }\n  var object = /** @type {Object} */\n      (objectStack[objectStack.length - 1]);\n  object[name] = value;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The operations metadata.\n */\nfunction readOperationsMetadata(node, objectStack) {\n  return pushParseAndPop({},\n    OPERATIONS_METADATA_PARSERS, node,\n    objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The phone.\n */\nfunction readPhone(node, objectStack) {\n  return pushParseAndPop({},\n    PHONE_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service identification.\n */\nfunction readServiceIdentification(node, objectStack) {\n  return pushParseAndPop(\n    {}, SERVICE_IDENTIFICATION_PARSERS, node,\n    objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service contact.\n */\nfunction readServiceContact(node, objectStack) {\n  return pushParseAndPop(\n    {}, SERVICE_CONTACT_PARSERS, node,\n    objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} The service provider.\n */\nfunction readServiceProvider(node, objectStack) {\n  return pushParseAndPop(\n    {}, SERVICE_PROVIDER_PARSERS, node,\n    objectStack);\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {string|undefined} The value.\n */\nfunction readValue(node, objectStack) {\n  return readString(node);\n}\n\n\nexport default OWS;\n\n//# sourceMappingURL=OWS.js.map","/**\n * @module ol/format/WMTSCapabilities\n */\nimport {boundingExtent} from '../extent.js';\nimport OWS from './OWS.js';\nimport {readHref} from './XLink.js';\nimport XML from './XML.js';\nimport {readString, readNonNegativeInteger, readDecimal} from './xsd.js';\nimport {pushParseAndPop, makeStructureNS,\n  makeObjectPropertySetter, makeObjectPropertyPusher, makeArrayPusher} from '../xml.js';\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar NAMESPACE_URIS = [\n  null,\n  'http://www.opengis.net/wmts/1.0'\n];\n\n\n/**\n * @const\n * @type {Array<null|string>}\n */\nvar OWS_NAMESPACE_URIS = [\n  null,\n  'http://www.opengis.net/ows/1.1'\n];\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Contents': makeObjectPropertySetter(readContents)\n  });\n\n\n/**\n * @classdesc\n * Format for reading WMTS capabilities data.\n *\n * @api\n */\nvar WMTSCapabilities = /*@__PURE__*/(function (XML) {\n  function WMTSCapabilities() {\n    XML.call(this);\n\n    /**\n     * @type {OWS}\n     * @private\n     */\n    this.owsParser_ = new OWS();\n  }\n\n  if ( XML ) WMTSCapabilities.__proto__ = XML;\n  WMTSCapabilities.prototype = Object.create( XML && XML.prototype );\n  WMTSCapabilities.prototype.constructor = WMTSCapabilities;\n\n  /**\n   * @inheritDoc\n   */\n  WMTSCapabilities.prototype.readFromDocument = function readFromDocument (doc) {\n    for (var n = doc.firstChild; n; n = n.nextSibling) {\n      if (n.nodeType == Node.ELEMENT_NODE) {\n        return this.readFromNode(n);\n      }\n    }\n    return null;\n  };\n\n  /**\n   * @inheritDoc\n   */\n  WMTSCapabilities.prototype.readFromNode = function readFromNode (node) {\n    var version = node.getAttribute('version').trim();\n    var WMTSCapabilityObject = this.owsParser_.readFromNode(node);\n    if (!WMTSCapabilityObject) {\n      return null;\n    }\n    WMTSCapabilityObject['version'] = version;\n    WMTSCapabilityObject = pushParseAndPop(WMTSCapabilityObject, PARSERS, node, []);\n    return WMTSCapabilityObject ? WMTSCapabilityObject : null;\n  };\n\n  return WMTSCapabilities;\n}(XML));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar CONTENTS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Layer': makeObjectPropertyPusher(readLayer),\n    'TileMatrixSet': makeObjectPropertyPusher(readTileMatrixSet)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar LAYER_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Style': makeObjectPropertyPusher(readStyle),\n    'Format': makeObjectPropertyPusher(readString),\n    'TileMatrixSetLink': makeObjectPropertyPusher(readTileMatrixSetLink),\n    'Dimension': makeObjectPropertyPusher(readDimensions),\n    'ResourceURL': makeObjectPropertyPusher(readResourceUrl)\n  }, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Abstract': makeObjectPropertySetter(readString),\n    'WGS84BoundingBox': makeObjectPropertySetter(readWgs84BoundingBox),\n    'Identifier': makeObjectPropertySetter(readString)\n  }));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar STYLE_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'LegendURL': makeObjectPropertyPusher(readLegendUrl)\n  }, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Title': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString)\n  }));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TMS_LINKS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'TileMatrixSet': makeObjectPropertySetter(readString),\n    'TileMatrixSetLimits': makeObjectPropertySetter(readTileMatrixLimitsList)\n  });\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TMS_LIMITS_LIST_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'TileMatrixLimits': makeArrayPusher(readTileMatrixLimits)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TMS_LIMITS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'TileMatrix': makeObjectPropertySetter(readString),\n    'MinTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileRow': makeObjectPropertySetter(readNonNegativeInteger),\n    'MinTileCol': makeObjectPropertySetter(readNonNegativeInteger),\n    'MaxTileCol': makeObjectPropertySetter(readNonNegativeInteger)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar DIMENSION_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'Default': makeObjectPropertySetter(readString),\n    'Value': makeObjectPropertyPusher(readString)\n  }, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString)\n  }));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar WGS84_BBOX_READERS = makeStructureNS(\n  OWS_NAMESPACE_URIS, {\n    'LowerCorner': makeArrayPusher(readCoordinates),\n    'UpperCorner': makeArrayPusher(readCoordinates)\n  });\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TMS_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'WellKnownScaleSet': makeObjectPropertySetter(readString),\n    'TileMatrix': makeObjectPropertyPusher(readTileMatrix)\n  }, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'SupportedCRS': makeObjectPropertySetter(readString),\n    'Identifier': makeObjectPropertySetter(readString)\n  }));\n\n\n/**\n * @const\n * @type {Object<string, Object<string, import(\"../xml.js\").Parser>>}\n */\nvar TM_PARSERS = makeStructureNS(\n  NAMESPACE_URIS, {\n    'TopLeftCorner': makeObjectPropertySetter(readCoordinates),\n    'ScaleDenominator': makeObjectPropertySetter(readDecimal),\n    'TileWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'TileHeight': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixWidth': makeObjectPropertySetter(readNonNegativeInteger),\n    'MatrixHeight': makeObjectPropertySetter(readNonNegativeInteger)\n  }, makeStructureNS(OWS_NAMESPACE_URIS, {\n    'Identifier': makeObjectPropertySetter(readString)\n  }));\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Attribution object.\n */\nfunction readContents(node, objectStack) {\n  return pushParseAndPop({}, CONTENTS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Layers object.\n */\nfunction readLayer(node, objectStack) {\n  return pushParseAndPop({}, LAYER_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set object.\n */\nfunction readTileMatrixSet(node, objectStack) {\n  return pushParseAndPop({}, TMS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Style object.\n */\nfunction readStyle(node, objectStack) {\n  var style = pushParseAndPop({}, STYLE_PARSERS, node, objectStack);\n  if (!style) {\n    return undefined;\n  }\n  var isDefault = node.getAttribute('isDefault') === 'true';\n  style['isDefault'] = isDefault;\n  return style;\n\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Tile Matrix Set Link object.\n */\nfunction readTileMatrixSetLink(node, objectStack) {\n  return pushParseAndPop({}, TMS_LINKS_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Dimension object.\n */\nfunction readDimensions(node, objectStack) {\n  return pushParseAndPop({}, DIMENSION_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Resource URL object.\n */\nfunction readResourceUrl(node, objectStack) {\n  var format = node.getAttribute('format');\n  var template = node.getAttribute('template');\n  var resourceType = node.getAttribute('resourceType');\n  var resource = {};\n  if (format) {\n    resource['format'] = format;\n  }\n  if (template) {\n    resource['template'] = template;\n  }\n  if (resourceType) {\n    resource['resourceType'] = resourceType;\n  }\n  return resource;\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} WGS84 BBox object.\n */\nfunction readWgs84BoundingBox(node, objectStack) {\n  var coordinates = pushParseAndPop([], WGS84_BBOX_READERS, node, objectStack);\n  if (coordinates.length != 2) {\n    return undefined;\n  }\n  return boundingExtent(coordinates);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Legend object.\n */\nfunction readLegendUrl(node, objectStack) {\n  var legend = {};\n  legend['format'] = node.getAttribute('format');\n  legend['href'] = readHref(node);\n  return legend;\n}\n\n\n/**\n * @param {Node} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} Coordinates object.\n */\nfunction readCoordinates(node, objectStack) {\n  var coordinates = readString(node).split(/\\s+/);\n  if (!coordinates || coordinates.length != 2) {\n    return undefined;\n  }\n  var x = +coordinates[0];\n  var y = +coordinates[1];\n  if (isNaN(x) || isNaN(y)) {\n    return undefined;\n  }\n  return [x, y];\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrix object.\n */\nfunction readTileMatrix(node, objectStack) {\n  return pushParseAndPop({}, TM_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixSetLimits Object.\n */\nfunction readTileMatrixLimitsList(node, objectStack) {\n  return pushParseAndPop([], TMS_LIMITS_LIST_PARSERS, node, objectStack);\n}\n\n\n/**\n * @param {Element} node Node.\n * @param {Array<*>} objectStack Object stack.\n * @return {Object|undefined} TileMatrixLimits Array.\n */\nfunction readTileMatrixLimits(node, objectStack) {\n  return pushParseAndPop({}, TMS_LIMITS_PARSERS, node, objectStack);\n}\n\n\nexport default WMTSCapabilities;\n\n//# sourceMappingURL=WMTSCapabilities.js.map","/**\n * @module ol/control/FullScreen\n */\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_UNSUPPORTED} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\n\n\n/**\n * @return {string} Change type.\n */\nvar getChangeType = (function() {\n  var changeType;\n  return function() {\n    if (!changeType) {\n      var body = document.body;\n      if (body.webkitRequestFullscreen) {\n        changeType = 'webkitfullscreenchange';\n      } else if (body.mozRequestFullScreen) {\n        changeType = 'mozfullscreenchange';\n      } else if (body.msRequestFullscreen) {\n        changeType = 'MSFullscreenChange';\n      } else if (body.requestFullscreen) {\n        changeType = 'fullscreenchange';\n      }\n    }\n    return changeType;\n  };\n})();\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-full-screen'] CSS class name.\n * @property {string|Text} [label='\\u2922'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string|Text} [labelActive='\\u00d7'] Text label to use for the\n * button when full-screen is active.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Toggle full-screen'] Text label to use for the button tip.\n * @property {boolean} [keys=false] Full keyboard access.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {HTMLElement|string} [source] The element to be displayed\n * fullscreen. When not provided, the element containing the map viewport will\n * be displayed fullscreen.\n */\n\n\n/**\n * @classdesc\n * Provides a button that when clicked fills up the full screen with the map.\n * The full screen source element is by default the element containing the map viewport unless\n * overridden by providing the `source` option. In which case, the dom\n * element introduced using this parameter will be displayed in full screen.\n *\n * When in full screen mode, a close button is shown to exit full screen mode.\n * The [Fullscreen API](http://www.w3.org/TR/fullscreen/) is used to\n * toggle the map in full screen mode.\n *\n * @api\n */\nvar FullScreen = /*@__PURE__*/(function (Control) {\n  function FullScreen(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      target: options.target\n    });\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.cssClassName_ = options.className !== undefined ? options.className :\n      'ol-full-screen';\n\n    var label = options.label !== undefined ? options.label : '\\u2922';\n\n    /**\n     * @private\n     * @type {Text}\n     */\n    this.labelNode_ = typeof label === 'string' ?\n      document.createTextNode(label) : label;\n\n    var labelActive = options.labelActive !== undefined ? options.labelActive : '\\u00d7';\n\n    /**\n     * @private\n     * @type {Text}\n     */\n    this.labelActiveNode_ = typeof labelActive === 'string' ?\n      document.createTextNode(labelActive) : labelActive;\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.button_ = document.createElement('button');\n\n    var tipLabel = options.tipLabel ? options.tipLabel : 'Toggle full-screen';\n    this.setClassName_(this.button_, isFullScreen());\n    this.button_.setAttribute('type', 'button');\n    this.button_.title = tipLabel;\n    this.button_.appendChild(this.labelNode_);\n\n    listen(this.button_, EventType.CLICK,\n      this.handleClick_, this);\n\n    var cssClasses = this.cssClassName_ + ' ' + CLASS_UNSELECTABLE +\n        ' ' + CLASS_CONTROL + ' ' +\n        (!isFullScreenSupported() ? CLASS_UNSUPPORTED : '');\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(this.button_);\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.keys_ = options.keys !== undefined ? options.keys : false;\n\n    /**\n     * @private\n     * @type {HTMLElement|string|undefined}\n     */\n    this.source_ = options.source;\n\n  }\n\n  if ( Control ) FullScreen.__proto__ = Control;\n  FullScreen.prototype = Object.create( Control && Control.prototype );\n  FullScreen.prototype.constructor = FullScreen;\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  FullScreen.prototype.handleClick_ = function handleClick_ (event) {\n    event.preventDefault();\n    this.handleFullScreen_();\n  };\n\n  /**\n   * @private\n   */\n  FullScreen.prototype.handleFullScreen_ = function handleFullScreen_ () {\n    if (!isFullScreenSupported()) {\n      return;\n    }\n    var map = this.getMap();\n    if (!map) {\n      return;\n    }\n    if (isFullScreen()) {\n      exitFullScreen();\n    } else {\n      var element;\n      if (this.source_) {\n        element = typeof this.source_ === 'string' ?\n          document.getElementById(this.source_) :\n          this.source_;\n      } else {\n        element = map.getTargetElement();\n      }\n      if (this.keys_) {\n        requestFullScreenWithKeys(element);\n\n      } else {\n        requestFullScreen(element);\n      }\n    }\n  };\n\n  /**\n   * @private\n   */\n  FullScreen.prototype.handleFullScreenChange_ = function handleFullScreenChange_ () {\n    var map = this.getMap();\n    if (isFullScreen()) {\n      this.setClassName_(this.button_, true);\n      replaceNode(this.labelActiveNode_, this.labelNode_);\n    } else {\n      this.setClassName_(this.button_, false);\n      replaceNode(this.labelNode_, this.labelActiveNode_);\n    }\n    if (map) {\n      map.updateSize();\n    }\n  };\n\n  /**\n   * @param {HTMLElement} element Target element\n   * @param {boolean} fullscreen True if fullscreen class name should be active\n   * @private\n   */\n  FullScreen.prototype.setClassName_ = function setClassName_ (element, fullscreen) {\n    var activeClassName = this.cssClassName_ + '-true';\n    var inactiveClassName = this.cssClassName_ + '-false';\n    var nextClassName = fullscreen ? activeClassName : inactiveClassName;\n    element.classList.remove(activeClassName);\n    element.classList.remove(inactiveClassName);\n    element.classList.add(nextClassName);\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  FullScreen.prototype.setMap = function setMap (map) {\n    Control.prototype.setMap.call(this, map);\n    if (map) {\n      this.listenerKeys.push(listen(document,\n        getChangeType(),\n        this.handleFullScreenChange_, this)\n      );\n    }\n  };\n\n  return FullScreen;\n}(Control));\n\n\n/**\n * @return {boolean} Fullscreen is supported by the current platform.\n */\nfunction isFullScreenSupported() {\n  var body = document.body;\n  return !!(\n    body.webkitRequestFullscreen ||\n    (body.mozRequestFullScreen && document.mozFullScreenEnabled) ||\n    (body.msRequestFullscreen && document.msFullscreenEnabled) ||\n    (body.requestFullscreen && document.fullscreenEnabled)\n  );\n}\n\n/**\n * @return {boolean} Element is currently in fullscreen.\n */\nfunction isFullScreen() {\n  return !!(\n    document.webkitIsFullScreen || document.mozFullScreen ||\n    document.msFullscreenElement || document.fullscreenElement\n  );\n}\n\n/**\n * Request to fullscreen an element.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreen(element) {\n  if (element.requestFullscreen) {\n    element.requestFullscreen();\n  } else if (element.msRequestFullscreen) {\n    element.msRequestFullscreen();\n  } else if (element.mozRequestFullScreen) {\n    element.mozRequestFullScreen();\n  } else if (element.webkitRequestFullscreen) {\n    element.webkitRequestFullscreen();\n  }\n}\n\n/**\n * Request to fullscreen an element with keyboard input.\n * @param {HTMLElement} element Element to request fullscreen\n */\nfunction requestFullScreenWithKeys(element) {\n  if (element.mozRequestFullScreenWithKeys) {\n    element.mozRequestFullScreenWithKeys();\n  } else if (element.webkitRequestFullscreen) {\n    element.webkitRequestFullscreen();\n  } else {\n    requestFullScreen(element);\n  }\n}\n\n/**\n * Exit fullscreen.\n */\nfunction exitFullScreen() {\n  if (document.exitFullscreen) {\n    document.exitFullscreen();\n  } else if (document.msExitFullscreen) {\n    document.msExitFullscreen();\n  } else if (document.mozCancelFullScreen) {\n    document.mozCancelFullScreen();\n  } else if (document.webkitExitFullscreen) {\n    document.webkitExitFullscreen();\n  }\n}\n\nexport default FullScreen;\n\n//# sourceMappingURL=FullScreen.js.map","/**\n * @module ol/control/MousePosition\n */\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {getChangeEventType} from '../Object.js';\nimport Control from './Control.js';\nimport {getTransformFromProjections, identityTransform, get as getProjection} from '../proj.js';\n\n\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [undefinedHTML='&#160;'] Markup to show when coordinates are not\n * available (e.g. when the pointer leaves the map viewport).  By default, the last position\n * will be replaced with `'&#160;'` (`&nbsp;`) when the pointer leaves the viewport.  To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n\n\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /*@__PURE__*/(function (Control) {\n  function MousePosition(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    var element = document.createElement('div');\n    element.className = options.className !== undefined ? options.className : 'ol-mouse-position';\n\n    Control.call(this, {\n      element: element,\n      render: options.render || render,\n      target: options.target\n    });\n\n    listen(this,\n      getChangeEventType(PROJECTION),\n      this.handleProjectionChanged_, this);\n\n    if (options.coordinateFormat) {\n      this.setCoordinateFormat(options.coordinateFormat);\n    }\n    if (options.projection) {\n      this.setProjection(options.projection);\n    }\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.undefinedHTML_ = options.undefinedHTML !== undefined ? options.undefinedHTML : '&#160;';\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderOnMouseOut_ = !!this.undefinedHTML_;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.renderedHTML_ = element.innerHTML;\n\n    /**\n     * @private\n     * @type {import(\"../proj/Projection.js\").default}\n     */\n    this.mapProjection_ = null;\n\n    /**\n     * @private\n     * @type {?import(\"../proj.js\").TransformFunction}\n     */\n    this.transform_ = null;\n\n    /**\n     * @private\n     * @type {import(\"../pixel.js\").Pixel}\n     */\n    this.lastMouseMovePixel_ = null;\n\n  }\n\n  if ( Control ) MousePosition.__proto__ = Control;\n  MousePosition.prototype = Object.create( Control && Control.prototype );\n  MousePosition.prototype.constructor = MousePosition;\n\n  /**\n   * @private\n   */\n  MousePosition.prototype.handleProjectionChanged_ = function handleProjectionChanged_ () {\n    this.transform_ = null;\n  };\n\n  /**\n   * Return the coordinate format type used to render the current position or\n   * undefined.\n   * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n   *     position in.\n   * @observable\n   * @api\n   */\n  MousePosition.prototype.getCoordinateFormat = function getCoordinateFormat () {\n    return (\n      /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT))\n    );\n  };\n\n  /**\n   * Return the projection that is used to report the mouse position.\n   * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n   *     position in.\n   * @observable\n   * @api\n   */\n  MousePosition.prototype.getProjection = function getProjection () {\n    return (\n      /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION))\n    );\n  };\n\n  /**\n   * @param {Event} event Browser event.\n   * @protected\n   */\n  MousePosition.prototype.handleMouseMove = function handleMouseMove (event) {\n    var map = this.getMap();\n    this.lastMouseMovePixel_ = map.getEventPixel(event);\n    this.updateHTML_(this.lastMouseMovePixel_);\n  };\n\n  /**\n   * @param {Event} event Browser event.\n   * @protected\n   */\n  MousePosition.prototype.handleMouseOut = function handleMouseOut (event) {\n    this.updateHTML_(null);\n    this.lastMouseMovePixel_ = null;\n  };\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  MousePosition.prototype.setMap = function setMap (map) {\n    Control.prototype.setMap.call(this, map);\n    if (map) {\n      var viewport = map.getViewport();\n      this.listenerKeys.push(\n        listen(viewport, EventType.MOUSEMOVE, this.handleMouseMove, this),\n        listen(viewport, EventType.TOUCHSTART, this.handleMouseMove, this)\n      );\n      if (this.renderOnMouseOut_) {\n        this.listenerKeys.push(\n          listen(viewport, EventType.MOUSEOUT, this.handleMouseOut, this),\n          listen(viewport, EventType.TOUCHEND, this.handleMouseOut, this)\n        );\n      }\n    }\n  };\n\n  /**\n   * Set the coordinate format type used to render the current position.\n   * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n   *     position in.\n   * @observable\n   * @api\n   */\n  MousePosition.prototype.setCoordinateFormat = function setCoordinateFormat (format) {\n    this.set(COORDINATE_FORMAT, format);\n  };\n\n  /**\n   * Set the projection that is used to report the mouse position.\n   * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n   *     position in.\n   * @observable\n   * @api\n   */\n  MousePosition.prototype.setProjection = function setProjection (projection) {\n    this.set(PROJECTION, getProjection(projection));\n  };\n\n  /**\n   * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n   * @private\n   */\n  MousePosition.prototype.updateHTML_ = function updateHTML_ (pixel) {\n    var html = this.undefinedHTML_;\n    if (pixel && this.mapProjection_) {\n      if (!this.transform_) {\n        var projection = this.getProjection();\n        if (projection) {\n          this.transform_ = getTransformFromProjections(\n            this.mapProjection_, projection);\n        } else {\n          this.transform_ = identityTransform;\n        }\n      }\n      var map = this.getMap();\n      var coordinate = map.getCoordinateFromPixel(pixel);\n      if (coordinate) {\n        this.transform_(coordinate, coordinate);\n        var coordinateFormat = this.getCoordinateFormat();\n        if (coordinateFormat) {\n          html = coordinateFormat(coordinate);\n        } else {\n          html = coordinate.toString();\n        }\n      }\n    }\n    if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n      this.element.innerHTML = html;\n      this.renderedHTML_ = html;\n    }\n  };\n\n  return MousePosition;\n}(Control));\n\n\n/**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {MousePosition}\n * @api\n */\nexport function render(mapEvent) {\n  var frameState = mapEvent.frameState;\n  if (!frameState) {\n    this.mapProjection_ = null;\n  } else {\n    if (this.mapProjection_ != frameState.viewState.projection) {\n      this.mapProjection_ = frameState.viewState.projection;\n      this.transform_ = null;\n    }\n  }\n}\n\n\nexport default MousePosition;\n\n//# sourceMappingURL=MousePosition.js.map","/**\n * @module ol/control/OverviewMap\n */\nimport Collection from '../Collection.js';\nimport Map from '../Map.js';\nimport MapEventType from '../MapEventType.js';\nimport MapProperty from '../MapProperty.js';\nimport {getChangeEventType} from '../Object.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport Overlay from '../Overlay.js';\nimport OverlayPositioning from '../OverlayPositioning.js';\nimport ViewProperty from '../ViewProperty.js';\nimport Control from './Control.js';\nimport {rotate as rotateCoordinate, add as addCoordinate} from '../coordinate.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE, CLASS_COLLAPSED} from '../css.js';\nimport {replaceNode} from '../dom.js';\nimport {listen, listenOnce, unlisten} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport {containsExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight, scaleFromCenter} from '../extent.js';\n\n\n/**\n * Maximum width and/or height extent ratio that determines when the overview\n * map should be zoomed out.\n * @type {number}\n */\nvar MAX_RATIO = 0.75;\n\n\n/**\n * Minimum width and/or height extent ratio that determines when the overview\n * map should be zoomed in.\n * @type {number}\n */\nvar MIN_RATIO = 0.1;\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-overviewmap'] CSS class name.\n * @property {boolean} [collapsed=true] Whether the control should start collapsed or not (expanded).\n * @property {string|HTMLElement} [collapseLabel='«'] Text label to use for the\n * expanded overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {boolean} [collapsible=true] Whether the control can be collapsed or not.\n * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed\n * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {Array<import(\"../layer/Layer.js\").default>|import(\"../Collection.js\").default<import(\"../layer/Layer.js\").default>} [layers]\n * Layers for the overview map. If not set, then all main map layers are used\n * instead.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string} [tipLabel='Overview map'] Text label to use for the button tip.\n * @property {import(\"../View.js\").default} [view] Custom view for the overview map. If not provided,\n * a default view with an EPSG:3857 projection will be used.\n */\n\n\n/**\n * Create a new control with a map acting as an overview map for an other\n * defined map.\n *\n * @api\n */\nvar OverviewMap = /*@__PURE__*/(function (Control) {\n  function OverviewMap(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      render: options.render || render,\n      target: options.target\n    });\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.collapsed_ = options.collapsed !== undefined ? options.collapsed : true;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.collapsible_ = options.collapsible !== undefined ?\n      options.collapsible : true;\n\n    if (!this.collapsible_) {\n      this.collapsed_ = false;\n    }\n\n    var className = options.className !== undefined ? options.className : 'ol-overviewmap';\n\n    var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Overview map';\n\n    var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\u00AB';\n\n    if (typeof collapseLabel === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.collapseLabel_ = document.createElement('span');\n      this.collapseLabel_.textContent = collapseLabel;\n    } else {\n      this.collapseLabel_ = collapseLabel;\n    }\n\n    var label = options.label !== undefined ? options.label : '\\u00BB';\n\n\n    if (typeof label === 'string') {\n      /**\n       * @private\n       * @type {HTMLElement}\n       */\n      this.label_ = document.createElement('span');\n      this.label_.textContent = label;\n    } else {\n      this.label_ = label;\n    }\n\n    var activeLabel = (this.collapsible_ && !this.collapsed_) ?\n      this.collapseLabel_ : this.label_;\n    var button = document.createElement('button');\n    button.setAttribute('type', 'button');\n    button.title = tipLabel;\n    button.appendChild(activeLabel);\n\n    listen(button, EventType.CLICK,\n      this.handleClick_, this);\n\n    /**\n     * @type {HTMLElement}\n     * @private\n     */\n    this.ovmapDiv_ = document.createElement('div');\n    this.ovmapDiv_.className = 'ol-overviewmap-map';\n\n    /**\n     * @type {import(\"../Map.js\").default}\n     * @private\n     */\n    this.ovmap_ = new Map({\n      controls: new Collection(),\n      interactions: new Collection(),\n      view: options.view\n    });\n    var ovmap = this.ovmap_;\n\n    if (options.layers) {\n      /** @type {Array<import(\"../layer/Layer.js\").default>} */ (options.layers).forEach(\n        /**\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         */\n        (function(layer) {\n          ovmap.addLayer(layer);\n        }).bind(this));\n    }\n\n    var box = document.createElement('div');\n    box.className = 'ol-overviewmap-box';\n    box.style.boxSizing = 'border-box';\n\n    /**\n     * @type {import(\"../Overlay.js\").default}\n     * @private\n     */\n    this.boxOverlay_ = new Overlay({\n      position: [0, 0],\n      positioning: OverlayPositioning.BOTTOM_LEFT,\n      element: box\n    });\n    this.ovmap_.addOverlay(this.boxOverlay_);\n\n    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL +\n        (this.collapsed_ && this.collapsible_ ? ' ' + CLASS_COLLAPSED : '') +\n        (this.collapsible_ ? '' : ' ol-uncollapsible');\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(this.ovmapDiv_);\n    element.appendChild(button);\n\n    /* Interactive map */\n\n    var scope = this;\n\n    var overlay = this.boxOverlay_;\n    var overlayBox = this.boxOverlay_.getElement();\n\n    /* Functions definition */\n\n    var computeDesiredMousePosition = function(mousePosition) {\n      return {\n        clientX: mousePosition.clientX - (overlayBox.offsetWidth / 2),\n        clientY: mousePosition.clientY + (overlayBox.offsetHeight / 2)\n      };\n    };\n\n    var move = function(event) {\n      var position = /** @type {?} */ (computeDesiredMousePosition(event));\n      var coordinates = ovmap.getEventCoordinate(/** @type {Event} */ (position));\n\n      overlay.setPosition(coordinates);\n    };\n\n    var endMoving = function(event) {\n      var coordinates = ovmap.getEventCoordinate(event);\n\n      scope.getMap().getView().setCenter(coordinates);\n\n      window.removeEventListener('mousemove', move);\n      window.removeEventListener('mouseup', endMoving);\n    };\n\n    /* Binding */\n\n    overlayBox.addEventListener('mousedown', function() {\n      window.addEventListener('mousemove', move);\n      window.addEventListener('mouseup', endMoving);\n    });\n  }\n\n  if ( Control ) OverviewMap.__proto__ = Control;\n  OverviewMap.prototype = Object.create( Control && Control.prototype );\n  OverviewMap.prototype.constructor = OverviewMap;\n\n  /**\n   * @inheritDoc\n   * @api\n   */\n  OverviewMap.prototype.setMap = function setMap (map) {\n    var oldMap = this.getMap();\n    if (map === oldMap) {\n      return;\n    }\n    if (oldMap) {\n      var oldView = oldMap.getView();\n      if (oldView) {\n        this.unbindView_(oldView);\n      }\n      this.ovmap_.setTarget(null);\n    }\n    Control.prototype.setMap.call(this, map);\n\n    if (map) {\n      this.ovmap_.setTarget(this.ovmapDiv_);\n      this.listenerKeys.push(listen(\n        map, ObjectEventType.PROPERTYCHANGE,\n        this.handleMapPropertyChange_, this));\n\n      // TODO: to really support map switching, this would need to be reworked\n      if (this.ovmap_.getLayers().getLength() === 0) {\n        this.ovmap_.setLayerGroup(map.getLayerGroup());\n      }\n\n      var view = map.getView();\n      if (view) {\n        this.bindView_(view);\n        if (view.isDef()) {\n          this.ovmap_.updateSize();\n          this.resetExtent_();\n        }\n      }\n    }\n  };\n\n  /**\n   * Handle map property changes.  This only deals with changes to the map's view.\n   * @param {import(\"../Object.js\").ObjectEvent} event The propertychange event.\n   * @private\n   */\n  OverviewMap.prototype.handleMapPropertyChange_ = function handleMapPropertyChange_ (event) {\n    if (event.key === MapProperty.VIEW) {\n      var oldView = /** @type {import(\"../View.js\").default} */ (event.oldValue);\n      if (oldView) {\n        this.unbindView_(oldView);\n      }\n      var newView = this.getMap().getView();\n      this.bindView_(newView);\n    }\n  };\n\n  /**\n   * Register listeners for view property changes.\n   * @param {import(\"../View.js\").default} view The view.\n   * @private\n   */\n  OverviewMap.prototype.bindView_ = function bindView_ (view) {\n    listen(view,\n      getChangeEventType(ViewProperty.ROTATION),\n      this.handleRotationChanged_, this);\n  };\n\n  /**\n   * Unregister listeners for view property changes.\n   * @param {import(\"../View.js\").default} view The view.\n   * @private\n   */\n  OverviewMap.prototype.unbindView_ = function unbindView_ (view) {\n    unlisten(view,\n      getChangeEventType(ViewProperty.ROTATION),\n      this.handleRotationChanged_, this);\n  };\n\n  /**\n   * Handle rotation changes to the main map.\n   * TODO: This should rotate the extent rectrangle instead of the\n   * overview map's view.\n   * @private\n   */\n  OverviewMap.prototype.handleRotationChanged_ = function handleRotationChanged_ () {\n    this.ovmap_.getView().setRotation(this.getMap().getView().getRotation());\n  };\n\n  /**\n   * Reset the overview map extent if the box size (width or\n   * height) is less than the size of the overview map size times minRatio\n   * or is greater than the size of the overview size times maxRatio.\n   *\n   * If the map extent was not reset, the box size can fits in the defined\n   * ratio sizes. This method then checks if is contained inside the overview\n   * map current extent. If not, recenter the overview map to the current\n   * main map center location.\n   * @private\n   */\n  OverviewMap.prototype.validateExtent_ = function validateExtent_ () {\n    var map = this.getMap();\n    var ovmap = this.ovmap_;\n\n    if (!map.isRendered() || !ovmap.isRendered()) {\n      return;\n    }\n\n    var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n    var view = map.getView();\n    var extent = view.calculateExtent(mapSize);\n\n    var ovmapSize = /** @type {import(\"../size.js\").Size} */ (ovmap.getSize());\n\n    var ovview = ovmap.getView();\n    var ovextent = ovview.calculateExtent(ovmapSize);\n\n    var topLeftPixel =\n        ovmap.getPixelFromCoordinate(getTopLeft(extent));\n    var bottomRightPixel =\n        ovmap.getPixelFromCoordinate(getBottomRight(extent));\n\n    var boxWidth = Math.abs(topLeftPixel[0] - bottomRightPixel[0]);\n    var boxHeight = Math.abs(topLeftPixel[1] - bottomRightPixel[1]);\n\n    var ovmapWidth = ovmapSize[0];\n    var ovmapHeight = ovmapSize[1];\n\n    if (boxWidth < ovmapWidth * MIN_RATIO ||\n        boxHeight < ovmapHeight * MIN_RATIO ||\n        boxWidth > ovmapWidth * MAX_RATIO ||\n        boxHeight > ovmapHeight * MAX_RATIO) {\n      this.resetExtent_();\n    } else if (!containsExtent(ovextent, extent)) {\n      this.recenter_();\n    }\n  };\n\n  /**\n   * Reset the overview map extent to half calculated min and max ratio times\n   * the extent of the main map.\n   * @private\n   */\n  OverviewMap.prototype.resetExtent_ = function resetExtent_ () {\n    if (MAX_RATIO === 0 || MIN_RATIO === 0) {\n      return;\n    }\n\n    var map = this.getMap();\n    var ovmap = this.ovmap_;\n\n    var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n    var view = map.getView();\n    var extent = view.calculateExtent(mapSize);\n\n    var ovview = ovmap.getView();\n\n    // get how many times the current map overview could hold different\n    // box sizes using the min and max ratio, pick the step in the middle used\n    // to calculate the extent from the main map to set it to the overview map,\n    var steps = Math.log(\n      MAX_RATIO / MIN_RATIO) / Math.LN2;\n    var ratio = 1 / (Math.pow(2, steps / 2) * MIN_RATIO);\n    scaleFromCenter(extent, ratio);\n    ovview.fit(extent);\n  };\n\n  /**\n   * Set the center of the overview map to the map center without changing its\n   * resolution.\n   * @private\n   */\n  OverviewMap.prototype.recenter_ = function recenter_ () {\n    var map = this.getMap();\n    var ovmap = this.ovmap_;\n\n    var view = map.getView();\n\n    var ovview = ovmap.getView();\n\n    ovview.setCenter(view.getCenter());\n  };\n\n  /**\n   * Update the box using the main map extent\n   * @private\n   */\n  OverviewMap.prototype.updateBox_ = function updateBox_ () {\n    var map = this.getMap();\n    var ovmap = this.ovmap_;\n\n    if (!map.isRendered() || !ovmap.isRendered()) {\n      return;\n    }\n\n    var mapSize = /** @type {import(\"../size.js\").Size} */ (map.getSize());\n\n    var view = map.getView();\n\n    var ovview = ovmap.getView();\n\n    var rotation = view.getRotation();\n\n    var overlay = this.boxOverlay_;\n    var box = this.boxOverlay_.getElement();\n    var extent = view.calculateExtent(mapSize);\n    var ovresolution = ovview.getResolution();\n    var bottomLeft = getBottomLeft(extent);\n    var topRight = getTopRight(extent);\n\n    // set position using bottom left coordinates\n    var rotateBottomLeft = this.calculateCoordinateRotate_(rotation, bottomLeft);\n    overlay.setPosition(rotateBottomLeft);\n\n    // set box size calculated from map extent size and overview map resolution\n    if (box) {\n      box.style.width = Math.abs((bottomLeft[0] - topRight[0]) / ovresolution) + 'px';\n      box.style.height = Math.abs((topRight[1] - bottomLeft[1]) / ovresolution) + 'px';\n    }\n  };\n\n  /**\n   * @param {number} rotation Target rotation.\n   * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n   * @return {import(\"../coordinate.js\").Coordinate|undefined} Coordinate for rotation and center anchor.\n   * @private\n   */\n  OverviewMap.prototype.calculateCoordinateRotate_ = function calculateCoordinateRotate_ (rotation, coordinate) {\n    var coordinateRotate;\n\n    var map = this.getMap();\n    var view = map.getView();\n\n    var currentCenter = view.getCenter();\n\n    if (currentCenter) {\n      coordinateRotate = [\n        coordinate[0] - currentCenter[0],\n        coordinate[1] - currentCenter[1]\n      ];\n      rotateCoordinate(coordinateRotate, rotation);\n      addCoordinate(coordinateRotate, currentCenter);\n    }\n    return coordinateRotate;\n  };\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  OverviewMap.prototype.handleClick_ = function handleClick_ (event) {\n    event.preventDefault();\n    this.handleToggle_();\n  };\n\n  /**\n   * @private\n   */\n  OverviewMap.prototype.handleToggle_ = function handleToggle_ () {\n    this.element.classList.toggle(CLASS_COLLAPSED);\n    if (this.collapsed_) {\n      replaceNode(this.collapseLabel_, this.label_);\n    } else {\n      replaceNode(this.label_, this.collapseLabel_);\n    }\n    this.collapsed_ = !this.collapsed_;\n\n    // manage overview map if it had not been rendered before and control\n    // is expanded\n    var ovmap = this.ovmap_;\n    if (!this.collapsed_ && !ovmap.isRendered()) {\n      ovmap.updateSize();\n      this.resetExtent_();\n      listenOnce(ovmap, MapEventType.POSTRENDER,\n        function(event) {\n          this.updateBox_();\n        },\n        this);\n    }\n  };\n\n  /**\n   * Return `true` if the overview map is collapsible, `false` otherwise.\n   * @return {boolean} True if the widget is collapsible.\n   * @api\n   */\n  OverviewMap.prototype.getCollapsible = function getCollapsible () {\n    return this.collapsible_;\n  };\n\n  /**\n   * Set whether the overview map should be collapsible.\n   * @param {boolean} collapsible True if the widget is collapsible.\n   * @api\n   */\n  OverviewMap.prototype.setCollapsible = function setCollapsible (collapsible) {\n    if (this.collapsible_ === collapsible) {\n      return;\n    }\n    this.collapsible_ = collapsible;\n    this.element.classList.toggle('ol-uncollapsible');\n    if (!collapsible && this.collapsed_) {\n      this.handleToggle_();\n    }\n  };\n\n  /**\n   * Collapse or expand the overview map according to the passed parameter. Will\n   * not do anything if the overview map isn't collapsible or if the current\n   * collapsed state is already the one requested.\n   * @param {boolean} collapsed True if the widget is collapsed.\n   * @api\n   */\n  OverviewMap.prototype.setCollapsed = function setCollapsed (collapsed) {\n    if (!this.collapsible_ || this.collapsed_ === collapsed) {\n      return;\n    }\n    this.handleToggle_();\n  };\n\n  /**\n   * Determine if the overview map is collapsed.\n   * @return {boolean} The overview map is collapsed.\n   * @api\n   */\n  OverviewMap.prototype.getCollapsed = function getCollapsed () {\n    return this.collapsed_;\n  };\n\n  /**\n   * Return the overview map.\n   * @return {import(\"../PluggableMap.js\").default} Overview map.\n   * @api\n   */\n  OverviewMap.prototype.getOverviewMap = function getOverviewMap () {\n    return this.ovmap_;\n  };\n\n  return OverviewMap;\n}(Control));\n\n\n/**\n * Update the overview map element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {OverviewMap}\n * @api\n */\nexport function render(mapEvent) {\n  this.validateExtent_();\n  this.updateBox_();\n}\n\n\nexport default OverviewMap;\n\n//# sourceMappingURL=OverviewMap.js.map","/**\n * @module ol/control/ScaleLine\n */\nimport {getChangeEventType} from '../Object.js';\nimport {assert} from '../asserts.js';\nimport Control from './Control.js';\nimport {CLASS_UNSELECTABLE} from '../css.js';\nimport {listen} from '../events.js';\nimport {getPointResolution, METERS_PER_UNIT} from '../proj.js';\nimport ProjUnits from '../proj/Units.js';\n\n\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nexport var Units = {\n  DEGREES: 'degrees',\n  IMPERIAL: 'imperial',\n  NAUTICAL: 'nautical',\n  METRIC: 'metric',\n  US: 'us'\n};\n\n\n/**\n * @const\n * @type {Array<number>}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {Units|string} [units='metric'] Units.\n */\n\n\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n *\n * @api\n */\nvar ScaleLine = /*@__PURE__*/(function (Control) {\n  function ScaleLine(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    var className = options.className !== undefined ? options.className : 'ol-scale-line';\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      render: options.render || render,\n      target: options.target\n    });\n\n    /**\n     * @private\n     * @type {HTMLElement}\n     */\n    this.innerElement_ = document.createElement('div');\n    this.innerElement_.className = className + '-inner';\n\n    this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n    this.element.appendChild(this.innerElement_);\n\n    /**\n     * @private\n     * @type {?import(\"../View.js\").State}\n     */\n    this.viewState_ = null;\n\n    /**\n     * @private\n     * @type {number}\n     */\n    this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n\n    /**\n     * @private\n     * @type {boolean}\n     */\n    this.renderedVisible_ = false;\n\n    /**\n     * @private\n     * @type {number|undefined}\n     */\n    this.renderedWidth_ = undefined;\n\n    /**\n     * @private\n     * @type {string}\n     */\n    this.renderedHTML_ = '';\n\n    listen(\n      this, getChangeEventType(UNITS_PROP),\n      this.handleUnitsChanged_, this);\n\n    this.setUnits(/** @type {Units} */ (options.units) || Units.METRIC);\n\n  }\n\n  if ( Control ) ScaleLine.__proto__ = Control;\n  ScaleLine.prototype = Object.create( Control && Control.prototype );\n  ScaleLine.prototype.constructor = ScaleLine;\n\n  /**\n   * Return the units to use in the scale line.\n   * @return {Units} The units\n   * to use in the scale line.\n   * @observable\n   * @api\n   */\n  ScaleLine.prototype.getUnits = function getUnits () {\n    return this.get(UNITS_PROP);\n  };\n\n  /**\n   * @private\n   */\n  ScaleLine.prototype.handleUnitsChanged_ = function handleUnitsChanged_ () {\n    this.updateElement_();\n  };\n\n  /**\n   * Set the units to use in the scale line.\n   * @param {Units} units The units to use in the scale line.\n   * @observable\n   * @api\n   */\n  ScaleLine.prototype.setUnits = function setUnits (units) {\n    this.set(UNITS_PROP, units);\n  };\n\n  /**\n   * @private\n   */\n  ScaleLine.prototype.updateElement_ = function updateElement_ () {\n    var viewState = this.viewState_;\n\n    if (!viewState) {\n      if (this.renderedVisible_) {\n        this.element.style.display = 'none';\n        this.renderedVisible_ = false;\n      }\n      return;\n    }\n\n    var center = viewState.center;\n    var projection = viewState.projection;\n    var units = this.getUnits();\n    var pointResolutionUnits = units == Units.DEGREES ?\n      ProjUnits.DEGREES :\n      ProjUnits.METERS;\n    var pointResolution =\n        getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n    if (projection.getUnits() != ProjUnits.DEGREES && projection.getMetersPerUnit()\n      && pointResolutionUnits == ProjUnits.METERS) {\n      pointResolution *= projection.getMetersPerUnit();\n    }\n\n    var nominalCount = this.minWidth_ * pointResolution;\n    var suffix = '';\n    if (units == Units.DEGREES) {\n      var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n      if (projection.getUnits() == ProjUnits.DEGREES) {\n        nominalCount *= metersPerDegree;\n      } else {\n        pointResolution /= metersPerDegree;\n      }\n      if (nominalCount < metersPerDegree / 60) {\n        suffix = '\\u2033'; // seconds\n        pointResolution *= 3600;\n      } else if (nominalCount < metersPerDegree) {\n        suffix = '\\u2032'; // minutes\n        pointResolution *= 60;\n      } else {\n        suffix = '\\u00b0'; // degrees\n      }\n    } else if (units == Units.IMPERIAL) {\n      if (nominalCount < 0.9144) {\n        suffix = 'in';\n        pointResolution /= 0.0254;\n      } else if (nominalCount < 1609.344) {\n        suffix = 'ft';\n        pointResolution /= 0.3048;\n      } else {\n        suffix = 'mi';\n        pointResolution /= 1609.344;\n      }\n    } else if (units == Units.NAUTICAL) {\n      pointResolution /= 1852;\n      suffix = 'nm';\n    } else if (units == Units.METRIC) {\n      if (nominalCount < 0.001) {\n        suffix = 'μm';\n        pointResolution *= 1000000;\n      } else if (nominalCount < 1) {\n        suffix = 'mm';\n        pointResolution *= 1000;\n      } else if (nominalCount < 1000) {\n        suffix = 'm';\n      } else {\n        suffix = 'km';\n        pointResolution /= 1000;\n      }\n    } else if (units == Units.US) {\n      if (nominalCount < 0.9144) {\n        suffix = 'in';\n        pointResolution *= 39.37;\n      } else if (nominalCount < 1609.344) {\n        suffix = 'ft';\n        pointResolution /= 0.30480061;\n      } else {\n        suffix = 'mi';\n        pointResolution /= 1609.3472;\n      }\n    } else {\n      assert(false, 33); // Invalid units\n    }\n\n    var i = 3 * Math.floor(\n      Math.log(this.minWidth_ * pointResolution) / Math.log(10));\n    var count, width;\n    while (true) {\n      count = LEADING_DIGITS[((i % 3) + 3) % 3] *\n          Math.pow(10, Math.floor(i / 3));\n      width = Math.round(count / pointResolution);\n      if (isNaN(width)) {\n        this.element.style.display = 'none';\n        this.renderedVisible_ = false;\n        return;\n      } else if (width >= this.minWidth_) {\n        break;\n      }\n      ++i;\n    }\n\n    var html = count + ' ' + suffix;\n    if (this.renderedHTML_ != html) {\n      this.innerElement_.innerHTML = html;\n      this.renderedHTML_ = html;\n    }\n\n    if (this.renderedWidth_ != width) {\n      this.innerElement_.style.width = width + 'px';\n      this.renderedWidth_ = width;\n    }\n\n    if (!this.renderedVisible_) {\n      this.element.style.display = '';\n      this.renderedVisible_ = true;\n    }\n\n  };\n\n  return ScaleLine;\n}(Control));\n\n\n/**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {ScaleLine}\n * @api\n */\nexport function render(mapEvent) {\n  var frameState = mapEvent.frameState;\n  if (!frameState) {\n    this.viewState_ = null;\n  } else {\n    this.viewState_ = frameState.viewState;\n  }\n  this.updateElement_();\n}\n\n\nexport default ScaleLine;\n\n//# sourceMappingURL=ScaleLine.js.map","/**\n * @module ol/control/ZoomSlider\n */\nimport ViewHint from '../ViewHint.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\nimport {easeOut} from '../easing.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {stopPropagation} from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {clamp} from '../math.js';\nimport PointerEventType from '../pointer/EventType.js';\nimport PointerEventHandler from '../pointer/PointerEventHandler.js';\n\n\n/**\n * The enum for available directions.\n *\n * @enum {number}\n */\nvar Direction = {\n  VERTICAL: 0,\n  HORIZONTAL: 1\n};\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoomslider'] CSS class name.\n * @property {number} [duration=200] Animation duration in milliseconds.\n * @property {function(import(\"../MapEvent.js\").default)} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n */\n\n\n/**\n * @classdesc\n * A slider type of control for zooming.\n *\n * Example:\n *\n *     map.addControl(new ZoomSlider());\n *\n * @api\n */\nvar ZoomSlider = /*@__PURE__*/(function (Control) {\n  function ZoomSlider(opt_options) {\n\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      render: options.render || render\n    });\n\n    /**\n      * @type {!Array.<import(\"../events.js\").EventsKey>}\n      * @private\n      */\n    this.dragListenerKeys_ = [];\n\n    /**\n     * Will hold the current resolution of the view.\n     *\n     * @type {number|undefined}\n     * @private\n     */\n    this.currentResolution_ = undefined;\n\n    /**\n     * The direction of the slider. Will be determined from actual display of the\n     * container and defaults to Direction.VERTICAL.\n     *\n     * @type {Direction}\n     * @private\n     */\n    this.direction_ = Direction.VERTICAL;\n\n    /**\n     * @type {boolean}\n     * @private\n     */\n    this.dragging_;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.heightLimit_ = 0;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.widthLimit_ = 0;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.previousX_;\n\n    /**\n     * @type {number|undefined}\n     * @private\n     */\n    this.previousY_;\n\n    /**\n     * The calculated thumb size (border box plus margins).  Set when initSlider_\n     * is called.\n     * @type {import(\"../size.js\").Size}\n     * @private\n     */\n    this.thumbSize_ = null;\n\n    /**\n     * Whether the slider is initialized.\n     * @type {boolean}\n     * @private\n     */\n    this.sliderInitialized_ = false;\n\n    /**\n     * @type {number}\n     * @private\n     */\n    this.duration_ = options.duration !== undefined ? options.duration : 200;\n\n    var className = options.className !== undefined ? options.className : 'ol-zoomslider';\n    var thumbElement = document.createElement('button');\n    thumbElement.setAttribute('type', 'button');\n    thumbElement.className = className + '-thumb ' + CLASS_UNSELECTABLE;\n    var containerElement = this.element;\n    containerElement.className = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    containerElement.appendChild(thumbElement);\n    /**\n     * @type {PointerEventHandler}\n     * @private\n     */\n    this.dragger_ = new PointerEventHandler(containerElement);\n\n    listen(this.dragger_, PointerEventType.POINTERDOWN,\n      this.handleDraggerStart_, this);\n    listen(this.dragger_, PointerEventType.POINTERMOVE,\n      this.handleDraggerDrag_, this);\n    listen(this.dragger_, PointerEventType.POINTERUP,\n      this.handleDraggerEnd_, this);\n\n    listen(containerElement, EventType.CLICK, this.handleContainerClick_, this);\n    listen(thumbElement, EventType.CLICK, stopPropagation);\n  }\n\n  if ( Control ) ZoomSlider.__proto__ = Control;\n  ZoomSlider.prototype = Object.create( Control && Control.prototype );\n  ZoomSlider.prototype.constructor = ZoomSlider;\n\n  /**\n   * @inheritDoc\n   */\n  ZoomSlider.prototype.disposeInternal = function disposeInternal () {\n    this.dragger_.dispose();\n    Control.prototype.disposeInternal.call(this);\n  };\n\n  /**\n   * @inheritDoc\n   */\n  ZoomSlider.prototype.setMap = function setMap (map) {\n    Control.prototype.setMap.call(this, map);\n    if (map) {\n      map.render();\n    }\n  };\n\n  /**\n   * Initializes the slider element. This will determine and set this controls\n   * direction_ and also constrain the dragging of the thumb to always be within\n   * the bounds of the container.\n   *\n   * @private\n   */\n  ZoomSlider.prototype.initSlider_ = function initSlider_ () {\n    var container = this.element;\n    var containerSize = {\n      width: container.offsetWidth, height: container.offsetHeight\n    };\n\n    var thumb = /** @type {HTMLElement} */ (container.firstElementChild);\n    var computedStyle = getComputedStyle(thumb);\n    var thumbWidth = thumb.offsetWidth +\n        parseFloat(computedStyle['marginRight']) +\n        parseFloat(computedStyle['marginLeft']);\n    var thumbHeight = thumb.offsetHeight +\n        parseFloat(computedStyle['marginTop']) +\n        parseFloat(computedStyle['marginBottom']);\n    this.thumbSize_ = [thumbWidth, thumbHeight];\n\n    if (containerSize.width > containerSize.height) {\n      this.direction_ = Direction.HORIZONTAL;\n      this.widthLimit_ = containerSize.width - thumbWidth;\n    } else {\n      this.direction_ = Direction.VERTICAL;\n      this.heightLimit_ = containerSize.height - thumbHeight;\n    }\n    this.sliderInitialized_ = true;\n  };\n\n  /**\n   * @param {MouseEvent} event The browser event to handle.\n   * @private\n   */\n  ZoomSlider.prototype.handleContainerClick_ = function handleContainerClick_ (event) {\n    var view = this.getMap().getView();\n\n    var relativePosition = this.getRelativePosition_(\n      event.offsetX - this.thumbSize_[0] / 2,\n      event.offsetY - this.thumbSize_[1] / 2);\n\n    var resolution = this.getResolutionForPosition_(relativePosition);\n\n    view.animate({\n      resolution: view.constrainResolution(resolution),\n      duration: this.duration_,\n      easing: easeOut\n    });\n  };\n\n  /**\n   * Handle dragger start events.\n   * @param {import(\"../pointer/PointerEvent.js\").default} event The drag event.\n   * @private\n   */\n  ZoomSlider.prototype.handleDraggerStart_ = function handleDraggerStart_ (event) {\n    if (!this.dragging_ && event.originalEvent.target === this.element.firstElementChild) {\n      this.getMap().getView().setHint(ViewHint.INTERACTING, 1);\n      this.previousX_ = event.clientX;\n      this.previousY_ = event.clientY;\n      this.dragging_ = true;\n\n      if (this.dragListenerKeys_.length === 0) {\n        var drag = this.handleDraggerDrag_;\n        var end = this.handleDraggerEnd_;\n        this.dragListenerKeys_.push(\n          listen(document, EventType.MOUSEMOVE, drag, this),\n          listen(document, PointerEventType.POINTERMOVE, drag, this),\n          listen(document, EventType.MOUSEUP, end, this),\n          listen(document, PointerEventType.POINTERUP, end, this)\n        );\n      }\n    }\n  };\n\n  /**\n   * Handle dragger drag events.\n   *\n   * @param {import(\"../pointer/PointerEvent.js\").default} event The drag event.\n   * @private\n   */\n  ZoomSlider.prototype.handleDraggerDrag_ = function handleDraggerDrag_ (event) {\n    if (this.dragging_) {\n      var element = /** @type {HTMLElement} */ (this.element.firstElementChild);\n      var deltaX = event.clientX - this.previousX_ + parseFloat(element.style.left);\n      var deltaY = event.clientY - this.previousY_ + parseFloat(element.style.top);\n      var relativePosition = this.getRelativePosition_(deltaX, deltaY);\n      this.currentResolution_ = this.getResolutionForPosition_(relativePosition);\n      this.getMap().getView().setResolution(this.currentResolution_);\n      this.setThumbPosition_(this.currentResolution_);\n      this.previousX_ = event.clientX;\n      this.previousY_ = event.clientY;\n    }\n  };\n\n  /**\n   * Handle dragger end events.\n   * @param {import(\"../pointer/PointerEvent.js\").default} event The drag event.\n   * @private\n   */\n  ZoomSlider.prototype.handleDraggerEnd_ = function handleDraggerEnd_ (event) {\n    if (this.dragging_) {\n      var view = this.getMap().getView();\n      view.setHint(ViewHint.INTERACTING, -1);\n\n      view.animate({\n        resolution: view.constrainResolution(this.currentResolution_),\n        duration: this.duration_,\n        easing: easeOut\n      });\n\n      this.dragging_ = false;\n      this.previousX_ = undefined;\n      this.previousY_ = undefined;\n      this.dragListenerKeys_.forEach(unlistenByKey);\n      this.dragListenerKeys_.length = 0;\n    }\n  };\n\n  /**\n   * Positions the thumb inside its container according to the given resolution.\n   *\n   * @param {number} res The res.\n   * @private\n   */\n  ZoomSlider.prototype.setThumbPosition_ = function setThumbPosition_ (res) {\n    var position = this.getPositionForResolution_(res);\n    var thumb = /** @type {HTMLElement} */ (this.element.firstElementChild);\n\n    if (this.direction_ == Direction.HORIZONTAL) {\n      thumb.style.left = this.widthLimit_ * position + 'px';\n    } else {\n      thumb.style.top = this.heightLimit_ * position + 'px';\n    }\n  };\n\n  /**\n   * Calculates the relative position of the thumb given x and y offsets.  The\n   * relative position scales from 0 to 1.  The x and y offsets are assumed to be\n   * in pixel units within the dragger limits.\n   *\n   * @param {number} x Pixel position relative to the left of the slider.\n   * @param {number} y Pixel position relative to the top of the slider.\n   * @return {number} The relative position of the thumb.\n   * @private\n   */\n  ZoomSlider.prototype.getRelativePosition_ = function getRelativePosition_ (x, y) {\n    var amount;\n    if (this.direction_ === Direction.HORIZONTAL) {\n      amount = x / this.widthLimit_;\n    } else {\n      amount = y / this.heightLimit_;\n    }\n    return clamp(amount, 0, 1);\n  };\n\n  /**\n   * Calculates the corresponding resolution of the thumb given its relative\n   * position (where 0 is the minimum and 1 is the maximum).\n   *\n   * @param {number} position The relative position of the thumb.\n   * @return {number} The corresponding resolution.\n   * @private\n   */\n  ZoomSlider.prototype.getResolutionForPosition_ = function getResolutionForPosition_ (position) {\n    var fn = this.getMap().getView().getResolutionForValueFunction();\n    return fn(1 - position);\n  };\n\n  /**\n   * Determines the relative position of the slider for the given resolution.  A\n   * relative position of 0 corresponds to the minimum view resolution.  A\n   * relative position of 1 corresponds to the maximum view resolution.\n   *\n   * @param {number} res The resolution.\n   * @return {number} The relative position value (between 0 and 1).\n   * @private\n   */\n  ZoomSlider.prototype.getPositionForResolution_ = function getPositionForResolution_ (res) {\n    var fn = this.getMap().getView().getValueForResolutionFunction();\n    return 1 - fn(res);\n  };\n\n  return ZoomSlider;\n}(Control));\n\n\n/**\n * Update the zoomslider element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @this {ZoomSlider}\n * @api\n */\nexport function render(mapEvent) {\n  if (!mapEvent.frameState) {\n    return;\n  }\n  if (!this.sliderInitialized_) {\n    this.initSlider_();\n  }\n  var res = mapEvent.frameState.viewState.resolution;\n  if (res !== this.currentResolution_) {\n    this.currentResolution_ = res;\n    this.setThumbPosition_(res);\n  }\n}\n\n\nexport default ZoomSlider;\n\n//# sourceMappingURL=ZoomSlider.js.map","/**\n * @module ol/control/ZoomToExtent\n */\nimport {listen} from '../events.js';\nimport EventType from '../events/EventType.js';\nimport Control from './Control.js';\nimport {CLASS_CONTROL, CLASS_UNSELECTABLE} from '../css.js';\n\n\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-zoom-extent'] Class name.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {string|HTMLElement} [label='E'] Text label to use for the button.\n * Instead of text, also an element (e.g. a `span` element) can be used.\n * @property {string} [tipLabel='Fit to extent'] Text label to use for the button tip.\n * @property {import(\"../extent.js\").Extent} [extent] The extent to zoom to. If undefined the validity\n * extent of the view projection is used.\n */\n\n\n/**\n * @classdesc\n * A button control which, when pressed, changes the map view to a specific\n * extent. To style this control use the css selector `.ol-zoom-extent`.\n *\n * @api\n */\nvar ZoomToExtent = /*@__PURE__*/(function (Control) {\n  function ZoomToExtent(opt_options) {\n    var options = opt_options ? opt_options : {};\n\n    Control.call(this, {\n      element: document.createElement('div'),\n      target: options.target\n    });\n\n    /**\n     * @type {import(\"../extent.js\").Extent}\n     * @protected\n     */\n    this.extent = options.extent ? options.extent : null;\n\n    var className = options.className !== undefined ? options.className : 'ol-zoom-extent';\n\n    var label = options.label !== undefined ? options.label : 'E';\n    var tipLabel = options.tipLabel !== undefined ? options.tipLabel : 'Fit to extent';\n    var button = document.createElement('button');\n    button.setAttribute('type', 'button');\n    button.title = tipLabel;\n    button.appendChild(\n      typeof label === 'string' ? document.createTextNode(label) : label\n    );\n\n    listen(button, EventType.CLICK, this.handleClick_, this);\n\n    var cssClasses = className + ' ' + CLASS_UNSELECTABLE + ' ' + CLASS_CONTROL;\n    var element = this.element;\n    element.className = cssClasses;\n    element.appendChild(button);\n  }\n\n  if ( Control ) ZoomToExtent.__proto__ = Control;\n  ZoomToExtent.prototype = Object.create( Control && Control.prototype );\n  ZoomToExtent.prototype.constructor = ZoomToExtent;\n\n  /**\n   * @param {MouseEvent} event The event to handle\n   * @private\n   */\n  ZoomToExtent.prototype.handleClick_ = function handleClick_ (event) {\n    event.preventDefault();\n    this.handleZoomToExtent();\n  };\n\n  /**\n   * @protected\n   */\n  ZoomToExtent.prototype.handleZoomToExtent = function handleZoomToExtent () {\n    var map = this.getMap();\n    var view = map.getView();\n    var extent = !this.extent ? view.getProjection().getExtent() : this.extent;\n    view.fit(extent);\n  };\n\n  return ZoomToExtent;\n}(Control));\n\nexport default ZoomToExtent;\n\n//# sourceMappingURL=ZoomToExtent.js.map","import $ol$Collection from './ol/Collection';\nimport $ol$Feature from './ol/Feature';\nimport $ol$Geolocation from './ol/Geolocation';\nimport $ol$Graticule from './ol/Graticule';\nimport $ol$Kinetic from './ol/Kinetic';\nimport $ol$Map from './ol/Map';\nimport $ol$Object from './ol/Object';\nimport $ol$Observable from './ol/Observable';\nimport {unByKey as _ol_Observable$unByKey} from './ol/Observable';\nimport $ol$Overlay from './ol/Overlay';\nimport $ol$PluggableMap from './ol/PluggableMap';\nimport $ol$View from './ol/View';\nimport $ol$WebGLMap from './ol/WebGLMap';\nimport {stableSort as _ol_array$stableSort} from './ol/array';\nimport {asString as _ol_color$asString} from './ol/color';\nimport {asArray as _ol_color$asArray} from './ol/color';\nimport {asColorLike as _ol_colorlike$asColorLike} from './ol/colorlike';\nimport {add as _ol_coordinate$add} from './ol/coordinate';\nimport {createStringXY as _ol_coordinate$createStringXY} from './ol/coordinate';\nimport {format as _ol_coordinate$format} from './ol/coordinate';\nimport {rotate as _ol_coordinate$rotate} from './ol/coordinate';\nimport {toStringHDMS as _ol_coordinate$toStringHDMS} from './ol/coordinate';\nimport {toStringXY as _ol_coordinate$toStringXY} from './ol/coordinate';\nimport {easeIn as _ol_easing$easeIn} from './ol/easing';\nimport {easeOut as _ol_easing$easeOut} from './ol/easing';\nimport {inAndOut as _ol_easing$inAndOut} from './ol/easing';\nimport {linear as _ol_easing$linear} from './ol/easing';\nimport {upAndDown as _ol_easing$upAndDown} from './ol/easing';\nimport {boundingExtent as _ol_extent$boundingExtent} from './ol/extent';\nimport {buffer as _ol_extent$buffer} from './ol/extent';\nimport {containsCoordinate as _ol_extent$containsCoordinate} from './ol/extent';\nimport {containsExtent as _ol_extent$containsExtent} from './ol/extent';\nimport {containsXY as _ol_extent$containsXY} from './ol/extent';\nimport {createEmpty as _ol_extent$createEmpty} from './ol/extent';\nimport {equals as _ol_extent$equals} from './ol/extent';\nimport {extend as _ol_extent$extend} from './ol/extent';\nimport {getArea as _ol_extent$getArea} from './ol/extent';\nimport {getBottomLeft as _ol_extent$getBottomLeft} from './ol/extent';\nimport {getBottomRight as _ol_extent$getBottomRight} from './ol/extent';\nimport {getCenter as _ol_extent$getCenter} from './ol/extent';\nimport {getHeight as _ol_extent$getHeight} from './ol/extent';\nimport {getIntersection as _ol_extent$getIntersection} from './ol/extent';\nimport {getSize as _ol_extent$getSize} from './ol/extent';\nimport {getTopLeft as _ol_extent$getTopLeft} from './ol/extent';\nimport {getTopRight as _ol_extent$getTopRight} from './ol/extent';\nimport {getWidth as _ol_extent$getWidth} from './ol/extent';\nimport {intersects as _ol_extent$intersects} from './ol/extent';\nimport {isEmpty as _ol_extent$isEmpty} from './ol/extent';\nimport {applyTransform as _ol_extent$applyTransform} from './ol/extent';\nimport {xhr as _ol_featureloader$xhr} from './ol/featureloader';\nimport {DEVICE_PIXEL_RATIO as _ol_has$DEVICE_PIXEL_RATIO} from './ol/has';\nimport {GEOLOCATION as _ol_has$GEOLOCATION} from './ol/has';\nimport {TOUCH as _ol_has$TOUCH} from './ol/has';\nimport {defaults as _ol_interaction$defaults} from './ol/interaction';\nimport {all as _ol_loadingstrategy$all} from './ol/loadingstrategy';\nimport {bbox as _ol_loadingstrategy$bbox} from './ol/loadingstrategy';\nimport {tile as _ol_loadingstrategy$tile} from './ol/loadingstrategy';\nimport {addProjection as _ol_proj$addProjection} from './ol/proj';\nimport {get as _ol_proj$get} from './ol/proj';\nimport {getPointResolution as _ol_proj$getPointResolution} from './ol/proj';\nimport {addEquivalentProjections as _ol_proj$addEquivalentProjections} from './ol/proj';\nimport {addCoordinateTransforms as _ol_proj$addCoordinateTransforms} from './ol/proj';\nimport {fromLonLat as _ol_proj$fromLonLat} from './ol/proj';\nimport {toLonLat as _ol_proj$toLonLat} from './ol/proj';\nimport {equivalent as _ol_proj$equivalent} from './ol/proj';\nimport {getTransform as _ol_proj$getTransform} from './ol/proj';\nimport {transform as _ol_proj$transform} from './ol/proj';\nimport {transformExtent as _ol_proj$transformExtent} from './ol/proj';\nimport {toContext as _ol_render$toContext} from './ol/render';\nimport {toSize as _ol_size$toSize} from './ol/size';\nimport {getDistance as _ol_sphere$getDistance} from './ol/sphere';\nimport {getLength as _ol_sphere$getLength} from './ol/sphere';\nimport {getArea as _ol_sphere$getArea} from './ol/sphere';\nimport {createXYZ as _ol_tilegrid$createXYZ} from './ol/tilegrid';\nimport {inherits as _ol$inherits} from './ol';\nimport {getUid as _ol$getUid} from './ol';\nimport {getAllTextContent as _ol_xml$getAllTextContent} from './ol/xml';\nimport {parse as _ol_xml$parse} from './ol/xml';\nimport $ol$tilegrid$TileGrid from './ol/tilegrid/TileGrid';\nimport $ol$tilegrid$WMTS from './ol/tilegrid/WMTS';\nimport {createFromCapabilitiesMatrixSet as _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet} from './ol/tilegrid/WMTS';\nimport $ol$style$AtlasManager from './ol/style/AtlasManager';\nimport $ol$style$Circle from './ol/style/Circle';\nimport $ol$style$Fill from './ol/style/Fill';\nimport $ol$style$Icon from './ol/style/Icon';\nimport {shared as _ol_style_IconImageCache$shared} from './ol/style/IconImageCache';\nimport $ol$style$Image from './ol/style/Image';\nimport $ol$style$RegularShape from './ol/style/RegularShape';\nimport $ol$style$Stroke from './ol/style/Stroke';\nimport $ol$style$Style from './ol/style/Style';\nimport $ol$style$Text from './ol/style/Text';\nimport $ol$source$BingMaps from './ol/source/BingMaps';\nimport $ol$source$CartoDB from './ol/source/CartoDB';\nimport $ol$source$Cluster from './ol/source/Cluster';\nimport $ol$source$Image from './ol/source/Image';\nimport $ol$source$ImageArcGISRest from './ol/source/ImageArcGISRest';\nimport $ol$source$ImageCanvas from './ol/source/ImageCanvas';\nimport $ol$source$ImageMapGuide from './ol/source/ImageMapGuide';\nimport $ol$source$ImageStatic from './ol/source/ImageStatic';\nimport $ol$source$ImageWMS from './ol/source/ImageWMS';\nimport {ATTRIBUTION as _ol_source_OSM$ATTRIBUTION} from './ol/source/OSM';\nimport $ol$source$OSM from './ol/source/OSM';\nimport $ol$source$Raster from './ol/source/Raster';\nimport $ol$source$Source from './ol/source/Source';\nimport $ol$source$Stamen from './ol/source/Stamen';\nimport $ol$source$Tile from './ol/source/Tile';\nimport $ol$source$TileArcGISRest from './ol/source/TileArcGISRest';\nimport $ol$source$TileDebug from './ol/source/TileDebug';\nimport $ol$source$TileImage from './ol/source/TileImage';\nimport $ol$source$TileJSON from './ol/source/TileJSON';\nimport $ol$source$TileWMS from './ol/source/TileWMS';\nimport $ol$source$UTFGrid from './ol/source/UTFGrid';\nimport $ol$source$Vector from './ol/source/Vector';\nimport $ol$source$VectorTile from './ol/source/VectorTile';\nimport $ol$source$WMTS from './ol/source/WMTS';\nimport {optionsFromCapabilities as _ol_source_WMTS$optionsFromCapabilities} from './ol/source/WMTS';\nimport $ol$source$XYZ from './ol/source/XYZ';\nimport $ol$source$Zoomify from './ol/source/Zoomify';\nimport $ol$renderer$webgl$ImageLayer from './ol/renderer/webgl/ImageLayer';\nimport $ol$renderer$webgl$Map from './ol/renderer/webgl/Map';\nimport $ol$renderer$webgl$TileLayer from './ol/renderer/webgl/TileLayer';\nimport $ol$renderer$webgl$VectorLayer from './ol/renderer/webgl/VectorLayer';\nimport $ol$renderer$canvas$ImageLayer from './ol/renderer/canvas/ImageLayer';\nimport $ol$renderer$canvas$Map from './ol/renderer/canvas/Map';\nimport $ol$renderer$canvas$TileLayer from './ol/renderer/canvas/TileLayer';\nimport $ol$renderer$canvas$VectorLayer from './ol/renderer/canvas/VectorLayer';\nimport $ol$renderer$canvas$VectorTileLayer from './ol/renderer/canvas/VectorTileLayer';\nimport $ol$render$VectorContext from './ol/render/VectorContext';\nimport {labelCache as _ol_render_canvas$labelCache} from './ol/render/canvas';\nimport $ol$proj$Projection from './ol/proj/Projection';\nimport {METERS_PER_UNIT as _ol_proj_Units$METERS_PER_UNIT} from './ol/proj/Units';\nimport {register as _ol_proj_proj4$register} from './ol/proj/proj4';\nimport $ol$layer$Base from './ol/layer/Base';\nimport $ol$layer$Group from './ol/layer/Group';\nimport $ol$layer$Heatmap from './ol/layer/Heatmap';\nimport $ol$layer$Image from './ol/layer/Image';\nimport $ol$layer$Tile from './ol/layer/Tile';\nimport $ol$layer$Vector from './ol/layer/Vector';\nimport $ol$layer$VectorTile from './ol/layer/VectorTile';\nimport $ol$interaction$DoubleClickZoom from './ol/interaction/DoubleClickZoom';\nimport $ol$interaction$DragAndDrop from './ol/interaction/DragAndDrop';\nimport $ol$interaction$DragBox from './ol/interaction/DragBox';\nimport $ol$interaction$DragPan from './ol/interaction/DragPan';\nimport $ol$interaction$DragRotate from './ol/interaction/DragRotate';\nimport $ol$interaction$DragRotateAndZoom from './ol/interaction/DragRotateAndZoom';\nimport $ol$interaction$DragZoom from './ol/interaction/DragZoom';\nimport $ol$interaction$Draw from './ol/interaction/Draw';\nimport {createRegularPolygon as _ol_interaction_Draw$createRegularPolygon} from './ol/interaction/Draw';\nimport {createBox as _ol_interaction_Draw$createBox} from './ol/interaction/Draw';\nimport $ol$interaction$Extent from './ol/interaction/Extent';\nimport $ol$interaction$Interaction from './ol/interaction/Interaction';\nimport $ol$interaction$KeyboardPan from './ol/interaction/KeyboardPan';\nimport $ol$interaction$KeyboardZoom from './ol/interaction/KeyboardZoom';\nimport $ol$interaction$Modify from './ol/interaction/Modify';\nimport $ol$interaction$MouseWheelZoom from './ol/interaction/MouseWheelZoom';\nimport $ol$interaction$PinchRotate from './ol/interaction/PinchRotate';\nimport $ol$interaction$PinchZoom from './ol/interaction/PinchZoom';\nimport $ol$interaction$Pointer from './ol/interaction/Pointer';\nimport $ol$interaction$Select from './ol/interaction/Select';\nimport $ol$interaction$Snap from './ol/interaction/Snap';\nimport $ol$interaction$Translate from './ol/interaction/Translate';\nimport $ol$geom$Circle from './ol/geom/Circle';\nimport $ol$geom$Geometry from './ol/geom/Geometry';\nimport $ol$geom$GeometryCollection from './ol/geom/GeometryCollection';\nimport $ol$geom$LineString from './ol/geom/LineString';\nimport $ol$geom$LinearRing from './ol/geom/LinearRing';\nimport $ol$geom$MultiLineString from './ol/geom/MultiLineString';\nimport $ol$geom$MultiPoint from './ol/geom/MultiPoint';\nimport $ol$geom$MultiPolygon from './ol/geom/MultiPolygon';\nimport $ol$geom$Point from './ol/geom/Point';\nimport $ol$geom$Polygon from './ol/geom/Polygon';\nimport {circular as _ol_geom_Polygon$circular} from './ol/geom/Polygon';\nimport {fromExtent as _ol_geom_Polygon$fromExtent} from './ol/geom/Polygon';\nimport {fromCircle as _ol_geom_Polygon$fromCircle} from './ol/geom/Polygon';\nimport $ol$geom$SimpleGeometry from './ol/geom/SimpleGeometry';\nimport $ol$format$EsriJSON from './ol/format/EsriJSON';\nimport $ol$format$Feature from './ol/format/Feature';\nimport $ol$format$GML from './ol/format/GML';\nimport $ol$format$GML2 from './ol/format/GML2';\nimport $ol$format$GML3 from './ol/format/GML3';\nimport $ol$format$GML32 from './ol/format/GML32';\nimport $ol$format$GPX from './ol/format/GPX';\nimport $ol$format$GeoJSON from './ol/format/GeoJSON';\nimport $ol$format$IGC from './ol/format/IGC';\nimport $ol$format$KML from './ol/format/KML';\nimport $ol$format$MVT from './ol/format/MVT';\nimport $ol$format$OSMXML from './ol/format/OSMXML';\nimport $ol$format$Polyline from './ol/format/Polyline';\nimport {encodeDeltas as _ol_format_Polyline$encodeDeltas} from './ol/format/Polyline';\nimport {decodeDeltas as _ol_format_Polyline$decodeDeltas} from './ol/format/Polyline';\nimport {encodeFloats as _ol_format_Polyline$encodeFloats} from './ol/format/Polyline';\nimport {decodeFloats as _ol_format_Polyline$decodeFloats} from './ol/format/Polyline';\nimport $ol$format$TopoJSON from './ol/format/TopoJSON';\nimport $ol$format$WFS from './ol/format/WFS';\nimport {writeFilter as _ol_format_WFS$writeFilter} from './ol/format/WFS';\nimport $ol$format$WKT from './ol/format/WKT';\nimport $ol$format$WMSCapabilities from './ol/format/WMSCapabilities';\nimport $ol$format$WMSGetFeatureInfo from './ol/format/WMSGetFeatureInfo';\nimport $ol$format$WMTSCapabilities from './ol/format/WMTSCapabilities';\nimport {and as _ol_format_filter$and} from './ol/format/filter';\nimport {or as _ol_format_filter$or} from './ol/format/filter';\nimport {not as _ol_format_filter$not} from './ol/format/filter';\nimport {bbox as _ol_format_filter$bbox} from './ol/format/filter';\nimport {contains as _ol_format_filter$contains} from './ol/format/filter';\nimport {intersects as _ol_format_filter$intersects} from './ol/format/filter';\nimport {within as _ol_format_filter$within} from './ol/format/filter';\nimport {equalTo as _ol_format_filter$equalTo} from './ol/format/filter';\nimport {notEqualTo as _ol_format_filter$notEqualTo} from './ol/format/filter';\nimport {lessThan as _ol_format_filter$lessThan} from './ol/format/filter';\nimport {lessThanOrEqualTo as _ol_format_filter$lessThanOrEqualTo} from './ol/format/filter';\nimport {greaterThan as _ol_format_filter$greaterThan} from './ol/format/filter';\nimport {greaterThanOrEqualTo as _ol_format_filter$greaterThanOrEqualTo} from './ol/format/filter';\nimport {isNull as _ol_format_filter$isNull} from './ol/format/filter';\nimport {between as _ol_format_filter$between} from './ol/format/filter';\nimport {like as _ol_format_filter$like} from './ol/format/filter';\nimport {during as _ol_format_filter$during} from './ol/format/filter';\nimport $ol$format$filter$Bbox from './ol/format/filter/Bbox';\nimport $ol$format$filter$Contains from './ol/format/filter/Contains';\nimport $ol$format$filter$During from './ol/format/filter/During';\nimport $ol$format$filter$EqualTo from './ol/format/filter/EqualTo';\nimport $ol$format$filter$GreaterThan from './ol/format/filter/GreaterThan';\nimport $ol$format$filter$GreaterThanOrEqualTo from './ol/format/filter/GreaterThanOrEqualTo';\nimport $ol$format$filter$Intersects from './ol/format/filter/Intersects';\nimport $ol$format$filter$IsBetween from './ol/format/filter/IsBetween';\nimport $ol$format$filter$IsLike from './ol/format/filter/IsLike';\nimport $ol$format$filter$IsNull from './ol/format/filter/IsNull';\nimport $ol$format$filter$LessThan from './ol/format/filter/LessThan';\nimport $ol$format$filter$LessThanOrEqualTo from './ol/format/filter/LessThanOrEqualTo';\nimport $ol$format$filter$Not from './ol/format/filter/Not';\nimport $ol$format$filter$NotEqualTo from './ol/format/filter/NotEqualTo';\nimport $ol$format$filter$Or from './ol/format/filter/Or';\nimport $ol$format$filter$Within from './ol/format/filter/Within';\nimport {altKeyOnly as _ol_events_condition$altKeyOnly} from './ol/events/condition';\nimport {altShiftKeysOnly as _ol_events_condition$altShiftKeysOnly} from './ol/events/condition';\nimport {focus as _ol_events_condition$focus} from './ol/events/condition';\nimport {always as _ol_events_condition$always} from './ol/events/condition';\nimport {click as _ol_events_condition$click} from './ol/events/condition';\nimport {never as _ol_events_condition$never} from './ol/events/condition';\nimport {pointerMove as _ol_events_condition$pointerMove} from './ol/events/condition';\nimport {singleClick as _ol_events_condition$singleClick} from './ol/events/condition';\nimport {doubleClick as _ol_events_condition$doubleClick} from './ol/events/condition';\nimport {noModifierKeys as _ol_events_condition$noModifierKeys} from './ol/events/condition';\nimport {platformModifierKeyOnly as _ol_events_condition$platformModifierKeyOnly} from './ol/events/condition';\nimport {shiftKeyOnly as _ol_events_condition$shiftKeyOnly} from './ol/events/condition';\nimport {targetNotEditable as _ol_events_condition$targetNotEditable} from './ol/events/condition';\nimport {mouseOnly as _ol_events_condition$mouseOnly} from './ol/events/condition';\nimport {primaryAction as _ol_events_condition$primaryAction} from './ol/events/condition';\nimport $ol$control$Attribution from './ol/control/Attribution';\nimport {render as _ol_control_Attribution$render} from './ol/control/Attribution';\nimport $ol$control$Control from './ol/control/Control';\nimport $ol$control$FullScreen from './ol/control/FullScreen';\nimport $ol$control$MousePosition from './ol/control/MousePosition';\nimport {render as _ol_control_MousePosition$render} from './ol/control/MousePosition';\nimport $ol$control$OverviewMap from './ol/control/OverviewMap';\nimport {render as _ol_control_OverviewMap$render} from './ol/control/OverviewMap';\nimport $ol$control$Rotate from './ol/control/Rotate';\nimport {render as _ol_control_Rotate$render} from './ol/control/Rotate';\nimport $ol$control$ScaleLine from './ol/control/ScaleLine';\nimport {render as _ol_control_ScaleLine$render} from './ol/control/ScaleLine';\nimport $ol$control$Zoom from './ol/control/Zoom';\nimport $ol$control$ZoomSlider from './ol/control/ZoomSlider';\nimport {render as _ol_control_ZoomSlider$render} from './ol/control/ZoomSlider';\nimport $ol$control$ZoomToExtent from './ol/control/ZoomToExtent';\nimport {defaults as _ol_control$defaults} from './ol/control';\n\nvar ol = {};\n\nol.array = {};\nol.color = {};\nol.colorlike = {};\nol.control = {};\nol.coordinate = {};\nol.easing = {};\nol.events = {};\nol.events.condition = {};\nol.extent = {};\nol.featureloader = {};\nol.format = {};\nol.format.filter = {};\nol.geom = {};\nol.has = {};\nol.interaction = {};\nol.layer = {};\nol.loadingstrategy = {};\nol.proj = {};\nol.proj.Units = {};\nol.proj.proj4 = {};\nol.render = {};\nol.render.canvas = {};\nol.renderer = {};\nol.renderer.canvas = {};\nol.renderer.webgl = {};\nol.size = {};\nol.source = {};\nol.sphere = {};\nol.style = {};\nol.style.IconImageCache = {};\nol.tilegrid = {};\nol.xml = {};\nol.Collection = $ol$Collection;\nol.Feature = $ol$Feature;\nol.Geolocation = $ol$Geolocation;\nol.Graticule = $ol$Graticule;\nol.Kinetic = $ol$Kinetic;\nol.Map = $ol$Map;\nol.Object = $ol$Object;\nol.Observable = $ol$Observable;\nol.Observable.unByKey = _ol_Observable$unByKey;\nol.Overlay = $ol$Overlay;\nol.PluggableMap = $ol$PluggableMap;\nol.View = $ol$View;\nol.WebGLMap = $ol$WebGLMap;\nol.array.stableSort = _ol_array$stableSort;\nol.color.asArray = _ol_color$asArray;\nol.color.asString = _ol_color$asString;\nol.colorlike.asColorLike = _ol_colorlike$asColorLike;\nol.control.Attribution = $ol$control$Attribution;\nol.control.Attribution.render = _ol_control_Attribution$render;\nol.control.Control = $ol$control$Control;\nol.control.FullScreen = $ol$control$FullScreen;\nol.control.MousePosition = $ol$control$MousePosition;\nol.control.MousePosition.render = _ol_control_MousePosition$render;\nol.control.OverviewMap = $ol$control$OverviewMap;\nol.control.OverviewMap.render = _ol_control_OverviewMap$render;\nol.control.Rotate = $ol$control$Rotate;\nol.control.Rotate.render = _ol_control_Rotate$render;\nol.control.ScaleLine = $ol$control$ScaleLine;\nol.control.ScaleLine.render = _ol_control_ScaleLine$render;\nol.control.Zoom = $ol$control$Zoom;\nol.control.ZoomSlider = $ol$control$ZoomSlider;\nol.control.ZoomSlider.render = _ol_control_ZoomSlider$render;\nol.control.ZoomToExtent = $ol$control$ZoomToExtent;\nol.control.defaults = _ol_control$defaults;\nol.coordinate.add = _ol_coordinate$add;\nol.coordinate.createStringXY = _ol_coordinate$createStringXY;\nol.coordinate.format = _ol_coordinate$format;\nol.coordinate.rotate = _ol_coordinate$rotate;\nol.coordinate.toStringHDMS = _ol_coordinate$toStringHDMS;\nol.coordinate.toStringXY = _ol_coordinate$toStringXY;\nol.easing.easeIn = _ol_easing$easeIn;\nol.easing.easeOut = _ol_easing$easeOut;\nol.easing.inAndOut = _ol_easing$inAndOut;\nol.easing.linear = _ol_easing$linear;\nol.easing.upAndDown = _ol_easing$upAndDown;\nol.events.condition.altKeyOnly = _ol_events_condition$altKeyOnly;\nol.events.condition.altShiftKeysOnly = _ol_events_condition$altShiftKeysOnly;\nol.events.condition.always = _ol_events_condition$always;\nol.events.condition.click = _ol_events_condition$click;\nol.events.condition.doubleClick = _ol_events_condition$doubleClick;\nol.events.condition.focus = _ol_events_condition$focus;\nol.events.condition.mouseOnly = _ol_events_condition$mouseOnly;\nol.events.condition.never = _ol_events_condition$never;\nol.events.condition.noModifierKeys = _ol_events_condition$noModifierKeys;\nol.events.condition.platformModifierKeyOnly = _ol_events_condition$platformModifierKeyOnly;\nol.events.condition.pointerMove = _ol_events_condition$pointerMove;\nol.events.condition.primaryAction = _ol_events_condition$primaryAction;\nol.events.condition.shiftKeyOnly = _ol_events_condition$shiftKeyOnly;\nol.events.condition.singleClick = _ol_events_condition$singleClick;\nol.events.condition.targetNotEditable = _ol_events_condition$targetNotEditable;\nol.extent.applyTransform = _ol_extent$applyTransform;\nol.extent.boundingExtent = _ol_extent$boundingExtent;\nol.extent.buffer = _ol_extent$buffer;\nol.extent.containsCoordinate = _ol_extent$containsCoordinate;\nol.extent.containsExtent = _ol_extent$containsExtent;\nol.extent.containsXY = _ol_extent$containsXY;\nol.extent.createEmpty = _ol_extent$createEmpty;\nol.extent.equals = _ol_extent$equals;\nol.extent.extend = _ol_extent$extend;\nol.extent.getArea = _ol_extent$getArea;\nol.extent.getBottomLeft = _ol_extent$getBottomLeft;\nol.extent.getBottomRight = _ol_extent$getBottomRight;\nol.extent.getCenter = _ol_extent$getCenter;\nol.extent.getHeight = _ol_extent$getHeight;\nol.extent.getIntersection = _ol_extent$getIntersection;\nol.extent.getSize = _ol_extent$getSize;\nol.extent.getTopLeft = _ol_extent$getTopLeft;\nol.extent.getTopRight = _ol_extent$getTopRight;\nol.extent.getWidth = _ol_extent$getWidth;\nol.extent.intersects = _ol_extent$intersects;\nol.extent.isEmpty = _ol_extent$isEmpty;\nol.featureloader.xhr = _ol_featureloader$xhr;\nol.format.EsriJSON = $ol$format$EsriJSON;\nol.format.Feature = $ol$format$Feature;\nol.format.GML = $ol$format$GML;\nol.format.GML2 = $ol$format$GML2;\nol.format.GML3 = $ol$format$GML3;\nol.format.GML32 = $ol$format$GML32;\nol.format.GPX = $ol$format$GPX;\nol.format.GeoJSON = $ol$format$GeoJSON;\nol.format.IGC = $ol$format$IGC;\nol.format.KML = $ol$format$KML;\nol.format.MVT = $ol$format$MVT;\nol.format.OSMXML = $ol$format$OSMXML;\nol.format.Polyline = $ol$format$Polyline;\nol.format.Polyline.decodeDeltas = _ol_format_Polyline$decodeDeltas;\nol.format.Polyline.decodeFloats = _ol_format_Polyline$decodeFloats;\nol.format.Polyline.encodeDeltas = _ol_format_Polyline$encodeDeltas;\nol.format.Polyline.encodeFloats = _ol_format_Polyline$encodeFloats;\nol.format.TopoJSON = $ol$format$TopoJSON;\nol.format.WFS = $ol$format$WFS;\nol.format.WFS.writeFilter = _ol_format_WFS$writeFilter;\nol.format.WKT = $ol$format$WKT;\nol.format.WMSCapabilities = $ol$format$WMSCapabilities;\nol.format.WMSGetFeatureInfo = $ol$format$WMSGetFeatureInfo;\nol.format.WMTSCapabilities = $ol$format$WMTSCapabilities;\nol.format.filter.Bbox = $ol$format$filter$Bbox;\nol.format.filter.Contains = $ol$format$filter$Contains;\nol.format.filter.During = $ol$format$filter$During;\nol.format.filter.EqualTo = $ol$format$filter$EqualTo;\nol.format.filter.GreaterThan = $ol$format$filter$GreaterThan;\nol.format.filter.GreaterThanOrEqualTo = $ol$format$filter$GreaterThanOrEqualTo;\nol.format.filter.Intersects = $ol$format$filter$Intersects;\nol.format.filter.IsBetween = $ol$format$filter$IsBetween;\nol.format.filter.IsLike = $ol$format$filter$IsLike;\nol.format.filter.IsNull = $ol$format$filter$IsNull;\nol.format.filter.LessThan = $ol$format$filter$LessThan;\nol.format.filter.LessThanOrEqualTo = $ol$format$filter$LessThanOrEqualTo;\nol.format.filter.Not = $ol$format$filter$Not;\nol.format.filter.NotEqualTo = $ol$format$filter$NotEqualTo;\nol.format.filter.Or = $ol$format$filter$Or;\nol.format.filter.Within = $ol$format$filter$Within;\nol.format.filter.and = _ol_format_filter$and;\nol.format.filter.bbox = _ol_format_filter$bbox;\nol.format.filter.between = _ol_format_filter$between;\nol.format.filter.contains = _ol_format_filter$contains;\nol.format.filter.during = _ol_format_filter$during;\nol.format.filter.equalTo = _ol_format_filter$equalTo;\nol.format.filter.greaterThan = _ol_format_filter$greaterThan;\nol.format.filter.greaterThanOrEqualTo = _ol_format_filter$greaterThanOrEqualTo;\nol.format.filter.intersects = _ol_format_filter$intersects;\nol.format.filter.isNull = _ol_format_filter$isNull;\nol.format.filter.lessThan = _ol_format_filter$lessThan;\nol.format.filter.lessThanOrEqualTo = _ol_format_filter$lessThanOrEqualTo;\nol.format.filter.like = _ol_format_filter$like;\nol.format.filter.not = _ol_format_filter$not;\nol.format.filter.notEqualTo = _ol_format_filter$notEqualTo;\nol.format.filter.or = _ol_format_filter$or;\nol.format.filter.within = _ol_format_filter$within;\nol.geom.Circle = $ol$geom$Circle;\nol.geom.Geometry = $ol$geom$Geometry;\nol.geom.GeometryCollection = $ol$geom$GeometryCollection;\nol.geom.LineString = $ol$geom$LineString;\nol.geom.LinearRing = $ol$geom$LinearRing;\nol.geom.MultiLineString = $ol$geom$MultiLineString;\nol.geom.MultiPoint = $ol$geom$MultiPoint;\nol.geom.MultiPolygon = $ol$geom$MultiPolygon;\nol.geom.Point = $ol$geom$Point;\nol.geom.Polygon = $ol$geom$Polygon;\nol.geom.Polygon.circular = _ol_geom_Polygon$circular;\nol.geom.Polygon.fromCircle = _ol_geom_Polygon$fromCircle;\nol.geom.Polygon.fromExtent = _ol_geom_Polygon$fromExtent;\nol.geom.SimpleGeometry = $ol$geom$SimpleGeometry;\nol.getUid = _ol$getUid;\nol.has.DEVICE_PIXEL_RATIO = _ol_has$DEVICE_PIXEL_RATIO;\nol.has.GEOLOCATION = _ol_has$GEOLOCATION;\nol.has.TOUCH = _ol_has$TOUCH;\nol.inherits = _ol$inherits;\nol.interaction.DoubleClickZoom = $ol$interaction$DoubleClickZoom;\nol.interaction.DragAndDrop = $ol$interaction$DragAndDrop;\nol.interaction.DragBox = $ol$interaction$DragBox;\nol.interaction.DragPan = $ol$interaction$DragPan;\nol.interaction.DragRotate = $ol$interaction$DragRotate;\nol.interaction.DragRotateAndZoom = $ol$interaction$DragRotateAndZoom;\nol.interaction.DragZoom = $ol$interaction$DragZoom;\nol.interaction.Draw = $ol$interaction$Draw;\nol.interaction.Draw.createBox = _ol_interaction_Draw$createBox;\nol.interaction.Draw.createRegularPolygon = _ol_interaction_Draw$createRegularPolygon;\nol.interaction.Extent = $ol$interaction$Extent;\nol.interaction.Interaction = $ol$interaction$Interaction;\nol.interaction.KeyboardPan = $ol$interaction$KeyboardPan;\nol.interaction.KeyboardZoom = $ol$interaction$KeyboardZoom;\nol.interaction.Modify = $ol$interaction$Modify;\nol.interaction.MouseWheelZoom = $ol$interaction$MouseWheelZoom;\nol.interaction.PinchRotate = $ol$interaction$PinchRotate;\nol.interaction.PinchZoom = $ol$interaction$PinchZoom;\nol.interaction.Pointer = $ol$interaction$Pointer;\nol.interaction.Select = $ol$interaction$Select;\nol.interaction.Snap = $ol$interaction$Snap;\nol.interaction.Translate = $ol$interaction$Translate;\nol.interaction.defaults = _ol_interaction$defaults;\nol.layer.Base = $ol$layer$Base;\nol.layer.Group = $ol$layer$Group;\nol.layer.Heatmap = $ol$layer$Heatmap;\nol.layer.Image = $ol$layer$Image;\nol.layer.Tile = $ol$layer$Tile;\nol.layer.Vector = $ol$layer$Vector;\nol.layer.VectorTile = $ol$layer$VectorTile;\nol.loadingstrategy.all = _ol_loadingstrategy$all;\nol.loadingstrategy.bbox = _ol_loadingstrategy$bbox;\nol.loadingstrategy.tile = _ol_loadingstrategy$tile;\nol.proj.Projection = $ol$proj$Projection;\nol.proj.Units.METERS_PER_UNIT = _ol_proj_Units$METERS_PER_UNIT;\nol.proj.addCoordinateTransforms = _ol_proj$addCoordinateTransforms;\nol.proj.addEquivalentProjections = _ol_proj$addEquivalentProjections;\nol.proj.addProjection = _ol_proj$addProjection;\nol.proj.equivalent = _ol_proj$equivalent;\nol.proj.fromLonLat = _ol_proj$fromLonLat;\nol.proj.get = _ol_proj$get;\nol.proj.getPointResolution = _ol_proj$getPointResolution;\nol.proj.getTransform = _ol_proj$getTransform;\nol.proj.proj4.register = _ol_proj_proj4$register;\nol.proj.toLonLat = _ol_proj$toLonLat;\nol.proj.transform = _ol_proj$transform;\nol.proj.transformExtent = _ol_proj$transformExtent;\nol.render.VectorContext = $ol$render$VectorContext;\nol.render.canvas.labelCache = _ol_render_canvas$labelCache;\nol.render.toContext = _ol_render$toContext;\nol.renderer.canvas.ImageLayer = $ol$renderer$canvas$ImageLayer;\nol.renderer.canvas.Map = $ol$renderer$canvas$Map;\nol.renderer.canvas.TileLayer = $ol$renderer$canvas$TileLayer;\nol.renderer.canvas.VectorLayer = $ol$renderer$canvas$VectorLayer;\nol.renderer.canvas.VectorTileLayer = $ol$renderer$canvas$VectorTileLayer;\nol.renderer.webgl.ImageLayer = $ol$renderer$webgl$ImageLayer;\nol.renderer.webgl.Map = $ol$renderer$webgl$Map;\nol.renderer.webgl.TileLayer = $ol$renderer$webgl$TileLayer;\nol.renderer.webgl.VectorLayer = $ol$renderer$webgl$VectorLayer;\nol.size.toSize = _ol_size$toSize;\nol.source.BingMaps = $ol$source$BingMaps;\nol.source.CartoDB = $ol$source$CartoDB;\nol.source.Cluster = $ol$source$Cluster;\nol.source.Image = $ol$source$Image;\nol.source.ImageArcGISRest = $ol$source$ImageArcGISRest;\nol.source.ImageCanvas = $ol$source$ImageCanvas;\nol.source.ImageMapGuide = $ol$source$ImageMapGuide;\nol.source.ImageStatic = $ol$source$ImageStatic;\nol.source.ImageWMS = $ol$source$ImageWMS;\nol.source.OSM = $ol$source$OSM;\nol.source.OSM.ATTRIBUTION = _ol_source_OSM$ATTRIBUTION;\nol.source.Raster = $ol$source$Raster;\nol.source.Source = $ol$source$Source;\nol.source.Stamen = $ol$source$Stamen;\nol.source.Tile = $ol$source$Tile;\nol.source.TileArcGISRest = $ol$source$TileArcGISRest;\nol.source.TileDebug = $ol$source$TileDebug;\nol.source.TileImage = $ol$source$TileImage;\nol.source.TileJSON = $ol$source$TileJSON;\nol.source.TileWMS = $ol$source$TileWMS;\nol.source.UTFGrid = $ol$source$UTFGrid;\nol.source.Vector = $ol$source$Vector;\nol.source.VectorTile = $ol$source$VectorTile;\nol.source.WMTS = $ol$source$WMTS;\nol.source.WMTS.optionsFromCapabilities = _ol_source_WMTS$optionsFromCapabilities;\nol.source.XYZ = $ol$source$XYZ;\nol.source.Zoomify = $ol$source$Zoomify;\nol.sphere.getArea = _ol_sphere$getArea;\nol.sphere.getDistance = _ol_sphere$getDistance;\nol.sphere.getLength = _ol_sphere$getLength;\nol.style.AtlasManager = $ol$style$AtlasManager;\nol.style.Circle = $ol$style$Circle;\nol.style.Fill = $ol$style$Fill;\nol.style.Icon = $ol$style$Icon;\nol.style.IconImageCache.shared = _ol_style_IconImageCache$shared;\nol.style.Image = $ol$style$Image;\nol.style.RegularShape = $ol$style$RegularShape;\nol.style.Stroke = $ol$style$Stroke;\nol.style.Style = $ol$style$Style;\nol.style.Text = $ol$style$Text;\nol.tilegrid.TileGrid = $ol$tilegrid$TileGrid;\nol.tilegrid.WMTS = $ol$tilegrid$WMTS;\nol.tilegrid.WMTS.createFromCapabilitiesMatrixSet = _ol_tilegrid_WMTS$createFromCapabilitiesMatrixSet;\nol.tilegrid.createXYZ = _ol_tilegrid$createXYZ;\nol.xml.getAllTextContent = _ol_xml$getAllTextContent;\nol.xml.parse = _ol_xml$parse;\n\nexport default ol;","/**\n * @module ol/proj/proj4\n */\nimport {addCoordinateTransforms, addProjection, addEquivalentProjections, get} from '../proj.js';\nimport {get as getTransform} from './transforms.js';\nimport Projection from './Projection.js';\n\n/**\n * Make projections defined in proj4 (with `proj4.defs()`) available in\n * OpenLayers.\n *\n * This function should be called whenever changes are made to the proj4\n * registry, e.g. after calling `proj4.defs()`. Existing transforms will not be\n * modified by this function.\n *\n * @param {?} proj4 Proj4.\n * @api\n */\nexport function register(proj4) {\n  var projCodes = Object.keys(proj4.defs);\n  var len = projCodes.length;\n  var i, j;\n  for (i = 0; i < len; ++i) {\n    var code = projCodes[i];\n    if (!get(code)) {\n      var def = proj4.defs(code);\n      addProjection(new Projection({\n        code: code,\n        axisOrientation: def.axis,\n        metersPerUnit: def.to_meter,\n        units: def.units\n      }));\n    }\n  }\n  for (i = 0; i < len; ++i) {\n    var code1 = projCodes[i];\n    var proj1 = get(code1);\n    for (j = 0; j < len; ++j) {\n      var code2 = projCodes[j];\n      var proj2 = get(code2);\n      if (!getTransform(code1, code2)) {\n        if (proj4.defs[code1] === proj4.defs[code2]) {\n          addEquivalentProjections([proj1, proj2]);\n        } else {\n          var transform = proj4(code1, code2);\n          addCoordinateTransforms(proj1, proj2, transform.forward, transform.inverse);\n        }\n      }\n    }\n  }\n}\n\n//# sourceMappingURL=proj4.js.map","/**\n * @module ol/render\n */\nimport {DEVICE_PIXEL_RATIO} from './has.js';\nimport {create as createTransform, scale as scaleTransform} from './transform.js';\nimport CanvasImmediateRenderer from './render/canvas/Immediate.js';\n\n\n/**\n * @typedef {Object} State\n * @property {CanvasRenderingContext2D} context Canvas context that the layer is being rendered to.\n * @property {import(\"./Feature.js\").FeatureLike} feature\n * @property {import(\"./geom/SimpleGeometry.js\").default} geometry\n * @property {number} pixelRatio Pixel ratio used by the layer renderer.\n * @property {number} resolution Resolution that the render batch was created and optimized for.\n * This is not the view's resolution that is being rendered.\n * @property {number} rotation Rotation of the rendered layer in radians.\n */\n\n\n/**\n * A function to be used when sorting features before rendering.\n * It takes two instances of {@link module:ol/Feature} or\n * {@link module:ol/render/Feature} and returns a `{number}`.\n *\n * @typedef {function(import(\"./Feature.js\").FeatureLike, import(\"./Feature.js\").FeatureLike):number} OrderFunction\n */\n\n\n/**\n * @typedef {Object} ToContextOptions\n * @property {import(\"./size.js\").Size} [size] Desired size of the canvas in css\n * pixels. When provided, both canvas and css size will be set according to the\n * `pixelRatio`. If not provided, the current canvas and css sizes will not be\n * altered.\n * @property {number} [pixelRatio=window.devicePixelRatio] Pixel ratio (canvas\n * pixel to css pixel ratio) for the canvas.\n */\n\n\n/**\n * Binds a Canvas Immediate API to a canvas context, to allow drawing geometries\n * to the context's canvas.\n *\n * The units for geometry coordinates are css pixels relative to the top left\n * corner of the canvas element.\n * ```js\n * import {toContext} from 'ol/render';\n * import Fill from 'ol/style/Fill';\n * import Polygon from 'ol/geom/Polygon';\n *\n * var canvas = document.createElement('canvas');\n * var render = toContext(canvas.getContext('2d'),\n *     { size: [100, 100] });\n * render.setFillStrokeStyle(new Fill({ color: blue }));\n * render.drawPolygon(\n *     new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));\n * ```\n *\n * @param {CanvasRenderingContext2D} context Canvas context.\n * @param {ToContextOptions=} opt_options Options.\n * @return {CanvasImmediateRenderer} Canvas Immediate.\n * @api\n */\nexport function toContext(context, opt_options) {\n  var canvas = context.canvas;\n  var options = opt_options ? opt_options : {};\n  var pixelRatio = options.pixelRatio || DEVICE_PIXEL_RATIO;\n  var size = options.size;\n  if (size) {\n    canvas.width = size[0] * pixelRatio;\n    canvas.height = size[1] * pixelRatio;\n    canvas.style.width = size[0] + 'px';\n    canvas.style.height = size[1] + 'px';\n  }\n  var extent = [0, 0, canvas.width, canvas.height];\n  var transform = scaleTransform(createTransform(), pixelRatio, pixelRatio);\n  return new CanvasImmediateRenderer(context, pixelRatio, extent, transform, 0);\n}\n\n//# sourceMappingURL=render.js.map"],"sourceRoot":""}
\ No newline at end of file
diff --git a/VIPSWeb/static/js/frontpageMap.js b/VIPSWeb/static/js/frontpageMap.js
index d3a1dbe7..770874f8 100755
--- a/VIPSWeb/static/js/frontpageMap.js
+++ b/VIPSWeb/static/js/frontpageMap.js
@@ -86,7 +86,7 @@ function initFrontpageMap(lonLat, zoomLevel, mapAttribution)
 	var backgroundLayer = new ol.layer.Tile({
 	   	 	source: new ol.source.OSM({
 	   	 					attributions: [
-                               new ol.Attribution({
+                               new ol.control.Attribution({
                                  html: mapAttribution
                                })
                              ]
diff --git a/VIPSWeb/static/js/weatherStationSelectorMap.js b/VIPSWeb/static/js/weatherStationSelectorMap.js
index 70f10538..4f27bbda 100755
--- a/VIPSWeb/static/js/weatherStationSelectorMap.js
+++ b/VIPSWeb/static/js/weatherStationSelectorMap.js
@@ -44,7 +44,7 @@ function initMap(center, zoomLevel, attribution, organizationId, weatherStationF
     var backgroundLayer = new ol.layer.Tile({
                     source: new ol.source.OSM({
                         attributions: [
-                            new ol.Attribution({
+                            new ol.control.Attribution({
                               html: attribution
                             })
                           ]
diff --git a/applefruitmoth/static/applefruitmoth/js/map.js b/applefruitmoth/static/applefruitmoth/js/map.js
index 159a5561..534947e3 100755
--- a/applefruitmoth/static/applefruitmoth/js/map.js
+++ b/applefruitmoth/static/applefruitmoth/js/map.js
@@ -25,7 +25,7 @@ var initMap = function(container, mapAttribution)
 	var backgroundLayer = new ol.layer.Tile({
    	 	source: new ol.source.OSM({
    	 					attributions: [
-                           new ol.Attribution({
+                           new ol.control.Attribution({
                              html: mapAttribution
                            })
                          ]
@@ -105,4 +105,4 @@ var initMap = function(container, mapAttribution)
 function generatePopupContents(warningStatus, description)
 {
 	return "<img src='" + settings.vipslogicProtocol + "://" + settings.vipslogicServerName + "/public/images/station_icon_status_" + warningStatus + ".png'/> " + description;
-}
\ No newline at end of file
+}
diff --git a/observations/static/observations/js/observationList.js b/observations/static/observations/js/observationList.js
index 5917232d..87db26a4 100644
--- a/observations/static/observations/js/observationList.js
+++ b/observations/static/observations/js/observationList.js
@@ -75,7 +75,7 @@ var initMap = function(
     var backgroundLayer = new ol.layer.Tile({
                     source: new ol.source.OSM({
                         attributions: [
-                            new ol.Attribution({
+                            new ol.control.Attribution({
                               html: settings.MAP_ATTRIBUTION
                             })
                           ]
@@ -727,4 +727,4 @@ function togglePlay(theButton){
         intervalId = null;
         theButton.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
     }
-}
\ No newline at end of file
+}
diff --git a/observations/static/observations/js/observationViewMap.js b/observations/static/observations/js/observationViewMap.js
index 2e129dc0..a37cf9b1 100755
--- a/observations/static/observations/js/observationViewMap.js
+++ b/observations/static/observations/js/observationViewMap.js
@@ -28,7 +28,7 @@ var initMap = function(geoJSON, poi, container, mapAttribution)
 	var backgroundLayer = new ol.layer.Tile({
    	 	source: new ol.source.OSM({
    	 					attributions: [
-                           new ol.Attribution({
+                           new ol.control.Attribution({
                              html: mapAttribution
                            })
                          ]
@@ -131,4 +131,4 @@ var initMap = function(geoJSON, poi, container, mapAttribution)
 		    
 		    map.addOverlay(stationMarker);
 	}
-}
\ No newline at end of file
+}
diff --git a/spatial/static/spatial/js/gridmap.js b/spatial/static/spatial/js/gridmap.js
index 7ac2250f..a97600d2 100644
--- a/spatial/static/spatial/js/gridmap.js
+++ b/spatial/static/spatial/js/gridmap.js
@@ -173,7 +173,7 @@ async function initGridMap(inputModelId, wmsURL, mapAttribution) {
     let backgroundLayer = new ol.layer.Tile({
 		source: new ol.source.OSM({
 			attributions: [
-				new ol.Attribution({
+				new ol.control.Attribution({
 					html: mapAttribution
 				})
 			]
diff --git a/spatial/static/spatial/js/spatialMap.js b/spatial/static/spatial/js/spatialMap.js
index b4aa7e7a..dec9f789 100644
--- a/spatial/static/spatial/js/spatialMap.js
+++ b/spatial/static/spatial/js/spatialMap.js
@@ -54,7 +54,7 @@ function initSpatialMap(lonLat, zoomLevel, mapAttribution, mapId) {
 	var backgroundLayer = new ol.layer.Tile({
 		source: new ol.source.OSM({
 			attributions: [
-				new ol.Attribution({
+				new ol.control.Attribution({
 					html: mapAttribution
 				})
 			]
diff --git a/spatial/templates/spatial/gridmap.html b/spatial/templates/spatial/gridmap.html
index 6ebd8a89..fc929189 100644
--- a/spatial/templates/spatial/gridmap.html
+++ b/spatial/templates/spatial/gridmap.html
@@ -22,9 +22,9 @@
 <script type="text/javascript" src="{% static "spatial/js/gridmap.js" %}"></script>
 <script type="text/javascript">
 	$(document).ready(function() {
-		var longitude = {{settings.MAP_CENTER_LONGITUDE|unlocalize}};
-		var latitude = {{settings.MAP_CENTER_LATITUDE|unlocalize}};
-		var zoomLevel = {{settings.MAP_ZOOMLEVEL}};
+		const longitude = {{settings.MAP_CENTER_LONGITUDE|unlocalize}};
+		const latitude = {{settings.MAP_CENTER_LATITUDE|unlocalize}};
+		const zoomLevel = {{settings.MAP_ZOOMLEVEL}};
 		initGridMap("{{model_id}}","{{url}}", "{{settings.MAP_ATTRIBUTION|safe}}");
 	});
 </script>
@@ -54,4 +54,4 @@
 		<div id="modelAbstractBody"></div>
 	</div>
        
-{% endblock %}
\ No newline at end of file
+{% endblock %}
-- 
GitLab