Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions types/woosmap.map/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ declare namespace woosmap.map.data {
}
}
declare namespace woosmap.map.Data {
class Point {
class Point implements Geometry<"Point", Coordinates> {
/**
* Constructs a Point geometry
*/
Expand All @@ -465,7 +465,7 @@ declare namespace woosmap.map.Data {
}
}
declare namespace woosmap.map.Data {
class MultiPoint {
class MultiPoint implements Geometry<"MultiPoint", Coordinates[]> {
/**
* Constructs a Multipoint geometry.
*/
Expand Down Expand Up @@ -498,7 +498,7 @@ declare namespace woosmap.map.Data {
}
}
declare namespace woosmap.map.Data {
class LineString {
class LineString implements Geometry<"LineString", Coordinates[]> {
constructor(points: woosmap.map.LatLng[] | woosmap.map.Coordinates[] | woosmap.map.LatLngLiteral[]);

/**
Expand All @@ -522,7 +522,7 @@ declare namespace woosmap.map.Data {
}
}
declare namespace woosmap.map.Data {
class MultiLineString {
class MultiLineString implements Geometry<"MultiLineString", Coordinates[][]> {
/**
* Constructs a MultiLineString.
* A MultiLineString is a collection of LineString.
Expand Down Expand Up @@ -555,7 +555,7 @@ declare namespace woosmap.map.Data {
}
}
declare namespace woosmap.map.Data {
class Polygon {
class Polygon implements Geometry<"Polygon", Coordinates[][]> {
/**
* Constructs a Polygon, using a set of linear ring.
*/
Expand Down Expand Up @@ -594,7 +594,7 @@ declare namespace woosmap.map.Data {
}
}
declare namespace woosmap.map.Data {
class MultiPolygon {
class MultiPolygon implements Geometry<"MultiPolygon", Coordinates[][][]> {
/**
* Constructs a MultiPolygon geometry.
* A MultiPolygon is a set of Polygons.
Expand Down Expand Up @@ -627,11 +627,11 @@ declare namespace woosmap.map.Data {
/**
* Returns `"MultiPolygon"`.
*/
getType(): string;
getType(): "MultiPolygon";
}
}
declare namespace woosmap.map.Data {
class GeometryCollection {
class GeometryCollection implements Geometry<"GeometryCollection", any> {
/**
* Constructs a geometry collection from an array of geometries.
*/
Expand Down Expand Up @@ -659,12 +659,18 @@ declare namespace woosmap.map {
* ImageMapType defines tiled image layer that can be added to the map.
* It supports both `xyz` and `tms` tile schemes.
*/
class ImageMapType {
class ImageMapType implements woosmap.map.MapType {
maxZoom: number;
minZoom: number;
/**
* ImageMapType defines tiled image layer that can be added to the map.
* It supports both `xyz` and `tms` tile schemes.
*/
constructor(opts: woosmap.map.ImageMapTypeOptions);

getTile(tileCoord: woosmap.map.Point, zoom: number, ownerDocument: null): Element | null;

releaseTile(tile: Element): void;
}
}
declare namespace woosmap.map {
Expand Down
2 changes: 2 additions & 0 deletions types/woosmap.map/woosmap.map-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,8 @@ const imageMapType = new woosmap.map.ImageMapType(imageMapTypeOptions);
// $ExpectType ImageMapType
imageMapType;

map.overlayMapTypes.insertAt(0, imageMapType);

/**
* helper functions for testing purpose
*/
Expand Down