StaticMap class
Widget for displaying static map. It uses Image.network
widget.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- StaticMap
Constructors
-
StaticMap({Key? key, required String googleApiKey, double? width, double? height, List<
Marker> ? markers, List<GeocodedLocation> ? visible, GeocodedLocation? center, int? zoom, MapScale? scale, MapImageFormat? format, StaticMapType? maptype, String? mapId, List<Path> ? paths, String? language, String? region, String? signature, List<MapStyle> ? styles, bool scaleToDevicePixelRatio = true}) -
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 → double?
-
This parameter is affected by the scale parameter, the final output
height is the product of the height and scale values
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- 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?
-
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
- scaleToDevicePixelRatio → bool
-
If it is set to true, scale will be changed automaticly according to device
pixel ratio
final
- signature → String?
-
Signature is 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
-
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 → double?
-
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
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited