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

Impossible add plugin leaflet-spin #444

Open
juanmafont opened this issue Nov 9, 2020 · 1 comment
Open

Impossible add plugin leaflet-spin #444

juanmafont opened this issue Nov 9, 2020 · 1 comment

Comments

@juanmafont
Copy link

juanmafont commented Nov 9, 2020

I'm trying to add plugin leaflet-spin from here: https://github.com/makinacorpus/Leaflet.Spin

I had read #366 and similars, but I can't get add this simple plugin:

import * as L from 'leaflet';
import 'leaflet-spin';
import { MapComponent } from '@yaga/leaflet-ng2';

@Component({
    selector: 'app',
    template: `<yaga-map><!-- ... --></yaga-map>`
})

export class AppComponent implements AfterViewInit {
    @ViewChild(MapComponent) private mapComponent: MapComponent;
    
public ngAfterViewInit(): void {
        const spinPlugin = (L as any).Spinner();
        this.mapComponent.addControl(spinPlugin);
    }
}

but when I try to use I always got: Property 'Spinner' does not exist on type 'MapComponent'.

this.mapComponent.Spinner(true);

I try with other posibilities Spin(). spin() spinner() but not luck.

If possible add this plugin to yaga leaflet-ng2 ?

Thank you very much.

@atd-schubert
Copy link
Member

Do you also import Spin.JS? I don't know this plugin, but it seems possible to add it to leaflet-ng2 at first glance

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

2 participants