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

BalloonStyle not supported #13

Closed
bugfindr opened this issue Aug 13, 2020 · 1 comment
Closed

BalloonStyle not supported #13

bugfindr opened this issue Aug 13, 2020 · 1 comment

Comments

@bugfindr
Copy link

bugfindr commented Aug 13, 2020

@Raruto Can you please add code to support to BalloonStyle tag? :)

@Raruto
Copy link
Owner

Raruto commented Aug 14, 2020

Hi bugfindr,
I think you are referring to the <BalloonStyle> tag.

If you are interested in seeing new features supported I kindly suggest you start studying the library code and propose your own solutions (here you can see a simple example on how to extend it).

In order to disable the default balloons you can also use the following options:

var kmz = L.kmzLayer(null, {
  ballon: false, // disable default popup and tooltip.
  // bindPopup: false,
  // bindTooltip: false,
  geometryToLayer: function(data, xml) {
    let layer = this._geometryToLayer(data, xml);
    let el = xml.getElementsByTagName('BalloonStyle');
    layer.eachLayer( function(l) { /* you can bind your own ballon here */ } );
    return layer;
  }
});

More info:

Happy coding,
Raruto

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