Leaflet.RotatedMarker icon indicating copy to clipboard operation
Leaflet.RotatedMarker copied to clipboard

Make a modular leaflet plugin

Open hozkok opened this issue 8 years ago • 1 comments

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).

hozkok avatar Nov 29 '16 15:11 hozkok

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

FeldrinH avatar Jun 10 '24 00:06 FeldrinH