updated map markers
This commit is contained in:
@ -721,8 +721,10 @@ class DestinationController extends GetxController {
|
||||
LogManager().addLog(
|
||||
"GPS : $currentLat, $currentLon - ${DateTime.now().hour}:${DateTime.now().minute}:${DateTime.now().second}:${DateTime.now().microsecond}");
|
||||
|
||||
await addGPStoDB(position.latitude, position.longitude);
|
||||
lastGPSCollectedTime = DateTime.now();
|
||||
if (isInRog.value) {
|
||||
await addGPStoDB(position.latitude, position.longitude);
|
||||
lastGPSCollectedTime = DateTime.now();
|
||||
}
|
||||
}
|
||||
|
||||
currentLat = position.latitude;
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
@ -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,41 +82,50 @@ class MapWidget extends StatelessWidget {
|
||||
size: 6.0,
|
||||
),
|
||||
i.properties!['cp'] == -1
|
||||
? Transform.rotate(
|
||||
alignment: Alignment.centerLeft,
|
||||
origin: Offset.fromDirection(1, 26),
|
||||
angle: 270 * pi / 180,
|
||||
child: const Icon(
|
||||
Icons.play_arrow_outlined,
|
||||
color: Colors.red,
|
||||
size: 70,
|
||||
))
|
||||
? Transform.translate(
|
||||
offset: Offset(18, 0),
|
||||
child: Transform.rotate(
|
||||
alignment: Alignment.centerLeft,
|
||||
origin: Offset.fromDirection(1, 26),
|
||||
angle: 270 * pi / 180,
|
||||
child: const Icon(
|
||||
Icons.play_arrow_outlined,
|
||||
color: Colors.red,
|
||||
size: 70,
|
||||
)),
|
||||
)
|
||||
: Container(
|
||||
color: Colors.transparent,
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
Container(
|
||||
color: Colors.purple.withOpacity(0.4),
|
||||
// child: Text(TextUtils.getDisplayTextFeture(i),
|
||||
// style: const TextStyle(
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.red,
|
||||
// ))),
|
||||
child: Text(
|
||||
TextUtils.getDisplayTextFeture(i),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
// アウトラインの色と幅を設定
|
||||
foreground: Paint()
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 1
|
||||
..color = Colors.white,
|
||||
),
|
||||
))
|
||||
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(
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// color: Colors.red,
|
||||
// ))),
|
||||
child: Text(
|
||||
TextUtils.getDisplayTextFeture(i),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
// アウトラインの色と幅を設定
|
||||
foreground: Paint()
|
||||
..style = PaintingStyle.stroke
|
||||
..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));
|
||||
|
||||
Reference in New Issue
Block a user