addMarker method

  1. @override
dynamic addMarker(
  1. LatLng point,
  2. dynamic callback(
    1. LatLng point
    )?
)
override

Add a marker on the map point and returned callback when you clicked on it

Implementation

@override
addMarker(LatLng point, Function(LatLng point)? callback) {
  if (callback != null) {
    super.markers[point] = callback;
  }

  NtkMapViewState.controller.runJavaScript("L.marker(L.latLng(${point.latitude}, ${point.longitude})).addTo(map);");
}