refactoring
This commit is contained in:
@ -2,8 +2,7 @@ import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_map/plugin_api.dart';
|
||||
import 'package:flutter_map_location_marker/flutter_map_location_marker.dart';
|
||||
import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:flutter_map_marker_cluster/flutter_map_marker_cluster.dart';2
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
@ -64,62 +63,11 @@ class MapWidget extends StatelessWidget {
|
||||
],
|
||||
|
||||
onPositionChanged: (MapPosition pos, isvalue){
|
||||
|
||||
// LatLng c1 = pos.center?? LatLng(0, 0);
|
||||
|
||||
// Timer(Duration(milliseconds:800), () {
|
||||
// print(pos.bounds!.center);
|
||||
// print("Yeah, this line is printed after 3 second");
|
||||
// LatLng c2 = pos.center?? LatLng(0, 0);
|
||||
// if(c1.latitude != 0 && c1.latitude == c2.latitude){
|
||||
// print("------ calling ----");
|
||||
// //indexController.loadLocationsBound();
|
||||
// }
|
||||
|
||||
// });
|
||||
|
||||
//
|
||||
},
|
||||
onTap: (_, __) =>
|
||||
_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(),
|
||||
|
||||
Reference in New Issue
Block a user