Constructor options for GoogleImageModel.

Hierarchy

Properties

Defines the request limits that correspond to your google account.

credentials?: boolean

Whether credentials should be included with every HTTP request.

maptype?: GoogleMapType

The type of map

requestHeaders?: null | HttpRequestHeaders

An object literal that represents headers (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified headers will be performed instead of creating an Image.

requestParameters?: {
    [parameterName: string]: any;
}

An object with query parameters (all optional except authentication) for the Google Static Maps API. All values must be strings, except for the style parameter These may include map parameters, feature parameters or reporting parameters. For the available parameters, see the Google Static Maps API documentation.

This object MUST NOT include the center, zoom, scale or size parameters.

For authentication, you have to include either a key parameter or a client parameter (never both).

The style parameter may be a string to specify a single style rules or an array of strings to specify multiple style rules.

//supplying multiple style rules
var model = new GoogleImageModel({
requestParameters: {
key: "myKey",
format: "png",
style: [
"feature:road.local|element:geometry|color:0x00ff00|weight:1|visibility:on",
"feature:landscape|element:geometry.fill|color:0x000000|visibility:on",
"feature:administrative|element:labels|weight:3.9|visibility:on|inverse_lightness:true",
"feature:poi|visibility:simplified"
]
}
});

The sensor parameter is mandatory when using the Google Static Maps API. The boolean parameter indicates whether your application is using a "sensor" (such as a GPS locator) to determine the user's location. By default, LuciadRIA sets this to false.

Type declaration

  • [parameterName: string]: any
serviceUrl?: string

The URL of the image service. By default this is Google's default Static maps API endpoint. If you use a proxy web service to sign the requests with a private key, you must set this to the URL of the proxy server.