Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ошибка при вызове YandexMapController.selectGeoObject #382

Open
kstkarus opened this issue Oct 14, 2024 · 0 comments
Open

Comments

@kstkarus
Copy link

Пытаюсь выделять выбранный объект на карте, однако при попытке выделения некоторых объектов получаю ошибку

onObjectTap: (geoObject) {
  if (ymController == null) {
    return;
  }

  var metadata = geoObject.selectionMetadata;

  if (metadata != null) {
    ymController!.selectGeoObject(
        objectId: metadata.objectId,
        layerId: metadata.layerId,
        dataSourceName: metadata.dataSourceName,
        groupId: metadata.groupId
    );
  }
},

Сама ошибка

E/MethodChannel#yandex_mapkit/yandex_map_0(26115): Failed to handle method call
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.unact.yandexmapkit.lite.YandexMapController.selectGeoObject(YandexMapController.java:258)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.unact.yandexmapkit.lite.YandexMapController.onMethodCall(YandexMapController.java:188)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Handler.handleCallback(Handler.java:959)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Looper.loopOnce(Looper.java:232)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Looper.loop(Looper.java:317)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.app.ActivityThread.main(ActivityThread.java:8592)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): Failed to handle method call
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.unact.yandexmapkit.lite.YandexMapController.selectGeoObject(YandexMapController.java:258)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.unact.yandexmapkit.lite.YandexMapController.onMethodCall(YandexMapController.java:188)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Handler.handleCallback(Handler.java:959)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Looper.loopOnce(Looper.java:232)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.os.Looper.loop(Looper.java:317)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at android.app.ActivityThread.main(ActivityThread.java:8592)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/MethodChannel#yandex_mapkit/yandex_map_0(26115): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/flutter (26115): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.Integer cannot be cast to java.lang.Long, null, java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/flutter (26115): 	at com.unact.yandexmapkit.lite.YandexMapController.selectGeoObject(YandexMapController.java:258)
E/flutter (26115): 	at com.unact.yandexmapkit.lite.YandexMapController.onMethodCall(YandexMapController.java:188)
E/flutter (26115): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/flutter (26115): 	at android.os.Handler.handleCallback(Handler.java:959)
E/flutter (26115): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/flutter (26115): 	at android.os.Looper.loopOnce(Looper.java:232)
E/flutter (26115): 	at android.os.Looper.loop(Looper.java:317)
E/flutter (26115): 	at android.app.ActivityThread.main(ActivityThread.java:8592)
E/flutter (26115): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter (26115): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/flutter (26115): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/flutter (26115): )
E/flutter (26115): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter (26115): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (26115): <asynchronous suspension>
E/flutter (26115): #2      YandexMapController.selectGeoObject (package:yandex_mapkit/src/yandex_map_controller.dart:70:5)
E/flutter (26115): <asynchronous suspension>
E/flutter (26115): 
E/flutter (26115): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.Integer cannot be cast to java.lang.Long, null, java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
E/flutter (26115): 	at com.unact.yandexmapkit.lite.YandexMapController.selectGeoObject(YandexMapController.java:258)
E/flutter (26115): 	at com.unact.yandexmapkit.lite.YandexMapController.onMethodCall(YandexMapController.java:188)
E/flutter (26115): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/flutter (26115): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/flutter (26115): 	at android.os.Handler.handleCallback(Handler.java:959)
E/flutter (26115): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/flutter (26115): 	at android.os.Looper.loopOnce(Looper.java:232)
E/flutter (26115): 	at android.os.Looper.loop(Looper.java:317)
E/flutter (26115): 	at android.app.ActivityThread.main(ActivityThread.java:8592)
E/flutter (26115): 	at java.lang.reflect.Method.invoke(Native Method)
E/flutter (26115): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/flutter (26115): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
E/flutter (26115): )
E/flutter (26115): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:648:7)
E/flutter (26115): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (26115): <asynchronous suspension>
E/flutter (26115): #2      YandexMapController.selectGeoObject (package:yandex_mapkit/src/yandex_map_controller.dart:70:5)
E/flutter (26115): <asynchronous suspension>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant