Options
All
  • Public
  • Public/Protected
  • All
Menu

This class will help you to add or use search bar for geocoding with a MapLibre GL JS map.

Hierarchy

  • AbstractPlaces

Index

Constructors

constructor

Methods

attachMap

close

  • close(): void
  • Close the result list.

    Returns void

destroy

  • destroy(): void
  • Clear created DOM elements and listeners. This could be usefull when you recreate a JawgPlace object for the same input.

    Returns void

getDefaultPosition

  • getDefaultPosition(): "top-left"

getValue

  • getValue(): string
  • Returns string

    The value of the <input>.

onAdd

  • onAdd(map: Map | Map): HTMLElement

search

  • Search a random text or lat/lon using Jawg Places. All features are points with properties, more details on our documentation.

    Parameters

    • text: string

      to search using Jawg Places

    Returns Promise<FeatureCollection>

    promise with the feature collection received from Jawg Places

setValue

  • setValue(value: string): void
  • Parameters

    • value: string

      The new value for the <input>.

    Returns void

showError

  • showError(error: any): void
  • Open the result list with the error message. This will trigger JawgPlacesOptions.onError.

    Parameters

    • error: any

      The error to show, can be a string or an object.

    Returns void

showResults

submit

  • submit(): void

Generated using TypeDoc