Closed pedroicandido closed 1 year ago
Thanks, @pedroicandido. We will take a look.
Hi @pedroicandido, we tried to reproduce the issue with the _cameraapp example. If you add the code as shown in the guide it still works. Please also check if the _hereMapController.viewportSize
is as expected when you execute the code. In case no render target is attached to it yet, width
and height
will be 0.
If you can still reproduce the issue, please provide more details how you experienced the issue. Thanks. Hope this helps.
Hey @HERE-SDK-Support-Team, apologies for the delay! I tried again, but it still has the same error. I recorded two videos to show the behavior: The first one, is the old version, that works fine:
https://github.com/heremaps/here-sdk-examples/assets/49328524/0e78dd32-20dc-4740-ba7f-74522a99176a
the second, is the latest sdk version, 4.14.2:
https://github.com/heremaps/here-sdk-examples/assets/49328524/18788e01-86a8-4f5e-8d5c-ee7eb1f42d73
As we can see, the two versions has the _hereMapController.viewportSize values, but in the latest version the camera does not behave as it should. There was no code change, just the sdk change.
Hi @pedroicandido,
thanks for the feedback. When using the visual navigator, this is different, as the navigator controls the principal point. When you want to use a custom principal point during tbt, you have to set this for the camera behavior and not the map view:
FixedCameraBehavior fixedCameraBehavior = FixedCameraBehavior();
_visualNavigator.cameraBehavior = fixedCameraBehavior;
// Repositions principal point higher than default during navigation.
Anchor2D newTransformCenter = Anchor2D.withHorizontalAndVertical(0.5, 0.5);
fixedCameraBehavior.normalizedPrincipalPoint = newTransformCenter;
In earlier HERE SDK versions, indeed this was not possible and customers tried to alter the pp via map view which led to issues.
Hope this helps.
THAAANKS @HERE-SDK-Support-Team
This worked perfectly! Thanks a lot for the help!
Hey, guys! I'm having trouble trying set camera principal point. In the 4.12.7 version it was working, but when upgrading to 4.14 stopped. Can anyone help me? The code i`m using is the same of the link: https://developer.here.com/documentation/flutter-sdk-explore/4.13.5.0/dev_guide/topics/camera.html#change-the-tranform-center