チェックポイントのラベル表示不具合修正
This commit is contained in:
@ -147,69 +147,14 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
child: getMarkerShape(feature),
|
||||
));
|
||||
|
||||
/*
|
||||
if (_markerCache.containsKey(latLng)) {
|
||||
markers.add(_markerCache[latLng]!);
|
||||
} else {
|
||||
Marker marker = Marker(
|
||||
point: latLng,
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
child: getMarkerShape(feature),
|
||||
// child: getMarkerShape(feature, context),
|
||||
);
|
||||
_markerCache[latLng] = marker;
|
||||
markers.add(marker);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
return markers;
|
||||
}
|
||||
|
||||
/*
|
||||
Future<List<Marker>> _getMarkers() async {
|
||||
List<Marker> markers = [];
|
||||
for (var feature in indexController.locations[0].features) {
|
||||
GeoJSONMultiPoint point = feature!.geometry as GeoJSONMultiPoint;
|
||||
LatLng latLng = LatLng(point.coordinates[0][1], point.coordinates[0][0]);
|
||||
|
||||
if (_markerCache.containsKey(latLng)) {
|
||||
markers.add(_markerCache[latLng]!);
|
||||
} else {
|
||||
Marker marker = Marker(
|
||||
point: latLng,
|
||||
width: 30.0,
|
||||
height: 30.0,
|
||||
builder: (ctx) => getMarkerShape(feature, ctx),
|
||||
//child: null,
|
||||
);
|
||||
_markerCache[latLng] = marker;
|
||||
markers.add(marker);
|
||||
}
|
||||
}
|
||||
return markers;
|
||||
}
|
||||
*/
|
||||
|
||||
// Widget getMarkerShape(GeoJSONFeature i, BuildContext context) {
|
||||
Widget getMarkerShape(GeoJSONFeature i) {
|
||||
/*
|
||||
String labelText = TextUtils.getDisplayTextFeture(i);
|
||||
if( i.properties!['cp'] == 0 ){
|
||||
labelText="Start/Goal";
|
||||
}else if(i.properties!['cp'] == -1 ){
|
||||
labelText="Start";
|
||||
}else if(i.properties!['cp'] == -2 ){
|
||||
labelText="Goal";
|
||||
//}else{
|
||||
// labelText=i.properties!['cp'];
|
||||
}
|
||||
*/
|
||||
//if( i.properties!['cp'] <= 0 ) {
|
||||
// debugPrint("Text=${labelText}");
|
||||
//}
|
||||
//final double maxWidth = labelText.length * 16.0; //16.0;
|
||||
GeoJSONMultiPoint p = i.geometry as GeoJSONMultiPoint;
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
@ -230,7 +175,8 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
isDismissible: true,
|
||||
builder: ((context) => BottomSheetNew(destination: des, isAlreadyCheckedIn: value.isNotEmpty)),
|
||||
builder: ((context) => BottomSheetNew(
|
||||
destination: des, isAlreadyCheckedIn: value.isNotEmpty)),
|
||||
).whenComplete(() {
|
||||
destinationController.shouldShowBottomSheet = true;
|
||||
destinationController.skipGps = false;
|
||||
@ -248,7 +194,9 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
shape: BoxShape.circle,
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
color: i.properties!['buy_point'] > 0 ? Colors.blue : Colors.red,
|
||||
color: i.properties!['buy_point'] > 0
|
||||
? Colors.blue
|
||||
: Colors.red,
|
||||
width: 3,
|
||||
style: BorderStyle.solid,
|
||||
),
|
||||
@ -285,11 +233,13 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container (
|
||||
//width: 200, // 幅を指定
|
||||
//width: 80, // 幅を指定
|
||||
//height: 60, // 40
|
||||
//color: Colors.purple.withOpacity(0.2),
|
||||
color: Colors.transparent,
|
||||
|
||||
//child: Text(' ').
|
||||
//constraints: const BoxConstraints(maxWidth: 1000.0), // 最大幅を設定
|
||||
//constraints: const BoxConstraints(maxWidth: 60.0), // 最大幅を設定
|
||||
//constraints: BoxConstraints(maxWidth: maxWidth), // 最大幅を設定
|
||||
//color: Colors.purple.withOpacity(0.2),
|
||||
child: Stack(
|
||||
@ -299,26 +249,28 @@ class _MapWidgetState extends State<MapWidget> with WidgetsBindingObserver {
|
||||
style: TextStyle(
|
||||
fontSize: 16, // 16
|
||||
fontWeight: FontWeight.w700,
|
||||
overflow: TextOverflow.visible,
|
||||
//height: 1.2,
|
||||
foreground: Paint()
|
||||
..style = PaintingStyle.stroke
|
||||
..strokeWidth = 2
|
||||
..strokeWidth = 1 // 2
|
||||
..color = Colors.white,
|
||||
),
|
||||
//maxLines: 1, // テキストを1行に制限
|
||||
//softWrap: false, // テキストの折り返しを無効化
|
||||
maxLines: 1, // テキストを1行に制限
|
||||
softWrap: false, // テキストの折り返しを無効化
|
||||
),
|
||||
Text( // テキスト
|
||||
TextUtils.getDisplayTextFeture(i),
|
||||
style: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
overflow: TextOverflow.visible,
|
||||
//fontWeight: FontWeight.bold,
|
||||
//height: 1.2,
|
||||
color: Colors.black,
|
||||
),
|
||||
//maxLines: 1, // テキストを1行に制限
|
||||
//softWrap: false, // テキストの折り返しを無効化
|
||||
maxLines: 1, // テキストを1行に制限
|
||||
softWrap: false, // テキストの折り返しを無効化
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user