Options
All
  • Public
  • Public/Protected
  • All
Menu

This model accesses the Static Maps API (v2) of Google to retrieve the images. Please review the Google Terms of Service carefully to determine if your application may use the Static Maps API.

For information about the static maps API, check the Google Static Maps API documentation.

Note that depending on your Google account type, different usage limits apply. One of these limits is the maximum image size that can be requested from the Google servers. If the model cannot satisfy a request for an image that is larger than the maximum image size determined by google, it will request a smaller image at a lower zoom level. This will result in a lower resolution raster visualization which will still fill the entire view.

The Google Static Map Image service can only serve images from a predetermined number of zoom levels. When an image is requested for a scale that falls in between two supported zoom levels, the more detailed zoom level is returned to obtain the best quality. Note that if the google image contains text, this text will be scaled and appear smaller than intended.

You can use a RasterImageLayer to visualize this model on a map.

//1) using an application key to configure the model
var model2 = new GoogleImageModel({
requestParameters: {
  key: "{APPLICATION_KEY}"
});

//2)configuring the proxy to sign requests when using a business account
var model3 = new GoogleImageModel({
   serviceUrl: "http://localhost:8072/sampleservices/gmaps/sign/staticmap",
   requestParameters: {
     client: "{CLIENT_ID}"
 });

Hierarchy

Implements

Overview

Constructors

constructor

Events

on

  • (event: "Invalidated", callback: (...args: any[]) => void, context?: any): Handle
  • An event indicating that this Controller is invalidated. Invalidated means that data has changed and the visualization needs to be refreshed. This event fires when #invalidate is called.

    Parameters

    • event: "Invalidated"
    • callback: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional context: any

    Returns Handle

Accessors

bounds

coordinateType

credentials

  • get credentials(): boolean
  • set credentials(value: boolean): void
  • Indicates whether or not credentials should be included with HTTP requests.

    Set this to true if the server requires credentials, like HTTP basic authentication headers or cookies. You should disable if the server is configured to allow cross-origin requests from all domains (Acces-Control-Allow-Origin=*). If the server allows CORS requests from all domains, the browser will block all requests where credentials=true.

    Once set, all subsequent HTTP requests will use the newly set value.

    The default value is false.

    Returns boolean

  • Indicates whether or not credentials should be included with HTTP requests.

    Set this to true if the server requires credentials, like HTTP basic authentication headers or cookies. You should disable if the server is configured to allow cross-origin requests from all domains (Acces-Control-Allow-Origin=*). If the server allows CORS requests from all domains, the browser will block all requests where credentials=true.

    Once set, all subsequent HTTP requests will use the newly set value.

    The default value is false.

    Parameters

    • value: boolean

    Returns any

modelDescriptor

reference

  • The spatial reference of the Google model. This is defined by the WGS:84 datum with a pseudo-mercator cylindrical projection. It is known as "EPSG:900913" or "EPSG:3857".

    Returns CoordinateReference

requestHeaders

  • get requestHeaders(): {} | null
  • set requestHeaders(value: {} | null): void
  • Headers to send with every HTTP request.

    An object literal that represents the headers to send with every HTTP request. The property names represent HTTP header names, the property values represent the HTTP header values. This property can be set dynamically (post-construction). Once set, all subsequent HTTP requests will use the newly set headers.

    Note that when custom headers are being sent to a server on another domain, the server will have to properly respond to pre-flight CORS requests (a HTTP OPTION request sent by the browser before doing the actual request). The server has to indicate that the header can be used in the actual request, by including it in the pre-flight's Access-Control-Allow-Headers response header.

    The default value is null.

    Returns {} | null

  • Headers to send with every HTTP request.

    An object literal that represents the headers to send with every HTTP request. The property names represent HTTP header names, the property values represent the HTTP header values. This property can be set dynamically (post-construction). Once set, all subsequent HTTP requests will use the newly set headers.

    Note that when custom headers are being sent to a server on another domain, the server will have to properly respond to pre-flight CORS requests (a HTTP OPTION request sent by the browser before doing the actual request). The server has to indicate that the header can be used in the actual request, by including it in the pre-flight's Access-Control-Allow-Headers response header.

    The default value is null.

    Parameters

    • value: {} | null

    Returns any

Methods

invalidate

  • (): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method