forked from Gubancs/leaflet4vaadin
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Hello,
I am trying to create a plugin for leaflet-routing-machine.
I started with
@NpmPackage(value = "leaflet-routing-machine", version = "3.2.12")
@JsModule("leaflet-routing-machine/dist/leaflet-routing-machine.js")
@CssImport(value = "leaflet-routing-machine/dist/leaflet-routing-machine.css", themeFor = "leaflet-map")
public class Routing extends Layer {
}
but I am really clueles about JS, so I need a quick hint, how to this with vaadin:
L.Routing.control({
waypoints: [
L.latLng(57.74, 11.94),
L.latLng(57.6792, 11.949)
]
}).addTo(map);
I guess I somehow need to get hold of 'control' instance and pass waypoints, right? I will be able to work with it myself, but I just need small hint to get going:
- how do I get 'control' instance inside my Routing class?
- is extending
Layer
ok? Or shoud I extendLeafletControl
I have been through other plugins code, but they seem to be much simpler, so I wasn't able to figure it out myself.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels