update for reorder and location points

This commit is contained in:
Mohamed Nouffer
2022-09-01 19:14:18 +05:30
parent a4adf24e99
commit 09ac737de5
12 changed files with 196 additions and 143 deletions

View File

@ -84,42 +84,6 @@ class MapWidget extends StatelessWidget {
_popupController
.hideAllPopups(), // Hide popup when the map is tapped.
),
layers: [
// MarkerLayerOptions(
// markers: indexController.locations[0].collection.map((i) {
// print("i si ${i.properties!['location_id']}");
// GeoJsonMultiPoint p = i.geometry as GeoJsonMultiPoint;
// print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
// return Marker(
// anchorPos: AnchorPos.align(AnchorAlign.center),
// height: 70.0,
// width: 70.0,
// point: LatLng(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude),
// builder: (ctx) =>
// IconButton(
// icon: const Icon(Icons.pin_drop),
// tooltip: 'Increase volume by 10',
// onPressed: () {
// GeoJsonFeature? fs = indexController.getFeatureForLatLong(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude);
// print(fs);
// if(fs != null){
// if(indexController.currentFeature.length > 0) {
// indexController.currentFeature.clear();
// }
// indexController.currentFeature.add(fs);
// indexController.getAction();
// showModalBottomSheet(context: context, isScrollControlled: true,
// builder:((context) => BottomSheetWidget())
// );
// }
// },
// ),
// );
// }).toList(),
// ),
],
children: [
BaseLayer(),
LocationMarkerLayerWidget(),
@ -167,7 +131,7 @@ class MapWidget extends StatelessWidget {
height: 22.0,
width: 22.0,
point: LatLng(p.geoSerie!.geoPoints[0].latitude, p.geoSerie!.geoPoints[0].longitude),
builder: (ctx) => Icon(Icons.pin_drop),
//builder: (ctx) => Icon(Icons.pin_drop),
// builder: (ctx) => i.properties!["category"] != null ?
// ImageIcon(
// AssetImage("assets/images/${i.properties!["category"]}.png"),
@ -175,7 +139,22 @@ class MapWidget extends StatelessWidget {
// size:12.0,
// )
// : Icon(Icons.pin_drop),
builder: (ctx){
return Container(
width: 7,
height: 7,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.transparent,
border: Border.all(
color: Colors.red,
width: 3,
style: BorderStyle.solid
)
),
child: Icon(Icons.circle,size: 10.0,)
);
},
);
}).toList(),
builder: (context, markers) {