terra-draw 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,6 +33,14 @@ interface TerraDrawEventListeners {
33
33
  select: SelectListener;
34
34
  deselect: DeselectListener;
35
35
  }
36
+ type GetFeatureOptions = {
37
+ pointerDistance?: number;
38
+ includePolygonsWithinPointerDistance?: boolean;
39
+ ignoreSelectFeatures?: boolean;
40
+ ignoreCoordinatePoints?: boolean;
41
+ ignoreCurrentlyDrawing?: boolean;
42
+ ignoreClosingPoints?: boolean;
43
+ };
36
44
  type TerraDrawEvents = keyof TerraDrawEventListeners;
37
45
  declare class TerraDraw {
38
46
  private _modes;
@@ -174,18 +182,12 @@ declare class TerraDraw {
174
182
  getFeaturesAtLngLat(lngLat: {
175
183
  lng: number;
176
184
  lat: number;
177
- }, options?: {
178
- pointerDistance: number;
179
- ignoreSelectFeatures: boolean;
180
- }): GeoJSONStoreFeatures[];
185
+ }, options?: GetFeatureOptions): GeoJSONStoreFeatures[];
181
186
  /**
182
187
  * Takes a given pointer event and will return point and linestrings that are
183
188
  * a given pixel distance away from the longitude/latitude, and any polygons which contain it.
184
189
  */
185
- getFeaturesAtPointerEvent(event: PointerEvent | MouseEvent, options?: {
186
- pointerDistance?: number;
187
- ignoreSelectFeatures?: boolean;
188
- }): GeoJSONStoreFeatures[];
190
+ getFeaturesAtPointerEvent(event: PointerEvent | MouseEvent, options?: GetFeatureOptions): GeoJSONStoreFeatures[];
189
191
  /**
190
192
  * A method for stopping Terra Draw. Will clear the store, deregister the adapter and
191
193
  * remove any rendered layers in the process.