bbecquet / Leaflet.PolylineOffset

Apply a relative pixel offset to polylines without changing their coordinates.
MIT License
152 stars 32 forks source link

Cannot set offset property with ngx-leaflet #25

Open ioas99 opened 4 years ago

ioas99 commented 4 years ago

Hello! I am new to leaflet and i am trying to use offset property in Angular 10 using ngx-leaflet. I installed polylineOffset with npm, but it seems like it doesn't extend property 'offset' to my Polyline type. I create the polyline like this: //replace 'lat' and 'long' with actual coordinates var coords = [ [lat, long], [lat, long], .... , [lat, long] ] const newPolyline= L.polyline(coords, { offset: -5 }); I get the following error: Argument of type '{ offset: number; }' is not assignable to parameter of type 'PolylineOptions'.

turbolego commented 2 years ago

I have the same issue.