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

Make a modular leaflet plugin #11

Open
hozkok opened this issue Nov 29, 2016 · 1 comment
Open

Make a modular leaflet plugin #11

hozkok opened this issue Nov 29, 2016 · 1 comment

Comments

@hozkok
Copy link

hozkok commented Nov 29, 2016

Right now, the plugin is extending L.Marker implicitly and this is not a very modular approach. That may cause ambiguity on importing/exporting ES6 modules.
Would be better to be able to import {RotatedMarker} from 'leaflet-rotatedmarker' explicitly.

A better idea might be to add a separate L.RotatedMarker plugin which extends L.Marker.

with this way, that would also be possible to add some typed library support as well (e.g. TypeScript d.ts file).

@FeldrinH
Copy link

For anyone who finds this looking for TypeScript support for this plugin, it is worth noting that there are type definitions available from DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-rotatedmarker

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