Class: GoogleEarthEnterpriseMapsProvider

GoogleEarthEnterpriseMapsProvider

new GoogleEarthEnterpriseMapsProvider()

Provide image tiles using Google Earth Imaging API.

Notes: This image provider cannot work with public Google Earth servers. It works together with Google Earth Enterprise servers.

   By default, the Google Earth Enterprise server does not setCross-Origin Resource Sharingheaders.You can use a proxy server to add these headers, or add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and '<Directory "/opt/google/gehttpd/htdocs">' directives in /opt/google/gehttpd/conf/gehttpd.conf.

   This provider is used for the 2D map API as part of Google Earth Enterprise.For the 3D Earth API, you must useGoogleEarthEnterpriseImageryProvider
Name Type Default Description
options.url String

The URL of the Google Earth server where the images are stored.

options.channel Number

The channel (ID) to be used when requesting data from the server. Can the channel number be viewed by checking the location in earth.localdomain/default_map/query? The path of request=Json&vars=geeServer Defs/default_map may vary depending on your Google Earth Enterprise server configuration. Find the 'id' associated with the 'ImageryMaps' request type. There may be more than one available ID. Example: { layers: [ { id: 1002, requestType: "ImageryMaps" }, { id: 1007, requestType: "VectorMapsRaster" } ] }

options.path String "/default_map" optional

The path of the Google Earth server that carries the images.

options.maximumLevel Number optional

The maximum level of detail supported by Google Earth Enterprise servers is undefined if there are no restrictions.

options.tileDiscardPolicy TileDiscardPolicy optional

The strategy for determining whether tiles are invalid and should be discarded. To ensure that no tiles are discarded, build and pass a NeverTileDiscardPolicy as this parameter.

options.ellipsoid Ellipsoid optional

Ellipsoid. If not specified, use WGS84 ellipsoid.

options.proxy Proxy optional

Proxy used for requests. This object will have a getURL function that returns a proxy URL when needed.

See:
Throws:
  • Unable to find layer options. channel with channel (id).

    Type
    RuntimeError
  • Unable to find version in channel (id) options. channel.

    Type
    RuntimeError
  • Unsupported projection data projection.

    Type
    RuntimeError
Example
var google = new SuperMap3D.GoogleEarthEnterpriseMapsProvider({
    url : 'https://earth.localdomain',
    channel : 1008
});

Members

readonly channelNumber

Retrieve the currently used image channel (ID).

readonly creditCredit

Obtain the copyright statement to be displayed when this image provider is active. This is usually used to prove the source of the image. This function should not be called before Google Earth Enterprise Maps Provider # ready returns true.

defaultGammaNumber

The default ImageryLayer#gamma to use for imagery layers created for this provider. By default, this is set to 1.9. Changing this value after creating an ImageryLayer for this provider will have no effect. Instead, set the layer's ImageryLayer#gamma property.

Default Value:
1.9

readonly errorEventEvent

Retrieve the event triggered when the image provider encounters an asynchronous error. By subscribing to events, you will receive error notifications and may potentially recover from them. The event listener is passed an instance of TileProviderError.

readonly hasAlphaChannelBoolean

Get a value indicating whether the image provided by this image provider contains an alpha channel. If this attribute is false, the alpha channel (if present) will be ignored. If this property is true, any image without an alpha channel will be processed.

readonly maximumLevelNumber

Obtain the maximum level of granularity that can be requested. It should not be called before Google Earth Enterprise Maps Provider # ready returns true.

readonly minimumLevelNumber

Obtain the minimum level of granularity that can be requested. This function should not be called before GoogleEarthEnterpriseMapsProvider # ready returns true.

readonly pathString

Retrieve the URL path of data on Google Earth servers.

readonly proxyProxy

Get the proxy used by the provider.

readonly readyBoolean

Get a value indicating whether the provider is ready to use.

readonly readyPromisePromise.<Boolean>

Get a Promise that parses to true when the provider is ready to use.

readonly rectangleRectangle

Obtain the rectangle (in radians) of the image provided by this instance. This function should not be called before GoogleEarthEnterpriseMapsProvider # ready returns true.

readonly requestTypeString

Retrieve the data type requested from the provider. This function should not be called before GoogleEarthEnterpriseMapsProvider # ready returns true.

readonly tileDiscardPolicyTileDiscardPolicy

Obtain tile discard strategy. If it is not undefined, the discard strategy is responsible for filtering out "lost" textures through the shoulderDiscardImage function. If this function returns undefined, no tiles will be filtered. This function should not be called before Google Earth Enterprise Maps Provider # ready returns true.

readonly tileHeightNumber

Get the height of each tile in pixels. This function should not be called before GoogleEarthEnterpriseMapsProvider # ready returns true.

readonly tileWidthNumber

Get the width of each tile in pixels. This function should not be called until GoogleEarthBusinessMapsProvider # ready returns true.

readonly tilingSchemeTilingScheme

Obtain the slicing scheme used by this provider. This function should not be called before GoogleEarthEnterpriseMapsProvider # ready returns true.

readonly urlString

Get the URL of the Google Earth Map server.

readonly versionNumber

Retrieve the data version used by the provider. Google Earth Enterprise Maps Provider # ready should not be called until it returns true.

Methods

getTileCredits(x, y, level){Array.<Credit>}

Retrieve the copyright information to be displayed when displaying a given tile.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

The level of tiles.

Throws:

GetTileCredits must not be called before the video provider is ready.

Type
DeveloperError
Returns:
Type Description
Array.<Credit> The copyright information to be displayed when displaying tiles.

pickFeatures(x, y, level, longitude, latitude){Promise.<Array.<ImageryLayerFeatureInfo>>|undefined}

The image provider currently does not support feature selection, so this function returns undefined.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

The level of tiles.

longitude Number

Select the longitude of the feature.

latitude Number

Select the latitude of the feature.

Returns:
Type Description
Promise.<Array.<ImageryLayerFeatureInfo>> | undefined When asynchronous collection is completed, the Promise of the collected features will be parsed. The parsed value is an array composed of ImageryLayerElementInfo instances. If no features are found at the given location, the array may be empty. If extraction is not supported, the array may also be undefined.

requestImage(x, y, level, request){Promise.<(Image|Canvas)>|undefined}

Request to specify the image of the tile. This function should not be called until GoogleEarthBusinessMapsProvider # ready returns true.

Name Type Description
x Number

The X-coordinate of the tile.

y Number

The Y coordinate of the tile.

level Number

The level of tiles.

request Request optional

Request object. For internal use only.

Throws:

RequestImage must not be called before the image provider is ready.

Type
DeveloperError
Returns:
Type Description
Promise.<(Image|Canvas)> | undefined A promise for the image, which will be parsed when the image is available. If there are too many active requests to the server, it will not be defined and the request should be retried later. The parsed image can be an image object or a Canvas DOM object.