StaticMapController class

controls static map

Constructors

StaticMapController({required String googleApiKey, required int width, required int height, String? mapId, List<Marker>? markers, List<MapStyle>? styles, List<Path>? paths, GeocodedLocation? center, int? zoom, MapScale? scale, MapImageFormat? format, StaticMapType? maptype, String? language, String? region, String? signature, List<GeocodedLocation>? visible})
const

Properties

center GeocodedLocation?
Defines the center of the map, equidistant from all edges of the map.
final
format MapImageFormat?
defines the format of the resulting image. By default, the Maps Static API creates PNG images. There are several possible formats including GIF, JPEG and PNG types. Which format you use depends on how you intend to present the image. JPEG typically provides greater compression, while GIF and PNG provide greater detail.
final
googleApiKey String
allows you to monitor your application's API usage in the Google Cloud Platform Console, and ensures that Google can contact you about your application if necessary
final
hashCode int
The hash code for this object.
no setterinherited
height int
This parameter is affected by the scale parameter, the final output height is the product of the height and scale values
final
image ImageProvider<Object>
Returns ImageProvider with current map.
no setter
language String?
Defines the language to use for display of labels on map tiles. Note that this parameter is only supported for some country tiles; if the specific language requested is not supported for the tile set, then the default language for that tileset will be used.
final
mapId String?
A Map ID is a unique identifier that represents a single instance of a Google Map. You can create Map IDs and update a style associated with a Map ID at any time in the Google Cloud Console without changing embedded JSON styling in your application code.
final
maptype StaticMapType?
Defines the type of map to construct. There are several possible maptype values, including roadmap, satellite, hybrid, and terrain.
final
markers List<Marker>?
final
paths List<Path>?
final
region String?
Defines the appropriate borders to display, based on geo-political sensitivities. Accepts a region code specified as a two-character ccTLD ('top-level domain') value
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale MapScale?
Affects the number of pixels that are returned. scale=2 returns twice as many pixels as scale=1 while retaining the same coverage area and level of detail (i.e. the contents of the map don't change). This is useful when developing for high-resolution displays, or when generating a map for printing. The default value is 1. Accepted values are 2 and 4.
final
signature String?
is a digital signature used to verify that any site generating requests using your API key is authorized to do so. Requests without a digital signature might fail
final
styles List<MapStyle>?
final
url Uri
no setter
visible List<GeocodedLocation>?
(optional) specifies one or more locations that should remain visible on the map, though no markers or other indicators will be displayed. Use this parameter to ensure that certain features or map locations are shown on the Maps Static API.
final
width int
This parameter is affected by the scale parameter, the final output width is the product of the width and scale values
final
zoom int?
defines the zoom level of the map, which determines the magnification level of the map. This parameter takes a numerical value corresponding to the zoom level of the region desired.
final

Methods

copyWith({String? googleApiKey, int? width, int? height, List<Marker>? markers, List<Path>? paths, GeocodedLocation? center, int? zoom, MapScale? scale, MapImageFormat? format, StaticMapType? maptype, String? language, String? region, String? signature}) StaticMapController
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited