You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following UnsupportedError was thrown building LayoutBuilder:
flutter: Unsupported operation: Infinity or NaN toInt
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 double.toInt (dart:core-patch/double.dart:183:36)
flutter: #1 double.round (dart:core-patch/double.dart:151:34)
flutter: #2 CustomPoint.round
package:flutter_map/…/core/point.dart:42
flutter: #3 MapState.getNewPixelOrigin
package:flutter_map/…/map/map.dart:272
flutter: #4 MapState.size=
package:flutter_map/…/map/map.dart:91
flutter: #5 FlutterMapState.build.
package:flutter_map/…/map/flutter_map_state.dart:92
flutter: #6 _LayoutBuilderElement._layout.
CustomPoint getNewPixelOrigin(LatLng center, [double zoom]) {
var viewHalf = size / 2.0;
return (project(center, zoom) - viewHalf).round();
}
CustomPoint round() {
var x = this.x is double ? this.x.round() : this.x;
var y = this.y is double ? this.y.round() : this.y;
return CustomPoint(x, y);
}
when it runs round(), it causes an exception error and it say x is infinity on debug point.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Hi, @bruceGwanhoOh. I'm getting the same issue. Since you closed this, does this mean you found a way to fix it? Like you, I'm just using the sample code.
Ah, I think I'm starting to get this. When I look at this, my MapState.size is being set to CustomPoint (411.42857142857144, Infinity). That appears to be a legitimate value, as box.dart:164 explicitly says infinity is an allowed value. So am I supposed to wrap this in another widget? Right now I just have it in a column.
with sample code, i keep getting an error
flutter: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following UnsupportedError was thrown building LayoutBuilder:
flutter: Unsupported operation: Infinity or NaN toInt
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 double.toInt (dart:core-patch/double.dart:183:36)
flutter: #1 double.round (dart:core-patch/double.dart:151:34)
flutter: #2 CustomPoint.round
package:flutter_map/…/core/point.dart:42
flutter: #3 MapState.getNewPixelOrigin
package:flutter_map/…/map/map.dart:272
flutter: #4 MapState.size=
package:flutter_map/…/map/map.dart:91
flutter: #5 FlutterMapState.build.
package:flutter_map/…/map/flutter_map_state.dart:92
flutter: #6 _LayoutBuilderElement._layout.
CustomPoint getNewPixelOrigin(LatLng center, [double zoom]) {
var viewHalf = size / 2.0;
return (project(center, zoom) - viewHalf).round();
}
CustomPoint round() {
var x = this.x is double ? this.x.round() : this.x;
var y = this.y is double ? this.y.round() : this.y;
return CustomPoint(x, y);
}
when it runs round(), it causes an exception error and it say x is infinity on debug point.
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: