Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throbber/spinner is not shown while "suggest" is running #242

Closed
keul opened this issue May 15, 2019 · 0 comments
Closed

Throbber/spinner is not shown while "suggest" is running #242

keul opened this issue May 15, 2019 · 0 comments

Comments

@keul
Copy link
Contributor

keul commented May 15, 2019

When using the geocode method on the IGeocode instance, a spinner is displayed showing the fetch attempt. This is not true if I use my suggest method.

This is easily hackable from outside:

    const control = new L.Control.Geocoder({
        ....
    });
    control.on(
      'startsuggest',
      function() {
        DomUtil.addClass(
          this._container,
          'leaflet-control-geocoder-throbber'
        );
      },
      this
    );
    control.on(
      'finishsuggest',
      function() {
        DomUtil.removeClass(
          this._container,
          'leaflet-control-geocoder-throbber'
        );
      },
      this
    );

But I think this should be a default behavior.

keul added a commit to bopen/leaflet-control-geocoder that referenced this issue May 15, 2019
@keul keul mentioned this issue May 15, 2019
@simon04 simon04 closed this as completed in ceeb796 Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant