Skip to end of metadata
Go to start of metadata

Defines a base class for request metadata.s

Definition

public abstract class MapsBaseRequest

Summary

The following table summarizes the members exposed in this class.

Public Constructors

MapsBaseRequest Constructor() Initializes a new instance of the MapsBaseRequest class.

Public Properties

ApiKey Your application's API key. This key identifies your application for purposes of quota management and so that Places added from your application are made immediately available to your app. Visit the APIs Console to create an API Project and obtain your key.
IsSSL True to use use the https protocol; false to use http. The default is false.
Sensor True to indicate that request comes from a device with a location sensor, otherwise false. This information is required by Google and does not affect the results.

Public Methods

GetUri() Gets the request URI.

Protected Methods

GetQueryStringParameters() Generate the query string parameters.

Public Constructors

public MapsBaseRequest()

Initializes a new instance of the MapsBaseRequest class.

Public Properties

public string ApiKey { get; set; }

Your application's API key. This key identifies your application for purposes of quota management and so that Places added from your application are made immediately available to your app. Visit the APIs Console to create an API Project and obtain your key.

public bool IsSSL { get; set; }

True to use use the https protocol; false to use http. The default is false.

public bool Sensor { get; set; }

True to indicate that request comes from a device with a location sensor, otherwise false. This information is required by Google and does not affect the results.

Remarks

It is unclear if Google refers to the device performing the request or the source of the location data. In the geocoding API reference at https://developers.google.com/maps/documentation/geocoding/ the definition is: sensor (required) — Indicates whether or not the geocoding request comes from a device with a location sensor. This implies that only mobile devices that are equipped with a location sensor (such as GPS) should set the Sensor value to True. So if a location is sent to a web server which then calls the Google API, it apparently should set the Sensor value to false, since the web server isn't a location sensor equipped device. In another page of their documentation, https://developers.google.com/maps/documentation/javascript/tutorial they say: The sensor parameter of the URL must be included, and indicates whether this application uses a sensor (such as a GPS locator) to determine the user's location. This implies something completely different, that the Sensor value must be set to true if the source of the location information is a sensor or not, regardless if the request is being performed by a location sensor equipped device or not.

Public Methods

public Uri GetUri()

Gets the request URI.

Protected Methods

protected QueryStringParametersList GetQueryStringParameters()

Generate the query string parameters.

  • No labels