Scalable2i class
Scalable x, y coordinates at the zoom level.
zoom must be a positive integer.
Coordinates x, y and zoom have integer values.
Scalable coordinates are coordinates associated with some level of detail
(LOD) or zoom
level. They are used for example by tiling schemes to
represent pixels and tiles of tile matrices.
- Implemented types
- Annotations
-
- @immutable
Constructors
- Scalable2i({required int zoom, required int x, required int y})
-
Create scalable x, y coordinates at the zoom level.
const
-
Scalable2i.build(Iterable<
num> coords, {int offset = 0}) -
Builds scalable coordinates from
coords
given in order: zoom, x, y.factory - Scalable2i.parse(String text, {Pattern delimiter = ','})
-
Parses scalable coordinates from
text
given in order: zoom, x, y.factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
values
→ Iterable<
int> -
Coordinate values of this position as an iterable of 3 items.
no setter
- x → int
-
The x coordinate value at zoom.
final
- y → int
-
The y coordinate value at zoom.
final
- zoom → int
-
The level of detail (or "zoom") for this scalable object.
final
Methods
-
copyWith(
{int? zoom, int? x, int? y}) → Scalable2i -
Copies the point with optional
zoom
,x
andy
overriding values. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
toText(
{String delimiter = ','}) → String -
A string representation of coordinate values separated by
delimiter
.override -
zoomIn(
) → Scalable2i -
Zooms in by one.
override
-
zoomOut(
) → Scalable2i -
Zooms out by one.
override
-
zoomTo(
covariant int zoom) → Scalable2i -
Zooms to the
zoom
level (a positive number).override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
-
operator [](
int i) → int -
A coordinate value by the coordinate axis index
i
.