|
|
|
@ -32,11 +32,17 @@ class OrderTrackingPageState extends State<OrderTrackingPage> {
|
|
|
|
|
Set<Marker> markers = {};
|
|
|
|
|
Map<PolylineId, Polyline> polylines = {};
|
|
|
|
|
|
|
|
|
|
LatLng startLocation = const LatLng(0,0);
|
|
|
|
|
LatLng startLocation = const LatLng(17.416806,78.4521704);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LocationController locationController = Get.put(LocationController());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
@ -103,15 +109,15 @@ class OrderTrackingPageState extends State<OrderTrackingPage> {
|
|
|
|
|
PolylineId id = const PolylineId("poly");
|
|
|
|
|
Polyline polyline = Polyline(
|
|
|
|
|
polylineId: id,
|
|
|
|
|
color: Colors.blueAccent,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
points: polylineCoordinates,
|
|
|
|
|
width: 8,
|
|
|
|
|
width: 4,
|
|
|
|
|
);
|
|
|
|
|
polylines[id] = polyline;
|
|
|
|
|
|
|
|
|
|
var position = CameraPosition(
|
|
|
|
|
target: LatLng(startLocation.latitude, startLocation.longitude),
|
|
|
|
|
zoom: 21);
|
|
|
|
|
zoom: 18);
|
|
|
|
|
|
|
|
|
|
final GoogleMapController controller = await mapController.future;
|
|
|
|
|
controller.animateCamera(CameraUpdate.newCameraPosition(position));
|
|
|
|
@ -129,7 +135,7 @@ class OrderTrackingPageState extends State<OrderTrackingPage> {
|
|
|
|
|
initialCameraPosition: CameraPosition(
|
|
|
|
|
//innital position in map
|
|
|
|
|
target: startLocation, //initial position
|
|
|
|
|
zoom: 5.0, //initial zoom level
|
|
|
|
|
zoom: 8.0, //initial zoom level
|
|
|
|
|
),
|
|
|
|
|
markers: markers,
|
|
|
|
|
//markers to show on map
|
|
|
|
|