updated map markers

This commit is contained in:
2023-12-12 16:16:17 +05:30
parent 56c07852f9
commit 445c53d21b
3 changed files with 50 additions and 38 deletions

View File

@ -721,9 +721,11 @@ class DestinationController extends GetxController {
LogManager().addLog(
"GPS : $currentLat, $currentLon - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
if (isInRog.value) {
await addGPStoDB(position.latitude, position.longitude);
lastGPSCollectedTime = DateTime.now();
}
}
currentLat = position.latitude;
currentLon = position.longitude;

View File

@ -267,7 +267,7 @@ class ExternalService {
);
String url = 'https://rogaining.sumasen.net/gifuroge/goal_from_rogapp';
//print('++++++++$url');
print('++++++++$url');
if (response.statusCode == 201) {
Map<String, dynamic> res = json.decode(utf8.decode(response.bodyBytes));
// print('----_res : $res ----');
@ -293,8 +293,8 @@ class ExternalService {
.toString()
.replaceAll('http://localhost:8100', 'http://rogaining.sumasen.net')
});
// print("-- json -- $rec");
// print('----- response2 is $response2 --------');
print("-- json -- $rec");
print('----- response2 is $response2 --------');
if (response2.statusCode == 200) {
res2 = json.decode(utf8.decode(response2.bodyBytes));
}

View File

@ -29,8 +29,9 @@ class MapWidget extends StatelessWidget {
GeoJSONMultiPoint p = i.geometry as GeoJSONMultiPoint;
//print("lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
//RegExp regex = RegExp(r'([.]*0)(?!.*\d)');
return Row(
mainAxisAlignment: MainAxisAlignment.start,
return Stack(
fit: StackFit.expand,
//mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () {
@ -81,7 +82,9 @@ class MapWidget extends StatelessWidget {
size: 6.0,
),
i.properties!['cp'] == -1
? Transform.rotate(
? Transform.translate(
offset: Offset(18, 0),
child: Transform.rotate(
alignment: Alignment.centerLeft,
origin: Offset.fromDirection(1, 26),
angle: 270 * pi / 180,
@ -89,14 +92,19 @@ class MapWidget extends StatelessWidget {
Icons.play_arrow_outlined,
color: Colors.red,
size: 70,
))
)),
)
: Container(
color: Colors.transparent,
),
],
)),
),
Container(
Transform.translate(
offset: Offset(40, 0),
child: Align(
alignment: Alignment.center,
child: Container(
color: Colors.purple.withOpacity(0.4),
// child: Text(TextUtils.getDisplayTextFeture(i),
// style: const TextStyle(
@ -115,7 +123,9 @@ class MapWidget extends StatelessWidget {
..strokeWidth = 1
..color = Colors.white,
),
))
)),
),
)
],
);
}
@ -216,8 +226,8 @@ class MapWidget extends StatelessWidget {
// "lat is ${p.geoSerie!.geoPoints[0].latitude} and lon is ${p.geoSerie!.geoPoints[0].longitude}");
return Marker(
alignment: Alignment.center,
height: 32.0,
width: 120.0,
height: 27.0,
width: 127.0,
point: LatLng(
p.coordinates[0][1], p.coordinates[0][0]),
child: getMarkerShape(i, context));