Maps class final
A class that represents URLs for Google Maps and OpenStreetMap.
The Maps
class is a simple wrapper around two string URLs for Google Maps
and OpenStreetMap. It provides convenience methods for generating the full
URLs from the URL prefixes and the map IDs.
Example usage:
final maps = Maps(googleMaps: "abcdefg", openStreetMaps: "123456789");
print(maps.googleMapsUrl); // Output: "https://goo.gl/maps/abcdefg"
print(maps.openStreetMapsUrl); // Output: "https://www.openstreetmap.org/123456789"
- Implemented types
- Available Extensions
Constructors
Properties
- googleMaps → String
-
The Google Maps ID for this
Maps
object.final - googleMapsUrl → String
-
Returns the full Google Maps URL for this
Maps
object.no setter - hashCode → int
-
The hash code for this object.
no setteroverride
- openStreetMaps → String
-
The OpenStreetMap ID for this
Maps
object.final - openStreetMapsUrl → String
-
Returns the full OpenStreetMap URL for this
Maps
object.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
{JsonCodec codec = const JsonCodec()}) → String -
Returns a JSON-encoded string representation of the object.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant Maps other) → bool -
The equality operator.
override
Constants
- googleMapsPrefix → const String
- The URL prefix for Google Maps URLs.
- openStreetMapsPrefix → const String
- The URL prefix for OpenStreetMap URLs.