A {@link ImageryLayerCatalogItem} representing a layer from the Mapbox server.

@alias MapboxMapCatalogItem
@constructor
@extends ImageryLayerCatalogItem

@param {Terria} terria The Terria instance.
486857
function(terria) {
  ImageryLayerCatalogItem.call(this, terria);

  this.url = defaultValue(this.url, "//api.mapbox.com/v4/");

  this.mapId = undefined;

  this.accessToken = undefined;

  /**
   * Gets or sets the file extension used to retrieve Open Street Map data
   * This property is observable.
   * @type {String}
   */
  this.fileExtension = "png";

  /**
   * Gets or sets the maximum tile level to retrieve from Open Street Map data
   * This property is observable.
   * @type {String}
   */
  this.maximumLevel = 25;

  knockout.track(this, ["fileExtension", "maximumLevel"]);
}
589562
function GoogleMapsMapType (layers, engine, map) {
  this._layers = layers;
  this._engine = engine;
  this._map = map;

  this._hoveredLayers = [];

  this.tileSize = new google.maps.Size(256, 256);
  this._internalView = new GMapsCartoDBLayerGroupView(this._engine._cartoLayerGroup, {
    nativeMap: map
  });
  this._id = this._internalView._id;
  this._internalView.on('featureClick', this._onFeatureClick, this);
  this._internalView.on('featureOver', this._onFeatureOver, this);
  this._internalView.on('featureOut', this._onFeatureOut, this);
  this._internalView.on('featureError', this._onFeatureError, this);
}
660578
function addLocationMarker(terria, initSources) {
  if (defined(terria.locationMarker)) {
    const position = terria.locationMarker.entities.values[0].position.getValue();
    const positionDegrees = Ellipsoid.WGS84.cartesianToCartographic(position);

    initSources.push({
      locationMarker: {
        name: terria.locationMarker.entities.values[0].name,
        latitude: CesiumMath.toDegrees(positionDegrees.latitude),
        longitude: CesiumMath.toDegrees(positionDegrees.longitude)
      }
    });
  }
}
1029533
function(map) {
        OpenLayers.Layer.prototype.setMap.apply(this, arguments);
        
        this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
        this.pane.style.display = this.div.style.display;
        this.pane.style.width="100%";
        this.pane.style.height="100%";
        if (OpenLayers.BROWSER_NAME == "msie") {
            this.pane.style.background = 
                "url(" + OpenLayers.Util.getImageLocation("blank.gif") + ")";
        }

        if (this.isFixed) {
            this.map.viewPortDiv.appendChild(this.pane);
        } else {
            this.map.layerContainerDiv.appendChild(this.pane);
        }

        // once our layer has been added to the map, we can load it
        this.loadMapObject();
    
        // if map didn't load, display warning
        if (this.mapObject == null) {
            this.loadWarningMessage();
        }
    }
580819
function SVGLoader(loadItem, preferXHR) {
		this.AbstractLoader_constructor(loadItem, preferXHR, createjs.Types.SVG);

		// public properties
		this.resultFormatter = this._formatResult;

		// protected properties
		this._tagSrcAttribute = "data";

		if (preferXHR) {
			this.setTag(createjs.Elements.svg());
		} else {
			this.setTag(createjs.Elements.object());
			this.getTag().type = "image/svg+xml";
		}
	}
1260447
function (deps) {
  if (!deps.layerGroupModel) throw new Error('layerGroupModel is required');
  if (!deps.layersCollection) throw new Error('layersCollection is required');
  if (!deps.dataviewsCollection) throw new Error('dataviewsCollection is required');

  this._layerGroupModel = deps.layerGroupModel;
  this._layersCollection = deps.layersCollection;
  this._dataviewsCollection = deps.dataviewsCollection;
}
546535
function failTile(e) {
        ++tileFailures;

        if (
          tileFailures > 5 &&
          defined(layer) &&
          globeOrMap.isImageryLayerShown({ layer })
        ) {
          // Too many failures, display an error message and hide the layer.
          if (
            catalogItem === catalogItem.terria.baseMap ||
            (catalogItem.terria.baseMap instanceof CompositeCatalogItem &&
              catalogItem.terria.baseMap.items.indexOf(catalogItem) >= 0)
          ) {
            globeOrMap.terria.error.raiseEvent(
              new TerriaError({
                sender: catalogItem,
                title: "Error accessing base map",
                message:
                  "An error occurred while attempting to download tiles for base map:<p><center>" +
                  catalogItem.terria.baseMap.name +
                  "</center></p> This may indicate that there is a " +
                  "problem with your internet connection, that the base map is temporarily unavailable, or that the base map " +
                  "is invalid.  Please select a different base map using the Map button in the top-right corner.  Further technical details may be found below.<br/><br/>" +
                  "<pre>" +
                  formatError(e) +
                  "</pre>"
              })
            );

            globeOrMap.hideImageryLayer({
              layer: layer
            });
            catalogItem.terria.baseMap = undefined;

            // Don't use this base map again on startup.
            catalogItem.terria.setLocalProperty("basemap", undefined);
          } else {
            globeOrMap.terria.error.raiseEvent(
              new TerriaError({
                sender: catalogItem,
                title: "Error accessing catalogue item",
                message:
                  "An error occurred while attempting to download tiles for catalogue item:<p><center>" +
                  catalogItem.name +
                  "</center></p> This may indicate that there is a " +
                  "problem with your internet connection, that the catalogue item is temporarily unavailable, or that the catalogue item " +
                  "is invalid.  The catalogue item has been hidden from the map.  You may re-show it in the Now Viewing panel to try again.  Further technical details may be found below.<br/><br/>" +
                  "<pre>" +
                  formatError(e) +
                  "</pre>"
              })
            );

            if (globeOrMap === catalogItem.terria.currentViewer) {
              catalogItem.isShown = false;
            } else {
              globeOrMap.hideImageryLayer({
                layer: layer
              });
            }
          }
        }

        tellMapToSilentlyGiveUp();
      }
57465
function(terria, url) {
  DataSourceCatalogItem.call(this, terria);

  this._dataSource = undefined;
  this._readyData = undefined;

  this.url = url;

  /**
   * Gets or sets the GeoJSON data, represented as a binary blob, object literal, or a Promise for one of those things.
   * If this property is set, {@link CatalogItem#url} is ignored.
   * This property is observable.
   * @type {Blob|Object|Promise}
   */
  this.data = undefined;

  /**
   * Gets or sets the URL from which the {@link GeoJsonCatalogItem#data} was obtained.  This will be used
   * to resolve any resources linked in the GeoJSON file, if any.
   * @type {String}
   */
  this.dataSourceUrl = undefined;

  /**
   * Gets or sets an object of style information which will be used instead of the default, but won't override
   * styles set on individual GeoJSON features. Styles follow the SimpleStyle spec: https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0
   * `marker-opacity` and numeric values for `marker-size` are also supported.
   * @type {Object}
   */
  this.style = undefined;

  /**
   * Gets or sets a value indicating whether the features in this GeoJSON should be clamped to the terrain surface.
   * @type {Boolean}
   */
  this.clampToGround = undefined;

  knockout.track(this, ["data", "dataSourceUrl", "style", "clampToGround"]);
}
228015
function init() {
  var myOptions = {
    zoom: 15,
    center: new google.maps.LatLng(61.18, -149.86),
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    draggableCursor: 'default'
  }
  map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
  svc = new gmaps.ags.GeometryService('http://sampleserver1.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer');
  
  google.maps.event.addListener(map, 'click', function(evt) {
    projectTo(evt.latLng);
  });
  
  iw = new google.maps.InfoWindow({
    maxWidth: 200,
    content: 'Click map to project the clicked point to Alaska Albers Feet Projection',
    position: map.getCenter()
  });
  iw.open(map);
}
888582
function(options) {
        options = options || {};
        L.Util.setOptions(this, options);
        this._layers = {};
        this._columns = this.options.columns || [];
        this.options.imageOptions = this.options.imageOptions || {};
        this.options.sheetNum = this.options.sheetNum || 0;
        this._parsedToOrig = {};
        this._lat = this._cleanColumnName(this.options.lat);
        this._lon = this._cleanColumnName(this.options.lon);
        this._columns = this._cleanColumns(this._columns);
    }
134544
function addViewSettings(terria, initSources) {
  const cameraExtent = terria.currentViewer.getCurrentExtent();

  // Add an init source with the camera position.
  const initialCamera = {
    west: CesiumMath.toDegrees(cameraExtent.west),
    south: CesiumMath.toDegrees(cameraExtent.south),
    east: CesiumMath.toDegrees(cameraExtent.east),
    north: CesiumMath.toDegrees(cameraExtent.north)
  };

  if (defined(terria.cesium)) {
    const cesiumCamera = terria.cesium.scene.camera;
    initialCamera.position = cesiumCamera.positionWC;
    initialCamera.direction = cesiumCamera.directionWC;
    initialCamera.up = cesiumCamera.upWC;
  }

  const homeCamera = {
    west: CesiumMath.toDegrees(terria.homeView.rectangle.west),
    south: CesiumMath.toDegrees(terria.homeView.rectangle.south),
    east: CesiumMath.toDegrees(terria.homeView.rectangle.east),
    north: CesiumMath.toDegrees(terria.homeView.rectangle.north),
    position: terria.homeView.position,
    direction: terria.homeView.direction,
    up: terria.homeView.up
  };

  const time = {
    dayNumber: terria.clock.currentTime.dayNumber,
    secondsOfDay: terria.clock.currentTime.secondsOfDay
  };

  let viewerMode;
  switch (terria.viewerMode) {
    case ViewerMode.CesiumTerrain:
      viewerMode = "3d";
      break;
    case ViewerMode.CesiumEllipsoid:
      viewerMode = "3dSmooth";
      break;
    case ViewerMode.Leaflet:
      viewerMode = "2d";
      break;
  }

  const terriaSettings = {
    initialCamera: initialCamera,
    homeCamera: homeCamera,
    baseMapName: terria.baseMap.name,
    viewerMode: viewerMode,
    currentTime: time
  };
  if (terria.showSplitter) {
    terriaSettings.showSplitter = terria.showSplitter;
    terriaSettings.splitPosition = terria.splitPosition;
  }
  initSources.push(terriaSettings);
}
1146266
function createMap(mapConfig) {
      app.debug('MapActions >>> createMap');
      var basemap = (0, _jsUtilsParams.getUrlParams)(location.href)[_jsConstantsAppConstants.MAP.basemap];
      if (basemap) {
        mapConfig.options.basemap = basemap;
      }
      var deferred = new Promise(function (resolve) {
        app.map = new _EsriMap['default'](mapConfig.id, mapConfig.options);
        app.map.on('load', function () {
          resolve();
        });
      });

      return deferred;
    }
165186
function updateOneLayer(item, currZIndex) {
  if (defined(item.imageryLayer) && defined(item.imageryLayer.setZIndex)) {
    if (item.supportsReordering) {
      item.imageryLayer.setZIndex(currZIndex.reorderable++);
    } else {
      item.imageryLayer.setZIndex(currZIndex.fixed++);
    }
  }
}
576863
function(terria) {
  ImageryLayerCatalogItem.call(this, terria);

  this._rawMetadata = undefined;
  this._metadata = undefined;
  this._dataUrl = undefined;
  this._dataUrlType = undefined;
  this._metadataUrl = undefined;
  this._legendUrl = undefined;
  this._rectangle = undefined;
  this._rectangleFromMetadata = undefined;
  this._intervalsFromMetadata = undefined;

  /**
   * Gets or sets the WMTS layer to use.  This property is observable.
   * @type {String}
   */
  this.layer = "";

  /**
   * Gets or sets the WMTS style to use.  This property is observable.
   * @type {String}
   */
  this.style = undefined;

  /**
   * Gets or sets the WMTS Tile Matrix Set ID to use.  This property is observable.
   * @type {String}
   */
  this.tileMatrixSetID = undefined;

  /**
   * Gets or sets the labels for each level in the matrix set.  This property is observable.
   * @type {Array}
   */
  this.tileMatrixSetLabels = undefined;

  /**
   * Gets or sets the maximum level in the matrix set.  This property is observable.
   * @type {Array}
   */
  this.tileMatrixMaximumLevel = undefined;

  /**
   * Gets or sets the tiling scheme to pass to the WMTS server when requesting images.
   * If this property is undefiend, the default tiling scheme of the provider is used.
   * @type {Object}
   */
  this.tilingScheme = undefined;

  /**
   * Gets or sets the formats in which to try WMTS GetFeatureInfo requests.  If this property is undefined, the `WebMapServiceImageryProvider` defaults
   * are used.  This property is observable.
   * @type {GetFeatureInfoFormat[]}
   */
  this.getFeatureInfoFormats = undefined;

  /**
   * Gets or sets a value indicating whether a time dimension, if it exists in GetCapabilities, should be used to populate
   * the {@link ImageryLayerCatalogItem#intervals}.  If the {@link ImageryLayerCatalogItem#intervals} property is set explicitly
   * on this catalog item, the value of this property is ignored.
   * @type {Boolean}
   * @default true
   */
  this.populateIntervalsFromTimeDimension = true;

  /**
   * Gets or sets the denominator of the largest scale (smallest denominator) for which tiles should be requested.  For example, if this value is 1000, then tiles representing
   * a scale larger than 1:1000 (i.e. numerically smaller denominator, when zooming in closer) will not be requested.  Instead, tiles of the largest-available scale, as specified by this property,
   * will be used and will simply get blurier as the user zooms in closer.
   * @type {Number}
   */
  this.minScaleDenominator = undefined;

  /**
   * Gets or sets the format in which to request tile images.  If not specified, 'image/png' is used.  This property is observable.
   * @type {String}
   */
  this.format = undefined;

  knockout.track(this, [
    "_dataUrl",
    "_dataUrlType",
    "_metadataUrl",
    "_legendUrl",
    "_rectangle",
    "_rectangleFromMetadata",
    "_intervalsFromMetadata",
    "layer",
    "style",
    "tileMatrixSetID",
    "tileMatrixMaximumLevel",
    "getFeatureInfoFormats",
    "tilingScheme",
    "populateIntervalsFromTimeDimension",
    "minScaleDenominator",
    "format"
  ]);

  // dataUrl, metadataUrl, and legendUrl are derived from url if not explicitly specified.
  overrideProperty(this, "metadataUrl", {
    get: function() {
      if (defined(this._metadataUrl)) {
        return this._metadataUrl;
      }

      return (
        cleanUrl(this.url) +
        "?service=WMTS&request=GetCapabilities&version=1.0.0"
      );
    },
    set: function(value) {
      this._metadataUrl = value;
    }
  });

  // The dataUrl must be explicitly specified.  Don't try to use `url` as the the dataUrl, because it won't work for a WMTS URL.
  overrideProperty(this, "dataUrl", {
    get: function() {
      return this._dataUrl;
    },
    set: function(value) {
      this._dataUrl = value;
    }
  });

  overrideProperty(this, "dataUrlType", {
    get: function() {
      if (defined(this._dataUrlType)) {
        return this._dataUrlType;
      } else {
        return "none";
      }
    },
    set: function(value) {
      this._dataUrlType = value;
    }
  });
}
733357
function (args) {
  if (false === (this instanceof Store)) throw new Error('new operator required');
  args = args || {};
  this.storeType = args.storeType || "Store";
  this.name = args.name || 'a ' + this.storeType;
  this.storeProperty = {
    isReady: false,
    canGetModel: false,
    canPutModel: false,
    canDeleteModel: false,
    canGetList: false
  };
  var unusedProperties = getInvalidProperties(args, ['name', 'storeType']);
  var errorList = [];
  for (var i = 0; i < unusedProperties.length; i++) errorList.push('invalid property: ' + unusedProperties[i]);
  if (errorList.length > 1) throw new Error('error creating Store: multiple errors');
  if (errorList.length) throw new Error('error creating Store: ' + errorList[0]);
}
1354050
function nextLayerFromIndex(index) {
    const imageryProvider = catalogItem.createImageryProvider(
      catalogItem.intervals.get(index).data
    );
    imageryProvider.enablePickFeatures = false;
    catalogItem._nextLayer = ImageryLayerCatalogItem.enableLayer(
      catalogItem,
      imageryProvider,
      0.0
    );
    updateSplitDirection(catalogItem);
    ImageryLayerCatalogItem.showLayer(catalogItem, catalogItem._nextLayer);
  }
1207494
function initArray(layer) {
       // initialize the array
       layer.layerData = new Array(layer.cols);

       for (var x = 0; x < layer.cols; x++) {
         layer.layerData[x] = new Array(layer.rows);

         for (var y = 0; y < layer.rows; y++) {
           layer.layerData[x][y] = null;
         }
       }
     }