ntk_map_view 0.0.2
ntk_map_view: ^0.0.2 copied to clipboard
A crossplatform map view for flutter based on leaflet
Crossplatform Flutter map widget, powered with Leaflet(that used OSM)
This package in early development
Usage map #
If you need only a blank map create a widget
NtkMapViewInterface();
You may a configure Html file you used to map
NtkMapViewInterface(
mapPath: 'assets/map.html'
);
If you need to full control with map, then you need to create a map controller in you initState()
Param is viewId, you may set null if you dont need customize it
NtkMapControllerInterface ntkMapController = NtkMapControllerInterface.init(null);
Then add you controller to you map widget
NtkMapViewInterface(
mapPath: 'assets/map.html',
mapController: ntkMapController,
);
Also you may configure callbacks for map
Map callbacks #
You may get callback on map create start
NtkMapViewInterface(
onCreateStart: (){
},
);
You may get callback on map create end, this callback return used controller
NtkMapViewInterface(
onCreateEnd: (controller){
},
);
You may get callback on user tap on map, this callback returned a point on map (LatLng)
NtkMapViewInterface(
onMapClick: (point) async {
},
);
Additional information #
This will add in future