1.0.5 • Published 1 year ago

baato-js-geocoder v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Baato JS Geocoder

A JS Plugin to Geocode search query with autocompetion feature. Also provides searchbox UI.

Usage

In Maplibregl

  • Include link to Geocoder JS script <script src="https://packagelink/baato-js-geocoder.js"></script>
  • Include link to Geocoder CSS style <link rel="stylesheet" href="https://packagelink/baato-js-geocoder.css">
  • Add SearchBar as a custom map control.

    // initialize a map search bar with Baato JS Geocoder.
    const searchBar = new baatojsgeocoder.SearchBar({
    baatoAccessToken
    });
    // add map search bar to map control
    map.addControl(searchBar, 'top-left');
  • Attach an event handler for the SearchBar.

// attach event handler for the search bar. This is fired as we type on the search bar
searchBar.geocoder.on('select', function (result) {
    searchByPlaceId(result.placeId);
});
1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago