StreetViewParameters class
Represents the parameters for a street view in Google Maps.
The StreetViewParameters class extends the Parameters class and provides additional parameters specific to street view.
The parameters include:
- location: The coordinates of the location to display in street view.
- pano: The panorama ID of the location to display in street view.
- heading: The heading angle of the street view camera. Must be between -180 and 360.
- pitch: The pitch angle of the street view camera. Must be between -90 and 90.
- fov: The field of view angle of the street view camera. Must be between 10 and 100.
The StreetViewParameters class also overrides the toMap method to convert the parameters into a map of key-value pairs.
Example usage:
final parameters = StreetViewParameters(
location: Coordinates(37.7749, -122.4194),
heading: 180,
pitch: 0,
fov: 90,
);
final parameterMap = parameters.toMap();
print(parameterMap);
Reference: https://developers.google.com/maps/documentation/embed/embedding-map#streetview_mode
- Inheritance
-
- Object
- Parameters
- StreetViewParameters
Constructors
- StreetViewParameters({required String key, required Coordinates? location, String? pano, Coordinates? center, int? zoom, MapType? mapType, String? language, String? region, int? heading, int? pitch, int? fov})
-
const
Properties
- center → Coordinates?
-
finalinherited
- fov → int?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heading → int?
-
final
- key → String
-
finalinherited
- language → String?
-
finalinherited
- location → Coordinates?
-
final
- mapType → MapType?
-
finalinherited
- mode → MapMode
-
finalinherited
- pano → String?
-
final
- pitch → int?
-
final
- region → String?
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- zoom → int?
-
finalinherited
Methods
-
getQueryParameters(
) → String -
Generates the query parameters string for the API request.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, String> -
Converts the parameters into a map representation.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited