deliveryboy commit

dev
suresh 2 years ago
parent a91054394b
commit 44d2066dec

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -15,8 +15,10 @@ class LocationController<T> extends GetxController {
Location location = Location(); Location location = Location();
// final Rx<LatLng?> locationPosition = const LatLng(0.0, 0.0).obs; // final Rx<LatLng?> locationPosition = const LatLng(0.0, 0.0).obs;
/*final Rx<LatLng?> locationPosition =
const LatLng(12.90618717, 77.5844983).obs;*/
final Rx<LatLng?> locationPosition = final Rx<LatLng?> locationPosition =
const LatLng(12.90618717, 77.5844983).obs; const LatLng(17.491659, 78.391983).obs;
bool locationServiceActive = true; bool locationServiceActive = true;
@ -26,8 +28,8 @@ class LocationController<T> extends GetxController {
@override @override
void onInit() async { void onInit() async {
await _getBytesFromAsset(AppImages.pickupMarker, AppSizes.mapPinSize * 0.2); await _getBytesFromAsset(AppImages.pickupMarker, AppSizes.mapPinSize * 0.1);
await _getBytesFromAsset(AppImages.dropMarker, AppSizes.mapPinSize * 0.2); await _getBytesFromAsset(AppImages.dropMarker, AppSizes.mapPinSize * 0.05);
super.onInit(); super.onInit();
refreshToLiveLocation(); refreshToLiveLocation();

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

Loading…
Cancel
Save